aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/boot/bootp.c2
-rw-r--r--arch/alpha/boot/bootpz.c2
-rw-r--r--arch/alpha/boot/main.c2
-rw-r--r--arch/alpha/include/asm/asm-offsets.h1
-rw-r--r--arch/alpha/include/asm/core_t2.h34
-rw-r--r--arch/alpha/include/asm/elf.h1
-rw-r--r--arch/alpha/include/asm/fcntl.h19
-rw-r--r--arch/alpha/include/asm/spinlock.h38
-rw-r--r--arch/alpha/include/asm/spinlock_types.h8
-rw-r--r--arch/alpha/kernel/core_t2.c2
-rw-r--r--arch/alpha/kernel/irq.c4
-rw-r--r--arch/alpha/kernel/osf_sys.c19
-rw-r--r--arch/alpha/kernel/srm_env.c65
-rw-r--r--arch/alpha/mm/numa.c2
-rw-r--r--arch/arm/Kconfig5
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/Makefile14
-rw-r--r--arch/arm/common/dmabounce.c12
-rw-r--r--arch/arm/common/scoop.c2
-rw-r--r--arch/arm/configs/da8xx_omapl_defconfig (renamed from arch/arm/configs/da850_omapl138_defconfig)257
-rw-r--r--arch/arm/configs/davinci_all_defconfig126
-rw-r--r--arch/arm/configs/htcherald_defconfig9
-rw-r--r--arch/arm/configs/omap3_touchbook_defconfig2431
-rw-r--r--arch/arm/configs/omap_3430sdp_defconfig28
-rw-r--r--arch/arm/configs/omap_4430sdp_defconfig146
-rw-r--r--arch/arm/configs/omap_zoom2_defconfig3
-rw-r--r--arch/arm/configs/omap_zoom3_defconfig3
-rw-r--r--arch/arm/configs/zeus_defconfig2032
-rw-r--r--arch/arm/include/asm/asm-offsets.h1
-rw-r--r--arch/arm/include/asm/cacheflush.h17
-rw-r--r--arch/arm/include/asm/elf.h1
-rw-r--r--arch/arm/include/asm/mach-types.h1
-rw-r--r--arch/arm/include/asm/mach/irq.h4
-rw-r--r--arch/arm/include/asm/mman.h3
-rw-r--r--arch/arm/include/asm/spinlock.h40
-rw-r--r--arch/arm/include/asm/spinlock_types.h8
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--arch/arm/kernel/armksyms.c20
-rw-r--r--arch/arm/kernel/calls.S2
-rw-r--r--arch/arm/kernel/early_printk.c57
-rw-r--r--arch/arm/kernel/entry-common.S4
-rw-r--r--arch/arm/kernel/irq.c12
-rw-r--r--arch/arm/kernel/smp_twd.c1
-rw-r--r--arch/arm/kernel/sys_arm.c55
-rw-r--r--arch/arm/kernel/vmlinux.lds.S13
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c51
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c10
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c12
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c12
-rw-r--r--arch/arm/mach-at91/include/mach/atmel-mci.h24
-rw-r--r--arch/arm/mach-at91/include/mach/board.h7
-rw-r--r--arch/arm/mach-bcmring/arch.c10
-rw-r--r--arch/arm/mach-bcmring/include/csp/reg.h2
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h2
-rw-r--r--arch/arm/mach-bcmring/include/mach/csp/mm_addr.h2
-rw-r--r--arch/arm/mach-bcmring/include/mach/dma.h2
-rw-r--r--arch/arm/mach-bcmring/include/mach/reg_nand.h66
-rw-r--r--arch/arm/mach-bcmring/include/mach/reg_umi.h237
-rw-r--r--arch/arm/mach-clps711x/include/mach/memory.h2
-rw-r--r--arch/arm/mach-davinci/Kconfig59
-rw-r--r--arch/arm/mach-davinci/Makefile5
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c466
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c461
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c16
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c13
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c57
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c15
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c86
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c323
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c20
-rw-r--r--arch/arm/mach-davinci/clock.c231
-rw-r--r--arch/arm/mach-davinci/clock.h17
-rw-r--r--arch/arm/mach-davinci/common.c4
-rw-r--r--arch/arm/mach-davinci/cp_intc.c3
-rw-r--r--arch/arm/mach-davinci/cpufreq.c226
-rw-r--r--arch/arm/mach-davinci/cpuidle.c197
-rw-r--r--arch/arm/mach-davinci/da830.c75
-rw-r--r--arch/arm/mach-davinci/da850.c298
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c106
-rw-r--r--arch/arm/mach-davinci/devices.c6
-rw-r--r--arch/arm/mach-davinci/dm355.c2
-rw-r--r--arch/arm/mach-davinci/dm365.c107
-rw-r--r--arch/arm/mach-davinci/dm644x.c7
-rw-r--r--arch/arm/mach-davinci/dm646x.c11
-rw-r--r--arch/arm/mach-davinci/dma.c105
-rw-r--r--arch/arm/mach-davinci/gpio.c9
-rw-r--r--arch/arm/mach-davinci/include/mach/asp.h3
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h6
-rw-r--r--arch/arm/mach-davinci/include/mach/cpufreq.h26
-rw-r--r--arch/arm/mach-davinci/include/mach/cpuidle.h17
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h26
-rw-r--r--arch/arm/mach-davinci/include/mach/dm365.h10
-rw-r--r--arch/arm/mach-davinci/include/mach/dm644x.h1
-rw-r--r--arch/arm/mach-davinci/include/mach/irqs.h1
-rw-r--r--arch/arm/mach-davinci/include/mach/keyscan.h41
-rw-r--r--arch/arm/mach-davinci/include/mach/mux.h20
-rw-r--r--arch/arm/mach-davinci/include/mach/nand.h4
-rw-r--r--arch/arm/mach-davinci/include/mach/system.h3
-rw-r--r--arch/arm/mach-davinci/include/mach/usb.h59
-rw-r--r--arch/arm/mach-davinci/mux.c1
-rw-r--r--arch/arm/mach-davinci/psc.c3
-rw-r--r--arch/arm/mach-davinci/serial.c6
-rw-r--r--arch/arm/mach-davinci/sram.c3
-rw-r--r--arch/arm/mach-davinci/time.c6
-rw-r--r--arch/arm/mach-davinci/usb.c84
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h11
-rw-r--r--arch/arm/mach-footbridge/common.c22
-rw-r--r--arch/arm/mach-footbridge/include/mach/memory.h15
-rw-r--r--arch/arm/mach-integrator/include/mach/memory.h3
-rw-r--r--arch/arm/mach-ixp2000/include/mach/memory.h12
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/memory.h19
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig22
-rw-r--r--arch/arm/mach-ixp4xx/avila-pci.c42
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c4
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c6
-rw-r--r--arch/arm/mach-ixp4xx/common.c2
-rw-r--r--arch/arm/mach-ixp4xx/coyote-pci.c22
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c9
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-pci.c46
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-setup.c17
-rw-r--r--arch/arm/mach-ixp4xx/fsg-pci.c31
-rw-r--r--arch/arm/mach-ixp4xx/fsg-setup.c8
-rw-r--r--arch/arm/mach-ixp4xx/goramo_mlr.c45
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-pci.c40
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-setup.c30
-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/dsmg600.h52
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/fsg.h50
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gpio.h2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gtwx5715.h116
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/hardware.h18
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h307
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/irqs.h69
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/ixdp425.h39
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/nas100d.h52
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/npe.h2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/nslu2.h55
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/prpmc1100.h33
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/timex.h2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c43
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c12
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_npe.c2
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-pci.c41
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c16
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-pci.c35
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c21
-rw-r--r--arch/arm/mach-kirkwood/Kconfig6
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/netspace_v2-setup.c325
-rw-r--r--arch/arm/mach-lh7a40x/clocks.c8
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-msm/Kconfig30
-rw-r--r--arch/arm/mach-msm/Makefile1
-rw-r--r--arch/arm/mach-msm/board-dream.c93
-rw-r--r--arch/arm/mach-msm/board-dream.h5
-rw-r--r--arch/arm/mach-msm/include/mach/debug-macro.S24
-rw-r--r--arch/arm/mach-msm/include/mach/mmc.h26
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap.h12
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h7
-rw-r--r--arch/arm/mach-msm/io.c3
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c11
-rw-r--r--arch/arm/mach-ns9xxx/irq.c8
-rw-r--r--arch/arm/mach-omap1/Makefile10
-rw-r--r--arch/arm/mach-omap1/board-fsample.c60
-rw-r--r--arch/arm/mach-omap1/board-h2.c59
-rw-r--r--arch/arm/mach-omap1/board-h3.c66
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c64
-rw-r--r--arch/arm/mach-omap1/board-innovator.c12
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c2
-rw-r--r--arch/arm/mach-omap1/board-osk.c10
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c58
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c10
-rw-r--r--arch/arm/mach-omap1/clock.c501
-rw-r--r--arch/arm/mach-omap1/clock.h652
-rw-r--r--arch/arm/mach-omap1/clock_data.c843
-rw-r--r--arch/arm/mach-omap1/i2c.c39
-rw-r--r--arch/arm/mach-omap1/include/mach/lcd_dma.h78
-rw-r--r--arch/arm/mach-omap1/include/mach/lcdc.h57
-rw-r--r--arch/arm/mach-omap1/io.c3
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c448
-rw-r--r--arch/arm/mach-omap1/mux.c8
-rw-r--r--arch/arm/mach-omap1/opp.h28
-rw-r--r--arch/arm/mach-omap1/opp_data.c59
-rw-r--r--arch/arm/mach-omap2/Kconfig43
-rw-r--r--arch/arm/mach-omap2/Makefile23
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c184
-rwxr-xr-xarch/arm/mach-omap2/board-3630sdp.c14
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c11
-rw-r--r--arch/arm/mach-omap2/board-apollon.c10
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c100
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c13
-rw-r--r--arch/arm/mach-omap2/board-ldp.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c23
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c23
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c43
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c572
-rw-r--r--arch/arm/mach-omap2/board-overo.c16
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c129
-rw-r--r--arch/arm/mach-omap2/board-rx51.c16
-rwxr-xr-xarch/arm/mach-omap2/board-zoom-peripherals.c16
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c10
-rw-r--r--arch/arm/mach-omap2/board-zoom3.c10
-rw-r--r--arch/arm/mach-omap2/clock.c47
-rw-r--r--arch/arm/mach-omap2/clock.h50
-rw-r--r--arch/arm/mach-omap2/clock24xx.c805
-rw-r--r--arch/arm/mach-omap2/clock2xxx.c587
-rw-r--r--arch/arm/mach-omap2/clock2xxx.h41
-rw-r--r--arch/arm/mach-omap2/clock2xxx_data.c (renamed from arch/arm/mach-omap2/clock24xx.h)836
-rw-r--r--arch/arm/mach-omap2/clock34xx.c953
-rw-r--r--arch/arm/mach-omap2/clock34xx.h2999
-rw-r--r--arch/arm/mach-omap2/clock34xx_data.c3289
-rw-r--r--arch/arm/mach-omap2/clock44xx.c33
-rw-r--r--arch/arm/mach-omap2/clock44xx.h15
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c2766
-rw-r--r--arch/arm/mach-omap2/clock_common_data.c39
-rw-r--r--arch/arm/mach-omap2/clockdomain.c6
-rw-r--r--arch/arm/mach-omap2/cm-regbits-44xx.h1474
-rw-r--r--arch/arm/mach-omap2/cm.c7
-rw-r--r--arch/arm/mach-omap2/cm.h15
-rw-r--r--arch/arm/mach-omap2/cm44xx.h358
-rw-r--r--arch/arm/mach-omap2/devices.c62
-rw-r--r--arch/arm/mach-omap2/dpll.c538
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.c8
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
-rw-r--r--arch/arm/mach-omap2/i2c.c56
-rw-r--r--arch/arm/mach-omap2/id.c31
-rw-r--r--arch/arm/mach-omap2/io.c9
-rw-r--r--arch/arm/mach-omap2/mux.c1061
-rw-r--r--arch/arm/mach-omap2/mux.h163
-rw-r--r--arch/arm/mach-omap2/mux34xx.c2099
-rw-r--r--arch/arm/mach-omap2/mux34xx.h398
-rw-r--r--arch/arm/mach-omap2/omap-headsmp.S35
-rw-r--r--arch/arm/mach-omap2/omap-smp.c31
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c164
-rw-r--r--arch/arm/mach-omap2/opp2420_data.c126
-rw-r--r--arch/arm/mach-omap2/opp2430_data.c133
-rw-r--r--arch/arm/mach-omap2/opp2xxx.h424
-rw-r--r--arch/arm/mach-omap2/pm-debug.c4
-rw-r--r--arch/arm/mach-omap2/powerdomain.c36
-rw-r--r--arch/arm/mach-omap2/powerdomains34xx.h1
-rw-r--r--arch/arm/mach-omap2/prcm-common.h73
-rw-r--r--arch/arm/mach-omap2/prcm.c13
-rw-r--r--arch/arm/mach-omap2/prm-regbits-44xx.h2205
-rw-r--r--arch/arm/mach-omap2/prm.h8
-rw-r--r--arch/arm/mach-omap2/prm44xx.h411
-rw-r--r--arch/arm/mach-omap2/sdrc.c16
-rw-r--r--arch/arm/mach-omap2/sdrc.h19
-rw-r--r--arch/arm/mach-omap2/serial.c95
-rw-r--r--arch/arm/mach-omap2/sram34xx.S19
-rw-r--r--arch/arm/mach-omap2/usb-ehci.c166
-rw-r--r--arch/arm/mach-orion5x/pci.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig17
-rw-r--r--arch/arm/mach-pxa/Makefile1
-rw-r--r--arch/arm/mach-pxa/devices.c2
-rw-r--r--arch/arm/mach-pxa/em-x270.c11
-rw-r--r--arch/arm/mach-pxa/include/mach/arcom-pcmcia.h11
-rw-r--r--arch/arm/mach-pxa/include/mach/palmld.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmt5.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtc.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmte2.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtx.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/palmz72.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/viper.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/zeus.h82
-rw-r--r--arch/arm/mach-pxa/viper.c20
-rw-r--r--arch/arm/mach-pxa/zeus.c820
-rw-r--r--arch/arm/mach-realview/Kconfig2
-rw-r--r--arch/arm/mach-s3c2400/Kconfig6
-rw-r--r--arch/arm/mach-s3c2410/Kconfig2
-rw-r--r--arch/arm/mach-s3c2410/include/mach/spi.h2
-rw-r--r--arch/arm/mach-s3c2412/Kconfig4
-rw-r--r--arch/arm/mach-s3c2440/Kconfig3
-rw-r--r--arch/arm/mach-s3c2442/Kconfig4
-rw-r--r--arch/arm/mach-s3c2442/mach-gta02.c3
-rw-r--r--arch/arm/mach-s3c2443/Kconfig2
-rw-r--r--arch/arm/mach-s3c24a0/include/mach/memory.h2
-rw-r--r--arch/arm/mach-s3c6400/Kconfig2
-rw-r--r--arch/arm/mach-s3c6400/setup-sdhci.c2
-rw-r--r--arch/arm/mach-s3c6410/Kconfig2
-rw-r--r--arch/arm/mach-s3c6410/setup-sdhci.c2
-rw-r--r--arch/arm/mach-s5pc100/Kconfig2
-rw-r--r--arch/arm/mach-sa1100/Kconfig13
-rw-r--r--arch/arm/mach-sa1100/dma.c2
-rw-r--r--arch/arm/mach-sa1100/generic.c12
-rw-r--r--arch/arm/mach-u300/include/mach/coh901318.h281
-rw-r--r--arch/arm/mach-u300/include/mach/u300-regs.h2
-rw-r--r--arch/arm/mach-w90x900/include/mach/nuc900_spi.h35
-rw-r--r--arch/arm/mm/cache-fa.S11
-rw-r--r--arch/arm/mm/cache-l2x0.c93
-rw-r--r--arch/arm/mm/cache-v3.S9
-rw-r--r--arch/arm/mm/cache-v4.S9
-rw-r--r--arch/arm/mm/cache-v4wb.S11
-rw-r--r--arch/arm/mm/cache-v4wt.S11
-rw-r--r--arch/arm/mm/cache-v6.S11
-rw-r--r--arch/arm/mm/cache-v7.S13
-rw-r--r--arch/arm/mm/flush.c4
-rw-r--r--arch/arm/mm/highmem.c2
-rw-r--r--arch/arm/mm/mmap.c3
-rw-r--r--arch/arm/mm/nommu.c2
-rw-r--r--arch/arm/mm/proc-arm1020.S11
-rw-r--r--arch/arm/mm/proc-arm1020e.S11
-rw-r--r--arch/arm/mm/proc-arm1022.S11
-rw-r--r--arch/arm/mm/proc-arm1026.S11
-rw-r--r--arch/arm/mm/proc-arm920.S11
-rw-r--r--arch/arm/mm/proc-arm922.S11
-rw-r--r--arch/arm/mm/proc-arm925.S11
-rw-r--r--arch/arm/mm/proc-arm926.S11
-rw-r--r--arch/arm/mm/proc-arm940.S9
-rw-r--r--arch/arm/mm/proc-arm946.S11
-rw-r--r--arch/arm/mm/proc-feroceon.S15
-rw-r--r--arch/arm/mm/proc-mohawk.S11
-rw-r--r--arch/arm/mm/proc-syms.c3
-rw-r--r--arch/arm/mm/proc-v6.S5
-rw-r--r--arch/arm/mm/proc-xsc3.S11
-rw-r--r--arch/arm/mm/proc-xscale.S13
-rw-r--r--arch/arm/plat-mxc/Makefile1
-rw-r--r--arch/arm/plat-mxc/ehci.c92
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx3.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mxc91231.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc_ehci.h37
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc_nand.h3
-rw-r--r--arch/arm/plat-mxc/pwm.c2
-rw-r--r--arch/arm/plat-omap/Kconfig63
-rw-r--r--arch/arm/plat-omap/clock.c26
-rw-r--r--arch/arm/plat-omap/common.c4
-rw-r--r--arch/arm/plat-omap/debug-devices.c10
-rw-r--r--arch/arm/plat-omap/debug-leds.c2
-rw-r--r--arch/arm/plat-omap/devices.c68
-rw-r--r--arch/arm/plat-omap/dma.c412
-rw-r--r--arch/arm/plat-omap/fb.c49
-rw-r--r--arch/arm/plat-omap/gpio.c2
-rw-r--r--arch/arm/plat-omap/i2c.c44
-rw-r--r--arch/arm/plat-omap/include/plat/board.h9
-rw-r--r--arch/arm/plat-omap/include/plat/clkdev_omap.h41
-rw-r--r--arch/arm/plat-omap/include/plat/clock.h5
-rw-r--r--arch/arm/plat-omap/include/plat/common.h35
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h31
-rw-r--r--arch/arm/plat-omap/include/plat/display.h575
-rw-r--r--arch/arm/plat-omap/include/plat/dma.h60
-rw-r--r--arch/arm/plat-omap/include/plat/gpmc.h2
-rw-r--r--arch/arm/plat-omap/include/plat/i2c.h39
-rw-r--r--arch/arm/plat-omap/include/plat/irqs.h16
-rw-r--r--arch/arm/plat-omap/include/plat/mux.h232
-rw-r--r--arch/arm/plat-omap/include/plat/omap16xx.h2
-rw-r--r--arch/arm/plat-omap/include/plat/omap44xx.h6
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h8
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h26
-rw-r--r--arch/arm/plat-omap/include/plat/omapfb.h398
-rw-r--r--arch/arm/plat-omap/include/plat/powerdomain.h17
-rw-r--r--arch/arm/plat-omap/include/plat/sdrc.h9
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h1
-rw-r--r--arch/arm/plat-omap/include/plat/smp.h2
-rw-r--r--arch/arm/plat-omap/include/plat/vram.h62
-rw-r--r--arch/arm/plat-omap/include/plat/vrfb.h50
-rw-r--r--arch/arm/plat-omap/mux.c8
-rw-r--r--arch/arm/plat-omap/omap_device.c18
-rw-r--r--arch/arm/plat-omap/sram.c20
-rw-r--r--arch/arm/plat-omap/usb.c8
-rw-r--r--arch/arm/plat-s3c/Kconfig2
-rw-r--r--arch/arm/plat-s3c/include/plat/nand.h2
-rw-r--r--arch/arm/plat-s3c/pwm.c2
-rw-r--r--arch/arm/plat-s3c24xx/Kconfig2
-rw-r--r--arch/arm/plat-s3c24xx/adc.c2
-rw-r--r--arch/arm/plat-s3c24xx/dma.c6
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/map.h2
-rw-r--r--arch/arm/plat-s3c24xx/irq.c2
-rw-r--r--arch/arm/plat-s3c64xx/Kconfig2
-rw-r--r--arch/arm/plat-s5pc1xx/Kconfig2
-rw-r--r--arch/arm/tools/Makefile2
-rw-r--r--arch/arm/tools/gen-mach-types2
-rw-r--r--arch/arm/tools/mach-types44
-rw-r--r--arch/arm/vfp/vfpmodule.c83
-rw-r--r--arch/avr32/Kconfig13
-rw-r--r--arch/avr32/Makefile2
-rw-r--r--arch/avr32/boards/atngw100/Kconfig25
-rw-r--r--arch/avr32/boards/atngw100/evklcd10x.c7
-rw-r--r--arch/avr32/boards/atngw100/mrmt.c1
-rw-r--r--arch/avr32/boards/atngw100/setup.c121
-rw-r--r--arch/avr32/boards/hammerhead/Kconfig2
-rw-r--r--arch/avr32/configs/atngw100_defconfig383
-rw-r--r--arch/avr32/configs/atngw100_evklcd100_defconfig605
-rw-r--r--arch/avr32/configs/atngw100_evklcd101_defconfig599
-rw-r--r--arch/avr32/configs/atngw100mkii_defconfig (renamed from arch/arm/configs/da830_omapl137_defconfig)1214
-rw-r--r--arch/avr32/configs/atngw100mkii_evklcd100_defconfig1549
-rw-r--r--arch/avr32/configs/atngw100mkii_evklcd101_defconfig1549
-rw-r--r--arch/avr32/configs/atstk1002_defconfig415
-rw-r--r--arch/avr32/configs/atstk1006_defconfig297
-rw-r--r--arch/avr32/include/asm/asm-offsets.h1
-rw-r--r--arch/avr32/include/asm/elf.h1
-rw-r--r--arch/avr32/include/asm/hardirq.h19
-rw-r--r--arch/avr32/include/asm/syscalls.h4
-rw-r--r--arch/avr32/kernel/irq.c13
-rw-r--r--arch/avr32/kernel/sys_avr32.c31
-rw-r--r--arch/avr32/kernel/syscall-stubs.S2
-rw-r--r--arch/avr32/kernel/vmlinux.lds.S64
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c53
-rw-r--r--arch/avr32/mach-at32ap/include/mach/atmel-mci.h24
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h1
-rw-r--r--arch/blackfin/Kconfig45
-rw-r--r--arch/blackfin/Makefile4
-rw-r--r--arch/blackfin/boot/Makefile6
-rw-r--r--arch/blackfin/configs/BF518F-EZBRD_defconfig14
-rw-r--r--arch/blackfin/configs/BF526-EZBRD_defconfig2
-rw-r--r--arch/blackfin/configs/BF527-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF533-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF533-STAMP_defconfig2
-rw-r--r--arch/blackfin/configs/BF537-STAMP_defconfig7
-rw-r--r--arch/blackfin/configs/BF538-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig332
-rw-r--r--arch/blackfin/configs/BF561-ACVILON_defconfig1643
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig214
-rw-r--r--arch/blackfin/configs/BlackStamp_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF527_defconfig390
-rw-r--r--arch/blackfin/configs/CM-BF533_defconfig631
-rw-r--r--arch/blackfin/configs/CM-BF537E_defconfig334
-rw-r--r--arch/blackfin/configs/CM-BF537U_defconfig620
-rw-r--r--arch/blackfin/configs/CM-BF548_defconfig793
-rw-r--r--arch/blackfin/configs/CM-BF561_defconfig558
-rw-r--r--arch/blackfin/configs/H8606_defconfig2
-rw-r--r--arch/blackfin/configs/IP0X_defconfig2
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig2
-rw-r--r--arch/blackfin/configs/SRV1_defconfig4
-rw-r--r--arch/blackfin/configs/TCM-BF537_defconfig577
-rw-r--r--arch/blackfin/include/asm/asm-offsets.h1
-rw-r--r--arch/blackfin/include/asm/bfin-global.h10
-rw-r--r--arch/blackfin/include/asm/bfin-lq035q1.h28
-rw-r--r--arch/blackfin/include/asm/bug.h2
-rw-r--r--arch/blackfin/include/asm/cacheflush.h1
-rw-r--r--arch/blackfin/include/asm/checksum.h70
-rw-r--r--arch/blackfin/include/asm/clocks.h2
-rw-r--r--arch/blackfin/include/asm/dma-mapping.h121
-rw-r--r--arch/blackfin/include/asm/dma.h93
-rw-r--r--arch/blackfin/include/asm/dpmc.h107
-rw-r--r--arch/blackfin/include/asm/elf.h1
-rw-r--r--arch/blackfin/include/asm/fcntl.h2
-rw-r--r--arch/blackfin/include/asm/gpio.h5
-rw-r--r--arch/blackfin/include/asm/gptimers.h32
-rw-r--r--arch/blackfin/include/asm/io.h95
-rw-r--r--arch/blackfin/include/asm/ipipe.h14
-rw-r--r--arch/blackfin/include/asm/ipipe_base.h26
-rw-r--r--arch/blackfin/include/asm/irqflags.h13
-rw-r--r--arch/blackfin/include/asm/kgdb.h3
-rw-r--r--arch/blackfin/include/asm/mem_init.h153
-rw-r--r--arch/blackfin/include/asm/mmu_context.h33
-rw-r--r--arch/blackfin/include/asm/module.h2
-rw-r--r--arch/blackfin/include/asm/pci.h130
-rw-r--r--arch/blackfin/include/asm/ptrace.h6
-rw-r--r--arch/blackfin/include/asm/sections.h16
-rw-r--r--arch/blackfin/include/asm/spinlock.h62
-rw-r--r--arch/blackfin/include/asm/spinlock_types.h8
-rw-r--r--arch/blackfin/include/asm/thread_info.h2
-rw-r--r--arch/blackfin/include/asm/trace.h2
-rw-r--r--arch/blackfin/include/asm/uaccess.h4
-rw-r--r--arch/blackfin/include/asm/unistd.h3
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c52
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c99
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbinit.c2
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbmgr.c13
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c31
-rw-r--r--arch/blackfin/kernel/dma-mapping.c68
-rw-r--r--arch/blackfin/kernel/gptimers.c32
-rw-r--r--arch/blackfin/kernel/ipipe.c67
-rw-r--r--arch/blackfin/kernel/irqchip.c6
-rw-r--r--arch/blackfin/kernel/kgdb.c17
-rw-r--r--arch/blackfin/kernel/kgdb_test.c67
-rw-r--r--arch/blackfin/kernel/process.c101
-rw-r--r--arch/blackfin/kernel/ptrace.c13
-rw-r--r--arch/blackfin/kernel/setup.c46
-rw-r--r--arch/blackfin/kernel/signal.c18
-rw-r--r--arch/blackfin/kernel/sys_bfin.c33
-rw-r--r--arch/blackfin/kernel/time-ts.c47
-rw-r--r--arch/blackfin/kernel/time.c8
-rw-r--r--arch/blackfin/kernel/traps.c51
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S30
-rw-r--r--arch/blackfin/lib/Makefile2
-rw-r--r--arch/blackfin/lib/checksum.c125
-rw-r--r--arch/blackfin/mach-bf518/Kconfig4
-rw-r--r--arch/blackfin/mach-bf518/include/mach/blackfin.h6
-rw-r--r--arch/blackfin/mach-bf518/include/mach/cdefBF514.h13
-rw-r--r--arch/blackfin/mach-bf518/include/mach/cdefBF516.h80
-rw-r--r--arch/blackfin/mach-bf518/include/mach/cdefBF518.h247
-rw-r--r--arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h75
-rw-r--r--arch/blackfin/mach-bf518/include/mach/defBF514.h45
-rw-r--r--arch/blackfin/mach-bf518/include/mach/defBF516.h213
-rw-r--r--arch/blackfin/mach-bf518/include/mach/defBF518.h592
-rw-r--r--arch/blackfin/mach-bf518/include/mach/defBF51x_base.h190
-rw-r--r--arch/blackfin/mach-bf527/Kconfig4
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c48
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c62
-rw-r--r--arch/blackfin/mach-bf527/include/mach/blackfin.h6
-rw-r--r--arch/blackfin/mach-bf527/include/mach/cdefBF525.h11
-rw-r--r--arch/blackfin/mach-bf527/include/mach/cdefBF527.h424
-rw-r--r--arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h23
-rw-r--r--arch/blackfin/mach-bf527/include/mach/defBF525.h11
-rw-r--r--arch/blackfin/mach-bf527/include/mach/defBF527.h679
-rw-r--r--arch/blackfin/mach-bf527/include/mach/defBF52x_base.h190
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c8
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c15
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c6
-rw-r--r--arch/blackfin/mach-bf533/include/mach/defBF532.h115
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c46
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c386
-rw-r--r--arch/blackfin/mach-bf537/include/mach/bf537.h10
-rw-r--r--arch/blackfin/mach-bf537/include/mach/blackfin.h6
-rw-r--r--arch/blackfin/mach-bf537/include/mach/defBF534.h99
-rw-r--r--arch/blackfin/mach-bf538/Makefile1
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c42
-rw-r--r--arch/blackfin/mach-bf538/ext-gpio.c123
-rw-r--r--arch/blackfin/mach-bf538/include/mach/blackfin.h6
-rw-r--r--arch/blackfin/mach-bf538/include/mach/defBF539.h1261
-rw-r--r--arch/blackfin/mach-bf538/include/mach/gpio.h7
-rw-r--r--arch/blackfin/mach-bf538/include/mach/portmux.h2
-rw-r--r--arch/blackfin/mach-bf548/Kconfig24
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c59
-rw-r--r--arch/blackfin/mach-bf548/include/mach/bf548.h12
-rw-r--r--arch/blackfin/mach-bf548/include/mach/blackfin.h6
-rw-r--r--arch/blackfin/mach-bf548/include/mach/cdefBF547.h12
-rw-r--r--arch/blackfin/mach-bf548/include/mach/cdefBF548.h788
-rw-r--r--arch/blackfin/mach-bf548/include/mach/cdefBF549.h1533
-rw-r--r--arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h22
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF544.h8
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF547.h14
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF548.h1203
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF549.h2526
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF54x_base.h289
-rw-r--r--arch/blackfin/mach-bf561/boards/Kconfig7
-rw-r--r--arch/blackfin/mach-bf561/boards/Makefile1
-rw-r--r--arch/blackfin/mach-bf561/boards/acvilon.c551
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c28
-rw-r--r--arch/blackfin/mach-bf561/coreb.c8
-rw-r--r--arch/blackfin/mach-bf561/include/mach/defBF561.h101
-rw-r--r--arch/blackfin/mach-bf561/smp.c17
-rw-r--r--arch/blackfin/mach-common/clocks-init.c1
-rw-r--r--arch/blackfin/mach-common/cpufreq.c5
-rw-r--r--arch/blackfin/mach-common/dpmc_modes.S30
-rw-r--r--arch/blackfin/mach-common/entry.S6
-rw-r--r--arch/blackfin/mach-common/ints-priority.c15
-rw-r--r--arch/blackfin/mach-common/smp.c16
-rw-r--r--arch/cris/arch-v10/mm/fault.c3
-rw-r--r--arch/cris/arch-v10/mm/tlb.c22
-rw-r--r--arch/cris/arch-v32/kernel/head.S1
-rw-r--r--arch/cris/include/arch-v32/arch/spinlock.h62
-rw-r--r--arch/cris/include/asm/asm-offsets.h1
-rw-r--r--arch/cris/include/asm/elf.h2
-rw-r--r--arch/cris/kernel/asm-offsets.c1
-rw-r--r--arch/cris/kernel/irq.c4
-rw-r--r--arch/cris/kernel/sys_cris.c30
-rw-r--r--arch/cris/kernel/vmlinux.lds.S1
-rw-r--r--arch/cris/mm/fault.c2
-rw-r--r--arch/frv/include/asm/asm-offsets.h1
-rw-r--r--arch/frv/include/asm/elf.h1
-rw-r--r--arch/frv/kernel/irq.c4
-rw-r--r--arch/frv/kernel/process.c5
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/frv/kernel/sys_frv.c66
-rw-r--r--arch/h8300/Kconfig4
-rw-r--r--arch/h8300/include/asm/asm-offsets.h1
-rw-r--r--arch/h8300/include/asm/elf.h1
-rw-r--r--arch/h8300/include/asm/module.h2
-rw-r--r--arch/h8300/kernel/irq.c4
-rw-r--r--arch/h8300/kernel/process.c5
-rw-r--r--arch/h8300/kernel/sys_h8300.c83
-rw-r--r--arch/h8300/kernel/syscalls.S2
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S1
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/ia64/Makefile2
-rw-r--r--arch/ia64/hp/common/sba_iommu.c40
-rw-r--r--arch/ia64/ia32/elfcore32.h2
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/ia32/sys_ia32.c3
-rw-r--r--arch/ia64/include/asm/asm-offsets.h1
-rw-r--r--arch/ia64/include/asm/bitops.h2
-rw-r--r--arch/ia64/include/asm/dma-mapping.h2
-rw-r--r--arch/ia64/include/asm/elf.h1
-rw-r--r--arch/ia64/include/asm/hw_irq.h6
-rw-r--r--arch/ia64/include/asm/io.h2
-rw-r--r--arch/ia64/include/asm/irq.h2
-rw-r--r--arch/ia64/include/asm/mca.h5
-rw-r--r--arch/ia64/include/asm/meminit.h2
-rw-r--r--arch/ia64/include/asm/numa.h2
-rw-r--r--arch/ia64/include/asm/perfmon_default_smpl.h2
-rw-r--r--arch/ia64/include/asm/pgtable.h3
-rw-r--r--arch/ia64/include/asm/processor.h6
-rw-r--r--arch/ia64/include/asm/rwsem.h2
-rw-r--r--arch/ia64/include/asm/sn/shubio.h2
-rw-r--r--arch/ia64/include/asm/spinlock.h76
-rw-r--r--arch/ia64/include/asm/spinlock_types.h8
-rw-r--r--arch/ia64/include/asm/unistd.h2
-rw-r--r--arch/ia64/include/asm/xen/hypervisor.h28
-rw-r--r--arch/ia64/kernel/Makefile7
-rw-r--r--arch/ia64/kernel/acpi.c33
-rw-r--r--arch/ia64/kernel/esi.c2
-rw-r--r--arch/ia64/kernel/head.S4
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c2
-rw-r--r--arch/ia64/kernel/iosapic.c6
-rw-r--r--arch/ia64/kernel/irq.c4
-rw-r--r--arch/ia64/kernel/irq_ia64.c10
-rw-r--r--arch/ia64/kernel/mca.c11
-rw-r--r--arch/ia64/kernel/mca_asm.S2
-rw-r--r--arch/ia64/kernel/perfmon.c17
-rw-r--r--arch/ia64/kernel/relocate_kernel.S2
-rw-r--r--arch/ia64/kernel/setup.c27
-rw-r--r--arch/ia64/kernel/sys_ia64.c83
-rw-r--r--arch/ia64/kernel/time.c4
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S11
-rw-r--r--arch/ia64/kvm/asm-offsets.c1
-rw-r--r--arch/ia64/mm/contig.c99
-rw-r--r--arch/ia64/mm/discontig.c129
-rw-r--r--arch/ia64/mm/init.c4
-rw-r--r--arch/ia64/mm/ioremap.c11
-rw-r--r--arch/ia64/pci/pci.c33
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c2
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c8
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c19
-rw-r--r--arch/ia64/xen/irq_xen.c131
-rw-r--r--arch/ia64/xen/time.c22
-rw-r--r--arch/m32r/include/asm/elf.h1
-rw-r--r--arch/m32r/include/asm/spinlock.h48
-rw-r--r--arch/m32r/include/asm/spinlock_types.h8
-rw-r--r--arch/m32r/kernel/irq.c4
-rw-r--r--arch/m32r/kernel/sys_m32r.c24
-rw-r--r--arch/m32r/kernel/syscall_table.S2
-rw-r--r--arch/m68k/ifpsp060/src/fpsp.S28
-rw-r--r--arch/m68k/ifpsp060/src/pfpsp.S26
-rw-r--r--arch/m68k/include/asm/asm-offsets.h1
-rw-r--r--arch/m68k/include/asm/bootinfo.h2
-rw-r--r--arch/m68k/include/asm/elf.h1
-rw-r--r--arch/m68k/include/asm/pgtable_mm.h4
-rw-r--r--arch/m68k/include/asm/processor.h2
-rw-r--r--arch/m68k/include/asm/ptrace.h2
-rw-r--r--arch/m68k/include/asm/thread_info_no.h4
-rw-r--r--arch/m68k/kernel/head.S2
-rw-r--r--arch/m68k/kernel/sys_m68k.c83
-rw-r--r--arch/m68k/sun3/mmu_emu.c8
-rw-r--r--arch/m68knommu/Kconfig7
-rw-r--r--arch/m68knommu/kernel/process.c5
-rw-r--r--arch/m68knommu/kernel/setup.c92
-rw-r--r--arch/m68knommu/kernel/sys_m68k.c38
-rw-r--r--arch/m68knommu/kernel/syscalltable.S2
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S47
-rw-r--r--arch/m68knommu/platform/523x/gpio.c5
-rw-r--r--arch/m68knommu/platform/527x/gpio.c6
-rw-r--r--arch/m68knommu/platform/528x/gpio.c2
-rw-r--r--arch/m68knommu/platform/coldfire/clk.c7
-rw-r--r--arch/m68knommu/platform/coldfire/head.S10
-rw-r--r--arch/microblaze/Kconfig19
-rw-r--r--arch/microblaze/Kconfig.debug3
-rw-r--r--arch/microblaze/Makefile2
-rw-r--r--arch/microblaze/boot/Makefile15
-rw-r--r--arch/microblaze/include/asm/asm-offsets.h1
-rw-r--r--arch/microblaze/include/asm/cache.h16
-rw-r--r--arch/microblaze/include/asm/cacheflush.h123
-rw-r--r--arch/microblaze/include/asm/cpuinfo.h5
-rw-r--r--arch/microblaze/include/asm/device.h12
-rw-r--r--arch/microblaze/include/asm/elf.h1
-rw-r--r--arch/microblaze/include/asm/ftrace.h25
-rw-r--r--arch/microblaze/include/asm/futex.h127
-rw-r--r--arch/microblaze/include/asm/irqflags.h112
-rw-r--r--arch/microblaze/include/asm/page.h3
-rw-r--r--arch/microblaze/include/asm/pgalloc.h9
-rw-r--r--arch/microblaze/include/asm/pvr.h30
-rw-r--r--arch/microblaze/include/asm/setup.h2
-rw-r--r--arch/microblaze/include/asm/system.h2
-rw-r--r--arch/microblaze/include/asm/uaccess.h12
-rw-r--r--arch/microblaze/kernel/Makefile14
-rw-r--r--arch/microblaze/kernel/cpu/Makefile4
-rw-r--r--arch/microblaze/kernel/cpu/cache.c663
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c15
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-static.c17
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c7
-rw-r--r--arch/microblaze/kernel/cpu/mb.c8
-rw-r--r--arch/microblaze/kernel/cpu/pvr.c2
-rw-r--r--arch/microblaze/kernel/entry-nommu.S2
-rw-r--r--arch/microblaze/kernel/entry.S19
-rw-r--r--arch/microblaze/kernel/ftrace.c237
-rw-r--r--arch/microblaze/kernel/heartbeat.c15
-rw-r--r--arch/microblaze/kernel/intc.c10
-rw-r--r--arch/microblaze/kernel/irq.c4
-rw-r--r--arch/microblaze/kernel/mcount.S170
-rw-r--r--arch/microblaze/kernel/microblaze_ksyms.c5
-rw-r--r--arch/microblaze/kernel/process.c1
-rw-r--r--arch/microblaze/kernel/reset.c140
-rw-r--r--arch/microblaze/kernel/setup.c40
-rw-r--r--arch/microblaze/kernel/signal.c35
-rw-r--r--arch/microblaze/kernel/stacktrace.c65
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c38
-rw-r--r--arch/microblaze/kernel/syscall_table.S6
-rw-r--r--arch/microblaze/kernel/timer.c28
-rw-r--r--arch/microblaze/kernel/vmlinux.lds.S6
-rw-r--r--arch/microblaze/lib/memcpy.c2
-rw-r--r--arch/microblaze/lib/memmove.c2
-rw-r--r--arch/microblaze/lib/memset.c2
-rw-r--r--arch/microblaze/lib/uaccess.c7
-rw-r--r--arch/microblaze/mm/init.c1
-rw-r--r--arch/microblaze/mm/pgtable.c10
-rw-r--r--arch/microblaze/oprofile/Makefile13
-rw-r--r--arch/microblaze/oprofile/microblaze_oprofile.c22
-rw-r--r--arch/microblaze/platform/Kconfig.platform21
-rw-r--r--arch/microblaze/platform/generic/Kconfig.auto29
-rw-r--r--arch/microblaze/platform/generic/system.dts38
-rw-r--r--arch/microblaze/platform/platform.c2
-rw-r--r--arch/mips/Kconfig119
-rw-r--r--arch/mips/Kconfig.debug59
-rw-r--r--arch/mips/Makefile57
-rw-r--r--arch/mips/ar7/platform.c2
-rw-r--r--arch/mips/basler/excite/Kconfig9
-rw-r--r--arch/mips/basler/excite/Makefile8
-rw-r--r--arch/mips/basler/excite/excite_device.c403
-rw-r--r--arch/mips/basler/excite/excite_iodev.c178
-rw-r--r--arch/mips/basler/excite/excite_iodev.h10
-rw-r--r--arch/mips/basler/excite/excite_irq.c122
-rw-r--r--arch/mips/basler/excite/excite_procfs.c92
-rw-r--r--arch/mips/basler/excite/excite_prom.c144
-rw-r--r--arch/mips/basler/excite/excite_setup.c302
-rw-r--r--arch/mips/bcm47xx/prom.c10
-rw-r--r--arch/mips/boot/Makefile8
-rw-r--r--arch/mips/boot/addinitrd.c131
-rw-r--r--arch/mips/boot/compressed/Makefile100
-rw-r--r--arch/mips/boot/compressed/dbg.c37
-rw-r--r--arch/mips/boot/compressed/decompress.c126
-rw-r--r--arch/mips/boot/compressed/dummy.c4
-rw-r--r--arch/mips/boot/compressed/head.S56
-rw-r--r--arch/mips/boot/compressed/ld.script150
-rw-r--r--arch/mips/boot/compressed/uart-16550.c43
-rw-r--r--arch/mips/cavium-octeon/Makefile2
-rw-r--r--arch/mips/cavium-octeon/cpu.c52
-rw-r--r--arch/mips/cavium-octeon/octeon-platform.c88
-rw-r--r--arch/mips/configs/ar7_defconfig4
-rw-r--r--arch/mips/configs/bcm47xx_defconfig3
-rw-r--r--arch/mips/configs/bcm63xx_defconfig3
-rw-r--r--arch/mips/configs/bigsur_defconfig3
-rw-r--r--arch/mips/configs/capcella_defconfig3
-rw-r--r--arch/mips/configs/cavium-octeon_defconfig4
-rw-r--r--arch/mips/configs/cobalt_defconfig3
-rw-r--r--arch/mips/configs/db1000_defconfig3
-rw-r--r--arch/mips/configs/db1100_defconfig3
-rw-r--r--arch/mips/configs/db1200_defconfig3
-rw-r--r--arch/mips/configs/db1500_defconfig3
-rw-r--r--arch/mips/configs/db1550_defconfig3
-rw-r--r--arch/mips/configs/decstation_defconfig3
-rw-r--r--arch/mips/configs/e55_defconfig3
-rw-r--r--arch/mips/configs/excite_defconfig1335
-rw-r--r--arch/mips/configs/fuloong2e_defconfig96
-rw-r--r--arch/mips/configs/ip22_defconfig3
-rw-r--r--arch/mips/configs/ip27_defconfig3
-rw-r--r--arch/mips/configs/ip28_defconfig3
-rw-r--r--arch/mips/configs/ip32_defconfig3
-rw-r--r--arch/mips/configs/jazz_defconfig3
-rw-r--r--arch/mips/configs/jmr3927_defconfig3
-rw-r--r--arch/mips/configs/lasat_defconfig3
-rw-r--r--arch/mips/configs/lemote2f_defconfig1835
-rw-r--r--arch/mips/configs/malta_defconfig3
-rw-r--r--arch/mips/configs/markeins_defconfig3
-rw-r--r--arch/mips/configs/mipssim_defconfig3
-rw-r--r--arch/mips/configs/mpc30x_defconfig3
-rw-r--r--arch/mips/configs/msp71xx_defconfig3
-rw-r--r--arch/mips/configs/mtx1_defconfig3
-rw-r--r--arch/mips/configs/pb1100_defconfig3
-rw-r--r--arch/mips/configs/pb1500_defconfig3
-rw-r--r--arch/mips/configs/pb1550_defconfig3
-rw-r--r--arch/mips/configs/pnx8335-stb225_defconfig3
-rw-r--r--arch/mips/configs/pnx8550-jbs_defconfig3
-rw-r--r--arch/mips/configs/pnx8550-stb810_defconfig3
-rw-r--r--arch/mips/configs/powertv_defconfig1550
-rw-r--r--arch/mips/configs/rb532_defconfig3
-rw-r--r--arch/mips/configs/rbtx49xx_defconfig4
-rw-r--r--arch/mips/configs/rm200_defconfig3
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig3
-rw-r--r--arch/mips/configs/tb0219_defconfig3
-rw-r--r--arch/mips/configs/tb0226_defconfig3
-rw-r--r--arch/mips/configs/tb0287_defconfig3
-rw-r--r--arch/mips/configs/workpad_defconfig3
-rw-r--r--arch/mips/configs/wrppmc_defconfig3
-rw-r--r--arch/mips/configs/yosemite_defconfig3
-rw-r--r--arch/mips/fw/arc/cmdline.c5
-rw-r--r--arch/mips/include/asm/asm-offsets.h1
-rw-r--r--arch/mips/include/asm/bootinfo.h8
-rw-r--r--arch/mips/include/asm/clock.h64
-rw-r--r--arch/mips/include/asm/cop2.h23
-rw-r--r--arch/mips/include/asm/cpu.h2
-rw-r--r--arch/mips/include/asm/elf.h1
-rw-r--r--arch/mips/include/asm/fcntl.h17
-rw-r--r--arch/mips/include/asm/fpu.h8
-rw-r--r--arch/mips/include/asm/fpu_emulator.h24
-rw-r--r--arch/mips/include/asm/ftrace.h91
-rw-r--r--arch/mips/include/asm/irq.h29
-rw-r--r--arch/mips/include/asm/mach-excite/cpu-feature-overrides.h48
-rw-r--r--arch/mips/include/asm/mach-excite/excite.h154
-rw-r--r--arch/mips/include/asm/mach-excite/excite_fpga.h80
-rw-r--r--arch/mips/include/asm/mach-excite/excite_nandflash.h7
-rw-r--r--arch/mips/include/asm/mach-excite/rm9k_eth.h23
-rw-r--r--arch/mips/include/asm/mach-excite/rm9k_wdt.h12
-rw-r--r--arch/mips/include/asm/mach-excite/rm9k_xicap.h16
-rw-r--r--arch/mips/include/asm/mach-loongson/cs5536/cs5536.h305
-rw-r--r--arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h35
-rw-r--r--arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h153
-rw-r--r--arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h31
-rw-r--r--arch/mips/include/asm/mach-loongson/dma-coherence.h4
-rw-r--r--arch/mips/include/asm/mach-loongson/loongson.h290
-rw-r--r--arch/mips/include/asm/mach-loongson/machine.h9
-rw-r--r--arch/mips/include/asm/mach-loongson/mem.h27
-rw-r--r--arch/mips/include/asm/mach-loongson/pci.h34
-rw-r--r--arch/mips/include/asm/mach-pnx833x/gpio.h2
-rw-r--r--arch/mips/include/asm/mach-powertv/asic.h107
-rw-r--r--arch/mips/include/asm/mach-powertv/asic_regs.h155
-rw-r--r--arch/mips/include/asm/mach-powertv/dma-coherence.h119
-rw-r--r--arch/mips/include/asm/mach-powertv/interrupts.h254
-rw-r--r--arch/mips/include/asm/mach-powertv/ioremap.h90
-rw-r--r--arch/mips/include/asm/mach-powertv/irq.h25
-rw-r--r--arch/mips/include/asm/mach-powertv/powertv-clock.h29
-rw-r--r--arch/mips/include/asm/mach-powertv/war.h (renamed from arch/mips/include/asm/mach-excite/war.h)19
-rw-r--r--arch/mips/include/asm/mips-boards/bonito64.h5
-rw-r--r--arch/mips/include/asm/mmu_context.h29
-rw-r--r--arch/mips/include/asm/octeon/cvmx-agl-defs.h1194
-rw-r--r--arch/mips/include/asm/octeon/cvmx-mixx-defs.h248
-rw-r--r--arch/mips/include/asm/octeon/cvmx-smix-defs.h178
-rw-r--r--arch/mips/include/asm/octeon/octeon.h1
-rw-r--r--arch/mips/include/asm/pgtable.h13
-rw-r--r--arch/mips/include/asm/sgi/ioc.h2
-rw-r--r--arch/mips/include/asm/sgialib.h3
-rw-r--r--arch/mips/include/asm/sibyte/sb1250_mac.h2
-rw-r--r--arch/mips/include/asm/sn/sn0/hubio.h2
-rw-r--r--arch/mips/include/asm/spinlock.h78
-rw-r--r--arch/mips/include/asm/spinlock_types.h8
-rw-r--r--arch/mips/include/asm/stackframe.h40
-rw-r--r--arch/mips/include/asm/time.h14
-rw-r--r--arch/mips/kernel/Makefile14
-rw-r--r--arch/mips/kernel/cpu-probe.c2
-rw-r--r--arch/mips/kernel/cpufreq/Kconfig41
-rw-r--r--arch/mips/kernel/cpufreq/Makefile5
-rw-r--r--arch/mips/kernel/cpufreq/loongson2_clock.c166
-rw-r--r--arch/mips/kernel/cpufreq/loongson2_cpufreq.c227
-rw-r--r--arch/mips/kernel/csrc-powertv.c180
-rw-r--r--arch/mips/kernel/ftrace.c275
-rw-r--r--arch/mips/kernel/irq.c34
-rw-r--r--arch/mips/kernel/kspd.c1
-rw-r--r--arch/mips/kernel/linux32.c19
-rw-r--r--arch/mips/kernel/mcount.S189
-rw-r--r--arch/mips/kernel/mips_ksyms.c5
-rw-r--r--arch/mips/kernel/setup.c44
-rw-r--r--arch/mips/kernel/signal.c46
-rw-r--r--arch/mips/kernel/signal32.c24
-rw-r--r--arch/mips/kernel/smp.c3
-rw-r--r--arch/mips/kernel/smtc.c23
-rw-r--r--arch/mips/kernel/syscall.c32
-rw-r--r--arch/mips/kernel/time.c33
-rw-r--r--arch/mips/kernel/traps.c136
-rw-r--r--arch/mips/kernel/unaligned.c25
-rw-r--r--arch/mips/kernel/vmlinux.lds.S1
-rw-r--r--arch/mips/lasat/picvue_proc.c113
-rw-r--r--arch/mips/lasat/prom.c4
-rw-r--r--arch/mips/lasat/sysctl.c2
-rw-r--r--arch/mips/loongson/Kconfig108
-rw-r--r--arch/mips/loongson/Makefile6
-rw-r--r--arch/mips/loongson/common/Makefile18
-rw-r--r--arch/mips/loongson/common/bonito-irq.c13
-rw-r--r--arch/mips/loongson/common/cmdline.c4
-rw-r--r--arch/mips/loongson/common/cs5536/Makefile13
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_acc.c140
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ehci.c158
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ide.c179
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_isa.c316
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_mfgpt.c217
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ohci.c147
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_pci.c87
-rw-r--r--arch/mips/loongson/common/early_printk.c17
-rw-r--r--arch/mips/loongson/common/env.c3
-rw-r--r--arch/mips/loongson/common/init.c19
-rw-r--r--arch/mips/loongson/common/irq.c12
-rw-r--r--arch/mips/loongson/common/machtype.c25
-rw-r--r--arch/mips/loongson/common/mem.c93
-rw-r--r--arch/mips/loongson/common/pci.c20
-rw-r--r--arch/mips/loongson/common/platform.c30
-rw-r--r--arch/mips/loongson/common/pm.c161
-rw-r--r--arch/mips/loongson/common/reset.c2
-rw-r--r--arch/mips/loongson/common/serial.c76
-rw-r--r--arch/mips/loongson/common/time.c3
-rw-r--r--arch/mips/loongson/common/uart_base.c45
-rw-r--r--arch/mips/loongson/fuloong-2e/irq.c4
-rw-r--r--arch/mips/loongson/fuloong-2e/reset.c4
-rw-r--r--arch/mips/loongson/lemote-2f/Makefile11
-rw-r--r--arch/mips/loongson/lemote-2f/ec_kb3310b.c130
-rw-r--r--arch/mips/loongson/lemote-2f/ec_kb3310b.h188
-rw-r--r--arch/mips/loongson/lemote-2f/irq.c134
-rw-r--r--arch/mips/loongson/lemote-2f/pm.c149
-rw-r--r--arch/mips/loongson/lemote-2f/reset.c159
-rw-r--r--arch/mips/math-emu/cp1emu.c102
-rw-r--r--arch/mips/math-emu/dp_sub.c2
-rw-r--r--arch/mips/math-emu/dsemul.c4
-rw-r--r--arch/mips/mipssim/Makefile3
-rw-r--r--arch/mips/mipssim/sim_setup.c1
-rw-r--r--arch/mips/mm/cache.c2
-rw-r--r--arch/mips/mm/cerr-sb1.c7
-rw-r--r--arch/mips/mm/init.c2
-rw-r--r--arch/mips/mm/tlbex.c28
-rw-r--r--arch/mips/mm/uasm.c16
-rw-r--r--arch/mips/mm/uasm.h7
-rw-r--r--arch/mips/mti-malta/malta-memory.c2
-rw-r--r--arch/mips/nxp/pnx833x/common/interrupts.c4
-rw-r--r--arch/mips/oprofile/op_model_loongson2.c5
-rw-r--r--arch/mips/pci/Makefile4
-rw-r--r--arch/mips/pci/fixup-excite.c36
-rw-r--r--arch/mips/pci/fixup-fuloong2e.c5
-rw-r--r--arch/mips/pci/fixup-lemote2f.c160
-rw-r--r--arch/mips/pci/ops-bonito64.c7
-rw-r--r--arch/mips/pci/ops-loongson2.c208
-rw-r--r--arch/mips/pci/pci-excite.c149
-rw-r--r--arch/mips/powertv/Kconfig21
-rw-r--r--arch/mips/powertv/Makefile28
-rw-r--r--arch/mips/powertv/asic/Kconfig28
-rw-r--r--arch/mips/powertv/asic/Makefile23
-rw-r--r--arch/mips/powertv/asic/asic-calliope.c98
-rw-r--r--arch/mips/powertv/asic/asic-cronus.c98
-rw-r--r--arch/mips/powertv/asic/asic-zeus.c98
-rw-r--r--arch/mips/powertv/asic/asic_devices.c787
-rw-r--r--arch/mips/powertv/asic/asic_int.c125
-rw-r--r--arch/mips/powertv/asic/irq_asic.c116
-rw-r--r--arch/mips/powertv/asic/prealloc-calliope.c620
-rw-r--r--arch/mips/powertv/asic/prealloc-cronus.c608
-rw-r--r--arch/mips/powertv/asic/prealloc-cronuslite.c290
-rw-r--r--arch/mips/powertv/asic/prealloc-zeus.c459
-rw-r--r--arch/mips/powertv/cmdline.c52
-rw-r--r--arch/mips/powertv/init.c128
-rw-r--r--arch/mips/powertv/init.h28
-rw-r--r--arch/mips/powertv/memory.c186
-rw-r--r--arch/mips/powertv/pci/Makefile21
-rw-r--r--arch/mips/powertv/pci/fixup-powertv.c36
-rw-r--r--arch/mips/powertv/pci/powertv-pci.h31
-rw-r--r--arch/mips/powertv/powertv-clock.h26
-rw-r--r--arch/mips/powertv/powertv_setup.c351
-rw-r--r--arch/mips/powertv/reset.c65
-rw-r--r--arch/mips/powertv/reset.h26
-rw-r--r--arch/mips/powertv/time.c (renamed from arch/mips/mipssim/sim_cmdline.c)21
-rw-r--r--arch/mips/rb532/prom.c4
-rw-r--r--arch/mips/sgi-ip22/ip22-eisa.c4
-rw-r--r--arch/mips/sgi-ip22/ip22-int.c3
-rw-r--r--arch/mips/sgi-ip22/ip22-setup.c2
-rw-r--r--arch/mips/sgi-ip22/ip22-time.c3
-rw-r--r--arch/mips/sgi-ip32/ip32-setup.c2
-rw-r--r--arch/mips/sibyte/common/cfe.c4
-rw-r--r--arch/mips/sni/a20r.c2
-rw-r--r--arch/mips/sni/pcimt.c2
-rw-r--r--arch/mips/sni/pcit.c2
-rw-r--r--arch/mips/sni/rm200.c2
-rw-r--r--arch/mips/sni/setup.c2
-rw-r--r--arch/mips/txx9/generic/setup.c4
-rw-r--r--arch/mips/txx9/generic/smsc_fdc37m81x.c2
-rw-r--r--arch/mips/vr41xx/common/icu.c92
-rw-r--r--arch/mn10300/include/asm/asm-offsets.h1
-rw-r--r--arch/mn10300/include/asm/elf.h1
-rw-r--r--arch/mn10300/include/asm/mman.h5
-rw-r--r--arch/mn10300/kernel/entry.S2
-rw-r--r--arch/mn10300/kernel/irq.c4
-rw-r--r--arch/mn10300/kernel/kprobes.c61
-rw-r--r--arch/mn10300/kernel/process.c12
-rw-r--r--arch/mn10300/kernel/sys_mn10300.c36
-rw-r--r--arch/parisc/hpux/sys_hpux.c7
-rw-r--r--arch/parisc/include/asm/asm-offsets.h1
-rw-r--r--arch/parisc/include/asm/atomic.h10
-rw-r--r--arch/parisc/include/asm/bug.h4
-rw-r--r--arch/parisc/include/asm/elf.h1
-rw-r--r--arch/parisc/include/asm/fcntl.h5
-rw-r--r--arch/parisc/include/asm/ftrace.h14
-rw-r--r--arch/parisc/include/asm/spinlock.h64
-rw-r--r--arch/parisc/include/asm/spinlock_types.h12
-rw-r--r--arch/parisc/kernel/asm-offsets.c3
-rw-r--r--arch/parisc/kernel/irq.c8
-rw-r--r--arch/parisc/kernel/perf.c2
-rw-r--r--arch/parisc/kernel/signal.c1
-rw-r--r--arch/parisc/kernel/smp.c9
-rw-r--r--arch/parisc/kernel/sys_parisc.c30
-rw-r--r--arch/parisc/kernel/sys_parisc32.c6
-rw-r--r--arch/parisc/kernel/unwind.c50
-rw-r--r--arch/parisc/lib/bitops.c4
-rw-r--r--arch/powerpc/Kconfig2
-rw-r--r--arch/powerpc/Kconfig.debug8
-rw-r--r--arch/powerpc/boot/Makefile7
-rw-r--r--arch/powerpc/boot/dts/gamecube.dts114
-rw-r--r--arch/powerpc/boot/dts/wii.dts218
-rw-r--r--arch/powerpc/boot/gamecube-head.S111
-rw-r--r--arch/powerpc/boot/gamecube.c35
-rw-r--r--arch/powerpc/boot/ugecon.c147
-rw-r--r--arch/powerpc/boot/ugecon.h24
-rw-r--r--arch/powerpc/boot/wii-head.S142
-rw-r--r--arch/powerpc/boot/wii.c158
-rwxr-xr-xarch/powerpc/boot/wrapper4
-rw-r--r--arch/powerpc/configs/g5_defconfig6
-rw-r--r--arch/powerpc/configs/gamecube_defconfig1061
-rw-r--r--arch/powerpc/configs/iseries_defconfig4
-rw-r--r--arch/powerpc/configs/ppc64_defconfig14
-rw-r--r--arch/powerpc/configs/ppc64e_defconfig4
-rw-r--r--arch/powerpc/configs/pseries_defconfig14
-rw-r--r--arch/powerpc/configs/wii_defconfig1406
-rw-r--r--arch/powerpc/include/asm/asm-offsets.h1
-rw-r--r--arch/powerpc/include/asm/async_tx.h47
-rw-r--r--arch/powerpc/include/asm/bug.h2
-rw-r--r--arch/powerpc/include/asm/dcr-regs.h23
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h2
-rw-r--r--arch/powerpc/include/asm/elf.h1
-rw-r--r--arch/powerpc/include/asm/fixmap.h3
-rw-r--r--arch/powerpc/include/asm/module.h5
-rw-r--r--arch/powerpc/include/asm/ptrace.h2
-rw-r--r--arch/powerpc/include/asm/reg_fsl_emb.h2
-rw-r--r--arch/powerpc/include/asm/rtas.h2
-rw-r--r--arch/powerpc/include/asm/smp.h2
-rw-r--r--arch/powerpc/include/asm/spinlock.h68
-rw-r--r--arch/powerpc/include/asm/spinlock_types.h8
-rw-r--r--arch/powerpc/include/asm/udbg.h1
-rw-r--r--arch/powerpc/kernel/align.c63
-rw-r--r--arch/powerpc/kernel/cputable.c6
-rw-r--r--arch/powerpc/kernel/head_32.S25
-rw-r--r--arch/powerpc/kernel/iommu.c4
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/kgdb.c2
-rw-r--r--arch/powerpc/kernel/perf_callchain.c4
-rw-r--r--arch/powerpc/kernel/rtas.c16
-rw-r--r--arch/powerpc/kernel/setup-common.c4
-rw-r--r--arch/powerpc/kernel/smp.c2
-rw-r--r--arch/powerpc/kernel/syscalls.c15
-rw-r--r--arch/powerpc/kernel/tau_6xx.c2
-rw-r--r--arch/powerpc/kernel/time.c7
-rw-r--r--arch/powerpc/kernel/traps.c9
-rw-r--r--arch/powerpc/kernel/udbg.c2
-rw-r--r--arch/powerpc/kernel/vdso.c2
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S3
-rw-r--r--arch/powerpc/lib/locks.c8
-rw-r--r--arch/powerpc/mm/40x_mmu.c2
-rw-r--r--arch/powerpc/mm/44x_mmu.c2
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c2
-rw-r--r--arch/powerpc/mm/hash_utils_64.c12
-rw-r--r--arch/powerpc/mm/init_32.c9
-rw-r--r--arch/powerpc/mm/mmu_context_nohash.c2
-rw-r--r--arch/powerpc/mm/mmu_decl.h17
-rw-r--r--arch/powerpc/mm/pgtable_32.c38
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c4
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c6
-rw-r--r--arch/powerpc/platforms/52xx/efika.c2
-rw-r--r--arch/powerpc/platforms/52xx/media5200.c8
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype2
-rw-r--r--arch/powerpc/platforms/amigaone/setup.c2
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c22
-rw-r--r--arch/powerpc/platforms/cell/spufs/Makefile6
-rw-r--r--arch/powerpc/platforms/chrp/setup.c2
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig33
-rw-r--r--arch/powerpc/platforms/embedded6xx/Makefile4
-rw-r--r--arch/powerpc/platforms/embedded6xx/flipper-pic.c263
-rw-r--r--arch/powerpc/platforms/embedded6xx/flipper-pic.h25
-rw-r--r--arch/powerpc/platforms/embedded6xx/gamecube.c118
-rw-r--r--arch/powerpc/platforms/embedded6xx/hlwd-pic.c241
-rw-r--r--arch/powerpc/platforms/embedded6xx/hlwd-pic.h22
-rw-r--r--arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c328
-rw-r--r--arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h32
-rw-r--r--arch/powerpc/platforms/embedded6xx/wii.c268
-rw-r--r--arch/powerpc/platforms/iseries/irq.c4
-rw-r--r--arch/powerpc/platforms/iseries/mf.c147
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c10
-rw-r--r--arch/powerpc/platforms/powermac/bootx_init.c2
-rw-r--r--arch/powerpc/platforms/powermac/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/cmm.c254
-rw-r--r--arch/powerpc/platforms/pseries/dlpar.c6
-rw-r--r--arch/powerpc/platforms/pseries/dtl.c4
-rw-r--r--arch/powerpc/platforms/pseries/smp.c4
-rw-r--r--arch/powerpc/platforms/pseries/xics.c4
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c2
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c4
-rw-r--r--arch/powerpc/sysdev/mpic.c19
-rw-r--r--arch/powerpc/sysdev/mpic_msi.c11
-rw-r--r--arch/powerpc/sysdev/mpic_u3msi.c46
-rw-r--r--arch/powerpc/sysdev/uic.c8
-rw-r--r--arch/s390/Kconfig15
-rw-r--r--arch/s390/appldata/appldata_base.c2
-rw-r--r--arch/s390/crypto/prng.c2
-rw-r--r--arch/s390/defconfig1
-rw-r--r--arch/s390/include/asm/asm-offsets.h1
-rw-r--r--arch/s390/include/asm/atomic.h8
-rw-r--r--arch/s390/include/asm/ccwdev.h4
-rw-r--r--arch/s390/include/asm/cputime.h8
-rw-r--r--arch/s390/include/asm/elf.h1
-rw-r--r--arch/s390/include/asm/mmu_context.h4
-rw-r--r--arch/s390/include/asm/pgalloc.h3
-rw-r--r--arch/s390/include/asm/pgtable.h4
-rw-r--r--arch/s390/include/asm/setup.h17
-rw-r--r--arch/s390/include/asm/smp.h54
-rw-r--r--arch/s390/include/asm/sockios.h21
-rw-r--r--arch/s390/include/asm/spinlock.h66
-rw-r--r--arch/s390/include/asm/spinlock_types.h8
-rw-r--r--arch/s390/include/asm/termbits.h206
-rw-r--r--arch/s390/include/asm/todclk.h23
-rw-r--r--arch/s390/include/asm/uaccess.h2
-rw-r--r--arch/s390/kernel/Makefile1
-rw-r--r--arch/s390/kernel/compat_linux.c43
-rw-r--r--arch/s390/kernel/compat_linux.h4
-rw-r--r--arch/s390/kernel/debug.c3
-rw-r--r--arch/s390/kernel/head64.S3
-rw-r--r--arch/s390/kernel/s390_ext.c2
-rw-r--r--arch/s390/kernel/setup.c36
-rw-r--r--arch/s390/kernel/sys_s390.c30
-rw-r--r--arch/s390/kernel/time.c7
-rw-r--r--arch/s390/kernel/vdso.c9
-rw-r--r--arch/s390/kernel/vtime.c2
-rw-r--r--arch/s390/kvm/Kconfig1
-rw-r--r--arch/s390/lib/spinlock.c46
-rw-r--r--arch/s390/lib/uaccess_mvcos.c4
-rw-r--r--arch/s390/lib/uaccess_pt.c147
-rw-r--r--arch/s390/math-emu/math.c4
-rw-r--r--arch/s390/mm/cmm.c61
-rw-r--r--arch/s390/mm/fault.c378
-rw-r--r--arch/s390/mm/pgtable.c2
-rw-r--r--arch/s390/mm/vmem.c11
-rw-r--r--arch/score/include/asm/asm-offsets.h1
-rw-r--r--arch/score/include/asm/cacheflush.h4
-rw-r--r--arch/score/include/asm/delay.h2
-rw-r--r--arch/score/include/asm/elf.h1
-rw-r--r--arch/score/include/asm/page.h2
-rw-r--r--arch/score/kernel/setup.c1
-rw-r--r--arch/score/kernel/sys_score.c28
-rw-r--r--arch/score/mm/cache.c26
-rw-r--r--arch/score/mm/init.c5
-rw-r--r--arch/sh/Kconfig29
-rw-r--r--arch/sh/Kconfig.debug44
-rw-r--r--arch/sh/Makefile14
-rw-r--r--arch/sh/boards/Makefile1
-rw-r--r--arch/sh/boards/mach-ap325rxa/Makefile2
-rw-r--r--arch/sh/boards/mach-ap325rxa/sdram.S69
-rw-r--r--arch/sh/boards/mach-ap325rxa/setup.c (renamed from arch/sh/boards/board-ap325rxa.c)141
-rw-r--r--arch/sh/boards/mach-ecovec24/Makefile2
-rw-r--r--arch/sh/boards/mach-ecovec24/sdram.S52
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c515
-rw-r--r--arch/sh/boards/mach-highlander/setup.c2
-rw-r--r--arch/sh/boards/mach-kfr2r09/Makefile2
-rw-r--r--arch/sh/boards/mach-kfr2r09/lcd_wqvga.c6
-rw-r--r--arch/sh/boards/mach-kfr2r09/sdram.S80
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c248
-rw-r--r--arch/sh/boards/mach-migor/Makefile2
-rw-r--r--arch/sh/boards/mach-migor/sdram.S69
-rw-r--r--arch/sh/boards/mach-migor/setup.c97
-rw-r--r--arch/sh/boards/mach-r2d/irq.c2
-rw-r--r--arch/sh/boards/mach-se/7722/irq.c35
-rw-r--r--arch/sh/boards/mach-se/7722/setup.c17
-rw-r--r--arch/sh/boards/mach-se/7724/Makefile2
-rw-r--r--arch/sh/boards/mach-se/7724/sdram.S52
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c113
-rw-r--r--arch/sh/boot/compressed/misc.c2
-rw-r--r--arch/sh/boot/romimage/Makefile12
-rw-r--r--arch/sh/boot/romimage/head.S38
-rw-r--r--arch/sh/configs/ecovec24-romimage_defconfig2
-rw-r--r--arch/sh/configs/ecovec24_defconfig2
-rw-r--r--arch/sh/configs/rts7751r2d1_defconfig2
-rw-r--r--arch/sh/configs/rts7751r2dplus_defconfig2
-rw-r--r--arch/sh/drivers/dma/dma-sysfs.c2
-rw-r--r--arch/sh/drivers/pci/Kconfig19
-rw-r--r--arch/sh/drivers/pci/fixups-rts7751r2d.c2
-rw-r--r--arch/sh/include/asm/.gitignore1
-rw-r--r--arch/sh/include/asm/addrspace.h9
-rw-r--r--arch/sh/include/asm/asm-offsets.h1
-rw-r--r--arch/sh/include/asm/atomic.h9
-rw-r--r--arch/sh/include/asm/bitops.h4
-rw-r--r--arch/sh/include/asm/bugs.h4
-rw-r--r--arch/sh/include/asm/dma-mapping.h233
-rw-r--r--arch/sh/include/asm/dwarf.h28
-rw-r--r--arch/sh/include/asm/elf.h1
-rw-r--r--arch/sh/include/asm/fixmap.h12
-rw-r--r--arch/sh/include/asm/fpu.h26
-rw-r--r--arch/sh/include/asm/ftrace.h17
-rw-r--r--arch/sh/include/asm/gpio.h82
-rw-r--r--arch/sh/include/asm/hardirq.h13
-rw-r--r--arch/sh/include/asm/io.h27
-rw-r--r--arch/sh/include/asm/irqflags.h31
-rw-r--r--arch/sh/include/asm/irqflags_32.h99
-rw-r--r--arch/sh/include/asm/irqflags_64.h85
-rw-r--r--arch/sh/include/asm/machvec.h2
-rw-r--r--arch/sh/include/asm/mmu.h13
-rw-r--r--arch/sh/include/asm/pci.h30
-rw-r--r--arch/sh/include/asm/perf_event.h31
-rw-r--r--arch/sh/include/asm/pgtable.h26
-rw-r--r--arch/sh/include/asm/pgtable_32.h7
-rw-r--r--arch/sh/include/asm/processor_32.h3
-rw-r--r--arch/sh/include/asm/scatterlist.h2
-rw-r--r--arch/sh/include/asm/sh_keysc.h14
-rw-r--r--arch/sh/include/asm/spinlock.h58
-rw-r--r--arch/sh/include/asm/spinlock_types.h8
-rw-r--r--arch/sh/include/asm/suspend.h65
-rw-r--r--arch/sh/include/asm/system.h4
-rw-r--r--arch/sh/include/asm/system_32.h29
-rw-r--r--arch/sh/include/asm/system_64.h26
-rw-r--r--arch/sh/include/asm/thread_info.h30
-rw-r--r--arch/sh/include/asm/topology.h8
-rw-r--r--arch/sh/include/asm/ubc.h11
-rw-r--r--arch/sh/include/asm/unistd_32.h3
-rw-r--r--arch/sh/include/asm/unistd_64.h3
-rw-r--r--arch/sh/include/asm/watchdog.h59
-rw-r--r--arch/sh/include/cpu-sh4/cpu/watchdog.h13
-rw-r--r--arch/sh/include/mach-common/mach/titan.h2
-rw-r--r--arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt3
-rw-r--r--arch/sh/include/mach-kfr2r09/mach/kfr2r09.h6
-rw-r--r--arch/sh/include/mach-se/mach/se7722.h11
-rw-r--r--arch/sh/kernel/Makefile13
-rw-r--r--arch/sh/kernel/asm-offsets.c23
-rw-r--r--arch/sh/kernel/cpu/Makefile1
-rw-r--r--arch/sh/kernel/cpu/init.c28
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c7
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c71
-rw-r--r--arch/sh/kernel/cpu/sh2a/fpu.c27
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-mxg.c23
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7201.c181
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7203.c89
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c89
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S33
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7705.c49
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh770x.c80
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c50
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7720.c50
-rw-r--r--arch/sh/kernel/cpu/sh4/Makefile8
-rw-r--r--arch/sh/kernel/cpu/sh4/fpu.c28
-rw-r--r--arch/sh/kernel/cpu/sh4/perf_event.c253
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh4-202.c23
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c47
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c89
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile1
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7724.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/perf_event.c269
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7343.c112
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c39
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c91
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c160
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c413
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7757.c92
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c81
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7770.c221
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c60
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c159
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c132
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c121
-rw-r--r--arch/sh/kernel/cpu/sh4a/smp-shx3.c37
-rw-r--r--arch/sh/kernel/cpu/sh5/entry.S2
-rw-r--r--arch/sh/kernel/cpu/sh5/fpu.c4
-rw-r--r--arch/sh/kernel/cpu/sh5/setup-sh5.c22
-rw-r--r--arch/sh/kernel/cpu/shmobile/cpuidle.c42
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm.c117
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm_runtime.c17
-rw-r--r--arch/sh/kernel/cpu/shmobile/sleep.S344
-rw-r--r--arch/sh/kernel/cpu/ubc.S59
-rw-r--r--arch/sh/kernel/dma-nommu.c82
-rw-r--r--arch/sh/kernel/dwarf.c222
-rw-r--r--arch/sh/kernel/early_printk.c157
-rw-r--r--arch/sh/kernel/entry-common.S2
-rw-r--r--arch/sh/kernel/ftrace.c222
-rw-r--r--arch/sh/kernel/gpio.c584
-rw-r--r--arch/sh/kernel/head_32.S2
-rw-r--r--arch/sh/kernel/idle.c78
-rw-r--r--arch/sh/kernel/io_generic.c4
-rw-r--r--arch/sh/kernel/irq.c18
-rw-r--r--arch/sh/kernel/irq_32.c57
-rw-r--r--arch/sh/kernel/irq_64.c51
-rw-r--r--arch/sh/kernel/machine_kexec.c6
-rw-r--r--arch/sh/kernel/machvec.c4
-rw-r--r--arch/sh/kernel/module.c9
-rw-r--r--arch/sh/kernel/perf_callchain.c98
-rw-r--r--arch/sh/kernel/perf_event.c312
-rw-r--r--arch/sh/kernel/process_32.c42
-rw-r--r--arch/sh/kernel/process_64.c6
-rw-r--r--arch/sh/kernel/ptrace_64.c4
-rw-r--r--arch/sh/kernel/return_address.c54
-rw-r--r--arch/sh/kernel/setup.c7
-rw-r--r--arch/sh/kernel/sh_ksyms_32.c67
-rw-r--r--arch/sh/kernel/sh_ksyms_64.c10
-rw-r--r--arch/sh/kernel/signal_32.c24
-rw-r--r--arch/sh/kernel/signal_64.c15
-rw-r--r--arch/sh/kernel/smp.c4
-rw-r--r--arch/sh/kernel/sys_sh.c28
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/topology.c26
-rw-r--r--arch/sh/kernel/traps.c8
-rw-r--r--arch/sh/kernel/traps_32.c100
-rw-r--r--arch/sh/kernel/traps_64.c4
-rw-r--r--arch/sh/lib/Makefile7
-rw-r--r--arch/sh/lib/memset-sh4.S107
-rw-r--r--arch/sh/math-emu/math.c6
-rw-r--r--arch/sh/mm/Kconfig19
-rw-r--r--arch/sh/mm/Makefile3
-rw-r--r--arch/sh/mm/cache-sh4.c500
-rw-r--r--arch/sh/mm/cache-sh5.c2
-rw-r--r--arch/sh/mm/cache-sh7705.c2
-rw-r--r--arch/sh/mm/cache.c18
-rw-r--r--arch/sh/mm/consistent.c28
-rw-r--r--arch/sh/mm/init.c19
-rw-r--r--arch/sh/mm/ioremap_32.c10
-rw-r--r--arch/sh/mm/ioremap_64.c6
-rw-r--r--arch/sh/mm/kmap.c4
-rw-r--r--arch/sh/mm/mmap.c3
-rw-r--r--arch/sh/mm/numa.c17
-rw-r--r--arch/sh/mm/pmb-fixed.c45
-rw-r--r--arch/sh/mm/pmb.c268
-rw-r--r--arch/sh/oprofile/Makefile4
-rw-r--r--arch/sh/oprofile/common.c38
-rw-r--r--arch/sh/oprofile/op_impl.h2
-rw-r--r--arch/sh/oprofile/op_model_sh7750.c255
-rw-r--r--arch/sh/tools/Makefile4
-rw-r--r--arch/sh/tools/gen-mach-types2
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/sparc/Kconfig.debug14
-rw-r--r--arch/sparc/include/asm/asm-offsets.h1
-rw-r--r--arch/sparc/include/asm/elf_32.h2
-rw-r--r--arch/sparc/include/asm/elf_64.h1
-rw-r--r--arch/sparc/include/asm/fcntl.h19
-rw-r--r--arch/sparc/include/asm/pci_64.h2
-rw-r--r--arch/sparc/include/asm/spinlock_32.h62
-rw-r--r--arch/sparc/include/asm/spinlock_64.h54
-rw-r--r--arch/sparc/include/asm/spinlock_types.h8
-rw-r--r--arch/sparc/include/asm/string_32.h78
-rw-r--r--arch/sparc/include/asm/string_64.h25
-rw-r--r--arch/sparc/include/asm/thread_info_64.h2
-rw-r--r--arch/sparc/include/asm/uaccess_32.h15
-rw-r--r--arch/sparc/include/asm/uaccess_64.h23
-rw-r--r--arch/sparc/include/asm/unistd.h2
-rw-r--r--arch/sparc/kernel/entry.S2
-rw-r--r--arch/sparc/kernel/ftrace.c11
-rw-r--r--arch/sparc/kernel/iommu.c3
-rw-r--r--arch/sparc/kernel/irq_64.c8
-rw-r--r--arch/sparc/kernel/kprobes.c3
-rw-r--r--arch/sparc/kernel/ldc.c20
-rw-r--r--arch/sparc/kernel/mdesc.c21
-rw-r--r--arch/sparc/kernel/nmi.c8
-rw-r--r--arch/sparc/kernel/of_device_64.c14
-rw-r--r--arch/sparc/kernel/pci.c8
-rw-r--r--arch/sparc/kernel/ptrace_64.c10
-rw-r--r--arch/sparc/kernel/sparc_ksyms_64.c12
-rw-r--r--arch/sparc/kernel/sys_sparc32.c22
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c64
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c50
-rw-r--r--arch/sparc/kernel/syscalls.S14
-rw-r--r--arch/sparc/kernel/systbls.h1
-rw-r--r--arch/sparc/kernel/systbls_32.S4
-rw-r--r--arch/sparc/kernel/systbls_64.S6
-rw-r--r--arch/sparc/kernel/time_64.c26
-rw-r--r--arch/sparc/kernel/unaligned_32.c15
-rw-r--r--arch/sparc/kernel/unaligned_64.c23
-rw-r--r--arch/sparc/kernel/visemul.c3
-rw-r--r--arch/sparc/lib/Makefile1
-rw-r--r--arch/sparc/lib/bzero.S5
-rw-r--r--arch/sparc/lib/checksum_32.S2
-rw-r--r--arch/sparc/lib/ksyms.c2
-rw-r--r--arch/sparc/lib/mcount.S5
-rw-r--r--arch/sparc/lib/memcpy.S3
-rw-r--r--arch/sparc/lib/memset.S3
-rw-r--r--arch/sparc/lib/usercopy.c8
-rw-r--r--arch/sparc/math-emu/math_32.c3
-rw-r--r--arch/sparc/math-emu/math_64.c2
-rw-r--r--arch/sparc/mm/fault_64.c24
-rw-r--r--arch/sparc/mm/sun4c.c17
-rw-r--r--arch/um/Makefile2
-rw-r--r--arch/um/drivers/mconsole_kern.c30
-rw-r--r--arch/um/drivers/mmapper_kern.c11
-rw-r--r--arch/um/drivers/random.c3
-rw-r--r--arch/um/drivers/ubd_kern.c36
-rw-r--r--arch/um/include/asm/asm-offsets.h1
-rw-r--r--arch/um/kernel/exitcode.c43
-rw-r--r--arch/um/kernel/irq.c4
-rw-r--r--arch/um/kernel/process.c31
-rw-r--r--arch/um/kernel/syscall.c28
-rw-r--r--arch/um/sys-i386/asm/elf.h1
-rw-r--r--arch/um/sys-i386/shared/sysdep/syscalls.h4
-rw-r--r--arch/um/sys-ppc/asm/elf.h2
-rw-r--r--arch/um/sys-x86_64/asm/elf.h1
-rw-r--r--arch/x86/Kconfig11
-rw-r--r--arch/x86/Kconfig.debug4
-rw-r--r--arch/x86/boot/compressed/relocs.c87
-rw-r--r--arch/x86/boot/header.S2
-rw-r--r--arch/x86/boot/version.c4
-rw-r--r--arch/x86/crypto/Makefile3
-rw-r--r--arch/x86/crypto/aesni-intel_asm.S517
-rw-r--r--arch/x86/crypto/ghash-clmulni-intel_asm.S157
-rw-r--r--arch/x86/crypto/ghash-clmulni-intel_glue.c333
-rw-r--r--arch/x86/ia32/ia32entry.S2
-rw-r--r--arch/x86/ia32/sys_ia32.c43
-rw-r--r--arch/x86/include/asm/amd_iommu_proto.h4
-rw-r--r--arch/x86/include/asm/asm-offsets.h1
-rw-r--r--arch/x86/include/asm/cpufeature.h1
-rw-r--r--arch/x86/include/asm/desc_defs.h4
-rw-r--r--arch/x86/include/asm/dma-mapping.h2
-rw-r--r--arch/x86/include/asm/elf.h1
-rw-r--r--arch/x86/include/asm/geode.h219
-rw-r--r--arch/x86/include/asm/hpet.h7
-rw-r--r--arch/x86/include/asm/i387.h7
-rw-r--r--arch/x86/include/asm/inst.h150
-rw-r--r--arch/x86/include/asm/irq_vectors.h2
-rw-r--r--arch/x86/include/asm/mmzone_32.h2
-rw-r--r--arch/x86/include/asm/msr.h3
-rw-r--r--arch/x86/include/asm/olpc.h2
-rw-r--r--arch/x86/include/asm/paravirt.h14
-rw-r--r--arch/x86/include/asm/paravirt_types.h14
-rw-r--r--arch/x86/include/asm/pci_x86.h20
-rw-r--r--arch/x86/include/asm/percpu.h104
-rw-r--r--arch/x86/include/asm/ptrace.h2
-rw-r--r--arch/x86/include/asm/sigcontext.h4
-rw-r--r--arch/x86/include/asm/spinlock.h62
-rw-r--r--arch/x86/include/asm/spinlock_types.h10
-rw-r--r--arch/x86/include/asm/swiotlb.h8
-rw-r--r--arch/x86/include/asm/sys_ia32.h4
-rw-r--r--arch/x86/include/asm/syscalls.h34
-rw-r--r--arch/x86/include/asm/system.h1
-rw-r--r--arch/x86/include/asm/topology.h9
-rw-r--r--arch/x86/include/asm/trampoline.h1
-rw-r--r--arch/x86/include/asm/uv/bios.h11
-rw-r--r--arch/x86/include/asm/uv/uv_bau.h2
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h44
-rw-r--r--arch/x86/include/asm/xen/hypervisor.h27
-rw-r--r--arch/x86/kernel/Makefile1
-rw-r--r--arch/x86/kernel/acpi/boot.c3
-rw-r--r--arch/x86/kernel/acpi/cstate.c2
-rw-r--r--arch/x86/kernel/amd_iommu.c54
-rw-r--r--arch/x86/kernel/amd_iommu_init.c12
-rw-r--r--arch/x86/kernel/aperture_64.c11
-rw-r--r--arch/x86/kernel/apic/apic.c4
-rw-r--r--arch/x86/kernel/apic/apic_noop.c2
-rw-r--r--arch/x86/kernel/apic/es7000_32.c12
-rw-r--r--arch/x86/kernel/apic/io_apic.c53
-rw-r--r--arch/x86/kernel/apic/nmi.c8
-rw-r--r--arch/x86/kernel/bios_uv.c8
-rw-r--r--arch/x86/kernel/cpu/addon_cpuid_features.c15
-rw-r--r--arch/x86/kernel/cpu/amd.c2
-rw-r--r--arch/x86/kernel/cpu/common.c16
-rw-r--r--arch/x86/kernel/cpu/cpu_debug.c30
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c45
-rw-r--r--arch/x86/kernel/cpu/cpufreq/longhaul.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k6.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k7.c19
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c32
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-ich.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-lib.c6
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-lib.h24
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-smi.c2
-rw-r--r--arch/x86/kernel/cpu/intel.c2
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c67
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-inject.c22
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c5
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c20
-rw-r--r--arch/x86/kernel/cpu/mtrr/if.c11
-rw-r--r--arch/x86/kernel/cpu/perf_event.c33
-rw-r--r--arch/x86/kernel/ds.c4
-rw-r--r--arch/x86/kernel/dumpstack.c8
-rw-r--r--arch/x86/kernel/dumpstack_64.c33
-rw-r--r--arch/x86/kernel/e820.c11
-rw-r--r--arch/x86/kernel/entry_32.S69
-rw-r--r--arch/x86/kernel/entry_64.S55
-rw-r--r--arch/x86/kernel/geode_32.c196
-rw-r--r--arch/x86/kernel/head32.c2
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/kernel/hpet.c77
-rw-r--r--arch/x86/kernel/hw_breakpoint.c5
-rw-r--r--arch/x86/kernel/ioport.c28
-rw-r--r--arch/x86/kernel/irq.c14
-rw-r--r--arch/x86/kernel/kgdb.c14
-rw-r--r--arch/x86/kernel/kprobes.c4
-rw-r--r--arch/x86/kernel/mfgpt_32.c410
-rw-r--r--arch/x86/kernel/microcode_amd.c40
-rw-r--r--arch/x86/kernel/microcode_core.c26
-rw-r--r--arch/x86/kernel/microcode_intel.c47
-rw-r--r--arch/x86/kernel/mpparse.c3
-rw-r--r--arch/x86/kernel/msr.c5
-rw-r--r--arch/x86/kernel/olpc.c4
-rw-r--r--arch/x86/kernel/paravirt-spinlocks.c4
-rw-r--r--arch/x86/kernel/pci-calgary_64.c6
-rw-r--r--arch/x86/kernel/pci-dma.c6
-rw-r--r--arch/x86/kernel/pci-gart_64.c9
-rw-r--r--arch/x86/kernel/pci-swiotlb.c11
-rw-r--r--arch/x86/kernel/process.c91
-rw-r--r--arch/x86/kernel/process_32.c87
-rw-r--r--arch/x86/kernel/process_64.c51
-rw-r--r--arch/x86/kernel/ptrace.c135
-rw-r--r--arch/x86/kernel/reboot.c8
-rw-r--r--arch/x86/kernel/reboot_fixups_32.c2
-rw-r--r--arch/x86/kernel/setup.c13
-rw-r--r--arch/x86/kernel/setup_percpu.c13
-rw-r--r--arch/x86/kernel/signal.c12
-rw-r--r--arch/x86/kernel/smpboot.c49
-rw-r--r--arch/x86/kernel/sys_i386_32.c27
-rw-r--r--arch/x86/kernel/sys_x86_64.c17
-rw-r--r--arch/x86/kernel/syscall_table_32.S2
-rw-r--r--arch/x86/kernel/trampoline.c20
-rw-r--r--arch/x86/kernel/tsc_sync.c10
-rw-r--r--arch/x86/kernel/vm86_32.c11
-rw-r--r--arch/x86/kernel/vmiclock_32.c2
-rw-r--r--arch/x86/kernel/vmlinux.lds.S4
-rw-r--r--arch/x86/kernel/vsyscall_64.c5
-rw-r--r--arch/x86/kernel/x8664_ksyms_64.c6
-rw-r--r--arch/x86/kvm/i8254.c12
-rw-r--r--arch/x86/kvm/svm.c64
-rw-r--r--arch/x86/lib/Makefile4
-rw-r--r--arch/x86/lib/msr.c26
-rw-r--r--arch/x86/mm/kmmio.c46
-rw-r--r--arch/x86/mm/mmio-mod.c71
-rw-r--r--arch/x86/mm/pat.c3
-rw-r--r--arch/x86/pci/Makefile5
-rw-r--r--arch/x86/pci/acpi.c74
-rw-r--r--arch/x86/pci/amd_bus.c120
-rw-r--r--arch/x86/pci/bus_numa.c101
-rw-r--r--arch/x86/pci/bus_numa.h27
-rw-r--r--arch/x86/pci/common.c20
-rw-r--r--arch/x86/pci/early.c7
-rw-r--r--arch/x86/pci/i386.c42
-rw-r--r--arch/x86/pci/intel_bus.c90
-rw-r--r--arch/x86/pci/mmconfig-shared.c356
-rw-r--r--arch/x86/pci/mmconfig_32.c16
-rw-r--r--arch/x86/pci/mmconfig_64.c88
-rw-r--r--arch/x86/tools/gen-insn-attr-x86.awk10
-rw-r--r--arch/x86/tools/test_get_len.c2
-rw-r--r--arch/x86/xen/enlighten.c33
-rw-r--r--arch/x86/xen/mmu.c2
-rw-r--r--arch/x86/xen/smp.c42
-rw-r--r--arch/x86/xen/spinlock.c16
-rw-r--r--arch/x86/xen/suspend.c17
-rw-r--r--arch/x86/xen/time.c31
-rw-r--r--arch/x86/xen/xen-asm_64.S4
-rw-r--r--arch/x86/xen/xen-ops.h2
-rw-r--r--arch/xtensa/include/asm/asm-offsets.h1
-rw-r--r--arch/xtensa/include/asm/elf.h1
-rw-r--r--arch/xtensa/include/asm/syscall.h3
-rw-r--r--arch/xtensa/include/asm/unistd.h4
-rw-r--r--arch/xtensa/kernel/irq.c4
-rw-r--r--arch/xtensa/kernel/syscall.c43
-rw-r--r--arch/xtensa/platforms/iss/console.c2
1528 files changed, 79612 insertions, 39687 deletions
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c
index 3af21c789339..3c8d1b25c661 100644
--- a/arch/alpha/boot/bootp.c
+++ b/arch/alpha/boot/bootp.c
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/utsrelease.h> 12#include <generated/utsrelease.h>
13#include <linux/mm.h> 13#include <linux/mm.h>
14 14
15#include <asm/system.h> 15#include <asm/system.h>
diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c
index 1036b515e20c..ade3f129dc27 100644
--- a/arch/alpha/boot/bootpz.c
+++ b/arch/alpha/boot/bootpz.c
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <linux/utsrelease.h> 14#include <generated/utsrelease.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16 16
17#include <asm/system.h> 17#include <asm/system.h>
diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c
index 89f3be071ae5..644b7db55438 100644
--- a/arch/alpha/boot/main.c
+++ b/arch/alpha/boot/main.c
@@ -7,7 +7,7 @@
7 */ 7 */
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/string.h> 9#include <linux/string.h>
10#include <linux/utsrelease.h> 10#include <generated/utsrelease.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12 12
13#include <asm/system.h> 13#include <asm/system.h>
diff --git a/arch/alpha/include/asm/asm-offsets.h b/arch/alpha/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/alpha/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/alpha/include/asm/core_t2.h b/arch/alpha/include/asm/core_t2.h
index 46bfff58f670..471c07292e0b 100644
--- a/arch/alpha/include/asm/core_t2.h
+++ b/arch/alpha/include/asm/core_t2.h
@@ -435,7 +435,7 @@ extern inline void t2_outl(u32 b, unsigned long addr)
435 set_hae(msb); \ 435 set_hae(msb); \
436} 436}
437 437
438extern spinlock_t t2_hae_lock; 438extern raw_spinlock_t t2_hae_lock;
439 439
440/* 440/*
441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since 441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
@@ -448,12 +448,12 @@ __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr)
448 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 448 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
449 unsigned long result, msb; 449 unsigned long result, msb;
450 unsigned long flags; 450 unsigned long flags;
451 spin_lock_irqsave(&t2_hae_lock, flags); 451 raw_spin_lock_irqsave(&t2_hae_lock, flags);
452 452
453 t2_set_hae; 453 t2_set_hae;
454 454
455 result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00); 455 result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00);
456 spin_unlock_irqrestore(&t2_hae_lock, flags); 456 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
457 return __kernel_extbl(result, addr & 3); 457 return __kernel_extbl(result, addr & 3);
458} 458}
459 459
@@ -462,12 +462,12 @@ __EXTERN_INLINE u16 t2_readw(const volatile void __iomem *xaddr)
462 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 462 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
463 unsigned long result, msb; 463 unsigned long result, msb;
464 unsigned long flags; 464 unsigned long flags;
465 spin_lock_irqsave(&t2_hae_lock, flags); 465 raw_spin_lock_irqsave(&t2_hae_lock, flags);
466 466
467 t2_set_hae; 467 t2_set_hae;
468 468
469 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08); 469 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08);
470 spin_unlock_irqrestore(&t2_hae_lock, flags); 470 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
471 return __kernel_extwl(result, addr & 3); 471 return __kernel_extwl(result, addr & 3);
472} 472}
473 473
@@ -480,12 +480,12 @@ __EXTERN_INLINE u32 t2_readl(const volatile void __iomem *xaddr)
480 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 480 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
481 unsigned long result, msb; 481 unsigned long result, msb;
482 unsigned long flags; 482 unsigned long flags;
483 spin_lock_irqsave(&t2_hae_lock, flags); 483 raw_spin_lock_irqsave(&t2_hae_lock, flags);
484 484
485 t2_set_hae; 485 t2_set_hae;
486 486
487 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18); 487 result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
488 spin_unlock_irqrestore(&t2_hae_lock, flags); 488 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
489 return result & 0xffffffffUL; 489 return result & 0xffffffffUL;
490} 490}
491 491
@@ -494,14 +494,14 @@ __EXTERN_INLINE u64 t2_readq(const volatile void __iomem *xaddr)
494 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 494 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
495 unsigned long r0, r1, work, msb; 495 unsigned long r0, r1, work, msb;
496 unsigned long flags; 496 unsigned long flags;
497 spin_lock_irqsave(&t2_hae_lock, flags); 497 raw_spin_lock_irqsave(&t2_hae_lock, flags);
498 498
499 t2_set_hae; 499 t2_set_hae;
500 500
501 work = (addr << 5) + T2_SPARSE_MEM + 0x18; 501 work = (addr << 5) + T2_SPARSE_MEM + 0x18;
502 r0 = *(vuip)(work); 502 r0 = *(vuip)(work);
503 r1 = *(vuip)(work + (4 << 5)); 503 r1 = *(vuip)(work + (4 << 5));
504 spin_unlock_irqrestore(&t2_hae_lock, flags); 504 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
505 return r1 << 32 | r0; 505 return r1 << 32 | r0;
506} 506}
507 507
@@ -510,13 +510,13 @@ __EXTERN_INLINE void t2_writeb(u8 b, volatile void __iomem *xaddr)
510 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 510 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
511 unsigned long msb, w; 511 unsigned long msb, w;
512 unsigned long flags; 512 unsigned long flags;
513 spin_lock_irqsave(&t2_hae_lock, flags); 513 raw_spin_lock_irqsave(&t2_hae_lock, flags);
514 514
515 t2_set_hae; 515 t2_set_hae;
516 516
517 w = __kernel_insbl(b, addr & 3); 517 w = __kernel_insbl(b, addr & 3);
518 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w; 518 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w;
519 spin_unlock_irqrestore(&t2_hae_lock, flags); 519 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
520} 520}
521 521
522__EXTERN_INLINE void t2_writew(u16 b, volatile void __iomem *xaddr) 522__EXTERN_INLINE void t2_writew(u16 b, volatile void __iomem *xaddr)
@@ -524,13 +524,13 @@ __EXTERN_INLINE void t2_writew(u16 b, volatile void __iomem *xaddr)
524 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 524 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
525 unsigned long msb, w; 525 unsigned long msb, w;
526 unsigned long flags; 526 unsigned long flags;
527 spin_lock_irqsave(&t2_hae_lock, flags); 527 raw_spin_lock_irqsave(&t2_hae_lock, flags);
528 528
529 t2_set_hae; 529 t2_set_hae;
530 530
531 w = __kernel_inswl(b, addr & 3); 531 w = __kernel_inswl(b, addr & 3);
532 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w; 532 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w;
533 spin_unlock_irqrestore(&t2_hae_lock, flags); 533 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
534} 534}
535 535
536/* 536/*
@@ -542,12 +542,12 @@ __EXTERN_INLINE void t2_writel(u32 b, volatile void __iomem *xaddr)
542 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 542 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
543 unsigned long msb; 543 unsigned long msb;
544 unsigned long flags; 544 unsigned long flags;
545 spin_lock_irqsave(&t2_hae_lock, flags); 545 raw_spin_lock_irqsave(&t2_hae_lock, flags);
546 546
547 t2_set_hae; 547 t2_set_hae;
548 548
549 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b; 549 *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b;
550 spin_unlock_irqrestore(&t2_hae_lock, flags); 550 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
551} 551}
552 552
553__EXTERN_INLINE void t2_writeq(u64 b, volatile void __iomem *xaddr) 553__EXTERN_INLINE void t2_writeq(u64 b, volatile void __iomem *xaddr)
@@ -555,14 +555,14 @@ __EXTERN_INLINE void t2_writeq(u64 b, volatile void __iomem *xaddr)
555 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM; 555 unsigned long addr = (unsigned long) xaddr - T2_DENSE_MEM;
556 unsigned long msb, work; 556 unsigned long msb, work;
557 unsigned long flags; 557 unsigned long flags;
558 spin_lock_irqsave(&t2_hae_lock, flags); 558 raw_spin_lock_irqsave(&t2_hae_lock, flags);
559 559
560 t2_set_hae; 560 t2_set_hae;
561 561
562 work = (addr << 5) + T2_SPARSE_MEM + 0x18; 562 work = (addr << 5) + T2_SPARSE_MEM + 0x18;
563 *(vuip)work = b; 563 *(vuip)work = b;
564 *(vuip)(work + (4 << 5)) = b >> 32; 564 *(vuip)(work + (4 << 5)) = b >> 32;
565 spin_unlock_irqrestore(&t2_hae_lock, flags); 565 raw_spin_unlock_irqrestore(&t2_hae_lock, flags);
566} 566}
567 567
568__EXTERN_INLINE void __iomem *t2_ioportmap(unsigned long addr) 568__EXTERN_INLINE void __iomem *t2_ioportmap(unsigned long addr)
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
index 5c75c1b2352a..9baae8afe8a3 100644
--- a/arch/alpha/include/asm/elf.h
+++ b/arch/alpha/include/asm/elf.h
@@ -81,7 +81,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
81#define ELF_DATA ELFDATA2LSB 81#define ELF_DATA ELFDATA2LSB
82#define ELF_ARCH EM_ALPHA 82#define ELF_ARCH EM_ALPHA
83 83
84#define USE_ELF_CORE_DUMP
85#define ELF_EXEC_PAGESIZE 8192 84#define ELF_EXEC_PAGESIZE 8192
86 85
87/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 86/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/alpha/include/asm/fcntl.h b/arch/alpha/include/asm/fcntl.h
index 25da0017ec87..70145cbb21cb 100644
--- a/arch/alpha/include/asm/fcntl.h
+++ b/arch/alpha/include/asm/fcntl.h
@@ -1,8 +1,6 @@
1#ifndef _ALPHA_FCNTL_H 1#ifndef _ALPHA_FCNTL_H
2#define _ALPHA_FCNTL_H 2#define _ALPHA_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 01000 /* not fcntl */ 4#define O_CREAT 01000 /* not fcntl */
7#define O_TRUNC 02000 /* not fcntl */ 5#define O_TRUNC 02000 /* not fcntl */
8#define O_EXCL 04000 /* not fcntl */ 6#define O_EXCL 04000 /* not fcntl */
@@ -10,13 +8,28 @@
10 8
11#define O_NONBLOCK 00004 9#define O_NONBLOCK 00004
12#define O_APPEND 00010 10#define O_APPEND 00010
13#define O_SYNC 040000 11#define O_DSYNC 040000 /* used to be O_SYNC, see below */
14#define O_DIRECTORY 0100000 /* must be a directory */ 12#define O_DIRECTORY 0100000 /* must be a directory */
15#define O_NOFOLLOW 0200000 /* don't follow links */ 13#define O_NOFOLLOW 0200000 /* don't follow links */
16#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ 14#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
17#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ 15#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */
18#define O_NOATIME 04000000 16#define O_NOATIME 04000000
19#define O_CLOEXEC 010000000 /* set close_on_exec */ 17#define O_CLOEXEC 010000000 /* set close_on_exec */
18/*
19 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
20 * the O_SYNC flag. We continue to use the existing numerical value
21 * for O_DSYNC semantics now, but using the correct symbolic name for it.
22 * This new value is used to request true Posix O_SYNC semantics. It is
23 * defined in this strange way to make sure applications compiled against
24 * new headers get at least O_DSYNC semantics on older kernels.
25 *
26 * This has the nice side-effect that we can simply test for O_DSYNC
27 * wherever we do not care if O_DSYNC or O_SYNC is used.
28 *
29 * Note: __O_SYNC must never be used directly.
30 */
31#define __O_SYNC 020000000
32#define O_SYNC (__O_SYNC|O_DSYNC)
20 33
21#define F_GETLK 7 34#define F_GETLK 7
22#define F_SETLK 8 35#define F_SETLK 8
diff --git a/arch/alpha/include/asm/spinlock.h b/arch/alpha/include/asm/spinlock.h
index e38fb95cb335..d0faca1e992d 100644
--- a/arch/alpha/include/asm/spinlock.h
+++ b/arch/alpha/include/asm/spinlock.h
@@ -12,18 +12,18 @@
12 * We make no fairness assumptions. They have a cost. 12 * We make no fairness assumptions. They have a cost.
13 */ 13 */
14 14
15#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 15#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
16#define __raw_spin_is_locked(x) ((x)->lock != 0) 16#define arch_spin_is_locked(x) ((x)->lock != 0)
17#define __raw_spin_unlock_wait(x) \ 17#define arch_spin_unlock_wait(x) \
18 do { cpu_relax(); } while ((x)->lock) 18 do { cpu_relax(); } while ((x)->lock)
19 19
20static inline void __raw_spin_unlock(raw_spinlock_t * lock) 20static inline void arch_spin_unlock(arch_spinlock_t * lock)
21{ 21{
22 mb(); 22 mb();
23 lock->lock = 0; 23 lock->lock = 0;
24} 24}
25 25
26static inline void __raw_spin_lock(raw_spinlock_t * lock) 26static inline void arch_spin_lock(arch_spinlock_t * lock)
27{ 27{
28 long tmp; 28 long tmp;
29 29
@@ -43,24 +43,24 @@ static inline void __raw_spin_lock(raw_spinlock_t * lock)
43 : "m"(lock->lock) : "memory"); 43 : "m"(lock->lock) : "memory");
44} 44}
45 45
46static inline int __raw_spin_trylock(raw_spinlock_t *lock) 46static inline int arch_spin_trylock(arch_spinlock_t *lock)
47{ 47{
48 return !test_and_set_bit(0, &lock->lock); 48 return !test_and_set_bit(0, &lock->lock);
49} 49}
50 50
51/***********************************************************/ 51/***********************************************************/
52 52
53static inline int __raw_read_can_lock(raw_rwlock_t *lock) 53static inline int arch_read_can_lock(arch_rwlock_t *lock)
54{ 54{
55 return (lock->lock & 1) == 0; 55 return (lock->lock & 1) == 0;
56} 56}
57 57
58static inline int __raw_write_can_lock(raw_rwlock_t *lock) 58static inline int arch_write_can_lock(arch_rwlock_t *lock)
59{ 59{
60 return lock->lock == 0; 60 return lock->lock == 0;
61} 61}
62 62
63static inline void __raw_read_lock(raw_rwlock_t *lock) 63static inline void arch_read_lock(arch_rwlock_t *lock)
64{ 64{
65 long regx; 65 long regx;
66 66
@@ -80,7 +80,7 @@ static inline void __raw_read_lock(raw_rwlock_t *lock)
80 : "m" (*lock) : "memory"); 80 : "m" (*lock) : "memory");
81} 81}
82 82
83static inline void __raw_write_lock(raw_rwlock_t *lock) 83static inline void arch_write_lock(arch_rwlock_t *lock)
84{ 84{
85 long regx; 85 long regx;
86 86
@@ -100,7 +100,7 @@ static inline void __raw_write_lock(raw_rwlock_t *lock)
100 : "m" (*lock) : "memory"); 100 : "m" (*lock) : "memory");
101} 101}
102 102
103static inline int __raw_read_trylock(raw_rwlock_t * lock) 103static inline int arch_read_trylock(arch_rwlock_t * lock)
104{ 104{
105 long regx; 105 long regx;
106 int success; 106 int success;
@@ -122,7 +122,7 @@ static inline int __raw_read_trylock(raw_rwlock_t * lock)
122 return success; 122 return success;
123} 123}
124 124
125static inline int __raw_write_trylock(raw_rwlock_t * lock) 125static inline int arch_write_trylock(arch_rwlock_t * lock)
126{ 126{
127 long regx; 127 long regx;
128 int success; 128 int success;
@@ -144,7 +144,7 @@ static inline int __raw_write_trylock(raw_rwlock_t * lock)
144 return success; 144 return success;
145} 145}
146 146
147static inline void __raw_read_unlock(raw_rwlock_t * lock) 147static inline void arch_read_unlock(arch_rwlock_t * lock)
148{ 148{
149 long regx; 149 long regx;
150 __asm__ __volatile__( 150 __asm__ __volatile__(
@@ -160,17 +160,17 @@ static inline void __raw_read_unlock(raw_rwlock_t * lock)
160 : "m" (*lock) : "memory"); 160 : "m" (*lock) : "memory");
161} 161}
162 162
163static inline void __raw_write_unlock(raw_rwlock_t * lock) 163static inline void arch_write_unlock(arch_rwlock_t * lock)
164{ 164{
165 mb(); 165 mb();
166 lock->lock = 0; 166 lock->lock = 0;
167} 167}
168 168
169#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 169#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
170#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 170#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
171 171
172#define _raw_spin_relax(lock) cpu_relax() 172#define arch_spin_relax(lock) cpu_relax()
173#define _raw_read_relax(lock) cpu_relax() 173#define arch_read_relax(lock) cpu_relax()
174#define _raw_write_relax(lock) cpu_relax() 174#define arch_write_relax(lock) cpu_relax()
175 175
176#endif /* _ALPHA_SPINLOCK_H */ 176#endif /* _ALPHA_SPINLOCK_H */
diff --git a/arch/alpha/include/asm/spinlock_types.h b/arch/alpha/include/asm/spinlock_types.h
index 8141eb5ebf0d..54c2afce0a1d 100644
--- a/arch/alpha/include/asm/spinlock_types.h
+++ b/arch/alpha/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int lock; 9 volatile unsigned int lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index d9980d47ab81..e6d90568b65d 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -74,7 +74,7 @@
74# define DBG(args) 74# define DBG(args)
75#endif 75#endif
76 76
77DEFINE_SPINLOCK(t2_hae_lock); 77DEFINE_RAW_SPINLOCK(t2_hae_lock);
78 78
79static volatile unsigned int t2_mcheck_any_expected; 79static volatile unsigned int t2_mcheck_any_expected;
80static volatile unsigned int t2_mcheck_last_taken; 80static volatile unsigned int t2_mcheck_last_taken;
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index c0de072b8305..5f2cf23c4648 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -81,7 +81,7 @@ show_interrupts(struct seq_file *p, void *v)
81#endif 81#endif
82 82
83 if (irq < ACTUAL_NR_IRQS) { 83 if (irq < ACTUAL_NR_IRQS) {
84 spin_lock_irqsave(&irq_desc[irq].lock, flags); 84 raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
85 action = irq_desc[irq].action; 85 action = irq_desc[irq].action;
86 if (!action) 86 if (!action)
87 goto unlock; 87 goto unlock;
@@ -105,7 +105,7 @@ show_interrupts(struct seq_file *p, void *v)
105 105
106 seq_putc(p, '\n'); 106 seq_putc(p, '\n');
107unlock: 107unlock:
108 spin_unlock_irqrestore(&irq_desc[irq].lock, flags); 108 raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
109 } else if (irq == ACTUAL_NR_IRQS) { 109 } else if (irq == ACTUAL_NR_IRQS) {
110#ifdef CONFIG_SMP 110#ifdef CONFIG_SMP
111 seq_puts(p, "IPI: "); 111 seq_puts(p, "IPI: ");
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 9a3334ae282e..62619f25132f 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -178,25 +178,18 @@ SYSCALL_DEFINE6(osf_mmap, unsigned long, addr, unsigned long, len,
178 unsigned long, prot, unsigned long, flags, unsigned long, fd, 178 unsigned long, prot, unsigned long, flags, unsigned long, fd,
179 unsigned long, off) 179 unsigned long, off)
180{ 180{
181 struct file *file = NULL; 181 unsigned long ret = -EINVAL;
182 unsigned long ret = -EBADF;
183 182
184#if 0 183#if 0
185 if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED)) 184 if (flags & (_MAP_HASSEMAPHORE | _MAP_INHERIT | _MAP_UNALIGNED))
186 printk("%s: unimplemented OSF mmap flags %04lx\n", 185 printk("%s: unimplemented OSF mmap flags %04lx\n",
187 current->comm, flags); 186 current->comm, flags);
188#endif 187#endif
189 if (!(flags & MAP_ANONYMOUS)) { 188 if ((off + PAGE_ALIGN(len)) < off)
190 file = fget(fd); 189 goto out;
191 if (!file) 190 if (off & ~PAGE_MASK)
192 goto out; 191 goto out;
193 } 192 ret = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
194 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
195 down_write(&current->mm->mmap_sem);
196 ret = do_mmap(file, addr, len, prot, flags, off);
197 up_write(&current->mm->mmap_sem);
198 if (file)
199 fput(file);
200 out: 193 out:
201 return ret; 194 return ret;
202} 195}
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c
index d12af472e1c0..dbbf04f9230e 100644
--- a/arch/alpha/kernel/srm_env.c
+++ b/arch/alpha/kernel/srm_env.c
@@ -33,6 +33,7 @@
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/proc_fs.h> 35#include <linux/proc_fs.h>
36#include <linux/seq_file.h>
36#include <asm/console.h> 37#include <asm/console.h>
37#include <asm/uaccess.h> 38#include <asm/uaccess.h>
38#include <asm/machvec.h> 39#include <asm/machvec.h>
@@ -79,42 +80,41 @@ static srm_env_t srm_named_entries[] = {
79static srm_env_t srm_numbered_entries[256]; 80static srm_env_t srm_numbered_entries[256];
80 81
81 82
82static int 83static int srm_env_proc_show(struct seq_file *m, void *v)
83srm_env_read(char *page, char **start, off_t off, int count, int *eof,
84 void *data)
85{ 84{
86 int nbytes;
87 unsigned long ret; 85 unsigned long ret;
88 srm_env_t *entry; 86 srm_env_t *entry;
87 char *page;
89 88
90 if (off != 0) { 89 entry = (srm_env_t *)m->private;
91 *eof = 1; 90 page = (char *)__get_free_page(GFP_USER);
92 return 0; 91 if (!page)
93 } 92 return -ENOMEM;
94 93
95 entry = (srm_env_t *) data; 94 ret = callback_getenv(entry->id, page, PAGE_SIZE);
96 ret = callback_getenv(entry->id, page, count);
97 95
98 if ((ret >> 61) == 0) { 96 if ((ret >> 61) == 0) {
99 nbytes = (int) ret; 97 seq_write(m, page, ret);
100 *eof = 1; 98 ret = 0;
101 } else 99 } else
102 nbytes = -EFAULT; 100 ret = -EFAULT;
101 free_page((unsigned long)page);
102 return ret;
103}
103 104
104 return nbytes; 105static int srm_env_proc_open(struct inode *inode, struct file *file)
106{
107 return single_open(file, srm_env_proc_show, PDE(inode)->data);
105} 108}
106 109
107static int 110static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
108srm_env_write(struct file *file, const char __user *buffer, unsigned long count, 111 size_t count, loff_t *pos)
109 void *data)
110{ 112{
111 int res; 113 int res;
112 srm_env_t *entry; 114 srm_env_t *entry = PDE(file->f_path.dentry->d_inode)->data;
113 char *buf = (char *) __get_free_page(GFP_USER); 115 char *buf = (char *) __get_free_page(GFP_USER);
114 unsigned long ret1, ret2; 116 unsigned long ret1, ret2;
115 117
116 entry = (srm_env_t *) data;
117
118 if (!buf) 118 if (!buf)
119 return -ENOMEM; 119 return -ENOMEM;
120 120
@@ -140,6 +140,15 @@ srm_env_write(struct file *file, const char __user *buffer, unsigned long count,
140 return res; 140 return res;
141} 141}
142 142
143static const struct file_operations srm_env_proc_fops = {
144 .owner = THIS_MODULE,
145 .open = srm_env_proc_open,
146 .read = seq_read,
147 .llseek = seq_lseek,
148 .release = single_release,
149 .write = srm_env_proc_write,
150};
151
143static void 152static void
144srm_env_cleanup(void) 153srm_env_cleanup(void)
145{ 154{
@@ -245,15 +254,10 @@ srm_env_init(void)
245 */ 254 */
246 entry = srm_named_entries; 255 entry = srm_named_entries;
247 while (entry->name && entry->id) { 256 while (entry->name && entry->id) {
248 entry->proc_entry = create_proc_entry(entry->name, 257 entry->proc_entry = proc_create_data(entry->name, 0644, named_dir,
249 0644, named_dir); 258 &srm_env_proc_fops, entry);
250 if (!entry->proc_entry) 259 if (!entry->proc_entry)
251 goto cleanup; 260 goto cleanup;
252
253 entry->proc_entry->data = (void *) entry;
254 entry->proc_entry->read_proc = srm_env_read;
255 entry->proc_entry->write_proc = srm_env_write;
256
257 entry++; 261 entry++;
258 } 262 }
259 263
@@ -264,15 +268,12 @@ srm_env_init(void)
264 entry = &srm_numbered_entries[var_num]; 268 entry = &srm_numbered_entries[var_num];
265 entry->name = number[var_num]; 269 entry->name = number[var_num];
266 270
267 entry->proc_entry = create_proc_entry(entry->name, 271 entry->proc_entry = proc_create_data(entry->name, 0644, numbered_dir,
268 0644, numbered_dir); 272 &srm_env_proc_fops, entry);
269 if (!entry->proc_entry) 273 if (!entry->proc_entry)
270 goto cleanup; 274 goto cleanup;
271 275
272 entry->id = var_num; 276 entry->id = var_num;
273 entry->proc_entry->data = (void *) entry;
274 entry->proc_entry->read_proc = srm_env_read;
275 entry->proc_entry->write_proc = srm_env_write;
276 } 277 }
277 278
278 printk(KERN_INFO "%s: version %s loaded successfully\n", NAME, 279 printk(KERN_INFO "%s: version %s loaded successfully\n", NAME,
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 10b403554b65..7b2c56d8f930 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -197,7 +197,7 @@ setup_memory_node(int nid, void *kernel_end)
197 } 197 }
198 198
199 if (bootmap_start == -1) 199 if (bootmap_start == -1)
200 panic("couldn't find a contigous place for the bootmap"); 200 panic("couldn't find a contiguous place for the bootmap");
201 201
202 /* Allocate the bootmap and mark the whole MM as reserved. */ 202 /* Allocate the bootmap and mark the whole MM as reserved. */
203 bootmap_size = init_bootmem_node(NODE_DATA(nid), bootmap_start, 203 bootmap_size = init_bootmem_node(NODE_DATA(nid), bootmap_start,
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cf8a99f19dc4..233a222752c0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -603,6 +603,7 @@ config ARCH_SA1100
603 select ARCH_SPARSEMEM_ENABLE 603 select ARCH_SPARSEMEM_ENABLE
604 select ARCH_MTD_XIP 604 select ARCH_MTD_XIP
605 select ARCH_HAS_CPUFREQ 605 select ARCH_HAS_CPUFREQ
606 select CPU_FREQ
606 select GENERIC_GPIO 607 select GENERIC_GPIO
607 select GENERIC_TIME 608 select GENERIC_TIME
608 select GENERIC_CLOCKEVENTS 609 select GENERIC_CLOCKEVENTS
@@ -1359,13 +1360,9 @@ source "drivers/cpufreq/Kconfig"
1359 1360
1360config CPU_FREQ_SA1100 1361config CPU_FREQ_SA1100
1361 bool 1362 bool
1362 depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT)
1363 default y
1364 1363
1365config CPU_FREQ_SA1110 1364config CPU_FREQ_SA1110
1366 bool 1365 bool
1367 depends on CPU_FREQ && (SA1100_ASSABET || SA1100_CERF || SA1100_PT_SYSTEM3)
1368 default y
1369 1366
1370config CPU_FREQ_INTEGRATOR 1367config CPU_FREQ_INTEGRATOR
1371 tristate "CPUfreq driver for ARM Integrator CPUs" 1368 tristate "CPUfreq driver for ARM Integrator CPUs"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index ff54c23d085e..5cb9326df7a7 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -71,6 +71,14 @@ config DEBUG_LL
71 in the kernel. This is helpful if you are debugging code that 71 in the kernel. This is helpful if you are debugging code that
72 executes before the console is initialized. 72 executes before the console is initialized.
73 73
74config EARLY_PRINTK
75 bool "Early printk"
76 depends on DEBUG_LL
77 help
78 Say Y here if you want to have an early console using the
79 kernel low-level debugging functions. Add earlyprintk to your
80 kernel parameters to enable this console.
81
74config DEBUG_ICEDCC 82config DEBUG_ICEDCC
75 bool "Kernel low-level debugging via EmbeddedICE DCC channel" 83 bool "Kernel low-level debugging via EmbeddedICE DCC channel"
76 depends on DEBUG_LL 84 depends on DEBUG_LL
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fa0cdab2e1d3..e9da08483b3c 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -242,15 +242,8 @@ all: $(KBUILD_IMAGE)
242 242
243boot := arch/arm/boot 243boot := arch/arm/boot
244 244
245# Update machine arch and proc symlinks if something which affects 245archprepare:
246# them changed. We use .arch to indicate when they were updated 246 $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h
247# last, otherwise make uses the target directory mtime.
248
249archprepare: maketools
250
251PHONY += maketools FORCE
252maketools: include/linux/version.h FORCE
253 $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
254 247
255# Convert bzImage to zImage 248# Convert bzImage to zImage
256bzImage: zImage 249bzImage: zImage
@@ -261,9 +254,6 @@ zImage Image xipImage bootpImage uImage: vmlinux
261zinstall install: vmlinux 254zinstall install: vmlinux
262 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 255 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
263 256
264CLEAN_FILES += include/asm-arm/mach-types.h \
265 include/asm-arm/arch include/asm-arm/.arch
266
267# We use MRPROPER_FILES and CLEAN_FILES now 257# We use MRPROPER_FILES and CLEAN_FILES now
268archclean: 258archclean:
269 $(Q)$(MAKE) $(clean)=$(boot) 259 $(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 5a375e5fef21..bc90364a96c7 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -308,15 +308,11 @@ static inline void unmap_single(struct device *dev, dma_addr_t dma_addr,
308 memcpy(ptr, buf->safe, size); 308 memcpy(ptr, buf->safe, size);
309 309
310 /* 310 /*
311 * DMA buffers must have the same cache properties 311 * Since we may have written to a page cache page,
312 * as if they were really used for DMA - which means 312 * we need to ensure that the data will be coherent
313 * data must be written back to RAM. Note that 313 * with user mappings.
314 * we don't use dmac_flush_range() here for the
315 * bidirectional case because we know the cache
316 * lines will be coherent with the data written.
317 */ 314 */
318 dmac_clean_range(ptr, ptr + size); 315 __cpuc_flush_kernel_dcache_area(ptr, size);
319 outer_clean_range(__pa(ptr), __pa(ptr) + size);
320 } 316 }
321 free_safe_buffer(dev->archdata.dmabounce, buf); 317 free_safe_buffer(dev->archdata.dmabounce, buf);
322 } 318 }
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index 7713a08bb10c..37bda5f3dde3 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -82,7 +82,7 @@ static int scoop_gpio_get(struct gpio_chip *chip, unsigned offset)
82{ 82{
83 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio); 83 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio);
84 84
85 /* XXX: I'm usure, but it seems so */ 85 /* XXX: I'm unsure, but it seems so */
86 return ioread16(sdev->base + SCOOP_GPRR) & (1 << (offset + 1)); 86 return ioread16(sdev->base + SCOOP_GPRR) & (1 << (offset + 1));
87} 87}
88 88
diff --git a/arch/arm/configs/da850_omapl138_defconfig b/arch/arm/configs/da8xx_omapl_defconfig
index 842a70b079bf..50bd25a10f0d 100644
--- a/arch/arm/configs/da850_omapl138_defconfig
+++ b/arch/arm/configs/da8xx_omapl_defconfig
@@ -1,15 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-davinci1 3# Linux kernel version: 2.6.32-rc5
4# Mon Jun 29 07:54:15 2009 4# Thu Oct 22 12:19:19 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 12CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y 13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -18,14 +16,14 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 16CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 17CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 18CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19CONFIG_ARCH_HAS_CPUFREQ=y
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ZONE_DMA=y 22CONFIG_ZONE_DMA=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000 24CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
29 27
30# 28#
31# General setup 29# General setup
@@ -48,11 +46,12 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y
48# 46#
49# RCU Subsystem 47# RCU Subsystem
50# 48#
51CONFIG_CLASSIC_RCU=y 49CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 50# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 51# CONFIG_RCU_TRACE is not set
52CONFIG_RCU_FANOUT=32
53# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 54# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set
56CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y 56CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14 57CONFIG_LOG_BUF_SHIFT=14
@@ -62,8 +61,7 @@ CONFIG_FAIR_GROUP_SCHED=y
62CONFIG_USER_SCHED=y 61CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set 62# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set 63# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y 64# CONFIG_SYSFS_DEPRECATED_V2 is not set
66CONFIG_SYSFS_DEPRECATED_V2=y
67# CONFIG_RELAY is not set 65# CONFIG_RELAY is not set
68# CONFIG_NAMESPACES is not set 66# CONFIG_NAMESPACES is not set
69CONFIG_BLK_DEV_INITRD=y 67CONFIG_BLK_DEV_INITRD=y
@@ -80,7 +78,6 @@ CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 78CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set 79# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 80# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 81CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 82CONFIG_PRINTK=y
86CONFIG_BUG=y 83CONFIG_BUG=y
@@ -93,6 +90,10 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 90CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 91CONFIG_SHMEM=y
95CONFIG_AIO=y 92CONFIG_AIO=y
93
94#
95# Kernel Performance Events And Counters
96#
96CONFIG_VM_EVENT_COUNTERS=y 97CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y 98CONFIG_SLUB_DEBUG=y
98CONFIG_COMPAT_BRK=y 99CONFIG_COMPAT_BRK=y
@@ -100,12 +101,16 @@ CONFIG_COMPAT_BRK=y
100CONFIG_SLUB=y 101CONFIG_SLUB=y
101# CONFIG_SLOB is not set 102# CONFIG_SLOB is not set
102# CONFIG_PROFILING is not set 103# CONFIG_PROFILING is not set
103# CONFIG_MARKERS is not set
104CONFIG_HAVE_OPROFILE=y 104CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set 105# CONFIG_KPROBES is not set
106CONFIG_HAVE_KPROBES=y 106CONFIG_HAVE_KPROBES=y
107CONFIG_HAVE_KRETPROBES=y 107CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_CLK=y 108CONFIG_HAVE_CLK=y
109
110#
111# GCOV-based kernel profiling
112#
113# CONFIG_GCOV_KERNEL is not set
109# CONFIG_SLOW_WORK is not set 114# CONFIG_SLOW_WORK is not set
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y 115CONFIG_HAVE_GENERIC_DMA_COHERENT=y
111CONFIG_SLABINFO=y 116CONFIG_SLABINFO=y
@@ -118,7 +123,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
118CONFIG_MODVERSIONS=y 123CONFIG_MODVERSIONS=y
119# CONFIG_MODULE_SRCVERSION_ALL is not set 124# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 125CONFIG_BLOCK=y
121# CONFIG_LBD is not set 126CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 127# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 128# CONFIG_BLK_DEV_INTEGRITY is not set
124 129
@@ -139,19 +144,22 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
139# 144#
140# System Type 145# System Type
141# 146#
147CONFIG_MMU=y
142# CONFIG_ARCH_AAEC2000 is not set 148# CONFIG_ARCH_AAEC2000 is not set
143# CONFIG_ARCH_INTEGRATOR is not set 149# CONFIG_ARCH_INTEGRATOR is not set
144# CONFIG_ARCH_REALVIEW is not set 150# CONFIG_ARCH_REALVIEW is not set
145# CONFIG_ARCH_VERSATILE is not set 151# CONFIG_ARCH_VERSATILE is not set
146# CONFIG_ARCH_AT91 is not set 152# CONFIG_ARCH_AT91 is not set
147# CONFIG_ARCH_CLPS711X is not set 153# CONFIG_ARCH_CLPS711X is not set
154# CONFIG_ARCH_GEMINI is not set
148# CONFIG_ARCH_EBSA110 is not set 155# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set 156# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_GEMINI is not set
151# CONFIG_ARCH_FOOTBRIDGE is not set 157# CONFIG_ARCH_FOOTBRIDGE is not set
158# CONFIG_ARCH_MXC is not set
159# CONFIG_ARCH_STMP3XXX is not set
152# CONFIG_ARCH_NETX is not set 160# CONFIG_ARCH_NETX is not set
153# CONFIG_ARCH_H720X is not set 161# CONFIG_ARCH_H720X is not set
154# CONFIG_ARCH_IMX is not set 162# CONFIG_ARCH_NOMADIK is not set
155# CONFIG_ARCH_IOP13XX is not set 163# CONFIG_ARCH_IOP13XX is not set
156# CONFIG_ARCH_IOP32X is not set 164# CONFIG_ARCH_IOP32X is not set
157# CONFIG_ARCH_IOP33X is not set 165# CONFIG_ARCH_IOP33X is not set
@@ -160,25 +168,27 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
160# CONFIG_ARCH_IXP4XX is not set 168# CONFIG_ARCH_IXP4XX is not set
161# CONFIG_ARCH_L7200 is not set 169# CONFIG_ARCH_L7200 is not set
162# CONFIG_ARCH_KIRKWOOD is not set 170# CONFIG_ARCH_KIRKWOOD is not set
163# CONFIG_ARCH_KS8695 is not set
164# CONFIG_ARCH_NS9XXX is not set
165# CONFIG_ARCH_LOKI is not set 171# CONFIG_ARCH_LOKI is not set
166# CONFIG_ARCH_MV78XX0 is not set 172# CONFIG_ARCH_MV78XX0 is not set
167# CONFIG_ARCH_MXC is not set
168# CONFIG_ARCH_ORION5X is not set 173# CONFIG_ARCH_ORION5X is not set
174# CONFIG_ARCH_MMP is not set
175# CONFIG_ARCH_KS8695 is not set
176# CONFIG_ARCH_NS9XXX is not set
177# CONFIG_ARCH_W90X900 is not set
169# CONFIG_ARCH_PNX4008 is not set 178# CONFIG_ARCH_PNX4008 is not set
170# CONFIG_ARCH_PXA is not set 179# CONFIG_ARCH_PXA is not set
171# CONFIG_ARCH_MMP is not set 180# CONFIG_ARCH_MSM is not set
172# CONFIG_ARCH_RPC is not set 181# CONFIG_ARCH_RPC is not set
173# CONFIG_ARCH_SA1100 is not set 182# CONFIG_ARCH_SA1100 is not set
174# CONFIG_ARCH_S3C2410 is not set 183# CONFIG_ARCH_S3C2410 is not set
175# CONFIG_ARCH_S3C64XX is not set 184# CONFIG_ARCH_S3C64XX is not set
185# CONFIG_ARCH_S5PC1XX is not set
176# CONFIG_ARCH_SHARK is not set 186# CONFIG_ARCH_SHARK is not set
177# CONFIG_ARCH_LH7A40X is not set 187# CONFIG_ARCH_LH7A40X is not set
188# CONFIG_ARCH_U300 is not set
178CONFIG_ARCH_DAVINCI=y 189CONFIG_ARCH_DAVINCI=y
179# CONFIG_ARCH_OMAP is not set 190# CONFIG_ARCH_OMAP is not set
180# CONFIG_ARCH_MSM is not set 191# CONFIG_ARCH_BCMRING is not set
181# CONFIG_ARCH_W90X900 is not set
182CONFIG_CP_INTC=y 192CONFIG_CP_INTC=y
183 193
184# 194#
@@ -191,7 +201,7 @@ CONFIG_CP_INTC=y
191# CONFIG_ARCH_DAVINCI_DM644x is not set 201# CONFIG_ARCH_DAVINCI_DM644x is not set
192# CONFIG_ARCH_DAVINCI_DM355 is not set 202# CONFIG_ARCH_DAVINCI_DM355 is not set
193# CONFIG_ARCH_DAVINCI_DM646x is not set 203# CONFIG_ARCH_DAVINCI_DM646x is not set
194# CONFIG_ARCH_DAVINCI_DA830 is not set 204CONFIG_ARCH_DAVINCI_DA830=y
195CONFIG_ARCH_DAVINCI_DA850=y 205CONFIG_ARCH_DAVINCI_DA850=y
196CONFIG_ARCH_DAVINCI_DA8XX=y 206CONFIG_ARCH_DAVINCI_DA8XX=y
197# CONFIG_ARCH_DAVINCI_DM365 is not set 207# CONFIG_ARCH_DAVINCI_DM365 is not set
@@ -199,7 +209,14 @@ CONFIG_ARCH_DAVINCI_DA8XX=y
199# 209#
200# DaVinci Board Type 210# DaVinci Board Type
201# 211#
212CONFIG_MACH_DAVINCI_DA830_EVM=y
213CONFIG_DA830_UI=y
214CONFIG_DA830_UI_LCD=y
215# CONFIG_DA830_UI_NAND is not set
202CONFIG_MACH_DAVINCI_DA850_EVM=y 216CONFIG_MACH_DAVINCI_DA850_EVM=y
217CONFIG_DA850_UI_EXP=y
218CONFIG_DA850_UI_NONE=y
219# CONFIG_DA850_UI_RMII is not set
203CONFIG_DAVINCI_MUX=y 220CONFIG_DAVINCI_MUX=y
204# CONFIG_DAVINCI_MUX_DEBUG is not set 221# CONFIG_DAVINCI_MUX_DEBUG is not set
205# CONFIG_DAVINCI_MUX_WARNINGS is not set 222# CONFIG_DAVINCI_MUX_WARNINGS is not set
@@ -212,7 +229,7 @@ CONFIG_CPU_32=y
212CONFIG_CPU_ARM926T=y 229CONFIG_CPU_ARM926T=y
213CONFIG_CPU_32v5=y 230CONFIG_CPU_32v5=y
214CONFIG_CPU_ABRT_EV5TJ=y 231CONFIG_CPU_ABRT_EV5TJ=y
215CONFIG_CPU_PABRT_NOIFAR=y 232CONFIG_CPU_PABRT_LEGACY=y
216CONFIG_CPU_CACHE_VIVT=y 233CONFIG_CPU_CACHE_VIVT=y
217CONFIG_CPU_COPY_V4WB=y 234CONFIG_CPU_COPY_V4WB=y
218CONFIG_CPU_TLB_V4WBI=y 235CONFIG_CPU_TLB_V4WBI=y
@@ -225,9 +242,9 @@ CONFIG_CPU_CP15_MMU=y
225CONFIG_ARM_THUMB=y 242CONFIG_ARM_THUMB=y
226# CONFIG_CPU_ICACHE_DISABLE is not set 243# CONFIG_CPU_ICACHE_DISABLE is not set
227# CONFIG_CPU_DCACHE_DISABLE is not set 244# CONFIG_CPU_DCACHE_DISABLE is not set
228# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 245CONFIG_CPU_DCACHE_WRITETHROUGH=y
229# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 246# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
230# CONFIG_OUTER_CACHE is not set 247CONFIG_ARM_L1_CACHE_SHIFT=5
231CONFIG_COMMON_CLKDEV=y 248CONFIG_COMMON_CLKDEV=y
232 249
233# 250#
@@ -248,11 +265,12 @@ CONFIG_VMSPLIT_3G=y
248# CONFIG_VMSPLIT_2G is not set 265# CONFIG_VMSPLIT_2G is not set
249# CONFIG_VMSPLIT_1G is not set 266# CONFIG_VMSPLIT_1G is not set
250CONFIG_PAGE_OFFSET=0xC0000000 267CONFIG_PAGE_OFFSET=0xC0000000
268# CONFIG_PREEMPT_NONE is not set
269# CONFIG_PREEMPT_VOLUNTARY is not set
251CONFIG_PREEMPT=y 270CONFIG_PREEMPT=y
252CONFIG_HZ=100 271CONFIG_HZ=100
253CONFIG_AEABI=y 272CONFIG_AEABI=y
254# CONFIG_OABI_COMPAT is not set 273# CONFIG_OABI_COMPAT is not set
255# CONFIG_ARCH_HAS_HOLES_MEMORYMODEL is not set
256# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 274# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
257# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 275# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
258# CONFIG_HIGHMEM is not set 276# CONFIG_HIGHMEM is not set
@@ -268,12 +286,14 @@ CONFIG_SPLIT_PTLOCK_CPUS=4096
268CONFIG_ZONE_DMA_FLAG=1 286CONFIG_ZONE_DMA_FLAG=1
269CONFIG_BOUNCE=y 287CONFIG_BOUNCE=y
270CONFIG_VIRT_TO_BUS=y 288CONFIG_VIRT_TO_BUS=y
271CONFIG_UNEVICTABLE_LRU=y
272CONFIG_HAVE_MLOCK=y 289CONFIG_HAVE_MLOCK=y
273CONFIG_HAVE_MLOCKED_PAGE_BIT=y 290CONFIG_HAVE_MLOCKED_PAGE_BIT=y
291# CONFIG_KSM is not set
292CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
274CONFIG_LEDS=y 293CONFIG_LEDS=y
275# CONFIG_LEDS_CPU is not set 294# CONFIG_LEDS_CPU is not set
276CONFIG_ALIGNMENT_TRAP=y 295CONFIG_ALIGNMENT_TRAP=y
296# CONFIG_UACCESS_WITH_MEMCPY is not set
277 297
278# 298#
279# Boot options 299# Boot options
@@ -287,7 +307,24 @@ CONFIG_CMDLINE=""
287# 307#
288# CPU Power Management 308# CPU Power Management
289# 309#
290# CONFIG_CPU_IDLE is not set 310CONFIG_CPU_FREQ=y
311CONFIG_CPU_FREQ_TABLE=y
312# CONFIG_CPU_FREQ_DEBUG is not set
313CONFIG_CPU_FREQ_STAT=y
314# CONFIG_CPU_FREQ_STAT_DETAILS is not set
315# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
316# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
317CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
318# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
319# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
320CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
321CONFIG_CPU_FREQ_GOV_POWERSAVE=m
322CONFIG_CPU_FREQ_GOV_USERSPACE=y
323CONFIG_CPU_FREQ_GOV_ONDEMAND=m
324# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
325CONFIG_CPU_IDLE=y
326CONFIG_CPU_IDLE_GOV_LADDER=y
327CONFIG_CPU_IDLE_GOV_MENU=y
291 328
292# 329#
293# Floating point emulation 330# Floating point emulation
@@ -401,6 +438,7 @@ CONFIG_NETFILTER_ADVANCED=y
401# CONFIG_IP6_NF_IPTABLES is not set 438# CONFIG_IP6_NF_IPTABLES is not set
402# CONFIG_IP_DCCP is not set 439# CONFIG_IP_DCCP is not set
403# CONFIG_IP_SCTP is not set 440# CONFIG_IP_SCTP is not set
441# CONFIG_RDS is not set
404# CONFIG_TIPC is not set 442# CONFIG_TIPC is not set
405# CONFIG_ATM is not set 443# CONFIG_ATM is not set
406# CONFIG_BRIDGE is not set 444# CONFIG_BRIDGE is not set
@@ -415,6 +453,7 @@ CONFIG_NETFILTER_ADVANCED=y
415# CONFIG_ECONET is not set 453# CONFIG_ECONET is not set
416# CONFIG_WAN_ROUTER is not set 454# CONFIG_WAN_ROUTER is not set
417# CONFIG_PHONET is not set 455# CONFIG_PHONET is not set
456# CONFIG_IEEE802154 is not set
418# CONFIG_NET_SCHED is not set 457# CONFIG_NET_SCHED is not set
419# CONFIG_DCB is not set 458# CONFIG_DCB is not set
420 459
@@ -440,6 +479,7 @@ CONFIG_NETFILTER_ADVANCED=y
440# Generic Driver Options 479# Generic Driver Options
441# 480#
442CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 481CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
482# CONFIG_DEVTMPFS is not set
443CONFIG_STANDALONE=y 483CONFIG_STANDALONE=y
444CONFIG_PREVENT_FIRMWARE_BUILD=y 484CONFIG_PREVENT_FIRMWARE_BUILD=y
445# CONFIG_FW_LOADER is not set 485# CONFIG_FW_LOADER is not set
@@ -460,6 +500,7 @@ CONFIG_BLK_DEV_RAM_SIZE=32768
460# CONFIG_BLK_DEV_XIP is not set 500# CONFIG_BLK_DEV_XIP is not set
461# CONFIG_CDROM_PKTCDVD is not set 501# CONFIG_CDROM_PKTCDVD is not set
462# CONFIG_ATA_OVER_ETH is not set 502# CONFIG_ATA_OVER_ETH is not set
503# CONFIG_MG_DISK is not set
463CONFIG_MISC_DEVICES=y 504CONFIG_MISC_DEVICES=y
464# CONFIG_ICS932S401 is not set 505# CONFIG_ICS932S401 is not set
465# CONFIG_ENCLOSURE_SERVICES is not set 506# CONFIG_ENCLOSURE_SERVICES is not set
@@ -471,6 +512,7 @@ CONFIG_MISC_DEVICES=y
471# 512#
472CONFIG_EEPROM_AT24=y 513CONFIG_EEPROM_AT24=y
473# CONFIG_EEPROM_LEGACY is not set 514# CONFIG_EEPROM_LEGACY is not set
515# CONFIG_EEPROM_MAX6875 is not set
474# CONFIG_EEPROM_93CX6 is not set 516# CONFIG_EEPROM_93CX6 is not set
475CONFIG_HAVE_IDE=y 517CONFIG_HAVE_IDE=y
476# CONFIG_IDE is not set 518# CONFIG_IDE is not set
@@ -494,10 +536,6 @@ CONFIG_BLK_DEV_SD=m
494# CONFIG_BLK_DEV_SR is not set 536# CONFIG_BLK_DEV_SR is not set
495# CONFIG_CHR_DEV_SG is not set 537# CONFIG_CHR_DEV_SG is not set
496# CONFIG_CHR_DEV_SCH is not set 538# CONFIG_CHR_DEV_SCH is not set
497
498#
499# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
500#
501# CONFIG_SCSI_MULTI_LUN is not set 539# CONFIG_SCSI_MULTI_LUN is not set
502# CONFIG_SCSI_CONSTANTS is not set 540# CONFIG_SCSI_CONSTANTS is not set
503# CONFIG_SCSI_LOGGING is not set 541# CONFIG_SCSI_LOGGING is not set
@@ -522,7 +560,6 @@ CONFIG_SCSI_LOWLEVEL=y
522# CONFIG_ATA is not set 560# CONFIG_ATA is not set
523# CONFIG_MD is not set 561# CONFIG_MD is not set
524CONFIG_NETDEVICES=y 562CONFIG_NETDEVICES=y
525CONFIG_COMPAT_NET_DEV_OPS=y
526# CONFIG_DUMMY is not set 563# CONFIG_DUMMY is not set
527# CONFIG_BONDING is not set 564# CONFIG_BONDING is not set
528# CONFIG_MACVLAN is not set 565# CONFIG_MACVLAN is not set
@@ -553,7 +590,7 @@ CONFIG_NET_ETHERNET=y
553CONFIG_MII=y 590CONFIG_MII=y
554# CONFIG_AX88796 is not set 591# CONFIG_AX88796 is not set
555# CONFIG_SMC91X is not set 592# CONFIG_SMC91X is not set
556# CONFIG_TI_DAVINCI_EMAC is not set 593CONFIG_TI_DAVINCI_EMAC=y
557# CONFIG_DM9000 is not set 594# CONFIG_DM9000 is not set
558# CONFIG_ETHOC is not set 595# CONFIG_ETHOC is not set
559# CONFIG_SMC911X is not set 596# CONFIG_SMC911X is not set
@@ -567,12 +604,11 @@ CONFIG_MII=y
567# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 604# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
568# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 605# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
569# CONFIG_B44 is not set 606# CONFIG_B44 is not set
607# CONFIG_KS8842 is not set
608# CONFIG_KS8851_MLL is not set
570# CONFIG_NETDEV_1000 is not set 609# CONFIG_NETDEV_1000 is not set
571# CONFIG_NETDEV_10000 is not set 610# CONFIG_NETDEV_10000 is not set
572 611CONFIG_WLAN=y
573#
574# Wireless LAN
575#
576# CONFIG_WLAN_PRE80211 is not set 612# CONFIG_WLAN_PRE80211 is not set
577# CONFIG_WLAN_80211 is not set 613# CONFIG_WLAN_80211 is not set
578 614
@@ -588,6 +624,7 @@ CONFIG_NETPOLL=y
588CONFIG_NETPOLL_TRAP=y 624CONFIG_NETPOLL_TRAP=y
589CONFIG_NET_POLL_CONTROLLER=y 625CONFIG_NET_POLL_CONTROLLER=y
590# CONFIG_ISDN is not set 626# CONFIG_ISDN is not set
627# CONFIG_PHONE is not set
591 628
592# 629#
593# Input device support 630# Input device support
@@ -611,23 +648,30 @@ CONFIG_INPUT_EVBUG=m
611# Input Device Drivers 648# Input Device Drivers
612# 649#
613CONFIG_INPUT_KEYBOARD=y 650CONFIG_INPUT_KEYBOARD=y
651# CONFIG_KEYBOARD_ADP5588 is not set
614CONFIG_KEYBOARD_ATKBD=m 652CONFIG_KEYBOARD_ATKBD=m
615# CONFIG_KEYBOARD_SUNKBD is not set 653# CONFIG_QT2160 is not set
616# CONFIG_KEYBOARD_LKKBD is not set 654# CONFIG_KEYBOARD_LKKBD is not set
617CONFIG_KEYBOARD_XTKBD=m 655CONFIG_KEYBOARD_GPIO=y
656# CONFIG_KEYBOARD_MATRIX is not set
657# CONFIG_KEYBOARD_MAX7359 is not set
618# CONFIG_KEYBOARD_NEWTON is not set 658# CONFIG_KEYBOARD_NEWTON is not set
659# CONFIG_KEYBOARD_OPENCORES is not set
619# CONFIG_KEYBOARD_STOWAWAY is not set 660# CONFIG_KEYBOARD_STOWAWAY is not set
620CONFIG_KEYBOARD_GPIO=y 661# CONFIG_KEYBOARD_SUNKBD is not set
662CONFIG_KEYBOARD_XTKBD=m
621# CONFIG_INPUT_MOUSE is not set 663# CONFIG_INPUT_MOUSE is not set
622# CONFIG_INPUT_JOYSTICK is not set 664# CONFIG_INPUT_JOYSTICK is not set
623# CONFIG_INPUT_TABLET is not set 665# CONFIG_INPUT_TABLET is not set
624CONFIG_INPUT_TOUCHSCREEN=y 666CONFIG_INPUT_TOUCHSCREEN=y
625# CONFIG_TOUCHSCREEN_AD7879_I2C is not set 667# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
626# CONFIG_TOUCHSCREEN_AD7879 is not set 668# CONFIG_TOUCHSCREEN_AD7879 is not set
669# CONFIG_TOUCHSCREEN_EETI is not set
627# CONFIG_TOUCHSCREEN_FUJITSU is not set 670# CONFIG_TOUCHSCREEN_FUJITSU is not set
628# CONFIG_TOUCHSCREEN_GUNZE is not set 671# CONFIG_TOUCHSCREEN_GUNZE is not set
629# CONFIG_TOUCHSCREEN_ELO is not set 672# CONFIG_TOUCHSCREEN_ELO is not set
630# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set 673# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
674# CONFIG_TOUCHSCREEN_MCS5000 is not set
631# CONFIG_TOUCHSCREEN_MTOUCH is not set 675# CONFIG_TOUCHSCREEN_MTOUCH is not set
632# CONFIG_TOUCHSCREEN_INEXIO is not set 676# CONFIG_TOUCHSCREEN_INEXIO is not set
633# CONFIG_TOUCHSCREEN_MK712 is not set 677# CONFIG_TOUCHSCREEN_MK712 is not set
@@ -636,6 +680,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
636# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 680# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
637# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 681# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
638# CONFIG_TOUCHSCREEN_TSC2007 is not set 682# CONFIG_TOUCHSCREEN_TSC2007 is not set
683# CONFIG_TOUCHSCREEN_W90X900 is not set
639# CONFIG_INPUT_MISC is not set 684# CONFIG_INPUT_MISC is not set
640 685
641# 686#
@@ -684,6 +729,7 @@ CONFIG_HW_RANDOM=m
684# CONFIG_TCG_TPM is not set 729# CONFIG_TCG_TPM is not set
685CONFIG_I2C=y 730CONFIG_I2C=y
686CONFIG_I2C_BOARDINFO=y 731CONFIG_I2C_BOARDINFO=y
732CONFIG_I2C_COMPAT=y
687CONFIG_I2C_CHARDEV=y 733CONFIG_I2C_CHARDEV=y
688CONFIG_I2C_HELPER_AUTO=y 734CONFIG_I2C_HELPER_AUTO=y
689 735
@@ -695,6 +741,7 @@ CONFIG_I2C_HELPER_AUTO=y
695# I2C system bus drivers (mostly embedded / system-on-chip) 741# I2C system bus drivers (mostly embedded / system-on-chip)
696# 742#
697CONFIG_I2C_DAVINCI=y 743CONFIG_I2C_DAVINCI=y
744# CONFIG_I2C_DESIGNWARE is not set
698# CONFIG_I2C_GPIO is not set 745# CONFIG_I2C_GPIO is not set
699# CONFIG_I2C_OCORES is not set 746# CONFIG_I2C_OCORES is not set
700# CONFIG_I2C_SIMTEC is not set 747# CONFIG_I2C_SIMTEC is not set
@@ -715,14 +762,17 @@ CONFIG_I2C_DAVINCI=y
715# Miscellaneous I2C Chip support 762# Miscellaneous I2C Chip support
716# 763#
717# CONFIG_DS1682 is not set 764# CONFIG_DS1682 is not set
718# CONFIG_SENSORS_PCA9539 is not set
719# CONFIG_SENSORS_MAX6875 is not set
720# CONFIG_SENSORS_TSL2550 is not set 765# CONFIG_SENSORS_TSL2550 is not set
721# CONFIG_I2C_DEBUG_CORE is not set 766# CONFIG_I2C_DEBUG_CORE is not set
722# CONFIG_I2C_DEBUG_ALGO is not set 767# CONFIG_I2C_DEBUG_ALGO is not set
723# CONFIG_I2C_DEBUG_BUS is not set 768# CONFIG_I2C_DEBUG_BUS is not set
724# CONFIG_I2C_DEBUG_CHIP is not set 769# CONFIG_I2C_DEBUG_CHIP is not set
725# CONFIG_SPI is not set 770# CONFIG_SPI is not set
771
772#
773# PPS support
774#
775# CONFIG_PPS is not set
726CONFIG_ARCH_REQUIRE_GPIOLIB=y 776CONFIG_ARCH_REQUIRE_GPIOLIB=y
727CONFIG_GPIOLIB=y 777CONFIG_GPIOLIB=y
728# CONFIG_DEBUG_GPIO is not set 778# CONFIG_DEBUG_GPIO is not set
@@ -736,8 +786,8 @@ CONFIG_GPIOLIB=y
736# I2C GPIO expanders: 786# I2C GPIO expanders:
737# 787#
738# CONFIG_GPIO_MAX732X is not set 788# CONFIG_GPIO_MAX732X is not set
739# CONFIG_GPIO_PCA953X is not set 789CONFIG_GPIO_PCA953X=y
740CONFIG_GPIO_PCF857X=m 790CONFIG_GPIO_PCF857X=y
741 791
742# 792#
743# PCI GPIO expanders: 793# PCI GPIO expanders:
@@ -746,11 +796,14 @@ CONFIG_GPIO_PCF857X=m
746# 796#
747# SPI GPIO expanders: 797# SPI GPIO expanders:
748# 798#
799
800#
801# AC97 GPIO expanders:
802#
749# CONFIG_W1 is not set 803# CONFIG_W1 is not set
750# CONFIG_POWER_SUPPLY is not set 804# CONFIG_POWER_SUPPLY is not set
751# CONFIG_HWMON is not set 805# CONFIG_HWMON is not set
752# CONFIG_THERMAL is not set 806# CONFIG_THERMAL is not set
753# CONFIG_THERMAL_HWMON is not set
754CONFIG_WATCHDOG=y 807CONFIG_WATCHDOG=y
755# CONFIG_WATCHDOG_NOWAYOUT is not set 808# CONFIG_WATCHDOG_NOWAYOUT is not set
756 809
@@ -782,31 +835,56 @@ CONFIG_SSB_POSSIBLE=y
782# CONFIG_MFD_TC6393XB is not set 835# CONFIG_MFD_TC6393XB is not set
783# CONFIG_PMIC_DA903X is not set 836# CONFIG_PMIC_DA903X is not set
784# CONFIG_MFD_WM8400 is not set 837# CONFIG_MFD_WM8400 is not set
838# CONFIG_MFD_WM831X is not set
785# CONFIG_MFD_WM8350_I2C is not set 839# CONFIG_MFD_WM8350_I2C is not set
786# CONFIG_MFD_PCF50633 is not set 840# CONFIG_MFD_PCF50633 is not set
787 841# CONFIG_AB3100_CORE is not set
788# 842CONFIG_REGULATOR=y
789# Multimedia devices 843# CONFIG_REGULATOR_DEBUG is not set
790# 844# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
791 845# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
792# 846# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
793# Multimedia core support 847# CONFIG_REGULATOR_BQ24022 is not set
794# 848# CONFIG_REGULATOR_MAX1586 is not set
795# CONFIG_VIDEO_DEV is not set 849# CONFIG_REGULATOR_LP3971 is not set
796# CONFIG_DVB_CORE is not set 850# CONFIG_REGULATOR_TPS65023 is not set
797# CONFIG_VIDEO_MEDIA is not set 851CONFIG_REGULATOR_TPS6507X=y
798 852# CONFIG_MEDIA_SUPPORT is not set
799#
800# Multimedia drivers
801#
802# CONFIG_DAB is not set
803 853
804# 854#
805# Graphics support 855# Graphics support
806# 856#
807# CONFIG_VGASTATE is not set 857# CONFIG_VGASTATE is not set
808# CONFIG_VIDEO_OUTPUT_CONTROL is not set 858# CONFIG_VIDEO_OUTPUT_CONTROL is not set
809# CONFIG_FB is not set 859CONFIG_FB=y
860# CONFIG_FIRMWARE_EDID is not set
861# CONFIG_FB_DDC is not set
862# CONFIG_FB_BOOT_VESA_SUPPORT is not set
863CONFIG_FB_CFB_FILLRECT=y
864CONFIG_FB_CFB_COPYAREA=y
865CONFIG_FB_CFB_IMAGEBLIT=y
866# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
867# CONFIG_FB_SYS_FILLRECT is not set
868# CONFIG_FB_SYS_COPYAREA is not set
869# CONFIG_FB_SYS_IMAGEBLIT is not set
870# CONFIG_FB_FOREIGN_ENDIAN is not set
871# CONFIG_FB_SYS_FOPS is not set
872# CONFIG_FB_SVGALIB is not set
873# CONFIG_FB_MACMODES is not set
874# CONFIG_FB_BACKLIGHT is not set
875# CONFIG_FB_MODE_HELPERS is not set
876# CONFIG_FB_TILEBLITTING is not set
877
878#
879# Frame buffer hardware drivers
880#
881# CONFIG_FB_S1D13XXX is not set
882# CONFIG_FB_DAVINCI is not set
883# CONFIG_FB_VIRTUAL is not set
884CONFIG_FB_DA8XX=y
885# CONFIG_FB_METRONOME is not set
886# CONFIG_FB_MB862XX is not set
887# CONFIG_FB_BROADSHEET is not set
810# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 888# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
811 889
812# 890#
@@ -819,6 +897,16 @@ CONFIG_SSB_POSSIBLE=y
819# 897#
820# CONFIG_VGA_CONSOLE is not set 898# CONFIG_VGA_CONSOLE is not set
821CONFIG_DUMMY_CONSOLE=y 899CONFIG_DUMMY_CONSOLE=y
900CONFIG_FRAMEBUFFER_CONSOLE=y
901# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
902# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
903# CONFIG_FONTS is not set
904CONFIG_FONT_8x8=y
905CONFIG_FONT_8x16=y
906CONFIG_LOGO=y
907CONFIG_LOGO_LINUX_MONO=y
908CONFIG_LOGO_LINUX_VGA16=y
909CONFIG_LOGO_LINUX_CLUT224=y
822CONFIG_SOUND=m 910CONFIG_SOUND=m
823# CONFIG_SOUND_OSS_CORE is not set 911# CONFIG_SOUND_OSS_CORE is not set
824CONFIG_SND=m 912CONFIG_SND=m
@@ -834,6 +922,11 @@ CONFIG_SND_SUPPORT_OLD_API=y
834CONFIG_SND_VERBOSE_PROCFS=y 922CONFIG_SND_VERBOSE_PROCFS=y
835# CONFIG_SND_VERBOSE_PRINTK is not set 923# CONFIG_SND_VERBOSE_PRINTK is not set
836# CONFIG_SND_DEBUG is not set 924# CONFIG_SND_DEBUG is not set
925# CONFIG_SND_RAWMIDI_SEQ is not set
926# CONFIG_SND_OPL3_LIB_SEQ is not set
927# CONFIG_SND_OPL4_LIB_SEQ is not set
928# CONFIG_SND_SBAWE_SEQ is not set
929# CONFIG_SND_EMU10K1_SEQ is not set
837CONFIG_SND_DRIVERS=y 930CONFIG_SND_DRIVERS=y
838# CONFIG_SND_DUMMY is not set 931# CONFIG_SND_DUMMY is not set
839# CONFIG_SND_MTPAV is not set 932# CONFIG_SND_MTPAV is not set
@@ -842,6 +935,8 @@ CONFIG_SND_DRIVERS=y
842CONFIG_SND_ARM=y 935CONFIG_SND_ARM=y
843CONFIG_SND_SOC=m 936CONFIG_SND_SOC=m
844CONFIG_SND_DAVINCI_SOC=m 937CONFIG_SND_DAVINCI_SOC=m
938# CONFIG_SND_DA830_SOC_EVM is not set
939# CONFIG_SND_DA850_SOC_EVM is not set
845CONFIG_SND_SOC_I2C_AND_SPI=m 940CONFIG_SND_SOC_I2C_AND_SPI=m
846# CONFIG_SND_SOC_ALL_CODECS is not set 941# CONFIG_SND_SOC_ALL_CODECS is not set
847# CONFIG_SOUND_PRIME is not set 942# CONFIG_SOUND_PRIME is not set
@@ -849,14 +944,17 @@ CONFIG_SND_SOC_I2C_AND_SPI=m
849# CONFIG_USB_SUPPORT is not set 944# CONFIG_USB_SUPPORT is not set
850# CONFIG_MMC is not set 945# CONFIG_MMC is not set
851# CONFIG_MEMSTICK is not set 946# CONFIG_MEMSTICK is not set
852# CONFIG_ACCESSIBILITY is not set
853# CONFIG_NEW_LEDS is not set 947# CONFIG_NEW_LEDS is not set
948# CONFIG_ACCESSIBILITY is not set
854CONFIG_RTC_LIB=y 949CONFIG_RTC_LIB=y
855# CONFIG_RTC_CLASS is not set 950# CONFIG_RTC_CLASS is not set
856# CONFIG_DMADEVICES is not set 951# CONFIG_DMADEVICES is not set
857# CONFIG_AUXDISPLAY is not set 952# CONFIG_AUXDISPLAY is not set
858# CONFIG_REGULATOR is not set
859# CONFIG_UIO is not set 953# CONFIG_UIO is not set
954
955#
956# TI VLYNQ
957#
860# CONFIG_STAGING is not set 958# CONFIG_STAGING is not set
861 959
862# 960#
@@ -877,14 +975,17 @@ CONFIG_FS_MBCACHE=y
877# CONFIG_REISERFS_FS is not set 975# CONFIG_REISERFS_FS is not set
878# CONFIG_JFS_FS is not set 976# CONFIG_JFS_FS is not set
879# CONFIG_FS_POSIX_ACL is not set 977# CONFIG_FS_POSIX_ACL is not set
880CONFIG_FILE_LOCKING=y
881CONFIG_XFS_FS=m 978CONFIG_XFS_FS=m
882# CONFIG_XFS_QUOTA is not set 979# CONFIG_XFS_QUOTA is not set
883# CONFIG_XFS_POSIX_ACL is not set 980# CONFIG_XFS_POSIX_ACL is not set
884# CONFIG_XFS_RT is not set 981# CONFIG_XFS_RT is not set
885# CONFIG_XFS_DEBUG is not set 982# CONFIG_XFS_DEBUG is not set
983# CONFIG_GFS2_FS is not set
886# CONFIG_OCFS2_FS is not set 984# CONFIG_OCFS2_FS is not set
887# CONFIG_BTRFS_FS is not set 985# CONFIG_BTRFS_FS is not set
986# CONFIG_NILFS2_FS is not set
987CONFIG_FILE_LOCKING=y
988CONFIG_FSNOTIFY=y
888CONFIG_DNOTIFY=y 989CONFIG_DNOTIFY=y
889CONFIG_INOTIFY=y 990CONFIG_INOTIFY=y
890CONFIG_INOTIFY_USER=y 991CONFIG_INOTIFY_USER=y
@@ -943,7 +1044,6 @@ CONFIG_MINIX_FS=m
943# CONFIG_ROMFS_FS is not set 1044# CONFIG_ROMFS_FS is not set
944# CONFIG_SYSV_FS is not set 1045# CONFIG_SYSV_FS is not set
945# CONFIG_UFS_FS is not set 1046# CONFIG_UFS_FS is not set
946# CONFIG_NILFS2_FS is not set
947CONFIG_NETWORK_FILESYSTEMS=y 1047CONFIG_NETWORK_FILESYSTEMS=y
948CONFIG_NFS_FS=y 1048CONFIG_NFS_FS=y
949CONFIG_NFS_V3=y 1049CONFIG_NFS_V3=y
@@ -1039,6 +1139,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1039CONFIG_ENABLE_MUST_CHECK=y 1139CONFIG_ENABLE_MUST_CHECK=y
1040CONFIG_FRAME_WARN=1024 1140CONFIG_FRAME_WARN=1024
1041# CONFIG_MAGIC_SYSRQ is not set 1141# CONFIG_MAGIC_SYSRQ is not set
1142# CONFIG_STRIP_ASM_SYMS is not set
1042# CONFIG_UNUSED_SYMBOLS is not set 1143# CONFIG_UNUSED_SYMBOLS is not set
1043CONFIG_DEBUG_FS=y 1144CONFIG_DEBUG_FS=y
1044# CONFIG_HEADERS_CHECK is not set 1145# CONFIG_HEADERS_CHECK is not set
@@ -1056,6 +1157,7 @@ CONFIG_TIMER_STATS=y
1056# CONFIG_DEBUG_OBJECTS is not set 1157# CONFIG_DEBUG_OBJECTS is not set
1057# CONFIG_SLUB_DEBUG_ON is not set 1158# CONFIG_SLUB_DEBUG_ON is not set
1058# CONFIG_SLUB_STATS is not set 1159# CONFIG_SLUB_STATS is not set
1160# CONFIG_DEBUG_KMEMLEAK is not set
1059CONFIG_DEBUG_PREEMPT=y 1161CONFIG_DEBUG_PREEMPT=y
1060CONFIG_DEBUG_RT_MUTEXES=y 1162CONFIG_DEBUG_RT_MUTEXES=y
1061CONFIG_DEBUG_PI_LIST=y 1163CONFIG_DEBUG_PI_LIST=y
@@ -1076,29 +1178,29 @@ CONFIG_DEBUG_BUGVERBOSE=y
1076# CONFIG_DEBUG_LIST is not set 1178# CONFIG_DEBUG_LIST is not set
1077# CONFIG_DEBUG_SG is not set 1179# CONFIG_DEBUG_SG is not set
1078# CONFIG_DEBUG_NOTIFIERS is not set 1180# CONFIG_DEBUG_NOTIFIERS is not set
1181# CONFIG_DEBUG_CREDENTIALS is not set
1079# CONFIG_BOOT_PRINTK_DELAY is not set 1182# CONFIG_BOOT_PRINTK_DELAY is not set
1080# CONFIG_RCU_TORTURE_TEST is not set 1183# CONFIG_RCU_TORTURE_TEST is not set
1081# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1184# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1082# CONFIG_BACKTRACE_SELF_TEST is not set 1185# CONFIG_BACKTRACE_SELF_TEST is not set
1083# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1186# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1187# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1084# CONFIG_FAULT_INJECTION is not set 1188# CONFIG_FAULT_INJECTION is not set
1085# CONFIG_LATENCYTOP is not set 1189# CONFIG_LATENCYTOP is not set
1086# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1190# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1087# CONFIG_PAGE_POISONING is not set 1191# CONFIG_PAGE_POISONING is not set
1088CONFIG_HAVE_FUNCTION_TRACER=y 1192CONFIG_HAVE_FUNCTION_TRACER=y
1089CONFIG_TRACING_SUPPORT=y 1193CONFIG_TRACING_SUPPORT=y
1090 1194CONFIG_FTRACE=y
1091#
1092# Tracers
1093#
1094# CONFIG_FUNCTION_TRACER is not set 1195# CONFIG_FUNCTION_TRACER is not set
1095# CONFIG_IRQSOFF_TRACER is not set 1196# CONFIG_IRQSOFF_TRACER is not set
1096# CONFIG_PREEMPT_TRACER is not set 1197# CONFIG_PREEMPT_TRACER is not set
1097# CONFIG_SCHED_TRACER is not set 1198# CONFIG_SCHED_TRACER is not set
1098# CONFIG_CONTEXT_SWITCH_TRACER is not set 1199# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1099# CONFIG_EVENT_TRACER is not set
1100# CONFIG_BOOT_TRACER is not set 1200# CONFIG_BOOT_TRACER is not set
1101# CONFIG_TRACE_BRANCH_PROFILING is not set 1201CONFIG_BRANCH_PROFILE_NONE=y
1202# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1203# CONFIG_PROFILE_ALL_BRANCHES is not set
1102# CONFIG_STACK_TRACER is not set 1204# CONFIG_STACK_TRACER is not set
1103# CONFIG_KMEMTRACE is not set 1205# CONFIG_KMEMTRACE is not set
1104# CONFIG_WORKQUEUE_TRACER is not set 1206# CONFIG_WORKQUEUE_TRACER is not set
@@ -1125,7 +1227,6 @@ CONFIG_CRYPTO=y
1125# 1227#
1126# Crypto core or helper 1228# Crypto core or helper
1127# 1229#
1128# CONFIG_CRYPTO_FIPS is not set
1129# CONFIG_CRYPTO_MANAGER is not set 1230# CONFIG_CRYPTO_MANAGER is not set
1130# CONFIG_CRYPTO_MANAGER2 is not set 1231# CONFIG_CRYPTO_MANAGER2 is not set
1131# CONFIG_CRYPTO_GF128MUL is not set 1232# CONFIG_CRYPTO_GF128MUL is not set
@@ -1157,11 +1258,13 @@ CONFIG_CRYPTO=y
1157# 1258#
1158# CONFIG_CRYPTO_HMAC is not set 1259# CONFIG_CRYPTO_HMAC is not set
1159# CONFIG_CRYPTO_XCBC is not set 1260# CONFIG_CRYPTO_XCBC is not set
1261# CONFIG_CRYPTO_VMAC is not set
1160 1262
1161# 1263#
1162# Digest 1264# Digest
1163# 1265#
1164# CONFIG_CRYPTO_CRC32C is not set 1266# CONFIG_CRYPTO_CRC32C is not set
1267# CONFIG_CRYPTO_GHASH is not set
1165# CONFIG_CRYPTO_MD4 is not set 1268# CONFIG_CRYPTO_MD4 is not set
1166# CONFIG_CRYPTO_MD5 is not set 1269# CONFIG_CRYPTO_MD5 is not set
1167# CONFIG_CRYPTO_MICHAEL_MIC is not set 1270# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index ddffe39d9f87..bd656e8e6e4c 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31-rc3-davinci1 3# Linux kernel version: 2.6.32-rc4
4# Fri Jul 17 08:26:52 2009 4# Mon Oct 12 14:13:12 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12CONFIG_GENERIC_HARDIRQS=y 11CONFIG_GENERIC_HARDIRQS=y
13CONFIG_STACKTRACE_SUPPORT=y 12CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_HAVE_LATENCYTOP_SUPPORT=y 13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -46,11 +45,12 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y
46# 45#
47# RCU Subsystem 46# RCU Subsystem
48# 47#
49CONFIG_CLASSIC_RCU=y 48CONFIG_TREE_RCU=y
50# CONFIG_TREE_RCU is not set 49# CONFIG_TREE_PREEMPT_RCU is not set
51# CONFIG_PREEMPT_RCU is not set 50# CONFIG_RCU_TRACE is not set
51CONFIG_RCU_FANOUT=32
52# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set 53# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_PREEMPT_RCU_TRACE is not set
54CONFIG_IKCONFIG=y 54CONFIG_IKCONFIG=y
55CONFIG_IKCONFIG_PROC=y 55CONFIG_IKCONFIG_PROC=y
56CONFIG_LOG_BUF_SHIFT=14 56CONFIG_LOG_BUF_SHIFT=14
@@ -91,17 +91,15 @@ CONFIG_SHMEM=y
91CONFIG_AIO=y 91CONFIG_AIO=y
92 92
93# 93#
94# Performance Counters 94# Kernel Performance Events And Counters
95# 95#
96CONFIG_VM_EVENT_COUNTERS=y 96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y 97CONFIG_SLUB_DEBUG=y
98# CONFIG_STRIP_ASM_SYMS is not set
99CONFIG_COMPAT_BRK=y 98CONFIG_COMPAT_BRK=y
100# CONFIG_SLAB is not set 99# CONFIG_SLAB is not set
101CONFIG_SLUB=y 100CONFIG_SLUB=y
102# CONFIG_SLOB is not set 101# CONFIG_SLOB is not set
103# CONFIG_PROFILING is not set 102# CONFIG_PROFILING is not set
104# CONFIG_MARKERS is not set
105CONFIG_HAVE_OPROFILE=y 103CONFIG_HAVE_OPROFILE=y
106# CONFIG_KPROBES is not set 104# CONFIG_KPROBES is not set
107CONFIG_HAVE_KPROBES=y 105CONFIG_HAVE_KPROBES=y
@@ -145,6 +143,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
145# 143#
146# System Type 144# System Type
147# 145#
146CONFIG_MMU=y
148# CONFIG_ARCH_AAEC2000 is not set 147# CONFIG_ARCH_AAEC2000 is not set
149# CONFIG_ARCH_INTEGRATOR is not set 148# CONFIG_ARCH_INTEGRATOR is not set
150# CONFIG_ARCH_REALVIEW is not set 149# CONFIG_ARCH_REALVIEW is not set
@@ -159,6 +158,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
159# CONFIG_ARCH_STMP3XXX is not set 158# CONFIG_ARCH_STMP3XXX is not set
160# CONFIG_ARCH_NETX is not set 159# CONFIG_ARCH_NETX is not set
161# CONFIG_ARCH_H720X is not set 160# CONFIG_ARCH_H720X is not set
161# CONFIG_ARCH_NOMADIK is not set
162# CONFIG_ARCH_IOP13XX is not set 162# CONFIG_ARCH_IOP13XX is not set
163# CONFIG_ARCH_IOP32X is not set 163# CONFIG_ARCH_IOP32X is not set
164# CONFIG_ARCH_IOP33X is not set 164# CONFIG_ARCH_IOP33X is not set
@@ -181,11 +181,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
181# CONFIG_ARCH_SA1100 is not set 181# CONFIG_ARCH_SA1100 is not set
182# CONFIG_ARCH_S3C2410 is not set 182# CONFIG_ARCH_S3C2410 is not set
183# CONFIG_ARCH_S3C64XX is not set 183# CONFIG_ARCH_S3C64XX is not set
184# CONFIG_ARCH_S5PC1XX is not set
184# CONFIG_ARCH_SHARK is not set 185# CONFIG_ARCH_SHARK is not set
185# CONFIG_ARCH_LH7A40X is not set 186# CONFIG_ARCH_LH7A40X is not set
186# CONFIG_ARCH_U300 is not set 187# CONFIG_ARCH_U300 is not set
187CONFIG_ARCH_DAVINCI=y 188CONFIG_ARCH_DAVINCI=y
188# CONFIG_ARCH_OMAP is not set 189# CONFIG_ARCH_OMAP is not set
190# CONFIG_ARCH_BCMRING is not set
189CONFIG_AINTC=y 191CONFIG_AINTC=y
190CONFIG_ARCH_DAVINCI_DMx=y 192CONFIG_ARCH_DAVINCI_DMx=y
191 193
@@ -208,6 +210,7 @@ CONFIG_ARCH_DAVINCI_DM365=y
208# 210#
209CONFIG_MACH_DAVINCI_EVM=y 211CONFIG_MACH_DAVINCI_EVM=y
210CONFIG_MACH_SFFSDR=y 212CONFIG_MACH_SFFSDR=y
213CONFIG_MACH_NEUROS_OSD2=y
211CONFIG_MACH_DAVINCI_DM355_EVM=y 214CONFIG_MACH_DAVINCI_DM355_EVM=y
212CONFIG_MACH_DM355_LEOPARD=y 215CONFIG_MACH_DM355_LEOPARD=y
213CONFIG_MACH_DAVINCI_DM6467_EVM=y 216CONFIG_MACH_DAVINCI_DM6467_EVM=y
@@ -224,7 +227,7 @@ CONFIG_CPU_32=y
224CONFIG_CPU_ARM926T=y 227CONFIG_CPU_ARM926T=y
225CONFIG_CPU_32v5=y 228CONFIG_CPU_32v5=y
226CONFIG_CPU_ABRT_EV5TJ=y 229CONFIG_CPU_ABRT_EV5TJ=y
227CONFIG_CPU_PABRT_NOIFAR=y 230CONFIG_CPU_PABRT_LEGACY=y
228CONFIG_CPU_CACHE_VIVT=y 231CONFIG_CPU_CACHE_VIVT=y
229CONFIG_CPU_COPY_V4WB=y 232CONFIG_CPU_COPY_V4WB=y
230CONFIG_CPU_TLB_V4WBI=y 233CONFIG_CPU_TLB_V4WBI=y
@@ -239,6 +242,7 @@ CONFIG_ARM_THUMB=y
239# CONFIG_CPU_DCACHE_DISABLE is not set 242# CONFIG_CPU_DCACHE_DISABLE is not set
240# CONFIG_CPU_DCACHE_WRITETHROUGH is not set 243# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
241# CONFIG_CPU_CACHE_ROUND_ROBIN is not set 244# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
245CONFIG_ARM_L1_CACHE_SHIFT=5
242CONFIG_COMMON_CLKDEV=y 246CONFIG_COMMON_CLKDEV=y
243 247
244# 248#
@@ -259,6 +263,8 @@ CONFIG_VMSPLIT_3G=y
259# CONFIG_VMSPLIT_2G is not set 263# CONFIG_VMSPLIT_2G is not set
260# CONFIG_VMSPLIT_1G is not set 264# CONFIG_VMSPLIT_1G is not set
261CONFIG_PAGE_OFFSET=0xC0000000 265CONFIG_PAGE_OFFSET=0xC0000000
266# CONFIG_PREEMPT_NONE is not set
267# CONFIG_PREEMPT_VOLUNTARY is not set
262CONFIG_PREEMPT=y 268CONFIG_PREEMPT=y
263CONFIG_HZ=100 269CONFIG_HZ=100
264CONFIG_AEABI=y 270CONFIG_AEABI=y
@@ -280,6 +286,7 @@ CONFIG_BOUNCE=y
280CONFIG_VIRT_TO_BUS=y 286CONFIG_VIRT_TO_BUS=y
281CONFIG_HAVE_MLOCK=y 287CONFIG_HAVE_MLOCK=y
282CONFIG_HAVE_MLOCKED_PAGE_BIT=y 288CONFIG_HAVE_MLOCKED_PAGE_BIT=y
289# CONFIG_KSM is not set
283CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 290CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
284CONFIG_LEDS=y 291CONFIG_LEDS=y
285# CONFIG_LEDS_CPU is not set 292# CONFIG_LEDS_CPU is not set
@@ -412,6 +419,7 @@ CONFIG_NETFILTER_ADVANCED=y
412# CONFIG_IP6_NF_IPTABLES is not set 419# CONFIG_IP6_NF_IPTABLES is not set
413# CONFIG_IP_DCCP is not set 420# CONFIG_IP_DCCP is not set
414# CONFIG_IP_SCTP is not set 421# CONFIG_IP_SCTP is not set
422# CONFIG_RDS is not set
415# CONFIG_TIPC is not set 423# CONFIG_TIPC is not set
416# CONFIG_ATM is not set 424# CONFIG_ATM is not set
417# CONFIG_BRIDGE is not set 425# CONFIG_BRIDGE is not set
@@ -452,6 +460,7 @@ CONFIG_NETFILTER_ADVANCED=y
452# Generic Driver Options 460# Generic Driver Options
453# 461#
454CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 462CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
463# CONFIG_DEVTMPFS is not set
455CONFIG_STANDALONE=y 464CONFIG_STANDALONE=y
456CONFIG_PREVENT_FIRMWARE_BUILD=y 465CONFIG_PREVENT_FIRMWARE_BUILD=y
457# CONFIG_FW_LOADER is not set 466# CONFIG_FW_LOADER is not set
@@ -461,9 +470,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
461# CONFIG_CONNECTOR is not set 470# CONFIG_CONNECTOR is not set
462CONFIG_MTD=m 471CONFIG_MTD=m
463# CONFIG_MTD_DEBUG is not set 472# CONFIG_MTD_DEBUG is not set
473# CONFIG_MTD_TESTS is not set
464# CONFIG_MTD_CONCAT is not set 474# CONFIG_MTD_CONCAT is not set
465CONFIG_MTD_PARTITIONS=y 475CONFIG_MTD_PARTITIONS=y
466# CONFIG_MTD_TESTS is not set
467# CONFIG_MTD_REDBOOT_PARTS is not set 476# CONFIG_MTD_REDBOOT_PARTS is not set
468# CONFIG_MTD_AFS_PARTS is not set 477# CONFIG_MTD_AFS_PARTS is not set
469# CONFIG_MTD_AR7_PARTS is not set 478# CONFIG_MTD_AR7_PARTS is not set
@@ -499,7 +508,7 @@ CONFIG_MTD_CFI_I1=y
499CONFIG_MTD_CFI_I2=y 508CONFIG_MTD_CFI_I2=y
500# CONFIG_MTD_CFI_I4 is not set 509# CONFIG_MTD_CFI_I4 is not set
501# CONFIG_MTD_CFI_I8 is not set 510# CONFIG_MTD_CFI_I8 is not set
502# CONFIG_MTD_CFI_INTELEXT is not set 511CONFIG_MTD_CFI_INTELEXT=m
503CONFIG_MTD_CFI_AMDSTD=m 512CONFIG_MTD_CFI_AMDSTD=m
504# CONFIG_MTD_CFI_STAA is not set 513# CONFIG_MTD_CFI_STAA is not set
505CONFIG_MTD_CFI_UTIL=m 514CONFIG_MTD_CFI_UTIL=m
@@ -694,12 +703,10 @@ CONFIG_DM9000_DEBUGLEVEL=4
694# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 703# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
695# CONFIG_B44 is not set 704# CONFIG_B44 is not set
696# CONFIG_KS8842 is not set 705# CONFIG_KS8842 is not set
706# CONFIG_KS8851_MLL is not set
697# CONFIG_NETDEV_1000 is not set 707# CONFIG_NETDEV_1000 is not set
698# CONFIG_NETDEV_10000 is not set 708# CONFIG_NETDEV_10000 is not set
699 709CONFIG_WLAN=y
700#
701# Wireless LAN
702#
703# CONFIG_WLAN_PRE80211 is not set 710# CONFIG_WLAN_PRE80211 is not set
704# CONFIG_WLAN_80211 is not set 711# CONFIG_WLAN_80211 is not set
705 712
@@ -734,6 +741,7 @@ CONFIG_NETPOLL=y
734CONFIG_NETPOLL_TRAP=y 741CONFIG_NETPOLL_TRAP=y
735CONFIG_NET_POLL_CONTROLLER=y 742CONFIG_NET_POLL_CONTROLLER=y
736# CONFIG_ISDN is not set 743# CONFIG_ISDN is not set
744# CONFIG_PHONE is not set
737 745
738# 746#
739# Input device support 747# Input device support
@@ -745,10 +753,7 @@ CONFIG_INPUT=y
745# 753#
746# Userland interfaces 754# Userland interfaces
747# 755#
748CONFIG_INPUT_MOUSEDEV=m 756# CONFIG_INPUT_MOUSEDEV is not set
749CONFIG_INPUT_MOUSEDEV_PSAUX=y
750CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
751CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
752# CONFIG_INPUT_JOYDEV is not set 757# CONFIG_INPUT_JOYDEV is not set
753CONFIG_INPUT_EVDEV=m 758CONFIG_INPUT_EVDEV=m
754CONFIG_INPUT_EVBUG=m 759CONFIG_INPUT_EVBUG=m
@@ -757,12 +762,16 @@ CONFIG_INPUT_EVBUG=m
757# Input Device Drivers 762# Input Device Drivers
758# 763#
759CONFIG_INPUT_KEYBOARD=y 764CONFIG_INPUT_KEYBOARD=y
765# CONFIG_KEYBOARD_ADP5588 is not set
760CONFIG_KEYBOARD_ATKBD=m 766CONFIG_KEYBOARD_ATKBD=m
767# CONFIG_QT2160 is not set
761# CONFIG_KEYBOARD_LKKBD is not set 768# CONFIG_KEYBOARD_LKKBD is not set
762CONFIG_KEYBOARD_GPIO=y 769CONFIG_KEYBOARD_GPIO=y
763# CONFIG_KEYBOARD_MATRIX is not set 770# CONFIG_KEYBOARD_MATRIX is not set
764# CONFIG_KEYBOARD_LM8323 is not set 771# CONFIG_KEYBOARD_LM8323 is not set
772# CONFIG_KEYBOARD_MAX7359 is not set
765# CONFIG_KEYBOARD_NEWTON is not set 773# CONFIG_KEYBOARD_NEWTON is not set
774# CONFIG_KEYBOARD_OPENCORES is not set
766# CONFIG_KEYBOARD_STOWAWAY is not set 775# CONFIG_KEYBOARD_STOWAWAY is not set
767# CONFIG_KEYBOARD_SUNKBD is not set 776# CONFIG_KEYBOARD_SUNKBD is not set
768CONFIG_KEYBOARD_XTKBD=m 777CONFIG_KEYBOARD_XTKBD=m
@@ -777,6 +786,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
777# CONFIG_TOUCHSCREEN_GUNZE is not set 786# CONFIG_TOUCHSCREEN_GUNZE is not set
778# CONFIG_TOUCHSCREEN_ELO is not set 787# CONFIG_TOUCHSCREEN_ELO is not set
779# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set 788# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
789# CONFIG_TOUCHSCREEN_MCS5000 is not set
780# CONFIG_TOUCHSCREEN_MTOUCH is not set 790# CONFIG_TOUCHSCREEN_MTOUCH is not set
781# CONFIG_TOUCHSCREEN_INEXIO is not set 791# CONFIG_TOUCHSCREEN_INEXIO is not set
782# CONFIG_TOUCHSCREEN_MK712 is not set 792# CONFIG_TOUCHSCREEN_MK712 is not set
@@ -787,7 +797,17 @@ CONFIG_INPUT_TOUCHSCREEN=y
787# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 797# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
788# CONFIG_TOUCHSCREEN_TSC2007 is not set 798# CONFIG_TOUCHSCREEN_TSC2007 is not set
789# CONFIG_TOUCHSCREEN_W90X900 is not set 799# CONFIG_TOUCHSCREEN_W90X900 is not set
790# CONFIG_INPUT_MISC is not set 800CONFIG_INPUT_MISC=y
801# CONFIG_INPUT_ATI_REMOTE is not set
802# CONFIG_INPUT_ATI_REMOTE2 is not set
803# CONFIG_INPUT_KEYSPAN_REMOTE is not set
804# CONFIG_INPUT_POWERMATE is not set
805# CONFIG_INPUT_YEALINK is not set
806# CONFIG_INPUT_CM109 is not set
807# CONFIG_INPUT_UINPUT is not set
808# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
809CONFIG_INPUT_DM355EVM=m
810CONFIG_INPUT_DM365EVM=m
791 811
792# 812#
793# Hardware I/O ports 813# Hardware I/O ports
@@ -828,13 +848,13 @@ CONFIG_UNIX98_PTYS=y
828CONFIG_LEGACY_PTYS=y 848CONFIG_LEGACY_PTYS=y
829CONFIG_LEGACY_PTY_COUNT=256 849CONFIG_LEGACY_PTY_COUNT=256
830# CONFIG_IPMI_HANDLER is not set 850# CONFIG_IPMI_HANDLER is not set
831CONFIG_HW_RANDOM=m 851# CONFIG_HW_RANDOM is not set
832# CONFIG_HW_RANDOM_TIMERIOMEM is not set
833# CONFIG_R3964 is not set 852# CONFIG_R3964 is not set
834# CONFIG_RAW_DRIVER is not set 853# CONFIG_RAW_DRIVER is not set
835# CONFIG_TCG_TPM is not set 854# CONFIG_TCG_TPM is not set
836CONFIG_I2C=y 855CONFIG_I2C=y
837CONFIG_I2C_BOARDINFO=y 856CONFIG_I2C_BOARDINFO=y
857CONFIG_I2C_COMPAT=y
838CONFIG_I2C_CHARDEV=y 858CONFIG_I2C_CHARDEV=y
839CONFIG_I2C_HELPER_AUTO=y 859CONFIG_I2C_HELPER_AUTO=y
840 860
@@ -868,13 +888,17 @@ CONFIG_I2C_DAVINCI=y
868# Miscellaneous I2C Chip support 888# Miscellaneous I2C Chip support
869# 889#
870# CONFIG_DS1682 is not set 890# CONFIG_DS1682 is not set
871# CONFIG_SENSORS_PCA9539 is not set
872# CONFIG_SENSORS_TSL2550 is not set 891# CONFIG_SENSORS_TSL2550 is not set
873# CONFIG_I2C_DEBUG_CORE is not set 892# CONFIG_I2C_DEBUG_CORE is not set
874# CONFIG_I2C_DEBUG_ALGO is not set 893# CONFIG_I2C_DEBUG_ALGO is not set
875# CONFIG_I2C_DEBUG_BUS is not set 894# CONFIG_I2C_DEBUG_BUS is not set
876# CONFIG_I2C_DEBUG_CHIP is not set 895# CONFIG_I2C_DEBUG_CHIP is not set
877# CONFIG_SPI is not set 896# CONFIG_SPI is not set
897
898#
899# PPS support
900#
901# CONFIG_PPS is not set
878CONFIG_ARCH_REQUIRE_GPIOLIB=y 902CONFIG_ARCH_REQUIRE_GPIOLIB=y
879CONFIG_GPIOLIB=y 903CONFIG_GPIOLIB=y
880# CONFIG_DEBUG_GPIO is not set 904# CONFIG_DEBUG_GPIO is not set
@@ -889,7 +913,7 @@ CONFIG_GPIOLIB=y
889# 913#
890# CONFIG_GPIO_MAX732X is not set 914# CONFIG_GPIO_MAX732X is not set
891# CONFIG_GPIO_PCA953X is not set 915# CONFIG_GPIO_PCA953X is not set
892CONFIG_GPIO_PCF857X=m 916CONFIG_GPIO_PCF857X=y
893 917
894# 918#
895# PCI GPIO expanders: 919# PCI GPIO expanders:
@@ -898,10 +922,19 @@ CONFIG_GPIO_PCF857X=m
898# 922#
899# SPI GPIO expanders: 923# SPI GPIO expanders:
900# 924#
925
926#
927# AC97 GPIO expanders:
928#
901# CONFIG_W1 is not set 929# CONFIG_W1 is not set
902# CONFIG_POWER_SUPPLY is not set 930# CONFIG_POWER_SUPPLY is not set
903CONFIG_HWMON=y 931CONFIG_HWMON=y
904# CONFIG_HWMON_VID is not set 932# CONFIG_HWMON_VID is not set
933# CONFIG_HWMON_DEBUG_CHIP is not set
934
935#
936# Native drivers
937#
905# CONFIG_SENSORS_AD7414 is not set 938# CONFIG_SENSORS_AD7414 is not set
906# CONFIG_SENSORS_AD7418 is not set 939# CONFIG_SENSORS_AD7418 is not set
907# CONFIG_SENSORS_ADM1021 is not set 940# CONFIG_SENSORS_ADM1021 is not set
@@ -950,6 +983,7 @@ CONFIG_HWMON=y
950# CONFIG_SENSORS_ADS7828 is not set 983# CONFIG_SENSORS_ADS7828 is not set
951# CONFIG_SENSORS_THMC50 is not set 984# CONFIG_SENSORS_THMC50 is not set
952# CONFIG_SENSORS_TMP401 is not set 985# CONFIG_SENSORS_TMP401 is not set
986# CONFIG_SENSORS_TMP421 is not set
953# CONFIG_SENSORS_VT1211 is not set 987# CONFIG_SENSORS_VT1211 is not set
954# CONFIG_SENSORS_W83781D is not set 988# CONFIG_SENSORS_W83781D is not set
955# CONFIG_SENSORS_W83791D is not set 989# CONFIG_SENSORS_W83791D is not set
@@ -959,9 +993,7 @@ CONFIG_HWMON=y
959# CONFIG_SENSORS_W83L786NG is not set 993# CONFIG_SENSORS_W83L786NG is not set
960# CONFIG_SENSORS_W83627HF is not set 994# CONFIG_SENSORS_W83627HF is not set
961# CONFIG_SENSORS_W83627EHF is not set 995# CONFIG_SENSORS_W83627EHF is not set
962# CONFIG_HWMON_DEBUG_CHIP is not set
963# CONFIG_THERMAL is not set 996# CONFIG_THERMAL is not set
964# CONFIG_THERMAL_HWMON is not set
965CONFIG_WATCHDOG=y 997CONFIG_WATCHDOG=y
966# CONFIG_WATCHDOG_NOWAYOUT is not set 998# CONFIG_WATCHDOG_NOWAYOUT is not set
967 999
@@ -988,7 +1020,7 @@ CONFIG_SSB_POSSIBLE=y
988# CONFIG_MFD_CORE is not set 1020# CONFIG_MFD_CORE is not set
989# CONFIG_MFD_SM501 is not set 1021# CONFIG_MFD_SM501 is not set
990# CONFIG_MFD_ASIC3 is not set 1022# CONFIG_MFD_ASIC3 is not set
991# CONFIG_MFD_DM355EVM_MSP is not set 1023CONFIG_MFD_DM355EVM_MSP=y
992# CONFIG_HTC_EGPIO is not set 1024# CONFIG_HTC_EGPIO is not set
993# CONFIG_HTC_PASIC3 is not set 1025# CONFIG_HTC_PASIC3 is not set
994# CONFIG_TPS65010 is not set 1026# CONFIG_TPS65010 is not set
@@ -999,9 +1031,11 @@ CONFIG_SSB_POSSIBLE=y
999# CONFIG_MFD_TC6393XB is not set 1031# CONFIG_MFD_TC6393XB is not set
1000# CONFIG_PMIC_DA903X is not set 1032# CONFIG_PMIC_DA903X is not set
1001# CONFIG_MFD_WM8400 is not set 1033# CONFIG_MFD_WM8400 is not set
1034# CONFIG_MFD_WM831X is not set
1002# CONFIG_MFD_WM8350_I2C is not set 1035# CONFIG_MFD_WM8350_I2C is not set
1003# CONFIG_MFD_PCF50633 is not set 1036# CONFIG_MFD_PCF50633 is not set
1004# CONFIG_AB3100_CORE is not set 1037# CONFIG_AB3100_CORE is not set
1038# CONFIG_REGULATOR is not set
1005# CONFIG_MEDIA_SUPPORT is not set 1039# CONFIG_MEDIA_SUPPORT is not set
1006 1040
1007# 1041#
@@ -1013,9 +1047,9 @@ CONFIG_FB=y
1013CONFIG_FIRMWARE_EDID=y 1047CONFIG_FIRMWARE_EDID=y
1014# CONFIG_FB_DDC is not set 1048# CONFIG_FB_DDC is not set
1015# CONFIG_FB_BOOT_VESA_SUPPORT is not set 1049# CONFIG_FB_BOOT_VESA_SUPPORT is not set
1016# CONFIG_FB_CFB_FILLRECT is not set 1050CONFIG_FB_CFB_FILLRECT=y
1017# CONFIG_FB_CFB_COPYAREA is not set 1051CONFIG_FB_CFB_COPYAREA=y
1018# CONFIG_FB_CFB_IMAGEBLIT is not set 1052CONFIG_FB_CFB_IMAGEBLIT=y
1019# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set 1053# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1020# CONFIG_FB_SYS_FILLRECT is not set 1054# CONFIG_FB_SYS_FILLRECT is not set
1021# CONFIG_FB_SYS_COPYAREA is not set 1055# CONFIG_FB_SYS_COPYAREA is not set
@@ -1032,6 +1066,7 @@ CONFIG_FIRMWARE_EDID=y
1032# Frame buffer hardware drivers 1066# Frame buffer hardware drivers
1033# 1067#
1034# CONFIG_FB_S1D13XXX is not set 1068# CONFIG_FB_S1D13XXX is not set
1069CONFIG_FB_DAVINCI=y
1035# CONFIG_FB_VIRTUAL is not set 1070# CONFIG_FB_VIRTUAL is not set
1036# CONFIG_FB_METRONOME is not set 1071# CONFIG_FB_METRONOME is not set
1037# CONFIG_FB_MB862XX is not set 1072# CONFIG_FB_MB862XX is not set
@@ -1101,7 +1136,6 @@ CONFIG_SND_SOC_TLV320AIC3X=m
1101# CONFIG_SOUND_PRIME is not set 1136# CONFIG_SOUND_PRIME is not set
1102CONFIG_HID_SUPPORT=y 1137CONFIG_HID_SUPPORT=y
1103CONFIG_HID=m 1138CONFIG_HID=m
1104# CONFIG_HID_DEBUG is not set
1105# CONFIG_HIDRAW is not set 1139# CONFIG_HIDRAW is not set
1106 1140
1107# 1141#
@@ -1130,6 +1164,7 @@ CONFIG_HID_CYPRESS=m
1130CONFIG_HID_EZKEY=m 1164CONFIG_HID_EZKEY=m
1131# CONFIG_HID_KYE is not set 1165# CONFIG_HID_KYE is not set
1132CONFIG_HID_GYRATION=m 1166CONFIG_HID_GYRATION=m
1167# CONFIG_HID_TWINHAN is not set
1133# CONFIG_HID_KENSINGTON is not set 1168# CONFIG_HID_KENSINGTON is not set
1134CONFIG_HID_LOGITECH=m 1169CONFIG_HID_LOGITECH=m
1135# CONFIG_LOGITECH_FF is not set 1170# CONFIG_LOGITECH_FF is not set
@@ -1176,6 +1211,7 @@ CONFIG_USB_MON=m
1176# CONFIG_USB_OXU210HP_HCD is not set 1211# CONFIG_USB_OXU210HP_HCD is not set
1177# CONFIG_USB_ISP116X_HCD is not set 1212# CONFIG_USB_ISP116X_HCD is not set
1178# CONFIG_USB_ISP1760_HCD is not set 1213# CONFIG_USB_ISP1760_HCD is not set
1214# CONFIG_USB_ISP1362_HCD is not set
1179# CONFIG_USB_SL811_HCD is not set 1215# CONFIG_USB_SL811_HCD is not set
1180# CONFIG_USB_R8A66597_HCD is not set 1216# CONFIG_USB_R8A66597_HCD is not set
1181# CONFIG_USB_HWA_HCD is not set 1217# CONFIG_USB_HWA_HCD is not set
@@ -1269,6 +1305,7 @@ CONFIG_USB_GADGET_SELECTED=y
1269# CONFIG_USB_GADGET_LH7A40X is not set 1305# CONFIG_USB_GADGET_LH7A40X is not set
1270# CONFIG_USB_GADGET_OMAP is not set 1306# CONFIG_USB_GADGET_OMAP is not set
1271# CONFIG_USB_GADGET_PXA25X is not set 1307# CONFIG_USB_GADGET_PXA25X is not set
1308# CONFIG_USB_GADGET_R8A66597 is not set
1272# CONFIG_USB_GADGET_PXA27X is not set 1309# CONFIG_USB_GADGET_PXA27X is not set
1273# CONFIG_USB_GADGET_S3C_HSOTG is not set 1310# CONFIG_USB_GADGET_S3C_HSOTG is not set
1274# CONFIG_USB_GADGET_IMX is not set 1311# CONFIG_USB_GADGET_IMX is not set
@@ -1286,6 +1323,7 @@ CONFIG_USB_ZERO=m
1286# CONFIG_USB_AUDIO is not set 1323# CONFIG_USB_AUDIO is not set
1287CONFIG_USB_ETH=m 1324CONFIG_USB_ETH=m
1288CONFIG_USB_ETH_RNDIS=y 1325CONFIG_USB_ETH_RNDIS=y
1326# CONFIG_USB_ETH_EEM is not set
1289CONFIG_USB_GADGETFS=m 1327CONFIG_USB_GADGETFS=m
1290CONFIG_USB_FILE_STORAGE=m 1328CONFIG_USB_FILE_STORAGE=m
1291# CONFIG_USB_FILE_STORAGE_TEST is not set 1329# CONFIG_USB_FILE_STORAGE_TEST is not set
@@ -1316,8 +1354,10 @@ CONFIG_MMC_BLOCK=m
1316# MMC/SD/SDIO Host Controller Drivers 1354# MMC/SD/SDIO Host Controller Drivers
1317# 1355#
1318# CONFIG_MMC_SDHCI is not set 1356# CONFIG_MMC_SDHCI is not set
1357# CONFIG_MMC_AT91 is not set
1358# CONFIG_MMC_ATMELMCI is not set
1359CONFIG_MMC_DAVINCI=m
1319# CONFIG_MEMSTICK is not set 1360# CONFIG_MEMSTICK is not set
1320# CONFIG_ACCESSIBILITY is not set
1321CONFIG_NEW_LEDS=y 1361CONFIG_NEW_LEDS=y
1322CONFIG_LEDS_CLASS=m 1362CONFIG_LEDS_CLASS=m
1323 1363
@@ -1345,6 +1385,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m
1345# 1385#
1346# iptables trigger is under Netfilter config (LED target) 1386# iptables trigger is under Netfilter config (LED target)
1347# 1387#
1388# CONFIG_ACCESSIBILITY is not set
1348CONFIG_RTC_LIB=y 1389CONFIG_RTC_LIB=y
1349CONFIG_RTC_CLASS=m 1390CONFIG_RTC_CLASS=m
1350 1391
@@ -1370,6 +1411,7 @@ CONFIG_RTC_INTF_DEV=y
1370# CONFIG_RTC_DRV_PCF8563 is not set 1411# CONFIG_RTC_DRV_PCF8563 is not set
1371# CONFIG_RTC_DRV_PCF8583 is not set 1412# CONFIG_RTC_DRV_PCF8583 is not set
1372# CONFIG_RTC_DRV_M41T80 is not set 1413# CONFIG_RTC_DRV_M41T80 is not set
1414# CONFIG_RTC_DRV_DM355EVM is not set
1373# CONFIG_RTC_DRV_S35390A is not set 1415# CONFIG_RTC_DRV_S35390A is not set
1374# CONFIG_RTC_DRV_FM3130 is not set 1416# CONFIG_RTC_DRV_FM3130 is not set
1375# CONFIG_RTC_DRV_RX8581 is not set 1417# CONFIG_RTC_DRV_RX8581 is not set
@@ -1399,8 +1441,11 @@ CONFIG_RTC_INTF_DEV=y
1399# 1441#
1400# CONFIG_DMADEVICES is not set 1442# CONFIG_DMADEVICES is not set
1401# CONFIG_AUXDISPLAY is not set 1443# CONFIG_AUXDISPLAY is not set
1402# CONFIG_REGULATOR is not set
1403# CONFIG_UIO is not set 1444# CONFIG_UIO is not set
1445
1446#
1447# TI VLYNQ
1448#
1404# CONFIG_STAGING is not set 1449# CONFIG_STAGING is not set
1405 1450
1406# 1451#
@@ -1429,6 +1474,7 @@ CONFIG_XFS_FS=m
1429# CONFIG_GFS2_FS is not set 1474# CONFIG_GFS2_FS is not set
1430# CONFIG_OCFS2_FS is not set 1475# CONFIG_OCFS2_FS is not set
1431# CONFIG_BTRFS_FS is not set 1476# CONFIG_BTRFS_FS is not set
1477# CONFIG_NILFS2_FS is not set
1432CONFIG_FILE_LOCKING=y 1478CONFIG_FILE_LOCKING=y
1433CONFIG_FSNOTIFY=y 1479CONFIG_FSNOTIFY=y
1434CONFIG_DNOTIFY=y 1480CONFIG_DNOTIFY=y
@@ -1500,7 +1546,6 @@ CONFIG_MINIX_FS=m
1500# CONFIG_ROMFS_FS is not set 1546# CONFIG_ROMFS_FS is not set
1501# CONFIG_SYSV_FS is not set 1547# CONFIG_SYSV_FS is not set
1502# CONFIG_UFS_FS is not set 1548# CONFIG_UFS_FS is not set
1503# CONFIG_NILFS2_FS is not set
1504CONFIG_NETWORK_FILESYSTEMS=y 1549CONFIG_NETWORK_FILESYSTEMS=y
1505CONFIG_NFS_FS=y 1550CONFIG_NFS_FS=y
1506CONFIG_NFS_V3=y 1551CONFIG_NFS_V3=y
@@ -1596,6 +1641,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1596CONFIG_ENABLE_MUST_CHECK=y 1641CONFIG_ENABLE_MUST_CHECK=y
1597CONFIG_FRAME_WARN=1024 1642CONFIG_FRAME_WARN=1024
1598# CONFIG_MAGIC_SYSRQ is not set 1643# CONFIG_MAGIC_SYSRQ is not set
1644# CONFIG_STRIP_ASM_SYMS is not set
1599# CONFIG_UNUSED_SYMBOLS is not set 1645# CONFIG_UNUSED_SYMBOLS is not set
1600CONFIG_DEBUG_FS=y 1646CONFIG_DEBUG_FS=y
1601# CONFIG_HEADERS_CHECK is not set 1647# CONFIG_HEADERS_CHECK is not set
@@ -1634,11 +1680,14 @@ CONFIG_DEBUG_BUGVERBOSE=y
1634# CONFIG_DEBUG_LIST is not set 1680# CONFIG_DEBUG_LIST is not set
1635# CONFIG_DEBUG_SG is not set 1681# CONFIG_DEBUG_SG is not set
1636# CONFIG_DEBUG_NOTIFIERS is not set 1682# CONFIG_DEBUG_NOTIFIERS is not set
1683# CONFIG_DEBUG_CREDENTIALS is not set
1684CONFIG_FRAME_POINTER=y
1637# CONFIG_BOOT_PRINTK_DELAY is not set 1685# CONFIG_BOOT_PRINTK_DELAY is not set
1638# CONFIG_RCU_TORTURE_TEST is not set 1686# CONFIG_RCU_TORTURE_TEST is not set
1639# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1687# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1640# CONFIG_BACKTRACE_SELF_TEST is not set 1688# CONFIG_BACKTRACE_SELF_TEST is not set
1641# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1689# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1690# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1642# CONFIG_FAULT_INJECTION is not set 1691# CONFIG_FAULT_INJECTION is not set
1643# CONFIG_LATENCYTOP is not set 1692# CONFIG_LATENCYTOP is not set
1644# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1693# CONFIG_SYSCTL_SYSCALL_CHECK is not set
@@ -1663,7 +1712,7 @@ CONFIG_BRANCH_PROFILE_NONE=y
1663# CONFIG_SAMPLES is not set 1712# CONFIG_SAMPLES is not set
1664CONFIG_HAVE_ARCH_KGDB=y 1713CONFIG_HAVE_ARCH_KGDB=y
1665# CONFIG_KGDB is not set 1714# CONFIG_KGDB is not set
1666CONFIG_ARM_UNWIND=y 1715# CONFIG_ARM_UNWIND is not set
1667CONFIG_DEBUG_USER=y 1716CONFIG_DEBUG_USER=y
1668CONFIG_DEBUG_ERRORS=y 1717CONFIG_DEBUG_ERRORS=y
1669# CONFIG_DEBUG_STACK_USAGE is not set 1718# CONFIG_DEBUG_STACK_USAGE is not set
@@ -1681,7 +1730,6 @@ CONFIG_CRYPTO=y
1681# 1730#
1682# Crypto core or helper 1731# Crypto core or helper
1683# 1732#
1684# CONFIG_CRYPTO_FIPS is not set
1685# CONFIG_CRYPTO_MANAGER is not set 1733# CONFIG_CRYPTO_MANAGER is not set
1686# CONFIG_CRYPTO_MANAGER2 is not set 1734# CONFIG_CRYPTO_MANAGER2 is not set
1687# CONFIG_CRYPTO_GF128MUL is not set 1735# CONFIG_CRYPTO_GF128MUL is not set
@@ -1713,11 +1761,13 @@ CONFIG_CRYPTO=y
1713# 1761#
1714# CONFIG_CRYPTO_HMAC is not set 1762# CONFIG_CRYPTO_HMAC is not set
1715# CONFIG_CRYPTO_XCBC is not set 1763# CONFIG_CRYPTO_XCBC is not set
1764# CONFIG_CRYPTO_VMAC is not set
1716 1765
1717# 1766#
1718# Digest 1767# Digest
1719# 1768#
1720# CONFIG_CRYPTO_CRC32C is not set 1769# CONFIG_CRYPTO_CRC32C is not set
1770# CONFIG_CRYPTO_GHASH is not set
1721# CONFIG_CRYPTO_MD4 is not set 1771# CONFIG_CRYPTO_MD4 is not set
1722# CONFIG_CRYPTO_MD5 is not set 1772# CONFIG_CRYPTO_MD5 is not set
1723# CONFIG_CRYPTO_MICHAEL_MIC is not set 1773# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/arm/configs/htcherald_defconfig b/arch/arm/configs/htcherald_defconfig
index 338267674075..1b39691b816f 100644
--- a/arch/arm/configs/htcherald_defconfig
+++ b/arch/arm/configs/htcherald_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.32-rc6 3# Linux kernel version: 2.6.32-rc8
4# Sat Nov 14 10:56:01 2009 4# Sat Dec 5 12:16:24 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -198,7 +198,9 @@ CONFIG_ARCH_OMAP1=y
198# OMAP Feature Selections 198# OMAP Feature Selections
199# 199#
200# CONFIG_OMAP_RESET_CLOCKS is not set 200# CONFIG_OMAP_RESET_CLOCKS is not set
201# CONFIG_OMAP_MUX is not set 201CONFIG_OMAP_MUX=y
202# CONFIG_OMAP_MUX_DEBUG is not set
203CONFIG_OMAP_MUX_WARNINGS=y
202CONFIG_OMAP_MCBSP=y 204CONFIG_OMAP_MCBSP=y
203# CONFIG_OMAP_MBOX_FWK is not set 205# CONFIG_OMAP_MBOX_FWK is not set
204CONFIG_OMAP_MPU_TIMER=y 206CONFIG_OMAP_MPU_TIMER=y
@@ -207,6 +209,7 @@ CONFIG_OMAP_LL_DEBUG_UART1=y
207# CONFIG_OMAP_LL_DEBUG_UART2 is not set 209# CONFIG_OMAP_LL_DEBUG_UART2 is not set
208# CONFIG_OMAP_LL_DEBUG_UART3 is not set 210# CONFIG_OMAP_LL_DEBUG_UART3 is not set
209# CONFIG_OMAP_LL_DEBUG_NONE is not set 211# CONFIG_OMAP_LL_DEBUG_NONE is not set
212CONFIG_OMAP_SERIAL_WAKE=y
210# CONFIG_OMAP_PM_NONE is not set 213# CONFIG_OMAP_PM_NONE is not set
211CONFIG_OMAP_PM_NOOP=y 214CONFIG_OMAP_PM_NOOP=y
212 215
diff --git a/arch/arm/configs/omap3_touchbook_defconfig b/arch/arm/configs/omap3_touchbook_defconfig
new file mode 100644
index 000000000000..7c8515e65c02
--- /dev/null
+++ b/arch/arm/configs/omap3_touchbook_defconfig
@@ -0,0 +1,2431 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc8
4# Fri Dec 4 16:02:17 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
14CONFIG_LOCKDEP_SUPPORT=y
15CONFIG_TRACE_IRQFLAGS_SUPPORT=y
16CONFIG_HARDIRQS_SW_RESEND=y
17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_ARCH_HAS_CPUFREQ=y
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
23CONFIG_OPROFILE_ARMV7=y
24CONFIG_VECTORS_BASE=0xffff0000
25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_LOCK_KERNEL=y
34CONFIG_INIT_ENV_ARG_LIMIT=32
35CONFIG_LOCALVERSION=""
36# CONFIG_LOCALVERSION_AUTO is not set
37CONFIG_SWAP=y
38CONFIG_SYSVIPC=y
39CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set
41CONFIG_BSD_PROCESS_ACCT=y
42# CONFIG_BSD_PROCESS_ACCT_V3 is not set
43CONFIG_TASKSTATS=y
44CONFIG_TASK_DELAY_ACCT=y
45CONFIG_TASK_XACCT=y
46CONFIG_TASK_IO_ACCOUNTING=y
47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_TREE_RCU=y
53# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_RCU_TRACE is not set
55CONFIG_RCU_FANOUT=32
56# CONFIG_RCU_FANOUT_EXACT is not set
57# CONFIG_TREE_RCU_TRACE is not set
58CONFIG_IKCONFIG=y
59CONFIG_IKCONFIG_PROC=y
60CONFIG_LOG_BUF_SHIFT=15
61CONFIG_GROUP_SCHED=y
62CONFIG_FAIR_GROUP_SCHED=y
63# CONFIG_RT_GROUP_SCHED is not set
64CONFIG_USER_SCHED=y
65# CONFIG_CGROUP_SCHED is not set
66# CONFIG_CGROUPS is not set
67# CONFIG_SYSFS_DEPRECATED_V2 is not set
68# CONFIG_RELAY is not set
69# CONFIG_NAMESPACES is not set
70CONFIG_BLK_DEV_INITRD=y
71CONFIG_INITRAMFS_SOURCE=""
72CONFIG_RD_GZIP=y
73# CONFIG_RD_BZIP2 is not set
74# CONFIG_RD_LZMA is not set
75CONFIG_CC_OPTIMIZE_FOR_SIZE=y
76CONFIG_SYSCTL=y
77CONFIG_ANON_INODES=y
78CONFIG_EMBEDDED=y
79CONFIG_UID16=y
80# CONFIG_SYSCTL_SYSCALL is not set
81CONFIG_KALLSYMS=y
82# CONFIG_KALLSYMS_ALL is not set
83# CONFIG_KALLSYMS_EXTRA_PASS is not set
84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y
86CONFIG_BUG=y
87# CONFIG_ELF_CORE is not set
88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y
90CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y
92CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y
95CONFIG_AIO=y
96
97#
98# Kernel Performance Events And Counters
99#
100CONFIG_VM_EVENT_COUNTERS=y
101# CONFIG_COMPAT_BRK is not set
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
105CONFIG_PROFILING=y
106CONFIG_TRACEPOINTS=y
107CONFIG_OPROFILE=y
108CONFIG_HAVE_OPROFILE=y
109# CONFIG_KPROBES is not set
110CONFIG_HAVE_KPROBES=y
111CONFIG_HAVE_KRETPROBES=y
112CONFIG_HAVE_CLK=y
113
114#
115# GCOV-based kernel profiling
116#
117# CONFIG_GCOV_KERNEL is not set
118CONFIG_SLOW_WORK=y
119CONFIG_HAVE_GENERIC_DMA_COHERENT=y
120CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y
122CONFIG_BASE_SMALL=0
123CONFIG_MODULES=y
124CONFIG_MODULE_FORCE_LOAD=y
125CONFIG_MODULE_UNLOAD=y
126CONFIG_MODULE_FORCE_UNLOAD=y
127CONFIG_MODVERSIONS=y
128CONFIG_MODULE_SRCVERSION_ALL=y
129CONFIG_BLOCK=y
130CONFIG_LBDAF=y
131# CONFIG_BLK_DEV_BSG is not set
132# CONFIG_BLK_DEV_INTEGRITY is not set
133
134#
135# IO Schedulers
136#
137CONFIG_IOSCHED_NOOP=y
138CONFIG_IOSCHED_AS=y
139CONFIG_IOSCHED_DEADLINE=y
140CONFIG_IOSCHED_CFQ=y
141# CONFIG_DEFAULT_AS is not set
142# CONFIG_DEFAULT_DEADLINE is not set
143CONFIG_DEFAULT_CFQ=y
144# CONFIG_DEFAULT_NOOP is not set
145CONFIG_DEFAULT_IOSCHED="cfq"
146CONFIG_FREEZER=y
147
148#
149# System Type
150#
151CONFIG_MMU=y
152# CONFIG_ARCH_AAEC2000 is not set
153# CONFIG_ARCH_INTEGRATOR is not set
154# CONFIG_ARCH_REALVIEW is not set
155# CONFIG_ARCH_VERSATILE is not set
156# CONFIG_ARCH_AT91 is not set
157# CONFIG_ARCH_CLPS711X is not set
158# CONFIG_ARCH_GEMINI is not set
159# CONFIG_ARCH_EBSA110 is not set
160# CONFIG_ARCH_EP93XX is not set
161# CONFIG_ARCH_FOOTBRIDGE is not set
162# CONFIG_ARCH_MXC is not set
163# CONFIG_ARCH_STMP3XXX is not set
164# CONFIG_ARCH_NETX is not set
165# CONFIG_ARCH_H720X is not set
166# CONFIG_ARCH_NOMADIK is not set
167# CONFIG_ARCH_IOP13XX is not set
168# CONFIG_ARCH_IOP32X is not set
169# CONFIG_ARCH_IOP33X is not set
170# CONFIG_ARCH_IXP23XX is not set
171# CONFIG_ARCH_IXP2000 is not set
172# CONFIG_ARCH_IXP4XX is not set
173# CONFIG_ARCH_L7200 is not set
174# CONFIG_ARCH_KIRKWOOD is not set
175# CONFIG_ARCH_LOKI is not set
176# CONFIG_ARCH_MV78XX0 is not set
177# CONFIG_ARCH_ORION5X is not set
178# CONFIG_ARCH_MMP is not set
179# CONFIG_ARCH_KS8695 is not set
180# CONFIG_ARCH_NS9XXX is not set
181# CONFIG_ARCH_W90X900 is not set
182# CONFIG_ARCH_PNX4008 is not set
183# CONFIG_ARCH_PXA is not set
184# CONFIG_ARCH_MSM is not set
185# CONFIG_ARCH_RPC is not set
186# CONFIG_ARCH_SA1100 is not set
187# CONFIG_ARCH_S3C2410 is not set
188# CONFIG_ARCH_S3C64XX is not set
189# CONFIG_ARCH_S5PC1XX is not set
190# CONFIG_ARCH_SHARK is not set
191# CONFIG_ARCH_LH7A40X is not set
192# CONFIG_ARCH_U300 is not set
193# CONFIG_ARCH_DAVINCI is not set
194CONFIG_ARCH_OMAP=y
195# CONFIG_ARCH_BCMRING is not set
196
197#
198# TI OMAP Implementations
199#
200CONFIG_ARCH_OMAP_OTG=y
201# CONFIG_ARCH_OMAP1 is not set
202# CONFIG_ARCH_OMAP2 is not set
203CONFIG_ARCH_OMAP3=y
204# CONFIG_ARCH_OMAP4 is not set
205
206#
207# OMAP Feature Selections
208#
209# CONFIG_OMAP_DEBUG_POWERDOMAIN is not set
210# CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set
211CONFIG_OMAP_RESET_CLOCKS=y
212# CONFIG_OMAP_MUX is not set
213CONFIG_OMAP_MCBSP=y
214# CONFIG_OMAP_MBOX_FWK is not set
215# CONFIG_OMAP_MPU_TIMER is not set
216CONFIG_OMAP_32K_TIMER=y
217CONFIG_OMAP_32K_TIMER_HZ=128
218CONFIG_OMAP_DM_TIMER=y
219# CONFIG_OMAP_LL_DEBUG_UART1 is not set
220# CONFIG_OMAP_LL_DEBUG_UART2 is not set
221CONFIG_OMAP_LL_DEBUG_UART3=y
222# CONFIG_OMAP_LL_DEBUG_NONE is not set
223# CONFIG_OMAP_PM_NONE is not set
224CONFIG_OMAP_PM_NOOP=y
225CONFIG_ARCH_OMAP34XX=y
226CONFIG_ARCH_OMAP3430=y
227
228#
229# OMAP Board Type
230#
231# CONFIG_MACH_OMAP3_BEAGLE is not set
232# CONFIG_MACH_OMAP_LDP is not set
233# CONFIG_MACH_OVERO is not set
234# CONFIG_MACH_OMAP3EVM is not set
235# CONFIG_MACH_OMAP3517EVM is not set
236# CONFIG_MACH_OMAP3_PANDORA is not set
237CONFIG_MACH_OMAP3_TOUCHBOOK=y
238# CONFIG_MACH_OMAP_3430SDP is not set
239# CONFIG_MACH_NOKIA_RX51 is not set
240# CONFIG_MACH_OMAP_ZOOM2 is not set
241# CONFIG_MACH_OMAP_ZOOM3 is not set
242# CONFIG_MACH_CM_T35 is not set
243# CONFIG_MACH_IGEP0020 is not set
244# CONFIG_MACH_OMAP_3630SDP is not set
245
246#
247# Processor Type
248#
249CONFIG_CPU_32=y
250CONFIG_CPU_32v6K=y
251CONFIG_CPU_V7=y
252CONFIG_CPU_32v7=y
253CONFIG_CPU_ABRT_EV7=y
254CONFIG_CPU_PABRT_V7=y
255CONFIG_CPU_CACHE_V7=y
256CONFIG_CPU_CACHE_VIPT=y
257CONFIG_CPU_COPY_V6=y
258CONFIG_CPU_TLB_V7=y
259CONFIG_CPU_HAS_ASID=y
260CONFIG_CPU_CP15=y
261CONFIG_CPU_CP15_MMU=y
262
263#
264# Processor Features
265#
266CONFIG_ARM_THUMB=y
267CONFIG_ARM_THUMBEE=y
268# CONFIG_CPU_ICACHE_DISABLE is not set
269# CONFIG_CPU_DCACHE_DISABLE is not set
270# CONFIG_CPU_BPREDICT_DISABLE is not set
271CONFIG_HAS_TLS_REG=y
272CONFIG_ARM_L1_CACHE_SHIFT=6
273# CONFIG_ARM_ERRATA_430973 is not set
274# CONFIG_ARM_ERRATA_458693 is not set
275# CONFIG_ARM_ERRATA_460075 is not set
276CONFIG_COMMON_CLKDEV=y
277
278#
279# Bus support
280#
281# CONFIG_PCI_SYSCALL is not set
282# CONFIG_ARCH_SUPPORTS_MSI is not set
283# CONFIG_PCCARD is not set
284
285#
286# Kernel Features
287#
288CONFIG_TICK_ONESHOT=y
289CONFIG_NO_HZ=y
290CONFIG_HIGH_RES_TIMERS=y
291CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
292CONFIG_VMSPLIT_3G=y
293# CONFIG_VMSPLIT_2G is not set
294# CONFIG_VMSPLIT_1G is not set
295CONFIG_PAGE_OFFSET=0xC0000000
296# CONFIG_PREEMPT_NONE is not set
297# CONFIG_PREEMPT_VOLUNTARY is not set
298CONFIG_PREEMPT=y
299CONFIG_HZ=128
300# CONFIG_THUMB2_KERNEL is not set
301CONFIG_AEABI=y
302# CONFIG_OABI_COMPAT is not set
303# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
304# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
305# CONFIG_HIGHMEM is not set
306CONFIG_SELECT_MEMORY_MODEL=y
307CONFIG_FLATMEM_MANUAL=y
308# CONFIG_DISCONTIGMEM_MANUAL is not set
309# CONFIG_SPARSEMEM_MANUAL is not set
310CONFIG_FLATMEM=y
311CONFIG_FLAT_NODE_MEM_MAP=y
312CONFIG_PAGEFLAGS_EXTENDED=y
313CONFIG_SPLIT_PTLOCK_CPUS=4
314# CONFIG_PHYS_ADDR_T_64BIT is not set
315CONFIG_ZONE_DMA_FLAG=0
316CONFIG_VIRT_TO_BUS=y
317CONFIG_HAVE_MLOCK=y
318CONFIG_HAVE_MLOCKED_PAGE_BIT=y
319# CONFIG_KSM is not set
320CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
321CONFIG_LEDS=y
322CONFIG_ALIGNMENT_TRAP=y
323# CONFIG_UACCESS_WITH_MEMCPY is not set
324
325#
326# Boot options
327#
328CONFIG_ZBOOT_ROM_TEXT=0x0
329CONFIG_ZBOOT_ROM_BSS=0x0
330CONFIG_CMDLINE=" debug "
331# CONFIG_XIP_KERNEL is not set
332CONFIG_KEXEC=y
333CONFIG_ATAGS_PROC=y
334
335#
336# CPU Power Management
337#
338# CONFIG_CPU_FREQ is not set
339# CONFIG_CPU_IDLE is not set
340
341#
342# Floating point emulation
343#
344
345#
346# At least one emulation must be selected
347#
348CONFIG_VFP=y
349CONFIG_VFPv3=y
350CONFIG_NEON=y
351
352#
353# Userspace binary formats
354#
355CONFIG_BINFMT_ELF=y
356CONFIG_HAVE_AOUT=y
357CONFIG_BINFMT_AOUT=m
358CONFIG_BINFMT_MISC=y
359
360#
361# Power management options
362#
363CONFIG_PM=y
364CONFIG_PM_DEBUG=y
365# CONFIG_PM_VERBOSE is not set
366CONFIG_CAN_PM_TRACE=y
367CONFIG_PM_SLEEP=y
368CONFIG_SUSPEND=y
369# CONFIG_PM_TEST_SUSPEND is not set
370CONFIG_SUSPEND_FREEZER=y
371# CONFIG_APM_EMULATION is not set
372# CONFIG_PM_RUNTIME is not set
373CONFIG_ARCH_SUSPEND_POSSIBLE=y
374CONFIG_NET=y
375
376#
377# Networking options
378#
379CONFIG_PACKET=y
380CONFIG_PACKET_MMAP=y
381CONFIG_UNIX=y
382CONFIG_XFRM=y
383# CONFIG_XFRM_USER is not set
384# CONFIG_XFRM_SUB_POLICY is not set
385# CONFIG_XFRM_MIGRATE is not set
386# CONFIG_XFRM_STATISTICS is not set
387CONFIG_XFRM_IPCOMP=m
388CONFIG_NET_KEY=y
389# CONFIG_NET_KEY_MIGRATE is not set
390CONFIG_INET=y
391# CONFIG_IP_MULTICAST is not set
392# CONFIG_IP_ADVANCED_ROUTER is not set
393CONFIG_IP_FIB_HASH=y
394CONFIG_IP_PNP=y
395CONFIG_IP_PNP_DHCP=y
396CONFIG_IP_PNP_BOOTP=y
397CONFIG_IP_PNP_RARP=y
398CONFIG_NET_IPIP=m
399CONFIG_NET_IPGRE=m
400# CONFIG_ARPD is not set
401# CONFIG_SYN_COOKIES is not set
402CONFIG_INET_AH=m
403CONFIG_INET_ESP=m
404CONFIG_INET_IPCOMP=m
405CONFIG_INET_XFRM_TUNNEL=m
406CONFIG_INET_TUNNEL=m
407CONFIG_INET_XFRM_MODE_TRANSPORT=y
408CONFIG_INET_XFRM_MODE_TUNNEL=y
409CONFIG_INET_XFRM_MODE_BEET=y
410CONFIG_INET_LRO=y
411CONFIG_INET_DIAG=m
412CONFIG_INET_TCP_DIAG=m
413CONFIG_TCP_CONG_ADVANCED=y
414CONFIG_TCP_CONG_BIC=m
415CONFIG_TCP_CONG_CUBIC=y
416CONFIG_TCP_CONG_WESTWOOD=m
417CONFIG_TCP_CONG_HTCP=m
418CONFIG_TCP_CONG_HSTCP=m
419CONFIG_TCP_CONG_HYBLA=m
420CONFIG_TCP_CONG_VEGAS=m
421CONFIG_TCP_CONG_SCALABLE=m
422CONFIG_TCP_CONG_LP=m
423CONFIG_TCP_CONG_VENO=m
424CONFIG_TCP_CONG_YEAH=m
425CONFIG_TCP_CONG_ILLINOIS=m
426# CONFIG_DEFAULT_BIC is not set
427CONFIG_DEFAULT_CUBIC=y
428# CONFIG_DEFAULT_HTCP is not set
429# CONFIG_DEFAULT_VEGAS is not set
430# CONFIG_DEFAULT_WESTWOOD is not set
431# CONFIG_DEFAULT_RENO is not set
432CONFIG_DEFAULT_TCP_CONG="cubic"
433# CONFIG_TCP_MD5SIG is not set
434CONFIG_IPV6=m
435# CONFIG_IPV6_PRIVACY is not set
436# CONFIG_IPV6_ROUTER_PREF is not set
437# CONFIG_IPV6_OPTIMISTIC_DAD is not set
438CONFIG_INET6_AH=m
439CONFIG_INET6_ESP=m
440CONFIG_INET6_IPCOMP=m
441CONFIG_IPV6_MIP6=m
442CONFIG_INET6_XFRM_TUNNEL=m
443CONFIG_INET6_TUNNEL=m
444CONFIG_INET6_XFRM_MODE_TRANSPORT=m
445CONFIG_INET6_XFRM_MODE_TUNNEL=m
446CONFIG_INET6_XFRM_MODE_BEET=m
447CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
448CONFIG_IPV6_SIT=m
449CONFIG_IPV6_NDISC_NODETYPE=y
450CONFIG_IPV6_TUNNEL=m
451CONFIG_IPV6_MULTIPLE_TABLES=y
452CONFIG_IPV6_SUBTREES=y
453CONFIG_IPV6_MROUTE=y
454# CONFIG_IPV6_PIMSM_V2 is not set
455# CONFIG_NETWORK_SECMARK is not set
456CONFIG_NETFILTER=y
457# CONFIG_NETFILTER_DEBUG is not set
458CONFIG_NETFILTER_ADVANCED=y
459CONFIG_BRIDGE_NETFILTER=y
460
461#
462# Core Netfilter Configuration
463#
464CONFIG_NETFILTER_NETLINK=m
465CONFIG_NETFILTER_NETLINK_QUEUE=m
466CONFIG_NETFILTER_NETLINK_LOG=m
467CONFIG_NF_CONNTRACK=m
468CONFIG_NF_CT_ACCT=y
469CONFIG_NF_CONNTRACK_MARK=y
470CONFIG_NF_CONNTRACK_EVENTS=y
471CONFIG_NF_CT_PROTO_DCCP=m
472CONFIG_NF_CT_PROTO_GRE=m
473CONFIG_NF_CT_PROTO_SCTP=m
474CONFIG_NF_CT_PROTO_UDPLITE=m
475CONFIG_NF_CONNTRACK_AMANDA=m
476CONFIG_NF_CONNTRACK_FTP=m
477CONFIG_NF_CONNTRACK_H323=m
478CONFIG_NF_CONNTRACK_IRC=m
479CONFIG_NF_CONNTRACK_NETBIOS_NS=m
480CONFIG_NF_CONNTRACK_PPTP=m
481CONFIG_NF_CONNTRACK_SANE=m
482CONFIG_NF_CONNTRACK_SIP=m
483CONFIG_NF_CONNTRACK_TFTP=m
484CONFIG_NF_CT_NETLINK=m
485# CONFIG_NETFILTER_TPROXY is not set
486CONFIG_NETFILTER_XTABLES=m
487CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
488CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
489# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
490CONFIG_NETFILTER_XT_TARGET_HL=m
491# CONFIG_NETFILTER_XT_TARGET_LED is not set
492CONFIG_NETFILTER_XT_TARGET_MARK=m
493CONFIG_NETFILTER_XT_TARGET_NFLOG=m
494CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
495# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
496CONFIG_NETFILTER_XT_TARGET_RATEEST=m
497# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
498CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
499# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
500# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
501CONFIG_NETFILTER_XT_MATCH_COMMENT=m
502CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
503CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
504CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
505CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
506CONFIG_NETFILTER_XT_MATCH_DCCP=m
507CONFIG_NETFILTER_XT_MATCH_DSCP=m
508CONFIG_NETFILTER_XT_MATCH_ESP=m
509CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
510CONFIG_NETFILTER_XT_MATCH_HELPER=m
511CONFIG_NETFILTER_XT_MATCH_HL=m
512CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
513CONFIG_NETFILTER_XT_MATCH_LENGTH=m
514CONFIG_NETFILTER_XT_MATCH_LIMIT=m
515CONFIG_NETFILTER_XT_MATCH_MAC=m
516CONFIG_NETFILTER_XT_MATCH_MARK=m
517CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
518CONFIG_NETFILTER_XT_MATCH_OWNER=m
519CONFIG_NETFILTER_XT_MATCH_POLICY=m
520# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
521CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
522CONFIG_NETFILTER_XT_MATCH_QUOTA=m
523CONFIG_NETFILTER_XT_MATCH_RATEEST=m
524CONFIG_NETFILTER_XT_MATCH_REALM=m
525CONFIG_NETFILTER_XT_MATCH_RECENT=m
526# CONFIG_NETFILTER_XT_MATCH_RECENT_PROC_COMPAT is not set
527CONFIG_NETFILTER_XT_MATCH_SCTP=m
528CONFIG_NETFILTER_XT_MATCH_STATE=m
529CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
530CONFIG_NETFILTER_XT_MATCH_STRING=m
531CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
532CONFIG_NETFILTER_XT_MATCH_TIME=m
533CONFIG_NETFILTER_XT_MATCH_U32=m
534# CONFIG_NETFILTER_XT_MATCH_OSF is not set
535CONFIG_IP_VS=m
536CONFIG_IP_VS_IPV6=y
537CONFIG_IP_VS_DEBUG=y
538CONFIG_IP_VS_TAB_BITS=12
539
540#
541# IPVS transport protocol load balancing support
542#
543CONFIG_IP_VS_PROTO_TCP=y
544CONFIG_IP_VS_PROTO_UDP=y
545CONFIG_IP_VS_PROTO_AH_ESP=y
546CONFIG_IP_VS_PROTO_ESP=y
547CONFIG_IP_VS_PROTO_AH=y
548
549#
550# IPVS scheduler
551#
552CONFIG_IP_VS_RR=m
553CONFIG_IP_VS_WRR=m
554CONFIG_IP_VS_LC=m
555CONFIG_IP_VS_WLC=m
556CONFIG_IP_VS_LBLC=m
557CONFIG_IP_VS_LBLCR=m
558CONFIG_IP_VS_DH=m
559CONFIG_IP_VS_SH=m
560CONFIG_IP_VS_SED=m
561CONFIG_IP_VS_NQ=m
562
563#
564# IPVS application helper
565#
566CONFIG_IP_VS_FTP=m
567
568#
569# IP: Netfilter Configuration
570#
571CONFIG_NF_DEFRAG_IPV4=m
572CONFIG_NF_CONNTRACK_IPV4=m
573CONFIG_NF_CONNTRACK_PROC_COMPAT=y
574CONFIG_IP_NF_QUEUE=m
575CONFIG_IP_NF_IPTABLES=m
576CONFIG_IP_NF_MATCH_ADDRTYPE=m
577CONFIG_IP_NF_MATCH_AH=m
578CONFIG_IP_NF_MATCH_ECN=m
579CONFIG_IP_NF_MATCH_TTL=m
580CONFIG_IP_NF_FILTER=m
581CONFIG_IP_NF_TARGET_REJECT=m
582CONFIG_IP_NF_TARGET_LOG=m
583CONFIG_IP_NF_TARGET_ULOG=m
584CONFIG_NF_NAT=m
585CONFIG_NF_NAT_NEEDED=y
586CONFIG_IP_NF_TARGET_MASQUERADE=m
587CONFIG_IP_NF_TARGET_NETMAP=m
588CONFIG_IP_NF_TARGET_REDIRECT=m
589CONFIG_NF_NAT_SNMP_BASIC=m
590CONFIG_NF_NAT_PROTO_DCCP=m
591CONFIG_NF_NAT_PROTO_GRE=m
592CONFIG_NF_NAT_PROTO_UDPLITE=m
593CONFIG_NF_NAT_PROTO_SCTP=m
594CONFIG_NF_NAT_FTP=m
595CONFIG_NF_NAT_IRC=m
596CONFIG_NF_NAT_TFTP=m
597CONFIG_NF_NAT_AMANDA=m
598CONFIG_NF_NAT_PPTP=m
599CONFIG_NF_NAT_H323=m
600CONFIG_NF_NAT_SIP=m
601CONFIG_IP_NF_MANGLE=m
602CONFIG_IP_NF_TARGET_CLUSTERIP=m
603CONFIG_IP_NF_TARGET_ECN=m
604CONFIG_IP_NF_TARGET_TTL=m
605CONFIG_IP_NF_RAW=m
606CONFIG_IP_NF_ARPTABLES=m
607CONFIG_IP_NF_ARPFILTER=m
608CONFIG_IP_NF_ARP_MANGLE=m
609
610#
611# IPv6: Netfilter Configuration
612#
613CONFIG_NF_CONNTRACK_IPV6=m
614CONFIG_IP6_NF_QUEUE=m
615CONFIG_IP6_NF_IPTABLES=m
616CONFIG_IP6_NF_MATCH_AH=m
617CONFIG_IP6_NF_MATCH_EUI64=m
618CONFIG_IP6_NF_MATCH_FRAG=m
619CONFIG_IP6_NF_MATCH_OPTS=m
620CONFIG_IP6_NF_MATCH_HL=m
621CONFIG_IP6_NF_MATCH_IPV6HEADER=m
622CONFIG_IP6_NF_MATCH_MH=m
623CONFIG_IP6_NF_MATCH_RT=m
624CONFIG_IP6_NF_TARGET_HL=m
625CONFIG_IP6_NF_TARGET_LOG=m
626CONFIG_IP6_NF_FILTER=m
627CONFIG_IP6_NF_TARGET_REJECT=m
628CONFIG_IP6_NF_MANGLE=m
629CONFIG_IP6_NF_RAW=m
630# CONFIG_BRIDGE_NF_EBTABLES is not set
631CONFIG_IP_DCCP=m
632CONFIG_INET_DCCP_DIAG=m
633
634#
635# DCCP CCIDs Configuration (EXPERIMENTAL)
636#
637# CONFIG_IP_DCCP_CCID2_DEBUG is not set
638CONFIG_IP_DCCP_CCID3=y
639# CONFIG_IP_DCCP_CCID3_DEBUG is not set
640CONFIG_IP_DCCP_CCID3_RTO=100
641CONFIG_IP_DCCP_TFRC_LIB=y
642
643#
644# DCCP Kernel Hacking
645#
646# CONFIG_IP_DCCP_DEBUG is not set
647CONFIG_IP_SCTP=m
648# CONFIG_SCTP_DBG_MSG is not set
649# CONFIG_SCTP_DBG_OBJCNT is not set
650# CONFIG_SCTP_HMAC_NONE is not set
651# CONFIG_SCTP_HMAC_SHA1 is not set
652CONFIG_SCTP_HMAC_MD5=y
653# CONFIG_RDS is not set
654CONFIG_TIPC=m
655# CONFIG_TIPC_ADVANCED is not set
656# CONFIG_TIPC_DEBUG is not set
657CONFIG_ATM=m
658CONFIG_ATM_CLIP=m
659# CONFIG_ATM_CLIP_NO_ICMP is not set
660CONFIG_ATM_LANE=m
661CONFIG_ATM_MPOA=m
662CONFIG_ATM_BR2684=m
663# CONFIG_ATM_BR2684_IPFILTER is not set
664CONFIG_STP=m
665CONFIG_GARP=m
666CONFIG_BRIDGE=m
667# CONFIG_NET_DSA is not set
668CONFIG_VLAN_8021Q=m
669CONFIG_VLAN_8021Q_GVRP=y
670# CONFIG_DECNET is not set
671CONFIG_LLC=m
672# CONFIG_LLC2 is not set
673# CONFIG_IPX is not set
674# CONFIG_ATALK is not set
675# CONFIG_X25 is not set
676# CONFIG_LAPB is not set
677# CONFIG_ECONET is not set
678CONFIG_WAN_ROUTER=m
679# CONFIG_PHONET is not set
680# CONFIG_IEEE802154 is not set
681CONFIG_NET_SCHED=y
682
683#
684# Queueing/Scheduling
685#
686CONFIG_NET_SCH_CBQ=m
687CONFIG_NET_SCH_HTB=m
688CONFIG_NET_SCH_HFSC=m
689CONFIG_NET_SCH_ATM=m
690CONFIG_NET_SCH_PRIO=m
691CONFIG_NET_SCH_MULTIQ=m
692CONFIG_NET_SCH_RED=m
693CONFIG_NET_SCH_SFQ=m
694CONFIG_NET_SCH_TEQL=m
695CONFIG_NET_SCH_TBF=m
696CONFIG_NET_SCH_GRED=m
697CONFIG_NET_SCH_DSMARK=m
698CONFIG_NET_SCH_NETEM=m
699CONFIG_NET_SCH_DRR=m
700
701#
702# Classification
703#
704CONFIG_NET_CLS=y
705CONFIG_NET_CLS_BASIC=m
706CONFIG_NET_CLS_TCINDEX=m
707CONFIG_NET_CLS_ROUTE4=m
708CONFIG_NET_CLS_ROUTE=y
709CONFIG_NET_CLS_FW=m
710CONFIG_NET_CLS_U32=m
711CONFIG_CLS_U32_PERF=y
712CONFIG_CLS_U32_MARK=y
713CONFIG_NET_CLS_RSVP=m
714CONFIG_NET_CLS_RSVP6=m
715CONFIG_NET_CLS_FLOW=m
716# CONFIG_NET_EMATCH is not set
717# CONFIG_NET_CLS_ACT is not set
718CONFIG_NET_CLS_IND=y
719CONFIG_NET_SCH_FIFO=y
720# CONFIG_DCB is not set
721
722#
723# Network testing
724#
725# CONFIG_NET_PKTGEN is not set
726# CONFIG_NET_DROP_MONITOR is not set
727# CONFIG_HAMRADIO is not set
728# CONFIG_CAN is not set
729# CONFIG_IRDA is not set
730CONFIG_BT=y
731CONFIG_BT_L2CAP=y
732CONFIG_BT_SCO=y
733CONFIG_BT_RFCOMM=y
734CONFIG_BT_RFCOMM_TTY=y
735CONFIG_BT_BNEP=y
736CONFIG_BT_BNEP_MC_FILTER=y
737CONFIG_BT_BNEP_PROTO_FILTER=y
738CONFIG_BT_HIDP=y
739
740#
741# Bluetooth device drivers
742#
743CONFIG_BT_HCIBTUSB=y
744CONFIG_BT_HCIBTSDIO=y
745CONFIG_BT_HCIUART=y
746CONFIG_BT_HCIUART_H4=y
747CONFIG_BT_HCIUART_BCSP=y
748CONFIG_BT_HCIUART_LL=y
749CONFIG_BT_HCIBCM203X=y
750CONFIG_BT_HCIBPA10X=y
751CONFIG_BT_HCIBFUSB=y
752# CONFIG_BT_HCIVHCI is not set
753# CONFIG_BT_MRVL is not set
754CONFIG_AF_RXRPC=m
755# CONFIG_AF_RXRPC_DEBUG is not set
756# CONFIG_RXKAD is not set
757CONFIG_FIB_RULES=y
758CONFIG_WIRELESS=y
759CONFIG_CFG80211=m
760# CONFIG_NL80211_TESTMODE is not set
761# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
762# CONFIG_CFG80211_REG_DEBUG is not set
763CONFIG_CFG80211_DEFAULT_PS=y
764CONFIG_CFG80211_DEFAULT_PS_VALUE=1
765# CONFIG_CFG80211_DEBUGFS is not set
766# CONFIG_WIRELESS_OLD_REGULATORY is not set
767CONFIG_WIRELESS_EXT=y
768CONFIG_WIRELESS_EXT_SYSFS=y
769CONFIG_LIB80211=y
770# CONFIG_LIB80211_DEBUG is not set
771CONFIG_MAC80211=m
772CONFIG_MAC80211_RC_PID=y
773# CONFIG_MAC80211_RC_MINSTREL is not set
774CONFIG_MAC80211_RC_DEFAULT_PID=y
775# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set
776CONFIG_MAC80211_RC_DEFAULT="pid"
777# CONFIG_MAC80211_MESH is not set
778# CONFIG_MAC80211_LEDS is not set
779# CONFIG_MAC80211_DEBUGFS is not set
780# CONFIG_MAC80211_DEBUG_MENU is not set
781CONFIG_WIMAX=m
782CONFIG_WIMAX_DEBUG_LEVEL=8
783# CONFIG_RFKILL is not set
784# CONFIG_NET_9P is not set
785
786#
787# Device Drivers
788#
789
790#
791# Generic Driver Options
792#
793CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
794# CONFIG_DEVTMPFS is not set
795CONFIG_STANDALONE=y
796CONFIG_PREVENT_FIRMWARE_BUILD=y
797CONFIG_FW_LOADER=y
798CONFIG_FIRMWARE_IN_KERNEL=y
799CONFIG_EXTRA_FIRMWARE=""
800# CONFIG_DEBUG_DRIVER is not set
801# CONFIG_DEBUG_DEVRES is not set
802# CONFIG_SYS_HYPERVISOR is not set
803# CONFIG_CONNECTOR is not set
804CONFIG_MTD=y
805# CONFIG_MTD_DEBUG is not set
806# CONFIG_MTD_TESTS is not set
807CONFIG_MTD_CONCAT=y
808CONFIG_MTD_PARTITIONS=y
809# CONFIG_MTD_REDBOOT_PARTS is not set
810# CONFIG_MTD_CMDLINE_PARTS is not set
811# CONFIG_MTD_AFS_PARTS is not set
812# CONFIG_MTD_AR7_PARTS is not set
813
814#
815# User Modules And Translation Layers
816#
817CONFIG_MTD_CHAR=y
818CONFIG_MTD_BLKDEVS=y
819CONFIG_MTD_BLOCK=y
820# CONFIG_FTL is not set
821# CONFIG_NFTL is not set
822# CONFIG_INFTL is not set
823# CONFIG_RFD_FTL is not set
824# CONFIG_SSFDC is not set
825# CONFIG_MTD_OOPS is not set
826
827#
828# RAM/ROM/Flash chip drivers
829#
830# CONFIG_MTD_CFI is not set
831# CONFIG_MTD_JEDECPROBE is not set
832CONFIG_MTD_MAP_BANK_WIDTH_1=y
833CONFIG_MTD_MAP_BANK_WIDTH_2=y
834CONFIG_MTD_MAP_BANK_WIDTH_4=y
835# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
836# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
837# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
838CONFIG_MTD_CFI_I1=y
839CONFIG_MTD_CFI_I2=y
840# CONFIG_MTD_CFI_I4 is not set
841# CONFIG_MTD_CFI_I8 is not set
842# CONFIG_MTD_RAM is not set
843# CONFIG_MTD_ROM is not set
844# CONFIG_MTD_ABSENT is not set
845
846#
847# Mapping drivers for chip access
848#
849# CONFIG_MTD_COMPLEX_MAPPINGS is not set
850# CONFIG_MTD_PLATRAM is not set
851
852#
853# Self-contained MTD device drivers
854#
855# CONFIG_MTD_DATAFLASH is not set
856# CONFIG_MTD_M25P80 is not set
857# CONFIG_MTD_SST25L is not set
858# CONFIG_MTD_SLRAM is not set
859# CONFIG_MTD_PHRAM is not set
860# CONFIG_MTD_MTDRAM is not set
861# CONFIG_MTD_BLOCK2MTD is not set
862
863#
864# Disk-On-Chip Device Drivers
865#
866# CONFIG_MTD_DOC2000 is not set
867# CONFIG_MTD_DOC2001 is not set
868# CONFIG_MTD_DOC2001PLUS is not set
869CONFIG_MTD_NAND=y
870# CONFIG_MTD_NAND_VERIFY_WRITE is not set
871# CONFIG_MTD_NAND_ECC_SMC is not set
872# CONFIG_MTD_NAND_MUSEUM_IDS is not set
873# CONFIG_MTD_NAND_GPIO is not set
874CONFIG_MTD_NAND_OMAP2=y
875CONFIG_MTD_NAND_OMAP_PREFETCH=y
876# CONFIG_MTD_NAND_OMAP_PREFETCH_DMA is not set
877CONFIG_MTD_NAND_IDS=y
878# CONFIG_MTD_NAND_DISKONCHIP is not set
879# CONFIG_MTD_NAND_NANDSIM is not set
880CONFIG_MTD_NAND_PLATFORM=y
881# CONFIG_MTD_ALAUDA is not set
882# CONFIG_MTD_ONENAND is not set
883
884#
885# LPDDR flash memory drivers
886#
887# CONFIG_MTD_LPDDR is not set
888
889#
890# UBI - Unsorted block images
891#
892CONFIG_MTD_UBI=y
893CONFIG_MTD_UBI_WL_THRESHOLD=4096
894CONFIG_MTD_UBI_BEB_RESERVE=1
895# CONFIG_MTD_UBI_GLUEBI is not set
896
897#
898# UBI debugging options
899#
900# CONFIG_MTD_UBI_DEBUG is not set
901# CONFIG_PARPORT is not set
902CONFIG_BLK_DEV=y
903# CONFIG_BLK_DEV_COW_COMMON is not set
904CONFIG_BLK_DEV_LOOP=y
905CONFIG_BLK_DEV_CRYPTOLOOP=m
906# CONFIG_BLK_DEV_NBD is not set
907# CONFIG_BLK_DEV_UB is not set
908CONFIG_BLK_DEV_RAM=y
909CONFIG_BLK_DEV_RAM_COUNT=16
910CONFIG_BLK_DEV_RAM_SIZE=16384
911# CONFIG_BLK_DEV_XIP is not set
912CONFIG_CDROM_PKTCDVD=m
913CONFIG_CDROM_PKTCDVD_BUFFERS=8
914# CONFIG_CDROM_PKTCDVD_WCACHE is not set
915# CONFIG_ATA_OVER_ETH is not set
916# CONFIG_MG_DISK is not set
917CONFIG_MISC_DEVICES=y
918# CONFIG_ICS932S401 is not set
919# CONFIG_ENCLOSURE_SERVICES is not set
920# CONFIG_ISL29003 is not set
921# CONFIG_C2PORT is not set
922
923#
924# EEPROM support
925#
926# CONFIG_EEPROM_AT24 is not set
927# CONFIG_EEPROM_AT25 is not set
928# CONFIG_EEPROM_LEGACY is not set
929# CONFIG_EEPROM_MAX6875 is not set
930CONFIG_EEPROM_93CX6=y
931CONFIG_HAVE_IDE=y
932# CONFIG_IDE is not set
933
934#
935# SCSI device support
936#
937CONFIG_RAID_ATTRS=m
938CONFIG_SCSI=y
939CONFIG_SCSI_DMA=y
940# CONFIG_SCSI_TGT is not set
941# CONFIG_SCSI_NETLINK is not set
942CONFIG_SCSI_PROC_FS=y
943
944#
945# SCSI support type (disk, tape, CD-ROM)
946#
947CONFIG_BLK_DEV_SD=y
948# CONFIG_CHR_DEV_ST is not set
949# CONFIG_CHR_DEV_OSST is not set
950CONFIG_BLK_DEV_SR=y
951CONFIG_BLK_DEV_SR_VENDOR=y
952CONFIG_CHR_DEV_SG=y
953CONFIG_CHR_DEV_SCH=m
954CONFIG_SCSI_MULTI_LUN=y
955# CONFIG_SCSI_CONSTANTS is not set
956# CONFIG_SCSI_LOGGING is not set
957# CONFIG_SCSI_SCAN_ASYNC is not set
958CONFIG_SCSI_WAIT_SCAN=m
959
960#
961# SCSI Transports
962#
963# CONFIG_SCSI_SPI_ATTRS is not set
964# CONFIG_SCSI_FC_ATTRS is not set
965CONFIG_SCSI_ISCSI_ATTRS=m
966# CONFIG_SCSI_SAS_LIBSAS is not set
967# CONFIG_SCSI_SRP_ATTRS is not set
968CONFIG_SCSI_LOWLEVEL=y
969CONFIG_ISCSI_TCP=m
970# CONFIG_LIBFC is not set
971# CONFIG_LIBFCOE is not set
972# CONFIG_SCSI_DEBUG is not set
973# CONFIG_SCSI_DH is not set
974# CONFIG_SCSI_OSD_INITIATOR is not set
975# CONFIG_ATA is not set
976CONFIG_MD=y
977CONFIG_BLK_DEV_MD=m
978CONFIG_MD_LINEAR=m
979CONFIG_MD_RAID0=m
980CONFIG_MD_RAID1=m
981CONFIG_MD_RAID10=m
982CONFIG_MD_RAID456=m
983CONFIG_MD_RAID6_PQ=m
984# CONFIG_ASYNC_RAID6_TEST is not set
985CONFIG_MD_MULTIPATH=m
986CONFIG_MD_FAULTY=m
987CONFIG_BLK_DEV_DM=m
988# CONFIG_DM_DEBUG is not set
989CONFIG_DM_CRYPT=m
990CONFIG_DM_SNAPSHOT=m
991CONFIG_DM_MIRROR=m
992# CONFIG_DM_LOG_USERSPACE is not set
993CONFIG_DM_ZERO=m
994CONFIG_DM_MULTIPATH=m
995# CONFIG_DM_MULTIPATH_QL is not set
996# CONFIG_DM_MULTIPATH_ST is not set
997CONFIG_DM_DELAY=m
998# CONFIG_DM_UEVENT is not set
999CONFIG_NETDEVICES=y
1000CONFIG_DUMMY=m
1001CONFIG_BONDING=m
1002CONFIG_MACVLAN=m
1003CONFIG_EQUALIZER=m
1004CONFIG_TUN=m
1005CONFIG_VETH=m
1006# CONFIG_NET_ETHERNET is not set
1007# CONFIG_NETDEV_1000 is not set
1008# CONFIG_NETDEV_10000 is not set
1009CONFIG_WLAN=y
1010# CONFIG_WLAN_PRE80211 is not set
1011CONFIG_WLAN_80211=y
1012# CONFIG_LIBERTAS is not set
1013# CONFIG_LIBERTAS_THINFIRM is not set
1014# CONFIG_AT76C50X_USB is not set
1015# CONFIG_USB_ZD1201 is not set
1016# CONFIG_USB_NET_RNDIS_WLAN is not set
1017# CONFIG_RTL8187 is not set
1018# CONFIG_MAC80211_HWSIM is not set
1019# CONFIG_P54_COMMON is not set
1020# CONFIG_ATH_COMMON is not set
1021# CONFIG_HOSTAP is not set
1022# CONFIG_B43 is not set
1023# CONFIG_B43LEGACY is not set
1024# CONFIG_ZD1211RW is not set
1025# CONFIG_RT2X00 is not set
1026# CONFIG_WL12XX is not set
1027# CONFIG_IWM is not set
1028
1029#
1030# WiMAX Wireless Broadband devices
1031#
1032# CONFIG_WIMAX_I2400M_USB is not set
1033# CONFIG_WIMAX_I2400M_SDIO is not set
1034
1035#
1036# USB Network Adapters
1037#
1038# CONFIG_USB_CATC is not set
1039# CONFIG_USB_KAWETH is not set
1040# CONFIG_USB_PEGASUS is not set
1041# CONFIG_USB_RTL8150 is not set
1042# CONFIG_USB_USBNET is not set
1043# CONFIG_WAN is not set
1044# CONFIG_ATM_DRIVERS is not set
1045CONFIG_PPP=m
1046CONFIG_PPP_MULTILINK=y
1047CONFIG_PPP_FILTER=y
1048CONFIG_PPP_ASYNC=m
1049CONFIG_PPP_SYNC_TTY=m
1050CONFIG_PPP_DEFLATE=m
1051CONFIG_PPP_BSDCOMP=m
1052CONFIG_PPP_MPPE=m
1053CONFIG_PPPOE=m
1054# CONFIG_PPPOATM is not set
1055CONFIG_PPPOL2TP=m
1056# CONFIG_SLIP is not set
1057CONFIG_SLHC=m
1058CONFIG_NETCONSOLE=m
1059CONFIG_NETCONSOLE_DYNAMIC=y
1060CONFIG_NETPOLL=y
1061CONFIG_NETPOLL_TRAP=y
1062CONFIG_NET_POLL_CONTROLLER=y
1063# CONFIG_ISDN is not set
1064# CONFIG_PHONE is not set
1065
1066#
1067# Input device support
1068#
1069CONFIG_INPUT=y
1070CONFIG_INPUT_FF_MEMLESS=y
1071# CONFIG_INPUT_POLLDEV is not set
1072
1073#
1074# Userland interfaces
1075#
1076CONFIG_INPUT_MOUSEDEV=y
1077CONFIG_INPUT_MOUSEDEV_PSAUX=y
1078CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1079CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1080# CONFIG_INPUT_JOYDEV is not set
1081CONFIG_INPUT_EVDEV=y
1082# CONFIG_INPUT_EVBUG is not set
1083
1084#
1085# Input Device Drivers
1086#
1087CONFIG_INPUT_KEYBOARD=y
1088# CONFIG_KEYBOARD_ADP5588 is not set
1089# CONFIG_KEYBOARD_ATKBD is not set
1090# CONFIG_QT2160 is not set
1091# CONFIG_KEYBOARD_LKKBD is not set
1092CONFIG_KEYBOARD_GPIO=y
1093# CONFIG_KEYBOARD_MATRIX is not set
1094# CONFIG_KEYBOARD_LM8323 is not set
1095# CONFIG_KEYBOARD_MAX7359 is not set
1096# CONFIG_KEYBOARD_NEWTON is not set
1097# CONFIG_KEYBOARD_OPENCORES is not set
1098# CONFIG_KEYBOARD_STOWAWAY is not set
1099# CONFIG_KEYBOARD_SUNKBD is not set
1100# CONFIG_KEYBOARD_TWL4030 is not set
1101# CONFIG_KEYBOARD_XTKBD is not set
1102CONFIG_INPUT_MOUSE=y
1103CONFIG_MOUSE_PS2=y
1104CONFIG_MOUSE_PS2_ALPS=y
1105CONFIG_MOUSE_PS2_LOGIPS2PP=y
1106CONFIG_MOUSE_PS2_SYNAPTICS=y
1107CONFIG_MOUSE_PS2_TRACKPOINT=y
1108# CONFIG_MOUSE_PS2_ELANTECH is not set
1109# CONFIG_MOUSE_PS2_SENTELIC is not set
1110# CONFIG_MOUSE_PS2_TOUCHKIT is not set
1111# CONFIG_MOUSE_SERIAL is not set
1112# CONFIG_MOUSE_APPLETOUCH is not set
1113# CONFIG_MOUSE_BCM5974 is not set
1114# CONFIG_MOUSE_VSXXXAA is not set
1115# CONFIG_MOUSE_GPIO is not set
1116# CONFIG_MOUSE_SYNAPTICS_I2C is not set
1117# CONFIG_INPUT_JOYSTICK is not set
1118# CONFIG_INPUT_TABLET is not set
1119CONFIG_INPUT_TOUCHSCREEN=y
1120CONFIG_TOUCHSCREEN_ADS7846=y
1121# CONFIG_TOUCHSCREEN_AD7877 is not set
1122# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
1123# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
1124# CONFIG_TOUCHSCREEN_AD7879 is not set
1125# CONFIG_TOUCHSCREEN_EETI is not set
1126# CONFIG_TOUCHSCREEN_FUJITSU is not set
1127# CONFIG_TOUCHSCREEN_GUNZE is not set
1128# CONFIG_TOUCHSCREEN_ELO is not set
1129# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
1130# CONFIG_TOUCHSCREEN_MCS5000 is not set
1131# CONFIG_TOUCHSCREEN_MTOUCH is not set
1132# CONFIG_TOUCHSCREEN_INEXIO is not set
1133# CONFIG_TOUCHSCREEN_MK712 is not set
1134# CONFIG_TOUCHSCREEN_PENMOUNT is not set
1135# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
1136# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
1137# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1138# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
1139# CONFIG_TOUCHSCREEN_TSC2007 is not set
1140# CONFIG_TOUCHSCREEN_W90X900 is not set
1141CONFIG_INPUT_MISC=y
1142# CONFIG_INPUT_ATI_REMOTE is not set
1143# CONFIG_INPUT_ATI_REMOTE2 is not set
1144# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1145# CONFIG_INPUT_POWERMATE is not set
1146# CONFIG_INPUT_YEALINK is not set
1147# CONFIG_INPUT_CM109 is not set
1148CONFIG_INPUT_TWL4030_PWRBUTTON=y
1149CONFIG_INPUT_UINPUT=y
1150# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
1151
1152#
1153# Hardware I/O ports
1154#
1155CONFIG_SERIO=y
1156CONFIG_SERIO_SERPORT=y
1157CONFIG_SERIO_LIBPS2=y
1158# CONFIG_SERIO_RAW is not set
1159# CONFIG_GAMEPORT is not set
1160
1161#
1162# Character devices
1163#
1164CONFIG_VT=y
1165CONFIG_CONSOLE_TRANSLATIONS=y
1166CONFIG_VT_CONSOLE=y
1167CONFIG_HW_CONSOLE=y
1168CONFIG_VT_HW_CONSOLE_BINDING=y
1169CONFIG_DEVKMEM=y
1170# CONFIG_SERIAL_NONSTANDARD is not set
1171
1172#
1173# Serial drivers
1174#
1175CONFIG_SERIAL_8250=y
1176CONFIG_SERIAL_8250_CONSOLE=y
1177CONFIG_SERIAL_8250_NR_UARTS=32
1178CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1179CONFIG_SERIAL_8250_EXTENDED=y
1180CONFIG_SERIAL_8250_MANY_PORTS=y
1181CONFIG_SERIAL_8250_SHARE_IRQ=y
1182CONFIG_SERIAL_8250_DETECT_IRQ=y
1183CONFIG_SERIAL_8250_RSA=y
1184
1185#
1186# Non-8250 serial port support
1187#
1188# CONFIG_SERIAL_MAX3100 is not set
1189CONFIG_SERIAL_CORE=y
1190CONFIG_SERIAL_CORE_CONSOLE=y
1191CONFIG_UNIX98_PTYS=y
1192# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
1193# CONFIG_LEGACY_PTYS is not set
1194# CONFIG_IPMI_HANDLER is not set
1195CONFIG_HW_RANDOM=y
1196# CONFIG_HW_RANDOM_TIMERIOMEM is not set
1197# CONFIG_R3964 is not set
1198# CONFIG_RAW_DRIVER is not set
1199# CONFIG_TCG_TPM is not set
1200CONFIG_I2C=y
1201CONFIG_I2C_BOARDINFO=y
1202CONFIG_I2C_COMPAT=y
1203CONFIG_I2C_CHARDEV=y
1204CONFIG_I2C_HELPER_AUTO=y
1205
1206#
1207# I2C Hardware Bus support
1208#
1209
1210#
1211# I2C system bus drivers (mostly embedded / system-on-chip)
1212#
1213# CONFIG_I2C_DESIGNWARE is not set
1214# CONFIG_I2C_GPIO is not set
1215# CONFIG_I2C_OCORES is not set
1216CONFIG_I2C_OMAP=y
1217# CONFIG_I2C_SIMTEC is not set
1218
1219#
1220# External I2C/SMBus adapter drivers
1221#
1222# CONFIG_I2C_PARPORT_LIGHT is not set
1223# CONFIG_I2C_TAOS_EVM is not set
1224# CONFIG_I2C_TINY_USB is not set
1225
1226#
1227# Other I2C/SMBus bus drivers
1228#
1229# CONFIG_I2C_PCA_PLATFORM is not set
1230# CONFIG_I2C_STUB is not set
1231
1232#
1233# Miscellaneous I2C Chip support
1234#
1235# CONFIG_DS1682 is not set
1236# CONFIG_SENSORS_TSL2550 is not set
1237# CONFIG_I2C_DEBUG_CORE is not set
1238# CONFIG_I2C_DEBUG_ALGO is not set
1239# CONFIG_I2C_DEBUG_BUS is not set
1240# CONFIG_I2C_DEBUG_CHIP is not set
1241CONFIG_SPI=y
1242# CONFIG_SPI_DEBUG is not set
1243CONFIG_SPI_MASTER=y
1244
1245#
1246# SPI Master Controller Drivers
1247#
1248# CONFIG_SPI_BITBANG is not set
1249# CONFIG_SPI_GPIO is not set
1250CONFIG_SPI_OMAP24XX=y
1251
1252#
1253# SPI Protocol Masters
1254#
1255CONFIG_SPI_SPIDEV=y
1256# CONFIG_SPI_TLE62X0 is not set
1257
1258#
1259# PPS support
1260#
1261# CONFIG_PPS is not set
1262CONFIG_ARCH_REQUIRE_GPIOLIB=y
1263CONFIG_GPIOLIB=y
1264# CONFIG_DEBUG_GPIO is not set
1265CONFIG_GPIO_SYSFS=y
1266
1267#
1268# Memory mapped GPIO expanders:
1269#
1270
1271#
1272# I2C GPIO expanders:
1273#
1274# CONFIG_GPIO_MAX732X is not set
1275# CONFIG_GPIO_PCA953X is not set
1276# CONFIG_GPIO_PCF857X is not set
1277CONFIG_GPIO_TWL4030=y
1278
1279#
1280# PCI GPIO expanders:
1281#
1282
1283#
1284# SPI GPIO expanders:
1285#
1286# CONFIG_GPIO_MAX7301 is not set
1287# CONFIG_GPIO_MCP23S08 is not set
1288# CONFIG_GPIO_MC33880 is not set
1289
1290#
1291# AC97 GPIO expanders:
1292#
1293# CONFIG_W1 is not set
1294CONFIG_POWER_SUPPLY=y
1295# CONFIG_POWER_SUPPLY_DEBUG is not set
1296# CONFIG_PDA_POWER is not set
1297# CONFIG_BATTERY_DS2760 is not set
1298# CONFIG_BATTERY_DS2782 is not set
1299CONFIG_BATTERY_BQ27x00=y
1300# CONFIG_BATTERY_MAX17040 is not set
1301CONFIG_HWMON=y
1302# CONFIG_HWMON_VID is not set
1303# CONFIG_HWMON_DEBUG_CHIP is not set
1304
1305#
1306# Native drivers
1307#
1308# CONFIG_SENSORS_AD7414 is not set
1309# CONFIG_SENSORS_AD7418 is not set
1310# CONFIG_SENSORS_ADCXX is not set
1311# CONFIG_SENSORS_ADM1021 is not set
1312# CONFIG_SENSORS_ADM1025 is not set
1313# CONFIG_SENSORS_ADM1026 is not set
1314# CONFIG_SENSORS_ADM1029 is not set
1315# CONFIG_SENSORS_ADM1031 is not set
1316# CONFIG_SENSORS_ADM9240 is not set
1317# CONFIG_SENSORS_ADT7462 is not set
1318# CONFIG_SENSORS_ADT7470 is not set
1319# CONFIG_SENSORS_ADT7473 is not set
1320# CONFIG_SENSORS_ADT7475 is not set
1321# CONFIG_SENSORS_ATXP1 is not set
1322# CONFIG_SENSORS_DS1621 is not set
1323# CONFIG_SENSORS_F71805F is not set
1324# CONFIG_SENSORS_F71882FG is not set
1325# CONFIG_SENSORS_F75375S is not set
1326# CONFIG_SENSORS_G760A is not set
1327# CONFIG_SENSORS_GL518SM is not set
1328# CONFIG_SENSORS_GL520SM is not set
1329# CONFIG_SENSORS_IT87 is not set
1330# CONFIG_SENSORS_LM63 is not set
1331# CONFIG_SENSORS_LM70 is not set
1332# CONFIG_SENSORS_LM75 is not set
1333# CONFIG_SENSORS_LM77 is not set
1334# CONFIG_SENSORS_LM78 is not set
1335# CONFIG_SENSORS_LM80 is not set
1336# CONFIG_SENSORS_LM83 is not set
1337# CONFIG_SENSORS_LM85 is not set
1338# CONFIG_SENSORS_LM87 is not set
1339# CONFIG_SENSORS_LM90 is not set
1340# CONFIG_SENSORS_LM92 is not set
1341# CONFIG_SENSORS_LM93 is not set
1342# CONFIG_SENSORS_LTC4215 is not set
1343# CONFIG_SENSORS_LTC4245 is not set
1344# CONFIG_SENSORS_LM95241 is not set
1345# CONFIG_SENSORS_MAX1111 is not set
1346# CONFIG_SENSORS_MAX1619 is not set
1347# CONFIG_SENSORS_MAX6650 is not set
1348# CONFIG_SENSORS_PC87360 is not set
1349# CONFIG_SENSORS_PC87427 is not set
1350# CONFIG_SENSORS_PCF8591 is not set
1351# CONFIG_SENSORS_SHT15 is not set
1352# CONFIG_SENSORS_DME1737 is not set
1353# CONFIG_SENSORS_SMSC47M1 is not set
1354# CONFIG_SENSORS_SMSC47M192 is not set
1355# CONFIG_SENSORS_SMSC47B397 is not set
1356# CONFIG_SENSORS_ADS7828 is not set
1357# CONFIG_SENSORS_THMC50 is not set
1358# CONFIG_SENSORS_TMP401 is not set
1359# CONFIG_SENSORS_TMP421 is not set
1360# CONFIG_SENSORS_VT1211 is not set
1361# CONFIG_SENSORS_W83781D is not set
1362# CONFIG_SENSORS_W83791D is not set
1363# CONFIG_SENSORS_W83792D is not set
1364# CONFIG_SENSORS_W83793 is not set
1365# CONFIG_SENSORS_W83L785TS is not set
1366# CONFIG_SENSORS_W83L786NG is not set
1367# CONFIG_SENSORS_W83627HF is not set
1368# CONFIG_SENSORS_W83627EHF is not set
1369# CONFIG_SENSORS_LIS3_SPI is not set
1370CONFIG_THERMAL=y
1371CONFIG_THERMAL_HWMON=y
1372CONFIG_WATCHDOG=y
1373CONFIG_WATCHDOG_NOWAYOUT=y
1374
1375#
1376# Watchdog Device Drivers
1377#
1378# CONFIG_SOFT_WATCHDOG is not set
1379CONFIG_OMAP_WATCHDOG=y
1380# CONFIG_TWL4030_WATCHDOG is not set
1381
1382#
1383# USB-based Watchdog Cards
1384#
1385# CONFIG_USBPCWATCHDOG is not set
1386CONFIG_SSB_POSSIBLE=y
1387
1388#
1389# Sonics Silicon Backplane
1390#
1391# CONFIG_SSB is not set
1392
1393#
1394# Multifunction device drivers
1395#
1396# CONFIG_MFD_CORE is not set
1397# CONFIG_MFD_SM501 is not set
1398# CONFIG_MFD_ASIC3 is not set
1399# CONFIG_HTC_EGPIO is not set
1400# CONFIG_HTC_PASIC3 is not set
1401# CONFIG_TPS65010 is not set
1402CONFIG_TWL4030_CORE=y
1403# CONFIG_TWL4030_POWER is not set
1404# CONFIG_TWL4030_CODEC is not set
1405# CONFIG_MFD_TMIO is not set
1406# CONFIG_MFD_T7L66XB is not set
1407# CONFIG_MFD_TC6387XB is not set
1408# CONFIG_MFD_TC6393XB is not set
1409# CONFIG_PMIC_DA903X is not set
1410# CONFIG_MFD_WM8400 is not set
1411# CONFIG_MFD_WM831X is not set
1412# CONFIG_MFD_WM8350_I2C is not set
1413# CONFIG_MFD_PCF50633 is not set
1414# CONFIG_MFD_MC13783 is not set
1415# CONFIG_AB3100_CORE is not set
1416# CONFIG_EZX_PCAP is not set
1417CONFIG_REGULATOR=y
1418# CONFIG_REGULATOR_DEBUG is not set
1419# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
1420# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
1421# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
1422# CONFIG_REGULATOR_BQ24022 is not set
1423# CONFIG_REGULATOR_MAX1586 is not set
1424CONFIG_REGULATOR_TWL4030=y
1425# CONFIG_REGULATOR_LP3971 is not set
1426# CONFIG_REGULATOR_TPS65023 is not set
1427# CONFIG_REGULATOR_TPS6507X is not set
1428# CONFIG_MEDIA_SUPPORT is not set
1429
1430#
1431# Graphics support
1432#
1433# CONFIG_VGASTATE is not set
1434# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1435CONFIG_FB=y
1436# CONFIG_FIRMWARE_EDID is not set
1437# CONFIG_FB_DDC is not set
1438# CONFIG_FB_BOOT_VESA_SUPPORT is not set
1439# CONFIG_FB_CFB_FILLRECT is not set
1440# CONFIG_FB_CFB_COPYAREA is not set
1441# CONFIG_FB_CFB_IMAGEBLIT is not set
1442# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1443# CONFIG_FB_SYS_FILLRECT is not set
1444# CONFIG_FB_SYS_COPYAREA is not set
1445# CONFIG_FB_SYS_IMAGEBLIT is not set
1446# CONFIG_FB_FOREIGN_ENDIAN is not set
1447# CONFIG_FB_SYS_FOPS is not set
1448# CONFIG_FB_SVGALIB is not set
1449# CONFIG_FB_MACMODES is not set
1450# CONFIG_FB_BACKLIGHT is not set
1451# CONFIG_FB_MODE_HELPERS is not set
1452# CONFIG_FB_TILEBLITTING is not set
1453
1454#
1455# Frame buffer hardware drivers
1456#
1457# CONFIG_FB_S1D13XXX is not set
1458# CONFIG_FB_VIRTUAL is not set
1459# CONFIG_FB_METRONOME is not set
1460# CONFIG_FB_MB862XX is not set
1461# CONFIG_FB_BROADSHEET is not set
1462# CONFIG_FB_OMAP is not set
1463# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1464CONFIG_BACKLIGHT_CLASS_DEVICE=y
1465CONFIG_BACKLIGHT_GENERIC=y
1466
1467#
1468# Display device support
1469#
1470CONFIG_DISPLAY_SUPPORT=y
1471
1472#
1473# Display hardware drivers
1474#
1475
1476#
1477# Console display driver support
1478#
1479# CONFIG_VGA_CONSOLE is not set
1480CONFIG_DUMMY_CONSOLE=y
1481CONFIG_FRAMEBUFFER_CONSOLE=y
1482# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1483CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
1484# CONFIG_FONTS is not set
1485CONFIG_FONT_8x8=y
1486CONFIG_FONT_8x16=y
1487CONFIG_LOGO=y
1488CONFIG_LOGO_LINUX_MONO=y
1489CONFIG_LOGO_LINUX_VGA16=y
1490CONFIG_LOGO_LINUX_CLUT224=y
1491CONFIG_SOUND=y
1492CONFIG_SOUND_OSS_CORE=y
1493CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1494CONFIG_SND=y
1495CONFIG_SND_TIMER=y
1496CONFIG_SND_PCM=y
1497CONFIG_SND_HWDEP=y
1498CONFIG_SND_RAWMIDI=y
1499CONFIG_SND_JACK=y
1500CONFIG_SND_SEQUENCER=m
1501# CONFIG_SND_SEQ_DUMMY is not set
1502CONFIG_SND_OSSEMUL=y
1503CONFIG_SND_MIXER_OSS=y
1504CONFIG_SND_PCM_OSS=y
1505CONFIG_SND_PCM_OSS_PLUGINS=y
1506CONFIG_SND_SEQUENCER_OSS=y
1507CONFIG_SND_HRTIMER=m
1508CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
1509# CONFIG_SND_DYNAMIC_MINORS is not set
1510CONFIG_SND_SUPPORT_OLD_API=y
1511CONFIG_SND_VERBOSE_PROCFS=y
1512# CONFIG_SND_VERBOSE_PRINTK is not set
1513# CONFIG_SND_DEBUG is not set
1514CONFIG_SND_RAWMIDI_SEQ=m
1515# CONFIG_SND_OPL3_LIB_SEQ is not set
1516# CONFIG_SND_OPL4_LIB_SEQ is not set
1517# CONFIG_SND_SBAWE_SEQ is not set
1518# CONFIG_SND_EMU10K1_SEQ is not set
1519CONFIG_SND_DRIVERS=y
1520# CONFIG_SND_DUMMY is not set
1521# CONFIG_SND_VIRMIDI is not set
1522# CONFIG_SND_MTPAV is not set
1523# CONFIG_SND_SERIAL_U16550 is not set
1524# CONFIG_SND_MPU401 is not set
1525# CONFIG_SND_ARM is not set
1526CONFIG_SND_SPI=y
1527CONFIG_SND_USB=y
1528CONFIG_SND_USB_AUDIO=y
1529CONFIG_SND_USB_CAIAQ=m
1530CONFIG_SND_USB_CAIAQ_INPUT=y
1531CONFIG_SND_SOC=y
1532CONFIG_SND_OMAP_SOC=y
1533CONFIG_SND_SOC_I2C_AND_SPI=y
1534# CONFIG_SND_SOC_ALL_CODECS is not set
1535# CONFIG_SOUND_PRIME is not set
1536CONFIG_HID_SUPPORT=y
1537CONFIG_HID=y
1538# CONFIG_HIDRAW is not set
1539
1540#
1541# USB Input Devices
1542#
1543CONFIG_USB_HID=y
1544# CONFIG_HID_PID is not set
1545# CONFIG_USB_HIDDEV is not set
1546
1547#
1548# Special HID drivers
1549#
1550# CONFIG_HID_A4TECH is not set
1551# CONFIG_HID_APPLE is not set
1552# CONFIG_HID_BELKIN is not set
1553# CONFIG_HID_CHERRY is not set
1554# CONFIG_HID_CHICONY is not set
1555# CONFIG_HID_CYPRESS is not set
1556# CONFIG_HID_DRAGONRISE is not set
1557# CONFIG_HID_EZKEY is not set
1558# CONFIG_HID_KYE is not set
1559# CONFIG_HID_GYRATION is not set
1560# CONFIG_HID_TWINHAN is not set
1561# CONFIG_HID_KENSINGTON is not set
1562# CONFIG_HID_LOGITECH is not set
1563# CONFIG_HID_MICROSOFT is not set
1564# CONFIG_HID_MONTEREY is not set
1565# CONFIG_HID_NTRIG is not set
1566# CONFIG_HID_PANTHERLORD is not set
1567# CONFIG_HID_PETALYNX is not set
1568# CONFIG_HID_SAMSUNG is not set
1569# CONFIG_HID_SONY is not set
1570# CONFIG_HID_SUNPLUS is not set
1571# CONFIG_HID_GREENASIA is not set
1572# CONFIG_HID_SMARTJOYPLUS is not set
1573# CONFIG_HID_TOPSEED is not set
1574# CONFIG_HID_THRUSTMASTER is not set
1575# CONFIG_HID_WACOM is not set
1576# CONFIG_HID_ZEROPLUS is not set
1577CONFIG_USB_SUPPORT=y
1578CONFIG_USB_ARCH_HAS_HCD=y
1579CONFIG_USB_ARCH_HAS_OHCI=y
1580# CONFIG_USB_ARCH_HAS_EHCI is not set
1581CONFIG_USB=y
1582# CONFIG_USB_DEBUG is not set
1583# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1584
1585#
1586# Miscellaneous USB options
1587#
1588CONFIG_USB_DEVICEFS=y
1589CONFIG_USB_DEVICE_CLASS=y
1590# CONFIG_USB_DYNAMIC_MINORS is not set
1591CONFIG_USB_SUSPEND=y
1592CONFIG_USB_OTG=y
1593# CONFIG_USB_OTG_WHITELIST is not set
1594# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1595CONFIG_USB_MON=y
1596# CONFIG_USB_WUSB is not set
1597# CONFIG_USB_WUSB_CBAF is not set
1598
1599#
1600# USB Host Controller Drivers
1601#
1602# CONFIG_USB_C67X00_HCD is not set
1603CONFIG_USB_OXU210HP_HCD=y
1604# CONFIG_USB_ISP116X_HCD is not set
1605# CONFIG_USB_ISP1760_HCD is not set
1606# CONFIG_USB_ISP1362_HCD is not set
1607# CONFIG_USB_OHCI_HCD is not set
1608# CONFIG_USB_SL811_HCD is not set
1609# CONFIG_USB_R8A66597_HCD is not set
1610# CONFIG_USB_HWA_HCD is not set
1611CONFIG_USB_MUSB_HDRC=y
1612CONFIG_USB_MUSB_SOC=y
1613
1614#
1615# OMAP 343x high speed USB support
1616#
1617# CONFIG_USB_MUSB_HOST is not set
1618# CONFIG_USB_MUSB_PERIPHERAL is not set
1619CONFIG_USB_MUSB_OTG=y
1620CONFIG_USB_GADGET_MUSB_HDRC=y
1621CONFIG_USB_MUSB_HDRC_HCD=y
1622# CONFIG_MUSB_PIO_ONLY is not set
1623CONFIG_USB_INVENTRA_DMA=y
1624# CONFIG_USB_TI_CPPI_DMA is not set
1625# CONFIG_USB_MUSB_DEBUG is not set
1626
1627#
1628# USB Device Class drivers
1629#
1630CONFIG_USB_ACM=m
1631CONFIG_USB_PRINTER=m
1632CONFIG_USB_WDM=m
1633CONFIG_USB_TMC=m
1634
1635#
1636# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1637#
1638
1639#
1640# also be needed; see USB_STORAGE Help for more info
1641#
1642CONFIG_USB_STORAGE=y
1643# CONFIG_USB_STORAGE_DEBUG is not set
1644# CONFIG_USB_STORAGE_DATAFAB is not set
1645# CONFIG_USB_STORAGE_FREECOM is not set
1646# CONFIG_USB_STORAGE_ISD200 is not set
1647# CONFIG_USB_STORAGE_USBAT is not set
1648# CONFIG_USB_STORAGE_SDDR09 is not set
1649# CONFIG_USB_STORAGE_SDDR55 is not set
1650# CONFIG_USB_STORAGE_JUMPSHOT is not set
1651# CONFIG_USB_STORAGE_ALAUDA is not set
1652# CONFIG_USB_STORAGE_ONETOUCH is not set
1653# CONFIG_USB_STORAGE_KARMA is not set
1654# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1655# CONFIG_USB_LIBUSUAL is not set
1656
1657#
1658# USB Imaging devices
1659#
1660# CONFIG_USB_MDC800 is not set
1661# CONFIG_USB_MICROTEK is not set
1662
1663#
1664# USB port drivers
1665#
1666CONFIG_USB_SERIAL=m
1667CONFIG_USB_EZUSB=y
1668CONFIG_USB_SERIAL_GENERIC=y
1669CONFIG_USB_SERIAL_AIRCABLE=m
1670CONFIG_USB_SERIAL_ARK3116=m
1671CONFIG_USB_SERIAL_BELKIN=m
1672CONFIG_USB_SERIAL_CH341=m
1673CONFIG_USB_SERIAL_WHITEHEAT=m
1674CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1675# CONFIG_USB_SERIAL_CP210X is not set
1676CONFIG_USB_SERIAL_CYPRESS_M8=m
1677CONFIG_USB_SERIAL_EMPEG=m
1678CONFIG_USB_SERIAL_FTDI_SIO=m
1679CONFIG_USB_SERIAL_FUNSOFT=m
1680CONFIG_USB_SERIAL_VISOR=m
1681CONFIG_USB_SERIAL_IPAQ=m
1682CONFIG_USB_SERIAL_IR=m
1683CONFIG_USB_SERIAL_EDGEPORT=m
1684CONFIG_USB_SERIAL_EDGEPORT_TI=m
1685CONFIG_USB_SERIAL_GARMIN=m
1686CONFIG_USB_SERIAL_IPW=m
1687CONFIG_USB_SERIAL_IUU=m
1688CONFIG_USB_SERIAL_KEYSPAN_PDA=m
1689CONFIG_USB_SERIAL_KEYSPAN=m
1690CONFIG_USB_SERIAL_KEYSPAN_MPR=y
1691CONFIG_USB_SERIAL_KEYSPAN_USA28=y
1692CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
1693CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
1694CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
1695CONFIG_USB_SERIAL_KEYSPAN_USA19=y
1696CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
1697CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
1698CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
1699CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
1700CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
1701CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1702CONFIG_USB_SERIAL_KLSI=m
1703CONFIG_USB_SERIAL_KOBIL_SCT=m
1704CONFIG_USB_SERIAL_MCT_U232=m
1705CONFIG_USB_SERIAL_MOS7720=m
1706CONFIG_USB_SERIAL_MOS7840=m
1707CONFIG_USB_SERIAL_MOTOROLA=m
1708CONFIG_USB_SERIAL_NAVMAN=m
1709CONFIG_USB_SERIAL_PL2303=m
1710CONFIG_USB_SERIAL_OTI6858=m
1711# CONFIG_USB_SERIAL_QUALCOMM is not set
1712CONFIG_USB_SERIAL_SPCP8X5=m
1713CONFIG_USB_SERIAL_HP4X=m
1714CONFIG_USB_SERIAL_SAFE=m
1715# CONFIG_USB_SERIAL_SAFE_PADDED is not set
1716CONFIG_USB_SERIAL_SIEMENS_MPI=m
1717CONFIG_USB_SERIAL_SIERRAWIRELESS=m
1718# CONFIG_USB_SERIAL_SYMBOL is not set
1719CONFIG_USB_SERIAL_TI=m
1720CONFIG_USB_SERIAL_CYBERJACK=m
1721CONFIG_USB_SERIAL_XIRCOM=m
1722CONFIG_USB_SERIAL_OPTION=m
1723CONFIG_USB_SERIAL_OMNINET=m
1724CONFIG_USB_SERIAL_OPTICON=m
1725CONFIG_USB_SERIAL_DEBUG=m
1726
1727#
1728# USB Miscellaneous drivers
1729#
1730CONFIG_USB_EMI62=m
1731CONFIG_USB_EMI26=m
1732# CONFIG_USB_ADUTUX is not set
1733# CONFIG_USB_SEVSEG is not set
1734# CONFIG_USB_RIO500 is not set
1735# CONFIG_USB_LEGOTOWER is not set
1736# CONFIG_USB_LCD is not set
1737# CONFIG_USB_BERRY_CHARGE is not set
1738# CONFIG_USB_LED is not set
1739# CONFIG_USB_CYPRESS_CY7C63 is not set
1740# CONFIG_USB_CYTHERM is not set
1741# CONFIG_USB_IDMOUSE is not set
1742# CONFIG_USB_FTDI_ELAN is not set
1743# CONFIG_USB_APPLEDISPLAY is not set
1744CONFIG_USB_SISUSBVGA=m
1745CONFIG_USB_SISUSBVGA_CON=y
1746# CONFIG_USB_LD is not set
1747# CONFIG_USB_TRANCEVIBRATOR is not set
1748# CONFIG_USB_IOWARRIOR is not set
1749CONFIG_USB_TEST=m
1750# CONFIG_USB_ISIGHTFW is not set
1751# CONFIG_USB_VST is not set
1752# CONFIG_USB_ATM is not set
1753CONFIG_USB_GADGET=m
1754# CONFIG_USB_GADGET_DEBUG is not set
1755# CONFIG_USB_GADGET_DEBUG_FILES is not set
1756CONFIG_USB_GADGET_DEBUG_FS=y
1757CONFIG_USB_GADGET_VBUS_DRAW=2
1758CONFIG_USB_GADGET_SELECTED=y
1759# CONFIG_USB_GADGET_AT91 is not set
1760# CONFIG_USB_GADGET_ATMEL_USBA is not set
1761# CONFIG_USB_GADGET_FSL_USB2 is not set
1762# CONFIG_USB_GADGET_LH7A40X is not set
1763# CONFIG_USB_GADGET_OMAP is not set
1764# CONFIG_USB_GADGET_PXA25X is not set
1765# CONFIG_USB_GADGET_R8A66597 is not set
1766# CONFIG_USB_GADGET_PXA27X is not set
1767# CONFIG_USB_GADGET_S3C_HSOTG is not set
1768# CONFIG_USB_GADGET_IMX is not set
1769# CONFIG_USB_GADGET_S3C2410 is not set
1770# CONFIG_USB_GADGET_M66592 is not set
1771# CONFIG_USB_GADGET_AMD5536UDC is not set
1772# CONFIG_USB_GADGET_FSL_QE is not set
1773# CONFIG_USB_GADGET_CI13XXX is not set
1774# CONFIG_USB_GADGET_NET2280 is not set
1775# CONFIG_USB_GADGET_GOKU is not set
1776# CONFIG_USB_GADGET_LANGWELL is not set
1777# CONFIG_USB_GADGET_DUMMY_HCD is not set
1778CONFIG_USB_GADGET_DUALSPEED=y
1779CONFIG_USB_ZERO=m
1780CONFIG_USB_ZERO_HNPTEST=y
1781# CONFIG_USB_AUDIO is not set
1782CONFIG_USB_ETH=m
1783CONFIG_USB_ETH_RNDIS=y
1784# CONFIG_USB_ETH_EEM is not set
1785CONFIG_USB_GADGETFS=m
1786CONFIG_USB_FILE_STORAGE=m
1787# CONFIG_USB_FILE_STORAGE_TEST is not set
1788CONFIG_USB_G_SERIAL=m
1789CONFIG_USB_MIDI_GADGET=m
1790CONFIG_USB_G_PRINTER=m
1791CONFIG_USB_CDC_COMPOSITE=m
1792
1793#
1794# OTG and related infrastructure
1795#
1796CONFIG_USB_OTG_UTILS=y
1797CONFIG_USB_GPIO_VBUS=y
1798# CONFIG_ISP1301_OMAP is not set
1799CONFIG_TWL4030_USB=y
1800# CONFIG_NOP_USB_XCEIV is not set
1801CONFIG_MMC=y
1802# CONFIG_MMC_DEBUG is not set
1803CONFIG_MMC_UNSAFE_RESUME=y
1804
1805#
1806# MMC/SD/SDIO Card Drivers
1807#
1808CONFIG_MMC_BLOCK=y
1809CONFIG_MMC_BLOCK_BOUNCE=y
1810CONFIG_SDIO_UART=y
1811# CONFIG_MMC_TEST is not set
1812
1813#
1814# MMC/SD/SDIO Host Controller Drivers
1815#
1816# CONFIG_MMC_SDHCI is not set
1817# CONFIG_MMC_OMAP is not set
1818CONFIG_MMC_OMAP_HS=y
1819# CONFIG_MMC_AT91 is not set
1820# CONFIG_MMC_ATMELMCI is not set
1821CONFIG_MMC_SPI=m
1822# CONFIG_MEMSTICK is not set
1823CONFIG_NEW_LEDS=y
1824CONFIG_LEDS_CLASS=y
1825
1826#
1827# LED drivers
1828#
1829# CONFIG_LEDS_PCA9532 is not set
1830CONFIG_LEDS_GPIO=y
1831CONFIG_LEDS_GPIO_PLATFORM=y
1832# CONFIG_LEDS_LP3944 is not set
1833# CONFIG_LEDS_PCA955X is not set
1834# CONFIG_LEDS_DAC124S085 is not set
1835# CONFIG_LEDS_BD2802 is not set
1836
1837#
1838# LED Triggers
1839#
1840CONFIG_LEDS_TRIGGERS=y
1841CONFIG_LEDS_TRIGGER_TIMER=m
1842CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1843CONFIG_LEDS_TRIGGER_BACKLIGHT=m
1844# CONFIG_LEDS_TRIGGER_GPIO is not set
1845CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
1846
1847#
1848# iptables trigger is under Netfilter config (LED target)
1849#
1850# CONFIG_ACCESSIBILITY is not set
1851CONFIG_RTC_LIB=y
1852CONFIG_RTC_CLASS=y
1853CONFIG_RTC_HCTOSYS=y
1854CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1855# CONFIG_RTC_DEBUG is not set
1856
1857#
1858# RTC interfaces
1859#
1860CONFIG_RTC_INTF_SYSFS=y
1861CONFIG_RTC_INTF_PROC=y
1862CONFIG_RTC_INTF_DEV=y
1863# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1864# CONFIG_RTC_DRV_TEST is not set
1865
1866#
1867# I2C RTC drivers
1868#
1869# CONFIG_RTC_DRV_DS1307 is not set
1870# CONFIG_RTC_DRV_DS1374 is not set
1871# CONFIG_RTC_DRV_DS1672 is not set
1872# CONFIG_RTC_DRV_MAX6900 is not set
1873# CONFIG_RTC_DRV_RS5C372 is not set
1874# CONFIG_RTC_DRV_ISL1208 is not set
1875# CONFIG_RTC_DRV_X1205 is not set
1876# CONFIG_RTC_DRV_PCF8563 is not set
1877# CONFIG_RTC_DRV_PCF8583 is not set
1878# CONFIG_RTC_DRV_M41T80 is not set
1879CONFIG_RTC_DRV_TWL4030=y
1880# CONFIG_RTC_DRV_S35390A is not set
1881# CONFIG_RTC_DRV_FM3130 is not set
1882# CONFIG_RTC_DRV_RX8581 is not set
1883# CONFIG_RTC_DRV_RX8025 is not set
1884
1885#
1886# SPI RTC drivers
1887#
1888# CONFIG_RTC_DRV_M41T94 is not set
1889# CONFIG_RTC_DRV_DS1305 is not set
1890# CONFIG_RTC_DRV_DS1390 is not set
1891# CONFIG_RTC_DRV_MAX6902 is not set
1892# CONFIG_RTC_DRV_R9701 is not set
1893# CONFIG_RTC_DRV_RS5C348 is not set
1894# CONFIG_RTC_DRV_DS3234 is not set
1895# CONFIG_RTC_DRV_PCF2123 is not set
1896
1897#
1898# Platform RTC drivers
1899#
1900# CONFIG_RTC_DRV_CMOS is not set
1901# CONFIG_RTC_DRV_DS1286 is not set
1902# CONFIG_RTC_DRV_DS1511 is not set
1903# CONFIG_RTC_DRV_DS1553 is not set
1904# CONFIG_RTC_DRV_DS1742 is not set
1905# CONFIG_RTC_DRV_STK17TA8 is not set
1906# CONFIG_RTC_DRV_M48T86 is not set
1907# CONFIG_RTC_DRV_M48T35 is not set
1908# CONFIG_RTC_DRV_M48T59 is not set
1909# CONFIG_RTC_DRV_BQ4802 is not set
1910# CONFIG_RTC_DRV_V3020 is not set
1911
1912#
1913# on-CPU RTC drivers
1914#
1915# CONFIG_DMADEVICES is not set
1916# CONFIG_AUXDISPLAY is not set
1917CONFIG_UIO=m
1918CONFIG_UIO_PDRV=m
1919CONFIG_UIO_PDRV_GENIRQ=m
1920# CONFIG_UIO_SMX is not set
1921# CONFIG_UIO_SERCOS3 is not set
1922
1923#
1924# TI VLYNQ
1925#
1926CONFIG_STAGING=y
1927# CONFIG_STAGING_EXCLUDE_BUILD is not set
1928# CONFIG_USB_IP_COMMON is not set
1929# CONFIG_W35UND is not set
1930# CONFIG_PRISM2_USB is not set
1931# CONFIG_ECHO is not set
1932# CONFIG_OTUS is not set
1933# CONFIG_COMEDI is not set
1934# CONFIG_ASUS_OLED is not set
1935# CONFIG_INPUT_MIMIO is not set
1936# CONFIG_TRANZPORT is not set
1937
1938#
1939# Android
1940#
1941
1942#
1943# Qualcomm MSM Camera And Video
1944#
1945
1946#
1947# Camera Sensor Selection
1948#
1949# CONFIG_INPUT_GPIO is not set
1950# CONFIG_DST is not set
1951# CONFIG_POHMELFS is not set
1952# CONFIG_PLAN9AUTH is not set
1953# CONFIG_LINE6_USB is not set
1954# CONFIG_USB_SERIAL_QUATECH2 is not set
1955# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
1956# CONFIG_VT6656 is not set
1957# CONFIG_FB_UDL is not set
1958
1959#
1960# RAR Register Driver
1961#
1962# CONFIG_RAR_REGISTER is not set
1963# CONFIG_IIO is not set
1964
1965#
1966# File systems
1967#
1968CONFIG_EXT2_FS=y
1969# CONFIG_EXT2_FS_XATTR is not set
1970# CONFIG_EXT2_FS_XIP is not set
1971CONFIG_EXT3_FS=y
1972# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1973# CONFIG_EXT3_FS_XATTR is not set
1974CONFIG_EXT4_FS=m
1975CONFIG_EXT4_FS_XATTR=y
1976# CONFIG_EXT4_FS_POSIX_ACL is not set
1977# CONFIG_EXT4_FS_SECURITY is not set
1978# CONFIG_EXT4_DEBUG is not set
1979CONFIG_JBD=y
1980# CONFIG_JBD_DEBUG is not set
1981CONFIG_JBD2=m
1982# CONFIG_JBD2_DEBUG is not set
1983CONFIG_FS_MBCACHE=m
1984CONFIG_REISERFS_FS=m
1985# CONFIG_REISERFS_CHECK is not set
1986CONFIG_REISERFS_PROC_INFO=y
1987CONFIG_REISERFS_FS_XATTR=y
1988# CONFIG_REISERFS_FS_POSIX_ACL is not set
1989# CONFIG_REISERFS_FS_SECURITY is not set
1990CONFIG_JFS_FS=m
1991# CONFIG_JFS_POSIX_ACL is not set
1992# CONFIG_JFS_SECURITY is not set
1993# CONFIG_JFS_DEBUG is not set
1994# CONFIG_JFS_STATISTICS is not set
1995CONFIG_FS_POSIX_ACL=y
1996CONFIG_XFS_FS=m
1997# CONFIG_XFS_QUOTA is not set
1998# CONFIG_XFS_POSIX_ACL is not set
1999# CONFIG_XFS_RT is not set
2000# CONFIG_XFS_DEBUG is not set
2001# CONFIG_GFS2_FS is not set
2002# CONFIG_OCFS2_FS is not set
2003# CONFIG_BTRFS_FS is not set
2004# CONFIG_NILFS2_FS is not set
2005CONFIG_FILE_LOCKING=y
2006CONFIG_FSNOTIFY=y
2007CONFIG_DNOTIFY=y
2008CONFIG_INOTIFY=y
2009CONFIG_INOTIFY_USER=y
2010CONFIG_QUOTA=y
2011# CONFIG_QUOTA_NETLINK_INTERFACE is not set
2012CONFIG_PRINT_QUOTA_WARNING=y
2013CONFIG_QUOTA_TREE=y
2014# CONFIG_QFMT_V1 is not set
2015CONFIG_QFMT_V2=y
2016CONFIG_QUOTACTL=y
2017# CONFIG_AUTOFS_FS is not set
2018CONFIG_AUTOFS4_FS=m
2019CONFIG_FUSE_FS=y
2020# CONFIG_CUSE is not set
2021
2022#
2023# Caches
2024#
2025# CONFIG_FSCACHE is not set
2026
2027#
2028# CD-ROM/DVD Filesystems
2029#
2030CONFIG_ISO9660_FS=m
2031CONFIG_JOLIET=y
2032CONFIG_ZISOFS=y
2033CONFIG_UDF_FS=m
2034CONFIG_UDF_NLS=y
2035
2036#
2037# DOS/FAT/NT Filesystems
2038#
2039CONFIG_FAT_FS=y
2040CONFIG_MSDOS_FS=y
2041CONFIG_VFAT_FS=y
2042CONFIG_FAT_DEFAULT_CODEPAGE=437
2043CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
2044CONFIG_NTFS_FS=m
2045# CONFIG_NTFS_DEBUG is not set
2046CONFIG_NTFS_RW=y
2047
2048#
2049# Pseudo filesystems
2050#
2051CONFIG_PROC_FS=y
2052CONFIG_PROC_SYSCTL=y
2053CONFIG_PROC_PAGE_MONITOR=y
2054CONFIG_SYSFS=y
2055CONFIG_TMPFS=y
2056# CONFIG_TMPFS_POSIX_ACL is not set
2057# CONFIG_HUGETLB_PAGE is not set
2058CONFIG_CONFIGFS_FS=m
2059CONFIG_MISC_FILESYSTEMS=y
2060# CONFIG_ADFS_FS is not set
2061# CONFIG_AFFS_FS is not set
2062# CONFIG_ECRYPT_FS is not set
2063# CONFIG_HFS_FS is not set
2064# CONFIG_HFSPLUS_FS is not set
2065# CONFIG_BEFS_FS is not set
2066# CONFIG_BFS_FS is not set
2067# CONFIG_EFS_FS is not set
2068CONFIG_JFFS2_FS=y
2069CONFIG_JFFS2_FS_DEBUG=0
2070CONFIG_JFFS2_FS_WRITEBUFFER=y
2071# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
2072CONFIG_JFFS2_SUMMARY=y
2073CONFIG_JFFS2_FS_XATTR=y
2074CONFIG_JFFS2_FS_POSIX_ACL=y
2075CONFIG_JFFS2_FS_SECURITY=y
2076CONFIG_JFFS2_COMPRESSION_OPTIONS=y
2077CONFIG_JFFS2_ZLIB=y
2078CONFIG_JFFS2_LZO=y
2079CONFIG_JFFS2_RTIME=y
2080CONFIG_JFFS2_RUBIN=y
2081# CONFIG_JFFS2_CMODE_NONE is not set
2082# CONFIG_JFFS2_CMODE_PRIORITY is not set
2083# CONFIG_JFFS2_CMODE_SIZE is not set
2084CONFIG_JFFS2_CMODE_FAVOURLZO=y
2085CONFIG_UBIFS_FS=y
2086CONFIG_UBIFS_FS_XATTR=y
2087CONFIG_UBIFS_FS_ADVANCED_COMPR=y
2088CONFIG_UBIFS_FS_LZO=y
2089CONFIG_UBIFS_FS_ZLIB=y
2090# CONFIG_UBIFS_FS_DEBUG is not set
2091# CONFIG_CRAMFS is not set
2092CONFIG_SQUASHFS=y
2093# CONFIG_SQUASHFS_EMBEDDED is not set
2094CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
2095# CONFIG_VXFS_FS is not set
2096# CONFIG_MINIX_FS is not set
2097# CONFIG_OMFS_FS is not set
2098# CONFIG_HPFS_FS is not set
2099# CONFIG_QNX4FS_FS is not set
2100# CONFIG_ROMFS_FS is not set
2101# CONFIG_SYSV_FS is not set
2102# CONFIG_UFS_FS is not set
2103CONFIG_NETWORK_FILESYSTEMS=y
2104CONFIG_NFS_FS=y
2105CONFIG_NFS_V3=y
2106# CONFIG_NFS_V3_ACL is not set
2107CONFIG_NFS_V4=y
2108# CONFIG_NFS_V4_1 is not set
2109CONFIG_ROOT_NFS=y
2110CONFIG_NFSD=m
2111CONFIG_NFSD_V2_ACL=y
2112CONFIG_NFSD_V3=y
2113CONFIG_NFSD_V3_ACL=y
2114CONFIG_NFSD_V4=y
2115CONFIG_LOCKD=y
2116CONFIG_LOCKD_V4=y
2117CONFIG_EXPORTFS=m
2118CONFIG_NFS_ACL_SUPPORT=m
2119CONFIG_NFS_COMMON=y
2120CONFIG_SUNRPC=y
2121CONFIG_SUNRPC_GSS=y
2122CONFIG_RPCSEC_GSS_KRB5=y
2123# CONFIG_RPCSEC_GSS_SPKM3 is not set
2124# CONFIG_SMB_FS is not set
2125CONFIG_CIFS=m
2126CONFIG_CIFS_STATS=y
2127CONFIG_CIFS_STATS2=y
2128# CONFIG_CIFS_WEAK_PW_HASH is not set
2129# CONFIG_CIFS_UPCALL is not set
2130# CONFIG_CIFS_XATTR is not set
2131# CONFIG_CIFS_DEBUG2 is not set
2132# CONFIG_CIFS_DFS_UPCALL is not set
2133CONFIG_CIFS_EXPERIMENTAL=y
2134# CONFIG_NCP_FS is not set
2135# CONFIG_CODA_FS is not set
2136# CONFIG_AFS_FS is not set
2137
2138#
2139# Partition Types
2140#
2141CONFIG_PARTITION_ADVANCED=y
2142# CONFIG_ACORN_PARTITION is not set
2143# CONFIG_OSF_PARTITION is not set
2144# CONFIG_AMIGA_PARTITION is not set
2145# CONFIG_ATARI_PARTITION is not set
2146# CONFIG_MAC_PARTITION is not set
2147CONFIG_MSDOS_PARTITION=y
2148CONFIG_BSD_DISKLABEL=y
2149CONFIG_MINIX_SUBPARTITION=y
2150CONFIG_SOLARIS_X86_PARTITION=y
2151CONFIG_UNIXWARE_DISKLABEL=y
2152# CONFIG_LDM_PARTITION is not set
2153# CONFIG_SGI_PARTITION is not set
2154# CONFIG_ULTRIX_PARTITION is not set
2155# CONFIG_SUN_PARTITION is not set
2156# CONFIG_KARMA_PARTITION is not set
2157CONFIG_EFI_PARTITION=y
2158# CONFIG_SYSV68_PARTITION is not set
2159CONFIG_NLS=y
2160CONFIG_NLS_DEFAULT="iso8859-1"
2161CONFIG_NLS_CODEPAGE_437=y
2162CONFIG_NLS_CODEPAGE_737=m
2163CONFIG_NLS_CODEPAGE_775=m
2164CONFIG_NLS_CODEPAGE_850=m
2165CONFIG_NLS_CODEPAGE_852=m
2166CONFIG_NLS_CODEPAGE_855=m
2167CONFIG_NLS_CODEPAGE_857=m
2168CONFIG_NLS_CODEPAGE_860=m
2169CONFIG_NLS_CODEPAGE_861=m
2170CONFIG_NLS_CODEPAGE_862=m
2171CONFIG_NLS_CODEPAGE_863=m
2172CONFIG_NLS_CODEPAGE_864=m
2173CONFIG_NLS_CODEPAGE_865=m
2174CONFIG_NLS_CODEPAGE_866=m
2175CONFIG_NLS_CODEPAGE_869=m
2176CONFIG_NLS_CODEPAGE_936=m
2177CONFIG_NLS_CODEPAGE_950=m
2178CONFIG_NLS_CODEPAGE_932=m
2179CONFIG_NLS_CODEPAGE_949=m
2180CONFIG_NLS_CODEPAGE_874=m
2181CONFIG_NLS_ISO8859_8=m
2182CONFIG_NLS_CODEPAGE_1250=m
2183CONFIG_NLS_CODEPAGE_1251=m
2184CONFIG_NLS_ASCII=m
2185CONFIG_NLS_ISO8859_1=m
2186CONFIG_NLS_ISO8859_2=m
2187CONFIG_NLS_ISO8859_3=m
2188CONFIG_NLS_ISO8859_4=m
2189CONFIG_NLS_ISO8859_5=m
2190CONFIG_NLS_ISO8859_6=m
2191CONFIG_NLS_ISO8859_7=m
2192CONFIG_NLS_ISO8859_9=m
2193CONFIG_NLS_ISO8859_13=m
2194CONFIG_NLS_ISO8859_14=m
2195CONFIG_NLS_ISO8859_15=m
2196CONFIG_NLS_KOI8_R=m
2197CONFIG_NLS_KOI8_U=m
2198CONFIG_NLS_UTF8=y
2199# CONFIG_DLM is not set
2200
2201#
2202# Kernel hacking
2203#
2204CONFIG_PRINTK_TIME=y
2205CONFIG_ENABLE_WARN_DEPRECATED=y
2206CONFIG_ENABLE_MUST_CHECK=y
2207CONFIG_FRAME_WARN=1024
2208CONFIG_MAGIC_SYSRQ=y
2209# CONFIG_STRIP_ASM_SYMS is not set
2210# CONFIG_UNUSED_SYMBOLS is not set
2211CONFIG_DEBUG_FS=y
2212# CONFIG_HEADERS_CHECK is not set
2213CONFIG_DEBUG_KERNEL=y
2214# CONFIG_DEBUG_SHIRQ is not set
2215CONFIG_DETECT_SOFTLOCKUP=y
2216# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
2217CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
2218CONFIG_DETECT_HUNG_TASK=y
2219# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
2220CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
2221CONFIG_SCHED_DEBUG=y
2222CONFIG_SCHEDSTATS=y
2223CONFIG_TIMER_STATS=y
2224# CONFIG_DEBUG_OBJECTS is not set
2225# CONFIG_DEBUG_SLAB is not set
2226# CONFIG_DEBUG_KMEMLEAK is not set
2227CONFIG_DEBUG_PREEMPT=y
2228# CONFIG_DEBUG_RT_MUTEXES is not set
2229# CONFIG_RT_MUTEX_TESTER is not set
2230# CONFIG_DEBUG_SPINLOCK is not set
2231CONFIG_DEBUG_MUTEXES=y
2232# CONFIG_DEBUG_LOCK_ALLOC is not set
2233# CONFIG_PROVE_LOCKING is not set
2234# CONFIG_LOCK_STAT is not set
2235# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
2236# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
2237CONFIG_STACKTRACE=y
2238# CONFIG_DEBUG_KOBJECT is not set
2239# CONFIG_DEBUG_BUGVERBOSE is not set
2240# CONFIG_DEBUG_INFO is not set
2241# CONFIG_DEBUG_VM is not set
2242# CONFIG_DEBUG_WRITECOUNT is not set
2243# CONFIG_DEBUG_MEMORY_INIT is not set
2244# CONFIG_DEBUG_LIST is not set
2245# CONFIG_DEBUG_SG is not set
2246# CONFIG_DEBUG_NOTIFIERS is not set
2247# CONFIG_DEBUG_CREDENTIALS is not set
2248# CONFIG_BOOT_PRINTK_DELAY is not set
2249# CONFIG_RCU_TORTURE_TEST is not set
2250# CONFIG_RCU_CPU_STALL_DETECTOR is not set
2251# CONFIG_BACKTRACE_SELF_TEST is not set
2252# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
2253# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
2254# CONFIG_FAULT_INJECTION is not set
2255# CONFIG_LATENCYTOP is not set
2256# CONFIG_PAGE_POISONING is not set
2257CONFIG_NOP_TRACER=y
2258CONFIG_HAVE_FUNCTION_TRACER=y
2259CONFIG_RING_BUFFER=y
2260CONFIG_EVENT_TRACING=y
2261CONFIG_CONTEXT_SWITCH_TRACER=y
2262CONFIG_RING_BUFFER_ALLOW_SWAP=y
2263CONFIG_TRACING=y
2264CONFIG_TRACING_SUPPORT=y
2265CONFIG_FTRACE=y
2266# CONFIG_FUNCTION_TRACER is not set
2267# CONFIG_IRQSOFF_TRACER is not set
2268# CONFIG_PREEMPT_TRACER is not set
2269# CONFIG_SCHED_TRACER is not set
2270# CONFIG_ENABLE_DEFAULT_TRACERS is not set
2271# CONFIG_BOOT_TRACER is not set
2272CONFIG_BRANCH_PROFILE_NONE=y
2273# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
2274# CONFIG_PROFILE_ALL_BRANCHES is not set
2275# CONFIG_STACK_TRACER is not set
2276# CONFIG_KMEMTRACE is not set
2277# CONFIG_WORKQUEUE_TRACER is not set
2278# CONFIG_BLK_DEV_IO_TRACE is not set
2279# CONFIG_RING_BUFFER_BENCHMARK is not set
2280# CONFIG_DYNAMIC_DEBUG is not set
2281# CONFIG_SAMPLES is not set
2282CONFIG_HAVE_ARCH_KGDB=y
2283# CONFIG_KGDB is not set
2284CONFIG_ARM_UNWIND=y
2285# CONFIG_DEBUG_USER is not set
2286# CONFIG_DEBUG_ERRORS is not set
2287# CONFIG_DEBUG_STACK_USAGE is not set
2288# CONFIG_DEBUG_LL is not set
2289
2290#
2291# Security options
2292#
2293CONFIG_KEYS=y
2294# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
2295# CONFIG_SECURITY is not set
2296# CONFIG_SECURITYFS is not set
2297# CONFIG_SECURITY_FILE_CAPABILITIES is not set
2298CONFIG_XOR_BLOCKS=m
2299CONFIG_ASYNC_CORE=m
2300CONFIG_ASYNC_MEMCPY=m
2301CONFIG_ASYNC_XOR=m
2302CONFIG_ASYNC_PQ=m
2303CONFIG_ASYNC_RAID6_RECOV=m
2304CONFIG_CRYPTO=y
2305
2306#
2307# Crypto core or helper
2308#
2309CONFIG_CRYPTO_FIPS=y
2310CONFIG_CRYPTO_ALGAPI=y
2311CONFIG_CRYPTO_ALGAPI2=y
2312CONFIG_CRYPTO_AEAD=m
2313CONFIG_CRYPTO_AEAD2=y
2314CONFIG_CRYPTO_BLKCIPHER=y
2315CONFIG_CRYPTO_BLKCIPHER2=y
2316CONFIG_CRYPTO_HASH=y
2317CONFIG_CRYPTO_HASH2=y
2318CONFIG_CRYPTO_RNG=m
2319CONFIG_CRYPTO_RNG2=y
2320CONFIG_CRYPTO_PCOMP=y
2321CONFIG_CRYPTO_MANAGER=y
2322CONFIG_CRYPTO_MANAGER2=y
2323CONFIG_CRYPTO_GF128MUL=m
2324CONFIG_CRYPTO_NULL=m
2325CONFIG_CRYPTO_WORKQUEUE=y
2326CONFIG_CRYPTO_CRYPTD=m
2327CONFIG_CRYPTO_AUTHENC=m
2328CONFIG_CRYPTO_TEST=m
2329
2330#
2331# Authenticated Encryption with Associated Data
2332#
2333CONFIG_CRYPTO_CCM=m
2334CONFIG_CRYPTO_GCM=m
2335CONFIG_CRYPTO_SEQIV=m
2336
2337#
2338# Block modes
2339#
2340CONFIG_CRYPTO_CBC=y
2341CONFIG_CRYPTO_CTR=m
2342CONFIG_CRYPTO_CTS=m
2343CONFIG_CRYPTO_ECB=y
2344CONFIG_CRYPTO_LRW=m
2345CONFIG_CRYPTO_PCBC=m
2346CONFIG_CRYPTO_XTS=m
2347
2348#
2349# Hash modes
2350#
2351CONFIG_CRYPTO_HMAC=m
2352CONFIG_CRYPTO_XCBC=m
2353# CONFIG_CRYPTO_VMAC is not set
2354
2355#
2356# Digest
2357#
2358CONFIG_CRYPTO_CRC32C=y
2359CONFIG_CRYPTO_GHASH=m
2360CONFIG_CRYPTO_MD4=m
2361CONFIG_CRYPTO_MD5=y
2362CONFIG_CRYPTO_MICHAEL_MIC=y
2363CONFIG_CRYPTO_RMD128=m
2364CONFIG_CRYPTO_RMD160=m
2365CONFIG_CRYPTO_RMD256=m
2366CONFIG_CRYPTO_RMD320=m
2367CONFIG_CRYPTO_SHA1=m
2368CONFIG_CRYPTO_SHA256=m
2369CONFIG_CRYPTO_SHA512=m
2370CONFIG_CRYPTO_TGR192=m
2371CONFIG_CRYPTO_WP512=m
2372
2373#
2374# Ciphers
2375#
2376CONFIG_CRYPTO_AES=y
2377CONFIG_CRYPTO_ANUBIS=m
2378CONFIG_CRYPTO_ARC4=y
2379CONFIG_CRYPTO_BLOWFISH=m
2380CONFIG_CRYPTO_CAMELLIA=m
2381CONFIG_CRYPTO_CAST5=m
2382CONFIG_CRYPTO_CAST6=m
2383CONFIG_CRYPTO_DES=y
2384CONFIG_CRYPTO_FCRYPT=m
2385CONFIG_CRYPTO_KHAZAD=m
2386CONFIG_CRYPTO_SALSA20=m
2387CONFIG_CRYPTO_SEED=m
2388CONFIG_CRYPTO_SERPENT=m
2389CONFIG_CRYPTO_TEA=m
2390CONFIG_CRYPTO_TWOFISH=m
2391CONFIG_CRYPTO_TWOFISH_COMMON=m
2392
2393#
2394# Compression
2395#
2396CONFIG_CRYPTO_DEFLATE=y
2397# CONFIG_CRYPTO_ZLIB is not set
2398CONFIG_CRYPTO_LZO=y
2399
2400#
2401# Random Number Generation
2402#
2403CONFIG_CRYPTO_ANSI_CPRNG=m
2404CONFIG_CRYPTO_HW=y
2405CONFIG_BINARY_PRINTF=y
2406
2407#
2408# Library routines
2409#
2410CONFIG_BITREVERSE=y
2411CONFIG_GENERIC_FIND_LAST_BIT=y
2412CONFIG_CRC_CCITT=y
2413CONFIG_CRC16=y
2414CONFIG_CRC_T10DIF=y
2415CONFIG_CRC_ITU_T=y
2416CONFIG_CRC32=y
2417CONFIG_CRC7=y
2418CONFIG_LIBCRC32C=y
2419CONFIG_ZLIB_INFLATE=y
2420CONFIG_ZLIB_DEFLATE=y
2421CONFIG_LZO_COMPRESS=y
2422CONFIG_LZO_DECOMPRESS=y
2423CONFIG_DECOMPRESS_GZIP=y
2424CONFIG_TEXTSEARCH=y
2425CONFIG_TEXTSEARCH_KMP=m
2426CONFIG_TEXTSEARCH_BM=m
2427CONFIG_TEXTSEARCH_FSM=m
2428CONFIG_HAS_IOMEM=y
2429CONFIG_HAS_IOPORT=y
2430CONFIG_HAS_DMA=y
2431CONFIG_NLATTR=y
diff --git a/arch/arm/configs/omap_3430sdp_defconfig b/arch/arm/configs/omap_3430sdp_defconfig
index 84829587d55a..592457cfbbe5 100644
--- a/arch/arm/configs/omap_3430sdp_defconfig
+++ b/arch/arm/configs/omap_3430sdp_defconfig
@@ -963,10 +963,32 @@ CONFIG_FB_CFB_IMAGEBLIT=y
963# 963#
964# CONFIG_FB_S1D13XXX is not set 964# CONFIG_FB_S1D13XXX is not set
965# CONFIG_FB_VIRTUAL is not set 965# CONFIG_FB_VIRTUAL is not set
966CONFIG_FB_OMAP=y 966# CONFIG_FB_METRONOME is not set
967# CONFIG_FB_OMAP_LCDC_EXTERNAL is not set 967# CONFIG_FB_MB862XX is not set
968# CONFIG_FB_BROADSHEET is not set
969# CONFIG_FB_OMAP_LCD_VGA is not set
968# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set 970# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
969CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2 971CONFIG_OMAP2_VRAM=y
972CONFIG_OMAP2_VRFB=y
973CONFIG_OMAP2_DSS=y
974CONFIG_OMAP2_VRAM_SIZE=4
975CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y
976# CONFIG_OMAP2_DSS_RFBI is not set
977CONFIG_OMAP2_DSS_VENC=y
978# CONFIG_OMAP2_DSS_SDI is not set
979# CONFIG_OMAP2_DSS_DSI is not set
980# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
981CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
982CONFIG_FB_OMAP2=y
983CONFIG_FB_OMAP2_DEBUG_SUPPORT=y
984# CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set
985CONFIG_FB_OMAP2_NUM_FBS=3
986
987#
988# OMAP2/3 Display Device Drivers
989#
990CONFIG_PANEL_GENERIC=y
991CONFIG_PANEL_SHARP_LS037V7DW01=y
970# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 992# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
971 993
972# 994#
diff --git a/arch/arm/configs/omap_4430sdp_defconfig b/arch/arm/configs/omap_4430sdp_defconfig
index a464ca332a23..2319113c86bf 100644
--- a/arch/arm/configs/omap_4430sdp_defconfig
+++ b/arch/arm/configs/omap_4430sdp_defconfig
@@ -1,26 +1,29 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc7 3# Linux kernel version: 2.6.32
4# Tue Jun 9 12:36:23 2009 4# Sun Dec 6 23:37:45 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y 9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y 10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y 11CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
12CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_STACKTRACE_SUPPORT=y 13CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_LOCKDEP_SUPPORT=y 14CONFIG_LOCKDEP_SUPPORT=y
15CONFIG_TRACE_IRQFLAGS_SUPPORT=y 15CONFIG_TRACE_IRQFLAGS_SUPPORT=y
16CONFIG_HARDIRQS_SW_RESEND=y 16CONFIG_HARDIRQS_SW_RESEND=y
17CONFIG_GENERIC_IRQ_PROBE=y 17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_GENERIC_LOCKBREAK=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y 19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20CONFIG_ARCH_HAS_CPUFREQ=y
19CONFIG_GENERIC_HWEIGHT=y 21CONFIG_GENERIC_HWEIGHT=y
20CONFIG_GENERIC_CALIBRATE_DELAY=y 22CONFIG_GENERIC_CALIBRATE_DELAY=y
21CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
22CONFIG_VECTORS_BASE=0xffff0000 24CONFIG_VECTORS_BASE=0xffff0000
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
24 27
25# 28#
26# General setup 29# General setup
@@ -39,11 +42,12 @@ CONFIG_BSD_PROCESS_ACCT=y
39# 42#
40# RCU Subsystem 43# RCU Subsystem
41# 44#
42CONFIG_CLASSIC_RCU=y 45CONFIG_TREE_RCU=y
43# CONFIG_TREE_RCU is not set 46# CONFIG_TREE_PREEMPT_RCU is not set
44# CONFIG_PREEMPT_RCU is not set 47# CONFIG_RCU_TRACE is not set
48CONFIG_RCU_FANOUT=32
49# CONFIG_RCU_FANOUT_EXACT is not set
45# CONFIG_TREE_RCU_TRACE is not set 50# CONFIG_TREE_RCU_TRACE is not set
46# CONFIG_PREEMPT_RCU_TRACE is not set
47# CONFIG_IKCONFIG is not set 51# CONFIG_IKCONFIG is not set
48CONFIG_LOG_BUF_SHIFT=14 52CONFIG_LOG_BUF_SHIFT=14
49CONFIG_GROUP_SCHED=y 53CONFIG_GROUP_SCHED=y
@@ -52,8 +56,7 @@ CONFIG_FAIR_GROUP_SCHED=y
52CONFIG_USER_SCHED=y 56CONFIG_USER_SCHED=y
53# CONFIG_CGROUP_SCHED is not set 57# CONFIG_CGROUP_SCHED is not set
54# CONFIG_CGROUPS is not set 58# CONFIG_CGROUPS is not set
55# CONFIG_SYSFS_DEPRECATED=y is not set 59# CONFIG_SYSFS_DEPRECATED_V2 is not set
56# CONFIG_SYSFS_DEPRECATED_V2=y is not set
57# CONFIG_RELAY is not set 60# CONFIG_RELAY is not set
58# CONFIG_NAMESPACES is not set 61# CONFIG_NAMESPACES is not set
59CONFIG_BLK_DEV_INITRD=y 62CONFIG_BLK_DEV_INITRD=y
@@ -70,7 +73,6 @@ CONFIG_UID16=y
70CONFIG_KALLSYMS=y 73CONFIG_KALLSYMS=y
71# CONFIG_KALLSYMS_ALL is not set 74# CONFIG_KALLSYMS_ALL is not set
72# CONFIG_KALLSYMS_EXTRA_PASS is not set 75# CONFIG_KALLSYMS_EXTRA_PASS is not set
73# CONFIG_STRIP_ASM_SYMS is not set
74CONFIG_HOTPLUG=y 76CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y 77CONFIG_PRINTK=y
76CONFIG_BUG=y 78CONFIG_BUG=y
@@ -83,6 +85,10 @@ CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y 85CONFIG_EVENTFD=y
84CONFIG_SHMEM=y 86CONFIG_SHMEM=y
85CONFIG_AIO=y 87CONFIG_AIO=y
88
89#
90# Kernel Performance Events And Counters
91#
86CONFIG_VM_EVENT_COUNTERS=y 92CONFIG_VM_EVENT_COUNTERS=y
87CONFIG_SLUB_DEBUG=y 93CONFIG_SLUB_DEBUG=y
88CONFIG_COMPAT_BRK=y 94CONFIG_COMPAT_BRK=y
@@ -90,13 +96,16 @@ CONFIG_COMPAT_BRK=y
90CONFIG_SLUB=y 96CONFIG_SLUB=y
91# CONFIG_SLOB is not set 97# CONFIG_SLOB is not set
92# CONFIG_PROFILING is not set 98# CONFIG_PROFILING is not set
93# CONFIG_MARKERS is not set
94CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
95# CONFIG_KPROBES is not set 100# CONFIG_KPROBES is not set
96CONFIG_HAVE_KPROBES=y 101CONFIG_HAVE_KPROBES=y
97CONFIG_HAVE_KRETPROBES=y 102CONFIG_HAVE_KRETPROBES=y
98CONFIG_USE_GENERIC_SMP_HELPERS=y 103CONFIG_USE_GENERIC_SMP_HELPERS=y
99CONFIG_HAVE_CLK=y 104CONFIG_HAVE_CLK=y
105
106#
107# GCOV-based kernel profiling
108#
100# CONFIG_SLOW_WORK is not set 109# CONFIG_SLOW_WORK is not set
101CONFIG_HAVE_GENERIC_DMA_COHERENT=y 110CONFIG_HAVE_GENERIC_DMA_COHERENT=y
102CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
@@ -110,7 +119,7 @@ CONFIG_MODVERSIONS=y
110CONFIG_MODULE_SRCVERSION_ALL=y 119CONFIG_MODULE_SRCVERSION_ALL=y
111CONFIG_STOP_MACHINE=y 120CONFIG_STOP_MACHINE=y
112CONFIG_BLOCK=y 121CONFIG_BLOCK=y
113# CONFIG_LBD is not set 122CONFIG_LBDAF=y
114# CONFIG_BLK_DEV_BSG is not set 123# CONFIG_BLK_DEV_BSG is not set
115# CONFIG_BLK_DEV_INTEGRITY is not set 124# CONFIG_BLK_DEV_INTEGRITY is not set
116 125
@@ -131,6 +140,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
131# 140#
132# System Type 141# System Type
133# 142#
143CONFIG_MMU=y
134# CONFIG_ARCH_AAEC2000 is not set 144# CONFIG_ARCH_AAEC2000 is not set
135# CONFIG_ARCH_INTEGRATOR is not set 145# CONFIG_ARCH_INTEGRATOR is not set
136# CONFIG_ARCH_REALVIEW is not set 146# CONFIG_ARCH_REALVIEW is not set
@@ -142,8 +152,10 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
142# CONFIG_ARCH_EP93XX is not set 152# CONFIG_ARCH_EP93XX is not set
143# CONFIG_ARCH_FOOTBRIDGE is not set 153# CONFIG_ARCH_FOOTBRIDGE is not set
144# CONFIG_ARCH_MXC is not set 154# CONFIG_ARCH_MXC is not set
155# CONFIG_ARCH_STMP3XXX is not set
145# CONFIG_ARCH_NETX is not set 156# CONFIG_ARCH_NETX is not set
146# CONFIG_ARCH_H720X is not set 157# CONFIG_ARCH_H720X is not set
158# CONFIG_ARCH_NOMADIK is not set
147# CONFIG_ARCH_IOP13XX is not set 159# CONFIG_ARCH_IOP13XX is not set
148# CONFIG_ARCH_IOP32X is not set 160# CONFIG_ARCH_IOP32X is not set
149# CONFIG_ARCH_IOP33X is not set 161# CONFIG_ARCH_IOP33X is not set
@@ -166,10 +178,13 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
166# CONFIG_ARCH_SA1100 is not set 178# CONFIG_ARCH_SA1100 is not set
167# CONFIG_ARCH_S3C2410 is not set 179# CONFIG_ARCH_S3C2410 is not set
168# CONFIG_ARCH_S3C64XX is not set 180# CONFIG_ARCH_S3C64XX is not set
181# CONFIG_ARCH_S5PC1XX is not set
169# CONFIG_ARCH_SHARK is not set 182# CONFIG_ARCH_SHARK is not set
170# CONFIG_ARCH_LH7A40X is not set 183# CONFIG_ARCH_LH7A40X is not set
184# CONFIG_ARCH_U300 is not set
171# CONFIG_ARCH_DAVINCI is not set 185# CONFIG_ARCH_DAVINCI is not set
172CONFIG_ARCH_OMAP=y 186CONFIG_ARCH_OMAP=y
187# CONFIG_ARCH_BCMRING is not set
173 188
174# 189#
175# TI OMAP Implementations 190# TI OMAP Implementations
@@ -190,9 +205,12 @@ CONFIG_ARCH_OMAP4=y
190CONFIG_OMAP_32K_TIMER=y 205CONFIG_OMAP_32K_TIMER=y
191CONFIG_OMAP_32K_TIMER_HZ=128 206CONFIG_OMAP_32K_TIMER_HZ=128
192CONFIG_OMAP_DM_TIMER=y 207CONFIG_OMAP_DM_TIMER=y
193CONFIG_OMAP_LL_DEBUG_UART1=y 208# CONFIG_OMAP_LL_DEBUG_UART1 is not set
194# CONFIG_OMAP_LL_DEBUG_UART2 is not set 209# CONFIG_OMAP_LL_DEBUG_UART2 is not set
195# CONFIG_OMAP_LL_DEBUG_UART3 is not set 210CONFIG_OMAP_LL_DEBUG_UART3=y
211# CONFIG_OMAP_LL_DEBUG_NONE is not set
212# CONFIG_OMAP_PM_NONE is not set
213CONFIG_OMAP_PM_NOOP=y
196 214
197# 215#
198# OMAP Board Type 216# OMAP Board Type
@@ -207,7 +225,7 @@ CONFIG_CPU_32v6K=y
207CONFIG_CPU_V7=y 225CONFIG_CPU_V7=y
208CONFIG_CPU_32v7=y 226CONFIG_CPU_32v7=y
209CONFIG_CPU_ABRT_EV7=y 227CONFIG_CPU_ABRT_EV7=y
210CONFIG_CPU_PABRT_IFAR=y 228CONFIG_CPU_PABRT_V7=y
211CONFIG_CPU_CACHE_V7=y 229CONFIG_CPU_CACHE_V7=y
212CONFIG_CPU_CACHE_VIPT=y 230CONFIG_CPU_CACHE_VIPT=y
213CONFIG_CPU_COPY_V6=y 231CONFIG_CPU_COPY_V6=y
@@ -222,9 +240,10 @@ CONFIG_CPU_CP15_MMU=y
222# CONFIG_ARM_THUMB is not set 240# CONFIG_ARM_THUMB is not set
223# CONFIG_ARM_THUMBEE is not set 241# CONFIG_ARM_THUMBEE is not set
224# CONFIG_CPU_ICACHE_DISABLE is not set 242# CONFIG_CPU_ICACHE_DISABLE is not set
225CONFIG_CPU_DCACHE_DISABLE=y 243# CONFIG_CPU_DCACHE_DISABLE is not set
226# CONFIG_CPU_BPREDICT_DISABLE is not set 244# CONFIG_CPU_BPREDICT_DISABLE is not set
227CONFIG_HAS_TLS_REG=y 245CONFIG_HAS_TLS_REG=y
246CONFIG_ARM_L1_CACHE_SHIFT=5
228# CONFIG_ARM_ERRATA_430973 is not set 247# CONFIG_ARM_ERRATA_430973 is not set
229# CONFIG_ARM_ERRATA_458693 is not set 248# CONFIG_ARM_ERRATA_458693 is not set
230# CONFIG_ARM_ERRATA_460075 is not set 249# CONFIG_ARM_ERRATA_460075 is not set
@@ -245,18 +264,20 @@ CONFIG_ARM_GIC=y
245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 264CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
246CONFIG_SMP=y 265CONFIG_SMP=y
247CONFIG_HAVE_ARM_SCU=y 266CONFIG_HAVE_ARM_SCU=y
248CONFIG_HAVE_ARM_TWD=y
249CONFIG_VMSPLIT_3G=y 267CONFIG_VMSPLIT_3G=y
250# CONFIG_VMSPLIT_2G is not set 268# CONFIG_VMSPLIT_2G is not set
251# CONFIG_VMSPLIT_1G is not set 269# CONFIG_VMSPLIT_1G is not set
252CONFIG_PAGE_OFFSET=0xC0000000 270CONFIG_PAGE_OFFSET=0xC0000000
253CONFIG_NR_CPUS=2 271CONFIG_NR_CPUS=2
254# CONFIG_HOTPLUG_CPU is not set 272# CONFIG_HOTPLUG_CPU is not set
255CONFIG_LOCAL_TIMERS=y 273# CONFIG_LOCAL_TIMERS is not set
256# CONFIG_PREEMPT is not set 274# CONFIG_PREEMPT_NONE is not set
275# CONFIG_PREEMPT_VOLUNTARY is not set
276CONFIG_PREEMPT=y
257CONFIG_HZ=128 277CONFIG_HZ=128
278# CONFIG_THUMB2_KERNEL is not set
258CONFIG_AEABI=y 279CONFIG_AEABI=y
259# CONFIG_OABI_COMPAT is not set 280CONFIG_OABI_COMPAT=y
260# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 281# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
261# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 282# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
262# CONFIG_HIGHMEM is not set 283# CONFIG_HIGHMEM is not set
@@ -271,10 +292,13 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
271# CONFIG_PHYS_ADDR_T_64BIT is not set 292# CONFIG_PHYS_ADDR_T_64BIT is not set
272CONFIG_ZONE_DMA_FLAG=0 293CONFIG_ZONE_DMA_FLAG=0
273CONFIG_VIRT_TO_BUS=y 294CONFIG_VIRT_TO_BUS=y
274# CONFIG_UNEVICTABLE_LRU is not set
275CONFIG_HAVE_MLOCK=y 295CONFIG_HAVE_MLOCK=y
296CONFIG_HAVE_MLOCKED_PAGE_BIT=y
297# CONFIG_KSM is not set
298CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
276# CONFIG_LEDS is not set 299# CONFIG_LEDS is not set
277CONFIG_ALIGNMENT_TRAP=y 300CONFIG_ALIGNMENT_TRAP=y
301# CONFIG_UACCESS_WITH_MEMCPY is not set
278 302
279# 303#
280# Boot options 304# Boot options
@@ -298,9 +322,11 @@ CONFIG_CMDLINE="root=/dev/ram0 rw mem=128M console=ttyS0,115200n8 initrd=0x81600
298# 322#
299# At least one emulation must be selected 323# At least one emulation must be selected
300# 324#
325# CONFIG_FPE_NWFPE is not set
326# CONFIG_FPE_FASTFPE is not set
301CONFIG_VFP=y 327CONFIG_VFP=y
302CONFIG_VFPv3=y 328CONFIG_VFPv3=y
303# CONFIG_NEON is not set 329CONFIG_NEON=y
304 330
305# 331#
306# Userspace binary formats 332# Userspace binary formats
@@ -325,6 +351,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
325# Generic Driver Options 351# Generic Driver Options
326# 352#
327CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 353CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
354# CONFIG_DEVTMPFS is not set
328CONFIG_STANDALONE=y 355CONFIG_STANDALONE=y
329CONFIG_PREVENT_FIRMWARE_BUILD=y 356CONFIG_PREVENT_FIRMWARE_BUILD=y
330# CONFIG_FW_LOADER is not set 357# CONFIG_FW_LOADER is not set
@@ -342,6 +369,7 @@ CONFIG_BLK_DEV_RAM_COUNT=16
342CONFIG_BLK_DEV_RAM_SIZE=16384 369CONFIG_BLK_DEV_RAM_SIZE=16384
343# CONFIG_BLK_DEV_XIP is not set 370# CONFIG_BLK_DEV_XIP is not set
344# CONFIG_CDROM_PKTCDVD is not set 371# CONFIG_CDROM_PKTCDVD is not set
372# CONFIG_MG_DISK is not set
345# CONFIG_MISC_DEVICES is not set 373# CONFIG_MISC_DEVICES is not set
346CONFIG_HAVE_IDE=y 374CONFIG_HAVE_IDE=y
347# CONFIG_IDE is not set 375# CONFIG_IDE is not set
@@ -355,6 +383,7 @@ CONFIG_HAVE_IDE=y
355# CONFIG_SCSI_NETLINK is not set 383# CONFIG_SCSI_NETLINK is not set
356# CONFIG_ATA is not set 384# CONFIG_ATA is not set
357# CONFIG_MD is not set 385# CONFIG_MD is not set
386# CONFIG_PHONE is not set
358 387
359# 388#
360# Input device support 389# Input device support
@@ -427,6 +456,11 @@ CONFIG_HW_RANDOM=y
427# CONFIG_TCG_TPM is not set 456# CONFIG_TCG_TPM is not set
428# CONFIG_I2C is not set 457# CONFIG_I2C is not set
429# CONFIG_SPI is not set 458# CONFIG_SPI is not set
459
460#
461# PPS support
462#
463# CONFIG_PPS is not set
430CONFIG_ARCH_REQUIRE_GPIOLIB=y 464CONFIG_ARCH_REQUIRE_GPIOLIB=y
431CONFIG_GPIOLIB=y 465CONFIG_GPIOLIB=y
432# CONFIG_DEBUG_GPIO is not set 466# CONFIG_DEBUG_GPIO is not set
@@ -447,11 +481,14 @@ CONFIG_GPIOLIB=y
447# 481#
448# SPI GPIO expanders: 482# SPI GPIO expanders:
449# 483#
484
485#
486# AC97 GPIO expanders:
487#
450# CONFIG_W1 is not set 488# CONFIG_W1 is not set
451# CONFIG_POWER_SUPPLY is not set 489# CONFIG_POWER_SUPPLY is not set
452# CONFIG_HWMON is not set 490# CONFIG_HWMON is not set
453# CONFIG_THERMAL is not set 491# CONFIG_THERMAL is not set
454# CONFIG_THERMAL_HWMON is not set
455# CONFIG_WATCHDOG is not set 492# CONFIG_WATCHDOG is not set
456CONFIG_SSB_POSSIBLE=y 493CONFIG_SSB_POSSIBLE=y
457 494
@@ -472,21 +509,8 @@ CONFIG_SSB_POSSIBLE=y
472# CONFIG_MFD_T7L66XB is not set 509# CONFIG_MFD_T7L66XB is not set
473# CONFIG_MFD_TC6387XB is not set 510# CONFIG_MFD_TC6387XB is not set
474# CONFIG_MFD_TC6393XB is not set 511# CONFIG_MFD_TC6393XB is not set
475 512# CONFIG_REGULATOR is not set
476# 513# CONFIG_MEDIA_SUPPORT is not set
477# Multimedia devices
478#
479
480#
481# Multimedia core support
482#
483# CONFIG_VIDEO_DEV is not set
484# CONFIG_VIDEO_MEDIA is not set
485
486#
487# Multimedia drivers
488#
489CONFIG_DAB=y
490 514
491# 515#
492# Graphics support 516# Graphics support
@@ -511,14 +535,17 @@ CONFIG_DUMMY_CONSOLE=y
511# CONFIG_USB_SUPPORT is not set 535# CONFIG_USB_SUPPORT is not set
512# CONFIG_MMC is not set 536# CONFIG_MMC is not set
513# CONFIG_MEMSTICK is not set 537# CONFIG_MEMSTICK is not set
514# CONFIG_ACCESSIBILITY is not set
515# CONFIG_NEW_LEDS is not set 538# CONFIG_NEW_LEDS is not set
539# CONFIG_ACCESSIBILITY is not set
516CONFIG_RTC_LIB=y 540CONFIG_RTC_LIB=y
517# CONFIG_RTC_CLASS is not set 541# CONFIG_RTC_CLASS is not set
518# CONFIG_DMADEVICES is not set 542# CONFIG_DMADEVICES is not set
519# CONFIG_AUXDISPLAY is not set 543# CONFIG_AUXDISPLAY is not set
520# CONFIG_REGULATOR is not set
521# CONFIG_UIO is not set 544# CONFIG_UIO is not set
545
546#
547# TI VLYNQ
548#
522# CONFIG_STAGING is not set 549# CONFIG_STAGING is not set
523 550
524# 551#
@@ -535,9 +562,12 @@ CONFIG_JBD=y
535# CONFIG_REISERFS_FS is not set 562# CONFIG_REISERFS_FS is not set
536# CONFIG_JFS_FS is not set 563# CONFIG_JFS_FS is not set
537# CONFIG_FS_POSIX_ACL is not set 564# CONFIG_FS_POSIX_ACL is not set
538CONFIG_FILE_LOCKING=y
539# CONFIG_XFS_FS is not set 565# CONFIG_XFS_FS is not set
566# CONFIG_GFS2_FS is not set
540# CONFIG_BTRFS_FS is not set 567# CONFIG_BTRFS_FS is not set
568# CONFIG_NILFS2_FS is not set
569CONFIG_FILE_LOCKING=y
570CONFIG_FSNOTIFY=y
541CONFIG_DNOTIFY=y 571CONFIG_DNOTIFY=y
542CONFIG_INOTIFY=y 572CONFIG_INOTIFY=y
543CONFIG_INOTIFY_USER=y 573CONFIG_INOTIFY_USER=y
@@ -601,7 +631,6 @@ CONFIG_MISC_FILESYSTEMS=y
601# CONFIG_ROMFS_FS is not set 631# CONFIG_ROMFS_FS is not set
602# CONFIG_SYSV_FS is not set 632# CONFIG_SYSV_FS is not set
603# CONFIG_UFS_FS is not set 633# CONFIG_UFS_FS is not set
604# CONFIG_NILFS2_FS is not set
605 634
606# 635#
607# Partition Types 636# Partition Types
@@ -673,23 +702,24 @@ CONFIG_NLS_ISO8859_1=y
673# CONFIG_ENABLE_MUST_CHECK is not set 702# CONFIG_ENABLE_MUST_CHECK is not set
674CONFIG_FRAME_WARN=1024 703CONFIG_FRAME_WARN=1024
675CONFIG_MAGIC_SYSRQ=y 704CONFIG_MAGIC_SYSRQ=y
705# CONFIG_STRIP_ASM_SYMS is not set
676# CONFIG_UNUSED_SYMBOLS is not set 706# CONFIG_UNUSED_SYMBOLS is not set
677# CONFIG_DEBUG_FS is not set 707# CONFIG_DEBUG_FS is not set
678# CONFIG_HEADERS_CHECK is not set 708# CONFIG_HEADERS_CHECK is not set
679CONFIG_DEBUG_KERNEL=y 709CONFIG_DEBUG_KERNEL=y
680# CONFIG_DEBUG_SHIRQ is not set 710# CONFIG_DEBUG_SHIRQ is not set
681CONFIG_DETECT_SOFTLOCKUP=y 711# CONFIG_DETECT_SOFTLOCKUP is not set
682# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
683CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
684CONFIG_DETECT_HUNG_TASK=y 712CONFIG_DETECT_HUNG_TASK=y
685# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set 713# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
686CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 714CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
687CONFIG_SCHED_DEBUG=y 715# CONFIG_SCHED_DEBUG is not set
688# CONFIG_SCHEDSTATS is not set 716# CONFIG_SCHEDSTATS is not set
689# CONFIG_TIMER_STATS is not set 717# CONFIG_TIMER_STATS is not set
690# CONFIG_DEBUG_OBJECTS is not set 718# CONFIG_DEBUG_OBJECTS is not set
691# CONFIG_SLUB_DEBUG_ON is not set 719# CONFIG_SLUB_DEBUG_ON is not set
692# CONFIG_SLUB_STATS is not set 720# CONFIG_SLUB_STATS is not set
721# CONFIG_DEBUG_KMEMLEAK is not set
722# CONFIG_DEBUG_PREEMPT is not set
693# CONFIG_DEBUG_RT_MUTEXES is not set 723# CONFIG_DEBUG_RT_MUTEXES is not set
694# CONFIG_RT_MUTEX_TESTER is not set 724# CONFIG_RT_MUTEX_TESTER is not set
695# CONFIG_DEBUG_SPINLOCK is not set 725# CONFIG_DEBUG_SPINLOCK is not set
@@ -708,31 +738,22 @@ CONFIG_DEBUG_INFO=y
708# CONFIG_DEBUG_LIST is not set 738# CONFIG_DEBUG_LIST is not set
709# CONFIG_DEBUG_SG is not set 739# CONFIG_DEBUG_SG is not set
710# CONFIG_DEBUG_NOTIFIERS is not set 740# CONFIG_DEBUG_NOTIFIERS is not set
741# CONFIG_DEBUG_CREDENTIALS is not set
711CONFIG_FRAME_POINTER=y 742CONFIG_FRAME_POINTER=y
712# CONFIG_BOOT_PRINTK_DELAY is not set 743# CONFIG_BOOT_PRINTK_DELAY is not set
713# CONFIG_RCU_TORTURE_TEST is not set 744# CONFIG_RCU_TORTURE_TEST is not set
714# CONFIG_RCU_CPU_STALL_DETECTOR is not set 745# CONFIG_RCU_CPU_STALL_DETECTOR is not set
715# CONFIG_BACKTRACE_SELF_TEST is not set 746# CONFIG_BACKTRACE_SELF_TEST is not set
716# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 747# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
748# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
717# CONFIG_FAULT_INJECTION is not set 749# CONFIG_FAULT_INJECTION is not set
718# CONFIG_PAGE_POISONING is not set 750# CONFIG_PAGE_POISONING is not set
719CONFIG_HAVE_FUNCTION_TRACER=y 751CONFIG_HAVE_FUNCTION_TRACER=y
720CONFIG_TRACING_SUPPORT=y 752CONFIG_TRACING_SUPPORT=y
721 753# CONFIG_FTRACE is not set
722# 754# CONFIG_BRANCH_PROFILE_NONE is not set
723# Tracers 755# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
724# 756# CONFIG_PROFILE_ALL_BRANCHES is not set
725# CONFIG_FUNCTION_TRACER is not set
726# CONFIG_IRQSOFF_TRACER is not set
727# CONFIG_SCHED_TRACER is not set
728# CONFIG_CONTEXT_SWITCH_TRACER is not set
729# CONFIG_EVENT_TRACER is not set
730# CONFIG_BOOT_TRACER is not set
731# CONFIG_TRACE_BRANCH_PROFILING is not set
732# CONFIG_STACK_TRACER is not set
733# CONFIG_KMEMTRACE is not set
734# CONFIG_WORKQUEUE_TRACER is not set
735# CONFIG_BLK_DEV_IO_TRACE is not set
736# CONFIG_SAMPLES is not set 757# CONFIG_SAMPLES is not set
737CONFIG_HAVE_ARCH_KGDB=y 758CONFIG_HAVE_ARCH_KGDB=y
738# CONFIG_KGDB is not set 759# CONFIG_KGDB is not set
@@ -754,7 +775,6 @@ CONFIG_CRYPTO=y
754# 775#
755# Crypto core or helper 776# Crypto core or helper
756# 777#
757# CONFIG_CRYPTO_FIPS is not set
758CONFIG_CRYPTO_ALGAPI=y 778CONFIG_CRYPTO_ALGAPI=y
759CONFIG_CRYPTO_ALGAPI2=y 779CONFIG_CRYPTO_ALGAPI2=y
760CONFIG_CRYPTO_AEAD2=y 780CONFIG_CRYPTO_AEAD2=y
@@ -796,11 +816,13 @@ CONFIG_CRYPTO_PCBC=m
796# 816#
797# CONFIG_CRYPTO_HMAC is not set 817# CONFIG_CRYPTO_HMAC is not set
798# CONFIG_CRYPTO_XCBC is not set 818# CONFIG_CRYPTO_XCBC is not set
819# CONFIG_CRYPTO_VMAC is not set
799 820
800# 821#
801# Digest 822# Digest
802# 823#
803CONFIG_CRYPTO_CRC32C=y 824CONFIG_CRYPTO_CRC32C=y
825# CONFIG_CRYPTO_GHASH is not set
804# CONFIG_CRYPTO_MD4 is not set 826# CONFIG_CRYPTO_MD4 is not set
805CONFIG_CRYPTO_MD5=y 827CONFIG_CRYPTO_MD5=y
806# CONFIG_CRYPTO_MICHAEL_MIC is not set 828# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig
index eef93627fb13..4b00a4306812 100644
--- a/arch/arm/configs/omap_zoom2_defconfig
+++ b/arch/arm/configs/omap_zoom2_defconfig
@@ -610,7 +610,8 @@ CONFIG_INPUT_EVDEV=y
610# 610#
611# Input Device Drivers 611# Input Device Drivers
612# 612#
613# CONFIG_INPUT_KEYBOARD is not set 613CONFIG_INPUT_KEYBOARD=y
614CONFIG_KEYBOARD_TWL4030=y
614# CONFIG_INPUT_MOUSE is not set 615# CONFIG_INPUT_MOUSE is not set
615# CONFIG_INPUT_JOYSTICK is not set 616# CONFIG_INPUT_JOYSTICK is not set
616# CONFIG_INPUT_TABLET is not set 617# CONFIG_INPUT_TABLET is not set
diff --git a/arch/arm/configs/omap_zoom3_defconfig b/arch/arm/configs/omap_zoom3_defconfig
index f0e7d0f85582..0d7e37a3651b 100644
--- a/arch/arm/configs/omap_zoom3_defconfig
+++ b/arch/arm/configs/omap_zoom3_defconfig
@@ -629,7 +629,8 @@ CONFIG_INPUT_EVDEV=y
629# 629#
630# Input Device Drivers 630# Input Device Drivers
631# 631#
632# CONFIG_INPUT_KEYBOARD is not set 632CONFIG_INPUT_KEYBOARD=y
633CONFIG_KEYBOARD_TWL4030=y
633# CONFIG_INPUT_MOUSE is not set 634# CONFIG_INPUT_MOUSE is not set
634# CONFIG_INPUT_JOYSTICK is not set 635# CONFIG_INPUT_JOYSTICK is not set
635# CONFIG_INPUT_TABLET is not set 636# CONFIG_INPUT_TABLET is not set
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig
new file mode 100644
index 000000000000..823b11e7091a
--- /dev/null
+++ b/arch/arm/configs/zeus_defconfig
@@ -0,0 +1,2032 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32
4# Tue Dec 8 20:27:05 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_GENERIC_HARDIRQS=y
12CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_HAVE_LATENCYTOP_SUPPORT=y
14CONFIG_LOCKDEP_SUPPORT=y
15CONFIG_TRACE_IRQFLAGS_SUPPORT=y
16CONFIG_HARDIRQS_SW_RESEND=y
17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_RWSEM_GENERIC_SPINLOCK=y
19CONFIG_ARCH_HAS_CPUFREQ=y
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_ARCH_MTD_XIP=y
23CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
24CONFIG_VECTORS_BASE=0xffff0000
25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_SWAP=y
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_POSIX_MQUEUE is not set
40# CONFIG_BSD_PROCESS_ACCT is not set
41# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47# CONFIG_TREE_RCU is not set
48# CONFIG_TREE_PREEMPT_RCU is not set
49CONFIG_TINY_RCU=y
50# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_IKCONFIG is not set
52CONFIG_LOG_BUF_SHIFT=13
53# CONFIG_GROUP_SCHED is not set
54# CONFIG_CGROUPS is not set
55# CONFIG_SYSFS_DEPRECATED_V2 is not set
56# CONFIG_RELAY is not set
57CONFIG_NAMESPACES=y
58# CONFIG_UTS_NS is not set
59# CONFIG_IPC_NS is not set
60# CONFIG_USER_NS is not set
61# CONFIG_PID_NS is not set
62# CONFIG_NET_NS is not set
63# CONFIG_BLK_DEV_INITRD is not set
64CONFIG_CC_OPTIMIZE_FOR_SIZE=y
65CONFIG_SYSCTL=y
66CONFIG_ANON_INODES=y
67# CONFIG_EMBEDDED is not set
68CONFIG_UID16=y
69CONFIG_SYSCTL_SYSCALL=y
70CONFIG_KALLSYMS=y
71# CONFIG_KALLSYMS_ALL is not set
72# CONFIG_KALLSYMS_EXTRA_PASS is not set
73CONFIG_HOTPLUG=y
74CONFIG_PRINTK=y
75CONFIG_BUG=y
76CONFIG_ELF_CORE=y
77CONFIG_BASE_FULL=y
78CONFIG_FUTEX=y
79CONFIG_EPOLL=y
80CONFIG_SIGNALFD=y
81CONFIG_TIMERFD=y
82CONFIG_EVENTFD=y
83CONFIG_SHMEM=y
84CONFIG_AIO=y
85
86#
87# Kernel Performance Events And Counters
88#
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_SLUB_DEBUG=y
91CONFIG_COMPAT_BRK=y
92# CONFIG_SLAB is not set
93CONFIG_SLUB=y
94# CONFIG_SLOB is not set
95# CONFIG_PROFILING is not set
96CONFIG_HAVE_OPROFILE=y
97# CONFIG_KPROBES is not set
98CONFIG_HAVE_KPROBES=y
99CONFIG_HAVE_KRETPROBES=y
100CONFIG_HAVE_CLK=y
101
102#
103# GCOV-based kernel profiling
104#
105# CONFIG_SLOW_WORK is not set
106CONFIG_HAVE_GENERIC_DMA_COHERENT=y
107CONFIG_SLABINFO=y
108CONFIG_RT_MUTEXES=y
109CONFIG_BASE_SMALL=0
110CONFIG_MODULES=y
111# CONFIG_MODULE_FORCE_LOAD is not set
112CONFIG_MODULE_UNLOAD=y
113# CONFIG_MODULE_FORCE_UNLOAD is not set
114# CONFIG_MODVERSIONS is not set
115# CONFIG_MODULE_SRCVERSION_ALL is not set
116CONFIG_BLOCK=y
117CONFIG_LBDAF=y
118# CONFIG_BLK_DEV_BSG is not set
119# CONFIG_BLK_DEV_INTEGRITY is not set
120
121#
122# IO Schedulers
123#
124CONFIG_IOSCHED_NOOP=y
125CONFIG_IOSCHED_DEADLINE=y
126# CONFIG_IOSCHED_CFQ is not set
127CONFIG_DEFAULT_DEADLINE=y
128# CONFIG_DEFAULT_CFQ is not set
129# CONFIG_DEFAULT_NOOP is not set
130CONFIG_DEFAULT_IOSCHED="deadline"
131# CONFIG_INLINE_SPIN_TRYLOCK is not set
132# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
133# CONFIG_INLINE_SPIN_LOCK is not set
134# CONFIG_INLINE_SPIN_LOCK_BH is not set
135# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
136# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
137CONFIG_INLINE_SPIN_UNLOCK=y
138# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
139CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
140# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
141# CONFIG_INLINE_READ_TRYLOCK is not set
142# CONFIG_INLINE_READ_LOCK is not set
143# CONFIG_INLINE_READ_LOCK_BH is not set
144# CONFIG_INLINE_READ_LOCK_IRQ is not set
145# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
146CONFIG_INLINE_READ_UNLOCK=y
147# CONFIG_INLINE_READ_UNLOCK_BH is not set
148CONFIG_INLINE_READ_UNLOCK_IRQ=y
149# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
150# CONFIG_INLINE_WRITE_TRYLOCK is not set
151# CONFIG_INLINE_WRITE_LOCK is not set
152# CONFIG_INLINE_WRITE_LOCK_BH is not set
153# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
154# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
155CONFIG_INLINE_WRITE_UNLOCK=y
156# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
157CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
158# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
159# CONFIG_MUTEX_SPIN_ON_OWNER is not set
160CONFIG_FREEZER=y
161
162#
163# System Type
164#
165CONFIG_MMU=y
166# CONFIG_ARCH_AAEC2000 is not set
167# CONFIG_ARCH_INTEGRATOR is not set
168# CONFIG_ARCH_REALVIEW is not set
169# CONFIG_ARCH_VERSATILE is not set
170# CONFIG_ARCH_AT91 is not set
171# CONFIG_ARCH_CLPS711X is not set
172# CONFIG_ARCH_GEMINI is not set
173# CONFIG_ARCH_EBSA110 is not set
174# CONFIG_ARCH_EP93XX is not set
175# CONFIG_ARCH_FOOTBRIDGE is not set
176# CONFIG_ARCH_MXC is not set
177# CONFIG_ARCH_STMP3XXX is not set
178# CONFIG_ARCH_NETX is not set
179# CONFIG_ARCH_H720X is not set
180# CONFIG_ARCH_NOMADIK is not set
181# CONFIG_ARCH_IOP13XX is not set
182# CONFIG_ARCH_IOP32X is not set
183# CONFIG_ARCH_IOP33X is not set
184# CONFIG_ARCH_IXP23XX is not set
185# CONFIG_ARCH_IXP2000 is not set
186# CONFIG_ARCH_IXP4XX is not set
187# CONFIG_ARCH_L7200 is not set
188# CONFIG_ARCH_DOVE is not set
189# CONFIG_ARCH_KIRKWOOD is not set
190# CONFIG_ARCH_LOKI is not set
191# CONFIG_ARCH_MV78XX0 is not set
192# CONFIG_ARCH_ORION5X is not set
193# CONFIG_ARCH_MMP is not set
194# CONFIG_ARCH_KS8695 is not set
195# CONFIG_ARCH_NS9XXX is not set
196# CONFIG_ARCH_W90X900 is not set
197# CONFIG_ARCH_PNX4008 is not set
198CONFIG_ARCH_PXA=y
199# CONFIG_ARCH_MSM is not set
200# CONFIG_ARCH_RPC is not set
201# CONFIG_ARCH_SA1100 is not set
202# CONFIG_ARCH_S3C2410 is not set
203# CONFIG_ARCH_S3C64XX is not set
204# CONFIG_ARCH_S5PC1XX is not set
205# CONFIG_ARCH_SHARK is not set
206# CONFIG_ARCH_LH7A40X is not set
207# CONFIG_ARCH_U300 is not set
208# CONFIG_ARCH_DAVINCI is not set
209# CONFIG_ARCH_OMAP is not set
210# CONFIG_ARCH_BCMRING is not set
211# CONFIG_ARCH_U8500 is not set
212
213#
214# Intel PXA2xx/PXA3xx Implementations
215#
216
217#
218# Intel/Marvell Dev Platforms (sorted by hardware release time)
219#
220# CONFIG_ARCH_LUBBOCK is not set
221# CONFIG_MACH_MAINSTONE is not set
222# CONFIG_MACH_ZYLONITE300 is not set
223# CONFIG_MACH_ZYLONITE320 is not set
224# CONFIG_MACH_LITTLETON is not set
225# CONFIG_MACH_TAVOREVB is not set
226# CONFIG_MACH_SAAR is not set
227
228#
229# Third Party Dev Platforms (sorted by vendor name)
230#
231# CONFIG_ARCH_PXA_IDP is not set
232# CONFIG_ARCH_VIPER is not set
233CONFIG_MACH_ARCOM_ZEUS=y
234# CONFIG_MACH_BALLOON3 is not set
235# CONFIG_MACH_CSB726 is not set
236# CONFIG_MACH_ARMCORE is not set
237# CONFIG_MACH_EM_X270 is not set
238# CONFIG_MACH_EXEDA is not set
239# CONFIG_MACH_CM_X300 is not set
240# CONFIG_ARCH_GUMSTIX is not set
241# CONFIG_MACH_INTELMOTE2 is not set
242# CONFIG_MACH_STARGATE2 is not set
243# CONFIG_MACH_XCEP is not set
244# CONFIG_TRIZEPS_PXA is not set
245CONFIG_ARCOM_PCMCIA=y
246# CONFIG_MACH_LOGICPD_PXA270 is not set
247# CONFIG_MACH_PCM027 is not set
248# CONFIG_MACH_COLIBRI is not set
249# CONFIG_MACH_COLIBRI300 is not set
250# CONFIG_MACH_COLIBRI320 is not set
251
252#
253# End-user Products (sorted by vendor name)
254#
255# CONFIG_MACH_H4700 is not set
256# CONFIG_MACH_H5000 is not set
257# CONFIG_MACH_HIMALAYA is not set
258# CONFIG_MACH_MAGICIAN is not set
259# CONFIG_MACH_MIOA701 is not set
260# CONFIG_PXA_EZX is not set
261# CONFIG_MACH_MP900C is not set
262# CONFIG_ARCH_PXA_PALM is not set
263# CONFIG_PXA_SHARPSL is not set
264# CONFIG_ARCH_PXA_ESERIES is not set
265CONFIG_PXA27x=y
266CONFIG_PXA_SSP=y
267CONFIG_PXA_HAVE_BOARD_IRQS=y
268CONFIG_PXA_HAVE_ISA_IRQS=y
269CONFIG_PLAT_PXA=y
270
271#
272# Processor Type
273#
274CONFIG_CPU_32=y
275CONFIG_CPU_XSCALE=y
276CONFIG_CPU_32v5=y
277CONFIG_CPU_ABRT_EV5T=y
278CONFIG_CPU_PABRT_LEGACY=y
279CONFIG_CPU_CACHE_VIVT=y
280CONFIG_CPU_TLB_V4WBI=y
281CONFIG_CPU_CP15=y
282CONFIG_CPU_CP15_MMU=y
283
284#
285# Processor Features
286#
287CONFIG_ARM_THUMB=y
288# CONFIG_CPU_DCACHE_DISABLE is not set
289CONFIG_ARM_L1_CACHE_SHIFT=5
290CONFIG_IWMMXT=y
291CONFIG_XSCALE_PMU=y
292CONFIG_COMMON_CLKDEV=y
293
294#
295# Bus support
296#
297CONFIG_ISA=y
298# CONFIG_PCI_SYSCALL is not set
299# CONFIG_ARCH_SUPPORTS_MSI is not set
300CONFIG_PCCARD=m
301CONFIG_PCMCIA=m
302CONFIG_PCMCIA_LOAD_CIS=y
303CONFIG_PCMCIA_IOCTL=y
304
305#
306# PC-card bridges
307#
308# CONFIG_I82365 is not set
309# CONFIG_TCIC is not set
310CONFIG_PCMCIA_SOC_COMMON=m
311CONFIG_PCMCIA_PXA2XX=m
312# CONFIG_PCMCIA_DEBUG is not set
313CONFIG_PCMCIA_PROBE=y
314
315#
316# Kernel Features
317#
318CONFIG_TICK_ONESHOT=y
319# CONFIG_NO_HZ is not set
320# CONFIG_HIGH_RES_TIMERS is not set
321CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
322CONFIG_VMSPLIT_3G=y
323# CONFIG_VMSPLIT_2G is not set
324# CONFIG_VMSPLIT_1G is not set
325CONFIG_PAGE_OFFSET=0xC0000000
326CONFIG_PREEMPT_NONE=y
327# CONFIG_PREEMPT_VOLUNTARY is not set
328# CONFIG_PREEMPT is not set
329CONFIG_HZ=100
330CONFIG_AEABI=y
331CONFIG_OABI_COMPAT=y
332# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
333# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
334# CONFIG_HIGHMEM is not set
335CONFIG_SELECT_MEMORY_MODEL=y
336CONFIG_FLATMEM_MANUAL=y
337# CONFIG_DISCONTIGMEM_MANUAL is not set
338# CONFIG_SPARSEMEM_MANUAL is not set
339CONFIG_FLATMEM=y
340CONFIG_FLAT_NODE_MEM_MAP=y
341CONFIG_PAGEFLAGS_EXTENDED=y
342CONFIG_SPLIT_PTLOCK_CPUS=4096
343# CONFIG_PHYS_ADDR_T_64BIT is not set
344CONFIG_ZONE_DMA_FLAG=0
345CONFIG_VIRT_TO_BUS=y
346CONFIG_HAVE_MLOCK=y
347CONFIG_HAVE_MLOCKED_PAGE_BIT=y
348# CONFIG_KSM is not set
349CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
350CONFIG_ALIGNMENT_TRAP=y
351# CONFIG_UACCESS_WITH_MEMCPY is not set
352
353#
354# Boot options
355#
356CONFIG_ZBOOT_ROM_TEXT=0x0
357CONFIG_ZBOOT_ROM_BSS=0x0
358CONFIG_CMDLINE="root=31:02 rootfstype=jffs2 ro console=ttyS0,115200"
359# CONFIG_XIP_KERNEL is not set
360# CONFIG_KEXEC is not set
361
362#
363# CPU Power Management
364#
365CONFIG_CPU_FREQ=y
366CONFIG_CPU_FREQ_TABLE=y
367# CONFIG_CPU_FREQ_DEBUG is not set
368CONFIG_CPU_FREQ_STAT=y
369# CONFIG_CPU_FREQ_STAT_DETAILS is not set
370CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
371# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
372# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
373# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
374# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
375CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
376CONFIG_CPU_FREQ_GOV_POWERSAVE=m
377CONFIG_CPU_FREQ_GOV_USERSPACE=m
378CONFIG_CPU_FREQ_GOV_ONDEMAND=m
379CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
380# CONFIG_CPU_IDLE is not set
381
382#
383# Floating point emulation
384#
385
386#
387# At least one emulation must be selected
388#
389CONFIG_FPE_NWFPE=y
390# CONFIG_FPE_NWFPE_XP is not set
391# CONFIG_FPE_FASTFPE is not set
392
393#
394# Userspace binary formats
395#
396CONFIG_BINFMT_ELF=y
397# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
398CONFIG_HAVE_AOUT=y
399# CONFIG_BINFMT_AOUT is not set
400# CONFIG_BINFMT_MISC is not set
401
402#
403# Power management options
404#
405CONFIG_PM=y
406# CONFIG_PM_DEBUG is not set
407CONFIG_PM_SLEEP=y
408CONFIG_SUSPEND=y
409CONFIG_SUSPEND_FREEZER=y
410CONFIG_APM_EMULATION=y
411# CONFIG_PM_RUNTIME is not set
412CONFIG_ARCH_SUSPEND_POSSIBLE=y
413CONFIG_NET=y
414
415#
416# Networking options
417#
418CONFIG_PACKET=y
419# CONFIG_PACKET_MMAP is not set
420CONFIG_UNIX=y
421CONFIG_XFRM=y
422# CONFIG_XFRM_USER is not set
423# CONFIG_XFRM_SUB_POLICY is not set
424# CONFIG_XFRM_MIGRATE is not set
425# CONFIG_XFRM_STATISTICS is not set
426# CONFIG_NET_KEY is not set
427CONFIG_INET=y
428# CONFIG_IP_MULTICAST is not set
429# CONFIG_IP_ADVANCED_ROUTER is not set
430CONFIG_IP_FIB_HASH=y
431CONFIG_IP_PNP=y
432CONFIG_IP_PNP_DHCP=y
433# CONFIG_IP_PNP_BOOTP is not set
434# CONFIG_IP_PNP_RARP is not set
435# CONFIG_NET_IPIP is not set
436# CONFIG_NET_IPGRE is not set
437# CONFIG_ARPD is not set
438CONFIG_SYN_COOKIES=y
439# CONFIG_INET_AH is not set
440# CONFIG_INET_ESP is not set
441# CONFIG_INET_IPCOMP is not set
442# CONFIG_INET_XFRM_TUNNEL is not set
443# CONFIG_INET_TUNNEL is not set
444CONFIG_INET_XFRM_MODE_TRANSPORT=y
445CONFIG_INET_XFRM_MODE_TUNNEL=y
446CONFIG_INET_XFRM_MODE_BEET=y
447# CONFIG_INET_LRO is not set
448CONFIG_INET_DIAG=y
449CONFIG_INET_TCP_DIAG=y
450# CONFIG_TCP_CONG_ADVANCED is not set
451CONFIG_TCP_CONG_CUBIC=y
452CONFIG_DEFAULT_TCP_CONG="cubic"
453# CONFIG_TCP_MD5SIG is not set
454# CONFIG_IPV6 is not set
455# CONFIG_NETWORK_SECMARK is not set
456# CONFIG_NETFILTER is not set
457# CONFIG_IP_DCCP is not set
458# CONFIG_IP_SCTP is not set
459# CONFIG_RDS is not set
460# CONFIG_TIPC is not set
461# CONFIG_ATM is not set
462# CONFIG_BRIDGE is not set
463# CONFIG_NET_DSA is not set
464# CONFIG_VLAN_8021Q is not set
465# CONFIG_DECNET is not set
466# CONFIG_LLC2 is not set
467# CONFIG_IPX is not set
468# CONFIG_ATALK is not set
469# CONFIG_X25 is not set
470# CONFIG_LAPB is not set
471# CONFIG_ECONET is not set
472# CONFIG_WAN_ROUTER is not set
473# CONFIG_PHONET is not set
474# CONFIG_IEEE802154 is not set
475# CONFIG_NET_SCHED is not set
476# CONFIG_DCB is not set
477
478#
479# Network testing
480#
481# CONFIG_NET_PKTGEN is not set
482# CONFIG_HAMRADIO is not set
483# CONFIG_CAN is not set
484# CONFIG_IRDA is not set
485CONFIG_BT=m
486CONFIG_BT_L2CAP=m
487# CONFIG_BT_SCO is not set
488CONFIG_BT_RFCOMM=m
489CONFIG_BT_RFCOMM_TTY=y
490CONFIG_BT_BNEP=m
491# CONFIG_BT_BNEP_MC_FILTER is not set
492# CONFIG_BT_BNEP_PROTO_FILTER is not set
493# CONFIG_BT_HIDP is not set
494
495#
496# Bluetooth device drivers
497#
498# CONFIG_BT_HCIBTUSB is not set
499# CONFIG_BT_HCIBTSDIO is not set
500CONFIG_BT_HCIUART=m
501CONFIG_BT_HCIUART_H4=y
502CONFIG_BT_HCIUART_BCSP=y
503# CONFIG_BT_HCIUART_LL is not set
504# CONFIG_BT_HCIBCM203X is not set
505# CONFIG_BT_HCIBPA10X is not set
506# CONFIG_BT_HCIBFUSB is not set
507# CONFIG_BT_HCIDTL1 is not set
508# CONFIG_BT_HCIBT3C is not set
509# CONFIG_BT_HCIBLUECARD is not set
510# CONFIG_BT_HCIBTUART is not set
511# CONFIG_BT_HCIVHCI is not set
512# CONFIG_BT_MRVL is not set
513# CONFIG_AF_RXRPC is not set
514CONFIG_WIRELESS=y
515CONFIG_WIRELESS_EXT=y
516CONFIG_WEXT_CORE=y
517CONFIG_WEXT_PROC=y
518CONFIG_WEXT_SPY=y
519CONFIG_WEXT_PRIV=y
520CONFIG_CFG80211=m
521# CONFIG_NL80211_TESTMODE is not set
522# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
523# CONFIG_CFG80211_REG_DEBUG is not set
524CONFIG_CFG80211_DEFAULT_PS=y
525# CONFIG_WIRELESS_OLD_REGULATORY is not set
526CONFIG_CFG80211_WEXT=y
527CONFIG_WIRELESS_EXT_SYSFS=y
528CONFIG_LIB80211=m
529# CONFIG_LIB80211_DEBUG is not set
530CONFIG_MAC80211=m
531CONFIG_MAC80211_RC_MINSTREL=y
532# CONFIG_MAC80211_RC_DEFAULT_PID is not set
533CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
534CONFIG_MAC80211_RC_DEFAULT="minstrel"
535# CONFIG_MAC80211_MESH is not set
536# CONFIG_MAC80211_LEDS is not set
537# CONFIG_MAC80211_DEBUG_MENU is not set
538# CONFIG_WIMAX is not set
539# CONFIG_RFKILL is not set
540# CONFIG_NET_9P is not set
541
542#
543# Device Drivers
544#
545
546#
547# Generic Driver Options
548#
549CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
550# CONFIG_DEVTMPFS is not set
551CONFIG_STANDALONE=y
552CONFIG_PREVENT_FIRMWARE_BUILD=y
553CONFIG_FW_LOADER=y
554CONFIG_FIRMWARE_IN_KERNEL=y
555CONFIG_EXTRA_FIRMWARE=""
556# CONFIG_DEBUG_DRIVER is not set
557# CONFIG_DEBUG_DEVRES is not set
558# CONFIG_SYS_HYPERVISOR is not set
559# CONFIG_CONNECTOR is not set
560CONFIG_MTD=y
561# CONFIG_MTD_DEBUG is not set
562# CONFIG_MTD_TESTS is not set
563# CONFIG_MTD_CONCAT is not set
564CONFIG_MTD_PARTITIONS=y
565CONFIG_MTD_REDBOOT_PARTS=y
566CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
567# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
568CONFIG_MTD_REDBOOT_PARTS_READONLY=y
569# CONFIG_MTD_CMDLINE_PARTS is not set
570# CONFIG_MTD_AFS_PARTS is not set
571# CONFIG_MTD_AR7_PARTS is not set
572
573#
574# User Modules And Translation Layers
575#
576CONFIG_MTD_CHAR=m
577CONFIG_MTD_BLKDEVS=y
578CONFIG_MTD_BLOCK=y
579# CONFIG_FTL is not set
580# CONFIG_NFTL is not set
581# CONFIG_INFTL is not set
582# CONFIG_RFD_FTL is not set
583# CONFIG_SSFDC is not set
584# CONFIG_MTD_OOPS is not set
585
586#
587# RAM/ROM/Flash chip drivers
588#
589CONFIG_MTD_CFI=y
590CONFIG_MTD_JEDECPROBE=y
591CONFIG_MTD_GEN_PROBE=y
592CONFIG_MTD_CFI_ADV_OPTIONS=y
593CONFIG_MTD_CFI_NOSWAP=y
594# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
595# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
596CONFIG_MTD_CFI_GEOMETRY=y
597CONFIG_MTD_MAP_BANK_WIDTH_1=y
598CONFIG_MTD_MAP_BANK_WIDTH_2=y
599# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
600# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
601# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
602# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
603CONFIG_MTD_CFI_I1=y
604# CONFIG_MTD_CFI_I2 is not set
605# CONFIG_MTD_CFI_I4 is not set
606# CONFIG_MTD_CFI_I8 is not set
607# CONFIG_MTD_OTP is not set
608CONFIG_MTD_CFI_INTELEXT=y
609CONFIG_MTD_CFI_AMDSTD=y
610# CONFIG_MTD_CFI_STAA is not set
611CONFIG_MTD_CFI_UTIL=y
612CONFIG_MTD_RAM=y
613# CONFIG_MTD_ROM is not set
614# CONFIG_MTD_ABSENT is not set
615# CONFIG_MTD_XIP is not set
616
617#
618# Mapping drivers for chip access
619#
620CONFIG_MTD_COMPLEX_MAPPINGS=y
621CONFIG_MTD_PHYSMAP=y
622# CONFIG_MTD_PHYSMAP_COMPAT is not set
623CONFIG_MTD_PXA2XX=y
624# CONFIG_MTD_ARM_INTEGRATOR is not set
625# CONFIG_MTD_IMPA7 is not set
626# CONFIG_MTD_GPIO_ADDR is not set
627# CONFIG_MTD_PLATRAM is not set
628
629#
630# Self-contained MTD device drivers
631#
632# CONFIG_MTD_DATAFLASH is not set
633# CONFIG_MTD_M25P80 is not set
634# CONFIG_MTD_SST25L is not set
635# CONFIG_MTD_SLRAM is not set
636# CONFIG_MTD_PHRAM is not set
637# CONFIG_MTD_MTDRAM is not set
638# CONFIG_MTD_BLOCK2MTD is not set
639
640#
641# Disk-On-Chip Device Drivers
642#
643# CONFIG_MTD_DOC2000 is not set
644# CONFIG_MTD_DOC2001 is not set
645# CONFIG_MTD_DOC2001PLUS is not set
646# CONFIG_MTD_NAND is not set
647# CONFIG_MTD_ONENAND is not set
648
649#
650# LPDDR flash memory drivers
651#
652# CONFIG_MTD_LPDDR is not set
653
654#
655# UBI - Unsorted block images
656#
657# CONFIG_MTD_UBI is not set
658# CONFIG_PARPORT is not set
659# CONFIG_PNP is not set
660CONFIG_BLK_DEV=y
661# CONFIG_BLK_DEV_COW_COMMON is not set
662CONFIG_BLK_DEV_LOOP=m
663# CONFIG_BLK_DEV_CRYPTOLOOP is not set
664
665#
666# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
667#
668# CONFIG_BLK_DEV_NBD is not set
669# CONFIG_BLK_DEV_UB is not set
670# CONFIG_BLK_DEV_RAM is not set
671# CONFIG_CDROM_PKTCDVD is not set
672# CONFIG_ATA_OVER_ETH is not set
673# CONFIG_MG_DISK is not set
674CONFIG_MISC_DEVICES=y
675# CONFIG_ICS932S401 is not set
676# CONFIG_ENCLOSURE_SERVICES is not set
677# CONFIG_ISL29003 is not set
678# CONFIG_DS1682 is not set
679# CONFIG_C2PORT is not set
680
681#
682# EEPROM support
683#
684CONFIG_EEPROM_AT24=m
685# CONFIG_EEPROM_AT25 is not set
686# CONFIG_EEPROM_LEGACY is not set
687# CONFIG_EEPROM_MAX6875 is not set
688# CONFIG_EEPROM_93CX6 is not set
689# CONFIG_IWMC3200TOP is not set
690CONFIG_HAVE_IDE=y
691# CONFIG_IDE is not set
692
693#
694# SCSI device support
695#
696# CONFIG_RAID_ATTRS is not set
697CONFIG_SCSI=m
698CONFIG_SCSI_DMA=y
699# CONFIG_SCSI_TGT is not set
700# CONFIG_SCSI_NETLINK is not set
701# CONFIG_SCSI_PROC_FS is not set
702
703#
704# SCSI support type (disk, tape, CD-ROM)
705#
706CONFIG_BLK_DEV_SD=m
707# CONFIG_CHR_DEV_ST is not set
708# CONFIG_CHR_DEV_OSST is not set
709# CONFIG_BLK_DEV_SR is not set
710# CONFIG_CHR_DEV_SG is not set
711# CONFIG_CHR_DEV_SCH is not set
712# CONFIG_SCSI_MULTI_LUN is not set
713# CONFIG_SCSI_CONSTANTS is not set
714# CONFIG_SCSI_LOGGING is not set
715# CONFIG_SCSI_SCAN_ASYNC is not set
716CONFIG_SCSI_WAIT_SCAN=m
717
718#
719# SCSI Transports
720#
721# CONFIG_SCSI_SPI_ATTRS is not set
722# CONFIG_SCSI_FC_ATTRS is not set
723# CONFIG_SCSI_ISCSI_ATTRS is not set
724# CONFIG_SCSI_SAS_LIBSAS is not set
725# CONFIG_SCSI_SRP_ATTRS is not set
726CONFIG_SCSI_LOWLEVEL=y
727# CONFIG_ISCSI_TCP is not set
728# CONFIG_SCSI_AHA152X is not set
729# CONFIG_SCSI_AIC7XXX_OLD is not set
730# CONFIG_SCSI_ADVANSYS is not set
731# CONFIG_SCSI_IN2000 is not set
732# CONFIG_LIBFC is not set
733# CONFIG_LIBFCOE is not set
734# CONFIG_SCSI_DTC3280 is not set
735# CONFIG_SCSI_FUTURE_DOMAIN is not set
736# CONFIG_SCSI_GENERIC_NCR5380 is not set
737# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
738# CONFIG_SCSI_NCR53C406A is not set
739# CONFIG_SCSI_PAS16 is not set
740# CONFIG_SCSI_QLOGIC_FAS is not set
741# CONFIG_SCSI_SYM53C416 is not set
742# CONFIG_SCSI_T128 is not set
743# CONFIG_SCSI_DEBUG is not set
744# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
745# CONFIG_SCSI_DH is not set
746# CONFIG_SCSI_OSD_INITIATOR is not set
747CONFIG_ATA=m
748# CONFIG_ATA_NONSTANDARD is not set
749CONFIG_ATA_VERBOSE_ERROR=y
750# CONFIG_SATA_PMP is not set
751CONFIG_ATA_SFF=y
752# CONFIG_SATA_MV is not set
753# CONFIG_PATA_LEGACY is not set
754CONFIG_PATA_PCMCIA=m
755# CONFIG_PATA_QDI is not set
756# CONFIG_PATA_WINBOND_VLB is not set
757# CONFIG_MD is not set
758CONFIG_NETDEVICES=y
759# CONFIG_DUMMY is not set
760# CONFIG_BONDING is not set
761# CONFIG_MACVLAN is not set
762# CONFIG_EQUALIZER is not set
763# CONFIG_TUN is not set
764# CONFIG_VETH is not set
765# CONFIG_ARCNET is not set
766# CONFIG_PHYLIB is not set
767CONFIG_NET_ETHERNET=y
768CONFIG_MII=y
769# CONFIG_AX88796 is not set
770# CONFIG_NET_VENDOR_3COM is not set
771# CONFIG_NET_VENDOR_SMC is not set
772# CONFIG_SMC91X is not set
773CONFIG_DM9000=y
774CONFIG_DM9000_DEBUGLEVEL=4
775# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
776# CONFIG_ENC28J60 is not set
777# CONFIG_ETHOC is not set
778# CONFIG_SMC911X is not set
779# CONFIG_SMSC911X is not set
780# CONFIG_NET_VENDOR_RACAL is not set
781# CONFIG_DNET is not set
782# CONFIG_AT1700 is not set
783# CONFIG_DEPCA is not set
784# CONFIG_HP100 is not set
785# CONFIG_NET_ISA is not set
786# CONFIG_IBM_NEW_EMAC_ZMII is not set
787# CONFIG_IBM_NEW_EMAC_RGMII is not set
788# CONFIG_IBM_NEW_EMAC_TAH is not set
789# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
790# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
791# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
792# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
793# CONFIG_NET_PCI is not set
794# CONFIG_B44 is not set
795# CONFIG_CS89x0 is not set
796# CONFIG_KS8842 is not set
797# CONFIG_KS8851 is not set
798# CONFIG_KS8851_MLL is not set
799# CONFIG_NETDEV_1000 is not set
800# CONFIG_NETDEV_10000 is not set
801# CONFIG_TR is not set
802CONFIG_WLAN=y
803# CONFIG_PCMCIA_RAYCS is not set
804# CONFIG_LIBERTAS_THINFIRM is not set
805# CONFIG_ATMEL is not set
806# CONFIG_AT76C50X_USB is not set
807# CONFIG_AIRO_CS is not set
808# CONFIG_PCMCIA_WL3501 is not set
809# CONFIG_USB_ZD1201 is not set
810# CONFIG_USB_NET_RNDIS_WLAN is not set
811# CONFIG_RTL8187 is not set
812# CONFIG_MAC80211_HWSIM is not set
813# CONFIG_ATH_COMMON is not set
814# CONFIG_B43 is not set
815# CONFIG_B43LEGACY is not set
816# CONFIG_HOSTAP is not set
817# CONFIG_IWM is not set
818# CONFIG_LIBERTAS is not set
819CONFIG_HERMES=m
820CONFIG_HERMES_CACHE_FW_ON_INIT=y
821CONFIG_PCMCIA_HERMES=m
822# CONFIG_PCMCIA_SPECTRUM is not set
823# CONFIG_P54_COMMON is not set
824CONFIG_RT2X00=m
825# CONFIG_RT2500USB is not set
826CONFIG_RT73USB=m
827# CONFIG_RT2800USB is not set
828CONFIG_RT2X00_LIB_USB=m
829CONFIG_RT2X00_LIB=m
830CONFIG_RT2X00_LIB_FIRMWARE=y
831CONFIG_RT2X00_LIB_CRYPTO=y
832CONFIG_RT2X00_LIB_LEDS=y
833# CONFIG_RT2X00_DEBUG is not set
834# CONFIG_WL12XX is not set
835# CONFIG_ZD1211RW is not set
836
837#
838# Enable WiMAX (Networking options) to see the WiMAX drivers
839#
840
841#
842# USB Network Adapters
843#
844# CONFIG_USB_CATC is not set
845# CONFIG_USB_KAWETH is not set
846# CONFIG_USB_PEGASUS is not set
847# CONFIG_USB_RTL8150 is not set
848# CONFIG_USB_USBNET is not set
849CONFIG_NET_PCMCIA=y
850# CONFIG_PCMCIA_3C589 is not set
851# CONFIG_PCMCIA_3C574 is not set
852# CONFIG_PCMCIA_FMVJ18X is not set
853# CONFIG_PCMCIA_PCNET is not set
854# CONFIG_PCMCIA_NMCLAN is not set
855# CONFIG_PCMCIA_SMC91C92 is not set
856# CONFIG_PCMCIA_XIRC2PS is not set
857# CONFIG_PCMCIA_AXNET is not set
858# CONFIG_WAN is not set
859CONFIG_PPP=m
860# CONFIG_PPP_MULTILINK is not set
861# CONFIG_PPP_FILTER is not set
862CONFIG_PPP_ASYNC=m
863# CONFIG_PPP_SYNC_TTY is not set
864CONFIG_PPP_DEFLATE=m
865CONFIG_PPP_BSDCOMP=m
866# CONFIG_PPP_MPPE is not set
867# CONFIG_PPPOE is not set
868# CONFIG_PPPOL2TP is not set
869# CONFIG_SLIP is not set
870CONFIG_SLHC=m
871# CONFIG_NETCONSOLE is not set
872# CONFIG_NETPOLL is not set
873# CONFIG_NET_POLL_CONTROLLER is not set
874# CONFIG_ISDN is not set
875# CONFIG_PHONE is not set
876
877#
878# Input device support
879#
880CONFIG_INPUT=y
881# CONFIG_INPUT_FF_MEMLESS is not set
882# CONFIG_INPUT_POLLDEV is not set
883
884#
885# Userland interfaces
886#
887CONFIG_INPUT_MOUSEDEV=y
888# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
889CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
890CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
891# CONFIG_INPUT_JOYDEV is not set
892CONFIG_INPUT_EVDEV=m
893# CONFIG_INPUT_EVBUG is not set
894
895#
896# Input Device Drivers
897#
898# CONFIG_INPUT_KEYBOARD is not set
899# CONFIG_INPUT_MOUSE is not set
900# CONFIG_INPUT_JOYSTICK is not set
901# CONFIG_INPUT_TABLET is not set
902CONFIG_INPUT_TOUCHSCREEN=y
903# CONFIG_TOUCHSCREEN_ADS7846 is not set
904# CONFIG_TOUCHSCREEN_AD7877 is not set
905# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
906# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
907# CONFIG_TOUCHSCREEN_AD7879 is not set
908# CONFIG_TOUCHSCREEN_EETI is not set
909CONFIG_TOUCHSCREEN_FUJITSU=m
910# CONFIG_TOUCHSCREEN_GUNZE is not set
911CONFIG_TOUCHSCREEN_ELO=m
912# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
913# CONFIG_TOUCHSCREEN_MCS5000 is not set
914CONFIG_TOUCHSCREEN_MTOUCH=m
915CONFIG_TOUCHSCREEN_INEXIO=m
916# CONFIG_TOUCHSCREEN_MK712 is not set
917CONFIG_TOUCHSCREEN_HTCPEN=m
918CONFIG_TOUCHSCREEN_PENMOUNT=m
919CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
920CONFIG_TOUCHSCREEN_TOUCHWIN=m
921# CONFIG_TOUCHSCREEN_WM97XX is not set
922# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
923CONFIG_TOUCHSCREEN_TOUCHIT213=m
924# CONFIG_TOUCHSCREEN_TSC2007 is not set
925# CONFIG_TOUCHSCREEN_W90X900 is not set
926CONFIG_INPUT_MISC=y
927# CONFIG_INPUT_ATI_REMOTE is not set
928# CONFIG_INPUT_ATI_REMOTE2 is not set
929# CONFIG_INPUT_KEYSPAN_REMOTE is not set
930# CONFIG_INPUT_POWERMATE is not set
931# CONFIG_INPUT_YEALINK is not set
932# CONFIG_INPUT_CM109 is not set
933CONFIG_INPUT_UINPUT=m
934# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
935
936#
937# Hardware I/O ports
938#
939CONFIG_SERIO=y
940CONFIG_SERIO_SERPORT=y
941# CONFIG_SERIO_RAW is not set
942# CONFIG_GAMEPORT is not set
943
944#
945# Character devices
946#
947CONFIG_VT=y
948CONFIG_CONSOLE_TRANSLATIONS=y
949CONFIG_VT_CONSOLE=y
950CONFIG_HW_CONSOLE=y
951# CONFIG_VT_HW_CONSOLE_BINDING is not set
952CONFIG_DEVKMEM=y
953# CONFIG_SERIAL_NONSTANDARD is not set
954
955#
956# Serial drivers
957#
958CONFIG_SERIAL_8250=y
959CONFIG_SERIAL_8250_CONSOLE=y
960# CONFIG_SERIAL_8250_CS is not set
961CONFIG_SERIAL_8250_NR_UARTS=7
962CONFIG_SERIAL_8250_RUNTIME_UARTS=7
963# CONFIG_SERIAL_8250_EXTENDED is not set
964
965#
966# Non-8250 serial port support
967#
968# CONFIG_SERIAL_MAX3100 is not set
969# CONFIG_SERIAL_PXA is not set
970CONFIG_SERIAL_CORE=y
971CONFIG_SERIAL_CORE_CONSOLE=y
972CONFIG_UNIX98_PTYS=y
973# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
974# CONFIG_LEGACY_PTYS is not set
975# CONFIG_IPMI_HANDLER is not set
976CONFIG_HW_RANDOM=m
977# CONFIG_HW_RANDOM_TIMERIOMEM is not set
978# CONFIG_DTLK is not set
979# CONFIG_R3964 is not set
980
981#
982# PCMCIA character devices
983#
984# CONFIG_SYNCLINK_CS is not set
985# CONFIG_CARDMAN_4000 is not set
986# CONFIG_CARDMAN_4040 is not set
987# CONFIG_IPWIRELESS is not set
988# CONFIG_RAW_DRIVER is not set
989# CONFIG_TCG_TPM is not set
990CONFIG_DEVPORT=y
991CONFIG_I2C=y
992CONFIG_I2C_BOARDINFO=y
993CONFIG_I2C_COMPAT=y
994CONFIG_I2C_CHARDEV=y
995# CONFIG_I2C_HELPER_AUTO is not set
996
997#
998# I2C Algorithms
999#
1000CONFIG_I2C_ALGOBIT=y
1001# CONFIG_I2C_ALGOPCF is not set
1002# CONFIG_I2C_ALGOPCA is not set
1003
1004#
1005# I2C Hardware Bus support
1006#
1007
1008#
1009# I2C system bus drivers (mostly embedded / system-on-chip)
1010#
1011# CONFIG_I2C_DESIGNWARE is not set
1012CONFIG_I2C_GPIO=y
1013# CONFIG_I2C_OCORES is not set
1014CONFIG_I2C_PXA=y
1015# CONFIG_I2C_PXA_SLAVE is not set
1016# CONFIG_I2C_SIMTEC is not set
1017
1018#
1019# External I2C/SMBus adapter drivers
1020#
1021# CONFIG_I2C_PARPORT_LIGHT is not set
1022# CONFIG_I2C_TAOS_EVM is not set
1023# CONFIG_I2C_TINY_USB is not set
1024
1025#
1026# Other I2C/SMBus bus drivers
1027#
1028# CONFIG_I2C_ELEKTOR is not set
1029# CONFIG_I2C_PCA_ISA is not set
1030# CONFIG_I2C_PCA_PLATFORM is not set
1031# CONFIG_I2C_STUB is not set
1032
1033#
1034# Miscellaneous I2C Chip support
1035#
1036# CONFIG_SENSORS_TSL2550 is not set
1037# CONFIG_I2C_DEBUG_CORE is not set
1038# CONFIG_I2C_DEBUG_ALGO is not set
1039# CONFIG_I2C_DEBUG_BUS is not set
1040# CONFIG_I2C_DEBUG_CHIP is not set
1041CONFIG_SPI=y
1042# CONFIG_SPI_DEBUG is not set
1043CONFIG_SPI_MASTER=y
1044
1045#
1046# SPI Master Controller Drivers
1047#
1048# CONFIG_SPI_BITBANG is not set
1049# CONFIG_SPI_GPIO is not set
1050CONFIG_SPI_PXA2XX=y
1051
1052#
1053# SPI Protocol Masters
1054#
1055# CONFIG_SPI_SPIDEV is not set
1056# CONFIG_SPI_TLE62X0 is not set
1057
1058#
1059# PPS support
1060#
1061# CONFIG_PPS is not set
1062CONFIG_ARCH_REQUIRE_GPIOLIB=y
1063CONFIG_GPIOLIB=y
1064# CONFIG_DEBUG_GPIO is not set
1065CONFIG_GPIO_SYSFS=y
1066
1067#
1068# Memory mapped GPIO expanders:
1069#
1070
1071#
1072# I2C GPIO expanders:
1073#
1074# CONFIG_GPIO_MAX732X is not set
1075CONFIG_GPIO_PCA953X=y
1076# CONFIG_GPIO_PCF857X is not set
1077
1078#
1079# PCI GPIO expanders:
1080#
1081
1082#
1083# SPI GPIO expanders:
1084#
1085# CONFIG_GPIO_MAX7301 is not set
1086# CONFIG_GPIO_MCP23S08 is not set
1087# CONFIG_GPIO_MC33880 is not set
1088
1089#
1090# AC97 GPIO expanders:
1091#
1092# CONFIG_W1 is not set
1093# CONFIG_POWER_SUPPLY is not set
1094CONFIG_HWMON=y
1095# CONFIG_HWMON_VID is not set
1096# CONFIG_HWMON_DEBUG_CHIP is not set
1097
1098#
1099# Native drivers
1100#
1101# CONFIG_SENSORS_AD7414 is not set
1102# CONFIG_SENSORS_AD7418 is not set
1103# CONFIG_SENSORS_ADCXX is not set
1104# CONFIG_SENSORS_ADM1021 is not set
1105# CONFIG_SENSORS_ADM1025 is not set
1106# CONFIG_SENSORS_ADM1026 is not set
1107# CONFIG_SENSORS_ADM1029 is not set
1108# CONFIG_SENSORS_ADM1031 is not set
1109# CONFIG_SENSORS_ADM9240 is not set
1110# CONFIG_SENSORS_ADT7462 is not set
1111# CONFIG_SENSORS_ADT7470 is not set
1112# CONFIG_SENSORS_ADT7473 is not set
1113# CONFIG_SENSORS_ADT7475 is not set
1114# CONFIG_SENSORS_ATXP1 is not set
1115# CONFIG_SENSORS_DS1621 is not set
1116# CONFIG_SENSORS_F71805F is not set
1117# CONFIG_SENSORS_F71882FG is not set
1118# CONFIG_SENSORS_F75375S is not set
1119# CONFIG_SENSORS_G760A is not set
1120# CONFIG_SENSORS_GL518SM is not set
1121# CONFIG_SENSORS_GL520SM is not set
1122# CONFIG_SENSORS_IT87 is not set
1123# CONFIG_SENSORS_LM63 is not set
1124# CONFIG_SENSORS_LM70 is not set
1125CONFIG_SENSORS_LM75=m
1126# CONFIG_SENSORS_LM77 is not set
1127# CONFIG_SENSORS_LM78 is not set
1128# CONFIG_SENSORS_LM80 is not set
1129# CONFIG_SENSORS_LM83 is not set
1130# CONFIG_SENSORS_LM85 is not set
1131# CONFIG_SENSORS_LM87 is not set
1132# CONFIG_SENSORS_LM90 is not set
1133# CONFIG_SENSORS_LM92 is not set
1134# CONFIG_SENSORS_LM93 is not set
1135# CONFIG_SENSORS_LTC4215 is not set
1136# CONFIG_SENSORS_LTC4245 is not set
1137# CONFIG_SENSORS_LM95241 is not set
1138# CONFIG_SENSORS_MAX1111 is not set
1139# CONFIG_SENSORS_MAX1619 is not set
1140# CONFIG_SENSORS_MAX6650 is not set
1141# CONFIG_SENSORS_PC87360 is not set
1142# CONFIG_SENSORS_PC87427 is not set
1143# CONFIG_SENSORS_PCF8591 is not set
1144# CONFIG_SENSORS_SHT15 is not set
1145# CONFIG_SENSORS_DME1737 is not set
1146# CONFIG_SENSORS_SMSC47M1 is not set
1147# CONFIG_SENSORS_SMSC47M192 is not set
1148# CONFIG_SENSORS_SMSC47B397 is not set
1149# CONFIG_SENSORS_ADS7828 is not set
1150# CONFIG_SENSORS_THMC50 is not set
1151# CONFIG_SENSORS_TMP401 is not set
1152# CONFIG_SENSORS_TMP421 is not set
1153# CONFIG_SENSORS_VT1211 is not set
1154# CONFIG_SENSORS_W83781D is not set
1155# CONFIG_SENSORS_W83791D is not set
1156# CONFIG_SENSORS_W83792D is not set
1157# CONFIG_SENSORS_W83793 is not set
1158# CONFIG_SENSORS_W83L785TS is not set
1159# CONFIG_SENSORS_W83L786NG is not set
1160# CONFIG_SENSORS_W83627HF is not set
1161# CONFIG_SENSORS_W83627EHF is not set
1162# CONFIG_SENSORS_LIS3_SPI is not set
1163# CONFIG_THERMAL is not set
1164CONFIG_WATCHDOG=y
1165# CONFIG_WATCHDOG_NOWAYOUT is not set
1166
1167#
1168# Watchdog Device Drivers
1169#
1170# CONFIG_SOFT_WATCHDOG is not set
1171# CONFIG_SA1100_WATCHDOG is not set
1172
1173#
1174# ISA-based Watchdog Cards
1175#
1176# CONFIG_PCWATCHDOG is not set
1177# CONFIG_MIXCOMWD is not set
1178# CONFIG_WDT is not set
1179
1180#
1181# USB-based Watchdog Cards
1182#
1183# CONFIG_USBPCWATCHDOG is not set
1184CONFIG_SSB_POSSIBLE=y
1185
1186#
1187# Sonics Silicon Backplane
1188#
1189# CONFIG_SSB is not set
1190
1191#
1192# Multifunction device drivers
1193#
1194# CONFIG_MFD_CORE is not set
1195# CONFIG_MFD_SM501 is not set
1196# CONFIG_MFD_ASIC3 is not set
1197# CONFIG_HTC_EGPIO is not set
1198# CONFIG_HTC_PASIC3 is not set
1199# CONFIG_UCB1400_CORE is not set
1200# CONFIG_TPS65010 is not set
1201# CONFIG_TWL4030_CORE is not set
1202# CONFIG_MFD_TMIO is not set
1203# CONFIG_MFD_T7L66XB is not set
1204# CONFIG_MFD_TC6387XB is not set
1205# CONFIG_MFD_TC6393XB is not set
1206# CONFIG_PMIC_DA903X is not set
1207# CONFIG_MFD_WM8400 is not set
1208# CONFIG_MFD_WM831X is not set
1209# CONFIG_MFD_WM8350_I2C is not set
1210# CONFIG_MFD_PCF50633 is not set
1211# CONFIG_MFD_MC13783 is not set
1212# CONFIG_AB3100_CORE is not set
1213# CONFIG_EZX_PCAP is not set
1214# CONFIG_REGULATOR is not set
1215# CONFIG_MEDIA_SUPPORT is not set
1216
1217#
1218# Graphics support
1219#
1220# CONFIG_VGASTATE is not set
1221# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1222CONFIG_FB=y
1223# CONFIG_FIRMWARE_EDID is not set
1224# CONFIG_FB_DDC is not set
1225# CONFIG_FB_BOOT_VESA_SUPPORT is not set
1226CONFIG_FB_CFB_FILLRECT=m
1227CONFIG_FB_CFB_COPYAREA=m
1228CONFIG_FB_CFB_IMAGEBLIT=m
1229# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1230# CONFIG_FB_SYS_FILLRECT is not set
1231# CONFIG_FB_SYS_COPYAREA is not set
1232# CONFIG_FB_SYS_IMAGEBLIT is not set
1233# CONFIG_FB_FOREIGN_ENDIAN is not set
1234# CONFIG_FB_SYS_FOPS is not set
1235# CONFIG_FB_SVGALIB is not set
1236# CONFIG_FB_MACMODES is not set
1237# CONFIG_FB_BACKLIGHT is not set
1238# CONFIG_FB_MODE_HELPERS is not set
1239# CONFIG_FB_TILEBLITTING is not set
1240
1241#
1242# Frame buffer hardware drivers
1243#
1244# CONFIG_FB_S1D13XXX is not set
1245CONFIG_FB_PXA=m
1246# CONFIG_FB_PXA_OVERLAY is not set
1247# CONFIG_FB_PXA_SMARTPANEL is not set
1248CONFIG_FB_PXA_PARAMETERS=y
1249# CONFIG_FB_MBX is not set
1250# CONFIG_FB_W100 is not set
1251# CONFIG_FB_VIRTUAL is not set
1252# CONFIG_FB_METRONOME is not set
1253# CONFIG_FB_MB862XX is not set
1254# CONFIG_FB_BROADSHEET is not set
1255CONFIG_BACKLIGHT_LCD_SUPPORT=y
1256CONFIG_LCD_CLASS_DEVICE=m
1257# CONFIG_LCD_LMS283GF05 is not set
1258# CONFIG_LCD_LTV350QV is not set
1259# CONFIG_LCD_ILI9320 is not set
1260# CONFIG_LCD_TDO24M is not set
1261# CONFIG_LCD_VGG2432A4 is not set
1262# CONFIG_LCD_PLATFORM is not set
1263CONFIG_BACKLIGHT_CLASS_DEVICE=m
1264CONFIG_BACKLIGHT_GENERIC=m
1265
1266#
1267# Display device support
1268#
1269# CONFIG_DISPLAY_SUPPORT is not set
1270
1271#
1272# Console display driver support
1273#
1274# CONFIG_VGA_CONSOLE is not set
1275# CONFIG_MDA_CONSOLE is not set
1276CONFIG_DUMMY_CONSOLE=y
1277CONFIG_FRAMEBUFFER_CONSOLE=m
1278# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1279# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1280# CONFIG_FONTS is not set
1281CONFIG_FONT_8x8=y
1282CONFIG_FONT_8x16=y
1283CONFIG_LOGO=y
1284CONFIG_LOGO_LINUX_MONO=y
1285CONFIG_LOGO_LINUX_VGA16=y
1286CONFIG_LOGO_LINUX_CLUT224=y
1287CONFIG_SOUND=m
1288CONFIG_SOUND_OSS_CORE=y
1289CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1290CONFIG_SND=m
1291CONFIG_SND_TIMER=m
1292CONFIG_SND_PCM=m
1293CONFIG_SND_JACK=y
1294# CONFIG_SND_SEQUENCER is not set
1295CONFIG_SND_OSSEMUL=y
1296CONFIG_SND_MIXER_OSS=m
1297CONFIG_SND_PCM_OSS=m
1298CONFIG_SND_PCM_OSS_PLUGINS=y
1299# CONFIG_SND_DYNAMIC_MINORS is not set
1300# CONFIG_SND_SUPPORT_OLD_API is not set
1301CONFIG_SND_VERBOSE_PROCFS=y
1302# CONFIG_SND_VERBOSE_PRINTK is not set
1303# CONFIG_SND_DEBUG is not set
1304CONFIG_SND_VMASTER=y
1305# CONFIG_SND_RAWMIDI_SEQ is not set
1306# CONFIG_SND_OPL3_LIB_SEQ is not set
1307# CONFIG_SND_OPL4_LIB_SEQ is not set
1308# CONFIG_SND_SBAWE_SEQ is not set
1309# CONFIG_SND_EMU10K1_SEQ is not set
1310CONFIG_SND_AC97_CODEC=m
1311CONFIG_SND_DRIVERS=y
1312# CONFIG_SND_DUMMY is not set
1313# CONFIG_SND_MTPAV is not set
1314# CONFIG_SND_SERIAL_U16550 is not set
1315# CONFIG_SND_MPU401 is not set
1316# CONFIG_SND_AC97_POWER_SAVE is not set
1317CONFIG_SND_ARM=y
1318CONFIG_SND_PXA2XX_PCM=m
1319CONFIG_SND_PXA2XX_LIB=m
1320CONFIG_SND_PXA2XX_LIB_AC97=y
1321CONFIG_SND_PXA2XX_AC97=m
1322# CONFIG_SND_SPI is not set
1323CONFIG_SND_USB=y
1324# CONFIG_SND_USB_AUDIO is not set
1325# CONFIG_SND_USB_CAIAQ is not set
1326# CONFIG_SND_PCMCIA is not set
1327CONFIG_SND_SOC=m
1328CONFIG_SND_PXA2XX_SOC=m
1329CONFIG_SND_SOC_I2C_AND_SPI=m
1330# CONFIG_SND_SOC_ALL_CODECS is not set
1331# CONFIG_SOUND_PRIME is not set
1332CONFIG_AC97_BUS=m
1333# CONFIG_HID_SUPPORT is not set
1334CONFIG_USB_SUPPORT=y
1335CONFIG_USB_ARCH_HAS_HCD=y
1336CONFIG_USB_ARCH_HAS_OHCI=y
1337# CONFIG_USB_ARCH_HAS_EHCI is not set
1338CONFIG_USB=m
1339# CONFIG_USB_DEBUG is not set
1340# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1341
1342#
1343# Miscellaneous USB options
1344#
1345CONFIG_USB_DEVICEFS=y
1346CONFIG_USB_DEVICE_CLASS=y
1347# CONFIG_USB_DYNAMIC_MINORS is not set
1348CONFIG_USB_SUSPEND=y
1349# CONFIG_USB_OTG is not set
1350# CONFIG_USB_MON is not set
1351# CONFIG_USB_WUSB is not set
1352# CONFIG_USB_WUSB_CBAF is not set
1353
1354#
1355# USB Host Controller Drivers
1356#
1357# CONFIG_USB_C67X00_HCD is not set
1358# CONFIG_USB_OXU210HP_HCD is not set
1359# CONFIG_USB_ISP116X_HCD is not set
1360# CONFIG_USB_ISP1760_HCD is not set
1361# CONFIG_USB_ISP1362_HCD is not set
1362CONFIG_USB_OHCI_HCD=m
1363# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1364# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1365CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1366# CONFIG_USB_SL811_HCD is not set
1367# CONFIG_USB_R8A66597_HCD is not set
1368# CONFIG_USB_HWA_HCD is not set
1369# CONFIG_USB_MUSB_HDRC is not set
1370# CONFIG_USB_GADGET_MUSB_HDRC is not set
1371
1372#
1373# USB Device Class drivers
1374#
1375CONFIG_USB_ACM=m
1376# CONFIG_USB_PRINTER is not set
1377# CONFIG_USB_WDM is not set
1378# CONFIG_USB_TMC is not set
1379
1380#
1381# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1382#
1383
1384#
1385# also be needed; see USB_STORAGE Help for more info
1386#
1387CONFIG_USB_STORAGE=m
1388# CONFIG_USB_STORAGE_DEBUG is not set
1389# CONFIG_USB_STORAGE_DATAFAB is not set
1390# CONFIG_USB_STORAGE_FREECOM is not set
1391# CONFIG_USB_STORAGE_ISD200 is not set
1392# CONFIG_USB_STORAGE_USBAT is not set
1393# CONFIG_USB_STORAGE_SDDR09 is not set
1394# CONFIG_USB_STORAGE_SDDR55 is not set
1395# CONFIG_USB_STORAGE_JUMPSHOT is not set
1396# CONFIG_USB_STORAGE_ALAUDA is not set
1397# CONFIG_USB_STORAGE_ONETOUCH is not set
1398# CONFIG_USB_STORAGE_KARMA is not set
1399# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1400# CONFIG_USB_LIBUSUAL is not set
1401
1402#
1403# USB Imaging devices
1404#
1405# CONFIG_USB_MDC800 is not set
1406# CONFIG_USB_MICROTEK is not set
1407
1408#
1409# USB port drivers
1410#
1411CONFIG_USB_SERIAL=m
1412# CONFIG_USB_EZUSB is not set
1413CONFIG_USB_SERIAL_GENERIC=y
1414# CONFIG_USB_SERIAL_AIRCABLE is not set
1415# CONFIG_USB_SERIAL_ARK3116 is not set
1416# CONFIG_USB_SERIAL_BELKIN is not set
1417# CONFIG_USB_SERIAL_CH341 is not set
1418# CONFIG_USB_SERIAL_WHITEHEAT is not set
1419# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1420# CONFIG_USB_SERIAL_CP210X is not set
1421# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1422# CONFIG_USB_SERIAL_EMPEG is not set
1423# CONFIG_USB_SERIAL_FTDI_SIO is not set
1424# CONFIG_USB_SERIAL_FUNSOFT is not set
1425# CONFIG_USB_SERIAL_VISOR is not set
1426# CONFIG_USB_SERIAL_IPAQ is not set
1427# CONFIG_USB_SERIAL_IR is not set
1428# CONFIG_USB_SERIAL_EDGEPORT is not set
1429# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
1430# CONFIG_USB_SERIAL_GARMIN is not set
1431# CONFIG_USB_SERIAL_IPW is not set
1432# CONFIG_USB_SERIAL_IUU is not set
1433# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
1434# CONFIG_USB_SERIAL_KEYSPAN is not set
1435# CONFIG_USB_SERIAL_KLSI is not set
1436# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1437CONFIG_USB_SERIAL_MCT_U232=m
1438# CONFIG_USB_SERIAL_MOS7720 is not set
1439# CONFIG_USB_SERIAL_MOS7840 is not set
1440# CONFIG_USB_SERIAL_MOTOROLA is not set
1441# CONFIG_USB_SERIAL_NAVMAN is not set
1442# CONFIG_USB_SERIAL_PL2303 is not set
1443# CONFIG_USB_SERIAL_OTI6858 is not set
1444# CONFIG_USB_SERIAL_QUALCOMM is not set
1445# CONFIG_USB_SERIAL_SPCP8X5 is not set
1446# CONFIG_USB_SERIAL_HP4X is not set
1447# CONFIG_USB_SERIAL_SAFE is not set
1448# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1449# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1450# CONFIG_USB_SERIAL_SYMBOL is not set
1451# CONFIG_USB_SERIAL_TI is not set
1452# CONFIG_USB_SERIAL_CYBERJACK is not set
1453# CONFIG_USB_SERIAL_XIRCOM is not set
1454# CONFIG_USB_SERIAL_OPTION is not set
1455# CONFIG_USB_SERIAL_OMNINET is not set
1456# CONFIG_USB_SERIAL_OPTICON is not set
1457# CONFIG_USB_SERIAL_DEBUG is not set
1458
1459#
1460# USB Miscellaneous drivers
1461#
1462# CONFIG_USB_EMI62 is not set
1463# CONFIG_USB_EMI26 is not set
1464# CONFIG_USB_ADUTUX is not set
1465# CONFIG_USB_SEVSEG is not set
1466# CONFIG_USB_RIO500 is not set
1467# CONFIG_USB_LEGOTOWER is not set
1468# CONFIG_USB_LCD is not set
1469# CONFIG_USB_BERRY_CHARGE is not set
1470# CONFIG_USB_LED is not set
1471# CONFIG_USB_CYPRESS_CY7C63 is not set
1472# CONFIG_USB_CYTHERM is not set
1473# CONFIG_USB_IDMOUSE is not set
1474# CONFIG_USB_FTDI_ELAN is not set
1475# CONFIG_USB_APPLEDISPLAY is not set
1476# CONFIG_USB_LD is not set
1477# CONFIG_USB_TRANCEVIBRATOR is not set
1478# CONFIG_USB_IOWARRIOR is not set
1479# CONFIG_USB_TEST is not set
1480# CONFIG_USB_ISIGHTFW is not set
1481# CONFIG_USB_VST is not set
1482CONFIG_USB_GADGET=m
1483# CONFIG_USB_GADGET_DEBUG is not set
1484# CONFIG_USB_GADGET_DEBUG_FILES is not set
1485CONFIG_USB_GADGET_VBUS_DRAW=2
1486CONFIG_USB_GADGET_SELECTED=y
1487# CONFIG_USB_GADGET_AT91 is not set
1488# CONFIG_USB_GADGET_ATMEL_USBA is not set
1489# CONFIG_USB_GADGET_FSL_USB2 is not set
1490# CONFIG_USB_GADGET_LH7A40X is not set
1491# CONFIG_USB_GADGET_OMAP is not set
1492# CONFIG_USB_GADGET_PXA25X is not set
1493# CONFIG_USB_GADGET_R8A66597 is not set
1494CONFIG_USB_GADGET_PXA27X=y
1495CONFIG_USB_PXA27X=m
1496# CONFIG_USB_GADGET_S3C_HSOTG is not set
1497# CONFIG_USB_GADGET_IMX is not set
1498# CONFIG_USB_GADGET_S3C2410 is not set
1499# CONFIG_USB_GADGET_M66592 is not set
1500# CONFIG_USB_GADGET_AMD5536UDC is not set
1501# CONFIG_USB_GADGET_FSL_QE is not set
1502# CONFIG_USB_GADGET_CI13XXX is not set
1503# CONFIG_USB_GADGET_NET2280 is not set
1504# CONFIG_USB_GADGET_GOKU is not set
1505# CONFIG_USB_GADGET_LANGWELL is not set
1506# CONFIG_USB_GADGET_DUMMY_HCD is not set
1507# CONFIG_USB_GADGET_DUALSPEED is not set
1508# CONFIG_USB_ZERO is not set
1509# CONFIG_USB_AUDIO is not set
1510CONFIG_USB_ETH=m
1511CONFIG_USB_ETH_RNDIS=y
1512# CONFIG_USB_ETH_EEM is not set
1513CONFIG_USB_GADGETFS=m
1514CONFIG_USB_FILE_STORAGE=m
1515# CONFIG_USB_FILE_STORAGE_TEST is not set
1516CONFIG_USB_G_SERIAL=m
1517# CONFIG_USB_MIDI_GADGET is not set
1518CONFIG_USB_G_PRINTER=m
1519# CONFIG_USB_CDC_COMPOSITE is not set
1520
1521#
1522# OTG and related infrastructure
1523#
1524CONFIG_USB_OTG_UTILS=y
1525# CONFIG_USB_GPIO_VBUS is not set
1526# CONFIG_NOP_USB_XCEIV is not set
1527CONFIG_MMC=y
1528# CONFIG_MMC_DEBUG is not set
1529# CONFIG_MMC_UNSAFE_RESUME is not set
1530
1531#
1532# MMC/SD/SDIO Card Drivers
1533#
1534CONFIG_MMC_BLOCK=y
1535# CONFIG_MMC_BLOCK_BOUNCE is not set
1536# CONFIG_SDIO_UART is not set
1537# CONFIG_MMC_TEST is not set
1538
1539#
1540# MMC/SD/SDIO Host Controller Drivers
1541#
1542CONFIG_MMC_PXA=y
1543# CONFIG_MMC_SDHCI is not set
1544# CONFIG_MMC_AT91 is not set
1545# CONFIG_MMC_ATMELMCI is not set
1546# CONFIG_MMC_SPI is not set
1547# CONFIG_MEMSTICK is not set
1548CONFIG_NEW_LEDS=y
1549CONFIG_LEDS_CLASS=m
1550
1551#
1552# LED drivers
1553#
1554# CONFIG_LEDS_PCA9532 is not set
1555CONFIG_LEDS_GPIO=m
1556CONFIG_LEDS_GPIO_PLATFORM=y
1557# CONFIG_LEDS_LP3944 is not set
1558# CONFIG_LEDS_PCA955X is not set
1559# CONFIG_LEDS_DAC124S085 is not set
1560# CONFIG_LEDS_BD2802 is not set
1561
1562#
1563# LED Triggers
1564#
1565CONFIG_LEDS_TRIGGERS=y
1566CONFIG_LEDS_TRIGGER_TIMER=m
1567CONFIG_LEDS_TRIGGER_HEARTBEAT=m
1568CONFIG_LEDS_TRIGGER_BACKLIGHT=m
1569CONFIG_LEDS_TRIGGER_GPIO=m
1570CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
1571
1572#
1573# iptables trigger is under Netfilter config (LED target)
1574#
1575# CONFIG_ACCESSIBILITY is not set
1576CONFIG_RTC_LIB=y
1577CONFIG_RTC_CLASS=m
1578
1579#
1580# RTC interfaces
1581#
1582CONFIG_RTC_INTF_SYSFS=y
1583CONFIG_RTC_INTF_PROC=y
1584CONFIG_RTC_INTF_DEV=y
1585# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1586# CONFIG_RTC_DRV_TEST is not set
1587
1588#
1589# I2C RTC drivers
1590#
1591# CONFIG_RTC_DRV_DS1307 is not set
1592# CONFIG_RTC_DRV_DS1374 is not set
1593# CONFIG_RTC_DRV_DS1672 is not set
1594# CONFIG_RTC_DRV_MAX6900 is not set
1595# CONFIG_RTC_DRV_RS5C372 is not set
1596CONFIG_RTC_DRV_ISL1208=m
1597# CONFIG_RTC_DRV_X1205 is not set
1598# CONFIG_RTC_DRV_PCF8563 is not set
1599# CONFIG_RTC_DRV_PCF8583 is not set
1600# CONFIG_RTC_DRV_M41T80 is not set
1601# CONFIG_RTC_DRV_S35390A is not set
1602# CONFIG_RTC_DRV_FM3130 is not set
1603# CONFIG_RTC_DRV_RX8581 is not set
1604# CONFIG_RTC_DRV_RX8025 is not set
1605
1606#
1607# SPI RTC drivers
1608#
1609# CONFIG_RTC_DRV_M41T94 is not set
1610# CONFIG_RTC_DRV_DS1305 is not set
1611# CONFIG_RTC_DRV_DS1390 is not set
1612# CONFIG_RTC_DRV_MAX6902 is not set
1613# CONFIG_RTC_DRV_R9701 is not set
1614# CONFIG_RTC_DRV_RS5C348 is not set
1615# CONFIG_RTC_DRV_DS3234 is not set
1616# CONFIG_RTC_DRV_PCF2123 is not set
1617
1618#
1619# Platform RTC drivers
1620#
1621# CONFIG_RTC_DRV_CMOS is not set
1622# CONFIG_RTC_DRV_DS1286 is not set
1623# CONFIG_RTC_DRV_DS1511 is not set
1624# CONFIG_RTC_DRV_DS1553 is not set
1625# CONFIG_RTC_DRV_DS1742 is not set
1626# CONFIG_RTC_DRV_STK17TA8 is not set
1627# CONFIG_RTC_DRV_M48T86 is not set
1628# CONFIG_RTC_DRV_M48T35 is not set
1629# CONFIG_RTC_DRV_M48T59 is not set
1630# CONFIG_RTC_DRV_MSM6242 is not set
1631# CONFIG_RTC_DRV_BQ4802 is not set
1632# CONFIG_RTC_DRV_RP5C01 is not set
1633# CONFIG_RTC_DRV_V3020 is not set
1634
1635#
1636# on-CPU RTC drivers
1637#
1638# CONFIG_RTC_DRV_SA1100 is not set
1639CONFIG_RTC_DRV_PXA=m
1640# CONFIG_DMADEVICES is not set
1641# CONFIG_AUXDISPLAY is not set
1642# CONFIG_UIO is not set
1643
1644#
1645# TI VLYNQ
1646#
1647# CONFIG_STAGING is not set
1648
1649#
1650# File systems
1651#
1652CONFIG_EXT2_FS=y
1653# CONFIG_EXT2_FS_XATTR is not set
1654# CONFIG_EXT2_FS_XIP is not set
1655CONFIG_EXT3_FS=y
1656# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1657# CONFIG_EXT3_FS_XATTR is not set
1658# CONFIG_EXT4_FS is not set
1659CONFIG_JBD=y
1660# CONFIG_REISERFS_FS is not set
1661# CONFIG_JFS_FS is not set
1662# CONFIG_FS_POSIX_ACL is not set
1663# CONFIG_XFS_FS is not set
1664# CONFIG_GFS2_FS is not set
1665# CONFIG_OCFS2_FS is not set
1666# CONFIG_BTRFS_FS is not set
1667# CONFIG_NILFS2_FS is not set
1668CONFIG_FILE_LOCKING=y
1669CONFIG_FSNOTIFY=y
1670# CONFIG_DNOTIFY is not set
1671CONFIG_INOTIFY=y
1672CONFIG_INOTIFY_USER=y
1673# CONFIG_QUOTA is not set
1674# CONFIG_AUTOFS_FS is not set
1675# CONFIG_AUTOFS4_FS is not set
1676# CONFIG_FUSE_FS is not set
1677
1678#
1679# Caches
1680#
1681# CONFIG_FSCACHE is not set
1682
1683#
1684# CD-ROM/DVD Filesystems
1685#
1686# CONFIG_ISO9660_FS is not set
1687# CONFIG_UDF_FS is not set
1688
1689#
1690# DOS/FAT/NT Filesystems
1691#
1692CONFIG_FAT_FS=m
1693# CONFIG_MSDOS_FS is not set
1694CONFIG_VFAT_FS=m
1695CONFIG_FAT_DEFAULT_CODEPAGE=437
1696CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1697# CONFIG_NTFS_FS is not set
1698
1699#
1700# Pseudo filesystems
1701#
1702CONFIG_PROC_FS=y
1703CONFIG_PROC_SYSCTL=y
1704CONFIG_PROC_PAGE_MONITOR=y
1705CONFIG_SYSFS=y
1706CONFIG_TMPFS=y
1707# CONFIG_TMPFS_POSIX_ACL is not set
1708# CONFIG_HUGETLB_PAGE is not set
1709# CONFIG_CONFIGFS_FS is not set
1710CONFIG_MISC_FILESYSTEMS=y
1711# CONFIG_ADFS_FS is not set
1712# CONFIG_AFFS_FS is not set
1713# CONFIG_HFS_FS is not set
1714# CONFIG_HFSPLUS_FS is not set
1715# CONFIG_BEFS_FS is not set
1716# CONFIG_BFS_FS is not set
1717# CONFIG_EFS_FS is not set
1718CONFIG_JFFS2_FS=y
1719CONFIG_JFFS2_FS_DEBUG=0
1720CONFIG_JFFS2_FS_WRITEBUFFER=y
1721# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1722# CONFIG_JFFS2_SUMMARY is not set
1723# CONFIG_JFFS2_FS_XATTR is not set
1724# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1725CONFIG_JFFS2_ZLIB=y
1726# CONFIG_JFFS2_LZO is not set
1727CONFIG_JFFS2_RTIME=y
1728# CONFIG_JFFS2_RUBIN is not set
1729# CONFIG_CRAMFS is not set
1730# CONFIG_SQUASHFS is not set
1731# CONFIG_VXFS_FS is not set
1732# CONFIG_MINIX_FS is not set
1733# CONFIG_OMFS_FS is not set
1734# CONFIG_HPFS_FS is not set
1735# CONFIG_QNX4FS_FS is not set
1736# CONFIG_ROMFS_FS is not set
1737# CONFIG_SYSV_FS is not set
1738# CONFIG_UFS_FS is not set
1739CONFIG_NETWORK_FILESYSTEMS=y
1740CONFIG_NFS_FS=y
1741CONFIG_NFS_V3=y
1742# CONFIG_NFS_V3_ACL is not set
1743# CONFIG_NFS_V4 is not set
1744CONFIG_ROOT_NFS=y
1745CONFIG_NFSD=m
1746CONFIG_NFSD_V3=y
1747# CONFIG_NFSD_V3_ACL is not set
1748# CONFIG_NFSD_V4 is not set
1749CONFIG_LOCKD=y
1750CONFIG_LOCKD_V4=y
1751CONFIG_EXPORTFS=m
1752CONFIG_NFS_COMMON=y
1753CONFIG_SUNRPC=y
1754# CONFIG_RPCSEC_GSS_KRB5 is not set
1755# CONFIG_RPCSEC_GSS_SPKM3 is not set
1756# CONFIG_SMB_FS is not set
1757# CONFIG_CIFS is not set
1758# CONFIG_NCP_FS is not set
1759# CONFIG_CODA_FS is not set
1760# CONFIG_AFS_FS is not set
1761
1762#
1763# Partition Types
1764#
1765CONFIG_PARTITION_ADVANCED=y
1766# CONFIG_ACORN_PARTITION is not set
1767# CONFIG_OSF_PARTITION is not set
1768# CONFIG_AMIGA_PARTITION is not set
1769# CONFIG_ATARI_PARTITION is not set
1770# CONFIG_MAC_PARTITION is not set
1771CONFIG_MSDOS_PARTITION=y
1772# CONFIG_BSD_DISKLABEL is not set
1773# CONFIG_MINIX_SUBPARTITION is not set
1774# CONFIG_SOLARIS_X86_PARTITION is not set
1775# CONFIG_UNIXWARE_DISKLABEL is not set
1776# CONFIG_LDM_PARTITION is not set
1777# CONFIG_SGI_PARTITION is not set
1778# CONFIG_ULTRIX_PARTITION is not set
1779# CONFIG_SUN_PARTITION is not set
1780# CONFIG_KARMA_PARTITION is not set
1781# CONFIG_EFI_PARTITION is not set
1782# CONFIG_SYSV68_PARTITION is not set
1783CONFIG_NLS=m
1784CONFIG_NLS_DEFAULT="iso8859-1"
1785CONFIG_NLS_CODEPAGE_437=m
1786# CONFIG_NLS_CODEPAGE_737 is not set
1787# CONFIG_NLS_CODEPAGE_775 is not set
1788CONFIG_NLS_CODEPAGE_850=m
1789# CONFIG_NLS_CODEPAGE_852 is not set
1790# CONFIG_NLS_CODEPAGE_855 is not set
1791# CONFIG_NLS_CODEPAGE_857 is not set
1792# CONFIG_NLS_CODEPAGE_860 is not set
1793# CONFIG_NLS_CODEPAGE_861 is not set
1794# CONFIG_NLS_CODEPAGE_862 is not set
1795# CONFIG_NLS_CODEPAGE_863 is not set
1796# CONFIG_NLS_CODEPAGE_864 is not set
1797# CONFIG_NLS_CODEPAGE_865 is not set
1798# CONFIG_NLS_CODEPAGE_866 is not set
1799# CONFIG_NLS_CODEPAGE_869 is not set
1800# CONFIG_NLS_CODEPAGE_936 is not set
1801# CONFIG_NLS_CODEPAGE_950 is not set
1802# CONFIG_NLS_CODEPAGE_932 is not set
1803# CONFIG_NLS_CODEPAGE_949 is not set
1804# CONFIG_NLS_CODEPAGE_874 is not set
1805# CONFIG_NLS_ISO8859_8 is not set
1806# CONFIG_NLS_CODEPAGE_1250 is not set
1807# CONFIG_NLS_CODEPAGE_1251 is not set
1808# CONFIG_NLS_ASCII is not set
1809CONFIG_NLS_ISO8859_1=m
1810# CONFIG_NLS_ISO8859_2 is not set
1811# CONFIG_NLS_ISO8859_3 is not set
1812# CONFIG_NLS_ISO8859_4 is not set
1813# CONFIG_NLS_ISO8859_5 is not set
1814# CONFIG_NLS_ISO8859_6 is not set
1815# CONFIG_NLS_ISO8859_7 is not set
1816# CONFIG_NLS_ISO8859_9 is not set
1817# CONFIG_NLS_ISO8859_13 is not set
1818# CONFIG_NLS_ISO8859_14 is not set
1819CONFIG_NLS_ISO8859_15=m
1820# CONFIG_NLS_KOI8_R is not set
1821# CONFIG_NLS_KOI8_U is not set
1822CONFIG_NLS_UTF8=m
1823# CONFIG_DLM is not set
1824
1825#
1826# Kernel hacking
1827#
1828# CONFIG_PRINTK_TIME is not set
1829CONFIG_ENABLE_WARN_DEPRECATED=y
1830CONFIG_ENABLE_MUST_CHECK=y
1831CONFIG_FRAME_WARN=1024
1832CONFIG_MAGIC_SYSRQ=y
1833# CONFIG_STRIP_ASM_SYMS is not set
1834# CONFIG_UNUSED_SYMBOLS is not set
1835# CONFIG_DEBUG_FS is not set
1836# CONFIG_HEADERS_CHECK is not set
1837CONFIG_DEBUG_KERNEL=y
1838# CONFIG_DEBUG_SHIRQ is not set
1839CONFIG_DETECT_SOFTLOCKUP=y
1840# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1841CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1842CONFIG_DETECT_HUNG_TASK=y
1843# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1844CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1845CONFIG_SCHED_DEBUG=y
1846# CONFIG_SCHEDSTATS is not set
1847# CONFIG_TIMER_STATS is not set
1848# CONFIG_DEBUG_OBJECTS is not set
1849# CONFIG_SLUB_DEBUG_ON is not set
1850# CONFIG_SLUB_STATS is not set
1851# CONFIG_DEBUG_KMEMLEAK is not set
1852# CONFIG_DEBUG_RT_MUTEXES is not set
1853# CONFIG_RT_MUTEX_TESTER is not set
1854# CONFIG_DEBUG_SPINLOCK is not set
1855CONFIG_DEBUG_MUTEXES=y
1856# CONFIG_DEBUG_LOCK_ALLOC is not set
1857# CONFIG_PROVE_LOCKING is not set
1858# CONFIG_LOCK_STAT is not set
1859# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1860# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1861# CONFIG_DEBUG_KOBJECT is not set
1862CONFIG_DEBUG_BUGVERBOSE=y
1863# CONFIG_DEBUG_INFO is not set
1864# CONFIG_DEBUG_VM is not set
1865# CONFIG_DEBUG_WRITECOUNT is not set
1866CONFIG_DEBUG_MEMORY_INIT=y
1867# CONFIG_DEBUG_LIST is not set
1868# CONFIG_DEBUG_SG is not set
1869# CONFIG_DEBUG_NOTIFIERS is not set
1870# CONFIG_DEBUG_CREDENTIALS is not set
1871# CONFIG_BOOT_PRINTK_DELAY is not set
1872# CONFIG_RCU_TORTURE_TEST is not set
1873# CONFIG_BACKTRACE_SELF_TEST is not set
1874# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1875# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1876# CONFIG_FAULT_INJECTION is not set
1877# CONFIG_LATENCYTOP is not set
1878CONFIG_SYSCTL_SYSCALL_CHECK=y
1879# CONFIG_PAGE_POISONING is not set
1880CONFIG_HAVE_FUNCTION_TRACER=y
1881CONFIG_TRACING_SUPPORT=y
1882CONFIG_FTRACE=y
1883# CONFIG_FUNCTION_TRACER is not set
1884# CONFIG_IRQSOFF_TRACER is not set
1885# CONFIG_SCHED_TRACER is not set
1886# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1887# CONFIG_BOOT_TRACER is not set
1888CONFIG_BRANCH_PROFILE_NONE=y
1889# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1890# CONFIG_PROFILE_ALL_BRANCHES is not set
1891# CONFIG_STACK_TRACER is not set
1892# CONFIG_KMEMTRACE is not set
1893# CONFIG_WORKQUEUE_TRACER is not set
1894# CONFIG_BLK_DEV_IO_TRACE is not set
1895# CONFIG_SAMPLES is not set
1896CONFIG_HAVE_ARCH_KGDB=y
1897# CONFIG_KGDB is not set
1898CONFIG_ARM_UNWIND=y
1899# CONFIG_DEBUG_USER is not set
1900CONFIG_DEBUG_ERRORS=y
1901# CONFIG_DEBUG_STACK_USAGE is not set
1902# CONFIG_DEBUG_LL is not set
1903# CONFIG_OC_ETM is not set
1904
1905#
1906# Security options
1907#
1908# CONFIG_KEYS is not set
1909# CONFIG_SECURITY is not set
1910# CONFIG_SECURITYFS is not set
1911# CONFIG_DEFAULT_SECURITY_SELINUX is not set
1912# CONFIG_DEFAULT_SECURITY_SMACK is not set
1913# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
1914CONFIG_DEFAULT_SECURITY_DAC=y
1915CONFIG_DEFAULT_SECURITY=""
1916CONFIG_CRYPTO=y
1917
1918#
1919# Crypto core or helper
1920#
1921CONFIG_CRYPTO_ALGAPI=m
1922CONFIG_CRYPTO_ALGAPI2=m
1923CONFIG_CRYPTO_AEAD2=m
1924CONFIG_CRYPTO_BLKCIPHER=m
1925CONFIG_CRYPTO_BLKCIPHER2=m
1926CONFIG_CRYPTO_HASH=m
1927CONFIG_CRYPTO_HASH2=m
1928CONFIG_CRYPTO_RNG2=m
1929CONFIG_CRYPTO_PCOMP=m
1930CONFIG_CRYPTO_MANAGER=m
1931CONFIG_CRYPTO_MANAGER2=m
1932# CONFIG_CRYPTO_GF128MUL is not set
1933# CONFIG_CRYPTO_NULL is not set
1934CONFIG_CRYPTO_WORKQUEUE=m
1935# CONFIG_CRYPTO_CRYPTD is not set
1936# CONFIG_CRYPTO_AUTHENC is not set
1937# CONFIG_CRYPTO_TEST is not set
1938
1939#
1940# Authenticated Encryption with Associated Data
1941#
1942# CONFIG_CRYPTO_CCM is not set
1943# CONFIG_CRYPTO_GCM is not set
1944# CONFIG_CRYPTO_SEQIV is not set
1945
1946#
1947# Block modes
1948#
1949# CONFIG_CRYPTO_CBC is not set
1950# CONFIG_CRYPTO_CTR is not set
1951# CONFIG_CRYPTO_CTS is not set
1952CONFIG_CRYPTO_ECB=m
1953# CONFIG_CRYPTO_LRW is not set
1954# CONFIG_CRYPTO_PCBC is not set
1955# CONFIG_CRYPTO_XTS is not set
1956
1957#
1958# Hash modes
1959#
1960# CONFIG_CRYPTO_HMAC is not set
1961# CONFIG_CRYPTO_XCBC is not set
1962# CONFIG_CRYPTO_VMAC is not set
1963
1964#
1965# Digest
1966#
1967# CONFIG_CRYPTO_CRC32C is not set
1968# CONFIG_CRYPTO_GHASH is not set
1969# CONFIG_CRYPTO_MD4 is not set
1970# CONFIG_CRYPTO_MD5 is not set
1971CONFIG_CRYPTO_MICHAEL_MIC=m
1972# CONFIG_CRYPTO_RMD128 is not set
1973# CONFIG_CRYPTO_RMD160 is not set
1974# CONFIG_CRYPTO_RMD256 is not set
1975# CONFIG_CRYPTO_RMD320 is not set
1976# CONFIG_CRYPTO_SHA1 is not set
1977# CONFIG_CRYPTO_SHA256 is not set
1978# CONFIG_CRYPTO_SHA512 is not set
1979# CONFIG_CRYPTO_TGR192 is not set
1980# CONFIG_CRYPTO_WP512 is not set
1981
1982#
1983# Ciphers
1984#
1985CONFIG_CRYPTO_AES=m
1986# CONFIG_CRYPTO_ANUBIS is not set
1987CONFIG_CRYPTO_ARC4=m
1988# CONFIG_CRYPTO_BLOWFISH is not set
1989# CONFIG_CRYPTO_CAMELLIA is not set
1990# CONFIG_CRYPTO_CAST5 is not set
1991# CONFIG_CRYPTO_CAST6 is not set
1992# CONFIG_CRYPTO_DES is not set
1993# CONFIG_CRYPTO_FCRYPT is not set
1994# CONFIG_CRYPTO_KHAZAD is not set
1995# CONFIG_CRYPTO_SALSA20 is not set
1996# CONFIG_CRYPTO_SEED is not set
1997# CONFIG_CRYPTO_SERPENT is not set
1998# CONFIG_CRYPTO_TEA is not set
1999# CONFIG_CRYPTO_TWOFISH is not set
2000
2001#
2002# Compression
2003#
2004# CONFIG_CRYPTO_DEFLATE is not set
2005# CONFIG_CRYPTO_ZLIB is not set
2006# CONFIG_CRYPTO_LZO is not set
2007
2008#
2009# Random Number Generation
2010#
2011# CONFIG_CRYPTO_ANSI_CPRNG is not set
2012CONFIG_CRYPTO_HW=y
2013# CONFIG_BINARY_PRINTF is not set
2014
2015#
2016# Library routines
2017#
2018CONFIG_BITREVERSE=y
2019CONFIG_GENERIC_FIND_LAST_BIT=y
2020CONFIG_CRC_CCITT=m
2021CONFIG_CRC16=m
2022CONFIG_CRC_T10DIF=m
2023CONFIG_CRC_ITU_T=m
2024CONFIG_CRC32=y
2025# CONFIG_CRC7 is not set
2026# CONFIG_LIBCRC32C is not set
2027CONFIG_ZLIB_INFLATE=y
2028CONFIG_ZLIB_DEFLATE=y
2029CONFIG_HAS_IOMEM=y
2030CONFIG_HAS_IOPORT=y
2031CONFIG_HAS_DMA=y
2032CONFIG_NLATTR=y
diff --git a/arch/arm/include/asm/asm-offsets.h b/arch/arm/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/arm/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 73eceb87e588..730aefcfbee3 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -211,7 +211,7 @@ struct cpu_cache_fns {
211 211
212 void (*coherent_kern_range)(unsigned long, unsigned long); 212 void (*coherent_kern_range)(unsigned long, unsigned long);
213 void (*coherent_user_range)(unsigned long, unsigned long); 213 void (*coherent_user_range)(unsigned long, unsigned long);
214 void (*flush_kern_dcache_page)(void *); 214 void (*flush_kern_dcache_area)(void *, size_t);
215 215
216 void (*dma_inv_range)(const void *, const void *); 216 void (*dma_inv_range)(const void *, const void *);
217 void (*dma_clean_range)(const void *, const void *); 217 void (*dma_clean_range)(const void *, const void *);
@@ -236,7 +236,7 @@ extern struct cpu_cache_fns cpu_cache;
236#define __cpuc_flush_user_range cpu_cache.flush_user_range 236#define __cpuc_flush_user_range cpu_cache.flush_user_range
237#define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range 237#define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range
238#define __cpuc_coherent_user_range cpu_cache.coherent_user_range 238#define __cpuc_coherent_user_range cpu_cache.coherent_user_range
239#define __cpuc_flush_dcache_page cpu_cache.flush_kern_dcache_page 239#define __cpuc_flush_dcache_area cpu_cache.flush_kern_dcache_area
240 240
241/* 241/*
242 * These are private to the dma-mapping API. Do not use directly. 242 * These are private to the dma-mapping API. Do not use directly.
@@ -255,14 +255,14 @@ extern struct cpu_cache_fns cpu_cache;
255#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) 255#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
256#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) 256#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
257#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range) 257#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
258#define __cpuc_flush_dcache_page __glue(_CACHE,_flush_kern_dcache_page) 258#define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area)
259 259
260extern void __cpuc_flush_kern_all(void); 260extern void __cpuc_flush_kern_all(void);
261extern void __cpuc_flush_user_all(void); 261extern void __cpuc_flush_user_all(void);
262extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); 262extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int);
263extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); 263extern void __cpuc_coherent_kern_range(unsigned long, unsigned long);
264extern void __cpuc_coherent_user_range(unsigned long, unsigned long); 264extern void __cpuc_coherent_user_range(unsigned long, unsigned long);
265extern void __cpuc_flush_dcache_page(void *); 265extern void __cpuc_flush_dcache_area(void *, size_t);
266 266
267/* 267/*
268 * These are private to the dma-mapping API. Do not use directly. 268 * These are private to the dma-mapping API. Do not use directly.
@@ -448,7 +448,7 @@ static inline void flush_kernel_dcache_page(struct page *page)
448{ 448{
449 /* highmem pages are always flushed upon kunmap already */ 449 /* highmem pages are always flushed upon kunmap already */
450 if ((cache_is_vivt() || cache_is_vipt_aliasing()) && !PageHighMem(page)) 450 if ((cache_is_vivt() || cache_is_vipt_aliasing()) && !PageHighMem(page))
451 __cpuc_flush_dcache_page(page_address(page)); 451 __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
452} 452}
453 453
454#define flush_dcache_mmap_lock(mapping) \ 454#define flush_dcache_mmap_lock(mapping) \
@@ -465,13 +465,6 @@ static inline void flush_kernel_dcache_page(struct page *page)
465 */ 465 */
466#define flush_icache_page(vma,page) do { } while (0) 466#define flush_icache_page(vma,page) do { } while (0)
467 467
468static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
469 unsigned offset, size_t size)
470{
471 const void *start = (void __force *)virt + offset;
472 dmac_inv_range(start, start + size);
473}
474
475/* 468/*
476 * flush_cache_vmap() is used when creating mappings (eg, via vmap, 469 * flush_cache_vmap() is used when creating mappings (eg, via vmap,
477 * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT 470 * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index 6aac3f5bb2f3..a399bb5730f1 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -101,7 +101,6 @@ extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
101int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); 101int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
102#define ELF_CORE_COPY_TASK_REGS dump_task_regs 102#define ELF_CORE_COPY_TASK_REGS dump_task_regs
103 103
104#define USE_ELF_CORE_DUMP
105#define ELF_EXEC_PAGESIZE 4096 104#define ELF_EXEC_PAGESIZE 4096
106 105
107/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 106/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
new file mode 100644
index 000000000000..948178cc6ba8
--- /dev/null
+++ b/arch/arm/include/asm/mach-types.h
@@ -0,0 +1 @@
#include <generated/mach-types.h>
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index acac5302e4ea..8920b2d6e3b8 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -26,9 +26,9 @@ extern int show_fiq_list(struct seq_file *, void *);
26 */ 26 */
27#define do_bad_IRQ(irq,desc) \ 27#define do_bad_IRQ(irq,desc) \
28do { \ 28do { \
29 spin_lock(&desc->lock); \ 29 raw_spin_lock(&desc->lock); \
30 handle_bad_irq(irq, desc); \ 30 handle_bad_irq(irq, desc); \
31 spin_unlock(&desc->lock); \ 31 raw_spin_unlock(&desc->lock); \
32} while(0) 32} while(0)
33 33
34#endif 34#endif
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/asm/mman.h
index 8eebf89f5ab1..41f99c573b93 100644
--- a/arch/arm/include/asm/mman.h
+++ b/arch/arm/include/asm/mman.h
@@ -1 +1,4 @@
1#include <asm-generic/mman.h> 1#include <asm-generic/mman.h>
2
3#define arch_mmap_check(addr, len, flags) \
4 (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0)
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index c13681ac1ede..c91c64cab922 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -17,13 +17,13 @@
17 * Locked value: 1 17 * Locked value: 1
18 */ 18 */
19 19
20#define __raw_spin_is_locked(x) ((x)->lock != 0) 20#define arch_spin_is_locked(x) ((x)->lock != 0)
21#define __raw_spin_unlock_wait(lock) \ 21#define arch_spin_unlock_wait(lock) \
22 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 22 do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0)
23 23
24#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 24#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
25 25
26static inline void __raw_spin_lock(raw_spinlock_t *lock) 26static inline void arch_spin_lock(arch_spinlock_t *lock)
27{ 27{
28 unsigned long tmp; 28 unsigned long tmp;
29 29
@@ -43,7 +43,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
43 smp_mb(); 43 smp_mb();
44} 44}
45 45
46static inline int __raw_spin_trylock(raw_spinlock_t *lock) 46static inline int arch_spin_trylock(arch_spinlock_t *lock)
47{ 47{
48 unsigned long tmp; 48 unsigned long tmp;
49 49
@@ -63,7 +63,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
63 } 63 }
64} 64}
65 65
66static inline void __raw_spin_unlock(raw_spinlock_t *lock) 66static inline void arch_spin_unlock(arch_spinlock_t *lock)
67{ 67{
68 smp_mb(); 68 smp_mb();
69 69
@@ -86,7 +86,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
86 * just write zero since the lock is exclusively held. 86 * just write zero since the lock is exclusively held.
87 */ 87 */
88 88
89static inline void __raw_write_lock(raw_rwlock_t *rw) 89static inline void arch_write_lock(arch_rwlock_t *rw)
90{ 90{
91 unsigned long tmp; 91 unsigned long tmp;
92 92
@@ -106,7 +106,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
106 smp_mb(); 106 smp_mb();
107} 107}
108 108
109static inline int __raw_write_trylock(raw_rwlock_t *rw) 109static inline int arch_write_trylock(arch_rwlock_t *rw)
110{ 110{
111 unsigned long tmp; 111 unsigned long tmp;
112 112
@@ -126,7 +126,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
126 } 126 }
127} 127}
128 128
129static inline void __raw_write_unlock(raw_rwlock_t *rw) 129static inline void arch_write_unlock(arch_rwlock_t *rw)
130{ 130{
131 smp_mb(); 131 smp_mb();
132 132
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
142} 142}
143 143
144/* write_can_lock - would write_trylock() succeed? */ 144/* write_can_lock - would write_trylock() succeed? */
145#define __raw_write_can_lock(x) ((x)->lock == 0) 145#define arch_write_can_lock(x) ((x)->lock == 0)
146 146
147/* 147/*
148 * Read locks are a bit more hairy: 148 * Read locks are a bit more hairy:
@@ -156,7 +156,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
156 * currently active. However, we know we won't have any write 156 * currently active. However, we know we won't have any write
157 * locks. 157 * locks.
158 */ 158 */
159static inline void __raw_read_lock(raw_rwlock_t *rw) 159static inline void arch_read_lock(arch_rwlock_t *rw)
160{ 160{
161 unsigned long tmp, tmp2; 161 unsigned long tmp, tmp2;
162 162
@@ -176,7 +176,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
176 smp_mb(); 176 smp_mb();
177} 177}
178 178
179static inline void __raw_read_unlock(raw_rwlock_t *rw) 179static inline void arch_read_unlock(arch_rwlock_t *rw)
180{ 180{
181 unsigned long tmp, tmp2; 181 unsigned long tmp, tmp2;
182 182
@@ -198,7 +198,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
198 : "cc"); 198 : "cc");
199} 199}
200 200
201static inline int __raw_read_trylock(raw_rwlock_t *rw) 201static inline int arch_read_trylock(arch_rwlock_t *rw)
202{ 202{
203 unsigned long tmp, tmp2 = 1; 203 unsigned long tmp, tmp2 = 1;
204 204
@@ -215,13 +215,13 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
215} 215}
216 216
217/* read_can_lock - would read_trylock() succeed? */ 217/* read_can_lock - would read_trylock() succeed? */
218#define __raw_read_can_lock(x) ((x)->lock < 0x80000000) 218#define arch_read_can_lock(x) ((x)->lock < 0x80000000)
219 219
220#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 220#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
221#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 221#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
222 222
223#define _raw_spin_relax(lock) cpu_relax() 223#define arch_spin_relax(lock) cpu_relax()
224#define _raw_read_relax(lock) cpu_relax() 224#define arch_read_relax(lock) cpu_relax()
225#define _raw_write_relax(lock) cpu_relax() 225#define arch_write_relax(lock) cpu_relax()
226 226
227#endif /* __ASM_SPINLOCK_H */ 227#endif /* __ASM_SPINLOCK_H */
diff --git a/arch/arm/include/asm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h
index 43e83f6d2ee5..d14d197ae04a 100644
--- a/arch/arm/include/asm/spinlock_types.h
+++ b/arch/arm/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int lock; 9 volatile unsigned int lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index e7ccf7e697ce..dd00f747e2ad 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -54,5 +54,6 @@ endif
54 54
55head-y := head$(MMUEXT).o 55head-y := head$(MMUEXT).o
56obj-$(CONFIG_DEBUG_LL) += debug.o 56obj-$(CONFIG_DEBUG_LL) += debug.o
57obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
57 58
58extra-y := $(head-y) init_task.o vmlinux.lds 59extra-y := $(head-y) init_task.o vmlinux.lds
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 0e627705f746..8214bfebfaca 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -48,27 +48,7 @@ extern void __aeabi_uidivmod(void);
48extern void __aeabi_ulcmp(void); 48extern void __aeabi_ulcmp(void);
49 49
50extern void fpundefinstr(void); 50extern void fpundefinstr(void);
51extern void fp_enter(void);
52 51
53/*
54 * This has a special calling convention; it doesn't
55 * modify any of the usual registers, except for LR.
56 */
57#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")
58
59#define EXPORT_SYMBOL_ALIAS(sym,orig) \
60 EXPORT_CRC_ALIAS(sym) \
61 static const struct kernel_symbol __ksymtab_##sym \
62 __used __attribute__((section("__ksymtab"))) = \
63 { (unsigned long)&orig, #sym };
64
65/*
66 * floating point math emulator support.
67 * These symbols will never change their calling convention...
68 */
69EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
70EXPORT_SYMBOL_ALIAS(fp_printk,printk);
71EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
72 52
73EXPORT_SYMBOL(__backtrace); 53EXPORT_SYMBOL(__backtrace);
74 54
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index f58c1156e779..9314a2d681f1 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -172,7 +172,7 @@
172/* 160 */ CALL(sys_sched_get_priority_min) 172/* 160 */ CALL(sys_sched_get_priority_min)
173 CALL(sys_sched_rr_get_interval) 173 CALL(sys_sched_rr_get_interval)
174 CALL(sys_nanosleep) 174 CALL(sys_nanosleep)
175 CALL(sys_arm_mremap) 175 CALL(sys_mremap)
176 CALL(sys_setresuid16) 176 CALL(sys_setresuid16)
177/* 165 */ CALL(sys_getresuid16) 177/* 165 */ CALL(sys_getresuid16)
178 CALL(sys_ni_syscall) /* vm86 */ 178 CALL(sys_ni_syscall) /* vm86 */
diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
new file mode 100644
index 000000000000..85aa2b292692
--- /dev/null
+++ b/arch/arm/kernel/early_printk.c
@@ -0,0 +1,57 @@
1/*
2 * linux/arch/arm/kernel/early_printk.c
3 *
4 * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
5 *
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/kernel.h>
12#include <linux/console.h>
13#include <linux/init.h>
14
15extern void printch(int);
16
17static void early_write(const char *s, unsigned n)
18{
19 while (n-- > 0) {
20 if (*s == '\n')
21 printch('\r');
22 printch(*s);
23 s++;
24 }
25}
26
27static void early_console_write(struct console *con, const char *s, unsigned n)
28{
29 early_write(s, n);
30}
31
32static struct console early_console = {
33 .name = "earlycon",
34 .write = early_console_write,
35 .flags = CON_PRINTBUFFER | CON_BOOT,
36 .index = -1,
37};
38
39asmlinkage void early_printk(const char *fmt, ...)
40{
41 char buf[512];
42 int n;
43 va_list ap;
44
45 va_start(ap, fmt);
46 n = vscnprintf(buf, sizeof(buf), fmt, ap);
47 early_write(buf, n);
48 va_end(ap);
49}
50
51static int __init setup_early_printk(char *buf)
52{
53 register_console(&early_console);
54 return 0;
55}
56
57early_param("earlyprintk", setup_early_printk);
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index f0fe95b7085d..2c1db77d7848 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -416,12 +416,12 @@ sys_mmap2:
416 tst r5, #PGOFF_MASK 416 tst r5, #PGOFF_MASK
417 moveq r5, r5, lsr #PAGE_SHIFT - 12 417 moveq r5, r5, lsr #PAGE_SHIFT - 12
418 streq r5, [sp, #4] 418 streq r5, [sp, #4]
419 beq do_mmap2 419 beq sys_mmap_pgoff
420 mov r0, #-EINVAL 420 mov r0, #-EINVAL
421 mov pc, lr 421 mov pc, lr
422#else 422#else
423 str r5, [sp, #4] 423 str r5, [sp, #4]
424 b do_mmap2 424 b sys_mmap_pgoff
425#endif 425#endif
426ENDPROC(sys_mmap2) 426ENDPROC(sys_mmap2)
427 427
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index c9a8619f3856..b7cb45bb91e8 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
69 } 69 }
70 70
71 if (i < NR_IRQS) { 71 if (i < NR_IRQS) {
72 spin_lock_irqsave(&irq_desc[i].lock, flags); 72 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
73 action = irq_desc[i].action; 73 action = irq_desc[i].action;
74 if (!action) 74 if (!action)
75 goto unlock; 75 goto unlock;
@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v)
84 84
85 seq_putc(p, '\n'); 85 seq_putc(p, '\n');
86unlock: 86unlock:
87 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 87 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
88 } else if (i == NR_IRQS) { 88 } else if (i == NR_IRQS) {
89#ifdef CONFIG_FIQ 89#ifdef CONFIG_FIQ
90 show_fiq_list(p, v); 90 show_fiq_list(p, v);
@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
139 } 139 }
140 140
141 desc = irq_desc + irq; 141 desc = irq_desc + irq;
142 spin_lock_irqsave(&desc->lock, flags); 142 raw_spin_lock_irqsave(&desc->lock, flags);
143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
144 if (iflags & IRQF_VALID) 144 if (iflags & IRQF_VALID)
145 desc->status &= ~IRQ_NOREQUEST; 145 desc->status &= ~IRQ_NOREQUEST;
@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
147 desc->status &= ~IRQ_NOPROBE; 147 desc->status &= ~IRQ_NOPROBE;
148 if (!(iflags & IRQF_NOAUTOEN)) 148 if (!(iflags & IRQF_NOAUTOEN))
149 desc->status &= ~IRQ_NOAUTOEN; 149 desc->status &= ~IRQ_NOAUTOEN;
150 spin_unlock_irqrestore(&desc->lock, flags); 150 raw_spin_unlock_irqrestore(&desc->lock, flags);
151} 151}
152 152
153void __init init_IRQ(void) 153void __init init_IRQ(void)
@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
166{ 166{
167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); 167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu);
168 168
169 spin_lock_irq(&desc->lock); 169 raw_spin_lock_irq(&desc->lock);
170 desc->chip->set_affinity(irq, cpumask_of(cpu)); 170 desc->chip->set_affinity(irq, cpumask_of(cpu));
171 spin_unlock_irq(&desc->lock); 171 raw_spin_unlock_irq(&desc->lock);
172} 172}
173 173
174/* 174/*
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index a73a34dccf2a..ea02a7b1c244 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -160,6 +160,7 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
160 160
161 /* Make sure our local interrupt controller has this enabled */ 161 /* Make sure our local interrupt controller has this enabled */
162 local_irq_save(flags); 162 local_irq_save(flags);
163 irq_to_desc(clk->irq)->status |= IRQ_NOPROBE;
163 get_irq_chip(clk->irq)->unmask(clk->irq); 164 get_irq_chip(clk->irq)->unmask(clk->irq);
164 local_irq_restore(flags); 165 local_irq_restore(flags);
165 166
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 78ecaac65206..ae4027bd01bd 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -28,41 +28,6 @@
28#include <linux/ipc.h> 28#include <linux/ipc.h>
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30 30
31extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
32 unsigned long new_len, unsigned long flags,
33 unsigned long new_addr);
34
35/* common code for old and new mmaps */
36inline long do_mmap2(
37 unsigned long addr, unsigned long len,
38 unsigned long prot, unsigned long flags,
39 unsigned long fd, unsigned long pgoff)
40{
41 int error = -EINVAL;
42 struct file * file = NULL;
43
44 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
45
46 if (flags & MAP_FIXED && addr < FIRST_USER_ADDRESS)
47 goto out;
48
49 error = -EBADF;
50 if (!(flags & MAP_ANONYMOUS)) {
51 file = fget(fd);
52 if (!file)
53 goto out;
54 }
55
56 down_write(&current->mm->mmap_sem);
57 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
58 up_write(&current->mm->mmap_sem);
59
60 if (file)
61 fput(file);
62out:
63 return error;
64}
65
66struct mmap_arg_struct { 31struct mmap_arg_struct {
67 unsigned long addr; 32 unsigned long addr;
68 unsigned long len; 33 unsigned long len;
@@ -84,29 +49,11 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
84 if (a.offset & ~PAGE_MASK) 49 if (a.offset & ~PAGE_MASK)
85 goto out; 50 goto out;
86 51
87 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); 52 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
88out: 53out:
89 return error; 54 return error;
90} 55}
91 56
92asmlinkage unsigned long
93sys_arm_mremap(unsigned long addr, unsigned long old_len,
94 unsigned long new_len, unsigned long flags,
95 unsigned long new_addr)
96{
97 unsigned long ret = -EINVAL;
98
99 if (flags & MREMAP_FIXED && new_addr < FIRST_USER_ADDRESS)
100 goto out;
101
102 down_write(&current->mm->mmap_sem);
103 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
104 up_write(&current->mm->mmap_sem);
105
106out:
107 return ret;
108}
109
110/* 57/*
111 * Perform the select(nd, in, out, ex, tv) and mmap() system 58 * Perform the select(nd, in, out, ex, tv) and mmap() system
112 * calls. 59 * calls.
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 71151bd87a36..4957e13ef55b 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -65,11 +65,11 @@ SECTIONS
65 __init_end = .; 65 __init_end = .;
66#endif 66#endif
67 67
68 /DISCARD/ : { /* Exit code and data */ 68 /*
69 EXIT_TEXT 69 * unwind exit sections must be discarded before the rest of the
70 EXIT_DATA 70 * unwind sections get included.
71 *(.exitcall.exit) 71 */
72 *(.discard) 72 /DISCARD/ : {
73 *(.ARM.exidx.exit.text) 73 *(.ARM.exidx.exit.text)
74 *(.ARM.extab.exit.text) 74 *(.ARM.extab.exit.text)
75#ifndef CONFIG_HOTPLUG_CPU 75#ifndef CONFIG_HOTPLUG_CPU
@@ -238,6 +238,9 @@ SECTIONS
238 238
239 STABS_DEBUG 239 STABS_DEBUG
240 .comment 0 : { *(.comment) } 240 .comment 0 : { *(.comment) }
241
242 /* Default discards */
243 DISCARDS
241} 244}
242 245
243/* 246/*
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index a57af3e99c7c..809114d5a5a6 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -866,6 +866,57 @@ static void __init at91_add_device_rtc(void) {}
866 866
867 867
868/* -------------------------------------------------------------------- 868/* --------------------------------------------------------------------
869 * Touchscreen
870 * -------------------------------------------------------------------- */
871
872#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
873static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
874static struct at91_tsadcc_data tsadcc_data;
875
876static struct resource tsadcc_resources[] = {
877 [0] = {
878 .start = AT91SAM9G45_BASE_TSC,
879 .end = AT91SAM9G45_BASE_TSC + SZ_16K - 1,
880 .flags = IORESOURCE_MEM,
881 },
882 [1] = {
883 .start = AT91SAM9G45_ID_TSC,
884 .end = AT91SAM9G45_ID_TSC,
885 .flags = IORESOURCE_IRQ,
886 }
887};
888
889static struct platform_device at91sam9g45_tsadcc_device = {
890 .name = "atmel_tsadcc",
891 .id = -1,
892 .dev = {
893 .dma_mask = &tsadcc_dmamask,
894 .coherent_dma_mask = DMA_BIT_MASK(32),
895 .platform_data = &tsadcc_data,
896 },
897 .resource = tsadcc_resources,
898 .num_resources = ARRAY_SIZE(tsadcc_resources),
899};
900
901void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
902{
903 if (!data)
904 return;
905
906 at91_set_gpio_input(AT91_PIN_PD20, 0); /* AD0_XR */
907 at91_set_gpio_input(AT91_PIN_PD21, 0); /* AD1_XL */
908 at91_set_gpio_input(AT91_PIN_PD22, 0); /* AD2_YT */
909 at91_set_gpio_input(AT91_PIN_PD23, 0); /* AD3_TB */
910
911 tsadcc_data = *data;
912 platform_device_register(&at91sam9g45_tsadcc_device);
913}
914#else
915void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
916#endif
917
918
919/* --------------------------------------------------------------------
869 * RTT 920 * RTT
870 * -------------------------------------------------------------------- */ 921 * -------------------------------------------------------------------- */
871 922
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index d345f5453dbe..53aaa94df75a 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -622,6 +622,7 @@ static void __init at91_add_device_tc(void) { }
622 622
623#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE) 623#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
624static u64 tsadcc_dmamask = DMA_BIT_MASK(32); 624static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
625static struct at91_tsadcc_data tsadcc_data;
625 626
626static struct resource tsadcc_resources[] = { 627static struct resource tsadcc_resources[] = {
627 [0] = { 628 [0] = {
@@ -642,22 +643,27 @@ static struct platform_device at91sam9rl_tsadcc_device = {
642 .dev = { 643 .dev = {
643 .dma_mask = &tsadcc_dmamask, 644 .dma_mask = &tsadcc_dmamask,
644 .coherent_dma_mask = DMA_BIT_MASK(32), 645 .coherent_dma_mask = DMA_BIT_MASK(32),
646 .platform_data = &tsadcc_data,
645 }, 647 },
646 .resource = tsadcc_resources, 648 .resource = tsadcc_resources,
647 .num_resources = ARRAY_SIZE(tsadcc_resources), 649 .num_resources = ARRAY_SIZE(tsadcc_resources),
648}; 650};
649 651
650void __init at91_add_device_tsadcc(void) 652void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data)
651{ 653{
654 if (!data)
655 return;
656
652 at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */ 657 at91_set_A_periph(AT91_PIN_PA17, 0); /* AD0_XR */
653 at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */ 658 at91_set_A_periph(AT91_PIN_PA18, 0); /* AD1_XL */
654 at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */ 659 at91_set_A_periph(AT91_PIN_PA19, 0); /* AD2_YT */
655 at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */ 660 at91_set_A_periph(AT91_PIN_PA20, 0); /* AD3_TB */
656 661
662 tsadcc_data = *data;
657 platform_device_register(&at91sam9rl_tsadcc_device); 663 platform_device_register(&at91sam9rl_tsadcc_device);
658} 664}
659#else 665#else
660void __init at91_add_device_tsadcc(void) {} 666void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data) {}
661#endif 667#endif
662 668
663 669
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index 1cf4d8681078..98f9f4bc9396 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -229,6 +229,16 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
229 229
230 230
231/* 231/*
232 * Touchscreen
233 */
234static struct at91_tsadcc_data ek_tsadcc_data = {
235 .adc_clock = 300000,
236 .pendet_debounce = 0x0d,
237 .ts_sample_hold_time = 0x0a,
238};
239
240
241/*
232 * GPIO Buttons 242 * GPIO Buttons
233 */ 243 */
234#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 244#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
@@ -379,6 +389,8 @@ static void __init ek_board_init(void)
379 at91_add_device_i2c(0, NULL, 0); 389 at91_add_device_i2c(0, NULL, 0);
380 /* LCD Controller */ 390 /* LCD Controller */
381 at91_add_device_lcdc(&ek_lcdc_data); 391 at91_add_device_lcdc(&ek_lcdc_data);
392 /* Touch Screen */
393 at91_add_device_tsadcc(&ek_tsadcc_data);
382 /* Push Buttons */ 394 /* Push Buttons */
383 ek_add_device_buttons(); 395 ek_add_device_buttons();
384 /* AC97 */ 396 /* AC97 */
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index bd28e989e54e..7ac20f3a2067 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -243,6 +243,16 @@ static struct gpio_led ek_leds[] = {
243 243
244 244
245/* 245/*
246 * Touchscreen
247 */
248static struct at91_tsadcc_data ek_tsadcc_data = {
249 .adc_clock = 1000000,
250 .pendet_debounce = 0x0f,
251 .ts_sample_hold_time = 0x03,
252};
253
254
255/*
246 * GPIO Buttons 256 * GPIO Buttons
247 */ 257 */
248#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 258#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
@@ -310,7 +320,7 @@ static void __init ek_board_init(void)
310 /* AC97 */ 320 /* AC97 */
311 at91_add_device_ac97(&ek_ac97_data); 321 at91_add_device_ac97(&ek_ac97_data);
312 /* Touch Screen Controller */ 322 /* Touch Screen Controller */
313 at91_add_device_tsadcc(); 323 at91_add_device_tsadcc(&ek_tsadcc_data);
314 /* LEDs */ 324 /* LEDs */
315 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); 325 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
316 /* Push Buttons */ 326 /* Push Buttons */
diff --git a/arch/arm/mach-at91/include/mach/atmel-mci.h b/arch/arm/mach-at91/include/mach/atmel-mci.h
new file mode 100644
index 000000000000..998cb0c07135
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/atmel-mci.h
@@ -0,0 +1,24 @@
1#ifndef __MACH_ATMEL_MCI_H
2#define __MACH_ATMEL_MCI_H
3
4#include <mach/at_hdmac.h>
5
6/**
7 * struct mci_dma_data - DMA data for MCI interface
8 */
9struct mci_dma_data {
10 struct at_dma_slave sdata;
11};
12
13/* accessor macros */
14#define slave_data_ptr(s) (&(s)->sdata)
15#define find_slave_dev(s) ((s)->sdata.dma_dev)
16
17#define setup_dma_addr(s, t, r) do { \
18 if (s) { \
19 (s)->sdata.tx_reg = (t); \
20 (s)->sdata.rx_reg = (r); \
21 } \
22} while (0)
23
24#endif /* __MACH_ATMEL_MCI_H */
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 2295d80dd893..bb6f6a7ba5e0 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -187,7 +187,12 @@ extern void __init at91_add_device_ac97(struct ac97c_platform_data *data);
187extern void __init at91_add_device_isi(void); 187extern void __init at91_add_device_isi(void);
188 188
189 /* Touchscreen Controller */ 189 /* Touchscreen Controller */
190extern void __init at91_add_device_tsadcc(void); 190struct at91_tsadcc_data {
191 unsigned int adc_clock;
192 u8 pendet_debounce;
193 u8 ts_sample_hold_time;
194};
195extern void __init at91_add_device_tsadcc(struct at91_tsadcc_data *data);
191 196
192/* CAN */ 197/* CAN */
193struct at91_can_data { 198struct at91_can_data {
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c
index fbe6fa02c882..53dd2a9eecf9 100644
--- a/arch/arm/mach-bcmring/arch.c
+++ b/arch/arm/mach-bcmring/arch.c
@@ -70,9 +70,19 @@ static struct ctl_table bcmring_sysctl_reboot[] = {
70 {} 70 {}
71}; 71};
72 72
73static struct resource nand_resource[] = {
74 [0] = {
75 .start = MM_ADDR_IO_NAND,
76 .end = MM_ADDR_IO_NAND + 0x1000 - 1,
77 .flags = IORESOURCE_MEM,
78 },
79};
80
73static struct platform_device nand_device = { 81static struct platform_device nand_device = {
74 .name = "bcm-nand", 82 .name = "bcm-nand",
75 .id = -1, 83 .id = -1,
84 .resource = nand_resource,
85 .num_resources = ARRAY_SIZE(nand_resource),
76}; 86};
77 87
78static struct platform_device *devices[] __initdata = { 88static struct platform_device *devices[] __initdata = {
diff --git a/arch/arm/mach-bcmring/include/csp/reg.h b/arch/arm/mach-bcmring/include/csp/reg.h
index e5f60bf5a1f3..56654d23c3d7 100644
--- a/arch/arm/mach-bcmring/include/csp/reg.h
+++ b/arch/arm/mach-bcmring/include/csp/reg.h
@@ -16,7 +16,7 @@
16/** 16/**
17* @file reg.h 17* @file reg.h
18* 18*
19* @brief Generic register defintions used in CSP 19* @brief Generic register definitions used in CSP
20*/ 20*/
21/****************************************************************************/ 21/****************************************************************************/
22 22
diff --git a/arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h b/arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h
index 375066ad0186..cbf334d1c761 100644
--- a/arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h
+++ b/arch/arm/mach-bcmring/include/mach/csp/dmacHw_priv.h
@@ -83,7 +83,7 @@ typedef struct {
83* @brief Get next available transaction width 83* @brief Get next available transaction width
84* 84*
85* 85*
86* @return On sucess : Next avail able transaction width 86* @return On success : Next available transaction width
87* On failure : dmacHw_TRANSACTION_WIDTH_8 87* On failure : dmacHw_TRANSACTION_WIDTH_8
88* 88*
89* @note 89* @note
diff --git a/arch/arm/mach-bcmring/include/mach/csp/mm_addr.h b/arch/arm/mach-bcmring/include/mach/csp/mm_addr.h
index 86bb58d4f58c..ad58cf873377 100644
--- a/arch/arm/mach-bcmring/include/mach/csp/mm_addr.h
+++ b/arch/arm/mach-bcmring/include/mach/csp/mm_addr.h
@@ -16,7 +16,7 @@
16/** 16/**
17* @file mm_addr.h 17* @file mm_addr.h
18* 18*
19* @brief Memory Map address defintions 19* @brief Memory Map address definitions
20* 20*
21* @note 21* @note
22* None 22* None
diff --git a/arch/arm/mach-bcmring/include/mach/dma.h b/arch/arm/mach-bcmring/include/mach/dma.h
index 847980c85c88..1f2c5319c056 100644
--- a/arch/arm/mach-bcmring/include/mach/dma.h
+++ b/arch/arm/mach-bcmring/include/mach/dma.h
@@ -651,7 +651,7 @@ int dma_map_add_region(DMA_MemMap_t *memMap, /* Stores state information about t
651/** 651/**
652* Creates a descriptor ring from a memory mapping. 652* Creates a descriptor ring from a memory mapping.
653* 653*
654* @return 0 on sucess, error code otherwise. 654* @return 0 on success, error code otherwise.
655*/ 655*/
656/****************************************************************************/ 656/****************************************************************************/
657 657
diff --git a/arch/arm/mach-bcmring/include/mach/reg_nand.h b/arch/arm/mach-bcmring/include/mach/reg_nand.h
new file mode 100644
index 000000000000..387376ffb56b
--- /dev/null
+++ b/arch/arm/mach-bcmring/include/mach/reg_nand.h
@@ -0,0 +1,66 @@
1/*****************************************************************************
2* Copyright 2001 - 2008 Broadcom Corporation. All rights reserved.
3*
4* Unless you and Broadcom execute a separate written software license
5* agreement governing use of this software, this software is licensed to you
6* under the terms of the GNU General Public License version 2, available at
7* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
8*
9* Notwithstanding the above, under no circumstances may you combine this
10* software in any way with any other Broadcom software provided under a
11* license other than the GPL, without Broadcom's express prior written
12* consent.
13*****************************************************************************/
14
15/*
16*
17*****************************************************************************
18*
19* REG_NAND.h
20*
21* PURPOSE:
22*
23* This file contains definitions for the nand registers:
24*
25* NOTES:
26*
27*****************************************************************************/
28
29#if !defined(__ASM_ARCH_REG_NAND_H)
30#define __ASM_ARCH_REG_NAND_H
31
32/* ---- Include Files ---------------------------------------------------- */
33#include <csp/reg.h>
34#include <mach/reg_umi.h>
35
36/* ---- Constants and Types ---------------------------------------------- */
37
38#define HW_NAND_BASE MM_IO_BASE_NAND /* NAND Flash */
39
40/* DMA accesses by the bootstrap need hard nonvirtual addresses */
41#define REG_NAND_CMD __REG16(HW_NAND_BASE + 0)
42#define REG_NAND_ADDR __REG16(HW_NAND_BASE + 4)
43
44#define REG_NAND_PHYS_DATA16 (HW_NAND_BASE + 8)
45#define REG_NAND_PHYS_DATA8 (HW_NAND_BASE + 8)
46#define REG_NAND_DATA16 __REG16(REG_NAND_PHYS_DATA16)
47#define REG_NAND_DATA8 __REG8(REG_NAND_PHYS_DATA8)
48
49/* use appropriate offset to make sure it start at the 1K boundary */
50#define REG_NAND_PHYS_DATA_DMA (HW_NAND_BASE + 0x400)
51#define REG_NAND_DATA_DMA __REG32(REG_NAND_PHYS_DATA_DMA)
52
53/* Linux DMA requires physical address of the data register */
54#define REG_NAND_DATA16_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA16)
55#define REG_NAND_DATA8_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA8)
56#define REG_NAND_DATA_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA_DMA)
57
58#define NAND_BUS_16BIT() (0)
59#define NAND_BUS_8BIT() (!NAND_BUS_16BIT())
60
61/* Register offsets */
62#define REG_NAND_CMD_OFFSET (0)
63#define REG_NAND_ADDR_OFFSET (4)
64#define REG_NAND_DATA8_OFFSET (8)
65
66#endif
diff --git a/arch/arm/mach-bcmring/include/mach/reg_umi.h b/arch/arm/mach-bcmring/include/mach/reg_umi.h
new file mode 100644
index 000000000000..06a355481ea6
--- /dev/null
+++ b/arch/arm/mach-bcmring/include/mach/reg_umi.h
@@ -0,0 +1,237 @@
1/*****************************************************************************
2* Copyright 2005 - 2008 Broadcom Corporation. All rights reserved.
3*
4* Unless you and Broadcom execute a separate written software license
5* agreement governing use of this software, this software is licensed to you
6* under the terms of the GNU General Public License version 2, available at
7* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
8*
9* Notwithstanding the above, under no circumstances may you combine this
10* software in any way with any other Broadcom software provided under a
11* license other than the GPL, without Broadcom's express prior written
12* consent.
13*****************************************************************************/
14
15/*
16*
17*****************************************************************************
18*
19* REG_UMI.h
20*
21* PURPOSE:
22*
23* This file contains definitions for the nand registers:
24*
25* NOTES:
26*
27*****************************************************************************/
28
29#if !defined(__ASM_ARCH_REG_UMI_H)
30#define __ASM_ARCH_REG_UMI_H
31
32/* ---- Include Files ---------------------------------------------------- */
33#include <csp/reg.h>
34#include <mach/csp/mm_io.h>
35
36/* ---- Constants and Types ---------------------------------------------- */
37
38/* Unified Memory Interface Ctrl Register */
39#define HW_UMI_BASE MM_IO_BASE_UMI
40
41/* Flash bank 0 timing and control register */
42#define REG_UMI_FLASH0_TCR __REG32(HW_UMI_BASE + 0x00)
43/* Flash bank 1 timing and control register */
44#define REG_UMI_FLASH1_TCR __REG32(HW_UMI_BASE + 0x04)
45/* Flash bank 2 timing and control register */
46#define REG_UMI_FLASH2_TCR __REG32(HW_UMI_BASE + 0x08)
47/* MMD interface and control register */
48#define REG_UMI_MMD_ICR __REG32(HW_UMI_BASE + 0x0c)
49/* NAND timing and control register */
50#define REG_UMI_NAND_TCR __REG32(HW_UMI_BASE + 0x18)
51/* NAND ready/chip select register */
52#define REG_UMI_NAND_RCSR __REG32(HW_UMI_BASE + 0x1c)
53/* NAND ECC control & status register */
54#define REG_UMI_NAND_ECC_CSR __REG32(HW_UMI_BASE + 0x20)
55/* NAND ECC data register XXB2B1B0 */
56#define REG_UMI_NAND_ECC_DATA __REG32(HW_UMI_BASE + 0x24)
57/* BCH ECC Parameter N */
58#define REG_UMI_BCH_N __REG32(HW_UMI_BASE + 0x40)
59/* BCH ECC Parameter T */
60#define REG_UMI_BCH_K __REG32(HW_UMI_BASE + 0x44)
61/* BCH ECC Parameter K */
62#define REG_UMI_BCH_T __REG32(HW_UMI_BASE + 0x48)
63/* BCH ECC Contro Status */
64#define REG_UMI_BCH_CTRL_STATUS __REG32(HW_UMI_BASE + 0x4C)
65/* BCH WR ECC 31:0 */
66#define REG_UMI_BCH_WR_ECC_0 __REG32(HW_UMI_BASE + 0x50)
67/* BCH WR ECC 63:32 */
68#define REG_UMI_BCH_WR_ECC_1 __REG32(HW_UMI_BASE + 0x54)
69/* BCH WR ECC 95:64 */
70#define REG_UMI_BCH_WR_ECC_2 __REG32(HW_UMI_BASE + 0x58)
71/* BCH WR ECC 127:96 */
72#define REG_UMI_BCH_WR_ECC_3 __REG32(HW_UMI_BASE + 0x5c)
73/* BCH WR ECC 155:128 */
74#define REG_UMI_BCH_WR_ECC_4 __REG32(HW_UMI_BASE + 0x60)
75/* BCH Read Error Location 1,0 */
76#define REG_UMI_BCH_RD_ERR_LOC_1_0 __REG32(HW_UMI_BASE + 0x64)
77/* BCH Read Error Location 3,2 */
78#define REG_UMI_BCH_RD_ERR_LOC_3_2 __REG32(HW_UMI_BASE + 0x68)
79/* BCH Read Error Location 5,4 */
80#define REG_UMI_BCH_RD_ERR_LOC_5_4 __REG32(HW_UMI_BASE + 0x6c)
81/* BCH Read Error Location 7,6 */
82#define REG_UMI_BCH_RD_ERR_LOC_7_6 __REG32(HW_UMI_BASE + 0x70)
83/* BCH Read Error Location 9,8 */
84#define REG_UMI_BCH_RD_ERR_LOC_9_8 __REG32(HW_UMI_BASE + 0x74)
85/* BCH Read Error Location 11,10 */
86#define REG_UMI_BCH_RD_ERR_LOC_B_A __REG32(HW_UMI_BASE + 0x78)
87
88/* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */
89/* Enable wait pin during burst write or read */
90#define REG_UMI_TCR_WAITEN 0x80000000
91/* Enable mem ctrlr to work iwth ext mem of lower freq than AHB clk */
92#define REG_UMI_TCR_LOWFREQ 0x40000000
93/* 1=synch write, 0=async write */
94#define REG_UMI_TCR_MEMTYPE_SYNCWRITE 0x20000000
95/* 1=synch read, 0=async read */
96#define REG_UMI_TCR_MEMTYPE_SYNCREAD 0x10000000
97/* 1=page mode read, 0=normal mode read */
98#define REG_UMI_TCR_MEMTYPE_PAGEREAD 0x08000000
99/* page size/burst size (wrap only) */
100#define REG_UMI_TCR_MEMTYPE_PGSZ_MASK 0x07000000
101/* 4 word */
102#define REG_UMI_TCR_MEMTYPE_PGSZ_4 0x00000000
103/* 8 word */
104#define REG_UMI_TCR_MEMTYPE_PGSZ_8 0x01000000
105/* 16 word */
106#define REG_UMI_TCR_MEMTYPE_PGSZ_16 0x02000000
107/* 32 word */
108#define REG_UMI_TCR_MEMTYPE_PGSZ_32 0x03000000
109/* 64 word */
110#define REG_UMI_TCR_MEMTYPE_PGSZ_64 0x04000000
111/* 128 word */
112#define REG_UMI_TCR_MEMTYPE_PGSZ_128 0x05000000
113/* 256 word */
114#define REG_UMI_TCR_MEMTYPE_PGSZ_256 0x06000000
115/* 512 word */
116#define REG_UMI_TCR_MEMTYPE_PGSZ_512 0x07000000
117/* Page read access cycle / Burst write latency (n+2 / n+1) */
118#define REG_UMI_TCR_TPRC_TWLC_MASK 0x00f80000
119/* Bus turnaround cycle (n) */
120#define REG_UMI_TCR_TBTA_MASK 0x00070000
121/* Write pulse width cycle (n+1) */
122#define REG_UMI_TCR_TWP_MASK 0x0000f800
123/* Write recovery cycle (n+1) */
124#define REG_UMI_TCR_TWR_MASK 0x00000600
125/* Write address setup cycle (n+1) */
126#define REG_UMI_TCR_TAS_MASK 0x00000180
127/* Output enable delay cycle (n) */
128#define REG_UMI_TCR_TOE_MASK 0x00000060
129/* Read access cycle / Burst read latency (n+2 / n+1) */
130#define REG_UMI_TCR_TRC_TLC_MASK 0x0000001f
131
132/* REG_UMI_MMD_ICR bits */
133/* Flash write protection pin control */
134#define REG_UMI_MMD_ICR_FLASH_WP 0x8000
135/* Extend hold time for sram0, sram1 csn (39 MHz operation) */
136#define REG_UMI_MMD_ICR_XHCS 0x4000
137/* Enable SDRAM 2 interface control */
138#define REG_UMI_MMD_ICR_SDRAM2EN 0x2000
139/* Enable merge of flash banks 0/1 to 512 MBit bank */
140#define REG_UMI_MMD_ICR_INST512 0x1000
141/* Enable merge of flash banks 1/2 to 512 MBit bank */
142#define REG_UMI_MMD_ICR_DATA512 0x0800
143/* Enable SDRAM interface control */
144#define REG_UMI_MMD_ICR_SDRAMEN 0x0400
145/* Polarity of busy state of Burst Wait Signal */
146#define REG_UMI_MMD_ICR_WAITPOL 0x0200
147/* Enable burst clock stopped when not accessing external burst flash/sram */
148#define REG_UMI_MMD_ICR_BCLKSTOP 0x0100
149/* Enable the peri1_csn to replace flash1_csn in 512 Mb flash mode */
150#define REG_UMI_MMD_ICR_PERI1EN 0x0080
151/* Enable the peri2_csn to replace sdram_csn */
152#define REG_UMI_MMD_ICR_PERI2EN 0x0040
153/* Enable the peri3_csn to replace sdram2_csn */
154#define REG_UMI_MMD_ICR_PERI3EN 0x0020
155/* Enable sram bank1 for H/W controlled MRS */
156#define REG_UMI_MMD_ICR_MRSB1 0x0010
157/* Enable sram bank0 for H/W controlled MRS */
158#define REG_UMI_MMD_ICR_MRSB0 0x0008
159/* Polarity for assert3ed state of H/W controlled MRS */
160#define REG_UMI_MMD_ICR_MRSPOL 0x0004
161/* 0: S/W controllable ZZ/MRS/CRE/P-Mode pin */
162/* 1: H/W controlled ZZ/MRS/CRE/P-Mode, same timing as CS */
163#define REG_UMI_MMD_ICR_MRSMODE 0x0002
164/* MRS state for S/W controlled mode */
165#define REG_UMI_MMD_ICR_MRSSTATE 0x0001
166
167/* REG_UMI_NAND_TCR bits */
168/* Enable software to control CS */
169#define REG_UMI_NAND_TCR_CS_SWCTRL 0x80000000
170/* 16-bit nand wordsize if set */
171#define REG_UMI_NAND_TCR_WORD16 0x40000000
172/* Bus turnaround cycle (n) */
173#define REG_UMI_NAND_TCR_TBTA_MASK 0x00070000
174/* Write pulse width cycle (n+1) */
175#define REG_UMI_NAND_TCR_TWP_MASK 0x0000f800
176/* Write recovery cycle (n+1) */
177#define REG_UMI_NAND_TCR_TWR_MASK 0x00000600
178/* Write address setup cycle (n+1) */
179#define REG_UMI_NAND_TCR_TAS_MASK 0x00000180
180/* Output enable delay cycle (n) */
181#define REG_UMI_NAND_TCR_TOE_MASK 0x00000060
182/* Read access cycle (n+2) */
183#define REG_UMI_NAND_TCR_TRC_TLC_MASK 0x0000001f
184
185/* REG_UMI_NAND_RCSR bits */
186/* Status: Ready=1, Busy=0 */
187#define REG_UMI_NAND_RCSR_RDY 0x02
188/* Keep CS asserted during operation */
189#define REG_UMI_NAND_RCSR_CS_ASSERTED 0x01
190
191/* REG_UMI_NAND_ECC_CSR bits */
192/* Interrupt status - read-only */
193#define REG_UMI_NAND_ECC_CSR_NANDINT 0x80000000
194/* Read: Status of ECC done, Write: clear ECC interrupt */
195#define REG_UMI_NAND_ECC_CSR_ECCINT_RAW 0x00800000
196/* Read: Status of R/B, Write: clear R/B interrupt */
197#define REG_UMI_NAND_ECC_CSR_RBINT_RAW 0x00400000
198/* 1 = Enable ECC Interrupt */
199#define REG_UMI_NAND_ECC_CSR_ECCINT_ENABLE 0x00008000
200/* 1 = Assert interrupt at rising edge of R/B_ */
201#define REG_UMI_NAND_ECC_CSR_RBINT_ENABLE 0x00004000
202/* Calculate ECC by 0=512 bytes, 1=256 bytes */
203#define REG_UMI_NAND_ECC_CSR_256BYTE 0x00000080
204/* Enable ECC in hardware */
205#define REG_UMI_NAND_ECC_CSR_ECC_ENABLE 0x00000001
206
207/* REG_UMI_BCH_CTRL_STATUS bits */
208/* Shift to Indicate Number of correctable errors detected */
209#define REG_UMI_BCH_CTRL_STATUS_NB_CORR_ERROR_SHIFT 20
210/* Indicate Number of correctable errors detected */
211#define REG_UMI_BCH_CTRL_STATUS_NB_CORR_ERROR 0x00F00000
212/* Indicate Errors detected during read but uncorrectable */
213#define REG_UMI_BCH_CTRL_STATUS_UNCORR_ERR 0x00080000
214/* Indicate Errors detected during read and are correctable */
215#define REG_UMI_BCH_CTRL_STATUS_CORR_ERR 0x00040000
216/* Flag indicates BCH's ECC status of read process are valid */
217#define REG_UMI_BCH_CTRL_STATUS_RD_ECC_VALID 0x00020000
218/* Flag indicates BCH's ECC status of write process are valid */
219#define REG_UMI_BCH_CTRL_STATUS_WR_ECC_VALID 0x00010000
220/* Pause ECC calculation */
221#define REG_UMI_BCH_CTRL_STATUS_PAUSE_ECC_DEC 0x00000010
222/* Enable Interrupt */
223#define REG_UMI_BCH_CTRL_STATUS_INT_EN 0x00000004
224/* Enable ECC during read */
225#define REG_UMI_BCH_CTRL_STATUS_ECC_RD_EN 0x00000002
226/* Enable ECC during write */
227#define REG_UMI_BCH_CTRL_STATUS_ECC_WR_EN 0x00000001
228/* Mask for location */
229#define REG_UMI_BCH_ERR_LOC_MASK 0x00001FFF
230/* location within a byte */
231#define REG_UMI_BCH_ERR_LOC_BYTE 0x00000007
232/* location within a word */
233#define REG_UMI_BCH_ERR_LOC_WORD 0x00000018
234/* location within a page (512 byte) */
235#define REG_UMI_BCH_ERR_LOC_PAGE 0x00001FE0
236#define REG_UMI_BCH_ERR_LOC_ADDR(index) (__REG32(HW_UMI_BASE + 0x64 + (index / 2)*4) >> ((index % 2) * 16))
237#endif
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
index e522b20bcbc2..f70d52be48a2 100644
--- a/arch/arm/mach-clps711x/include/mach/memory.h
+++ b/arch/arm/mach-clps711x/include/mach/memory.h
@@ -30,6 +30,8 @@
30 30
31#define __virt_to_bus(x) ((x) - PAGE_OFFSET) 31#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
32#define __bus_to_virt(x) ((x) + PAGE_OFFSET) 32#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
33#define __pfn_to_bus(x) (__pfn_to_phys(x) - PHYS_OFFSET)
34#define __bus_to_pfn(x) __phys_to_pfn((x) + PHYS_OFFSET)
33 35
34#endif 36#endif
35 37
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 40866c643f13..033bfede6b67 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -32,11 +32,13 @@ config ARCH_DAVINCI_DA830
32 bool "DA830/OMAP-L137 based system" 32 bool "DA830/OMAP-L137 based system"
33 select CP_INTC 33 select CP_INTC
34 select ARCH_DAVINCI_DA8XX 34 select ARCH_DAVINCI_DA8XX
35 select CPU_DCACHE_WRITETHROUGH # needed on silicon revs 1.0, 1.1
35 36
36config ARCH_DAVINCI_DA850 37config ARCH_DAVINCI_DA850
37 bool "DA850/OMAP-L138 based system" 38 bool "DA850/OMAP-L138 based system"
38 select CP_INTC 39 select CP_INTC
39 select ARCH_DAVINCI_DA8XX 40 select ARCH_DAVINCI_DA8XX
41 select ARCH_HAS_CPUFREQ
40 42
41config ARCH_DAVINCI_DA8XX 43config ARCH_DAVINCI_DA8XX
42 bool 44 bool
@@ -63,6 +65,13 @@ config MACH_SFFSDR
63 Say Y here to select the Lyrtech Small Form Factor 65 Say Y here to select the Lyrtech Small Form Factor
64 Software Defined Radio (SFFSDR) board. 66 Software Defined Radio (SFFSDR) board.
65 67
68config MACH_NEUROS_OSD2
69 bool "Neuros OSD2 Open Television Set Top Box"
70 depends on ARCH_DAVINCI_DM644x
71 help
72 Configure this option to specify the whether the board used
73 for development is a Neuros OSD2 Open Set Top Box.
74
66config MACH_DAVINCI_DM355_EVM 75config MACH_DAVINCI_DM355_EVM
67 bool "TI DM355 EVM" 76 bool "TI DM355 EVM"
68 default ARCH_DAVINCI_DM355 77 default ARCH_DAVINCI_DM355
@@ -98,16 +107,66 @@ config MACH_DAVINCI_DA830_EVM
98 bool "TI DA830/OMAP-L137 Reference Platform" 107 bool "TI DA830/OMAP-L137 Reference Platform"
99 default ARCH_DAVINCI_DA830 108 default ARCH_DAVINCI_DA830
100 depends on ARCH_DAVINCI_DA830 109 depends on ARCH_DAVINCI_DA830
110 select GPIO_PCF857X
101 help 111 help
102 Say Y here to select the TI DA830/OMAP-L137 Evaluation Module. 112 Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
103 113
114choice
115 prompt "Select DA830/OMAP-L137 UI board peripheral"
116 depends on MACH_DAVINCI_DA830_EVM
117 help
118 The presence of UI card on the DA830/OMAP-L137 EVM is detected
119 automatically based on successful probe of the I2C based GPIO
120 expander on that board. This option selected in this menu has
121 an effect only in case of a successful UI card detection.
122
123config DA830_UI_LCD
124 bool "LCD"
125 help
126 Say Y here to use the LCD as a framebuffer or simple character
127 display.
128
129config DA830_UI_NAND
130 bool "NAND flash"
131 help
132 Say Y here to use the NAND flash. Do not forget to setup
133 the switch correctly.
134endchoice
135
104config MACH_DAVINCI_DA850_EVM 136config MACH_DAVINCI_DA850_EVM
105 bool "TI DA850/OMAP-L138 Reference Platform" 137 bool "TI DA850/OMAP-L138 Reference Platform"
106 default ARCH_DAVINCI_DA850 138 default ARCH_DAVINCI_DA850
107 depends on ARCH_DAVINCI_DA850 139 depends on ARCH_DAVINCI_DA850
140 select GPIO_PCA953X
108 help 141 help
109 Say Y here to select the TI DA850/OMAP-L138 Evaluation Module. 142 Say Y here to select the TI DA850/OMAP-L138 Evaluation Module.
110 143
144choice
145 prompt "Select peripherals connected to expander on UI board"
146 depends on MACH_DAVINCI_DA850_EVM
147 help
148 The presence of User Interface (UI) card on the DA850/OMAP-L138
149 EVM is detected automatically based on successful probe of the I2C
150 based GPIO expander on that card. This option selected in this
151 menu has an effect only in case of a successful UI card detection.
152
153config DA850_UI_NONE
154 bool "No peripheral is enabled"
155 help
156 Say Y if you do not want to enable any of the peripherals connected
157 to TCA6416 expander on DA850/OMAP-L138 EVM UI card
158
159config DA850_UI_RMII
160 bool "RMII Ethernet PHY"
161 help
162 Say Y if you want to use the RMII PHY on the DA850/OMAP-L138 EVM.
163 This PHY is found on the UI daughter card that is supplied with
164 the EVM.
165 NOTE: Please take care while choosing this option, MII PHY will
166 not be functional if RMII mode is selected.
167
168endchoice
169
111config DAVINCI_MUX 170config DAVINCI_MUX
112 bool "DAVINCI multiplexing support" 171 bool "DAVINCI multiplexing support"
113 depends on ARCH_DAVINCI 172 depends on ARCH_DAVINCI
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 2e11e847313b..eeb9230d8844 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -23,9 +23,14 @@ obj-$(CONFIG_CP_INTC) += cp_intc.o
23# Board specific 23# Board specific
24obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o 24obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
25obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o 25obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
26obj-$(CONFIG_MACH_NEUROS_OSD2) += board-neuros-osd2.o
26obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o 27obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o
27obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o 28obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o
28obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o 29obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o
29obj-$(CONFIG_MACH_DAVINCI_DM365_EVM) += board-dm365-evm.o 30obj-$(CONFIG_MACH_DAVINCI_DM365_EVM) += board-dm365-evm.o
30obj-$(CONFIG_MACH_DAVINCI_DA830_EVM) += board-da830-evm.o 31obj-$(CONFIG_MACH_DAVINCI_DA830_EVM) += board-da830-evm.o
31obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o 32obj-$(CONFIG_MACH_DAVINCI_DA850_EVM) += board-da850-evm.o
33
34# Power Management
35obj-$(CONFIG_CPU_FREQ) += cpufreq.o
36obj-$(CONFIG_CPU_IDLE) += cpuidle.o
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index bfbb63936f33..31dc9901e556 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -10,51 +10,194 @@
10 * or implied. 10 * or implied.
11 */ 11 */
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/console.h> 14#include <linux/console.h>
15#include <linux/interrupt.h>
16#include <linux/gpio.h>
17#include <linux/platform_device.h>
16#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/i2c/pcf857x.h>
17#include <linux/i2c/at24.h> 20#include <linux/i2c/at24.h>
21#include <linux/mtd/mtd.h>
22#include <linux/mtd/partitions.h>
18 23
19#include <asm/mach-types.h> 24#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
21 26
22#include <mach/common.h>
23#include <mach/irqs.h>
24#include <mach/cp_intc.h> 27#include <mach/cp_intc.h>
28#include <mach/mux.h>
29#include <mach/nand.h>
25#include <mach/da8xx.h> 30#include <mach/da8xx.h>
26#include <mach/asp.h> 31#include <mach/usb.h>
27 32
28#define DA830_EVM_PHY_MASK 0x0 33#define DA830_EVM_PHY_MASK 0x0
29#define DA830_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */ 34#define DA830_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
30 35
31static struct at24_platform_data da830_evm_i2c_eeprom_info = { 36#define DA830_EMIF25_ASYNC_DATA_CE3_BASE 0x62000000
32 .byte_len = SZ_256K / 8, 37#define DA830_EMIF25_CONTROL_BASE 0x68000000
33 .page_size = 64,
34 .flags = AT24_FLAG_ADDR16,
35 .setup = davinci_get_mac_addr,
36 .context = (void *)0x7f00,
37};
38 38
39static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { 39/*
40 { 40 * USB1 VBUS is controlled by GPIO1[15], over-current is reported on GPIO2[4].
41 I2C_BOARD_INFO("24c256", 0x50), 41 */
42 .platform_data = &da830_evm_i2c_eeprom_info, 42#define ON_BD_USB_DRV GPIO_TO_PIN(1, 15)
43 }, 43#define ON_BD_USB_OVC GPIO_TO_PIN(2, 4)
44 { 44
45 I2C_BOARD_INFO("tlv320aic3x", 0x18), 45static const short da830_evm_usb11_pins[] = {
46 } 46 DA830_GPIO1_15, DA830_GPIO2_4,
47 -1
47}; 48};
48 49
49static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = { 50static da8xx_ocic_handler_t da830_evm_usb_ocic_handler;
50 .bus_freq = 100, /* kHz */ 51
51 .bus_delay = 0, /* usec */ 52static int da830_evm_usb_set_power(unsigned port, int on)
53{
54 gpio_set_value(ON_BD_USB_DRV, on);
55 return 0;
56}
57
58static int da830_evm_usb_get_power(unsigned port)
59{
60 return gpio_get_value(ON_BD_USB_DRV);
61}
62
63static int da830_evm_usb_get_oci(unsigned port)
64{
65 return !gpio_get_value(ON_BD_USB_OVC);
66}
67
68static irqreturn_t da830_evm_usb_ocic_irq(int, void *);
69
70static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler)
71{
72 int irq = gpio_to_irq(ON_BD_USB_OVC);
73 int error = 0;
74
75 if (handler != NULL) {
76 da830_evm_usb_ocic_handler = handler;
77
78 error = request_irq(irq, da830_evm_usb_ocic_irq, IRQF_DISABLED |
79 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
80 "OHCI over-current indicator", NULL);
81 if (error)
82 printk(KERN_ERR "%s: could not request IRQ to watch "
83 "over-current indicator changes\n", __func__);
84 } else
85 free_irq(irq, NULL);
86
87 return error;
88}
89
90static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = {
91 .set_power = da830_evm_usb_set_power,
92 .get_power = da830_evm_usb_get_power,
93 .get_oci = da830_evm_usb_get_oci,
94 .ocic_notify = da830_evm_usb_ocic_notify,
95
96 /* TPS2065 switch @ 5V */
97 .potpgt = (3 + 1) / 2, /* 3 ms max */
52}; 98};
53 99
100static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id)
101{
102 da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1);
103 return IRQ_HANDLED;
104}
105
106static __init void da830_evm_usb_init(void)
107{
108 u32 cfgchip2;
109 int ret;
110
111 /*
112 * Set up USB clock/mode in the CFGCHIP2 register.
113 * FYI: CFGCHIP2 is 0x0000ef00 initially.
114 */
115 cfgchip2 = __raw_readl(DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP2_REG));
116
117 /* USB2.0 PHY reference clock is 24 MHz */
118 cfgchip2 &= ~CFGCHIP2_REFFREQ;
119 cfgchip2 |= CFGCHIP2_REFFREQ_24MHZ;
120
121 /*
122 * Select internal reference clock for USB 2.0 PHY
123 * and use it as a clock source for USB 1.1 PHY
124 * (this is the default setting anyway).
125 */
126 cfgchip2 &= ~CFGCHIP2_USB1PHYCLKMUX;
127 cfgchip2 |= CFGCHIP2_USB2PHYCLKMUX;
128
129 /*
130 * We have to override VBUS/ID signals when MUSB is configured into the
131 * host-only mode -- ID pin will float if no cable is connected, so the
132 * controller won't be able to drive VBUS thinking that it's a B-device.
133 * Otherwise, we want to use the OTG mode and enable VBUS comparators.
134 */
135 cfgchip2 &= ~CFGCHIP2_OTGMODE;
136#ifdef CONFIG_USB_MUSB_HOST
137 cfgchip2 |= CFGCHIP2_FORCE_HOST;
138#else
139 cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
140#endif
141
142 __raw_writel(cfgchip2, DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP2_REG));
143
144 /* USB_REFCLKIN is not used. */
145 ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
146 if (ret)
147 pr_warning("%s: USB 2.0 PinMux setup failed: %d\n",
148 __func__, ret);
149 else {
150 /*
151 * TPS2065 switch @ 5V supplies 1 A (sustains 1.5 A),
152 * with the power on to power good time of 3 ms.
153 */
154 ret = da8xx_register_usb20(1000, 3);
155 if (ret)
156 pr_warning("%s: USB 2.0 registration failed: %d\n",
157 __func__, ret);
158 }
159
160 ret = da8xx_pinmux_setup(da830_evm_usb11_pins);
161 if (ret) {
162 pr_warning("%s: USB 1.1 PinMux setup failed: %d\n",
163 __func__, ret);
164 return;
165 }
166
167 ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV");
168 if (ret) {
169 printk(KERN_ERR "%s: failed to request GPIO for USB 1.1 port "
170 "power control: %d\n", __func__, ret);
171 return;
172 }
173 gpio_direction_output(ON_BD_USB_DRV, 0);
174
175 ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC");
176 if (ret) {
177 printk(KERN_ERR "%s: failed to request GPIO for USB 1.1 port "
178 "over-current indicator: %d\n", __func__, ret);
179 return;
180 }
181 gpio_direction_input(ON_BD_USB_OVC);
182
183 ret = da8xx_register_usb11(&da830_evm_usb11_pdata);
184 if (ret)
185 pr_warning("%s: USB 1.1 registration failed: %d\n",
186 __func__, ret);
187}
188
54static struct davinci_uart_config da830_evm_uart_config __initdata = { 189static struct davinci_uart_config da830_evm_uart_config __initdata = {
55 .enabled_uarts = 0x7, 190 .enabled_uarts = 0x7,
56}; 191};
57 192
193static const short da830_evm_mcasp1_pins[] = {
194 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, DA830_AHCLKR1, DA830_AFSR1,
195 DA830_AMUTE1, DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_5,
196 DA830_ACLKR1, DA830_AXR1_6, DA830_AXR1_7, DA830_AXR1_8, DA830_AXR1_10,
197 DA830_AXR1_11,
198 -1
199};
200
58static u8 da830_iis_serializer_direction[] = { 201static u8 da830_iis_serializer_direction[] = {
59 RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, 202 RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
60 INACTIVE_MODE, TX_MODE, INACTIVE_MODE, INACTIVE_MODE, 203 INACTIVE_MODE, TX_MODE, INACTIVE_MODE, INACTIVE_MODE,
@@ -74,6 +217,271 @@ static struct snd_platform_data da830_evm_snd_data = {
74 .rxnumevt = 1, 217 .rxnumevt = 1,
75}; 218};
76 219
220/*
221 * GPIO2[1] is used as MMC_SD_WP and GPIO2[2] as MMC_SD_INS.
222 */
223static const short da830_evm_mmc_sd_pins[] = {
224 DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
225 DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
226 DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
227 DA830_MMCSD_CMD, DA830_GPIO2_1, DA830_GPIO2_2,
228 -1
229};
230
231#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1)
232
233static int da830_evm_mmc_get_ro(int index)
234{
235 return gpio_get_value(DA830_MMCSD_WP_PIN);
236}
237
238static struct davinci_mmc_config da830_evm_mmc_config = {
239 .get_ro = da830_evm_mmc_get_ro,
240 .wires = 4,
241 .max_freq = 50000000,
242 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
243 .version = MMC_CTLR_VERSION_2,
244};
245
246static inline void da830_evm_init_mmc(void)
247{
248 int ret;
249
250 ret = da8xx_pinmux_setup(da830_evm_mmc_sd_pins);
251 if (ret) {
252 pr_warning("da830_evm_init: mmc/sd mux setup failed: %d\n",
253 ret);
254 return;
255 }
256
257 ret = gpio_request(DA830_MMCSD_WP_PIN, "MMC WP");
258 if (ret) {
259 pr_warning("da830_evm_init: can not open GPIO %d\n",
260 DA830_MMCSD_WP_PIN);
261 return;
262 }
263 gpio_direction_input(DA830_MMCSD_WP_PIN);
264
265 ret = da8xx_register_mmcsd0(&da830_evm_mmc_config);
266 if (ret) {
267 pr_warning("da830_evm_init: mmc/sd registration failed: %d\n",
268 ret);
269 gpio_free(DA830_MMCSD_WP_PIN);
270 }
271}
272
273/*
274 * UI board NAND/NOR flashes only use 8-bit data bus.
275 */
276static const short da830_evm_emif25_pins[] = {
277 DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
278 DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
279 DA830_EMA_A_0, DA830_EMA_A_1, DA830_EMA_A_2, DA830_EMA_A_3,
280 DA830_EMA_A_4, DA830_EMA_A_5, DA830_EMA_A_6, DA830_EMA_A_7,
281 DA830_EMA_A_8, DA830_EMA_A_9, DA830_EMA_A_10, DA830_EMA_A_11,
282 DA830_EMA_A_12, DA830_EMA_BA_0, DA830_EMA_BA_1, DA830_NEMA_WE,
283 DA830_NEMA_CS_2, DA830_NEMA_CS_3, DA830_NEMA_OE, DA830_EMA_WAIT_0,
284 -1
285};
286
287#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
288#define HAS_MMC 1
289#else
290#define HAS_MMC 0
291#endif
292
293#ifdef CONFIG_DA830_UI_NAND
294static struct mtd_partition da830_evm_nand_partitions[] = {
295 /* bootloader (U-Boot, etc) in first sector */
296 [0] = {
297 .name = "bootloader",
298 .offset = 0,
299 .size = SZ_128K,
300 .mask_flags = MTD_WRITEABLE, /* force read-only */
301 },
302 /* bootloader params in the next sector */
303 [1] = {
304 .name = "params",
305 .offset = MTDPART_OFS_APPEND,
306 .size = SZ_128K,
307 .mask_flags = MTD_WRITEABLE, /* force read-only */
308 },
309 /* kernel */
310 [2] = {
311 .name = "kernel",
312 .offset = MTDPART_OFS_APPEND,
313 .size = SZ_2M,
314 .mask_flags = 0,
315 },
316 /* file system */
317 [3] = {
318 .name = "filesystem",
319 .offset = MTDPART_OFS_APPEND,
320 .size = MTDPART_SIZ_FULL,
321 .mask_flags = 0,
322 }
323};
324
325/* flash bbt decriptors */
326static uint8_t da830_evm_nand_bbt_pattern[] = { 'B', 'b', 't', '0' };
327static uint8_t da830_evm_nand_mirror_pattern[] = { '1', 't', 'b', 'B' };
328
329static struct nand_bbt_descr da830_evm_nand_bbt_main_descr = {
330 .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE |
331 NAND_BBT_WRITE | NAND_BBT_2BIT |
332 NAND_BBT_VERSION | NAND_BBT_PERCHIP,
333 .offs = 2,
334 .len = 4,
335 .veroffs = 16,
336 .maxblocks = 4,
337 .pattern = da830_evm_nand_bbt_pattern
338};
339
340static struct nand_bbt_descr da830_evm_nand_bbt_mirror_descr = {
341 .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE |
342 NAND_BBT_WRITE | NAND_BBT_2BIT |
343 NAND_BBT_VERSION | NAND_BBT_PERCHIP,
344 .offs = 2,
345 .len = 4,
346 .veroffs = 16,
347 .maxblocks = 4,
348 .pattern = da830_evm_nand_mirror_pattern
349};
350
351static struct davinci_nand_pdata da830_evm_nand_pdata = {
352 .parts = da830_evm_nand_partitions,
353 .nr_parts = ARRAY_SIZE(da830_evm_nand_partitions),
354 .ecc_mode = NAND_ECC_HW,
355 .ecc_bits = 4,
356 .options = NAND_USE_FLASH_BBT,
357 .bbt_td = &da830_evm_nand_bbt_main_descr,
358 .bbt_md = &da830_evm_nand_bbt_mirror_descr,
359};
360
361static struct resource da830_evm_nand_resources[] = {
362 [0] = { /* First memory resource is NAND I/O window */
363 .start = DA830_EMIF25_ASYNC_DATA_CE3_BASE,
364 .end = DA830_EMIF25_ASYNC_DATA_CE3_BASE + PAGE_SIZE - 1,
365 .flags = IORESOURCE_MEM,
366 },
367 [1] = { /* Second memory resource is AEMIF control registers */
368 .start = DA830_EMIF25_CONTROL_BASE,
369 .end = DA830_EMIF25_CONTROL_BASE + SZ_32K - 1,
370 .flags = IORESOURCE_MEM,
371 },
372};
373
374static struct platform_device da830_evm_nand_device = {
375 .name = "davinci_nand",
376 .id = 1,
377 .dev = {
378 .platform_data = &da830_evm_nand_pdata,
379 },
380 .num_resources = ARRAY_SIZE(da830_evm_nand_resources),
381 .resource = da830_evm_nand_resources,
382};
383
384static inline void da830_evm_init_nand(int mux_mode)
385{
386 int ret;
387
388 if (HAS_MMC) {
389 pr_warning("WARNING: both MMC/SD and NAND are "
390 "enabled, but they share AEMIF pins.\n"
391 "\tDisable MMC/SD for NAND support.\n");
392 return;
393 }
394
395 ret = da8xx_pinmux_setup(da830_evm_emif25_pins);
396 if (ret)
397 pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
398 ret);
399
400 ret = platform_device_register(&da830_evm_nand_device);
401 if (ret)
402 pr_warning("da830_evm_init: NAND device not registered.\n");
403
404 gpio_direction_output(mux_mode, 1);
405}
406#else
407static inline void da830_evm_init_nand(int mux_mode) { }
408#endif
409
410#ifdef CONFIG_DA830_UI_LCD
411static inline void da830_evm_init_lcdc(int mux_mode)
412{
413 int ret;
414
415 ret = da8xx_pinmux_setup(da830_lcdcntl_pins);
416 if (ret)
417 pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n",
418 ret);
419
420 ret = da8xx_register_lcdc(&sharp_lcd035q3dg01_pdata);
421 if (ret)
422 pr_warning("da830_evm_init: lcd setup failed: %d\n", ret);
423
424 gpio_direction_output(mux_mode, 0);
425}
426#else
427static inline void da830_evm_init_lcdc(int mux_mode) { }
428#endif
429
430static struct at24_platform_data da830_evm_i2c_eeprom_info = {
431 .byte_len = SZ_256K / 8,
432 .page_size = 64,
433 .flags = AT24_FLAG_ADDR16,
434 .setup = davinci_get_mac_addr,
435 .context = (void *)0x7f00,
436};
437
438static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
439 int gpio, unsigned ngpio, void *context)
440{
441 gpio_request(gpio + 6, "UI MUX_MODE");
442
443 /* Drive mux mode low to match the default without UI card */
444 gpio_direction_output(gpio + 6, 0);
445
446 da830_evm_init_lcdc(gpio + 6);
447
448 da830_evm_init_nand(gpio + 6);
449
450 return 0;
451}
452
453static int da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio,
454 unsigned ngpio, void *context)
455{
456 gpio_free(gpio + 6);
457 return 0;
458}
459
460static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = {
461 .gpio_base = DAVINCI_N_GPIO,
462 .setup = da830_evm_ui_expander_setup,
463 .teardown = da830_evm_ui_expander_teardown,
464};
465
466static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
467 {
468 I2C_BOARD_INFO("24c256", 0x50),
469 .platform_data = &da830_evm_i2c_eeprom_info,
470 },
471 {
472 I2C_BOARD_INFO("tlv320aic3x", 0x18),
473 },
474 {
475 I2C_BOARD_INFO("pcf8574", 0x3f),
476 .platform_data = &da830_evm_ui_expander_info,
477 },
478};
479
480static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
481 .bus_freq = 100, /* kHz */
482 .bus_delay = 0, /* usec */
483};
484
77static __init void da830_evm_init(void) 485static __init void da830_evm_init(void)
78{ 486{
79 struct davinci_soc_info *soc_info = &davinci_soc_info; 487 struct davinci_soc_info *soc_info = &davinci_soc_info;
@@ -94,6 +502,8 @@ static __init void da830_evm_init(void)
94 pr_warning("da830_evm_init: i2c0 registration failed: %d\n", 502 pr_warning("da830_evm_init: i2c0 registration failed: %d\n",
95 ret); 503 ret);
96 504
505 da830_evm_usb_init();
506
97 soc_info->emac_pdata->phy_mask = DA830_EVM_PHY_MASK; 507 soc_info->emac_pdata->phy_mask = DA830_EVM_PHY_MASK;
98 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY; 508 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY;
99 soc_info->emac_pdata->rmii_en = 1; 509 soc_info->emac_pdata->rmii_en = 1;
@@ -117,12 +527,18 @@ static __init void da830_evm_init(void)
117 i2c_register_board_info(1, da830_evm_i2c_devices, 527 i2c_register_board_info(1, da830_evm_i2c_devices,
118 ARRAY_SIZE(da830_evm_i2c_devices)); 528 ARRAY_SIZE(da830_evm_i2c_devices));
119 529
120 ret = da8xx_pinmux_setup(da830_mcasp1_pins); 530 ret = da8xx_pinmux_setup(da830_evm_mcasp1_pins);
121 if (ret) 531 if (ret)
122 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n", 532 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n",
123 ret); 533 ret);
124 534
125 da8xx_init_mcasp(1, &da830_evm_snd_data); 535 da8xx_register_mcasp(1, &da830_evm_snd_data);
536
537 da830_evm_init_mmc();
538
539 ret = da8xx_register_rtc();
540 if (ret)
541 pr_warning("da830_evm_init: rtc setup failed: %d\n", ret);
126} 542}
127 543
128#ifdef CONFIG_SERIAL_8250_CONSOLE 544#ifdef CONFIG_SERIAL_8250_CONSOLE
@@ -146,7 +562,7 @@ static void __init da830_evm_map_io(void)
146 da830_init(); 562 da830_init();
147} 563}
148 564
149MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP L137 EVM") 565MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137 EVM")
150 .phys_io = IO_PHYS, 566 .phys_io = IO_PHYS,
151 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, 567 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
152 .boot_params = (DA8XX_DDR_BASE + 0x100), 568 .boot_params = (DA8XX_DDR_BASE + 0x100),
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index c759d72494e0..07de8db14581 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -12,36 +12,38 @@
12 * or implied. 12 * or implied.
13 */ 13 */
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/console.h> 16#include <linux/console.h>
18#include <linux/i2c.h> 17#include <linux/i2c.h>
19#include <linux/i2c/at24.h> 18#include <linux/i2c/at24.h>
19#include <linux/i2c/pca953x.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
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 <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/regulator/machine.h>
26 27
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
29 30
30#include <mach/common.h>
31#include <mach/irqs.h>
32#include <mach/cp_intc.h> 31#include <mach/cp_intc.h>
33#include <mach/da8xx.h> 32#include <mach/da8xx.h>
34#include <mach/nand.h> 33#include <mach/nand.h>
34#include <mach/mux.h>
35 35
36#define DA850_EVM_PHY_MASK 0x1 36#define DA850_EVM_PHY_MASK 0x1
37#define DA850_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */ 37#define DA850_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
38 38
39#define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8)
39#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) 40#define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
40#define DA850_LCD_PWR_PIN GPIO_TO_PIN(8, 10)
41 41
42#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) 42#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
43#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) 43#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
44 44
45#define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
46
45static struct mtd_partition da850_evm_norflash_partition[] = { 47static struct mtd_partition da850_evm_norflash_partition[] = {
46 { 48 {
47 .name = "NOR filesystem", 49 .name = "NOR filesystem",
@@ -143,10 +145,149 @@ static struct platform_device da850_evm_nandflash_device = {
143 .resource = da850_evm_nandflash_resource, 145 .resource = da850_evm_nandflash_resource,
144}; 146};
145 147
148static struct platform_device *da850_evm_devices[] __initdata = {
149 &da850_evm_nandflash_device,
150 &da850_evm_norflash_device,
151};
152
153#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
154#define DA8XX_AEMIF_ASIZE_16BIT 0x1
155
156static void __init da850_evm_init_nor(void)
157{
158 void __iomem *aemif_addr;
159
160 aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
161
162 /* Configure data bus width of CS2 to 16 bit */
163 writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
164 DA8XX_AEMIF_ASIZE_16BIT,
165 aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
166
167 iounmap(aemif_addr);
168}
169
170static u32 ui_card_detected;
171
172#if defined(CONFIG_MMC_DAVINCI) || \
173 defined(CONFIG_MMC_DAVINCI_MODULE)
174#define HAS_MMC 1
175#else
176#define HAS_MMC 0
177#endif
178
179static __init void da850_evm_setup_nor_nand(void)
180{
181 int ret = 0;
182
183 if (ui_card_detected & !HAS_MMC) {
184 ret = da8xx_pinmux_setup(da850_nand_pins);
185 if (ret)
186 pr_warning("da850_evm_init: nand mux setup failed: "
187 "%d\n", ret);
188
189 ret = da8xx_pinmux_setup(da850_nor_pins);
190 if (ret)
191 pr_warning("da850_evm_init: nor mux setup failed: %d\n",
192 ret);
193
194 da850_evm_init_nor();
195
196 platform_add_devices(da850_evm_devices,
197 ARRAY_SIZE(da850_evm_devices));
198 }
199}
200
201#ifdef CONFIG_DA850_UI_RMII
202static inline void da850_evm_setup_emac_rmii(int rmii_sel)
203{
204 struct davinci_soc_info *soc_info = &davinci_soc_info;
205
206 soc_info->emac_pdata->rmii_en = 1;
207 gpio_set_value(rmii_sel, 0);
208}
209#else
210static inline void da850_evm_setup_emac_rmii(int rmii_sel) { }
211#endif
212
213static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
214 unsigned ngpio, void *c)
215{
216 int sel_a, sel_b, sel_c, ret;
217
218 sel_a = gpio + 7;
219 sel_b = gpio + 6;
220 sel_c = gpio + 5;
221
222 ret = gpio_request(sel_a, "sel_a");
223 if (ret) {
224 pr_warning("Cannot open UI expander pin %d\n", sel_a);
225 goto exp_setup_sela_fail;
226 }
227
228 ret = gpio_request(sel_b, "sel_b");
229 if (ret) {
230 pr_warning("Cannot open UI expander pin %d\n", sel_b);
231 goto exp_setup_selb_fail;
232 }
233
234 ret = gpio_request(sel_c, "sel_c");
235 if (ret) {
236 pr_warning("Cannot open UI expander pin %d\n", sel_c);
237 goto exp_setup_selc_fail;
238 }
239
240 /* deselect all functionalities */
241 gpio_direction_output(sel_a, 1);
242 gpio_direction_output(sel_b, 1);
243 gpio_direction_output(sel_c, 1);
244
245 ui_card_detected = 1;
246 pr_info("DA850/OMAP-L138 EVM UI card detected\n");
247
248 da850_evm_setup_nor_nand();
249
250 da850_evm_setup_emac_rmii(sel_a);
251
252 return 0;
253
254exp_setup_selc_fail:
255 gpio_free(sel_b);
256exp_setup_selb_fail:
257 gpio_free(sel_a);
258exp_setup_sela_fail:
259 return ret;
260}
261
262static int da850_evm_ui_expander_teardown(struct i2c_client *client,
263 unsigned gpio, unsigned ngpio, void *c)
264{
265 /* deselect all functionalities */
266 gpio_set_value(gpio + 5, 1);
267 gpio_set_value(gpio + 6, 1);
268 gpio_set_value(gpio + 7, 1);
269
270 gpio_free(gpio + 5);
271 gpio_free(gpio + 6);
272 gpio_free(gpio + 7);
273
274 return 0;
275}
276
277static struct pca953x_platform_data da850_evm_ui_expander_info = {
278 .gpio_base = DAVINCI_N_GPIO,
279 .setup = da850_evm_ui_expander_setup,
280 .teardown = da850_evm_ui_expander_teardown,
281};
282
146static struct i2c_board_info __initdata da850_evm_i2c_devices[] = { 283static struct i2c_board_info __initdata da850_evm_i2c_devices[] = {
147 { 284 {
148 I2C_BOARD_INFO("tlv320aic3x", 0x18), 285 I2C_BOARD_INFO("tlv320aic3x", 0x18),
149 } 286 },
287 {
288 I2C_BOARD_INFO("tca6416", 0x20),
289 .platform_data = &da850_evm_ui_expander_info,
290 },
150}; 291};
151 292
152static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { 293static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
@@ -158,11 +299,6 @@ static struct davinci_uart_config da850_evm_uart_config __initdata = {
158 .enabled_uarts = 0x7, 299 .enabled_uarts = 0x7,
159}; 300};
160 301
161static struct platform_device *da850_evm_devices[] __initdata = {
162 &da850_evm_nandflash_device,
163 &da850_evm_norflash_device,
164};
165
166/* davinci da850 evm audio machine driver */ 302/* davinci da850 evm audio machine driver */
167static u8 da850_iis_serializer_direction[] = { 303static u8 da850_iis_serializer_direction[] = {
168 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, 304 INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
@@ -198,9 +334,20 @@ static struct davinci_mmc_config da850_mmc_config = {
198 .get_ro = da850_evm_mmc_get_ro, 334 .get_ro = da850_evm_mmc_get_ro,
199 .get_cd = da850_evm_mmc_get_cd, 335 .get_cd = da850_evm_mmc_get_cd,
200 .wires = 4, 336 .wires = 4,
337 .max_freq = 50000000,
338 .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
201 .version = MMC_CTLR_VERSION_2, 339 .version = MMC_CTLR_VERSION_2,
202}; 340};
203 341
342static void da850_panel_power_ctrl(int val)
343{
344 /* lcd backlight */
345 gpio_set_value(DA850_LCD_BL_PIN, val);
346
347 /* lcd power */
348 gpio_set_value(DA850_LCD_PWR_PIN, val);
349}
350
204static int da850_lcd_hw_init(void) 351static int da850_lcd_hw_init(void)
205{ 352{
206 int status; 353 int status;
@@ -218,71 +365,236 @@ static int da850_lcd_hw_init(void)
218 gpio_direction_output(DA850_LCD_BL_PIN, 0); 365 gpio_direction_output(DA850_LCD_BL_PIN, 0);
219 gpio_direction_output(DA850_LCD_PWR_PIN, 0); 366 gpio_direction_output(DA850_LCD_PWR_PIN, 0);
220 367
221 /* disable lcd backlight */ 368 /* Switch off panel power and backlight */
222 gpio_set_value(DA850_LCD_BL_PIN, 0); 369 da850_panel_power_ctrl(0);
223
224 /* disable lcd power */
225 gpio_set_value(DA850_LCD_PWR_PIN, 0);
226 370
227 /* enable lcd power */ 371 /* Switch on panel power and backlight */
228 gpio_set_value(DA850_LCD_PWR_PIN, 1); 372 da850_panel_power_ctrl(1);
229
230 /* enable lcd backlight */
231 gpio_set_value(DA850_LCD_BL_PIN, 1);
232 373
233 return 0; 374 return 0;
234} 375}
235 376
236#define DA8XX_AEMIF_CE2CFG_OFFSET 0x10 377/* TPS65070 voltage regulator support */
237#define DA8XX_AEMIF_ASIZE_16BIT 0x1
238 378
239static void __init da850_evm_init_nor(void) 379/* 3.3V */
240{ 380struct regulator_consumer_supply tps65070_dcdc1_consumers[] = {
241 void __iomem *aemif_addr; 381 {
382 .supply = "usb0_vdda33",
383 },
384 {
385 .supply = "usb1_vdda33",
386 },
387};
242 388
243 aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K); 389/* 3.3V or 1.8V */
390struct regulator_consumer_supply tps65070_dcdc2_consumers[] = {
391 {
392 .supply = "dvdd3318_a",
393 },
394 {
395 .supply = "dvdd3318_b",
396 },
397 {
398 .supply = "dvdd3318_c",
399 },
400};
244 401
245 /* Configure data bus width of CS2 to 16 bit */ 402/* 1.2V */
246 writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) | 403struct regulator_consumer_supply tps65070_dcdc3_consumers[] = {
247 DA8XX_AEMIF_ASIZE_16BIT, 404 {
248 aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET); 405 .supply = "cvdd",
406 },
407};
249 408
250 iounmap(aemif_addr); 409/* 1.8V LDO */
251} 410struct regulator_consumer_supply tps65070_ldo1_consumers[] = {
411 {
412 .supply = "sata_vddr",
413 },
414 {
415 .supply = "usb0_vdda18",
416 },
417 {
418 .supply = "usb1_vdda18",
419 },
420 {
421 .supply = "ddr_dvdd18",
422 },
423};
252 424
253#if defined(CONFIG_MTD_PHYSMAP) || \ 425/* 1.2V LDO */
254 defined(CONFIG_MTD_PHYSMAP_MODULE) 426struct regulator_consumer_supply tps65070_ldo2_consumers[] = {
255#define HAS_NOR 1 427 {
256#else 428 .supply = "sata_vdd",
257#define HAS_NOR 0 429 },
258#endif 430 {
431 .supply = "pll0_vdda",
432 },
433 {
434 .supply = "pll1_vdda",
435 },
436 {
437 .supply = "usbs_cvdd",
438 },
439 {
440 .supply = "vddarnwa1",
441 },
442};
259 443
260#if defined(CONFIG_MMC_DAVINCI) || \ 444struct regulator_init_data tps65070_regulator_data[] = {
261 defined(CONFIG_MMC_DAVINCI_MODULE) 445 /* dcdc1 */
262#define HAS_MMC 1 446 {
263#else 447 .constraints = {
264#define HAS_MMC 0 448 .min_uV = 3150000,
265#endif 449 .max_uV = 3450000,
450 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
451 REGULATOR_CHANGE_STATUS),
452 .boot_on = 1,
453 },
454 .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc1_consumers),
455 .consumer_supplies = tps65070_dcdc1_consumers,
456 },
266 457
267static __init void da850_evm_init(void) 458 /* dcdc2 */
459 {
460 .constraints = {
461 .min_uV = 1710000,
462 .max_uV = 3450000,
463 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
464 REGULATOR_CHANGE_STATUS),
465 .boot_on = 1,
466 },
467 .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers),
468 .consumer_supplies = tps65070_dcdc2_consumers,
469 },
470
471 /* dcdc3 */
472 {
473 .constraints = {
474 .min_uV = 950000,
475 .max_uV = 1320000,
476 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
477 REGULATOR_CHANGE_STATUS),
478 .boot_on = 1,
479 },
480 .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers),
481 .consumer_supplies = tps65070_dcdc3_consumers,
482 },
483
484 /* ldo1 */
485 {
486 .constraints = {
487 .min_uV = 1710000,
488 .max_uV = 1890000,
489 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
490 REGULATOR_CHANGE_STATUS),
491 .boot_on = 1,
492 },
493 .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo1_consumers),
494 .consumer_supplies = tps65070_ldo1_consumers,
495 },
496
497 /* ldo2 */
498 {
499 .constraints = {
500 .min_uV = 1140000,
501 .max_uV = 1320000,
502 .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
503 REGULATOR_CHANGE_STATUS),
504 .boot_on = 1,
505 },
506 .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo2_consumers),
507 .consumer_supplies = tps65070_ldo2_consumers,
508 },
509};
510
511static struct i2c_board_info __initdata da850evm_tps65070_info[] = {
512 {
513 I2C_BOARD_INFO("tps6507x", 0x48),
514 .platform_data = &tps65070_regulator_data[0],
515 },
516};
517
518static int __init pmic_tps65070_init(void)
268{ 519{
269 struct davinci_soc_info *soc_info = &davinci_soc_info; 520 return i2c_register_board_info(1, da850evm_tps65070_info,
521 ARRAY_SIZE(da850evm_tps65070_info));
522}
523
524static const short da850_evm_lcdc_pins[] = {
525 DA850_GPIO2_8, DA850_GPIO2_15,
526 -1
527};
528
529static int __init da850_evm_config_emac(void)
530{
531 void __iomem *cfg_chip3_base;
270 int ret; 532 int ret;
533 u32 val;
534 struct davinci_soc_info *soc_info = &davinci_soc_info;
535 u8 rmii_en = soc_info->emac_pdata->rmii_en;
536
537 if (!machine_is_davinci_da850_evm())
538 return 0;
539
540 cfg_chip3_base = DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP3_REG);
541
542 val = __raw_readl(cfg_chip3_base);
543
544 if (rmii_en) {
545 val |= BIT(8);
546 ret = da8xx_pinmux_setup(da850_rmii_pins);
547 pr_info("EMAC: RMII PHY configured, MII PHY will not be"
548 " functional\n");
549 } else {
550 val &= ~BIT(8);
551 ret = da8xx_pinmux_setup(da850_cpgmac_pins);
552 pr_info("EMAC: MII PHY configured, RMII PHY will not be"
553 " functional\n");
554 }
271 555
272 ret = da8xx_pinmux_setup(da850_nand_pins);
273 if (ret) 556 if (ret)
274 pr_warning("da850_evm_init: nand mux setup failed: %d\n", 557 pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
275 ret); 558 ret);
276 559
277 ret = da8xx_pinmux_setup(da850_nor_pins); 560 /* configure the CFGCHIP3 register for RMII or MII */
561 __raw_writel(val, cfg_chip3_base);
562
563 ret = davinci_cfg_reg(DA850_GPIO2_6);
278 if (ret) 564 if (ret)
279 pr_warning("da850_evm_init: nor mux setup failed: %d\n", 565 pr_warning("da850_evm_init:GPIO(2,6) mux setup "
566 "failed\n");
567
568 ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
569 if (ret) {
570 pr_warning("Cannot open GPIO %d\n",
571 DA850_MII_MDIO_CLKEN_PIN);
572 return ret;
573 }
574
575 /* Enable/Disable MII MDIO clock */
576 gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
577
578 soc_info->emac_pdata->phy_mask = DA850_EVM_PHY_MASK;
579 soc_info->emac_pdata->mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
580
581 ret = da8xx_register_emac();
582 if (ret)
583 pr_warning("da850_evm_init: emac registration failed: %d\n",
280 ret); 584 ret);
281 585
282 da850_evm_init_nor(); 586 return 0;
587}
588device_initcall(da850_evm_config_emac);
283 589
284 platform_add_devices(da850_evm_devices, 590static __init void da850_evm_init(void)
285 ARRAY_SIZE(da850_evm_devices)); 591{
592 int ret;
593
594 ret = pmic_tps65070_init();
595 if (ret)
596 pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
597 ret);
286 598
287 ret = da8xx_register_edma(); 599 ret = da8xx_register_edma();
288 if (ret) 600 if (ret)
@@ -299,19 +611,6 @@ static __init void da850_evm_init(void)
299 pr_warning("da850_evm_init: i2c0 registration failed: %d\n", 611 pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
300 ret); 612 ret);
301 613
302 soc_info->emac_pdata->phy_mask = DA850_EVM_PHY_MASK;
303 soc_info->emac_pdata->mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
304 soc_info->emac_pdata->rmii_en = 0;
305
306 ret = da8xx_pinmux_setup(da850_cpgmac_pins);
307 if (ret)
308 pr_warning("da850_evm_init: cpgmac mux setup failed: %d\n",
309 ret);
310
311 ret = da8xx_register_emac();
312 if (ret)
313 pr_warning("da850_evm_init: emac registration failed: %d\n",
314 ret);
315 614
316 ret = da8xx_register_watchdog(); 615 ret = da8xx_register_watchdog();
317 if (ret) 616 if (ret)
@@ -319,11 +618,6 @@ static __init void da850_evm_init(void)
319 ret); 618 ret);
320 619
321 if (HAS_MMC) { 620 if (HAS_MMC) {
322 if (HAS_NOR)
323 pr_warning("WARNING: both NOR Flash and MMC/SD are "
324 "enabled, but they share AEMIF pins.\n"
325 "\tDisable one of them.\n");
326
327 ret = da8xx_pinmux_setup(da850_mmcsd0_pins); 621 ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
328 if (ret) 622 if (ret)
329 pr_warning("da850_evm_init: mmcsd0 mux setup failed:" 623 pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
@@ -365,22 +659,43 @@ static __init void da850_evm_init(void)
365 pr_warning("da850_evm_init: mcasp mux setup failed: %d\n", 659 pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
366 ret); 660 ret);
367 661
368 da8xx_init_mcasp(0, &da850_evm_snd_data); 662 da8xx_register_mcasp(0, &da850_evm_snd_data);
369 663
370 ret = da8xx_pinmux_setup(da850_lcdcntl_pins); 664 ret = da8xx_pinmux_setup(da850_lcdcntl_pins);
371 if (ret) 665 if (ret)
372 pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n", 666 pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
373 ret); 667 ret);
374 668
669 /* Handle board specific muxing for LCD here */
670 ret = da8xx_pinmux_setup(da850_evm_lcdc_pins);
671 if (ret)
672 pr_warning("da850_evm_init: evm specific lcd mux setup "
673 "failed: %d\n", ret);
674
375 ret = da850_lcd_hw_init(); 675 ret = da850_lcd_hw_init();
376 if (ret) 676 if (ret)
377 pr_warning("da850_evm_init: lcd initialization failed: %d\n", 677 pr_warning("da850_evm_init: lcd initialization failed: %d\n",
378 ret); 678 ret);
379 679
380 ret = da8xx_register_lcdc(); 680 sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl,
681 ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
381 if (ret) 682 if (ret)
382 pr_warning("da850_evm_init: lcdc registration failed: %d\n", 683 pr_warning("da850_evm_init: lcdc registration failed: %d\n",
383 ret); 684 ret);
685
686 ret = da8xx_register_rtc();
687 if (ret)
688 pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
689
690 ret = da850_register_cpufreq();
691 if (ret)
692 pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
693 ret);
694
695 ret = da8xx_register_cpuidle();
696 if (ret)
697 pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
698 ret);
384} 699}
385 700
386#ifdef CONFIG_SERIAL_8250_CONSOLE 701#ifdef CONFIG_SERIAL_8250_CONSOLE
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 77e806798822..a9b650dcc172 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -9,15 +9,13 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/dma-mapping.h> 13#include <linux/err.h>
15#include <linux/platform_device.h> 14#include <linux/platform_device.h>
16#include <linux/mtd/mtd.h> 15#include <linux/mtd/mtd.h>
17#include <linux/mtd/partitions.h> 16#include <linux/mtd/partitions.h>
18#include <linux/mtd/nand.h> 17#include <linux/mtd/nand.h>
19#include <linux/i2c.h> 18#include <linux/i2c.h>
20#include <linux/io.h>
21#include <linux/gpio.h> 19#include <linux/gpio.h>
22#include <linux/clk.h> 20#include <linux/clk.h>
23#include <linux/videodev2.h> 21#include <linux/videodev2.h>
@@ -25,20 +23,15 @@
25#include <linux/spi/spi.h> 23#include <linux/spi/spi.h>
26#include <linux/spi/eeprom.h> 24#include <linux/spi/eeprom.h>
27 25
28#include <asm/setup.h>
29#include <asm/mach-types.h> 26#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
31#include <asm/mach/map.h>
32#include <asm/mach/flash.h>
33 28
34#include <mach/hardware.h>
35#include <mach/dm355.h> 29#include <mach/dm355.h>
36#include <mach/psc.h>
37#include <mach/common.h>
38#include <mach/i2c.h> 30#include <mach/i2c.h>
39#include <mach/serial.h> 31#include <mach/serial.h>
40#include <mach/nand.h> 32#include <mach/nand.h>
41#include <mach/mmc.h> 33#include <mach/mmc.h>
34#include <mach/usb.h>
42 35
43#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 36#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
44#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 37#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -86,8 +79,9 @@ static struct davinci_nand_pdata davinci_nand_data = {
86 .mask_chipsel = BIT(14), 79 .mask_chipsel = BIT(14),
87 .parts = davinci_nand_partitions, 80 .parts = davinci_nand_partitions,
88 .nr_parts = ARRAY_SIZE(davinci_nand_partitions), 81 .nr_parts = ARRAY_SIZE(davinci_nand_partitions),
89 .ecc_mode = NAND_ECC_HW_SYNDROME, 82 .ecc_mode = NAND_ECC_HW,
90 .options = NAND_USE_FLASH_BBT, 83 .options = NAND_USE_FLASH_BBT,
84 .ecc_bits = 4,
91}; 85};
92 86
93static struct resource davinci_nand_resources[] = { 87static struct resource davinci_nand_resources[] = {
@@ -344,7 +338,7 @@ static __init void dm355_evm_init(void)
344 gpio_request(2, "usb_id_toggle"); 338 gpio_request(2, "usb_id_toggle");
345 gpio_direction_output(2, USB_ID_VALUE); 339 gpio_direction_output(2, USB_ID_VALUE);
346 /* irlml6401 switches over 1A in under 8 msec */ 340 /* irlml6401 switches over 1A in under 8 msec */
347 setup_usb(500, 8); 341 davinci_setup_usb(1000, 8);
348 342
349 davinci_setup_mmc(0, &dm355evm_mmc_config); 343 davinci_setup_mmc(0, &dm355evm_mmc_config);
350 davinci_setup_mmc(1, &dm355evm_mmc_config); 344 davinci_setup_mmc(1, &dm355evm_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index 84ad5d161a87..21f32eb41e8c 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -8,34 +8,27 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/dma-mapping.h> 12#include <linux/err.h>
14#include <linux/platform_device.h> 13#include <linux/platform_device.h>
15#include <linux/mtd/mtd.h> 14#include <linux/mtd/mtd.h>
16#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
17#include <linux/mtd/nand.h> 16#include <linux/mtd/nand.h>
18#include <linux/i2c.h> 17#include <linux/i2c.h>
19#include <linux/io.h>
20#include <linux/gpio.h> 18#include <linux/gpio.h>
21#include <linux/clk.h> 19#include <linux/clk.h>
22#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
23#include <linux/spi/eeprom.h> 21#include <linux/spi/eeprom.h>
24 22
25#include <asm/setup.h>
26#include <asm/mach-types.h> 23#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/flash.h>
30 25
31#include <mach/hardware.h>
32#include <mach/dm355.h> 26#include <mach/dm355.h>
33#include <mach/psc.h>
34#include <mach/common.h>
35#include <mach/i2c.h> 27#include <mach/i2c.h>
36#include <mach/serial.h> 28#include <mach/serial.h>
37#include <mach/nand.h> 29#include <mach/nand.h>
38#include <mach/mmc.h> 30#include <mach/mmc.h>
31#include <mach/usb.h>
39 32
40#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 33#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
41#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 34#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -270,7 +263,7 @@ static __init void dm355_leopard_init(void)
270 gpio_request(2, "usb_id_toggle"); 263 gpio_request(2, "usb_id_toggle");
271 gpio_direction_output(2, USB_ID_VALUE); 264 gpio_direction_output(2, USB_ID_VALUE);
272 /* irlml6401 switches over 1A in under 8 msec */ 265 /* irlml6401 switches over 1A in under 8 msec */
273 setup_usb(500, 8); 266 davinci_setup_usb(1000, 8);
274 267
275 davinci_setup_mmc(0, &dm355leopard_mmc_config); 268 davinci_setup_mmc(0, &dm355leopard_mmc_config);
276 davinci_setup_mmc(1, &dm355leopard_mmc_config); 269 davinci_setup_mmc(1, &dm355leopard_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 52dd8046b305..289fe1b7d25a 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -13,9 +13,8 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 */ 14 */
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/dma-mapping.h> 17#include <linux/err.h>
19#include <linux/i2c.h> 18#include <linux/i2c.h>
20#include <linux/io.h> 19#include <linux/io.h>
21#include <linux/clk.h> 20#include <linux/clk.h>
@@ -24,20 +23,19 @@
24#include <linux/mtd/mtd.h> 23#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
26#include <linux/mtd/nand.h> 25#include <linux/mtd/nand.h>
27#include <asm/setup.h> 26#include <linux/input.h>
27
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/map.h> 30
31#include <mach/mux.h> 31#include <mach/mux.h>
32#include <mach/hardware.h>
33#include <mach/dm365.h> 32#include <mach/dm365.h>
34#include <mach/psc.h>
35#include <mach/common.h> 33#include <mach/common.h>
36#include <mach/i2c.h> 34#include <mach/i2c.h>
37#include <mach/serial.h> 35#include <mach/serial.h>
38#include <mach/mmc.h> 36#include <mach/mmc.h>
39#include <mach/nand.h> 37#include <mach/nand.h>
40 38#include <mach/keyscan.h>
41 39
42static inline int have_imager(void) 40static inline int have_imager(void)
43{ 41{
@@ -144,6 +142,7 @@ static struct davinci_nand_pdata davinci_nand_data = {
144 .nr_parts = ARRAY_SIZE(davinci_nand_partitions), 142 .nr_parts = ARRAY_SIZE(davinci_nand_partitions),
145 .ecc_mode = NAND_ECC_HW, 143 .ecc_mode = NAND_ECC_HW,
146 .options = NAND_USE_FLASH_BBT, 144 .options = NAND_USE_FLASH_BBT,
145 .ecc_bits = 4,
147}; 146};
148 147
149static struct resource davinci_nand_resources[] = { 148static struct resource davinci_nand_resources[] = {
@@ -176,11 +175,16 @@ static struct at24_platform_data eeprom_info = {
176 .context = (void *)0x7f00, 175 .context = (void *)0x7f00,
177}; 176};
178 177
178static struct snd_platform_data dm365_evm_snd_data;
179
179static struct i2c_board_info i2c_info[] = { 180static struct i2c_board_info i2c_info[] = {
180 { 181 {
181 I2C_BOARD_INFO("24c256", 0x50), 182 I2C_BOARD_INFO("24c256", 0x50),
182 .platform_data = &eeprom_info, 183 .platform_data = &eeprom_info,
183 }, 184 },
185 {
186 I2C_BOARD_INFO("tlv320aic3x", 0x18),
187 },
184}; 188};
185 189
186static struct davinci_i2c_platform_data i2c_pdata = { 190static struct davinci_i2c_platform_data i2c_pdata = {
@@ -188,6 +192,38 @@ static struct davinci_i2c_platform_data i2c_pdata = {
188 .bus_delay = 0 /* usec */, 192 .bus_delay = 0 /* usec */,
189}; 193};
190 194
195#ifdef CONFIG_KEYBOARD_DAVINCI
196static unsigned short dm365evm_keymap[] = {
197 KEY_KP2,
198 KEY_LEFT,
199 KEY_EXIT,
200 KEY_DOWN,
201 KEY_ENTER,
202 KEY_UP,
203 KEY_KP1,
204 KEY_RIGHT,
205 KEY_MENU,
206 KEY_RECORD,
207 KEY_REWIND,
208 KEY_KPMINUS,
209 KEY_STOP,
210 KEY_FASTFORWARD,
211 KEY_KPPLUS,
212 KEY_PLAYPAUSE,
213 0
214};
215
216static struct davinci_ks_platform_data dm365evm_ks_data = {
217 .keymap = dm365evm_keymap,
218 .keymapsize = ARRAY_SIZE(dm365evm_keymap),
219 .rep = 1,
220 /* Scan period = strobe + interval */
221 .strobe = 0x5,
222 .interval = 0x2,
223 .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4,
224};
225#endif
226
191static int cpld_mmc_get_cd(int module) 227static int cpld_mmc_get_cd(int module)
192{ 228{
193 if (!cpld) 229 if (!cpld)
@@ -472,6 +508,13 @@ static __init void dm365_evm_init(void)
472 508
473 /* maybe setup mmc1/etc ... _after_ mmc0 */ 509 /* maybe setup mmc1/etc ... _after_ mmc0 */
474 evm_init_cpld(); 510 evm_init_cpld();
511
512 dm365_init_asp(&dm365_evm_snd_data);
513 dm365_init_rtc();
514
515#ifdef CONFIG_KEYBOARD_DAVINCI
516 dm365_init_ks(&dm365evm_ks_data);
517#endif
475} 518}
476 519
477static __init void dm365_evm_irq_init(void) 520static __init void dm365_evm_irq_init(void)
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 1213a0087ad4..fd0398bc6db3 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -9,45 +9,34 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/dma-mapping.h> 13#include <linux/dma-mapping.h>
15#include <linux/platform_device.h> 14#include <linux/platform_device.h>
16#include <linux/gpio.h> 15#include <linux/gpio.h>
17#include <linux/leds.h>
18#include <linux/memory.h>
19
20#include <linux/i2c.h> 16#include <linux/i2c.h>
21#include <linux/i2c/pcf857x.h> 17#include <linux/i2c/pcf857x.h>
22#include <linux/i2c/at24.h> 18#include <linux/i2c/at24.h>
23#include <linux/etherdevice.h>
24#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
25#include <linux/mtd/nand.h> 20#include <linux/mtd/nand.h>
26#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
27#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
28#include <linux/io.h>
29#include <linux/phy.h> 23#include <linux/phy.h>
30#include <linux/clk.h> 24#include <linux/clk.h>
31#include <linux/videodev2.h> 25#include <linux/videodev2.h>
32 26
33#include <media/tvp514x.h> 27#include <media/tvp514x.h>
34 28
35#include <asm/setup.h>
36#include <asm/mach-types.h> 29#include <asm/mach-types.h>
37
38#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40#include <asm/mach/flash.h>
41 31
42#include <mach/dm644x.h> 32#include <mach/dm644x.h>
43#include <mach/common.h> 33#include <mach/common.h>
44#include <mach/i2c.h> 34#include <mach/i2c.h>
45#include <mach/serial.h> 35#include <mach/serial.h>
46#include <mach/mux.h> 36#include <mach/mux.h>
47#include <mach/psc.h>
48#include <mach/nand.h> 37#include <mach/nand.h>
49#include <mach/mmc.h> 38#include <mach/mmc.h>
50#include <mach/emac.h> 39#include <mach/usb.h>
51 40
52#define DM644X_EVM_PHY_MASK (0x2) 41#define DM644X_EVM_PHY_MASK (0x2)
53#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 42#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
@@ -477,7 +466,7 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
477 /* irlml6401 switches over 1A, in under 8 msec; 466 /* irlml6401 switches over 1A, in under 8 msec;
478 * now it can be managed by nDRV_VBUS ... 467 * now it can be managed by nDRV_VBUS ...
479 */ 468 */
480 setup_usb(500, 8); 469 davinci_setup_usb(1000, 8);
481 470
482 return 0; 471 return 0;
483} 472}
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 24e0e13b1492..8d0b0e01c59b 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -17,38 +17,28 @@
17 **************************************************************************/ 17 **************************************************************************/
18 18
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/fs.h>
23#include <linux/major.h>
24#include <linux/root_dev.h>
25#include <linux/dma-mapping.h>
26#include <linux/serial.h>
27#include <linux/serial_8250.h>
28#include <linux/leds.h> 21#include <linux/leds.h>
29#include <linux/gpio.h> 22#include <linux/gpio.h>
30#include <linux/io.h>
31#include <linux/platform_device.h> 23#include <linux/platform_device.h>
32#include <linux/i2c.h> 24#include <linux/i2c.h>
33#include <linux/i2c/at24.h> 25#include <linux/i2c/at24.h>
34#include <linux/i2c/pcf857x.h> 26#include <linux/i2c/pcf857x.h>
35#include <linux/etherdevice.h>
36 27
37#include <media/tvp514x.h> 28#include <media/tvp514x.h>
38 29
39#include <asm/setup.h> 30#include <linux/mtd/mtd.h>
31#include <linux/mtd/nand.h>
32#include <linux/mtd/partitions.h>
33
40#include <asm/mach-types.h> 34#include <asm/mach-types.h>
41#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
42#include <asm/mach/map.h>
43#include <asm/mach/flash.h>
44 36
45#include <mach/dm646x.h> 37#include <mach/dm646x.h>
46#include <mach/common.h> 38#include <mach/common.h>
47#include <mach/psc.h>
48#include <mach/serial.h> 39#include <mach/serial.h>
49#include <mach/i2c.h> 40#include <mach/i2c.h>
50#include <mach/mmc.h> 41#include <mach/nand.h>
51#include <mach/emac.h>
52 42
53#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ 43#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
54 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE) 44 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
@@ -57,6 +47,11 @@
57#define HAS_ATA 0 47#define HAS_ATA 0
58#endif 48#endif
59 49
50#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x20008000
51#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x42000000
52
53#define NAND_BLOCK_SIZE SZ_128K
54
60/* CPLD Register 0 bits to control ATA */ 55/* CPLD Register 0 bits to control ATA */
61#define DM646X_EVM_ATA_RST BIT(0) 56#define DM646X_EVM_ATA_RST BIT(0)
62#define DM646X_EVM_ATA_PWD BIT(1) 57#define DM646X_EVM_ATA_PWD BIT(1)
@@ -92,6 +87,63 @@ static struct davinci_uart_config uart_config __initdata = {
92 .enabled_uarts = (1 << 0), 87 .enabled_uarts = (1 << 0),
93}; 88};
94 89
90/* Note: We are setting first partition as 'bootloader' constituting UBL, U-Boot
91 * and U-Boot environment this avoids dependency on any particular combination
92 * of UBL, U-Boot or flashing tools etc.
93 */
94static struct mtd_partition davinci_nand_partitions[] = {
95 {
96 /* UBL, U-Boot with environment */
97 .name = "bootloader",
98 .offset = MTDPART_OFS_APPEND,
99 .size = 16 * NAND_BLOCK_SIZE,
100 .mask_flags = MTD_WRITEABLE, /* force read-only */
101 }, {
102 .name = "kernel",
103 .offset = MTDPART_OFS_APPEND,
104 .size = SZ_4M,
105 .mask_flags = 0,
106 }, {
107 .name = "filesystem",
108 .offset = MTDPART_OFS_APPEND,
109 .size = MTDPART_SIZ_FULL,
110 .mask_flags = 0,
111 }
112};
113
114static struct davinci_nand_pdata davinci_nand_data = {
115 .mask_cle = 0x80000,
116 .mask_ale = 0x40000,
117 .parts = davinci_nand_partitions,
118 .nr_parts = ARRAY_SIZE(davinci_nand_partitions),
119 .ecc_mode = NAND_ECC_HW,
120 .options = 0,
121};
122
123static struct resource davinci_nand_resources[] = {
124 {
125 .start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
126 .end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
127 .flags = IORESOURCE_MEM,
128 }, {
129 .start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
130 .end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
131 .flags = IORESOURCE_MEM,
132 },
133};
134
135static struct platform_device davinci_nand_device = {
136 .name = "davinci_nand",
137 .id = 0,
138
139 .num_resources = ARRAY_SIZE(davinci_nand_resources),
140 .resource = davinci_nand_resources,
141
142 .dev = {
143 .platform_data = &davinci_nand_data,
144 },
145};
146
95/* CPLD Register 0 Client: used for I/O Control */ 147/* CPLD Register 0 Client: used for I/O Control */
96static int cpld_reg0_probe(struct i2c_client *client, 148static int cpld_reg0_probe(struct i2c_client *client,
97 const struct i2c_device_id *id) 149 const struct i2c_device_id *id)
@@ -142,7 +194,7 @@ static struct gpio_led evm_leds[] = {
142 { .name = "DS4", .active_low = 1, }, 194 { .name = "DS4", .active_low = 1, },
143}; 195};
144 196
145static __initconst struct gpio_led_platform_data evm_led_data = { 197static const struct gpio_led_platform_data evm_led_data = {
146 .num_leds = ARRAY_SIZE(evm_leds), 198 .num_leds = ARRAY_SIZE(evm_leds),
147 .leds = evm_leds, 199 .leds = evm_leds,
148}; 200};
@@ -647,6 +699,8 @@ static __init void evm_init(void)
647 dm646x_init_mcasp0(&dm646x_evm_snd_data[0]); 699 dm646x_init_mcasp0(&dm646x_evm_snd_data[0]);
648 dm646x_init_mcasp1(&dm646x_evm_snd_data[1]); 700 dm646x_init_mcasp1(&dm646x_evm_snd_data[1]);
649 701
702 platform_device_register(&davinci_nand_device);
703
650 if (HAS_ATA) 704 if (HAS_ATA)
651 dm646x_init_ide(); 705 dm646x_init_ide();
652 706
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
new file mode 100644
index 000000000000..bd9ca079b69d
--- /dev/null
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -0,0 +1,323 @@
1/*
2 * Neuros Technologies OSD2 board support
3 *
4 * Modified from original 644X-EVM board support.
5 * 2008 (c) Neuros Technology, LLC.
6 * 2009 (c) Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
7 * 2009 (c) Andrey A. Porodko <Andrey.Porodko@gmail.com>
8 *
9 * The Neuros OSD 2.0 is the hardware component of the Neuros Open
10 * Internet Television Platform. Hardware is very close to TI
11 * DM644X-EVM board. It has:
12 * DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC,
13 * USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video.
14 * Additionaly realtime clock, IR remote control receiver,
15 * IR Blaster based on MSP430 (firmware although is different
16 * from used in DM644X-EVM), internal ATA-6 3.5” HDD drive
17 * with PATA interface, two muxed red-green leds.
18 *
19 * For more information please refer to
20 * http://wiki.neurostechnology.com/index.php/OSD_2.0_HD
21 *
22 * This file is licensed under the terms of the GNU General Public
23 * License version 2. This program is licensed "as is" without any
24 * warranty of any kind, whether express or implied.
25 */
26#include <linux/platform_device.h>
27#include <linux/gpio.h>
28#include <linux/mtd/partitions.h>
29
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32
33#include <mach/dm644x.h>
34#include <mach/i2c.h>
35#include <mach/serial.h>
36#include <mach/mux.h>
37#include <mach/nand.h>
38#include <mach/mmc.h>
39#include <mach/usb.h>
40
41#define NEUROS_OSD2_PHY_MASK 0x2
42#define NEUROS_OSD2_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
43
44#define DAVINCI_CFC_ATA_BASE 0x01C66000
45
46#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e00000
47#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
48
49#define LXT971_PHY_ID 0x001378e2
50#define LXT971_PHY_MASK 0xfffffff0
51
52#define NTOSD2_AUDIOSOC_I2C_ADDR 0x18
53#define NTOSD2_MSP430_I2C_ADDR 0x59
54#define NTOSD2_MSP430_IRQ 2
55
56/* Neuros OSD2 has a Samsung 256 MByte NAND flash (Dev ID of 0xAA,
57 * 2048 blocks in the device, 64 pages per block, 2048 bytes per
58 * page.
59 */
60
61#define NAND_BLOCK_SIZE SZ_128K
62
63struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
64 {
65 /* UBL (a few copies) plus U-Boot */
66 .name = "bootloader",
67 .offset = 0,
68 .size = 15 * NAND_BLOCK_SIZE,
69 .mask_flags = MTD_WRITEABLE, /* force read-only */
70 }, {
71 /* U-Boot environment */
72 .name = "params",
73 .offset = MTDPART_OFS_APPEND,
74 .size = 1 * NAND_BLOCK_SIZE,
75 .mask_flags = 0,
76 }, {
77 /* Kernel */
78 .name = "kernel",
79 .offset = MTDPART_OFS_APPEND,
80 .size = SZ_4M,
81 .mask_flags = 0,
82 }, {
83 /* File System */
84 .name = "filesystem",
85 .offset = MTDPART_OFS_APPEND,
86 .size = MTDPART_SIZ_FULL,
87 .mask_flags = 0,
88 }
89 /* A few blocks at end hold a flash Bad Block Table. */
90};
91
92static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = {
93 .parts = davinci_ntosd2_nandflash_partition,
94 .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition),
95 .ecc_mode = NAND_ECC_HW,
96 .options = NAND_USE_FLASH_BBT,
97};
98
99static struct resource davinci_ntosd2_nandflash_resource[] = {
100 {
101 .start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
102 .end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
103 .flags = IORESOURCE_MEM,
104 }, {
105 .start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
106 .end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
107 .flags = IORESOURCE_MEM,
108 },
109};
110
111static struct platform_device davinci_ntosd2_nandflash_device = {
112 .name = "davinci_nand",
113 .id = 0,
114 .dev = {
115 .platform_data = &davinci_ntosd2_nandflash_data,
116 },
117 .num_resources = ARRAY_SIZE(davinci_ntosd2_nandflash_resource),
118 .resource = davinci_ntosd2_nandflash_resource,
119};
120
121static u64 davinci_fb_dma_mask = DMA_BIT_MASK(32);
122
123static struct platform_device davinci_fb_device = {
124 .name = "davincifb",
125 .id = -1,
126 .dev = {
127 .dma_mask = &davinci_fb_dma_mask,
128 .coherent_dma_mask = DMA_BIT_MASK(32),
129 },
130 .num_resources = 0,
131};
132
133static struct resource ide_resources[] = {
134 {
135 .start = DAVINCI_CFC_ATA_BASE,
136 .end = DAVINCI_CFC_ATA_BASE + 0x7ff,
137 .flags = IORESOURCE_MEM,
138 },
139 {
140 .start = IRQ_IDE,
141 .end = IRQ_IDE,
142 .flags = IORESOURCE_IRQ,
143 },
144};
145
146static u64 ide_dma_mask = DMA_BIT_MASK(32);
147
148static struct platform_device ide_dev = {
149 .name = "palm_bk3710",
150 .id = -1,
151 .resource = ide_resources,
152 .num_resources = ARRAY_SIZE(ide_resources),
153 .dev = {
154 .dma_mask = &ide_dma_mask,
155 .coherent_dma_mask = DMA_BIT_MASK(32),
156 },
157};
158
159static struct snd_platform_data dm644x_ntosd2_snd_data;
160
161static struct gpio_led ntosd2_leds[] = {
162 { .name = "led1_green", .gpio = GPIO(10), },
163 { .name = "led1_red", .gpio = GPIO(11), },
164 { .name = "led2_green", .gpio = GPIO(12), },
165 { .name = "led2_red", .gpio = GPIO(13), },
166};
167
168static struct gpio_led_platform_data ntosd2_leds_data = {
169 .num_leds = ARRAY_SIZE(ntosd2_leds),
170 .leds = ntosd2_leds,
171};
172
173static struct platform_device ntosd2_leds_dev = {
174 .name = "leds-gpio",
175 .id = -1,
176 .dev = {
177 .platform_data = &ntosd2_leds_data,
178 },
179};
180
181
182static struct platform_device *davinci_ntosd2_devices[] __initdata = {
183 &davinci_fb_device,
184 &ntosd2_leds_dev,
185};
186
187static struct davinci_uart_config uart_config __initdata = {
188 .enabled_uarts = (1 << 0),
189};
190
191static void __init davinci_ntosd2_map_io(void)
192{
193 dm644x_init();
194}
195
196/*
197 I2C initialization
198*/
199static struct davinci_i2c_platform_data ntosd2_i2c_pdata = {
200 .bus_freq = 20 /* kHz */,
201 .bus_delay = 100 /* usec */,
202};
203
204static struct i2c_board_info __initdata ntosd2_i2c_info[] = {
205};
206
207static int ntosd2_init_i2c(void)
208{
209 int status;
210
211 davinci_init_i2c(&ntosd2_i2c_pdata);
212 status = gpio_request(NTOSD2_MSP430_IRQ, ntosd2_i2c_info[0].type);
213 if (status == 0) {
214 status = gpio_direction_input(NTOSD2_MSP430_IRQ);
215 if (status == 0) {
216 status = gpio_to_irq(NTOSD2_MSP430_IRQ);
217 if (status > 0) {
218 ntosd2_i2c_info[0].irq = status;
219 i2c_register_board_info(1,
220 ntosd2_i2c_info,
221 ARRAY_SIZE(ntosd2_i2c_info));
222 }
223 }
224 }
225 return status;
226}
227
228static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
229 .wires = 4,
230 .version = MMC_CTLR_VERSION_1
231};
232
233
234#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
235 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
236#define HAS_ATA 1
237#else
238#define HAS_ATA 0
239#endif
240
241#if defined(CONFIG_MTD_NAND_DAVINCI) || \
242 defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
243#define HAS_NAND 1
244#else
245#define HAS_NAND 0
246#endif
247
248static __init void davinci_ntosd2_init(void)
249{
250 struct clk *aemif_clk;
251 struct davinci_soc_info *soc_info = &davinci_soc_info;
252 int status;
253
254 aemif_clk = clk_get(NULL, "aemif");
255 clk_enable(aemif_clk);
256
257 if (HAS_ATA) {
258 if (HAS_NAND)
259 pr_warning("WARNING: both IDE and Flash are "
260 "enabled, but they share AEMIF pins.\n"
261 "\tDisable IDE for NAND/NOR support.\n");
262 davinci_cfg_reg(DM644X_HPIEN_DISABLE);
263 davinci_cfg_reg(DM644X_ATAEN);
264 davinci_cfg_reg(DM644X_HDIREN);
265 platform_device_register(&ide_dev);
266 } else if (HAS_NAND) {
267 davinci_cfg_reg(DM644X_HPIEN_DISABLE);
268 davinci_cfg_reg(DM644X_ATAEN_DISABLE);
269
270 /* only one device will be jumpered and detected */
271 if (HAS_NAND)
272 platform_device_register(
273 &davinci_ntosd2_nandflash_device);
274 }
275
276 platform_add_devices(davinci_ntosd2_devices,
277 ARRAY_SIZE(davinci_ntosd2_devices));
278
279 /* Initialize I2C interface specific for this board */
280 status = ntosd2_init_i2c();
281 if (status < 0)
282 pr_warning("davinci_ntosd2_init: msp430 irq setup failed:"
283 " %d\n", status);
284
285 davinci_serial_init(&uart_config);
286 dm644x_init_asp(&dm644x_ntosd2_snd_data);
287
288 soc_info->emac_pdata->phy_mask = NEUROS_OSD2_PHY_MASK;
289 soc_info->emac_pdata->mdio_max_freq = NEUROS_OSD2_MDIO_FREQUENCY;
290
291 davinci_setup_usb(1000, 8);
292 /*
293 * Mux the pins to be GPIOs, VLYNQEN is already done at startup.
294 * The AEAWx are five new AEAW pins that can be muxed by separately.
295 * They are a bitmask for GPIO management. According TI
296 * documentation (http://www.ti.com/lit/gpn/tms320dm6446) to employ
297 * gpio(10,11,12,13) for leds any combination of bits works except
298 * four last. So we are to reset all five.
299 */
300 davinci_cfg_reg(DM644X_AEAW0);
301 davinci_cfg_reg(DM644X_AEAW1);
302 davinci_cfg_reg(DM644X_AEAW2);
303 davinci_cfg_reg(DM644X_AEAW3);
304 davinci_cfg_reg(DM644X_AEAW4);
305
306 davinci_setup_mmc(0, &davinci_ntosd2_mmc_config);
307}
308
309static __init void davinci_ntosd2_irq_init(void)
310{
311 davinci_irq_init();
312}
313
314MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
315 /* Maintainer: Neuros Technologies <neuros@groups.google.com> */
316 .phys_io = IO_PHYS,
317 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
318 .boot_params = (DAVINCI_DDR_BASE + 0x100),
319 .map_io = davinci_ntosd2_map_io,
320 .init_irq = davinci_ntosd2_irq_init,
321 .timer = &davinci_timer,
322 .init_machine = davinci_ntosd2_init,
323MACHINE_END
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 7acdfd8ac071..08d373bfcc8a 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -23,35 +23,24 @@
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */ 24 */
25 25
26#include <linux/kernel.h>
27#include <linux/module.h>
28#include <linux/init.h> 26#include <linux/init.h>
29#include <linux/dma-mapping.h>
30#include <linux/platform_device.h> 27#include <linux/platform_device.h>
31#include <linux/gpio.h>
32
33#include <linux/i2c.h> 28#include <linux/i2c.h>
34#include <linux/i2c/at24.h> 29#include <linux/i2c/at24.h>
35#include <linux/etherdevice.h>
36#include <linux/mtd/mtd.h> 30#include <linux/mtd/mtd.h>
37#include <linux/mtd/nand.h> 31#include <linux/mtd/nand.h>
38#include <linux/mtd/partitions.h> 32#include <linux/mtd/partitions.h>
39#include <linux/mtd/physmap.h>
40#include <linux/io.h>
41 33
42#include <asm/setup.h>
43#include <asm/mach-types.h> 34#include <asm/mach-types.h>
44
45#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
46#include <asm/mach/map.h>
47#include <asm/mach/flash.h> 36#include <asm/mach/flash.h>
48 37
49#include <mach/dm644x.h> 38#include <mach/dm644x.h>
50#include <mach/common.h> 39#include <mach/common.h>
51#include <mach/i2c.h> 40#include <mach/i2c.h>
52#include <mach/serial.h> 41#include <mach/serial.h>
53#include <mach/psc.h>
54#include <mach/mux.h> 42#include <mach/mux.h>
43#include <mach/usb.h>
55 44
56#define SFFSDR_PHY_MASK (0x2) 45#define SFFSDR_PHY_MASK (0x2)
57#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 46#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
@@ -107,11 +96,6 @@ static struct platform_device davinci_sffsdr_nandflash_device = {
107 .resource = davinci_sffsdr_nandflash_resource, 96 .resource = davinci_sffsdr_nandflash_resource,
108}; 97};
109 98
110static struct emac_platform_data sffsdr_emac_pdata = {
111 .phy_mask = SFFSDR_PHY_MASK,
112 .mdio_max_freq = SFFSDR_MDIO_FREQUENCY,
113};
114
115static struct at24_platform_data eeprom_info = { 99static struct at24_platform_data eeprom_info = {
116 .byte_len = (64*1024) / 8, 100 .byte_len = (64*1024) / 8,
117 .page_size = 32, 101 .page_size = 32,
@@ -164,7 +148,7 @@ static __init void davinci_sffsdr_init(void)
164 davinci_serial_init(&uart_config); 148 davinci_serial_init(&uart_config);
165 soc_info->emac_pdata->phy_mask = SFFSDR_PHY_MASK; 149 soc_info->emac_pdata->phy_mask = SFFSDR_PHY_MASK;
166 soc_info->emac_pdata->mdio_max_freq = SFFSDR_MDIO_FREQUENCY; 150 soc_info->emac_pdata->mdio_max_freq = SFFSDR_MDIO_FREQUENCY;
167 setup_usb(0, 0); /* We support only peripheral mode. */ 151 davinci_setup_usb(0, 0); /* We support only peripheral mode. */
168 152
169 /* mux VLYNQ pins */ 153 /* mux VLYNQ pins */
170 davinci_cfg_reg(DM644X_VLYNQEN); 154 davinci_cfg_reg(DM644X_VLYNQEN);
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 83d54d50b5ea..baece65cb9c0 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -17,8 +17,8 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/mutex.h> 19#include <linux/mutex.h>
20#include <linux/platform_device.h>
21#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/delay.h>
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24 24
@@ -42,8 +42,7 @@ static void __clk_enable(struct clk *clk)
42 if (clk->parent) 42 if (clk->parent)
43 __clk_enable(clk->parent); 43 __clk_enable(clk->parent);
44 if (clk->usecount++ == 0 && (clk->flags & CLK_PSC)) 44 if (clk->usecount++ == 0 && (clk->flags & CLK_PSC))
45 davinci_psc_config(psc_domain(clk), clk->psc_ctlr, 45 davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 1);
46 clk->lpsc, 1);
47} 46}
48 47
49static void __clk_disable(struct clk *clk) 48static void __clk_disable(struct clk *clk)
@@ -51,8 +50,7 @@ static void __clk_disable(struct clk *clk)
51 if (WARN_ON(clk->usecount == 0)) 50 if (WARN_ON(clk->usecount == 0))
52 return; 51 return;
53 if (--clk->usecount == 0 && !(clk->flags & CLK_PLL)) 52 if (--clk->usecount == 0 && !(clk->flags & CLK_PLL))
54 davinci_psc_config(psc_domain(clk), clk->psc_ctlr, 53 davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 0);
55 clk->lpsc, 0);
56 if (clk->parent) 54 if (clk->parent)
57 __clk_disable(clk->parent); 55 __clk_disable(clk->parent);
58} 56}
@@ -99,20 +97,74 @@ long clk_round_rate(struct clk *clk, unsigned long rate)
99 if (clk == NULL || IS_ERR(clk)) 97 if (clk == NULL || IS_ERR(clk))
100 return -EINVAL; 98 return -EINVAL;
101 99
100 if (clk->round_rate)
101 return clk->round_rate(clk, rate);
102
102 return clk->rate; 103 return clk->rate;
103} 104}
104EXPORT_SYMBOL(clk_round_rate); 105EXPORT_SYMBOL(clk_round_rate);
105 106
107/* Propagate rate to children */
108static void propagate_rate(struct clk *root)
109{
110 struct clk *clk;
111
112 list_for_each_entry(clk, &root->children, childnode) {
113 if (clk->recalc)
114 clk->rate = clk->recalc(clk);
115 propagate_rate(clk);
116 }
117}
118
106int clk_set_rate(struct clk *clk, unsigned long rate) 119int clk_set_rate(struct clk *clk, unsigned long rate)
107{ 120{
121 unsigned long flags;
122 int ret = -EINVAL;
123
108 if (clk == NULL || IS_ERR(clk)) 124 if (clk == NULL || IS_ERR(clk))
109 return -EINVAL; 125 return ret;
110 126
111 /* changing the clk rate is not supported */ 127 spin_lock_irqsave(&clockfw_lock, flags);
112 return -EINVAL; 128 if (clk->set_rate)
129 ret = clk->set_rate(clk, rate);
130 if (ret == 0) {
131 if (clk->recalc)
132 clk->rate = clk->recalc(clk);
133 propagate_rate(clk);
134 }
135 spin_unlock_irqrestore(&clockfw_lock, flags);
136
137 return ret;
113} 138}
114EXPORT_SYMBOL(clk_set_rate); 139EXPORT_SYMBOL(clk_set_rate);
115 140
141int clk_set_parent(struct clk *clk, struct clk *parent)
142{
143 unsigned long flags;
144
145 if (clk == NULL || IS_ERR(clk))
146 return -EINVAL;
147
148 /* Cannot change parent on enabled clock */
149 if (WARN_ON(clk->usecount))
150 return -EINVAL;
151
152 mutex_lock(&clocks_mutex);
153 clk->parent = parent;
154 list_del_init(&clk->childnode);
155 list_add(&clk->childnode, &clk->parent->children);
156 mutex_unlock(&clocks_mutex);
157
158 spin_lock_irqsave(&clockfw_lock, flags);
159 if (clk->recalc)
160 clk->rate = clk->recalc(clk);
161 propagate_rate(clk);
162 spin_unlock_irqrestore(&clockfw_lock, flags);
163
164 return 0;
165}
166EXPORT_SYMBOL(clk_set_parent);
167
116int clk_register(struct clk *clk) 168int clk_register(struct clk *clk)
117{ 169{
118 if (clk == NULL || IS_ERR(clk)) 170 if (clk == NULL || IS_ERR(clk))
@@ -123,16 +175,24 @@ int clk_register(struct clk *clk)
123 clk->name, clk->parent->name)) 175 clk->name, clk->parent->name))
124 return -EINVAL; 176 return -EINVAL;
125 177
178 INIT_LIST_HEAD(&clk->children);
179
126 mutex_lock(&clocks_mutex); 180 mutex_lock(&clocks_mutex);
127 list_add_tail(&clk->node, &clocks); 181 list_add_tail(&clk->node, &clocks);
182 if (clk->parent)
183 list_add_tail(&clk->childnode, &clk->parent->children);
128 mutex_unlock(&clocks_mutex); 184 mutex_unlock(&clocks_mutex);
129 185
130 /* If rate is already set, use it */ 186 /* If rate is already set, use it */
131 if (clk->rate) 187 if (clk->rate)
132 return 0; 188 return 0;
133 189
190 /* Else, see if there is a way to calculate it */
191 if (clk->recalc)
192 clk->rate = clk->recalc(clk);
193
134 /* Otherwise, default to parent rate */ 194 /* Otherwise, default to parent rate */
135 if (clk->parent) 195 else if (clk->parent)
136 clk->rate = clk->parent->rate; 196 clk->rate = clk->parent->rate;
137 197
138 return 0; 198 return 0;
@@ -146,6 +206,7 @@ void clk_unregister(struct clk *clk)
146 206
147 mutex_lock(&clocks_mutex); 207 mutex_lock(&clocks_mutex);
148 list_del(&clk->node); 208 list_del(&clk->node);
209 list_del(&clk->childnode);
149 mutex_unlock(&clocks_mutex); 210 mutex_unlock(&clocks_mutex);
150} 211}
151EXPORT_SYMBOL(clk_unregister); 212EXPORT_SYMBOL(clk_unregister);
@@ -166,11 +227,11 @@ static int __init clk_disable_unused(void)
166 continue; 227 continue;
167 228
168 /* ignore if in Disabled or SwRstDisable states */ 229 /* ignore if in Disabled or SwRstDisable states */
169 if (!davinci_psc_is_clk_active(ck->psc_ctlr, ck->lpsc)) 230 if (!davinci_psc_is_clk_active(ck->gpsc, ck->lpsc))
170 continue; 231 continue;
171 232
172 pr_info("Clocks: disable unused %s\n", ck->name); 233 pr_info("Clocks: disable unused %s\n", ck->name);
173 davinci_psc_config(psc_domain(ck), ck->psc_ctlr, ck->lpsc, 0); 234 davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc, 0);
174 } 235 }
175 spin_unlock_irq(&clockfw_lock); 236 spin_unlock_irq(&clockfw_lock);
176 237
@@ -179,50 +240,62 @@ static int __init clk_disable_unused(void)
179late_initcall(clk_disable_unused); 240late_initcall(clk_disable_unused);
180#endif 241#endif
181 242
182static void clk_sysclk_recalc(struct clk *clk) 243static unsigned long clk_sysclk_recalc(struct clk *clk)
183{ 244{
184 u32 v, plldiv; 245 u32 v, plldiv;
185 struct pll_data *pll; 246 struct pll_data *pll;
247 unsigned long rate = clk->rate;
186 248
187 /* If this is the PLL base clock, no more calculations needed */ 249 /* If this is the PLL base clock, no more calculations needed */
188 if (clk->pll_data) 250 if (clk->pll_data)
189 return; 251 return rate;
190 252
191 if (WARN_ON(!clk->parent)) 253 if (WARN_ON(!clk->parent))
192 return; 254 return rate;
193 255
194 clk->rate = clk->parent->rate; 256 rate = clk->parent->rate;
195 257
196 /* Otherwise, the parent must be a PLL */ 258 /* Otherwise, the parent must be a PLL */
197 if (WARN_ON(!clk->parent->pll_data)) 259 if (WARN_ON(!clk->parent->pll_data))
198 return; 260 return rate;
199 261
200 pll = clk->parent->pll_data; 262 pll = clk->parent->pll_data;
201 263
202 /* If pre-PLL, source clock is before the multiplier and divider(s) */ 264 /* If pre-PLL, source clock is before the multiplier and divider(s) */
203 if (clk->flags & PRE_PLL) 265 if (clk->flags & PRE_PLL)
204 clk->rate = pll->input_rate; 266 rate = pll->input_rate;
205 267
206 if (!clk->div_reg) 268 if (!clk->div_reg)
207 return; 269 return rate;
208 270
209 v = __raw_readl(pll->base + clk->div_reg); 271 v = __raw_readl(pll->base + clk->div_reg);
210 if (v & PLLDIV_EN) { 272 if (v & PLLDIV_EN) {
211 plldiv = (v & PLLDIV_RATIO_MASK) + 1; 273 plldiv = (v & PLLDIV_RATIO_MASK) + 1;
212 if (plldiv) 274 if (plldiv)
213 clk->rate /= plldiv; 275 rate /= plldiv;
214 } 276 }
277
278 return rate;
279}
280
281static unsigned long clk_leafclk_recalc(struct clk *clk)
282{
283 if (WARN_ON(!clk->parent))
284 return clk->rate;
285
286 return clk->parent->rate;
215} 287}
216 288
217static void __init clk_pll_init(struct clk *clk) 289static unsigned long clk_pllclk_recalc(struct clk *clk)
218{ 290{
219 u32 ctrl, mult = 1, prediv = 1, postdiv = 1; 291 u32 ctrl, mult = 1, prediv = 1, postdiv = 1;
220 u8 bypass; 292 u8 bypass;
221 struct pll_data *pll = clk->pll_data; 293 struct pll_data *pll = clk->pll_data;
294 unsigned long rate = clk->rate;
222 295
223 pll->base = IO_ADDRESS(pll->phys_base); 296 pll->base = IO_ADDRESS(pll->phys_base);
224 ctrl = __raw_readl(pll->base + PLLCTL); 297 ctrl = __raw_readl(pll->base + PLLCTL);
225 clk->rate = pll->input_rate = clk->parent->rate; 298 rate = pll->input_rate = clk->parent->rate;
226 299
227 if (ctrl & PLLCTL_PLLEN) { 300 if (ctrl & PLLCTL_PLLEN) {
228 bypass = 0; 301 bypass = 0;
@@ -255,9 +328,9 @@ static void __init clk_pll_init(struct clk *clk)
255 } 328 }
256 329
257 if (!bypass) { 330 if (!bypass) {
258 clk->rate /= prediv; 331 rate /= prediv;
259 clk->rate *= mult; 332 rate *= mult;
260 clk->rate /= postdiv; 333 rate /= postdiv;
261 } 334 }
262 335
263 pr_debug("PLL%d: input = %lu MHz [ ", 336 pr_debug("PLL%d: input = %lu MHz [ ",
@@ -270,8 +343,90 @@ static void __init clk_pll_init(struct clk *clk)
270 pr_debug("* %d ", mult); 343 pr_debug("* %d ", mult);
271 if (postdiv > 1) 344 if (postdiv > 1)
272 pr_debug("/ %d ", postdiv); 345 pr_debug("/ %d ", postdiv);
273 pr_debug("] --> %lu MHz output.\n", clk->rate / 1000000); 346 pr_debug("] --> %lu MHz output.\n", rate / 1000000);
347
348 return rate;
349}
350
351/**
352 * davinci_set_pllrate - set the output rate of a given PLL.
353 *
354 * Note: Currently tested to work with OMAP-L138 only.
355 *
356 * @pll: pll whose rate needs to be changed.
357 * @prediv: The pre divider value. Passing 0 disables the pre-divider.
358 * @pllm: The multiplier value. Passing 0 leads to multiply-by-one.
359 * @postdiv: The post divider value. Passing 0 disables the post-divider.
360 */
361int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
362 unsigned int mult, unsigned int postdiv)
363{
364 u32 ctrl;
365 unsigned int locktime;
366
367 if (pll->base == NULL)
368 return -EINVAL;
369
370 /*
371 * PLL lock time required per OMAP-L138 datasheet is
372 * (2000 * prediv)/sqrt(pllm) OSCIN cycles. We approximate sqrt(pllm)
373 * as 4 and OSCIN cycle as 25 MHz.
374 */
375 if (prediv) {
376 locktime = ((2000 * prediv) / 100);
377 prediv = (prediv - 1) | PLLDIV_EN;
378 } else {
379 locktime = 20;
380 }
381 if (postdiv)
382 postdiv = (postdiv - 1) | PLLDIV_EN;
383 if (mult)
384 mult = mult - 1;
385
386 ctrl = __raw_readl(pll->base + PLLCTL);
387
388 /* Switch the PLL to bypass mode */
389 ctrl &= ~(PLLCTL_PLLENSRC | PLLCTL_PLLEN);
390 __raw_writel(ctrl, pll->base + PLLCTL);
391
392 /*
393 * Wait for 4 OSCIN/CLKIN cycles to ensure that the PLLC has switched
394 * to bypass mode. Delay of 1us ensures we are good for all > 4MHz
395 * OSCIN/CLKIN inputs. Typically the input is ~25MHz.
396 */
397 udelay(1);
398
399 /* Reset and enable PLL */
400 ctrl &= ~(PLLCTL_PLLRST | PLLCTL_PLLDIS);
401 __raw_writel(ctrl, pll->base + PLLCTL);
402
403 if (pll->flags & PLL_HAS_PREDIV)
404 __raw_writel(prediv, pll->base + PREDIV);
405
406 __raw_writel(mult, pll->base + PLLM);
407
408 if (pll->flags & PLL_HAS_POSTDIV)
409 __raw_writel(postdiv, pll->base + POSTDIV);
410
411 /*
412 * Wait for PLL to reset properly, OMAP-L138 datasheet says
413 * 'min' time = 125ns
414 */
415 udelay(1);
416
417 /* Bring PLL out of reset */
418 ctrl |= PLLCTL_PLLRST;
419 __raw_writel(ctrl, pll->base + PLLCTL);
420
421 udelay(locktime);
422
423 /* Remove PLL from bypass mode */
424 ctrl |= PLLCTL_PLLEN;
425 __raw_writel(ctrl, pll->base + PLLCTL);
426
427 return 0;
274} 428}
429EXPORT_SYMBOL(davinci_set_pllrate);
275 430
276int __init davinci_clk_init(struct davinci_clk *clocks) 431int __init davinci_clk_init(struct davinci_clk *clocks)
277 { 432 {
@@ -281,12 +436,23 @@ int __init davinci_clk_init(struct davinci_clk *clocks)
281 for (c = clocks; c->lk.clk; c++) { 436 for (c = clocks; c->lk.clk; c++) {
282 clk = c->lk.clk; 437 clk = c->lk.clk;
283 438
284 if (clk->pll_data) 439 if (!clk->recalc) {
285 clk_pll_init(clk); 440
441 /* Check if clock is a PLL */
442 if (clk->pll_data)
443 clk->recalc = clk_pllclk_recalc;
444
445 /* Else, if it is a PLL-derived clock */
446 else if (clk->flags & CLK_PLL)
447 clk->recalc = clk_sysclk_recalc;
448
449 /* Otherwise, it is a leaf clock (PSC clock) */
450 else if (clk->parent)
451 clk->recalc = clk_leafclk_recalc;
452 }
286 453
287 /* Calculate rates for PLL-derived clocks */ 454 if (clk->recalc)
288 else if (clk->flags & CLK_PLL) 455 clk->rate = clk->recalc(clk);
289 clk_sysclk_recalc(clk);
290 456
291 if (clk->lpsc) 457 if (clk->lpsc)
292 clk->flags |= CLK_PSC; 458 clk->flags |= CLK_PSC;
@@ -352,9 +518,8 @@ dump_clock(struct seq_file *s, unsigned nest, struct clk *parent)
352 /* REVISIT show device associations too */ 518 /* REVISIT show device associations too */
353 519
354 /* cost is now small, but not linear... */ 520 /* cost is now small, but not linear... */
355 list_for_each_entry(clk, &clocks, node) { 521 list_for_each_entry(clk, &parent->children, childnode) {
356 if (clk->parent == parent) 522 dump_clock(s, nest + NEST_DELTA, clk);
357 dump_clock(s, nest + NEST_DELTA, clk);
358 } 523 }
359} 524}
360 525
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h
index 27233cb4a2fb..c92d77a3008d 100644
--- a/arch/arm/mach-davinci/clock.h
+++ b/arch/arm/mach-davinci/clock.h
@@ -22,6 +22,10 @@
22/* PLL/Reset register offsets */ 22/* PLL/Reset register offsets */
23#define PLLCTL 0x100 23#define PLLCTL 0x100
24#define PLLCTL_PLLEN BIT(0) 24#define PLLCTL_PLLEN BIT(0)
25#define PLLCTL_PLLPWRDN BIT(1)
26#define PLLCTL_PLLRST BIT(3)
27#define PLLCTL_PLLDIS BIT(4)
28#define PLLCTL_PLLENSRC BIT(5)
25#define PLLCTL_CLKMODE BIT(8) 29#define PLLCTL_CLKMODE BIT(8)
26 30
27#define PLLM 0x110 31#define PLLM 0x110
@@ -65,15 +69,20 @@ struct clk {
65 const char *name; 69 const char *name;
66 unsigned long rate; 70 unsigned long rate;
67 u8 usecount; 71 u8 usecount;
68 u8 flags;
69 u8 lpsc; 72 u8 lpsc;
70 u8 psc_ctlr; 73 u8 gpsc;
74 u32 flags;
71 struct clk *parent; 75 struct clk *parent;
76 struct list_head children; /* list of children */
77 struct list_head childnode; /* parent's child list node */
72 struct pll_data *pll_data; 78 struct pll_data *pll_data;
73 u32 div_reg; 79 u32 div_reg;
80 unsigned long (*recalc) (struct clk *);
81 int (*set_rate) (struct clk *clk, unsigned long rate);
82 int (*round_rate) (struct clk *clk, unsigned long rate);
74}; 83};
75 84
76/* Clock flags */ 85/* Clock flags: SoC-specific flags start at BIT(16) */
77#define ALWAYS_ENABLED BIT(1) 86#define ALWAYS_ENABLED BIT(1)
78#define CLK_PSC BIT(2) 87#define CLK_PSC BIT(2)
79#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */ 88#define PSC_DSP BIT(3) /* PSC uses DSP domain, not ARM */
@@ -94,6 +103,8 @@ struct davinci_clk {
94 } 103 }
95 104
96int davinci_clk_init(struct davinci_clk *clocks); 105int davinci_clk_init(struct davinci_clk *clocks);
106int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
107 unsigned int mult, unsigned int postdiv);
97 108
98extern struct platform_device davinci_wdt_device; 109extern struct platform_device davinci_wdt_device;
99 110
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
index 61ede19c6b54..c2de94cde56a 100644
--- a/arch/arm/mach-davinci/common.c
+++ b/arch/arm/mach-davinci/common.c
@@ -86,6 +86,8 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
86 dip = davinci_get_id(davinci_soc_info.jtag_id); 86 dip = davinci_get_id(davinci_soc_info.jtag_id);
87 if (!dip) { 87 if (!dip) {
88 ret = -EINVAL; 88 ret = -EINVAL;
89 pr_err("Unknown DaVinci JTAG ID 0x%x\n",
90 davinci_soc_info.jtag_id);
89 goto err; 91 goto err;
90 } 92 }
91 93
@@ -104,5 +106,5 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
104 return; 106 return;
105 107
106err: 108err:
107 pr_err("davinci_common_init: SoC Initialization failed\n"); 109 panic("davinci_common_init: SoC Initialization failed\n");
108} 110}
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 96c8e97a7deb..52b287cf3a42 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -10,9 +10,6 @@
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/sched.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16#include <linux/irq.h> 13#include <linux/irq.h>
17#include <linux/io.h> 14#include <linux/io.h>
18 15
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
new file mode 100644
index 000000000000..d3fa6de1e20f
--- /dev/null
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -0,0 +1,226 @@
1/*
2 * CPU frequency scaling for DaVinci
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * Based on linux/arch/arm/plat-omap/cpu-omap.c. Original Copyright follows:
7 *
8 * Copyright (C) 2005 Nokia Corporation
9 * Written by Tony Lindgren <tony@atomide.com>
10 *
11 * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
12 *
13 * Copyright (C) 2007-2008 Texas Instruments, Inc.
14 * Updated to support OMAP3
15 * Rajendra Nayak <rnayak@ti.com>
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21#include <linux/types.h>
22#include <linux/cpufreq.h>
23#include <linux/init.h>
24#include <linux/err.h>
25#include <linux/clk.h>
26#include <linux/platform_device.h>
27
28#include <mach/hardware.h>
29#include <mach/cpufreq.h>
30#include <mach/common.h>
31
32#include "clock.h"
33
34struct davinci_cpufreq {
35 struct device *dev;
36 struct clk *armclk;
37};
38static struct davinci_cpufreq cpufreq;
39
40static int davinci_verify_speed(struct cpufreq_policy *policy)
41{
42 struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data;
43 struct cpufreq_frequency_table *freq_table = pdata->freq_table;
44 struct clk *armclk = cpufreq.armclk;
45
46 if (freq_table)
47 return cpufreq_frequency_table_verify(policy, freq_table);
48
49 if (policy->cpu)
50 return -EINVAL;
51
52 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
53 policy->cpuinfo.max_freq);
54
55 policy->min = clk_round_rate(armclk, policy->min * 1000) / 1000;
56 policy->max = clk_round_rate(armclk, policy->max * 1000) / 1000;
57 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
58 policy->cpuinfo.max_freq);
59 return 0;
60}
61
62static unsigned int davinci_getspeed(unsigned int cpu)
63{
64 if (cpu)
65 return 0;
66
67 return clk_get_rate(cpufreq.armclk) / 1000;
68}
69
70static int davinci_target(struct cpufreq_policy *policy,
71 unsigned int target_freq, unsigned int relation)
72{
73 int ret = 0;
74 unsigned int idx;
75 struct cpufreq_freqs freqs;
76 struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data;
77 struct clk *armclk = cpufreq.armclk;
78
79 /*
80 * Ensure desired rate is within allowed range. Some govenors
81 * (ondemand) will just pass target_freq=0 to get the minimum.
82 */
83 if (target_freq < policy->cpuinfo.min_freq)
84 target_freq = policy->cpuinfo.min_freq;
85 if (target_freq > policy->cpuinfo.max_freq)
86 target_freq = policy->cpuinfo.max_freq;
87
88 freqs.old = davinci_getspeed(0);
89 freqs.new = clk_round_rate(armclk, target_freq * 1000) / 1000;
90 freqs.cpu = 0;
91
92 if (freqs.old == freqs.new)
93 return ret;
94
95 cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER,
96 dev_driver_string(cpufreq.dev),
97 "transition: %u --> %u\n", freqs.old, freqs.new);
98
99 ret = cpufreq_frequency_table_target(policy, pdata->freq_table,
100 freqs.new, relation, &idx);
101 if (ret)
102 return -EINVAL;
103
104 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
105
106 /* if moving to higher frequency, up the voltage beforehand */
107 if (pdata->set_voltage && freqs.new > freqs.old)
108 pdata->set_voltage(idx);
109
110 ret = clk_set_rate(armclk, idx);
111
112 /* if moving to lower freq, lower the voltage after lowering freq */
113 if (pdata->set_voltage && freqs.new < freqs.old)
114 pdata->set_voltage(idx);
115
116 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
117
118 return ret;
119}
120
121static int __init davinci_cpu_init(struct cpufreq_policy *policy)
122{
123 int result = 0;
124 struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data;
125 struct cpufreq_frequency_table *freq_table = pdata->freq_table;
126
127 if (policy->cpu != 0)
128 return -EINVAL;
129
130 /* Finish platform specific initialization */
131 if (pdata->init) {
132 result = pdata->init();
133 if (result)
134 return result;
135 }
136
137 policy->cur = policy->min = policy->max = davinci_getspeed(0);
138
139 if (freq_table) {
140 result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
141 if (!result)
142 cpufreq_frequency_table_get_attr(freq_table,
143 policy->cpu);
144 } else {
145 policy->cpuinfo.min_freq = policy->min;
146 policy->cpuinfo.max_freq = policy->max;
147 }
148
149 policy->min = policy->cpuinfo.min_freq;
150 policy->max = policy->cpuinfo.max_freq;
151 policy->cur = davinci_getspeed(0);
152
153 /*
154 * Time measurement across the target() function yields ~1500-1800us
155 * time taken with no drivers on notification list.
156 * Setting the latency to 2000 us to accomodate addition of drivers
157 * to pre/post change notification list.
158 */
159 policy->cpuinfo.transition_latency = 2000 * 1000;
160 return 0;
161}
162
163static int davinci_cpu_exit(struct cpufreq_policy *policy)
164{
165 cpufreq_frequency_table_put_attr(policy->cpu);
166 return 0;
167}
168
169static struct freq_attr *davinci_cpufreq_attr[] = {
170 &cpufreq_freq_attr_scaling_available_freqs,
171 NULL,
172};
173
174static struct cpufreq_driver davinci_driver = {
175 .flags = CPUFREQ_STICKY,
176 .verify = davinci_verify_speed,
177 .target = davinci_target,
178 .get = davinci_getspeed,
179 .init = davinci_cpu_init,
180 .exit = davinci_cpu_exit,
181 .name = "davinci",
182 .attr = davinci_cpufreq_attr,
183};
184
185static int __init davinci_cpufreq_probe(struct platform_device *pdev)
186{
187 struct davinci_cpufreq_config *pdata = pdev->dev.platform_data;
188
189 if (!pdata)
190 return -EINVAL;
191 if (!pdata->freq_table)
192 return -EINVAL;
193
194 cpufreq.dev = &pdev->dev;
195
196 cpufreq.armclk = clk_get(NULL, "arm");
197 if (IS_ERR(cpufreq.armclk)) {
198 dev_err(cpufreq.dev, "Unable to get ARM clock\n");
199 return PTR_ERR(cpufreq.armclk);
200 }
201
202 return cpufreq_register_driver(&davinci_driver);
203}
204
205static int __exit davinci_cpufreq_remove(struct platform_device *pdev)
206{
207 clk_put(cpufreq.armclk);
208
209 return cpufreq_unregister_driver(&davinci_driver);
210}
211
212static struct platform_driver davinci_cpufreq_driver = {
213 .driver = {
214 .name = "cpufreq-davinci",
215 .owner = THIS_MODULE,
216 },
217 .remove = __exit_p(davinci_cpufreq_remove),
218};
219
220static int __init davinci_cpufreq_init(void)
221{
222 return platform_driver_probe(&davinci_cpufreq_driver,
223 davinci_cpufreq_probe);
224}
225late_initcall(davinci_cpufreq_init);
226
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
new file mode 100644
index 000000000000..97a90f36fc92
--- /dev/null
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -0,0 +1,197 @@
1/*
2 * CPU idle for DaVinci SoCs
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated. http://www.ti.com/
5 *
6 * Derived from Marvell Kirkwood CPU idle code
7 * (arch/arm/mach-kirkwood/cpuidle.c)
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 <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/cpuidle.h>
18#include <linux/io.h>
19#include <asm/proc-fns.h>
20
21#include <mach/cpuidle.h>
22
23#define DAVINCI_CPUIDLE_MAX_STATES 2
24
25struct davinci_ops {
26 void (*enter) (u32 flags);
27 void (*exit) (u32 flags);
28 u32 flags;
29};
30
31/* fields in davinci_ops.flags */
32#define DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN BIT(0)
33
34static struct cpuidle_driver davinci_idle_driver = {
35 .name = "cpuidle-davinci",
36 .owner = THIS_MODULE,
37};
38
39static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device);
40static void __iomem *ddr2_reg_base;
41
42#define DDR2_SDRCR_OFFSET 0xc
43#define DDR2_SRPD_BIT BIT(23)
44#define DDR2_LPMODEN_BIT BIT(31)
45
46static void davinci_save_ddr_power(int enter, bool pdown)
47{
48 u32 val;
49
50 val = __raw_readl(ddr2_reg_base + DDR2_SDRCR_OFFSET);
51
52 if (enter) {
53 if (pdown)
54 val |= DDR2_SRPD_BIT;
55 else
56 val &= ~DDR2_SRPD_BIT;
57 val |= DDR2_LPMODEN_BIT;
58 } else {
59 val &= ~(DDR2_SRPD_BIT | DDR2_LPMODEN_BIT);
60 }
61
62 __raw_writel(val, ddr2_reg_base + DDR2_SDRCR_OFFSET);
63}
64
65static void davinci_c2state_enter(u32 flags)
66{
67 davinci_save_ddr_power(1, !!(flags & DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN));
68}
69
70static void davinci_c2state_exit(u32 flags)
71{
72 davinci_save_ddr_power(0, !!(flags & DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN));
73}
74
75static struct davinci_ops davinci_states[DAVINCI_CPUIDLE_MAX_STATES] = {
76 [1] = {
77 .enter = davinci_c2state_enter,
78 .exit = davinci_c2state_exit,
79 },
80};
81
82/* Actual code that puts the SoC in different idle states */
83static int davinci_enter_idle(struct cpuidle_device *dev,
84 struct cpuidle_state *state)
85{
86 struct davinci_ops *ops = cpuidle_get_statedata(state);
87 struct timeval before, after;
88 int idle_time;
89
90 local_irq_disable();
91 do_gettimeofday(&before);
92
93 if (ops && ops->enter)
94 ops->enter(ops->flags);
95 /* Wait for interrupt state */
96 cpu_do_idle();
97 if (ops && ops->exit)
98 ops->exit(ops->flags);
99
100 do_gettimeofday(&after);
101 local_irq_enable();
102 idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC +
103 (after.tv_usec - before.tv_usec);
104 return idle_time;
105}
106
107static int __init davinci_cpuidle_probe(struct platform_device *pdev)
108{
109 int ret;
110 struct cpuidle_device *device;
111 struct davinci_cpuidle_config *pdata = pdev->dev.platform_data;
112 struct resource *ddr2_regs;
113 resource_size_t len;
114
115 device = &per_cpu(davinci_cpuidle_device, smp_processor_id());
116
117 if (!pdata) {
118 dev_err(&pdev->dev, "cannot get platform data\n");
119 return -ENOENT;
120 }
121
122 ddr2_regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
123 if (!ddr2_regs) {
124 dev_err(&pdev->dev, "cannot get DDR2 controller register base");
125 return -ENODEV;
126 }
127
128 len = resource_size(ddr2_regs);
129
130 ddr2_regs = request_mem_region(ddr2_regs->start, len, ddr2_regs->name);
131 if (!ddr2_regs)
132 return -EBUSY;
133
134 ddr2_reg_base = ioremap(ddr2_regs->start, len);
135 if (!ddr2_reg_base) {
136 ret = -ENOMEM;
137 goto ioremap_fail;
138 }
139
140 ret = cpuidle_register_driver(&davinci_idle_driver);
141 if (ret) {
142 dev_err(&pdev->dev, "failed to register driver\n");
143 goto driver_register_fail;
144 }
145
146 /* Wait for interrupt state */
147 device->states[0].enter = davinci_enter_idle;
148 device->states[0].exit_latency = 1;
149 device->states[0].target_residency = 10000;
150 device->states[0].flags = CPUIDLE_FLAG_TIME_VALID;
151 strcpy(device->states[0].name, "WFI");
152 strcpy(device->states[0].desc, "Wait for interrupt");
153
154 /* Wait for interrupt and DDR self refresh state */
155 device->states[1].enter = davinci_enter_idle;
156 device->states[1].exit_latency = 10;
157 device->states[1].target_residency = 10000;
158 device->states[1].flags = CPUIDLE_FLAG_TIME_VALID;
159 strcpy(device->states[1].name, "DDR SR");
160 strcpy(device->states[1].desc, "WFI and DDR Self Refresh");
161 if (pdata->ddr2_pdown)
162 davinci_states[1].flags |= DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN;
163 cpuidle_set_statedata(&device->states[1], &davinci_states[1]);
164
165 device->state_count = DAVINCI_CPUIDLE_MAX_STATES;
166
167 ret = cpuidle_register_device(device);
168 if (ret) {
169 dev_err(&pdev->dev, "failed to register device\n");
170 goto device_register_fail;
171 }
172
173 return 0;
174
175device_register_fail:
176 cpuidle_unregister_driver(&davinci_idle_driver);
177driver_register_fail:
178 iounmap(ddr2_reg_base);
179ioremap_fail:
180 release_mem_region(ddr2_regs->start, len);
181 return ret;
182}
183
184static struct platform_driver davinci_cpuidle_driver = {
185 .driver = {
186 .name = "cpuidle-davinci",
187 .owner = THIS_MODULE,
188 },
189};
190
191static int __init davinci_cpuidle_init(void)
192{
193 return platform_driver_probe(&davinci_cpuidle_driver,
194 davinci_cpuidle_probe);
195}
196device_initcall(davinci_cpuidle_init);
197
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index 19b2748357fc..b22b5cf04250 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -8,22 +8,17 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/clk.h> 12#include <linux/clk.h>
14#include <linux/platform_device.h>
15 13
16#include <asm/mach/map.h> 14#include <asm/mach/map.h>
17 15
18#include <mach/clock.h>
19#include <mach/psc.h> 16#include <mach/psc.h>
20#include <mach/mux.h>
21#include <mach/irqs.h> 17#include <mach/irqs.h>
22#include <mach/cputype.h> 18#include <mach/cputype.h>
23#include <mach/common.h> 19#include <mach/common.h>
24#include <mach/time.h> 20#include <mach/time.h>
25#include <mach/da8xx.h> 21#include <mach/da8xx.h>
26#include <mach/asp.h>
27 22
28#include "clock.h" 23#include "clock.h"
29#include "mux.h" 24#include "mux.h"
@@ -193,14 +188,14 @@ static struct clk uart1_clk = {
193 .name = "uart1", 188 .name = "uart1",
194 .parent = &pll0_sysclk2, 189 .parent = &pll0_sysclk2,
195 .lpsc = DA8XX_LPSC1_UART1, 190 .lpsc = DA8XX_LPSC1_UART1,
196 .psc_ctlr = 1, 191 .gpsc = 1,
197}; 192};
198 193
199static struct clk uart2_clk = { 194static struct clk uart2_clk = {
200 .name = "uart2", 195 .name = "uart2",
201 .parent = &pll0_sysclk2, 196 .parent = &pll0_sysclk2,
202 .lpsc = DA8XX_LPSC1_UART2, 197 .lpsc = DA8XX_LPSC1_UART2,
203 .psc_ctlr = 1, 198 .gpsc = 1,
204}; 199};
205 200
206static struct clk spi0_clk = { 201static struct clk spi0_clk = {
@@ -213,98 +208,98 @@ static struct clk spi1_clk = {
213 .name = "spi1", 208 .name = "spi1",
214 .parent = &pll0_sysclk2, 209 .parent = &pll0_sysclk2,
215 .lpsc = DA8XX_LPSC1_SPI1, 210 .lpsc = DA8XX_LPSC1_SPI1,
216 .psc_ctlr = 1, 211 .gpsc = 1,
217}; 212};
218 213
219static struct clk ecap0_clk = { 214static struct clk ecap0_clk = {
220 .name = "ecap0", 215 .name = "ecap0",
221 .parent = &pll0_sysclk2, 216 .parent = &pll0_sysclk2,
222 .lpsc = DA8XX_LPSC1_ECAP, 217 .lpsc = DA8XX_LPSC1_ECAP,
223 .psc_ctlr = 1, 218 .gpsc = 1,
224}; 219};
225 220
226static struct clk ecap1_clk = { 221static struct clk ecap1_clk = {
227 .name = "ecap1", 222 .name = "ecap1",
228 .parent = &pll0_sysclk2, 223 .parent = &pll0_sysclk2,
229 .lpsc = DA8XX_LPSC1_ECAP, 224 .lpsc = DA8XX_LPSC1_ECAP,
230 .psc_ctlr = 1, 225 .gpsc = 1,
231}; 226};
232 227
233static struct clk ecap2_clk = { 228static struct clk ecap2_clk = {
234 .name = "ecap2", 229 .name = "ecap2",
235 .parent = &pll0_sysclk2, 230 .parent = &pll0_sysclk2,
236 .lpsc = DA8XX_LPSC1_ECAP, 231 .lpsc = DA8XX_LPSC1_ECAP,
237 .psc_ctlr = 1, 232 .gpsc = 1,
238}; 233};
239 234
240static struct clk pwm0_clk = { 235static struct clk pwm0_clk = {
241 .name = "pwm0", 236 .name = "pwm0",
242 .parent = &pll0_sysclk2, 237 .parent = &pll0_sysclk2,
243 .lpsc = DA8XX_LPSC1_PWM, 238 .lpsc = DA8XX_LPSC1_PWM,
244 .psc_ctlr = 1, 239 .gpsc = 1,
245}; 240};
246 241
247static struct clk pwm1_clk = { 242static struct clk pwm1_clk = {
248 .name = "pwm1", 243 .name = "pwm1",
249 .parent = &pll0_sysclk2, 244 .parent = &pll0_sysclk2,
250 .lpsc = DA8XX_LPSC1_PWM, 245 .lpsc = DA8XX_LPSC1_PWM,
251 .psc_ctlr = 1, 246 .gpsc = 1,
252}; 247};
253 248
254static struct clk pwm2_clk = { 249static struct clk pwm2_clk = {
255 .name = "pwm2", 250 .name = "pwm2",
256 .parent = &pll0_sysclk2, 251 .parent = &pll0_sysclk2,
257 .lpsc = DA8XX_LPSC1_PWM, 252 .lpsc = DA8XX_LPSC1_PWM,
258 .psc_ctlr = 1, 253 .gpsc = 1,
259}; 254};
260 255
261static struct clk eqep0_clk = { 256static struct clk eqep0_clk = {
262 .name = "eqep0", 257 .name = "eqep0",
263 .parent = &pll0_sysclk2, 258 .parent = &pll0_sysclk2,
264 .lpsc = DA830_LPSC1_EQEP, 259 .lpsc = DA830_LPSC1_EQEP,
265 .psc_ctlr = 1, 260 .gpsc = 1,
266}; 261};
267 262
268static struct clk eqep1_clk = { 263static struct clk eqep1_clk = {
269 .name = "eqep1", 264 .name = "eqep1",
270 .parent = &pll0_sysclk2, 265 .parent = &pll0_sysclk2,
271 .lpsc = DA830_LPSC1_EQEP, 266 .lpsc = DA830_LPSC1_EQEP,
272 .psc_ctlr = 1, 267 .gpsc = 1,
273}; 268};
274 269
275static struct clk lcdc_clk = { 270static struct clk lcdc_clk = {
276 .name = "lcdc", 271 .name = "lcdc",
277 .parent = &pll0_sysclk2, 272 .parent = &pll0_sysclk2,
278 .lpsc = DA8XX_LPSC1_LCDC, 273 .lpsc = DA8XX_LPSC1_LCDC,
279 .psc_ctlr = 1, 274 .gpsc = 1,
280}; 275};
281 276
282static struct clk mcasp0_clk = { 277static struct clk mcasp0_clk = {
283 .name = "mcasp0", 278 .name = "mcasp0",
284 .parent = &pll0_sysclk2, 279 .parent = &pll0_sysclk2,
285 .lpsc = DA8XX_LPSC1_McASP0, 280 .lpsc = DA8XX_LPSC1_McASP0,
286 .psc_ctlr = 1, 281 .gpsc = 1,
287}; 282};
288 283
289static struct clk mcasp1_clk = { 284static struct clk mcasp1_clk = {
290 .name = "mcasp1", 285 .name = "mcasp1",
291 .parent = &pll0_sysclk2, 286 .parent = &pll0_sysclk2,
292 .lpsc = DA830_LPSC1_McASP1, 287 .lpsc = DA830_LPSC1_McASP1,
293 .psc_ctlr = 1, 288 .gpsc = 1,
294}; 289};
295 290
296static struct clk mcasp2_clk = { 291static struct clk mcasp2_clk = {
297 .name = "mcasp2", 292 .name = "mcasp2",
298 .parent = &pll0_sysclk2, 293 .parent = &pll0_sysclk2,
299 .lpsc = DA830_LPSC1_McASP2, 294 .lpsc = DA830_LPSC1_McASP2,
300 .psc_ctlr = 1, 295 .gpsc = 1,
301}; 296};
302 297
303static struct clk usb20_clk = { 298static struct clk usb20_clk = {
304 .name = "usb20", 299 .name = "usb20",
305 .parent = &pll0_sysclk2, 300 .parent = &pll0_sysclk2,
306 .lpsc = DA8XX_LPSC1_USB20, 301 .lpsc = DA8XX_LPSC1_USB20,
307 .psc_ctlr = 1, 302 .gpsc = 1,
308}; 303};
309 304
310static struct clk aemif_clk = { 305static struct clk aemif_clk = {
@@ -332,36 +327,36 @@ static struct clk emac_clk = {
332 .name = "emac", 327 .name = "emac",
333 .parent = &pll0_sysclk4, 328 .parent = &pll0_sysclk4,
334 .lpsc = DA8XX_LPSC1_CPGMAC, 329 .lpsc = DA8XX_LPSC1_CPGMAC,
335 .psc_ctlr = 1, 330 .gpsc = 1,
336}; 331};
337 332
338static struct clk gpio_clk = { 333static struct clk gpio_clk = {
339 .name = "gpio", 334 .name = "gpio",
340 .parent = &pll0_sysclk4, 335 .parent = &pll0_sysclk4,
341 .lpsc = DA8XX_LPSC1_GPIO, 336 .lpsc = DA8XX_LPSC1_GPIO,
342 .psc_ctlr = 1, 337 .gpsc = 1,
343}; 338};
344 339
345static struct clk i2c1_clk = { 340static struct clk i2c1_clk = {
346 .name = "i2c1", 341 .name = "i2c1",
347 .parent = &pll0_sysclk4, 342 .parent = &pll0_sysclk4,
348 .lpsc = DA8XX_LPSC1_I2C, 343 .lpsc = DA8XX_LPSC1_I2C,
349 .psc_ctlr = 1, 344 .gpsc = 1,
350}; 345};
351 346
352static struct clk usb11_clk = { 347static struct clk usb11_clk = {
353 .name = "usb11", 348 .name = "usb11",
354 .parent = &pll0_sysclk4, 349 .parent = &pll0_sysclk4,
355 .lpsc = DA8XX_LPSC1_USB11, 350 .lpsc = DA8XX_LPSC1_USB11,
356 .psc_ctlr = 1, 351 .gpsc = 1,
357}; 352};
358 353
359static struct clk emif3_clk = { 354static struct clk emif3_clk = {
360 .name = "emif3", 355 .name = "emif3",
361 .parent = &pll0_sysclk5, 356 .parent = &pll0_sysclk5,
362 .lpsc = DA8XX_LPSC1_EMIF3C, 357 .lpsc = DA8XX_LPSC1_EMIF3C,
358 .gpsc = 1,
363 .flags = ALWAYS_ENABLED, 359 .flags = ALWAYS_ENABLED,
364 .psc_ctlr = 1,
365}; 360};
366 361
367static struct clk arm_clk = { 362static struct clk arm_clk = {
@@ -411,7 +406,7 @@ static struct davinci_clk da830_clks[] = {
411 CLK(NULL, "pwm2", &pwm2_clk), 406 CLK(NULL, "pwm2", &pwm2_clk),
412 CLK("eqep.0", NULL, &eqep0_clk), 407 CLK("eqep.0", NULL, &eqep0_clk),
413 CLK("eqep.1", NULL, &eqep1_clk), 408 CLK("eqep.1", NULL, &eqep1_clk),
414 CLK("da830_lcdc", NULL, &lcdc_clk), 409 CLK("da8xx_lcdc.0", NULL, &lcdc_clk),
415 CLK("davinci-mcasp.0", NULL, &mcasp0_clk), 410 CLK("davinci-mcasp.0", NULL, &mcasp0_clk),
416 CLK("davinci-mcasp.1", NULL, &mcasp1_clk), 411 CLK("davinci-mcasp.1", NULL, &mcasp1_clk),
417 CLK("davinci-mcasp.2", NULL, &mcasp2_clk), 412 CLK("davinci-mcasp.2", NULL, &mcasp2_clk),
@@ -1143,7 +1138,21 @@ static struct davinci_id da830_ids[] = {
1143 .part_no = 0xb7df, 1138 .part_no = 0xb7df,
1144 .manufacturer = 0x017, /* 0x02f >> 1 */ 1139 .manufacturer = 0x017, /* 0x02f >> 1 */
1145 .cpu_id = DAVINCI_CPU_ID_DA830, 1140 .cpu_id = DAVINCI_CPU_ID_DA830,
1146 .name = "da830/omap l137", 1141 .name = "da830/omap-l137 rev1.0",
1142 },
1143 {
1144 .variant = 0x8,
1145 .part_no = 0xb7df,
1146 .manufacturer = 0x017,
1147 .cpu_id = DAVINCI_CPU_ID_DA830,
1148 .name = "da830/omap-l137 rev1.1",
1149 },
1150 {
1151 .variant = 0x9,
1152 .part_no = 0xb7df,
1153 .manufacturer = 0x017,
1154 .cpu_id = DAVINCI_CPU_ID_DA830,
1155 .name = "da830/omap-l137 rev2.0",
1147 }, 1156 },
1148}; 1157};
1149 1158
@@ -1178,13 +1187,11 @@ static struct davinci_timer_info da830_timer_info = {
1178static struct davinci_soc_info davinci_soc_info_da830 = { 1187static struct davinci_soc_info davinci_soc_info_da830 = {
1179 .io_desc = da830_io_desc, 1188 .io_desc = da830_io_desc,
1180 .io_desc_num = ARRAY_SIZE(da830_io_desc), 1189 .io_desc_num = ARRAY_SIZE(da830_io_desc),
1181 .jtag_id_base = IO_ADDRESS(DA8XX_JTAG_ID_REG),
1182 .ids = da830_ids, 1190 .ids = da830_ids,
1183 .ids_num = ARRAY_SIZE(da830_ids), 1191 .ids_num = ARRAY_SIZE(da830_ids),
1184 .cpu_clks = da830_clks, 1192 .cpu_clks = da830_clks,
1185 .psc_bases = da830_psc_bases, 1193 .psc_bases = da830_psc_bases,
1186 .psc_bases_num = ARRAY_SIZE(da830_psc_bases), 1194 .psc_bases_num = ARRAY_SIZE(da830_psc_bases),
1187 .pinmux_base = IO_ADDRESS(DA8XX_BOOT_CFG_BASE + 0x120),
1188 .pinmux_pins = da830_pins, 1195 .pinmux_pins = da830_pins,
1189 .pinmux_pins_num = ARRAY_SIZE(da830_pins), 1196 .pinmux_pins_num = ARRAY_SIZE(da830_pins),
1190 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, 1197 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
@@ -1201,5 +1208,13 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
1201 1208
1202void __init da830_init(void) 1209void __init da830_init(void)
1203{ 1210{
1211 da8xx_syscfg_base = ioremap(DA8XX_SYSCFG_BASE, SZ_4K);
1212 if (WARN(!da8xx_syscfg_base, "Unable to map syscfg module"))
1213 return;
1214
1215 davinci_soc_info_da830.jtag_id_base =
1216 DA8XX_SYSCFG_VIRT(DA8XX_JTAG_ID_REG);
1217 davinci_soc_info_da830.pinmux_base = DA8XX_SYSCFG_VIRT(0x120);
1218
1204 davinci_common_init(&davinci_soc_info_da830); 1219 davinci_common_init(&davinci_soc_info_da830);
1205} 1220}
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 192d719a47df..717806c6cef9 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -11,31 +11,41 @@
11 * is licensed "as is" without any warranty of any kind, whether express 11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied. 12 * or implied.
13 */ 13 */
14#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/clk.h> 15#include <linux/clk.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/cpufreq.h>
18#include <linux/regulator/consumer.h>
18 19
19#include <asm/mach/map.h> 20#include <asm/mach/map.h>
20 21
21#include <mach/clock.h>
22#include <mach/psc.h> 22#include <mach/psc.h>
23#include <mach/mux.h>
24#include <mach/irqs.h> 23#include <mach/irqs.h>
25#include <mach/cputype.h> 24#include <mach/cputype.h>
26#include <mach/common.h> 25#include <mach/common.h>
27#include <mach/time.h> 26#include <mach/time.h>
28#include <mach/da8xx.h> 27#include <mach/da8xx.h>
28#include <mach/cpufreq.h>
29 29
30#include "clock.h" 30#include "clock.h"
31#include "mux.h" 31#include "mux.h"
32 32
33/* SoC specific clock flags */
34#define DA850_CLK_ASYNC3 BIT(16)
35
33#define DA850_PLL1_BASE 0x01e1a000 36#define DA850_PLL1_BASE 0x01e1a000
34#define DA850_TIMER64P2_BASE 0x01f0c000 37#define DA850_TIMER64P2_BASE 0x01f0c000
35#define DA850_TIMER64P3_BASE 0x01f0d000 38#define DA850_TIMER64P3_BASE 0x01f0d000
36 39
37#define DA850_REF_FREQ 24000000 40#define DA850_REF_FREQ 24000000
38 41
42#define CFGCHIP3_ASYNC3_CLKSRC BIT(4)
43#define CFGCHIP0_PLL_MASTER_LOCK BIT(4)
44
45static int da850_set_armrate(struct clk *clk, unsigned long rate);
46static int da850_round_armrate(struct clk *clk, unsigned long rate);
47static int da850_set_pll0rate(struct clk *clk, unsigned long armrate);
48
39static struct pll_data pll0_data = { 49static struct pll_data pll0_data = {
40 .num = 1, 50 .num = 1,
41 .phys_base = DA8XX_PLL0_BASE, 51 .phys_base = DA8XX_PLL0_BASE,
@@ -52,6 +62,7 @@ static struct clk pll0_clk = {
52 .parent = &ref_clk, 62 .parent = &ref_clk,
53 .pll_data = &pll0_data, 63 .pll_data = &pll0_data,
54 .flags = CLK_PLL, 64 .flags = CLK_PLL,
65 .set_rate = da850_set_pll0rate,
55}; 66};
56 67
57static struct clk pll0_aux_clk = { 68static struct clk pll0_aux_clk = {
@@ -210,16 +221,16 @@ static struct clk tpcc1_clk = {
210 .name = "tpcc1", 221 .name = "tpcc1",
211 .parent = &pll0_sysclk2, 222 .parent = &pll0_sysclk2,
212 .lpsc = DA850_LPSC1_TPCC1, 223 .lpsc = DA850_LPSC1_TPCC1,
224 .gpsc = 1,
213 .flags = CLK_PSC | ALWAYS_ENABLED, 225 .flags = CLK_PSC | ALWAYS_ENABLED,
214 .psc_ctlr = 1,
215}; 226};
216 227
217static struct clk tptc2_clk = { 228static struct clk tptc2_clk = {
218 .name = "tptc2", 229 .name = "tptc2",
219 .parent = &pll0_sysclk2, 230 .parent = &pll0_sysclk2,
220 .lpsc = DA850_LPSC1_TPTC2, 231 .lpsc = DA850_LPSC1_TPTC2,
232 .gpsc = 1,
221 .flags = ALWAYS_ENABLED, 233 .flags = ALWAYS_ENABLED,
222 .psc_ctlr = 1,
223}; 234};
224 235
225static struct clk uart0_clk = { 236static struct clk uart0_clk = {
@@ -232,14 +243,16 @@ static struct clk uart1_clk = {
232 .name = "uart1", 243 .name = "uart1",
233 .parent = &pll0_sysclk2, 244 .parent = &pll0_sysclk2,
234 .lpsc = DA8XX_LPSC1_UART1, 245 .lpsc = DA8XX_LPSC1_UART1,
235 .psc_ctlr = 1, 246 .gpsc = 1,
247 .flags = DA850_CLK_ASYNC3,
236}; 248};
237 249
238static struct clk uart2_clk = { 250static struct clk uart2_clk = {
239 .name = "uart2", 251 .name = "uart2",
240 .parent = &pll0_sysclk2, 252 .parent = &pll0_sysclk2,
241 .lpsc = DA8XX_LPSC1_UART2, 253 .lpsc = DA8XX_LPSC1_UART2,
242 .psc_ctlr = 1, 254 .gpsc = 1,
255 .flags = DA850_CLK_ASYNC3,
243}; 256};
244 257
245static struct clk aintc_clk = { 258static struct clk aintc_clk = {
@@ -253,22 +266,22 @@ static struct clk gpio_clk = {
253 .name = "gpio", 266 .name = "gpio",
254 .parent = &pll0_sysclk4, 267 .parent = &pll0_sysclk4,
255 .lpsc = DA8XX_LPSC1_GPIO, 268 .lpsc = DA8XX_LPSC1_GPIO,
256 .psc_ctlr = 1, 269 .gpsc = 1,
257}; 270};
258 271
259static struct clk i2c1_clk = { 272static struct clk i2c1_clk = {
260 .name = "i2c1", 273 .name = "i2c1",
261 .parent = &pll0_sysclk4, 274 .parent = &pll0_sysclk4,
262 .lpsc = DA8XX_LPSC1_I2C, 275 .lpsc = DA8XX_LPSC1_I2C,
263 .psc_ctlr = 1, 276 .gpsc = 1,
264}; 277};
265 278
266static struct clk emif3_clk = { 279static struct clk emif3_clk = {
267 .name = "emif3", 280 .name = "emif3",
268 .parent = &pll0_sysclk5, 281 .parent = &pll0_sysclk5,
269 .lpsc = DA8XX_LPSC1_EMIF3C, 282 .lpsc = DA8XX_LPSC1_EMIF3C,
283 .gpsc = 1,
270 .flags = ALWAYS_ENABLED, 284 .flags = ALWAYS_ENABLED,
271 .psc_ctlr = 1,
272}; 285};
273 286
274static struct clk arm_clk = { 287static struct clk arm_clk = {
@@ -276,6 +289,8 @@ static struct clk arm_clk = {
276 .parent = &pll0_sysclk6, 289 .parent = &pll0_sysclk6,
277 .lpsc = DA8XX_LPSC0_ARM, 290 .lpsc = DA8XX_LPSC0_ARM,
278 .flags = ALWAYS_ENABLED, 291 .flags = ALWAYS_ENABLED,
292 .set_rate = da850_set_armrate,
293 .round_rate = da850_round_armrate,
279}; 294};
280 295
281static struct clk rmii_clk = { 296static struct clk rmii_clk = {
@@ -287,21 +302,22 @@ static struct clk emac_clk = {
287 .name = "emac", 302 .name = "emac",
288 .parent = &pll0_sysclk4, 303 .parent = &pll0_sysclk4,
289 .lpsc = DA8XX_LPSC1_CPGMAC, 304 .lpsc = DA8XX_LPSC1_CPGMAC,
290 .psc_ctlr = 1, 305 .gpsc = 1,
291}; 306};
292 307
293static struct clk mcasp_clk = { 308static struct clk mcasp_clk = {
294 .name = "mcasp", 309 .name = "mcasp",
295 .parent = &pll0_sysclk2, 310 .parent = &pll0_sysclk2,
296 .lpsc = DA8XX_LPSC1_McASP0, 311 .lpsc = DA8XX_LPSC1_McASP0,
297 .psc_ctlr = 1, 312 .gpsc = 1,
313 .flags = DA850_CLK_ASYNC3,
298}; 314};
299 315
300static struct clk lcdc_clk = { 316static struct clk lcdc_clk = {
301 .name = "lcdc", 317 .name = "lcdc",
302 .parent = &pll0_sysclk2, 318 .parent = &pll0_sysclk2,
303 .lpsc = DA8XX_LPSC1_LCDC, 319 .lpsc = DA8XX_LPSC1_LCDC,
304 .psc_ctlr = 1, 320 .gpsc = 1,
305}; 321};
306 322
307static struct clk mmcsd_clk = { 323static struct clk mmcsd_clk = {
@@ -404,6 +420,14 @@ static const struct mux_config da850_pins[] = {
404 MUX_CFG(DA850, MII_RXD_0, 3, 28, 15, 8, false) 420 MUX_CFG(DA850, MII_RXD_0, 3, 28, 15, 8, false)
405 MUX_CFG(DA850, MDIO_CLK, 4, 0, 15, 8, false) 421 MUX_CFG(DA850, MDIO_CLK, 4, 0, 15, 8, false)
406 MUX_CFG(DA850, MDIO_D, 4, 4, 15, 8, false) 422 MUX_CFG(DA850, MDIO_D, 4, 4, 15, 8, false)
423 MUX_CFG(DA850, RMII_TXD_0, 14, 12, 15, 8, false)
424 MUX_CFG(DA850, RMII_TXD_1, 14, 8, 15, 8, false)
425 MUX_CFG(DA850, RMII_TXEN, 14, 16, 15, 8, false)
426 MUX_CFG(DA850, RMII_CRS_DV, 15, 4, 15, 8, false)
427 MUX_CFG(DA850, RMII_RXD_0, 14, 24, 15, 8, false)
428 MUX_CFG(DA850, RMII_RXD_1, 14, 20, 15, 8, false)
429 MUX_CFG(DA850, RMII_RXER, 14, 28, 15, 8, false)
430 MUX_CFG(DA850, RMII_MHZ_50_CLK, 15, 0, 15, 0, false)
407 /* McASP function */ 431 /* McASP function */
408 MUX_CFG(DA850, ACLKR, 0, 0, 15, 1, false) 432 MUX_CFG(DA850, ACLKR, 0, 0, 15, 1, false)
409 MUX_CFG(DA850, ACLKX, 0, 4, 15, 1, false) 433 MUX_CFG(DA850, ACLKX, 0, 4, 15, 1, false)
@@ -506,8 +530,9 @@ static const struct mux_config da850_pins[] = {
506 MUX_CFG(DA850, EMA_WAIT_1, 6, 24, 15, 1, false) 530 MUX_CFG(DA850, EMA_WAIT_1, 6, 24, 15, 1, false)
507 MUX_CFG(DA850, NEMA_CS_2, 7, 0, 15, 1, false) 531 MUX_CFG(DA850, NEMA_CS_2, 7, 0, 15, 1, false)
508 /* GPIO function */ 532 /* GPIO function */
533 MUX_CFG(DA850, GPIO2_6, 6, 4, 15, 8, false)
534 MUX_CFG(DA850, GPIO2_8, 5, 28, 15, 8, false)
509 MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) 535 MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false)
510 MUX_CFG(DA850, GPIO8_10, 18, 28, 15, 8, false)
511 MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false) 536 MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false)
512 MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false) 537 MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false)
513#endif 538#endif
@@ -547,6 +572,14 @@ const short da850_cpgmac_pins[] __initdata = {
547 -1 572 -1
548}; 573};
549 574
575const short da850_rmii_pins[] __initdata = {
576 DA850_RMII_TXD_0, DA850_RMII_TXD_1, DA850_RMII_TXEN,
577 DA850_RMII_CRS_DV, DA850_RMII_RXD_0, DA850_RMII_RXD_1,
578 DA850_RMII_RXER, DA850_RMII_MHZ_50_CLK, DA850_MDIO_CLK,
579 DA850_MDIO_D,
580 -1
581};
582
550const short da850_mcasp_pins[] __initdata = { 583const short da850_mcasp_pins[] __initdata = {
551 DA850_AHCLKX, DA850_ACLKX, DA850_AFSX, 584 DA850_AHCLKX, DA850_ACLKX, DA850_AFSX,
552 DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, DA850_AMUTE, 585 DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, DA850_AMUTE,
@@ -555,12 +588,11 @@ const short da850_mcasp_pins[] __initdata = {
555}; 588};
556 589
557const short da850_lcdcntl_pins[] __initdata = { 590const short da850_lcdcntl_pins[] __initdata = {
558 DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3, DA850_LCD_D_4, 591 DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
559 DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7, DA850_LCD_D_8, 592 DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
560 DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11, DA850_LCD_D_12, 593 DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
561 DA850_LCD_D_13, DA850_LCD_D_14, DA850_LCD_D_15, DA850_LCD_PCLK, 594 DA850_LCD_D_12, DA850_LCD_D_13, DA850_LCD_D_14, DA850_LCD_D_15,
562 DA850_LCD_HSYNC, DA850_LCD_VSYNC, DA850_NLCD_AC_ENB_CS, DA850_GPIO2_15, 595 DA850_LCD_PCLK, DA850_LCD_HSYNC, DA850_LCD_VSYNC, DA850_NLCD_AC_ENB_CS,
563 DA850_GPIO8_10,
564 -1 596 -1
565}; 597};
566 598
@@ -790,16 +822,221 @@ static struct davinci_timer_info da850_timer_info = {
790 .clocksource_id = T0_TOP, 822 .clocksource_id = T0_TOP,
791}; 823};
792 824
825static void da850_set_async3_src(int pllnum)
826{
827 struct clk *clk, *newparent = pllnum ? &pll1_sysclk2 : &pll0_sysclk2;
828 struct davinci_clk *c;
829 unsigned int v;
830 int ret;
831
832 for (c = da850_clks; c->lk.clk; c++) {
833 clk = c->lk.clk;
834 if (clk->flags & DA850_CLK_ASYNC3) {
835 ret = clk_set_parent(clk, newparent);
836 WARN(ret, "DA850: unable to re-parent clock %s",
837 clk->name);
838 }
839 }
840
841 v = __raw_readl(DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP3_REG));
842 if (pllnum)
843 v |= CFGCHIP3_ASYNC3_CLKSRC;
844 else
845 v &= ~CFGCHIP3_ASYNC3_CLKSRC;
846 __raw_writel(v, DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP3_REG));
847}
848
849#ifdef CONFIG_CPU_FREQ
850/*
851 * Notes:
852 * According to the TRM, minimum PLLM results in maximum power savings.
853 * The OPP definitions below should keep the PLLM as low as possible.
854 *
855 * The output of the PLLM must be between 400 to 600 MHz.
856 * This rules out prediv of anything but divide-by-one for 24Mhz OSC input.
857 */
858struct da850_opp {
859 unsigned int freq; /* in KHz */
860 unsigned int prediv;
861 unsigned int mult;
862 unsigned int postdiv;
863 unsigned int cvdd_min; /* in uV */
864 unsigned int cvdd_max; /* in uV */
865};
866
867static const struct da850_opp da850_opp_300 = {
868 .freq = 300000,
869 .prediv = 1,
870 .mult = 25,
871 .postdiv = 2,
872 .cvdd_min = 1140000,
873 .cvdd_max = 1320000,
874};
875
876static const struct da850_opp da850_opp_200 = {
877 .freq = 200000,
878 .prediv = 1,
879 .mult = 25,
880 .postdiv = 3,
881 .cvdd_min = 1050000,
882 .cvdd_max = 1160000,
883};
884
885static const struct da850_opp da850_opp_96 = {
886 .freq = 96000,
887 .prediv = 1,
888 .mult = 20,
889 .postdiv = 5,
890 .cvdd_min = 950000,
891 .cvdd_max = 1050000,
892};
893
894#define OPP(freq) \
895 { \
896 .index = (unsigned int) &da850_opp_##freq, \
897 .frequency = freq * 1000, \
898 }
899
900static struct cpufreq_frequency_table da850_freq_table[] = {
901 OPP(300),
902 OPP(200),
903 OPP(96),
904 {
905 .index = 0,
906 .frequency = CPUFREQ_TABLE_END,
907 },
908};
909
910#ifdef CONFIG_REGULATOR
911static struct regulator *cvdd;
912
913static int da850_set_voltage(unsigned int index)
914{
915 struct da850_opp *opp;
916
917 if (!cvdd)
918 return -ENODEV;
919
920 opp = (struct da850_opp *) da850_freq_table[index].index;
921
922 return regulator_set_voltage(cvdd, opp->cvdd_min, opp->cvdd_max);
923}
924
925static int da850_regulator_init(void)
926{
927 cvdd = regulator_get(NULL, "cvdd");
928 if (WARN(IS_ERR(cvdd), "Unable to obtain voltage regulator for CVDD;"
929 " voltage scaling unsupported\n")) {
930 return PTR_ERR(cvdd);
931 }
932
933 return 0;
934}
935#endif
936
937static struct davinci_cpufreq_config cpufreq_info = {
938 .freq_table = &da850_freq_table[0],
939#ifdef CONFIG_REGULATOR
940 .init = da850_regulator_init,
941 .set_voltage = da850_set_voltage,
942#endif
943};
944
945static struct platform_device da850_cpufreq_device = {
946 .name = "cpufreq-davinci",
947 .dev = {
948 .platform_data = &cpufreq_info,
949 },
950};
951
952int __init da850_register_cpufreq(void)
953{
954 return platform_device_register(&da850_cpufreq_device);
955}
956
957static int da850_round_armrate(struct clk *clk, unsigned long rate)
958{
959 int i, ret = 0, diff;
960 unsigned int best = (unsigned int) -1;
961
962 rate /= 1000; /* convert to kHz */
963
964 for (i = 0; da850_freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
965 diff = da850_freq_table[i].frequency - rate;
966 if (diff < 0)
967 diff = -diff;
968
969 if (diff < best) {
970 best = diff;
971 ret = da850_freq_table[i].frequency;
972 }
973 }
974
975 return ret * 1000;
976}
977
978static int da850_set_armrate(struct clk *clk, unsigned long index)
979{
980 struct clk *pllclk = &pll0_clk;
981
982 return clk_set_rate(pllclk, index);
983}
984
985static int da850_set_pll0rate(struct clk *clk, unsigned long index)
986{
987 unsigned int prediv, mult, postdiv;
988 struct da850_opp *opp;
989 struct pll_data *pll = clk->pll_data;
990 unsigned int v;
991 int ret;
992
993 opp = (struct da850_opp *) da850_freq_table[index].index;
994 prediv = opp->prediv;
995 mult = opp->mult;
996 postdiv = opp->postdiv;
997
998 /* Unlock writing to PLL registers */
999 v = __raw_readl(DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP0_REG));
1000 v &= ~CFGCHIP0_PLL_MASTER_LOCK;
1001 __raw_writel(v, DA8XX_SYSCFG_VIRT(DA8XX_CFGCHIP0_REG));
1002
1003 ret = davinci_set_pllrate(pll, prediv, mult, postdiv);
1004 if (WARN_ON(ret))
1005 return ret;
1006
1007 return 0;
1008}
1009#else
1010int __init da850_register_cpufreq(void)
1011{
1012 return 0;
1013}
1014
1015static int da850_set_armrate(struct clk *clk, unsigned long rate)
1016{
1017 return -EINVAL;
1018}
1019
1020static int da850_set_pll0rate(struct clk *clk, unsigned long armrate)
1021{
1022 return -EINVAL;
1023}
1024
1025static int da850_round_armrate(struct clk *clk, unsigned long rate)
1026{
1027 return clk->rate;
1028}
1029#endif
1030
1031
793static struct davinci_soc_info davinci_soc_info_da850 = { 1032static struct davinci_soc_info davinci_soc_info_da850 = {
794 .io_desc = da850_io_desc, 1033 .io_desc = da850_io_desc,
795 .io_desc_num = ARRAY_SIZE(da850_io_desc), 1034 .io_desc_num = ARRAY_SIZE(da850_io_desc),
796 .jtag_id_base = IO_ADDRESS(DA8XX_JTAG_ID_REG),
797 .ids = da850_ids, 1035 .ids = da850_ids,
798 .ids_num = ARRAY_SIZE(da850_ids), 1036 .ids_num = ARRAY_SIZE(da850_ids),
799 .cpu_clks = da850_clks, 1037 .cpu_clks = da850_clks,
800 .psc_bases = da850_psc_bases, 1038 .psc_bases = da850_psc_bases,
801 .psc_bases_num = ARRAY_SIZE(da850_psc_bases), 1039 .psc_bases_num = ARRAY_SIZE(da850_psc_bases),
802 .pinmux_base = IO_ADDRESS(DA8XX_BOOT_CFG_BASE + 0x120),
803 .pinmux_pins = da850_pins, 1040 .pinmux_pins = da850_pins,
804 .pinmux_pins_num = ARRAY_SIZE(da850_pins), 1041 .pinmux_pins_num = ARRAY_SIZE(da850_pins),
805 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT, 1042 .intc_base = (void __iomem *)DA8XX_CP_INTC_VIRT,
@@ -816,5 +1053,22 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
816 1053
817void __init da850_init(void) 1054void __init da850_init(void)
818{ 1055{
1056 da8xx_syscfg_base = ioremap(DA8XX_SYSCFG_BASE, SZ_4K);
1057 if (WARN(!da8xx_syscfg_base, "Unable to map syscfg module"))
1058 return;
1059
1060 davinci_soc_info_da850.jtag_id_base =
1061 DA8XX_SYSCFG_VIRT(DA8XX_JTAG_ID_REG);
1062 davinci_soc_info_da850.pinmux_base = DA8XX_SYSCFG_VIRT(0x120);
1063
819 davinci_common_init(&davinci_soc_info_da850); 1064 davinci_common_init(&davinci_soc_info_da850);
1065
1066 /*
1067 * Move the clock source of Async3 domain to PLL1 SYSCLK2.
1068 * This helps keeping the peripherals on this domain insulated
1069 * from CPU frequency changes caused by DVFS. The firmware sets
1070 * both PLL0 and PLL1 to the same frequency so, there should not
1071 * be any noticible change even in non-DVFS use cases.
1072 */
1073 da850_set_async3_src(1);
820} 1074}
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 58ad5b66fd60..dd2d32c4ce86 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -10,8 +10,6 @@
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 */ 12 */
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/init.h> 13#include <linux/init.h>
16#include <linux/platform_device.h> 14#include <linux/platform_device.h>
17#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
@@ -21,7 +19,7 @@
21#include <mach/common.h> 19#include <mach/common.h>
22#include <mach/time.h> 20#include <mach/time.h>
23#include <mach/da8xx.h> 21#include <mach/da8xx.h>
24#include <video/da8xx-fb.h> 22#include <mach/cpuidle.h>
25 23
26#include "clock.h" 24#include "clock.h"
27 25
@@ -30,6 +28,7 @@
30#define DA8XX_TPTC1_BASE 0x01c08400 28#define DA8XX_TPTC1_BASE 0x01c08400
31#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ 29#define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */
32#define DA8XX_I2C0_BASE 0x01c22000 30#define DA8XX_I2C0_BASE 0x01c22000
31#define DA8XX_RTC_BASE 0x01C23000
33#define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000 32#define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000
34#define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000 33#define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000
35#define DA8XX_EMAC_CPGMAC_BASE 0x01e23000 34#define DA8XX_EMAC_CPGMAC_BASE 0x01e23000
@@ -43,6 +42,8 @@
43#define DA8XX_MDIO_REG_OFFSET 0x4000 42#define DA8XX_MDIO_REG_OFFSET 0x4000
44#define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K 43#define DA8XX_EMAC_CTRL_RAM_SIZE SZ_8K
45 44
45void __iomem *da8xx_syscfg_base;
46
46static struct plat_serial8250_port da8xx_serial_pdata[] = { 47static struct plat_serial8250_port da8xx_serial_pdata[] = {
47 { 48 {
48 .mapbase = DA8XX_UART0_BASE, 49 .mapbase = DA8XX_UART0_BASE,
@@ -282,6 +283,11 @@ static struct platform_device da8xx_emac_device = {
282 .resource = da8xx_emac_resources, 283 .resource = da8xx_emac_resources,
283}; 284};
284 285
286int __init da8xx_register_emac(void)
287{
288 return platform_device_register(&da8xx_emac_device);
289}
290
285static struct resource da830_mcasp1_resources[] = { 291static struct resource da830_mcasp1_resources[] = {
286 { 292 {
287 .name = "mcasp1", 293 .name = "mcasp1",
@@ -338,12 +344,7 @@ static struct platform_device da850_mcasp_device = {
338 .resource = da850_mcasp_resources, 344 .resource = da850_mcasp_resources,
339}; 345};
340 346
341int __init da8xx_register_emac(void) 347void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata)
342{
343 return platform_device_register(&da8xx_emac_device);
344}
345
346void __init da8xx_init_mcasp(int id, struct snd_platform_data *pdata)
347{ 348{
348 /* DA830/OMAP-L137 has 3 instances of McASP */ 349 /* DA830/OMAP-L137 has 3 instances of McASP */
349 if (cpu_is_davinci_da830() && id == 1) { 350 if (cpu_is_davinci_da830() && id == 1) {
@@ -379,10 +380,16 @@ static struct lcd_ctrl_config lcd_cfg = {
379 .raster_order = 0, 380 .raster_order = 0,
380}; 381};
381 382
382static struct da8xx_lcdc_platform_data da850_evm_lcdc_pdata = { 383struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = {
383 .manu_name = "sharp", 384 .manu_name = "sharp",
384 .controller_data = &lcd_cfg, 385 .controller_data = &lcd_cfg,
385 .type = "Sharp_LK043T1DG01", 386 .type = "Sharp_LCD035Q3DG01",
387};
388
389struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata = {
390 .manu_name = "sharp",
391 .controller_data = &lcd_cfg,
392 .type = "Sharp_LK043T1DG01",
386}; 393};
387 394
388static struct resource da8xx_lcdc_resources[] = { 395static struct resource da8xx_lcdc_resources[] = {
@@ -398,19 +405,17 @@ static struct resource da8xx_lcdc_resources[] = {
398 }, 405 },
399}; 406};
400 407
401static struct platform_device da850_lcdc_device = { 408static struct platform_device da8xx_lcdc_device = {
402 .name = "da8xx_lcdc", 409 .name = "da8xx_lcdc",
403 .id = 0, 410 .id = 0,
404 .num_resources = ARRAY_SIZE(da8xx_lcdc_resources), 411 .num_resources = ARRAY_SIZE(da8xx_lcdc_resources),
405 .resource = da8xx_lcdc_resources, 412 .resource = da8xx_lcdc_resources,
406 .dev = {
407 .platform_data = &da850_evm_lcdc_pdata,
408 }
409}; 413};
410 414
411int __init da8xx_register_lcdc(void) 415int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata)
412{ 416{
413 return platform_device_register(&da850_lcdc_device); 417 da8xx_lcdc_device.dev.platform_data = pdata;
418 return platform_device_register(&da8xx_lcdc_device);
414} 419}
415 420
416static struct resource da8xx_mmcsd0_resources[] = { 421static struct resource da8xx_mmcsd0_resources[] = {
@@ -448,3 +453,66 @@ int __init da8xx_register_mmcsd0(struct davinci_mmc_config *config)
448 da8xx_mmcsd0_device.dev.platform_data = config; 453 da8xx_mmcsd0_device.dev.platform_data = config;
449 return platform_device_register(&da8xx_mmcsd0_device); 454 return platform_device_register(&da8xx_mmcsd0_device);
450} 455}
456
457static struct resource da8xx_rtc_resources[] = {
458 {
459 .start = DA8XX_RTC_BASE,
460 .end = DA8XX_RTC_BASE + SZ_4K - 1,
461 .flags = IORESOURCE_MEM,
462 },
463 { /* timer irq */
464 .start = IRQ_DA8XX_RTC,
465 .end = IRQ_DA8XX_RTC,
466 .flags = IORESOURCE_IRQ,
467 },
468 { /* alarm irq */
469 .start = IRQ_DA8XX_RTC,
470 .end = IRQ_DA8XX_RTC,
471 .flags = IORESOURCE_IRQ,
472 },
473};
474
475static struct platform_device da8xx_rtc_device = {
476 .name = "omap_rtc",
477 .id = -1,
478 .num_resources = ARRAY_SIZE(da8xx_rtc_resources),
479 .resource = da8xx_rtc_resources,
480};
481
482int da8xx_register_rtc(void)
483{
484 /* Unlock the rtc's registers */
485 __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c));
486 __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70));
487
488 return platform_device_register(&da8xx_rtc_device);
489}
490
491static struct resource da8xx_cpuidle_resources[] = {
492 {
493 .start = DA8XX_DDR2_CTL_BASE,
494 .end = DA8XX_DDR2_CTL_BASE + SZ_32K - 1,
495 .flags = IORESOURCE_MEM,
496 },
497};
498
499/* DA8XX devices support DDR2 power down */
500static struct davinci_cpuidle_config da8xx_cpuidle_pdata = {
501 .ddr2_pdown = 1,
502};
503
504
505static struct platform_device da8xx_cpuidle_device = {
506 .name = "cpuidle-davinci",
507 .num_resources = ARRAY_SIZE(da8xx_cpuidle_resources),
508 .resource = da8xx_cpuidle_resources,
509 .dev = {
510 .platform_data = &da8xx_cpuidle_pdata,
511 },
512};
513
514int __init da8xx_register_cpuidle(void)
515{
516 return platform_device_register(&da8xx_cpuidle_device);
517}
518
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index a55b650db71e..147949650c25 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -9,15 +9,11 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h> 12#include <linux/init.h>
15#include <linux/platform_device.h> 13#include <linux/platform_device.h>
16#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
17#include <linux/io.h> 15#include <linux/io.h>
18 16
19#include <asm/mach/map.h>
20
21#include <mach/hardware.h> 17#include <mach/hardware.h>
22#include <mach/i2c.h> 18#include <mach/i2c.h>
23#include <mach/irqs.h> 19#include <mach/irqs.h>
@@ -177,7 +173,7 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
177 mmcsd1_resources[0].start = DM365_MMCSD1_BASE; 173 mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
178 mmcsd1_resources[0].end = DM365_MMCSD1_BASE + 174 mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
179 SZ_4K - 1; 175 SZ_4K - 1;
180 mmcsd0_resources[2].start = IRQ_DM365_SDIOINT1; 176 mmcsd1_resources[2].start = IRQ_DM365_SDIOINT1;
181 } else 177 } else
182 break; 178 break;
183 179
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 059670018aff..dedf4d4f3a27 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -8,7 +8,6 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/clk.h> 12#include <linux/clk.h>
14#include <linux/serial_8250.h> 13#include <linux/serial_8250.h>
@@ -21,7 +20,6 @@
21#include <asm/mach/map.h> 20#include <asm/mach/map.h>
22 21
23#include <mach/dm355.h> 22#include <mach/dm355.h>
24#include <mach/clock.h>
25#include <mach/cputype.h> 23#include <mach/cputype.h>
26#include <mach/edma.h> 24#include <mach/edma.h>
27#include <mach/psc.h> 25#include <mach/psc.h>
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index e81517434703..2ec619ec1657 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -12,7 +12,6 @@
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 */ 14 */
15#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/clk.h> 16#include <linux/clk.h>
18#include <linux/serial_8250.h> 17#include <linux/serial_8250.h>
@@ -23,7 +22,6 @@
23#include <asm/mach/map.h> 22#include <asm/mach/map.h>
24 23
25#include <mach/dm365.h> 24#include <mach/dm365.h>
26#include <mach/clock.h>
27#include <mach/cputype.h> 25#include <mach/cputype.h>
28#include <mach/edma.h> 26#include <mach/edma.h>
29#include <mach/psc.h> 27#include <mach/psc.h>
@@ -32,6 +30,8 @@
32#include <mach/time.h> 30#include <mach/time.h>
33#include <mach/serial.h> 31#include <mach/serial.h>
34#include <mach/common.h> 32#include <mach/common.h>
33#include <mach/asp.h>
34#include <mach/keyscan.h>
35 35
36#include "clock.h" 36#include "clock.h"
37#include "mux.h" 37#include "mux.h"
@@ -369,7 +369,7 @@ static struct clk timer3_clk = {
369 369
370static struct clk usb_clk = { 370static struct clk usb_clk = {
371 .name = "usb", 371 .name = "usb",
372 .parent = &pll2_sysclk1, 372 .parent = &pll1_aux_clk,
373 .lpsc = DAVINCI_LPSC_USB, 373 .lpsc = DAVINCI_LPSC_USB,
374}; 374};
375 375
@@ -456,7 +456,7 @@ static struct davinci_clk dm365_clks[] = {
456 CLK(NULL, "usb", &usb_clk), 456 CLK(NULL, "usb", &usb_clk),
457 CLK("davinci_emac.1", NULL, &emac_clk), 457 CLK("davinci_emac.1", NULL, &emac_clk),
458 CLK("voice_codec", NULL, &voicecodec_clk), 458 CLK("voice_codec", NULL, &voicecodec_clk),
459 CLK("soc-audio.0", NULL, &asp0_clk), 459 CLK("davinci-asp.0", NULL, &asp0_clk),
460 CLK(NULL, "rto", &rto_clk), 460 CLK(NULL, "rto", &rto_clk),
461 CLK(NULL, "mjcp", &mjcp_clk), 461 CLK(NULL, "mjcp", &mjcp_clk),
462 CLK(NULL, NULL, NULL), 462 CLK(NULL, NULL, NULL),
@@ -531,7 +531,7 @@ MUX_CFG(DM365, EMAC_CRS, 3, 2, 1, 1, false)
531MUX_CFG(DM365, EMAC_MDIO, 3, 1, 1, 1, false) 531MUX_CFG(DM365, EMAC_MDIO, 3, 1, 1, 1, false)
532MUX_CFG(DM365, EMAC_MDCLK, 3, 0, 1, 1, false) 532MUX_CFG(DM365, EMAC_MDCLK, 3, 0, 1, 1, false)
533 533
534MUX_CFG(DM365, KEYPAD, 2, 0, 0x3f, 0x3f, false) 534MUX_CFG(DM365, KEYSCAN, 2, 0, 0x3f, 0x3f, false)
535 535
536MUX_CFG(DM365, PWM0, 1, 0, 3, 2, false) 536MUX_CFG(DM365, PWM0, 1, 0, 3, 2, false)
537MUX_CFG(DM365, PWM0_G23, 3, 26, 3, 3, false) 537MUX_CFG(DM365, PWM0_G23, 3, 26, 3, 3, false)
@@ -603,6 +603,9 @@ INT_CFG(DM365, INT_IMX1_ENABLE, 24, 1, 1, false)
603INT_CFG(DM365, INT_IMX1_DISABLE, 24, 1, 0, false) 603INT_CFG(DM365, INT_IMX1_DISABLE, 24, 1, 0, false)
604INT_CFG(DM365, INT_NSF_ENABLE, 25, 1, 1, false) 604INT_CFG(DM365, INT_NSF_ENABLE, 25, 1, 1, false)
605INT_CFG(DM365, INT_NSF_DISABLE, 25, 1, 0, false) 605INT_CFG(DM365, INT_NSF_DISABLE, 25, 1, 0, false)
606
607EVT_CFG(DM365, EVT2_ASP_TX, 0, 1, 0, false)
608EVT_CFG(DM365, EVT3_ASP_RX, 1, 1, 0, false)
606#endif 609#endif
607}; 610};
608 611
@@ -696,6 +699,7 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
696 [IRQ_I2C] = 3, 699 [IRQ_I2C] = 3,
697 [IRQ_UARTINT0] = 3, 700 [IRQ_UARTINT0] = 3,
698 [IRQ_UARTINT1] = 3, 701 [IRQ_UARTINT1] = 3,
702 [IRQ_DM365_RTCINT] = 3,
699 [IRQ_DM365_SPIINT0_0] = 3, 703 [IRQ_DM365_SPIINT0_0] = 3,
700 [IRQ_DM365_SPIINT3_0] = 3, 704 [IRQ_DM365_SPIINT3_0] = 3,
701 [IRQ_DM365_GPIO0] = 3, 705 [IRQ_DM365_GPIO0] = 3,
@@ -806,6 +810,50 @@ static struct platform_device dm365_edma_device = {
806 .resource = edma_resources, 810 .resource = edma_resources,
807}; 811};
808 812
813static struct resource dm365_asp_resources[] = {
814 {
815 .start = DAVINCI_DM365_ASP0_BASE,
816 .end = DAVINCI_DM365_ASP0_BASE + SZ_8K - 1,
817 .flags = IORESOURCE_MEM,
818 },
819 {
820 .start = DAVINCI_DMA_ASP0_TX,
821 .end = DAVINCI_DMA_ASP0_TX,
822 .flags = IORESOURCE_DMA,
823 },
824 {
825 .start = DAVINCI_DMA_ASP0_RX,
826 .end = DAVINCI_DMA_ASP0_RX,
827 .flags = IORESOURCE_DMA,
828 },
829};
830
831static struct platform_device dm365_asp_device = {
832 .name = "davinci-asp",
833 .id = 0,
834 .num_resources = ARRAY_SIZE(dm365_asp_resources),
835 .resource = dm365_asp_resources,
836};
837
838static struct resource dm365_rtc_resources[] = {
839 {
840 .start = DM365_RTC_BASE,
841 .end = DM365_RTC_BASE + SZ_1K - 1,
842 .flags = IORESOURCE_MEM,
843 },
844 {
845 .start = IRQ_DM365_RTCINT,
846 .flags = IORESOURCE_IRQ,
847 },
848};
849
850static struct platform_device dm365_rtc_device = {
851 .name = "rtc_davinci",
852 .id = 0,
853 .num_resources = ARRAY_SIZE(dm365_rtc_resources),
854 .resource = dm365_rtc_resources,
855};
856
809static struct map_desc dm365_io_desc[] = { 857static struct map_desc dm365_io_desc[] = {
810 { 858 {
811 .virtual = IO_VIRT, 859 .virtual = IO_VIRT,
@@ -822,6 +870,28 @@ static struct map_desc dm365_io_desc[] = {
822 }, 870 },
823}; 871};
824 872
873static struct resource dm365_ks_resources[] = {
874 {
875 /* registers */
876 .start = DM365_KEYSCAN_BASE,
877 .end = DM365_KEYSCAN_BASE + SZ_1K - 1,
878 .flags = IORESOURCE_MEM,
879 },
880 {
881 /* interrupt */
882 .start = IRQ_DM365_KEYINT,
883 .end = IRQ_DM365_KEYINT,
884 .flags = IORESOURCE_IRQ,
885 },
886};
887
888static struct platform_device dm365_ks_device = {
889 .name = "davinci_keyscan",
890 .id = 0,
891 .num_resources = ARRAY_SIZE(dm365_ks_resources),
892 .resource = dm365_ks_resources,
893};
894
825/* Contents of JTAG ID register used to identify exact cpu type */ 895/* Contents of JTAG ID register used to identify exact cpu type */
826static struct davinci_id dm365_ids[] = { 896static struct davinci_id dm365_ids[] = {
827 { 897 {
@@ -907,6 +977,33 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
907 .sram_len = SZ_32K, 977 .sram_len = SZ_32K,
908}; 978};
909 979
980void __init dm365_init_asp(struct snd_platform_data *pdata)
981{
982 davinci_cfg_reg(DM365_MCBSP0_BDX);
983 davinci_cfg_reg(DM365_MCBSP0_X);
984 davinci_cfg_reg(DM365_MCBSP0_BFSX);
985 davinci_cfg_reg(DM365_MCBSP0_BDR);
986 davinci_cfg_reg(DM365_MCBSP0_R);
987 davinci_cfg_reg(DM365_MCBSP0_BFSR);
988 davinci_cfg_reg(DM365_EVT2_ASP_TX);
989 davinci_cfg_reg(DM365_EVT3_ASP_RX);
990 dm365_asp_device.dev.platform_data = pdata;
991 platform_device_register(&dm365_asp_device);
992}
993
994void __init dm365_init_ks(struct davinci_ks_platform_data *pdata)
995{
996 davinci_cfg_reg(DM365_KEYSCAN);
997 dm365_ks_device.dev.platform_data = pdata;
998 platform_device_register(&dm365_ks_device);
999}
1000
1001void __init dm365_init_rtc(void)
1002{
1003 davinci_cfg_reg(DM365_INT_PRTCSS);
1004 platform_device_register(&dm365_rtc_device);
1005}
1006
910void __init dm365_init(void) 1007void __init dm365_init(void)
911{ 1008{
912 davinci_common_init(&davinci_soc_info_dm365); 1009 davinci_common_init(&davinci_soc_info_dm365);
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index d6e0fa5a8d8a..2cd008156dea 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -8,7 +8,6 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/clk.h> 12#include <linux/clk.h>
14#include <linux/serial_8250.h> 13#include <linux/serial_8250.h>
@@ -18,7 +17,6 @@
18#include <asm/mach/map.h> 17#include <asm/mach/map.h>
19 18
20#include <mach/dm644x.h> 19#include <mach/dm644x.h>
21#include <mach/clock.h>
22#include <mach/cputype.h> 20#include <mach/cputype.h>
23#include <mach/edma.h> 21#include <mach/edma.h>
24#include <mach/irqs.h> 22#include <mach/irqs.h>
@@ -370,6 +368,11 @@ MUX_CFG(DM644X, ATAEN_DISABLE, 0, 17, 1, 0, true)
370MUX_CFG(DM644X, HPIEN_DISABLE, 0, 29, 1, 0, true) 368MUX_CFG(DM644X, HPIEN_DISABLE, 0, 29, 1, 0, true)
371 369
372MUX_CFG(DM644X, AEAW, 0, 0, 31, 31, true) 370MUX_CFG(DM644X, AEAW, 0, 0, 31, 31, true)
371MUX_CFG(DM644X, AEAW0, 0, 0, 1, 0, true)
372MUX_CFG(DM644X, AEAW1, 0, 1, 1, 0, true)
373MUX_CFG(DM644X, AEAW2, 0, 2, 1, 0, true)
374MUX_CFG(DM644X, AEAW3, 0, 3, 1, 0, true)
375MUX_CFG(DM644X, AEAW4, 0, 4, 1, 0, true)
373 376
374MUX_CFG(DM644X, MSTK, 1, 9, 1, 0, false) 377MUX_CFG(DM644X, MSTK, 1, 9, 1, 0, false)
375 378
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 0976049c7b3b..829a44bcf799 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -8,7 +8,6 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/clk.h> 12#include <linux/clk.h>
14#include <linux/serial_8250.h> 13#include <linux/serial_8250.h>
@@ -18,7 +17,6 @@
18#include <asm/mach/map.h> 17#include <asm/mach/map.h>
19 18
20#include <mach/dm646x.h> 19#include <mach/dm646x.h>
21#include <mach/clock.h>
22#include <mach/cputype.h> 20#include <mach/cputype.h>
23#include <mach/edma.h> 21#include <mach/edma.h>
24#include <mach/irqs.h> 22#include <mach/irqs.h>
@@ -789,7 +787,14 @@ static struct davinci_id dm646x_ids[] = {
789 .part_no = 0xb770, 787 .part_no = 0xb770,
790 .manufacturer = 0x017, 788 .manufacturer = 0x017,
791 .cpu_id = DAVINCI_CPU_ID_DM6467, 789 .cpu_id = DAVINCI_CPU_ID_DM6467,
792 .name = "dm6467", 790 .name = "dm6467_rev1.x",
791 },
792 {
793 .variant = 0x1,
794 .part_no = 0xb770,
795 .manufacturer = 0x017,
796 .cpu_id = DAVINCI_CPU_ID_DM6467,
797 .name = "dm6467_rev3.x",
793 }, 798 },
794}; 799};
795 800
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index f2e57d272958..648fbb760ae1 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -18,22 +18,13 @@
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/sched.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <linux/platform_device.h> 24#include <linux/platform_device.h>
26#include <linux/spinlock.h>
27#include <linux/compiler.h>
28#include <linux/io.h> 25#include <linux/io.h>
29 26
30#include <mach/cputype.h>
31#include <mach/memory.h>
32#include <mach/hardware.h>
33#include <mach/irqs.h>
34#include <mach/edma.h> 27#include <mach/edma.h>
35#include <mach/mux.h>
36
37 28
38/* Offsets matching "struct edmacc_param" */ 29/* Offsets matching "struct edmacc_param" */
39#define PARM_OPT 0x00 30#define PARM_OPT 0x00
@@ -509,43 +500,59 @@ static irqreturn_t dma_tc1err_handler(int irq, void *data)
509 return IRQ_HANDLED; 500 return IRQ_HANDLED;
510} 501}
511 502
512static int reserve_contiguous_params(int ctlr, unsigned int id, 503static int reserve_contiguous_slots(int ctlr, unsigned int id,
513 unsigned int num_params, 504 unsigned int num_slots,
514 unsigned int start_param) 505 unsigned int start_slot)
515{ 506{
516 int i, j; 507 int i, j;
517 unsigned int count = num_params; 508 unsigned int count = num_slots;
509 int stop_slot = start_slot;
510 DECLARE_BITMAP(tmp_inuse, EDMA_MAX_PARAMENTRY);
518 511
519 for (i = start_param; i < edma_info[ctlr]->num_slots; ++i) { 512 for (i = start_slot; i < edma_info[ctlr]->num_slots; ++i) {
520 j = EDMA_CHAN_SLOT(i); 513 j = EDMA_CHAN_SLOT(i);
521 if (!test_and_set_bit(j, edma_info[ctlr]->edma_inuse)) 514 if (!test_and_set_bit(j, edma_info[ctlr]->edma_inuse)) {
515 /* Record our current beginning slot */
516 if (count == num_slots)
517 stop_slot = i;
518
522 count--; 519 count--;
520 set_bit(j, tmp_inuse);
521
523 if (count == 0) 522 if (count == 0)
524 break; 523 break;
525 else if (id == EDMA_CONT_PARAMS_FIXED_EXACT) 524 } else {
526 break; 525 clear_bit(j, tmp_inuse);
527 else 526
528 count = num_params; 527 if (id == EDMA_CONT_PARAMS_FIXED_EXACT) {
528 stop_slot = i;
529 break;
530 } else
531 count = num_slots;
532 }
529 } 533 }
530 534
531 /* 535 /*
532 * We have to clear any bits that we set 536 * We have to clear any bits that we set
533 * if we run out parameter RAMs, i.e we do find a set 537 * if we run out parameter RAM slots, i.e we do find a set
534 * of contiguous parameter RAMs but do not find the exact number 538 * of contiguous parameter RAM slots but do not find the exact number
535 * requested as we may reach the total number of parameter RAMs 539 * requested as we may reach the total number of parameter RAM slots
536 */ 540 */
537 if (count) { 541 if (i == edma_info[ctlr]->num_slots)
538 for (j = i - num_params + count + 1; j <= i ; ++j) 542 stop_slot = i;
543
544 for (j = start_slot; j < stop_slot; j++)
545 if (test_bit(j, tmp_inuse))
539 clear_bit(j, edma_info[ctlr]->edma_inuse); 546 clear_bit(j, edma_info[ctlr]->edma_inuse);
540 547
548 if (count)
541 return -EBUSY; 549 return -EBUSY;
542 }
543 550
544 for (j = i - num_params + 1; j <= i; ++j) 551 for (j = i - num_slots + 1; j <= i; ++j)
545 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(j), 552 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(j),
546 &dummy_paramset, PARM_SIZE); 553 &dummy_paramset, PARM_SIZE);
547 554
548 return EDMA_CTLR_CHAN(ctlr, i - num_params + 1); 555 return EDMA_CTLR_CHAN(ctlr, i - num_slots + 1);
549} 556}
550 557
551/*-----------------------------------------------------------------------*/ 558/*-----------------------------------------------------------------------*/
@@ -743,26 +750,27 @@ EXPORT_SYMBOL(edma_free_slot);
743/** 750/**
744 * edma_alloc_cont_slots- alloc contiguous parameter RAM slots 751 * edma_alloc_cont_slots- alloc contiguous parameter RAM slots
745 * The API will return the starting point of a set of 752 * The API will return the starting point of a set of
746 * contiguous PARAM's that have been requested 753 * contiguous parameter RAM slots that have been requested
747 * 754 *
748 * @id: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT 755 * @id: can only be EDMA_CONT_PARAMS_ANY or EDMA_CONT_PARAMS_FIXED_EXACT
749 * or EDMA_CONT_PARAMS_FIXED_NOT_EXACT 756 * or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
750 * @count: number of contiguous Paramter RAM's 757 * @count: number of contiguous Paramter RAM slots
751 * @param - the start value of Parameter RAM that should be passed if id 758 * @slot - the start value of Parameter RAM slot that should be passed if id
752 * is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT 759 * is EDMA_CONT_PARAMS_FIXED_EXACT or EDMA_CONT_PARAMS_FIXED_NOT_EXACT
753 * 760 *
754 * If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of 761 * If id is EDMA_CONT_PARAMS_ANY then the API starts looking for a set of
755 * contiguous Parameter RAMs from parameter RAM 64 in the case of DaVinci SOCs 762 * contiguous Parameter RAM slots from parameter RAM 64 in the case of
756 * and 32 in the case of Primus 763 * DaVinci SOCs and 32 in the case of DA8xx SOCs.
757 * 764 *
758 * If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a 765 * If id is EDMA_CONT_PARAMS_FIXED_EXACT then the API starts looking for a
759 * set of contiguous parameter RAMs from the "param" that is passed as an 766 * set of contiguous parameter RAM slots from the "slot" that is passed as an
760 * argument to the API. 767 * argument to the API.
761 * 768 *
762 * If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries 769 * If id is EDMA_CONT_PARAMS_FIXED_NOT_EXACT then the API initially tries
763 * starts looking for a set of contiguous parameter RAMs from the "param" 770 * starts looking for a set of contiguous parameter RAMs from the "slot"
764 * that is passed as an argument to the API. On failure the API will try to 771 * that is passed as an argument to the API. On failure the API will try to
765 * find a set of contiguous Parameter RAMs in the remaining Parameter RAMs 772 * find a set of contiguous Parameter RAM slots from the remaining Parameter
773 * RAM slots
766 */ 774 */
767int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count) 775int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
768{ 776{
@@ -771,12 +779,13 @@ int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
771 * the number of channels and lesser than the total number 779 * the number of channels and lesser than the total number
772 * of slots 780 * of slots
773 */ 781 */
774 if (slot < edma_info[ctlr]->num_channels || 782 if ((id != EDMA_CONT_PARAMS_ANY) &&
775 slot >= edma_info[ctlr]->num_slots) 783 (slot < edma_info[ctlr]->num_channels ||
784 slot >= edma_info[ctlr]->num_slots))
776 return -EINVAL; 785 return -EINVAL;
777 786
778 /* 787 /*
779 * The number of parameter RAMs requested cannot be less than 1 788 * The number of parameter RAM slots requested cannot be less than 1
780 * and cannot be more than the number of slots minus the number of 789 * and cannot be more than the number of slots minus the number of
781 * channels 790 * channels
782 */ 791 */
@@ -786,11 +795,11 @@ int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
786 795
787 switch (id) { 796 switch (id) {
788 case EDMA_CONT_PARAMS_ANY: 797 case EDMA_CONT_PARAMS_ANY:
789 return reserve_contiguous_params(ctlr, id, count, 798 return reserve_contiguous_slots(ctlr, id, count,
790 edma_info[ctlr]->num_channels); 799 edma_info[ctlr]->num_channels);
791 case EDMA_CONT_PARAMS_FIXED_EXACT: 800 case EDMA_CONT_PARAMS_FIXED_EXACT:
792 case EDMA_CONT_PARAMS_FIXED_NOT_EXACT: 801 case EDMA_CONT_PARAMS_FIXED_NOT_EXACT:
793 return reserve_contiguous_params(ctlr, id, count, slot); 802 return reserve_contiguous_slots(ctlr, id, count, slot);
794 default: 803 default:
795 return -EINVAL; 804 return -EINVAL;
796 } 805 }
@@ -799,21 +808,21 @@ int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count)
799EXPORT_SYMBOL(edma_alloc_cont_slots); 808EXPORT_SYMBOL(edma_alloc_cont_slots);
800 809
801/** 810/**
802 * edma_free_cont_slots - deallocate DMA parameter RAMs 811 * edma_free_cont_slots - deallocate DMA parameter RAM slots
803 * @slot: first parameter RAM of a set of parameter RAMs to be freed 812 * @slot: first parameter RAM of a set of parameter RAM slots to be freed
804 * @count: the number of contiguous parameter RAMs to be freed 813 * @count: the number of contiguous parameter RAM slots to be freed
805 * 814 *
806 * This deallocates the parameter RAM slots allocated by 815 * This deallocates the parameter RAM slots allocated by
807 * edma_alloc_cont_slots. 816 * edma_alloc_cont_slots.
808 * Callers/applications need to keep track of sets of contiguous 817 * Callers/applications need to keep track of sets of contiguous
809 * parameter RAMs that have been allocated using the edma_alloc_cont_slots 818 * parameter RAM slots that have been allocated using the edma_alloc_cont_slots
810 * API. 819 * API.
811 * Callers are responsible for ensuring the slots are inactive, and will 820 * Callers are responsible for ensuring the slots are inactive, and will
812 * not be activated. 821 * not be activated.
813 */ 822 */
814int edma_free_cont_slots(unsigned slot, int count) 823int edma_free_cont_slots(unsigned slot, int count)
815{ 824{
816 unsigned ctlr; 825 unsigned ctlr, slot_to_free;
817 int i; 826 int i;
818 827
819 ctlr = EDMA_CTLR(slot); 828 ctlr = EDMA_CTLR(slot);
@@ -826,11 +835,11 @@ int edma_free_cont_slots(unsigned slot, int count)
826 835
827 for (i = slot; i < slot + count; ++i) { 836 for (i = slot; i < slot + count; ++i) {
828 ctlr = EDMA_CTLR(i); 837 ctlr = EDMA_CTLR(i);
829 slot = EDMA_CHAN_SLOT(i); 838 slot_to_free = EDMA_CHAN_SLOT(i);
830 839
831 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot), 840 memcpy_toio(edmacc_regs_base[ctlr] + PARM_OFFSET(slot_to_free),
832 &dummy_paramset, PARM_SIZE); 841 &dummy_paramset, PARM_SIZE);
833 clear_bit(slot, edma_info[ctlr]->edma_inuse); 842 clear_bit(slot_to_free, edma_info[ctlr]->edma_inuse);
834 } 843 }
835 844
836 return 0; 845 return 0;
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
index f6ea9db11f41..744755b53236 100644
--- a/arch/arm/mach-davinci/gpio.c
+++ b/arch/arm/mach-davinci/gpio.c
@@ -12,23 +12,14 @@
12 12
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/module.h>
17#include <linux/clk.h> 15#include <linux/clk.h>
18#include <linux/err.h> 16#include <linux/err.h>
19#include <linux/io.h> 17#include <linux/io.h>
20#include <linux/irq.h>
21#include <linux/bitops.h>
22 18
23#include <mach/cputype.h>
24#include <mach/irqs.h>
25#include <mach/hardware.h>
26#include <mach/common.h>
27#include <mach/gpio.h> 19#include <mach/gpio.h>
28 20
29#include <asm/mach/irq.h> 21#include <asm/mach/irq.h>
30 22
31
32static DEFINE_SPINLOCK(gpio_lock); 23static DEFINE_SPINLOCK(gpio_lock);
33 24
34struct davinci_gpio { 25struct davinci_gpio {
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
index e07f70ed7c53..834725f1e81d 100644
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ b/arch/arm/mach-davinci/include/mach/asp.h
@@ -11,6 +11,9 @@
11#define DAVINCI_ASP0_BASE 0x01E02000 11#define DAVINCI_ASP0_BASE 0x01E02000
12#define DAVINCI_ASP1_BASE 0x01E04000 12#define DAVINCI_ASP1_BASE 0x01E04000
13 13
14/* Bases of dm365 register banks */
15#define DAVINCI_DM365_ASP0_BASE 0x01D02000
16
14/* Bases of dm646x register banks */ 17/* Bases of dm646x register banks */
15#define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000 18#define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000
16#define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800 19#define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 1fd3917cae4e..6ca2c9a0a482 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -20,12 +20,6 @@ extern void davinci_irq_init(void);
20extern void __iomem *davinci_intc_base; 20extern void __iomem *davinci_intc_base;
21extern int davinci_intc_type; 21extern int davinci_intc_type;
22 22
23/* parameters describe VBUS sourcing for host mode */
24extern void setup_usb(unsigned mA, unsigned potpgt_msec);
25
26/* parameters describe VBUS sourcing for host mode */
27extern void setup_usb(unsigned mA, unsigned potpgt_msec);
28
29struct davinci_timer_instance { 23struct davinci_timer_instance {
30 void __iomem *base; 24 void __iomem *base;
31 u32 bottom_irq; 25 u32 bottom_irq;
diff --git a/arch/arm/mach-davinci/include/mach/cpufreq.h b/arch/arm/mach-davinci/include/mach/cpufreq.h
new file mode 100644
index 000000000000..3c089cfb6cd6
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/cpufreq.h
@@ -0,0 +1,26 @@
1/*
2 * TI DaVinci CPUFreq platform support.
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
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 as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15#ifndef _MACH_DAVINCI_CPUFREQ_H
16#define _MACH_DAVINCI_CPUFREQ_H
17
18#include <linux/cpufreq.h>
19
20struct davinci_cpufreq_config {
21 struct cpufreq_frequency_table *freq_table;
22 int (*set_voltage) (unsigned int index);
23 int (*init) (void);
24};
25
26#endif
diff --git a/arch/arm/mach-davinci/include/mach/cpuidle.h b/arch/arm/mach-davinci/include/mach/cpuidle.h
new file mode 100644
index 000000000000..cbfc6a9c81b4
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/cpuidle.h
@@ -0,0 +1,17 @@
1/*
2 * TI DaVinci cpuidle platform support
3 *
4 * 2009 (C) Texas Instruments, Inc. http://www.ti.com/
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10#ifndef _MACH_DAVINCI_CPUIDLE_H
11#define _MACH_DAVINCI_CPUIDLE_H
12
13struct davinci_cpuidle_config {
14 u32 ddr2_pdown;
15};
16
17#endif
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index d4095d0572c6..90704910d343 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -11,12 +11,17 @@
11#ifndef __ASM_ARCH_DAVINCI_DA8XX_H 11#ifndef __ASM_ARCH_DAVINCI_DA8XX_H
12#define __ASM_ARCH_DAVINCI_DA8XX_H 12#define __ASM_ARCH_DAVINCI_DA8XX_H
13 13
14#include <video/da8xx-fb.h>
15
14#include <mach/serial.h> 16#include <mach/serial.h>
15#include <mach/edma.h> 17#include <mach/edma.h>
16#include <mach/i2c.h> 18#include <mach/i2c.h>
17#include <mach/emac.h> 19#include <mach/emac.h>
18#include <mach/asp.h> 20#include <mach/asp.h>
19#include <mach/mmc.h> 21#include <mach/mmc.h>
22#include <mach/usb.h>
23
24extern void __iomem *da8xx_syscfg_base;
20 25
21/* 26/*
22 * The cp_intc interrupt controller for the da8xx isn't in the same 27 * The cp_intc interrupt controller for the da8xx isn't in the same
@@ -29,11 +34,15 @@
29#define DA8XX_CP_INTC_SIZE SZ_8K 34#define DA8XX_CP_INTC_SIZE SZ_8K
30#define DA8XX_CP_INTC_VIRT (IO_VIRT - DA8XX_CP_INTC_SIZE - SZ_4K) 35#define DA8XX_CP_INTC_VIRT (IO_VIRT - DA8XX_CP_INTC_SIZE - SZ_4K)
31 36
32#define DA8XX_BOOT_CFG_BASE (IO_PHYS + 0x14000) 37#define DA8XX_SYSCFG_BASE (IO_PHYS + 0x14000)
38#define DA8XX_SYSCFG_VIRT(x) (da8xx_syscfg_base + (x))
39#define DA8XX_JTAG_ID_REG 0x18
40#define DA8XX_CFGCHIP0_REG 0x17c
41#define DA8XX_CFGCHIP2_REG 0x184
42#define DA8XX_CFGCHIP3_REG 0x188
33 43
34#define DA8XX_PSC0_BASE 0x01c10000 44#define DA8XX_PSC0_BASE 0x01c10000
35#define DA8XX_PLL0_BASE 0x01c11000 45#define DA8XX_PLL0_BASE 0x01c11000
36#define DA8XX_JTAG_ID_REG 0x01c14018
37#define DA8XX_TIMER64P0_BASE 0x01c20000 46#define DA8XX_TIMER64P0_BASE 0x01c20000
38#define DA8XX_TIMER64P1_BASE 0x01c21000 47#define DA8XX_TIMER64P1_BASE 0x01c21000
39#define DA8XX_GPIO_BASE 0x01e26000 48#define DA8XX_GPIO_BASE 0x01e26000
@@ -43,6 +52,7 @@
43#define DA8XX_AEMIF_CS2_BASE 0x60000000 52#define DA8XX_AEMIF_CS2_BASE 0x60000000
44#define DA8XX_AEMIF_CS3_BASE 0x62000000 53#define DA8XX_AEMIF_CS3_BASE 0x62000000
45#define DA8XX_AEMIF_CTL_BASE 0x68000000 54#define DA8XX_AEMIF_CTL_BASE 0x68000000
55#define DA8XX_DDR2_CTL_BASE 0xb0000000
46 56
47#define PINMUX0 0x00 57#define PINMUX0 0x00
48#define PINMUX1 0x04 58#define PINMUX1 0x04
@@ -71,13 +81,20 @@ void __init da850_init(void);
71int da8xx_register_edma(void); 81int da8xx_register_edma(void);
72int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); 82int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata);
73int da8xx_register_watchdog(void); 83int da8xx_register_watchdog(void);
84int da8xx_register_usb20(unsigned mA, unsigned potpgt);
85int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata);
74int da8xx_register_emac(void); 86int da8xx_register_emac(void);
75int da8xx_register_lcdc(void); 87int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
76int da8xx_register_mmcsd0(struct davinci_mmc_config *config); 88int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
77void __init da8xx_init_mcasp(int id, struct snd_platform_data *pdata); 89void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata);
90int da8xx_register_rtc(void);
91int da850_register_cpufreq(void);
92int da8xx_register_cpuidle(void);
78 93
79extern struct platform_device da8xx_serial_device; 94extern struct platform_device da8xx_serial_device;
80extern struct emac_platform_data da8xx_emac_pdata; 95extern struct emac_platform_data da8xx_emac_pdata;
96extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata;
97extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;
81 98
82extern const short da830_emif25_pins[]; 99extern const short da830_emif25_pins[];
83extern const short da830_spi0_pins[]; 100extern const short da830_spi0_pins[];
@@ -110,6 +127,7 @@ extern const short da850_uart2_pins[];
110extern const short da850_i2c0_pins[]; 127extern const short da850_i2c0_pins[];
111extern const short da850_i2c1_pins[]; 128extern const short da850_i2c1_pins[];
112extern const short da850_cpgmac_pins[]; 129extern const short da850_cpgmac_pins[];
130extern const short da850_rmii_pins[];
113extern const short da850_mcasp_pins[]; 131extern const short da850_mcasp_pins[];
114extern const short da850_lcdcntl_pins[]; 132extern const short da850_lcdcntl_pins[];
115extern const short da850_mmcsd0_pins[]; 133extern const short da850_mmcsd0_pins[];
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h
index 09db4343bb4c..f1710a30e7ba 100644
--- a/arch/arm/mach-davinci/include/mach/dm365.h
+++ b/arch/arm/mach-davinci/include/mach/dm365.h
@@ -16,6 +16,8 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18#include <mach/emac.h> 18#include <mach/emac.h>
19#include <mach/asp.h>
20#include <mach/keyscan.h>
19 21
20#define DM365_EMAC_BASE (0x01D07000) 22#define DM365_EMAC_BASE (0x01D07000)
21#define DM365_EMAC_CNTRL_OFFSET (0x0000) 23#define DM365_EMAC_CNTRL_OFFSET (0x0000)
@@ -24,6 +26,14 @@
24#define DM365_EMAC_MDIO_OFFSET (0x4000) 26#define DM365_EMAC_MDIO_OFFSET (0x4000)
25#define DM365_EMAC_CNTRL_RAM_SIZE (0x2000) 27#define DM365_EMAC_CNTRL_RAM_SIZE (0x2000)
26 28
29/* Base of key scan register bank */
30#define DM365_KEYSCAN_BASE (0x01C69400)
31
32#define DM365_RTC_BASE (0x01C69000)
33
27void __init dm365_init(void); 34void __init dm365_init(void);
35void __init dm365_init_asp(struct snd_platform_data *pdata);
36void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
37void __init dm365_init_rtc(void);
28 38
29#endif /* __ASM_ARCH_DM365_H */ 39#endif /* __ASM_ARCH_DM365_H */
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h
index 0efb73852c2c..44e8f0fae9ea 100644
--- a/arch/arm/mach-davinci/include/mach/dm644x.h
+++ b/arch/arm/mach-davinci/include/mach/dm644x.h
@@ -22,7 +22,6 @@
22#ifndef __ASM_ARCH_DM644X_H 22#ifndef __ASM_ARCH_DM644X_H
23#define __ASM_ARCH_DM644X_H 23#define __ASM_ARCH_DM644X_H
24 24
25#include <linux/platform_device.h>
26#include <mach/hardware.h> 25#include <mach/hardware.h>
27#include <mach/emac.h> 26#include <mach/emac.h>
28#include <mach/asp.h> 27#include <mach/asp.h>
diff --git a/arch/arm/mach-davinci/include/mach/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h
index 3c918a772619..354af71798dc 100644
--- a/arch/arm/mach-davinci/include/mach/irqs.h
+++ b/arch/arm/mach-davinci/include/mach/irqs.h
@@ -217,6 +217,7 @@
217#define IRQ_DM365_SDIOINT0 23 217#define IRQ_DM365_SDIOINT0 23
218#define IRQ_DM365_MMCINT1 27 218#define IRQ_DM365_MMCINT1 27
219#define IRQ_DM365_PWMINT3 28 219#define IRQ_DM365_PWMINT3 28
220#define IRQ_DM365_RTCINT 29
220#define IRQ_DM365_SDIOINT1 31 221#define IRQ_DM365_SDIOINT1 31
221#define IRQ_DM365_SPIINT0_0 42 222#define IRQ_DM365_SPIINT0_0 42
222#define IRQ_DM365_SPIINT3_0 43 223#define IRQ_DM365_SPIINT3_0 43
diff --git a/arch/arm/mach-davinci/include/mach/keyscan.h b/arch/arm/mach-davinci/include/mach/keyscan.h
new file mode 100644
index 000000000000..b4e21a2976d1
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/keyscan.h
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2009 Texas Instruments, Inc
3 *
4 * Author: Miguel Aguilar <miguel.aguilar@ridgerun.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
21#ifndef DAVINCI_KEYSCAN_H
22#define DAVINCI_KEYSCAN_H
23
24#include <linux/io.h>
25
26enum davinci_matrix_types {
27 DAVINCI_KEYSCAN_MATRIX_4X4,
28 DAVINCI_KEYSCAN_MATRIX_5X3,
29};
30
31struct davinci_ks_platform_data {
32 unsigned short *keymap;
33 u32 keymapsize;
34 u8 rep:1;
35 u8 strobe;
36 u8 interval;
37 u8 matrix_type;
38};
39
40#endif
41
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
index bb84893a4e83..b60c693985ff 100644
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -40,6 +40,11 @@ enum davinci_dm644x_index {
40 40
41 /* AEAW functions */ 41 /* AEAW functions */
42 DM644X_AEAW, 42 DM644X_AEAW,
43 DM644X_AEAW0,
44 DM644X_AEAW1,
45 DM644X_AEAW2,
46 DM644X_AEAW3,
47 DM644X_AEAW4,
43 48
44 /* Memory Stick */ 49 /* Memory Stick */
45 DM644X_MSTK, 50 DM644X_MSTK,
@@ -237,8 +242,8 @@ enum davinci_dm365_index {
237 DM365_EMAC_MDIO, 242 DM365_EMAC_MDIO,
238 DM365_EMAC_MDCLK, 243 DM365_EMAC_MDCLK,
239 244
240 /* Keypad */ 245 /* Key Scan */
241 DM365_KEYPAD, 246 DM365_KEYSCAN,
242 247
243 /* PWM */ 248 /* PWM */
244 DM365_PWM0, 249 DM365_PWM0,
@@ -774,6 +779,14 @@ enum davinci_da850_index {
774 DA850_MII_RXD_0, 779 DA850_MII_RXD_0,
775 DA850_MDIO_CLK, 780 DA850_MDIO_CLK,
776 DA850_MDIO_D, 781 DA850_MDIO_D,
782 DA850_RMII_TXD_0,
783 DA850_RMII_TXD_1,
784 DA850_RMII_TXEN,
785 DA850_RMII_CRS_DV,
786 DA850_RMII_RXD_0,
787 DA850_RMII_RXD_1,
788 DA850_RMII_RXER,
789 DA850_RMII_MHZ_50_CLK,
777 790
778 /* McASP function */ 791 /* McASP function */
779 DA850_ACLKR, 792 DA850_ACLKR,
@@ -881,8 +894,9 @@ enum davinci_da850_index {
881 DA850_NEMA_CS_2, 894 DA850_NEMA_CS_2,
882 895
883 /* GPIO function */ 896 /* GPIO function */
897 DA850_GPIO2_6,
898 DA850_GPIO2_8,
884 DA850_GPIO2_15, 899 DA850_GPIO2_15,
885 DA850_GPIO8_10,
886 DA850_GPIO4_0, 900 DA850_GPIO4_0,
887 DA850_GPIO4_1, 901 DA850_GPIO4_1,
888}; 902};
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h
index b520c4b5678a..b2ad8090bd10 100644
--- a/arch/arm/mach-davinci/include/mach/nand.h
+++ b/arch/arm/mach-davinci/include/mach/nand.h
@@ -79,6 +79,10 @@ struct davinci_nand_pdata { /* platform_data */
79 79
80 /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ 80 /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */
81 unsigned options; 81 unsigned options;
82
83 /* Main and mirror bbt descriptor overrides */
84 struct nand_bbt_descr *bbt_td;
85 struct nand_bbt_descr *bbt_md;
82}; 86};
83 87
84#endif /* __ARCH_ARM_DAVINCI_NAND_H */ 88#endif /* __ARCH_ARM_DAVINCI_NAND_H */
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
index 8e4f10fe1263..5a7d7581b8ce 100644
--- a/arch/arm/mach-davinci/include/mach/system.h
+++ b/arch/arm/mach-davinci/include/mach/system.h
@@ -11,9 +11,6 @@
11#ifndef __ASM_ARCH_SYSTEM_H 11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H 12#define __ASM_ARCH_SYSTEM_H
13 13
14#include <linux/io.h>
15#include <mach/hardware.h>
16
17extern void davinci_watchdog_reset(void); 14extern void davinci_watchdog_reset(void);
18 15
19static inline void arch_idle(void) 16static inline void arch_idle(void)
diff --git a/arch/arm/mach-davinci/include/mach/usb.h b/arch/arm/mach-davinci/include/mach/usb.h
new file mode 100644
index 000000000000..e0bc4abe69c2
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/usb.h
@@ -0,0 +1,59 @@
1/*
2 * USB related definitions
3 *
4 * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_USB_H
12#define __ASM_ARCH_USB_H
13
14/* DA8xx CFGCHIP2 (USB 2.0 PHY Control) register bits */
15#define CFGCHIP2_PHYCLKGD (1 << 17)
16#define CFGCHIP2_VBUSSENSE (1 << 16)
17#define CFGCHIP2_RESET (1 << 15)
18#define CFGCHIP2_OTGMODE (3 << 13)
19#define CFGCHIP2_NO_OVERRIDE (0 << 13)
20#define CFGCHIP2_FORCE_HOST (1 << 13)
21#define CFGCHIP2_FORCE_DEVICE (2 << 13)
22#define CFGCHIP2_FORCE_HOST_VBUS_LOW (3 << 13)
23#define CFGCHIP2_USB1PHYCLKMUX (1 << 12)
24#define CFGCHIP2_USB2PHYCLKMUX (1 << 11)
25#define CFGCHIP2_PHYPWRDN (1 << 10)
26#define CFGCHIP2_OTGPWRDN (1 << 9)
27#define CFGCHIP2_DATPOL (1 << 8)
28#define CFGCHIP2_USB1SUSPENDM (1 << 7)
29#define CFGCHIP2_PHY_PLLON (1 << 6) /* override PLL suspend */
30#define CFGCHIP2_SESENDEN (1 << 5) /* Vsess_end comparator */
31#define CFGCHIP2_VBDTCTEN (1 << 4) /* Vbus comparator */
32#define CFGCHIP2_REFFREQ (0xf << 0)
33#define CFGCHIP2_REFFREQ_12MHZ (1 << 0)
34#define CFGCHIP2_REFFREQ_24MHZ (2 << 0)
35#define CFGCHIP2_REFFREQ_48MHZ (3 << 0)
36
37struct da8xx_ohci_root_hub;
38
39typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
40 unsigned port);
41
42/* Passed as the platform data to the OHCI driver */
43struct da8xx_ohci_root_hub {
44 /* Switch the port power on/off */
45 int (*set_power)(unsigned port, int on);
46 /* Read the port power status */
47 int (*get_power)(unsigned port);
48 /* Read the port over-current indicator */
49 int (*get_oci)(unsigned port);
50 /* Over-current indicator change notification (pass NULL to disable) */
51 int (*ocic_notify)(da8xx_ocic_handler_t handler);
52
53 /* Time from power on to power good (in 2 ms units) */
54 u8 potpgt;
55};
56
57void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
58
59#endif /* ifndef __ASM_ARCH_USB_H */
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index 898905e48946..f757e83415f3 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -19,7 +19,6 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21 21
22#include <mach/hardware.h>
23#include <mach/mux.h> 22#include <mach/mux.h>
24#include <mach/common.h> 23#include <mach/common.h>
25 24
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index a78b657e916e..04a3cb72c5ab 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -19,14 +19,11 @@
19 * 19 *
20 */ 20 */
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/module.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/io.h> 23#include <linux/io.h>
25 24
26#include <mach/cputype.h> 25#include <mach/cputype.h>
27#include <mach/hardware.h>
28#include <mach/psc.h> 26#include <mach/psc.h>
29#include <mach/mux.h>
30 27
31/* PSC register offsets */ 28/* PSC register offsets */
32#define EPCPR 0x070 29#define EPCPR 0x070
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c
index c530c7333d0a..7ce5ba086575 100644
--- a/arch/arm/mach-davinci/serial.c
+++ b/arch/arm/mach-davinci/serial.c
@@ -28,14 +28,8 @@
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/io.h> 29#include <linux/io.h>
30 30
31#include <asm/irq.h>
32#include <mach/hardware.h>
33#include <mach/serial.h> 31#include <mach/serial.h>
34#include <mach/irqs.h>
35#include <mach/cputype.h> 32#include <mach/cputype.h>
36#include <mach/common.h>
37
38#include "clock.h"
39 33
40static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, 34static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
41 int offset) 35 int offset)
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index 4f1fc9b318b3..db0f7787faf1 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -9,15 +9,12 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/genalloc.h> 13#include <linux/genalloc.h>
15 14
16#include <mach/common.h> 15#include <mach/common.h>
17#include <mach/memory.h>
18#include <mach/sram.h> 16#include <mach/sram.h>
19 17
20
21static struct gen_pool *sram_pool; 18static struct gen_pool *sram_pool;
22 19
23void *sram_alloc(size_t len, dma_addr_t *dma) 20void *sram_alloc(size_t len, dma_addr_t *dma)
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 0d1b6d407b46..42d985beece5 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -14,20 +14,14 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/clocksource.h> 15#include <linux/clocksource.h>
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17#include <linux/spinlock.h>
18#include <linux/io.h> 17#include <linux/io.h>
19#include <linux/clk.h> 18#include <linux/clk.h>
20#include <linux/err.h> 19#include <linux/err.h>
21#include <linux/device.h>
22#include <linux/platform_device.h> 20#include <linux/platform_device.h>
23 21
24#include <mach/hardware.h> 22#include <mach/hardware.h>
25#include <asm/system.h>
26#include <asm/irq.h>
27#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
28#include <asm/mach/time.h> 24#include <asm/mach/time.h>
29#include <asm/errno.h>
30#include <mach/io.h>
31#include <mach/cputype.h> 25#include <mach/cputype.h>
32#include <mach/time.h> 26#include <mach/time.h>
33#include "clock.h" 27#include "clock.h"
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 06f55931620c..31f0cbea0caa 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -1,21 +1,21 @@
1/* 1/*
2 * USB 2 * USB
3 */ 3 */
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/init.h> 4#include <linux/init.h>
7#include <linux/platform_device.h> 5#include <linux/platform_device.h>
8#include <linux/dma-mapping.h> 6#include <linux/dma-mapping.h>
9 7
10#include <linux/usb/musb.h> 8#include <linux/usb/musb.h>
11#include <linux/usb/otg.h>
12 9
13#include <mach/common.h> 10#include <mach/common.h>
14#include <mach/hardware.h>
15#include <mach/irqs.h> 11#include <mach/irqs.h>
16#include <mach/cputype.h> 12#include <mach/cputype.h>
13#include <mach/usb.h>
17 14
18#define DAVINCI_USB_OTG_BASE 0x01C64000 15#define DAVINCI_USB_OTG_BASE 0x01c64000
16
17#define DA8XX_USB0_BASE 0x01e00000
18#define DA8XX_USB1_BASE 0x01e25000
19 19
20#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 20#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
21static struct musb_hdrc_eps_bits musb_eps[] = { 21static struct musb_hdrc_eps_bits musb_eps[] = {
@@ -85,10 +85,10 @@ static struct platform_device usb_dev = {
85 .num_resources = ARRAY_SIZE(usb_resources), 85 .num_resources = ARRAY_SIZE(usb_resources),
86}; 86};
87 87
88void __init setup_usb(unsigned mA, unsigned potpgt_msec) 88void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
89{ 89{
90 usb_data.power = mA / 2; 90 usb_data.power = mA > 510 ? 255 : mA / 2;
91 usb_data.potpgt = potpgt_msec / 2; 91 usb_data.potpgt = (potpgt_ms + 1) / 2;
92 92
93 if (cpu_is_davinci_dm646x()) { 93 if (cpu_is_davinci_dm646x()) {
94 /* Override the defaults as DM6467 uses different IRQs. */ 94 /* Override the defaults as DM6467 uses different IRQs. */
@@ -100,11 +100,77 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
100 platform_device_register(&usb_dev); 100 platform_device_register(&usb_dev);
101} 101}
102 102
103#ifdef CONFIG_ARCH_DAVINCI_DA8XX
104static struct resource da8xx_usb20_resources[] = {
105 {
106 .start = DA8XX_USB0_BASE,
107 .end = DA8XX_USB0_BASE + SZ_64K - 1,
108 .flags = IORESOURCE_MEM,
109 },
110 {
111 .start = IRQ_DA8XX_USB_INT,
112 .flags = IORESOURCE_IRQ,
113 },
114};
115
116int __init da8xx_register_usb20(unsigned mA, unsigned potpgt)
117{
118 usb_data.clock = "usb20";
119 usb_data.power = mA > 510 ? 255 : mA / 2;
120 usb_data.potpgt = (potpgt + 1) / 2;
121
122 usb_dev.resource = da8xx_usb20_resources;
123 usb_dev.num_resources = ARRAY_SIZE(da8xx_usb20_resources);
124
125 return platform_device_register(&usb_dev);
126}
127#endif /* CONFIG_DAVINCI_DA8XX */
128
103#else 129#else
104 130
105void __init setup_usb(unsigned mA, unsigned potpgt_msec) 131void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
106{ 132{
107} 133}
108 134
135#ifdef CONFIG_ARCH_DAVINCI_DA8XX
136int __init da8xx_register_usb20(unsigned mA, unsigned potpgt)
137{
138 return 0;
139}
140#endif
141
109#endif /* CONFIG_USB_MUSB_HDRC */ 142#endif /* CONFIG_USB_MUSB_HDRC */
110 143
144#ifdef CONFIG_ARCH_DAVINCI_DA8XX
145static struct resource da8xx_usb11_resources[] = {
146 [0] = {
147 .start = DA8XX_USB1_BASE,
148 .end = DA8XX_USB1_BASE + SZ_4K - 1,
149 .flags = IORESOURCE_MEM,
150 },
151 [1] = {
152 .start = IRQ_DA8XX_IRQN,
153 .end = IRQ_DA8XX_IRQN,
154 .flags = IORESOURCE_IRQ,
155 },
156};
157
158static u64 da8xx_usb11_dma_mask = DMA_BIT_MASK(32);
159
160static struct platform_device da8xx_usb11_device = {
161 .name = "ohci",
162 .id = 0,
163 .dev = {
164 .dma_mask = &da8xx_usb11_dma_mask,
165 .coherent_dma_mask = DMA_BIT_MASK(32),
166 },
167 .num_resources = ARRAY_SIZE(da8xx_usb11_resources),
168 .resource = da8xx_usb11_resources,
169};
170
171int __init da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata)
172{
173 da8xx_usb11_device.dev.platform_data = pdata;
174 return platform_device_register(&da8xx_usb11_device);
175}
176#endif /* CONFIG_DAVINCI_DA8XX */
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h
index 83f31cd0a274..62d17421e48c 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h
@@ -5,9 +5,6 @@
5#ifndef __ASM_ARCH_EP93XX_KEYPAD_H 5#ifndef __ASM_ARCH_EP93XX_KEYPAD_H
6#define __ASM_ARCH_EP93XX_KEYPAD_H 6#define __ASM_ARCH_EP93XX_KEYPAD_H
7 7
8#define MAX_MATRIX_KEY_ROWS (8)
9#define MAX_MATRIX_KEY_COLS (8)
10
11/* flags for the ep93xx_keypad driver */ 8/* flags for the ep93xx_keypad driver */
12#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */ 9#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */
13#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */ 10#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
@@ -18,8 +15,6 @@
18 15
19/** 16/**
20 * struct ep93xx_keypad_platform_data - platform specific device structure 17 * struct ep93xx_keypad_platform_data - platform specific device structure
21 * @matrix_key_rows: number of rows in the keypad matrix
22 * @matrix_key_cols: number of columns in the keypad matrix
23 * @matrix_key_map: array of keycodes defining the keypad matrix 18 * @matrix_key_map: array of keycodes defining the keypad matrix
24 * @matrix_key_map_size: ARRAY_SIZE(matrix_key_map) 19 * @matrix_key_map_size: ARRAY_SIZE(matrix_key_map)
25 * @debounce: debounce start count; terminal count is 0xff 20 * @debounce: debounce start count; terminal count is 0xff
@@ -27,8 +22,6 @@
27 * @flags: see above 22 * @flags: see above
28 */ 23 */
29struct ep93xx_keypad_platform_data { 24struct ep93xx_keypad_platform_data {
30 unsigned int matrix_key_rows;
31 unsigned int matrix_key_cols;
32 unsigned int *matrix_key_map; 25 unsigned int *matrix_key_map;
33 int matrix_key_map_size; 26 int matrix_key_map_size;
34 unsigned int debounce; 27 unsigned int debounce;
@@ -36,7 +29,7 @@ struct ep93xx_keypad_platform_data {
36 unsigned int flags; 29 unsigned int flags;
37}; 30};
38 31
39/* macro for creating the matrix_key_map table */ 32#define EP93XX_MATRIX_ROWS (8)
40#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) 33#define EP93XX_MATRIX_COLS (8)
41 34
42#endif /* __ASM_ARCH_EP93XX_KEYPAD_H */ 35#endif /* __ASM_ARCH_EP93XX_KEYPAD_H */
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index b97f529e58e8..41febc796b1c 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -201,6 +201,11 @@ void __init footbridge_map_io(void)
201 201
202#ifdef CONFIG_FOOTBRIDGE_ADDIN 202#ifdef CONFIG_FOOTBRIDGE_ADDIN
203 203
204static inline unsigned long fb_bus_sdram_offset(void)
205{
206 return *CSR_PCISDRAMBASE & 0xfffffff0;
207}
208
204/* 209/*
205 * These two functions convert virtual addresses to PCI addresses and PCI 210 * These two functions convert virtual addresses to PCI addresses and PCI
206 * addresses to virtual addresses. Note that it is only legal to use these 211 * addresses to virtual addresses. Note that it is only legal to use these
@@ -210,14 +215,13 @@ unsigned long __virt_to_bus(unsigned long res)
210{ 215{
211 WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); 216 WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory);
212 217
213 return (res - PAGE_OFFSET) + (*CSR_PCISDRAMBASE & 0xfffffff0); 218 return res + (fb_bus_sdram_offset() - PAGE_OFFSET);
214} 219}
215EXPORT_SYMBOL(__virt_to_bus); 220EXPORT_SYMBOL(__virt_to_bus);
216 221
217unsigned long __bus_to_virt(unsigned long res) 222unsigned long __bus_to_virt(unsigned long res)
218{ 223{
219 res -= (*CSR_PCISDRAMBASE & 0xfffffff0); 224 res = res - (fb_bus_sdram_offset() - PAGE_OFFSET);
220 res += PAGE_OFFSET;
221 225
222 WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory); 226 WARN_ON(res < PAGE_OFFSET || res >= (unsigned long)high_memory);
223 227
@@ -225,4 +229,16 @@ unsigned long __bus_to_virt(unsigned long res)
225} 229}
226EXPORT_SYMBOL(__bus_to_virt); 230EXPORT_SYMBOL(__bus_to_virt);
227 231
232unsigned long __pfn_to_bus(unsigned long pfn)
233{
234 return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET));
235}
236EXPORT_SYMBOL(__pfn_to_bus);
237
238unsigned long __bus_to_pfn(unsigned long bus)
239{
240 return __phys_to_pfn(bus - (fb_bus_sdram_offset() - PHYS_OFFSET));
241}
242EXPORT_SYMBOL(__bus_to_pfn);
243
228#endif 244#endif
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
index cb16e59d87b6..8d64f4574087 100644
--- a/arch/arm/mach-footbridge/include/mach/memory.h
+++ b/arch/arm/mach-footbridge/include/mach/memory.h
@@ -29,6 +29,8 @@
29#ifndef __ASSEMBLY__ 29#ifndef __ASSEMBLY__
30extern unsigned long __virt_to_bus(unsigned long); 30extern unsigned long __virt_to_bus(unsigned long);
31extern unsigned long __bus_to_virt(unsigned long); 31extern unsigned long __bus_to_virt(unsigned long);
32extern unsigned long __pfn_to_bus(unsigned long);
33extern unsigned long __bus_to_pfn(unsigned long);
32#endif 34#endif
33#define __virt_to_bus __virt_to_bus 35#define __virt_to_bus __virt_to_bus
34#define __bus_to_virt __bus_to_virt 36#define __bus_to_virt __bus_to_virt
@@ -36,14 +38,15 @@ extern unsigned long __bus_to_virt(unsigned long);
36#elif defined(CONFIG_FOOTBRIDGE_HOST) 38#elif defined(CONFIG_FOOTBRIDGE_HOST)
37 39
38/* 40/*
39 * The footbridge is programmed to expose the system RAM at the corresponding 41 * The footbridge is programmed to expose the system RAM at 0xe0000000.
40 * address. So, if PAGE_OFFSET is 0xc0000000, RAM appears at 0xe0000000. 42 * The requirement is that the RAM isn't placed at bus address 0, which
41 * If 0x80000000, then its exposed at 0xa0000000 on the bus. etc.
42 * The only requirement is that the RAM isn't placed at bus address 0 which
43 * would clash with VGA cards. 43 * would clash with VGA cards.
44 */ 44 */
45#define __virt_to_bus(x) ((x) - 0xe0000000) 45#define BUS_OFFSET 0xe0000000
46#define __bus_to_virt(x) ((x) + 0xe0000000) 46#define __virt_to_bus(x) ((x) + (BUS_OFFSET - PAGE_OFFSET))
47#define __bus_to_virt(x) ((x) - (BUS_OFFSET - PAGE_OFFSET))
48#define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET))
49#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET))
47 50
48#else 51#else
49 52
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
index 4891828454f5..991f24d2c115 100644
--- a/arch/arm/mach-integrator/include/mach/memory.h
+++ b/arch/arm/mach-integrator/include/mach/memory.h
@@ -28,6 +28,7 @@
28#define BUS_OFFSET UL(0x80000000) 28#define BUS_OFFSET UL(0x80000000)
29#define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) 29#define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET)
30#define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) 30#define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET)
31#define __pfn_to_bus(x) (((x) << PAGE_SHIFT) + BUS_OFFSET) 31#define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET))
32#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET))
32 33
33#endif 34#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
index aee7eb8a71b2..98e3471be15b 100644
--- a/arch/arm/mach-ixp2000/include/mach/memory.h
+++ b/arch/arm/mach-ixp2000/include/mach/memory.h
@@ -17,11 +17,15 @@
17 17
18#include <mach/ixp2000-regs.h> 18#include <mach/ixp2000-regs.h>
19 19
20#define __virt_to_bus(v) \ 20#define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)
21 (((__virt_to_phys(v) - 0x0) + (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)))
22 21
23#define __bus_to_virt(b) \ 22#define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
24 __phys_to_virt((((b - (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)) + 0x0))) 23#define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET))
24
25#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
26#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
27#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
28#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
25 29
26#endif 30#endif
27 31
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
index fdd138706c70..94a3a86cfeb8 100644
--- a/arch/arm/mach-ixp23xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
@@ -19,16 +19,15 @@
19 */ 19 */
20#define PHYS_OFFSET (0x00000000) 20#define PHYS_OFFSET (0x00000000)
21 21
22#define __virt_to_bus(v) \ 22#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0))
23 ({ unsigned int ret; \ 23
24 ret = ((__virt_to_phys(v) - 0x00000000) + \ 24#define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
25 (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \ 25#define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET))
26 ret; }) 26
27 27#define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v))
28#define __bus_to_virt(b) \ 28#define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b))
29 ({ unsigned int data; \ 29#define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p))
30 data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ 30#define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b))
31 __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); })
32 31
33#define arch_is_coherent() 1 32#define arch_is_coherent() 1
34 33
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index 264f4d59f898..9e5070da17ae 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -179,21 +179,21 @@ config IXP4XX_INDIRECT_PCI
179 help 179 help
180 IXP4xx provides two methods of accessing PCI memory space: 180 IXP4xx provides two methods of accessing PCI memory space:
181 181
182 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB). 182 1) A direct mapped window from 0x48000000 to 0x4BFFFFFF (64MB).
183 To access PCI via this space, we simply ioremap() the BAR 183 To access PCI via this space, we simply ioremap() the BAR
184 into the kernel and we can use the standard read[bwl]/write[bwl] 184 into the kernel and we can use the standard read[bwl]/write[bwl]
185 macros. This is the preferred method due to speed but it 185 macros. This is the preferred method due to speed but it
186 limits the system to just 64MB of PCI memory. This can be 186 limits the system to just 64MB of PCI memory. This can be
187 problematic if using video cards and other memory-heavy devices. 187 problematic if using video cards and other memory-heavy devices.
188 188
189 2) If > 64MB of memory space is required, the IXP4xx can be 189 2) If > 64MB of memory space is required, the IXP4xx can be
190 configured to use indirect registers to access PCI This allows 190 configured to use indirect registers to access the whole PCI
191 for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. 191 memory space. This currently allows for up to 1 GB (0x10000000
192 The disadvantage of this is that every PCI access requires 192 to 0x4FFFFFFF) of memory on the bus. The disadvantage of this
193 three local register accesses plus a spinlock, but in some 193 is that every PCI access requires three local register accesses
194 cases the performance hit is acceptable. In addition, you cannot 194 plus a spinlock, but in some cases the performance hit is
195 mmap() PCI devices in this case due to the indirect nature 195 acceptable. In addition, you cannot mmap() PCI devices in this
196 of the PCI window. 196 case due to the indirect nature of the PCI window.
197 197
198 By default, the direct method is used. Choose this option if you 198 By default, the direct method is used. Choose this option if you
199 need to use the indirect method instead. If you don't know 199 need to use the indirect method instead. If you don't know
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c
index 08d65dcdb5fe..845e1b500548 100644
--- a/arch/arm/mach-ixp4xx/avila-pci.c
+++ b/arch/arm/mach-ixp4xx/avila-pci.c
@@ -22,40 +22,45 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25
26#include <asm/mach/pci.h> 25#include <asm/mach/pci.h>
27#include <asm/irq.h> 26#include <asm/irq.h>
28#include <mach/hardware.h> 27#include <mach/hardware.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30 29
30#define AVILA_MAX_DEV 4
31#define LOFT_MAX_DEV 6
32#define IRQ_LINES 4
33
34/* PCI controller GPIO to IRQ pin mappings */
35#define INTA 11
36#define INTB 10
37#define INTC 9
38#define INTD 8
39
31void __init avila_pci_preinit(void) 40void __init avila_pci_preinit(void)
32{ 41{
33 set_irq_type(IRQ_AVILA_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 42 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
34 set_irq_type(IRQ_AVILA_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 43 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
35 set_irq_type(IRQ_AVILA_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 44 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
36 set_irq_type(IRQ_AVILA_PCI_INTD, IRQ_TYPE_LEVEL_LOW); 45 set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW);
37
38 ixp4xx_pci_preinit(); 46 ixp4xx_pci_preinit();
39} 47}
40 48
41static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 49static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
42{ 50{
43 static int pci_irq_table[AVILA_PCI_IRQ_LINES] = { 51 static int pci_irq_table[IRQ_LINES] = {
44 IRQ_AVILA_PCI_INTA, 52 IXP4XX_GPIO_IRQ(INTA),
45 IRQ_AVILA_PCI_INTB, 53 IXP4XX_GPIO_IRQ(INTB),
46 IRQ_AVILA_PCI_INTC, 54 IXP4XX_GPIO_IRQ(INTC),
47 IRQ_AVILA_PCI_INTD 55 IXP4XX_GPIO_IRQ(INTD)
48 }; 56 };
49 57
50 int irq = -1;
51
52 if (slot >= 1 && 58 if (slot >= 1 &&
53 slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) && 59 slot <= (machine_is_loft() ? LOFT_MAX_DEV : AVILA_MAX_DEV) &&
54 pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) { 60 pin >= 1 && pin <= IRQ_LINES)
55 irq = pci_irq_table[(slot + pin - 2) % 4]; 61 return pci_irq_table[(slot + pin - 2) % 4];
56 }
57 62
58 return irq; 63 return -1;
59} 64}
60 65
61struct hw_pci avila_pci __initdata = { 66struct hw_pci avila_pci __initdata = {
@@ -75,4 +80,3 @@ int __init avila_pci_init(void)
75} 80}
76 81
77subsys_initcall(avila_pci_init); 82subsys_initcall(avila_pci_init);
78
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index 797995ce18b9..6e558a76457d 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -19,7 +19,6 @@
19#include <linux/serial_8250.h> 19#include <linux/serial_8250.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/i2c-gpio.h> 21#include <linux/i2c-gpio.h>
22
23#include <asm/types.h> 22#include <asm/types.h>
24#include <asm/setup.h> 23#include <asm/setup.h>
25#include <asm/memory.h> 24#include <asm/memory.h>
@@ -29,6 +28,9 @@
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
31 30
31#define AVILA_SDA_PIN 7
32#define AVILA_SCL_PIN 6
33
32static struct flash_platform_data avila_flash_data = { 34static struct flash_platform_data avila_flash_data = {
33 .map_name = "cfi_probe", 35 .map_name = "cfi_probe",
34 .width = 2, 36 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 70afcfe5b881..c4a01594c761 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -481,11 +481,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
481 481
482 res[1].name = "PCI Memory Space"; 482 res[1].name = "PCI Memory Space";
483 res[1].start = PCIBIOS_MIN_MEM; 483 res[1].start = PCIBIOS_MIN_MEM;
484#ifndef CONFIG_IXP4XX_INDIRECT_PCI 484 res[1].end = PCIBIOS_MAX_MEM;
485 res[1].end = 0x4bffffff;
486#else
487 res[1].end = 0x4fffffff;
488#endif
489 res[1].flags = IORESOURCE_MEM; 485 res[1].flags = IORESOURCE_MEM;
490 486
491 request_resource(&ioport_resource, &res[0]); 487 request_resource(&ioport_resource, &res[0]);
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index cfd52fb341cb..3bbf40f6d964 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -117,7 +117,7 @@ int gpio_to_irq(int gpio)
117} 117}
118EXPORT_SYMBOL(gpio_to_irq); 118EXPORT_SYMBOL(gpio_to_irq);
119 119
120int irq_to_gpio(int irq) 120int irq_to_gpio(unsigned int irq)
121{ 121{
122 int gpio = (irq < 32) ? irq2gpio[irq] : -EINVAL; 122 int gpio = (irq < 32) ? irq2gpio[irq] : -EINVAL;
123 123
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c
index efddf01ed17b..b978ea8bd6f0 100644
--- a/arch/arm/mach-ixp4xx/coyote-pci.c
+++ b/arch/arm/mach-ixp4xx/coyote-pci.c
@@ -18,27 +18,31 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21
22#include <asm/mach-types.h> 21#include <asm/mach-types.h>
23#include <mach/hardware.h> 22#include <mach/hardware.h>
24#include <asm/irq.h> 23#include <asm/irq.h>
25
26#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
27 25
26#define SLOT0_DEVID 14
27#define SLOT1_DEVID 15
28
29/* PCI controller GPIO to IRQ pin mappings */
30#define SLOT0_INTA 6
31#define SLOT1_INTA 11
32
28void __init coyote_pci_preinit(void) 33void __init coyote_pci_preinit(void)
29{ 34{
30 set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQ_TYPE_LEVEL_LOW); 35 set_irq_type(IXP4XX_GPIO_IRQ(SLOT0_INTA), IRQ_TYPE_LEVEL_LOW);
31 set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQ_TYPE_LEVEL_LOW); 36 set_irq_type(IXP4XX_GPIO_IRQ(SLOT1_INTA), IRQ_TYPE_LEVEL_LOW);
32
33 ixp4xx_pci_preinit(); 37 ixp4xx_pci_preinit();
34} 38}
35 39
36static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 40static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
37{ 41{
38 if (slot == COYOTE_PCI_SLOT0_DEVID) 42 if (slot == SLOT0_DEVID)
39 return IRQ_COYOTE_PCI_SLOT0; 43 return IXP4XX_GPIO_IRQ(SLOT0_INTA);
40 else if (slot == COYOTE_PCI_SLOT1_DEVID) 44 else if (slot == SLOT1_DEVID)
41 return IRQ_COYOTE_PCI_SLOT1; 45 return IXP4XX_GPIO_IRQ(SLOT1_INTA);
42 else return -1; 46 else return -1;
43} 47}
44 48
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index aab1954e2747..25bf5ad770ea 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -25,6 +25,15 @@
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 27
28#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)
29#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
30#define COYOTE_IDE_REGION_SIZE 0x1000
31
32#define COYOTE_IDE_DATA_PORT 0xFFFE10E0
33#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
34#define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
35#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
36
28static struct flash_platform_data coyote_flash_data = { 37static struct flash_platform_data coyote_flash_data = {
29 .map_name = "cfi_probe", 38 .map_name = "cfi_probe",
30 .width = 2, 39 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c
index 926d15f885fb..fa70fed462ba 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-pci.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c
@@ -19,39 +19,45 @@
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22
23#include <asm/mach/pci.h> 22#include <asm/mach/pci.h>
24#include <asm/mach-types.h> 23#include <asm/mach-types.h>
25 24
25#define MAX_DEV 4
26#define IRQ_LINES 3
27
28/* PCI controller GPIO to IRQ pin mappings */
29#define INTA 11
30#define INTB 10
31#define INTC 9
32#define INTD 8
33#define INTE 7
34#define INTF 6
35
26void __init dsmg600_pci_preinit(void) 36void __init dsmg600_pci_preinit(void)
27{ 37{
28 set_irq_type(IRQ_DSMG600_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 38 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
29 set_irq_type(IRQ_DSMG600_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 39 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
30 set_irq_type(IRQ_DSMG600_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 40 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
31 set_irq_type(IRQ_DSMG600_PCI_INTD, IRQ_TYPE_LEVEL_LOW); 41 set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW);
32 set_irq_type(IRQ_DSMG600_PCI_INTE, IRQ_TYPE_LEVEL_LOW); 42 set_irq_type(IXP4XX_GPIO_IRQ(INTE), IRQ_TYPE_LEVEL_LOW);
33 set_irq_type(IRQ_DSMG600_PCI_INTF, IRQ_TYPE_LEVEL_LOW); 43 set_irq_type(IXP4XX_GPIO_IRQ(INTF), IRQ_TYPE_LEVEL_LOW);
34
35 ixp4xx_pci_preinit(); 44 ixp4xx_pci_preinit();
36} 45}
37 46
38static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 47static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{ 48{
40 static int pci_irq_table[DSMG600_PCI_MAX_DEV][DSMG600_PCI_IRQ_LINES] = 49 static int pci_irq_table[MAX_DEV][IRQ_LINES] = {
41 { 50 { IXP4XX_GPIO_IRQ(INTE), -1, -1 },
42 { IRQ_DSMG600_PCI_INTE, -1, -1 }, 51 { IXP4XX_GPIO_IRQ(INTA), -1, -1 },
43 { IRQ_DSMG600_PCI_INTA, -1, -1 }, 52 { IXP4XX_GPIO_IRQ(INTB), IXP4XX_GPIO_IRQ(INTC),
44 { IRQ_DSMG600_PCI_INTB, IRQ_DSMG600_PCI_INTC, IRQ_DSMG600_PCI_INTD }, 53 IXP4XX_GPIO_IRQ(INTD) },
45 { IRQ_DSMG600_PCI_INTF, -1, -1 }, 54 { IXP4XX_GPIO_IRQ(INTF), -1, -1 },
46 }; 55 };
47 56
48 int irq = -1; 57 if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
49 58 return pci_irq_table[slot - 1][pin - 1];
50 if (slot >= 1 && slot <= DSMG600_PCI_MAX_DEV &&
51 pin >= 1 && pin <= DSMG600_PCI_IRQ_LINES)
52 irq = pci_irq_table[slot-1][pin-1];
53 59
54 return irq; 60 return -1;
55} 61}
56 62
57struct hw_pci __initdata dsmg600_pci = { 63struct hw_pci __initdata dsmg600_pci = {
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index a51bfa6978b6..7c1fa54a6145 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -33,6 +33,23 @@
33#include <asm/mach/time.h> 33#include <asm/mach/time.h>
34#include <asm/gpio.h> 34#include <asm/gpio.h>
35 35
36#define DSMG600_SDA_PIN 5
37#define DSMG600_SCL_PIN 4
38
39/* DSM-G600 Timer Setting */
40#define DSMG600_FREQ 66000000
41
42/* Buttons */
43#define DSMG600_PB_GPIO 15 /* power button */
44#define DSMG600_RB_GPIO 3 /* reset button */
45
46/* Power control */
47#define DSMG600_PO_GPIO 2 /* power off */
48
49/* LEDs */
50#define DSMG600_LED_PWR_GPIO 0
51#define DSMG600_LED_WLAN_GPIO 14
52
36static struct flash_platform_data dsmg600_flash_data = { 53static struct flash_platform_data dsmg600_flash_data = {
37 .map_name = "cfi_probe", 54 .map_name = "cfi_probe",
38 .width = 2, 55 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c
index ca12a9ca0830..5a810c930624 100644
--- a/arch/arm/mach-ixp4xx/fsg-pci.c
+++ b/arch/arm/mach-ixp4xx/fsg-pci.c
@@ -19,33 +19,38 @@
19#include <linux/pci.h> 19#include <linux/pci.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22
23#include <asm/mach/pci.h> 22#include <asm/mach/pci.h>
24#include <asm/mach-types.h> 23#include <asm/mach-types.h>
25 24
25#define MAX_DEV 3
26#define IRQ_LINES 3
27
28/* PCI controller GPIO to IRQ pin mappings */
29#define INTA 6
30#define INTB 7
31#define INTC 5
32
26void __init fsg_pci_preinit(void) 33void __init fsg_pci_preinit(void)
27{ 34{
28 set_irq_type(IRQ_FSG_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 35 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
29 set_irq_type(IRQ_FSG_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 36 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
30 set_irq_type(IRQ_FSG_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 37 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
31
32 ixp4xx_pci_preinit(); 38 ixp4xx_pci_preinit();
33} 39}
34 40
35static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 41static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
36{ 42{
37 static int pci_irq_table[FSG_PCI_IRQ_LINES] = { 43 static int pci_irq_table[IRQ_LINES] = {
38 IRQ_FSG_PCI_INTC, 44 IXP4XX_GPIO_IRQ(INTC),
39 IRQ_FSG_PCI_INTB, 45 IXP4XX_GPIO_IRQ(INTB),
40 IRQ_FSG_PCI_INTA, 46 IXP4XX_GPIO_IRQ(INTA),
41 }; 47 };
42 48
43 int irq = -1; 49 int irq = -1;
44 slot = slot - 11; 50 slot -= 11;
45 51
46 if (slot >= 1 && slot <= FSG_PCI_MAX_DEV && 52 if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
47 pin >= 1 && pin <= FSG_PCI_IRQ_LINES) 53 irq = pci_irq_table[slot - 1];
48 irq = pci_irq_table[(slot - 1)];
49 printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n", 54 printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n",
50 __func__, slot, pin, irq); 55 __func__, slot, pin, irq);
51 56
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
index 5add22fc9899..e7f4befba422 100644
--- a/arch/arm/mach-ixp4xx/fsg-setup.c
+++ b/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -24,12 +24,18 @@
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/i2c-gpio.h> 25#include <linux/i2c-gpio.h>
26#include <linux/io.h> 26#include <linux/io.h>
27
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
31#include <asm/gpio.h> 30#include <asm/gpio.h>
32 31
32#define FSG_SDA_PIN 12
33#define FSG_SCL_PIN 13
34
35#define FSG_SB_GPIO 4 /* sync button */
36#define FSG_RB_GPIO 9 /* reset button */
37#define FSG_UB_GPIO 10 /* usb button */
38
33static struct flash_platform_data fsg_flash_data = { 39static struct flash_platform_data fsg_flash_data = {
34 .map_name = "cfi_probe", 40 .map_name = "cfi_probe",
35 .width = 2, 41 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
index a733b8ff3cec..1c28048209c1 100644
--- a/arch/arm/mach-ixp4xx/goramo_mlr.c
+++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
@@ -17,29 +17,28 @@
17#include <asm/mach/flash.h> 17#include <asm/mach/flash.h>
18#include <asm/mach/pci.h> 18#include <asm/mach/pci.h>
19 19
20#define xgpio_irq(n) (IRQ_IXP4XX_GPIO ## n)
21#define gpio_irq(n) xgpio_irq(n)
22
23#define SLOT_ETHA 0x0B /* IDSEL = AD21 */ 20#define SLOT_ETHA 0x0B /* IDSEL = AD21 */
24#define SLOT_ETHB 0x0C /* IDSEL = AD20 */ 21#define SLOT_ETHB 0x0C /* IDSEL = AD20 */
25#define SLOT_MPCI 0x0D /* IDSEL = AD19 */ 22#define SLOT_MPCI 0x0D /* IDSEL = AD19 */
26#define SLOT_NEC 0x0E /* IDSEL = AD18 */ 23#define SLOT_NEC 0x0E /* IDSEL = AD18 */
27 24
28#define IRQ_ETHA IRQ_IXP4XX_GPIO4
29#define IRQ_ETHB IRQ_IXP4XX_GPIO5
30#define IRQ_NEC IRQ_IXP4XX_GPIO3
31#define IRQ_MPCI IRQ_IXP4XX_GPIO12
32
33/* GPIO lines */ 25/* GPIO lines */
34#define GPIO_SCL 0 26#define GPIO_SCL 0
35#define GPIO_SDA 1 27#define GPIO_SDA 1
36#define GPIO_STR 2 28#define GPIO_STR 2
29#define GPIO_IRQ_NEC 3
30#define GPIO_IRQ_ETHA 4
31#define GPIO_IRQ_ETHB 5
37#define GPIO_HSS0_DCD_N 6 32#define GPIO_HSS0_DCD_N 6
38#define GPIO_HSS1_DCD_N 7 33#define GPIO_HSS1_DCD_N 7
34#define GPIO_UART0_DCD 8
35#define GPIO_UART1_DCD 9
39#define GPIO_HSS0_CTS_N 10 36#define GPIO_HSS0_CTS_N 10
40#define GPIO_HSS1_CTS_N 11 37#define GPIO_HSS1_CTS_N 11
38#define GPIO_IRQ_MPCI 12
41#define GPIO_HSS1_RTS_N 13 39#define GPIO_HSS1_RTS_N 13
42#define GPIO_HSS0_RTS_N 14 40#define GPIO_HSS0_RTS_N 14
41/* GPIO15 is not connected */
43 42
44/* Control outputs from 74HC4094 */ 43/* Control outputs from 74HC4094 */
45#define CONTROL_HSS0_CLK_INT 0 44#define CONTROL_HSS0_CLK_INT 0
@@ -152,7 +151,7 @@ static int hss_set_clock(int port, unsigned int clock_type)
152 151
153static irqreturn_t hss_dcd_irq(int irq, void *pdev) 152static irqreturn_t hss_dcd_irq(int irq, void *pdev)
154{ 153{
155 int i, port = (irq == gpio_irq(GPIO_HSS1_DCD_N)); 154 int i, port = (irq == IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N));
156 gpio_line_get(port ? GPIO_HSS1_DCD_N : GPIO_HSS0_DCD_N, &i); 155 gpio_line_get(port ? GPIO_HSS1_DCD_N : GPIO_HSS0_DCD_N, &i);
157 set_carrier_cb_tab[port](pdev, !i); 156 set_carrier_cb_tab[port](pdev, !i);
158 return IRQ_HANDLED; 157 return IRQ_HANDLED;
@@ -165,9 +164,9 @@ static int hss_open(int port, void *pdev,
165 int i, irq; 164 int i, irq;
166 165
167 if (!port) 166 if (!port)
168 irq = gpio_irq(GPIO_HSS0_DCD_N); 167 irq = IXP4XX_GPIO_IRQ(GPIO_HSS0_DCD_N);
169 else 168 else
170 irq = gpio_irq(GPIO_HSS1_DCD_N); 169 irq = IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N);
171 170
172 gpio_line_get(port ? GPIO_HSS1_DCD_N : GPIO_HSS0_DCD_N, &i); 171 gpio_line_get(port ? GPIO_HSS1_DCD_N : GPIO_HSS0_DCD_N, &i);
173 set_carrier_cb(pdev, !i); 172 set_carrier_cb(pdev, !i);
@@ -188,8 +187,8 @@ static int hss_open(int port, void *pdev,
188 187
189static void hss_close(int port, void *pdev) 188static void hss_close(int port, void *pdev)
190{ 189{
191 free_irq(port ? gpio_irq(GPIO_HSS1_DCD_N) : gpio_irq(GPIO_HSS0_DCD_N), 190 free_irq(port ? IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N) :
192 pdev); 191 IXP4XX_GPIO_IRQ(GPIO_HSS0_DCD_N), pdev);
193 set_carrier_cb_tab[!!port] = NULL; /* catch bugs */ 192 set_carrier_cb_tab[!!port] = NULL; /* catch bugs */
194 193
195 set_control(port ? CONTROL_HSS1_DTR_N : CONTROL_HSS0_DTR_N, 1); 194 set_control(port ? CONTROL_HSS1_DTR_N : CONTROL_HSS0_DTR_N, 1);
@@ -421,8 +420,8 @@ static void __init gmlr_init(void)
421 gpio_line_config(GPIO_HSS1_RTS_N, IXP4XX_GPIO_OUT); 420 gpio_line_config(GPIO_HSS1_RTS_N, IXP4XX_GPIO_OUT);
422 gpio_line_config(GPIO_HSS0_DCD_N, IXP4XX_GPIO_IN); 421 gpio_line_config(GPIO_HSS0_DCD_N, IXP4XX_GPIO_IN);
423 gpio_line_config(GPIO_HSS1_DCD_N, IXP4XX_GPIO_IN); 422 gpio_line_config(GPIO_HSS1_DCD_N, IXP4XX_GPIO_IN);
424 set_irq_type(gpio_irq(GPIO_HSS0_DCD_N), IRQ_TYPE_EDGE_BOTH); 423 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS0_DCD_N), IRQ_TYPE_EDGE_BOTH);
425 set_irq_type(gpio_irq(GPIO_HSS1_DCD_N), IRQ_TYPE_EDGE_BOTH); 424 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_HSS1_DCD_N), IRQ_TYPE_EDGE_BOTH);
426 425
427 set_control(CONTROL_HSS0_DTR_N, 1); 426 set_control(CONTROL_HSS0_DTR_N, 1);
428 set_control(CONTROL_HSS1_DTR_N, 1); 427 set_control(CONTROL_HSS1_DTR_N, 1);
@@ -442,10 +441,10 @@ static void __init gmlr_init(void)
442#ifdef CONFIG_PCI 441#ifdef CONFIG_PCI
443static void __init gmlr_pci_preinit(void) 442static void __init gmlr_pci_preinit(void)
444{ 443{
445 set_irq_type(IRQ_ETHA, IRQ_TYPE_LEVEL_LOW); 444 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA), IRQ_TYPE_LEVEL_LOW);
446 set_irq_type(IRQ_ETHB, IRQ_TYPE_LEVEL_LOW); 445 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHB), IRQ_TYPE_LEVEL_LOW);
447 set_irq_type(IRQ_NEC, IRQ_TYPE_LEVEL_LOW); 446 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_NEC), IRQ_TYPE_LEVEL_LOW);
448 set_irq_type(IRQ_MPCI, IRQ_TYPE_LEVEL_LOW); 447 set_irq_type(IXP4XX_GPIO_IRQ(GPIO_IRQ_MPCI), IRQ_TYPE_LEVEL_LOW);
449 ixp4xx_pci_preinit(); 448 ixp4xx_pci_preinit();
450} 449}
451 450
@@ -466,10 +465,10 @@ static void __init gmlr_pci_postinit(void)
466static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 465static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
467{ 466{
468 switch(slot) { 467 switch(slot) {
469 case SLOT_ETHA: return IRQ_ETHA; 468 case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA);
470 case SLOT_ETHB: return IRQ_ETHB; 469 case SLOT_ETHB: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHB);
471 case SLOT_NEC: return IRQ_NEC; 470 case SLOT_NEC: return IXP4XX_GPIO_IRQ(GPIO_IRQ_NEC);
472 default: return IRQ_MPCI; 471 default: return IXP4XX_GPIO_IRQ(GPIO_IRQ_MPCI);
473 } 472 }
474} 473}
475 474
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index 7b8a2c323840..25d2c333c204 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -26,14 +26,16 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/irq.h> 28#include <linux/irq.h>
29
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31#include <mach/hardware.h> 30#include <mach/hardware.h>
32#include <mach/gtwx5715.h>
33#include <asm/mach/pci.h> 31#include <asm/mach/pci.h>
34 32
33#define SLOT0_DEVID 0
34#define SLOT1_DEVID 1
35#define INTA 10 /* slot 1 has INTA and INTB crossed */
36#define INTB 11
37
35/* 38/*
36 * The exact GPIO pins and IRQs are defined in arch-ixp4xx/gtwx5715.h
37 * Slot 0 isn't actually populated with a card connector but 39 * Slot 0 isn't actually populated with a card connector but
38 * we initialize it anyway in case a future version has the 40 * we initialize it anyway in case a future version has the
39 * slot populated or someone with good soldering skills has 41 * slot populated or someone with good soldering skills has
@@ -41,32 +43,26 @@
41 */ 43 */
42void __init gtwx5715_pci_preinit(void) 44void __init gtwx5715_pci_preinit(void)
43{ 45{
44 set_irq_type(GTWX5715_PCI_SLOT0_INTA_IRQ, IRQ_TYPE_LEVEL_LOW); 46 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
45 set_irq_type(GTWX5715_PCI_SLOT0_INTB_IRQ, IRQ_TYPE_LEVEL_LOW); 47 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
46 set_irq_type(GTWX5715_PCI_SLOT1_INTA_IRQ, IRQ_TYPE_LEVEL_LOW);
47 set_irq_type(GTWX5715_PCI_SLOT1_INTB_IRQ, IRQ_TYPE_LEVEL_LOW);
48
49 ixp4xx_pci_preinit(); 48 ixp4xx_pci_preinit();
50} 49}
51 50
52 51
53static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 52static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
54{ 53{
55 int rc; 54 int rc = -1;
56 static int gtwx5715_irqmap
57 [GTWX5715_PCI_SLOT_COUNT]
58 [GTWX5715_PCI_INT_PIN_COUNT] = {
59 {GTWX5715_PCI_SLOT0_INTA_IRQ, GTWX5715_PCI_SLOT0_INTB_IRQ},
60 {GTWX5715_PCI_SLOT1_INTA_IRQ, GTWX5715_PCI_SLOT1_INTB_IRQ},
61};
62 55
63 if (slot >= GTWX5715_PCI_SLOT_COUNT || 56 if ((slot == SLOT0_DEVID && pin == 1) ||
64 pin >= GTWX5715_PCI_INT_PIN_COUNT) rc = -1; 57 (slot == SLOT1_DEVID && pin == 2))
65 else 58 rc = IXP4XX_GPIO_IRQ(INTA);
66 rc = gtwx5715_irqmap[slot][pin-1]; 59 else if ((slot == SLOT0_DEVID && pin == 2) ||
60 (slot == SLOT1_DEVID && pin == 1))
61 rc = IXP4XX_GPIO_IRQ(INTB);
67 62
68 printk("%s: Mapped slot %d pin %d to IRQ %d\n", __func__, slot, pin, rc); 63 printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n",
69 return(rc); 64 __func__, slot, pin, rc);
65 return rc;
70} 66}
71 67
72struct hw_pci gtwx5715_pci __initdata = { 68struct hw_pci gtwx5715_pci __initdata = {
@@ -81,9 +77,7 @@ struct hw_pci gtwx5715_pci __initdata = {
81int __init gtwx5715_pci_init(void) 77int __init gtwx5715_pci_init(void)
82{ 78{
83 if (machine_is_gtwx5715()) 79 if (machine_is_gtwx5715())
84 {
85 pci_common_init(&gtwx5715_pci); 80 pci_common_init(&gtwx5715_pci);
86 }
87 81
88 return 0; 82 return 0;
89} 83}
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index 25c21d6665ec..0bc7185cb6f7 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -28,7 +28,6 @@
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/serial_8250.h> 29#include <linux/serial_8250.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31
32#include <asm/types.h> 31#include <asm/types.h>
33#include <asm/setup.h> 32#include <asm/setup.h>
34#include <asm/memory.h> 33#include <asm/memory.h>
@@ -37,7 +36,34 @@
37#include <asm/mach-types.h> 36#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
39#include <asm/mach/flash.h> 38#include <asm/mach/flash.h>
40#include <mach/gtwx5715.h> 39
40/* GPIO 5,6,7 and 12 are hard wired to the Kendin KS8995M Switch
41 and operate as an SPI type interface. The details of the interface
42 are available on Kendin/Micrel's web site. */
43
44#define GTWX5715_KSSPI_SELECT 5
45#define GTWX5715_KSSPI_TXD 6
46#define GTWX5715_KSSPI_CLOCK 7
47#define GTWX5715_KSSPI_RXD 12
48
49/* The "reset" button is wired to GPIO 3.
50 The GPIO is brought "low" when the button is pushed. */
51
52#define GTWX5715_BUTTON_GPIO 3
53
54/* Board Label Front Label
55 LED1 Power
56 LED2 Wireless-G
57 LED3 not populated but could be
58 LED4 Internet
59 LED5 - LED8 Controlled by KS8995M Switch
60 LED9 DMZ */
61
62#define GTWX5715_LED1_GPIO 2
63#define GTWX5715_LED2_GPIO 9
64#define GTWX5715_LED3_GPIO 8
65#define GTWX5715_LED4_GPIO 1
66#define GTWX5715_LED9_GPIO 4
41 67
42/* 68/*
43 * Xscale UART registers are 32 bits wide with only the least 69 * 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
deleted file mode 100644
index 1640cb61972b..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/avila.h
+++ /dev/null
@@ -1,39 +0,0 @@
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
deleted file mode 100644
index 717ac6d16f55..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/coyote.h
+++ /dev/null
@@ -1,33 +0,0 @@
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/dsmg600.h b/arch/arm/mach-ixp4xx/include/mach/dsmg600.h
deleted file mode 100644
index dc087a34a268..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/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 <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/fsg.h b/arch/arm/mach-ixp4xx/include/mach/fsg.h
deleted file mode 100644
index 1f02b7e22a13..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/fsg.h
+++ /dev/null
@@ -1,50 +0,0 @@
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
index cd5aec26c072..a5f87ded2f28 100644
--- a/arch/arm/mach-ixp4xx/include/mach/gpio.h
+++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h
@@ -70,7 +70,7 @@ static inline void gpio_set_value(unsigned gpio, int value)
70#include <asm-generic/gpio.h> /* cansleep wrappers */ 70#include <asm-generic/gpio.h> /* cansleep wrappers */
71 71
72extern int gpio_to_irq(int gpio); 72extern int gpio_to_irq(int gpio);
73extern int irq_to_gpio(int gpio); 73extern int irq_to_gpio(unsigned int irq);
74 74
75#endif 75#endif
76 76
diff --git a/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h b/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
deleted file mode 100644
index 5d5e201cac7e..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
+++ /dev/null
@@ -1,116 +0,0 @@
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
index f58a43a23966..f9d1c43e4a54 100644
--- a/arch/arm/mach-ixp4xx/include/mach/hardware.h
+++ b/arch/arm/mach-ixp4xx/include/mach/hardware.h
@@ -18,7 +18,13 @@
18#define __ASM_ARCH_HARDWARE_H__ 18#define __ASM_ARCH_HARDWARE_H__
19 19
20#define PCIBIOS_MIN_IO 0x00001000 20#define PCIBIOS_MIN_IO 0x00001000
21#define PCIBIOS_MIN_MEM (cpu_is_ixp43x() ? 0x40000000 : 0x48000000) 21#ifdef CONFIG_IXP4XX_INDIRECT_PCI
22#define PCIBIOS_MIN_MEM 0x10000000 /* 1 GB of indirect PCI MMIO space */
23#define PCIBIOS_MAX_MEM 0x4FFFFFFF
24#else
25#define PCIBIOS_MIN_MEM 0x48000000 /* 64 MB of PCI MMIO space */
26#define PCIBIOS_MAX_MEM 0x4BFFFFFF
27#endif
22 28
23/* 29/*
24 * We override the standard dma-mask routines for bouncing. 30 * We override the standard dma-mask routines for bouncing.
@@ -37,14 +43,4 @@
37/* Platform helper functions and definitions */ 43/* Platform helper functions and definitions */
38#include "platform.h" 44#include "platform.h"
39 45
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 */ 46#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
index 8a947d42a6f1..6ea7e2fb2701 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -26,22 +26,20 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
26/* 26/*
27 * IXP4xx provides two methods of accessing PCI memory space: 27 * IXP4xx provides two methods of accessing PCI memory space:
28 * 28 *
29 * 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB). 29 * 1) A direct mapped window from 0x48000000 to 0x4BFFFFFF (64MB).
30 * To access PCI via this space, we simply ioremap() the BAR 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] 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 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 33 * limits the system to just 64MB of PCI memory. This can be
34 * problamatic if using video cards and other memory-heavy 34 * problematic if using video cards and other memory-heavy targets.
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 * 35 *
36 * 2) If > 64MB of memory space is required, the IXP4xx can use indirect
37 * registers to access the whole 4 GB of PCI memory space (as we do below
38 * for I/O transactions). This allows currently for up to 1 GB (0x10000000
39 * to 0x4FFFFFFF) of memory on the bus. The disadvantage of this is that
40 * every PCI access requires three local register accesses plus a spinlock,
41 * but in some cases the performance hit is acceptable. In addition, you
42 * cannot mmap() PCI devices in this case.
45 */ 43 */
46#ifndef CONFIG_IXP4XX_INDIRECT_PCI 44#ifndef CONFIG_IXP4XX_INDIRECT_PCI
47 45
@@ -55,48 +53,52 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
55 * access registers. If something outside of PCI is ioremap'd, we 53 * access registers. If something outside of PCI is ioremap'd, we
56 * fallback to the default. 54 * fallback to the default.
57 */ 55 */
58static inline void __iomem * 56
59__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype) 57static inline int is_pci_memory(u32 addr)
58{
59 return (addr >= PCIBIOS_MIN_MEM) && (addr <= 0x4FFFFFFF);
60}
61
62static inline void __iomem * __indirect_ioremap(unsigned long addr, size_t size,
63 unsigned int mtype)
60{ 64{
61 if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) 65 if (!is_pci_memory(addr))
62 return __arm_ioremap(addr, size, mtype); 66 return __arm_ioremap(addr, size, mtype);
63 67
64 return (void __iomem *)addr; 68 return (void __iomem *)addr;
65} 69}
66 70
67static inline void 71static inline void __indirect_iounmap(void __iomem *addr)
68__ixp4xx_iounmap(void __iomem *addr)
69{ 72{
70 if ((__force u32)addr >= VMALLOC_START) 73 if (!is_pci_memory((__force u32)addr))
71 __iounmap(addr); 74 __iounmap(addr);
72} 75}
73 76
74#define __arch_ioremap(a, s, f) __ixp4xx_ioremap(a, s, f) 77#define __arch_ioremap(a, s, f) __indirect_ioremap(a, s, f)
75#define __arch_iounmap(a) __ixp4xx_iounmap(a) 78#define __arch_iounmap(a) __indirect_iounmap(a)
76 79
77#define writeb(v, p) __ixp4xx_writeb(v, p) 80#define writeb(v, p) __indirect_writeb(v, p)
78#define writew(v, p) __ixp4xx_writew(v, p) 81#define writew(v, p) __indirect_writew(v, p)
79#define writel(v, p) __ixp4xx_writel(v, p) 82#define writel(v, p) __indirect_writel(v, p)
80 83
81#define writesb(p, v, l) __ixp4xx_writesb(p, v, l) 84#define writesb(p, v, l) __indirect_writesb(p, v, l)
82#define writesw(p, v, l) __ixp4xx_writesw(p, v, l) 85#define writesw(p, v, l) __indirect_writesw(p, v, l)
83#define writesl(p, v, l) __ixp4xx_writesl(p, v, l) 86#define writesl(p, v, l) __indirect_writesl(p, v, l)
84
85#define readb(p) __ixp4xx_readb(p)
86#define readw(p) __ixp4xx_readw(p)
87#define readl(p) __ixp4xx_readl(p)
88
89#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
90#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
91#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
92 87
93static inline void 88#define readb(p) __indirect_readb(p)
94__ixp4xx_writeb(u8 value, volatile void __iomem *p) 89#define readw(p) __indirect_readw(p)
90#define readl(p) __indirect_readl(p)
91
92#define readsb(p, v, l) __indirect_readsb(p, v, l)
93#define readsw(p, v, l) __indirect_readsw(p, v, l)
94#define readsl(p, v, l) __indirect_readsl(p, v, l)
95
96static inline void __indirect_writeb(u8 value, volatile void __iomem *p)
95{ 97{
96 u32 addr = (u32)p; 98 u32 addr = (u32)p;
97 u32 n, byte_enables, data; 99 u32 n, byte_enables, data;
98 100
99 if (addr >= VMALLOC_START) { 101 if (!is_pci_memory(addr)) {
100 __raw_writeb(value, addr); 102 __raw_writeb(value, addr);
101 return; 103 return;
102 } 104 }
@@ -107,20 +109,19 @@ __ixp4xx_writeb(u8 value, volatile void __iomem *p)
107 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data); 109 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
108} 110}
109 111
110static inline void 112static inline void __indirect_writesb(volatile void __iomem *bus_addr,
111__ixp4xx_writesb(volatile void __iomem *bus_addr, const u8 *vaddr, int count) 113 const u8 *vaddr, int count)
112{ 114{
113 while (count--) 115 while (count--)
114 writeb(*vaddr++, bus_addr); 116 writeb(*vaddr++, bus_addr);
115} 117}
116 118
117static inline void 119static inline void __indirect_writew(u16 value, volatile void __iomem *p)
118__ixp4xx_writew(u16 value, volatile void __iomem *p)
119{ 120{
120 u32 addr = (u32)p; 121 u32 addr = (u32)p;
121 u32 n, byte_enables, data; 122 u32 n, byte_enables, data;
122 123
123 if (addr >= VMALLOC_START) { 124 if (!is_pci_memory(addr)) {
124 __raw_writew(value, addr); 125 __raw_writew(value, addr);
125 return; 126 return;
126 } 127 }
@@ -131,18 +132,18 @@ __ixp4xx_writew(u16 value, volatile void __iomem *p)
131 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data); 132 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
132} 133}
133 134
134static inline void 135static inline void __indirect_writesw(volatile void __iomem *bus_addr,
135__ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) 136 const u16 *vaddr, int count)
136{ 137{
137 while (count--) 138 while (count--)
138 writew(*vaddr++, bus_addr); 139 writew(*vaddr++, bus_addr);
139} 140}
140 141
141static inline void 142static inline void __indirect_writel(u32 value, volatile void __iomem *p)
142__ixp4xx_writel(u32 value, volatile void __iomem *p)
143{ 143{
144 u32 addr = (__force u32)p; 144 u32 addr = (__force u32)p;
145 if (addr >= VMALLOC_START) { 145
146 if (!is_pci_memory(addr)) {
146 __raw_writel(value, p); 147 __raw_writel(value, p);
147 return; 148 return;
148 } 149 }
@@ -150,20 +151,19 @@ __ixp4xx_writel(u32 value, volatile void __iomem *p)
150 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value); 151 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value);
151} 152}
152 153
153static inline void 154static inline void __indirect_writesl(volatile void __iomem *bus_addr,
154__ixp4xx_writesl(volatile void __iomem *bus_addr, const u32 *vaddr, int count) 155 const u32 *vaddr, int count)
155{ 156{
156 while (count--) 157 while (count--)
157 writel(*vaddr++, bus_addr); 158 writel(*vaddr++, bus_addr);
158} 159}
159 160
160static inline unsigned char 161static inline unsigned char __indirect_readb(const volatile void __iomem *p)
161__ixp4xx_readb(const volatile void __iomem *p)
162{ 162{
163 u32 addr = (u32)p; 163 u32 addr = (u32)p;
164 u32 n, byte_enables, data; 164 u32 n, byte_enables, data;
165 165
166 if (addr >= VMALLOC_START) 166 if (!is_pci_memory(addr))
167 return __raw_readb(addr); 167 return __raw_readb(addr);
168 168
169 n = addr % 4; 169 n = addr % 4;
@@ -174,20 +174,19 @@ __ixp4xx_readb(const volatile void __iomem *p)
174 return data >> (8*n); 174 return data >> (8*n);
175} 175}
176 176
177static inline void 177static inline void __indirect_readsb(const volatile void __iomem *bus_addr,
178__ixp4xx_readsb(const volatile void __iomem *bus_addr, u8 *vaddr, u32 count) 178 u8 *vaddr, u32 count)
179{ 179{
180 while (count--) 180 while (count--)
181 *vaddr++ = readb(bus_addr); 181 *vaddr++ = readb(bus_addr);
182} 182}
183 183
184static inline unsigned short 184static inline unsigned short __indirect_readw(const volatile void __iomem *p)
185__ixp4xx_readw(const volatile void __iomem *p)
186{ 185{
187 u32 addr = (u32)p; 186 u32 addr = (u32)p;
188 u32 n, byte_enables, data; 187 u32 n, byte_enables, data;
189 188
190 if (addr >= VMALLOC_START) 189 if (!is_pci_memory(addr))
191 return __raw_readw(addr); 190 return __raw_readw(addr);
192 191
193 n = addr % 4; 192 n = addr % 4;
@@ -198,20 +197,19 @@ __ixp4xx_readw(const volatile void __iomem *p)
198 return data>>(8*n); 197 return data>>(8*n);
199} 198}
200 199
201static inline void 200static inline void __indirect_readsw(const volatile void __iomem *bus_addr,
202__ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) 201 u16 *vaddr, u32 count)
203{ 202{
204 while (count--) 203 while (count--)
205 *vaddr++ = readw(bus_addr); 204 *vaddr++ = readw(bus_addr);
206} 205}
207 206
208static inline unsigned long 207static inline unsigned long __indirect_readl(const volatile void __iomem *p)
209__ixp4xx_readl(const volatile void __iomem *p)
210{ 208{
211 u32 addr = (__force u32)p; 209 u32 addr = (__force u32)p;
212 u32 data; 210 u32 data;
213 211
214 if (addr >= VMALLOC_START) 212 if (!is_pci_memory(addr))
215 return __raw_readl(p); 213 return __raw_readl(p);
216 214
217 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) 215 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data))
@@ -220,8 +218,8 @@ __ixp4xx_readl(const volatile void __iomem *p)
220 return data; 218 return data;
221} 219}
222 220
223static inline void 221static inline void __indirect_readsl(const volatile void __iomem *bus_addr,
224__ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) 222 u32 *vaddr, u32 count)
225{ 223{
226 while (count--) 224 while (count--)
227 *vaddr++ = readl(bus_addr); 225 *vaddr++ = readl(bus_addr);
@@ -235,7 +233,7 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
235#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) 233#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
236#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) 234#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
237 235
238#endif 236#endif /* CONFIG_IXP4XX_INDIRECT_PCI */
239 237
240#ifndef CONFIG_PCI 238#ifndef CONFIG_PCI
241 239
@@ -250,25 +248,8 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
250 * transaction. This means that we need to override the default 248 * transaction. This means that we need to override the default
251 * I/O functions. 249 * I/O functions.
252 */ 250 */
253#define outb(p, v) __ixp4xx_outb(p, v)
254#define outw(p, v) __ixp4xx_outw(p, v)
255#define outl(p, v) __ixp4xx_outl(p, v)
256
257#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
258#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
259#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
260 251
261#define inb(p) __ixp4xx_inb(p) 252static inline void outb(u8 value, u32 addr)
262#define inw(p) __ixp4xx_inw(p)
263#define inl(p) __ixp4xx_inl(p)
264
265#define insb(p, v, l) __ixp4xx_insb(p, v, l)
266#define insw(p, v, l) __ixp4xx_insw(p, v, l)
267#define insl(p, v, l) __ixp4xx_insl(p, v, l)
268
269
270static inline void
271__ixp4xx_outb(u8 value, u32 addr)
272{ 253{
273 u32 n, byte_enables, data; 254 u32 n, byte_enables, data;
274 n = addr % 4; 255 n = addr % 4;
@@ -277,15 +258,13 @@ __ixp4xx_outb(u8 value, u32 addr)
277 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); 258 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
278} 259}
279 260
280static inline void 261static inline void outsb(u32 io_addr, const u8 *vaddr, u32 count)
281__ixp4xx_outsb(u32 io_addr, const u8 *vaddr, u32 count)
282{ 262{
283 while (count--) 263 while (count--)
284 outb(*vaddr++, io_addr); 264 outb(*vaddr++, io_addr);
285} 265}
286 266
287static inline void 267static inline void outw(u16 value, u32 addr)
288__ixp4xx_outw(u16 value, u32 addr)
289{ 268{
290 u32 n, byte_enables, data; 269 u32 n, byte_enables, data;
291 n = addr % 4; 270 n = addr % 4;
@@ -294,28 +273,24 @@ __ixp4xx_outw(u16 value, u32 addr)
294 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); 273 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
295} 274}
296 275
297static inline void 276static inline void outsw(u32 io_addr, const u16 *vaddr, u32 count)
298__ixp4xx_outsw(u32 io_addr, const u16 *vaddr, u32 count)
299{ 277{
300 while (count--) 278 while (count--)
301 outw(cpu_to_le16(*vaddr++), io_addr); 279 outw(cpu_to_le16(*vaddr++), io_addr);
302} 280}
303 281
304static inline void 282static inline void outl(u32 value, u32 addr)
305__ixp4xx_outl(u32 value, u32 addr)
306{ 283{
307 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value); 284 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value);
308} 285}
309 286
310static inline void 287static inline void outsl(u32 io_addr, const u32 *vaddr, u32 count)
311__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count)
312{ 288{
313 while (count--) 289 while (count--)
314 outl(*vaddr++, io_addr); 290 outl(cpu_to_le32(*vaddr++), io_addr);
315} 291}
316 292
317static inline u8 293static inline u8 inb(u32 addr)
318__ixp4xx_inb(u32 addr)
319{ 294{
320 u32 n, byte_enables, data; 295 u32 n, byte_enables, data;
321 n = addr % 4; 296 n = addr % 4;
@@ -326,15 +301,13 @@ __ixp4xx_inb(u32 addr)
326 return data >> (8*n); 301 return data >> (8*n);
327} 302}
328 303
329static inline void 304static inline void insb(u32 io_addr, u8 *vaddr, u32 count)
330__ixp4xx_insb(u32 io_addr, u8 *vaddr, u32 count)
331{ 305{
332 while (count--) 306 while (count--)
333 *vaddr++ = inb(io_addr); 307 *vaddr++ = inb(io_addr);
334} 308}
335 309
336static inline u16 310static inline u16 inw(u32 addr)
337__ixp4xx_inw(u32 addr)
338{ 311{
339 u32 n, byte_enables, data; 312 u32 n, byte_enables, data;
340 n = addr % 4; 313 n = addr % 4;
@@ -345,15 +318,13 @@ __ixp4xx_inw(u32 addr)
345 return data>>(8*n); 318 return data>>(8*n);
346} 319}
347 320
348static inline void 321static inline void insw(u32 io_addr, u16 *vaddr, u32 count)
349__ixp4xx_insw(u32 io_addr, u16 *vaddr, u32 count)
350{ 322{
351 while (count--) 323 while (count--)
352 *vaddr++ = le16_to_cpu(inw(io_addr)); 324 *vaddr++ = le16_to_cpu(inw(io_addr));
353} 325}
354 326
355static inline u32 327static inline u32 inl(u32 addr)
356__ixp4xx_inl(u32 addr)
357{ 328{
358 u32 data; 329 u32 data;
359 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data)) 330 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data))
@@ -362,11 +333,10 @@ __ixp4xx_inl(u32 addr)
362 return data; 333 return data;
363} 334}
364 335
365static inline void 336static inline void insl(u32 io_addr, u32 *vaddr, u32 count)
366__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
367{ 337{
368 while (count--) 338 while (count--)
369 *vaddr++ = inl(io_addr); 339 *vaddr++ = le32_to_cpu(inl(io_addr));
370} 340}
371 341
372#define PIO_OFFSET 0x10000UL 342#define PIO_OFFSET 0x10000UL
@@ -374,194 +344,183 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
374 344
375#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \ 345#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \
376 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) 346 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
377static inline unsigned int 347
378__ixp4xx_ioread8(const void __iomem *addr) 348#define ioread8(p) ioread8(p)
349static inline unsigned int ioread8(const void __iomem *addr)
379{ 350{
380 unsigned long port = (unsigned long __force)addr; 351 unsigned long port = (unsigned long __force)addr;
381 if (__is_io_address(port)) 352 if (__is_io_address(port))
382 return (unsigned int)__ixp4xx_inb(port & PIO_MASK); 353 return (unsigned int)inb(port & PIO_MASK);
383 else 354 else
384#ifndef CONFIG_IXP4XX_INDIRECT_PCI 355#ifndef CONFIG_IXP4XX_INDIRECT_PCI
385 return (unsigned int)__raw_readb(port); 356 return (unsigned int)__raw_readb(port);
386#else 357#else
387 return (unsigned int)__ixp4xx_readb(addr); 358 return (unsigned int)__indirect_readb(addr);
388#endif 359#endif
389} 360}
390 361
391static inline void 362#define ioread8_rep(p, v, c) ioread8_rep(p, v, c)
392__ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count) 363static inline void ioread8_rep(const void __iomem *addr, void *vaddr, u32 count)
393{ 364{
394 unsigned long port = (unsigned long __force)addr; 365 unsigned long port = (unsigned long __force)addr;
395 if (__is_io_address(port)) 366 if (__is_io_address(port))
396 __ixp4xx_insb(port & PIO_MASK, vaddr, count); 367 insb(port & PIO_MASK, vaddr, count);
397 else 368 else
398#ifndef CONFIG_IXP4XX_INDIRECT_PCI 369#ifndef CONFIG_IXP4XX_INDIRECT_PCI
399 __raw_readsb(addr, vaddr, count); 370 __raw_readsb(addr, vaddr, count);
400#else 371#else
401 __ixp4xx_readsb(addr, vaddr, count); 372 __indirect_readsb(addr, vaddr, count);
402#endif 373#endif
403} 374}
404 375
405static inline unsigned int 376#define ioread16(p) ioread16(p)
406__ixp4xx_ioread16(const void __iomem *addr) 377static inline unsigned int ioread16(const void __iomem *addr)
407{ 378{
408 unsigned long port = (unsigned long __force)addr; 379 unsigned long port = (unsigned long __force)addr;
409 if (__is_io_address(port)) 380 if (__is_io_address(port))
410 return (unsigned int)__ixp4xx_inw(port & PIO_MASK); 381 return (unsigned int)inw(port & PIO_MASK);
411 else 382 else
412#ifndef CONFIG_IXP4XX_INDIRECT_PCI 383#ifndef CONFIG_IXP4XX_INDIRECT_PCI
413 return le16_to_cpu(__raw_readw((u32)port)); 384 return le16_to_cpu(__raw_readw((u32)port));
414#else 385#else
415 return (unsigned int)__ixp4xx_readw(addr); 386 return (unsigned int)__indirect_readw(addr);
416#endif 387#endif
417} 388}
418 389
419static inline void 390#define ioread16_rep(p, v, c) ioread16_rep(p, v, c)
420__ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count) 391static inline void ioread16_rep(const void __iomem *addr, void *vaddr,
392 u32 count)
421{ 393{
422 unsigned long port = (unsigned long __force)addr; 394 unsigned long port = (unsigned long __force)addr;
423 if (__is_io_address(port)) 395 if (__is_io_address(port))
424 __ixp4xx_insw(port & PIO_MASK, vaddr, count); 396 insw(port & PIO_MASK, vaddr, count);
425 else 397 else
426#ifndef CONFIG_IXP4XX_INDIRECT_PCI 398#ifndef CONFIG_IXP4XX_INDIRECT_PCI
427 __raw_readsw(addr, vaddr, count); 399 __raw_readsw(addr, vaddr, count);
428#else 400#else
429 __ixp4xx_readsw(addr, vaddr, count); 401 __indirect_readsw(addr, vaddr, count);
430#endif 402#endif
431} 403}
432 404
433static inline unsigned int 405#define ioread32(p) ioread32(p)
434__ixp4xx_ioread32(const void __iomem *addr) 406static inline unsigned int ioread32(const void __iomem *addr)
435{ 407{
436 unsigned long port = (unsigned long __force)addr; 408 unsigned long port = (unsigned long __force)addr;
437 if (__is_io_address(port)) 409 if (__is_io_address(port))
438 return (unsigned int)__ixp4xx_inl(port & PIO_MASK); 410 return (unsigned int)inl(port & PIO_MASK);
439 else { 411 else {
440#ifndef CONFIG_IXP4XX_INDIRECT_PCI 412#ifndef CONFIG_IXP4XX_INDIRECT_PCI
441 return le32_to_cpu((__force __le32)__raw_readl(addr)); 413 return le32_to_cpu((__force __le32)__raw_readl(addr));
442#else 414#else
443 return (unsigned int)__ixp4xx_readl(addr); 415 return (unsigned int)__indirect_readl(addr);
444#endif 416#endif
445 } 417 }
446} 418}
447 419
448static inline void 420#define ioread32_rep(p, v, c) ioread32_rep(p, v, c)
449__ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count) 421static inline void ioread32_rep(const void __iomem *addr, void *vaddr,
422 u32 count)
450{ 423{
451 unsigned long port = (unsigned long __force)addr; 424 unsigned long port = (unsigned long __force)addr;
452 if (__is_io_address(port)) 425 if (__is_io_address(port))
453 __ixp4xx_insl(port & PIO_MASK, vaddr, count); 426 insl(port & PIO_MASK, vaddr, count);
454 else 427 else
455#ifndef CONFIG_IXP4XX_INDIRECT_PCI 428#ifndef CONFIG_IXP4XX_INDIRECT_PCI
456 __raw_readsl(addr, vaddr, count); 429 __raw_readsl(addr, vaddr, count);
457#else 430#else
458 __ixp4xx_readsl(addr, vaddr, count); 431 __indirect_readsl(addr, vaddr, count);
459#endif 432#endif
460} 433}
461 434
462static inline void 435#define iowrite8(v, p) iowrite8(v, p)
463__ixp4xx_iowrite8(u8 value, void __iomem *addr) 436static inline void iowrite8(u8 value, void __iomem *addr)
464{ 437{
465 unsigned long port = (unsigned long __force)addr; 438 unsigned long port = (unsigned long __force)addr;
466 if (__is_io_address(port)) 439 if (__is_io_address(port))
467 __ixp4xx_outb(value, port & PIO_MASK); 440 outb(value, port & PIO_MASK);
468 else 441 else
469#ifndef CONFIG_IXP4XX_INDIRECT_PCI 442#ifndef CONFIG_IXP4XX_INDIRECT_PCI
470 __raw_writeb(value, port); 443 __raw_writeb(value, port);
471#else 444#else
472 __ixp4xx_writeb(value, addr); 445 __indirect_writeb(value, addr);
473#endif 446#endif
474} 447}
475 448
476static inline void 449#define iowrite8_rep(p, v, c) iowrite8_rep(p, v, c)
477__ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count) 450static inline void iowrite8_rep(void __iomem *addr, const void *vaddr,
451 u32 count)
478{ 452{
479 unsigned long port = (unsigned long __force)addr; 453 unsigned long port = (unsigned long __force)addr;
480 if (__is_io_address(port)) 454 if (__is_io_address(port))
481 __ixp4xx_outsb(port & PIO_MASK, vaddr, count); 455 outsb(port & PIO_MASK, vaddr, count);
482 else 456 else
483#ifndef CONFIG_IXP4XX_INDIRECT_PCI 457#ifndef CONFIG_IXP4XX_INDIRECT_PCI
484 __raw_writesb(addr, vaddr, count); 458 __raw_writesb(addr, vaddr, count);
485#else 459#else
486 __ixp4xx_writesb(addr, vaddr, count); 460 __indirect_writesb(addr, vaddr, count);
487#endif 461#endif
488} 462}
489 463
490static inline void 464#define iowrite16(v, p) iowrite16(v, p)
491__ixp4xx_iowrite16(u16 value, void __iomem *addr) 465static inline void iowrite16(u16 value, void __iomem *addr)
492{ 466{
493 unsigned long port = (unsigned long __force)addr; 467 unsigned long port = (unsigned long __force)addr;
494 if (__is_io_address(port)) 468 if (__is_io_address(port))
495 __ixp4xx_outw(value, port & PIO_MASK); 469 outw(value, port & PIO_MASK);
496 else 470 else
497#ifndef CONFIG_IXP4XX_INDIRECT_PCI 471#ifndef CONFIG_IXP4XX_INDIRECT_PCI
498 __raw_writew(cpu_to_le16(value), addr); 472 __raw_writew(cpu_to_le16(value), addr);
499#else 473#else
500 __ixp4xx_writew(value, addr); 474 __indirect_writew(value, addr);
501#endif 475#endif
502} 476}
503 477
504static inline void 478#define iowrite16_rep(p, v, c) iowrite16_rep(p, v, c)
505__ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count) 479static inline void iowrite16_rep(void __iomem *addr, const void *vaddr,
480 u32 count)
506{ 481{
507 unsigned long port = (unsigned long __force)addr; 482 unsigned long port = (unsigned long __force)addr;
508 if (__is_io_address(port)) 483 if (__is_io_address(port))
509 __ixp4xx_outsw(port & PIO_MASK, vaddr, count); 484 outsw(port & PIO_MASK, vaddr, count);
510 else 485 else
511#ifndef CONFIG_IXP4XX_INDIRECT_PCI 486#ifndef CONFIG_IXP4XX_INDIRECT_PCI
512 __raw_writesw(addr, vaddr, count); 487 __raw_writesw(addr, vaddr, count);
513#else 488#else
514 __ixp4xx_writesw(addr, vaddr, count); 489 __indirect_writesw(addr, vaddr, count);
515#endif 490#endif
516} 491}
517 492
518static inline void 493#define iowrite32(v, p) iowrite32(v, p)
519__ixp4xx_iowrite32(u32 value, void __iomem *addr) 494static inline void iowrite32(u32 value, void __iomem *addr)
520{ 495{
521 unsigned long port = (unsigned long __force)addr; 496 unsigned long port = (unsigned long __force)addr;
522 if (__is_io_address(port)) 497 if (__is_io_address(port))
523 __ixp4xx_outl(value, port & PIO_MASK); 498 outl(value, port & PIO_MASK);
524 else 499 else
525#ifndef CONFIG_IXP4XX_INDIRECT_PCI 500#ifndef CONFIG_IXP4XX_INDIRECT_PCI
526 __raw_writel((u32 __force)cpu_to_le32(value), addr); 501 __raw_writel((u32 __force)cpu_to_le32(value), addr);
527#else 502#else
528 __ixp4xx_writel(value, addr); 503 __indirect_writel(value, addr);
529#endif 504#endif
530} 505}
531 506
532static inline void 507#define iowrite32_rep(p, v, c) iowrite32_rep(p, v, c)
533__ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count) 508static inline void iowrite32_rep(void __iomem *addr, const void *vaddr,
509 u32 count)
534{ 510{
535 unsigned long port = (unsigned long __force)addr; 511 unsigned long port = (unsigned long __force)addr;
536 if (__is_io_address(port)) 512 if (__is_io_address(port))
537 __ixp4xx_outsl(port & PIO_MASK, vaddr, count); 513 outsl(port & PIO_MASK, vaddr, count);
538 else 514 else
539#ifndef CONFIG_IXP4XX_INDIRECT_PCI 515#ifndef CONFIG_IXP4XX_INDIRECT_PCI
540 __raw_writesl(addr, vaddr, count); 516 __raw_writesl(addr, vaddr, count);
541#else 517#else
542 __ixp4xx_writesl(addr, vaddr, count); 518 __indirect_writesl(addr, vaddr, count);
543#endif 519#endif
544} 520}
545 521
546#define ioread8(p) __ixp4xx_ioread8(p)
547#define ioread16(p) __ixp4xx_ioread16(p)
548#define ioread32(p) __ixp4xx_ioread32(p)
549
550#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
551#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
552#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
553
554#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
555#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
556#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
557
558#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
559#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
560#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
561
562#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET)) 522#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET))
563#define ioport_unmap(addr) 523#define ioport_unmap(addr)
564#endif // !CONFIG_PCI 524#endif /* CONFIG_PCI */
565
566#endif // __ASM_ARM_ARCH_IO_H
567 525
526#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/irqs.h b/arch/arm/mach-ixp4xx/include/mach/irqs.h
index f4d74de1566a..7e6d4cce7c27 100644
--- a/arch/arm/mach-ixp4xx/include/mach/irqs.h
+++ b/arch/arm/mach-ixp4xx/include/mach/irqs.h
@@ -15,7 +15,6 @@
15#ifndef _ARCH_IXP4XX_IRQS_H_ 15#ifndef _ARCH_IXP4XX_IRQS_H_
16#define _ARCH_IXP4XX_IRQS_H_ 16#define _ARCH_IXP4XX_IRQS_H_
17 17
18
19#define IRQ_IXP4XX_NPEA 0 18#define IRQ_IXP4XX_NPEA 0
20#define IRQ_IXP4XX_NPEB 1 19#define IRQ_IXP4XX_NPEB 1
21#define IRQ_IXP4XX_NPEC 2 20#define IRQ_IXP4XX_NPEC 2
@@ -59,6 +58,9 @@
59#define IRQ_IXP4XX_MCU_ECC 61 58#define IRQ_IXP4XX_MCU_ECC 61
60#define IRQ_IXP4XX_EXP_PE 62 59#define IRQ_IXP4XX_EXP_PE 62
61 60
61#define _IXP4XX_GPIO_IRQ(n) (IRQ_IXP4XX_GPIO ## n)
62#define IXP4XX_GPIO_IRQ(n) _IXP4XX_GPIO_IRQ(n)
63
62/* 64/*
63 * Only first 32 sources are valid if running on IXP42x systems 65 * Only first 32 sources are valid if running on IXP42x systems
64 */ 66 */
@@ -70,69 +72,4 @@
70 72
71#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU) 73#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
72 74
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 75#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixdp425.h b/arch/arm/mach-ixp4xx/include/mach/ixdp425.h
deleted file mode 100644
index 2cafe65ebfee..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/ixdp425.h
+++ /dev/null
@@ -1,39 +0,0 @@
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/nas100d.h b/arch/arm/mach-ixp4xx/include/mach/nas100d.h
deleted file mode 100644
index 3771d62a9748..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/nas100d.h
+++ /dev/null
@@ -1,52 +0,0 @@
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/arch/arm/mach-ixp4xx/include/mach/npe.h b/arch/arm/mach-ixp4xx/include/mach/npe.h
index 37d0511689dc..e320db2457ae 100644
--- a/arch/arm/mach-ixp4xx/include/mach/npe.h
+++ b/arch/arm/mach-ixp4xx/include/mach/npe.h
@@ -33,7 +33,7 @@ int npe_send_message(struct npe *npe, const void *msg, const char *what);
33int npe_recv_message(struct npe *npe, void *msg, const char *what); 33int npe_recv_message(struct npe *npe, void *msg, const char *what);
34int npe_send_recv_message(struct npe *npe, void *msg, const char *what); 34int npe_send_recv_message(struct npe *npe, void *msg, const char *what);
35int npe_load_firmware(struct npe *npe, const char *name, struct device *dev); 35int npe_load_firmware(struct npe *npe, const char *name, struct device *dev);
36struct npe *npe_request(int id); 36struct npe *npe_request(unsigned id);
37void npe_release(struct npe *npe); 37void npe_release(struct npe *npe);
38 38
39#endif /* __IXP4XX_NPE_H */ 39#endif /* __IXP4XX_NPE_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/nslu2.h b/arch/arm/mach-ixp4xx/include/mach/nslu2.h
deleted file mode 100644
index 85d00adbfb92..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/nslu2.h
+++ /dev/null
@@ -1,55 +0,0 @@
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/prpmc1100.h b/arch/arm/mach-ixp4xx/include/mach/prpmc1100.h
deleted file mode 100644
index 17274a2e3dec..000000000000
--- a/arch/arm/mach-ixp4xx/include/mach/prpmc1100.h
+++ /dev/null
@@ -1,33 +0,0 @@
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/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h
index 89ce3ee84698..2c3f93c3eb79 100644
--- a/arch/arm/mach-ixp4xx/include/mach/timex.h
+++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
@@ -10,6 +10,6 @@
10 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the 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. 11 * timer register ignores the bottom 2 bits of the LATCH value.
12 */ 12 */
13#define FREQ 66666666 13#define FREQ 66666000
14#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) 14#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
15 15
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index 64c29aacaac9..1ba165a6edac 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-ixp4xx/ixdp425-pci.c 2 * arch/arm/mach-ixp4xx/ixdp425-pci.c
3 * 3 *
4 * IXDP425 board-level PCI initialization 4 * IXDP425 board-level PCI initialization
5 * 5 *
@@ -19,39 +19,43 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22
23#include <asm/mach/pci.h> 22#include <asm/mach/pci.h>
24#include <asm/irq.h> 23#include <asm/irq.h>
25#include <mach/hardware.h> 24#include <mach/hardware.h>
26#include <asm/mach-types.h> 25#include <asm/mach-types.h>
27 26
27#define MAX_DEV 4
28#define IRQ_LINES 4
29
30/* PCI controller GPIO to IRQ pin mappings */
31#define INTA 11
32#define INTB 10
33#define INTC 9
34#define INTD 8
35
36
28void __init ixdp425_pci_preinit(void) 37void __init ixdp425_pci_preinit(void)
29{ 38{
30 set_irq_type(IRQ_IXDP425_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 39 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
31 set_irq_type(IRQ_IXDP425_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 40 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
32 set_irq_type(IRQ_IXDP425_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 41 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
33 set_irq_type(IRQ_IXDP425_PCI_INTD, IRQ_TYPE_LEVEL_LOW); 42 set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW);
34
35 ixp4xx_pci_preinit(); 43 ixp4xx_pci_preinit();
36} 44}
37 45
38static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 46static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39{ 47{
40 static int pci_irq_table[IXDP425_PCI_IRQ_LINES] = { 48 static int pci_irq_table[IRQ_LINES] = {
41 IRQ_IXDP425_PCI_INTA, 49 IXP4XX_GPIO_IRQ(INTA),
42 IRQ_IXDP425_PCI_INTB, 50 IXP4XX_GPIO_IRQ(INTB),
43 IRQ_IXDP425_PCI_INTC, 51 IXP4XX_GPIO_IRQ(INTC),
44 IRQ_IXDP425_PCI_INTD 52 IXP4XX_GPIO_IRQ(INTD)
45 }; 53 };
46 54
47 int irq = -1; 55 if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
48 56 return pci_irq_table[(slot + pin - 2) % 4];
49 if (slot >= 1 && slot <= IXDP425_PCI_MAX_DEV &&
50 pin >= 1 && pin <= IXDP425_PCI_IRQ_LINES) {
51 irq = pci_irq_table[(slot + pin - 2) % 4];
52 }
53 57
54 return irq; 58 return -1;
55} 59}
56 60
57struct hw_pci ixdp425_pci __initdata = { 61struct hw_pci ixdp425_pci __initdata = {
@@ -72,4 +76,3 @@ int __init ixdp425_pci_init(void)
72} 76}
73 77
74subsys_initcall(ixdp425_pci_init); 78subsys_initcall(ixdp425_pci_init);
75
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index f4a0c1bc1331..bbb768988845 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-ixp4xx/ixdp425-setup.c 2 * arch/arm/mach-ixp4xx/ixdp425-setup.c
3 * 3 *
4 * IXDP425/IXCDP1100 board-setup 4 * IXDP425/IXCDP1100 board-setup
5 * 5 *
6 * Copyright (C) 2003-2005 MontaVista Software, Inc. 6 * Copyright (C) 2003-2005 MontaVista Software, Inc.
7 * 7 *
@@ -21,7 +21,6 @@
21#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24
25#include <asm/types.h> 24#include <asm/types.h>
26#include <asm/setup.h> 25#include <asm/setup.h>
27#include <asm/memory.h> 26#include <asm/memory.h>
@@ -31,6 +30,15 @@
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/flash.h> 31#include <asm/mach/flash.h>
33 32
33#define IXDP425_SDA_PIN 7
34#define IXDP425_SCL_PIN 6
35
36/* NAND Flash pins */
37#define IXDP425_NAND_NCE_PIN 12
38
39#define IXDP425_NAND_CMD_BYTE 0x01
40#define IXDP425_NAND_ADDR_BYTE 0x02
41
34static struct flash_platform_data ixdp425_flash_data = { 42static struct flash_platform_data ixdp425_flash_data = {
35 .map_name = "cfi_probe", 43 .map_name = "cfi_probe",
36 .width = 2, 44 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
index 47ac69c7ec78..e8bb25778166 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
@@ -665,7 +665,7 @@ err:
665} 665}
666 666
667 667
668struct npe *npe_request(int id) 668struct npe *npe_request(unsigned id)
669{ 669{
670 if (id < NPE_COUNT) 670 if (id < NPE_COUNT)
671 if (npe_tab[id].valid) 671 if (npe_tab[id].valid)
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c
index 1088426fdcee..d0cea34cf61e 100644
--- a/arch/arm/mach-ixp4xx/nas100d-pci.c
+++ b/arch/arm/mach-ixp4xx/nas100d-pci.c
@@ -18,37 +18,42 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21
22#include <asm/mach/pci.h> 21#include <asm/mach/pci.h>
23#include <asm/mach-types.h> 22#include <asm/mach-types.h>
24 23
24#define MAX_DEV 3
25#define IRQ_LINES 3
26
27/* PCI controller GPIO to IRQ pin mappings */
28#define INTA 11
29#define INTB 10
30#define INTC 9
31#define INTD 8
32#define INTE 7
33
25void __init nas100d_pci_preinit(void) 34void __init nas100d_pci_preinit(void)
26{ 35{
27 set_irq_type(IRQ_NAS100D_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 36 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
28 set_irq_type(IRQ_NAS100D_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 37 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
29 set_irq_type(IRQ_NAS100D_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 38 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
30 set_irq_type(IRQ_NAS100D_PCI_INTD, IRQ_TYPE_LEVEL_LOW); 39 set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW);
31 set_irq_type(IRQ_NAS100D_PCI_INTE, IRQ_TYPE_LEVEL_LOW); 40 set_irq_type(IXP4XX_GPIO_IRQ(INTE), IRQ_TYPE_LEVEL_LOW);
32
33 ixp4xx_pci_preinit(); 41 ixp4xx_pci_preinit();
34} 42}
35 43
36static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 44static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
37{ 45{
38 static int pci_irq_table[NAS100D_PCI_MAX_DEV][NAS100D_PCI_IRQ_LINES] = 46 static int pci_irq_table[MAX_DEV][IRQ_LINES] = {
39 { 47 { IXP4XX_GPIO_IRQ(INTA), -1, -1 },
40 { IRQ_NAS100D_PCI_INTA, -1, -1 }, 48 { IXP4XX_GPIO_IRQ(INTB), -1, -1 },
41 { IRQ_NAS100D_PCI_INTB, -1, -1 }, 49 { IXP4XX_GPIO_IRQ(INTC), IXP4XX_GPIO_IRQ(INTD),
42 { IRQ_NAS100D_PCI_INTC, IRQ_NAS100D_PCI_INTD, IRQ_NAS100D_PCI_INTE }, 50 IXP4XX_GPIO_IRQ(INTE) },
43 }; 51 };
44 52
45 int irq = -1; 53 if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
46 54 return pci_irq_table[slot - 1][pin - 1];
47 if (slot >= 1 && slot <= NAS100D_PCI_MAX_DEV &&
48 pin >= 1 && pin <= NAS100D_PCI_IRQ_LINES)
49 irq = pci_irq_table[slot-1][pin-1];
50 55
51 return irq; 56 return -1;
52} 57}
53 58
54struct hw_pci __initdata nas100d_pci = { 59struct hw_pci __initdata nas100d_pci = {
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 921c947b5b6b..e3ee880aa1e6 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -29,12 +29,26 @@
29#include <linux/i2c.h> 29#include <linux/i2c.h>
30#include <linux/i2c-gpio.h> 30#include <linux/i2c-gpio.h>
31#include <linux/io.h> 31#include <linux/io.h>
32
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
36#include <asm/gpio.h> 35#include <asm/gpio.h>
37 36
37#define NAS100D_SDA_PIN 5
38#define NAS100D_SCL_PIN 6
39
40/* Buttons */
41#define NAS100D_PB_GPIO 14 /* power button */
42#define NAS100D_RB_GPIO 4 /* reset button */
43
44/* Power control */
45#define NAS100D_PO_GPIO 12 /* power off */
46
47/* LEDs */
48#define NAS100D_LED_WLAN_GPIO 0
49#define NAS100D_LED_DISK_GPIO 3
50#define NAS100D_LED_PWR_GPIO 15
51
38static struct flash_platform_data nas100d_flash_data = { 52static struct flash_platform_data nas100d_flash_data = {
39 .map_name = "cfi_probe", 53 .map_name = "cfi_probe",
40 .width = 2, 54 .width = 2,
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c
index 4429b8448b61..1eb5a90470bc 100644
--- a/arch/arm/mach-ixp4xx/nslu2-pci.c
+++ b/arch/arm/mach-ixp4xx/nslu2-pci.c
@@ -18,35 +18,38 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21
22#include <asm/mach/pci.h> 21#include <asm/mach/pci.h>
23#include <asm/mach-types.h> 22#include <asm/mach-types.h>
24 23
24#define MAX_DEV 3
25#define IRQ_LINES 3
26
27/* PCI controller GPIO to IRQ pin mappings */
28#define INTA 11
29#define INTB 10
30#define INTC 9
31#define INTD 8
32
25void __init nslu2_pci_preinit(void) 33void __init nslu2_pci_preinit(void)
26{ 34{
27 set_irq_type(IRQ_NSLU2_PCI_INTA, IRQ_TYPE_LEVEL_LOW); 35 set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
28 set_irq_type(IRQ_NSLU2_PCI_INTB, IRQ_TYPE_LEVEL_LOW); 36 set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
29 set_irq_type(IRQ_NSLU2_PCI_INTC, IRQ_TYPE_LEVEL_LOW); 37 set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
30
31 ixp4xx_pci_preinit(); 38 ixp4xx_pci_preinit();
32} 39}
33 40
34static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 41static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
35{ 42{
36 static int pci_irq_table[NSLU2_PCI_IRQ_LINES] = { 43 static int pci_irq_table[IRQ_LINES] = {
37 IRQ_NSLU2_PCI_INTA, 44 IXP4XX_GPIO_IRQ(INTA),
38 IRQ_NSLU2_PCI_INTB, 45 IXP4XX_GPIO_IRQ(INTB),
39 IRQ_NSLU2_PCI_INTC, 46 IXP4XX_GPIO_IRQ(INTC),
40 }; 47 };
41 48
42 int irq = -1; 49 if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
43 50 return pci_irq_table[(slot + pin - 2) % IRQ_LINES];
44 if (slot >= 1 && slot <= NSLU2_PCI_MAX_DEV &&
45 pin >= 1 && pin <= NSLU2_PCI_IRQ_LINES) {
46 irq = pci_irq_table[(slot + pin - 2) % NSLU2_PCI_IRQ_LINES];
47 }
48 51
49 return irq; 52 return -1;
50} 53}
51 54
52struct hw_pci __initdata nslu2_pci = { 55struct hw_pci __initdata nslu2_pci = {
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index ff6a08d02cc4..c14e0034be4b 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -26,13 +26,32 @@
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/i2c-gpio.h> 27#include <linux/i2c-gpio.h>
28#include <linux/io.h> 28#include <linux/io.h>
29
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/flash.h> 31#include <asm/mach/flash.h>
33#include <asm/mach/time.h> 32#include <asm/mach/time.h>
34#include <asm/gpio.h> 33#include <asm/gpio.h>
35 34
35#define NSLU2_SDA_PIN 7
36#define NSLU2_SCL_PIN 6
37
38/* NSLU2 Timer */
39#define NSLU2_FREQ 66000000
40
41/* Buttons */
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#define NSLU2_GPIO_BUZZ 4
48
49/* LEDs */
50#define NSLU2_LED_RED_GPIO 0
51#define NSLU2_LED_GRN_GPIO 1
52#define NSLU2_LED_DISK1_GPIO 3
53#define NSLU2_LED_DISK2_GPIO 2
54
36static struct flash_platform_data nslu2_flash_data = { 55static struct flash_platform_data nslu2_flash_data = {
37 .map_name = "cfi_probe", 56 .map_name = "cfi_probe",
38 .width = 2, 57 .width = 2,
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 8bf09ae5b347..f6c6196a51fa 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -52,6 +52,12 @@ config MACH_OPENRD_BASE
52 Say 'Y' here if you want your kernel to support the 52 Say 'Y' here if you want your kernel to support the
53 Marvell OpenRD Base Board. 53 Marvell OpenRD Base Board.
54 54
55config MACH_NETSPACE_V2
56 bool "LaCie Network Space v2 NAS Board"
57 help
58 Say 'Y' here if you want your kernel to support the
59 LaCie Network Space v2 NAS.
60
55endmenu 61endmenu
56 62
57endif 63endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 9f2f67b2b63d..d4d7f53b0fb9 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -8,5 +8,6 @@ obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
8obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 8obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
9obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 9obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
10obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o 10obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o
11obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o
11 12
12obj-$(CONFIG_CPU_IDLE) += cpuidle.o 13obj-$(CONFIG_CPU_IDLE) += cpuidle.o
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
new file mode 100644
index 000000000000..9a064065bebe
--- /dev/null
+++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
@@ -0,0 +1,325 @@
1/*
2 * arch/arm/mach-kirkwood/netspace_v2-setup.c
3 *
4 * LaCie Network Space v2 board setup
5 *
6 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
7 * Copyright (C) 2009 Benoît Canet <benoit.canet@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#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/platform_device.h>
27#include <linux/mtd/physmap.h>
28#include <linux/spi/flash.h>
29#include <linux/spi/spi.h>
30#include <linux/ata_platform.h>
31#include <linux/mv643xx_eth.h>
32#include <linux/i2c.h>
33#include <linux/i2c/at24.h>
34#include <linux/input.h>
35#include <linux/gpio.h>
36#include <linux/gpio_keys.h>
37#include <linux/leds.h>
38#include <asm/mach-types.h>
39#include <asm/mach/arch.h>
40#include <asm/mach/time.h>
41#include <mach/kirkwood.h>
42#include <plat/time.h>
43#include "common.h"
44#include "mpp.h"
45
46/*****************************************************************************
47 * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
48 ****************************************************************************/
49
50static struct mtd_partition netspace_v2_flash_parts[] = {
51 {
52 .name = "u-boot",
53 .size = MTDPART_SIZ_FULL,
54 .offset = 0,
55 .mask_flags = MTD_WRITEABLE, /* force read-only */
56 },
57};
58
59static const struct flash_platform_data netspace_v2_flash = {
60 .type = "mx25l4005a",
61 .name = "spi_flash",
62 .parts = netspace_v2_flash_parts,
63 .nr_parts = ARRAY_SIZE(netspace_v2_flash_parts),
64};
65
66static struct spi_board_info __initdata netspace_v2_spi_slave_info[] = {
67 {
68 .modalias = "m25p80",
69 .platform_data = &netspace_v2_flash,
70 .irq = -1,
71 .max_speed_hz = 20000000,
72 .bus_num = 0,
73 .chip_select = 0,
74 },
75};
76
77/*****************************************************************************
78 * Ethernet
79 ****************************************************************************/
80
81static struct mv643xx_eth_platform_data netspace_v2_ge00_data = {
82 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
83};
84
85/*****************************************************************************
86 * I2C devices
87 ****************************************************************************/
88
89static struct at24_platform_data at24c04 = {
90 .byte_len = SZ_4K / 8,
91 .page_size = 16,
92};
93
94/*
95 * i2c addr | chip | description
96 * 0x50 | HT24LC04 | eeprom (512B)
97 */
98
99static struct i2c_board_info __initdata netspace_v2_i2c_info[] = {
100 {
101 I2C_BOARD_INFO("24c04", 0x50),
102 .platform_data = &at24c04,
103 }
104};
105
106/*****************************************************************************
107 * SATA
108 ****************************************************************************/
109
110static struct mv_sata_platform_data netspace_v2_sata_data = {
111 .n_ports = 2,
112};
113
114#define NETSPACE_V2_GPIO_SATA0_POWER 16
115#define NETSPACE_V2_GPIO_SATA1_POWER 17
116
117static void __init netspace_v2_sata_power_init(void)
118{
119 int err;
120
121 err = gpio_request(NETSPACE_V2_GPIO_SATA0_POWER, "SATA0 power");
122 if (err == 0) {
123 err = gpio_direction_output(NETSPACE_V2_GPIO_SATA0_POWER, 1);
124 if (err)
125 gpio_free(NETSPACE_V2_GPIO_SATA0_POWER);
126 }
127 if (err)
128 pr_err("netspace_v2: failed to setup SATA0 power\n");
129}
130
131/*****************************************************************************
132 * GPIO keys
133 ****************************************************************************/
134
135#define NETSPACE_V2_PUSH_BUTTON 32
136
137static struct gpio_keys_button netspace_v2_buttons[] = {
138 [0] = {
139 .code = KEY_POWER,
140 .gpio = NETSPACE_V2_PUSH_BUTTON,
141 .desc = "Power push button",
142 .active_low = 0,
143 },
144};
145
146static struct gpio_keys_platform_data netspace_v2_button_data = {
147 .buttons = netspace_v2_buttons,
148 .nbuttons = ARRAY_SIZE(netspace_v2_buttons),
149};
150
151static struct platform_device netspace_v2_gpio_buttons = {
152 .name = "gpio-keys",
153 .id = -1,
154 .dev = {
155 .platform_data = &netspace_v2_button_data,
156 },
157};
158
159/*****************************************************************************
160 * GPIO LEDs
161 ****************************************************************************/
162
163/*
164 * The blue front LED is wired to a CPLD and can blink in relation with the
165 * SATA activity.
166 *
167 * The following array detail the different LED registers and the combination
168 * of their possible values:
169 *
170 * cmd_led | slow_led | /SATA active | LED state
171 * | | |
172 * 1 | 0 | x | off
173 * - | 1 | x | on
174 * 0 | 0 | 1 | on
175 * 0 | 0 | 0 | blink (rate 300ms)
176 */
177
178#define NETSPACE_V2_GPIO_RED_LED 12
179#define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29
180#define NETSPACE_V2_GPIO_BLUE_LED_CMD 30
181
182
183static struct gpio_led netspace_v2_gpio_led_pins[] = {
184 {
185 .name = "ns_v2:red:fail",
186 .gpio = NETSPACE_V2_GPIO_RED_LED,
187 },
188};
189
190static struct gpio_led_platform_data netspace_v2_gpio_leds_data = {
191 .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins),
192 .leds = netspace_v2_gpio_led_pins,
193};
194
195static struct platform_device netspace_v2_gpio_leds = {
196 .name = "leds-gpio",
197 .id = -1,
198 .dev = {
199 .platform_data = &netspace_v2_gpio_leds_data,
200 },
201};
202
203static void __init netspace_v2_gpio_leds_init(void)
204{
205 platform_device_register(&netspace_v2_gpio_leds);
206
207 /*
208 * Configure the front blue LED to blink in relation with the SATA
209 * activity.
210 */
211 if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_SLOW,
212 "SATA blue LED slow") != 0)
213 return;
214 if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_SLOW, 0) != 0)
215 goto err_free_1;
216 if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_CMD,
217 "SATA blue LED command") != 0)
218 goto err_free_1;
219 if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_CMD, 0) != 0)
220 goto err_free_2;
221
222 return;
223
224err_free_2:
225 gpio_free(NETSPACE_V2_GPIO_BLUE_LED_CMD);
226err_free_1:
227 gpio_free(NETSPACE_V2_GPIO_BLUE_LED_SLOW);
228 pr_err("netspace_v2: failed to configure SATA blue LED\n");
229}
230
231/*****************************************************************************
232 * Timer
233 ****************************************************************************/
234
235static void netspace_v2_timer_init(void)
236{
237 kirkwood_tclk = 166666667;
238 orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
239}
240
241struct sys_timer netspace_v2_timer = {
242 .init = netspace_v2_timer_init,
243};
244
245/*****************************************************************************
246 * General Setup
247 ****************************************************************************/
248
249static unsigned int netspace_v2_mpp_config[] __initdata = {
250 MPP0_SPI_SCn,
251 MPP1_SPI_MOSI,
252 MPP2_SPI_SCK,
253 MPP3_SPI_MISO,
254 MPP4_NF_IO6,
255 MPP5_NF_IO7,
256 MPP6_SYSRST_OUTn,
257 MPP8_TW_SDA,
258 MPP9_TW_SCK,
259 MPP10_UART0_TXD,
260 MPP11_UART0_RXD,
261 MPP12_GPO, /* Red led */
262 MPP14_GPIO, /* USB fuse */
263 MPP16_GPIO, /* SATA 0 power */
264 MPP18_NF_IO0,
265 MPP19_NF_IO1,
266 MPP20_SATA1_ACTn,
267 MPP21_SATA0_ACTn,
268 MPP24_GPIO, /* USB mode select */
269 MPP25_GPIO, /* Fan rotation fail */
270 MPP26_GPIO, /* USB device vbus */
271 MPP28_GPIO, /* USB enable host vbus */
272 MPP29_GPIO, /* Blue led (slow register) */
273 MPP30_GPIO, /* Blue led (command register) */
274 MPP31_GPIO, /* Board power off */
275 MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
276 0
277};
278
279#define NETSPACE_V2_GPIO_POWER_OFF 31
280
281static void netspace_v2_power_off(void)
282{
283 gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1);
284}
285
286static void __init netspace_v2_init(void)
287{
288 /*
289 * Basic setup. Needs to be called early.
290 */
291 kirkwood_init();
292 kirkwood_mpp_conf(netspace_v2_mpp_config);
293
294 netspace_v2_sata_power_init();
295
296 kirkwood_ehci_init();
297 kirkwood_ge00_init(&netspace_v2_ge00_data);
298 kirkwood_sata_init(&netspace_v2_sata_data);
299 kirkwood_uart0_init();
300 spi_register_board_info(netspace_v2_spi_slave_info,
301 ARRAY_SIZE(netspace_v2_spi_slave_info));
302 kirkwood_spi_init();
303 kirkwood_i2c_init();
304 i2c_register_board_info(0, netspace_v2_i2c_info,
305 ARRAY_SIZE(netspace_v2_i2c_info));
306
307 netspace_v2_gpio_leds_init();
308 platform_device_register(&netspace_v2_gpio_buttons);
309
310 if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 &&
311 gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0)
312 pm_power_off = netspace_v2_power_off;
313 else
314 pr_err("netspace_v2: failed to configure power-off GPIO\n");
315}
316
317MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
318 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
319 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
320 .boot_params = 0x00000100,
321 .init_machine = netspace_v2_init,
322 .map_io = kirkwood_map_io,
323 .init_irq = kirkwood_init_irq,
324 .timer = &netspace_v2_timer,
325MACHINE_END
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c
index 6182f5410b4d..fcaf876f19b6 100644
--- a/arch/arm/mach-lh7a40x/clocks.c
+++ b/arch/arm/mach-lh7a40x/clocks.c
@@ -7,8 +7,6 @@
7 * version 2 as published by the Free Software Foundation. 7 * version 2 as published by the Free Software Foundation.
8 * 8 *
9 */ 9 */
10
11#include <linux/cpufreq.h>
12#include <mach/hardware.h> 10#include <mach/hardware.h>
13#include <mach/clocks.h> 11#include <mach/clocks.h>
14#include <linux/err.h> 12#include <linux/err.h>
@@ -31,12 +29,6 @@ struct clk {
31#define HCLKDIV(c) (((c) >> 0) & 0x02) 29#define HCLKDIV(c) (((c) >> 0) & 0x02)
32#define PCLKDIV(c) (((c) >> 16) & 0x03) 30#define PCLKDIV(c) (((c) >> 16) & 0x03)
33 31
34unsigned int cpufreq_get (unsigned int cpu) /* in kHz */
35{
36 return fclkfreq_get ()/1000;
37}
38EXPORT_SYMBOL(cpufreq_get);
39
40unsigned int fclkfreq_get (void) 32unsigned int fclkfreq_get (void)
41{ 33{
42 unsigned int clkset = CSC_CLKSET; 34 unsigned int clkset = CSC_CLKSET;
diff --git a/arch/arm/mach-lh7a40x/include/mach/hardware.h b/arch/arm/mach-lh7a40x/include/mach/hardware.h
index 48e827d2fa56..59d2ace35217 100644
--- a/arch/arm/mach-lh7a40x/include/mach/hardware.h
+++ b/arch/arm/mach-lh7a40x/include/mach/hardware.h
@@ -31,7 +31,7 @@
31/* 31/*
32 * This __REG() version gives the same results as the one above, except 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 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 34 * assembly code for access to contiguous registers. It's a shame that gcc
35 * doesn't guess this by itself. 35 * doesn't guess this by itself.
36 */ 36 */
37#include <asm/types.h> 37#include <asm/types.h>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index d140abca690a..f780086befd7 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -3,6 +3,30 @@ if ARCH_MSM
3comment "MSM Board Type" 3comment "MSM Board Type"
4 depends on ARCH_MSM 4 depends on ARCH_MSM
5 5
6config MSM_DEBUG_UART
7 int
8 default 1 if MSM_DEBUG_UART1
9 default 2 if MSM_DEBUG_UART2
10 default 3 if MSM_DEBUG_UART3
11
12choice
13 prompt "Debug UART"
14
15 default MSM_DEBUG_UART_NONE
16
17 config MSM_DEBUG_UART_NONE
18 bool "None"
19
20 config MSM_DEBUG_UART1
21 bool "UART1"
22
23 config MSM_DEBUG_UART2
24 bool "UART2"
25
26 config MSM_DEBUG_UART3
27 bool "UART3"
28endchoice
29
6config MACH_HALIBUT 30config MACH_HALIBUT
7 depends on ARCH_MSM 31 depends on ARCH_MSM
8 default y 32 default y
@@ -10,4 +34,10 @@ config MACH_HALIBUT
10 help 34 help
11 Support for the Qualcomm SURF7201A eval board. 35 Support for the Qualcomm SURF7201A eval board.
12 36
37config MACH_TROUT
38 default y
39 bool "HTC Dream (aka trout)"
40 help
41 Support for the HTC Dream, T-Mobile G1, Android ADP1 devices.
42
13endif 43endif
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 1aa47001aa3b..91e6f5c95dc1 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -6,3 +6,4 @@ obj-y += clock.o clock-7x01a.o
6 6
7obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o 7obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o
8 8
9obj-$(CONFIG_MACH_TROUT) += board-dream.o
diff --git a/arch/arm/mach-msm/board-dream.c b/arch/arm/mach-msm/board-dream.c
new file mode 100644
index 000000000000..21afa8513168
--- /dev/null
+++ b/arch/arm/mach-msm/board-dream.c
@@ -0,0 +1,93 @@
1/* linux/arch/arm/mach-msm/board-dream.c
2 *
3 * Copyright (C) 2009 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 <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20
21#include <asm/mach-types.h>
22#include <asm/mach/arch.h>
23#include <asm/mach/map.h>
24#include <asm/setup.h>
25
26#include <mach/board.h>
27#include <mach/hardware.h>
28#include <mach/msm_iomap.h>
29
30#include "devices.h"
31#include "board-dream.h"
32
33static struct platform_device *devices[] __initdata = {
34 &msm_device_uart3,
35 &msm_device_smd,
36 &msm_device_nand,
37 &msm_device_hsusb,
38 &msm_device_i2c,
39};
40
41extern struct sys_timer msm_timer;
42
43static void __init trout_init_irq(void)
44{
45 msm_init_irq();
46}
47
48static void __init trout_fixup(struct machine_desc *desc, struct tag *tags,
49 char **cmdline, struct meminfo *mi)
50{
51 mi->nr_banks = 1;
52 mi->bank[0].start = PHYS_OFFSET;
53 mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
54 mi->bank[0].size = (101*1024*1024);
55}
56
57static void __init trout_init(void)
58{
59 platform_add_devices(devices, ARRAY_SIZE(devices));
60}
61
62static struct map_desc trout_io_desc[] __initdata = {
63 {
64 .virtual = TROUT_CPLD_BASE,
65 .pfn = __phys_to_pfn(TROUT_CPLD_START),
66 .length = TROUT_CPLD_SIZE,
67 .type = MT_DEVICE_NONSHARED
68 }
69};
70
71static void __init trout_map_io(void)
72{
73 msm_map_common_io();
74 iotable_init(trout_io_desc, ARRAY_SIZE(trout_io_desc));
75
76#ifdef CONFIG_MSM_DEBUG_UART3
77 /* route UART3 to the "H2W" extended usb connector */
78 writeb(0x80, TROUT_CPLD_BASE + 0x00);
79#endif
80
81 msm_clock_init();
82}
83
84MACHINE_START(TROUT, "HTC Dream")
85 .phys_io = MSM_DEBUG_UART_PHYS,
86 .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
87 .boot_params = 0x10000100,
88 .fixup = trout_fixup,
89 .map_io = trout_map_io,
90 .init_irq = trout_init_irq,
91 .init_machine = trout_init,
92 .timer = &msm_timer,
93MACHINE_END
diff --git a/arch/arm/mach-msm/board-dream.h b/arch/arm/mach-msm/board-dream.h
new file mode 100644
index 000000000000..4f345a5a0a61
--- /dev/null
+++ b/arch/arm/mach-msm/board-dream.h
@@ -0,0 +1,5 @@
1
2#define TROUT_CPLD_BASE 0xE8100000
3#define TROUT_CPLD_START 0x98000000
4#define TROUT_CPLD_SIZE SZ_4K
5
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S
index 1db3c97dbc49..d48747ebcd3d 100644
--- a/arch/arm/mach-msm/include/mach/debug-macro.S
+++ b/arch/arm/mach-msm/include/mach/debug-macro.S
@@ -14,15 +14,18 @@
14 * 14 *
15 */ 15 */
16 16
17
18
17#include <mach/hardware.h> 19#include <mach/hardware.h>
18#include <mach/msm_iomap.h> 20#include <mach/msm_iomap.h>
19 21
22#ifdef CONFIG_MSM_DEBUG_UART
20 .macro addruart,rx 23 .macro addruart,rx
21 @ see if the MMU is enabled and select appropriate base address 24 @ see if the MMU is enabled and select appropriate base address
22 mrc p15, 0, \rx, c1, c0 25 mrc p15, 0, \rx, c1, c0
23 tst \rx, #1 26 tst \rx, #1
24 ldreq \rx, =MSM_UART1_PHYS 27 ldreq \rx, =MSM_DEBUG_UART_PHYS
25 movne \rx, #0 28 ldrne \rx, =MSM_DEBUG_UART_BASE
26 .endm 29 .endm
27 30
28 .macro senduart,rd,rx 31 .macro senduart,rd,rx
@@ -32,13 +35,20 @@
32 35
33 .macro waituart,rd,rx 36 .macro waituart,rd,rx
34 @ wait for TX_READY 37 @ wait for TX_READY
35 teq \rx, #0 381001: ldr \rd, [\rx, #0x08]
36 bne 2f
371: ldr \rd, [\rx, #0x08]
38 tst \rd, #0x04 39 tst \rd, #0x04
39 beq 1b 40 beq 1001b
402: 41 .endm
42#else
43 .macro addruart,rx
44 .endm
45
46 .macro senduart,rd,rx
47 .endm
48
49 .macro waituart,rd,rx
41 .endm 50 .endm
51#endif
42 52
43 .macro busyuart,rd,rx 53 .macro busyuart,rd,rx
44 .endm 54 .endm
diff --git a/arch/arm/mach-msm/include/mach/mmc.h b/arch/arm/mach-msm/include/mach/mmc.h
new file mode 100644
index 000000000000..0ecf25426284
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/mmc.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/include/asm/mach/mmc.h
3 */
4#ifndef ASMARM_MACH_MMC_H
5#define ASMARM_MACH_MMC_H
6
7#include <linux/mmc/host.h>
8#include <linux/mmc/card.h>
9#include <linux/mmc/sdio_func.h>
10
11struct embedded_sdio_data {
12 struct sdio_cis cis;
13 struct sdio_cccr cccr;
14 struct sdio_embedded_func *funcs;
15 int num_funcs;
16};
17
18struct mmc_platform_data {
19 unsigned int ocr_mask; /* available voltages */
20 u32 (*translate_vdd)(struct device *, unsigned int);
21 unsigned int (*status)(struct device *);
22 struct embedded_sdio_data *embedded_sdio;
23 int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
24};
25
26#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index 2f7b4c8620d9..9dae1a98c77a 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -84,6 +84,18 @@
84#define MSM_UART3_PHYS 0xA9C00000 84#define MSM_UART3_PHYS 0xA9C00000
85#define MSM_UART3_SIZE SZ_4K 85#define MSM_UART3_SIZE SZ_4K
86 86
87#ifdef CONFIG_MSM_DEBUG_UART
88#define MSM_DEBUG_UART_BASE 0xE1000000
89#if CONFIG_MSM_DEBUG_UART == 1
90#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
91#elif CONFIG_MSM_DEBUG_UART == 2
92#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
93#elif CONFIG_MSM_DEBUG_UART == 3
94#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
95#endif
96#define MSM_DEBUG_UART_SIZE SZ_4K
97#endif
98
87#define MSM_SDC1_PHYS 0xA0400000 99#define MSM_SDC1_PHYS 0xA0400000
88#define MSM_SDC1_SIZE SZ_4K 100#define MSM_SDC1_SIZE SZ_4K
89 101
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 026e8955ace9..d94292c29d8e 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -16,9 +16,16 @@
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H 16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17 17
18#include "hardware.h" 18#include "hardware.h"
19#include "linux/io.h"
20#include "mach/msm_iomap.h"
19 21
20static void putc(int c) 22static void putc(int c)
21{ 23{
24#if defined(MSM_DEBUG_UART_PHYS)
25 unsigned base = MSM_DEBUG_UART_PHYS;
26 while (!(readl(base + 0x08) & 0x04)) ;
27 writel(c, base + 0x0c);
28#endif
22} 29}
23 30
24static inline void flush(void) 31static inline void flush(void)
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 6e7692ff6f2c..1c5e7dac086f 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -42,6 +42,9 @@ static struct map_desc msm_io_desc[] __initdata = {
42 MSM_DEVICE(GPIO1), 42 MSM_DEVICE(GPIO1),
43 MSM_DEVICE(GPIO2), 43 MSM_DEVICE(GPIO2),
44 MSM_DEVICE(CLK_CTL), 44 MSM_DEVICE(CLK_CTL),
45#ifdef CONFIG_MSM_DEBUG_UART
46 MSM_DEVICE(DEBUG_UART),
47#endif
45 { 48 {
46 .virtual = (unsigned long) MSM_SHARED_RAM_BASE, 49 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
47 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), 50 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 116394484e71..9438bf6613a3 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -18,6 +18,7 @@
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/mtd/nand.h> 20#include <linux/mtd/nand.h>
21#include <linux/mtd/onenand.h>
21#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <asm/sizes.h> 24#include <asm/sizes.h>
@@ -149,7 +150,7 @@ static struct mtd_partition nhk8815_onenand_partitions[] = {
149 } 150 }
150}; 151};
151 152
152static struct flash_platform_data nhk8815_onenand_data = { 153static struct onenand_platform_data nhk8815_onenand_data = {
153 .parts = nhk8815_onenand_partitions, 154 .parts = nhk8815_onenand_partitions,
154 .nr_parts = ARRAY_SIZE(nhk8815_onenand_partitions), 155 .nr_parts = ARRAY_SIZE(nhk8815_onenand_partitions),
155}; 156};
@@ -163,7 +164,7 @@ static struct resource nhk8815_onenand_resource[] = {
163}; 164};
164 165
165static struct platform_device nhk8815_onenand_device = { 166static struct platform_device nhk8815_onenand_device = {
166 .name = "onenand", 167 .name = "onenand-flash",
167 .id = -1, 168 .id = -1,
168 .dev = { 169 .dev = {
169 .platform_data = &nhk8815_onenand_data, 170 .platform_data = &nhk8815_onenand_data,
@@ -174,10 +175,10 @@ static struct platform_device nhk8815_onenand_device = {
174 175
175static void __init nhk8815_onenand_init(void) 176static void __init nhk8815_onenand_init(void)
176{ 177{
177#ifdef CONFIG_ONENAND 178#ifdef CONFIG_MTD_ONENAND
178 /* Set up SMCS0 for OneNand */ 179 /* Set up SMCS0 for OneNand */
179 writel(0x000030db, FSMC_BCR0); 180 writel(0x000030db, FSMC_BCR(0));
180 writel(0x02100551, FSMC_BTR0); 181 writel(0x02100551, FSMC_BTR(0));
181#endif 182#endif
182} 183}
183 184
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index feb0e54a91de..038f24d47023 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -66,7 +66,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
66 struct irqaction *action; 66 struct irqaction *action;
67 irqreturn_t action_ret; 67 irqreturn_t action_ret;
68 68
69 spin_lock(&desc->lock); 69 raw_spin_lock(&desc->lock);
70 70
71 BUG_ON(desc->status & IRQ_INPROGRESS); 71 BUG_ON(desc->status & IRQ_INPROGRESS);
72 72
@@ -78,7 +78,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
78 goto out_mask; 78 goto out_mask;
79 79
80 desc->status |= IRQ_INPROGRESS; 80 desc->status |= IRQ_INPROGRESS;
81 spin_unlock(&desc->lock); 81 raw_spin_unlock(&desc->lock);
82 82
83 action_ret = handle_IRQ_event(irq, action); 83 action_ret = handle_IRQ_event(irq, action);
84 84
@@ -87,7 +87,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
87 * Maybe this function should go to kernel/irq/chip.c? */ 87 * Maybe this function should go to kernel/irq/chip.c? */
88 note_interrupt(irq, desc, action_ret); 88 note_interrupt(irq, desc, action_ret);
89 89
90 spin_lock(&desc->lock); 90 raw_spin_lock(&desc->lock);
91 desc->status &= ~IRQ_INPROGRESS; 91 desc->status &= ~IRQ_INPROGRESS;
92 92
93 if (desc->status & IRQ_DISABLED) 93 if (desc->status & IRQ_DISABLED)
@@ -97,7 +97,7 @@ out_mask:
97 /* ack unconditionally to unmask lower prio irqs */ 97 /* ack unconditionally to unmask lower prio irqs */
98 desc->chip->ack(irq); 98 desc->chip->ack(irq);
99 99
100 spin_unlock(&desc->lock); 100 raw_spin_unlock(&desc->lock);
101} 101}
102#define handle_irq handle_prio_irq 102#define handle_irq handle_prio_irq
103#endif 103#endif
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 87e539aa8ad9..9ce17f13d3f1 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -3,7 +3,8 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := io.o id.o sram.o clock.o irq.o mux.o serial.o devices.o 6obj-y := io.o id.o sram.o irq.o mux.o serial.o devices.o
7obj-y += clock.o clock_data.o opp_data.o
7 8
8obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o 9obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
9 10
@@ -17,6 +18,9 @@ obj-$(CONFIG_PM) += pm.o sleep.o
17obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o 18obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o
18mailbox_mach-objs := mailbox.o 19mailbox_mach-objs := mailbox.o
19 20
21i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
22obj-y += $(i2c-omap-m) $(i2c-omap-y)
23
20led-y := leds.o 24led-y := leds.o
21 25
22# Specific board support 26# Specific board support
@@ -48,3 +52,7 @@ led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
48led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o 52led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
49led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o 53led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o
50obj-$(CONFIG_LEDS) += $(led-y) 54obj-$(CONFIG_LEDS) += $(led-y)
55
56ifneq ($(CONFIG_FB_OMAP),)
57obj-y += lcd_dma.o
58endif
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index f4b72c1654f5..7e70c3c08da6 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -19,6 +19,7 @@
19#include <linux/mtd/nand.h> 19#include <linux/mtd/nand.h>
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/smc91x.h>
22 23
23#include <mach/hardware.h> 24#include <mach/hardware.h>
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -30,7 +31,6 @@
30#include <mach/gpio.h> 31#include <mach/gpio.h>
31#include <plat/mux.h> 32#include <plat/mux.h>
32#include <plat/fpga.h> 33#include <plat/fpga.h>
33#include <plat/nand.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/common.h> 35#include <plat/common.h>
36#include <plat/board.h> 36#include <plat/board.h>
@@ -100,6 +100,12 @@ static int fsample_keymap[] = {
100 0 100 0
101}; 101};
102 102
103static struct smc91x_platdata smc91x_info = {
104 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
105 .leda = RPC_LED_100_10,
106 .ledb = RPC_LED_TX_RX,
107};
108
103static struct resource smc91x_resources[] = { 109static struct resource smc91x_resources[] = {
104 [0] = { 110 [0] = {
105 .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ 111 .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
@@ -167,8 +173,40 @@ static struct platform_device nor_device = {
167 .resource = &nor_resource, 173 .resource = &nor_resource,
168}; 174};
169 175
170static struct omap_nand_platform_data nand_data = { 176static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
171 .options = NAND_SAMSUNG_LP_OPTIONS, 177{
178 struct nand_chip *this = mtd->priv;
179 unsigned long mask;
180
181 if (cmd == NAND_CMD_NONE)
182 return;
183
184 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
185 if (ctrl & NAND_ALE)
186 mask |= 0x04;
187 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
188}
189
190#define FSAMPLE_NAND_RB_GPIO_PIN 62
191
192static int nand_dev_ready(struct mtd_info *mtd)
193{
194 return gpio_get_value(FSAMPLE_NAND_RB_GPIO_PIN);
195}
196
197static const char *part_probes[] = { "cmdlinepart", NULL };
198
199static struct platform_nand_data nand_data = {
200 .chip = {
201 .nr_chips = 1,
202 .chip_offset = 0,
203 .options = NAND_SAMSUNG_LP_OPTIONS,
204 .part_probe_types = part_probes,
205 },
206 .ctrl = {
207 .cmd_ctrl = nand_cmd_ctl,
208 .dev_ready = nand_dev_ready,
209 },
172}; 210};
173 211
174static struct resource nand_resource = { 212static struct resource nand_resource = {
@@ -178,7 +216,7 @@ static struct resource nand_resource = {
178}; 216};
179 217
180static struct platform_device nand_device = { 218static struct platform_device nand_device = {
181 .name = "omapnand", 219 .name = "gen_nand",
182 .id = 0, 220 .id = 0,
183 .dev = { 221 .dev = {
184 .platform_data = &nand_data, 222 .platform_data = &nand_data,
@@ -190,6 +228,9 @@ static struct platform_device nand_device = {
190static struct platform_device smc91x_device = { 228static struct platform_device smc91x_device = {
191 .name = "smc91x", 229 .name = "smc91x",
192 .id = 0, 230 .id = 0,
231 .dev = {
232 .platform_data = &smc91x_info,
233 },
193 .num_resources = ARRAY_SIZE(smc91x_resources), 234 .num_resources = ARRAY_SIZE(smc91x_resources),
194 .resource = smc91x_resources, 235 .resource = smc91x_resources,
195}; 236};
@@ -233,13 +274,6 @@ static struct platform_device *devices[] __initdata = {
233 &lcd_device, 274 &lcd_device,
234}; 275};
235 276
236#define P2_NAND_RB_GPIO_PIN 62
237
238static int nand_dev_ready(struct omap_nand_platform_data *data)
239{
240 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
241}
242
243static struct omap_lcd_config fsample_lcd_config __initdata = { 277static struct omap_lcd_config fsample_lcd_config __initdata = {
244 .ctrl_name = "internal", 278 .ctrl_name = "internal",
245}; 279};
@@ -250,9 +284,9 @@ static struct omap_board_config_kernel fsample_config[] = {
250 284
251static void __init omap_fsample_init(void) 285static void __init omap_fsample_init(void)
252{ 286{
253 if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) 287 if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
254 BUG(); 288 BUG();
255 nand_data.dev_ready = nand_dev_ready; 289 gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
256 290
257 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 291 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
258 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 292 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 89ba8ec4bbf4..fa7cecea19f9 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -28,6 +28,7 @@
28#include <linux/mtd/partitions.h> 28#include <linux/mtd/partitions.h>
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/i2c/tps65010.h> 30#include <linux/i2c/tps65010.h>
31#include <linux/smc91x.h>
31 32
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33#include <asm/gpio.h> 34#include <asm/gpio.h>
@@ -40,7 +41,6 @@
40#include <plat/mux.h> 41#include <plat/mux.h>
41#include <plat/dma.h> 42#include <plat/dma.h>
42#include <plat/tc.h> 43#include <plat/tc.h>
43#include <plat/nand.h>
44#include <plat/irda.h> 44#include <plat/irda.h>
45#include <plat/usb.h> 45#include <plat/usb.h>
46#include <plat/keypad.h> 46#include <plat/keypad.h>
@@ -179,11 +179,43 @@ static struct mtd_partition h2_nand_partitions[] = {
179 }, 179 },
180}; 180};
181 181
182/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ 182static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
183static struct omap_nand_platform_data h2_nand_data = { 183{
184 .options = NAND_SAMSUNG_LP_OPTIONS, 184 struct nand_chip *this = mtd->priv;
185 .parts = h2_nand_partitions, 185 unsigned long mask;
186 .nr_parts = ARRAY_SIZE(h2_nand_partitions), 186
187 if (cmd == NAND_CMD_NONE)
188 return;
189
190 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
191 if (ctrl & NAND_ALE)
192 mask |= 0x04;
193 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
194}
195
196#define H2_NAND_RB_GPIO_PIN 62
197
198static int h2_nand_dev_ready(struct mtd_info *mtd)
199{
200 return gpio_get_value(H2_NAND_RB_GPIO_PIN);
201}
202
203static const char *h2_part_probes[] = { "cmdlinepart", NULL };
204
205struct platform_nand_data h2_nand_platdata = {
206 .chip = {
207 .nr_chips = 1,
208 .chip_offset = 0,
209 .nr_partitions = ARRAY_SIZE(h2_nand_partitions),
210 .partitions = h2_nand_partitions,
211 .options = NAND_SAMSUNG_LP_OPTIONS,
212 .part_probe_types = h2_part_probes,
213 },
214 .ctrl = {
215 .cmd_ctrl = h2_nand_cmd_ctl,
216 .dev_ready = h2_nand_dev_ready,
217
218 },
187}; 219};
188 220
189static struct resource h2_nand_resource = { 221static struct resource h2_nand_resource = {
@@ -191,15 +223,21 @@ static struct resource h2_nand_resource = {
191}; 223};
192 224
193static struct platform_device h2_nand_device = { 225static struct platform_device h2_nand_device = {
194 .name = "omapnand", 226 .name = "gen_nand",
195 .id = 0, 227 .id = 0,
196 .dev = { 228 .dev = {
197 .platform_data = &h2_nand_data, 229 .platform_data = &h2_nand_platdata,
198 }, 230 },
199 .num_resources = 1, 231 .num_resources = 1,
200 .resource = &h2_nand_resource, 232 .resource = &h2_nand_resource,
201}; 233};
202 234
235static struct smc91x_platdata h2_smc91x_info = {
236 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
237 .leda = RPC_LED_100_10,
238 .ledb = RPC_LED_TX_RX,
239};
240
203static struct resource h2_smc91x_resources[] = { 241static struct resource h2_smc91x_resources[] = {
204 [0] = { 242 [0] = {
205 .start = OMAP1610_ETHR_START, /* Physical */ 243 .start = OMAP1610_ETHR_START, /* Physical */
@@ -216,6 +254,9 @@ static struct resource h2_smc91x_resources[] = {
216static struct platform_device h2_smc91x_device = { 254static struct platform_device h2_smc91x_device = {
217 .name = "smc91x", 255 .name = "smc91x",
218 .id = 0, 256 .id = 0,
257 .dev = {
258 .platform_data = &h2_smc91x_info,
259 },
219 .num_resources = ARRAY_SIZE(h2_smc91x_resources), 260 .num_resources = ARRAY_SIZE(h2_smc91x_resources),
220 .resource = h2_smc91x_resources, 261 .resource = h2_smc91x_resources,
221}; 262};
@@ -368,8 +409,6 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
368 { OMAP_TAG_LCD, &h2_lcd_config }, 409 { OMAP_TAG_LCD, &h2_lcd_config },
369}; 410};
370 411
371#define H2_NAND_RB_GPIO_PIN 62
372
373static void __init h2_init(void) 412static void __init h2_init(void)
374{ 413{
375 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 414 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index f5cc0a730524..6a7f9c391cf1 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -28,6 +28,7 @@
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/spi/spi.h> 29#include <linux/spi/spi.h>
30#include <linux/i2c/tps65010.h> 30#include <linux/i2c/tps65010.h>
31#include <linux/smc91x.h>
31 32
32#include <asm/setup.h> 33#include <asm/setup.h>
33#include <asm/page.h> 34#include <asm/page.h>
@@ -42,7 +43,6 @@
42#include <mach/irqs.h> 43#include <mach/irqs.h>
43#include <plat/mux.h> 44#include <plat/mux.h>
44#include <plat/tc.h> 45#include <plat/tc.h>
45#include <plat/nand.h>
46#include <plat/usb.h> 46#include <plat/usb.h>
47#include <plat/keypad.h> 47#include <plat/keypad.h>
48#include <plat/dma.h> 48#include <plat/dma.h>
@@ -181,11 +181,43 @@ static struct mtd_partition nand_partitions[] = {
181 }, 181 },
182}; 182};
183 183
184/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ 184static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
185static struct omap_nand_platform_data nand_data = { 185{
186 .options = NAND_SAMSUNG_LP_OPTIONS, 186 struct nand_chip *this = mtd->priv;
187 .parts = nand_partitions, 187 unsigned long mask;
188 .nr_parts = ARRAY_SIZE(nand_partitions), 188
189 if (cmd == NAND_CMD_NONE)
190 return;
191
192 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
193 if (ctrl & NAND_ALE)
194 mask |= 0x04;
195 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
196}
197
198#define H3_NAND_RB_GPIO_PIN 10
199
200static int nand_dev_ready(struct mtd_info *mtd)
201{
202 return gpio_get_value(H3_NAND_RB_GPIO_PIN);
203}
204
205static const char *part_probes[] = { "cmdlinepart", NULL };
206
207struct platform_nand_data nand_platdata = {
208 .chip = {
209 .nr_chips = 1,
210 .chip_offset = 0,
211 .nr_partitions = ARRAY_SIZE(nand_partitions),
212 .partitions = nand_partitions,
213 .options = NAND_SAMSUNG_LP_OPTIONS,
214 .part_probe_types = part_probes,
215 },
216 .ctrl = {
217 .cmd_ctrl = nand_cmd_ctl,
218 .dev_ready = nand_dev_ready,
219
220 },
189}; 221};
190 222
191static struct resource nand_resource = { 223static struct resource nand_resource = {
@@ -193,15 +225,21 @@ static struct resource nand_resource = {
193}; 225};
194 226
195static struct platform_device nand_device = { 227static struct platform_device nand_device = {
196 .name = "omapnand", 228 .name = "gen_nand",
197 .id = 0, 229 .id = 0,
198 .dev = { 230 .dev = {
199 .platform_data = &nand_data, 231 .platform_data = &nand_platdata,
200 }, 232 },
201 .num_resources = 1, 233 .num_resources = 1,
202 .resource = &nand_resource, 234 .resource = &nand_resource,
203}; 235};
204 236
237static struct smc91x_platdata smc91x_info = {
238 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
239 .leda = RPC_LED_100_10,
240 .ledb = RPC_LED_TX_RX,
241};
242
205static struct resource smc91x_resources[] = { 243static struct resource smc91x_resources[] = {
206 [0] = { 244 [0] = {
207 .start = OMAP1710_ETHR_START, /* Physical */ 245 .start = OMAP1710_ETHR_START, /* Physical */
@@ -218,6 +256,9 @@ static struct resource smc91x_resources[] = {
218static struct platform_device smc91x_device = { 256static struct platform_device smc91x_device = {
219 .name = "smc91x", 257 .name = "smc91x",
220 .id = 0, 258 .id = 0,
259 .dev = {
260 .platform_data = &smc91x_info,
261 },
221 .num_resources = ARRAY_SIZE(smc91x_resources), 262 .num_resources = ARRAY_SIZE(smc91x_resources),
222 .resource = smc91x_resources, 263 .resource = smc91x_resources,
223}; 264};
@@ -332,13 +373,6 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = {
332 }, 373 },
333}; 374};
334 375
335#define H3_NAND_RB_GPIO_PIN 10
336
337static int nand_dev_ready(struct omap_nand_platform_data *data)
338{
339 return gpio_get_value(H3_NAND_RB_GPIO_PIN);
340}
341
342static void __init h3_init(void) 376static void __init h3_init(void)
343{ 377{
344 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 378 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
@@ -356,7 +390,7 @@ static void __init h3_init(void)
356 nand_resource.end += SZ_4K - 1; 390 nand_resource.end += SZ_4K - 1;
357 if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0) 391 if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
358 BUG(); 392 BUG();
359 nand_data.dev_ready = nand_dev_ready; 393 gpio_direction_input(H3_NAND_RB_GPIO_PIN);
360 394
361 /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ 395 /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
362 /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ 396 /* GPIO10 pullup/down register, Enable pullup on GPIO10 */
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index 5f28a5ceacac..e36639f66150 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -39,6 +39,7 @@
39#include <plat/common.h> 39#include <plat/common.h>
40#include <plat/board.h> 40#include <plat/board.h>
41#include <plat/keypad.h> 41#include <plat/keypad.h>
42#include <plat/usb.h>
42 43
43#include <mach/irqs.h> 44#include <mach/irqs.h>
44 45
@@ -140,6 +141,15 @@ static struct platform_device kp_device = {
140 .resource = kp_resources, 141 .resource = kp_resources,
141}; 142};
142 143
144/* USB Device */
145static struct omap_usb_config htcherald_usb_config __initdata = {
146 .otg = 0,
147 .register_host = 0,
148 .register_dev = 1,
149 .hmc_mode = 4,
150 .pins[0] = 2,
151};
152
143/* LCD Device resources */ 153/* LCD Device resources */
144static struct platform_device lcd_device = { 154static struct platform_device lcd_device = {
145 .name = "lcd_htcherald", 155 .name = "lcd_htcherald",
@@ -214,6 +224,57 @@ static void __init htcherald_disable_watchdog(void)
214 } 224 }
215} 225}
216 226
227#define HTCHERALD_GPIO_USB_EN1 33
228#define HTCHERALD_GPIO_USB_EN2 73
229#define HTCHERALD_GPIO_USB_DM 35
230#define HTCHERALD_GPIO_USB_DP 36
231
232static void __init htcherald_usb_enable(void)
233{
234 unsigned int tries = 20;
235 unsigned int value = 0;
236
237 /* Request the GPIOs we need to control here */
238 if (gpio_request(HTCHERALD_GPIO_USB_EN1, "herald_usb") < 0)
239 goto err1;
240
241 if (gpio_request(HTCHERALD_GPIO_USB_EN2, "herald_usb") < 0)
242 goto err2;
243
244 if (gpio_request(HTCHERALD_GPIO_USB_DM, "herald_usb") < 0)
245 goto err3;
246
247 if (gpio_request(HTCHERALD_GPIO_USB_DP, "herald_usb") < 0)
248 goto err4;
249
250 /* force USB_EN GPIO to 0 */
251 do {
252 /* output low */
253 gpio_direction_output(HTCHERALD_GPIO_USB_EN1, 0);
254 } while ((value = gpio_get_value(HTCHERALD_GPIO_USB_EN1)) == 1 &&
255 --tries);
256
257 if (value == 1)
258 printk(KERN_WARNING "Unable to reset USB, trying to continue\n");
259
260 gpio_direction_output(HTCHERALD_GPIO_USB_EN2, 0); /* output low */
261 gpio_direction_input(HTCHERALD_GPIO_USB_DM); /* input */
262 gpio_direction_input(HTCHERALD_GPIO_USB_DP); /* input */
263
264 goto done;
265
266err4:
267 gpio_free(HTCHERALD_GPIO_USB_DM);
268err3:
269 gpio_free(HTCHERALD_GPIO_USB_EN2);
270err2:
271 gpio_free(HTCHERALD_GPIO_USB_EN1);
272err1:
273 printk(KERN_ERR "Unabled to request GPIO for USB\n");
274done:
275 printk(KERN_INFO "USB setup complete.\n");
276}
277
217static void __init htcherald_init(void) 278static void __init htcherald_init(void)
218{ 279{
219 printk(KERN_INFO "HTC Herald init.\n"); 280 printk(KERN_INFO "HTC Herald init.\n");
@@ -225,6 +286,9 @@ static void __init htcherald_init(void)
225 platform_add_devices(devices, ARRAY_SIZE(devices)); 286 platform_add_devices(devices, ARRAY_SIZE(devices));
226 287
227 htcherald_disable_watchdog(); 288 htcherald_disable_watchdog();
289
290 htcherald_usb_enable();
291 omap_usb_init(&htcherald_usb_config);
228} 292}
229 293
230static void __init htcherald_init_irq(void) 294static void __init htcherald_init_irq(void)
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index cf0fdb9c182f..2133b006f6a3 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/mtd.h> 23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/smc91x.h>
26 27
27#include <mach/hardware.h> 28#include <mach/hardware.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
@@ -142,6 +143,11 @@ static struct platform_device innovator_kp_device = {
142 .resource = innovator_kp_resources, 143 .resource = innovator_kp_resources,
143}; 144};
144 145
146static struct smc91x_platdata innovator_smc91x_info = {
147 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
148 .leda = RPC_LED_100_10,
149 .ledb = RPC_LED_TX_RX,
150};
145 151
146#ifdef CONFIG_ARCH_OMAP15XX 152#ifdef CONFIG_ARCH_OMAP15XX
147 153
@@ -175,6 +181,9 @@ static struct resource innovator1510_smc91x_resources[] = {
175static struct platform_device innovator1510_smc91x_device = { 181static struct platform_device innovator1510_smc91x_device = {
176 .name = "smc91x", 182 .name = "smc91x",
177 .id = 0, 183 .id = 0,
184 .dev = {
185 .platform_data = &innovator_smc91x_info,
186 },
178 .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources), 187 .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources),
179 .resource = innovator1510_smc91x_resources, 188 .resource = innovator1510_smc91x_resources,
180}; 189};
@@ -241,6 +250,9 @@ static struct resource innovator1610_smc91x_resources[] = {
241static struct platform_device innovator1610_smc91x_device = { 250static struct platform_device innovator1610_smc91x_device = {
242 .name = "smc91x", 251 .name = "smc91x",
243 .id = 0, 252 .id = 0,
253 .dev = {
254 .platform_data = &innovator_smc91x_info,
255 },
244 .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources), 256 .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources),
245 .resource = innovator1610_smc91x_resources, 257 .resource = innovator1610_smc91x_resources,
246}; 258};
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 5a275bab2dfe..71e1a3fad0ea 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -14,6 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/input.h> 15#include <linux/input.h>
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/omapfb.h>
17 18
18#include <linux/spi/spi.h> 19#include <linux/spi/spi.h>
19#include <linux/spi/ads7846.h> 20#include <linux/spi/ads7846.h>
@@ -32,7 +33,6 @@
32#include <plat/keypad.h> 33#include <plat/keypad.h>
33#include <plat/common.h> 34#include <plat/common.h>
34#include <plat/dsp_common.h> 35#include <plat/dsp_common.h>
35#include <plat/omapfb.h>
36#include <plat/hwa742.h> 36#include <plat/hwa742.h>
37#include <plat/lcd_mipid.h> 37#include <plat/lcd_mipid.h>
38#include <plat/mmc.h> 38#include <plat/mmc.h>
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 50c92c13e48a..ccea4f448e9a 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -33,6 +33,7 @@
33#include <linux/irq.h> 33#include <linux/irq.h>
34#include <linux/i2c.h> 34#include <linux/i2c.h>
35#include <linux/leds.h> 35#include <linux/leds.h>
36#include <linux/smc91x.h>
36 37
37#include <linux/mtd/mtd.h> 38#include <linux/mtd/mtd.h>
38#include <linux/mtd/partitions.h> 39#include <linux/mtd/partitions.h>
@@ -115,6 +116,12 @@ static struct platform_device osk5912_flash_device = {
115 .resource = &osk_flash_resource, 116 .resource = &osk_flash_resource,
116}; 117};
117 118
119static struct smc91x_platdata osk5912_smc91x_info = {
120 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
121 .leda = RPC_LED_100_10,
122 .ledb = RPC_LED_TX_RX,
123};
124
118static struct resource osk5912_smc91x_resources[] = { 125static struct resource osk5912_smc91x_resources[] = {
119 [0] = { 126 [0] = {
120 .start = OMAP_OSK_ETHR_START, /* Physical */ 127 .start = OMAP_OSK_ETHR_START, /* Physical */
@@ -131,6 +138,9 @@ static struct resource osk5912_smc91x_resources[] = {
131static struct platform_device osk5912_smc91x_device = { 138static struct platform_device osk5912_smc91x_device = {
132 .name = "smc91x", 139 .name = "smc91x",
133 .id = -1, 140 .id = -1,
141 .dev = {
142 .platform_data = &osk5912_smc91x_info,
143 },
134 .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), 144 .num_resources = ARRAY_SIZE(osk5912_smc91x_resources),
135 .resource = osk5912_smc91x_resources, 145 .resource = osk5912_smc91x_resources,
136}; 146};
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index ca7df1e93efc..1387a4f15da9 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -19,6 +19,7 @@
19#include <linux/mtd/nand.h> 19#include <linux/mtd/nand.h>
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/smc91x.h>
22 23
23#include <mach/hardware.h> 24#include <mach/hardware.h>
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -30,7 +31,6 @@
30#include <mach/gpio.h> 31#include <mach/gpio.h>
31#include <plat/mux.h> 32#include <plat/mux.h>
32#include <plat/fpga.h> 33#include <plat/fpga.h>
33#include <plat/nand.h>
34#include <plat/keypad.h> 34#include <plat/keypad.h>
35#include <plat/common.h> 35#include <plat/common.h>
36#include <plat/board.h> 36#include <plat/board.h>
@@ -67,6 +67,12 @@ static int p2_keymap[] = {
67 0 67 0
68}; 68};
69 69
70static struct smc91x_platdata smc91x_info = {
71 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
72 .leda = RPC_LED_100_10,
73 .ledb = RPC_LED_TX_RX,
74};
75
70static struct resource smc91x_resources[] = { 76static struct resource smc91x_resources[] = {
71 [0] = { 77 [0] = {
72 .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ 78 .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
@@ -134,8 +140,40 @@ static struct platform_device nor_device = {
134 .resource = &nor_resource, 140 .resource = &nor_resource,
135}; 141};
136 142
137static struct omap_nand_platform_data nand_data = { 143static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
138 .options = NAND_SAMSUNG_LP_OPTIONS, 144{
145 struct nand_chip *this = mtd->priv;
146 unsigned long mask;
147
148 if (cmd == NAND_CMD_NONE)
149 return;
150
151 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
152 if (ctrl & NAND_ALE)
153 mask |= 0x04;
154 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
155}
156
157#define P2_NAND_RB_GPIO_PIN 62
158
159static int nand_dev_ready(struct mtd_info *mtd)
160{
161 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
162}
163
164static const char *part_probes[] = { "cmdlinepart", NULL };
165
166static struct platform_nand_data nand_data = {
167 .chip = {
168 .nr_chips = 1,
169 .chip_offset = 0,
170 .options = NAND_SAMSUNG_LP_OPTIONS,
171 .part_probe_types = part_probes,
172 },
173 .ctrl = {
174 .cmd_ctrl = nand_cmd_ctl,
175 .dev_ready = nand_dev_ready,
176 },
139}; 177};
140 178
141static struct resource nand_resource = { 179static struct resource nand_resource = {
@@ -145,7 +183,7 @@ static struct resource nand_resource = {
145}; 183};
146 184
147static struct platform_device nand_device = { 185static struct platform_device nand_device = {
148 .name = "omapnand", 186 .name = "gen_nand",
149 .id = 0, 187 .id = 0,
150 .dev = { 188 .dev = {
151 .platform_data = &nand_data, 189 .platform_data = &nand_data,
@@ -157,6 +195,9 @@ static struct platform_device nand_device = {
157static struct platform_device smc91x_device = { 195static struct platform_device smc91x_device = {
158 .name = "smc91x", 196 .name = "smc91x",
159 .id = 0, 197 .id = 0,
198 .dev = {
199 .platform_data = &smc91x_info,
200 },
160 .num_resources = ARRAY_SIZE(smc91x_resources), 201 .num_resources = ARRAY_SIZE(smc91x_resources),
161 .resource = smc91x_resources, 202 .resource = smc91x_resources,
162}; 203};
@@ -201,13 +242,6 @@ static struct platform_device *devices[] __initdata = {
201 &lcd_device, 242 &lcd_device,
202}; 243};
203 244
204#define P2_NAND_RB_GPIO_PIN 62
205
206static int nand_dev_ready(struct omap_nand_platform_data *data)
207{
208 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
209}
210
211static struct omap_lcd_config perseus2_lcd_config __initdata = { 245static struct omap_lcd_config perseus2_lcd_config __initdata = {
212 .ctrl_name = "internal", 246 .ctrl_name = "internal",
213}; 247};
@@ -220,7 +254,7 @@ static void __init omap_perseus2_init(void)
220{ 254{
221 if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) 255 if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
222 BUG(); 256 BUG();
223 nand_data.dev_ready = nand_dev_ready; 257 gpio_direction_input(P2_NAND_RB_GPIO_PIN);
224 258
225 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 259 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
226 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 260 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 35c75c1bd0aa..169183537997 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -22,6 +22,7 @@
22#include <linux/reboot.h> 22#include <linux/reboot.h>
23#include <linux/serial_8250.h> 23#include <linux/serial_8250.h>
24#include <linux/serial_reg.h> 24#include <linux/serial_reg.h>
25#include <linux/smc91x.h>
25 26
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
@@ -106,6 +107,12 @@ static struct platform_device voiceblue_flash_device = {
106 .resource = &voiceblue_flash_resource, 107 .resource = &voiceblue_flash_resource,
107}; 108};
108 109
110static struct smc91x_platdata voiceblue_smc91x_info = {
111 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
112 .leda = RPC_LED_100_10,
113 .ledb = RPC_LED_TX_RX,
114};
115
109static struct resource voiceblue_smc91x_resources[] = { 116static struct resource voiceblue_smc91x_resources[] = {
110 [0] = { 117 [0] = {
111 .start = OMAP_CS2_PHYS + 0x300, 118 .start = OMAP_CS2_PHYS + 0x300,
@@ -122,6 +129,9 @@ static struct resource voiceblue_smc91x_resources[] = {
122static struct platform_device voiceblue_smc91x_device = { 129static struct platform_device voiceblue_smc91x_device = {
123 .name = "smc91x", 130 .name = "smc91x",
124 .id = 0, 131 .id = 0,
132 .dev = {
133 .platform_data = &voiceblue_smc91x_info,
134 },
125 .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), 135 .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources),
126 .resource = voiceblue_smc91x_resources, 136 .resource = voiceblue_smc91x_resources,
127}; 137};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 42cbe203da36..2ba9ab953731 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/mach-omap1/clock.c 2 * linux/arch/arm/mach-omap1/clock.c
3 * 3 *
4 * Copyright (C) 2004 - 2005 Nokia corporation 4 * Copyright (C) 2004 - 2005, 2009 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * 6 *
7 * Modified to use omap shared clock framework by 7 * Modified to use omap shared clock framework by
@@ -26,12 +26,17 @@
26#include <plat/usb.h> 26#include <plat/usb.h>
27#include <plat/clock.h> 27#include <plat/clock.h>
28#include <plat/sram.h> 28#include <plat/sram.h>
29 29#include <plat/clkdev_omap.h>
30static const struct clkops clkops_generic;
31static const struct clkops clkops_uart;
32static const struct clkops clkops_dspck;
33 30
34#include "clock.h" 31#include "clock.h"
32#include "opp.h"
33
34__u32 arm_idlect1_mask;
35struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p;
36
37/*-------------------------------------------------------------------------
38 * Omap1 specific clock functions
39 *-------------------------------------------------------------------------*/
35 40
36static int clk_omap1_dummy_enable(struct clk *clk) 41static int clk_omap1_dummy_enable(struct clk *clk)
37{ 42{
@@ -42,134 +47,24 @@ static void clk_omap1_dummy_disable(struct clk *clk)
42{ 47{
43} 48}
44 49
45static const struct clkops clkops_dummy = { 50const struct clkops clkops_dummy = {
46 .enable = clk_omap1_dummy_enable, 51 .enable = clk_omap1_dummy_enable,
47 .disable = clk_omap1_dummy_disable, 52 .disable = clk_omap1_dummy_disable,
48};
49
50static struct clk dummy_ck = {
51 .name = "dummy",
52 .ops = &clkops_dummy,
53 .flags = RATE_FIXED,
54};
55
56struct omap_clk {
57 u32 cpu;
58 struct clk_lookup lk;
59}; 53};
60 54
61#define CLK(dev, con, ck, cp) \ 55/* XXX can be replaced with a fixed_divisor_recalc */
62 { \ 56unsigned long omap1_watchdog_recalc(struct clk *clk)
63 .cpu = cp, \
64 .lk = { \
65 .dev_id = dev, \
66 .con_id = con, \
67 .clk = ck, \
68 }, \
69 }
70
71#define CK_310 (1 << 0)
72#define CK_7XX (1 << 1)
73#define CK_1510 (1 << 2)
74#define CK_16XX (1 << 3)
75
76static struct omap_clk omap_clks[] = {
77 /* non-ULPD clocks */
78 CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX),
79 CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310),
80 /* CK_GEN1 clocks */
81 CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX),
82 CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX),
83 CLK(NULL, "arm_ck", &arm_ck, CK_16XX | CK_1510 | CK_310),
84 CLK(NULL, "armper_ck", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
85 CLK(NULL, "arm_gpio_ck", &arm_gpio_ck, CK_1510 | CK_310),
86 CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
87 CLK(NULL, "armtim_ck", &armtim_ck.clk, CK_16XX | CK_1510 | CK_310),
88 CLK("omap_wdt", "fck", &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310),
89 CLK("omap_wdt", "ick", &armper_ck.clk, CK_16XX),
90 CLK("omap_wdt", "ick", &dummy_ck, CK_1510 | CK_310),
91 CLK(NULL, "arminth_ck", &arminth_ck1510, CK_1510 | CK_310),
92 CLK(NULL, "arminth_ck", &arminth_ck16xx, CK_16XX),
93 /* CK_GEN2 clocks */
94 CLK(NULL, "dsp_ck", &dsp_ck, CK_16XX | CK_1510 | CK_310),
95 CLK(NULL, "dspmmu_ck", &dspmmu_ck, CK_16XX | CK_1510 | CK_310),
96 CLK(NULL, "dspper_ck", &dspper_ck, CK_16XX | CK_1510 | CK_310),
97 CLK(NULL, "dspxor_ck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
98 CLK(NULL, "dsptim_ck", &dsptim_ck, CK_16XX | CK_1510 | CK_310),
99 /* CK_GEN3 clocks */
100 CLK(NULL, "tc_ck", &tc_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
101 CLK(NULL, "tipb_ck", &tipb_ck, CK_1510 | CK_310),
102 CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX | CK_7XX),
103 CLK(NULL, "tc1_ck", &tc1_ck, CK_16XX),
104 CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX),
105 CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310),
106 CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX),
107 CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310),
108 CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310),
109 CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX),
110 CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
111 CLK(NULL, "lcd_ck", &lcd_ck_16xx, CK_16XX | CK_7XX),
112 CLK(NULL, "lcd_ck", &lcd_ck_1510.clk, CK_1510 | CK_310),
113 /* ULPD clocks */
114 CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310),
115 CLK(NULL, "uart1_ck", &uart1_16xx.clk, CK_16XX),
116 CLK(NULL, "uart2_ck", &uart2_ck, CK_16XX | CK_1510 | CK_310),
117 CLK(NULL, "uart3_ck", &uart3_1510, CK_1510 | CK_310),
118 CLK(NULL, "uart3_ck", &uart3_16xx.clk, CK_16XX),
119 CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310),
120 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck1510, CK_1510 | CK_310),
121 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck16xx, CK_16XX),
122 CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX),
123 CLK(NULL, "usb_dc_ck", &usb_dc_ck7xx, CK_7XX),
124 CLK(NULL, "mclk", &mclk_1510, CK_1510 | CK_310),
125 CLK(NULL, "mclk", &mclk_16xx, CK_16XX),
126 CLK(NULL, "bclk", &bclk_1510, CK_1510 | CK_310),
127 CLK(NULL, "bclk", &bclk_16xx, CK_16XX),
128 CLK("mmci-omap.0", "fck", &mmc1_ck, CK_16XX | CK_1510 | CK_310),
129 CLK("mmci-omap.0", "fck", &mmc3_ck, CK_7XX),
130 CLK("mmci-omap.0", "ick", &armper_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
131 CLK("mmci-omap.1", "fck", &mmc2_ck, CK_16XX),
132 CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX),
133 /* Virtual clocks */
134 CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
135 CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310),
136 CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX),
137 CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310),
138 CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
139 CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX),
140 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310),
141 CLK("omap-mcbsp.2", "ick", &armper_ck.clk, CK_16XX),
142 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_1510 | CK_310),
143 CLK("omap-mcbsp.3", "ick", &dspper_ck, CK_16XX),
144 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_1510 | CK_310),
145 CLK("omap-mcbsp.1", "fck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
146 CLK("omap-mcbsp.2", "fck", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
147 CLK("omap-mcbsp.3", "fck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
148};
149
150static int omap1_clk_enable_generic(struct clk * clk);
151static int omap1_clk_enable(struct clk *clk);
152static void omap1_clk_disable_generic(struct clk * clk);
153static void omap1_clk_disable(struct clk *clk);
154
155__u32 arm_idlect1_mask;
156
157/*-------------------------------------------------------------------------
158 * Omap1 specific clock functions
159 *-------------------------------------------------------------------------*/
160
161static unsigned long omap1_watchdog_recalc(struct clk *clk)
162{ 57{
163 return clk->parent->rate / 14; 58 return clk->parent->rate / 14;
164} 59}
165 60
166static unsigned long omap1_uart_recalc(struct clk *clk) 61unsigned long omap1_uart_recalc(struct clk *clk)
167{ 62{
168 unsigned int val = __raw_readl(clk->enable_reg); 63 unsigned int val = __raw_readl(clk->enable_reg);
169 return val & clk->enable_bit ? 48000000 : 12000000; 64 return val & clk->enable_bit ? 48000000 : 12000000;
170} 65}
171 66
172static unsigned long omap1_sossi_recalc(struct clk *clk) 67unsigned long omap1_sossi_recalc(struct clk *clk)
173{ 68{
174 u32 div = omap_readl(MOD_CONF_CTRL_1); 69 u32 div = omap_readl(MOD_CONF_CTRL_1);
175 70
@@ -179,64 +74,6 @@ static unsigned long omap1_sossi_recalc(struct clk *clk)
179 return clk->parent->rate / div; 74 return clk->parent->rate / div;
180} 75}
181 76
182static int omap1_clk_enable_dsp_domain(struct clk *clk)
183{
184 int retval;
185
186 retval = omap1_clk_enable(&api_ck.clk);
187 if (!retval) {
188 retval = omap1_clk_enable_generic(clk);
189 omap1_clk_disable(&api_ck.clk);
190 }
191
192 return retval;
193}
194
195static void omap1_clk_disable_dsp_domain(struct clk *clk)
196{
197 if (omap1_clk_enable(&api_ck.clk) == 0) {
198 omap1_clk_disable_generic(clk);
199 omap1_clk_disable(&api_ck.clk);
200 }
201}
202
203static const struct clkops clkops_dspck = {
204 .enable = &omap1_clk_enable_dsp_domain,
205 .disable = &omap1_clk_disable_dsp_domain,
206};
207
208static int omap1_clk_enable_uart_functional(struct clk *clk)
209{
210 int ret;
211 struct uart_clk *uclk;
212
213 ret = omap1_clk_enable_generic(clk);
214 if (ret == 0) {
215 /* Set smart idle acknowledgement mode */
216 uclk = (struct uart_clk *)clk;
217 omap_writeb((omap_readb(uclk->sysc_addr) & ~0x10) | 8,
218 uclk->sysc_addr);
219 }
220
221 return ret;
222}
223
224static void omap1_clk_disable_uart_functional(struct clk *clk)
225{
226 struct uart_clk *uclk;
227
228 /* Set force idle acknowledgement mode */
229 uclk = (struct uart_clk *)clk;
230 omap_writeb((omap_readb(uclk->sysc_addr) & ~0x18), uclk->sysc_addr);
231
232 omap1_clk_disable_generic(clk);
233}
234
235static const struct clkops clkops_uart = {
236 .enable = &omap1_clk_enable_uart_functional,
237 .disable = &omap1_clk_disable_uart_functional,
238};
239
240static void omap1_clk_allow_idle(struct clk *clk) 77static void omap1_clk_allow_idle(struct clk *clk)
241{ 78{
242 struct arm_idlect1_clk * iclk = (struct arm_idlect1_clk *)clk; 79 struct arm_idlect1_clk * iclk = (struct arm_idlect1_clk *)clk;
@@ -344,7 +181,7 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
344 return dsor_exp; 181 return dsor_exp;
345} 182}
346 183
347static unsigned long omap1_ckctl_recalc(struct clk *clk) 184unsigned long omap1_ckctl_recalc(struct clk *clk)
348{ 185{
349 /* Calculate divisor encoded as 2-bit exponent */ 186 /* Calculate divisor encoded as 2-bit exponent */
350 int dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset)); 187 int dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
@@ -352,7 +189,7 @@ static unsigned long omap1_ckctl_recalc(struct clk *clk)
352 return clk->parent->rate / dsor; 189 return clk->parent->rate / dsor;
353} 190}
354 191
355static unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk) 192unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk)
356{ 193{
357 int dsor; 194 int dsor;
358 195
@@ -363,28 +200,29 @@ static unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk)
363 * Note that DSP_CKCTL virt addr = phys addr, so 200 * Note that DSP_CKCTL virt addr = phys addr, so
364 * we must use __raw_readw() instead of omap_readw(). 201 * we must use __raw_readw() instead of omap_readw().
365 */ 202 */
366 omap1_clk_enable(&api_ck.clk); 203 omap1_clk_enable(api_ck_p);
367 dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset)); 204 dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset));
368 omap1_clk_disable(&api_ck.clk); 205 omap1_clk_disable(api_ck_p);
369 206
370 return clk->parent->rate / dsor; 207 return clk->parent->rate / dsor;
371} 208}
372 209
373/* MPU virtual clock functions */ 210/* MPU virtual clock functions */
374static int omap1_select_table_rate(struct clk * clk, unsigned long rate) 211int omap1_select_table_rate(struct clk *clk, unsigned long rate)
375{ 212{
376 /* Find the highest supported frequency <= rate and switch to it */ 213 /* Find the highest supported frequency <= rate and switch to it */
377 struct mpu_rate * ptr; 214 struct mpu_rate * ptr;
215 unsigned long dpll1_rate, ref_rate;
378 216
379 if (clk != &virtual_ck_mpu) 217 dpll1_rate = clk_get_rate(ck_dpll1_p);
380 return -EINVAL; 218 ref_rate = clk_get_rate(ck_ref_p);
381 219
382 for (ptr = rate_table; ptr->rate; ptr++) { 220 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
383 if (ptr->xtal != ck_ref.rate) 221 if (ptr->xtal != ref_rate)
384 continue; 222 continue;
385 223
386 /* DPLL1 cannot be reprogrammed without risking system crash */ 224 /* DPLL1 cannot be reprogrammed without risking system crash */
387 if (likely(ck_dpll1.rate!=0) && ptr->pll_rate != ck_dpll1.rate) 225 if (likely(dpll1_rate != 0) && ptr->pll_rate != dpll1_rate)
388 continue; 226 continue;
389 227
390 /* Can check only after xtal frequency check */ 228 /* Can check only after xtal frequency check */
@@ -405,11 +243,13 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
405 else 243 else
406 omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); 244 omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
407 245
408 ck_dpll1.rate = ptr->pll_rate; 246 /* XXX Do we need to recalculate the tree below DPLL1 at this point? */
247 ck_dpll1_p->rate = ptr->pll_rate;
248
409 return 0; 249 return 0;
410} 250}
411 251
412static int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate) 252int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate)
413{ 253{
414 int dsor_exp; 254 int dsor_exp;
415 u16 regval; 255 u16 regval;
@@ -429,7 +269,7 @@ static int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate)
429 return 0; 269 return 0;
430} 270}
431 271
432static long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate) 272long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate)
433{ 273{
434 int dsor_exp = calc_dsor_exp(clk, rate); 274 int dsor_exp = calc_dsor_exp(clk, rate);
435 if (dsor_exp < 0) 275 if (dsor_exp < 0)
@@ -439,7 +279,7 @@ static long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate)
439 return clk->parent->rate / (1 << dsor_exp); 279 return clk->parent->rate / (1 << dsor_exp);
440} 280}
441 281
442static int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate) 282int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate)
443{ 283{
444 int dsor_exp; 284 int dsor_exp;
445 u16 regval; 285 u16 regval;
@@ -459,19 +299,19 @@ static int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate)
459 return 0; 299 return 0;
460} 300}
461 301
462static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate) 302long omap1_round_to_table_rate(struct clk *clk, unsigned long rate)
463{ 303{
464 /* Find the highest supported frequency <= rate */ 304 /* Find the highest supported frequency <= rate */
465 struct mpu_rate * ptr; 305 struct mpu_rate * ptr;
466 long highest_rate; 306 long highest_rate;
307 unsigned long ref_rate;
467 308
468 if (clk != &virtual_ck_mpu) 309 ref_rate = clk_get_rate(ck_ref_p);
469 return -EINVAL;
470 310
471 highest_rate = -EINVAL; 311 highest_rate = -EINVAL;
472 312
473 for (ptr = rate_table; ptr->rate; ptr++) { 313 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
474 if (ptr->xtal != ck_ref.rate) 314 if (ptr->xtal != ref_rate)
475 continue; 315 continue;
476 316
477 highest_rate = ptr->rate; 317 highest_rate = ptr->rate;
@@ -506,8 +346,8 @@ static unsigned calc_ext_dsor(unsigned long rate)
506 return dsor; 346 return dsor;
507} 347}
508 348
509/* Only needed on 1510 */ 349/* XXX Only needed on 1510 */
510static int omap1_set_uart_rate(struct clk * clk, unsigned long rate) 350int omap1_set_uart_rate(struct clk *clk, unsigned long rate)
511{ 351{
512 unsigned int val; 352 unsigned int val;
513 353
@@ -525,7 +365,7 @@ static int omap1_set_uart_rate(struct clk * clk, unsigned long rate)
525} 365}
526 366
527/* External clock (MCLK & BCLK) functions */ 367/* External clock (MCLK & BCLK) functions */
528static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate) 368int omap1_set_ext_clk_rate(struct clk *clk, unsigned long rate)
529{ 369{
530 unsigned dsor; 370 unsigned dsor;
531 __u16 ratio_bits; 371 __u16 ratio_bits;
@@ -543,7 +383,7 @@ static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate)
543 return 0; 383 return 0;
544} 384}
545 385
546static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate) 386int omap1_set_sossi_rate(struct clk *clk, unsigned long rate)
547{ 387{
548 u32 l; 388 u32 l;
549 int div; 389 int div;
@@ -566,12 +406,12 @@ static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate)
566 return 0; 406 return 0;
567} 407}
568 408
569static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate) 409long omap1_round_ext_clk_rate(struct clk *clk, unsigned long rate)
570{ 410{
571 return 96000000 / calc_ext_dsor(rate); 411 return 96000000 / calc_ext_dsor(rate);
572} 412}
573 413
574static void omap1_init_ext_clk(struct clk * clk) 414void omap1_init_ext_clk(struct clk *clk)
575{ 415{
576 unsigned dsor; 416 unsigned dsor;
577 __u16 ratio_bits; 417 __u16 ratio_bits;
@@ -589,7 +429,7 @@ static void omap1_init_ext_clk(struct clk * clk)
589 clk-> rate = 96000000 / dsor; 429 clk-> rate = 96000000 / dsor;
590} 430}
591 431
592static int omap1_clk_enable(struct clk *clk) 432int omap1_clk_enable(struct clk *clk)
593{ 433{
594 int ret = 0; 434 int ret = 0;
595 435
@@ -617,7 +457,7 @@ err:
617 return ret; 457 return ret;
618} 458}
619 459
620static void omap1_clk_disable(struct clk *clk) 460void omap1_clk_disable(struct clk *clk)
621{ 461{
622 if (clk->usecount > 0 && !(--clk->usecount)) { 462 if (clk->usecount > 0 && !(--clk->usecount)) {
623 clk->ops->disable(clk); 463 clk->ops->disable(clk);
@@ -672,12 +512,70 @@ static void omap1_clk_disable_generic(struct clk *clk)
672 } 512 }
673} 513}
674 514
675static const struct clkops clkops_generic = { 515const struct clkops clkops_generic = {
676 .enable = &omap1_clk_enable_generic, 516 .enable = omap1_clk_enable_generic,
677 .disable = &omap1_clk_disable_generic, 517 .disable = omap1_clk_disable_generic,
518};
519
520static int omap1_clk_enable_dsp_domain(struct clk *clk)
521{
522 int retval;
523
524 retval = omap1_clk_enable(api_ck_p);
525 if (!retval) {
526 retval = omap1_clk_enable_generic(clk);
527 omap1_clk_disable(api_ck_p);
528 }
529
530 return retval;
531}
532
533static void omap1_clk_disable_dsp_domain(struct clk *clk)
534{
535 if (omap1_clk_enable(api_ck_p) == 0) {
536 omap1_clk_disable_generic(clk);
537 omap1_clk_disable(api_ck_p);
538 }
539}
540
541const struct clkops clkops_dspck = {
542 .enable = omap1_clk_enable_dsp_domain,
543 .disable = omap1_clk_disable_dsp_domain,
544};
545
546static int omap1_clk_enable_uart_functional(struct clk *clk)
547{
548 int ret;
549 struct uart_clk *uclk;
550
551 ret = omap1_clk_enable_generic(clk);
552 if (ret == 0) {
553 /* Set smart idle acknowledgement mode */
554 uclk = (struct uart_clk *)clk;
555 omap_writeb((omap_readb(uclk->sysc_addr) & ~0x10) | 8,
556 uclk->sysc_addr);
557 }
558
559 return ret;
560}
561
562static void omap1_clk_disable_uart_functional(struct clk *clk)
563{
564 struct uart_clk *uclk;
565
566 /* Set force idle acknowledgement mode */
567 uclk = (struct uart_clk *)clk;
568 omap_writeb((omap_readb(uclk->sysc_addr) & ~0x18), uclk->sysc_addr);
569
570 omap1_clk_disable_generic(clk);
571}
572
573const struct clkops clkops_uart = {
574 .enable = omap1_clk_enable_uart_functional,
575 .disable = omap1_clk_disable_uart_functional,
678}; 576};
679 577
680static long omap1_clk_round_rate(struct clk *clk, unsigned long rate) 578long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
681{ 579{
682 if (clk->flags & RATE_FIXED) 580 if (clk->flags & RATE_FIXED)
683 return clk->rate; 581 return clk->rate;
@@ -688,7 +586,7 @@ static long omap1_clk_round_rate(struct clk *clk, unsigned long rate)
688 return clk->rate; 586 return clk->rate;
689} 587}
690 588
691static int omap1_clk_set_rate(struct clk *clk, unsigned long rate) 589int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
692{ 590{
693 int ret = -EINVAL; 591 int ret = -EINVAL;
694 592
@@ -703,7 +601,7 @@ static int omap1_clk_set_rate(struct clk *clk, unsigned long rate)
703 601
704#ifdef CONFIG_OMAP_RESET_CLOCKS 602#ifdef CONFIG_OMAP_RESET_CLOCKS
705 603
706static void __init omap1_clk_disable_unused(struct clk *clk) 604void __init omap1_clk_disable_unused(struct clk *clk)
707{ 605{
708 __u32 regval32; 606 __u32 regval32;
709 607
@@ -724,184 +622,9 @@ static void __init omap1_clk_disable_unused(struct clk *clk)
724 if ((regval32 & (1 << clk->enable_bit)) == 0) 622 if ((regval32 & (1 << clk->enable_bit)) == 0)
725 return; 623 return;
726 624
727 /* FIXME: This clock seems to be necessary but no-one
728 * has asked for its activation. */
729 if (clk == &tc2_ck /* FIX: pm.c (SRAM), CCP, Camera */
730 || clk == &ck_dpll1out.clk /* FIX: SoSSI, SSR */
731 || clk == &arm_gpio_ck /* FIX: GPIO code for 1510 */
732 ) {
733 printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n",
734 clk->name);
735 return;
736 }
737
738 printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name); 625 printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name);
739 clk->ops->disable(clk); 626 clk->ops->disable(clk);
740 printk(" done\n"); 627 printk(" done\n");
741} 628}
742 629
743#else
744#define omap1_clk_disable_unused NULL
745#endif 630#endif
746
747static struct clk_functions omap1_clk_functions = {
748 .clk_enable = omap1_clk_enable,
749 .clk_disable = omap1_clk_disable,
750 .clk_round_rate = omap1_clk_round_rate,
751 .clk_set_rate = omap1_clk_set_rate,
752 .clk_disable_unused = omap1_clk_disable_unused,
753};
754
755int __init omap1_clk_init(void)
756{
757 struct omap_clk *c;
758 const struct omap_clock_config *info;
759 int crystal_type = 0; /* Default 12 MHz */
760 u32 reg, cpu_mask;
761
762#ifdef CONFIG_DEBUG_LL
763 /* Resets some clocks that may be left on from bootloader,
764 * but leaves serial clocks on.
765 */
766 omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
767#endif
768
769 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
770 reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
771 omap_writew(reg, SOFT_REQ_REG);
772 if (!cpu_is_omap15xx())
773 omap_writew(0, SOFT_REQ_REG2);
774
775 clk_init(&omap1_clk_functions);
776
777 /* By default all idlect1 clocks are allowed to idle */
778 arm_idlect1_mask = ~0;
779
780 for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
781 clk_preinit(c->lk.clk);
782
783 cpu_mask = 0;
784 if (cpu_is_omap16xx())
785 cpu_mask |= CK_16XX;
786 if (cpu_is_omap1510())
787 cpu_mask |= CK_1510;
788 if (cpu_is_omap7xx())
789 cpu_mask |= CK_7XX;
790 if (cpu_is_omap310())
791 cpu_mask |= CK_310;
792
793 for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
794 if (c->cpu & cpu_mask) {
795 clkdev_add(&c->lk);
796 clk_register(c->lk.clk);
797 }
798
799 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
800 if (info != NULL) {
801 if (!cpu_is_omap15xx())
802 crystal_type = info->system_clock_type;
803 }
804
805#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
806 ck_ref.rate = 13000000;
807#elif defined(CONFIG_ARCH_OMAP16XX)
808 if (crystal_type == 2)
809 ck_ref.rate = 19200000;
810#endif
811
812 printk("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
813 omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
814 omap_readw(ARM_CKCTL));
815
816 /* We want to be in syncronous scalable mode */
817 omap_writew(0x1000, ARM_SYSST);
818
819#ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER
820 /* Use values set by bootloader. Determine PLL rate and recalculate
821 * dependent clocks as if kernel had changed PLL or divisors.
822 */
823 {
824 unsigned pll_ctl_val = omap_readw(DPLL_CTL);
825
826 ck_dpll1.rate = ck_ref.rate; /* Base xtal rate */
827 if (pll_ctl_val & 0x10) {
828 /* PLL enabled, apply multiplier and divisor */
829 if (pll_ctl_val & 0xf80)
830 ck_dpll1.rate *= (pll_ctl_val & 0xf80) >> 7;
831 ck_dpll1.rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
832 } else {
833 /* PLL disabled, apply bypass divisor */
834 switch (pll_ctl_val & 0xc) {
835 case 0:
836 break;
837 case 0x4:
838 ck_dpll1.rate /= 2;
839 break;
840 default:
841 ck_dpll1.rate /= 4;
842 break;
843 }
844 }
845 }
846#else
847 /* Find the highest supported frequency and enable it */
848 if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) {
849 printk(KERN_ERR "System frequencies not set. Check your config.\n");
850 /* Guess sane values (60MHz) */
851 omap_writew(0x2290, DPLL_CTL);
852 omap_writew(cpu_is_omap7xx() ? 0x3005 : 0x1005, ARM_CKCTL);
853 ck_dpll1.rate = 60000000;
854 }
855#endif
856 propagate_rate(&ck_dpll1);
857 /* Cache rates for clocks connected to ck_ref (not dpll1) */
858 propagate_rate(&ck_ref);
859 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): "
860 "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n",
861 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
862 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
863 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
864
865#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
866 /* Select slicer output as OMAP input clock */
867 omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, OMAP7XX_PCC_UPLD_CTRL);
868#endif
869
870 /* Amstrad Delta wants BCLK high when inactive */
871 if (machine_is_ams_delta())
872 omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
873 (1 << SDW_MCLK_INV_BIT),
874 ULPD_CLOCK_CTRL);
875
876 /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
877 /* (on 730, bit 13 must not be cleared) */
878 if (cpu_is_omap7xx())
879 omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
880 else
881 omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
882
883 /* Put DSP/MPUI into reset until needed */
884 omap_writew(0, ARM_RSTCT1);
885 omap_writew(1, ARM_RSTCT2);
886 omap_writew(0x400, ARM_IDLECT1);
887
888 /*
889 * According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8)
890 * of the ARM_IDLECT2 register must be set to zero. The power-on
891 * default value of this bit is one.
892 */
893 omap_writew(0x0000, ARM_IDLECT2); /* Turn LCD clock off also */
894
895 /*
896 * Only enable those clocks we will need, let the drivers
897 * enable other clocks as necessary
898 */
899 clk_enable(&armper_ck.clk);
900 clk_enable(&armxor_ck.clk);
901 clk_enable(&armtim_ck.clk); /* This should be done by timer code */
902
903 if (cpu_is_omap15xx())
904 clk_enable(&arm_gpio_ck);
905
906 return 0;
907}
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 29ffa97dc7f3..a4190afb8614 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/mach-omap1/clock.h 2 * linux/arch/arm/mach-omap1/clock.h
3 * 3 *
4 * Copyright (C) 2004 - 2005 Nokia corporation 4 * Copyright (C) 2004 - 2005, 2009 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc 6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
7 * 7 *
@@ -13,30 +13,36 @@
13#ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H 13#ifndef __ARCH_ARM_MACH_OMAP1_CLOCK_H
14#define __ARCH_ARM_MACH_OMAP1_CLOCK_H 14#define __ARCH_ARM_MACH_OMAP1_CLOCK_H
15 15
16static unsigned long omap1_ckctl_recalc(struct clk *clk); 16#include <linux/clk.h>
17static unsigned long omap1_watchdog_recalc(struct clk *clk); 17
18static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate); 18#include <plat/clock.h>
19static unsigned long omap1_sossi_recalc(struct clk *clk); 19
20static unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk); 20extern int __init omap1_clk_init(void);
21static int omap1_clk_set_rate_dsp_domain(struct clk * clk, unsigned long rate); 21extern int omap1_clk_enable(struct clk *clk);
22static int omap1_set_uart_rate(struct clk * clk, unsigned long rate); 22extern void omap1_clk_disable(struct clk *clk);
23static unsigned long omap1_uart_recalc(struct clk *clk); 23extern long omap1_clk_round_rate(struct clk *clk, unsigned long rate);
24static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate); 24extern int omap1_clk_set_rate(struct clk *clk, unsigned long rate);
25static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate); 25extern unsigned long omap1_ckctl_recalc(struct clk *clk);
26static void omap1_init_ext_clk(struct clk * clk); 26extern int omap1_set_sossi_rate(struct clk *clk, unsigned long rate);
27static int omap1_select_table_rate(struct clk * clk, unsigned long rate); 27extern unsigned long omap1_sossi_recalc(struct clk *clk);
28static long omap1_round_to_table_rate(struct clk * clk, unsigned long rate); 28extern unsigned long omap1_ckctl_recalc_dsp_domain(struct clk *clk);
29 29extern int omap1_clk_set_rate_dsp_domain(struct clk *clk, unsigned long rate);
30static int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate); 30extern int omap1_set_uart_rate(struct clk *clk, unsigned long rate);
31static long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate); 31extern unsigned long omap1_uart_recalc(struct clk *clk);
32 32extern int omap1_set_ext_clk_rate(struct clk *clk, unsigned long rate);
33struct mpu_rate { 33extern long omap1_round_ext_clk_rate(struct clk *clk, unsigned long rate);
34 unsigned long rate; 34extern void omap1_init_ext_clk(struct clk *clk);
35 unsigned long xtal; 35extern int omap1_select_table_rate(struct clk *clk, unsigned long rate);
36 unsigned long pll_rate; 36extern long omap1_round_to_table_rate(struct clk *clk, unsigned long rate);
37 __u16 ckctl_val; 37extern int omap1_clk_set_rate_ckctl_arm(struct clk *clk, unsigned long rate);
38 __u16 dpllctl_val; 38extern long omap1_clk_round_rate_ckctl_arm(struct clk *clk, unsigned long rate);
39}; 39extern unsigned long omap1_watchdog_recalc(struct clk *clk);
40
41#ifdef CONFIG_OMAP_RESET_CLOCKS
42extern void __init omap1_clk_disable_unused(struct clk *clk);
43#else
44#define omap1_clk_disable_unused NULL
45#endif
40 46
41struct uart_clk { 47struct uart_clk {
42 struct clk clk; 48 struct clk clk;
@@ -96,596 +102,12 @@ struct arm_idlect1_clk {
96#define SOFT_REQ_REG 0xfffe0834 102#define SOFT_REQ_REG 0xfffe0834
97#define SOFT_REQ_REG2 0xfffe0880 103#define SOFT_REQ_REG2 0xfffe0880
98 104
99/*------------------------------------------------------------------------- 105extern __u32 arm_idlect1_mask;
100 * Omap1 MPU rate table 106extern struct clk *api_ck_p, *ck_dpll1_p, *ck_ref_p;
101 *-------------------------------------------------------------------------*/
102static struct mpu_rate rate_table[] = {
103 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
104 * NOTE: Comment order here is different from bits in CKCTL value:
105 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
106 */
107#if defined(CONFIG_OMAP_ARM_216MHZ)
108 { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
109#endif
110#if defined(CONFIG_OMAP_ARM_195MHZ)
111 { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
112#endif
113#if defined(CONFIG_OMAP_ARM_192MHZ)
114 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
115 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
116 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
117 { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/4/4/8/8/8 */
118 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
119#endif
120#if defined(CONFIG_OMAP_ARM_182MHZ)
121 { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */
122#endif
123#if defined(CONFIG_OMAP_ARM_168MHZ)
124 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
125#endif
126#if defined(CONFIG_OMAP_ARM_150MHZ)
127 { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
128#endif
129#if defined(CONFIG_OMAP_ARM_120MHZ)
130 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
131#endif
132#if defined(CONFIG_OMAP_ARM_96MHZ)
133 { 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */
134#endif
135#if defined(CONFIG_OMAP_ARM_60MHZ)
136 { 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */
137#endif
138#if defined(CONFIG_OMAP_ARM_30MHZ)
139 { 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */
140#endif
141 { 0, 0, 0, 0, 0 },
142};
143
144/*-------------------------------------------------------------------------
145 * Omap1 clocks
146 *-------------------------------------------------------------------------*/
147
148static struct clk ck_ref = {
149 .name = "ck_ref",
150 .ops = &clkops_null,
151 .rate = 12000000,
152};
153
154static struct clk ck_dpll1 = {
155 .name = "ck_dpll1",
156 .ops = &clkops_null,
157 .parent = &ck_ref,
158};
159
160static struct arm_idlect1_clk ck_dpll1out = {
161 .clk = {
162 .name = "ck_dpll1out",
163 .ops = &clkops_generic,
164 .parent = &ck_dpll1,
165 .flags = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT,
166 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
167 .enable_bit = EN_CKOUT_ARM,
168 .recalc = &followparent_recalc,
169 },
170 .idlect_shift = 12,
171};
172
173static struct clk sossi_ck = {
174 .name = "ck_sossi",
175 .ops = &clkops_generic,
176 .parent = &ck_dpll1out.clk,
177 .flags = CLOCK_NO_IDLE_PARENT | ENABLE_REG_32BIT,
178 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_1),
179 .enable_bit = 16,
180 .recalc = &omap1_sossi_recalc,
181 .set_rate = &omap1_set_sossi_rate,
182};
183
184static struct clk arm_ck = {
185 .name = "arm_ck",
186 .ops = &clkops_null,
187 .parent = &ck_dpll1,
188 .rate_offset = CKCTL_ARMDIV_OFFSET,
189 .recalc = &omap1_ckctl_recalc,
190 .round_rate = omap1_clk_round_rate_ckctl_arm,
191 .set_rate = omap1_clk_set_rate_ckctl_arm,
192};
193
194static struct arm_idlect1_clk armper_ck = {
195 .clk = {
196 .name = "armper_ck",
197 .ops = &clkops_generic,
198 .parent = &ck_dpll1,
199 .flags = CLOCK_IDLE_CONTROL,
200 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
201 .enable_bit = EN_PERCK,
202 .rate_offset = CKCTL_PERDIV_OFFSET,
203 .recalc = &omap1_ckctl_recalc,
204 .round_rate = omap1_clk_round_rate_ckctl_arm,
205 .set_rate = omap1_clk_set_rate_ckctl_arm,
206 },
207 .idlect_shift = 2,
208};
209
210static struct clk arm_gpio_ck = {
211 .name = "arm_gpio_ck",
212 .ops = &clkops_generic,
213 .parent = &ck_dpll1,
214 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
215 .enable_bit = EN_GPIOCK,
216 .recalc = &followparent_recalc,
217};
218
219static struct arm_idlect1_clk armxor_ck = {
220 .clk = {
221 .name = "armxor_ck",
222 .ops = &clkops_generic,
223 .parent = &ck_ref,
224 .flags = CLOCK_IDLE_CONTROL,
225 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
226 .enable_bit = EN_XORPCK,
227 .recalc = &followparent_recalc,
228 },
229 .idlect_shift = 1,
230};
231
232static struct arm_idlect1_clk armtim_ck = {
233 .clk = {
234 .name = "armtim_ck",
235 .ops = &clkops_generic,
236 .parent = &ck_ref,
237 .flags = CLOCK_IDLE_CONTROL,
238 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
239 .enable_bit = EN_TIMCK,
240 .recalc = &followparent_recalc,
241 },
242 .idlect_shift = 9,
243};
244
245static struct arm_idlect1_clk armwdt_ck = {
246 .clk = {
247 .name = "armwdt_ck",
248 .ops = &clkops_generic,
249 .parent = &ck_ref,
250 .flags = CLOCK_IDLE_CONTROL,
251 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
252 .enable_bit = EN_WDTCK,
253 .recalc = &omap1_watchdog_recalc,
254 },
255 .idlect_shift = 0,
256};
257
258static struct clk arminth_ck16xx = {
259 .name = "arminth_ck",
260 .ops = &clkops_null,
261 .parent = &arm_ck,
262 .recalc = &followparent_recalc,
263 /* Note: On 16xx the frequency can be divided by 2 by programming
264 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
265 *
266 * 1510 version is in TC clocks.
267 */
268};
269
270static struct clk dsp_ck = {
271 .name = "dsp_ck",
272 .ops = &clkops_generic,
273 .parent = &ck_dpll1,
274 .enable_reg = OMAP1_IO_ADDRESS(ARM_CKCTL),
275 .enable_bit = EN_DSPCK,
276 .rate_offset = CKCTL_DSPDIV_OFFSET,
277 .recalc = &omap1_ckctl_recalc,
278 .round_rate = omap1_clk_round_rate_ckctl_arm,
279 .set_rate = omap1_clk_set_rate_ckctl_arm,
280};
281
282static struct clk dspmmu_ck = {
283 .name = "dspmmu_ck",
284 .ops = &clkops_null,
285 .parent = &ck_dpll1,
286 .rate_offset = CKCTL_DSPMMUDIV_OFFSET,
287 .recalc = &omap1_ckctl_recalc,
288 .round_rate = omap1_clk_round_rate_ckctl_arm,
289 .set_rate = omap1_clk_set_rate_ckctl_arm,
290};
291
292static struct clk dspper_ck = {
293 .name = "dspper_ck",
294 .ops = &clkops_dspck,
295 .parent = &ck_dpll1,
296 .enable_reg = DSP_IDLECT2,
297 .enable_bit = EN_PERCK,
298 .rate_offset = CKCTL_PERDIV_OFFSET,
299 .recalc = &omap1_ckctl_recalc_dsp_domain,
300 .round_rate = omap1_clk_round_rate_ckctl_arm,
301 .set_rate = &omap1_clk_set_rate_dsp_domain,
302};
303
304static struct clk dspxor_ck = {
305 .name = "dspxor_ck",
306 .ops = &clkops_dspck,
307 .parent = &ck_ref,
308 .enable_reg = DSP_IDLECT2,
309 .enable_bit = EN_XORPCK,
310 .recalc = &followparent_recalc,
311};
312
313static struct clk dsptim_ck = {
314 .name = "dsptim_ck",
315 .ops = &clkops_dspck,
316 .parent = &ck_ref,
317 .enable_reg = DSP_IDLECT2,
318 .enable_bit = EN_DSPTIMCK,
319 .recalc = &followparent_recalc,
320};
321
322/* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
323static struct arm_idlect1_clk tc_ck = {
324 .clk = {
325 .name = "tc_ck",
326 .ops = &clkops_null,
327 .parent = &ck_dpll1,
328 .flags = CLOCK_IDLE_CONTROL,
329 .rate_offset = CKCTL_TCDIV_OFFSET,
330 .recalc = &omap1_ckctl_recalc,
331 .round_rate = omap1_clk_round_rate_ckctl_arm,
332 .set_rate = omap1_clk_set_rate_ckctl_arm,
333 },
334 .idlect_shift = 6,
335};
336
337static struct clk arminth_ck1510 = {
338 .name = "arminth_ck",
339 .ops = &clkops_null,
340 .parent = &tc_ck.clk,
341 .recalc = &followparent_recalc,
342 /* Note: On 1510 the frequency follows TC_CK
343 *
344 * 16xx version is in MPU clocks.
345 */
346};
347
348static struct clk tipb_ck = {
349 /* No-idle controlled by "tc_ck" */
350 .name = "tipb_ck",
351 .ops = &clkops_null,
352 .parent = &tc_ck.clk,
353 .recalc = &followparent_recalc,
354};
355
356static struct clk l3_ocpi_ck = {
357 /* No-idle controlled by "tc_ck" */
358 .name = "l3_ocpi_ck",
359 .ops = &clkops_generic,
360 .parent = &tc_ck.clk,
361 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
362 .enable_bit = EN_OCPI_CK,
363 .recalc = &followparent_recalc,
364};
365
366static struct clk tc1_ck = {
367 .name = "tc1_ck",
368 .ops = &clkops_generic,
369 .parent = &tc_ck.clk,
370 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
371 .enable_bit = EN_TC1_CK,
372 .recalc = &followparent_recalc,
373};
374 107
375static struct clk tc2_ck = { 108extern const struct clkops clkops_dspck;
376 .name = "tc2_ck", 109extern const struct clkops clkops_dummy;
377 .ops = &clkops_generic, 110extern const struct clkops clkops_uart;
378 .parent = &tc_ck.clk, 111extern const struct clkops clkops_generic;
379 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
380 .enable_bit = EN_TC2_CK,
381 .recalc = &followparent_recalc,
382};
383
384static struct clk dma_ck = {
385 /* No-idle controlled by "tc_ck" */
386 .name = "dma_ck",
387 .ops = &clkops_null,
388 .parent = &tc_ck.clk,
389 .recalc = &followparent_recalc,
390};
391
392static struct clk dma_lcdfree_ck = {
393 .name = "dma_lcdfree_ck",
394 .ops = &clkops_null,
395 .parent = &tc_ck.clk,
396 .recalc = &followparent_recalc,
397};
398
399static struct arm_idlect1_clk api_ck = {
400 .clk = {
401 .name = "api_ck",
402 .ops = &clkops_generic,
403 .parent = &tc_ck.clk,
404 .flags = CLOCK_IDLE_CONTROL,
405 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
406 .enable_bit = EN_APICK,
407 .recalc = &followparent_recalc,
408 },
409 .idlect_shift = 8,
410};
411
412static struct arm_idlect1_clk lb_ck = {
413 .clk = {
414 .name = "lb_ck",
415 .ops = &clkops_generic,
416 .parent = &tc_ck.clk,
417 .flags = CLOCK_IDLE_CONTROL,
418 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
419 .enable_bit = EN_LBCK,
420 .recalc = &followparent_recalc,
421 },
422 .idlect_shift = 4,
423};
424
425static struct clk rhea1_ck = {
426 .name = "rhea1_ck",
427 .ops = &clkops_null,
428 .parent = &tc_ck.clk,
429 .recalc = &followparent_recalc,
430};
431
432static struct clk rhea2_ck = {
433 .name = "rhea2_ck",
434 .ops = &clkops_null,
435 .parent = &tc_ck.clk,
436 .recalc = &followparent_recalc,
437};
438
439static struct clk lcd_ck_16xx = {
440 .name = "lcd_ck",
441 .ops = &clkops_generic,
442 .parent = &ck_dpll1,
443 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
444 .enable_bit = EN_LCDCK,
445 .rate_offset = CKCTL_LCDDIV_OFFSET,
446 .recalc = &omap1_ckctl_recalc,
447 .round_rate = omap1_clk_round_rate_ckctl_arm,
448 .set_rate = omap1_clk_set_rate_ckctl_arm,
449};
450
451static struct arm_idlect1_clk lcd_ck_1510 = {
452 .clk = {
453 .name = "lcd_ck",
454 .ops = &clkops_generic,
455 .parent = &ck_dpll1,
456 .flags = CLOCK_IDLE_CONTROL,
457 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
458 .enable_bit = EN_LCDCK,
459 .rate_offset = CKCTL_LCDDIV_OFFSET,
460 .recalc = &omap1_ckctl_recalc,
461 .round_rate = omap1_clk_round_rate_ckctl_arm,
462 .set_rate = omap1_clk_set_rate_ckctl_arm,
463 },
464 .idlect_shift = 3,
465};
466
467static struct clk uart1_1510 = {
468 .name = "uart1_ck",
469 .ops = &clkops_null,
470 /* Direct from ULPD, no real parent */
471 .parent = &armper_ck.clk,
472 .rate = 12000000,
473 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
474 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
475 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */
476 .set_rate = &omap1_set_uart_rate,
477 .recalc = &omap1_uart_recalc,
478};
479
480static struct uart_clk uart1_16xx = {
481 .clk = {
482 .name = "uart1_ck",
483 .ops = &clkops_uart,
484 /* Direct from ULPD, no real parent */
485 .parent = &armper_ck.clk,
486 .rate = 48000000,
487 .flags = RATE_FIXED | ENABLE_REG_32BIT |
488 CLOCK_NO_IDLE_PARENT,
489 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
490 .enable_bit = 29,
491 },
492 .sysc_addr = 0xfffb0054,
493};
494
495static struct clk uart2_ck = {
496 .name = "uart2_ck",
497 .ops = &clkops_null,
498 /* Direct from ULPD, no real parent */
499 .parent = &armper_ck.clk,
500 .rate = 12000000,
501 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
502 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
503 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
504 .set_rate = &omap1_set_uart_rate,
505 .recalc = &omap1_uart_recalc,
506};
507
508static struct clk uart3_1510 = {
509 .name = "uart3_ck",
510 .ops = &clkops_null,
511 /* Direct from ULPD, no real parent */
512 .parent = &armper_ck.clk,
513 .rate = 12000000,
514 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
515 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
516 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */
517 .set_rate = &omap1_set_uart_rate,
518 .recalc = &omap1_uart_recalc,
519};
520
521static struct uart_clk uart3_16xx = {
522 .clk = {
523 .name = "uart3_ck",
524 .ops = &clkops_uart,
525 /* Direct from ULPD, no real parent */
526 .parent = &armper_ck.clk,
527 .rate = 48000000,
528 .flags = RATE_FIXED | ENABLE_REG_32BIT |
529 CLOCK_NO_IDLE_PARENT,
530 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
531 .enable_bit = 31,
532 },
533 .sysc_addr = 0xfffb9854,
534};
535
536static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
537 .name = "usb_clko",
538 .ops = &clkops_generic,
539 /* Direct from ULPD, no parent */
540 .rate = 6000000,
541 .flags = RATE_FIXED | ENABLE_REG_32BIT,
542 .enable_reg = OMAP1_IO_ADDRESS(ULPD_CLOCK_CTRL),
543 .enable_bit = USB_MCLK_EN_BIT,
544};
545
546static struct clk usb_hhc_ck1510 = {
547 .name = "usb_hhc_ck",
548 .ops = &clkops_generic,
549 /* Direct from ULPD, no parent */
550 .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
551 .flags = RATE_FIXED | ENABLE_REG_32BIT,
552 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
553 .enable_bit = USB_HOST_HHC_UHOST_EN,
554};
555
556static struct clk usb_hhc_ck16xx = {
557 .name = "usb_hhc_ck",
558 .ops = &clkops_generic,
559 /* Direct from ULPD, no parent */
560 .rate = 48000000,
561 /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
562 .flags = RATE_FIXED | ENABLE_REG_32BIT,
563 .enable_reg = OMAP1_IO_ADDRESS(OTG_BASE + 0x08), /* OTG_SYSCON_2 */
564 .enable_bit = 8 /* UHOST_EN */,
565};
566
567static struct clk usb_dc_ck = {
568 .name = "usb_dc_ck",
569 .ops = &clkops_generic,
570 /* Direct from ULPD, no parent */
571 .rate = 48000000,
572 .flags = RATE_FIXED,
573 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
574 .enable_bit = 4,
575};
576
577static struct clk usb_dc_ck7xx = {
578 .name = "usb_dc_ck",
579 .ops = &clkops_generic,
580 /* Direct from ULPD, no parent */
581 .rate = 48000000,
582 .flags = RATE_FIXED,
583 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
584 .enable_bit = 8,
585};
586
587static struct clk mclk_1510 = {
588 .name = "mclk",
589 .ops = &clkops_generic,
590 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
591 .rate = 12000000,
592 .flags = RATE_FIXED,
593 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
594 .enable_bit = 6,
595};
596
597static struct clk mclk_16xx = {
598 .name = "mclk",
599 .ops = &clkops_generic,
600 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
601 .enable_reg = OMAP1_IO_ADDRESS(COM_CLK_DIV_CTRL_SEL),
602 .enable_bit = COM_ULPD_PLL_CLK_REQ,
603 .set_rate = &omap1_set_ext_clk_rate,
604 .round_rate = &omap1_round_ext_clk_rate,
605 .init = &omap1_init_ext_clk,
606};
607
608static struct clk bclk_1510 = {
609 .name = "bclk",
610 .ops = &clkops_generic,
611 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
612 .rate = 12000000,
613 .flags = RATE_FIXED,
614};
615
616static struct clk bclk_16xx = {
617 .name = "bclk",
618 .ops = &clkops_generic,
619 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
620 .enable_reg = OMAP1_IO_ADDRESS(SWD_CLK_DIV_CTRL_SEL),
621 .enable_bit = SWD_ULPD_PLL_CLK_REQ,
622 .set_rate = &omap1_set_ext_clk_rate,
623 .round_rate = &omap1_round_ext_clk_rate,
624 .init = &omap1_init_ext_clk,
625};
626
627static struct clk mmc1_ck = {
628 .name = "mmc_ck",
629 .ops = &clkops_generic,
630 /* Functional clock is direct from ULPD, interface clock is ARMPER */
631 .parent = &armper_ck.clk,
632 .rate = 48000000,
633 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
634 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
635 .enable_bit = 23,
636};
637
638static struct clk mmc2_ck = {
639 .name = "mmc_ck",
640 .id = 1,
641 .ops = &clkops_generic,
642 /* Functional clock is direct from ULPD, interface clock is ARMPER */
643 .parent = &armper_ck.clk,
644 .rate = 48000000,
645 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
646 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
647 .enable_bit = 20,
648};
649
650static struct clk mmc3_ck = {
651 .name = "mmc_ck",
652 .id = 2,
653 .ops = &clkops_generic,
654 /* Functional clock is direct from ULPD, interface clock is ARMPER */
655 .parent = &armper_ck.clk,
656 .rate = 48000000,
657 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
658 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
659 .enable_bit = 12,
660};
661
662static struct clk virtual_ck_mpu = {
663 .name = "mpu",
664 .ops = &clkops_null,
665 .parent = &arm_ck, /* Is smarter alias for */
666 .recalc = &followparent_recalc,
667 .set_rate = &omap1_select_table_rate,
668 .round_rate = &omap1_round_to_table_rate,
669};
670
671/* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
672remains active during MPU idle whenever this is enabled */
673static struct clk i2c_fck = {
674 .name = "i2c_fck",
675 .id = 1,
676 .ops = &clkops_null,
677 .flags = CLOCK_NO_IDLE_PARENT,
678 .parent = &armxor_ck.clk,
679 .recalc = &followparent_recalc,
680};
681
682static struct clk i2c_ick = {
683 .name = "i2c_ick",
684 .id = 1,
685 .ops = &clkops_null,
686 .flags = CLOCK_NO_IDLE_PARENT,
687 .parent = &armper_ck.clk,
688 .recalc = &followparent_recalc,
689};
690 112
691#endif 113#endif
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
new file mode 100644
index 000000000000..ab995a9c606c
--- /dev/null
+++ b/arch/arm/mach-omap1/clock_data.c
@@ -0,0 +1,843 @@
1/*
2 * linux/arch/arm/mach-omap1/clock_data.c
3 *
4 * Copyright (C) 2004 - 2005, 2009 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#include <linux/kernel.h>
14#include <linux/clk.h>
15#include <linux/io.h>
16
17#include <asm/mach-types.h> /* for machine_is_* */
18
19#include <plat/clock.h>
20#include <plat/cpu.h>
21#include <plat/clkdev_omap.h>
22#include <plat/usb.h> /* for OTG_BASE */
23
24#include "clock.h"
25
26/*------------------------------------------------------------------------
27 * Omap1 clocks
28 *-------------------------------------------------------------------------*/
29
30/* XXX is this necessary? */
31static struct clk dummy_ck = {
32 .name = "dummy",
33 .ops = &clkops_dummy,
34 .flags = RATE_FIXED,
35};
36
37static struct clk ck_ref = {
38 .name = "ck_ref",
39 .ops = &clkops_null,
40 .rate = 12000000,
41};
42
43static struct clk ck_dpll1 = {
44 .name = "ck_dpll1",
45 .ops = &clkops_null,
46 .parent = &ck_ref,
47};
48
49/*
50 * FIXME: This clock seems to be necessary but no-one has asked for its
51 * activation. [ FIX: SoSSI, SSR ]
52 */
53static struct arm_idlect1_clk ck_dpll1out = {
54 .clk = {
55 .name = "ck_dpll1out",
56 .ops = &clkops_generic,
57 .parent = &ck_dpll1,
58 .flags = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT |
59 ENABLE_ON_INIT,
60 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
61 .enable_bit = EN_CKOUT_ARM,
62 .recalc = &followparent_recalc,
63 },
64 .idlect_shift = 12,
65};
66
67static struct clk sossi_ck = {
68 .name = "ck_sossi",
69 .ops = &clkops_generic,
70 .parent = &ck_dpll1out.clk,
71 .flags = CLOCK_NO_IDLE_PARENT | ENABLE_REG_32BIT,
72 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_1),
73 .enable_bit = 16,
74 .recalc = &omap1_sossi_recalc,
75 .set_rate = &omap1_set_sossi_rate,
76};
77
78static struct clk arm_ck = {
79 .name = "arm_ck",
80 .ops = &clkops_null,
81 .parent = &ck_dpll1,
82 .rate_offset = CKCTL_ARMDIV_OFFSET,
83 .recalc = &omap1_ckctl_recalc,
84 .round_rate = omap1_clk_round_rate_ckctl_arm,
85 .set_rate = omap1_clk_set_rate_ckctl_arm,
86};
87
88static struct arm_idlect1_clk armper_ck = {
89 .clk = {
90 .name = "armper_ck",
91 .ops = &clkops_generic,
92 .parent = &ck_dpll1,
93 .flags = CLOCK_IDLE_CONTROL,
94 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
95 .enable_bit = EN_PERCK,
96 .rate_offset = CKCTL_PERDIV_OFFSET,
97 .recalc = &omap1_ckctl_recalc,
98 .round_rate = omap1_clk_round_rate_ckctl_arm,
99 .set_rate = omap1_clk_set_rate_ckctl_arm,
100 },
101 .idlect_shift = 2,
102};
103
104/*
105 * FIXME: This clock seems to be necessary but no-one has asked for its
106 * activation. [ GPIO code for 1510 ]
107 */
108static struct clk arm_gpio_ck = {
109 .name = "arm_gpio_ck",
110 .ops = &clkops_generic,
111 .parent = &ck_dpll1,
112 .flags = ENABLE_ON_INIT,
113 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
114 .enable_bit = EN_GPIOCK,
115 .recalc = &followparent_recalc,
116};
117
118static struct arm_idlect1_clk armxor_ck = {
119 .clk = {
120 .name = "armxor_ck",
121 .ops = &clkops_generic,
122 .parent = &ck_ref,
123 .flags = CLOCK_IDLE_CONTROL,
124 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
125 .enable_bit = EN_XORPCK,
126 .recalc = &followparent_recalc,
127 },
128 .idlect_shift = 1,
129};
130
131static struct arm_idlect1_clk armtim_ck = {
132 .clk = {
133 .name = "armtim_ck",
134 .ops = &clkops_generic,
135 .parent = &ck_ref,
136 .flags = CLOCK_IDLE_CONTROL,
137 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
138 .enable_bit = EN_TIMCK,
139 .recalc = &followparent_recalc,
140 },
141 .idlect_shift = 9,
142};
143
144static struct arm_idlect1_clk armwdt_ck = {
145 .clk = {
146 .name = "armwdt_ck",
147 .ops = &clkops_generic,
148 .parent = &ck_ref,
149 .flags = CLOCK_IDLE_CONTROL,
150 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
151 .enable_bit = EN_WDTCK,
152 .recalc = &omap1_watchdog_recalc,
153 },
154 .idlect_shift = 0,
155};
156
157static struct clk arminth_ck16xx = {
158 .name = "arminth_ck",
159 .ops = &clkops_null,
160 .parent = &arm_ck,
161 .recalc = &followparent_recalc,
162 /* Note: On 16xx the frequency can be divided by 2 by programming
163 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
164 *
165 * 1510 version is in TC clocks.
166 */
167};
168
169static struct clk dsp_ck = {
170 .name = "dsp_ck",
171 .ops = &clkops_generic,
172 .parent = &ck_dpll1,
173 .enable_reg = OMAP1_IO_ADDRESS(ARM_CKCTL),
174 .enable_bit = EN_DSPCK,
175 .rate_offset = CKCTL_DSPDIV_OFFSET,
176 .recalc = &omap1_ckctl_recalc,
177 .round_rate = omap1_clk_round_rate_ckctl_arm,
178 .set_rate = omap1_clk_set_rate_ckctl_arm,
179};
180
181static struct clk dspmmu_ck = {
182 .name = "dspmmu_ck",
183 .ops = &clkops_null,
184 .parent = &ck_dpll1,
185 .rate_offset = CKCTL_DSPMMUDIV_OFFSET,
186 .recalc = &omap1_ckctl_recalc,
187 .round_rate = omap1_clk_round_rate_ckctl_arm,
188 .set_rate = omap1_clk_set_rate_ckctl_arm,
189};
190
191static struct clk dspper_ck = {
192 .name = "dspper_ck",
193 .ops = &clkops_dspck,
194 .parent = &ck_dpll1,
195 .enable_reg = DSP_IDLECT2,
196 .enable_bit = EN_PERCK,
197 .rate_offset = CKCTL_PERDIV_OFFSET,
198 .recalc = &omap1_ckctl_recalc_dsp_domain,
199 .round_rate = omap1_clk_round_rate_ckctl_arm,
200 .set_rate = &omap1_clk_set_rate_dsp_domain,
201};
202
203static struct clk dspxor_ck = {
204 .name = "dspxor_ck",
205 .ops = &clkops_dspck,
206 .parent = &ck_ref,
207 .enable_reg = DSP_IDLECT2,
208 .enable_bit = EN_XORPCK,
209 .recalc = &followparent_recalc,
210};
211
212static struct clk dsptim_ck = {
213 .name = "dsptim_ck",
214 .ops = &clkops_dspck,
215 .parent = &ck_ref,
216 .enable_reg = DSP_IDLECT2,
217 .enable_bit = EN_DSPTIMCK,
218 .recalc = &followparent_recalc,
219};
220
221/* Tie ARM_IDLECT1:IDLIF_ARM to this logical clock structure */
222static struct arm_idlect1_clk tc_ck = {
223 .clk = {
224 .name = "tc_ck",
225 .ops = &clkops_null,
226 .parent = &ck_dpll1,
227 .flags = CLOCK_IDLE_CONTROL,
228 .rate_offset = CKCTL_TCDIV_OFFSET,
229 .recalc = &omap1_ckctl_recalc,
230 .round_rate = omap1_clk_round_rate_ckctl_arm,
231 .set_rate = omap1_clk_set_rate_ckctl_arm,
232 },
233 .idlect_shift = 6,
234};
235
236static struct clk arminth_ck1510 = {
237 .name = "arminth_ck",
238 .ops = &clkops_null,
239 .parent = &tc_ck.clk,
240 .recalc = &followparent_recalc,
241 /* Note: On 1510 the frequency follows TC_CK
242 *
243 * 16xx version is in MPU clocks.
244 */
245};
246
247static struct clk tipb_ck = {
248 /* No-idle controlled by "tc_ck" */
249 .name = "tipb_ck",
250 .ops = &clkops_null,
251 .parent = &tc_ck.clk,
252 .recalc = &followparent_recalc,
253};
254
255static struct clk l3_ocpi_ck = {
256 /* No-idle controlled by "tc_ck" */
257 .name = "l3_ocpi_ck",
258 .ops = &clkops_generic,
259 .parent = &tc_ck.clk,
260 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
261 .enable_bit = EN_OCPI_CK,
262 .recalc = &followparent_recalc,
263};
264
265static struct clk tc1_ck = {
266 .name = "tc1_ck",
267 .ops = &clkops_generic,
268 .parent = &tc_ck.clk,
269 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
270 .enable_bit = EN_TC1_CK,
271 .recalc = &followparent_recalc,
272};
273
274/*
275 * FIXME: This clock seems to be necessary but no-one has asked for its
276 * activation. [ pm.c (SRAM), CCP, Camera ]
277 */
278static struct clk tc2_ck = {
279 .name = "tc2_ck",
280 .ops = &clkops_generic,
281 .parent = &tc_ck.clk,
282 .flags = ENABLE_ON_INIT,
283 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3),
284 .enable_bit = EN_TC2_CK,
285 .recalc = &followparent_recalc,
286};
287
288static struct clk dma_ck = {
289 /* No-idle controlled by "tc_ck" */
290 .name = "dma_ck",
291 .ops = &clkops_null,
292 .parent = &tc_ck.clk,
293 .recalc = &followparent_recalc,
294};
295
296static struct clk dma_lcdfree_ck = {
297 .name = "dma_lcdfree_ck",
298 .ops = &clkops_null,
299 .parent = &tc_ck.clk,
300 .recalc = &followparent_recalc,
301};
302
303static struct arm_idlect1_clk api_ck = {
304 .clk = {
305 .name = "api_ck",
306 .ops = &clkops_generic,
307 .parent = &tc_ck.clk,
308 .flags = CLOCK_IDLE_CONTROL,
309 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
310 .enable_bit = EN_APICK,
311 .recalc = &followparent_recalc,
312 },
313 .idlect_shift = 8,
314};
315
316static struct arm_idlect1_clk lb_ck = {
317 .clk = {
318 .name = "lb_ck",
319 .ops = &clkops_generic,
320 .parent = &tc_ck.clk,
321 .flags = CLOCK_IDLE_CONTROL,
322 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
323 .enable_bit = EN_LBCK,
324 .recalc = &followparent_recalc,
325 },
326 .idlect_shift = 4,
327};
328
329static struct clk rhea1_ck = {
330 .name = "rhea1_ck",
331 .ops = &clkops_null,
332 .parent = &tc_ck.clk,
333 .recalc = &followparent_recalc,
334};
335
336static struct clk rhea2_ck = {
337 .name = "rhea2_ck",
338 .ops = &clkops_null,
339 .parent = &tc_ck.clk,
340 .recalc = &followparent_recalc,
341};
342
343static struct clk lcd_ck_16xx = {
344 .name = "lcd_ck",
345 .ops = &clkops_generic,
346 .parent = &ck_dpll1,
347 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
348 .enable_bit = EN_LCDCK,
349 .rate_offset = CKCTL_LCDDIV_OFFSET,
350 .recalc = &omap1_ckctl_recalc,
351 .round_rate = omap1_clk_round_rate_ckctl_arm,
352 .set_rate = omap1_clk_set_rate_ckctl_arm,
353};
354
355static struct arm_idlect1_clk lcd_ck_1510 = {
356 .clk = {
357 .name = "lcd_ck",
358 .ops = &clkops_generic,
359 .parent = &ck_dpll1,
360 .flags = CLOCK_IDLE_CONTROL,
361 .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2),
362 .enable_bit = EN_LCDCK,
363 .rate_offset = CKCTL_LCDDIV_OFFSET,
364 .recalc = &omap1_ckctl_recalc,
365 .round_rate = omap1_clk_round_rate_ckctl_arm,
366 .set_rate = omap1_clk_set_rate_ckctl_arm,
367 },
368 .idlect_shift = 3,
369};
370
371static struct clk uart1_1510 = {
372 .name = "uart1_ck",
373 .ops = &clkops_null,
374 /* Direct from ULPD, no real parent */
375 .parent = &armper_ck.clk,
376 .rate = 12000000,
377 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
378 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
379 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */
380 .set_rate = &omap1_set_uart_rate,
381 .recalc = &omap1_uart_recalc,
382};
383
384static struct uart_clk uart1_16xx = {
385 .clk = {
386 .name = "uart1_ck",
387 .ops = &clkops_uart,
388 /* Direct from ULPD, no real parent */
389 .parent = &armper_ck.clk,
390 .rate = 48000000,
391 .flags = RATE_FIXED | ENABLE_REG_32BIT |
392 CLOCK_NO_IDLE_PARENT,
393 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
394 .enable_bit = 29,
395 },
396 .sysc_addr = 0xfffb0054,
397};
398
399static struct clk uart2_ck = {
400 .name = "uart2_ck",
401 .ops = &clkops_null,
402 /* Direct from ULPD, no real parent */
403 .parent = &armper_ck.clk,
404 .rate = 12000000,
405 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
406 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
407 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
408 .set_rate = &omap1_set_uart_rate,
409 .recalc = &omap1_uart_recalc,
410};
411
412static struct clk uart3_1510 = {
413 .name = "uart3_ck",
414 .ops = &clkops_null,
415 /* Direct from ULPD, no real parent */
416 .parent = &armper_ck.clk,
417 .rate = 12000000,
418 .flags = ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
419 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
420 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */
421 .set_rate = &omap1_set_uart_rate,
422 .recalc = &omap1_uart_recalc,
423};
424
425static struct uart_clk uart3_16xx = {
426 .clk = {
427 .name = "uart3_ck",
428 .ops = &clkops_uart,
429 /* Direct from ULPD, no real parent */
430 .parent = &armper_ck.clk,
431 .rate = 48000000,
432 .flags = RATE_FIXED | ENABLE_REG_32BIT |
433 CLOCK_NO_IDLE_PARENT,
434 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
435 .enable_bit = 31,
436 },
437 .sysc_addr = 0xfffb9854,
438};
439
440static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
441 .name = "usb_clko",
442 .ops = &clkops_generic,
443 /* Direct from ULPD, no parent */
444 .rate = 6000000,
445 .flags = RATE_FIXED | ENABLE_REG_32BIT,
446 .enable_reg = OMAP1_IO_ADDRESS(ULPD_CLOCK_CTRL),
447 .enable_bit = USB_MCLK_EN_BIT,
448};
449
450static struct clk usb_hhc_ck1510 = {
451 .name = "usb_hhc_ck",
452 .ops = &clkops_generic,
453 /* Direct from ULPD, no parent */
454 .rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
455 .flags = RATE_FIXED | ENABLE_REG_32BIT,
456 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
457 .enable_bit = USB_HOST_HHC_UHOST_EN,
458};
459
460static struct clk usb_hhc_ck16xx = {
461 .name = "usb_hhc_ck",
462 .ops = &clkops_generic,
463 /* Direct from ULPD, no parent */
464 .rate = 48000000,
465 /* OTG_SYSCON_2.OTG_PADEN == 0 (not 1510-compatible) */
466 .flags = RATE_FIXED | ENABLE_REG_32BIT,
467 .enable_reg = OMAP1_IO_ADDRESS(OTG_BASE + 0x08), /* OTG_SYSCON_2 */
468 .enable_bit = 8 /* UHOST_EN */,
469};
470
471static struct clk usb_dc_ck = {
472 .name = "usb_dc_ck",
473 .ops = &clkops_generic,
474 /* Direct from ULPD, no parent */
475 .rate = 48000000,
476 .flags = RATE_FIXED,
477 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
478 .enable_bit = 4,
479};
480
481static struct clk usb_dc_ck7xx = {
482 .name = "usb_dc_ck",
483 .ops = &clkops_generic,
484 /* Direct from ULPD, no parent */
485 .rate = 48000000,
486 .flags = RATE_FIXED,
487 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
488 .enable_bit = 8,
489};
490
491static struct clk mclk_1510 = {
492 .name = "mclk",
493 .ops = &clkops_generic,
494 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
495 .rate = 12000000,
496 .flags = RATE_FIXED,
497 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
498 .enable_bit = 6,
499};
500
501static struct clk mclk_16xx = {
502 .name = "mclk",
503 .ops = &clkops_generic,
504 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
505 .enable_reg = OMAP1_IO_ADDRESS(COM_CLK_DIV_CTRL_SEL),
506 .enable_bit = COM_ULPD_PLL_CLK_REQ,
507 .set_rate = &omap1_set_ext_clk_rate,
508 .round_rate = &omap1_round_ext_clk_rate,
509 .init = &omap1_init_ext_clk,
510};
511
512static struct clk bclk_1510 = {
513 .name = "bclk",
514 .ops = &clkops_generic,
515 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
516 .rate = 12000000,
517 .flags = RATE_FIXED,
518};
519
520static struct clk bclk_16xx = {
521 .name = "bclk",
522 .ops = &clkops_generic,
523 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
524 .enable_reg = OMAP1_IO_ADDRESS(SWD_CLK_DIV_CTRL_SEL),
525 .enable_bit = SWD_ULPD_PLL_CLK_REQ,
526 .set_rate = &omap1_set_ext_clk_rate,
527 .round_rate = &omap1_round_ext_clk_rate,
528 .init = &omap1_init_ext_clk,
529};
530
531static struct clk mmc1_ck = {
532 .name = "mmc_ck",
533 .ops = &clkops_generic,
534 /* Functional clock is direct from ULPD, interface clock is ARMPER */
535 .parent = &armper_ck.clk,
536 .rate = 48000000,
537 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
538 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
539 .enable_bit = 23,
540};
541
542static struct clk mmc2_ck = {
543 .name = "mmc_ck",
544 .id = 1,
545 .ops = &clkops_generic,
546 /* Functional clock is direct from ULPD, interface clock is ARMPER */
547 .parent = &armper_ck.clk,
548 .rate = 48000000,
549 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
550 .enable_reg = OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0),
551 .enable_bit = 20,
552};
553
554static struct clk mmc3_ck = {
555 .name = "mmc_ck",
556 .id = 2,
557 .ops = &clkops_generic,
558 /* Functional clock is direct from ULPD, interface clock is ARMPER */
559 .parent = &armper_ck.clk,
560 .rate = 48000000,
561 .flags = RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
562 .enable_reg = OMAP1_IO_ADDRESS(SOFT_REQ_REG),
563 .enable_bit = 12,
564};
565
566static struct clk virtual_ck_mpu = {
567 .name = "mpu",
568 .ops = &clkops_null,
569 .parent = &arm_ck, /* Is smarter alias for */
570 .recalc = &followparent_recalc,
571 .set_rate = &omap1_select_table_rate,
572 .round_rate = &omap1_round_to_table_rate,
573};
574
575/* virtual functional clock domain for I2C. Just for making sure that ARMXOR_CK
576remains active during MPU idle whenever this is enabled */
577static struct clk i2c_fck = {
578 .name = "i2c_fck",
579 .id = 1,
580 .ops = &clkops_null,
581 .flags = CLOCK_NO_IDLE_PARENT,
582 .parent = &armxor_ck.clk,
583 .recalc = &followparent_recalc,
584};
585
586static struct clk i2c_ick = {
587 .name = "i2c_ick",
588 .id = 1,
589 .ops = &clkops_null,
590 .flags = CLOCK_NO_IDLE_PARENT,
591 .parent = &armper_ck.clk,
592 .recalc = &followparent_recalc,
593};
594
595/*
596 * clkdev integration
597 */
598
599static struct omap_clk omap_clks[] = {
600 /* non-ULPD clocks */
601 CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX),
602 CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310),
603 /* CK_GEN1 clocks */
604 CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX),
605 CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX),
606 CLK(NULL, "arm_ck", &arm_ck, CK_16XX | CK_1510 | CK_310),
607 CLK(NULL, "armper_ck", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
608 CLK(NULL, "arm_gpio_ck", &arm_gpio_ck, CK_1510 | CK_310),
609 CLK(NULL, "armxor_ck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
610 CLK(NULL, "armtim_ck", &armtim_ck.clk, CK_16XX | CK_1510 | CK_310),
611 CLK("omap_wdt", "fck", &armwdt_ck.clk, CK_16XX | CK_1510 | CK_310),
612 CLK("omap_wdt", "ick", &armper_ck.clk, CK_16XX),
613 CLK("omap_wdt", "ick", &dummy_ck, CK_1510 | CK_310),
614 CLK(NULL, "arminth_ck", &arminth_ck1510, CK_1510 | CK_310),
615 CLK(NULL, "arminth_ck", &arminth_ck16xx, CK_16XX),
616 /* CK_GEN2 clocks */
617 CLK(NULL, "dsp_ck", &dsp_ck, CK_16XX | CK_1510 | CK_310),
618 CLK(NULL, "dspmmu_ck", &dspmmu_ck, CK_16XX | CK_1510 | CK_310),
619 CLK(NULL, "dspper_ck", &dspper_ck, CK_16XX | CK_1510 | CK_310),
620 CLK(NULL, "dspxor_ck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
621 CLK(NULL, "dsptim_ck", &dsptim_ck, CK_16XX | CK_1510 | CK_310),
622 /* CK_GEN3 clocks */
623 CLK(NULL, "tc_ck", &tc_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
624 CLK(NULL, "tipb_ck", &tipb_ck, CK_1510 | CK_310),
625 CLK(NULL, "l3_ocpi_ck", &l3_ocpi_ck, CK_16XX | CK_7XX),
626 CLK(NULL, "tc1_ck", &tc1_ck, CK_16XX),
627 CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX),
628 CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310),
629 CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX),
630 CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310),
631 CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310),
632 CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX),
633 CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
634 CLK(NULL, "lcd_ck", &lcd_ck_16xx, CK_16XX | CK_7XX),
635 CLK(NULL, "lcd_ck", &lcd_ck_1510.clk, CK_1510 | CK_310),
636 /* ULPD clocks */
637 CLK(NULL, "uart1_ck", &uart1_1510, CK_1510 | CK_310),
638 CLK(NULL, "uart1_ck", &uart1_16xx.clk, CK_16XX),
639 CLK(NULL, "uart2_ck", &uart2_ck, CK_16XX | CK_1510 | CK_310),
640 CLK(NULL, "uart3_ck", &uart3_1510, CK_1510 | CK_310),
641 CLK(NULL, "uart3_ck", &uart3_16xx.clk, CK_16XX),
642 CLK(NULL, "usb_clko", &usb_clko, CK_16XX | CK_1510 | CK_310),
643 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck1510, CK_1510 | CK_310),
644 CLK(NULL, "usb_hhc_ck", &usb_hhc_ck16xx, CK_16XX),
645 CLK(NULL, "usb_dc_ck", &usb_dc_ck, CK_16XX),
646 CLK(NULL, "usb_dc_ck", &usb_dc_ck7xx, CK_7XX),
647 CLK(NULL, "mclk", &mclk_1510, CK_1510 | CK_310),
648 CLK(NULL, "mclk", &mclk_16xx, CK_16XX),
649 CLK(NULL, "bclk", &bclk_1510, CK_1510 | CK_310),
650 CLK(NULL, "bclk", &bclk_16xx, CK_16XX),
651 CLK("mmci-omap.0", "fck", &mmc1_ck, CK_16XX | CK_1510 | CK_310),
652 CLK("mmci-omap.0", "fck", &mmc3_ck, CK_7XX),
653 CLK("mmci-omap.0", "ick", &armper_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
654 CLK("mmci-omap.1", "fck", &mmc2_ck, CK_16XX),
655 CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX),
656 /* Virtual clocks */
657 CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310),
658 CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX),
659 CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX),
660 CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX),
661 CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
662 CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX),
663 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310),
664 CLK("omap-mcbsp.2", "ick", &armper_ck.clk, CK_16XX),
665 CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_1510 | CK_310),
666 CLK("omap-mcbsp.3", "ick", &dspper_ck, CK_16XX),
667 CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_1510 | CK_310),
668 CLK("omap-mcbsp.1", "fck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
669 CLK("omap-mcbsp.2", "fck", &armper_ck.clk, CK_16XX | CK_1510 | CK_310),
670 CLK("omap-mcbsp.3", "fck", &dspxor_ck, CK_16XX | CK_1510 | CK_310),
671};
672
673/*
674 * init
675 */
676
677static struct clk_functions omap1_clk_functions __initdata = {
678 .clk_enable = omap1_clk_enable,
679 .clk_disable = omap1_clk_disable,
680 .clk_round_rate = omap1_clk_round_rate,
681 .clk_set_rate = omap1_clk_set_rate,
682 .clk_disable_unused = omap1_clk_disable_unused,
683};
684
685int __init omap1_clk_init(void)
686{
687 struct omap_clk *c;
688 const struct omap_clock_config *info;
689 int crystal_type = 0; /* Default 12 MHz */
690 u32 reg, cpu_mask;
691
692#ifdef CONFIG_DEBUG_LL
693 /*
694 * Resets some clocks that may be left on from bootloader,
695 * but leaves serial clocks on.
696 */
697 omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
698#endif
699
700 /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
701 reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
702 omap_writew(reg, SOFT_REQ_REG);
703 if (!cpu_is_omap15xx())
704 omap_writew(0, SOFT_REQ_REG2);
705
706 clk_init(&omap1_clk_functions);
707
708 /* By default all idlect1 clocks are allowed to idle */
709 arm_idlect1_mask = ~0;
710
711 for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
712 clk_preinit(c->lk.clk);
713
714 cpu_mask = 0;
715 if (cpu_is_omap16xx())
716 cpu_mask |= CK_16XX;
717 if (cpu_is_omap1510())
718 cpu_mask |= CK_1510;
719 if (cpu_is_omap7xx())
720 cpu_mask |= CK_7XX;
721 if (cpu_is_omap310())
722 cpu_mask |= CK_310;
723
724 for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++)
725 if (c->cpu & cpu_mask) {
726 clkdev_add(&c->lk);
727 clk_register(c->lk.clk);
728 }
729
730 /* Pointers to these clocks are needed by code in clock.c */
731 api_ck_p = clk_get(NULL, "api_ck");
732 ck_dpll1_p = clk_get(NULL, "ck_dpll1");
733 ck_ref_p = clk_get(NULL, "ck_ref");
734
735 info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
736 if (info != NULL) {
737 if (!cpu_is_omap15xx())
738 crystal_type = info->system_clock_type;
739 }
740
741#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
742 ck_ref.rate = 13000000;
743#elif defined(CONFIG_ARCH_OMAP16XX)
744 if (crystal_type == 2)
745 ck_ref.rate = 19200000;
746#endif
747
748 pr_info("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: "
749 "0x%04x\n", omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
750 omap_readw(ARM_CKCTL));
751
752 /* We want to be in syncronous scalable mode */
753 omap_writew(0x1000, ARM_SYSST);
754
755#ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER
756 /* Use values set by bootloader. Determine PLL rate and recalculate
757 * dependent clocks as if kernel had changed PLL or divisors.
758 */
759 {
760 unsigned pll_ctl_val = omap_readw(DPLL_CTL);
761
762 ck_dpll1.rate = ck_ref.rate; /* Base xtal rate */
763 if (pll_ctl_val & 0x10) {
764 /* PLL enabled, apply multiplier and divisor */
765 if (pll_ctl_val & 0xf80)
766 ck_dpll1.rate *= (pll_ctl_val & 0xf80) >> 7;
767 ck_dpll1.rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
768 } else {
769 /* PLL disabled, apply bypass divisor */
770 switch (pll_ctl_val & 0xc) {
771 case 0:
772 break;
773 case 0x4:
774 ck_dpll1.rate /= 2;
775 break;
776 default:
777 ck_dpll1.rate /= 4;
778 break;
779 }
780 }
781 }
782#else
783 /* Find the highest supported frequency and enable it */
784 if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) {
785 printk(KERN_ERR "System frequencies not set. Check your config.\n");
786 /* Guess sane values (60MHz) */
787 omap_writew(0x2290, DPLL_CTL);
788 omap_writew(cpu_is_omap7xx() ? 0x3005 : 0x1005, ARM_CKCTL);
789 ck_dpll1.rate = 60000000;
790 }
791#endif
792 propagate_rate(&ck_dpll1);
793 /* Cache rates for clocks connected to ck_ref (not dpll1) */
794 propagate_rate(&ck_ref);
795 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): "
796 "%ld.%01ld/%ld.%01ld/%ld.%01ld MHz\n",
797 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
798 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
799 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
800
801#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
802 /* Select slicer output as OMAP input clock */
803 omap_writew(omap_readw(OMAP7XX_PCC_UPLD_CTRL) & ~0x1, OMAP7XX_PCC_UPLD_CTRL);
804#endif
805
806 /* Amstrad Delta wants BCLK high when inactive */
807 if (machine_is_ams_delta())
808 omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
809 (1 << SDW_MCLK_INV_BIT),
810 ULPD_CLOCK_CTRL);
811
812 /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
813 /* (on 730, bit 13 must not be cleared) */
814 if (cpu_is_omap7xx())
815 omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
816 else
817 omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
818
819 /* Put DSP/MPUI into reset until needed */
820 omap_writew(0, ARM_RSTCT1);
821 omap_writew(1, ARM_RSTCT2);
822 omap_writew(0x400, ARM_IDLECT1);
823
824 /*
825 * According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8)
826 * of the ARM_IDLECT2 register must be set to zero. The power-on
827 * default value of this bit is one.
828 */
829 omap_writew(0x0000, ARM_IDLECT2); /* Turn LCD clock off also */
830
831 /*
832 * Only enable those clocks we will need, let the drivers
833 * enable other clocks as necessary
834 */
835 clk_enable(&armper_ck.clk);
836 clk_enable(&armxor_ck.clk);
837 clk_enable(&armtim_ck.clk); /* This should be done by timer code */
838
839 if (cpu_is_omap15xx())
840 clk_enable(&arm_gpio_ck);
841
842 return 0;
843}
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c
new file mode 100644
index 000000000000..1bf4735e27a6
--- /dev/null
+++ b/arch/arm/mach-omap1/i2c.c
@@ -0,0 +1,39 @@
1/*
2 * Helper module for board specific I2C bus registration
3 *
4 * Copyright (C) 2009 Nokia Corporation.
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 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * 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 St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22#include <plat/i2c.h>
23#include <plat/mux.h>
24#include <plat/cpu.h>
25
26int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
27 struct i2c_board_info const *info,
28 unsigned len)
29{
30 if (cpu_is_omap7xx()) {
31 omap_cfg_reg(I2C_7XX_SDA);
32 omap_cfg_reg(I2C_7XX_SCL);
33 } else {
34 omap_cfg_reg(I2C_SDA);
35 omap_cfg_reg(I2C_SCL);
36 }
37
38 return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
39}
diff --git a/arch/arm/mach-omap1/include/mach/lcd_dma.h b/arch/arm/mach-omap1/include/mach/lcd_dma.h
new file mode 100644
index 000000000000..d7a457bbcb7f
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/lcd_dma.h
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-omap1/include/mach/lcd_dma.h
3 *
4 * Extracted from arch/arm/plat-omap/include/plat/dma.h
5 * Copyright (C) 2003 Nokia Corporation
6 * Author: Juha Yrjölä <juha.yrjola@nokia.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#ifndef __MACH_OMAP1_LCD_DMA_H__
23#define __MACH_OMAP1_LCD_DMA_H__
24
25/* Hardware registers for LCD DMA */
26#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
27#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
28#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
29#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
30#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
31#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
32
33#define OMAP1610_DMA_LCD_BASE (0xfffee300)
34#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
35#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
36#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
37#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
38#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
39#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
40#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
41#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
42#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
43#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
44#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
45#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
46#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
47#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
48#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
49#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
50#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
51
52/* LCD DMA block numbers */
53enum {
54 OMAP_LCD_DMA_B1_TOP,
55 OMAP_LCD_DMA_B1_BOTTOM,
56 OMAP_LCD_DMA_B2_TOP,
57 OMAP_LCD_DMA_B2_BOTTOM
58};
59
60/* LCD DMA functions */
61extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
62 void *data);
63extern void omap_free_lcd_dma(void);
64extern void omap_setup_lcd_dma(void);
65extern void omap_enable_lcd_dma(void);
66extern void omap_stop_lcd_dma(void);
67extern void omap_set_lcd_dma_ext_controller(int external);
68extern void omap_set_lcd_dma_single_transfer(int single);
69extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
70 int data_type);
71extern void omap_set_lcd_dma_b1_rotation(int rotate);
72extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
73extern void omap_set_lcd_dma_b1_mirror(int mirror);
74extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
75
76extern int omap_lcd_dma_running(void);
77
78#endif /* __MACH_OMAP1_LCD_DMA_H__ */
diff --git a/arch/arm/mach-omap1/include/mach/lcdc.h b/arch/arm/mach-omap1/include/mach/lcdc.h
new file mode 100644
index 000000000000..89bd703adaf6
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/lcdc.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-omap1/include/mach/lcdc.h
3 *
4 * Extracted from drivers/video/omap/lcdc.c
5 * Copyright (C) 2004 Nokia Corporation
6 * Author: Imre Deak <imre.deak@nokia.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 program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22#ifndef __MACH_LCDC_H__
23#define __MACH_LCDC_H__
24
25#define OMAP_LCDC_BASE 0xfffec000
26#define OMAP_LCDC_SIZE 256
27#define OMAP_LCDC_IRQ INT_LCD_CTRL
28
29#define OMAP_LCDC_CONTROL (OMAP_LCDC_BASE + 0x00)
30#define OMAP_LCDC_TIMING0 (OMAP_LCDC_BASE + 0x04)
31#define OMAP_LCDC_TIMING1 (OMAP_LCDC_BASE + 0x08)
32#define OMAP_LCDC_TIMING2 (OMAP_LCDC_BASE + 0x0c)
33#define OMAP_LCDC_STATUS (OMAP_LCDC_BASE + 0x10)
34#define OMAP_LCDC_SUBPANEL (OMAP_LCDC_BASE + 0x14)
35#define OMAP_LCDC_LINE_INT (OMAP_LCDC_BASE + 0x18)
36#define OMAP_LCDC_DISPLAY_STATUS (OMAP_LCDC_BASE + 0x1c)
37
38#define OMAP_LCDC_STAT_DONE (1 << 0)
39#define OMAP_LCDC_STAT_VSYNC (1 << 1)
40#define OMAP_LCDC_STAT_SYNC_LOST (1 << 2)
41#define OMAP_LCDC_STAT_ABC (1 << 3)
42#define OMAP_LCDC_STAT_LINE_INT (1 << 4)
43#define OMAP_LCDC_STAT_FUF (1 << 5)
44#define OMAP_LCDC_STAT_LOADED_PALETTE (1 << 6)
45
46#define OMAP_LCDC_CTRL_LCD_EN (1 << 0)
47#define OMAP_LCDC_CTRL_LCD_TFT (1 << 7)
48#define OMAP_LCDC_CTRL_LINE_IRQ_CLR_SEL (1 << 10)
49
50#define OMAP_LCDC_IRQ_VSYNC (1 << 2)
51#define OMAP_LCDC_IRQ_DONE (1 << 3)
52#define OMAP_LCDC_IRQ_LOADED_PALETTE (1 << 4)
53#define OMAP_LCDC_IRQ_LINE_NIRQ (1 << 5)
54#define OMAP_LCDC_IRQ_LINE (1 << 6)
55#define OMAP_LCDC_IRQ_MASK (((1 << 5) - 1) << 2)
56
57#endif /* __MACH_LCDC_H__ */
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 2a6d68aa3489..d9b8d82530ae 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -18,7 +18,8 @@
18#include <plat/mux.h> 18#include <plat/mux.h>
19#include <plat/tc.h> 19#include <plat/tc.h>
20 20
21extern int omap1_clk_init(void); 21#include "clock.h"
22
22extern void omap_check_revision(void); 23extern void omap_check_revision(void);
23extern void omap_sram_init(void); 24extern void omap_sram_init(void);
24extern void omapfb_reserve_sdram(void); 25extern void omapfb_reserve_sdram(void);
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
new file mode 100644
index 000000000000..3be11af687bb
--- /dev/null
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -0,0 +1,448 @@
1/*
2 * linux/arch/arm/mach-omap1/lcd_dma.c
3 *
4 * Extracted from arch/arm/plat-omap/dma.c
5 * Copyright (C) 2003 - 2008 Nokia Corporation
6 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
7 * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com>
8 * Graphics DMA and LCD DMA graphics tranformations
9 * by Imre Deak <imre.deak@nokia.com>
10 * OMAP2/3 support Copyright (C) 2004-2007 Texas Instruments, Inc.
11 * Merged to support both OMAP1 and OMAP2 by Tony Lindgren <tony@atomide.com>
12 * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
13 *
14 * Copyright (C) 2009 Texas Instruments
15 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
16 *
17 * Support functions for the OMAP internal DMA channels.
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License version 2 as
21 * published by the Free Software Foundation.
22 *
23 */
24
25#include <linux/module.h>
26#include <linux/spinlock.h>
27#include <linux/interrupt.h>
28#include <linux/io.h>
29
30#include <mach/hardware.h>
31#include <mach/lcdc.h>
32#include <plat/dma.h>
33
34int omap_lcd_dma_running(void)
35{
36 /*
37 * On OMAP1510, internal LCD controller will start the transfer
38 * when it gets enabled, so assume DMA running if LCD enabled.
39 */
40 if (cpu_is_omap1510())
41 if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN)
42 return 1;
43
44 /* Check if LCD DMA is running */
45 if (cpu_is_omap16xx())
46 if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN)
47 return 1;
48
49 return 0;
50}
51
52static struct lcd_dma_info {
53 spinlock_t lock;
54 int reserved;
55 void (*callback)(u16 status, void *data);
56 void *cb_data;
57
58 int active;
59 unsigned long addr, size;
60 int rotate, data_type, xres, yres;
61 int vxres;
62 int mirror;
63 int xscale, yscale;
64 int ext_ctrl;
65 int src_port;
66 int single_transfer;
67} lcd_dma;
68
69void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
70 int data_type)
71{
72 lcd_dma.addr = addr;
73 lcd_dma.data_type = data_type;
74 lcd_dma.xres = fb_xres;
75 lcd_dma.yres = fb_yres;
76}
77EXPORT_SYMBOL(omap_set_lcd_dma_b1);
78
79void omap_set_lcd_dma_src_port(int port)
80{
81 lcd_dma.src_port = port;
82}
83
84void omap_set_lcd_dma_ext_controller(int external)
85{
86 lcd_dma.ext_ctrl = external;
87}
88EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller);
89
90void omap_set_lcd_dma_single_transfer(int single)
91{
92 lcd_dma.single_transfer = single;
93}
94EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer);
95
96void omap_set_lcd_dma_b1_rotation(int rotate)
97{
98 if (cpu_is_omap1510()) {
99 printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n");
100 BUG();
101 return;
102 }
103 lcd_dma.rotate = rotate;
104}
105EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation);
106
107void omap_set_lcd_dma_b1_mirror(int mirror)
108{
109 if (cpu_is_omap1510()) {
110 printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n");
111 BUG();
112 }
113 lcd_dma.mirror = mirror;
114}
115EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
116
117void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
118{
119 if (cpu_is_omap1510()) {
120 printk(KERN_ERR "DMA virtual resulotion is not supported "
121 "in 1510 mode\n");
122 BUG();
123 }
124 lcd_dma.vxres = vxres;
125}
126EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres);
127
128void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale)
129{
130 if (cpu_is_omap1510()) {
131 printk(KERN_ERR "DMA scale is not supported in 1510 mode\n");
132 BUG();
133 }
134 lcd_dma.xscale = xscale;
135 lcd_dma.yscale = yscale;
136}
137EXPORT_SYMBOL(omap_set_lcd_dma_b1_scale);
138
139static void set_b1_regs(void)
140{
141 unsigned long top, bottom;
142 int es;
143 u16 w;
144 unsigned long en, fn;
145 long ei, fi;
146 unsigned long vxres;
147 unsigned int xscale, yscale;
148
149 switch (lcd_dma.data_type) {
150 case OMAP_DMA_DATA_TYPE_S8:
151 es = 1;
152 break;
153 case OMAP_DMA_DATA_TYPE_S16:
154 es = 2;
155 break;
156 case OMAP_DMA_DATA_TYPE_S32:
157 es = 4;
158 break;
159 default:
160 BUG();
161 return;
162 }
163
164 vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres;
165 xscale = lcd_dma.xscale ? lcd_dma.xscale : 1;
166 yscale = lcd_dma.yscale ? lcd_dma.yscale : 1;
167 BUG_ON(vxres < lcd_dma.xres);
168
169#define PIXADDR(x, y) (lcd_dma.addr + \
170 ((y) * vxres * yscale + (x) * xscale) * es)
171#define PIXSTEP(sx, sy, dx, dy) (PIXADDR(dx, dy) - PIXADDR(sx, sy) - es + 1)
172
173 switch (lcd_dma.rotate) {
174 case 0:
175 if (!lcd_dma.mirror) {
176 top = PIXADDR(0, 0);
177 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
178 /* 1510 DMA requires the bottom address to be 2 more
179 * than the actual last memory access location. */
180 if (cpu_is_omap1510() &&
181 lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32)
182 bottom += 2;
183 ei = PIXSTEP(0, 0, 1, 0);
184 fi = PIXSTEP(lcd_dma.xres - 1, 0, 0, 1);
185 } else {
186 top = PIXADDR(lcd_dma.xres - 1, 0);
187 bottom = PIXADDR(0, lcd_dma.yres - 1);
188 ei = PIXSTEP(1, 0, 0, 0);
189 fi = PIXSTEP(0, 0, lcd_dma.xres - 1, 1);
190 }
191 en = lcd_dma.xres;
192 fn = lcd_dma.yres;
193 break;
194 case 90:
195 if (!lcd_dma.mirror) {
196 top = PIXADDR(0, lcd_dma.yres - 1);
197 bottom = PIXADDR(lcd_dma.xres - 1, 0);
198 ei = PIXSTEP(0, 1, 0, 0);
199 fi = PIXSTEP(0, 0, 1, lcd_dma.yres - 1);
200 } else {
201 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
202 bottom = PIXADDR(0, 0);
203 ei = PIXSTEP(0, 1, 0, 0);
204 fi = PIXSTEP(1, 0, 0, lcd_dma.yres - 1);
205 }
206 en = lcd_dma.yres;
207 fn = lcd_dma.xres;
208 break;
209 case 180:
210 if (!lcd_dma.mirror) {
211 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
212 bottom = PIXADDR(0, 0);
213 ei = PIXSTEP(1, 0, 0, 0);
214 fi = PIXSTEP(0, 1, lcd_dma.xres - 1, 0);
215 } else {
216 top = PIXADDR(0, lcd_dma.yres - 1);
217 bottom = PIXADDR(lcd_dma.xres - 1, 0);
218 ei = PIXSTEP(0, 0, 1, 0);
219 fi = PIXSTEP(lcd_dma.xres - 1, 1, 0, 0);
220 }
221 en = lcd_dma.xres;
222 fn = lcd_dma.yres;
223 break;
224 case 270:
225 if (!lcd_dma.mirror) {
226 top = PIXADDR(lcd_dma.xres - 1, 0);
227 bottom = PIXADDR(0, lcd_dma.yres - 1);
228 ei = PIXSTEP(0, 0, 0, 1);
229 fi = PIXSTEP(1, lcd_dma.yres - 1, 0, 0);
230 } else {
231 top = PIXADDR(0, 0);
232 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
233 ei = PIXSTEP(0, 0, 0, 1);
234 fi = PIXSTEP(0, lcd_dma.yres - 1, 1, 0);
235 }
236 en = lcd_dma.yres;
237 fn = lcd_dma.xres;
238 break;
239 default:
240 BUG();
241 return; /* Suppress warning about uninitialized vars */
242 }
243
244 if (cpu_is_omap1510()) {
245 omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
246 omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
247 omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
248 omap_writew(bottom, OMAP1510_DMA_LCD_BOT_F1_L);
249
250 return;
251 }
252
253 /* 1610 regs */
254 omap_writew(top >> 16, OMAP1610_DMA_LCD_TOP_B1_U);
255 omap_writew(top, OMAP1610_DMA_LCD_TOP_B1_L);
256 omap_writew(bottom >> 16, OMAP1610_DMA_LCD_BOT_B1_U);
257 omap_writew(bottom, OMAP1610_DMA_LCD_BOT_B1_L);
258
259 omap_writew(en, OMAP1610_DMA_LCD_SRC_EN_B1);
260 omap_writew(fn, OMAP1610_DMA_LCD_SRC_FN_B1);
261
262 w = omap_readw(OMAP1610_DMA_LCD_CSDP);
263 w &= ~0x03;
264 w |= lcd_dma.data_type;
265 omap_writew(w, OMAP1610_DMA_LCD_CSDP);
266
267 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
268 /* Always set the source port as SDRAM for now*/
269 w &= ~(0x03 << 6);
270 if (lcd_dma.callback != NULL)
271 w |= 1 << 1; /* Block interrupt enable */
272 else
273 w &= ~(1 << 1);
274 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
275
276 if (!(lcd_dma.rotate || lcd_dma.mirror ||
277 lcd_dma.vxres || lcd_dma.xscale || lcd_dma.yscale))
278 return;
279
280 w = omap_readw(OMAP1610_DMA_LCD_CCR);
281 /* Set the double-indexed addressing mode */
282 w |= (0x03 << 12);
283 omap_writew(w, OMAP1610_DMA_LCD_CCR);
284
285 omap_writew(ei, OMAP1610_DMA_LCD_SRC_EI_B1);
286 omap_writew(fi >> 16, OMAP1610_DMA_LCD_SRC_FI_B1_U);
287 omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L);
288}
289
290static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id)
291{
292 u16 w;
293
294 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
295 if (unlikely(!(w & (1 << 3)))) {
296 printk(KERN_WARNING "Spurious LCD DMA IRQ\n");
297 return IRQ_NONE;
298 }
299 /* Ack the IRQ */
300 w |= (1 << 3);
301 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
302 lcd_dma.active = 0;
303 if (lcd_dma.callback != NULL)
304 lcd_dma.callback(w, lcd_dma.cb_data);
305
306 return IRQ_HANDLED;
307}
308
309int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
310 void *data)
311{
312 spin_lock_irq(&lcd_dma.lock);
313 if (lcd_dma.reserved) {
314 spin_unlock_irq(&lcd_dma.lock);
315 printk(KERN_ERR "LCD DMA channel already reserved\n");
316 BUG();
317 return -EBUSY;
318 }
319 lcd_dma.reserved = 1;
320 spin_unlock_irq(&lcd_dma.lock);
321 lcd_dma.callback = callback;
322 lcd_dma.cb_data = data;
323 lcd_dma.active = 0;
324 lcd_dma.single_transfer = 0;
325 lcd_dma.rotate = 0;
326 lcd_dma.vxres = 0;
327 lcd_dma.mirror = 0;
328 lcd_dma.xscale = 0;
329 lcd_dma.yscale = 0;
330 lcd_dma.ext_ctrl = 0;
331 lcd_dma.src_port = 0;
332
333 return 0;
334}
335EXPORT_SYMBOL(omap_request_lcd_dma);
336
337void omap_free_lcd_dma(void)
338{
339 spin_lock(&lcd_dma.lock);
340 if (!lcd_dma.reserved) {
341 spin_unlock(&lcd_dma.lock);
342 printk(KERN_ERR "LCD DMA is not reserved\n");
343 BUG();
344 return;
345 }
346 if (!cpu_is_omap1510())
347 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1,
348 OMAP1610_DMA_LCD_CCR);
349 lcd_dma.reserved = 0;
350 spin_unlock(&lcd_dma.lock);
351}
352EXPORT_SYMBOL(omap_free_lcd_dma);
353
354void omap_enable_lcd_dma(void)
355{
356 u16 w;
357
358 /*
359 * Set the Enable bit only if an external controller is
360 * connected. Otherwise the OMAP internal controller will
361 * start the transfer when it gets enabled.
362 */
363 if (cpu_is_omap1510() || !lcd_dma.ext_ctrl)
364 return;
365
366 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
367 w |= 1 << 8;
368 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
369
370 lcd_dma.active = 1;
371
372 w = omap_readw(OMAP1610_DMA_LCD_CCR);
373 w |= 1 << 7;
374 omap_writew(w, OMAP1610_DMA_LCD_CCR);
375}
376EXPORT_SYMBOL(omap_enable_lcd_dma);
377
378void omap_setup_lcd_dma(void)
379{
380 BUG_ON(lcd_dma.active);
381 if (!cpu_is_omap1510()) {
382 /* Set some reasonable defaults */
383 omap_writew(0x5440, OMAP1610_DMA_LCD_CCR);
384 omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP);
385 omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL);
386 }
387 set_b1_regs();
388 if (!cpu_is_omap1510()) {
389 u16 w;
390
391 w = omap_readw(OMAP1610_DMA_LCD_CCR);
392 /*
393 * If DMA was already active set the end_prog bit to have
394 * the programmed register set loaded into the active
395 * register set.
396 */
397 w |= 1 << 11; /* End_prog */
398 if (!lcd_dma.single_transfer)
399 w |= (3 << 8); /* Auto_init, repeat */
400 omap_writew(w, OMAP1610_DMA_LCD_CCR);
401 }
402}
403EXPORT_SYMBOL(omap_setup_lcd_dma);
404
405void omap_stop_lcd_dma(void)
406{
407 u16 w;
408
409 lcd_dma.active = 0;
410 if (cpu_is_omap1510() || !lcd_dma.ext_ctrl)
411 return;
412
413 w = omap_readw(OMAP1610_DMA_LCD_CCR);
414 w &= ~(1 << 7);
415 omap_writew(w, OMAP1610_DMA_LCD_CCR);
416
417 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
418 w &= ~(1 << 8);
419 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
420}
421EXPORT_SYMBOL(omap_stop_lcd_dma);
422
423static int __init omap_init_lcd_dma(void)
424{
425 int r;
426
427 if (cpu_is_omap16xx()) {
428 u16 w;
429
430 /* this would prevent OMAP sleep */
431 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
432 w &= ~(1 << 8);
433 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
434 }
435
436 spin_lock_init(&lcd_dma.lock);
437
438 r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
439 "LCD DMA", NULL);
440 if (r != 0)
441 printk(KERN_ERR "unable to request IRQ for LCD DMA "
442 "(error %d)\n", r);
443
444 return r;
445}
446
447arch_initcall(omap_init_lcd_dma);
448
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 785371e982fc..07212cc621ae 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -50,12 +50,18 @@ MUX_CFG_7XX("E3_7XX_KBC4", 13, 25, 0, 24, 1, 0)
50 50
51MUX_CFG_7XX("AA17_7XX_USB_DM", 2, 21, 0, 20, 0, 0) 51MUX_CFG_7XX("AA17_7XX_USB_DM", 2, 21, 0, 20, 0, 0)
52MUX_CFG_7XX("W16_7XX_USB_PU_EN", 2, 25, 0, 24, 0, 0) 52MUX_CFG_7XX("W16_7XX_USB_PU_EN", 2, 25, 0, 24, 0, 0)
53MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 0, 28, 0, 0) 53MUX_CFG_7XX("W17_7XX_USB_VBUSI", 2, 29, 6, 28, 1, 0)
54MUX_CFG_7XX("W18_7XX_USB_DMCK_OUT",3, 3, 1, 2, 0, 0)
55MUX_CFG_7XX("W19_7XX_USB_DCRST", 3, 7, 1, 6, 0, 0)
54 56
55/* MMC Pins */ 57/* MMC Pins */
56MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0) 58MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0)
57MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0) 59MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0)
58MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) 60MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0)
61
62/* I2C interface */
63MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0)
64MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0)
59}; 65};
60#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) 66#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)
61#else 67#else
diff --git a/arch/arm/mach-omap1/opp.h b/arch/arm/mach-omap1/opp.h
new file mode 100644
index 000000000000..07074d79adce
--- /dev/null
+++ b/arch/arm/mach-omap1/opp.h
@@ -0,0 +1,28 @@
1/*
2 * linux/arch/arm/mach-omap1/opp.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_MACH_OMAP1_OPP_H
14#define __ARCH_ARM_MACH_OMAP1_OPP_H
15
16#include <linux/types.h>
17
18struct mpu_rate {
19 unsigned long rate;
20 unsigned long xtal;
21 unsigned long pll_rate;
22 __u16 ckctl_val;
23 __u16 dpllctl_val;
24};
25
26extern struct mpu_rate omap1_rate_table[];
27
28#endif
diff --git a/arch/arm/mach-omap1/opp_data.c b/arch/arm/mach-omap1/opp_data.c
new file mode 100644
index 000000000000..75a546514994
--- /dev/null
+++ b/arch/arm/mach-omap1/opp_data.c
@@ -0,0 +1,59 @@
1/*
2 * linux/arch/arm/mach-omap1/opp_data.c
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#include "opp.h"
14
15/*-------------------------------------------------------------------------
16 * Omap1 MPU rate table
17 *-------------------------------------------------------------------------*/
18struct mpu_rate omap1_rate_table[] = {
19 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
20 * NOTE: Comment order here is different from bits in CKCTL value:
21 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
22 */
23#if defined(CONFIG_OMAP_ARM_216MHZ)
24 { 216000000, 12000000, 216000000, 0x050d, 0x2910 }, /* 1/1/2/2/2/8 */
25#endif
26#if defined(CONFIG_OMAP_ARM_195MHZ)
27 { 195000000, 13000000, 195000000, 0x050e, 0x2790 }, /* 1/1/2/2/4/8 */
28#endif
29#if defined(CONFIG_OMAP_ARM_192MHZ)
30 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
31 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
32 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
33 { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/4/4/8/8/8 */
34 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
35#endif
36#if defined(CONFIG_OMAP_ARM_182MHZ)
37 { 182000000, 13000000, 182000000, 0x050e, 0x2710 }, /* 1/1/2/2/4/8 */
38#endif
39#if defined(CONFIG_OMAP_ARM_168MHZ)
40 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
41#endif
42#if defined(CONFIG_OMAP_ARM_150MHZ)
43 { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
44#endif
45#if defined(CONFIG_OMAP_ARM_120MHZ)
46 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
47#endif
48#if defined(CONFIG_OMAP_ARM_96MHZ)
49 { 96000000, 12000000, 96000000, 0x0005, 0x2410 }, /* 1/1/1/1/2/2 */
50#endif
51#if defined(CONFIG_OMAP_ARM_60MHZ)
52 { 60000000, 12000000, 60000000, 0x0005, 0x2290 }, /* 1/1/1/1/2/2 */
53#endif
54#if defined(CONFIG_OMAP_ARM_30MHZ)
55 { 30000000, 12000000, 60000000, 0x0555, 0x2290 }, /* 2/2/2/2/2/2 */
56#endif
57 { 0, 0, 0, 0, 0 },
58};
59
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 7309aab305a9..10eafa70a909 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -18,12 +18,25 @@ config ARCH_OMAP2430
18config ARCH_OMAP34XX 18config ARCH_OMAP34XX
19 bool "OMAP34xx Based System" 19 bool "OMAP34xx Based System"
20 depends on ARCH_OMAP3 20 depends on ARCH_OMAP3
21 select USB_ARCH_HAS_EHCI
21 22
22config ARCH_OMAP3430 23config ARCH_OMAP3430
23 bool "OMAP3430 support" 24 bool "OMAP3430 support"
24 depends on ARCH_OMAP3 && ARCH_OMAP34XX 25 depends on ARCH_OMAP3 && ARCH_OMAP34XX
25 select ARCH_OMAP_OTG 26 select ARCH_OMAP_OTG
26 27
28config OMAP_PACKAGE_CBC
29 bool
30
31config OMAP_PACKAGE_CBB
32 bool
33
34config OMAP_PACKAGE_CUS
35 bool
36
37config OMAP_PACKAGE_CBP
38 bool
39
27comment "OMAP Board Type" 40comment "OMAP Board Type"
28 depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4 41 depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4
29 42
@@ -52,14 +65,17 @@ config MACH_OMAP_2430SDP
52config MACH_OMAP3_BEAGLE 65config MACH_OMAP3_BEAGLE
53 bool "OMAP3 BEAGLE board" 66 bool "OMAP3 BEAGLE board"
54 depends on ARCH_OMAP3 && ARCH_OMAP34XX 67 depends on ARCH_OMAP3 && ARCH_OMAP34XX
68 select OMAP_PACKAGE_CBB
55 69
56config MACH_OMAP_LDP 70config MACH_OMAP_LDP
57 bool "OMAP3 LDP board" 71 bool "OMAP3 LDP board"
58 depends on ARCH_OMAP3 && ARCH_OMAP34XX 72 depends on ARCH_OMAP3 && ARCH_OMAP34XX
73 select OMAP_PACKAGE_CBB
59 74
60config MACH_OVERO 75config MACH_OVERO
61 bool "Gumstix Overo board" 76 bool "Gumstix Overo board"
62 depends on ARCH_OMAP3 && ARCH_OMAP34XX 77 depends on ARCH_OMAP3 && ARCH_OMAP34XX
78 select OMAP_PACKAGE_CBB
63 79
64config MACH_OMAP3EVM 80config MACH_OMAP3EVM
65 bool "OMAP 3530 EVM board" 81 bool "OMAP 3530 EVM board"
@@ -68,14 +84,22 @@ config MACH_OMAP3EVM
68config MACH_OMAP3517EVM 84config MACH_OMAP3517EVM
69 bool "OMAP3517/ AM3517 EVM board" 85 bool "OMAP3517/ AM3517 EVM board"
70 depends on ARCH_OMAP3 && ARCH_OMAP34XX 86 depends on ARCH_OMAP3 && ARCH_OMAP34XX
87 select OMAP_PACKAGE_CBB
71 88
72config MACH_OMAP3_PANDORA 89config MACH_OMAP3_PANDORA
73 bool "OMAP3 Pandora" 90 bool "OMAP3 Pandora"
74 depends on ARCH_OMAP3 && ARCH_OMAP34XX 91 depends on ARCH_OMAP3 && ARCH_OMAP34XX
92 select OMAP_PACKAGE_CBB
93
94config MACH_OMAP3_TOUCHBOOK
95 bool "OMAP3 Touch Book"
96 depends on ARCH_OMAP3 && ARCH_OMAP34XX
97 select BACKLIGHT_CLASS_DEVICE
75 98
76config MACH_OMAP_3430SDP 99config MACH_OMAP_3430SDP
77 bool "OMAP 3430 SDP board" 100 bool "OMAP 3430 SDP board"
78 depends on ARCH_OMAP3 && ARCH_OMAP34XX 101 depends on ARCH_OMAP3 && ARCH_OMAP34XX
102 select OMAP_PACKAGE_CBB
79 103
80config MACH_NOKIA_N800 104config MACH_NOKIA_N800
81 bool 105 bool
@@ -96,26 +120,33 @@ config MACH_NOKIA_N8X0
96config MACH_NOKIA_RX51 120config MACH_NOKIA_RX51
97 bool "Nokia RX-51 board" 121 bool "Nokia RX-51 board"
98 depends on ARCH_OMAP3 && ARCH_OMAP34XX 122 depends on ARCH_OMAP3 && ARCH_OMAP34XX
123 select OMAP_PACKAGE_CBB
99 124
100config MACH_OMAP_ZOOM2 125config MACH_OMAP_ZOOM2
101 bool "OMAP3 Zoom2 board" 126 bool "OMAP3 Zoom2 board"
102 depends on ARCH_OMAP3 && ARCH_OMAP34XX 127 depends on ARCH_OMAP3 && ARCH_OMAP34XX
128 select OMAP_PACKAGE_CBB
103 129
104config MACH_OMAP_ZOOM3 130config MACH_OMAP_ZOOM3
105 bool "OMAP3630 Zoom3 board" 131 bool "OMAP3630 Zoom3 board"
106 depends on ARCH_OMAP3 && ARCH_OMAP34XX 132 depends on ARCH_OMAP3 && ARCH_OMAP34XX
133 select OMAP_PACKAGE_CBP
107 134
108config MACH_CM_T35 135config MACH_CM_T35
109 bool "CompuLab CM-T35 module" 136 bool "CompuLab CM-T35 module"
110 depends on ARCH_OMAP3 && ARCH_OMAP34XX 137 depends on ARCH_OMAP3 && ARCH_OMAP34XX
138 select OMAP_PACKAGE_CUS
139 select OMAP_MUX
111 140
112config MACH_IGEP0020 141config MACH_IGEP0020
113 bool "IGEP0020" 142 bool "IGEP0020"
114 depends on ARCH_OMAP3 && ARCH_OMAP34XX 143 depends on ARCH_OMAP3 && ARCH_OMAP34XX
144 select OMAP_PACKAGE_CBB
115 145
116config MACH_OMAP_3630SDP 146config MACH_OMAP_3630SDP
117 bool "OMAP3630 SDP board" 147 bool "OMAP3630 SDP board"
118 depends on ARCH_OMAP3 && ARCH_OMAP34XX 148 depends on ARCH_OMAP3 && ARCH_OMAP34XX
149 select OMAP_PACKAGE_CBP
119 150
120config MACH_OMAP_4430SDP 151config MACH_OMAP_4430SDP
121 bool "OMAP 4430 SDP board" 152 bool "OMAP 4430 SDP board"
@@ -128,3 +159,15 @@ config OMAP3_EMU
128 help 159 help
129 Say Y here to enable debugging hardware of omap3 160 Say Y here to enable debugging hardware of omap3
130 161
162config OMAP3_SDRC_AC_TIMING
163 bool "Enable SDRC AC timing register changes"
164 depends on ARCH_OMAP3 && ARCH_OMAP34XX
165 default n
166 help
167 If you know that none of your system initiators will attempt to
168 access SDRAM during CORE DVFS, select Y here. This should boost
169 SDRAM performance at lower CORE OPPs. There are relatively few
170 users who will wish to say yes at this point - almost everyone will
171 wish to say no. Selecting yes without understanding what is
172 going on could result in system crashes;
173
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 32548a4510c5..b32678b848bc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -6,11 +6,14 @@
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o
7 7
8omap-2-3-common = irq.o sdrc.o omap_hwmod.o 8omap-2-3-common = irq.o sdrc.o omap_hwmod.o
9omap-3-4-common = dpll.o
9prcm-common = prcm.o powerdomain.o 10prcm-common = prcm.o powerdomain.o
10clock-common = clock.o clockdomain.o 11clock-common = clock.o clock_common_data.o clockdomain.o
11 12
12obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common) $(clock-common) 13obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common) $(clock-common)
13obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common) $(clock-common) 14obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common) $(clock-common) \
15 $(omap-3-4-common)
16obj-$(CONFIG_ARCH_OMAP4) += $(omap-3-4-common) prcm.o clock.o
14 17
15obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o 18obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
16 19
@@ -23,6 +26,9 @@ obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
23obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o 26obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o
24obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o 27obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o
25 28
29# Pin multiplexing
30obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
31
26# SMS/SDRC 32# SMS/SDRC
27obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o 33obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
28# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o 34# obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o
@@ -41,8 +47,11 @@ obj-$(CONFIG_ARCH_OMAP3) += cm.o
41obj-$(CONFIG_ARCH_OMAP4) += cm4xxx.o 47obj-$(CONFIG_ARCH_OMAP4) += cm4xxx.o
42 48
43# Clock framework 49# Clock framework
44obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o 50obj-$(CONFIG_ARCH_OMAP2) += clock2xxx.o clock2xxx_data.o
45obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o 51obj-$(CONFIG_ARCH_OMAP2420) += opp2420_data.o
52obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clock34xx_data.o
53obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o
54obj-$(CONFIG_ARCH_OMAP4) += clock44xx.o clock44xx_data.o
46 55
47# EMU peripherals 56# EMU peripherals
48obj-$(CONFIG_OMAP3_EMU) += emu.o 57obj-$(CONFIG_OMAP3_EMU) += emu.o
@@ -55,6 +64,9 @@ iommu-$(CONFIG_ARCH_OMAP3) += omap3-iommu.o
55 64
56obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y) 65obj-$(CONFIG_OMAP_IOMMU) += $(iommu-y)
57 66
67i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
68obj-y += $(i2c-omap-m) $(i2c-omap-y)
69
58# Specific board support 70# Specific board support
59obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 71obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
60obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o 72obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
@@ -93,7 +105,8 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
93 mmc-twl4030.o 105 mmc-twl4030.o
94obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ 106obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
95 mmc-twl4030.o 107 mmc-twl4030.o
96 108obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
109 mmc-twl4030.o
97obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o 110obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
98 111
99obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o 112obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index db9374bc528b..e508904fb67e 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/i2c/twl4030.h> 22#include <linux/i2c/twl.h>
23#include <linux/err.h> 23#include <linux/err.h>
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/io.h> 25#include <linux/io.h>
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 491364e44c7d..c90b0d0b1927 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -20,7 +20,7 @@
20#include <linux/input/matrix_keypad.h> 20#include <linux/input/matrix_keypad.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/spi/ads7846.h> 22#include <linux/spi/ads7846.h>
23#include <linux/i2c/twl4030.h> 23#include <linux/i2c/twl.h>
24#include <linux/regulator/machine.h> 24#include <linux/regulator/machine.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
@@ -31,16 +31,17 @@
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <plat/mcspi.h> 33#include <plat/mcspi.h>
34#include <plat/mux.h>
35#include <plat/board.h> 34#include <plat/board.h>
36#include <plat/usb.h> 35#include <plat/usb.h>
37#include <plat/common.h> 36#include <plat/common.h>
38#include <plat/dma.h> 37#include <plat/dma.h>
39#include <plat/gpmc.h> 38#include <plat/gpmc.h>
39#include <plat/display.h>
40 40
41#include <plat/control.h> 41#include <plat/control.h>
42#include <plat/gpmc-smc91x.h> 42#include <plat/gpmc-smc91x.h>
43 43
44#include "mux.h"
44#include "sdram-qimonda-hyb18m512160af-6.h" 45#include "sdram-qimonda-hyb18m512160af-6.h"
45#include "mmc-twl4030.h" 46#include "mmc-twl4030.h"
46 47
@@ -152,31 +153,152 @@ static struct spi_board_info sdp3430_spi_board_info[] __initdata = {
152 }, 153 },
153}; 154};
154 155
155static struct platform_device sdp3430_lcd_device = { 156
156 .name = "sdp2430_lcd", 157#define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8
157 .id = -1, 158#define SDP3430_LCD_PANEL_ENABLE_GPIO 5
159
160static unsigned backlight_gpio;
161static unsigned enable_gpio;
162static int lcd_enabled;
163static int dvi_enabled;
164
165static void __init sdp3430_display_init(void)
166{
167 int r;
168
169 enable_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO;
170 backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO;
171
172 r = gpio_request(enable_gpio, "LCD reset");
173 if (r) {
174 printk(KERN_ERR "failed to get LCD reset GPIO\n");
175 goto err0;
176 }
177
178 r = gpio_request(backlight_gpio, "LCD Backlight");
179 if (r) {
180 printk(KERN_ERR "failed to get LCD backlight GPIO\n");
181 goto err1;
182 }
183
184 gpio_direction_output(enable_gpio, 0);
185 gpio_direction_output(backlight_gpio, 0);
186
187 return;
188err1:
189 gpio_free(enable_gpio);
190err0:
191 return;
192}
193
194static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
195{
196 if (dvi_enabled) {
197 printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
198 return -EINVAL;
199 }
200
201 gpio_direction_output(enable_gpio, 1);
202 gpio_direction_output(backlight_gpio, 1);
203
204 lcd_enabled = 1;
205
206 return 0;
207}
208
209static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
210{
211 lcd_enabled = 0;
212
213 gpio_direction_output(enable_gpio, 0);
214 gpio_direction_output(backlight_gpio, 0);
215}
216
217static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
218{
219 if (lcd_enabled) {
220 printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
221 return -EINVAL;
222 }
223
224 dvi_enabled = 1;
225
226 return 0;
227}
228
229static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
230{
231 dvi_enabled = 0;
232}
233
234static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
235{
236 return 0;
237}
238
239static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev)
240{
241}
242
243
244static struct omap_dss_device sdp3430_lcd_device = {
245 .name = "lcd",
246 .driver_name = "sharp_ls_panel",
247 .type = OMAP_DISPLAY_TYPE_DPI,
248 .phy.dpi.data_lines = 16,
249 .platform_enable = sdp3430_panel_enable_lcd,
250 .platform_disable = sdp3430_panel_disable_lcd,
158}; 251};
159 252
160static struct regulator_consumer_supply sdp3430_vdac_supply = { 253static struct omap_dss_device sdp3430_dvi_device = {
161 .supply = "vdac", 254 .name = "dvi",
162 .dev = &sdp3430_lcd_device.dev, 255 .driver_name = "generic_panel",
256 .type = OMAP_DISPLAY_TYPE_DPI,
257 .phy.dpi.data_lines = 24,
258 .platform_enable = sdp3430_panel_enable_dvi,
259 .platform_disable = sdp3430_panel_disable_dvi,
163}; 260};
164 261
165static struct regulator_consumer_supply sdp3430_vdvi_supply = { 262static struct omap_dss_device sdp3430_tv_device = {
166 .supply = "vdvi", 263 .name = "tv",
167 .dev = &sdp3430_lcd_device.dev, 264 .driver_name = "venc",
265 .type = OMAP_DISPLAY_TYPE_VENC,
266 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
267 .platform_enable = sdp3430_panel_enable_tv,
268 .platform_disable = sdp3430_panel_disable_tv,
168}; 269};
169 270
170static struct platform_device *sdp3430_devices[] __initdata = { 271
272static struct omap_dss_device *sdp3430_dss_devices[] = {
171 &sdp3430_lcd_device, 273 &sdp3430_lcd_device,
274 &sdp3430_dvi_device,
275 &sdp3430_tv_device,
276};
277
278static struct omap_dss_board_info sdp3430_dss_data = {
279 .num_devices = ARRAY_SIZE(sdp3430_dss_devices),
280 .devices = sdp3430_dss_devices,
281 .default_device = &sdp3430_lcd_device,
172}; 282};
173 283
174static struct omap_lcd_config sdp3430_lcd_config __initdata = { 284static struct platform_device sdp3430_dss_device = {
175 .ctrl_name = "internal", 285 .name = "omapdss",
286 .id = -1,
287 .dev = {
288 .platform_data = &sdp3430_dss_data,
289 },
290};
291
292static struct regulator_consumer_supply sdp3430_vdda_dac_supply = {
293 .supply = "vdda_dac",
294 .dev = &sdp3430_dss_device.dev,
295};
296
297static struct platform_device *sdp3430_devices[] __initdata = {
298 &sdp3430_dss_device,
176}; 299};
177 300
178static struct omap_board_config_kernel sdp3430_config[] __initdata = { 301static struct omap_board_config_kernel sdp3430_config[] __initdata = {
179 { OMAP_TAG_LCD, &sdp3430_lcd_config },
180}; 302};
181 303
182static void __init omap_3430sdp_init_irq(void) 304static void __init omap_3430sdp_init_irq(void)
@@ -392,22 +514,34 @@ static struct regulator_init_data sdp3430_vdac = {
392 | REGULATOR_CHANGE_STATUS, 514 | REGULATOR_CHANGE_STATUS,
393 }, 515 },
394 .num_consumer_supplies = 1, 516 .num_consumer_supplies = 1,
395 .consumer_supplies = &sdp3430_vdac_supply, 517 .consumer_supplies = &sdp3430_vdda_dac_supply,
396}; 518};
397 519
398/* VPLL2 for digital video outputs */ 520/* VPLL2 for digital video outputs */
521static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
522 {
523 .supply = "vdvi",
524 .dev = &sdp3430_lcd_device.dev,
525 },
526 {
527 .supply = "vdds_dsi",
528 .dev = &sdp3430_dss_device.dev,
529 }
530};
531
399static struct regulator_init_data sdp3430_vpll2 = { 532static struct regulator_init_data sdp3430_vpll2 = {
400 .constraints = { 533 .constraints = {
401 .name = "VDVI", 534 .name = "VDVI",
402 .min_uV = 1800000, 535 .min_uV = 1800000,
403 .max_uV = 1800000, 536 .max_uV = 1800000,
537 .apply_uV = true,
404 .valid_modes_mask = REGULATOR_MODE_NORMAL 538 .valid_modes_mask = REGULATOR_MODE_NORMAL
405 | REGULATOR_MODE_STANDBY, 539 | REGULATOR_MODE_STANDBY,
406 .valid_ops_mask = REGULATOR_CHANGE_MODE 540 .valid_ops_mask = REGULATOR_CHANGE_MODE
407 | REGULATOR_CHANGE_STATUS, 541 | REGULATOR_CHANGE_STATUS,
408 }, 542 },
409 .num_consumer_supplies = 1, 543 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),
410 .consumer_supplies = &sdp3430_vdvi_supply, 544 .consumer_supplies = sdp3430_vpll2_supplies,
411}; 545};
412 546
413static struct twl4030_codec_audio_data sdp3430_audio = { 547static struct twl4030_codec_audio_data sdp3430_audio = {
@@ -491,7 +625,9 @@ static inline void board_smc91x_init(void)
491 625
492static void enable_board_wakeup_source(void) 626static void enable_board_wakeup_source(void)
493{ 627{
494 omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ 628 /* T2 interrupt line (keypad) */
629 omap_mux_init_signal("sys_nirq",
630 OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
495} 631}
496 632
497static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 633static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
@@ -506,8 +642,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
506 .reset_gpio_port[2] = -EINVAL 642 .reset_gpio_port[2] = -EINVAL
507}; 643};
508 644
645#ifdef CONFIG_OMAP_MUX
646static struct omap_board_mux board_mux[] __initdata = {
647 { .reg_offset = OMAP_MUX_TERMINATOR },
648};
649#else
650#define board_mux NULL
651#endif
652
509static void __init omap_3430sdp_init(void) 653static void __init omap_3430sdp_init(void)
510{ 654{
655 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
511 omap3430_i2c_init(); 656 omap3430_i2c_init();
512 platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); 657 platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
513 if (omap_rev() > OMAP3430_REV_ES1_0) 658 if (omap_rev() > OMAP3430_REV_ES1_0)
@@ -521,6 +666,7 @@ static void __init omap_3430sdp_init(void)
521 omap_serial_init(); 666 omap_serial_init();
522 usb_musb_init(); 667 usb_musb_init();
523 board_smc91x_init(); 668 board_smc91x_init();
669 sdp3430_display_init();
524 enable_board_wakeup_source(); 670 enable_board_wakeup_source();
525 usb_ehci_init(&ehci_pdata); 671 usb_ehci_init(&ehci_pdata);
526} 672}
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 348b70b98336..739059632811 100755
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -23,6 +23,7 @@
23 23
24#include <mach/board-zoom.h> 24#include <mach/board-zoom.h>
25 25
26#include "mux.h"
26#include "sdram-hynix-h8mbx00u0mer-0em.h" 27#include "sdram-hynix-h8mbx00u0mer-0em.h"
27 28
28#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 29#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
@@ -48,7 +49,9 @@ static inline void board_smc91x_init(void)
48 49
49static void enable_board_wakeup_source(void) 50static void enable_board_wakeup_source(void)
50{ 51{
51 omap_cfg_reg(AF26_34XX_SYS_NIRQ); /* T2 interrupt line (keypad) */ 52 /* T2 interrupt line (keypad) */
53 omap_mux_init_signal("sys_nirq",
54 OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
52} 55}
53 56
54static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 57static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
@@ -82,8 +85,17 @@ static void __init omap_sdp_init_irq(void)
82 omap_gpio_init(); 85 omap_gpio_init();
83} 86}
84 87
88#ifdef CONFIG_OMAP_MUX
89static struct omap_board_mux board_mux[] __initdata = {
90 { .reg_offset = OMAP_MUX_TERMINATOR },
91};
92#else
93#define board_mux NULL
94#endif
95
85static void __init omap_sdp_init(void) 96static void __init omap_sdp_init(void)
86{ 97{
98 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
87 zoom_peripherals_init(); 99 zoom_peripherals_init();
88 board_smc91x_init(); 100 board_smc91x_init();
89 enable_board_wakeup_source(); 101 enable_board_wakeup_source();
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 415a13d767cc..b4e6eca0e8a9 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -30,6 +30,8 @@
30#include <plat/common.h> 30#include <plat/common.h>
31#include <plat/usb.h> 31#include <plat/usb.h>
32 32
33#include "mux.h"
34
33/* 35/*
34 * Board initialization 36 * Board initialization
35 */ 37 */
@@ -60,8 +62,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
60 .reset_gpio_port[2] = -EINVAL 62 .reset_gpio_port[2] = -EINVAL
61}; 63};
62 64
65#ifdef CONFIG_OMAP_MUX
66static struct omap_board_mux board_mux[] __initdata = {
67 { .reg_offset = OMAP_MUX_TERMINATOR },
68};
69#else
70#define board_mux NULL
71#endif
72
63static void __init am3517_evm_init(void) 73static void __init am3517_evm_init(void)
64{ 74{
75 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
65 platform_add_devices(am3517_evm_devices, 76 platform_add_devices(am3517_evm_devices,
66 ARRAY_SIZE(am3517_evm_devices)); 77 ARRAY_SIZE(am3517_evm_devices));
67 78
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 8a2ce77a02ec..fbbd68d69cc8 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -26,6 +26,7 @@
26#include <linux/leds.h> 26#include <linux/leds.h>
27#include <linux/err.h> 27#include <linux/err.h>
28#include <linux/clk.h> 28#include <linux/clk.h>
29#include <linux/smc91x.h>
29 30
30#include <mach/hardware.h> 31#include <mach/hardware.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -120,6 +121,12 @@ static void __init apollon_flash_init(void)
120 apollon_flash_resource[0].end = base + SZ_128K - 1; 121 apollon_flash_resource[0].end = base + SZ_128K - 1;
121} 122}
122 123
124static struct smc91x_platdata appolon_smc91x_info = {
125 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
126 .leda = RPC_LED_100_10,
127 .ledb = RPC_LED_TX_RX,
128};
129
123static struct resource apollon_smc91x_resources[] = { 130static struct resource apollon_smc91x_resources[] = {
124 [0] = { 131 [0] = {
125 .flags = IORESOURCE_MEM, 132 .flags = IORESOURCE_MEM,
@@ -134,6 +141,9 @@ static struct resource apollon_smc91x_resources[] = {
134static struct platform_device apollon_smc91x_device = { 141static struct platform_device apollon_smc91x_device = {
135 .name = "smc91x", 142 .name = "smc91x",
136 .id = -1, 143 .id = -1,
144 .dev = {
145 .platform_data = &appolon_smc91x_info,
146 },
137 .num_resources = ARRAY_SIZE(apollon_smc91x_resources), 147 .num_resources = ARRAY_SIZE(apollon_smc91x_resources),
138 .resource = apollon_smc91x_resources, 148 .resource = apollon_smc91x_resources,
139}; 149};
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 22c45290db63..2626a9f8a73a 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -29,7 +29,7 @@
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30 30
31#include <linux/i2c/at24.h> 31#include <linux/i2c/at24.h>
32#include <linux/i2c/twl4030.h> 32#include <linux/i2c/twl.h>
33#include <linux/regulator/machine.h> 33#include <linux/regulator/machine.h>
34 34
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -38,13 +38,13 @@
38 38
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/common.h> 40#include <plat/common.h>
41#include <plat/mux.h>
42#include <plat/nand.h> 41#include <plat/nand.h>
43#include <plat/gpmc.h> 42#include <plat/gpmc.h>
44#include <plat/usb.h> 43#include <plat/usb.h>
45 44
46#include <mach/hardware.h> 45#include <mach/hardware.h>
47 46
47#include "mux.h"
48#include "sdram-micron-mt46h32m32lf-6.h" 48#include "sdram-micron-mt46h32m32lf-6.h"
49#include "mmc-twl4030.h" 49#include "mmc-twl4030.h"
50 50
@@ -482,8 +482,102 @@ static void __init cm_t35_map_io(void)
482 omap2_map_common_io(); 482 omap2_map_common_io();
483} 483}
484 484
485static struct omap_board_mux board_mux[] __initdata = {
486 /* nCS and IRQ for CM-T35 ethernet */
487 OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
488 OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
489
490 /* nCS and IRQ for SB-T35 ethernet */
491 OMAP3_MUX(GPMC_NCS4, OMAP_MUX_MODE0),
492 OMAP3_MUX(GPMC_WAIT3, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
493
494 /* PENDOWN GPIO */
495 OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
496
497 /* mUSB */
498 OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
499 OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
500 OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
501 OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
502 OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
503 OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
504 OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
505 OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
506 OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
507 OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
508 OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
509 OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
510
511 /* MMC 2 */
512 OMAP3_MUX(SDMMC2_DAT4, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
513 OMAP3_MUX(SDMMC2_DAT5, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
514 OMAP3_MUX(SDMMC2_DAT6, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
515 OMAP3_MUX(SDMMC2_DAT7, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
516
517 /* McSPI 1 */
518 OMAP3_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
519 OMAP3_MUX(MCSPI1_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
520 OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
521 OMAP3_MUX(MCSPI1_CS0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
522
523 /* McSPI 4 */
524 OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
525 OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
526 OMAP3_MUX(MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
527 OMAP3_MUX(MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP),
528
529 /* McBSP 2 */
530 OMAP3_MUX(MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
531 OMAP3_MUX(MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
532 OMAP3_MUX(MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
533 OMAP3_MUX(MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
534
535 /* serial ports */
536 OMAP3_MUX(MCBSP3_CLKX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
537 OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
538 OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
539 OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
540
541 /* DSS */
542 OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
543 OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
544 OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
545 OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
546 OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
547 OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
548 OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
549 OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
550 OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
551 OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
552 OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
553 OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
554 OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
555 OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
556 OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
557 OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
558 OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
559 OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
560 OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
561 OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
562 OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
563 OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
564 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
565 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
566 OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
567 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
568 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
569 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
570
571 /* TPS IRQ */
572 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_WAKEUP_EN | \
573 OMAP_PIN_INPUT_PULLUP),
574
575 { .reg_offset = OMAP_MUX_TERMINATOR },
576};
577
485static void __init cm_t35_init(void) 578static void __init cm_t35_init(void)
486{ 579{
580 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
487 omap_serial_init(); 581 omap_serial_init();
488 cm_t35_init_i2c(); 582 cm_t35_init_i2c();
489 cm_t35_init_nand(); 583 cm_t35_init_nand();
@@ -492,8 +586,6 @@ static void __init cm_t35_init(void)
492 cm_t35_init_led(); 586 cm_t35_init_led();
493 587
494 usb_musb_init(); 588 usb_musb_init();
495
496 omap_cfg_reg(AF26_34XX_SYS_NIRQ);
497} 589}
498 590
499MACHINE_START(CM_T35, "Compulab CM-T35") 591MACHINE_START(CM_T35, "Compulab CM-T35")
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index fa62e80c13b7..117b8fd7e3a6 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -19,7 +19,7 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20 20
21#include <linux/regulator/machine.h> 21#include <linux/regulator/machine.h>
22#include <linux/i2c/twl4030.h> 22#include <linux/i2c/twl.h>
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>
@@ -27,9 +27,9 @@
27#include <plat/board.h> 27#include <plat/board.h>
28#include <plat/common.h> 28#include <plat/common.h>
29#include <plat/gpmc.h> 29#include <plat/gpmc.h>
30#include <plat/mux.h>
31#include <plat/usb.h> 30#include <plat/usb.h>
32 31
32#include "mux.h"
33#include "mmc-twl4030.h" 33#include "mmc-twl4030.h"
34 34
35#define IGEP2_SMSC911X_CS 5 35#define IGEP2_SMSC911X_CS 5
@@ -203,8 +203,17 @@ static int __init igep2_i2c_init(void)
203 return 0; 203 return 0;
204} 204}
205 205
206#ifdef CONFIG_OMAP_MUX
207static struct omap_board_mux board_mux[] __initdata = {
208 { .reg_offset = OMAP_MUX_TERMINATOR },
209};
210#else
211#define board_mux NULL
212#endif
213
206static void __init igep2_init(void) 214static void __init igep2_init(void)
207{ 215{
216 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
208 igep2_i2c_init(); 217 igep2_i2c_init();
209 omap_serial_init(); 218 omap_serial_init();
210 usb_musb_init(); 219 usb_musb_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index c062238fe881..995d4a2b2dfd 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -24,7 +24,7 @@
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
26#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30 30
@@ -43,6 +43,7 @@
43#include <plat/control.h> 43#include <plat/control.h>
44#include <plat/usb.h> 44#include <plat/usb.h>
45 45
46#include "mux.h"
46#include "mmc-twl4030.h" 47#include "mmc-twl4030.h"
47 48
48#define LDP_SMSC911X_CS 1 49#define LDP_SMSC911X_CS 1
@@ -374,8 +375,17 @@ static struct platform_device *ldp_devices[] __initdata = {
374 &ldp_gpio_keys_device, 375 &ldp_gpio_keys_device,
375}; 376};
376 377
378#ifdef CONFIG_OMAP_MUX
379static struct omap_board_mux board_mux[] __initdata = {
380 { .reg_offset = OMAP_MUX_TERMINATOR },
381};
382#else
383#define board_mux NULL
384#endif
385
377static void __init omap_ldp_init(void) 386static void __init omap_ldp_init(void)
378{ 387{
388 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
379 omap_i2c_init(); 389 omap_i2c_init();
380 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); 390 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
381 ts_gpio = 54; 391 ts_gpio = 54;
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 41480bd0e58a..231cb4ec1847 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -29,7 +29,7 @@
29#include <linux/mtd/nand.h> 29#include <linux/mtd/nand.h>
30 30
31#include <linux/regulator/machine.h> 31#include <linux/regulator/machine.h>
32#include <linux/i2c/twl4030.h> 32#include <linux/i2c/twl.h>
33 33
34#include <mach/hardware.h> 34#include <mach/hardware.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -41,10 +41,10 @@
41#include <plat/common.h> 41#include <plat/common.h>
42#include <plat/gpmc.h> 42#include <plat/gpmc.h>
43#include <plat/nand.h> 43#include <plat/nand.h>
44#include <plat/mux.h>
45#include <plat/usb.h> 44#include <plat/usb.h>
46#include <plat/timer-gp.h> 45#include <plat/timer-gp.h>
47 46
47#include "mux.h"
48#include "mmc-twl4030.h" 48#include "mmc-twl4030.h"
49 49
50#define GPMC_CS0_BASE 0x60 50#define GPMC_CS0_BASE 0x60
@@ -140,10 +140,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
140 unsigned gpio, unsigned ngpio) 140 unsigned gpio, unsigned ngpio)
141{ 141{
142 if (system_rev >= 0x20 && system_rev <= 0x34301000) { 142 if (system_rev >= 0x20 && system_rev <= 0x34301000) {
143 omap_cfg_reg(AG9_34XX_GPIO23); 143 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
144 mmc[0].gpio_wp = 23; 144 mmc[0].gpio_wp = 23;
145 } else { 145 } else {
146 omap_cfg_reg(AH8_34XX_GPIO29); 146 omap_mux_init_gpio(29, OMAP_PIN_INPUT);
147 } 147 }
148 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 148 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
149 mmc[0].gpio_cd = gpio + 0; 149 mmc[0].gpio_cd = gpio + 0;
@@ -422,14 +422,23 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
422 .reset_gpio_port[2] = -EINVAL 422 .reset_gpio_port[2] = -EINVAL
423}; 423};
424 424
425#ifdef CONFIG_OMAP_MUX
426static struct omap_board_mux board_mux[] __initdata = {
427 { .reg_offset = OMAP_MUX_TERMINATOR },
428};
429#else
430#define board_mux NULL
431#endif
432
425static void __init omap3_beagle_init(void) 433static void __init omap3_beagle_init(void)
426{ 434{
435 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
427 omap3_beagle_i2c_init(); 436 omap3_beagle_i2c_init();
428 platform_add_devices(omap3_beagle_devices, 437 platform_add_devices(omap3_beagle_devices,
429 ARRAY_SIZE(omap3_beagle_devices)); 438 ARRAY_SIZE(omap3_beagle_devices));
430 omap_serial_init(); 439 omap_serial_init();
431 440
432 omap_cfg_reg(J25_34XX_GPIO170); 441 omap_mux_init_gpio(170, OMAP_PIN_INPUT);
433 gpio_request(170, "DVI_nPD"); 442 gpio_request(170, "DVI_nPD");
434 /* REVISIT leave DVI powered down until it's needed ... */ 443 /* REVISIT leave DVI powered down until it's needed ... */
435 gpio_direction_output(170, true); 444 gpio_direction_output(170, true);
@@ -439,8 +448,8 @@ static void __init omap3_beagle_init(void)
439 omap3beagle_flash_init(); 448 omap3beagle_flash_init();
440 449
441 /* Ensure SDRC pins are mux'd for self-refresh */ 450 /* Ensure SDRC pins are mux'd for self-refresh */
442 omap_cfg_reg(H16_34XX_SDRC_CKE0); 451 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
443 omap_cfg_reg(H17_34XX_SDRC_CKE1); 452 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
444} 453}
445 454
446static void __init omap3_beagle_map_io(void) 455static void __init omap3_beagle_map_io(void)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 5efc2e9068db..34de17851572 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -26,7 +26,7 @@
26 26
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/i2c/twl4030.h> 29#include <linux/i2c/twl.h>
30#include <linux/usb/otg.h> 30#include <linux/usb/otg.h>
31#include <linux/smsc911x.h> 31#include <linux/smsc911x.h>
32 32
@@ -38,11 +38,11 @@
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <plat/board.h> 40#include <plat/board.h>
41#include <plat/mux.h>
42#include <plat/usb.h> 41#include <plat/usb.h>
43#include <plat/common.h> 42#include <plat/common.h>
44#include <plat/mcspi.h> 43#include <plat/mcspi.h>
45 44
45#include "mux.h"
46#include "sdram-micron-mt46h32m32lf-6.h" 46#include "sdram-micron-mt46h32m32lf-6.h"
47#include "mmc-twl4030.h" 47#include "mmc-twl4030.h"
48 48
@@ -223,7 +223,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
223 unsigned gpio, unsigned ngpio) 223 unsigned gpio, unsigned ngpio)
224{ 224{
225 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 225 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
226 omap_cfg_reg(L8_34XX_GPIO63); 226 omap_mux_init_gpio(63, OMAP_PIN_INPUT);
227 mmc[0].gpio_cd = gpio + 0; 227 mmc[0].gpio_cd = gpio + 0;
228 twl4030_mmc_init(mmc); 228 twl4030_mmc_init(mmc);
229 229
@@ -422,9 +422,18 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
422 .reset_gpio_port[2] = -EINVAL 422 .reset_gpio_port[2] = -EINVAL
423}; 423};
424 424
425#ifdef CONFIG_OMAP_MUX
426static struct omap_board_mux board_mux[] __initdata = {
427 { .reg_offset = OMAP_MUX_TERMINATOR },
428};
429#else
430#define board_mux NULL
431#endif
432
425static void __init omap3_evm_init(void) 433static void __init omap3_evm_init(void)
426{ 434{
427 omap3_evm_get_revision(); 435 omap3_evm_get_revision();
436 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
428 437
429 omap3_evm_i2c_init(); 438 omap3_evm_i2c_init();
430 439
@@ -440,24 +449,24 @@ static void __init omap3_evm_init(void)
440#endif 449#endif
441 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { 450 if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
442 /* enable EHCI VBUS using GPIO22 */ 451 /* enable EHCI VBUS using GPIO22 */
443 omap_cfg_reg(AF9_34XX_GPIO22); 452 omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
444 gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS"); 453 gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
445 gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0); 454 gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
446 gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1); 455 gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);
447 456
448 /* Select EHCI port on main board */ 457 /* Select EHCI port on main board */
449 omap_cfg_reg(U3_34XX_GPIO61); 458 omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
450 gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port"); 459 gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
451 gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0); 460 gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
452 gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0); 461 gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);
453 462
454 /* setup EHCI phy reset config */ 463 /* setup EHCI phy reset config */
455 omap_cfg_reg(AH14_34XX_GPIO21); 464 omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
456 ehci_pdata.reset_gpio_port[1] = 21; 465 ehci_pdata.reset_gpio_port[1] = 21;
457 466
458 } else { 467 } else {
459 /* setup EHCI phy reset on MDC */ 468 /* setup EHCI phy reset on MDC */
460 omap_cfg_reg(AF4_34XX_GPIO135_OUT); 469 omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
461 ehci_pdata.reset_gpio_port[1] = 135; 470 ehci_pdata.reset_gpio_port[1] = 135;
462 } 471 }
463 usb_musb_init(); 472 usb_musb_init();
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 2db5ba5b3bf7..ef17cf1ab6d7 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -24,7 +24,7 @@
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
26#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
27#include <linux/i2c/twl4030.h> 27#include <linux/i2c/twl.h>
28#include <linux/leds.h> 28#include <linux/leds.h>
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/input/matrix_keypad.h> 30#include <linux/input/matrix_keypad.h>
@@ -40,8 +40,8 @@
40#include <mach/hardware.h> 40#include <mach/hardware.h>
41#include <plat/mcspi.h> 41#include <plat/mcspi.h>
42#include <plat/usb.h> 42#include <plat/usb.h>
43#include <plat/mux.h>
44 43
44#include "mux.h"
45#include "sdram-micron-mt46h32m32lf-6.h" 45#include "sdram-micron-mt46h32m32lf-6.h"
46#include "mmc-twl4030.h" 46#include "mmc-twl4030.h"
47 47
@@ -98,10 +98,10 @@ static struct gpio_keys_button pandora_gpio_keys[] = {
98 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"), 98 GPIO_BUTTON_LOW(103, KEY_DOWN, "down"),
99 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"), 99 GPIO_BUTTON_LOW(96, KEY_LEFT, "left"),
100 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"), 100 GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"),
101 GPIO_BUTTON_LOW(111, BTN_A, "a"), 101 GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"),
102 GPIO_BUTTON_LOW(106, BTN_B, "b"), 102 GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"),
103 GPIO_BUTTON_LOW(109, BTN_X, "x"), 103 GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"),
104 GPIO_BUTTON_LOW(101, BTN_Y, "y"), 104 GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"),
105 GPIO_BUTTON_LOW(102, BTN_TL, "l"), 105 GPIO_BUTTON_LOW(102, BTN_TL, "l"),
106 GPIO_BUTTON_LOW(97, BTN_TL2, "l2"), 106 GPIO_BUTTON_LOW(97, BTN_TL2, "l2"),
107 GPIO_BUTTON_LOW(105, BTN_TR, "r"), 107 GPIO_BUTTON_LOW(105, BTN_TR, "r"),
@@ -315,7 +315,7 @@ static int __init omap3pandora_i2c_init(void)
315 omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo, 315 omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo,
316 ARRAY_SIZE(omap3pandora_i2c_boardinfo)); 316 ARRAY_SIZE(omap3pandora_i2c_boardinfo));
317 /* i2c2 pins are not connected */ 317 /* i2c2 pins are not connected */
318 omap_register_i2c_bus(3, 400, NULL, 0); 318 omap_register_i2c_bus(3, 100, NULL, 0);
319 return 0; 319 return 0;
320} 320}
321 321
@@ -368,23 +368,8 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
368 } 368 }
369}; 369};
370 370
371static struct platform_device omap3pandora_lcd_device = {
372 .name = "pandora_lcd",
373 .id = -1,
374};
375
376static struct omap_lcd_config omap3pandora_lcd_config __initdata = {
377 .ctrl_name = "internal",
378};
379
380static struct omap_board_config_kernel omap3pandora_config[] __initdata = {
381 { OMAP_TAG_LCD, &omap3pandora_lcd_config },
382};
383
384static void __init omap3pandora_init_irq(void) 371static void __init omap3pandora_init_irq(void)
385{ 372{
386 omap_board_config = omap3pandora_config;
387 omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
388 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 373 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
389 mt46h32m32lf6_sdrc_params); 374 mt46h32m32lf6_sdrc_params);
390 omap_init_irq(); 375 omap_init_irq();
@@ -392,7 +377,6 @@ static void __init omap3pandora_init_irq(void)
392} 377}
393 378
394static struct platform_device *omap3pandora_devices[] __initdata = { 379static struct platform_device *omap3pandora_devices[] __initdata = {
395 &omap3pandora_lcd_device,
396 &pandora_leds_gpio, 380 &pandora_leds_gpio,
397 &pandora_keys_gpio, 381 &pandora_keys_gpio,
398}; 382};
@@ -409,8 +393,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
409 .reset_gpio_port[2] = -EINVAL 393 .reset_gpio_port[2] = -EINVAL
410}; 394};
411 395
396#ifdef CONFIG_OMAP_MUX
397static struct omap_board_mux board_mux[] __initdata = {
398 { .reg_offset = OMAP_MUX_TERMINATOR },
399};
400#else
401#define board_mux NULL
402#endif
403
412static void __init omap3pandora_init(void) 404static void __init omap3pandora_init(void)
413{ 405{
406 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
414 omap3pandora_i2c_init(); 407 omap3pandora_i2c_init();
415 platform_add_devices(omap3pandora_devices, 408 platform_add_devices(omap3pandora_devices,
416 ARRAY_SIZE(omap3pandora_devices)); 409 ARRAY_SIZE(omap3pandora_devices));
@@ -423,8 +416,8 @@ static void __init omap3pandora_init(void)
423 usb_musb_init(); 416 usb_musb_init();
424 417
425 /* Ensure SDRC pins are mux'd for self-refresh */ 418 /* Ensure SDRC pins are mux'd for self-refresh */
426 omap_cfg_reg(H16_34XX_SDRC_CKE0); 419 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
427 omap_cfg_reg(H17_34XX_SDRC_CKE1); 420 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
428} 421}
429 422
430static void __init omap3pandora_map_io(void) 423static void __init omap3pandora_map_io(void)
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
new file mode 100644
index 000000000000..fe3d22cb2457
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -0,0 +1,572 @@
1/*
2 * linux/arch/arm/mach-omap2/board-omap3touchbook.c
3 *
4 * Copyright (C) 2009 Always Innovating
5 *
6 * Modified from mach-omap2/board-omap3beagleboard.c
7 *
8 * Initial code: Grégoire Gentil, Tim Yamin
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/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/delay.h>
19#include <linux/err.h>
20#include <linux/clk.h>
21#include <linux/io.h>
22#include <linux/leds.h>
23#include <linux/gpio.h>
24#include <linux/input.h>
25#include <linux/gpio_keys.h>
26
27#include <linux/mtd/mtd.h>
28#include <linux/mtd/partitions.h>
29#include <linux/mtd/nand.h>
30
31#include <plat/mcspi.h>
32#include <linux/spi/spi.h>
33
34#include <linux/spi/ads7846.h>
35
36#include <linux/regulator/machine.h>
37#include <linux/i2c/twl.h>
38
39#include <mach/hardware.h>
40#include <asm/mach-types.h>
41#include <asm/mach/arch.h>
42#include <asm/mach/map.h>
43#include <asm/mach/flash.h>
44
45#include <plat/board.h>
46#include <plat/common.h>
47#include <plat/gpmc.h>
48#include <plat/nand.h>
49#include <plat/usb.h>
50#include <plat/timer-gp.h>
51
52#include "mux.h"
53#include "mmc-twl4030.h"
54
55#include <asm/setup.h>
56
57#define GPMC_CS0_BASE 0x60
58#define GPMC_CS_SIZE 0x30
59
60#define NAND_BLOCK_SIZE SZ_128K
61
62#define OMAP3_AC_GPIO 136
63#define OMAP3_TS_GPIO 162
64#define TB_BL_PWM_TIMER 9
65#define TB_KILL_POWER_GPIO 168
66
67unsigned long touchbook_revision;
68
69static struct mtd_partition omap3touchbook_nand_partitions[] = {
70 /* All the partition sizes are listed in terms of NAND block size */
71 {
72 .name = "X-Loader",
73 .offset = 0,
74 .size = 4 * NAND_BLOCK_SIZE,
75 .mask_flags = MTD_WRITEABLE, /* force read-only */
76 },
77 {
78 .name = "U-Boot",
79 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
80 .size = 15 * NAND_BLOCK_SIZE,
81 .mask_flags = MTD_WRITEABLE, /* force read-only */
82 },
83 {
84 .name = "U-Boot Env",
85 .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
86 .size = 1 * NAND_BLOCK_SIZE,
87 },
88 {
89 .name = "Kernel",
90 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
91 .size = 32 * NAND_BLOCK_SIZE,
92 },
93 {
94 .name = "File System",
95 .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
96 .size = MTDPART_SIZ_FULL,
97 },
98};
99
100static struct omap_nand_platform_data omap3touchbook_nand_data = {
101 .options = NAND_BUSWIDTH_16,
102 .parts = omap3touchbook_nand_partitions,
103 .nr_parts = ARRAY_SIZE(omap3touchbook_nand_partitions),
104 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
105 .nand_setup = NULL,
106 .dev_ready = NULL,
107};
108
109static struct resource omap3touchbook_nand_resource = {
110 .flags = IORESOURCE_MEM,
111};
112
113static struct platform_device omap3touchbook_nand_device = {
114 .name = "omap2-nand",
115 .id = -1,
116 .dev = {
117 .platform_data = &omap3touchbook_nand_data,
118 },
119 .num_resources = 1,
120 .resource = &omap3touchbook_nand_resource,
121};
122
123#include "sdram-micron-mt46h32m32lf-6.h"
124
125static struct twl4030_hsmmc_info mmc[] = {
126 {
127 .mmc = 1,
128 .wires = 8,
129 .gpio_wp = 29,
130 },
131 {} /* Terminator */
132};
133
134static struct platform_device omap3_touchbook_lcd_device = {
135 .name = "omap3touchbook_lcd",
136 .id = -1,
137};
138
139static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
140 .ctrl_name = "internal",
141};
142
143static struct regulator_consumer_supply touchbook_vmmc1_supply = {
144 .supply = "vmmc",
145};
146
147static struct regulator_consumer_supply touchbook_vsim_supply = {
148 .supply = "vmmc_aux",
149};
150
151static struct gpio_led gpio_leds[];
152
153static int touchbook_twl_gpio_setup(struct device *dev,
154 unsigned gpio, unsigned ngpio)
155{
156 if (system_rev >= 0x20 && system_rev <= 0x34301000) {
157 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
158 mmc[0].gpio_wp = 23;
159 } else {
160 omap_mux_init_gpio(29, OMAP_PIN_INPUT);
161 }
162 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
163 mmc[0].gpio_cd = gpio + 0;
164 twl4030_mmc_init(mmc);
165
166 /* link regulators to MMC adapters */
167 touchbook_vmmc1_supply.dev = mmc[0].dev;
168 touchbook_vsim_supply.dev = mmc[0].dev;
169
170 /* REVISIT: need ehci-omap hooks for external VBUS
171 * power switch and overcurrent detect
172 */
173
174 gpio_request(gpio + 1, "EHCI_nOC");
175 gpio_direction_input(gpio + 1);
176
177 /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
178 gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
179 gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
180
181 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
182 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
183
184 return 0;
185}
186
187static struct twl4030_gpio_platform_data touchbook_gpio_data = {
188 .gpio_base = OMAP_MAX_GPIO_LINES,
189 .irq_base = TWL4030_GPIO_IRQ_BASE,
190 .irq_end = TWL4030_GPIO_IRQ_END,
191 .use_leds = true,
192 .pullups = BIT(1),
193 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
194 | BIT(15) | BIT(16) | BIT(17),
195 .setup = touchbook_twl_gpio_setup,
196};
197
198static struct regulator_consumer_supply touchbook_vdac_supply = {
199 .supply = "vdac",
200 .dev = &omap3_touchbook_lcd_device.dev,
201};
202
203static struct regulator_consumer_supply touchbook_vdvi_supply = {
204 .supply = "vdvi",
205 .dev = &omap3_touchbook_lcd_device.dev,
206};
207
208/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
209static struct regulator_init_data touchbook_vmmc1 = {
210 .constraints = {
211 .min_uV = 1850000,
212 .max_uV = 3150000,
213 .valid_modes_mask = REGULATOR_MODE_NORMAL
214 | REGULATOR_MODE_STANDBY,
215 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
216 | REGULATOR_CHANGE_MODE
217 | REGULATOR_CHANGE_STATUS,
218 },
219 .num_consumer_supplies = 1,
220 .consumer_supplies = &touchbook_vmmc1_supply,
221};
222
223/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
224static struct regulator_init_data touchbook_vsim = {
225 .constraints = {
226 .min_uV = 1800000,
227 .max_uV = 3000000,
228 .valid_modes_mask = REGULATOR_MODE_NORMAL
229 | REGULATOR_MODE_STANDBY,
230 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
231 | REGULATOR_CHANGE_MODE
232 | REGULATOR_CHANGE_STATUS,
233 },
234 .num_consumer_supplies = 1,
235 .consumer_supplies = &touchbook_vsim_supply,
236};
237
238/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
239static struct regulator_init_data touchbook_vdac = {
240 .constraints = {
241 .min_uV = 1800000,
242 .max_uV = 1800000,
243 .valid_modes_mask = REGULATOR_MODE_NORMAL
244 | REGULATOR_MODE_STANDBY,
245 .valid_ops_mask = REGULATOR_CHANGE_MODE
246 | REGULATOR_CHANGE_STATUS,
247 },
248 .num_consumer_supplies = 1,
249 .consumer_supplies = &touchbook_vdac_supply,
250};
251
252/* VPLL2 for digital video outputs */
253static struct regulator_init_data touchbook_vpll2 = {
254 .constraints = {
255 .name = "VDVI",
256 .min_uV = 1800000,
257 .max_uV = 1800000,
258 .valid_modes_mask = REGULATOR_MODE_NORMAL
259 | REGULATOR_MODE_STANDBY,
260 .valid_ops_mask = REGULATOR_CHANGE_MODE
261 | REGULATOR_CHANGE_STATUS,
262 },
263 .num_consumer_supplies = 1,
264 .consumer_supplies = &touchbook_vdvi_supply,
265};
266
267static struct twl4030_usb_data touchbook_usb_data = {
268 .usb_mode = T2_USB_MODE_ULPI,
269};
270
271static struct twl4030_codec_audio_data touchbook_audio_data = {
272 .audio_mclk = 26000000,
273};
274
275static struct twl4030_codec_data touchbook_codec_data = {
276 .audio_mclk = 26000000,
277 .audio = &touchbook_audio_data,
278};
279
280static struct twl4030_platform_data touchbook_twldata = {
281 .irq_base = TWL4030_IRQ_BASE,
282 .irq_end = TWL4030_IRQ_END,
283
284 /* platform_data for children goes here */
285 .usb = &touchbook_usb_data,
286 .gpio = &touchbook_gpio_data,
287 .codec = &touchbook_codec_data,
288 .vmmc1 = &touchbook_vmmc1,
289 .vsim = &touchbook_vsim,
290 .vdac = &touchbook_vdac,
291 .vpll2 = &touchbook_vpll2,
292};
293
294static struct i2c_board_info __initdata touchbook_i2c_boardinfo[] = {
295 {
296 I2C_BOARD_INFO("twl4030", 0x48),
297 .flags = I2C_CLIENT_WAKE,
298 .irq = INT_34XX_SYS_NIRQ,
299 .platform_data = &touchbook_twldata,
300 },
301};
302
303static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
304 {
305 I2C_BOARD_INFO("bq27200", 0x55),
306 },
307};
308
309static int __init omap3_touchbook_i2c_init(void)
310{
311 /* Standard TouchBook bus */
312 omap_register_i2c_bus(1, 2600, touchbook_i2c_boardinfo,
313 ARRAY_SIZE(touchbook_i2c_boardinfo));
314
315 /* Additional TouchBook bus */
316 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
317 ARRAY_SIZE(touchBook_i2c_boardinfo));
318
319 return 0;
320}
321
322static void __init omap3_ads7846_init(void)
323{
324 if (gpio_request(OMAP3_TS_GPIO, "ads7846_pen_down")) {
325 printk(KERN_ERR "Failed to request GPIO %d for "
326 "ads7846 pen down IRQ\n", OMAP3_TS_GPIO);
327 return;
328 }
329
330 gpio_direction_input(OMAP3_TS_GPIO);
331 omap_set_gpio_debounce(OMAP3_TS_GPIO, 1);
332 omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa);
333}
334
335static struct ads7846_platform_data ads7846_config = {
336 .x_min = 100,
337 .y_min = 265,
338 .x_max = 3950,
339 .y_max = 3750,
340 .x_plate_ohms = 40,
341 .pressure_max = 255,
342 .debounce_max = 10,
343 .debounce_tol = 5,
344 .debounce_rep = 1,
345 .gpio_pendown = OMAP3_TS_GPIO,
346 .keep_vref_on = 1,
347};
348
349static struct omap2_mcspi_device_config ads7846_mcspi_config = {
350 .turbo_mode = 0,
351 .single_channel = 1, /* 0: slave, 1: master */
352};
353
354static struct spi_board_info omap3_ads7846_spi_board_info[] __initdata = {
355 {
356 .modalias = "ads7846",
357 .bus_num = 4,
358 .chip_select = 0,
359 .max_speed_hz = 1500000,
360 .controller_data = &ads7846_mcspi_config,
361 .irq = OMAP_GPIO_IRQ(OMAP3_TS_GPIO),
362 .platform_data = &ads7846_config,
363 }
364};
365
366static struct gpio_led gpio_leds[] = {
367 {
368 .name = "touchbook::usr0",
369 .default_trigger = "heartbeat",
370 .gpio = 150,
371 },
372 {
373 .name = "touchbook::usr1",
374 .default_trigger = "mmc0",
375 .gpio = 149,
376 },
377 {
378 .name = "touchbook::pmu_stat",
379 .gpio = -EINVAL, /* gets replaced */
380 .active_low = true,
381 },
382};
383
384static struct gpio_led_platform_data gpio_led_info = {
385 .leds = gpio_leds,
386 .num_leds = ARRAY_SIZE(gpio_leds),
387};
388
389static struct platform_device leds_gpio = {
390 .name = "leds-gpio",
391 .id = -1,
392 .dev = {
393 .platform_data = &gpio_led_info,
394 },
395};
396
397static struct gpio_keys_button gpio_buttons[] = {
398 {
399 .code = BTN_EXTRA,
400 .gpio = 7,
401 .desc = "user",
402 .wakeup = 1,
403 },
404 {
405 .code = KEY_POWER,
406 .gpio = 183,
407 .desc = "power",
408 .wakeup = 1,
409 },
410};
411
412static struct gpio_keys_platform_data gpio_key_info = {
413 .buttons = gpio_buttons,
414 .nbuttons = ARRAY_SIZE(gpio_buttons),
415};
416
417static struct platform_device keys_gpio = {
418 .name = "gpio-keys",
419 .id = -1,
420 .dev = {
421 .platform_data = &gpio_key_info,
422 },
423};
424
425static struct omap_board_config_kernel omap3_touchbook_config[] __initdata = {
426 { OMAP_TAG_LCD, &omap3_touchbook_lcd_config },
427};
428
429#ifdef CONFIG_OMAP_MUX
430static struct omap_board_mux board_mux[] __initdata = {
431 { .reg_offset = OMAP_MUX_TERMINATOR },
432};
433#else
434#define board_mux NULL
435#endif
436
437static void __init omap3_touchbook_init_irq(void)
438{
439 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
440 omap_board_config = omap3_touchbook_config;
441 omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
442 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
443 mt46h32m32lf6_sdrc_params);
444 omap_init_irq();
445#ifdef CONFIG_OMAP_32K_TIMER
446 omap2_gp_clockevent_set_gptimer(12);
447#endif
448 omap_gpio_init();
449}
450
451static struct platform_device *omap3_touchbook_devices[] __initdata = {
452 &omap3_touchbook_lcd_device,
453 &leds_gpio,
454 &keys_gpio,
455};
456
457static void __init omap3touchbook_flash_init(void)
458{
459 u8 cs = 0;
460 u8 nandcs = GPMC_CS_NUM + 1;
461
462 u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
463
464 /* find out the chip-select on which NAND exists */
465 while (cs < GPMC_CS_NUM) {
466 u32 ret = 0;
467 ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
468
469 if ((ret & 0xC00) == 0x800) {
470 printk(KERN_INFO "Found NAND on CS%d\n", cs);
471 if (nandcs > GPMC_CS_NUM)
472 nandcs = cs;
473 }
474 cs++;
475 }
476
477 if (nandcs > GPMC_CS_NUM) {
478 printk(KERN_INFO "NAND: Unable to find configuration "
479 "in GPMC\n ");
480 return;
481 }
482
483 if (nandcs < GPMC_CS_NUM) {
484 omap3touchbook_nand_data.cs = nandcs;
485 omap3touchbook_nand_data.gpmc_cs_baseaddr = (void *)
486 (gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
487 omap3touchbook_nand_data.gpmc_baseaddr =
488 (void *) (gpmc_base_add);
489
490 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
491 if (platform_device_register(&omap3touchbook_nand_device) < 0)
492 printk(KERN_ERR "Unable to register NAND device\n");
493 }
494}
495
496static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
497
498 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
499 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
500 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
501
502 .phy_reset = true,
503 .reset_gpio_port[0] = -EINVAL,
504 .reset_gpio_port[1] = 147,
505 .reset_gpio_port[2] = -EINVAL
506};
507
508static void omap3_touchbook_poweroff(void)
509{
510 int r;
511
512 r = gpio_request(TB_KILL_POWER_GPIO, "DVI reset");
513 if (r < 0) {
514 printk(KERN_ERR "Unable to get kill power GPIO\n");
515 return;
516 }
517
518 gpio_direction_output(TB_KILL_POWER_GPIO, 0);
519}
520
521static void __init early_touchbook_revision(char **p)
522{
523 if (!*p)
524 return;
525
526 strict_strtoul(*p, 10, &touchbook_revision);
527}
528__early_param("tbr=", early_touchbook_revision);
529
530static void __init omap3_touchbook_init(void)
531{
532 pm_power_off = omap3_touchbook_poweroff;
533
534 omap3_touchbook_i2c_init();
535 platform_add_devices(omap3_touchbook_devices,
536 ARRAY_SIZE(omap3_touchbook_devices));
537 omap_serial_init();
538
539 omap_mux_init_gpio(170, OMAP_PIN_INPUT);
540 gpio_request(176, "DVI_nPD");
541 /* REVISIT leave DVI powered down until it's needed ... */
542 gpio_direction_output(176, true);
543
544 /* Touchscreen and accelerometer */
545 spi_register_board_info(omap3_ads7846_spi_board_info,
546 ARRAY_SIZE(omap3_ads7846_spi_board_info));
547 omap3_ads7846_init();
548 usb_musb_init();
549 usb_ehci_init(&ehci_pdata);
550 omap3touchbook_flash_init();
551
552 /* Ensure SDRC pins are mux'd for self-refresh */
553 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
554 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
555}
556
557static void __init omap3_touchbook_map_io(void)
558{
559 omap2_set_globals_343x();
560 omap2_map_common_io();
561}
562
563MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
564 /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
565 .phys_io = 0x48000000,
566 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
567 .boot_params = 0x80000100,
568 .map_io = omap3_touchbook_map_io,
569 .init_irq = omap3_touchbook_init_irq,
570 .init_machine = omap3_touchbook_init,
571 .timer = &omap_timer,
572MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 52dfd51a938e..d192dd98a591 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -26,7 +26,7 @@
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/i2c/twl4030.h> 29#include <linux/i2c/twl.h>
30#include <linux/regulator/machine.h> 30#include <linux/regulator/machine.h>
31 31
32#include <linux/mtd/mtd.h> 32#include <linux/mtd/mtd.h>
@@ -44,9 +44,9 @@
44#include <plat/gpmc.h> 44#include <plat/gpmc.h>
45#include <mach/hardware.h> 45#include <mach/hardware.h>
46#include <plat/nand.h> 46#include <plat/nand.h>
47#include <plat/mux.h>
48#include <plat/usb.h> 47#include <plat/usb.h>
49 48
49#include "mux.h"
50#include "sdram-micron-mt46h32m32lf-6.h" 50#include "sdram-micron-mt46h32m32lf-6.h"
51#include "mmc-twl4030.h" 51#include "mmc-twl4030.h"
52 52
@@ -405,9 +405,17 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
405 .reset_gpio_port[2] = -EINVAL 405 .reset_gpio_port[2] = -EINVAL
406}; 406};
407 407
408#ifdef CONFIG_OMAP_MUX
409static struct omap_board_mux board_mux[] __initdata = {
410 { .reg_offset = OMAP_MUX_TERMINATOR },
411};
412#else
413#define board_mux NULL
414#endif
408 415
409static void __init overo_init(void) 416static void __init overo_init(void)
410{ 417{
418 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
411 overo_i2c_init(); 419 overo_i2c_init();
412 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); 420 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
413 omap_serial_init(); 421 omap_serial_init();
@@ -418,8 +426,8 @@ static void __init overo_init(void)
418 overo_init_smsc911x(); 426 overo_init_smsc911x();
419 427
420 /* Ensure SDRC pins are mux'd for self-refresh */ 428 /* Ensure SDRC pins are mux'd for self-refresh */
421 omap_cfg_reg(H16_34XX_SDRC_CKE0); 429 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
422 omap_cfg_reg(H17_34XX_SDRC_CKE1); 430 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
423 431
424 if ((gpio_request(OVERO_GPIO_W2W_NRESET, 432 if ((gpio_request(OVERO_GPIO_W2W_NRESET,
425 "OVERO_GPIO_W2W_NRESET") == 0) && 433 "OVERO_GPIO_W2W_NRESET") == 0) &&
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 15ce6514c5fd..acafdbc8aa16 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -16,7 +16,7 @@
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <linux/spi/wl12xx.h> 17#include <linux/spi/wl12xx.h>
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/i2c/twl4030.h> 19#include <linux/i2c/twl.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/regulator/machine.h> 22#include <linux/regulator/machine.h>
@@ -33,6 +33,7 @@
33#include <plat/onenand.h> 33#include <plat/onenand.h>
34#include <plat/gpmc-smc91x.h> 34#include <plat/gpmc-smc91x.h>
35 35
36#include "mux.h"
36#include "mmc-twl4030.h" 37#include "mmc-twl4030.h"
37 38
38#define SYSTEM_REV_B_USES_VAUX3 0x1699 39#define SYSTEM_REV_B_USES_VAUX3 0x1699
@@ -59,7 +60,7 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
59 .bus_num = 4, 60 .bus_num = 4,
60 .chip_select = 0, 61 .chip_select = 0,
61 .max_speed_hz = 48000000, 62 .max_speed_hz = 48000000,
62 .mode = SPI_MODE_2, 63 .mode = SPI_MODE_3,
63 .controller_data = &wl1251_mcspi_config, 64 .controller_data = &wl1251_mcspi_config,
64 .platform_data = &wl1251_pdata, 65 .platform_data = &wl1251_pdata,
65 }, 66 },
@@ -401,15 +402,9 @@ static struct twl4030_usb_data rx51_usb_data = {
401 402
402static struct twl4030_ins sleep_on_seq[] __initdata = { 403static struct twl4030_ins sleep_on_seq[] __initdata = {
403/* 404/*
404 * Turn off VDD1 and VDD2. 405 * Turn off everything
405 */ 406 */
406 {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4}, 407 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 1, 0, RES_STATE_SLEEP), 2},
407 {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
408/*
409 * And also turn off the OMAP3 PLLs and the sysclk output.
410 */
411 {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
412 {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_OFF), 3},
413}; 408};
414 409
415static struct twl4030_script sleep_on_script __initdata = { 410static struct twl4030_script sleep_on_script __initdata = {
@@ -420,14 +415,9 @@ static struct twl4030_script sleep_on_script __initdata = {
420 415
421static struct twl4030_ins wakeup_seq[] __initdata = { 416static struct twl4030_ins wakeup_seq[] __initdata = {
422/* 417/*
423 * Reenable the OMAP3 PLLs. 418 * Reenable everything
424 * Wakeup VDD1 and VDD2.
425 * Reenable sysclk output.
426 */ 419 */
427 {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30}, 420 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 1, 0, RES_STATE_ACTIVE), 2},
428 {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
429 {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
430 {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3},
431}; 421};
432 422
433static struct twl4030_script wakeup_script __initdata = { 423static struct twl4030_script wakeup_script __initdata = {
@@ -438,10 +428,9 @@ static struct twl4030_script wakeup_script __initdata = {
438 428
439static struct twl4030_ins wakeup_p3_seq[] __initdata = { 429static struct twl4030_ins wakeup_p3_seq[] __initdata = {
440/* 430/*
441 * Wakeup VDD1 (dummy to be able to insert a delay) 431 * Reenable everything
442 * Enable CLKEN
443 */ 432 */
444 {MSG_SINGULAR(DEV_GRP_P1, 0x17, RES_STATE_ACTIVE), 3}, 433 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 1, 0, RES_STATE_ACTIVE), 2},
445}; 434};
446 435
447static struct twl4030_script wakeup_p3_script __initdata = { 436static struct twl4030_script wakeup_p3_script __initdata = {
@@ -462,12 +451,11 @@ static struct twl4030_ins wrst_seq[] __initdata = {
462 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_OFF), 2}, 451 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_OFF), 2},
463 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 0, 1, RES_STATE_ACTIVE), 452 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, 0, 1, RES_STATE_ACTIVE),
464 0x13}, 453 0x13},
465 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 2, RES_STATE_WRST), 0x13},
466 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 3, RES_STATE_OFF), 0x13}, 454 {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_PP, 0, 3, RES_STATE_OFF), 0x13},
467 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD1, RES_STATE_WRST), 0x13}, 455 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD1, RES_STATE_WRST), 0x13},
468 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD2, RES_STATE_WRST), 0x13}, 456 {MSG_SINGULAR(DEV_GRP_NULL, RES_VDD2, RES_STATE_WRST), 0x13},
469 {MSG_SINGULAR(DEV_GRP_NULL, RES_VPLL1, RES_STATE_WRST), 0x35}, 457 {MSG_SINGULAR(DEV_GRP_NULL, RES_VPLL1, RES_STATE_WRST), 0x35},
470 {MSG_SINGULAR(DEV_GRP_P1, RES_HFCLKOUT, RES_STATE_ACTIVE), 2}, 458 {MSG_SINGULAR(DEV_GRP_P3, RES_HFCLKOUT, RES_STATE_ACTIVE), 2},
471 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_ACTIVE), 2}, 459 {MSG_SINGULAR(DEV_GRP_NULL, RES_RESET, RES_STATE_ACTIVE), 2},
472}; 460};
473 461
@@ -489,22 +477,81 @@ static struct twl4030_script *twl4030_scripts[] __initdata = {
489}; 477};
490 478
491static struct twl4030_resconfig twl4030_rconfig[] __initdata = { 479static struct twl4030_resconfig twl4030_rconfig[] __initdata = {
492 { .resource = RES_VINTANA1, .devgroup = -1, .type = -1, .type2 = 1 }, 480 { .resource = RES_VDD1, .devgroup = -1,
493 { .resource = RES_VINTANA2, .devgroup = -1, .type = -1, .type2 = 1 }, 481 .type = 1, .type2 = -1, .remap_off = RES_STATE_OFF,
494 { .resource = RES_VINTDIG, .devgroup = -1, .type = -1, .type2 = 1 }, 482 .remap_sleep = RES_STATE_OFF
495 { .resource = RES_VMMC1, .devgroup = -1, .type = -1, .type2 = 3}, 483 },
496 { .resource = RES_VMMC2, .devgroup = DEV_GRP_NULL, .type = -1, 484 { .resource = RES_VDD2, .devgroup = -1,
497 .type2 = 3}, 485 .type = 1, .type2 = -1, .remap_off = RES_STATE_OFF,
498 { .resource = RES_VAUX1, .devgroup = -1, .type = -1, .type2 = 3}, 486 .remap_sleep = RES_STATE_OFF
499 { .resource = RES_VAUX2, .devgroup = -1, .type = -1, .type2 = 3}, 487 },
500 { .resource = RES_VAUX3, .devgroup = -1, .type = -1, .type2 = 3}, 488 { .resource = RES_VPLL1, .devgroup = -1,
501 { .resource = RES_VAUX4, .devgroup = -1, .type = -1, .type2 = 3}, 489 .type = 1, .type2 = -1, .remap_off = RES_STATE_OFF,
502 { .resource = RES_VPLL2, .devgroup = -1, .type = -1, .type2 = 3}, 490 .remap_sleep = RES_STATE_OFF
503 { .resource = RES_VDAC, .devgroup = -1, .type = -1, .type2 = 3}, 491 },
504 { .resource = RES_VSIM, .devgroup = DEV_GRP_NULL, .type = -1, 492 { .resource = RES_VPLL2, .devgroup = -1,
505 .type2 = 3}, 493 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
506 { .resource = RES_CLKEN, .devgroup = DEV_GRP_P3, .type = -1, 494 },
507 .type2 = 1 }, 495 { .resource = RES_VAUX1, .devgroup = -1,
496 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
497 },
498 { .resource = RES_VAUX2, .devgroup = -1,
499 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
500 },
501 { .resource = RES_VAUX3, .devgroup = -1,
502 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
503 },
504 { .resource = RES_VAUX4, .devgroup = -1,
505 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
506 },
507 { .resource = RES_VMMC1, .devgroup = -1,
508 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
509 },
510 { .resource = RES_VMMC2, .devgroup = -1,
511 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
512 },
513 { .resource = RES_VDAC, .devgroup = -1,
514 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
515 },
516 { .resource = RES_VSIM, .devgroup = -1,
517 .type = -1, .type2 = 3, .remap_off = -1, .remap_sleep = -1
518 },
519 { .resource = RES_VINTANA1, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
520 .type = -1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
521 },
522 { .resource = RES_VINTANA2, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
523 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
524 },
525 { .resource = RES_VINTDIG, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
526 .type = -1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
527 },
528 { .resource = RES_VIO, .devgroup = DEV_GRP_P3,
529 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
530 },
531 { .resource = RES_CLKEN, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
532 .type = 1, .type2 = -1 , .remap_off = -1, .remap_sleep = -1
533 },
534 { .resource = RES_REGEN, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
535 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
536 },
537 { .resource = RES_NRES_PWRON, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
538 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
539 },
540 { .resource = RES_SYSEN, .devgroup = DEV_GRP_P1 | DEV_GRP_P3,
541 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
542 },
543 { .resource = RES_HFCLKOUT, .devgroup = DEV_GRP_P3,
544 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
545 },
546 { .resource = RES_32KCLKOUT, .devgroup = -1,
547 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
548 },
549 { .resource = RES_RESET, .devgroup = -1,
550 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
551 },
552 { .resource = RES_Main_Ref, .devgroup = -1,
553 .type = 1, .type2 = -1, .remap_off = -1, .remap_sleep = -1
554 },
508 { 0, 0}, 555 { 0, 0},
509}; 556};
510 557
@@ -630,9 +677,9 @@ static struct omap_smc91x_platform_data board_smc91x_data = {
630 677
631static void __init board_smc91x_init(void) 678static void __init board_smc91x_init(void)
632{ 679{
633 omap_cfg_reg(U8_34XX_GPIO54_DOWN); 680 omap_mux_init_gpio(54, OMAP_PIN_INPUT_PULLDOWN);
634 omap_cfg_reg(G25_34XX_GPIO86_OUT); 681 omap_mux_init_gpio(86, OMAP_PIN_OUTPUT);
635 omap_cfg_reg(H19_34XX_GPIO164_OUT); 682 omap_mux_init_gpio(164, OMAP_PIN_OUTPUT);
636 683
637 gpmc_smc91x_init(&board_smc91x_data); 684 gpmc_smc91x_init(&board_smc91x_data);
638} 685}
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 1bb1de245917..67bb3476b707 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -23,13 +23,14 @@
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <plat/mcspi.h> 25#include <plat/mcspi.h>
26#include <plat/mux.h>
27#include <plat/board.h> 26#include <plat/board.h>
28#include <plat/common.h> 27#include <plat/common.h>
29#include <plat/dma.h> 28#include <plat/dma.h>
30#include <plat/gpmc.h> 29#include <plat/gpmc.h>
31#include <plat/usb.h> 30#include <plat/usb.h>
32 31
32#include "mux.h"
33
33struct omap_sdrc_params *rx51_get_sdram_timings(void); 34struct omap_sdrc_params *rx51_get_sdram_timings(void);
34 35
35static struct omap_lcd_config rx51_lcd_config = { 36static struct omap_lcd_config rx51_lcd_config = {
@@ -69,15 +70,24 @@ static void __init rx51_init_irq(void)
69 70
70extern void __init rx51_peripherals_init(void); 71extern void __init rx51_peripherals_init(void);
71 72
73#ifdef CONFIG_OMAP_MUX
74static struct omap_board_mux board_mux[] __initdata = {
75 { .reg_offset = OMAP_MUX_TERMINATOR },
76};
77#else
78#define board_mux NULL
79#endif
80
72static void __init rx51_init(void) 81static void __init rx51_init(void)
73{ 82{
83 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
74 omap_serial_init(); 84 omap_serial_init();
75 usb_musb_init(); 85 usb_musb_init();
76 rx51_peripherals_init(); 86 rx51_peripherals_init();
77 87
78 /* Ensure SDRC pins are mux'd for self-refresh */ 88 /* Ensure SDRC pins are mux'd for self-refresh */
79 omap_cfg_reg(H16_34XX_SDRC_CKE0); 89 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
80 omap_cfg_reg(H17_34XX_SDRC_CKE1); 90 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
81} 91}
82 92
83static void __init rx51_map_io(void) 93static void __init rx51_map_io(void)
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index f14baa392760..8dd277c36661 100755
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -14,7 +14,7 @@
14#include <linux/input.h> 14#include <linux/input.h>
15#include <linux/input/matrix_keypad.h> 15#include <linux/input/matrix_keypad.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/i2c/twl4030.h> 17#include <linux/i2c/twl.h>
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19 19
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
@@ -152,14 +152,20 @@ static struct regulator_init_data zoom_vsim = {
152 152
153static struct twl4030_hsmmc_info mmc[] __initdata = { 153static struct twl4030_hsmmc_info mmc[] __initdata = {
154 { 154 {
155 .name = "external",
155 .mmc = 1, 156 .mmc = 1,
156 .wires = 4, 157 .wires = 4,
157 .gpio_wp = -EINVAL, 158 .gpio_wp = -EINVAL,
159 .power_saving = true,
158 }, 160 },
159 { 161 {
162 .name = "internal",
160 .mmc = 2, 163 .mmc = 2,
161 .wires = 4, 164 .wires = 8,
165 .gpio_cd = -EINVAL,
162 .gpio_wp = -EINVAL, 166 .gpio_wp = -EINVAL,
167 .nonremovable = true,
168 .power_saving = true,
163 }, 169 },
164 {} /* Terminator */ 170 {} /* Terminator */
165}; 171};
@@ -167,11 +173,8 @@ static struct twl4030_hsmmc_info mmc[] __initdata = {
167static int zoom_twl_gpio_setup(struct device *dev, 173static int zoom_twl_gpio_setup(struct device *dev,
168 unsigned gpio, unsigned ngpio) 174 unsigned gpio, unsigned ngpio)
169{ 175{
170 /* gpio + 0 is "mmc0_cd" (input/IRQ), 176 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
171 * gpio + 1 is "mmc1_cd" (input/IRQ)
172 */
173 mmc[0].gpio_cd = gpio + 0; 177 mmc[0].gpio_cd = gpio + 0;
174 mmc[1].gpio_cd = gpio + 1;
175 twl4030_mmc_init(mmc); 178 twl4030_mmc_init(mmc);
176 179
177 /* link regulators to MMC adapters ... we "know" the 180 /* link regulators to MMC adapters ... we "know" the
@@ -236,6 +239,7 @@ static struct twl4030_platform_data zoom_twldata = {
236 .gpio = &zoom_gpio_data, 239 .gpio = &zoom_gpio_data,
237 .keypad = &zoom_kp_twl4030_data, 240 .keypad = &zoom_kp_twl4030_data,
238 .codec = &zoom_codec_data, 241 .codec = &zoom_codec_data,
242 .vmmc1 = &zoom_vmmc1,
239 .vmmc2 = &zoom_vmmc2, 243 .vmmc2 = &zoom_vmmc2,
240 .vsim = &zoom_vsim, 244 .vsim = &zoom_vsim,
241 245
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index d94d047c7dce..bb87cf7878ff 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -23,6 +23,7 @@
23 23
24#include <mach/board-zoom.h> 24#include <mach/board-zoom.h>
25 25
26#include "mux.h"
26#include "sdram-micron-mt46h32m32lf-6.h" 27#include "sdram-micron-mt46h32m32lf-6.h"
27 28
28static void __init omap_zoom2_init_irq(void) 29static void __init omap_zoom2_init_irq(void)
@@ -68,8 +69,17 @@ static struct twl4030_platform_data zoom2_twldata = {
68 69
69#endif 70#endif
70 71
72#ifdef CONFIG_OMAP_MUX
73static struct omap_board_mux board_mux[] __initdata = {
74 { .reg_offset = OMAP_MUX_TERMINATOR },
75};
76#else
77#define board_mux NULL
78#endif
79
71static void __init omap_zoom2_init(void) 80static void __init omap_zoom2_init(void)
72{ 81{
82 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
73 zoom_peripherals_init(); 83 zoom_peripherals_init();
74 zoom_debugboard_init(); 84 zoom_debugboard_init();
75} 85}
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index 8d965a6516c8..a9fe9181b010 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -21,6 +21,7 @@
21#include <plat/common.h> 21#include <plat/common.h>
22#include <plat/board.h> 22#include <plat/board.h>
23 23
24#include "mux.h"
24#include "sdram-hynix-h8mbx00u0mer-0em.h" 25#include "sdram-hynix-h8mbx00u0mer-0em.h"
25 26
26static void __init omap_zoom_map_io(void) 27static void __init omap_zoom_map_io(void)
@@ -42,8 +43,17 @@ static void __init omap_zoom_init_irq(void)
42 omap_gpio_init(); 43 omap_gpio_init();
43} 44}
44 45
46#ifdef CONFIG_OMAP_MUX
47static struct omap_board_mux board_mux[] __initdata = {
48 { .reg_offset = OMAP_MUX_TERMINATOR },
49};
50#else
51#define board_mux NULL
52#endif
53
45static void __init omap_zoom_init(void) 54static void __init omap_zoom_init(void)
46{ 55{
56 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
47 zoom_peripherals_init(); 57 zoom_peripherals_init();
48 zoom_debugboard_init(); 58 zoom_debugboard_init();
49} 59}
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 4716206547ac..759c72a48f7f 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -70,9 +70,41 @@
70u8 cpu_mask; 70u8 cpu_mask;
71 71
72/*------------------------------------------------------------------------- 72/*-------------------------------------------------------------------------
73 * OMAP2/3 specific clock functions 73 * OMAP2/3/4 specific clock functions
74 *-------------------------------------------------------------------------*/ 74 *-------------------------------------------------------------------------*/
75 75
76void omap2_init_dpll_parent(struct clk *clk)
77{
78 u32 v;
79 struct dpll_data *dd;
80
81 dd = clk->dpll_data;
82 if (!dd)
83 return;
84
85 /* Return bypass rate if DPLL is bypassed */
86 v = __raw_readl(dd->control_reg);
87 v &= dd->enable_mask;
88 v >>= __ffs(dd->enable_mask);
89
90 /* Reparent in case the dpll is in bypass */
91 if (cpu_is_omap24xx()) {
92 if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
93 v == OMAP2XXX_EN_DPLL_FRBYPASS)
94 clk_reparent(clk, dd->clk_bypass);
95 } else if (cpu_is_omap34xx()) {
96 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
97 v == OMAP3XXX_EN_DPLL_FRBYPASS)
98 clk_reparent(clk, dd->clk_bypass);
99 } else if (cpu_is_omap44xx()) {
100 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
101 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
102 v == OMAP4XXX_EN_DPLL_MNBYPASS)
103 clk_reparent(clk, dd->clk_bypass);
104 }
105 return;
106}
107
76/** 108/**
77 * _omap2xxx_clk_commit - commit clock parent/rate changes in hardware 109 * _omap2xxx_clk_commit - commit clock parent/rate changes in hardware
78 * @clk: struct clk * 110 * @clk: struct clk *
@@ -149,6 +181,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
149 * clockdomain pointer, and save it into the struct clk. Intended to be 181 * clockdomain pointer, and save it into the struct clk. Intended to be
150 * called during clk_register(). No return value. 182 * called during clk_register(). No return value.
151 */ 183 */
184#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdm f/w is in place */
152void omap2_init_clk_clkdm(struct clk *clk) 185void omap2_init_clk_clkdm(struct clk *clk)
153{ 186{
154 struct clockdomain *clkdm; 187 struct clockdomain *clkdm;
@@ -166,6 +199,7 @@ void omap2_init_clk_clkdm(struct clk *clk)
166 "clkdm %s\n", clk->name, clk->clkdm_name); 199 "clkdm %s\n", clk->name, clk->clkdm_name);
167 } 200 }
168} 201}
202#endif
169 203
170/** 204/**
171 * omap2_init_clksel_parent - set a clksel clk's parent field from the hardware 205 * omap2_init_clksel_parent - set a clksel clk's parent field from the hardware
@@ -247,6 +281,11 @@ u32 omap2_get_dpll_rate(struct clk *clk)
247 if (v == OMAP3XXX_EN_DPLL_LPBYPASS || 281 if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
248 v == OMAP3XXX_EN_DPLL_FRBYPASS) 282 v == OMAP3XXX_EN_DPLL_FRBYPASS)
249 return dd->clk_bypass->rate; 283 return dd->clk_bypass->rate;
284 } else if (cpu_is_omap44xx()) {
285 if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
286 v == OMAP4XXX_EN_DPLL_FRBYPASS ||
287 v == OMAP4XXX_EN_DPLL_MNBYPASS)
288 return dd->clk_bypass->rate;
250 } 289 }
251 290
252 v = __raw_readl(dd->mult_div1_reg); 291 v = __raw_readl(dd->mult_div1_reg);
@@ -437,8 +476,10 @@ void omap2_clk_disable(struct clk *clk)
437 _omap2_clk_disable(clk); 476 _omap2_clk_disable(clk);
438 if (clk->parent) 477 if (clk->parent)
439 omap2_clk_disable(clk->parent); 478 omap2_clk_disable(clk->parent);
479#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdm f/w is in place */
440 if (clk->clkdm) 480 if (clk->clkdm)
441 omap2_clkdm_clk_disable(clk->clkdm, clk); 481 omap2_clkdm_clk_disable(clk->clkdm, clk);
482#endif
442 483
443 } 484 }
444} 485}
@@ -448,8 +489,10 @@ int omap2_clk_enable(struct clk *clk)
448 int ret = 0; 489 int ret = 0;
449 490
450 if (clk->usecount++ == 0) { 491 if (clk->usecount++ == 0) {
492#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdm f/w is in place */
451 if (clk->clkdm) 493 if (clk->clkdm)
452 omap2_clkdm_clk_enable(clk->clkdm, clk); 494 omap2_clkdm_clk_enable(clk->clkdm, clk);
495#endif
453 496
454 if (clk->parent) { 497 if (clk->parent) {
455 ret = omap2_clk_enable(clk->parent); 498 ret = omap2_clk_enable(clk->parent);
@@ -468,8 +511,10 @@ int omap2_clk_enable(struct clk *clk)
468 return ret; 511 return ret;
469 512
470err: 513err:
514#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdm f/w is in place */
471 if (clk->clkdm) 515 if (clk->clkdm)
472 omap2_clkdm_clk_disable(clk->clkdm, clk); 516 omap2_clkdm_clk_disable(clk->clkdm, clk);
517#endif
473 clk->usecount--; 518 clk->usecount--;
474 return ret; 519 return ret;
475} 520}
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 43b6bedaafd6..93c48df3b5b1 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -1,8 +1,8 @@
1/* 1/*
2 * linux/arch/arm/mach-omap2/clock.h 2 * linux/arch/arm/mach-omap2/clock.h
3 * 3 *
4 * Copyright (C) 2005-2008 Texas Instruments, Inc. 4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2008 Nokia Corporation 5 * Copyright (C) 2004-2009 Nokia Corporation
6 * 6 *
7 * Contacts: 7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com> 8 * Richard Woodruff <r-woodruff2@ti.com>
@@ -36,6 +36,17 @@
36#define OMAP3XXX_EN_DPLL_FRBYPASS 0x6 36#define OMAP3XXX_EN_DPLL_FRBYPASS 0x6
37#define OMAP3XXX_EN_DPLL_LOCKED 0x7 37#define OMAP3XXX_EN_DPLL_LOCKED 0x7
38 38
39/* OMAP4xxx CM_CLKMODE_DPLL*.EN_*_DPLL bits - for omap2_get_dpll_rate() */
40#define OMAP4XXX_EN_DPLL_MNBYPASS 0x4
41#define OMAP4XXX_EN_DPLL_LPBYPASS 0x5
42#define OMAP4XXX_EN_DPLL_FRBYPASS 0x6
43#define OMAP4XXX_EN_DPLL_LOCKED 0x7
44
45/* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */
46#define DPLL_LOW_POWER_STOP 0x1
47#define DPLL_LOW_POWER_BYPASS 0x5
48#define DPLL_LOCKED 0x7
49
39int omap2_clk_init(void); 50int omap2_clk_init(void);
40int omap2_clk_enable(struct clk *clk); 51int omap2_clk_enable(struct clk *clk);
41void omap2_clk_disable(struct clk *clk); 52void omap2_clk_disable(struct clk *clk);
@@ -44,6 +55,14 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
44int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); 55int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
45int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); 56int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
46long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); 57long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
58unsigned long omap3_dpll_recalc(struct clk *clk);
59unsigned long omap3_clkoutx2_recalc(struct clk *clk);
60void omap3_dpll_allow_idle(struct clk *clk);
61void omap3_dpll_deny_idle(struct clk *clk);
62u32 omap3_dpll_autoidle_read(struct clk *clk);
63int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
64int omap3_noncore_dpll_enable(struct clk *clk);
65void omap3_noncore_dpll_disable(struct clk *clk);
47 66
48#ifdef CONFIG_OMAP_RESET_CLOCKS 67#ifdef CONFIG_OMAP_RESET_CLOCKS
49void omap2_clk_disable_unused(struct clk *clk); 68void omap2_clk_disable_unused(struct clk *clk);
@@ -63,6 +82,7 @@ unsigned long omap2_fixed_divisor_recalc(struct clk *clk);
63long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); 82long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
64int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); 83int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
65u32 omap2_get_dpll_rate(struct clk *clk); 84u32 omap2_get_dpll_rate(struct clk *clk);
85void omap2_init_dpll_parent(struct clk *clk);
66int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); 86int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
67void omap2_clk_prepare_for_reboot(void); 87void omap2_clk_prepare_for_reboot(void);
68int omap2_dflt_clk_enable(struct clk *clk); 88int omap2_dflt_clk_enable(struct clk *clk);
@@ -72,29 +92,17 @@ void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg,
72void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, 92void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg,
73 u8 *idlest_bit); 93 u8 *idlest_bit);
74 94
95extern u8 cpu_mask;
96
75extern const struct clkops clkops_omap2_dflt_wait; 97extern const struct clkops clkops_omap2_dflt_wait;
76extern const struct clkops clkops_omap2_dflt; 98extern const struct clkops clkops_omap2_dflt;
77 99
78extern u8 cpu_mask; 100extern struct clk_functions omap2_clk_functions;
101extern struct clk *vclk, *sclk;
79 102
80/* clksel_rate data common to 24xx/343x */ 103extern const struct clksel_rate gpt_32k_rates[];
81static const struct clksel_rate gpt_32k_rates[] = { 104extern const struct clksel_rate gpt_sys_rates[];
82 { .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE }, 105extern const struct clksel_rate gfx_l3_rates[];
83 { .div = 0 }
84};
85
86static const struct clksel_rate gpt_sys_rates[] = {
87 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
88 { .div = 0 }
89};
90
91static const struct clksel_rate gfx_l3_rates[] = {
92 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X },
93 { .div = 2, .val = 2, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
94 { .div = 3, .val = 3, .flags = RATE_IN_243X | RATE_IN_343X },
95 { .div = 4, .val = 4, .flags = RATE_IN_243X | RATE_IN_343X },
96 { .div = 0 }
97};
98 106
99 107
100#endif 108#endif
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
deleted file mode 100644
index e70e7e000eaa..000000000000
--- a/arch/arm/mach-omap2/clock24xx.c
+++ /dev/null
@@ -1,805 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/clock.c
3 *
4 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Copyright (C) 2004-2008 Nokia Corporation
6 *
7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Paul Walmsley
10 *
11 * Based on earlier work by Tuukka Tikkanen, Tony Lindgren,
12 * Gordon McNutt and RidgeRun, Inc.
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#undef DEBUG
19
20#include <linux/module.h>
21#include <linux/kernel.h>
22#include <linux/device.h>
23#include <linux/list.h>
24#include <linux/errno.h>
25#include <linux/delay.h>
26#include <linux/clk.h>
27#include <linux/io.h>
28#include <linux/cpufreq.h>
29#include <linux/bitops.h>
30
31#include <plat/clock.h>
32#include <plat/sram.h>
33#include <plat/prcm.h>
34#include <asm/div64.h>
35#include <asm/clkdev.h>
36
37#include <plat/sdrc.h>
38#include "clock.h"
39#include "prm.h"
40#include "prm-regbits-24xx.h"
41#include "cm.h"
42#include "cm-regbits-24xx.h"
43
44static const struct clkops clkops_oscck;
45static const struct clkops clkops_fixed;
46
47static void omap2430_clk_i2chs_find_idlest(struct clk *clk,
48 void __iomem **idlest_reg,
49 u8 *idlest_bit);
50
51/* 2430 I2CHS has non-standard IDLEST register */
52static const struct clkops clkops_omap2430_i2chs_wait = {
53 .enable = omap2_dflt_clk_enable,
54 .disable = omap2_dflt_clk_disable,
55 .find_idlest = omap2430_clk_i2chs_find_idlest,
56 .find_companion = omap2_clk_dflt_find_companion,
57};
58
59#include "clock24xx.h"
60
61struct omap_clk {
62 u32 cpu;
63 struct clk_lookup lk;
64};
65
66#define CLK(dev, con, ck, cp) \
67 { \
68 .cpu = cp, \
69 .lk = { \
70 .dev_id = dev, \
71 .con_id = con, \
72 .clk = ck, \
73 }, \
74 }
75
76#define CK_243X RATE_IN_243X
77#define CK_242X RATE_IN_242X
78
79static struct omap_clk omap24xx_clks[] = {
80 /* external root sources */
81 CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X | CK_242X),
82 CLK(NULL, "secure_32k_ck", &secure_32k_ck, CK_243X | CK_242X),
83 CLK(NULL, "osc_ck", &osc_ck, CK_243X | CK_242X),
84 CLK(NULL, "sys_ck", &sys_ck, CK_243X | CK_242X),
85 CLK(NULL, "alt_ck", &alt_ck, CK_243X | CK_242X),
86 /* internal analog sources */
87 CLK(NULL, "dpll_ck", &dpll_ck, CK_243X | CK_242X),
88 CLK(NULL, "apll96_ck", &apll96_ck, CK_243X | CK_242X),
89 CLK(NULL, "apll54_ck", &apll54_ck, CK_243X | CK_242X),
90 /* internal prcm root sources */
91 CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X | CK_242X),
92 CLK(NULL, "core_ck", &core_ck, CK_243X | CK_242X),
93 CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X | CK_242X),
94 CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X | CK_242X),
95 CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X | CK_242X),
96 CLK(NULL, "ck_wdt1_osc", &wdt1_osc_ck, CK_243X | CK_242X),
97 CLK(NULL, "sys_clkout_src", &sys_clkout_src, CK_243X | CK_242X),
98 CLK(NULL, "sys_clkout", &sys_clkout, CK_243X | CK_242X),
99 CLK(NULL, "sys_clkout2_src", &sys_clkout2_src, CK_242X),
100 CLK(NULL, "sys_clkout2", &sys_clkout2, CK_242X),
101 CLK(NULL, "emul_ck", &emul_ck, CK_242X),
102 /* mpu domain clocks */
103 CLK(NULL, "mpu_ck", &mpu_ck, CK_243X | CK_242X),
104 /* dsp domain clocks */
105 CLK(NULL, "dsp_fck", &dsp_fck, CK_243X | CK_242X),
106 CLK(NULL, "dsp_irate_ick", &dsp_irate_ick, CK_243X | CK_242X),
107 CLK(NULL, "dsp_ick", &dsp_ick, CK_242X),
108 CLK(NULL, "iva2_1_ick", &iva2_1_ick, CK_243X),
109 CLK(NULL, "iva1_ifck", &iva1_ifck, CK_242X),
110 CLK(NULL, "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X),
111 /* GFX domain clocks */
112 CLK(NULL, "gfx_3d_fck", &gfx_3d_fck, CK_243X | CK_242X),
113 CLK(NULL, "gfx_2d_fck", &gfx_2d_fck, CK_243X | CK_242X),
114 CLK(NULL, "gfx_ick", &gfx_ick, CK_243X | CK_242X),
115 /* Modem domain clocks */
116 CLK(NULL, "mdm_ick", &mdm_ick, CK_243X),
117 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
118 /* DSS domain clocks */
119 CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X),
120 CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X),
121 CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X),
122 CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X),
123 /* L3 domain clocks */
124 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X),
125 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X),
126 CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_243X | CK_242X),
127 /* L4 domain clocks */
128 CLK(NULL, "l4_ck", &l4_ck, CK_243X | CK_242X),
129 CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_243X | CK_242X),
130 /* virtual meta-group clock */
131 CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_243X | CK_242X),
132 /* general l4 interface ck, multi-parent functional clk */
133 CLK(NULL, "gpt1_ick", &gpt1_ick, CK_243X | CK_242X),
134 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_243X | CK_242X),
135 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_243X | CK_242X),
136 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_243X | CK_242X),
137 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_243X | CK_242X),
138 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_243X | CK_242X),
139 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_243X | CK_242X),
140 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_243X | CK_242X),
141 CLK(NULL, "gpt5_ick", &gpt5_ick, CK_243X | CK_242X),
142 CLK(NULL, "gpt5_fck", &gpt5_fck, CK_243X | CK_242X),
143 CLK(NULL, "gpt6_ick", &gpt6_ick, CK_243X | CK_242X),
144 CLK(NULL, "gpt6_fck", &gpt6_fck, CK_243X | CK_242X),
145 CLK(NULL, "gpt7_ick", &gpt7_ick, CK_243X | CK_242X),
146 CLK(NULL, "gpt7_fck", &gpt7_fck, CK_243X | CK_242X),
147 CLK(NULL, "gpt8_ick", &gpt8_ick, CK_243X | CK_242X),
148 CLK(NULL, "gpt8_fck", &gpt8_fck, CK_243X | CK_242X),
149 CLK(NULL, "gpt9_ick", &gpt9_ick, CK_243X | CK_242X),
150 CLK(NULL, "gpt9_fck", &gpt9_fck, CK_243X | CK_242X),
151 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_243X | CK_242X),
152 CLK(NULL, "gpt10_fck", &gpt10_fck, CK_243X | CK_242X),
153 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_243X | CK_242X),
154 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_243X | CK_242X),
155 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X | CK_242X),
156 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X | CK_242X),
157 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X | CK_242X),
158 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X | CK_242X),
159 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X | CK_242X),
160 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X | CK_242X),
161 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
162 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X),
163 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
164 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X),
165 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
166 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X),
167 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X | CK_242X),
168 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X | CK_242X),
169 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X | CK_242X),
170 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X | CK_242X),
171 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
172 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X),
173 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X | CK_242X),
174 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X | CK_242X),
175 CLK(NULL, "uart2_ick", &uart2_ick, CK_243X | CK_242X),
176 CLK(NULL, "uart2_fck", &uart2_fck, CK_243X | CK_242X),
177 CLK(NULL, "uart3_ick", &uart3_ick, CK_243X | CK_242X),
178 CLK(NULL, "uart3_fck", &uart3_fck, CK_243X | CK_242X),
179 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X | CK_242X),
180 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X | CK_242X),
181 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X | CK_242X),
182 CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X | CK_242X),
183 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X | CK_242X),
184 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X | CK_242X),
185 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X | CK_242X),
186 CLK(NULL, "icr_ick", &icr_ick, CK_243X),
187 CLK("omap24xxcam", "fck", &cam_fck, CK_243X | CK_242X),
188 CLK("omap24xxcam", "ick", &cam_ick, CK_243X | CK_242X),
189 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X | CK_242X),
190 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X | CK_242X),
191 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X | CK_242X),
192 CLK(NULL, "wdt3_ick", &wdt3_ick, CK_242X),
193 CLK(NULL, "wdt3_fck", &wdt3_fck, CK_242X),
194 CLK(NULL, "mspro_ick", &mspro_ick, CK_243X | CK_242X),
195 CLK(NULL, "mspro_fck", &mspro_fck, CK_243X | CK_242X),
196 CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X),
197 CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X),
198 CLK(NULL, "fac_ick", &fac_ick, CK_243X | CK_242X),
199 CLK(NULL, "fac_fck", &fac_fck, CK_243X | CK_242X),
200 CLK(NULL, "eac_ick", &eac_ick, CK_242X),
201 CLK(NULL, "eac_fck", &eac_fck, CK_242X),
202 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X | CK_242X),
203 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X | CK_242X),
204 CLK("i2c_omap.1", "ick", &i2c1_ick, CK_243X | CK_242X),
205 CLK("i2c_omap.1", "fck", &i2c1_fck, CK_242X),
206 CLK("i2c_omap.1", "fck", &i2chs1_fck, CK_243X),
207 CLK("i2c_omap.2", "ick", &i2c2_ick, CK_243X | CK_242X),
208 CLK("i2c_omap.2", "fck", &i2c2_fck, CK_242X),
209 CLK("i2c_omap.2", "fck", &i2chs2_fck, CK_243X),
210 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X | CK_242X),
211 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X | CK_242X),
212 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X | CK_242X),
213 CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X),
214 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X),
215 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X),
216 CLK(NULL, "des_ick", &des_ick, CK_243X | CK_242X),
217 CLK(NULL, "sha_ick", &sha_ick, CK_243X | CK_242X),
218 CLK("omap_rng", "ick", &rng_ick, CK_243X | CK_242X),
219 CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X),
220 CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X),
221 CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X),
222 CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X),
223 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X),
224 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X),
225 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X),
226 CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X),
227 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
228 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
229 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
230 CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
231 CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
232};
233
234/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
235#define EN_APLL_STOPPED 0
236#define EN_APLL_LOCKED 3
237
238/* CM_CLKSEL1_PLL.APLLS_CLKIN options (24XX) */
239#define APLLS_CLKIN_19_2MHZ 0
240#define APLLS_CLKIN_13MHZ 2
241#define APLLS_CLKIN_12MHZ 3
242
243/* #define DOWN_VARIABLE_DPLL 1 */ /* Experimental */
244
245static struct prcm_config *curr_prcm_set;
246static struct clk *vclk;
247static struct clk *sclk;
248
249static void __iomem *prcm_clksrc_ctrl;
250
251/*-------------------------------------------------------------------------
252 * Omap24xx specific clock functions
253 *-------------------------------------------------------------------------*/
254
255/**
256 * omap2430_clk_i2chs_find_idlest - return CM_IDLEST info for 2430 I2CHS
257 * @clk: struct clk * being enabled
258 * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into
259 * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into
260 *
261 * OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the
262 * CM_*CLKEN bits are in CM_{I,F}CLKEN2_CORE. This custom function
263 * passes back the correct CM_IDLEST register address for I2CHS
264 * modules. No return value.
265 */
266static void omap2430_clk_i2chs_find_idlest(struct clk *clk,
267 void __iomem **idlest_reg,
268 u8 *idlest_bit)
269{
270 *idlest_reg = OMAP_CM_REGADDR(CORE_MOD, CM_IDLEST);
271 *idlest_bit = clk->enable_bit;
272}
273
274
275/**
276 * omap2xxx_clk_get_core_rate - return the CORE_CLK rate
277 * @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck")
278 *
279 * Returns the CORE_CLK rate. CORE_CLK can have one of three rate
280 * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz
281 * (the latter is unusual). This currently should be called with
282 * struct clk *dpll_ck, which is a composite clock of dpll_ck and
283 * core_ck.
284 */
285static unsigned long omap2xxx_clk_get_core_rate(struct clk *clk)
286{
287 long long core_clk;
288 u32 v;
289
290 core_clk = omap2_get_dpll_rate(clk);
291
292 v = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
293 v &= OMAP24XX_CORE_CLK_SRC_MASK;
294
295 if (v == CORE_CLK_SRC_32K)
296 core_clk = 32768;
297 else
298 core_clk *= v;
299
300 return core_clk;
301}
302
303static int omap2_enable_osc_ck(struct clk *clk)
304{
305 u32 pcc;
306
307 pcc = __raw_readl(prcm_clksrc_ctrl);
308
309 __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
310
311 return 0;
312}
313
314static void omap2_disable_osc_ck(struct clk *clk)
315{
316 u32 pcc;
317
318 pcc = __raw_readl(prcm_clksrc_ctrl);
319
320 __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
321}
322
323static const struct clkops clkops_oscck = {
324 .enable = &omap2_enable_osc_ck,
325 .disable = &omap2_disable_osc_ck,
326};
327
328#ifdef OLD_CK
329/* Recalculate SYST_CLK */
330static void omap2_sys_clk_recalc(struct clk * clk)
331{
332 u32 div = PRCM_CLKSRC_CTRL;
333 div &= (1 << 7) | (1 << 6); /* Test if ext clk divided by 1 or 2 */
334 div >>= clk->rate_offset;
335 clk->rate = (clk->parent->rate / div);
336 propagate_rate(clk);
337}
338#endif /* OLD_CK */
339
340/* Enable an APLL if off */
341static int omap2_clk_fixed_enable(struct clk *clk)
342{
343 u32 cval, apll_mask;
344
345 apll_mask = EN_APLL_LOCKED << clk->enable_bit;
346
347 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
348
349 if ((cval & apll_mask) == apll_mask)
350 return 0; /* apll already enabled */
351
352 cval &= ~apll_mask;
353 cval |= apll_mask;
354 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
355
356 if (clk == &apll96_ck)
357 cval = OMAP24XX_ST_96M_APLL;
358 else if (clk == &apll54_ck)
359 cval = OMAP24XX_ST_54M_APLL;
360
361 omap2_cm_wait_idlest(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), cval,
362 clk->name);
363
364 /*
365 * REVISIT: Should we return an error code if omap2_wait_clock_ready()
366 * fails?
367 */
368 return 0;
369}
370
371/* Stop APLL */
372static void omap2_clk_fixed_disable(struct clk *clk)
373{
374 u32 cval;
375
376 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
377 cval &= ~(EN_APLL_LOCKED << clk->enable_bit);
378 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
379}
380
381static const struct clkops clkops_fixed = {
382 .enable = &omap2_clk_fixed_enable,
383 .disable = &omap2_clk_fixed_disable,
384};
385
386/*
387 * Uses the current prcm set to tell if a rate is valid.
388 * You can go slower, but not faster within a given rate set.
389 */
390static long omap2_dpllcore_round_rate(unsigned long target_rate)
391{
392 u32 high, low, core_clk_src;
393
394 core_clk_src = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
395 core_clk_src &= OMAP24XX_CORE_CLK_SRC_MASK;
396
397 if (core_clk_src == CORE_CLK_SRC_DPLL) { /* DPLL clockout */
398 high = curr_prcm_set->dpll_speed * 2;
399 low = curr_prcm_set->dpll_speed;
400 } else { /* DPLL clockout x 2 */
401 high = curr_prcm_set->dpll_speed;
402 low = curr_prcm_set->dpll_speed / 2;
403 }
404
405#ifdef DOWN_VARIABLE_DPLL
406 if (target_rate > high)
407 return high;
408 else
409 return target_rate;
410#else
411 if (target_rate > low)
412 return high;
413 else
414 return low;
415#endif
416
417}
418
419static unsigned long omap2_dpllcore_recalc(struct clk *clk)
420{
421 return omap2xxx_clk_get_core_rate(clk);
422}
423
424static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
425{
426 u32 cur_rate, low, mult, div, valid_rate, done_rate;
427 u32 bypass = 0;
428 struct prcm_config tmpset;
429 const struct dpll_data *dd;
430
431 cur_rate = omap2xxx_clk_get_core_rate(&dpll_ck);
432 mult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
433 mult &= OMAP24XX_CORE_CLK_SRC_MASK;
434
435 if ((rate == (cur_rate / 2)) && (mult == 2)) {
436 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
437 } else if ((rate == (cur_rate * 2)) && (mult == 1)) {
438 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
439 } else if (rate != cur_rate) {
440 valid_rate = omap2_dpllcore_round_rate(rate);
441 if (valid_rate != rate)
442 return -EINVAL;
443
444 if (mult == 1)
445 low = curr_prcm_set->dpll_speed;
446 else
447 low = curr_prcm_set->dpll_speed / 2;
448
449 dd = clk->dpll_data;
450 if (!dd)
451 return -EINVAL;
452
453 tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg);
454 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
455 dd->div1_mask);
456 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
457 tmpset.cm_clksel2_pll = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
458 tmpset.cm_clksel2_pll &= ~OMAP24XX_CORE_CLK_SRC_MASK;
459 if (rate > low) {
460 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL_X2;
461 mult = ((rate / 2) / 1000000);
462 done_rate = CORE_CLK_SRC_DPLL_X2;
463 } else {
464 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL;
465 mult = (rate / 1000000);
466 done_rate = CORE_CLK_SRC_DPLL;
467 }
468 tmpset.cm_clksel1_pll |= (div << __ffs(dd->mult_mask));
469 tmpset.cm_clksel1_pll |= (mult << __ffs(dd->div1_mask));
470
471 /* Worst case */
472 tmpset.base_sdrc_rfr = SDRC_RFR_CTRL_BYPASS;
473
474 if (rate == curr_prcm_set->xtal_speed) /* If asking for 1-1 */
475 bypass = 1;
476
477 /* For omap2xxx_sdrc_init_params() */
478 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
479
480 /* Force dll lock mode */
481 omap2_set_prcm(tmpset.cm_clksel1_pll, tmpset.base_sdrc_rfr,
482 bypass);
483
484 /* Errata: ret dll entry state */
485 omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
486 omap2xxx_sdrc_reprogram(done_rate, 0);
487 }
488
489 return 0;
490}
491
492/**
493 * omap2_table_mpu_recalc - just return the MPU speed
494 * @clk: virt_prcm_set struct clk
495 *
496 * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set.
497 */
498static unsigned long omap2_table_mpu_recalc(struct clk *clk)
499{
500 return curr_prcm_set->mpu_speed;
501}
502
503/*
504 * Look for a rate equal or less than the target rate given a configuration set.
505 *
506 * What's not entirely clear is "which" field represents the key field.
507 * Some might argue L3-DDR, others ARM, others IVA. This code is simple and
508 * just uses the ARM rates.
509 */
510static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
511{
512 struct prcm_config *ptr;
513 long highest_rate;
514
515 if (clk != &virt_prcm_set)
516 return -EINVAL;
517
518 highest_rate = -EINVAL;
519
520 for (ptr = rate_table; ptr->mpu_speed; ptr++) {
521 if (!(ptr->flags & cpu_mask))
522 continue;
523 if (ptr->xtal_speed != sys_ck.rate)
524 continue;
525
526 highest_rate = ptr->mpu_speed;
527
528 /* Can check only after xtal frequency check */
529 if (ptr->mpu_speed <= rate)
530 break;
531 }
532 return highest_rate;
533}
534
535/* Sets basic clocks based on the specified rate */
536static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
537{
538 u32 cur_rate, done_rate, bypass = 0, tmp;
539 struct prcm_config *prcm;
540 unsigned long found_speed = 0;
541 unsigned long flags;
542
543 if (clk != &virt_prcm_set)
544 return -EINVAL;
545
546 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
547 if (!(prcm->flags & cpu_mask))
548 continue;
549
550 if (prcm->xtal_speed != sys_ck.rate)
551 continue;
552
553 if (prcm->mpu_speed <= rate) {
554 found_speed = prcm->mpu_speed;
555 break;
556 }
557 }
558
559 if (!found_speed) {
560 printk(KERN_INFO "Could not set MPU rate to %luMHz\n",
561 rate / 1000000);
562 return -EINVAL;
563 }
564
565 curr_prcm_set = prcm;
566 cur_rate = omap2xxx_clk_get_core_rate(&dpll_ck);
567
568 if (prcm->dpll_speed == cur_rate / 2) {
569 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
570 } else if (prcm->dpll_speed == cur_rate * 2) {
571 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
572 } else if (prcm->dpll_speed != cur_rate) {
573 local_irq_save(flags);
574
575 if (prcm->dpll_speed == prcm->xtal_speed)
576 bypass = 1;
577
578 if ((prcm->cm_clksel2_pll & OMAP24XX_CORE_CLK_SRC_MASK) ==
579 CORE_CLK_SRC_DPLL_X2)
580 done_rate = CORE_CLK_SRC_DPLL_X2;
581 else
582 done_rate = CORE_CLK_SRC_DPLL;
583
584 /* MPU divider */
585 cm_write_mod_reg(prcm->cm_clksel_mpu, MPU_MOD, CM_CLKSEL);
586
587 /* dsp + iva1 div(2420), iva2.1(2430) */
588 cm_write_mod_reg(prcm->cm_clksel_dsp,
589 OMAP24XX_DSP_MOD, CM_CLKSEL);
590
591 cm_write_mod_reg(prcm->cm_clksel_gfx, GFX_MOD, CM_CLKSEL);
592
593 /* Major subsystem dividers */
594 tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
595 cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD,
596 CM_CLKSEL1);
597
598 if (cpu_is_omap2430())
599 cm_write_mod_reg(prcm->cm_clksel_mdm,
600 OMAP2430_MDM_MOD, CM_CLKSEL);
601
602 /* x2 to enter omap2xxx_sdrc_init_params() */
603 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
604
605 omap2_set_prcm(prcm->cm_clksel1_pll, prcm->base_sdrc_rfr,
606 bypass);
607
608 omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
609 omap2xxx_sdrc_reprogram(done_rate, 0);
610
611 local_irq_restore(flags);
612 }
613
614 return 0;
615}
616
617#ifdef CONFIG_CPU_FREQ
618/*
619 * Walk PRCM rate table and fillout cpufreq freq_table
620 */
621static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)];
622
623void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
624{
625 struct prcm_config *prcm;
626 int i = 0;
627
628 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
629 if (!(prcm->flags & cpu_mask))
630 continue;
631 if (prcm->xtal_speed != sys_ck.rate)
632 continue;
633
634 /* don't put bypass rates in table */
635 if (prcm->dpll_speed == prcm->xtal_speed)
636 continue;
637
638 freq_table[i].index = i;
639 freq_table[i].frequency = prcm->mpu_speed / 1000;
640 i++;
641 }
642
643 if (i == 0) {
644 printk(KERN_WARNING "%s: failed to initialize frequency "
645 "table\n", __func__);
646 return;
647 }
648
649 freq_table[i].index = i;
650 freq_table[i].frequency = CPUFREQ_TABLE_END;
651
652 *table = &freq_table[0];
653}
654#endif
655
656static struct clk_functions omap2_clk_functions = {
657 .clk_enable = omap2_clk_enable,
658 .clk_disable = omap2_clk_disable,
659 .clk_round_rate = omap2_clk_round_rate,
660 .clk_set_rate = omap2_clk_set_rate,
661 .clk_set_parent = omap2_clk_set_parent,
662 .clk_disable_unused = omap2_clk_disable_unused,
663#ifdef CONFIG_CPU_FREQ
664 .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
665#endif
666};
667
668static u32 omap2_get_apll_clkin(void)
669{
670 u32 aplls, srate = 0;
671
672 aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
673 aplls &= OMAP24XX_APLLS_CLKIN_MASK;
674 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
675
676 if (aplls == APLLS_CLKIN_19_2MHZ)
677 srate = 19200000;
678 else if (aplls == APLLS_CLKIN_13MHZ)
679 srate = 13000000;
680 else if (aplls == APLLS_CLKIN_12MHZ)
681 srate = 12000000;
682
683 return srate;
684}
685
686static u32 omap2_get_sysclkdiv(void)
687{
688 u32 div;
689
690 div = __raw_readl(prcm_clksrc_ctrl);
691 div &= OMAP_SYSCLKDIV_MASK;
692 div >>= OMAP_SYSCLKDIV_SHIFT;
693
694 return div;
695}
696
697static unsigned long omap2_osc_clk_recalc(struct clk *clk)
698{
699 return omap2_get_apll_clkin() * omap2_get_sysclkdiv();
700}
701
702static unsigned long omap2_sys_clk_recalc(struct clk *clk)
703{
704 return clk->parent->rate / omap2_get_sysclkdiv();
705}
706
707/*
708 * Set clocks for bypass mode for reboot to work.
709 */
710void omap2_clk_prepare_for_reboot(void)
711{
712 u32 rate;
713
714 if (vclk == NULL || sclk == NULL)
715 return;
716
717 rate = clk_get_rate(sclk);
718 clk_set_rate(vclk, rate);
719}
720
721/*
722 * Switch the MPU rate if specified on cmdline.
723 * We cannot do this early until cmdline is parsed.
724 */
725static int __init omap2_clk_arch_init(void)
726{
727 if (!mpurate)
728 return -EINVAL;
729
730 if (clk_set_rate(&virt_prcm_set, mpurate))
731 printk(KERN_ERR "Could not find matching MPU rate\n");
732
733 recalculate_root_clocks();
734
735 printk(KERN_INFO "Switched to new clocking rate (Crystal/DPLL/MPU): "
736 "%ld.%01ld/%ld/%ld MHz\n",
737 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
738 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
739
740 return 0;
741}
742arch_initcall(omap2_clk_arch_init);
743
744int __init omap2_clk_init(void)
745{
746 struct prcm_config *prcm;
747 struct omap_clk *c;
748 u32 clkrate;
749
750 if (cpu_is_omap242x()) {
751 prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
752 cpu_mask = RATE_IN_242X;
753 } else if (cpu_is_omap2430()) {
754 prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
755 cpu_mask = RATE_IN_243X;
756 }
757
758 clk_init(&omap2_clk_functions);
759
760 for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
761 clk_preinit(c->lk.clk);
762
763 osc_ck.rate = omap2_osc_clk_recalc(&osc_ck);
764 propagate_rate(&osc_ck);
765 sys_ck.rate = omap2_sys_clk_recalc(&sys_ck);
766 propagate_rate(&sys_ck);
767
768 for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
769 if (c->cpu & cpu_mask) {
770 clkdev_add(&c->lk);
771 clk_register(c->lk.clk);
772 omap2_init_clk_clkdm(c->lk.clk);
773 }
774
775 /* Check the MPU rate set by bootloader */
776 clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
777 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
778 if (!(prcm->flags & cpu_mask))
779 continue;
780 if (prcm->xtal_speed != sys_ck.rate)
781 continue;
782 if (prcm->dpll_speed <= clkrate)
783 break;
784 }
785 curr_prcm_set = prcm;
786
787 recalculate_root_clocks();
788
789 printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): "
790 "%ld.%01ld/%ld/%ld MHz\n",
791 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
792 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
793
794 /*
795 * Only enable those clocks we will need, let the drivers
796 * enable other clocks as necessary
797 */
798 clk_enable_init_clocks();
799
800 /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */
801 vclk = clk_get(NULL, "virt_prcm_set");
802 sclk = clk_get(NULL, "sys_ck");
803
804 return 0;
805}
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c
new file mode 100644
index 000000000000..d0e3fb7f9298
--- /dev/null
+++ b/arch/arm/mach-omap2/clock2xxx.c
@@ -0,0 +1,587 @@
1/*
2 * linux/arch/arm/mach-omap2/clock.c
3 *
4 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Copyright (C) 2004-2008 Nokia Corporation
6 *
7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Paul Walmsley
10 *
11 * Based on earlier work by Tuukka Tikkanen, Tony Lindgren,
12 * Gordon McNutt and RidgeRun, Inc.
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#undef DEBUG
19
20#include <linux/module.h>
21#include <linux/kernel.h>
22#include <linux/device.h>
23#include <linux/list.h>
24#include <linux/errno.h>
25#include <linux/delay.h>
26#include <linux/clk.h>
27#include <linux/io.h>
28#include <linux/cpufreq.h>
29#include <linux/bitops.h>
30
31#include <plat/clock.h>
32#include <plat/sram.h>
33#include <plat/prcm.h>
34#include <plat/clkdev_omap.h>
35#include <asm/div64.h>
36#include <asm/clkdev.h>
37
38#include <plat/sdrc.h>
39#include "clock.h"
40#include "clock2xxx.h"
41#include "opp2xxx.h"
42#include "prm.h"
43#include "prm-regbits-24xx.h"
44#include "cm.h"
45#include "cm-regbits-24xx.h"
46
47
48/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
49#define EN_APLL_STOPPED 0
50#define EN_APLL_LOCKED 3
51
52/* CM_CLKSEL1_PLL.APLLS_CLKIN options (24XX) */
53#define APLLS_CLKIN_19_2MHZ 0
54#define APLLS_CLKIN_13MHZ 2
55#define APLLS_CLKIN_12MHZ 3
56
57/* #define DOWN_VARIABLE_DPLL 1 */ /* Experimental */
58
59const struct prcm_config *curr_prcm_set;
60const struct prcm_config *rate_table;
61
62struct clk *vclk, *sclk, *dclk;
63
64void __iomem *prcm_clksrc_ctrl;
65
66/*-------------------------------------------------------------------------
67 * Omap24xx specific clock functions
68 *-------------------------------------------------------------------------*/
69
70/**
71 * omap2430_clk_i2chs_find_idlest - return CM_IDLEST info for 2430 I2CHS
72 * @clk: struct clk * being enabled
73 * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into
74 * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into
75 *
76 * OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the
77 * CM_*CLKEN bits are in CM_{I,F}CLKEN2_CORE. This custom function
78 * passes back the correct CM_IDLEST register address for I2CHS
79 * modules. No return value.
80 */
81static void omap2430_clk_i2chs_find_idlest(struct clk *clk,
82 void __iomem **idlest_reg,
83 u8 *idlest_bit)
84{
85 *idlest_reg = OMAP_CM_REGADDR(CORE_MOD, CM_IDLEST);
86 *idlest_bit = clk->enable_bit;
87}
88
89/* 2430 I2CHS has non-standard IDLEST register */
90const struct clkops clkops_omap2430_i2chs_wait = {
91 .enable = omap2_dflt_clk_enable,
92 .disable = omap2_dflt_clk_disable,
93 .find_idlest = omap2430_clk_i2chs_find_idlest,
94 .find_companion = omap2_clk_dflt_find_companion,
95};
96
97/**
98 * omap2xxx_clk_get_core_rate - return the CORE_CLK rate
99 * @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck")
100 *
101 * Returns the CORE_CLK rate. CORE_CLK can have one of three rate
102 * sources on OMAP2xxx: the DPLL CLKOUT rate, DPLL CLKOUTX2, or 32KHz
103 * (the latter is unusual). This currently should be called with
104 * struct clk *dpll_ck, which is a composite clock of dpll_ck and
105 * core_ck.
106 */
107unsigned long omap2xxx_clk_get_core_rate(struct clk *clk)
108{
109 long long core_clk;
110 u32 v;
111
112 core_clk = omap2_get_dpll_rate(clk);
113
114 v = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
115 v &= OMAP24XX_CORE_CLK_SRC_MASK;
116
117 if (v == CORE_CLK_SRC_32K)
118 core_clk = 32768;
119 else
120 core_clk *= v;
121
122 return core_clk;
123}
124
125static int omap2_enable_osc_ck(struct clk *clk)
126{
127 u32 pcc;
128
129 pcc = __raw_readl(prcm_clksrc_ctrl);
130
131 __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
132
133 return 0;
134}
135
136static void omap2_disable_osc_ck(struct clk *clk)
137{
138 u32 pcc;
139
140 pcc = __raw_readl(prcm_clksrc_ctrl);
141
142 __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
143}
144
145const struct clkops clkops_oscck = {
146 .enable = omap2_enable_osc_ck,
147 .disable = omap2_disable_osc_ck,
148};
149
150#ifdef OLD_CK
151/* Recalculate SYST_CLK */
152static void omap2_sys_clk_recalc(struct clk *clk)
153{
154 u32 div = PRCM_CLKSRC_CTRL;
155 div &= (1 << 7) | (1 << 6); /* Test if ext clk divided by 1 or 2 */
156 div >>= clk->rate_offset;
157 clk->rate = (clk->parent->rate / div);
158 propagate_rate(clk);
159}
160#endif /* OLD_CK */
161
162/* Enable an APLL if off */
163static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask)
164{
165 u32 cval, apll_mask;
166
167 apll_mask = EN_APLL_LOCKED << clk->enable_bit;
168
169 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
170
171 if ((cval & apll_mask) == apll_mask)
172 return 0; /* apll already enabled */
173
174 cval &= ~apll_mask;
175 cval |= apll_mask;
176 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
177
178 omap2_cm_wait_idlest(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), status_mask,
179 clk->name);
180
181 /*
182 * REVISIT: Should we return an error code if omap2_wait_clock_ready()
183 * fails?
184 */
185 return 0;
186}
187
188static int omap2_clk_apll96_enable(struct clk *clk)
189{
190 return omap2_clk_apll_enable(clk, OMAP24XX_ST_96M_APLL);
191}
192
193static int omap2_clk_apll54_enable(struct clk *clk)
194{
195 return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL);
196}
197
198/* Stop APLL */
199static void omap2_clk_apll_disable(struct clk *clk)
200{
201 u32 cval;
202
203 cval = cm_read_mod_reg(PLL_MOD, CM_CLKEN);
204 cval &= ~(EN_APLL_LOCKED << clk->enable_bit);
205 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
206}
207
208const struct clkops clkops_apll96 = {
209 .enable = omap2_clk_apll96_enable,
210 .disable = omap2_clk_apll_disable,
211};
212
213const struct clkops clkops_apll54 = {
214 .enable = omap2_clk_apll54_enable,
215 .disable = omap2_clk_apll_disable,
216};
217
218/*
219 * Uses the current prcm set to tell if a rate is valid.
220 * You can go slower, but not faster within a given rate set.
221 */
222long omap2_dpllcore_round_rate(unsigned long target_rate)
223{
224 u32 high, low, core_clk_src;
225
226 core_clk_src = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
227 core_clk_src &= OMAP24XX_CORE_CLK_SRC_MASK;
228
229 if (core_clk_src == CORE_CLK_SRC_DPLL) { /* DPLL clockout */
230 high = curr_prcm_set->dpll_speed * 2;
231 low = curr_prcm_set->dpll_speed;
232 } else { /* DPLL clockout x 2 */
233 high = curr_prcm_set->dpll_speed;
234 low = curr_prcm_set->dpll_speed / 2;
235 }
236
237#ifdef DOWN_VARIABLE_DPLL
238 if (target_rate > high)
239 return high;
240 else
241 return target_rate;
242#else
243 if (target_rate > low)
244 return high;
245 else
246 return low;
247#endif
248
249}
250
251unsigned long omap2_dpllcore_recalc(struct clk *clk)
252{
253 return omap2xxx_clk_get_core_rate(clk);
254}
255
256int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate)
257{
258 u32 cur_rate, low, mult, div, valid_rate, done_rate;
259 u32 bypass = 0;
260 struct prcm_config tmpset;
261 const struct dpll_data *dd;
262
263 cur_rate = omap2xxx_clk_get_core_rate(dclk);
264 mult = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
265 mult &= OMAP24XX_CORE_CLK_SRC_MASK;
266
267 if ((rate == (cur_rate / 2)) && (mult == 2)) {
268 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
269 } else if ((rate == (cur_rate * 2)) && (mult == 1)) {
270 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
271 } else if (rate != cur_rate) {
272 valid_rate = omap2_dpllcore_round_rate(rate);
273 if (valid_rate != rate)
274 return -EINVAL;
275
276 if (mult == 1)
277 low = curr_prcm_set->dpll_speed;
278 else
279 low = curr_prcm_set->dpll_speed / 2;
280
281 dd = clk->dpll_data;
282 if (!dd)
283 return -EINVAL;
284
285 tmpset.cm_clksel1_pll = __raw_readl(dd->mult_div1_reg);
286 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
287 dd->div1_mask);
288 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
289 tmpset.cm_clksel2_pll = cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
290 tmpset.cm_clksel2_pll &= ~OMAP24XX_CORE_CLK_SRC_MASK;
291 if (rate > low) {
292 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL_X2;
293 mult = ((rate / 2) / 1000000);
294 done_rate = CORE_CLK_SRC_DPLL_X2;
295 } else {
296 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL;
297 mult = (rate / 1000000);
298 done_rate = CORE_CLK_SRC_DPLL;
299 }
300 tmpset.cm_clksel1_pll |= (div << __ffs(dd->mult_mask));
301 tmpset.cm_clksel1_pll |= (mult << __ffs(dd->div1_mask));
302
303 /* Worst case */
304 tmpset.base_sdrc_rfr = SDRC_RFR_CTRL_BYPASS;
305
306 if (rate == curr_prcm_set->xtal_speed) /* If asking for 1-1 */
307 bypass = 1;
308
309 /* For omap2xxx_sdrc_init_params() */
310 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
311
312 /* Force dll lock mode */
313 omap2_set_prcm(tmpset.cm_clksel1_pll, tmpset.base_sdrc_rfr,
314 bypass);
315
316 /* Errata: ret dll entry state */
317 omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
318 omap2xxx_sdrc_reprogram(done_rate, 0);
319 }
320
321 return 0;
322}
323
324/**
325 * omap2_table_mpu_recalc - just return the MPU speed
326 * @clk: virt_prcm_set struct clk
327 *
328 * Set virt_prcm_set's rate to the mpu_speed field of the current PRCM set.
329 */
330unsigned long omap2_table_mpu_recalc(struct clk *clk)
331{
332 return curr_prcm_set->mpu_speed;
333}
334
335/*
336 * Look for a rate equal or less than the target rate given a configuration set.
337 *
338 * What's not entirely clear is "which" field represents the key field.
339 * Some might argue L3-DDR, others ARM, others IVA. This code is simple and
340 * just uses the ARM rates.
341 */
342long omap2_round_to_table_rate(struct clk *clk, unsigned long rate)
343{
344 const struct prcm_config *ptr;
345 long highest_rate;
346 long sys_ck_rate;
347
348 sys_ck_rate = clk_get_rate(sclk);
349
350 highest_rate = -EINVAL;
351
352 for (ptr = rate_table; ptr->mpu_speed; ptr++) {
353 if (!(ptr->flags & cpu_mask))
354 continue;
355 if (ptr->xtal_speed != sys_ck_rate)
356 continue;
357
358 highest_rate = ptr->mpu_speed;
359
360 /* Can check only after xtal frequency check */
361 if (ptr->mpu_speed <= rate)
362 break;
363 }
364 return highest_rate;
365}
366
367/* Sets basic clocks based on the specified rate */
368int omap2_select_table_rate(struct clk *clk, unsigned long rate)
369{
370 u32 cur_rate, done_rate, bypass = 0, tmp;
371 const struct prcm_config *prcm;
372 unsigned long found_speed = 0;
373 unsigned long flags;
374 long sys_ck_rate;
375
376 sys_ck_rate = clk_get_rate(sclk);
377
378 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
379 if (!(prcm->flags & cpu_mask))
380 continue;
381
382 if (prcm->xtal_speed != sys_ck_rate)
383 continue;
384
385 if (prcm->mpu_speed <= rate) {
386 found_speed = prcm->mpu_speed;
387 break;
388 }
389 }
390
391 if (!found_speed) {
392 printk(KERN_INFO "Could not set MPU rate to %luMHz\n",
393 rate / 1000000);
394 return -EINVAL;
395 }
396
397 curr_prcm_set = prcm;
398 cur_rate = omap2xxx_clk_get_core_rate(dclk);
399
400 if (prcm->dpll_speed == cur_rate / 2) {
401 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
402 } else if (prcm->dpll_speed == cur_rate * 2) {
403 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
404 } else if (prcm->dpll_speed != cur_rate) {
405 local_irq_save(flags);
406
407 if (prcm->dpll_speed == prcm->xtal_speed)
408 bypass = 1;
409
410 if ((prcm->cm_clksel2_pll & OMAP24XX_CORE_CLK_SRC_MASK) ==
411 CORE_CLK_SRC_DPLL_X2)
412 done_rate = CORE_CLK_SRC_DPLL_X2;
413 else
414 done_rate = CORE_CLK_SRC_DPLL;
415
416 /* MPU divider */
417 cm_write_mod_reg(prcm->cm_clksel_mpu, MPU_MOD, CM_CLKSEL);
418
419 /* dsp + iva1 div(2420), iva2.1(2430) */
420 cm_write_mod_reg(prcm->cm_clksel_dsp,
421 OMAP24XX_DSP_MOD, CM_CLKSEL);
422
423 cm_write_mod_reg(prcm->cm_clksel_gfx, GFX_MOD, CM_CLKSEL);
424
425 /* Major subsystem dividers */
426 tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
427 cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD,
428 CM_CLKSEL1);
429
430 if (cpu_is_omap2430())
431 cm_write_mod_reg(prcm->cm_clksel_mdm,
432 OMAP2430_MDM_MOD, CM_CLKSEL);
433
434 /* x2 to enter omap2xxx_sdrc_init_params() */
435 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
436
437 omap2_set_prcm(prcm->cm_clksel1_pll, prcm->base_sdrc_rfr,
438 bypass);
439
440 omap2xxx_sdrc_init_params(omap2xxx_sdrc_dll_is_unlocked());
441 omap2xxx_sdrc_reprogram(done_rate, 0);
442
443 local_irq_restore(flags);
444 }
445
446 return 0;
447}
448
449#ifdef CONFIG_CPU_FREQ
450/*
451 * Walk PRCM rate table and fillout cpufreq freq_table
452 */
453static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)];
454
455void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
456{
457 struct prcm_config *prcm;
458 int i = 0;
459
460 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
461 if (!(prcm->flags & cpu_mask))
462 continue;
463 if (prcm->xtal_speed != sys_ck.rate)
464 continue;
465
466 /* don't put bypass rates in table */
467 if (prcm->dpll_speed == prcm->xtal_speed)
468 continue;
469
470 freq_table[i].index = i;
471 freq_table[i].frequency = prcm->mpu_speed / 1000;
472 i++;
473 }
474
475 if (i == 0) {
476 printk(KERN_WARNING "%s: failed to initialize frequency "
477 "table\n", __func__);
478 return;
479 }
480
481 freq_table[i].index = i;
482 freq_table[i].frequency = CPUFREQ_TABLE_END;
483
484 *table = &freq_table[0];
485}
486#endif
487
488struct clk_functions omap2_clk_functions = {
489 .clk_enable = omap2_clk_enable,
490 .clk_disable = omap2_clk_disable,
491 .clk_round_rate = omap2_clk_round_rate,
492 .clk_set_rate = omap2_clk_set_rate,
493 .clk_set_parent = omap2_clk_set_parent,
494 .clk_disable_unused = omap2_clk_disable_unused,
495#ifdef CONFIG_CPU_FREQ
496 .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
497#endif
498};
499
500static u32 omap2_get_apll_clkin(void)
501{
502 u32 aplls, srate = 0;
503
504 aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
505 aplls &= OMAP24XX_APLLS_CLKIN_MASK;
506 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
507
508 if (aplls == APLLS_CLKIN_19_2MHZ)
509 srate = 19200000;
510 else if (aplls == APLLS_CLKIN_13MHZ)
511 srate = 13000000;
512 else if (aplls == APLLS_CLKIN_12MHZ)
513 srate = 12000000;
514
515 return srate;
516}
517
518static u32 omap2_get_sysclkdiv(void)
519{
520 u32 div;
521
522 div = __raw_readl(prcm_clksrc_ctrl);
523 div &= OMAP_SYSCLKDIV_MASK;
524 div >>= OMAP_SYSCLKDIV_SHIFT;
525
526 return div;
527}
528
529unsigned long omap2_osc_clk_recalc(struct clk *clk)
530{
531 return omap2_get_apll_clkin() * omap2_get_sysclkdiv();
532}
533
534unsigned long omap2_sys_clk_recalc(struct clk *clk)
535{
536 return clk->parent->rate / omap2_get_sysclkdiv();
537}
538
539/*
540 * Set clocks for bypass mode for reboot to work.
541 */
542void omap2_clk_prepare_for_reboot(void)
543{
544 u32 rate;
545
546 if (vclk == NULL || sclk == NULL)
547 return;
548
549 rate = clk_get_rate(sclk);
550 clk_set_rate(vclk, rate);
551}
552
553/*
554 * Switch the MPU rate if specified on cmdline.
555 * We cannot do this early until cmdline is parsed.
556 */
557static int __init omap2_clk_arch_init(void)
558{
559 struct clk *virt_prcm_set, *sys_ck, *dpll_ck, *mpu_ck;
560 unsigned long sys_ck_rate;
561
562 if (!mpurate)
563 return -EINVAL;
564
565 virt_prcm_set = clk_get(NULL, "virt_prcm_set");
566 sys_ck = clk_get(NULL, "sys_ck");
567 dpll_ck = clk_get(NULL, "dpll_ck");
568 mpu_ck = clk_get(NULL, "mpu_ck");
569
570 if (clk_set_rate(virt_prcm_set, mpurate))
571 printk(KERN_ERR "Could not find matching MPU rate\n");
572
573 recalculate_root_clocks();
574
575 sys_ck_rate = clk_get_rate(sys_ck);
576
577 pr_info("Switched to new clocking rate (Crystal/DPLL/MPU): "
578 "%ld.%01ld/%ld/%ld MHz\n",
579 (sys_ck_rate / 1000000), (sys_ck_rate / 100000) % 10,
580 (clk_get_rate(dpll_ck) / 1000000),
581 (clk_get_rate(mpu_ck) / 1000000));
582
583 return 0;
584}
585arch_initcall(omap2_clk_arch_init);
586
587
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h
new file mode 100644
index 000000000000..e35efde4bd80
--- /dev/null
+++ b/arch/arm/mach-omap2/clock2xxx.h
@@ -0,0 +1,41 @@
1/*
2 * OMAP2 clock function prototypes and macros
3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation
6 */
7
8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H
9#define __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H
10
11unsigned long omap2_table_mpu_recalc(struct clk *clk);
12int omap2_select_table_rate(struct clk *clk, unsigned long rate);
13long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
14unsigned long omap2_sys_clk_recalc(struct clk *clk);
15unsigned long omap2_osc_clk_recalc(struct clk *clk);
16unsigned long omap2_sys_clk_recalc(struct clk *clk);
17unsigned long omap2_dpllcore_recalc(struct clk *clk);
18int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
19unsigned long omap2xxx_clk_get_core_rate(struct clk *clk);
20
21/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
22#ifdef CONFIG_ARCH_OMAP2420
23#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR
24#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2420_PRCM_CLKOUT_CTRL
25#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
26#else
27#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR
28#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2430_PRCM_CLKOUT_CTRL
29#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
30#endif
31
32extern void __iomem *prcm_clksrc_ctrl;
33
34extern struct clk *dclk;
35
36extern const struct clkops clkops_omap2430_i2chs_wait;
37extern const struct clkops clkops_oscck;
38extern const struct clkops clkops_apll96;
39extern const struct clkops clkops_apll54;
40
41#endif
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock2xxx_data.c
index d19cf7a7d8db..97dc7cf7751d 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock2xxx_data.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * linux/arch/arm/mach-omap2/clock24xx.h 2 * linux/arch/arm/mach-omap2/clock2xxx_data.c
3 * 3 *
4 * Copyright (C) 2005-2008 Texas Instruments, Inc. 4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2008 Nokia Corporation 5 * Copyright (C) 2004-2009 Nokia Corporation
6 * 6 *
7 * Contacts: 7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com> 8 * Richard Woodruff <r-woodruff2@ti.com>
@@ -13,600 +13,21 @@
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 */ 14 */
15 15
16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H 16#include <linux/module.h>
17#define __ARCH_ARM_MACH_OMAP2_CLOCK24XX_H 17#include <linux/kernel.h>
18#include <linux/clk.h>
18 19
19#include "clock.h" 20#include <plat/clkdev_omap.h>
20 21
22#include "clock.h"
23#include "clock2xxx.h"
24#include "opp2xxx.h"
21#include "prm.h" 25#include "prm.h"
22#include "cm.h" 26#include "cm.h"
23#include "prm-regbits-24xx.h" 27#include "prm-regbits-24xx.h"
24#include "cm-regbits-24xx.h" 28#include "cm-regbits-24xx.h"
25#include "sdrc.h" 29#include "sdrc.h"
26 30
27/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
28#ifdef CONFIG_ARCH_OMAP2420
29#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR
30#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2420_PRCM_CLKOUT_CTRL
31#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
32#else
33#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR
34#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2430_PRCM_CLKOUT_CTRL
35#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
36#endif
37
38static unsigned long omap2_table_mpu_recalc(struct clk *clk);
39static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
40static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
41static unsigned long omap2_sys_clk_recalc(struct clk *clk);
42static unsigned long omap2_osc_clk_recalc(struct clk *clk);
43static unsigned long omap2_sys_clk_recalc(struct clk *clk);
44static unsigned long omap2_dpllcore_recalc(struct clk *clk);
45static int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
46
47/* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
48 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
49 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
50 */
51struct prcm_config {
52 unsigned long xtal_speed; /* crystal rate */
53 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
54 unsigned long mpu_speed; /* speed of MPU */
55 unsigned long cm_clksel_mpu; /* mpu divider */
56 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
57 unsigned long cm_clksel_gfx; /* gfx dividers */
58 unsigned long cm_clksel1_core; /* major subsystem dividers */
59 unsigned long cm_clksel1_pll; /* m,n */
60 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
61 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
62 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
63 unsigned char flags;
64};
65
66/*
67 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
68 * These configurations are characterized by voltage and speed for clocks.
69 * The device is only validated for certain combinations. One way to express
70 * these combinations is via the 'ratio's' which the clocks operate with
71 * respect to each other. These ratio sets are for a given voltage/DPLL
72 * setting. All configurations can be described by a DPLL setting and a ratio
73 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
74 *
75 * 2430 differs from 2420 in that there are no more phase synchronizers used.
76 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
77 * 2430 (iva2.1, NOdsp, mdm)
78 */
79
80/* Core fields for cm_clksel, not ratio governed */
81#define RX_CLKSEL_DSS1 (0x10 << 8)
82#define RX_CLKSEL_DSS2 (0x0 << 13)
83#define RX_CLKSEL_SSI (0x5 << 20)
84
85/*-------------------------------------------------------------------------
86 * Voltage/DPLL ratios
87 *-------------------------------------------------------------------------*/
88
89/* 2430 Ratio's, 2430-Ratio Config 1 */
90#define R1_CLKSEL_L3 (4 << 0)
91#define R1_CLKSEL_L4 (2 << 5)
92#define R1_CLKSEL_USB (4 << 25)
93#define R1_CM_CLKSEL1_CORE_VAL R1_CLKSEL_USB | RX_CLKSEL_SSI | \
94 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
95 R1_CLKSEL_L4 | R1_CLKSEL_L3
96#define R1_CLKSEL_MPU (2 << 0)
97#define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
98#define R1_CLKSEL_DSP (2 << 0)
99#define R1_CLKSEL_DSP_IF (2 << 5)
100#define R1_CM_CLKSEL_DSP_VAL R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF
101#define R1_CLKSEL_GFX (2 << 0)
102#define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
103#define R1_CLKSEL_MDM (4 << 0)
104#define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
105
106/* 2430-Ratio Config 2 */
107#define R2_CLKSEL_L3 (6 << 0)
108#define R2_CLKSEL_L4 (2 << 5)
109#define R2_CLKSEL_USB (2 << 25)
110#define R2_CM_CLKSEL1_CORE_VAL R2_CLKSEL_USB | RX_CLKSEL_SSI | \
111 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
112 R2_CLKSEL_L4 | R2_CLKSEL_L3
113#define R2_CLKSEL_MPU (2 << 0)
114#define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
115#define R2_CLKSEL_DSP (2 << 0)
116#define R2_CLKSEL_DSP_IF (3 << 5)
117#define R2_CM_CLKSEL_DSP_VAL R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF
118#define R2_CLKSEL_GFX (2 << 0)
119#define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
120#define R2_CLKSEL_MDM (6 << 0)
121#define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
122
123/* 2430-Ratio Bootm (BYPASS) */
124#define RB_CLKSEL_L3 (1 << 0)
125#define RB_CLKSEL_L4 (1 << 5)
126#define RB_CLKSEL_USB (1 << 25)
127#define RB_CM_CLKSEL1_CORE_VAL RB_CLKSEL_USB | RX_CLKSEL_SSI | \
128 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
129 RB_CLKSEL_L4 | RB_CLKSEL_L3
130#define RB_CLKSEL_MPU (1 << 0)
131#define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
132#define RB_CLKSEL_DSP (1 << 0)
133#define RB_CLKSEL_DSP_IF (1 << 5)
134#define RB_CM_CLKSEL_DSP_VAL RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF
135#define RB_CLKSEL_GFX (1 << 0)
136#define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
137#define RB_CLKSEL_MDM (1 << 0)
138#define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
139
140/* 2420 Ratio Equivalents */
141#define RXX_CLKSEL_VLYNQ (0x12 << 15)
142#define RXX_CLKSEL_SSI (0x8 << 20)
143
144/* 2420-PRCM III 532MHz core */
145#define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
146#define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
147#define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
148#define RIII_CM_CLKSEL1_CORE_VAL RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
149 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
150 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
151 RIII_CLKSEL_L3
152#define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
153#define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
154#define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
155#define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
156#define RIII_SYNC_DSP (1 << 7) /* Enable sync */
157#define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
158#define RIII_SYNC_IVA (1 << 13) /* Enable sync */
159#define RIII_CM_CLKSEL_DSP_VAL RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
160 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
161 RIII_CLKSEL_DSP
162#define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
163#define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
164
165/* 2420-PRCM II 600MHz core */
166#define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
167#define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
168#define RII_CLKSEL_USB (2 << 25) /* 50MHz */
169#define RII_CM_CLKSEL1_CORE_VAL RII_CLKSEL_USB | \
170 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
171 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
172 RII_CLKSEL_L4 | RII_CLKSEL_L3
173#define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
174#define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
175#define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
176#define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
177#define RII_SYNC_DSP (0 << 7) /* Bypass sync */
178#define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
179#define RII_SYNC_IVA (0 << 13) /* Bypass sync */
180#define RII_CM_CLKSEL_DSP_VAL RII_SYNC_IVA | RII_CLKSEL_IVA | \
181 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
182 RII_CLKSEL_DSP
183#define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
184#define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
185
186/* 2420-PRCM I 660MHz core */
187#define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
188#define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
189#define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
190#define RI_CM_CLKSEL1_CORE_VAL RI_CLKSEL_USB | \
191 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
192 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
193 RI_CLKSEL_L4 | RI_CLKSEL_L3
194#define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
195#define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
196#define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
197#define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
198#define RI_SYNC_DSP (1 << 7) /* Activate sync */
199#define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
200#define RI_SYNC_IVA (0 << 13) /* Bypass sync */
201#define RI_CM_CLKSEL_DSP_VAL RI_SYNC_IVA | RI_CLKSEL_IVA | \
202 RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
203 RI_CLKSEL_DSP
204#define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
205#define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
206
207/* 2420-PRCM VII (boot) */
208#define RVII_CLKSEL_L3 (1 << 0)
209#define RVII_CLKSEL_L4 (1 << 5)
210#define RVII_CLKSEL_DSS1 (1 << 8)
211#define RVII_CLKSEL_DSS2 (0 << 13)
212#define RVII_CLKSEL_VLYNQ (1 << 15)
213#define RVII_CLKSEL_SSI (1 << 20)
214#define RVII_CLKSEL_USB (1 << 25)
215
216#define RVII_CM_CLKSEL1_CORE_VAL RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
217 RVII_CLKSEL_VLYNQ | RVII_CLKSEL_DSS2 | \
218 RVII_CLKSEL_DSS1 | RVII_CLKSEL_L4 | RVII_CLKSEL_L3
219
220#define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
221#define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
222
223#define RVII_CLKSEL_DSP (1 << 0)
224#define RVII_CLKSEL_DSP_IF (1 << 5)
225#define RVII_SYNC_DSP (0 << 7)
226#define RVII_CLKSEL_IVA (1 << 8)
227#define RVII_SYNC_IVA (0 << 13)
228#define RVII_CM_CLKSEL_DSP_VAL RVII_SYNC_IVA | RVII_CLKSEL_IVA | RVII_SYNC_DSP | \
229 RVII_CLKSEL_DSP_IF | RVII_CLKSEL_DSP
230
231#define RVII_CLKSEL_GFX (1 << 0)
232#define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
233
234/*-------------------------------------------------------------------------
235 * 2430 Target modes: Along with each configuration the CPU has several
236 * modes which goes along with them. Modes mainly are the addition of
237 * describe DPLL combinations to go along with a ratio.
238 *-------------------------------------------------------------------------*/
239
240/* Hardware governed */
241#define MX_48M_SRC (0 << 3)
242#define MX_54M_SRC (0 << 5)
243#define MX_APLLS_CLIKIN_12 (3 << 23)
244#define MX_APLLS_CLIKIN_13 (2 << 23)
245#define MX_APLLS_CLIKIN_19_2 (0 << 23)
246
247/*
248 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
249 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
250 */
251#define M5A_DPLL_MULT_12 (133 << 12)
252#define M5A_DPLL_DIV_12 (5 << 8)
253#define M5A_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
254 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
255 MX_APLLS_CLIKIN_12
256#define M5A_DPLL_MULT_13 (61 << 12)
257#define M5A_DPLL_DIV_13 (2 << 8)
258#define M5A_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
259 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
260 MX_APLLS_CLIKIN_13
261#define M5A_DPLL_MULT_19 (55 << 12)
262#define M5A_DPLL_DIV_19 (3 << 8)
263#define M5A_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
264 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
265 MX_APLLS_CLIKIN_19_2
266/* #5b (ratio1) target DPLL = 200*2 = 400MHz */
267#define M5B_DPLL_MULT_12 (50 << 12)
268#define M5B_DPLL_DIV_12 (2 << 8)
269#define M5B_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
270 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
271 MX_APLLS_CLIKIN_12
272#define M5B_DPLL_MULT_13 (200 << 12)
273#define M5B_DPLL_DIV_13 (12 << 8)
274
275#define M5B_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
276 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
277 MX_APLLS_CLIKIN_13
278#define M5B_DPLL_MULT_19 (125 << 12)
279#define M5B_DPLL_DIV_19 (31 << 8)
280#define M5B_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
281 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
282 MX_APLLS_CLIKIN_19_2
283/*
284 * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz
285 */
286#define M4_DPLL_MULT_12 (133 << 12)
287#define M4_DPLL_DIV_12 (3 << 8)
288#define M4_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
289 M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \
290 MX_APLLS_CLIKIN_12
291
292#define M4_DPLL_MULT_13 (399 << 12)
293#define M4_DPLL_DIV_13 (12 << 8)
294#define M4_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
295 M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \
296 MX_APLLS_CLIKIN_13
297
298#define M4_DPLL_MULT_19 (145 << 12)
299#define M4_DPLL_DIV_19 (6 << 8)
300#define M4_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
301 M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \
302 MX_APLLS_CLIKIN_19_2
303
304/*
305 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
306 */
307#define M3_DPLL_MULT_12 (55 << 12)
308#define M3_DPLL_DIV_12 (1 << 8)
309#define M3_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
310 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
311 MX_APLLS_CLIKIN_12
312#define M3_DPLL_MULT_13 (76 << 12)
313#define M3_DPLL_DIV_13 (2 << 8)
314#define M3_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
315 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
316 MX_APLLS_CLIKIN_13
317#define M3_DPLL_MULT_19 (17 << 12)
318#define M3_DPLL_DIV_19 (0 << 8)
319#define M3_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
320 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
321 MX_APLLS_CLIKIN_19_2
322
323/*
324 * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz
325 */
326#define M2_DPLL_MULT_12 (55 << 12)
327#define M2_DPLL_DIV_12 (1 << 8)
328#define M2_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
329 M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \
330 MX_APLLS_CLIKIN_12
331
332/* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2,
333 * relock time issue */
334/* Core frequency changed from 330/165 to 329/164 MHz*/
335#define M2_DPLL_MULT_13 (76 << 12)
336#define M2_DPLL_DIV_13 (2 << 8)
337#define M2_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
338 M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \
339 MX_APLLS_CLIKIN_13
340
341#define M2_DPLL_MULT_19 (17 << 12)
342#define M2_DPLL_DIV_19 (0 << 8)
343#define M2_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | \
344 M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \
345 MX_APLLS_CLIKIN_19_2
346
347/* boot (boot) */
348#define MB_DPLL_MULT (1 << 12)
349#define MB_DPLL_DIV (0 << 8)
350#define MB_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
351 MB_DPLL_MULT | MX_APLLS_CLIKIN_12
352
353#define MB_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
354 MB_DPLL_MULT | MX_APLLS_CLIKIN_13
355
356#define MB_CM_CLKSEL1_PLL_19_VAL MX_48M_SRC | MX_54M_SRC | MB_DPLL_DIV |\
357 MB_DPLL_MULT | MX_APLLS_CLIKIN_19
358
359/*
360 * 2430 - chassis (sedna)
361 * 165 (ratio1) same as above #2
362 * 150 (ratio1)
363 * 133 (ratio2) same as above #4
364 * 110 (ratio2) same as above #3
365 * 104 (ratio2)
366 * boot (boot)
367 */
368
369/* PRCM I target DPLL = 2*330MHz = 660MHz */
370#define MI_DPLL_MULT_12 (55 << 12)
371#define MI_DPLL_DIV_12 (1 << 8)
372#define MI_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
373 MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
374 MX_APLLS_CLIKIN_12
375
376/*
377 * 2420 Equivalent - mode registers
378 * PRCM II , target DPLL = 2*300MHz = 600MHz
379 */
380#define MII_DPLL_MULT_12 (50 << 12)
381#define MII_DPLL_DIV_12 (1 << 8)
382#define MII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
383 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
384 MX_APLLS_CLIKIN_12
385#define MII_DPLL_MULT_13 (300 << 12)
386#define MII_DPLL_DIV_13 (12 << 8)
387#define MII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
388 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
389 MX_APLLS_CLIKIN_13
390
391/* PRCM III target DPLL = 2*266 = 532MHz*/
392#define MIII_DPLL_MULT_12 (133 << 12)
393#define MIII_DPLL_DIV_12 (5 << 8)
394#define MIII_CM_CLKSEL1_PLL_12_VAL MX_48M_SRC | MX_54M_SRC | \
395 MIII_DPLL_DIV_12 | MIII_DPLL_MULT_12 | \
396 MX_APLLS_CLIKIN_12
397#define MIII_DPLL_MULT_13 (266 << 12)
398#define MIII_DPLL_DIV_13 (12 << 8)
399#define MIII_CM_CLKSEL1_PLL_13_VAL MX_48M_SRC | MX_54M_SRC | \
400 MIII_DPLL_DIV_13 | MIII_DPLL_MULT_13 | \
401 MX_APLLS_CLIKIN_13
402
403/* PRCM VII (boot bypass) */
404#define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
405#define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
406
407/* High and low operation value */
408#define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
409#define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
410
411/* MPU speed defines */
412#define S12M 12000000
413#define S13M 13000000
414#define S19M 19200000
415#define S26M 26000000
416#define S100M 100000000
417#define S133M 133000000
418#define S150M 150000000
419#define S164M 164000000
420#define S165M 165000000
421#define S199M 199000000
422#define S200M 200000000
423#define S266M 266000000
424#define S300M 300000000
425#define S329M 329000000
426#define S330M 330000000
427#define S399M 399000000
428#define S400M 400000000
429#define S532M 532000000
430#define S600M 600000000
431#define S658M 658000000
432#define S660M 660000000
433#define S798M 798000000
434
435/*-------------------------------------------------------------------------
436 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
437 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
438 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
439 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
440 *
441 * Filling in table based on H4 boards and 2430-SDPs variants available.
442 * There are quite a few more rates combinations which could be defined.
443 *
444 * When multiple values are defined the start up will try and choose the
445 * fastest one. If a 'fast' value is defined, then automatically, the /2
446 * one should be included as it can be used. Generally having more that
447 * one fast set does not make sense, as static timings need to be changed
448 * to change the set. The exception is the bypass setting which is
449 * availble for low power bypass.
450 *
451 * Note: This table needs to be sorted, fastest to slowest.
452 *-------------------------------------------------------------------------*/
453static struct prcm_config rate_table[] = {
454 /* PRCM I - FAST */
455 {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
456 RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
457 RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
458 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
459 RATE_IN_242X},
460
461 /* PRCM II - FAST */
462 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
463 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
464 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
465 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
466 RATE_IN_242X},
467
468 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
469 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
470 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
471 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
472 RATE_IN_242X},
473
474 /* PRCM III - FAST */
475 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
476 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
477 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
478 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
479 RATE_IN_242X},
480
481 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
482 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
483 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
484 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
485 RATE_IN_242X},
486
487 /* PRCM II - SLOW */
488 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
489 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
490 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
491 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
492 RATE_IN_242X},
493
494 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
495 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
496 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
497 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
498 RATE_IN_242X},
499
500 /* PRCM III - SLOW */
501 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
502 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
503 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
504 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
505 RATE_IN_242X},
506
507 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
508 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
509 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
510 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
511 RATE_IN_242X},
512
513 /* PRCM-VII (boot-bypass) */
514 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
515 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
516 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
517 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
518 RATE_IN_242X},
519
520 /* PRCM-VII (boot-bypass) */
521 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
522 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
523 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
524 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
525 RATE_IN_242X},
526
527 /* PRCM #4 - ratio2 (ES2.1) - FAST */
528 {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
529 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
530 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
531 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
532 SDRC_RFR_CTRL_133MHz,
533 RATE_IN_243X},
534
535 /* PRCM #2 - ratio1 (ES2) - FAST */
536 {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
537 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
538 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
539 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
540 SDRC_RFR_CTRL_165MHz,
541 RATE_IN_243X},
542
543 /* PRCM #5a - ratio1 - FAST */
544 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
545 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
546 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
547 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
548 SDRC_RFR_CTRL_133MHz,
549 RATE_IN_243X},
550
551 /* PRCM #5b - ratio1 - FAST */
552 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
553 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
554 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
555 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
556 SDRC_RFR_CTRL_100MHz,
557 RATE_IN_243X},
558
559 /* PRCM #4 - ratio1 (ES2.1) - SLOW */
560 {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
561 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
562 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
563 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
564 SDRC_RFR_CTRL_133MHz,
565 RATE_IN_243X},
566
567 /* PRCM #2 - ratio1 (ES2) - SLOW */
568 {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
569 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
570 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
571 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
572 SDRC_RFR_CTRL_165MHz,
573 RATE_IN_243X},
574
575 /* PRCM #5a - ratio1 - SLOW */
576 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
577 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
578 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
579 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
580 SDRC_RFR_CTRL_133MHz,
581 RATE_IN_243X},
582
583 /* PRCM #5b - ratio1 - SLOW*/
584 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
585 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
586 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
587 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
588 SDRC_RFR_CTRL_100MHz,
589 RATE_IN_243X},
590
591 /* PRCM-boot/bypass */
592 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
593 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
594 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
595 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
596 SDRC_RFR_CTRL_BYPASS,
597 RATE_IN_243X},
598
599 /* PRCM-boot/bypass */
600 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
601 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
602 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
603 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
604 SDRC_RFR_CTRL_BYPASS,
605 RATE_IN_243X},
606
607 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
608};
609
610/*------------------------------------------------------------------------- 31/*-------------------------------------------------------------------------
611 * 24xx clock tree. 32 * 24xx clock tree.
612 * 33 *
@@ -708,7 +129,7 @@ static struct clk dpll_ck = {
708 129
709static struct clk apll96_ck = { 130static struct clk apll96_ck = {
710 .name = "apll96_ck", 131 .name = "apll96_ck",
711 .ops = &clkops_fixed, 132 .ops = &clkops_apll96,
712 .parent = &sys_ck, 133 .parent = &sys_ck,
713 .rate = 96000000, 134 .rate = 96000000,
714 .flags = RATE_FIXED | ENABLE_ON_INIT, 135 .flags = RATE_FIXED | ENABLE_ON_INIT,
@@ -719,7 +140,7 @@ static struct clk apll96_ck = {
719 140
720static struct clk apll54_ck = { 141static struct clk apll54_ck = {
721 .name = "apll54_ck", 142 .name = "apll54_ck",
722 .ops = &clkops_fixed, 143 .ops = &clkops_apll54,
723 .parent = &sys_ck, 144 .parent = &sys_ck,
724 .rate = 54000000, 145 .rate = 54000000,
725 .flags = RATE_FIXED | ENABLE_ON_INIT, 146 .flags = RATE_FIXED | ENABLE_ON_INIT,
@@ -2653,5 +2074,236 @@ static struct clk virt_prcm_set = {
2653 .round_rate = &omap2_round_to_table_rate, 2074 .round_rate = &omap2_round_to_table_rate,
2654}; 2075};
2655 2076
2656#endif 2077
2078/*
2079 * clkdev integration
2080 */
2081
2082static struct omap_clk omap24xx_clks[] = {
2083 /* external root sources */
2084 CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X | CK_242X),
2085 CLK(NULL, "secure_32k_ck", &secure_32k_ck, CK_243X | CK_242X),
2086 CLK(NULL, "osc_ck", &osc_ck, CK_243X | CK_242X),
2087 CLK(NULL, "sys_ck", &sys_ck, CK_243X | CK_242X),
2088 CLK(NULL, "alt_ck", &alt_ck, CK_243X | CK_242X),
2089 /* internal analog sources */
2090 CLK(NULL, "dpll_ck", &dpll_ck, CK_243X | CK_242X),
2091 CLK(NULL, "apll96_ck", &apll96_ck, CK_243X | CK_242X),
2092 CLK(NULL, "apll54_ck", &apll54_ck, CK_243X | CK_242X),
2093 /* internal prcm root sources */
2094 CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X | CK_242X),
2095 CLK(NULL, "core_ck", &core_ck, CK_243X | CK_242X),
2096 CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X | CK_242X),
2097 CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X | CK_242X),
2098 CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X | CK_242X),
2099 CLK(NULL, "ck_wdt1_osc", &wdt1_osc_ck, CK_243X | CK_242X),
2100 CLK(NULL, "sys_clkout_src", &sys_clkout_src, CK_243X | CK_242X),
2101 CLK(NULL, "sys_clkout", &sys_clkout, CK_243X | CK_242X),
2102 CLK(NULL, "sys_clkout2_src", &sys_clkout2_src, CK_242X),
2103 CLK(NULL, "sys_clkout2", &sys_clkout2, CK_242X),
2104 CLK(NULL, "emul_ck", &emul_ck, CK_242X),
2105 /* mpu domain clocks */
2106 CLK(NULL, "mpu_ck", &mpu_ck, CK_243X | CK_242X),
2107 /* dsp domain clocks */
2108 CLK(NULL, "dsp_fck", &dsp_fck, CK_243X | CK_242X),
2109 CLK(NULL, "dsp_irate_ick", &dsp_irate_ick, CK_243X | CK_242X),
2110 CLK(NULL, "dsp_ick", &dsp_ick, CK_242X),
2111 CLK(NULL, "iva2_1_ick", &iva2_1_ick, CK_243X),
2112 CLK(NULL, "iva1_ifck", &iva1_ifck, CK_242X),
2113 CLK(NULL, "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X),
2114 /* GFX domain clocks */
2115 CLK(NULL, "gfx_3d_fck", &gfx_3d_fck, CK_243X | CK_242X),
2116 CLK(NULL, "gfx_2d_fck", &gfx_2d_fck, CK_243X | CK_242X),
2117 CLK(NULL, "gfx_ick", &gfx_ick, CK_243X | CK_242X),
2118 /* Modem domain clocks */
2119 CLK(NULL, "mdm_ick", &mdm_ick, CK_243X),
2120 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
2121 /* DSS domain clocks */
2122 CLK("omapdss", "ick", &dss_ick, CK_243X | CK_242X),
2123 CLK("omapdss", "dss1_fck", &dss1_fck, CK_243X | CK_242X),
2124 CLK("omapdss", "dss2_fck", &dss2_fck, CK_243X | CK_242X),
2125 CLK("omapdss", "tv_fck", &dss_54m_fck, CK_243X | CK_242X),
2126 /* L3 domain clocks */
2127 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X),
2128 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X),
2129 CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_243X | CK_242X),
2130 /* L4 domain clocks */
2131 CLK(NULL, "l4_ck", &l4_ck, CK_243X | CK_242X),
2132 CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_243X | CK_242X),
2133 /* virtual meta-group clock */
2134 CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_243X | CK_242X),
2135 /* general l4 interface ck, multi-parent functional clk */
2136 CLK(NULL, "gpt1_ick", &gpt1_ick, CK_243X | CK_242X),
2137 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_243X | CK_242X),
2138 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_243X | CK_242X),
2139 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_243X | CK_242X),
2140 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_243X | CK_242X),
2141 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_243X | CK_242X),
2142 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_243X | CK_242X),
2143 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_243X | CK_242X),
2144 CLK(NULL, "gpt5_ick", &gpt5_ick, CK_243X | CK_242X),
2145 CLK(NULL, "gpt5_fck", &gpt5_fck, CK_243X | CK_242X),
2146 CLK(NULL, "gpt6_ick", &gpt6_ick, CK_243X | CK_242X),
2147 CLK(NULL, "gpt6_fck", &gpt6_fck, CK_243X | CK_242X),
2148 CLK(NULL, "gpt7_ick", &gpt7_ick, CK_243X | CK_242X),
2149 CLK(NULL, "gpt7_fck", &gpt7_fck, CK_243X | CK_242X),
2150 CLK(NULL, "gpt8_ick", &gpt8_ick, CK_243X | CK_242X),
2151 CLK(NULL, "gpt8_fck", &gpt8_fck, CK_243X | CK_242X),
2152 CLK(NULL, "gpt9_ick", &gpt9_ick, CK_243X | CK_242X),
2153 CLK(NULL, "gpt9_fck", &gpt9_fck, CK_243X | CK_242X),
2154 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_243X | CK_242X),
2155 CLK(NULL, "gpt10_fck", &gpt10_fck, CK_243X | CK_242X),
2156 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_243X | CK_242X),
2157 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_243X | CK_242X),
2158 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X | CK_242X),
2159 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X | CK_242X),
2160 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X | CK_242X),
2161 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X | CK_242X),
2162 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X | CK_242X),
2163 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X | CK_242X),
2164 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
2165 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X),
2166 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
2167 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X),
2168 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
2169 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X),
2170 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X | CK_242X),
2171 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X | CK_242X),
2172 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X | CK_242X),
2173 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X | CK_242X),
2174 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
2175 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X),
2176 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X | CK_242X),
2177 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X | CK_242X),
2178 CLK(NULL, "uart2_ick", &uart2_ick, CK_243X | CK_242X),
2179 CLK(NULL, "uart2_fck", &uart2_fck, CK_243X | CK_242X),
2180 CLK(NULL, "uart3_ick", &uart3_ick, CK_243X | CK_242X),
2181 CLK(NULL, "uart3_fck", &uart3_fck, CK_243X | CK_242X),
2182 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X | CK_242X),
2183 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X | CK_242X),
2184 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X | CK_242X),
2185 CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X | CK_242X),
2186 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X | CK_242X),
2187 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X | CK_242X),
2188 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X | CK_242X),
2189 CLK(NULL, "icr_ick", &icr_ick, CK_243X),
2190 CLK("omap24xxcam", "fck", &cam_fck, CK_243X | CK_242X),
2191 CLK("omap24xxcam", "ick", &cam_ick, CK_243X | CK_242X),
2192 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_243X | CK_242X),
2193 CLK(NULL, "wdt4_ick", &wdt4_ick, CK_243X | CK_242X),
2194 CLK(NULL, "wdt4_fck", &wdt4_fck, CK_243X | CK_242X),
2195 CLK(NULL, "wdt3_ick", &wdt3_ick, CK_242X),
2196 CLK(NULL, "wdt3_fck", &wdt3_fck, CK_242X),
2197 CLK(NULL, "mspro_ick", &mspro_ick, CK_243X | CK_242X),
2198 CLK(NULL, "mspro_fck", &mspro_fck, CK_243X | CK_242X),
2199 CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X),
2200 CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X),
2201 CLK(NULL, "fac_ick", &fac_ick, CK_243X | CK_242X),
2202 CLK(NULL, "fac_fck", &fac_fck, CK_243X | CK_242X),
2203 CLK(NULL, "eac_ick", &eac_ick, CK_242X),
2204 CLK(NULL, "eac_fck", &eac_fck, CK_242X),
2205 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X | CK_242X),
2206 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X | CK_242X),
2207 CLK("i2c_omap.1", "ick", &i2c1_ick, CK_243X | CK_242X),
2208 CLK("i2c_omap.1", "fck", &i2c1_fck, CK_242X),
2209 CLK("i2c_omap.1", "fck", &i2chs1_fck, CK_243X),
2210 CLK("i2c_omap.2", "ick", &i2c2_ick, CK_243X | CK_242X),
2211 CLK("i2c_omap.2", "fck", &i2c2_fck, CK_242X),
2212 CLK("i2c_omap.2", "fck", &i2chs2_fck, CK_243X),
2213 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X | CK_242X),
2214 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X | CK_242X),
2215 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X | CK_242X),
2216 CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X),
2217 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X),
2218 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X),
2219 CLK(NULL, "des_ick", &des_ick, CK_243X | CK_242X),
2220 CLK(NULL, "sha_ick", &sha_ick, CK_243X | CK_242X),
2221 CLK("omap_rng", "ick", &rng_ick, CK_243X | CK_242X),
2222 CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X),
2223 CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X),
2224 CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X),
2225 CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X),
2226 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X),
2227 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X),
2228 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X),
2229 CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X),
2230 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
2231 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
2232 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
2233 CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
2234 CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
2235};
2236
2237/*
2238 * init code
2239 */
2240
2241int __init omap2_clk_init(void)
2242{
2243 const struct prcm_config *prcm;
2244 struct omap_clk *c;
2245 u32 clkrate;
2246 u16 cpu_clkflg;
2247
2248 if (cpu_is_omap242x()) {
2249 prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
2250 cpu_mask = RATE_IN_242X;
2251 cpu_clkflg = CK_242X;
2252 rate_table = omap2420_rate_table;
2253 } else if (cpu_is_omap2430()) {
2254 prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
2255 cpu_mask = RATE_IN_243X;
2256 cpu_clkflg = CK_243X;
2257 rate_table = omap2430_rate_table;
2258 }
2259
2260 clk_init(&omap2_clk_functions);
2261
2262 for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
2263 clk_preinit(c->lk.clk);
2264
2265 osc_ck.rate = omap2_osc_clk_recalc(&osc_ck);
2266 propagate_rate(&osc_ck);
2267 sys_ck.rate = omap2_sys_clk_recalc(&sys_ck);
2268 propagate_rate(&sys_ck);
2269
2270 for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++)
2271 if (c->cpu & cpu_clkflg) {
2272 clkdev_add(&c->lk);
2273 clk_register(c->lk.clk);
2274 omap2_init_clk_clkdm(c->lk.clk);
2275 }
2276
2277 /* Check the MPU rate set by bootloader */
2278 clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
2279 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
2280 if (!(prcm->flags & cpu_mask))
2281 continue;
2282 if (prcm->xtal_speed != sys_ck.rate)
2283 continue;
2284 if (prcm->dpll_speed <= clkrate)
2285 break;
2286 }
2287 curr_prcm_set = prcm;
2288
2289 recalculate_root_clocks();
2290
2291 printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): "
2292 "%ld.%01ld/%ld/%ld MHz\n",
2293 (sys_ck.rate / 1000000), (sys_ck.rate / 100000) % 10,
2294 (dpll_ck.rate / 1000000), (mpu_ck.rate / 1000000)) ;
2295
2296 /*
2297 * Only enable those clocks we will need, let the drivers
2298 * enable other clocks as necessary
2299 */
2300 clk_enable_init_clocks();
2301
2302 /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */
2303 vclk = clk_get(NULL, "virt_prcm_set");
2304 sclk = clk_get(NULL, "sys_ck");
2305 dclk = clk_get(NULL, "dpll_ck");
2306
2307 return 0;
2308}
2657 2309
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 9f2feaf79865..ded32364f32b 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -30,314 +30,21 @@
30#include <plat/cpu.h> 30#include <plat/cpu.h>
31#include <plat/clock.h> 31#include <plat/clock.h>
32#include <plat/sram.h> 32#include <plat/sram.h>
33#include <plat/sdrc.h>
33#include <asm/div64.h> 34#include <asm/div64.h>
34#include <asm/clkdev.h> 35#include <asm/clkdev.h>
35 36
36#include <plat/sdrc.h> 37#include <plat/sdrc.h>
37#include "clock.h" 38#include "clock.h"
39#include "clock34xx.h"
40#include "sdrc.h"
38#include "prm.h" 41#include "prm.h"
39#include "prm-regbits-34xx.h" 42#include "prm-regbits-34xx.h"
40#include "cm.h" 43#include "cm.h"
41#include "cm-regbits-34xx.h" 44#include "cm-regbits-34xx.h"
42 45
43static const struct clkops clkops_noncore_dpll_ops;
44
45static void omap3430es2_clk_ssi_find_idlest(struct clk *clk,
46 void __iomem **idlest_reg,
47 u8 *idlest_bit);
48static void omap3430es2_clk_hsotgusb_find_idlest(struct clk *clk,
49 void __iomem **idlest_reg,
50 u8 *idlest_bit);
51static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk *clk,
52 void __iomem **idlest_reg,
53 u8 *idlest_bit);
54
55static const struct clkops clkops_omap3430es2_ssi_wait = {
56 .enable = omap2_dflt_clk_enable,
57 .disable = omap2_dflt_clk_disable,
58 .find_idlest = omap3430es2_clk_ssi_find_idlest,
59 .find_companion = omap2_clk_dflt_find_companion,
60};
61
62static const struct clkops clkops_omap3430es2_hsotgusb_wait = {
63 .enable = omap2_dflt_clk_enable,
64 .disable = omap2_dflt_clk_disable,
65 .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
66 .find_companion = omap2_clk_dflt_find_companion,
67};
68
69static const struct clkops clkops_omap3430es2_dss_usbhost_wait = {
70 .enable = omap2_dflt_clk_enable,
71 .disable = omap2_dflt_clk_disable,
72 .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
73 .find_companion = omap2_clk_dflt_find_companion,
74};
75
76#include "clock34xx.h"
77
78struct omap_clk {
79 u32 cpu;
80 struct clk_lookup lk;
81};
82
83#define CLK(dev, con, ck, cp) \
84 { \
85 .cpu = cp, \
86 .lk = { \
87 .dev_id = dev, \
88 .con_id = con, \
89 .clk = ck, \
90 }, \
91 }
92
93#define CK_343X (1 << 0)
94#define CK_3430ES1 (1 << 1)
95#define CK_3430ES2 (1 << 2)
96
97static struct omap_clk omap34xx_clks[] = {
98 CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_343X),
99 CLK(NULL, "virt_12m_ck", &virt_12m_ck, CK_343X),
100 CLK(NULL, "virt_13m_ck", &virt_13m_ck, CK_343X),
101 CLK(NULL, "virt_16_8m_ck", &virt_16_8m_ck, CK_3430ES2),
102 CLK(NULL, "virt_19_2m_ck", &virt_19_2m_ck, CK_343X),
103 CLK(NULL, "virt_26m_ck", &virt_26m_ck, CK_343X),
104 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_343X),
105 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_343X),
106 CLK(NULL, "sys_ck", &sys_ck, CK_343X),
107 CLK(NULL, "sys_altclk", &sys_altclk, CK_343X),
108 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_343X),
109 CLK(NULL, "sys_clkout1", &sys_clkout1, CK_343X),
110 CLK(NULL, "dpll1_ck", &dpll1_ck, CK_343X),
111 CLK(NULL, "dpll1_x2_ck", &dpll1_x2_ck, CK_343X),
112 CLK(NULL, "dpll1_x2m2_ck", &dpll1_x2m2_ck, CK_343X),
113 CLK(NULL, "dpll2_ck", &dpll2_ck, CK_343X),
114 CLK(NULL, "dpll2_m2_ck", &dpll2_m2_ck, CK_343X),
115 CLK(NULL, "dpll3_ck", &dpll3_ck, CK_343X),
116 CLK(NULL, "core_ck", &core_ck, CK_343X),
117 CLK(NULL, "dpll3_x2_ck", &dpll3_x2_ck, CK_343X),
118 CLK(NULL, "dpll3_m2_ck", &dpll3_m2_ck, CK_343X),
119 CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_343X),
120 CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_343X),
121 CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_343X),
122 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_343X),
123 CLK(NULL, "dpll4_ck", &dpll4_ck, CK_343X),
124 CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_343X),
125 CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_343X),
126 CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_343X),
127 CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_343X),
128 CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_343X),
129 CLK(NULL, "omap_48m_fck", &omap_48m_fck, CK_343X),
130 CLK(NULL, "omap_12m_fck", &omap_12m_fck, CK_343X),
131 CLK(NULL, "dpll4_m2_ck", &dpll4_m2_ck, CK_343X),
132 CLK(NULL, "dpll4_m2x2_ck", &dpll4_m2x2_ck, CK_343X),
133 CLK(NULL, "dpll4_m3_ck", &dpll4_m3_ck, CK_343X),
134 CLK(NULL, "dpll4_m3x2_ck", &dpll4_m3x2_ck, CK_343X),
135 CLK(NULL, "dpll4_m4_ck", &dpll4_m4_ck, CK_343X),
136 CLK(NULL, "dpll4_m4x2_ck", &dpll4_m4x2_ck, CK_343X),
137 CLK(NULL, "dpll4_m5_ck", &dpll4_m5_ck, CK_343X),
138 CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_343X),
139 CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_343X),
140 CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_343X),
141 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_343X),
142 CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2),
143 CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2),
144 CLK(NULL, "clkout2_src_ck", &clkout2_src_ck, CK_343X),
145 CLK(NULL, "sys_clkout2", &sys_clkout2, CK_343X),
146 CLK(NULL, "corex2_fck", &corex2_fck, CK_343X),
147 CLK(NULL, "dpll1_fck", &dpll1_fck, CK_343X),
148 CLK(NULL, "mpu_ck", &mpu_ck, CK_343X),
149 CLK(NULL, "arm_fck", &arm_fck, CK_343X),
150 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_343X),
151 CLK(NULL, "dpll2_fck", &dpll2_fck, CK_343X),
152 CLK(NULL, "iva2_ck", &iva2_ck, CK_343X),
153 CLK(NULL, "l3_ick", &l3_ick, CK_343X),
154 CLK(NULL, "l4_ick", &l4_ick, CK_343X),
155 CLK(NULL, "rm_ick", &rm_ick, CK_343X),
156 CLK(NULL, "gfx_l3_ck", &gfx_l3_ck, CK_3430ES1),
157 CLK(NULL, "gfx_l3_fck", &gfx_l3_fck, CK_3430ES1),
158 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1),
159 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1),
160 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1),
161 CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2),
162 CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2),
163 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1),
164 CLK(NULL, "modem_fck", &modem_fck, CK_343X),
165 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_343X),
166 CLK(NULL, "mad2d_ick", &mad2d_ick, CK_343X),
167 CLK(NULL, "gpt10_fck", &gpt10_fck, CK_343X),
168 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_343X),
169 CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2),
170 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2),
171 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2),
172 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_343X),
173 CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2),
174 CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_343X),
175 CLK(NULL, "mspro_fck", &mspro_fck, CK_343X),
176 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_343X),
177 CLK("i2c_omap.3", "fck", &i2c3_fck, CK_343X),
178 CLK("i2c_omap.2", "fck", &i2c2_fck, CK_343X),
179 CLK("i2c_omap.1", "fck", &i2c1_fck, CK_343X),
180 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_343X),
181 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_343X),
182 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_343X),
183 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_343X),
184 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_343X),
185 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_343X),
186 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_343X),
187 CLK(NULL, "uart2_fck", &uart2_fck, CK_343X),
188 CLK(NULL, "uart1_fck", &uart1_fck, CK_343X),
189 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
190 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_343X),
191 CLK("omap_hdq.0", "fck", &hdq_fck, CK_343X),
192 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
193 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2),
194 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
195 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2, CK_3430ES2),
196 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_343X),
197 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es1, CK_3430ES1),
198 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es2, CK_3430ES2),
199 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_343X),
200 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_343X),
201 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_343X),
202 CLK(NULL, "pka_ick", &pka_ick, CK_343X),
203 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_343X),
204 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2),
205 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2),
206 CLK(NULL, "icr_ick", &icr_ick, CK_343X),
207 CLK(NULL, "aes2_ick", &aes2_ick, CK_343X),
208 CLK(NULL, "sha12_ick", &sha12_ick, CK_343X),
209 CLK(NULL, "des2_ick", &des2_ick, CK_343X),
210 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_343X),
211 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_343X),
212 CLK(NULL, "mspro_ick", &mspro_ick, CK_343X),
213 CLK("omap_hdq.0", "ick", &hdq_ick, CK_343X),
214 CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_343X),
215 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_343X),
216 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_343X),
217 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_343X),
218 CLK("i2c_omap.3", "ick", &i2c3_ick, CK_343X),
219 CLK("i2c_omap.2", "ick", &i2c2_ick, CK_343X),
220 CLK("i2c_omap.1", "ick", &i2c1_ick, CK_343X),
221 CLK(NULL, "uart2_ick", &uart2_ick, CK_343X),
222 CLK(NULL, "uart1_ick", &uart1_ick, CK_343X),
223 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_343X),
224 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_343X),
225 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_343X),
226 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_343X),
227 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1),
228 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_343X),
229 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_343X),
230 CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_343X),
231 CLK(NULL, "ssi_ick", &ssi_ick_3430es1, CK_3430ES1),
232 CLK(NULL, "ssi_ick", &ssi_ick_3430es2, CK_3430ES2),
233 CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_3430ES1),
234 CLK(NULL, "security_l4_ick2", &security_l4_ick2, CK_343X),
235 CLK(NULL, "aes1_ick", &aes1_ick, CK_343X),
236 CLK("omap_rng", "ick", &rng_ick, CK_343X),
237 CLK(NULL, "sha11_ick", &sha11_ick, CK_343X),
238 CLK(NULL, "des1_ick", &des1_ick, CK_343X),
239 CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
240 CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2),
241 CLK("omapfb", "tv_fck", &dss_tv_fck, CK_343X),
242 CLK("omapfb", "video_fck", &dss_96m_fck, CK_343X),
243 CLK("omapfb", "dss2_fck", &dss2_alwon_fck, CK_343X),
244 CLK("omapfb", "ick", &dss_ick_3430es1, CK_3430ES1),
245 CLK("omapfb", "ick", &dss_ick_3430es2, CK_3430ES2),
246 CLK(NULL, "cam_mclk", &cam_mclk, CK_343X),
247 CLK(NULL, "cam_ick", &cam_ick, CK_343X),
248 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X),
249 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2),
250 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2),
251 CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2),
252 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2),
253 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_343X),
254 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_343X),
255 CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_343X),
256 CLK("omap_wdt", "fck", &wdt2_fck, CK_343X),
257 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_343X),
258 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2),
259 CLK("omap_wdt", "ick", &wdt2_ick, CK_343X),
260 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_343X),
261 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_343X),
262 CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_343X),
263 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_343X),
264 CLK(NULL, "gpt1_ick", &gpt1_ick, CK_343X),
265 CLK(NULL, "per_96m_fck", &per_96m_fck, CK_343X),
266 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_343X),
267 CLK(NULL, "uart3_fck", &uart3_fck, CK_343X),
268 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_343X),
269 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_343X),
270 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_343X),
271 CLK(NULL, "gpt5_fck", &gpt5_fck, CK_343X),
272 CLK(NULL, "gpt6_fck", &gpt6_fck, CK_343X),
273 CLK(NULL, "gpt7_fck", &gpt7_fck, CK_343X),
274 CLK(NULL, "gpt8_fck", &gpt8_fck, CK_343X),
275 CLK(NULL, "gpt9_fck", &gpt9_fck, CK_343X),
276 CLK(NULL, "per_32k_alwon_fck", &per_32k_alwon_fck, CK_343X),
277 CLK(NULL, "gpio6_dbck", &gpio6_dbck, CK_343X),
278 CLK(NULL, "gpio5_dbck", &gpio5_dbck, CK_343X),
279 CLK(NULL, "gpio4_dbck", &gpio4_dbck, CK_343X),
280 CLK(NULL, "gpio3_dbck", &gpio3_dbck, CK_343X),
281 CLK(NULL, "gpio2_dbck", &gpio2_dbck, CK_343X),
282 CLK(NULL, "wdt3_fck", &wdt3_fck, CK_343X),
283 CLK(NULL, "per_l4_ick", &per_l4_ick, CK_343X),
284 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_343X),
285 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_343X),
286 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_343X),
287 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_343X),
288 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_343X),
289 CLK(NULL, "wdt3_ick", &wdt3_ick, CK_343X),
290 CLK(NULL, "uart3_ick", &uart3_ick, CK_343X),
291 CLK(NULL, "gpt9_ick", &gpt9_ick, CK_343X),
292 CLK(NULL, "gpt8_ick", &gpt8_ick, CK_343X),
293 CLK(NULL, "gpt7_ick", &gpt7_ick, CK_343X),
294 CLK(NULL, "gpt6_ick", &gpt6_ick, CK_343X),
295 CLK(NULL, "gpt5_ick", &gpt5_ick, CK_343X),
296 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_343X),
297 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_343X),
298 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_343X),
299 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_343X),
300 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_343X),
301 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_343X),
302 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_343X),
303 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_343X),
304 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_343X),
305 CLK("etb", "emu_src_ck", &emu_src_ck, CK_343X),
306 CLK(NULL, "pclk_fck", &pclk_fck, CK_343X),
307 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_343X),
308 CLK(NULL, "atclk_fck", &atclk_fck, CK_343X),
309 CLK(NULL, "traceclk_src_fck", &traceclk_src_fck, CK_343X),
310 CLK(NULL, "traceclk_fck", &traceclk_fck, CK_343X),
311 CLK(NULL, "sr1_fck", &sr1_fck, CK_343X),
312 CLK(NULL, "sr2_fck", &sr2_fck, CK_343X),
313 CLK(NULL, "sr_l4_ick", &sr_l4_ick, CK_343X),
314 CLK(NULL, "secure_32k_fck", &secure_32k_fck, CK_343X),
315 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_343X),
316 CLK(NULL, "wdt1_fck", &wdt1_fck, CK_343X),
317};
318
319/* CM_AUTOIDLE_PLL*.AUTO_* bit values */
320#define DPLL_AUTOIDLE_DISABLE 0x0
321#define DPLL_AUTOIDLE_LOW_POWER_STOP 0x1
322
323#define MAX_DPLL_WAIT_TRIES 1000000
324
325#define MIN_SDRC_DLL_LOCK_FREQ 83000000
326
327#define CYCLES_PER_MHZ 1000000 46#define CYCLES_PER_MHZ 1000000
328 47
329/* Scale factor for fixed-point arith in omap3_core_dpll_m2_set_rate() */
330#define SDRC_MPURATE_SCALE 8
331
332/* 2^SDRC_MPURATE_BASE_SHIFT: MPU MHz that SDRC_MPURATE_LOOPS is defined for */
333#define SDRC_MPURATE_BASE_SHIFT 9
334
335/*
336 * SDRC_MPURATE_LOOPS: Number of MPU loops to execute at
337 * 2^MPURATE_BASE_SHIFT MHz for SDRC to stabilize
338 */
339#define SDRC_MPURATE_LOOPS 96
340
341/* 48/*
342 * DPLL5_FREQ_FOR_USBHOST: USBHOST and USBTLL are the only clocks 49 * DPLL5_FREQ_FOR_USBHOST: USBHOST and USBTLL are the only clocks
343 * that are sourced by DPLL5, and both of these require this clock 50 * that are sourced by DPLL5, and both of these require this clock
@@ -345,6 +52,9 @@ static struct omap_clk omap34xx_clks[] = {
345 */ 52 */
346#define DPLL5_FREQ_FOR_USBHOST 120000000 53#define DPLL5_FREQ_FOR_USBHOST 120000000
347 54
55/* needed by omap3_core_dpll_m2_set_rate() */
56struct clk *sdrc_ick_p, *arm_fck_p;
57
348/** 58/**
349 * omap3430es2_clk_ssi_find_idlest - return CM_IDLEST info for SSI 59 * omap3430es2_clk_ssi_find_idlest - return CM_IDLEST info for SSI
350 * @clk: struct clk * being enabled 60 * @clk: struct clk * being enabled
@@ -366,6 +76,13 @@ static void omap3430es2_clk_ssi_find_idlest(struct clk *clk,
366 *idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT; 76 *idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT;
367} 77}
368 78
79const struct clkops clkops_omap3430es2_ssi_wait = {
80 .enable = omap2_dflt_clk_enable,
81 .disable = omap2_dflt_clk_disable,
82 .find_idlest = omap3430es2_clk_ssi_find_idlest,
83 .find_companion = omap2_clk_dflt_find_companion,
84};
85
369/** 86/**
370 * omap3430es2_clk_dss_usbhost_find_idlest - CM_IDLEST info for DSS, USBHOST 87 * omap3430es2_clk_dss_usbhost_find_idlest - CM_IDLEST info for DSS, USBHOST
371 * @clk: struct clk * being enabled 88 * @clk: struct clk * being enabled
@@ -391,6 +108,13 @@ static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk *clk,
391 *idlest_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT; 108 *idlest_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT;
392} 109}
393 110
111const struct clkops clkops_omap3430es2_dss_usbhost_wait = {
112 .enable = omap2_dflt_clk_enable,
113 .disable = omap2_dflt_clk_disable,
114 .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
115 .find_companion = omap2_clk_dflt_find_companion,
116};
117
394/** 118/**
395 * omap3430es2_clk_hsotgusb_find_idlest - return CM_IDLEST info for HSOTGUSB 119 * omap3430es2_clk_hsotgusb_find_idlest - return CM_IDLEST info for HSOTGUSB
396 * @clk: struct clk * being enabled 120 * @clk: struct clk * being enabled
@@ -412,395 +136,19 @@ static void omap3430es2_clk_hsotgusb_find_idlest(struct clk *clk,
412 *idlest_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT; 136 *idlest_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT;
413} 137}
414 138
415/** 139const struct clkops clkops_omap3430es2_hsotgusb_wait = {
416 * omap3_dpll_recalc - recalculate DPLL rate 140 .enable = omap2_dflt_clk_enable,
417 * @clk: DPLL struct clk 141 .disable = omap2_dflt_clk_disable,
418 * 142 .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
419 * Recalculate and propagate the DPLL rate. 143 .find_companion = omap2_clk_dflt_find_companion,
420 */ 144};
421static unsigned long omap3_dpll_recalc(struct clk *clk)
422{
423 return omap2_get_dpll_rate(clk);
424}
425
426/* _omap3_dpll_write_clken - write clken_bits arg to a DPLL's enable bits */
427static void _omap3_dpll_write_clken(struct clk *clk, u8 clken_bits)
428{
429 const struct dpll_data *dd;
430 u32 v;
431
432 dd = clk->dpll_data;
433
434 v = __raw_readl(dd->control_reg);
435 v &= ~dd->enable_mask;
436 v |= clken_bits << __ffs(dd->enable_mask);
437 __raw_writel(v, dd->control_reg);
438}
439
440/* _omap3_wait_dpll_status: wait for a DPLL to enter a specific state */
441static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
442{
443 const struct dpll_data *dd;
444 int i = 0;
445 int ret = -EINVAL;
446
447 dd = clk->dpll_data;
448
449 state <<= __ffs(dd->idlest_mask);
450
451 while (((__raw_readl(dd->idlest_reg) & dd->idlest_mask) != state) &&
452 i < MAX_DPLL_WAIT_TRIES) {
453 i++;
454 udelay(1);
455 }
456
457 if (i == MAX_DPLL_WAIT_TRIES) {
458 printk(KERN_ERR "clock: %s failed transition to '%s'\n",
459 clk->name, (state) ? "locked" : "bypassed");
460 } else {
461 pr_debug("clock: %s transition to '%s' in %d loops\n",
462 clk->name, (state) ? "locked" : "bypassed", i);
463
464 ret = 0;
465 }
466
467 return ret;
468}
469
470/* From 3430 TRM ES2 4.7.6.2 */
471static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n)
472{
473 unsigned long fint;
474 u16 f = 0;
475
476 fint = clk->dpll_data->clk_ref->rate / n;
477
478 pr_debug("clock: fint is %lu\n", fint);
479
480 if (fint >= 750000 && fint <= 1000000)
481 f = 0x3;
482 else if (fint > 1000000 && fint <= 1250000)
483 f = 0x4;
484 else if (fint > 1250000 && fint <= 1500000)
485 f = 0x5;
486 else if (fint > 1500000 && fint <= 1750000)
487 f = 0x6;
488 else if (fint > 1750000 && fint <= 2100000)
489 f = 0x7;
490 else if (fint > 7500000 && fint <= 10000000)
491 f = 0xB;
492 else if (fint > 10000000 && fint <= 12500000)
493 f = 0xC;
494 else if (fint > 12500000 && fint <= 15000000)
495 f = 0xD;
496 else if (fint > 15000000 && fint <= 17500000)
497 f = 0xE;
498 else if (fint > 17500000 && fint <= 21000000)
499 f = 0xF;
500 else
501 pr_debug("clock: unknown freqsel setting for %d\n", n);
502
503 return f;
504}
505
506/* Non-CORE DPLL (e.g., DPLLs that do not control SDRC) clock functions */
507
508/*
509 * _omap3_noncore_dpll_lock - instruct a DPLL to lock and wait for readiness
510 * @clk: pointer to a DPLL struct clk
511 *
512 * Instructs a non-CORE DPLL to lock. Waits for the DPLL to report
513 * readiness before returning. Will save and restore the DPLL's
514 * autoidle state across the enable, per the CDP code. If the DPLL
515 * locked successfully, return 0; if the DPLL did not lock in the time
516 * allotted, or DPLL3 was passed in, return -EINVAL.
517 */
518static int _omap3_noncore_dpll_lock(struct clk *clk)
519{
520 u8 ai;
521 int r;
522
523 if (clk == &dpll3_ck)
524 return -EINVAL;
525
526 pr_debug("clock: locking DPLL %s\n", clk->name);
527
528 ai = omap3_dpll_autoidle_read(clk);
529
530 omap3_dpll_deny_idle(clk);
531
532 _omap3_dpll_write_clken(clk, DPLL_LOCKED);
533
534 r = _omap3_wait_dpll_status(clk, 1);
535
536 if (ai)
537 omap3_dpll_allow_idle(clk);
538
539 return r;
540}
541
542/*
543 * _omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
544 * @clk: pointer to a DPLL struct clk
545 *
546 * Instructs a non-CORE DPLL to enter low-power bypass mode. In
547 * bypass mode, the DPLL's rate is set equal to its parent clock's
548 * rate. Waits for the DPLL to report readiness before returning.
549 * Will save and restore the DPLL's autoidle state across the enable,
550 * per the CDP code. If the DPLL entered bypass mode successfully,
551 * return 0; if the DPLL did not enter bypass in the time allotted, or
552 * DPLL3 was passed in, or the DPLL does not support low-power bypass,
553 * return -EINVAL.
554 */
555static int _omap3_noncore_dpll_bypass(struct clk *clk)
556{
557 int r;
558 u8 ai;
559
560 if (clk == &dpll3_ck)
561 return -EINVAL;
562
563 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS)))
564 return -EINVAL;
565
566 pr_debug("clock: configuring DPLL %s for low-power bypass\n",
567 clk->name);
568
569 ai = omap3_dpll_autoidle_read(clk);
570
571 _omap3_dpll_write_clken(clk, DPLL_LOW_POWER_BYPASS);
572
573 r = _omap3_wait_dpll_status(clk, 0);
574
575 if (ai)
576 omap3_dpll_allow_idle(clk);
577 else
578 omap3_dpll_deny_idle(clk);
579
580 return r;
581}
582
583/*
584 * _omap3_noncore_dpll_stop - instruct a DPLL to stop
585 * @clk: pointer to a DPLL struct clk
586 *
587 * Instructs a non-CORE DPLL to enter low-power stop. Will save and
588 * restore the DPLL's autoidle state across the stop, per the CDP
589 * code. If DPLL3 was passed in, or the DPLL does not support
590 * low-power stop, return -EINVAL; otherwise, return 0.
591 */
592static int _omap3_noncore_dpll_stop(struct clk *clk)
593{
594 u8 ai;
595
596 if (clk == &dpll3_ck)
597 return -EINVAL;
598
599 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP)))
600 return -EINVAL;
601
602 pr_debug("clock: stopping DPLL %s\n", clk->name);
603
604 ai = omap3_dpll_autoidle_read(clk);
605
606 _omap3_dpll_write_clken(clk, DPLL_LOW_POWER_STOP);
607
608 if (ai)
609 omap3_dpll_allow_idle(clk);
610 else
611 omap3_dpll_deny_idle(clk);
612
613 return 0;
614}
615
616/**
617 * omap3_noncore_dpll_enable - instruct a DPLL to enter bypass or lock mode
618 * @clk: pointer to a DPLL struct clk
619 *
620 * Instructs a non-CORE DPLL to enable, e.g., to enter bypass or lock.
621 * The choice of modes depends on the DPLL's programmed rate: if it is
622 * the same as the DPLL's parent clock, it will enter bypass;
623 * otherwise, it will enter lock. This code will wait for the DPLL to
624 * indicate readiness before returning, unless the DPLL takes too long
625 * to enter the target state. Intended to be used as the struct clk's
626 * enable function. If DPLL3 was passed in, or the DPLL does not
627 * support low-power stop, or if the DPLL took too long to enter
628 * bypass or lock, return -EINVAL; otherwise, return 0.
629 */
630static int omap3_noncore_dpll_enable(struct clk *clk)
631{
632 int r;
633 struct dpll_data *dd;
634
635 if (clk == &dpll3_ck)
636 return -EINVAL;
637
638 dd = clk->dpll_data;
639 if (!dd)
640 return -EINVAL;
641
642 if (clk->rate == dd->clk_bypass->rate) {
643 WARN_ON(clk->parent != dd->clk_bypass);
644 r = _omap3_noncore_dpll_bypass(clk);
645 } else {
646 WARN_ON(clk->parent != dd->clk_ref);
647 r = _omap3_noncore_dpll_lock(clk);
648 }
649 /* FIXME: this is dubious - if clk->rate has changed, what about propagating? */
650 if (!r)
651 clk->rate = omap2_get_dpll_rate(clk);
652
653 return r;
654}
655
656/**
657 * omap3_noncore_dpll_enable - instruct a DPLL to enter bypass or lock mode
658 * @clk: pointer to a DPLL struct clk
659 *
660 * Instructs a non-CORE DPLL to enable, e.g., to enter bypass or lock.
661 * The choice of modes depends on the DPLL's programmed rate: if it is
662 * the same as the DPLL's parent clock, it will enter bypass;
663 * otherwise, it will enter lock. This code will wait for the DPLL to
664 * indicate readiness before returning, unless the DPLL takes too long
665 * to enter the target state. Intended to be used as the struct clk's
666 * enable function. If DPLL3 was passed in, or the DPLL does not
667 * support low-power stop, or if the DPLL took too long to enter
668 * bypass or lock, return -EINVAL; otherwise, return 0.
669 */
670static void omap3_noncore_dpll_disable(struct clk *clk)
671{
672 if (clk == &dpll3_ck)
673 return;
674
675 _omap3_noncore_dpll_stop(clk);
676}
677
678
679/* Non-CORE DPLL rate set code */
680
681/*
682 * omap3_noncore_dpll_program - set non-core DPLL M,N values directly
683 * @clk: struct clk * of DPLL to set
684 * @m: DPLL multiplier to set
685 * @n: DPLL divider to set
686 * @freqsel: FREQSEL value to set
687 *
688 * Program the DPLL with the supplied M, N values, and wait for the DPLL to
689 * lock.. Returns -EINVAL upon error, or 0 upon success.
690 */
691static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
692{
693 struct dpll_data *dd = clk->dpll_data;
694 u32 v;
695
696 /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
697 _omap3_noncore_dpll_bypass(clk);
698
699 /* Set jitter correction */
700 v = __raw_readl(dd->control_reg);
701 v &= ~dd->freqsel_mask;
702 v |= freqsel << __ffs(dd->freqsel_mask);
703 __raw_writel(v, dd->control_reg);
704
705 /* Set DPLL multiplier, divider */
706 v = __raw_readl(dd->mult_div1_reg);
707 v &= ~(dd->mult_mask | dd->div1_mask);
708 v |= m << __ffs(dd->mult_mask);
709 v |= (n - 1) << __ffs(dd->div1_mask);
710 __raw_writel(v, dd->mult_div1_reg);
711
712 /* We let the clock framework set the other output dividers later */
713
714 /* REVISIT: Set ramp-up delay? */
715
716 _omap3_noncore_dpll_lock(clk);
717
718 return 0;
719}
720
721/**
722 * omap3_noncore_dpll_set_rate - set non-core DPLL rate
723 * @clk: struct clk * of DPLL to set
724 * @rate: rounded target rate
725 *
726 * Set the DPLL CLKOUT to the target rate. If the DPLL can enter
727 * low-power bypass, and the target rate is the bypass source clock
728 * rate, then configure the DPLL for bypass. Otherwise, round the
729 * target rate if it hasn't been done already, then program and lock
730 * the DPLL. Returns -EINVAL upon error, or 0 upon success.
731 */
732static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
733{
734 struct clk *new_parent = NULL;
735 u16 freqsel;
736 struct dpll_data *dd;
737 int ret;
738
739 if (!clk || !rate)
740 return -EINVAL;
741
742 dd = clk->dpll_data;
743 if (!dd)
744 return -EINVAL;
745
746 if (rate == omap2_get_dpll_rate(clk))
747 return 0;
748
749 /*
750 * Ensure both the bypass and ref clocks are enabled prior to
751 * doing anything; we need the bypass clock running to reprogram
752 * the DPLL.
753 */
754 omap2_clk_enable(dd->clk_bypass);
755 omap2_clk_enable(dd->clk_ref);
756
757 if (dd->clk_bypass->rate == rate &&
758 (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
759 pr_debug("clock: %s: set rate: entering bypass.\n", clk->name);
760
761 ret = _omap3_noncore_dpll_bypass(clk);
762 if (!ret)
763 new_parent = dd->clk_bypass;
764 } else {
765 if (dd->last_rounded_rate != rate)
766 omap2_dpll_round_rate(clk, rate);
767
768 if (dd->last_rounded_rate == 0)
769 return -EINVAL;
770
771 freqsel = _omap3_dpll_compute_freqsel(clk, dd->last_rounded_n);
772 if (!freqsel)
773 WARN_ON(1);
774
775 pr_debug("clock: %s: set rate: locking rate to %lu.\n",
776 clk->name, rate);
777
778 ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m,
779 dd->last_rounded_n, freqsel);
780 if (!ret)
781 new_parent = dd->clk_ref;
782 }
783 if (!ret) {
784 /*
785 * Switch the parent clock in the heirarchy, and make sure
786 * that the new parent's usecount is correct. Note: we
787 * enable the new parent before disabling the old to avoid
788 * any unnecessary hardware disable->enable transitions.
789 */
790 if (clk->usecount) {
791 omap2_clk_enable(new_parent);
792 omap2_clk_disable(clk->parent);
793 }
794 clk_reparent(clk, new_parent);
795 clk->rate = rate;
796 }
797 omap2_clk_disable(dd->clk_ref);
798 omap2_clk_disable(dd->clk_bypass);
799 145
800 return 0; 146const struct clkops clkops_noncore_dpll_ops = {
801} 147 .enable = omap3_noncore_dpll_enable,
148 .disable = omap3_noncore_dpll_disable,
149};
802 150
803static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate) 151int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
804{ 152{
805 /* 153 /*
806 * According to the 12-5 CDP code from TI, "Limitation 2.5" 154 * According to the 12-5 CDP code from TI, "Limitation 2.5"
@@ -831,12 +179,12 @@ static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate)
831 * Program the DPLL M2 divider with the rounded target rate. Returns 179 * Program the DPLL M2 divider with the rounded target rate. Returns
832 * -EINVAL upon error, or 0 upon success. 180 * -EINVAL upon error, or 0 upon success.
833 */ 181 */
834static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) 182int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
835{ 183{
836 u32 new_div = 0; 184 u32 new_div = 0;
837 u32 unlock_dll = 0; 185 u32 unlock_dll = 0;
838 u32 c; 186 u32 c;
839 unsigned long validrate, sdrcrate, mpurate; 187 unsigned long validrate, sdrcrate, _mpurate;
840 struct omap_sdrc_params *sdrc_cs0; 188 struct omap_sdrc_params *sdrc_cs0;
841 struct omap_sdrc_params *sdrc_cs1; 189 struct omap_sdrc_params *sdrc_cs1;
842 int ret; 190 int ret;
@@ -844,14 +192,11 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
844 if (!clk || !rate) 192 if (!clk || !rate)
845 return -EINVAL; 193 return -EINVAL;
846 194
847 if (clk != &dpll3_m2_ck)
848 return -EINVAL;
849
850 validrate = omap2_clksel_round_rate_div(clk, rate, &new_div); 195 validrate = omap2_clksel_round_rate_div(clk, rate, &new_div);
851 if (validrate != rate) 196 if (validrate != rate)
852 return -EINVAL; 197 return -EINVAL;
853 198
854 sdrcrate = sdrc_ick.rate; 199 sdrcrate = sdrc_ick_p->rate;
855 if (rate > clk->rate) 200 if (rate > clk->rate)
856 sdrcrate <<= ((rate / clk->rate) >> 1); 201 sdrcrate <<= ((rate / clk->rate) >> 1);
857 else 202 else
@@ -869,8 +214,8 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
869 /* 214 /*
870 * XXX This only needs to be done when the CPU frequency changes 215 * XXX This only needs to be done when the CPU frequency changes
871 */ 216 */
872 mpurate = arm_fck.rate / CYCLES_PER_MHZ; 217 _mpurate = arm_fck_p->rate / CYCLES_PER_MHZ;
873 c = (mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT; 218 c = (_mpurate << SDRC_MPURATE_SCALE) >> SDRC_MPURATE_BASE_SHIFT;
874 c += 1; /* for safety */ 219 c += 1; /* for safety */
875 c *= SDRC_MPURATE_LOOPS; 220 c *= SDRC_MPURATE_LOOPS;
876 c >>= SDRC_MPURATE_SCALE; 221 c >>= SDRC_MPURATE_SCALE;
@@ -906,129 +251,6 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
906 return 0; 251 return 0;
907} 252}
908 253
909
910static const struct clkops clkops_noncore_dpll_ops = {
911 .enable = &omap3_noncore_dpll_enable,
912 .disable = &omap3_noncore_dpll_disable,
913};
914
915/* DPLL autoidle read/set code */
916
917
918/**
919 * omap3_dpll_autoidle_read - read a DPLL's autoidle bits
920 * @clk: struct clk * of the DPLL to read
921 *
922 * Return the DPLL's autoidle bits, shifted down to bit 0. Returns
923 * -EINVAL if passed a null pointer or if the struct clk does not
924 * appear to refer to a DPLL.
925 */
926static u32 omap3_dpll_autoidle_read(struct clk *clk)
927{
928 const struct dpll_data *dd;
929 u32 v;
930
931 if (!clk || !clk->dpll_data)
932 return -EINVAL;
933
934 dd = clk->dpll_data;
935
936 v = __raw_readl(dd->autoidle_reg);
937 v &= dd->autoidle_mask;
938 v >>= __ffs(dd->autoidle_mask);
939
940 return v;
941}
942
943/**
944 * omap3_dpll_allow_idle - enable DPLL autoidle bits
945 * @clk: struct clk * of the DPLL to operate on
946 *
947 * Enable DPLL automatic idle control. This automatic idle mode
948 * switching takes effect only when the DPLL is locked, at least on
949 * OMAP3430. The DPLL will enter low-power stop when its downstream
950 * clocks are gated. No return value.
951 */
952static void omap3_dpll_allow_idle(struct clk *clk)
953{
954 const struct dpll_data *dd;
955 u32 v;
956
957 if (!clk || !clk->dpll_data)
958 return;
959
960 dd = clk->dpll_data;
961
962 /*
963 * REVISIT: CORE DPLL can optionally enter low-power bypass
964 * by writing 0x5 instead of 0x1. Add some mechanism to
965 * optionally enter this mode.
966 */
967 v = __raw_readl(dd->autoidle_reg);
968 v &= ~dd->autoidle_mask;
969 v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask);
970 __raw_writel(v, dd->autoidle_reg);
971}
972
973/**
974 * omap3_dpll_deny_idle - prevent DPLL from automatically idling
975 * @clk: struct clk * of the DPLL to operate on
976 *
977 * Disable DPLL automatic idle control. No return value.
978 */
979static void omap3_dpll_deny_idle(struct clk *clk)
980{
981 const struct dpll_data *dd;
982 u32 v;
983
984 if (!clk || !clk->dpll_data)
985 return;
986
987 dd = clk->dpll_data;
988
989 v = __raw_readl(dd->autoidle_reg);
990 v &= ~dd->autoidle_mask;
991 v |= DPLL_AUTOIDLE_DISABLE << __ffs(dd->autoidle_mask);
992 __raw_writel(v, dd->autoidle_reg);
993}
994
995/* Clock control for DPLL outputs */
996
997/**
998 * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
999 * @clk: DPLL output struct clk
1000 *
1001 * Using parent clock DPLL data, look up DPLL state. If locked, set our
1002 * rate to the dpll_clk * 2; otherwise, just use dpll_clk.
1003 */
1004static unsigned long omap3_clkoutx2_recalc(struct clk *clk)
1005{
1006 const struct dpll_data *dd;
1007 unsigned long rate;
1008 u32 v;
1009 struct clk *pclk;
1010
1011 /* Walk up the parents of clk, looking for a DPLL */
1012 pclk = clk->parent;
1013 while (pclk && !pclk->dpll_data)
1014 pclk = pclk->parent;
1015
1016 /* clk does not have a DPLL as a parent? */
1017 WARN_ON(!pclk);
1018
1019 dd = pclk->dpll_data;
1020
1021 WARN_ON(!dd->enable_mask);
1022
1023 v = __raw_readl(dd->control_reg) & dd->enable_mask;
1024 v >>= __ffs(dd->enable_mask);
1025 if (v != OMAP3XXX_EN_DPLL_LOCKED)
1026 rate = clk->parent->rate;
1027 else
1028 rate = clk->parent->rate * 2;
1029 return rate;
1030}
1031
1032/* Common clock code */ 254/* Common clock code */
1033 255
1034/* 256/*
@@ -1037,7 +259,7 @@ static unsigned long omap3_clkoutx2_recalc(struct clk *clk)
1037 */ 259 */
1038#if defined(CONFIG_ARCH_OMAP3) 260#if defined(CONFIG_ARCH_OMAP3)
1039 261
1040static struct clk_functions omap2_clk_functions = { 262struct clk_functions omap2_clk_functions = {
1041 .clk_enable = omap2_clk_enable, 263 .clk_enable = omap2_clk_enable,
1042 .clk_disable = omap2_clk_disable, 264 .clk_disable = omap2_clk_disable,
1043 .clk_round_rate = omap2_clk_round_rate, 265 .clk_round_rate = omap2_clk_round_rate,
@@ -1063,7 +285,7 @@ void omap2_clk_prepare_for_reboot(void)
1063#endif 285#endif
1064} 286}
1065 287
1066static void omap3_clk_lock_dpll5(void) 288void omap3_clk_lock_dpll5(void)
1067{ 289{
1068 struct clk *dpll5_clk; 290 struct clk *dpll5_clk;
1069 struct clk *dpll5_m2_clk; 291 struct clk *dpll5_m2_clk;
@@ -1093,19 +315,32 @@ static void omap3_clk_lock_dpll5(void)
1093 */ 315 */
1094static int __init omap2_clk_arch_init(void) 316static int __init omap2_clk_arch_init(void)
1095{ 317{
318 struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck;
319 unsigned long osc_sys_rate;
320
1096 if (!mpurate) 321 if (!mpurate)
1097 return -EINVAL; 322 return -EINVAL;
1098 323
324 /* XXX test these for success */
325 dpll1_ck = clk_get(NULL, "dpll1_ck");
326 arm_fck = clk_get(NULL, "arm_fck");
327 core_ck = clk_get(NULL, "core_ck");
328 osc_sys_ck = clk_get(NULL, "osc_sys_ck");
329
1099 /* REVISIT: not yet ready for 343x */ 330 /* REVISIT: not yet ready for 343x */
1100 if (clk_set_rate(&dpll1_ck, mpurate)) 331 if (clk_set_rate(dpll1_ck, mpurate))
1101 printk(KERN_ERR "*** Unable to set MPU rate\n"); 332 printk(KERN_ERR "*** Unable to set MPU rate\n");
1102 333
1103 recalculate_root_clocks(); 334 recalculate_root_clocks();
1104 335
1105 printk(KERN_INFO "Switched to new clocking rate (Crystal/Core/MPU): " 336 osc_sys_rate = clk_get_rate(osc_sys_ck);
1106 "%ld.%01ld/%ld/%ld MHz\n", 337
1107 (osc_sys_ck.rate / 1000000), ((osc_sys_ck.rate / 100000) % 10), 338 pr_info("Switched to new clocking rate (Crystal/Core/MPU): "
1108 (core_ck.rate / 1000000), (arm_fck.rate / 1000000)) ; 339 "%ld.%01ld/%ld/%ld MHz\n",
340 (osc_sys_rate / 1000000),
341 ((osc_sys_rate / 100000) % 10),
342 (clk_get_rate(core_ck) / 1000000),
343 (clk_get_rate(arm_fck) / 1000000));
1109 344
1110 calibrate_delay(); 345 calibrate_delay();
1111 346
@@ -1113,83 +348,7 @@ static int __init omap2_clk_arch_init(void)
1113} 348}
1114arch_initcall(omap2_clk_arch_init); 349arch_initcall(omap2_clk_arch_init);
1115 350
1116int __init omap2_clk_init(void)
1117{
1118 /* struct prcm_config *prcm; */
1119 struct omap_clk *c;
1120 /* u32 clkrate; */
1121 u32 cpu_clkflg;
1122
1123 if (cpu_is_omap34xx()) {
1124 cpu_mask = RATE_IN_343X;
1125 cpu_clkflg = CK_343X;
1126
1127 /*
1128 * Update this if there are further clock changes between ES2
1129 * and production parts
1130 */
1131 if (omap_rev() == OMAP3430_REV_ES1_0) {
1132 /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */
1133 cpu_clkflg |= CK_3430ES1;
1134 } else {
1135 cpu_mask |= RATE_IN_3430ES2;
1136 cpu_clkflg |= CK_3430ES2;
1137 }
1138 }
1139
1140 clk_init(&omap2_clk_functions);
1141
1142 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
1143 clk_preinit(c->lk.clk);
1144 351
1145 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
1146 if (c->cpu & cpu_clkflg) {
1147 clkdev_add(&c->lk);
1148 clk_register(c->lk.clk);
1149 omap2_init_clk_clkdm(c->lk.clk);
1150 }
1151
1152 /* REVISIT: Not yet ready for OMAP3 */
1153#if 0
1154 /* Check the MPU rate set by bootloader */
1155 clkrate = omap2_get_dpll_rate_24xx(&dpll_ck);
1156 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
1157 if (!(prcm->flags & cpu_mask))
1158 continue;
1159 if (prcm->xtal_speed != sys_ck.rate)
1160 continue;
1161 if (prcm->dpll_speed <= clkrate)
1162 break;
1163 }
1164 curr_prcm_set = prcm;
1165#endif 352#endif
1166 353
1167 recalculate_root_clocks();
1168
1169 printk(KERN_INFO "Clocking rate (Crystal/Core/MPU): "
1170 "%ld.%01ld/%ld/%ld MHz\n",
1171 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
1172 (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
1173
1174 /*
1175 * Only enable those clocks we will need, let the drivers
1176 * enable other clocks as necessary
1177 */
1178 clk_enable_init_clocks();
1179
1180 /*
1181 * Lock DPLL5 and put it in autoidle.
1182 */
1183 if (omap_rev() >= OMAP3430_REV_ES2_0)
1184 omap3_clk_lock_dpll5();
1185 354
1186 /* Avoid sleeping during omap2_clk_prepare_for_reboot() */
1187 /* REVISIT: not yet ready for 343x */
1188#if 0
1189 vclk = clk_get(NULL, "virt_prcm_set");
1190 sclk = clk_get(NULL, "sys_ck");
1191#endif
1192 return 0;
1193}
1194
1195#endif
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 8fe1bcb23dd9..9a2c07eac9ad 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1,2993 +1,24 @@
1/* 1/*
2 * OMAP3 clock framework 2 * OMAP3 clock function prototypes and macros
3 * 3 *
4 * Copyright (C) 2007-2008 Texas Instruments, Inc. 4 * Copyright (C) 2007-2009 Texas Instruments, Inc.
5 * Copyright (C) 2007-2008 Nokia Corporation 5 * Copyright (C) 2007-2009 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 * With many device clock fixes by Kevin Hilman and Jouni Högander
9 * DPLL bypass clock support added by Roman Tereshonkov
10 *
11 */
12
13/*
14 * Virtual clocks are introduced as convenient tools.
15 * They are sources for other clocks and not supposed
16 * to be requested from drivers directly.
17 */
18
19#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
20#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
21
22#include <plat/control.h>
23
24#include "clock.h"
25#include "cm.h"
26#include "cm-regbits-34xx.h"
27#include "prm.h"
28#include "prm-regbits-34xx.h"
29
30#define OMAP_CM_REGADDR OMAP34XX_CM_REGADDR
31
32static unsigned long omap3_dpll_recalc(struct clk *clk);
33static unsigned long omap3_clkoutx2_recalc(struct clk *clk);
34static void omap3_dpll_allow_idle(struct clk *clk);
35static void omap3_dpll_deny_idle(struct clk *clk);
36static u32 omap3_dpll_autoidle_read(struct clk *clk);
37static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
38static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate);
39static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate);
40
41/* Maximum DPLL multiplier, divider values for OMAP3 */
42#define OMAP3_MAX_DPLL_MULT 2048
43#define OMAP3_MAX_DPLL_DIV 128
44
45/*
46 * DPLL1 supplies clock to the MPU.
47 * DPLL2 supplies clock to the IVA2.
48 * DPLL3 supplies CORE domain clocks.
49 * DPLL4 supplies peripheral clocks.
50 * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
51 */
52
53/* Forward declarations for DPLL bypass clocks */
54static struct clk dpll1_fck;
55static struct clk dpll2_fck;
56
57/* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */
58#define DPLL_LOW_POWER_STOP 0x1
59#define DPLL_LOW_POWER_BYPASS 0x5
60#define DPLL_LOCKED 0x7
61
62/* PRM CLOCKS */
63
64/* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
65static struct clk omap_32k_fck = {
66 .name = "omap_32k_fck",
67 .ops = &clkops_null,
68 .rate = 32768,
69 .flags = RATE_FIXED,
70};
71
72static struct clk secure_32k_fck = {
73 .name = "secure_32k_fck",
74 .ops = &clkops_null,
75 .rate = 32768,
76 .flags = RATE_FIXED,
77};
78
79/* Virtual source clocks for osc_sys_ck */
80static struct clk virt_12m_ck = {
81 .name = "virt_12m_ck",
82 .ops = &clkops_null,
83 .rate = 12000000,
84 .flags = RATE_FIXED,
85};
86
87static struct clk virt_13m_ck = {
88 .name = "virt_13m_ck",
89 .ops = &clkops_null,
90 .rate = 13000000,
91 .flags = RATE_FIXED,
92};
93
94static struct clk virt_16_8m_ck = {
95 .name = "virt_16_8m_ck",
96 .ops = &clkops_null,
97 .rate = 16800000,
98 .flags = RATE_FIXED,
99};
100
101static struct clk virt_19_2m_ck = {
102 .name = "virt_19_2m_ck",
103 .ops = &clkops_null,
104 .rate = 19200000,
105 .flags = RATE_FIXED,
106};
107
108static struct clk virt_26m_ck = {
109 .name = "virt_26m_ck",
110 .ops = &clkops_null,
111 .rate = 26000000,
112 .flags = RATE_FIXED,
113};
114
115static struct clk virt_38_4m_ck = {
116 .name = "virt_38_4m_ck",
117 .ops = &clkops_null,
118 .rate = 38400000,
119 .flags = RATE_FIXED,
120};
121
122static const struct clksel_rate osc_sys_12m_rates[] = {
123 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
124 { .div = 0 }
125};
126
127static const struct clksel_rate osc_sys_13m_rates[] = {
128 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
129 { .div = 0 }
130};
131
132static const struct clksel_rate osc_sys_16_8m_rates[] = {
133 { .div = 1, .val = 5, .flags = RATE_IN_3430ES2 | DEFAULT_RATE },
134 { .div = 0 }
135};
136
137static const struct clksel_rate osc_sys_19_2m_rates[] = {
138 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
139 { .div = 0 }
140};
141
142static const struct clksel_rate osc_sys_26m_rates[] = {
143 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
144 { .div = 0 }
145};
146
147static const struct clksel_rate osc_sys_38_4m_rates[] = {
148 { .div = 1, .val = 4, .flags = RATE_IN_343X | DEFAULT_RATE },
149 { .div = 0 }
150};
151
152static const struct clksel osc_sys_clksel[] = {
153 { .parent = &virt_12m_ck, .rates = osc_sys_12m_rates },
154 { .parent = &virt_13m_ck, .rates = osc_sys_13m_rates },
155 { .parent = &virt_16_8m_ck, .rates = osc_sys_16_8m_rates },
156 { .parent = &virt_19_2m_ck, .rates = osc_sys_19_2m_rates },
157 { .parent = &virt_26m_ck, .rates = osc_sys_26m_rates },
158 { .parent = &virt_38_4m_ck, .rates = osc_sys_38_4m_rates },
159 { .parent = NULL },
160};
161
162/* Oscillator clock */
163/* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
164static struct clk osc_sys_ck = {
165 .name = "osc_sys_ck",
166 .ops = &clkops_null,
167 .init = &omap2_init_clksel_parent,
168 .clksel_reg = OMAP3430_PRM_CLKSEL,
169 .clksel_mask = OMAP3430_SYS_CLKIN_SEL_MASK,
170 .clksel = osc_sys_clksel,
171 /* REVISIT: deal with autoextclkmode? */
172 .flags = RATE_FIXED,
173 .recalc = &omap2_clksel_recalc,
174};
175
176static const struct clksel_rate div2_rates[] = {
177 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
178 { .div = 2, .val = 2, .flags = RATE_IN_343X },
179 { .div = 0 }
180};
181
182static const struct clksel sys_clksel[] = {
183 { .parent = &osc_sys_ck, .rates = div2_rates },
184 { .parent = NULL }
185};
186
187/* Latency: this clock is only enabled after PRM_CLKSETUP.SETUP_TIME */
188/* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
189static struct clk sys_ck = {
190 .name = "sys_ck",
191 .ops = &clkops_null,
192 .parent = &osc_sys_ck,
193 .init = &omap2_init_clksel_parent,
194 .clksel_reg = OMAP3430_PRM_CLKSRC_CTRL,
195 .clksel_mask = OMAP_SYSCLKDIV_MASK,
196 .clksel = sys_clksel,
197 .recalc = &omap2_clksel_recalc,
198};
199
200static struct clk sys_altclk = {
201 .name = "sys_altclk",
202 .ops = &clkops_null,
203};
204
205/* Optional external clock input for some McBSPs */
206static struct clk mcbsp_clks = {
207 .name = "mcbsp_clks",
208 .ops = &clkops_null,
209};
210
211/* PRM EXTERNAL CLOCK OUTPUT */
212
213static struct clk sys_clkout1 = {
214 .name = "sys_clkout1",
215 .ops = &clkops_omap2_dflt,
216 .parent = &osc_sys_ck,
217 .enable_reg = OMAP3430_PRM_CLKOUT_CTRL,
218 .enable_bit = OMAP3430_CLKOUT_EN_SHIFT,
219 .recalc = &followparent_recalc,
220};
221
222/* DPLLS */
223
224/* CM CLOCKS */
225
226static const struct clksel_rate div16_dpll_rates[] = {
227 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
228 { .div = 2, .val = 2, .flags = RATE_IN_343X },
229 { .div = 3, .val = 3, .flags = RATE_IN_343X },
230 { .div = 4, .val = 4, .flags = RATE_IN_343X },
231 { .div = 5, .val = 5, .flags = RATE_IN_343X },
232 { .div = 6, .val = 6, .flags = RATE_IN_343X },
233 { .div = 7, .val = 7, .flags = RATE_IN_343X },
234 { .div = 8, .val = 8, .flags = RATE_IN_343X },
235 { .div = 9, .val = 9, .flags = RATE_IN_343X },
236 { .div = 10, .val = 10, .flags = RATE_IN_343X },
237 { .div = 11, .val = 11, .flags = RATE_IN_343X },
238 { .div = 12, .val = 12, .flags = RATE_IN_343X },
239 { .div = 13, .val = 13, .flags = RATE_IN_343X },
240 { .div = 14, .val = 14, .flags = RATE_IN_343X },
241 { .div = 15, .val = 15, .flags = RATE_IN_343X },
242 { .div = 16, .val = 16, .flags = RATE_IN_343X },
243 { .div = 0 }
244};
245
246/* DPLL1 */
247/* MPU clock source */
248/* Type: DPLL */
249static struct dpll_data dpll1_dd = {
250 .mult_div1_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
251 .mult_mask = OMAP3430_MPU_DPLL_MULT_MASK,
252 .div1_mask = OMAP3430_MPU_DPLL_DIV_MASK,
253 .clk_bypass = &dpll1_fck,
254 .clk_ref = &sys_ck,
255 .freqsel_mask = OMAP3430_MPU_DPLL_FREQSEL_MASK,
256 .control_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL),
257 .enable_mask = OMAP3430_EN_MPU_DPLL_MASK,
258 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
259 .auto_recal_bit = OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT,
260 .recal_en_bit = OMAP3430_MPU_DPLL_RECAL_EN_SHIFT,
261 .recal_st_bit = OMAP3430_MPU_DPLL_ST_SHIFT,
262 .autoidle_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL),
263 .autoidle_mask = OMAP3430_AUTO_MPU_DPLL_MASK,
264 .idlest_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
265 .idlest_mask = OMAP3430_ST_MPU_CLK_MASK,
266 .max_multiplier = OMAP3_MAX_DPLL_MULT,
267 .min_divider = 1,
268 .max_divider = OMAP3_MAX_DPLL_DIV,
269 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
270};
271
272static struct clk dpll1_ck = {
273 .name = "dpll1_ck",
274 .ops = &clkops_null,
275 .parent = &sys_ck,
276 .dpll_data = &dpll1_dd,
277 .round_rate = &omap2_dpll_round_rate,
278 .set_rate = &omap3_noncore_dpll_set_rate,
279 .clkdm_name = "dpll1_clkdm",
280 .recalc = &omap3_dpll_recalc,
281};
282
283/*
284 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
285 * DPLL isn't bypassed.
286 */
287static struct clk dpll1_x2_ck = {
288 .name = "dpll1_x2_ck",
289 .ops = &clkops_null,
290 .parent = &dpll1_ck,
291 .clkdm_name = "dpll1_clkdm",
292 .recalc = &omap3_clkoutx2_recalc,
293};
294
295/* On DPLL1, unlike other DPLLs, the divider is downstream from CLKOUTX2 */
296static const struct clksel div16_dpll1_x2m2_clksel[] = {
297 { .parent = &dpll1_x2_ck, .rates = div16_dpll_rates },
298 { .parent = NULL }
299};
300
301/*
302 * Does not exist in the TRM - needed to separate the M2 divider from
303 * bypass selection in mpu_ck
304 */
305static struct clk dpll1_x2m2_ck = {
306 .name = "dpll1_x2m2_ck",
307 .ops = &clkops_null,
308 .parent = &dpll1_x2_ck,
309 .init = &omap2_init_clksel_parent,
310 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
311 .clksel_mask = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
312 .clksel = div16_dpll1_x2m2_clksel,
313 .clkdm_name = "dpll1_clkdm",
314 .recalc = &omap2_clksel_recalc,
315};
316
317/* DPLL2 */
318/* IVA2 clock source */
319/* Type: DPLL */
320
321static struct dpll_data dpll2_dd = {
322 .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
323 .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK,
324 .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK,
325 .clk_bypass = &dpll2_fck,
326 .clk_ref = &sys_ck,
327 .freqsel_mask = OMAP3430_IVA2_DPLL_FREQSEL_MASK,
328 .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
329 .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK,
330 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
331 (1 << DPLL_LOW_POWER_BYPASS),
332 .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
333 .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
334 .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
335 .autoidle_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
336 .autoidle_mask = OMAP3430_AUTO_IVA2_DPLL_MASK,
337 .idlest_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
338 .idlest_mask = OMAP3430_ST_IVA2_CLK_MASK,
339 .max_multiplier = OMAP3_MAX_DPLL_MULT,
340 .min_divider = 1,
341 .max_divider = OMAP3_MAX_DPLL_DIV,
342 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
343};
344
345static struct clk dpll2_ck = {
346 .name = "dpll2_ck",
347 .ops = &clkops_noncore_dpll_ops,
348 .parent = &sys_ck,
349 .dpll_data = &dpll2_dd,
350 .round_rate = &omap2_dpll_round_rate,
351 .set_rate = &omap3_noncore_dpll_set_rate,
352 .clkdm_name = "dpll2_clkdm",
353 .recalc = &omap3_dpll_recalc,
354};
355
356static const struct clksel div16_dpll2_m2x2_clksel[] = {
357 { .parent = &dpll2_ck, .rates = div16_dpll_rates },
358 { .parent = NULL }
359};
360
361/*
362 * The TRM is conflicted on whether IVA2 clock comes from DPLL2 CLKOUT
363 * or CLKOUTX2. CLKOUT seems most plausible.
364 */
365static struct clk dpll2_m2_ck = {
366 .name = "dpll2_m2_ck",
367 .ops = &clkops_null,
368 .parent = &dpll2_ck,
369 .init = &omap2_init_clksel_parent,
370 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
371 OMAP3430_CM_CLKSEL2_PLL),
372 .clksel_mask = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
373 .clksel = div16_dpll2_m2x2_clksel,
374 .clkdm_name = "dpll2_clkdm",
375 .recalc = &omap2_clksel_recalc,
376};
377
378/*
379 * DPLL3
380 * Source clock for all interfaces and for some device fclks
381 * REVISIT: Also supports fast relock bypass - not included below
382 */
383static struct dpll_data dpll3_dd = {
384 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
385 .mult_mask = OMAP3430_CORE_DPLL_MULT_MASK,
386 .div1_mask = OMAP3430_CORE_DPLL_DIV_MASK,
387 .clk_bypass = &sys_ck,
388 .clk_ref = &sys_ck,
389 .freqsel_mask = OMAP3430_CORE_DPLL_FREQSEL_MASK,
390 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
391 .enable_mask = OMAP3430_EN_CORE_DPLL_MASK,
392 .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT,
393 .recal_en_bit = OMAP3430_CORE_DPLL_RECAL_EN_SHIFT,
394 .recal_st_bit = OMAP3430_CORE_DPLL_ST_SHIFT,
395 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
396 .autoidle_mask = OMAP3430_AUTO_CORE_DPLL_MASK,
397 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
398 .idlest_mask = OMAP3430_ST_CORE_CLK_MASK,
399 .max_multiplier = OMAP3_MAX_DPLL_MULT,
400 .min_divider = 1,
401 .max_divider = OMAP3_MAX_DPLL_DIV,
402 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
403};
404
405static struct clk dpll3_ck = {
406 .name = "dpll3_ck",
407 .ops = &clkops_null,
408 .parent = &sys_ck,
409 .dpll_data = &dpll3_dd,
410 .round_rate = &omap2_dpll_round_rate,
411 .clkdm_name = "dpll3_clkdm",
412 .recalc = &omap3_dpll_recalc,
413};
414
415/*
416 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
417 * DPLL isn't bypassed
418 */
419static struct clk dpll3_x2_ck = {
420 .name = "dpll3_x2_ck",
421 .ops = &clkops_null,
422 .parent = &dpll3_ck,
423 .clkdm_name = "dpll3_clkdm",
424 .recalc = &omap3_clkoutx2_recalc,
425};
426
427static const struct clksel_rate div31_dpll3_rates[] = {
428 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
429 { .div = 2, .val = 2, .flags = RATE_IN_343X },
430 { .div = 3, .val = 3, .flags = RATE_IN_3430ES2 },
431 { .div = 4, .val = 4, .flags = RATE_IN_3430ES2 },
432 { .div = 5, .val = 5, .flags = RATE_IN_3430ES2 },
433 { .div = 6, .val = 6, .flags = RATE_IN_3430ES2 },
434 { .div = 7, .val = 7, .flags = RATE_IN_3430ES2 },
435 { .div = 8, .val = 8, .flags = RATE_IN_3430ES2 },
436 { .div = 9, .val = 9, .flags = RATE_IN_3430ES2 },
437 { .div = 10, .val = 10, .flags = RATE_IN_3430ES2 },
438 { .div = 11, .val = 11, .flags = RATE_IN_3430ES2 },
439 { .div = 12, .val = 12, .flags = RATE_IN_3430ES2 },
440 { .div = 13, .val = 13, .flags = RATE_IN_3430ES2 },
441 { .div = 14, .val = 14, .flags = RATE_IN_3430ES2 },
442 { .div = 15, .val = 15, .flags = RATE_IN_3430ES2 },
443 { .div = 16, .val = 16, .flags = RATE_IN_3430ES2 },
444 { .div = 17, .val = 17, .flags = RATE_IN_3430ES2 },
445 { .div = 18, .val = 18, .flags = RATE_IN_3430ES2 },
446 { .div = 19, .val = 19, .flags = RATE_IN_3430ES2 },
447 { .div = 20, .val = 20, .flags = RATE_IN_3430ES2 },
448 { .div = 21, .val = 21, .flags = RATE_IN_3430ES2 },
449 { .div = 22, .val = 22, .flags = RATE_IN_3430ES2 },
450 { .div = 23, .val = 23, .flags = RATE_IN_3430ES2 },
451 { .div = 24, .val = 24, .flags = RATE_IN_3430ES2 },
452 { .div = 25, .val = 25, .flags = RATE_IN_3430ES2 },
453 { .div = 26, .val = 26, .flags = RATE_IN_3430ES2 },
454 { .div = 27, .val = 27, .flags = RATE_IN_3430ES2 },
455 { .div = 28, .val = 28, .flags = RATE_IN_3430ES2 },
456 { .div = 29, .val = 29, .flags = RATE_IN_3430ES2 },
457 { .div = 30, .val = 30, .flags = RATE_IN_3430ES2 },
458 { .div = 31, .val = 31, .flags = RATE_IN_3430ES2 },
459 { .div = 0 },
460};
461
462static const struct clksel div31_dpll3m2_clksel[] = {
463 { .parent = &dpll3_ck, .rates = div31_dpll3_rates },
464 { .parent = NULL }
465};
466
467/* DPLL3 output M2 - primary control point for CORE speed */
468static struct clk dpll3_m2_ck = {
469 .name = "dpll3_m2_ck",
470 .ops = &clkops_null,
471 .parent = &dpll3_ck,
472 .init = &omap2_init_clksel_parent,
473 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
474 .clksel_mask = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
475 .clksel = div31_dpll3m2_clksel,
476 .clkdm_name = "dpll3_clkdm",
477 .round_rate = &omap2_clksel_round_rate,
478 .set_rate = &omap3_core_dpll_m2_set_rate,
479 .recalc = &omap2_clksel_recalc,
480};
481
482static struct clk core_ck = {
483 .name = "core_ck",
484 .ops = &clkops_null,
485 .parent = &dpll3_m2_ck,
486 .recalc = &followparent_recalc,
487};
488
489static struct clk dpll3_m2x2_ck = {
490 .name = "dpll3_m2x2_ck",
491 .ops = &clkops_null,
492 .parent = &dpll3_m2_ck,
493 .clkdm_name = "dpll3_clkdm",
494 .recalc = &omap3_clkoutx2_recalc,
495};
496
497/* The PWRDN bit is apparently only available on 3430ES2 and above */
498static const struct clksel div16_dpll3_clksel[] = {
499 { .parent = &dpll3_ck, .rates = div16_dpll_rates },
500 { .parent = NULL }
501};
502
503/* This virtual clock is the source for dpll3_m3x2_ck */
504static struct clk dpll3_m3_ck = {
505 .name = "dpll3_m3_ck",
506 .ops = &clkops_null,
507 .parent = &dpll3_ck,
508 .init = &omap2_init_clksel_parent,
509 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
510 .clksel_mask = OMAP3430_DIV_DPLL3_MASK,
511 .clksel = div16_dpll3_clksel,
512 .clkdm_name = "dpll3_clkdm",
513 .recalc = &omap2_clksel_recalc,
514};
515
516/* The PWRDN bit is apparently only available on 3430ES2 and above */
517static struct clk dpll3_m3x2_ck = {
518 .name = "dpll3_m3x2_ck",
519 .ops = &clkops_omap2_dflt_wait,
520 .parent = &dpll3_m3_ck,
521 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
522 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
523 .flags = INVERT_ENABLE,
524 .clkdm_name = "dpll3_clkdm",
525 .recalc = &omap3_clkoutx2_recalc,
526};
527
528static struct clk emu_core_alwon_ck = {
529 .name = "emu_core_alwon_ck",
530 .ops = &clkops_null,
531 .parent = &dpll3_m3x2_ck,
532 .clkdm_name = "dpll3_clkdm",
533 .recalc = &followparent_recalc,
534};
535
536/* DPLL4 */
537/* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
538/* Type: DPLL */
539static struct dpll_data dpll4_dd = {
540 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2),
541 .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK,
542 .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK,
543 .clk_bypass = &sys_ck,
544 .clk_ref = &sys_ck,
545 .freqsel_mask = OMAP3430_PERIPH_DPLL_FREQSEL_MASK,
546 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
547 .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK,
548 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
549 .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT,
550 .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT,
551 .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT,
552 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
553 .autoidle_mask = OMAP3430_AUTO_PERIPH_DPLL_MASK,
554 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
555 .idlest_mask = OMAP3430_ST_PERIPH_CLK_MASK,
556 .max_multiplier = OMAP3_MAX_DPLL_MULT,
557 .min_divider = 1,
558 .max_divider = OMAP3_MAX_DPLL_DIV,
559 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
560};
561
562static struct clk dpll4_ck = {
563 .name = "dpll4_ck",
564 .ops = &clkops_noncore_dpll_ops,
565 .parent = &sys_ck,
566 .dpll_data = &dpll4_dd,
567 .round_rate = &omap2_dpll_round_rate,
568 .set_rate = &omap3_dpll4_set_rate,
569 .clkdm_name = "dpll4_clkdm",
570 .recalc = &omap3_dpll_recalc,
571};
572
573/*
574 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
575 * DPLL isn't bypassed --
576 * XXX does this serve any downstream clocks?
577 */
578static struct clk dpll4_x2_ck = {
579 .name = "dpll4_x2_ck",
580 .ops = &clkops_null,
581 .parent = &dpll4_ck,
582 .clkdm_name = "dpll4_clkdm",
583 .recalc = &omap3_clkoutx2_recalc,
584};
585
586static const struct clksel div16_dpll4_clksel[] = {
587 { .parent = &dpll4_ck, .rates = div16_dpll_rates },
588 { .parent = NULL }
589};
590
591/* This virtual clock is the source for dpll4_m2x2_ck */
592static struct clk dpll4_m2_ck = {
593 .name = "dpll4_m2_ck",
594 .ops = &clkops_null,
595 .parent = &dpll4_ck,
596 .init = &omap2_init_clksel_parent,
597 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
598 .clksel_mask = OMAP3430_DIV_96M_MASK,
599 .clksel = div16_dpll4_clksel,
600 .clkdm_name = "dpll4_clkdm",
601 .recalc = &omap2_clksel_recalc,
602};
603
604/* The PWRDN bit is apparently only available on 3430ES2 and above */
605static struct clk dpll4_m2x2_ck = {
606 .name = "dpll4_m2x2_ck",
607 .ops = &clkops_omap2_dflt_wait,
608 .parent = &dpll4_m2_ck,
609 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
610 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
611 .flags = INVERT_ENABLE,
612 .clkdm_name = "dpll4_clkdm",
613 .recalc = &omap3_clkoutx2_recalc,
614};
615
616/*
617 * DPLL4 generates DPLL4_M2X2_CLK which is then routed into the PRM as
618 * PRM_96M_ALWON_(F)CLK. Two clocks then emerge from the PRM:
619 * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and
620 * CM_96K_(F)CLK.
621 */
622static struct clk omap_96m_alwon_fck = {
623 .name = "omap_96m_alwon_fck",
624 .ops = &clkops_null,
625 .parent = &dpll4_m2x2_ck,
626 .recalc = &followparent_recalc,
627};
628
629static struct clk cm_96m_fck = {
630 .name = "cm_96m_fck",
631 .ops = &clkops_null,
632 .parent = &omap_96m_alwon_fck,
633 .recalc = &followparent_recalc,
634};
635
636static const struct clksel_rate omap_96m_dpll_rates[] = {
637 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
638 { .div = 0 }
639};
640
641static const struct clksel_rate omap_96m_sys_rates[] = {
642 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
643 { .div = 0 }
644};
645
646static const struct clksel omap_96m_fck_clksel[] = {
647 { .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates },
648 { .parent = &sys_ck, .rates = omap_96m_sys_rates },
649 { .parent = NULL }
650};
651
652static struct clk omap_96m_fck = {
653 .name = "omap_96m_fck",
654 .ops = &clkops_null,
655 .parent = &sys_ck,
656 .init = &omap2_init_clksel_parent,
657 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
658 .clksel_mask = OMAP3430_SOURCE_96M_MASK,
659 .clksel = omap_96m_fck_clksel,
660 .recalc = &omap2_clksel_recalc,
661};
662
663/* This virtual clock is the source for dpll4_m3x2_ck */
664static struct clk dpll4_m3_ck = {
665 .name = "dpll4_m3_ck",
666 .ops = &clkops_null,
667 .parent = &dpll4_ck,
668 .init = &omap2_init_clksel_parent,
669 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
670 .clksel_mask = OMAP3430_CLKSEL_TV_MASK,
671 .clksel = div16_dpll4_clksel,
672 .clkdm_name = "dpll4_clkdm",
673 .recalc = &omap2_clksel_recalc,
674};
675
676/* The PWRDN bit is apparently only available on 3430ES2 and above */
677static struct clk dpll4_m3x2_ck = {
678 .name = "dpll4_m3x2_ck",
679 .ops = &clkops_omap2_dflt_wait,
680 .parent = &dpll4_m3_ck,
681 .init = &omap2_init_clksel_parent,
682 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
683 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
684 .flags = INVERT_ENABLE,
685 .clkdm_name = "dpll4_clkdm",
686 .recalc = &omap3_clkoutx2_recalc,
687};
688
689static const struct clksel_rate omap_54m_d4m3x2_rates[] = {
690 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
691 { .div = 0 }
692};
693
694static const struct clksel_rate omap_54m_alt_rates[] = {
695 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
696 { .div = 0 }
697};
698
699static const struct clksel omap_54m_clksel[] = {
700 { .parent = &dpll4_m3x2_ck, .rates = omap_54m_d4m3x2_rates },
701 { .parent = &sys_altclk, .rates = omap_54m_alt_rates },
702 { .parent = NULL }
703};
704
705static struct clk omap_54m_fck = {
706 .name = "omap_54m_fck",
707 .ops = &clkops_null,
708 .init = &omap2_init_clksel_parent,
709 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
710 .clksel_mask = OMAP3430_SOURCE_54M_MASK,
711 .clksel = omap_54m_clksel,
712 .recalc = &omap2_clksel_recalc,
713};
714
715static const struct clksel_rate omap_48m_cm96m_rates[] = {
716 { .div = 2, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
717 { .div = 0 }
718};
719
720static const struct clksel_rate omap_48m_alt_rates[] = {
721 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
722 { .div = 0 }
723};
724
725static const struct clksel omap_48m_clksel[] = {
726 { .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
727 { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
728 { .parent = NULL }
729};
730
731static struct clk omap_48m_fck = {
732 .name = "omap_48m_fck",
733 .ops = &clkops_null,
734 .init = &omap2_init_clksel_parent,
735 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
736 .clksel_mask = OMAP3430_SOURCE_48M_MASK,
737 .clksel = omap_48m_clksel,
738 .recalc = &omap2_clksel_recalc,
739};
740
741static struct clk omap_12m_fck = {
742 .name = "omap_12m_fck",
743 .ops = &clkops_null,
744 .parent = &omap_48m_fck,
745 .fixed_div = 4,
746 .recalc = &omap2_fixed_divisor_recalc,
747};
748
749/* This virstual clock is the source for dpll4_m4x2_ck */
750static struct clk dpll4_m4_ck = {
751 .name = "dpll4_m4_ck",
752 .ops = &clkops_null,
753 .parent = &dpll4_ck,
754 .init = &omap2_init_clksel_parent,
755 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
756 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK,
757 .clksel = div16_dpll4_clksel,
758 .clkdm_name = "dpll4_clkdm",
759 .recalc = &omap2_clksel_recalc,
760 .set_rate = &omap2_clksel_set_rate,
761 .round_rate = &omap2_clksel_round_rate,
762};
763
764/* The PWRDN bit is apparently only available on 3430ES2 and above */
765static struct clk dpll4_m4x2_ck = {
766 .name = "dpll4_m4x2_ck",
767 .ops = &clkops_omap2_dflt_wait,
768 .parent = &dpll4_m4_ck,
769 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
770 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
771 .flags = INVERT_ENABLE,
772 .clkdm_name = "dpll4_clkdm",
773 .recalc = &omap3_clkoutx2_recalc,
774};
775
776/* This virtual clock is the source for dpll4_m5x2_ck */
777static struct clk dpll4_m5_ck = {
778 .name = "dpll4_m5_ck",
779 .ops = &clkops_null,
780 .parent = &dpll4_ck,
781 .init = &omap2_init_clksel_parent,
782 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
783 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
784 .clksel = div16_dpll4_clksel,
785 .clkdm_name = "dpll4_clkdm",
786 .recalc = &omap2_clksel_recalc,
787};
788
789/* The PWRDN bit is apparently only available on 3430ES2 and above */
790static struct clk dpll4_m5x2_ck = {
791 .name = "dpll4_m5x2_ck",
792 .ops = &clkops_omap2_dflt_wait,
793 .parent = &dpll4_m5_ck,
794 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
795 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
796 .flags = INVERT_ENABLE,
797 .clkdm_name = "dpll4_clkdm",
798 .recalc = &omap3_clkoutx2_recalc,
799};
800
801/* This virtual clock is the source for dpll4_m6x2_ck */
802static struct clk dpll4_m6_ck = {
803 .name = "dpll4_m6_ck",
804 .ops = &clkops_null,
805 .parent = &dpll4_ck,
806 .init = &omap2_init_clksel_parent,
807 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
808 .clksel_mask = OMAP3430_DIV_DPLL4_MASK,
809 .clksel = div16_dpll4_clksel,
810 .clkdm_name = "dpll4_clkdm",
811 .recalc = &omap2_clksel_recalc,
812};
813
814/* The PWRDN bit is apparently only available on 3430ES2 and above */
815static struct clk dpll4_m6x2_ck = {
816 .name = "dpll4_m6x2_ck",
817 .ops = &clkops_omap2_dflt_wait,
818 .parent = &dpll4_m6_ck,
819 .init = &omap2_init_clksel_parent,
820 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
821 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
822 .flags = INVERT_ENABLE,
823 .clkdm_name = "dpll4_clkdm",
824 .recalc = &omap3_clkoutx2_recalc,
825};
826
827static struct clk emu_per_alwon_ck = {
828 .name = "emu_per_alwon_ck",
829 .ops = &clkops_null,
830 .parent = &dpll4_m6x2_ck,
831 .clkdm_name = "dpll4_clkdm",
832 .recalc = &followparent_recalc,
833};
834
835/* DPLL5 */
836/* Supplies 120MHz clock, USIM source clock */
837/* Type: DPLL */
838/* 3430ES2 only */
839static struct dpll_data dpll5_dd = {
840 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
841 .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
842 .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
843 .clk_bypass = &sys_ck,
844 .clk_ref = &sys_ck,
845 .freqsel_mask = OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
846 .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
847 .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
848 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
849 .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
850 .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
851 .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
852 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
853 .autoidle_mask = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
854 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
855 .idlest_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
856 .max_multiplier = OMAP3_MAX_DPLL_MULT,
857 .min_divider = 1,
858 .max_divider = OMAP3_MAX_DPLL_DIV,
859 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
860};
861
862static struct clk dpll5_ck = {
863 .name = "dpll5_ck",
864 .ops = &clkops_noncore_dpll_ops,
865 .parent = &sys_ck,
866 .dpll_data = &dpll5_dd,
867 .round_rate = &omap2_dpll_round_rate,
868 .set_rate = &omap3_noncore_dpll_set_rate,
869 .clkdm_name = "dpll5_clkdm",
870 .recalc = &omap3_dpll_recalc,
871};
872
873static const struct clksel div16_dpll5_clksel[] = {
874 { .parent = &dpll5_ck, .rates = div16_dpll_rates },
875 { .parent = NULL }
876};
877
878static struct clk dpll5_m2_ck = {
879 .name = "dpll5_m2_ck",
880 .ops = &clkops_null,
881 .parent = &dpll5_ck,
882 .init = &omap2_init_clksel_parent,
883 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
884 .clksel_mask = OMAP3430ES2_DIV_120M_MASK,
885 .clksel = div16_dpll5_clksel,
886 .clkdm_name = "dpll5_clkdm",
887 .recalc = &omap2_clksel_recalc,
888};
889
890/* CM EXTERNAL CLOCK OUTPUTS */
891
892static const struct clksel_rate clkout2_src_core_rates[] = {
893 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
894 { .div = 0 }
895};
896
897static const struct clksel_rate clkout2_src_sys_rates[] = {
898 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
899 { .div = 0 }
900};
901
902static const struct clksel_rate clkout2_src_96m_rates[] = {
903 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
904 { .div = 0 }
905};
906
907static const struct clksel_rate clkout2_src_54m_rates[] = {
908 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
909 { .div = 0 }
910};
911
912static const struct clksel clkout2_src_clksel[] = {
913 { .parent = &core_ck, .rates = clkout2_src_core_rates },
914 { .parent = &sys_ck, .rates = clkout2_src_sys_rates },
915 { .parent = &cm_96m_fck, .rates = clkout2_src_96m_rates },
916 { .parent = &omap_54m_fck, .rates = clkout2_src_54m_rates },
917 { .parent = NULL }
918};
919
920static struct clk clkout2_src_ck = {
921 .name = "clkout2_src_ck",
922 .ops = &clkops_omap2_dflt,
923 .init = &omap2_init_clksel_parent,
924 .enable_reg = OMAP3430_CM_CLKOUT_CTRL,
925 .enable_bit = OMAP3430_CLKOUT2_EN_SHIFT,
926 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
927 .clksel_mask = OMAP3430_CLKOUT2SOURCE_MASK,
928 .clksel = clkout2_src_clksel,
929 .clkdm_name = "core_clkdm",
930 .recalc = &omap2_clksel_recalc,
931};
932
933static const struct clksel_rate sys_clkout2_rates[] = {
934 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
935 { .div = 2, .val = 1, .flags = RATE_IN_343X },
936 { .div = 4, .val = 2, .flags = RATE_IN_343X },
937 { .div = 8, .val = 3, .flags = RATE_IN_343X },
938 { .div = 16, .val = 4, .flags = RATE_IN_343X },
939 { .div = 0 },
940};
941
942static const struct clksel sys_clkout2_clksel[] = {
943 { .parent = &clkout2_src_ck, .rates = sys_clkout2_rates },
944 { .parent = NULL },
945};
946
947static struct clk sys_clkout2 = {
948 .name = "sys_clkout2",
949 .ops = &clkops_null,
950 .init = &omap2_init_clksel_parent,
951 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
952 .clksel_mask = OMAP3430_CLKOUT2_DIV_MASK,
953 .clksel = sys_clkout2_clksel,
954 .recalc = &omap2_clksel_recalc,
955};
956
957/* CM OUTPUT CLOCKS */
958
959static struct clk corex2_fck = {
960 .name = "corex2_fck",
961 .ops = &clkops_null,
962 .parent = &dpll3_m2x2_ck,
963 .recalc = &followparent_recalc,
964};
965
966/* DPLL power domain clock controls */
967
968static const struct clksel_rate div4_rates[] = {
969 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
970 { .div = 2, .val = 2, .flags = RATE_IN_343X },
971 { .div = 4, .val = 4, .flags = RATE_IN_343X },
972 { .div = 0 }
973};
974
975static const struct clksel div4_core_clksel[] = {
976 { .parent = &core_ck, .rates = div4_rates },
977 { .parent = NULL }
978};
979
980/*
981 * REVISIT: Are these in DPLL power domain or CM power domain? docs
982 * may be inconsistent here?
983 */
984static struct clk dpll1_fck = {
985 .name = "dpll1_fck",
986 .ops = &clkops_null,
987 .parent = &core_ck,
988 .init = &omap2_init_clksel_parent,
989 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
990 .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK,
991 .clksel = div4_core_clksel,
992 .recalc = &omap2_clksel_recalc,
993};
994
995static struct clk mpu_ck = {
996 .name = "mpu_ck",
997 .ops = &clkops_null,
998 .parent = &dpll1_x2m2_ck,
999 .clkdm_name = "mpu_clkdm",
1000 .recalc = &followparent_recalc,
1001};
1002
1003/* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
1004static const struct clksel_rate arm_fck_rates[] = {
1005 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1006 { .div = 2, .val = 1, .flags = RATE_IN_343X },
1007 { .div = 0 },
1008};
1009
1010static const struct clksel arm_fck_clksel[] = {
1011 { .parent = &mpu_ck, .rates = arm_fck_rates },
1012 { .parent = NULL }
1013};
1014
1015static struct clk arm_fck = {
1016 .name = "arm_fck",
1017 .ops = &clkops_null,
1018 .parent = &mpu_ck,
1019 .init = &omap2_init_clksel_parent,
1020 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1021 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1022 .clksel = arm_fck_clksel,
1023 .clkdm_name = "mpu_clkdm",
1024 .recalc = &omap2_clksel_recalc,
1025};
1026
1027/* XXX What about neon_clkdm ? */
1028
1029/*
1030 * REVISIT: This clock is never specifically defined in the 3430 TRM,
1031 * although it is referenced - so this is a guess
1032 */
1033static struct clk emu_mpu_alwon_ck = {
1034 .name = "emu_mpu_alwon_ck",
1035 .ops = &clkops_null,
1036 .parent = &mpu_ck,
1037 .recalc = &followparent_recalc,
1038};
1039
1040static struct clk dpll2_fck = {
1041 .name = "dpll2_fck",
1042 .ops = &clkops_null,
1043 .parent = &core_ck,
1044 .init = &omap2_init_clksel_parent,
1045 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
1046 .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK,
1047 .clksel = div4_core_clksel,
1048 .recalc = &omap2_clksel_recalc,
1049};
1050
1051static struct clk iva2_ck = {
1052 .name = "iva2_ck",
1053 .ops = &clkops_omap2_dflt_wait,
1054 .parent = &dpll2_m2_ck,
1055 .init = &omap2_init_clksel_parent,
1056 .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
1057 .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
1058 .clkdm_name = "iva2_clkdm",
1059 .recalc = &followparent_recalc,
1060};
1061
1062/* Common interface clocks */
1063
1064static const struct clksel div2_core_clksel[] = {
1065 { .parent = &core_ck, .rates = div2_rates },
1066 { .parent = NULL }
1067};
1068
1069static struct clk l3_ick = {
1070 .name = "l3_ick",
1071 .ops = &clkops_null,
1072 .parent = &core_ck,
1073 .init = &omap2_init_clksel_parent,
1074 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1075 .clksel_mask = OMAP3430_CLKSEL_L3_MASK,
1076 .clksel = div2_core_clksel,
1077 .clkdm_name = "core_l3_clkdm",
1078 .recalc = &omap2_clksel_recalc,
1079};
1080
1081static const struct clksel div2_l3_clksel[] = {
1082 { .parent = &l3_ick, .rates = div2_rates },
1083 { .parent = NULL }
1084};
1085
1086static struct clk l4_ick = {
1087 .name = "l4_ick",
1088 .ops = &clkops_null,
1089 .parent = &l3_ick,
1090 .init = &omap2_init_clksel_parent,
1091 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1092 .clksel_mask = OMAP3430_CLKSEL_L4_MASK,
1093 .clksel = div2_l3_clksel,
1094 .clkdm_name = "core_l4_clkdm",
1095 .recalc = &omap2_clksel_recalc,
1096
1097};
1098
1099static const struct clksel div2_l4_clksel[] = {
1100 { .parent = &l4_ick, .rates = div2_rates },
1101 { .parent = NULL }
1102};
1103
1104static struct clk rm_ick = {
1105 .name = "rm_ick",
1106 .ops = &clkops_null,
1107 .parent = &l4_ick,
1108 .init = &omap2_init_clksel_parent,
1109 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
1110 .clksel_mask = OMAP3430_CLKSEL_RM_MASK,
1111 .clksel = div2_l4_clksel,
1112 .recalc = &omap2_clksel_recalc,
1113};
1114
1115/* GFX power domain */
1116
1117/* GFX clocks are in 3430ES1 only. 3430ES2 and later uses the SGX instead */
1118
1119static const struct clksel gfx_l3_clksel[] = {
1120 { .parent = &l3_ick, .rates = gfx_l3_rates },
1121 { .parent = NULL }
1122};
1123
1124/* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */
1125static struct clk gfx_l3_ck = {
1126 .name = "gfx_l3_ck",
1127 .ops = &clkops_omap2_dflt_wait,
1128 .parent = &l3_ick,
1129 .init = &omap2_init_clksel_parent,
1130 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1131 .enable_bit = OMAP_EN_GFX_SHIFT,
1132 .recalc = &followparent_recalc,
1133};
1134
1135static struct clk gfx_l3_fck = {
1136 .name = "gfx_l3_fck",
1137 .ops = &clkops_null,
1138 .parent = &gfx_l3_ck,
1139 .init = &omap2_init_clksel_parent,
1140 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1141 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1142 .clksel = gfx_l3_clksel,
1143 .clkdm_name = "gfx_3430es1_clkdm",
1144 .recalc = &omap2_clksel_recalc,
1145};
1146
1147static struct clk gfx_l3_ick = {
1148 .name = "gfx_l3_ick",
1149 .ops = &clkops_null,
1150 .parent = &gfx_l3_ck,
1151 .clkdm_name = "gfx_3430es1_clkdm",
1152 .recalc = &followparent_recalc,
1153};
1154
1155static struct clk gfx_cg1_ck = {
1156 .name = "gfx_cg1_ck",
1157 .ops = &clkops_omap2_dflt_wait,
1158 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1159 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1160 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1161 .clkdm_name = "gfx_3430es1_clkdm",
1162 .recalc = &followparent_recalc,
1163};
1164
1165static struct clk gfx_cg2_ck = {
1166 .name = "gfx_cg2_ck",
1167 .ops = &clkops_omap2_dflt_wait,
1168 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1169 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1170 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1171 .clkdm_name = "gfx_3430es1_clkdm",
1172 .recalc = &followparent_recalc,
1173};
1174
1175/* SGX power domain - 3430ES2 only */
1176
1177static const struct clksel_rate sgx_core_rates[] = {
1178 { .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1179 { .div = 4, .val = 1, .flags = RATE_IN_343X },
1180 { .div = 6, .val = 2, .flags = RATE_IN_343X },
1181 { .div = 0 },
1182};
1183
1184static const struct clksel_rate sgx_96m_rates[] = {
1185 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
1186 { .div = 0 },
1187};
1188
1189static const struct clksel sgx_clksel[] = {
1190 { .parent = &core_ck, .rates = sgx_core_rates },
1191 { .parent = &cm_96m_fck, .rates = sgx_96m_rates },
1192 { .parent = NULL },
1193};
1194
1195static struct clk sgx_fck = {
1196 .name = "sgx_fck",
1197 .ops = &clkops_omap2_dflt_wait,
1198 .init = &omap2_init_clksel_parent,
1199 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
1200 .enable_bit = OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
1201 .clksel_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
1202 .clksel_mask = OMAP3430ES2_CLKSEL_SGX_MASK,
1203 .clksel = sgx_clksel,
1204 .clkdm_name = "sgx_clkdm",
1205 .recalc = &omap2_clksel_recalc,
1206};
1207
1208static struct clk sgx_ick = {
1209 .name = "sgx_ick",
1210 .ops = &clkops_omap2_dflt_wait,
1211 .parent = &l3_ick,
1212 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
1213 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
1214 .clkdm_name = "sgx_clkdm",
1215 .recalc = &followparent_recalc,
1216};
1217
1218/* CORE power domain */
1219
1220static struct clk d2d_26m_fck = {
1221 .name = "d2d_26m_fck",
1222 .ops = &clkops_omap2_dflt_wait,
1223 .parent = &sys_ck,
1224 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1225 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
1226 .clkdm_name = "d2d_clkdm",
1227 .recalc = &followparent_recalc,
1228};
1229
1230static struct clk modem_fck = {
1231 .name = "modem_fck",
1232 .ops = &clkops_omap2_dflt_wait,
1233 .parent = &sys_ck,
1234 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1235 .enable_bit = OMAP3430_EN_MODEM_SHIFT,
1236 .clkdm_name = "d2d_clkdm",
1237 .recalc = &followparent_recalc,
1238};
1239
1240static struct clk sad2d_ick = {
1241 .name = "sad2d_ick",
1242 .ops = &clkops_omap2_dflt_wait,
1243 .parent = &l3_ick,
1244 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1245 .enable_bit = OMAP3430_EN_SAD2D_SHIFT,
1246 .clkdm_name = "d2d_clkdm",
1247 .recalc = &followparent_recalc,
1248};
1249
1250static struct clk mad2d_ick = {
1251 .name = "mad2d_ick",
1252 .ops = &clkops_omap2_dflt_wait,
1253 .parent = &l3_ick,
1254 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1255 .enable_bit = OMAP3430_EN_MAD2D_SHIFT,
1256 .clkdm_name = "d2d_clkdm",
1257 .recalc = &followparent_recalc,
1258};
1259
1260static const struct clksel omap343x_gpt_clksel[] = {
1261 { .parent = &omap_32k_fck, .rates = gpt_32k_rates },
1262 { .parent = &sys_ck, .rates = gpt_sys_rates },
1263 { .parent = NULL}
1264};
1265
1266static struct clk gpt10_fck = {
1267 .name = "gpt10_fck",
1268 .ops = &clkops_omap2_dflt_wait,
1269 .parent = &sys_ck,
1270 .init = &omap2_init_clksel_parent,
1271 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1272 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1273 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1274 .clksel_mask = OMAP3430_CLKSEL_GPT10_MASK,
1275 .clksel = omap343x_gpt_clksel,
1276 .clkdm_name = "core_l4_clkdm",
1277 .recalc = &omap2_clksel_recalc,
1278};
1279
1280static struct clk gpt11_fck = {
1281 .name = "gpt11_fck",
1282 .ops = &clkops_omap2_dflt_wait,
1283 .parent = &sys_ck,
1284 .init = &omap2_init_clksel_parent,
1285 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1286 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1287 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1288 .clksel_mask = OMAP3430_CLKSEL_GPT11_MASK,
1289 .clksel = omap343x_gpt_clksel,
1290 .clkdm_name = "core_l4_clkdm",
1291 .recalc = &omap2_clksel_recalc,
1292};
1293
1294static struct clk cpefuse_fck = {
1295 .name = "cpefuse_fck",
1296 .ops = &clkops_omap2_dflt,
1297 .parent = &sys_ck,
1298 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1299 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
1300 .recalc = &followparent_recalc,
1301};
1302
1303static struct clk ts_fck = {
1304 .name = "ts_fck",
1305 .ops = &clkops_omap2_dflt,
1306 .parent = &omap_32k_fck,
1307 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1308 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
1309 .recalc = &followparent_recalc,
1310};
1311
1312static struct clk usbtll_fck = {
1313 .name = "usbtll_fck",
1314 .ops = &clkops_omap2_dflt,
1315 .parent = &dpll5_m2_ck,
1316 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1317 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1318 .recalc = &followparent_recalc,
1319};
1320
1321/* CORE 96M FCLK-derived clocks */
1322
1323static struct clk core_96m_fck = {
1324 .name = "core_96m_fck",
1325 .ops = &clkops_null,
1326 .parent = &omap_96m_fck,
1327 .clkdm_name = "core_l4_clkdm",
1328 .recalc = &followparent_recalc,
1329};
1330
1331static struct clk mmchs3_fck = {
1332 .name = "mmchs_fck",
1333 .ops = &clkops_omap2_dflt_wait,
1334 .id = 2,
1335 .parent = &core_96m_fck,
1336 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1337 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1338 .clkdm_name = "core_l4_clkdm",
1339 .recalc = &followparent_recalc,
1340};
1341
1342static struct clk mmchs2_fck = {
1343 .name = "mmchs_fck",
1344 .ops = &clkops_omap2_dflt_wait,
1345 .id = 1,
1346 .parent = &core_96m_fck,
1347 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1348 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1349 .clkdm_name = "core_l4_clkdm",
1350 .recalc = &followparent_recalc,
1351};
1352
1353static struct clk mspro_fck = {
1354 .name = "mspro_fck",
1355 .ops = &clkops_omap2_dflt_wait,
1356 .parent = &core_96m_fck,
1357 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1358 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1359 .clkdm_name = "core_l4_clkdm",
1360 .recalc = &followparent_recalc,
1361};
1362
1363static struct clk mmchs1_fck = {
1364 .name = "mmchs_fck",
1365 .ops = &clkops_omap2_dflt_wait,
1366 .parent = &core_96m_fck,
1367 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1368 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1369 .clkdm_name = "core_l4_clkdm",
1370 .recalc = &followparent_recalc,
1371};
1372
1373static struct clk i2c3_fck = {
1374 .name = "i2c_fck",
1375 .ops = &clkops_omap2_dflt_wait,
1376 .id = 3,
1377 .parent = &core_96m_fck,
1378 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1379 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1380 .clkdm_name = "core_l4_clkdm",
1381 .recalc = &followparent_recalc,
1382};
1383
1384static struct clk i2c2_fck = {
1385 .name = "i2c_fck",
1386 .ops = &clkops_omap2_dflt_wait,
1387 .id = 2,
1388 .parent = &core_96m_fck,
1389 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1390 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1391 .clkdm_name = "core_l4_clkdm",
1392 .recalc = &followparent_recalc,
1393};
1394
1395static struct clk i2c1_fck = {
1396 .name = "i2c_fck",
1397 .ops = &clkops_omap2_dflt_wait,
1398 .id = 1,
1399 .parent = &core_96m_fck,
1400 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1401 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1402 .clkdm_name = "core_l4_clkdm",
1403 .recalc = &followparent_recalc,
1404};
1405
1406/*
1407 * MCBSP 1 & 5 get their 96MHz clock from core_96m_fck;
1408 * MCBSP 2, 3, 4 get their 96MHz clock from per_96m_fck.
1409 */
1410static const struct clksel_rate common_mcbsp_96m_rates[] = {
1411 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1412 { .div = 0 }
1413};
1414
1415static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
1416 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1417 { .div = 0 }
1418};
1419
1420static const struct clksel mcbsp_15_clksel[] = {
1421 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
1422 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
1423 { .parent = NULL }
1424};
1425
1426static struct clk mcbsp5_fck = {
1427 .name = "mcbsp_fck",
1428 .ops = &clkops_omap2_dflt_wait,
1429 .id = 5,
1430 .init = &omap2_init_clksel_parent,
1431 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1432 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1433 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
1434 .clksel_mask = OMAP2_MCBSP5_CLKS_MASK,
1435 .clksel = mcbsp_15_clksel,
1436 .clkdm_name = "core_l4_clkdm",
1437 .recalc = &omap2_clksel_recalc,
1438};
1439
1440static struct clk mcbsp1_fck = {
1441 .name = "mcbsp_fck",
1442 .ops = &clkops_omap2_dflt_wait,
1443 .id = 1,
1444 .init = &omap2_init_clksel_parent,
1445 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1446 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1447 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
1448 .clksel_mask = OMAP2_MCBSP1_CLKS_MASK,
1449 .clksel = mcbsp_15_clksel,
1450 .clkdm_name = "core_l4_clkdm",
1451 .recalc = &omap2_clksel_recalc,
1452};
1453
1454/* CORE_48M_FCK-derived clocks */
1455
1456static struct clk core_48m_fck = {
1457 .name = "core_48m_fck",
1458 .ops = &clkops_null,
1459 .parent = &omap_48m_fck,
1460 .clkdm_name = "core_l4_clkdm",
1461 .recalc = &followparent_recalc,
1462};
1463
1464static struct clk mcspi4_fck = {
1465 .name = "mcspi_fck",
1466 .ops = &clkops_omap2_dflt_wait,
1467 .id = 4,
1468 .parent = &core_48m_fck,
1469 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1470 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1471 .recalc = &followparent_recalc,
1472};
1473
1474static struct clk mcspi3_fck = {
1475 .name = "mcspi_fck",
1476 .ops = &clkops_omap2_dflt_wait,
1477 .id = 3,
1478 .parent = &core_48m_fck,
1479 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1480 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1481 .recalc = &followparent_recalc,
1482};
1483
1484static struct clk mcspi2_fck = {
1485 .name = "mcspi_fck",
1486 .ops = &clkops_omap2_dflt_wait,
1487 .id = 2,
1488 .parent = &core_48m_fck,
1489 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1490 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1491 .recalc = &followparent_recalc,
1492};
1493
1494static struct clk mcspi1_fck = {
1495 .name = "mcspi_fck",
1496 .ops = &clkops_omap2_dflt_wait,
1497 .id = 1,
1498 .parent = &core_48m_fck,
1499 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1500 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1501 .recalc = &followparent_recalc,
1502};
1503
1504static struct clk uart2_fck = {
1505 .name = "uart2_fck",
1506 .ops = &clkops_omap2_dflt_wait,
1507 .parent = &core_48m_fck,
1508 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1509 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1510 .recalc = &followparent_recalc,
1511};
1512
1513static struct clk uart1_fck = {
1514 .name = "uart1_fck",
1515 .ops = &clkops_omap2_dflt_wait,
1516 .parent = &core_48m_fck,
1517 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1518 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1519 .recalc = &followparent_recalc,
1520};
1521
1522static struct clk fshostusb_fck = {
1523 .name = "fshostusb_fck",
1524 .ops = &clkops_omap2_dflt_wait,
1525 .parent = &core_48m_fck,
1526 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1527 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1528 .recalc = &followparent_recalc,
1529};
1530
1531/* CORE_12M_FCK based clocks */
1532
1533static struct clk core_12m_fck = {
1534 .name = "core_12m_fck",
1535 .ops = &clkops_null,
1536 .parent = &omap_12m_fck,
1537 .clkdm_name = "core_l4_clkdm",
1538 .recalc = &followparent_recalc,
1539};
1540
1541static struct clk hdq_fck = {
1542 .name = "hdq_fck",
1543 .ops = &clkops_omap2_dflt_wait,
1544 .parent = &core_12m_fck,
1545 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1546 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1547 .recalc = &followparent_recalc,
1548};
1549
1550/* DPLL3-derived clock */
1551
1552static const struct clksel_rate ssi_ssr_corex2_rates[] = {
1553 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1554 { .div = 2, .val = 2, .flags = RATE_IN_343X },
1555 { .div = 3, .val = 3, .flags = RATE_IN_343X },
1556 { .div = 4, .val = 4, .flags = RATE_IN_343X },
1557 { .div = 6, .val = 6, .flags = RATE_IN_343X },
1558 { .div = 8, .val = 8, .flags = RATE_IN_343X },
1559 { .div = 0 }
1560};
1561
1562static const struct clksel ssi_ssr_clksel[] = {
1563 { .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
1564 { .parent = NULL }
1565};
1566
1567static struct clk ssi_ssr_fck_3430es1 = {
1568 .name = "ssi_ssr_fck",
1569 .ops = &clkops_omap2_dflt,
1570 .init = &omap2_init_clksel_parent,
1571 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1572 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1573 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1574 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1575 .clksel = ssi_ssr_clksel,
1576 .clkdm_name = "core_l4_clkdm",
1577 .recalc = &omap2_clksel_recalc,
1578};
1579
1580static struct clk ssi_ssr_fck_3430es2 = {
1581 .name = "ssi_ssr_fck",
1582 .ops = &clkops_omap3430es2_ssi_wait,
1583 .init = &omap2_init_clksel_parent,
1584 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1585 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1586 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1587 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1588 .clksel = ssi_ssr_clksel,
1589 .clkdm_name = "core_l4_clkdm",
1590 .recalc = &omap2_clksel_recalc,
1591};
1592
1593static struct clk ssi_sst_fck_3430es1 = {
1594 .name = "ssi_sst_fck",
1595 .ops = &clkops_null,
1596 .parent = &ssi_ssr_fck_3430es1,
1597 .fixed_div = 2,
1598 .recalc = &omap2_fixed_divisor_recalc,
1599};
1600
1601static struct clk ssi_sst_fck_3430es2 = {
1602 .name = "ssi_sst_fck",
1603 .ops = &clkops_null,
1604 .parent = &ssi_ssr_fck_3430es2,
1605 .fixed_div = 2,
1606 .recalc = &omap2_fixed_divisor_recalc,
1607};
1608
1609
1610
1611/* CORE_L3_ICK based clocks */
1612
1613/*
1614 * XXX must add clk_enable/clk_disable for these if standard code won't
1615 * handle it
1616 */
1617static struct clk core_l3_ick = {
1618 .name = "core_l3_ick",
1619 .ops = &clkops_null,
1620 .parent = &l3_ick,
1621 .clkdm_name = "core_l3_clkdm",
1622 .recalc = &followparent_recalc,
1623};
1624
1625static struct clk hsotgusb_ick_3430es1 = {
1626 .name = "hsotgusb_ick",
1627 .ops = &clkops_omap2_dflt,
1628 .parent = &core_l3_ick,
1629 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1630 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1631 .clkdm_name = "core_l3_clkdm",
1632 .recalc = &followparent_recalc,
1633};
1634
1635static struct clk hsotgusb_ick_3430es2 = {
1636 .name = "hsotgusb_ick",
1637 .ops = &clkops_omap3430es2_hsotgusb_wait,
1638 .parent = &core_l3_ick,
1639 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1640 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1641 .clkdm_name = "core_l3_clkdm",
1642 .recalc = &followparent_recalc,
1643};
1644
1645static struct clk sdrc_ick = {
1646 .name = "sdrc_ick",
1647 .ops = &clkops_omap2_dflt_wait,
1648 .parent = &core_l3_ick,
1649 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1650 .enable_bit = OMAP3430_EN_SDRC_SHIFT,
1651 .flags = ENABLE_ON_INIT,
1652 .clkdm_name = "core_l3_clkdm",
1653 .recalc = &followparent_recalc,
1654};
1655
1656static struct clk gpmc_fck = {
1657 .name = "gpmc_fck",
1658 .ops = &clkops_null,
1659 .parent = &core_l3_ick,
1660 .flags = ENABLE_ON_INIT, /* huh? */
1661 .clkdm_name = "core_l3_clkdm",
1662 .recalc = &followparent_recalc,
1663};
1664
1665/* SECURITY_L3_ICK based clocks */
1666
1667static struct clk security_l3_ick = {
1668 .name = "security_l3_ick",
1669 .ops = &clkops_null,
1670 .parent = &l3_ick,
1671 .recalc = &followparent_recalc,
1672};
1673
1674static struct clk pka_ick = {
1675 .name = "pka_ick",
1676 .ops = &clkops_omap2_dflt_wait,
1677 .parent = &security_l3_ick,
1678 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1679 .enable_bit = OMAP3430_EN_PKA_SHIFT,
1680 .recalc = &followparent_recalc,
1681};
1682
1683/* CORE_L4_ICK based clocks */
1684
1685static struct clk core_l4_ick = {
1686 .name = "core_l4_ick",
1687 .ops = &clkops_null,
1688 .parent = &l4_ick,
1689 .clkdm_name = "core_l4_clkdm",
1690 .recalc = &followparent_recalc,
1691};
1692
1693static struct clk usbtll_ick = {
1694 .name = "usbtll_ick",
1695 .ops = &clkops_omap2_dflt_wait,
1696 .parent = &core_l4_ick,
1697 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1698 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1699 .clkdm_name = "core_l4_clkdm",
1700 .recalc = &followparent_recalc,
1701};
1702
1703static struct clk mmchs3_ick = {
1704 .name = "mmchs_ick",
1705 .ops = &clkops_omap2_dflt_wait,
1706 .id = 2,
1707 .parent = &core_l4_ick,
1708 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1709 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1710 .clkdm_name = "core_l4_clkdm",
1711 .recalc = &followparent_recalc,
1712};
1713
1714/* Intersystem Communication Registers - chassis mode only */
1715static struct clk icr_ick = {
1716 .name = "icr_ick",
1717 .ops = &clkops_omap2_dflt_wait,
1718 .parent = &core_l4_ick,
1719 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1720 .enable_bit = OMAP3430_EN_ICR_SHIFT,
1721 .clkdm_name = "core_l4_clkdm",
1722 .recalc = &followparent_recalc,
1723};
1724
1725static struct clk aes2_ick = {
1726 .name = "aes2_ick",
1727 .ops = &clkops_omap2_dflt_wait,
1728 .parent = &core_l4_ick,
1729 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1730 .enable_bit = OMAP3430_EN_AES2_SHIFT,
1731 .clkdm_name = "core_l4_clkdm",
1732 .recalc = &followparent_recalc,
1733};
1734
1735static struct clk sha12_ick = {
1736 .name = "sha12_ick",
1737 .ops = &clkops_omap2_dflt_wait,
1738 .parent = &core_l4_ick,
1739 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1740 .enable_bit = OMAP3430_EN_SHA12_SHIFT,
1741 .clkdm_name = "core_l4_clkdm",
1742 .recalc = &followparent_recalc,
1743};
1744
1745static struct clk des2_ick = {
1746 .name = "des2_ick",
1747 .ops = &clkops_omap2_dflt_wait,
1748 .parent = &core_l4_ick,
1749 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1750 .enable_bit = OMAP3430_EN_DES2_SHIFT,
1751 .clkdm_name = "core_l4_clkdm",
1752 .recalc = &followparent_recalc,
1753};
1754
1755static struct clk mmchs2_ick = {
1756 .name = "mmchs_ick",
1757 .ops = &clkops_omap2_dflt_wait,
1758 .id = 1,
1759 .parent = &core_l4_ick,
1760 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1761 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1762 .clkdm_name = "core_l4_clkdm",
1763 .recalc = &followparent_recalc,
1764};
1765
1766static struct clk mmchs1_ick = {
1767 .name = "mmchs_ick",
1768 .ops = &clkops_omap2_dflt_wait,
1769 .parent = &core_l4_ick,
1770 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1771 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1772 .clkdm_name = "core_l4_clkdm",
1773 .recalc = &followparent_recalc,
1774};
1775
1776static struct clk mspro_ick = {
1777 .name = "mspro_ick",
1778 .ops = &clkops_omap2_dflt_wait,
1779 .parent = &core_l4_ick,
1780 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1781 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1782 .clkdm_name = "core_l4_clkdm",
1783 .recalc = &followparent_recalc,
1784};
1785
1786static struct clk hdq_ick = {
1787 .name = "hdq_ick",
1788 .ops = &clkops_omap2_dflt_wait,
1789 .parent = &core_l4_ick,
1790 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1791 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1792 .clkdm_name = "core_l4_clkdm",
1793 .recalc = &followparent_recalc,
1794};
1795
1796static struct clk mcspi4_ick = {
1797 .name = "mcspi_ick",
1798 .ops = &clkops_omap2_dflt_wait,
1799 .id = 4,
1800 .parent = &core_l4_ick,
1801 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1802 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1803 .clkdm_name = "core_l4_clkdm",
1804 .recalc = &followparent_recalc,
1805};
1806
1807static struct clk mcspi3_ick = {
1808 .name = "mcspi_ick",
1809 .ops = &clkops_omap2_dflt_wait,
1810 .id = 3,
1811 .parent = &core_l4_ick,
1812 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1813 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1814 .clkdm_name = "core_l4_clkdm",
1815 .recalc = &followparent_recalc,
1816};
1817
1818static struct clk mcspi2_ick = {
1819 .name = "mcspi_ick",
1820 .ops = &clkops_omap2_dflt_wait,
1821 .id = 2,
1822 .parent = &core_l4_ick,
1823 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1824 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1825 .clkdm_name = "core_l4_clkdm",
1826 .recalc = &followparent_recalc,
1827};
1828
1829static struct clk mcspi1_ick = {
1830 .name = "mcspi_ick",
1831 .ops = &clkops_omap2_dflt_wait,
1832 .id = 1,
1833 .parent = &core_l4_ick,
1834 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1835 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1836 .clkdm_name = "core_l4_clkdm",
1837 .recalc = &followparent_recalc,
1838};
1839
1840static struct clk i2c3_ick = {
1841 .name = "i2c_ick",
1842 .ops = &clkops_omap2_dflt_wait,
1843 .id = 3,
1844 .parent = &core_l4_ick,
1845 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1846 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1847 .clkdm_name = "core_l4_clkdm",
1848 .recalc = &followparent_recalc,
1849};
1850
1851static struct clk i2c2_ick = {
1852 .name = "i2c_ick",
1853 .ops = &clkops_omap2_dflt_wait,
1854 .id = 2,
1855 .parent = &core_l4_ick,
1856 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1857 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1858 .clkdm_name = "core_l4_clkdm",
1859 .recalc = &followparent_recalc,
1860};
1861
1862static struct clk i2c1_ick = {
1863 .name = "i2c_ick",
1864 .ops = &clkops_omap2_dflt_wait,
1865 .id = 1,
1866 .parent = &core_l4_ick,
1867 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1868 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1869 .clkdm_name = "core_l4_clkdm",
1870 .recalc = &followparent_recalc,
1871};
1872
1873static struct clk uart2_ick = {
1874 .name = "uart2_ick",
1875 .ops = &clkops_omap2_dflt_wait,
1876 .parent = &core_l4_ick,
1877 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1878 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1879 .clkdm_name = "core_l4_clkdm",
1880 .recalc = &followparent_recalc,
1881};
1882
1883static struct clk uart1_ick = {
1884 .name = "uart1_ick",
1885 .ops = &clkops_omap2_dflt_wait,
1886 .parent = &core_l4_ick,
1887 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1888 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1889 .clkdm_name = "core_l4_clkdm",
1890 .recalc = &followparent_recalc,
1891};
1892
1893static struct clk gpt11_ick = {
1894 .name = "gpt11_ick",
1895 .ops = &clkops_omap2_dflt_wait,
1896 .parent = &core_l4_ick,
1897 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1898 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1899 .clkdm_name = "core_l4_clkdm",
1900 .recalc = &followparent_recalc,
1901};
1902
1903static struct clk gpt10_ick = {
1904 .name = "gpt10_ick",
1905 .ops = &clkops_omap2_dflt_wait,
1906 .parent = &core_l4_ick,
1907 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1908 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1909 .clkdm_name = "core_l4_clkdm",
1910 .recalc = &followparent_recalc,
1911};
1912
1913static struct clk mcbsp5_ick = {
1914 .name = "mcbsp_ick",
1915 .ops = &clkops_omap2_dflt_wait,
1916 .id = 5,
1917 .parent = &core_l4_ick,
1918 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1919 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1920 .clkdm_name = "core_l4_clkdm",
1921 .recalc = &followparent_recalc,
1922};
1923
1924static struct clk mcbsp1_ick = {
1925 .name = "mcbsp_ick",
1926 .ops = &clkops_omap2_dflt_wait,
1927 .id = 1,
1928 .parent = &core_l4_ick,
1929 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1930 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1931 .clkdm_name = "core_l4_clkdm",
1932 .recalc = &followparent_recalc,
1933};
1934
1935static struct clk fac_ick = {
1936 .name = "fac_ick",
1937 .ops = &clkops_omap2_dflt_wait,
1938 .parent = &core_l4_ick,
1939 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1940 .enable_bit = OMAP3430ES1_EN_FAC_SHIFT,
1941 .clkdm_name = "core_l4_clkdm",
1942 .recalc = &followparent_recalc,
1943};
1944
1945static struct clk mailboxes_ick = {
1946 .name = "mailboxes_ick",
1947 .ops = &clkops_omap2_dflt_wait,
1948 .parent = &core_l4_ick,
1949 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1950 .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1951 .clkdm_name = "core_l4_clkdm",
1952 .recalc = &followparent_recalc,
1953};
1954
1955static struct clk omapctrl_ick = {
1956 .name = "omapctrl_ick",
1957 .ops = &clkops_omap2_dflt_wait,
1958 .parent = &core_l4_ick,
1959 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1960 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
1961 .flags = ENABLE_ON_INIT,
1962 .recalc = &followparent_recalc,
1963};
1964
1965/* SSI_L4_ICK based clocks */
1966
1967static struct clk ssi_l4_ick = {
1968 .name = "ssi_l4_ick",
1969 .ops = &clkops_null,
1970 .parent = &l4_ick,
1971 .clkdm_name = "core_l4_clkdm",
1972 .recalc = &followparent_recalc,
1973};
1974
1975static struct clk ssi_ick_3430es1 = {
1976 .name = "ssi_ick",
1977 .ops = &clkops_omap2_dflt,
1978 .parent = &ssi_l4_ick,
1979 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1980 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1981 .clkdm_name = "core_l4_clkdm",
1982 .recalc = &followparent_recalc,
1983};
1984
1985static struct clk ssi_ick_3430es2 = {
1986 .name = "ssi_ick",
1987 .ops = &clkops_omap3430es2_ssi_wait,
1988 .parent = &ssi_l4_ick,
1989 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1990 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1991 .clkdm_name = "core_l4_clkdm",
1992 .recalc = &followparent_recalc,
1993};
1994
1995/* REVISIT: Technically the TRM claims that this is CORE_CLK based,
1996 * but l4_ick makes more sense to me */
1997
1998static const struct clksel usb_l4_clksel[] = {
1999 { .parent = &l4_ick, .rates = div2_rates },
2000 { .parent = NULL },
2001};
2002
2003static struct clk usb_l4_ick = {
2004 .name = "usb_l4_ick",
2005 .ops = &clkops_omap2_dflt_wait,
2006 .parent = &l4_ick,
2007 .init = &omap2_init_clksel_parent,
2008 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2009 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
2010 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2011 .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
2012 .clksel = usb_l4_clksel,
2013 .recalc = &omap2_clksel_recalc,
2014};
2015
2016/* SECURITY_L4_ICK2 based clocks */
2017
2018static struct clk security_l4_ick2 = {
2019 .name = "security_l4_ick2",
2020 .ops = &clkops_null,
2021 .parent = &l4_ick,
2022 .recalc = &followparent_recalc,
2023};
2024
2025static struct clk aes1_ick = {
2026 .name = "aes1_ick",
2027 .ops = &clkops_omap2_dflt_wait,
2028 .parent = &security_l4_ick2,
2029 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2030 .enable_bit = OMAP3430_EN_AES1_SHIFT,
2031 .recalc = &followparent_recalc,
2032};
2033
2034static struct clk rng_ick = {
2035 .name = "rng_ick",
2036 .ops = &clkops_omap2_dflt_wait,
2037 .parent = &security_l4_ick2,
2038 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2039 .enable_bit = OMAP3430_EN_RNG_SHIFT,
2040 .recalc = &followparent_recalc,
2041};
2042
2043static struct clk sha11_ick = {
2044 .name = "sha11_ick",
2045 .ops = &clkops_omap2_dflt_wait,
2046 .parent = &security_l4_ick2,
2047 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2048 .enable_bit = OMAP3430_EN_SHA11_SHIFT,
2049 .recalc = &followparent_recalc,
2050};
2051
2052static struct clk des1_ick = {
2053 .name = "des1_ick",
2054 .ops = &clkops_omap2_dflt_wait,
2055 .parent = &security_l4_ick2,
2056 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2057 .enable_bit = OMAP3430_EN_DES1_SHIFT,
2058 .recalc = &followparent_recalc,
2059};
2060
2061/* DSS */
2062static struct clk dss1_alwon_fck_3430es1 = {
2063 .name = "dss1_alwon_fck",
2064 .ops = &clkops_omap2_dflt,
2065 .parent = &dpll4_m4x2_ck,
2066 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2067 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
2068 .clkdm_name = "dss_clkdm",
2069 .recalc = &followparent_recalc,
2070};
2071
2072static struct clk dss1_alwon_fck_3430es2 = {
2073 .name = "dss1_alwon_fck",
2074 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2075 .parent = &dpll4_m4x2_ck,
2076 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2077 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
2078 .clkdm_name = "dss_clkdm",
2079 .recalc = &followparent_recalc,
2080};
2081
2082static struct clk dss_tv_fck = {
2083 .name = "dss_tv_fck",
2084 .ops = &clkops_omap2_dflt,
2085 .parent = &omap_54m_fck,
2086 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2087 .enable_bit = OMAP3430_EN_TV_SHIFT,
2088 .clkdm_name = "dss_clkdm",
2089 .recalc = &followparent_recalc,
2090};
2091
2092static struct clk dss_96m_fck = {
2093 .name = "dss_96m_fck",
2094 .ops = &clkops_omap2_dflt,
2095 .parent = &omap_96m_fck,
2096 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2097 .enable_bit = OMAP3430_EN_TV_SHIFT,
2098 .clkdm_name = "dss_clkdm",
2099 .recalc = &followparent_recalc,
2100};
2101
2102static struct clk dss2_alwon_fck = {
2103 .name = "dss2_alwon_fck",
2104 .ops = &clkops_omap2_dflt,
2105 .parent = &sys_ck,
2106 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2107 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
2108 .clkdm_name = "dss_clkdm",
2109 .recalc = &followparent_recalc,
2110};
2111
2112static struct clk dss_ick_3430es1 = {
2113 /* Handles both L3 and L4 clocks */
2114 .name = "dss_ick",
2115 .ops = &clkops_omap2_dflt,
2116 .parent = &l4_ick,
2117 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2118 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2119 .clkdm_name = "dss_clkdm",
2120 .recalc = &followparent_recalc,
2121};
2122
2123static struct clk dss_ick_3430es2 = {
2124 /* Handles both L3 and L4 clocks */
2125 .name = "dss_ick",
2126 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2127 .parent = &l4_ick,
2128 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2129 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2130 .clkdm_name = "dss_clkdm",
2131 .recalc = &followparent_recalc,
2132};
2133
2134/* CAM */
2135
2136static struct clk cam_mclk = {
2137 .name = "cam_mclk",
2138 .ops = &clkops_omap2_dflt,
2139 .parent = &dpll4_m5x2_ck,
2140 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
2141 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2142 .clkdm_name = "cam_clkdm",
2143 .recalc = &followparent_recalc,
2144};
2145
2146static struct clk cam_ick = {
2147 /* Handles both L3 and L4 clocks */
2148 .name = "cam_ick",
2149 .ops = &clkops_omap2_dflt,
2150 .parent = &l4_ick,
2151 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
2152 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2153 .clkdm_name = "cam_clkdm",
2154 .recalc = &followparent_recalc,
2155};
2156
2157static struct clk csi2_96m_fck = {
2158 .name = "csi2_96m_fck",
2159 .ops = &clkops_omap2_dflt,
2160 .parent = &core_96m_fck,
2161 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
2162 .enable_bit = OMAP3430_EN_CSI2_SHIFT,
2163 .clkdm_name = "cam_clkdm",
2164 .recalc = &followparent_recalc,
2165};
2166
2167/* USBHOST - 3430ES2 only */
2168
2169static struct clk usbhost_120m_fck = {
2170 .name = "usbhost_120m_fck",
2171 .ops = &clkops_omap2_dflt,
2172 .parent = &dpll5_m2_ck,
2173 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2174 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2175 .clkdm_name = "usbhost_clkdm",
2176 .recalc = &followparent_recalc,
2177};
2178
2179static struct clk usbhost_48m_fck = {
2180 .name = "usbhost_48m_fck",
2181 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2182 .parent = &omap_48m_fck,
2183 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2184 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
2185 .clkdm_name = "usbhost_clkdm",
2186 .recalc = &followparent_recalc,
2187};
2188
2189static struct clk usbhost_ick = {
2190 /* Handles both L3 and L4 clocks */
2191 .name = "usbhost_ick",
2192 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2193 .parent = &l4_ick,
2194 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
2195 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
2196 .clkdm_name = "usbhost_clkdm",
2197 .recalc = &followparent_recalc,
2198};
2199
2200/* WKUP */
2201
2202static const struct clksel_rate usim_96m_rates[] = {
2203 { .div = 2, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2204 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2205 { .div = 8, .val = 5, .flags = RATE_IN_343X },
2206 { .div = 10, .val = 6, .flags = RATE_IN_343X },
2207 { .div = 0 },
2208};
2209
2210static const struct clksel_rate usim_120m_rates[] = {
2211 { .div = 4, .val = 7, .flags = RATE_IN_343X | DEFAULT_RATE },
2212 { .div = 8, .val = 8, .flags = RATE_IN_343X },
2213 { .div = 16, .val = 9, .flags = RATE_IN_343X },
2214 { .div = 20, .val = 10, .flags = RATE_IN_343X },
2215 { .div = 0 },
2216};
2217
2218static const struct clksel usim_clksel[] = {
2219 { .parent = &omap_96m_fck, .rates = usim_96m_rates },
2220 { .parent = &dpll5_m2_ck, .rates = usim_120m_rates },
2221 { .parent = &sys_ck, .rates = div2_rates },
2222 { .parent = NULL },
2223};
2224
2225/* 3430ES2 only */
2226static struct clk usim_fck = {
2227 .name = "usim_fck",
2228 .ops = &clkops_omap2_dflt_wait,
2229 .init = &omap2_init_clksel_parent,
2230 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2231 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2232 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2233 .clksel_mask = OMAP3430ES2_CLKSEL_USIMOCP_MASK,
2234 .clksel = usim_clksel,
2235 .recalc = &omap2_clksel_recalc,
2236};
2237
2238/* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
2239static struct clk gpt1_fck = {
2240 .name = "gpt1_fck",
2241 .ops = &clkops_omap2_dflt_wait,
2242 .init = &omap2_init_clksel_parent,
2243 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2244 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2245 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2246 .clksel_mask = OMAP3430_CLKSEL_GPT1_MASK,
2247 .clksel = omap343x_gpt_clksel,
2248 .clkdm_name = "wkup_clkdm",
2249 .recalc = &omap2_clksel_recalc,
2250};
2251
2252static struct clk wkup_32k_fck = {
2253 .name = "wkup_32k_fck",
2254 .ops = &clkops_null,
2255 .parent = &omap_32k_fck,
2256 .clkdm_name = "wkup_clkdm",
2257 .recalc = &followparent_recalc,
2258};
2259
2260static struct clk gpio1_dbck = {
2261 .name = "gpio1_dbck",
2262 .ops = &clkops_omap2_dflt,
2263 .parent = &wkup_32k_fck,
2264 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2265 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2266 .clkdm_name = "wkup_clkdm",
2267 .recalc = &followparent_recalc,
2268};
2269
2270static struct clk wdt2_fck = {
2271 .name = "wdt2_fck",
2272 .ops = &clkops_omap2_dflt_wait,
2273 .parent = &wkup_32k_fck,
2274 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2275 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2276 .clkdm_name = "wkup_clkdm",
2277 .recalc = &followparent_recalc,
2278};
2279
2280static struct clk wkup_l4_ick = {
2281 .name = "wkup_l4_ick",
2282 .ops = &clkops_null,
2283 .parent = &sys_ck,
2284 .clkdm_name = "wkup_clkdm",
2285 .recalc = &followparent_recalc,
2286};
2287
2288/* 3430ES2 only */
2289/* Never specifically named in the TRM, so we have to infer a likely name */
2290static struct clk usim_ick = {
2291 .name = "usim_ick",
2292 .ops = &clkops_omap2_dflt_wait,
2293 .parent = &wkup_l4_ick,
2294 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2295 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2296 .clkdm_name = "wkup_clkdm",
2297 .recalc = &followparent_recalc,
2298};
2299
2300static struct clk wdt2_ick = {
2301 .name = "wdt2_ick",
2302 .ops = &clkops_omap2_dflt_wait,
2303 .parent = &wkup_l4_ick,
2304 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2305 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2306 .clkdm_name = "wkup_clkdm",
2307 .recalc = &followparent_recalc,
2308};
2309
2310static struct clk wdt1_ick = {
2311 .name = "wdt1_ick",
2312 .ops = &clkops_omap2_dflt_wait,
2313 .parent = &wkup_l4_ick,
2314 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2315 .enable_bit = OMAP3430_EN_WDT1_SHIFT,
2316 .clkdm_name = "wkup_clkdm",
2317 .recalc = &followparent_recalc,
2318};
2319
2320static struct clk gpio1_ick = {
2321 .name = "gpio1_ick",
2322 .ops = &clkops_omap2_dflt_wait,
2323 .parent = &wkup_l4_ick,
2324 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2325 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2326 .clkdm_name = "wkup_clkdm",
2327 .recalc = &followparent_recalc,
2328};
2329
2330static struct clk omap_32ksync_ick = {
2331 .name = "omap_32ksync_ick",
2332 .ops = &clkops_omap2_dflt_wait,
2333 .parent = &wkup_l4_ick,
2334 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2335 .enable_bit = OMAP3430_EN_32KSYNC_SHIFT,
2336 .clkdm_name = "wkup_clkdm",
2337 .recalc = &followparent_recalc,
2338};
2339
2340/* XXX This clock no longer exists in 3430 TRM rev F */
2341static struct clk gpt12_ick = {
2342 .name = "gpt12_ick",
2343 .ops = &clkops_omap2_dflt_wait,
2344 .parent = &wkup_l4_ick,
2345 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2346 .enable_bit = OMAP3430_EN_GPT12_SHIFT,
2347 .clkdm_name = "wkup_clkdm",
2348 .recalc = &followparent_recalc,
2349};
2350
2351static struct clk gpt1_ick = {
2352 .name = "gpt1_ick",
2353 .ops = &clkops_omap2_dflt_wait,
2354 .parent = &wkup_l4_ick,
2355 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2356 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2357 .clkdm_name = "wkup_clkdm",
2358 .recalc = &followparent_recalc,
2359};
2360
2361
2362
2363/* PER clock domain */
2364
2365static struct clk per_96m_fck = {
2366 .name = "per_96m_fck",
2367 .ops = &clkops_null,
2368 .parent = &omap_96m_alwon_fck,
2369 .clkdm_name = "per_clkdm",
2370 .recalc = &followparent_recalc,
2371};
2372
2373static struct clk per_48m_fck = {
2374 .name = "per_48m_fck",
2375 .ops = &clkops_null,
2376 .parent = &omap_48m_fck,
2377 .clkdm_name = "per_clkdm",
2378 .recalc = &followparent_recalc,
2379};
2380
2381static struct clk uart3_fck = {
2382 .name = "uart3_fck",
2383 .ops = &clkops_omap2_dflt_wait,
2384 .parent = &per_48m_fck,
2385 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2386 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2387 .clkdm_name = "per_clkdm",
2388 .recalc = &followparent_recalc,
2389};
2390
2391static struct clk gpt2_fck = {
2392 .name = "gpt2_fck",
2393 .ops = &clkops_omap2_dflt_wait,
2394 .init = &omap2_init_clksel_parent,
2395 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2396 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2397 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2398 .clksel_mask = OMAP3430_CLKSEL_GPT2_MASK,
2399 .clksel = omap343x_gpt_clksel,
2400 .clkdm_name = "per_clkdm",
2401 .recalc = &omap2_clksel_recalc,
2402};
2403
2404static struct clk gpt3_fck = {
2405 .name = "gpt3_fck",
2406 .ops = &clkops_omap2_dflt_wait,
2407 .init = &omap2_init_clksel_parent,
2408 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2409 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2410 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2411 .clksel_mask = OMAP3430_CLKSEL_GPT3_MASK,
2412 .clksel = omap343x_gpt_clksel,
2413 .clkdm_name = "per_clkdm",
2414 .recalc = &omap2_clksel_recalc,
2415};
2416
2417static struct clk gpt4_fck = {
2418 .name = "gpt4_fck",
2419 .ops = &clkops_omap2_dflt_wait,
2420 .init = &omap2_init_clksel_parent,
2421 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2422 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2423 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2424 .clksel_mask = OMAP3430_CLKSEL_GPT4_MASK,
2425 .clksel = omap343x_gpt_clksel,
2426 .clkdm_name = "per_clkdm",
2427 .recalc = &omap2_clksel_recalc,
2428};
2429
2430static struct clk gpt5_fck = {
2431 .name = "gpt5_fck",
2432 .ops = &clkops_omap2_dflt_wait,
2433 .init = &omap2_init_clksel_parent,
2434 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2435 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2436 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2437 .clksel_mask = OMAP3430_CLKSEL_GPT5_MASK,
2438 .clksel = omap343x_gpt_clksel,
2439 .clkdm_name = "per_clkdm",
2440 .recalc = &omap2_clksel_recalc,
2441};
2442
2443static struct clk gpt6_fck = {
2444 .name = "gpt6_fck",
2445 .ops = &clkops_omap2_dflt_wait,
2446 .init = &omap2_init_clksel_parent,
2447 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2448 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2449 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2450 .clksel_mask = OMAP3430_CLKSEL_GPT6_MASK,
2451 .clksel = omap343x_gpt_clksel,
2452 .clkdm_name = "per_clkdm",
2453 .recalc = &omap2_clksel_recalc,
2454};
2455
2456static struct clk gpt7_fck = {
2457 .name = "gpt7_fck",
2458 .ops = &clkops_omap2_dflt_wait,
2459 .init = &omap2_init_clksel_parent,
2460 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2461 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2462 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2463 .clksel_mask = OMAP3430_CLKSEL_GPT7_MASK,
2464 .clksel = omap343x_gpt_clksel,
2465 .clkdm_name = "per_clkdm",
2466 .recalc = &omap2_clksel_recalc,
2467};
2468
2469static struct clk gpt8_fck = {
2470 .name = "gpt8_fck",
2471 .ops = &clkops_omap2_dflt_wait,
2472 .init = &omap2_init_clksel_parent,
2473 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2474 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2475 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2476 .clksel_mask = OMAP3430_CLKSEL_GPT8_MASK,
2477 .clksel = omap343x_gpt_clksel,
2478 .clkdm_name = "per_clkdm",
2479 .recalc = &omap2_clksel_recalc,
2480};
2481
2482static struct clk gpt9_fck = {
2483 .name = "gpt9_fck",
2484 .ops = &clkops_omap2_dflt_wait,
2485 .init = &omap2_init_clksel_parent,
2486 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2487 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2488 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2489 .clksel_mask = OMAP3430_CLKSEL_GPT9_MASK,
2490 .clksel = omap343x_gpt_clksel,
2491 .clkdm_name = "per_clkdm",
2492 .recalc = &omap2_clksel_recalc,
2493};
2494
2495static struct clk per_32k_alwon_fck = {
2496 .name = "per_32k_alwon_fck",
2497 .ops = &clkops_null,
2498 .parent = &omap_32k_fck,
2499 .clkdm_name = "per_clkdm",
2500 .recalc = &followparent_recalc,
2501};
2502
2503static struct clk gpio6_dbck = {
2504 .name = "gpio6_dbck",
2505 .ops = &clkops_omap2_dflt,
2506 .parent = &per_32k_alwon_fck,
2507 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2508 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
2509 .clkdm_name = "per_clkdm",
2510 .recalc = &followparent_recalc,
2511};
2512
2513static struct clk gpio5_dbck = {
2514 .name = "gpio5_dbck",
2515 .ops = &clkops_omap2_dflt,
2516 .parent = &per_32k_alwon_fck,
2517 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2518 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
2519 .clkdm_name = "per_clkdm",
2520 .recalc = &followparent_recalc,
2521};
2522
2523static struct clk gpio4_dbck = {
2524 .name = "gpio4_dbck",
2525 .ops = &clkops_omap2_dflt,
2526 .parent = &per_32k_alwon_fck,
2527 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2528 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
2529 .clkdm_name = "per_clkdm",
2530 .recalc = &followparent_recalc,
2531};
2532
2533static struct clk gpio3_dbck = {
2534 .name = "gpio3_dbck",
2535 .ops = &clkops_omap2_dflt,
2536 .parent = &per_32k_alwon_fck,
2537 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2538 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
2539 .clkdm_name = "per_clkdm",
2540 .recalc = &followparent_recalc,
2541};
2542
2543static struct clk gpio2_dbck = {
2544 .name = "gpio2_dbck",
2545 .ops = &clkops_omap2_dflt,
2546 .parent = &per_32k_alwon_fck,
2547 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2548 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
2549 .clkdm_name = "per_clkdm",
2550 .recalc = &followparent_recalc,
2551};
2552
2553static struct clk wdt3_fck = {
2554 .name = "wdt3_fck",
2555 .ops = &clkops_omap2_dflt_wait,
2556 .parent = &per_32k_alwon_fck,
2557 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2558 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2559 .clkdm_name = "per_clkdm",
2560 .recalc = &followparent_recalc,
2561};
2562
2563static struct clk per_l4_ick = {
2564 .name = "per_l4_ick",
2565 .ops = &clkops_null,
2566 .parent = &l4_ick,
2567 .clkdm_name = "per_clkdm",
2568 .recalc = &followparent_recalc,
2569};
2570
2571static struct clk gpio6_ick = {
2572 .name = "gpio6_ick",
2573 .ops = &clkops_omap2_dflt_wait,
2574 .parent = &per_l4_ick,
2575 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2576 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
2577 .clkdm_name = "per_clkdm",
2578 .recalc = &followparent_recalc,
2579};
2580
2581static struct clk gpio5_ick = {
2582 .name = "gpio5_ick",
2583 .ops = &clkops_omap2_dflt_wait,
2584 .parent = &per_l4_ick,
2585 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2586 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
2587 .clkdm_name = "per_clkdm",
2588 .recalc = &followparent_recalc,
2589};
2590
2591static struct clk gpio4_ick = {
2592 .name = "gpio4_ick",
2593 .ops = &clkops_omap2_dflt_wait,
2594 .parent = &per_l4_ick,
2595 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2596 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
2597 .clkdm_name = "per_clkdm",
2598 .recalc = &followparent_recalc,
2599};
2600
2601static struct clk gpio3_ick = {
2602 .name = "gpio3_ick",
2603 .ops = &clkops_omap2_dflt_wait,
2604 .parent = &per_l4_ick,
2605 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2606 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
2607 .clkdm_name = "per_clkdm",
2608 .recalc = &followparent_recalc,
2609};
2610
2611static struct clk gpio2_ick = {
2612 .name = "gpio2_ick",
2613 .ops = &clkops_omap2_dflt_wait,
2614 .parent = &per_l4_ick,
2615 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2616 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
2617 .clkdm_name = "per_clkdm",
2618 .recalc = &followparent_recalc,
2619};
2620
2621static struct clk wdt3_ick = {
2622 .name = "wdt3_ick",
2623 .ops = &clkops_omap2_dflt_wait,
2624 .parent = &per_l4_ick,
2625 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2626 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2627 .clkdm_name = "per_clkdm",
2628 .recalc = &followparent_recalc,
2629};
2630
2631static struct clk uart3_ick = {
2632 .name = "uart3_ick",
2633 .ops = &clkops_omap2_dflt_wait,
2634 .parent = &per_l4_ick,
2635 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2636 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2637 .clkdm_name = "per_clkdm",
2638 .recalc = &followparent_recalc,
2639};
2640
2641static struct clk gpt9_ick = {
2642 .name = "gpt9_ick",
2643 .ops = &clkops_omap2_dflt_wait,
2644 .parent = &per_l4_ick,
2645 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2646 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2647 .clkdm_name = "per_clkdm",
2648 .recalc = &followparent_recalc,
2649};
2650
2651static struct clk gpt8_ick = {
2652 .name = "gpt8_ick",
2653 .ops = &clkops_omap2_dflt_wait,
2654 .parent = &per_l4_ick,
2655 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2656 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2657 .clkdm_name = "per_clkdm",
2658 .recalc = &followparent_recalc,
2659};
2660
2661static struct clk gpt7_ick = {
2662 .name = "gpt7_ick",
2663 .ops = &clkops_omap2_dflt_wait,
2664 .parent = &per_l4_ick,
2665 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2666 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2667 .clkdm_name = "per_clkdm",
2668 .recalc = &followparent_recalc,
2669};
2670
2671static struct clk gpt6_ick = {
2672 .name = "gpt6_ick",
2673 .ops = &clkops_omap2_dflt_wait,
2674 .parent = &per_l4_ick,
2675 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2676 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2677 .clkdm_name = "per_clkdm",
2678 .recalc = &followparent_recalc,
2679};
2680
2681static struct clk gpt5_ick = {
2682 .name = "gpt5_ick",
2683 .ops = &clkops_omap2_dflt_wait,
2684 .parent = &per_l4_ick,
2685 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2686 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2687 .clkdm_name = "per_clkdm",
2688 .recalc = &followparent_recalc,
2689};
2690
2691static struct clk gpt4_ick = {
2692 .name = "gpt4_ick",
2693 .ops = &clkops_omap2_dflt_wait,
2694 .parent = &per_l4_ick,
2695 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2696 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2697 .clkdm_name = "per_clkdm",
2698 .recalc = &followparent_recalc,
2699};
2700
2701static struct clk gpt3_ick = {
2702 .name = "gpt3_ick",
2703 .ops = &clkops_omap2_dflt_wait,
2704 .parent = &per_l4_ick,
2705 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2706 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2707 .clkdm_name = "per_clkdm",
2708 .recalc = &followparent_recalc,
2709};
2710
2711static struct clk gpt2_ick = {
2712 .name = "gpt2_ick",
2713 .ops = &clkops_omap2_dflt_wait,
2714 .parent = &per_l4_ick,
2715 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2716 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2717 .clkdm_name = "per_clkdm",
2718 .recalc = &followparent_recalc,
2719};
2720
2721static struct clk mcbsp2_ick = {
2722 .name = "mcbsp_ick",
2723 .ops = &clkops_omap2_dflt_wait,
2724 .id = 2,
2725 .parent = &per_l4_ick,
2726 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2727 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2728 .clkdm_name = "per_clkdm",
2729 .recalc = &followparent_recalc,
2730};
2731
2732static struct clk mcbsp3_ick = {
2733 .name = "mcbsp_ick",
2734 .ops = &clkops_omap2_dflt_wait,
2735 .id = 3,
2736 .parent = &per_l4_ick,
2737 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2738 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2739 .clkdm_name = "per_clkdm",
2740 .recalc = &followparent_recalc,
2741};
2742
2743static struct clk mcbsp4_ick = {
2744 .name = "mcbsp_ick",
2745 .ops = &clkops_omap2_dflt_wait,
2746 .id = 4,
2747 .parent = &per_l4_ick,
2748 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2749 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2750 .clkdm_name = "per_clkdm",
2751 .recalc = &followparent_recalc,
2752};
2753
2754static const struct clksel mcbsp_234_clksel[] = {
2755 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
2756 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2757 { .parent = NULL }
2758};
2759
2760static struct clk mcbsp2_fck = {
2761 .name = "mcbsp_fck",
2762 .ops = &clkops_omap2_dflt_wait,
2763 .id = 2,
2764 .init = &omap2_init_clksel_parent,
2765 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2766 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2767 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2768 .clksel_mask = OMAP2_MCBSP2_CLKS_MASK,
2769 .clksel = mcbsp_234_clksel,
2770 .clkdm_name = "per_clkdm",
2771 .recalc = &omap2_clksel_recalc,
2772};
2773
2774static struct clk mcbsp3_fck = {
2775 .name = "mcbsp_fck",
2776 .ops = &clkops_omap2_dflt_wait,
2777 .id = 3,
2778 .init = &omap2_init_clksel_parent,
2779 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2780 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2781 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2782 .clksel_mask = OMAP2_MCBSP3_CLKS_MASK,
2783 .clksel = mcbsp_234_clksel,
2784 .clkdm_name = "per_clkdm",
2785 .recalc = &omap2_clksel_recalc,
2786};
2787
2788static struct clk mcbsp4_fck = {
2789 .name = "mcbsp_fck",
2790 .ops = &clkops_omap2_dflt_wait,
2791 .id = 4,
2792 .init = &omap2_init_clksel_parent,
2793 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2794 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2795 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2796 .clksel_mask = OMAP2_MCBSP4_CLKS_MASK,
2797 .clksel = mcbsp_234_clksel,
2798 .clkdm_name = "per_clkdm",
2799 .recalc = &omap2_clksel_recalc,
2800};
2801
2802/* EMU clocks */
2803
2804/* More information: ARM Cortex-A8 Technical Reference Manual, sect 10.1 */
2805
2806static const struct clksel_rate emu_src_sys_rates[] = {
2807 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
2808 { .div = 0 },
2809};
2810
2811static const struct clksel_rate emu_src_core_rates[] = {
2812 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2813 { .div = 0 },
2814};
2815
2816static const struct clksel_rate emu_src_per_rates[] = {
2817 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2818 { .div = 0 },
2819};
2820
2821static const struct clksel_rate emu_src_mpu_rates[] = {
2822 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2823 { .div = 0 },
2824};
2825
2826static const struct clksel emu_src_clksel[] = {
2827 { .parent = &sys_ck, .rates = emu_src_sys_rates },
2828 { .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
2829 { .parent = &emu_per_alwon_ck, .rates = emu_src_per_rates },
2830 { .parent = &emu_mpu_alwon_ck, .rates = emu_src_mpu_rates },
2831 { .parent = NULL },
2832};
2833
2834/*
2835 * Like the clkout_src clocks, emu_src_clk is a virtual clock, existing only
2836 * to switch the source of some of the EMU clocks.
2837 * XXX Are there CLKEN bits for these EMU clks?
2838 */ 6 */
2839static struct clk emu_src_ck = {
2840 .name = "emu_src_ck",
2841 .ops = &clkops_null,
2842 .init = &omap2_init_clksel_parent,
2843 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2844 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
2845 .clksel = emu_src_clksel,
2846 .clkdm_name = "emu_clkdm",
2847 .recalc = &omap2_clksel_recalc,
2848};
2849
2850static const struct clksel_rate pclk_emu_rates[] = {
2851 { .div = 2, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2852 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2853 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2854 { .div = 6, .val = 6, .flags = RATE_IN_343X },
2855 { .div = 0 },
2856};
2857
2858static const struct clksel pclk_emu_clksel[] = {
2859 { .parent = &emu_src_ck, .rates = pclk_emu_rates },
2860 { .parent = NULL },
2861};
2862
2863static struct clk pclk_fck = {
2864 .name = "pclk_fck",
2865 .ops = &clkops_null,
2866 .init = &omap2_init_clksel_parent,
2867 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2868 .clksel_mask = OMAP3430_CLKSEL_PCLK_MASK,
2869 .clksel = pclk_emu_clksel,
2870 .clkdm_name = "emu_clkdm",
2871 .recalc = &omap2_clksel_recalc,
2872};
2873
2874static const struct clksel_rate pclkx2_emu_rates[] = {
2875 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2876 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2877 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2878 { .div = 0 },
2879};
2880
2881static const struct clksel pclkx2_emu_clksel[] = {
2882 { .parent = &emu_src_ck, .rates = pclkx2_emu_rates },
2883 { .parent = NULL },
2884};
2885
2886static struct clk pclkx2_fck = {
2887 .name = "pclkx2_fck",
2888 .ops = &clkops_null,
2889 .init = &omap2_init_clksel_parent,
2890 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2891 .clksel_mask = OMAP3430_CLKSEL_PCLKX2_MASK,
2892 .clksel = pclkx2_emu_clksel,
2893 .clkdm_name = "emu_clkdm",
2894 .recalc = &omap2_clksel_recalc,
2895};
2896
2897static const struct clksel atclk_emu_clksel[] = {
2898 { .parent = &emu_src_ck, .rates = div2_rates },
2899 { .parent = NULL },
2900};
2901
2902static struct clk atclk_fck = {
2903 .name = "atclk_fck",
2904 .ops = &clkops_null,
2905 .init = &omap2_init_clksel_parent,
2906 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2907 .clksel_mask = OMAP3430_CLKSEL_ATCLK_MASK,
2908 .clksel = atclk_emu_clksel,
2909 .clkdm_name = "emu_clkdm",
2910 .recalc = &omap2_clksel_recalc,
2911};
2912
2913static struct clk traceclk_src_fck = {
2914 .name = "traceclk_src_fck",
2915 .ops = &clkops_null,
2916 .init = &omap2_init_clksel_parent,
2917 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2918 .clksel_mask = OMAP3430_TRACE_MUX_CTRL_MASK,
2919 .clksel = emu_src_clksel,
2920 .clkdm_name = "emu_clkdm",
2921 .recalc = &omap2_clksel_recalc,
2922};
2923
2924static const struct clksel_rate traceclk_rates[] = {
2925 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2926 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2927 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2928 { .div = 0 },
2929};
2930
2931static const struct clksel traceclk_clksel[] = {
2932 { .parent = &traceclk_src_fck, .rates = traceclk_rates },
2933 { .parent = NULL },
2934};
2935
2936static struct clk traceclk_fck = {
2937 .name = "traceclk_fck",
2938 .ops = &clkops_null,
2939 .init = &omap2_init_clksel_parent,
2940 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2941 .clksel_mask = OMAP3430_CLKSEL_TRACECLK_MASK,
2942 .clksel = traceclk_clksel,
2943 .clkdm_name = "emu_clkdm",
2944 .recalc = &omap2_clksel_recalc,
2945};
2946
2947/* SR clocks */
2948
2949/* SmartReflex fclk (VDD1) */
2950static struct clk sr1_fck = {
2951 .name = "sr1_fck",
2952 .ops = &clkops_omap2_dflt_wait,
2953 .parent = &sys_ck,
2954 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2955 .enable_bit = OMAP3430_EN_SR1_SHIFT,
2956 .recalc = &followparent_recalc,
2957};
2958
2959/* SmartReflex fclk (VDD2) */
2960static struct clk sr2_fck = {
2961 .name = "sr2_fck",
2962 .ops = &clkops_omap2_dflt_wait,
2963 .parent = &sys_ck,
2964 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2965 .enable_bit = OMAP3430_EN_SR2_SHIFT,
2966 .recalc = &followparent_recalc,
2967};
2968 7
2969static struct clk sr_l4_ick = { 8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_34XX_H
2970 .name = "sr_l4_ick", 9#define __ARCH_ARM_MACH_OMAP2_CLOCK_34XX_H
2971 .ops = &clkops_null, /* RMK: missing? */
2972 .parent = &l4_ick,
2973 .clkdm_name = "core_l4_clkdm",
2974 .recalc = &followparent_recalc,
2975};
2976 10
2977/* SECURE_32K_FCK clocks */ 11int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate);
12int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate);
13void omap3_clk_lock_dpll5(void);
2978 14
2979static struct clk gpt12_fck = { 15extern struct clk *sdrc_ick_p;
2980 .name = "gpt12_fck", 16extern struct clk *arm_fck_p;
2981 .ops = &clkops_null,
2982 .parent = &secure_32k_fck,
2983 .recalc = &followparent_recalc,
2984};
2985 17
2986static struct clk wdt1_fck = { 18/* OMAP34xx-specific clkops */
2987 .name = "wdt1_fck", 19extern const struct clkops clkops_omap3430es2_ssi_wait;
2988 .ops = &clkops_null, 20extern const struct clkops clkops_omap3430es2_hsotgusb_wait;
2989 .parent = &secure_32k_fck, 21extern const struct clkops clkops_omap3430es2_dss_usbhost_wait;
2990 .recalc = &followparent_recalc, 22extern const struct clkops clkops_noncore_dpll_ops;
2991};
2992 23
2993#endif 24#endif
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c
new file mode 100644
index 000000000000..8bdcc9cc7f9a
--- /dev/null
+++ b/arch/arm/mach-omap2/clock34xx_data.c
@@ -0,0 +1,3289 @@
1/*
2 * OMAP3 clock data
3 *
4 * Copyright (C) 2007-2009 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 * With many device clock fixes by Kevin Hilman and Jouni Högander
9 * DPLL bypass clock support added by Roman Tereshonkov
10 *
11 */
12
13/*
14 * Virtual clocks are introduced as convenient tools.
15 * They are sources for other clocks and not supposed
16 * to be requested from drivers directly.
17 */
18
19#include <linux/module.h>
20#include <linux/kernel.h>
21#include <linux/clk.h>
22
23#include <plat/control.h>
24#include <plat/clkdev_omap.h>
25
26#include "clock.h"
27#include "clock34xx.h"
28#include "cm.h"
29#include "cm-regbits-34xx.h"
30#include "prm.h"
31#include "prm-regbits-34xx.h"
32
33/*
34 * clocks
35 */
36
37#define OMAP_CM_REGADDR OMAP34XX_CM_REGADDR
38
39/* Maximum DPLL multiplier, divider values for OMAP3 */
40#define OMAP3_MAX_DPLL_MULT 2048
41#define OMAP3_MAX_DPLL_DIV 128
42
43/*
44 * DPLL1 supplies clock to the MPU.
45 * DPLL2 supplies clock to the IVA2.
46 * DPLL3 supplies CORE domain clocks.
47 * DPLL4 supplies peripheral clocks.
48 * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
49 */
50
51/* Forward declarations for DPLL bypass clocks */
52static struct clk dpll1_fck;
53static struct clk dpll2_fck;
54
55/* PRM CLOCKS */
56
57/* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
58static struct clk omap_32k_fck = {
59 .name = "omap_32k_fck",
60 .ops = &clkops_null,
61 .rate = 32768,
62 .flags = RATE_FIXED,
63};
64
65static struct clk secure_32k_fck = {
66 .name = "secure_32k_fck",
67 .ops = &clkops_null,
68 .rate = 32768,
69 .flags = RATE_FIXED,
70};
71
72/* Virtual source clocks for osc_sys_ck */
73static struct clk virt_12m_ck = {
74 .name = "virt_12m_ck",
75 .ops = &clkops_null,
76 .rate = 12000000,
77 .flags = RATE_FIXED,
78};
79
80static struct clk virt_13m_ck = {
81 .name = "virt_13m_ck",
82 .ops = &clkops_null,
83 .rate = 13000000,
84 .flags = RATE_FIXED,
85};
86
87static struct clk virt_16_8m_ck = {
88 .name = "virt_16_8m_ck",
89 .ops = &clkops_null,
90 .rate = 16800000,
91 .flags = RATE_FIXED,
92};
93
94static struct clk virt_19_2m_ck = {
95 .name = "virt_19_2m_ck",
96 .ops = &clkops_null,
97 .rate = 19200000,
98 .flags = RATE_FIXED,
99};
100
101static struct clk virt_26m_ck = {
102 .name = "virt_26m_ck",
103 .ops = &clkops_null,
104 .rate = 26000000,
105 .flags = RATE_FIXED,
106};
107
108static struct clk virt_38_4m_ck = {
109 .name = "virt_38_4m_ck",
110 .ops = &clkops_null,
111 .rate = 38400000,
112 .flags = RATE_FIXED,
113};
114
115static const struct clksel_rate osc_sys_12m_rates[] = {
116 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
117 { .div = 0 }
118};
119
120static const struct clksel_rate osc_sys_13m_rates[] = {
121 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
122 { .div = 0 }
123};
124
125static const struct clksel_rate osc_sys_16_8m_rates[] = {
126 { .div = 1, .val = 5, .flags = RATE_IN_3430ES2 | DEFAULT_RATE },
127 { .div = 0 }
128};
129
130static const struct clksel_rate osc_sys_19_2m_rates[] = {
131 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
132 { .div = 0 }
133};
134
135static const struct clksel_rate osc_sys_26m_rates[] = {
136 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
137 { .div = 0 }
138};
139
140static const struct clksel_rate osc_sys_38_4m_rates[] = {
141 { .div = 1, .val = 4, .flags = RATE_IN_343X | DEFAULT_RATE },
142 { .div = 0 }
143};
144
145static const struct clksel osc_sys_clksel[] = {
146 { .parent = &virt_12m_ck, .rates = osc_sys_12m_rates },
147 { .parent = &virt_13m_ck, .rates = osc_sys_13m_rates },
148 { .parent = &virt_16_8m_ck, .rates = osc_sys_16_8m_rates },
149 { .parent = &virt_19_2m_ck, .rates = osc_sys_19_2m_rates },
150 { .parent = &virt_26m_ck, .rates = osc_sys_26m_rates },
151 { .parent = &virt_38_4m_ck, .rates = osc_sys_38_4m_rates },
152 { .parent = NULL },
153};
154
155/* Oscillator clock */
156/* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
157static struct clk osc_sys_ck = {
158 .name = "osc_sys_ck",
159 .ops = &clkops_null,
160 .init = &omap2_init_clksel_parent,
161 .clksel_reg = OMAP3430_PRM_CLKSEL,
162 .clksel_mask = OMAP3430_SYS_CLKIN_SEL_MASK,
163 .clksel = osc_sys_clksel,
164 /* REVISIT: deal with autoextclkmode? */
165 .flags = RATE_FIXED,
166 .recalc = &omap2_clksel_recalc,
167};
168
169static const struct clksel_rate div2_rates[] = {
170 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
171 { .div = 2, .val = 2, .flags = RATE_IN_343X },
172 { .div = 0 }
173};
174
175static const struct clksel sys_clksel[] = {
176 { .parent = &osc_sys_ck, .rates = div2_rates },
177 { .parent = NULL }
178};
179
180/* Latency: this clock is only enabled after PRM_CLKSETUP.SETUP_TIME */
181/* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
182static struct clk sys_ck = {
183 .name = "sys_ck",
184 .ops = &clkops_null,
185 .parent = &osc_sys_ck,
186 .init = &omap2_init_clksel_parent,
187 .clksel_reg = OMAP3430_PRM_CLKSRC_CTRL,
188 .clksel_mask = OMAP_SYSCLKDIV_MASK,
189 .clksel = sys_clksel,
190 .recalc = &omap2_clksel_recalc,
191};
192
193static struct clk sys_altclk = {
194 .name = "sys_altclk",
195 .ops = &clkops_null,
196};
197
198/* Optional external clock input for some McBSPs */
199static struct clk mcbsp_clks = {
200 .name = "mcbsp_clks",
201 .ops = &clkops_null,
202};
203
204/* PRM EXTERNAL CLOCK OUTPUT */
205
206static struct clk sys_clkout1 = {
207 .name = "sys_clkout1",
208 .ops = &clkops_omap2_dflt,
209 .parent = &osc_sys_ck,
210 .enable_reg = OMAP3430_PRM_CLKOUT_CTRL,
211 .enable_bit = OMAP3430_CLKOUT_EN_SHIFT,
212 .recalc = &followparent_recalc,
213};
214
215/* DPLLS */
216
217/* CM CLOCKS */
218
219static const struct clksel_rate div16_dpll_rates[] = {
220 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
221 { .div = 2, .val = 2, .flags = RATE_IN_343X },
222 { .div = 3, .val = 3, .flags = RATE_IN_343X },
223 { .div = 4, .val = 4, .flags = RATE_IN_343X },
224 { .div = 5, .val = 5, .flags = RATE_IN_343X },
225 { .div = 6, .val = 6, .flags = RATE_IN_343X },
226 { .div = 7, .val = 7, .flags = RATE_IN_343X },
227 { .div = 8, .val = 8, .flags = RATE_IN_343X },
228 { .div = 9, .val = 9, .flags = RATE_IN_343X },
229 { .div = 10, .val = 10, .flags = RATE_IN_343X },
230 { .div = 11, .val = 11, .flags = RATE_IN_343X },
231 { .div = 12, .val = 12, .flags = RATE_IN_343X },
232 { .div = 13, .val = 13, .flags = RATE_IN_343X },
233 { .div = 14, .val = 14, .flags = RATE_IN_343X },
234 { .div = 15, .val = 15, .flags = RATE_IN_343X },
235 { .div = 16, .val = 16, .flags = RATE_IN_343X },
236 { .div = 0 }
237};
238
239/* DPLL1 */
240/* MPU clock source */
241/* Type: DPLL */
242static struct dpll_data dpll1_dd = {
243 .mult_div1_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
244 .mult_mask = OMAP3430_MPU_DPLL_MULT_MASK,
245 .div1_mask = OMAP3430_MPU_DPLL_DIV_MASK,
246 .clk_bypass = &dpll1_fck,
247 .clk_ref = &sys_ck,
248 .freqsel_mask = OMAP3430_MPU_DPLL_FREQSEL_MASK,
249 .control_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL),
250 .enable_mask = OMAP3430_EN_MPU_DPLL_MASK,
251 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
252 .auto_recal_bit = OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT,
253 .recal_en_bit = OMAP3430_MPU_DPLL_RECAL_EN_SHIFT,
254 .recal_st_bit = OMAP3430_MPU_DPLL_ST_SHIFT,
255 .autoidle_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL),
256 .autoidle_mask = OMAP3430_AUTO_MPU_DPLL_MASK,
257 .idlest_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
258 .idlest_mask = OMAP3430_ST_MPU_CLK_MASK,
259 .max_multiplier = OMAP3_MAX_DPLL_MULT,
260 .min_divider = 1,
261 .max_divider = OMAP3_MAX_DPLL_DIV,
262 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
263};
264
265static struct clk dpll1_ck = {
266 .name = "dpll1_ck",
267 .ops = &clkops_null,
268 .parent = &sys_ck,
269 .dpll_data = &dpll1_dd,
270 .round_rate = &omap2_dpll_round_rate,
271 .set_rate = &omap3_noncore_dpll_set_rate,
272 .clkdm_name = "dpll1_clkdm",
273 .recalc = &omap3_dpll_recalc,
274};
275
276/*
277 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
278 * DPLL isn't bypassed.
279 */
280static struct clk dpll1_x2_ck = {
281 .name = "dpll1_x2_ck",
282 .ops = &clkops_null,
283 .parent = &dpll1_ck,
284 .clkdm_name = "dpll1_clkdm",
285 .recalc = &omap3_clkoutx2_recalc,
286};
287
288/* On DPLL1, unlike other DPLLs, the divider is downstream from CLKOUTX2 */
289static const struct clksel div16_dpll1_x2m2_clksel[] = {
290 { .parent = &dpll1_x2_ck, .rates = div16_dpll_rates },
291 { .parent = NULL }
292};
293
294/*
295 * Does not exist in the TRM - needed to separate the M2 divider from
296 * bypass selection in mpu_ck
297 */
298static struct clk dpll1_x2m2_ck = {
299 .name = "dpll1_x2m2_ck",
300 .ops = &clkops_null,
301 .parent = &dpll1_x2_ck,
302 .init = &omap2_init_clksel_parent,
303 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL),
304 .clksel_mask = OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK,
305 .clksel = div16_dpll1_x2m2_clksel,
306 .clkdm_name = "dpll1_clkdm",
307 .recalc = &omap2_clksel_recalc,
308};
309
310/* DPLL2 */
311/* IVA2 clock source */
312/* Type: DPLL */
313
314static struct dpll_data dpll2_dd = {
315 .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
316 .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK,
317 .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK,
318 .clk_bypass = &dpll2_fck,
319 .clk_ref = &sys_ck,
320 .freqsel_mask = OMAP3430_IVA2_DPLL_FREQSEL_MASK,
321 .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
322 .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK,
323 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
324 (1 << DPLL_LOW_POWER_BYPASS),
325 .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
326 .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
327 .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
328 .autoidle_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
329 .autoidle_mask = OMAP3430_AUTO_IVA2_DPLL_MASK,
330 .idlest_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
331 .idlest_mask = OMAP3430_ST_IVA2_CLK_MASK,
332 .max_multiplier = OMAP3_MAX_DPLL_MULT,
333 .min_divider = 1,
334 .max_divider = OMAP3_MAX_DPLL_DIV,
335 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
336};
337
338static struct clk dpll2_ck = {
339 .name = "dpll2_ck",
340 .ops = &clkops_noncore_dpll_ops,
341 .parent = &sys_ck,
342 .dpll_data = &dpll2_dd,
343 .round_rate = &omap2_dpll_round_rate,
344 .set_rate = &omap3_noncore_dpll_set_rate,
345 .clkdm_name = "dpll2_clkdm",
346 .recalc = &omap3_dpll_recalc,
347};
348
349static const struct clksel div16_dpll2_m2x2_clksel[] = {
350 { .parent = &dpll2_ck, .rates = div16_dpll_rates },
351 { .parent = NULL }
352};
353
354/*
355 * The TRM is conflicted on whether IVA2 clock comes from DPLL2 CLKOUT
356 * or CLKOUTX2. CLKOUT seems most plausible.
357 */
358static struct clk dpll2_m2_ck = {
359 .name = "dpll2_m2_ck",
360 .ops = &clkops_null,
361 .parent = &dpll2_ck,
362 .init = &omap2_init_clksel_parent,
363 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD,
364 OMAP3430_CM_CLKSEL2_PLL),
365 .clksel_mask = OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK,
366 .clksel = div16_dpll2_m2x2_clksel,
367 .clkdm_name = "dpll2_clkdm",
368 .recalc = &omap2_clksel_recalc,
369};
370
371/*
372 * DPLL3
373 * Source clock for all interfaces and for some device fclks
374 * REVISIT: Also supports fast relock bypass - not included below
375 */
376static struct dpll_data dpll3_dd = {
377 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
378 .mult_mask = OMAP3430_CORE_DPLL_MULT_MASK,
379 .div1_mask = OMAP3430_CORE_DPLL_DIV_MASK,
380 .clk_bypass = &sys_ck,
381 .clk_ref = &sys_ck,
382 .freqsel_mask = OMAP3430_CORE_DPLL_FREQSEL_MASK,
383 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
384 .enable_mask = OMAP3430_EN_CORE_DPLL_MASK,
385 .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT,
386 .recal_en_bit = OMAP3430_CORE_DPLL_RECAL_EN_SHIFT,
387 .recal_st_bit = OMAP3430_CORE_DPLL_ST_SHIFT,
388 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
389 .autoidle_mask = OMAP3430_AUTO_CORE_DPLL_MASK,
390 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
391 .idlest_mask = OMAP3430_ST_CORE_CLK_MASK,
392 .max_multiplier = OMAP3_MAX_DPLL_MULT,
393 .min_divider = 1,
394 .max_divider = OMAP3_MAX_DPLL_DIV,
395 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
396};
397
398static struct clk dpll3_ck = {
399 .name = "dpll3_ck",
400 .ops = &clkops_null,
401 .parent = &sys_ck,
402 .dpll_data = &dpll3_dd,
403 .round_rate = &omap2_dpll_round_rate,
404 .clkdm_name = "dpll3_clkdm",
405 .recalc = &omap3_dpll_recalc,
406};
407
408/*
409 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
410 * DPLL isn't bypassed
411 */
412static struct clk dpll3_x2_ck = {
413 .name = "dpll3_x2_ck",
414 .ops = &clkops_null,
415 .parent = &dpll3_ck,
416 .clkdm_name = "dpll3_clkdm",
417 .recalc = &omap3_clkoutx2_recalc,
418};
419
420static const struct clksel_rate div31_dpll3_rates[] = {
421 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
422 { .div = 2, .val = 2, .flags = RATE_IN_343X },
423 { .div = 3, .val = 3, .flags = RATE_IN_3430ES2 },
424 { .div = 4, .val = 4, .flags = RATE_IN_3430ES2 },
425 { .div = 5, .val = 5, .flags = RATE_IN_3430ES2 },
426 { .div = 6, .val = 6, .flags = RATE_IN_3430ES2 },
427 { .div = 7, .val = 7, .flags = RATE_IN_3430ES2 },
428 { .div = 8, .val = 8, .flags = RATE_IN_3430ES2 },
429 { .div = 9, .val = 9, .flags = RATE_IN_3430ES2 },
430 { .div = 10, .val = 10, .flags = RATE_IN_3430ES2 },
431 { .div = 11, .val = 11, .flags = RATE_IN_3430ES2 },
432 { .div = 12, .val = 12, .flags = RATE_IN_3430ES2 },
433 { .div = 13, .val = 13, .flags = RATE_IN_3430ES2 },
434 { .div = 14, .val = 14, .flags = RATE_IN_3430ES2 },
435 { .div = 15, .val = 15, .flags = RATE_IN_3430ES2 },
436 { .div = 16, .val = 16, .flags = RATE_IN_3430ES2 },
437 { .div = 17, .val = 17, .flags = RATE_IN_3430ES2 },
438 { .div = 18, .val = 18, .flags = RATE_IN_3430ES2 },
439 { .div = 19, .val = 19, .flags = RATE_IN_3430ES2 },
440 { .div = 20, .val = 20, .flags = RATE_IN_3430ES2 },
441 { .div = 21, .val = 21, .flags = RATE_IN_3430ES2 },
442 { .div = 22, .val = 22, .flags = RATE_IN_3430ES2 },
443 { .div = 23, .val = 23, .flags = RATE_IN_3430ES2 },
444 { .div = 24, .val = 24, .flags = RATE_IN_3430ES2 },
445 { .div = 25, .val = 25, .flags = RATE_IN_3430ES2 },
446 { .div = 26, .val = 26, .flags = RATE_IN_3430ES2 },
447 { .div = 27, .val = 27, .flags = RATE_IN_3430ES2 },
448 { .div = 28, .val = 28, .flags = RATE_IN_3430ES2 },
449 { .div = 29, .val = 29, .flags = RATE_IN_3430ES2 },
450 { .div = 30, .val = 30, .flags = RATE_IN_3430ES2 },
451 { .div = 31, .val = 31, .flags = RATE_IN_3430ES2 },
452 { .div = 0 },
453};
454
455static const struct clksel div31_dpll3m2_clksel[] = {
456 { .parent = &dpll3_ck, .rates = div31_dpll3_rates },
457 { .parent = NULL }
458};
459
460/* DPLL3 output M2 - primary control point for CORE speed */
461static struct clk dpll3_m2_ck = {
462 .name = "dpll3_m2_ck",
463 .ops = &clkops_null,
464 .parent = &dpll3_ck,
465 .init = &omap2_init_clksel_parent,
466 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
467 .clksel_mask = OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK,
468 .clksel = div31_dpll3m2_clksel,
469 .clkdm_name = "dpll3_clkdm",
470 .round_rate = &omap2_clksel_round_rate,
471 .set_rate = &omap3_core_dpll_m2_set_rate,
472 .recalc = &omap2_clksel_recalc,
473};
474
475static struct clk core_ck = {
476 .name = "core_ck",
477 .ops = &clkops_null,
478 .parent = &dpll3_m2_ck,
479 .recalc = &followparent_recalc,
480};
481
482static struct clk dpll3_m2x2_ck = {
483 .name = "dpll3_m2x2_ck",
484 .ops = &clkops_null,
485 .parent = &dpll3_m2_ck,
486 .clkdm_name = "dpll3_clkdm",
487 .recalc = &omap3_clkoutx2_recalc,
488};
489
490/* The PWRDN bit is apparently only available on 3430ES2 and above */
491static const struct clksel div16_dpll3_clksel[] = {
492 { .parent = &dpll3_ck, .rates = div16_dpll_rates },
493 { .parent = NULL }
494};
495
496/* This virtual clock is the source for dpll3_m3x2_ck */
497static struct clk dpll3_m3_ck = {
498 .name = "dpll3_m3_ck",
499 .ops = &clkops_null,
500 .parent = &dpll3_ck,
501 .init = &omap2_init_clksel_parent,
502 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
503 .clksel_mask = OMAP3430_DIV_DPLL3_MASK,
504 .clksel = div16_dpll3_clksel,
505 .clkdm_name = "dpll3_clkdm",
506 .recalc = &omap2_clksel_recalc,
507};
508
509/* The PWRDN bit is apparently only available on 3430ES2 and above */
510static struct clk dpll3_m3x2_ck = {
511 .name = "dpll3_m3x2_ck",
512 .ops = &clkops_omap2_dflt_wait,
513 .parent = &dpll3_m3_ck,
514 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
515 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
516 .flags = INVERT_ENABLE,
517 .clkdm_name = "dpll3_clkdm",
518 .recalc = &omap3_clkoutx2_recalc,
519};
520
521static struct clk emu_core_alwon_ck = {
522 .name = "emu_core_alwon_ck",
523 .ops = &clkops_null,
524 .parent = &dpll3_m3x2_ck,
525 .clkdm_name = "dpll3_clkdm",
526 .recalc = &followparent_recalc,
527};
528
529/* DPLL4 */
530/* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
531/* Type: DPLL */
532static struct dpll_data dpll4_dd = {
533 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2),
534 .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK,
535 .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK,
536 .clk_bypass = &sys_ck,
537 .clk_ref = &sys_ck,
538 .freqsel_mask = OMAP3430_PERIPH_DPLL_FREQSEL_MASK,
539 .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
540 .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK,
541 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
542 .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT,
543 .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT,
544 .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT,
545 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE),
546 .autoidle_mask = OMAP3430_AUTO_PERIPH_DPLL_MASK,
547 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST),
548 .idlest_mask = OMAP3430_ST_PERIPH_CLK_MASK,
549 .max_multiplier = OMAP3_MAX_DPLL_MULT,
550 .min_divider = 1,
551 .max_divider = OMAP3_MAX_DPLL_DIV,
552 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
553};
554
555static struct clk dpll4_ck = {
556 .name = "dpll4_ck",
557 .ops = &clkops_noncore_dpll_ops,
558 .parent = &sys_ck,
559 .dpll_data = &dpll4_dd,
560 .round_rate = &omap2_dpll_round_rate,
561 .set_rate = &omap3_dpll4_set_rate,
562 .clkdm_name = "dpll4_clkdm",
563 .recalc = &omap3_dpll_recalc,
564};
565
566/*
567 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
568 * DPLL isn't bypassed --
569 * XXX does this serve any downstream clocks?
570 */
571static struct clk dpll4_x2_ck = {
572 .name = "dpll4_x2_ck",
573 .ops = &clkops_null,
574 .parent = &dpll4_ck,
575 .clkdm_name = "dpll4_clkdm",
576 .recalc = &omap3_clkoutx2_recalc,
577};
578
579static const struct clksel div16_dpll4_clksel[] = {
580 { .parent = &dpll4_ck, .rates = div16_dpll_rates },
581 { .parent = NULL }
582};
583
584/* This virtual clock is the source for dpll4_m2x2_ck */
585static struct clk dpll4_m2_ck = {
586 .name = "dpll4_m2_ck",
587 .ops = &clkops_null,
588 .parent = &dpll4_ck,
589 .init = &omap2_init_clksel_parent,
590 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
591 .clksel_mask = OMAP3430_DIV_96M_MASK,
592 .clksel = div16_dpll4_clksel,
593 .clkdm_name = "dpll4_clkdm",
594 .recalc = &omap2_clksel_recalc,
595};
596
597/* The PWRDN bit is apparently only available on 3430ES2 and above */
598static struct clk dpll4_m2x2_ck = {
599 .name = "dpll4_m2x2_ck",
600 .ops = &clkops_omap2_dflt_wait,
601 .parent = &dpll4_m2_ck,
602 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
603 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
604 .flags = INVERT_ENABLE,
605 .clkdm_name = "dpll4_clkdm",
606 .recalc = &omap3_clkoutx2_recalc,
607};
608
609/*
610 * DPLL4 generates DPLL4_M2X2_CLK which is then routed into the PRM as
611 * PRM_96M_ALWON_(F)CLK. Two clocks then emerge from the PRM:
612 * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and
613 * CM_96K_(F)CLK.
614 */
615static struct clk omap_96m_alwon_fck = {
616 .name = "omap_96m_alwon_fck",
617 .ops = &clkops_null,
618 .parent = &dpll4_m2x2_ck,
619 .recalc = &followparent_recalc,
620};
621
622static struct clk cm_96m_fck = {
623 .name = "cm_96m_fck",
624 .ops = &clkops_null,
625 .parent = &omap_96m_alwon_fck,
626 .recalc = &followparent_recalc,
627};
628
629static const struct clksel_rate omap_96m_dpll_rates[] = {
630 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
631 { .div = 0 }
632};
633
634static const struct clksel_rate omap_96m_sys_rates[] = {
635 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
636 { .div = 0 }
637};
638
639static const struct clksel omap_96m_fck_clksel[] = {
640 { .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates },
641 { .parent = &sys_ck, .rates = omap_96m_sys_rates },
642 { .parent = NULL }
643};
644
645static struct clk omap_96m_fck = {
646 .name = "omap_96m_fck",
647 .ops = &clkops_null,
648 .parent = &sys_ck,
649 .init = &omap2_init_clksel_parent,
650 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
651 .clksel_mask = OMAP3430_SOURCE_96M_MASK,
652 .clksel = omap_96m_fck_clksel,
653 .recalc = &omap2_clksel_recalc,
654};
655
656/* This virtual clock is the source for dpll4_m3x2_ck */
657static struct clk dpll4_m3_ck = {
658 .name = "dpll4_m3_ck",
659 .ops = &clkops_null,
660 .parent = &dpll4_ck,
661 .init = &omap2_init_clksel_parent,
662 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
663 .clksel_mask = OMAP3430_CLKSEL_TV_MASK,
664 .clksel = div16_dpll4_clksel,
665 .clkdm_name = "dpll4_clkdm",
666 .recalc = &omap2_clksel_recalc,
667};
668
669/* The PWRDN bit is apparently only available on 3430ES2 and above */
670static struct clk dpll4_m3x2_ck = {
671 .name = "dpll4_m3x2_ck",
672 .ops = &clkops_omap2_dflt_wait,
673 .parent = &dpll4_m3_ck,
674 .init = &omap2_init_clksel_parent,
675 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
676 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
677 .flags = INVERT_ENABLE,
678 .clkdm_name = "dpll4_clkdm",
679 .recalc = &omap3_clkoutx2_recalc,
680};
681
682static const struct clksel_rate omap_54m_d4m3x2_rates[] = {
683 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
684 { .div = 0 }
685};
686
687static const struct clksel_rate omap_54m_alt_rates[] = {
688 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
689 { .div = 0 }
690};
691
692static const struct clksel omap_54m_clksel[] = {
693 { .parent = &dpll4_m3x2_ck, .rates = omap_54m_d4m3x2_rates },
694 { .parent = &sys_altclk, .rates = omap_54m_alt_rates },
695 { .parent = NULL }
696};
697
698static struct clk omap_54m_fck = {
699 .name = "omap_54m_fck",
700 .ops = &clkops_null,
701 .init = &omap2_init_clksel_parent,
702 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
703 .clksel_mask = OMAP3430_SOURCE_54M_MASK,
704 .clksel = omap_54m_clksel,
705 .recalc = &omap2_clksel_recalc,
706};
707
708static const struct clksel_rate omap_48m_cm96m_rates[] = {
709 { .div = 2, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
710 { .div = 0 }
711};
712
713static const struct clksel_rate omap_48m_alt_rates[] = {
714 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
715 { .div = 0 }
716};
717
718static const struct clksel omap_48m_clksel[] = {
719 { .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
720 { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
721 { .parent = NULL }
722};
723
724static struct clk omap_48m_fck = {
725 .name = "omap_48m_fck",
726 .ops = &clkops_null,
727 .init = &omap2_init_clksel_parent,
728 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
729 .clksel_mask = OMAP3430_SOURCE_48M_MASK,
730 .clksel = omap_48m_clksel,
731 .recalc = &omap2_clksel_recalc,
732};
733
734static struct clk omap_12m_fck = {
735 .name = "omap_12m_fck",
736 .ops = &clkops_null,
737 .parent = &omap_48m_fck,
738 .fixed_div = 4,
739 .recalc = &omap2_fixed_divisor_recalc,
740};
741
742/* This virstual clock is the source for dpll4_m4x2_ck */
743static struct clk dpll4_m4_ck = {
744 .name = "dpll4_m4_ck",
745 .ops = &clkops_null,
746 .parent = &dpll4_ck,
747 .init = &omap2_init_clksel_parent,
748 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
749 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK,
750 .clksel = div16_dpll4_clksel,
751 .clkdm_name = "dpll4_clkdm",
752 .recalc = &omap2_clksel_recalc,
753 .set_rate = &omap2_clksel_set_rate,
754 .round_rate = &omap2_clksel_round_rate,
755};
756
757/* The PWRDN bit is apparently only available on 3430ES2 and above */
758static struct clk dpll4_m4x2_ck = {
759 .name = "dpll4_m4x2_ck",
760 .ops = &clkops_omap2_dflt_wait,
761 .parent = &dpll4_m4_ck,
762 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
763 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
764 .flags = INVERT_ENABLE,
765 .clkdm_name = "dpll4_clkdm",
766 .recalc = &omap3_clkoutx2_recalc,
767};
768
769/* This virtual clock is the source for dpll4_m5x2_ck */
770static struct clk dpll4_m5_ck = {
771 .name = "dpll4_m5_ck",
772 .ops = &clkops_null,
773 .parent = &dpll4_ck,
774 .init = &omap2_init_clksel_parent,
775 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
776 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
777 .clksel = div16_dpll4_clksel,
778 .clkdm_name = "dpll4_clkdm",
779 .recalc = &omap2_clksel_recalc,
780};
781
782/* The PWRDN bit is apparently only available on 3430ES2 and above */
783static struct clk dpll4_m5x2_ck = {
784 .name = "dpll4_m5x2_ck",
785 .ops = &clkops_omap2_dflt_wait,
786 .parent = &dpll4_m5_ck,
787 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
788 .enable_bit = OMAP3430_PWRDN_CAM_SHIFT,
789 .flags = INVERT_ENABLE,
790 .clkdm_name = "dpll4_clkdm",
791 .recalc = &omap3_clkoutx2_recalc,
792};
793
794/* This virtual clock is the source for dpll4_m6x2_ck */
795static struct clk dpll4_m6_ck = {
796 .name = "dpll4_m6_ck",
797 .ops = &clkops_null,
798 .parent = &dpll4_ck,
799 .init = &omap2_init_clksel_parent,
800 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
801 .clksel_mask = OMAP3430_DIV_DPLL4_MASK,
802 .clksel = div16_dpll4_clksel,
803 .clkdm_name = "dpll4_clkdm",
804 .recalc = &omap2_clksel_recalc,
805};
806
807/* The PWRDN bit is apparently only available on 3430ES2 and above */
808static struct clk dpll4_m6x2_ck = {
809 .name = "dpll4_m6x2_ck",
810 .ops = &clkops_omap2_dflt_wait,
811 .parent = &dpll4_m6_ck,
812 .init = &omap2_init_clksel_parent,
813 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
814 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
815 .flags = INVERT_ENABLE,
816 .clkdm_name = "dpll4_clkdm",
817 .recalc = &omap3_clkoutx2_recalc,
818};
819
820static struct clk emu_per_alwon_ck = {
821 .name = "emu_per_alwon_ck",
822 .ops = &clkops_null,
823 .parent = &dpll4_m6x2_ck,
824 .clkdm_name = "dpll4_clkdm",
825 .recalc = &followparent_recalc,
826};
827
828/* DPLL5 */
829/* Supplies 120MHz clock, USIM source clock */
830/* Type: DPLL */
831/* 3430ES2 only */
832static struct dpll_data dpll5_dd = {
833 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
834 .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
835 .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
836 .clk_bypass = &sys_ck,
837 .clk_ref = &sys_ck,
838 .freqsel_mask = OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
839 .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
840 .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
841 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
842 .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
843 .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
844 .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
845 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
846 .autoidle_mask = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
847 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
848 .idlest_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
849 .max_multiplier = OMAP3_MAX_DPLL_MULT,
850 .min_divider = 1,
851 .max_divider = OMAP3_MAX_DPLL_DIV,
852 .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE
853};
854
855static struct clk dpll5_ck = {
856 .name = "dpll5_ck",
857 .ops = &clkops_noncore_dpll_ops,
858 .parent = &sys_ck,
859 .dpll_data = &dpll5_dd,
860 .round_rate = &omap2_dpll_round_rate,
861 .set_rate = &omap3_noncore_dpll_set_rate,
862 .clkdm_name = "dpll5_clkdm",
863 .recalc = &omap3_dpll_recalc,
864};
865
866static const struct clksel div16_dpll5_clksel[] = {
867 { .parent = &dpll5_ck, .rates = div16_dpll_rates },
868 { .parent = NULL }
869};
870
871static struct clk dpll5_m2_ck = {
872 .name = "dpll5_m2_ck",
873 .ops = &clkops_null,
874 .parent = &dpll5_ck,
875 .init = &omap2_init_clksel_parent,
876 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
877 .clksel_mask = OMAP3430ES2_DIV_120M_MASK,
878 .clksel = div16_dpll5_clksel,
879 .clkdm_name = "dpll5_clkdm",
880 .recalc = &omap2_clksel_recalc,
881};
882
883/* CM EXTERNAL CLOCK OUTPUTS */
884
885static const struct clksel_rate clkout2_src_core_rates[] = {
886 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
887 { .div = 0 }
888};
889
890static const struct clksel_rate clkout2_src_sys_rates[] = {
891 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
892 { .div = 0 }
893};
894
895static const struct clksel_rate clkout2_src_96m_rates[] = {
896 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
897 { .div = 0 }
898};
899
900static const struct clksel_rate clkout2_src_54m_rates[] = {
901 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
902 { .div = 0 }
903};
904
905static const struct clksel clkout2_src_clksel[] = {
906 { .parent = &core_ck, .rates = clkout2_src_core_rates },
907 { .parent = &sys_ck, .rates = clkout2_src_sys_rates },
908 { .parent = &cm_96m_fck, .rates = clkout2_src_96m_rates },
909 { .parent = &omap_54m_fck, .rates = clkout2_src_54m_rates },
910 { .parent = NULL }
911};
912
913static struct clk clkout2_src_ck = {
914 .name = "clkout2_src_ck",
915 .ops = &clkops_omap2_dflt,
916 .init = &omap2_init_clksel_parent,
917 .enable_reg = OMAP3430_CM_CLKOUT_CTRL,
918 .enable_bit = OMAP3430_CLKOUT2_EN_SHIFT,
919 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
920 .clksel_mask = OMAP3430_CLKOUT2SOURCE_MASK,
921 .clksel = clkout2_src_clksel,
922 .clkdm_name = "core_clkdm",
923 .recalc = &omap2_clksel_recalc,
924};
925
926static const struct clksel_rate sys_clkout2_rates[] = {
927 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
928 { .div = 2, .val = 1, .flags = RATE_IN_343X },
929 { .div = 4, .val = 2, .flags = RATE_IN_343X },
930 { .div = 8, .val = 3, .flags = RATE_IN_343X },
931 { .div = 16, .val = 4, .flags = RATE_IN_343X },
932 { .div = 0 },
933};
934
935static const struct clksel sys_clkout2_clksel[] = {
936 { .parent = &clkout2_src_ck, .rates = sys_clkout2_rates },
937 { .parent = NULL },
938};
939
940static struct clk sys_clkout2 = {
941 .name = "sys_clkout2",
942 .ops = &clkops_null,
943 .init = &omap2_init_clksel_parent,
944 .clksel_reg = OMAP3430_CM_CLKOUT_CTRL,
945 .clksel_mask = OMAP3430_CLKOUT2_DIV_MASK,
946 .clksel = sys_clkout2_clksel,
947 .recalc = &omap2_clksel_recalc,
948};
949
950/* CM OUTPUT CLOCKS */
951
952static struct clk corex2_fck = {
953 .name = "corex2_fck",
954 .ops = &clkops_null,
955 .parent = &dpll3_m2x2_ck,
956 .recalc = &followparent_recalc,
957};
958
959/* DPLL power domain clock controls */
960
961static const struct clksel_rate div4_rates[] = {
962 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
963 { .div = 2, .val = 2, .flags = RATE_IN_343X },
964 { .div = 4, .val = 4, .flags = RATE_IN_343X },
965 { .div = 0 }
966};
967
968static const struct clksel div4_core_clksel[] = {
969 { .parent = &core_ck, .rates = div4_rates },
970 { .parent = NULL }
971};
972
973/*
974 * REVISIT: Are these in DPLL power domain or CM power domain? docs
975 * may be inconsistent here?
976 */
977static struct clk dpll1_fck = {
978 .name = "dpll1_fck",
979 .ops = &clkops_null,
980 .parent = &core_ck,
981 .init = &omap2_init_clksel_parent,
982 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
983 .clksel_mask = OMAP3430_MPU_CLK_SRC_MASK,
984 .clksel = div4_core_clksel,
985 .recalc = &omap2_clksel_recalc,
986};
987
988static struct clk mpu_ck = {
989 .name = "mpu_ck",
990 .ops = &clkops_null,
991 .parent = &dpll1_x2m2_ck,
992 .clkdm_name = "mpu_clkdm",
993 .recalc = &followparent_recalc,
994};
995
996/* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
997static const struct clksel_rate arm_fck_rates[] = {
998 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
999 { .div = 2, .val = 1, .flags = RATE_IN_343X },
1000 { .div = 0 },
1001};
1002
1003static const struct clksel arm_fck_clksel[] = {
1004 { .parent = &mpu_ck, .rates = arm_fck_rates },
1005 { .parent = NULL }
1006};
1007
1008static struct clk arm_fck = {
1009 .name = "arm_fck",
1010 .ops = &clkops_null,
1011 .parent = &mpu_ck,
1012 .init = &omap2_init_clksel_parent,
1013 .clksel_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL),
1014 .clksel_mask = OMAP3430_ST_MPU_CLK_MASK,
1015 .clksel = arm_fck_clksel,
1016 .clkdm_name = "mpu_clkdm",
1017 .recalc = &omap2_clksel_recalc,
1018};
1019
1020/* XXX What about neon_clkdm ? */
1021
1022/*
1023 * REVISIT: This clock is never specifically defined in the 3430 TRM,
1024 * although it is referenced - so this is a guess
1025 */
1026static struct clk emu_mpu_alwon_ck = {
1027 .name = "emu_mpu_alwon_ck",
1028 .ops = &clkops_null,
1029 .parent = &mpu_ck,
1030 .recalc = &followparent_recalc,
1031};
1032
1033static struct clk dpll2_fck = {
1034 .name = "dpll2_fck",
1035 .ops = &clkops_null,
1036 .parent = &core_ck,
1037 .init = &omap2_init_clksel_parent,
1038 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
1039 .clksel_mask = OMAP3430_IVA2_CLK_SRC_MASK,
1040 .clksel = div4_core_clksel,
1041 .recalc = &omap2_clksel_recalc,
1042};
1043
1044static struct clk iva2_ck = {
1045 .name = "iva2_ck",
1046 .ops = &clkops_omap2_dflt_wait,
1047 .parent = &dpll2_m2_ck,
1048 .init = &omap2_init_clksel_parent,
1049 .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
1050 .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
1051 .clkdm_name = "iva2_clkdm",
1052 .recalc = &followparent_recalc,
1053};
1054
1055/* Common interface clocks */
1056
1057static const struct clksel div2_core_clksel[] = {
1058 { .parent = &core_ck, .rates = div2_rates },
1059 { .parent = NULL }
1060};
1061
1062static struct clk l3_ick = {
1063 .name = "l3_ick",
1064 .ops = &clkops_null,
1065 .parent = &core_ck,
1066 .init = &omap2_init_clksel_parent,
1067 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1068 .clksel_mask = OMAP3430_CLKSEL_L3_MASK,
1069 .clksel = div2_core_clksel,
1070 .clkdm_name = "core_l3_clkdm",
1071 .recalc = &omap2_clksel_recalc,
1072};
1073
1074static const struct clksel div2_l3_clksel[] = {
1075 { .parent = &l3_ick, .rates = div2_rates },
1076 { .parent = NULL }
1077};
1078
1079static struct clk l4_ick = {
1080 .name = "l4_ick",
1081 .ops = &clkops_null,
1082 .parent = &l3_ick,
1083 .init = &omap2_init_clksel_parent,
1084 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1085 .clksel_mask = OMAP3430_CLKSEL_L4_MASK,
1086 .clksel = div2_l3_clksel,
1087 .clkdm_name = "core_l4_clkdm",
1088 .recalc = &omap2_clksel_recalc,
1089
1090};
1091
1092static const struct clksel div2_l4_clksel[] = {
1093 { .parent = &l4_ick, .rates = div2_rates },
1094 { .parent = NULL }
1095};
1096
1097static struct clk rm_ick = {
1098 .name = "rm_ick",
1099 .ops = &clkops_null,
1100 .parent = &l4_ick,
1101 .init = &omap2_init_clksel_parent,
1102 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
1103 .clksel_mask = OMAP3430_CLKSEL_RM_MASK,
1104 .clksel = div2_l4_clksel,
1105 .recalc = &omap2_clksel_recalc,
1106};
1107
1108/* GFX power domain */
1109
1110/* GFX clocks are in 3430ES1 only. 3430ES2 and later uses the SGX instead */
1111
1112static const struct clksel gfx_l3_clksel[] = {
1113 { .parent = &l3_ick, .rates = gfx_l3_rates },
1114 { .parent = NULL }
1115};
1116
1117/* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */
1118static struct clk gfx_l3_ck = {
1119 .name = "gfx_l3_ck",
1120 .ops = &clkops_omap2_dflt_wait,
1121 .parent = &l3_ick,
1122 .init = &omap2_init_clksel_parent,
1123 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1124 .enable_bit = OMAP_EN_GFX_SHIFT,
1125 .recalc = &followparent_recalc,
1126};
1127
1128static struct clk gfx_l3_fck = {
1129 .name = "gfx_l3_fck",
1130 .ops = &clkops_null,
1131 .parent = &gfx_l3_ck,
1132 .init = &omap2_init_clksel_parent,
1133 .clksel_reg = OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1134 .clksel_mask = OMAP_CLKSEL_GFX_MASK,
1135 .clksel = gfx_l3_clksel,
1136 .clkdm_name = "gfx_3430es1_clkdm",
1137 .recalc = &omap2_clksel_recalc,
1138};
1139
1140static struct clk gfx_l3_ick = {
1141 .name = "gfx_l3_ick",
1142 .ops = &clkops_null,
1143 .parent = &gfx_l3_ck,
1144 .clkdm_name = "gfx_3430es1_clkdm",
1145 .recalc = &followparent_recalc,
1146};
1147
1148static struct clk gfx_cg1_ck = {
1149 .name = "gfx_cg1_ck",
1150 .ops = &clkops_omap2_dflt_wait,
1151 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1152 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1153 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1154 .clkdm_name = "gfx_3430es1_clkdm",
1155 .recalc = &followparent_recalc,
1156};
1157
1158static struct clk gfx_cg2_ck = {
1159 .name = "gfx_cg2_ck",
1160 .ops = &clkops_omap2_dflt_wait,
1161 .parent = &gfx_l3_fck, /* REVISIT: correct? */
1162 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1163 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1164 .clkdm_name = "gfx_3430es1_clkdm",
1165 .recalc = &followparent_recalc,
1166};
1167
1168/* SGX power domain - 3430ES2 only */
1169
1170static const struct clksel_rate sgx_core_rates[] = {
1171 { .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1172 { .div = 4, .val = 1, .flags = RATE_IN_343X },
1173 { .div = 6, .val = 2, .flags = RATE_IN_343X },
1174 { .div = 0 },
1175};
1176
1177static const struct clksel_rate sgx_96m_rates[] = {
1178 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
1179 { .div = 0 },
1180};
1181
1182static const struct clksel sgx_clksel[] = {
1183 { .parent = &core_ck, .rates = sgx_core_rates },
1184 { .parent = &cm_96m_fck, .rates = sgx_96m_rates },
1185 { .parent = NULL },
1186};
1187
1188static struct clk sgx_fck = {
1189 .name = "sgx_fck",
1190 .ops = &clkops_omap2_dflt_wait,
1191 .init = &omap2_init_clksel_parent,
1192 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
1193 .enable_bit = OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
1194 .clksel_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
1195 .clksel_mask = OMAP3430ES2_CLKSEL_SGX_MASK,
1196 .clksel = sgx_clksel,
1197 .clkdm_name = "sgx_clkdm",
1198 .recalc = &omap2_clksel_recalc,
1199};
1200
1201static struct clk sgx_ick = {
1202 .name = "sgx_ick",
1203 .ops = &clkops_omap2_dflt_wait,
1204 .parent = &l3_ick,
1205 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
1206 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
1207 .clkdm_name = "sgx_clkdm",
1208 .recalc = &followparent_recalc,
1209};
1210
1211/* CORE power domain */
1212
1213static struct clk d2d_26m_fck = {
1214 .name = "d2d_26m_fck",
1215 .ops = &clkops_omap2_dflt_wait,
1216 .parent = &sys_ck,
1217 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1218 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
1219 .clkdm_name = "d2d_clkdm",
1220 .recalc = &followparent_recalc,
1221};
1222
1223static struct clk modem_fck = {
1224 .name = "modem_fck",
1225 .ops = &clkops_omap2_dflt_wait,
1226 .parent = &sys_ck,
1227 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1228 .enable_bit = OMAP3430_EN_MODEM_SHIFT,
1229 .clkdm_name = "d2d_clkdm",
1230 .recalc = &followparent_recalc,
1231};
1232
1233static struct clk sad2d_ick = {
1234 .name = "sad2d_ick",
1235 .ops = &clkops_omap2_dflt_wait,
1236 .parent = &l3_ick,
1237 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1238 .enable_bit = OMAP3430_EN_SAD2D_SHIFT,
1239 .clkdm_name = "d2d_clkdm",
1240 .recalc = &followparent_recalc,
1241};
1242
1243static struct clk mad2d_ick = {
1244 .name = "mad2d_ick",
1245 .ops = &clkops_omap2_dflt_wait,
1246 .parent = &l3_ick,
1247 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1248 .enable_bit = OMAP3430_EN_MAD2D_SHIFT,
1249 .clkdm_name = "d2d_clkdm",
1250 .recalc = &followparent_recalc,
1251};
1252
1253static const struct clksel omap343x_gpt_clksel[] = {
1254 { .parent = &omap_32k_fck, .rates = gpt_32k_rates },
1255 { .parent = &sys_ck, .rates = gpt_sys_rates },
1256 { .parent = NULL}
1257};
1258
1259static struct clk gpt10_fck = {
1260 .name = "gpt10_fck",
1261 .ops = &clkops_omap2_dflt_wait,
1262 .parent = &sys_ck,
1263 .init = &omap2_init_clksel_parent,
1264 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1265 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1266 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1267 .clksel_mask = OMAP3430_CLKSEL_GPT10_MASK,
1268 .clksel = omap343x_gpt_clksel,
1269 .clkdm_name = "core_l4_clkdm",
1270 .recalc = &omap2_clksel_recalc,
1271};
1272
1273static struct clk gpt11_fck = {
1274 .name = "gpt11_fck",
1275 .ops = &clkops_omap2_dflt_wait,
1276 .parent = &sys_ck,
1277 .init = &omap2_init_clksel_parent,
1278 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1279 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1280 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1281 .clksel_mask = OMAP3430_CLKSEL_GPT11_MASK,
1282 .clksel = omap343x_gpt_clksel,
1283 .clkdm_name = "core_l4_clkdm",
1284 .recalc = &omap2_clksel_recalc,
1285};
1286
1287static struct clk cpefuse_fck = {
1288 .name = "cpefuse_fck",
1289 .ops = &clkops_omap2_dflt,
1290 .parent = &sys_ck,
1291 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1292 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
1293 .recalc = &followparent_recalc,
1294};
1295
1296static struct clk ts_fck = {
1297 .name = "ts_fck",
1298 .ops = &clkops_omap2_dflt,
1299 .parent = &omap_32k_fck,
1300 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1301 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
1302 .recalc = &followparent_recalc,
1303};
1304
1305static struct clk usbtll_fck = {
1306 .name = "usbtll_fck",
1307 .ops = &clkops_omap2_dflt,
1308 .parent = &dpll5_m2_ck,
1309 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1310 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1311 .recalc = &followparent_recalc,
1312};
1313
1314/* CORE 96M FCLK-derived clocks */
1315
1316static struct clk core_96m_fck = {
1317 .name = "core_96m_fck",
1318 .ops = &clkops_null,
1319 .parent = &omap_96m_fck,
1320 .clkdm_name = "core_l4_clkdm",
1321 .recalc = &followparent_recalc,
1322};
1323
1324static struct clk mmchs3_fck = {
1325 .name = "mmchs_fck",
1326 .ops = &clkops_omap2_dflt_wait,
1327 .id = 2,
1328 .parent = &core_96m_fck,
1329 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1330 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1331 .clkdm_name = "core_l4_clkdm",
1332 .recalc = &followparent_recalc,
1333};
1334
1335static struct clk mmchs2_fck = {
1336 .name = "mmchs_fck",
1337 .ops = &clkops_omap2_dflt_wait,
1338 .id = 1,
1339 .parent = &core_96m_fck,
1340 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1341 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1342 .clkdm_name = "core_l4_clkdm",
1343 .recalc = &followparent_recalc,
1344};
1345
1346static struct clk mspro_fck = {
1347 .name = "mspro_fck",
1348 .ops = &clkops_omap2_dflt_wait,
1349 .parent = &core_96m_fck,
1350 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1351 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1352 .clkdm_name = "core_l4_clkdm",
1353 .recalc = &followparent_recalc,
1354};
1355
1356static struct clk mmchs1_fck = {
1357 .name = "mmchs_fck",
1358 .ops = &clkops_omap2_dflt_wait,
1359 .parent = &core_96m_fck,
1360 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1361 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1362 .clkdm_name = "core_l4_clkdm",
1363 .recalc = &followparent_recalc,
1364};
1365
1366static struct clk i2c3_fck = {
1367 .name = "i2c_fck",
1368 .ops = &clkops_omap2_dflt_wait,
1369 .id = 3,
1370 .parent = &core_96m_fck,
1371 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1372 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1373 .clkdm_name = "core_l4_clkdm",
1374 .recalc = &followparent_recalc,
1375};
1376
1377static struct clk i2c2_fck = {
1378 .name = "i2c_fck",
1379 .ops = &clkops_omap2_dflt_wait,
1380 .id = 2,
1381 .parent = &core_96m_fck,
1382 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1383 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1384 .clkdm_name = "core_l4_clkdm",
1385 .recalc = &followparent_recalc,
1386};
1387
1388static struct clk i2c1_fck = {
1389 .name = "i2c_fck",
1390 .ops = &clkops_omap2_dflt_wait,
1391 .id = 1,
1392 .parent = &core_96m_fck,
1393 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1394 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1395 .clkdm_name = "core_l4_clkdm",
1396 .recalc = &followparent_recalc,
1397};
1398
1399/*
1400 * MCBSP 1 & 5 get their 96MHz clock from core_96m_fck;
1401 * MCBSP 2, 3, 4 get their 96MHz clock from per_96m_fck.
1402 */
1403static const struct clksel_rate common_mcbsp_96m_rates[] = {
1404 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
1405 { .div = 0 }
1406};
1407
1408static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
1409 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1410 { .div = 0 }
1411};
1412
1413static const struct clksel mcbsp_15_clksel[] = {
1414 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
1415 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
1416 { .parent = NULL }
1417};
1418
1419static struct clk mcbsp5_fck = {
1420 .name = "mcbsp_fck",
1421 .ops = &clkops_omap2_dflt_wait,
1422 .id = 5,
1423 .init = &omap2_init_clksel_parent,
1424 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1425 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1426 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
1427 .clksel_mask = OMAP2_MCBSP5_CLKS_MASK,
1428 .clksel = mcbsp_15_clksel,
1429 .clkdm_name = "core_l4_clkdm",
1430 .recalc = &omap2_clksel_recalc,
1431};
1432
1433static struct clk mcbsp1_fck = {
1434 .name = "mcbsp_fck",
1435 .ops = &clkops_omap2_dflt_wait,
1436 .id = 1,
1437 .init = &omap2_init_clksel_parent,
1438 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1439 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1440 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
1441 .clksel_mask = OMAP2_MCBSP1_CLKS_MASK,
1442 .clksel = mcbsp_15_clksel,
1443 .clkdm_name = "core_l4_clkdm",
1444 .recalc = &omap2_clksel_recalc,
1445};
1446
1447/* CORE_48M_FCK-derived clocks */
1448
1449static struct clk core_48m_fck = {
1450 .name = "core_48m_fck",
1451 .ops = &clkops_null,
1452 .parent = &omap_48m_fck,
1453 .clkdm_name = "core_l4_clkdm",
1454 .recalc = &followparent_recalc,
1455};
1456
1457static struct clk mcspi4_fck = {
1458 .name = "mcspi_fck",
1459 .ops = &clkops_omap2_dflt_wait,
1460 .id = 4,
1461 .parent = &core_48m_fck,
1462 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1463 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1464 .recalc = &followparent_recalc,
1465};
1466
1467static struct clk mcspi3_fck = {
1468 .name = "mcspi_fck",
1469 .ops = &clkops_omap2_dflt_wait,
1470 .id = 3,
1471 .parent = &core_48m_fck,
1472 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1473 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1474 .recalc = &followparent_recalc,
1475};
1476
1477static struct clk mcspi2_fck = {
1478 .name = "mcspi_fck",
1479 .ops = &clkops_omap2_dflt_wait,
1480 .id = 2,
1481 .parent = &core_48m_fck,
1482 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1483 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1484 .recalc = &followparent_recalc,
1485};
1486
1487static struct clk mcspi1_fck = {
1488 .name = "mcspi_fck",
1489 .ops = &clkops_omap2_dflt_wait,
1490 .id = 1,
1491 .parent = &core_48m_fck,
1492 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1493 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1494 .recalc = &followparent_recalc,
1495};
1496
1497static struct clk uart2_fck = {
1498 .name = "uart2_fck",
1499 .ops = &clkops_omap2_dflt_wait,
1500 .parent = &core_48m_fck,
1501 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1502 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1503 .recalc = &followparent_recalc,
1504};
1505
1506static struct clk uart1_fck = {
1507 .name = "uart1_fck",
1508 .ops = &clkops_omap2_dflt_wait,
1509 .parent = &core_48m_fck,
1510 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1511 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1512 .recalc = &followparent_recalc,
1513};
1514
1515static struct clk fshostusb_fck = {
1516 .name = "fshostusb_fck",
1517 .ops = &clkops_omap2_dflt_wait,
1518 .parent = &core_48m_fck,
1519 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1520 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1521 .recalc = &followparent_recalc,
1522};
1523
1524/* CORE_12M_FCK based clocks */
1525
1526static struct clk core_12m_fck = {
1527 .name = "core_12m_fck",
1528 .ops = &clkops_null,
1529 .parent = &omap_12m_fck,
1530 .clkdm_name = "core_l4_clkdm",
1531 .recalc = &followparent_recalc,
1532};
1533
1534static struct clk hdq_fck = {
1535 .name = "hdq_fck",
1536 .ops = &clkops_omap2_dflt_wait,
1537 .parent = &core_12m_fck,
1538 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1539 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1540 .recalc = &followparent_recalc,
1541};
1542
1543/* DPLL3-derived clock */
1544
1545static const struct clksel_rate ssi_ssr_corex2_rates[] = {
1546 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
1547 { .div = 2, .val = 2, .flags = RATE_IN_343X },
1548 { .div = 3, .val = 3, .flags = RATE_IN_343X },
1549 { .div = 4, .val = 4, .flags = RATE_IN_343X },
1550 { .div = 6, .val = 6, .flags = RATE_IN_343X },
1551 { .div = 8, .val = 8, .flags = RATE_IN_343X },
1552 { .div = 0 }
1553};
1554
1555static const struct clksel ssi_ssr_clksel[] = {
1556 { .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
1557 { .parent = NULL }
1558};
1559
1560static struct clk ssi_ssr_fck_3430es1 = {
1561 .name = "ssi_ssr_fck",
1562 .ops = &clkops_omap2_dflt,
1563 .init = &omap2_init_clksel_parent,
1564 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1565 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1566 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1567 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1568 .clksel = ssi_ssr_clksel,
1569 .clkdm_name = "core_l4_clkdm",
1570 .recalc = &omap2_clksel_recalc,
1571};
1572
1573static struct clk ssi_ssr_fck_3430es2 = {
1574 .name = "ssi_ssr_fck",
1575 .ops = &clkops_omap3430es2_ssi_wait,
1576 .init = &omap2_init_clksel_parent,
1577 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1578 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1579 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1580 .clksel_mask = OMAP3430_CLKSEL_SSI_MASK,
1581 .clksel = ssi_ssr_clksel,
1582 .clkdm_name = "core_l4_clkdm",
1583 .recalc = &omap2_clksel_recalc,
1584};
1585
1586static struct clk ssi_sst_fck_3430es1 = {
1587 .name = "ssi_sst_fck",
1588 .ops = &clkops_null,
1589 .parent = &ssi_ssr_fck_3430es1,
1590 .fixed_div = 2,
1591 .recalc = &omap2_fixed_divisor_recalc,
1592};
1593
1594static struct clk ssi_sst_fck_3430es2 = {
1595 .name = "ssi_sst_fck",
1596 .ops = &clkops_null,
1597 .parent = &ssi_ssr_fck_3430es2,
1598 .fixed_div = 2,
1599 .recalc = &omap2_fixed_divisor_recalc,
1600};
1601
1602
1603
1604/* CORE_L3_ICK based clocks */
1605
1606/*
1607 * XXX must add clk_enable/clk_disable for these if standard code won't
1608 * handle it
1609 */
1610static struct clk core_l3_ick = {
1611 .name = "core_l3_ick",
1612 .ops = &clkops_null,
1613 .parent = &l3_ick,
1614 .clkdm_name = "core_l3_clkdm",
1615 .recalc = &followparent_recalc,
1616};
1617
1618static struct clk hsotgusb_ick_3430es1 = {
1619 .name = "hsotgusb_ick",
1620 .ops = &clkops_omap2_dflt,
1621 .parent = &core_l3_ick,
1622 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1623 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1624 .clkdm_name = "core_l3_clkdm",
1625 .recalc = &followparent_recalc,
1626};
1627
1628static struct clk hsotgusb_ick_3430es2 = {
1629 .name = "hsotgusb_ick",
1630 .ops = &clkops_omap3430es2_hsotgusb_wait,
1631 .parent = &core_l3_ick,
1632 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1633 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1634 .clkdm_name = "core_l3_clkdm",
1635 .recalc = &followparent_recalc,
1636};
1637
1638static struct clk sdrc_ick = {
1639 .name = "sdrc_ick",
1640 .ops = &clkops_omap2_dflt_wait,
1641 .parent = &core_l3_ick,
1642 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1643 .enable_bit = OMAP3430_EN_SDRC_SHIFT,
1644 .flags = ENABLE_ON_INIT,
1645 .clkdm_name = "core_l3_clkdm",
1646 .recalc = &followparent_recalc,
1647};
1648
1649static struct clk gpmc_fck = {
1650 .name = "gpmc_fck",
1651 .ops = &clkops_null,
1652 .parent = &core_l3_ick,
1653 .flags = ENABLE_ON_INIT, /* huh? */
1654 .clkdm_name = "core_l3_clkdm",
1655 .recalc = &followparent_recalc,
1656};
1657
1658/* SECURITY_L3_ICK based clocks */
1659
1660static struct clk security_l3_ick = {
1661 .name = "security_l3_ick",
1662 .ops = &clkops_null,
1663 .parent = &l3_ick,
1664 .recalc = &followparent_recalc,
1665};
1666
1667static struct clk pka_ick = {
1668 .name = "pka_ick",
1669 .ops = &clkops_omap2_dflt_wait,
1670 .parent = &security_l3_ick,
1671 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
1672 .enable_bit = OMAP3430_EN_PKA_SHIFT,
1673 .recalc = &followparent_recalc,
1674};
1675
1676/* CORE_L4_ICK based clocks */
1677
1678static struct clk core_l4_ick = {
1679 .name = "core_l4_ick",
1680 .ops = &clkops_null,
1681 .parent = &l4_ick,
1682 .clkdm_name = "core_l4_clkdm",
1683 .recalc = &followparent_recalc,
1684};
1685
1686static struct clk usbtll_ick = {
1687 .name = "usbtll_ick",
1688 .ops = &clkops_omap2_dflt_wait,
1689 .parent = &core_l4_ick,
1690 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1691 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1692 .clkdm_name = "core_l4_clkdm",
1693 .recalc = &followparent_recalc,
1694};
1695
1696static struct clk mmchs3_ick = {
1697 .name = "mmchs_ick",
1698 .ops = &clkops_omap2_dflt_wait,
1699 .id = 2,
1700 .parent = &core_l4_ick,
1701 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1702 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
1703 .clkdm_name = "core_l4_clkdm",
1704 .recalc = &followparent_recalc,
1705};
1706
1707/* Intersystem Communication Registers - chassis mode only */
1708static struct clk icr_ick = {
1709 .name = "icr_ick",
1710 .ops = &clkops_omap2_dflt_wait,
1711 .parent = &core_l4_ick,
1712 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1713 .enable_bit = OMAP3430_EN_ICR_SHIFT,
1714 .clkdm_name = "core_l4_clkdm",
1715 .recalc = &followparent_recalc,
1716};
1717
1718static struct clk aes2_ick = {
1719 .name = "aes2_ick",
1720 .ops = &clkops_omap2_dflt_wait,
1721 .parent = &core_l4_ick,
1722 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1723 .enable_bit = OMAP3430_EN_AES2_SHIFT,
1724 .clkdm_name = "core_l4_clkdm",
1725 .recalc = &followparent_recalc,
1726};
1727
1728static struct clk sha12_ick = {
1729 .name = "sha12_ick",
1730 .ops = &clkops_omap2_dflt_wait,
1731 .parent = &core_l4_ick,
1732 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1733 .enable_bit = OMAP3430_EN_SHA12_SHIFT,
1734 .clkdm_name = "core_l4_clkdm",
1735 .recalc = &followparent_recalc,
1736};
1737
1738static struct clk des2_ick = {
1739 .name = "des2_ick",
1740 .ops = &clkops_omap2_dflt_wait,
1741 .parent = &core_l4_ick,
1742 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1743 .enable_bit = OMAP3430_EN_DES2_SHIFT,
1744 .clkdm_name = "core_l4_clkdm",
1745 .recalc = &followparent_recalc,
1746};
1747
1748static struct clk mmchs2_ick = {
1749 .name = "mmchs_ick",
1750 .ops = &clkops_omap2_dflt_wait,
1751 .id = 1,
1752 .parent = &core_l4_ick,
1753 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1754 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
1755 .clkdm_name = "core_l4_clkdm",
1756 .recalc = &followparent_recalc,
1757};
1758
1759static struct clk mmchs1_ick = {
1760 .name = "mmchs_ick",
1761 .ops = &clkops_omap2_dflt_wait,
1762 .parent = &core_l4_ick,
1763 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1764 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
1765 .clkdm_name = "core_l4_clkdm",
1766 .recalc = &followparent_recalc,
1767};
1768
1769static struct clk mspro_ick = {
1770 .name = "mspro_ick",
1771 .ops = &clkops_omap2_dflt_wait,
1772 .parent = &core_l4_ick,
1773 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1774 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
1775 .clkdm_name = "core_l4_clkdm",
1776 .recalc = &followparent_recalc,
1777};
1778
1779static struct clk hdq_ick = {
1780 .name = "hdq_ick",
1781 .ops = &clkops_omap2_dflt_wait,
1782 .parent = &core_l4_ick,
1783 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1784 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1785 .clkdm_name = "core_l4_clkdm",
1786 .recalc = &followparent_recalc,
1787};
1788
1789static struct clk mcspi4_ick = {
1790 .name = "mcspi_ick",
1791 .ops = &clkops_omap2_dflt_wait,
1792 .id = 4,
1793 .parent = &core_l4_ick,
1794 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1795 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
1796 .clkdm_name = "core_l4_clkdm",
1797 .recalc = &followparent_recalc,
1798};
1799
1800static struct clk mcspi3_ick = {
1801 .name = "mcspi_ick",
1802 .ops = &clkops_omap2_dflt_wait,
1803 .id = 3,
1804 .parent = &core_l4_ick,
1805 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1806 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
1807 .clkdm_name = "core_l4_clkdm",
1808 .recalc = &followparent_recalc,
1809};
1810
1811static struct clk mcspi2_ick = {
1812 .name = "mcspi_ick",
1813 .ops = &clkops_omap2_dflt_wait,
1814 .id = 2,
1815 .parent = &core_l4_ick,
1816 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1817 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
1818 .clkdm_name = "core_l4_clkdm",
1819 .recalc = &followparent_recalc,
1820};
1821
1822static struct clk mcspi1_ick = {
1823 .name = "mcspi_ick",
1824 .ops = &clkops_omap2_dflt_wait,
1825 .id = 1,
1826 .parent = &core_l4_ick,
1827 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1828 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
1829 .clkdm_name = "core_l4_clkdm",
1830 .recalc = &followparent_recalc,
1831};
1832
1833static struct clk i2c3_ick = {
1834 .name = "i2c_ick",
1835 .ops = &clkops_omap2_dflt_wait,
1836 .id = 3,
1837 .parent = &core_l4_ick,
1838 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1839 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1840 .clkdm_name = "core_l4_clkdm",
1841 .recalc = &followparent_recalc,
1842};
1843
1844static struct clk i2c2_ick = {
1845 .name = "i2c_ick",
1846 .ops = &clkops_omap2_dflt_wait,
1847 .id = 2,
1848 .parent = &core_l4_ick,
1849 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1850 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1851 .clkdm_name = "core_l4_clkdm",
1852 .recalc = &followparent_recalc,
1853};
1854
1855static struct clk i2c1_ick = {
1856 .name = "i2c_ick",
1857 .ops = &clkops_omap2_dflt_wait,
1858 .id = 1,
1859 .parent = &core_l4_ick,
1860 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1861 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1862 .clkdm_name = "core_l4_clkdm",
1863 .recalc = &followparent_recalc,
1864};
1865
1866static struct clk uart2_ick = {
1867 .name = "uart2_ick",
1868 .ops = &clkops_omap2_dflt_wait,
1869 .parent = &core_l4_ick,
1870 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1871 .enable_bit = OMAP3430_EN_UART2_SHIFT,
1872 .clkdm_name = "core_l4_clkdm",
1873 .recalc = &followparent_recalc,
1874};
1875
1876static struct clk uart1_ick = {
1877 .name = "uart1_ick",
1878 .ops = &clkops_omap2_dflt_wait,
1879 .parent = &core_l4_ick,
1880 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1881 .enable_bit = OMAP3430_EN_UART1_SHIFT,
1882 .clkdm_name = "core_l4_clkdm",
1883 .recalc = &followparent_recalc,
1884};
1885
1886static struct clk gpt11_ick = {
1887 .name = "gpt11_ick",
1888 .ops = &clkops_omap2_dflt_wait,
1889 .parent = &core_l4_ick,
1890 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1891 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1892 .clkdm_name = "core_l4_clkdm",
1893 .recalc = &followparent_recalc,
1894};
1895
1896static struct clk gpt10_ick = {
1897 .name = "gpt10_ick",
1898 .ops = &clkops_omap2_dflt_wait,
1899 .parent = &core_l4_ick,
1900 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1901 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1902 .clkdm_name = "core_l4_clkdm",
1903 .recalc = &followparent_recalc,
1904};
1905
1906static struct clk mcbsp5_ick = {
1907 .name = "mcbsp_ick",
1908 .ops = &clkops_omap2_dflt_wait,
1909 .id = 5,
1910 .parent = &core_l4_ick,
1911 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1912 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
1913 .clkdm_name = "core_l4_clkdm",
1914 .recalc = &followparent_recalc,
1915};
1916
1917static struct clk mcbsp1_ick = {
1918 .name = "mcbsp_ick",
1919 .ops = &clkops_omap2_dflt_wait,
1920 .id = 1,
1921 .parent = &core_l4_ick,
1922 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1923 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
1924 .clkdm_name = "core_l4_clkdm",
1925 .recalc = &followparent_recalc,
1926};
1927
1928static struct clk fac_ick = {
1929 .name = "fac_ick",
1930 .ops = &clkops_omap2_dflt_wait,
1931 .parent = &core_l4_ick,
1932 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1933 .enable_bit = OMAP3430ES1_EN_FAC_SHIFT,
1934 .clkdm_name = "core_l4_clkdm",
1935 .recalc = &followparent_recalc,
1936};
1937
1938static struct clk mailboxes_ick = {
1939 .name = "mailboxes_ick",
1940 .ops = &clkops_omap2_dflt_wait,
1941 .parent = &core_l4_ick,
1942 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1943 .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1944 .clkdm_name = "core_l4_clkdm",
1945 .recalc = &followparent_recalc,
1946};
1947
1948static struct clk omapctrl_ick = {
1949 .name = "omapctrl_ick",
1950 .ops = &clkops_omap2_dflt_wait,
1951 .parent = &core_l4_ick,
1952 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1953 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
1954 .flags = ENABLE_ON_INIT,
1955 .recalc = &followparent_recalc,
1956};
1957
1958/* SSI_L4_ICK based clocks */
1959
1960static struct clk ssi_l4_ick = {
1961 .name = "ssi_l4_ick",
1962 .ops = &clkops_null,
1963 .parent = &l4_ick,
1964 .clkdm_name = "core_l4_clkdm",
1965 .recalc = &followparent_recalc,
1966};
1967
1968static struct clk ssi_ick_3430es1 = {
1969 .name = "ssi_ick",
1970 .ops = &clkops_omap2_dflt,
1971 .parent = &ssi_l4_ick,
1972 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1973 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1974 .clkdm_name = "core_l4_clkdm",
1975 .recalc = &followparent_recalc,
1976};
1977
1978static struct clk ssi_ick_3430es2 = {
1979 .name = "ssi_ick",
1980 .ops = &clkops_omap3430es2_ssi_wait,
1981 .parent = &ssi_l4_ick,
1982 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1983 .enable_bit = OMAP3430_EN_SSI_SHIFT,
1984 .clkdm_name = "core_l4_clkdm",
1985 .recalc = &followparent_recalc,
1986};
1987
1988/* REVISIT: Technically the TRM claims that this is CORE_CLK based,
1989 * but l4_ick makes more sense to me */
1990
1991static const struct clksel usb_l4_clksel[] = {
1992 { .parent = &l4_ick, .rates = div2_rates },
1993 { .parent = NULL },
1994};
1995
1996static struct clk usb_l4_ick = {
1997 .name = "usb_l4_ick",
1998 .ops = &clkops_omap2_dflt_wait,
1999 .parent = &l4_ick,
2000 .init = &omap2_init_clksel_parent,
2001 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2002 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
2003 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2004 .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
2005 .clksel = usb_l4_clksel,
2006 .recalc = &omap2_clksel_recalc,
2007};
2008
2009/* SECURITY_L4_ICK2 based clocks */
2010
2011static struct clk security_l4_ick2 = {
2012 .name = "security_l4_ick2",
2013 .ops = &clkops_null,
2014 .parent = &l4_ick,
2015 .recalc = &followparent_recalc,
2016};
2017
2018static struct clk aes1_ick = {
2019 .name = "aes1_ick",
2020 .ops = &clkops_omap2_dflt_wait,
2021 .parent = &security_l4_ick2,
2022 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2023 .enable_bit = OMAP3430_EN_AES1_SHIFT,
2024 .recalc = &followparent_recalc,
2025};
2026
2027static struct clk rng_ick = {
2028 .name = "rng_ick",
2029 .ops = &clkops_omap2_dflt_wait,
2030 .parent = &security_l4_ick2,
2031 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2032 .enable_bit = OMAP3430_EN_RNG_SHIFT,
2033 .recalc = &followparent_recalc,
2034};
2035
2036static struct clk sha11_ick = {
2037 .name = "sha11_ick",
2038 .ops = &clkops_omap2_dflt_wait,
2039 .parent = &security_l4_ick2,
2040 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2041 .enable_bit = OMAP3430_EN_SHA11_SHIFT,
2042 .recalc = &followparent_recalc,
2043};
2044
2045static struct clk des1_ick = {
2046 .name = "des1_ick",
2047 .ops = &clkops_omap2_dflt_wait,
2048 .parent = &security_l4_ick2,
2049 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2050 .enable_bit = OMAP3430_EN_DES1_SHIFT,
2051 .recalc = &followparent_recalc,
2052};
2053
2054/* DSS */
2055static struct clk dss1_alwon_fck_3430es1 = {
2056 .name = "dss1_alwon_fck",
2057 .ops = &clkops_omap2_dflt,
2058 .parent = &dpll4_m4x2_ck,
2059 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2060 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
2061 .clkdm_name = "dss_clkdm",
2062 .recalc = &followparent_recalc,
2063};
2064
2065static struct clk dss1_alwon_fck_3430es2 = {
2066 .name = "dss1_alwon_fck",
2067 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2068 .parent = &dpll4_m4x2_ck,
2069 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2070 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
2071 .clkdm_name = "dss_clkdm",
2072 .recalc = &followparent_recalc,
2073};
2074
2075static struct clk dss_tv_fck = {
2076 .name = "dss_tv_fck",
2077 .ops = &clkops_omap2_dflt,
2078 .parent = &omap_54m_fck,
2079 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2080 .enable_bit = OMAP3430_EN_TV_SHIFT,
2081 .clkdm_name = "dss_clkdm",
2082 .recalc = &followparent_recalc,
2083};
2084
2085static struct clk dss_96m_fck = {
2086 .name = "dss_96m_fck",
2087 .ops = &clkops_omap2_dflt,
2088 .parent = &omap_96m_fck,
2089 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2090 .enable_bit = OMAP3430_EN_TV_SHIFT,
2091 .clkdm_name = "dss_clkdm",
2092 .recalc = &followparent_recalc,
2093};
2094
2095static struct clk dss2_alwon_fck = {
2096 .name = "dss2_alwon_fck",
2097 .ops = &clkops_omap2_dflt,
2098 .parent = &sys_ck,
2099 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
2100 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
2101 .clkdm_name = "dss_clkdm",
2102 .recalc = &followparent_recalc,
2103};
2104
2105static struct clk dss_ick_3430es1 = {
2106 /* Handles both L3 and L4 clocks */
2107 .name = "dss_ick",
2108 .ops = &clkops_omap2_dflt,
2109 .parent = &l4_ick,
2110 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2111 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2112 .clkdm_name = "dss_clkdm",
2113 .recalc = &followparent_recalc,
2114};
2115
2116static struct clk dss_ick_3430es2 = {
2117 /* Handles both L3 and L4 clocks */
2118 .name = "dss_ick",
2119 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2120 .parent = &l4_ick,
2121 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
2122 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
2123 .clkdm_name = "dss_clkdm",
2124 .recalc = &followparent_recalc,
2125};
2126
2127/* CAM */
2128
2129static struct clk cam_mclk = {
2130 .name = "cam_mclk",
2131 .ops = &clkops_omap2_dflt,
2132 .parent = &dpll4_m5x2_ck,
2133 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
2134 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2135 .clkdm_name = "cam_clkdm",
2136 .recalc = &followparent_recalc,
2137};
2138
2139static struct clk cam_ick = {
2140 /* Handles both L3 and L4 clocks */
2141 .name = "cam_ick",
2142 .ops = &clkops_omap2_dflt,
2143 .parent = &l4_ick,
2144 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN),
2145 .enable_bit = OMAP3430_EN_CAM_SHIFT,
2146 .clkdm_name = "cam_clkdm",
2147 .recalc = &followparent_recalc,
2148};
2149
2150static struct clk csi2_96m_fck = {
2151 .name = "csi2_96m_fck",
2152 .ops = &clkops_omap2_dflt,
2153 .parent = &core_96m_fck,
2154 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
2155 .enable_bit = OMAP3430_EN_CSI2_SHIFT,
2156 .clkdm_name = "cam_clkdm",
2157 .recalc = &followparent_recalc,
2158};
2159
2160/* USBHOST - 3430ES2 only */
2161
2162static struct clk usbhost_120m_fck = {
2163 .name = "usbhost_120m_fck",
2164 .ops = &clkops_omap2_dflt,
2165 .parent = &dpll5_m2_ck,
2166 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2167 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2168 .clkdm_name = "usbhost_clkdm",
2169 .recalc = &followparent_recalc,
2170};
2171
2172static struct clk usbhost_48m_fck = {
2173 .name = "usbhost_48m_fck",
2174 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2175 .parent = &omap_48m_fck,
2176 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2177 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
2178 .clkdm_name = "usbhost_clkdm",
2179 .recalc = &followparent_recalc,
2180};
2181
2182static struct clk usbhost_ick = {
2183 /* Handles both L3 and L4 clocks */
2184 .name = "usbhost_ick",
2185 .ops = &clkops_omap3430es2_dss_usbhost_wait,
2186 .parent = &l4_ick,
2187 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
2188 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
2189 .clkdm_name = "usbhost_clkdm",
2190 .recalc = &followparent_recalc,
2191};
2192
2193/* WKUP */
2194
2195static const struct clksel_rate usim_96m_rates[] = {
2196 { .div = 2, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2197 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2198 { .div = 8, .val = 5, .flags = RATE_IN_343X },
2199 { .div = 10, .val = 6, .flags = RATE_IN_343X },
2200 { .div = 0 },
2201};
2202
2203static const struct clksel_rate usim_120m_rates[] = {
2204 { .div = 4, .val = 7, .flags = RATE_IN_343X | DEFAULT_RATE },
2205 { .div = 8, .val = 8, .flags = RATE_IN_343X },
2206 { .div = 16, .val = 9, .flags = RATE_IN_343X },
2207 { .div = 20, .val = 10, .flags = RATE_IN_343X },
2208 { .div = 0 },
2209};
2210
2211static const struct clksel usim_clksel[] = {
2212 { .parent = &omap_96m_fck, .rates = usim_96m_rates },
2213 { .parent = &dpll5_m2_ck, .rates = usim_120m_rates },
2214 { .parent = &sys_ck, .rates = div2_rates },
2215 { .parent = NULL },
2216};
2217
2218/* 3430ES2 only */
2219static struct clk usim_fck = {
2220 .name = "usim_fck",
2221 .ops = &clkops_omap2_dflt_wait,
2222 .init = &omap2_init_clksel_parent,
2223 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2224 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2225 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2226 .clksel_mask = OMAP3430ES2_CLKSEL_USIMOCP_MASK,
2227 .clksel = usim_clksel,
2228 .recalc = &omap2_clksel_recalc,
2229};
2230
2231/* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
2232static struct clk gpt1_fck = {
2233 .name = "gpt1_fck",
2234 .ops = &clkops_omap2_dflt_wait,
2235 .init = &omap2_init_clksel_parent,
2236 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2237 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2238 .clksel_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2239 .clksel_mask = OMAP3430_CLKSEL_GPT1_MASK,
2240 .clksel = omap343x_gpt_clksel,
2241 .clkdm_name = "wkup_clkdm",
2242 .recalc = &omap2_clksel_recalc,
2243};
2244
2245static struct clk wkup_32k_fck = {
2246 .name = "wkup_32k_fck",
2247 .ops = &clkops_null,
2248 .parent = &omap_32k_fck,
2249 .clkdm_name = "wkup_clkdm",
2250 .recalc = &followparent_recalc,
2251};
2252
2253static struct clk gpio1_dbck = {
2254 .name = "gpio1_dbck",
2255 .ops = &clkops_omap2_dflt,
2256 .parent = &wkup_32k_fck,
2257 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2258 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2259 .clkdm_name = "wkup_clkdm",
2260 .recalc = &followparent_recalc,
2261};
2262
2263static struct clk wdt2_fck = {
2264 .name = "wdt2_fck",
2265 .ops = &clkops_omap2_dflt_wait,
2266 .parent = &wkup_32k_fck,
2267 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2268 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2269 .clkdm_name = "wkup_clkdm",
2270 .recalc = &followparent_recalc,
2271};
2272
2273static struct clk wkup_l4_ick = {
2274 .name = "wkup_l4_ick",
2275 .ops = &clkops_null,
2276 .parent = &sys_ck,
2277 .clkdm_name = "wkup_clkdm",
2278 .recalc = &followparent_recalc,
2279};
2280
2281/* 3430ES2 only */
2282/* Never specifically named in the TRM, so we have to infer a likely name */
2283static struct clk usim_ick = {
2284 .name = "usim_ick",
2285 .ops = &clkops_omap2_dflt_wait,
2286 .parent = &wkup_l4_ick,
2287 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2288 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
2289 .clkdm_name = "wkup_clkdm",
2290 .recalc = &followparent_recalc,
2291};
2292
2293static struct clk wdt2_ick = {
2294 .name = "wdt2_ick",
2295 .ops = &clkops_omap2_dflt_wait,
2296 .parent = &wkup_l4_ick,
2297 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2298 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
2299 .clkdm_name = "wkup_clkdm",
2300 .recalc = &followparent_recalc,
2301};
2302
2303static struct clk wdt1_ick = {
2304 .name = "wdt1_ick",
2305 .ops = &clkops_omap2_dflt_wait,
2306 .parent = &wkup_l4_ick,
2307 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2308 .enable_bit = OMAP3430_EN_WDT1_SHIFT,
2309 .clkdm_name = "wkup_clkdm",
2310 .recalc = &followparent_recalc,
2311};
2312
2313static struct clk gpio1_ick = {
2314 .name = "gpio1_ick",
2315 .ops = &clkops_omap2_dflt_wait,
2316 .parent = &wkup_l4_ick,
2317 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2318 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
2319 .clkdm_name = "wkup_clkdm",
2320 .recalc = &followparent_recalc,
2321};
2322
2323static struct clk omap_32ksync_ick = {
2324 .name = "omap_32ksync_ick",
2325 .ops = &clkops_omap2_dflt_wait,
2326 .parent = &wkup_l4_ick,
2327 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2328 .enable_bit = OMAP3430_EN_32KSYNC_SHIFT,
2329 .clkdm_name = "wkup_clkdm",
2330 .recalc = &followparent_recalc,
2331};
2332
2333/* XXX This clock no longer exists in 3430 TRM rev F */
2334static struct clk gpt12_ick = {
2335 .name = "gpt12_ick",
2336 .ops = &clkops_omap2_dflt_wait,
2337 .parent = &wkup_l4_ick,
2338 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2339 .enable_bit = OMAP3430_EN_GPT12_SHIFT,
2340 .clkdm_name = "wkup_clkdm",
2341 .recalc = &followparent_recalc,
2342};
2343
2344static struct clk gpt1_ick = {
2345 .name = "gpt1_ick",
2346 .ops = &clkops_omap2_dflt_wait,
2347 .parent = &wkup_l4_ick,
2348 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2349 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
2350 .clkdm_name = "wkup_clkdm",
2351 .recalc = &followparent_recalc,
2352};
2353
2354
2355
2356/* PER clock domain */
2357
2358static struct clk per_96m_fck = {
2359 .name = "per_96m_fck",
2360 .ops = &clkops_null,
2361 .parent = &omap_96m_alwon_fck,
2362 .clkdm_name = "per_clkdm",
2363 .recalc = &followparent_recalc,
2364};
2365
2366static struct clk per_48m_fck = {
2367 .name = "per_48m_fck",
2368 .ops = &clkops_null,
2369 .parent = &omap_48m_fck,
2370 .clkdm_name = "per_clkdm",
2371 .recalc = &followparent_recalc,
2372};
2373
2374static struct clk uart3_fck = {
2375 .name = "uart3_fck",
2376 .ops = &clkops_omap2_dflt_wait,
2377 .parent = &per_48m_fck,
2378 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2379 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2380 .clkdm_name = "per_clkdm",
2381 .recalc = &followparent_recalc,
2382};
2383
2384static struct clk gpt2_fck = {
2385 .name = "gpt2_fck",
2386 .ops = &clkops_omap2_dflt_wait,
2387 .init = &omap2_init_clksel_parent,
2388 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2389 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2390 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2391 .clksel_mask = OMAP3430_CLKSEL_GPT2_MASK,
2392 .clksel = omap343x_gpt_clksel,
2393 .clkdm_name = "per_clkdm",
2394 .recalc = &omap2_clksel_recalc,
2395};
2396
2397static struct clk gpt3_fck = {
2398 .name = "gpt3_fck",
2399 .ops = &clkops_omap2_dflt_wait,
2400 .init = &omap2_init_clksel_parent,
2401 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2402 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2403 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2404 .clksel_mask = OMAP3430_CLKSEL_GPT3_MASK,
2405 .clksel = omap343x_gpt_clksel,
2406 .clkdm_name = "per_clkdm",
2407 .recalc = &omap2_clksel_recalc,
2408};
2409
2410static struct clk gpt4_fck = {
2411 .name = "gpt4_fck",
2412 .ops = &clkops_omap2_dflt_wait,
2413 .init = &omap2_init_clksel_parent,
2414 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2415 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2416 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2417 .clksel_mask = OMAP3430_CLKSEL_GPT4_MASK,
2418 .clksel = omap343x_gpt_clksel,
2419 .clkdm_name = "per_clkdm",
2420 .recalc = &omap2_clksel_recalc,
2421};
2422
2423static struct clk gpt5_fck = {
2424 .name = "gpt5_fck",
2425 .ops = &clkops_omap2_dflt_wait,
2426 .init = &omap2_init_clksel_parent,
2427 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2428 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2429 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2430 .clksel_mask = OMAP3430_CLKSEL_GPT5_MASK,
2431 .clksel = omap343x_gpt_clksel,
2432 .clkdm_name = "per_clkdm",
2433 .recalc = &omap2_clksel_recalc,
2434};
2435
2436static struct clk gpt6_fck = {
2437 .name = "gpt6_fck",
2438 .ops = &clkops_omap2_dflt_wait,
2439 .init = &omap2_init_clksel_parent,
2440 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2441 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2442 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2443 .clksel_mask = OMAP3430_CLKSEL_GPT6_MASK,
2444 .clksel = omap343x_gpt_clksel,
2445 .clkdm_name = "per_clkdm",
2446 .recalc = &omap2_clksel_recalc,
2447};
2448
2449static struct clk gpt7_fck = {
2450 .name = "gpt7_fck",
2451 .ops = &clkops_omap2_dflt_wait,
2452 .init = &omap2_init_clksel_parent,
2453 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2454 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2455 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2456 .clksel_mask = OMAP3430_CLKSEL_GPT7_MASK,
2457 .clksel = omap343x_gpt_clksel,
2458 .clkdm_name = "per_clkdm",
2459 .recalc = &omap2_clksel_recalc,
2460};
2461
2462static struct clk gpt8_fck = {
2463 .name = "gpt8_fck",
2464 .ops = &clkops_omap2_dflt_wait,
2465 .init = &omap2_init_clksel_parent,
2466 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2467 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2468 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2469 .clksel_mask = OMAP3430_CLKSEL_GPT8_MASK,
2470 .clksel = omap343x_gpt_clksel,
2471 .clkdm_name = "per_clkdm",
2472 .recalc = &omap2_clksel_recalc,
2473};
2474
2475static struct clk gpt9_fck = {
2476 .name = "gpt9_fck",
2477 .ops = &clkops_omap2_dflt_wait,
2478 .init = &omap2_init_clksel_parent,
2479 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2480 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2481 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
2482 .clksel_mask = OMAP3430_CLKSEL_GPT9_MASK,
2483 .clksel = omap343x_gpt_clksel,
2484 .clkdm_name = "per_clkdm",
2485 .recalc = &omap2_clksel_recalc,
2486};
2487
2488static struct clk per_32k_alwon_fck = {
2489 .name = "per_32k_alwon_fck",
2490 .ops = &clkops_null,
2491 .parent = &omap_32k_fck,
2492 .clkdm_name = "per_clkdm",
2493 .recalc = &followparent_recalc,
2494};
2495
2496static struct clk gpio6_dbck = {
2497 .name = "gpio6_dbck",
2498 .ops = &clkops_omap2_dflt,
2499 .parent = &per_32k_alwon_fck,
2500 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2501 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
2502 .clkdm_name = "per_clkdm",
2503 .recalc = &followparent_recalc,
2504};
2505
2506static struct clk gpio5_dbck = {
2507 .name = "gpio5_dbck",
2508 .ops = &clkops_omap2_dflt,
2509 .parent = &per_32k_alwon_fck,
2510 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2511 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
2512 .clkdm_name = "per_clkdm",
2513 .recalc = &followparent_recalc,
2514};
2515
2516static struct clk gpio4_dbck = {
2517 .name = "gpio4_dbck",
2518 .ops = &clkops_omap2_dflt,
2519 .parent = &per_32k_alwon_fck,
2520 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2521 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
2522 .clkdm_name = "per_clkdm",
2523 .recalc = &followparent_recalc,
2524};
2525
2526static struct clk gpio3_dbck = {
2527 .name = "gpio3_dbck",
2528 .ops = &clkops_omap2_dflt,
2529 .parent = &per_32k_alwon_fck,
2530 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2531 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
2532 .clkdm_name = "per_clkdm",
2533 .recalc = &followparent_recalc,
2534};
2535
2536static struct clk gpio2_dbck = {
2537 .name = "gpio2_dbck",
2538 .ops = &clkops_omap2_dflt,
2539 .parent = &per_32k_alwon_fck,
2540 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2541 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
2542 .clkdm_name = "per_clkdm",
2543 .recalc = &followparent_recalc,
2544};
2545
2546static struct clk wdt3_fck = {
2547 .name = "wdt3_fck",
2548 .ops = &clkops_omap2_dflt_wait,
2549 .parent = &per_32k_alwon_fck,
2550 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2551 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2552 .clkdm_name = "per_clkdm",
2553 .recalc = &followparent_recalc,
2554};
2555
2556static struct clk per_l4_ick = {
2557 .name = "per_l4_ick",
2558 .ops = &clkops_null,
2559 .parent = &l4_ick,
2560 .clkdm_name = "per_clkdm",
2561 .recalc = &followparent_recalc,
2562};
2563
2564static struct clk gpio6_ick = {
2565 .name = "gpio6_ick",
2566 .ops = &clkops_omap2_dflt_wait,
2567 .parent = &per_l4_ick,
2568 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2569 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
2570 .clkdm_name = "per_clkdm",
2571 .recalc = &followparent_recalc,
2572};
2573
2574static struct clk gpio5_ick = {
2575 .name = "gpio5_ick",
2576 .ops = &clkops_omap2_dflt_wait,
2577 .parent = &per_l4_ick,
2578 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2579 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
2580 .clkdm_name = "per_clkdm",
2581 .recalc = &followparent_recalc,
2582};
2583
2584static struct clk gpio4_ick = {
2585 .name = "gpio4_ick",
2586 .ops = &clkops_omap2_dflt_wait,
2587 .parent = &per_l4_ick,
2588 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2589 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
2590 .clkdm_name = "per_clkdm",
2591 .recalc = &followparent_recalc,
2592};
2593
2594static struct clk gpio3_ick = {
2595 .name = "gpio3_ick",
2596 .ops = &clkops_omap2_dflt_wait,
2597 .parent = &per_l4_ick,
2598 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2599 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
2600 .clkdm_name = "per_clkdm",
2601 .recalc = &followparent_recalc,
2602};
2603
2604static struct clk gpio2_ick = {
2605 .name = "gpio2_ick",
2606 .ops = &clkops_omap2_dflt_wait,
2607 .parent = &per_l4_ick,
2608 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2609 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
2610 .clkdm_name = "per_clkdm",
2611 .recalc = &followparent_recalc,
2612};
2613
2614static struct clk wdt3_ick = {
2615 .name = "wdt3_ick",
2616 .ops = &clkops_omap2_dflt_wait,
2617 .parent = &per_l4_ick,
2618 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2619 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
2620 .clkdm_name = "per_clkdm",
2621 .recalc = &followparent_recalc,
2622};
2623
2624static struct clk uart3_ick = {
2625 .name = "uart3_ick",
2626 .ops = &clkops_omap2_dflt_wait,
2627 .parent = &per_l4_ick,
2628 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2629 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2630 .clkdm_name = "per_clkdm",
2631 .recalc = &followparent_recalc,
2632};
2633
2634static struct clk gpt9_ick = {
2635 .name = "gpt9_ick",
2636 .ops = &clkops_omap2_dflt_wait,
2637 .parent = &per_l4_ick,
2638 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2639 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
2640 .clkdm_name = "per_clkdm",
2641 .recalc = &followparent_recalc,
2642};
2643
2644static struct clk gpt8_ick = {
2645 .name = "gpt8_ick",
2646 .ops = &clkops_omap2_dflt_wait,
2647 .parent = &per_l4_ick,
2648 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2649 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
2650 .clkdm_name = "per_clkdm",
2651 .recalc = &followparent_recalc,
2652};
2653
2654static struct clk gpt7_ick = {
2655 .name = "gpt7_ick",
2656 .ops = &clkops_omap2_dflt_wait,
2657 .parent = &per_l4_ick,
2658 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2659 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
2660 .clkdm_name = "per_clkdm",
2661 .recalc = &followparent_recalc,
2662};
2663
2664static struct clk gpt6_ick = {
2665 .name = "gpt6_ick",
2666 .ops = &clkops_omap2_dflt_wait,
2667 .parent = &per_l4_ick,
2668 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2669 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
2670 .clkdm_name = "per_clkdm",
2671 .recalc = &followparent_recalc,
2672};
2673
2674static struct clk gpt5_ick = {
2675 .name = "gpt5_ick",
2676 .ops = &clkops_omap2_dflt_wait,
2677 .parent = &per_l4_ick,
2678 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2679 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
2680 .clkdm_name = "per_clkdm",
2681 .recalc = &followparent_recalc,
2682};
2683
2684static struct clk gpt4_ick = {
2685 .name = "gpt4_ick",
2686 .ops = &clkops_omap2_dflt_wait,
2687 .parent = &per_l4_ick,
2688 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2689 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
2690 .clkdm_name = "per_clkdm",
2691 .recalc = &followparent_recalc,
2692};
2693
2694static struct clk gpt3_ick = {
2695 .name = "gpt3_ick",
2696 .ops = &clkops_omap2_dflt_wait,
2697 .parent = &per_l4_ick,
2698 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2699 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
2700 .clkdm_name = "per_clkdm",
2701 .recalc = &followparent_recalc,
2702};
2703
2704static struct clk gpt2_ick = {
2705 .name = "gpt2_ick",
2706 .ops = &clkops_omap2_dflt_wait,
2707 .parent = &per_l4_ick,
2708 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2709 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
2710 .clkdm_name = "per_clkdm",
2711 .recalc = &followparent_recalc,
2712};
2713
2714static struct clk mcbsp2_ick = {
2715 .name = "mcbsp_ick",
2716 .ops = &clkops_omap2_dflt_wait,
2717 .id = 2,
2718 .parent = &per_l4_ick,
2719 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2720 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2721 .clkdm_name = "per_clkdm",
2722 .recalc = &followparent_recalc,
2723};
2724
2725static struct clk mcbsp3_ick = {
2726 .name = "mcbsp_ick",
2727 .ops = &clkops_omap2_dflt_wait,
2728 .id = 3,
2729 .parent = &per_l4_ick,
2730 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2731 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2732 .clkdm_name = "per_clkdm",
2733 .recalc = &followparent_recalc,
2734};
2735
2736static struct clk mcbsp4_ick = {
2737 .name = "mcbsp_ick",
2738 .ops = &clkops_omap2_dflt_wait,
2739 .id = 4,
2740 .parent = &per_l4_ick,
2741 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2742 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2743 .clkdm_name = "per_clkdm",
2744 .recalc = &followparent_recalc,
2745};
2746
2747static const struct clksel mcbsp_234_clksel[] = {
2748 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
2749 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2750 { .parent = NULL }
2751};
2752
2753static struct clk mcbsp2_fck = {
2754 .name = "mcbsp_fck",
2755 .ops = &clkops_omap2_dflt_wait,
2756 .id = 2,
2757 .init = &omap2_init_clksel_parent,
2758 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2759 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2760 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2761 .clksel_mask = OMAP2_MCBSP2_CLKS_MASK,
2762 .clksel = mcbsp_234_clksel,
2763 .clkdm_name = "per_clkdm",
2764 .recalc = &omap2_clksel_recalc,
2765};
2766
2767static struct clk mcbsp3_fck = {
2768 .name = "mcbsp_fck",
2769 .ops = &clkops_omap2_dflt_wait,
2770 .id = 3,
2771 .init = &omap2_init_clksel_parent,
2772 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2773 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2774 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2775 .clksel_mask = OMAP2_MCBSP3_CLKS_MASK,
2776 .clksel = mcbsp_234_clksel,
2777 .clkdm_name = "per_clkdm",
2778 .recalc = &omap2_clksel_recalc,
2779};
2780
2781static struct clk mcbsp4_fck = {
2782 .name = "mcbsp_fck",
2783 .ops = &clkops_omap2_dflt_wait,
2784 .id = 4,
2785 .init = &omap2_init_clksel_parent,
2786 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2787 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2788 .clksel_reg = OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2789 .clksel_mask = OMAP2_MCBSP4_CLKS_MASK,
2790 .clksel = mcbsp_234_clksel,
2791 .clkdm_name = "per_clkdm",
2792 .recalc = &omap2_clksel_recalc,
2793};
2794
2795/* EMU clocks */
2796
2797/* More information: ARM Cortex-A8 Technical Reference Manual, sect 10.1 */
2798
2799static const struct clksel_rate emu_src_sys_rates[] = {
2800 { .div = 1, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE },
2801 { .div = 0 },
2802};
2803
2804static const struct clksel_rate emu_src_core_rates[] = {
2805 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2806 { .div = 0 },
2807};
2808
2809static const struct clksel_rate emu_src_per_rates[] = {
2810 { .div = 1, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2811 { .div = 0 },
2812};
2813
2814static const struct clksel_rate emu_src_mpu_rates[] = {
2815 { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE },
2816 { .div = 0 },
2817};
2818
2819static const struct clksel emu_src_clksel[] = {
2820 { .parent = &sys_ck, .rates = emu_src_sys_rates },
2821 { .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
2822 { .parent = &emu_per_alwon_ck, .rates = emu_src_per_rates },
2823 { .parent = &emu_mpu_alwon_ck, .rates = emu_src_mpu_rates },
2824 { .parent = NULL },
2825};
2826
2827/*
2828 * Like the clkout_src clocks, emu_src_clk is a virtual clock, existing only
2829 * to switch the source of some of the EMU clocks.
2830 * XXX Are there CLKEN bits for these EMU clks?
2831 */
2832static struct clk emu_src_ck = {
2833 .name = "emu_src_ck",
2834 .ops = &clkops_null,
2835 .init = &omap2_init_clksel_parent,
2836 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2837 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
2838 .clksel = emu_src_clksel,
2839 .clkdm_name = "emu_clkdm",
2840 .recalc = &omap2_clksel_recalc,
2841};
2842
2843static const struct clksel_rate pclk_emu_rates[] = {
2844 { .div = 2, .val = 2, .flags = RATE_IN_343X | DEFAULT_RATE },
2845 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2846 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2847 { .div = 6, .val = 6, .flags = RATE_IN_343X },
2848 { .div = 0 },
2849};
2850
2851static const struct clksel pclk_emu_clksel[] = {
2852 { .parent = &emu_src_ck, .rates = pclk_emu_rates },
2853 { .parent = NULL },
2854};
2855
2856static struct clk pclk_fck = {
2857 .name = "pclk_fck",
2858 .ops = &clkops_null,
2859 .init = &omap2_init_clksel_parent,
2860 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2861 .clksel_mask = OMAP3430_CLKSEL_PCLK_MASK,
2862 .clksel = pclk_emu_clksel,
2863 .clkdm_name = "emu_clkdm",
2864 .recalc = &omap2_clksel_recalc,
2865};
2866
2867static const struct clksel_rate pclkx2_emu_rates[] = {
2868 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2869 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2870 { .div = 3, .val = 3, .flags = RATE_IN_343X },
2871 { .div = 0 },
2872};
2873
2874static const struct clksel pclkx2_emu_clksel[] = {
2875 { .parent = &emu_src_ck, .rates = pclkx2_emu_rates },
2876 { .parent = NULL },
2877};
2878
2879static struct clk pclkx2_fck = {
2880 .name = "pclkx2_fck",
2881 .ops = &clkops_null,
2882 .init = &omap2_init_clksel_parent,
2883 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2884 .clksel_mask = OMAP3430_CLKSEL_PCLKX2_MASK,
2885 .clksel = pclkx2_emu_clksel,
2886 .clkdm_name = "emu_clkdm",
2887 .recalc = &omap2_clksel_recalc,
2888};
2889
2890static const struct clksel atclk_emu_clksel[] = {
2891 { .parent = &emu_src_ck, .rates = div2_rates },
2892 { .parent = NULL },
2893};
2894
2895static struct clk atclk_fck = {
2896 .name = "atclk_fck",
2897 .ops = &clkops_null,
2898 .init = &omap2_init_clksel_parent,
2899 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2900 .clksel_mask = OMAP3430_CLKSEL_ATCLK_MASK,
2901 .clksel = atclk_emu_clksel,
2902 .clkdm_name = "emu_clkdm",
2903 .recalc = &omap2_clksel_recalc,
2904};
2905
2906static struct clk traceclk_src_fck = {
2907 .name = "traceclk_src_fck",
2908 .ops = &clkops_null,
2909 .init = &omap2_init_clksel_parent,
2910 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2911 .clksel_mask = OMAP3430_TRACE_MUX_CTRL_MASK,
2912 .clksel = emu_src_clksel,
2913 .clkdm_name = "emu_clkdm",
2914 .recalc = &omap2_clksel_recalc,
2915};
2916
2917static const struct clksel_rate traceclk_rates[] = {
2918 { .div = 1, .val = 1, .flags = RATE_IN_343X | DEFAULT_RATE },
2919 { .div = 2, .val = 2, .flags = RATE_IN_343X },
2920 { .div = 4, .val = 4, .flags = RATE_IN_343X },
2921 { .div = 0 },
2922};
2923
2924static const struct clksel traceclk_clksel[] = {
2925 { .parent = &traceclk_src_fck, .rates = traceclk_rates },
2926 { .parent = NULL },
2927};
2928
2929static struct clk traceclk_fck = {
2930 .name = "traceclk_fck",
2931 .ops = &clkops_null,
2932 .init = &omap2_init_clksel_parent,
2933 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2934 .clksel_mask = OMAP3430_CLKSEL_TRACECLK_MASK,
2935 .clksel = traceclk_clksel,
2936 .clkdm_name = "emu_clkdm",
2937 .recalc = &omap2_clksel_recalc,
2938};
2939
2940/* SR clocks */
2941
2942/* SmartReflex fclk (VDD1) */
2943static struct clk sr1_fck = {
2944 .name = "sr1_fck",
2945 .ops = &clkops_omap2_dflt_wait,
2946 .parent = &sys_ck,
2947 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2948 .enable_bit = OMAP3430_EN_SR1_SHIFT,
2949 .recalc = &followparent_recalc,
2950};
2951
2952/* SmartReflex fclk (VDD2) */
2953static struct clk sr2_fck = {
2954 .name = "sr2_fck",
2955 .ops = &clkops_omap2_dflt_wait,
2956 .parent = &sys_ck,
2957 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2958 .enable_bit = OMAP3430_EN_SR2_SHIFT,
2959 .recalc = &followparent_recalc,
2960};
2961
2962static struct clk sr_l4_ick = {
2963 .name = "sr_l4_ick",
2964 .ops = &clkops_null, /* RMK: missing? */
2965 .parent = &l4_ick,
2966 .clkdm_name = "core_l4_clkdm",
2967 .recalc = &followparent_recalc,
2968};
2969
2970/* SECURE_32K_FCK clocks */
2971
2972static struct clk gpt12_fck = {
2973 .name = "gpt12_fck",
2974 .ops = &clkops_null,
2975 .parent = &secure_32k_fck,
2976 .recalc = &followparent_recalc,
2977};
2978
2979static struct clk wdt1_fck = {
2980 .name = "wdt1_fck",
2981 .ops = &clkops_null,
2982 .parent = &secure_32k_fck,
2983 .recalc = &followparent_recalc,
2984};
2985
2986
2987/*
2988 * clkdev
2989 */
2990
2991static struct omap_clk omap34xx_clks[] = {
2992 CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_343X),
2993 CLK(NULL, "virt_12m_ck", &virt_12m_ck, CK_343X),
2994 CLK(NULL, "virt_13m_ck", &virt_13m_ck, CK_343X),
2995 CLK(NULL, "virt_16_8m_ck", &virt_16_8m_ck, CK_3430ES2),
2996 CLK(NULL, "virt_19_2m_ck", &virt_19_2m_ck, CK_343X),
2997 CLK(NULL, "virt_26m_ck", &virt_26m_ck, CK_343X),
2998 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_343X),
2999 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_343X),
3000 CLK(NULL, "sys_ck", &sys_ck, CK_343X),
3001 CLK(NULL, "sys_altclk", &sys_altclk, CK_343X),
3002 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_343X),
3003 CLK(NULL, "sys_clkout1", &sys_clkout1, CK_343X),
3004 CLK(NULL, "dpll1_ck", &dpll1_ck, CK_343X),
3005 CLK(NULL, "dpll1_x2_ck", &dpll1_x2_ck, CK_343X),
3006 CLK(NULL, "dpll1_x2m2_ck", &dpll1_x2m2_ck, CK_343X),
3007 CLK(NULL, "dpll2_ck", &dpll2_ck, CK_343X),
3008 CLK(NULL, "dpll2_m2_ck", &dpll2_m2_ck, CK_343X),
3009 CLK(NULL, "dpll3_ck", &dpll3_ck, CK_343X),
3010 CLK(NULL, "core_ck", &core_ck, CK_343X),
3011 CLK(NULL, "dpll3_x2_ck", &dpll3_x2_ck, CK_343X),
3012 CLK(NULL, "dpll3_m2_ck", &dpll3_m2_ck, CK_343X),
3013 CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_343X),
3014 CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_343X),
3015 CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_343X),
3016 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_343X),
3017 CLK(NULL, "dpll4_ck", &dpll4_ck, CK_343X),
3018 CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_343X),
3019 CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_343X),
3020 CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_343X),
3021 CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_343X),
3022 CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_343X),
3023 CLK(NULL, "omap_48m_fck", &omap_48m_fck, CK_343X),
3024 CLK(NULL, "omap_12m_fck", &omap_12m_fck, CK_343X),
3025 CLK(NULL, "dpll4_m2_ck", &dpll4_m2_ck, CK_343X),
3026 CLK(NULL, "dpll4_m2x2_ck", &dpll4_m2x2_ck, CK_343X),
3027 CLK(NULL, "dpll4_m3_ck", &dpll4_m3_ck, CK_343X),
3028 CLK(NULL, "dpll4_m3x2_ck", &dpll4_m3x2_ck, CK_343X),
3029 CLK(NULL, "dpll4_m4_ck", &dpll4_m4_ck, CK_343X),
3030 CLK(NULL, "dpll4_m4x2_ck", &dpll4_m4x2_ck, CK_343X),
3031 CLK(NULL, "dpll4_m5_ck", &dpll4_m5_ck, CK_343X),
3032 CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_343X),
3033 CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_343X),
3034 CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_343X),
3035 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_343X),
3036 CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2),
3037 CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2),
3038 CLK(NULL, "clkout2_src_ck", &clkout2_src_ck, CK_343X),
3039 CLK(NULL, "sys_clkout2", &sys_clkout2, CK_343X),
3040 CLK(NULL, "corex2_fck", &corex2_fck, CK_343X),
3041 CLK(NULL, "dpll1_fck", &dpll1_fck, CK_343X),
3042 CLK(NULL, "mpu_ck", &mpu_ck, CK_343X),
3043 CLK(NULL, "arm_fck", &arm_fck, CK_343X),
3044 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_343X),
3045 CLK(NULL, "dpll2_fck", &dpll2_fck, CK_343X),
3046 CLK(NULL, "iva2_ck", &iva2_ck, CK_343X),
3047 CLK(NULL, "l3_ick", &l3_ick, CK_343X),
3048 CLK(NULL, "l4_ick", &l4_ick, CK_343X),
3049 CLK(NULL, "rm_ick", &rm_ick, CK_343X),
3050 CLK(NULL, "gfx_l3_ck", &gfx_l3_ck, CK_3430ES1),
3051 CLK(NULL, "gfx_l3_fck", &gfx_l3_fck, CK_3430ES1),
3052 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1),
3053 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1),
3054 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1),
3055 CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2),
3056 CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2),
3057 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1),
3058 CLK(NULL, "modem_fck", &modem_fck, CK_343X),
3059 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_343X),
3060 CLK(NULL, "mad2d_ick", &mad2d_ick, CK_343X),
3061 CLK(NULL, "gpt10_fck", &gpt10_fck, CK_343X),
3062 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_343X),
3063 CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2),
3064 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2),
3065 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2),
3066 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_343X),
3067 CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2),
3068 CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_343X),
3069 CLK(NULL, "mspro_fck", &mspro_fck, CK_343X),
3070 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_343X),
3071 CLK("i2c_omap.3", "fck", &i2c3_fck, CK_343X),
3072 CLK("i2c_omap.2", "fck", &i2c2_fck, CK_343X),
3073 CLK("i2c_omap.1", "fck", &i2c1_fck, CK_343X),
3074 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_343X),
3075 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_343X),
3076 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_343X),
3077 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_343X),
3078 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_343X),
3079 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_343X),
3080 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_343X),
3081 CLK(NULL, "uart2_fck", &uart2_fck, CK_343X),
3082 CLK(NULL, "uart1_fck", &uart1_fck, CK_343X),
3083 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
3084 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_343X),
3085 CLK("omap_hdq.0", "fck", &hdq_fck, CK_343X),
3086 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
3087 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2),
3088 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
3089 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2, CK_3430ES2),
3090 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_343X),
3091 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3092 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es2, CK_3430ES2),
3093 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_343X),
3094 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_343X),
3095 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_343X),
3096 CLK(NULL, "pka_ick", &pka_ick, CK_343X),
3097 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_343X),
3098 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2),
3099 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2),
3100 CLK(NULL, "icr_ick", &icr_ick, CK_343X),
3101 CLK(NULL, "aes2_ick", &aes2_ick, CK_343X),
3102 CLK(NULL, "sha12_ick", &sha12_ick, CK_343X),
3103 CLK(NULL, "des2_ick", &des2_ick, CK_343X),
3104 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_343X),
3105 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_343X),
3106 CLK(NULL, "mspro_ick", &mspro_ick, CK_343X),
3107 CLK("omap_hdq.0", "ick", &hdq_ick, CK_343X),
3108 CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_343X),
3109 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_343X),
3110 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_343X),
3111 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_343X),
3112 CLK("i2c_omap.3", "ick", &i2c3_ick, CK_343X),
3113 CLK("i2c_omap.2", "ick", &i2c2_ick, CK_343X),
3114 CLK("i2c_omap.1", "ick", &i2c1_ick, CK_343X),
3115 CLK(NULL, "uart2_ick", &uart2_ick, CK_343X),
3116 CLK(NULL, "uart1_ick", &uart1_ick, CK_343X),
3117 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_343X),
3118 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_343X),
3119 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_343X),
3120 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_343X),
3121 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1),
3122 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_343X),
3123 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_343X),
3124 CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_343X),
3125 CLK(NULL, "ssi_ick", &ssi_ick_3430es1, CK_3430ES1),
3126 CLK(NULL, "ssi_ick", &ssi_ick_3430es2, CK_3430ES2),
3127 CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_3430ES1),
3128 CLK(NULL, "security_l4_ick2", &security_l4_ick2, CK_343X),
3129 CLK(NULL, "aes1_ick", &aes1_ick, CK_343X),
3130 CLK("omap_rng", "ick", &rng_ick, CK_343X),
3131 CLK(NULL, "sha11_ick", &sha11_ick, CK_343X),
3132 CLK(NULL, "des1_ick", &des1_ick, CK_343X),
3133 CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
3134 CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2),
3135 CLK("omapdss", "tv_fck", &dss_tv_fck, CK_343X),
3136 CLK("omapdss", "video_fck", &dss_96m_fck, CK_343X),
3137 CLK("omapdss", "dss2_fck", &dss2_alwon_fck, CK_343X),
3138 CLK("omapdss", "ick", &dss_ick_3430es1, CK_3430ES1),
3139 CLK("omapdss", "ick", &dss_ick_3430es2, CK_3430ES2),
3140 CLK(NULL, "cam_mclk", &cam_mclk, CK_343X),
3141 CLK(NULL, "cam_ick", &cam_ick, CK_343X),
3142 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X),
3143 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2),
3144 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2),
3145 CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2),
3146 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2),
3147 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_343X),
3148 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_343X),
3149 CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_343X),
3150 CLK("omap_wdt", "fck", &wdt2_fck, CK_343X),
3151 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_343X),
3152 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2),
3153 CLK("omap_wdt", "ick", &wdt2_ick, CK_343X),
3154 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_343X),
3155 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_343X),
3156 CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_343X),
3157 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_343X),
3158 CLK(NULL, "gpt1_ick", &gpt1_ick, CK_343X),
3159 CLK(NULL, "per_96m_fck", &per_96m_fck, CK_343X),
3160 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_343X),
3161 CLK(NULL, "uart3_fck", &uart3_fck, CK_343X),
3162 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_343X),
3163 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_343X),
3164 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_343X),
3165 CLK(NULL, "gpt5_fck", &gpt5_fck, CK_343X),
3166 CLK(NULL, "gpt6_fck", &gpt6_fck, CK_343X),
3167 CLK(NULL, "gpt7_fck", &gpt7_fck, CK_343X),
3168 CLK(NULL, "gpt8_fck", &gpt8_fck, CK_343X),
3169 CLK(NULL, "gpt9_fck", &gpt9_fck, CK_343X),
3170 CLK(NULL, "per_32k_alwon_fck", &per_32k_alwon_fck, CK_343X),
3171 CLK(NULL, "gpio6_dbck", &gpio6_dbck, CK_343X),
3172 CLK(NULL, "gpio5_dbck", &gpio5_dbck, CK_343X),
3173 CLK(NULL, "gpio4_dbck", &gpio4_dbck, CK_343X),
3174 CLK(NULL, "gpio3_dbck", &gpio3_dbck, CK_343X),
3175 CLK(NULL, "gpio2_dbck", &gpio2_dbck, CK_343X),
3176 CLK(NULL, "wdt3_fck", &wdt3_fck, CK_343X),
3177 CLK(NULL, "per_l4_ick", &per_l4_ick, CK_343X),
3178 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_343X),
3179 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_343X),
3180 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_343X),
3181 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_343X),
3182 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_343X),
3183 CLK(NULL, "wdt3_ick", &wdt3_ick, CK_343X),
3184 CLK(NULL, "uart3_ick", &uart3_ick, CK_343X),
3185 CLK(NULL, "gpt9_ick", &gpt9_ick, CK_343X),
3186 CLK(NULL, "gpt8_ick", &gpt8_ick, CK_343X),
3187 CLK(NULL, "gpt7_ick", &gpt7_ick, CK_343X),
3188 CLK(NULL, "gpt6_ick", &gpt6_ick, CK_343X),
3189 CLK(NULL, "gpt5_ick", &gpt5_ick, CK_343X),
3190 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_343X),
3191 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_343X),
3192 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_343X),
3193 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_343X),
3194 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_343X),
3195 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_343X),
3196 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_343X),
3197 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_343X),
3198 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_343X),
3199 CLK("etb", "emu_src_ck", &emu_src_ck, CK_343X),
3200 CLK(NULL, "pclk_fck", &pclk_fck, CK_343X),
3201 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_343X),
3202 CLK(NULL, "atclk_fck", &atclk_fck, CK_343X),
3203 CLK(NULL, "traceclk_src_fck", &traceclk_src_fck, CK_343X),
3204 CLK(NULL, "traceclk_fck", &traceclk_fck, CK_343X),
3205 CLK(NULL, "sr1_fck", &sr1_fck, CK_343X),
3206 CLK(NULL, "sr2_fck", &sr2_fck, CK_343X),
3207 CLK(NULL, "sr_l4_ick", &sr_l4_ick, CK_343X),
3208 CLK(NULL, "secure_32k_fck", &secure_32k_fck, CK_343X),
3209 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_343X),
3210 CLK(NULL, "wdt1_fck", &wdt1_fck, CK_343X),
3211};
3212
3213
3214int __init omap2_clk_init(void)
3215{
3216 /* struct prcm_config *prcm; */
3217 struct omap_clk *c;
3218 /* u32 clkrate; */
3219 u32 cpu_clkflg;
3220
3221 if (cpu_is_omap34xx()) {
3222 cpu_mask = RATE_IN_343X;
3223 cpu_clkflg = CK_343X;
3224
3225 /*
3226 * Update this if there are further clock changes between ES2
3227 * and production parts
3228 */
3229 if (omap_rev() == OMAP3430_REV_ES1_0) {
3230 /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */
3231 cpu_clkflg |= CK_3430ES1;
3232 } else {
3233 cpu_mask |= RATE_IN_3430ES2;
3234 cpu_clkflg |= CK_3430ES2;
3235 }
3236 }
3237
3238 clk_init(&omap2_clk_functions);
3239
3240 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
3241 clk_preinit(c->lk.clk);
3242
3243 for (c = omap34xx_clks; c < omap34xx_clks + ARRAY_SIZE(omap34xx_clks); c++)
3244 if (c->cpu & cpu_clkflg) {
3245 clkdev_add(&c->lk);
3246 clk_register(c->lk.clk);
3247 omap2_init_clk_clkdm(c->lk.clk);
3248 }
3249
3250 /* REVISIT: Not yet ready for OMAP3 */
3251#if 0
3252 /* Check the MPU rate set by bootloader */
3253 clkrate = omap2_get_dpll_rate_24xx(&dpll_ck);
3254 for (prcm = rate_table; prcm->mpu_speed; prcm++) {
3255 if (!(prcm->flags & cpu_mask))
3256 continue;
3257 if (prcm->xtal_speed != sys_ck.rate)
3258 continue;
3259 if (prcm->dpll_speed <= clkrate)
3260 break;
3261 }
3262 curr_prcm_set = prcm;
3263#endif
3264
3265 recalculate_root_clocks();
3266
3267 printk(KERN_INFO "Clocking rate (Crystal/Core/MPU): "
3268 "%ld.%01ld/%ld/%ld MHz\n",
3269 (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
3270 (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
3271
3272 /*
3273 * Only enable those clocks we will need, let the drivers
3274 * enable other clocks as necessary
3275 */
3276 clk_enable_init_clocks();
3277
3278 /*
3279 * Lock DPLL5 and put it in autoidle.
3280 */
3281 if (omap_rev() >= OMAP3430_REV_ES2_0)
3282 omap3_clk_lock_dpll5();
3283
3284 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
3285 sdrc_ick_p = clk_get(NULL, "sdrc_ick");
3286 arm_fck_p = clk_get(NULL, "arm_fck");
3287
3288 return 0;
3289}
diff --git a/arch/arm/mach-omap2/clock44xx.c b/arch/arm/mach-omap2/clock44xx.c
new file mode 100644
index 000000000000..e370868a79a8
--- /dev/null
+++ b/arch/arm/mach-omap2/clock44xx.c
@@ -0,0 +1,33 @@
1/*
2 * OMAP4-specific clock framework functions
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 *
6 * Rajendra Nayak (rnayak@ti.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#include <linux/errno.h>
14#include "clock.h"
15
16struct clk_functions omap2_clk_functions = {
17 .clk_enable = omap2_clk_enable,
18 .clk_disable = omap2_clk_disable,
19 .clk_round_rate = omap2_clk_round_rate,
20 .clk_set_rate = omap2_clk_set_rate,
21 .clk_set_parent = omap2_clk_set_parent,
22 .clk_disable_unused = omap2_clk_disable_unused,
23};
24
25const struct clkops clkops_noncore_dpll_ops = {
26 .enable = &omap3_noncore_dpll_enable,
27 .disable = &omap3_noncore_dpll_disable,
28};
29
30void omap2_clk_prepare_for_reboot(void)
31{
32 return;
33}
diff --git a/arch/arm/mach-omap2/clock44xx.h b/arch/arm/mach-omap2/clock44xx.h
new file mode 100644
index 000000000000..59b9ced4daa1
--- /dev/null
+++ b/arch/arm/mach-omap2/clock44xx.h
@@ -0,0 +1,15 @@
1/*
2 * OMAP4 clock function prototypes and macros
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 */
6
7#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_44XX_H
8#define __ARCH_ARM_MACH_OMAP2_CLOCK_44XX_H
9
10#define OMAP4430_MAX_DPLL_MULT 2048
11#define OMAP4430_MAX_DPLL_DIV 128
12
13extern const struct clkops clkops_noncore_dpll_ops;
14
15#endif
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
new file mode 100644
index 000000000000..2210e227d78a
--- /dev/null
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -0,0 +1,2766 @@
1/*
2 * OMAP4 Clock data
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22#include <linux/kernel.h>
23#include <linux/module.h>
24#include <linux/clk.h>
25
26#include <plat/control.h>
27#include <plat/clkdev_omap.h>
28
29#include "clock.h"
30#include "clock44xx.h"
31#include "cm.h"
32#include "cm-regbits-44xx.h"
33#include "prm.h"
34#include "prm-regbits-44xx.h"
35
36/* Root clocks */
37
38static struct clk extalt_clkin_ck = {
39 .name = "extalt_clkin_ck",
40 .rate = 59000000,
41 .ops = &clkops_null,
42 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
43};
44
45static struct clk pad_clks_ck = {
46 .name = "pad_clks_ck",
47 .rate = 12000000,
48 .ops = &clkops_null,
49 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
50};
51
52static struct clk pad_slimbus_core_clks_ck = {
53 .name = "pad_slimbus_core_clks_ck",
54 .rate = 12000000,
55 .ops = &clkops_null,
56 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
57};
58
59static struct clk secure_32k_clk_src_ck = {
60 .name = "secure_32k_clk_src_ck",
61 .rate = 32768,
62 .ops = &clkops_null,
63 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
64};
65
66static struct clk slimbus_clk = {
67 .name = "slimbus_clk",
68 .rate = 12000000,
69 .ops = &clkops_null,
70 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
71};
72
73static struct clk sys_32k_ck = {
74 .name = "sys_32k_ck",
75 .rate = 32768,
76 .ops = &clkops_null,
77 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
78};
79
80static struct clk virt_12000000_ck = {
81 .name = "virt_12000000_ck",
82 .ops = &clkops_null,
83 .rate = 12000000,
84};
85
86static struct clk virt_13000000_ck = {
87 .name = "virt_13000000_ck",
88 .ops = &clkops_null,
89 .rate = 13000000,
90};
91
92static struct clk virt_16800000_ck = {
93 .name = "virt_16800000_ck",
94 .ops = &clkops_null,
95 .rate = 16800000,
96};
97
98static struct clk virt_19200000_ck = {
99 .name = "virt_19200000_ck",
100 .ops = &clkops_null,
101 .rate = 19200000,
102};
103
104static struct clk virt_26000000_ck = {
105 .name = "virt_26000000_ck",
106 .ops = &clkops_null,
107 .rate = 26000000,
108};
109
110static struct clk virt_27000000_ck = {
111 .name = "virt_27000000_ck",
112 .ops = &clkops_null,
113 .rate = 27000000,
114};
115
116static struct clk virt_38400000_ck = {
117 .name = "virt_38400000_ck",
118 .ops = &clkops_null,
119 .rate = 38400000,
120};
121
122static const struct clksel_rate div_1_0_rates[] = {
123 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
124 { .div = 0 },
125};
126
127static const struct clksel_rate div_1_1_rates[] = {
128 { .div = 1, .val = 1, .flags = RATE_IN_4430 },
129 { .div = 0 },
130};
131
132static const struct clksel_rate div_1_2_rates[] = {
133 { .div = 1, .val = 2, .flags = RATE_IN_4430 },
134 { .div = 0 },
135};
136
137static const struct clksel_rate div_1_3_rates[] = {
138 { .div = 1, .val = 3, .flags = RATE_IN_4430 },
139 { .div = 0 },
140};
141
142static const struct clksel_rate div_1_4_rates[] = {
143 { .div = 1, .val = 4, .flags = RATE_IN_4430 },
144 { .div = 0 },
145};
146
147static const struct clksel_rate div_1_5_rates[] = {
148 { .div = 1, .val = 5, .flags = RATE_IN_4430 },
149 { .div = 0 },
150};
151
152static const struct clksel_rate div_1_6_rates[] = {
153 { .div = 1, .val = 6, .flags = RATE_IN_4430 },
154 { .div = 0 },
155};
156
157static const struct clksel_rate div_1_7_rates[] = {
158 { .div = 1, .val = 7, .flags = RATE_IN_4430 },
159 { .div = 0 },
160};
161
162static const struct clksel sys_clkin_sel[] = {
163 { .parent = &virt_12000000_ck, .rates = div_1_1_rates },
164 { .parent = &virt_13000000_ck, .rates = div_1_2_rates },
165 { .parent = &virt_16800000_ck, .rates = div_1_3_rates },
166 { .parent = &virt_19200000_ck, .rates = div_1_4_rates },
167 { .parent = &virt_26000000_ck, .rates = div_1_5_rates },
168 { .parent = &virt_27000000_ck, .rates = div_1_6_rates },
169 { .parent = &virt_38400000_ck, .rates = div_1_7_rates },
170 { .parent = NULL },
171};
172
173static struct clk sys_clkin_ck = {
174 .name = "sys_clkin_ck",
175 .rate = 38400000,
176 .clksel = sys_clkin_sel,
177 .init = &omap2_init_clksel_parent,
178 .clksel_reg = OMAP4430_CM_SYS_CLKSEL,
179 .clksel_mask = OMAP4430_SYS_CLKSEL_MASK,
180 .ops = &clkops_null,
181 .recalc = &omap2_clksel_recalc,
182 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
183};
184
185static struct clk utmi_phy_clkout_ck = {
186 .name = "utmi_phy_clkout_ck",
187 .rate = 12000000,
188 .ops = &clkops_null,
189 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
190};
191
192static struct clk xclk60mhsp1_ck = {
193 .name = "xclk60mhsp1_ck",
194 .rate = 12000000,
195 .ops = &clkops_null,
196 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
197};
198
199static struct clk xclk60mhsp2_ck = {
200 .name = "xclk60mhsp2_ck",
201 .rate = 12000000,
202 .ops = &clkops_null,
203 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
204};
205
206static struct clk xclk60motg_ck = {
207 .name = "xclk60motg_ck",
208 .rate = 60000000,
209 .ops = &clkops_null,
210 .flags = CLOCK_IN_OMAP4430 | ALWAYS_ENABLED,
211};
212
213/* Module clocks and DPLL outputs */
214
215static const struct clksel_rate div2_1to2_rates[] = {
216 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
217 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
218 { .div = 0 },
219};
220
221static const struct clksel dpll_sys_ref_clk_div[] = {
222 { .parent = &sys_clkin_ck, .rates = div2_1to2_rates },
223 { .parent = NULL },
224};
225
226static struct clk dpll_sys_ref_clk = {
227 .name = "dpll_sys_ref_clk",
228 .parent = &sys_clkin_ck,
229 .clksel = dpll_sys_ref_clk_div,
230 .clksel_reg = OMAP4430_CM_DPLL_SYS_REF_CLKSEL,
231 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
232 .ops = &clkops_null,
233 .recalc = &omap2_clksel_recalc,
234 .round_rate = &omap2_clksel_round_rate,
235 .set_rate = &omap2_clksel_set_rate,
236 .flags = CLOCK_IN_OMAP4430,
237};
238
239static const struct clksel abe_dpll_refclk_mux_sel[] = {
240 { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates },
241 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
242 { .parent = NULL },
243};
244
245static struct clk abe_dpll_refclk_mux_ck = {
246 .name = "abe_dpll_refclk_mux_ck",
247 .parent = &dpll_sys_ref_clk,
248 .clksel = abe_dpll_refclk_mux_sel,
249 .init = &omap2_init_clksel_parent,
250 .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL,
251 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
252 .ops = &clkops_null,
253 .recalc = &omap2_clksel_recalc,
254 .flags = CLOCK_IN_OMAP4430,
255};
256
257/* DPLL_ABE */
258static struct dpll_data dpll_abe_dd = {
259 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE,
260 .clk_bypass = &sys_clkin_ck,
261 .clk_ref = &abe_dpll_refclk_mux_ck,
262 .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE,
263 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
264 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_ABE,
265 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_ABE,
266 .mult_mask = OMAP4430_DPLL_MULT_MASK,
267 .div1_mask = OMAP4430_DPLL_DIV_MASK,
268 .enable_mask = OMAP4430_DPLL_EN_MASK,
269 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
270 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
271 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
272 .max_divider = OMAP4430_MAX_DPLL_DIV,
273 .min_divider = 1,
274};
275
276
277static struct clk dpll_abe_ck = {
278 .name = "dpll_abe_ck",
279 .parent = &abe_dpll_refclk_mux_ck,
280 .dpll_data = &dpll_abe_dd,
281 .init = &omap2_init_dpll_parent,
282 .ops = &clkops_noncore_dpll_ops,
283 .recalc = &omap3_dpll_recalc,
284 .round_rate = &omap2_dpll_round_rate,
285 .set_rate = &omap3_noncore_dpll_set_rate,
286 .flags = CLOCK_IN_OMAP4430,
287};
288
289static struct clk dpll_abe_m2x2_ck = {
290 .name = "dpll_abe_m2x2_ck",
291 .parent = &dpll_abe_ck,
292 .ops = &clkops_null,
293 .recalc = &followparent_recalc,
294 .flags = CLOCK_IN_OMAP4430,
295};
296
297static struct clk abe_24m_fclk = {
298 .name = "abe_24m_fclk",
299 .parent = &dpll_abe_m2x2_ck,
300 .ops = &clkops_null,
301 .recalc = &followparent_recalc,
302 .flags = CLOCK_IN_OMAP4430,
303};
304
305static const struct clksel_rate div3_1to4_rates[] = {
306 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
307 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
308 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
309 { .div = 0 },
310};
311
312static const struct clksel abe_clk_div[] = {
313 { .parent = &dpll_abe_m2x2_ck, .rates = div3_1to4_rates },
314 { .parent = NULL },
315};
316
317static struct clk abe_clk = {
318 .name = "abe_clk",
319 .parent = &dpll_abe_m2x2_ck,
320 .clksel = abe_clk_div,
321 .clksel_reg = OMAP4430_CM_CLKSEL_ABE,
322 .clksel_mask = OMAP4430_CLKSEL_OPP_MASK,
323 .ops = &clkops_null,
324 .recalc = &omap2_clksel_recalc,
325 .round_rate = &omap2_clksel_round_rate,
326 .set_rate = &omap2_clksel_set_rate,
327 .flags = CLOCK_IN_OMAP4430,
328};
329
330static const struct clksel aess_fclk_div[] = {
331 { .parent = &abe_clk, .rates = div2_1to2_rates },
332 { .parent = NULL },
333};
334
335static struct clk aess_fclk = {
336 .name = "aess_fclk",
337 .parent = &abe_clk,
338 .clksel = aess_fclk_div,
339 .clksel_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
340 .clksel_mask = OMAP4430_CLKSEL_AESS_FCLK_MASK,
341 .ops = &clkops_null,
342 .recalc = &omap2_clksel_recalc,
343 .round_rate = &omap2_clksel_round_rate,
344 .set_rate = &omap2_clksel_set_rate,
345 .flags = CLOCK_IN_OMAP4430,
346};
347
348static const struct clksel_rate div31_1to31_rates[] = {
349 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
350 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
351 { .div = 3, .val = 2, .flags = RATE_IN_4430 },
352 { .div = 4, .val = 3, .flags = RATE_IN_4430 },
353 { .div = 5, .val = 4, .flags = RATE_IN_4430 },
354 { .div = 6, .val = 5, .flags = RATE_IN_4430 },
355 { .div = 7, .val = 6, .flags = RATE_IN_4430 },
356 { .div = 8, .val = 7, .flags = RATE_IN_4430 },
357 { .div = 9, .val = 8, .flags = RATE_IN_4430 },
358 { .div = 10, .val = 9, .flags = RATE_IN_4430 },
359 { .div = 11, .val = 10, .flags = RATE_IN_4430 },
360 { .div = 12, .val = 11, .flags = RATE_IN_4430 },
361 { .div = 13, .val = 12, .flags = RATE_IN_4430 },
362 { .div = 14, .val = 13, .flags = RATE_IN_4430 },
363 { .div = 15, .val = 14, .flags = RATE_IN_4430 },
364 { .div = 16, .val = 15, .flags = RATE_IN_4430 },
365 { .div = 17, .val = 16, .flags = RATE_IN_4430 },
366 { .div = 18, .val = 17, .flags = RATE_IN_4430 },
367 { .div = 19, .val = 18, .flags = RATE_IN_4430 },
368 { .div = 20, .val = 19, .flags = RATE_IN_4430 },
369 { .div = 21, .val = 20, .flags = RATE_IN_4430 },
370 { .div = 22, .val = 21, .flags = RATE_IN_4430 },
371 { .div = 23, .val = 22, .flags = RATE_IN_4430 },
372 { .div = 24, .val = 23, .flags = RATE_IN_4430 },
373 { .div = 25, .val = 24, .flags = RATE_IN_4430 },
374 { .div = 26, .val = 25, .flags = RATE_IN_4430 },
375 { .div = 27, .val = 26, .flags = RATE_IN_4430 },
376 { .div = 28, .val = 27, .flags = RATE_IN_4430 },
377 { .div = 29, .val = 28, .flags = RATE_IN_4430 },
378 { .div = 30, .val = 29, .flags = RATE_IN_4430 },
379 { .div = 31, .val = 30, .flags = RATE_IN_4430 },
380 { .div = 0 },
381};
382
383static const struct clksel dpll_abe_m3_div[] = {
384 { .parent = &dpll_abe_ck, .rates = div31_1to31_rates },
385 { .parent = NULL },
386};
387
388static struct clk dpll_abe_m3_ck = {
389 .name = "dpll_abe_m3_ck",
390 .parent = &dpll_abe_ck,
391 .clksel = dpll_abe_m3_div,
392 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE,
393 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
394 .ops = &clkops_null,
395 .recalc = &omap2_clksel_recalc,
396 .round_rate = &omap2_clksel_round_rate,
397 .set_rate = &omap2_clksel_set_rate,
398 .flags = CLOCK_IN_OMAP4430,
399};
400
401static const struct clksel core_hsd_byp_clk_mux_sel[] = {
402 { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates },
403 { .parent = &dpll_abe_m3_ck, .rates = div_1_1_rates },
404 { .parent = NULL },
405};
406
407static struct clk core_hsd_byp_clk_mux_ck = {
408 .name = "core_hsd_byp_clk_mux_ck",
409 .parent = &dpll_sys_ref_clk,
410 .clksel = core_hsd_byp_clk_mux_sel,
411 .init = &omap2_init_clksel_parent,
412 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
413 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
414 .ops = &clkops_null,
415 .recalc = &omap2_clksel_recalc,
416 .flags = CLOCK_IN_OMAP4430,
417};
418
419/* DPLL_CORE */
420static struct dpll_data dpll_core_dd = {
421 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE,
422 .clk_bypass = &core_hsd_byp_clk_mux_ck,
423 .clk_ref = &dpll_sys_ref_clk,
424 .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE,
425 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
426 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE,
427 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_CORE,
428 .mult_mask = OMAP4430_DPLL_MULT_MASK,
429 .div1_mask = OMAP4430_DPLL_DIV_MASK,
430 .enable_mask = OMAP4430_DPLL_EN_MASK,
431 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
432 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
433 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
434 .max_divider = OMAP4430_MAX_DPLL_DIV,
435 .min_divider = 1,
436};
437
438
439static struct clk dpll_core_ck = {
440 .name = "dpll_core_ck",
441 .parent = &dpll_sys_ref_clk,
442 .dpll_data = &dpll_core_dd,
443 .init = &omap2_init_dpll_parent,
444 .ops = &clkops_null,
445 .recalc = &omap3_dpll_recalc,
446 .flags = CLOCK_IN_OMAP4430,
447};
448
449static const struct clksel dpll_core_m6_div[] = {
450 { .parent = &dpll_core_ck, .rates = div31_1to31_rates },
451 { .parent = NULL },
452};
453
454static struct clk dpll_core_m6_ck = {
455 .name = "dpll_core_m6_ck",
456 .parent = &dpll_core_ck,
457 .clksel = dpll_core_m6_div,
458 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE,
459 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
460 .ops = &clkops_null,
461 .recalc = &omap2_clksel_recalc,
462 .round_rate = &omap2_clksel_round_rate,
463 .set_rate = &omap2_clksel_set_rate,
464 .flags = CLOCK_IN_OMAP4430,
465};
466
467static const struct clksel dbgclk_mux_sel[] = {
468 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
469 { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates },
470 { .parent = NULL },
471};
472
473static struct clk dbgclk_mux_ck = {
474 .name = "dbgclk_mux_ck",
475 .parent = &sys_clkin_ck,
476 .ops = &clkops_null,
477 .recalc = &followparent_recalc,
478 .flags = CLOCK_IN_OMAP4430,
479};
480
481static struct clk dpll_core_m2_ck = {
482 .name = "dpll_core_m2_ck",
483 .parent = &dpll_core_ck,
484 .clksel = dpll_core_m6_div,
485 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE,
486 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
487 .ops = &clkops_null,
488 .recalc = &omap2_clksel_recalc,
489 .round_rate = &omap2_clksel_round_rate,
490 .set_rate = &omap2_clksel_set_rate,
491 .flags = CLOCK_IN_OMAP4430,
492};
493
494static struct clk ddrphy_ck = {
495 .name = "ddrphy_ck",
496 .parent = &dpll_core_m2_ck,
497 .ops = &clkops_null,
498 .recalc = &followparent_recalc,
499 .flags = CLOCK_IN_OMAP4430,
500};
501
502static struct clk dpll_core_m5_ck = {
503 .name = "dpll_core_m5_ck",
504 .parent = &dpll_core_ck,
505 .clksel = dpll_core_m6_div,
506 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE,
507 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
508 .ops = &clkops_null,
509 .recalc = &omap2_clksel_recalc,
510 .round_rate = &omap2_clksel_round_rate,
511 .set_rate = &omap2_clksel_set_rate,
512 .flags = CLOCK_IN_OMAP4430,
513};
514
515static const struct clksel div_core_div[] = {
516 { .parent = &dpll_core_m5_ck, .rates = div2_1to2_rates },
517 { .parent = NULL },
518};
519
520static struct clk div_core_ck = {
521 .name = "div_core_ck",
522 .parent = &dpll_core_m5_ck,
523 .clksel = div_core_div,
524 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
525 .clksel_mask = OMAP4430_CLKSEL_CORE_MASK,
526 .ops = &clkops_null,
527 .recalc = &omap2_clksel_recalc,
528 .round_rate = &omap2_clksel_round_rate,
529 .set_rate = &omap2_clksel_set_rate,
530 .flags = CLOCK_IN_OMAP4430,
531};
532
533static const struct clksel_rate div4_1to8_rates[] = {
534 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
535 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
536 { .div = 4, .val = 2, .flags = RATE_IN_4430 },
537 { .div = 8, .val = 3, .flags = RATE_IN_4430 },
538 { .div = 0 },
539};
540
541static const struct clksel div_iva_hs_clk_div[] = {
542 { .parent = &dpll_core_m5_ck, .rates = div4_1to8_rates },
543 { .parent = NULL },
544};
545
546static struct clk div_iva_hs_clk = {
547 .name = "div_iva_hs_clk",
548 .parent = &dpll_core_m5_ck,
549 .clksel = div_iva_hs_clk_div,
550 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_IVA,
551 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
552 .ops = &clkops_null,
553 .recalc = &omap2_clksel_recalc,
554 .round_rate = &omap2_clksel_round_rate,
555 .set_rate = &omap2_clksel_set_rate,
556 .flags = CLOCK_IN_OMAP4430,
557};
558
559static struct clk div_mpu_hs_clk = {
560 .name = "div_mpu_hs_clk",
561 .parent = &dpll_core_m5_ck,
562 .clksel = div_iva_hs_clk_div,
563 .clksel_reg = OMAP4430_CM_BYPCLK_DPLL_MPU,
564 .clksel_mask = OMAP4430_CLKSEL_0_1_MASK,
565 .ops = &clkops_null,
566 .recalc = &omap2_clksel_recalc,
567 .round_rate = &omap2_clksel_round_rate,
568 .set_rate = &omap2_clksel_set_rate,
569 .flags = CLOCK_IN_OMAP4430,
570};
571
572static struct clk dpll_core_m4_ck = {
573 .name = "dpll_core_m4_ck",
574 .parent = &dpll_core_ck,
575 .clksel = dpll_core_m6_div,
576 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE,
577 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
578 .ops = &clkops_null,
579 .recalc = &omap2_clksel_recalc,
580 .round_rate = &omap2_clksel_round_rate,
581 .set_rate = &omap2_clksel_set_rate,
582 .flags = CLOCK_IN_OMAP4430,
583};
584
585static struct clk dll_clk_div_ck = {
586 .name = "dll_clk_div_ck",
587 .parent = &dpll_core_m4_ck,
588 .ops = &clkops_null,
589 .recalc = &followparent_recalc,
590 .flags = CLOCK_IN_OMAP4430,
591};
592
593static struct clk dpll_abe_m2_ck = {
594 .name = "dpll_abe_m2_ck",
595 .parent = &dpll_abe_ck,
596 .clksel = dpll_abe_m3_div,
597 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
598 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
599 .ops = &clkops_null,
600 .recalc = &omap2_clksel_recalc,
601 .round_rate = &omap2_clksel_round_rate,
602 .set_rate = &omap2_clksel_set_rate,
603 .flags = CLOCK_IN_OMAP4430,
604};
605
606static struct clk dpll_core_m3_ck = {
607 .name = "dpll_core_m3_ck",
608 .parent = &dpll_core_ck,
609 .clksel = dpll_core_m6_div,
610 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
611 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
612 .ops = &clkops_null,
613 .recalc = &omap2_clksel_recalc,
614 .round_rate = &omap2_clksel_round_rate,
615 .set_rate = &omap2_clksel_set_rate,
616 .flags = CLOCK_IN_OMAP4430,
617};
618
619static struct clk dpll_core_m7_ck = {
620 .name = "dpll_core_m7_ck",
621 .parent = &dpll_core_ck,
622 .clksel = dpll_core_m6_div,
623 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE,
624 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
625 .ops = &clkops_null,
626 .recalc = &omap2_clksel_recalc,
627 .round_rate = &omap2_clksel_round_rate,
628 .set_rate = &omap2_clksel_set_rate,
629 .flags = CLOCK_IN_OMAP4430,
630};
631
632static const struct clksel iva_hsd_byp_clk_mux_sel[] = {
633 { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates },
634 { .parent = &div_iva_hs_clk, .rates = div_1_1_rates },
635 { .parent = NULL },
636};
637
638static struct clk iva_hsd_byp_clk_mux_ck = {
639 .name = "iva_hsd_byp_clk_mux_ck",
640 .parent = &dpll_sys_ref_clk,
641 .ops = &clkops_null,
642 .recalc = &followparent_recalc,
643 .flags = CLOCK_IN_OMAP4430,
644};
645
646/* DPLL_IVA */
647static struct dpll_data dpll_iva_dd = {
648 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA,
649 .clk_bypass = &iva_hsd_byp_clk_mux_ck,
650 .clk_ref = &dpll_sys_ref_clk,
651 .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA,
652 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
653 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA,
654 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_IVA,
655 .mult_mask = OMAP4430_DPLL_MULT_MASK,
656 .div1_mask = OMAP4430_DPLL_DIV_MASK,
657 .enable_mask = OMAP4430_DPLL_EN_MASK,
658 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
659 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
660 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
661 .max_divider = OMAP4430_MAX_DPLL_DIV,
662 .min_divider = 1,
663};
664
665
666static struct clk dpll_iva_ck = {
667 .name = "dpll_iva_ck",
668 .parent = &dpll_sys_ref_clk,
669 .dpll_data = &dpll_iva_dd,
670 .init = &omap2_init_dpll_parent,
671 .ops = &clkops_noncore_dpll_ops,
672 .recalc = &omap3_dpll_recalc,
673 .round_rate = &omap2_dpll_round_rate,
674 .set_rate = &omap3_noncore_dpll_set_rate,
675 .flags = CLOCK_IN_OMAP4430,
676};
677
678static const struct clksel dpll_iva_m4_div[] = {
679 { .parent = &dpll_iva_ck, .rates = div31_1to31_rates },
680 { .parent = NULL },
681};
682
683static struct clk dpll_iva_m4_ck = {
684 .name = "dpll_iva_m4_ck",
685 .parent = &dpll_iva_ck,
686 .clksel = dpll_iva_m4_div,
687 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA,
688 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
689 .ops = &clkops_null,
690 .recalc = &omap2_clksel_recalc,
691 .round_rate = &omap2_clksel_round_rate,
692 .set_rate = &omap2_clksel_set_rate,
693 .flags = CLOCK_IN_OMAP4430,
694};
695
696static struct clk dpll_iva_m5_ck = {
697 .name = "dpll_iva_m5_ck",
698 .parent = &dpll_iva_ck,
699 .clksel = dpll_iva_m4_div,
700 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA,
701 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
702 .ops = &clkops_null,
703 .recalc = &omap2_clksel_recalc,
704 .round_rate = &omap2_clksel_round_rate,
705 .set_rate = &omap2_clksel_set_rate,
706 .flags = CLOCK_IN_OMAP4430,
707};
708
709/* DPLL_MPU */
710static struct dpll_data dpll_mpu_dd = {
711 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU,
712 .clk_bypass = &div_mpu_hs_clk,
713 .clk_ref = &dpll_sys_ref_clk,
714 .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU,
715 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
716 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU,
717 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_MPU,
718 .mult_mask = OMAP4430_DPLL_MULT_MASK,
719 .div1_mask = OMAP4430_DPLL_DIV_MASK,
720 .enable_mask = OMAP4430_DPLL_EN_MASK,
721 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
722 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
723 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
724 .max_divider = OMAP4430_MAX_DPLL_DIV,
725 .min_divider = 1,
726};
727
728
729static struct clk dpll_mpu_ck = {
730 .name = "dpll_mpu_ck",
731 .parent = &dpll_sys_ref_clk,
732 .dpll_data = &dpll_mpu_dd,
733 .init = &omap2_init_dpll_parent,
734 .ops = &clkops_noncore_dpll_ops,
735 .recalc = &omap3_dpll_recalc,
736 .round_rate = &omap2_dpll_round_rate,
737 .set_rate = &omap3_noncore_dpll_set_rate,
738 .flags = CLOCK_IN_OMAP4430,
739};
740
741static const struct clksel dpll_mpu_m2_div[] = {
742 { .parent = &dpll_mpu_ck, .rates = div31_1to31_rates },
743 { .parent = NULL },
744};
745
746static struct clk dpll_mpu_m2_ck = {
747 .name = "dpll_mpu_m2_ck",
748 .parent = &dpll_mpu_ck,
749 .clksel = dpll_mpu_m2_div,
750 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU,
751 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
752 .ops = &clkops_null,
753 .recalc = &omap2_clksel_recalc,
754 .round_rate = &omap2_clksel_round_rate,
755 .set_rate = &omap2_clksel_set_rate,
756 .flags = CLOCK_IN_OMAP4430,
757};
758
759static struct clk per_hs_clk_div_ck = {
760 .name = "per_hs_clk_div_ck",
761 .parent = &dpll_abe_m3_ck,
762 .ops = &clkops_null,
763 .recalc = &followparent_recalc,
764 .flags = CLOCK_IN_OMAP4430,
765};
766
767static const struct clksel per_hsd_byp_clk_mux_sel[] = {
768 { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates },
769 { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates },
770 { .parent = NULL },
771};
772
773static struct clk per_hsd_byp_clk_mux_ck = {
774 .name = "per_hsd_byp_clk_mux_ck",
775 .parent = &dpll_sys_ref_clk,
776 .clksel = per_hsd_byp_clk_mux_sel,
777 .init = &omap2_init_clksel_parent,
778 .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
779 .clksel_mask = OMAP4430_DPLL_BYP_CLKSEL_MASK,
780 .ops = &clkops_null,
781 .recalc = &omap2_clksel_recalc,
782 .flags = CLOCK_IN_OMAP4430,
783};
784
785/* DPLL_PER */
786static struct dpll_data dpll_per_dd = {
787 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER,
788 .clk_bypass = &per_hsd_byp_clk_mux_ck,
789 .clk_ref = &dpll_sys_ref_clk,
790 .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER,
791 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
792 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER,
793 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_PER,
794 .mult_mask = OMAP4430_DPLL_MULT_MASK,
795 .div1_mask = OMAP4430_DPLL_DIV_MASK,
796 .enable_mask = OMAP4430_DPLL_EN_MASK,
797 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
798 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
799 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
800 .max_divider = OMAP4430_MAX_DPLL_DIV,
801 .min_divider = 1,
802};
803
804
805static struct clk dpll_per_ck = {
806 .name = "dpll_per_ck",
807 .parent = &dpll_sys_ref_clk,
808 .dpll_data = &dpll_per_dd,
809 .init = &omap2_init_dpll_parent,
810 .ops = &clkops_noncore_dpll_ops,
811 .recalc = &omap3_dpll_recalc,
812 .round_rate = &omap2_dpll_round_rate,
813 .set_rate = &omap3_noncore_dpll_set_rate,
814 .flags = CLOCK_IN_OMAP4430,
815};
816
817static const struct clksel dpll_per_m2_div[] = {
818 { .parent = &dpll_per_ck, .rates = div31_1to31_rates },
819 { .parent = NULL },
820};
821
822static struct clk dpll_per_m2_ck = {
823 .name = "dpll_per_m2_ck",
824 .parent = &dpll_per_ck,
825 .clksel = dpll_per_m2_div,
826 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
827 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
828 .ops = &clkops_null,
829 .recalc = &omap2_clksel_recalc,
830 .round_rate = &omap2_clksel_round_rate,
831 .set_rate = &omap2_clksel_set_rate,
832 .flags = CLOCK_IN_OMAP4430,
833};
834
835static struct clk dpll_per_m2x2_ck = {
836 .name = "dpll_per_m2x2_ck",
837 .parent = &dpll_per_ck,
838 .ops = &clkops_null,
839 .recalc = &followparent_recalc,
840 .flags = CLOCK_IN_OMAP4430,
841};
842
843static struct clk dpll_per_m3_ck = {
844 .name = "dpll_per_m3_ck",
845 .parent = &dpll_per_ck,
846 .clksel = dpll_per_m2_div,
847 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
848 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
849 .ops = &clkops_null,
850 .recalc = &omap2_clksel_recalc,
851 .round_rate = &omap2_clksel_round_rate,
852 .set_rate = &omap2_clksel_set_rate,
853 .flags = CLOCK_IN_OMAP4430,
854};
855
856static struct clk dpll_per_m4_ck = {
857 .name = "dpll_per_m4_ck",
858 .parent = &dpll_per_ck,
859 .clksel = dpll_per_m2_div,
860 .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER,
861 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK,
862 .ops = &clkops_null,
863 .recalc = &omap2_clksel_recalc,
864 .round_rate = &omap2_clksel_round_rate,
865 .set_rate = &omap2_clksel_set_rate,
866 .flags = CLOCK_IN_OMAP4430,
867};
868
869static struct clk dpll_per_m5_ck = {
870 .name = "dpll_per_m5_ck",
871 .parent = &dpll_per_ck,
872 .clksel = dpll_per_m2_div,
873 .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER,
874 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK,
875 .ops = &clkops_null,
876 .recalc = &omap2_clksel_recalc,
877 .round_rate = &omap2_clksel_round_rate,
878 .set_rate = &omap2_clksel_set_rate,
879 .flags = CLOCK_IN_OMAP4430,
880};
881
882static struct clk dpll_per_m6_ck = {
883 .name = "dpll_per_m6_ck",
884 .parent = &dpll_per_ck,
885 .clksel = dpll_per_m2_div,
886 .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER,
887 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK,
888 .ops = &clkops_null,
889 .recalc = &omap2_clksel_recalc,
890 .round_rate = &omap2_clksel_round_rate,
891 .set_rate = &omap2_clksel_set_rate,
892 .flags = CLOCK_IN_OMAP4430,
893};
894
895static struct clk dpll_per_m7_ck = {
896 .name = "dpll_per_m7_ck",
897 .parent = &dpll_per_ck,
898 .clksel = dpll_per_m2_div,
899 .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER,
900 .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK,
901 .ops = &clkops_null,
902 .recalc = &omap2_clksel_recalc,
903 .round_rate = &omap2_clksel_round_rate,
904 .set_rate = &omap2_clksel_set_rate,
905 .flags = CLOCK_IN_OMAP4430,
906};
907
908/* DPLL_UNIPRO */
909static struct dpll_data dpll_unipro_dd = {
910 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO,
911 .clk_bypass = &dpll_sys_ref_clk,
912 .clk_ref = &dpll_sys_ref_clk,
913 .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO,
914 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
915 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO,
916 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO,
917 .mult_mask = OMAP4430_DPLL_MULT_MASK,
918 .div1_mask = OMAP4430_DPLL_DIV_MASK,
919 .enable_mask = OMAP4430_DPLL_EN_MASK,
920 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
921 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
922 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
923 .max_divider = OMAP4430_MAX_DPLL_DIV,
924 .min_divider = 1,
925};
926
927
928static struct clk dpll_unipro_ck = {
929 .name = "dpll_unipro_ck",
930 .parent = &dpll_sys_ref_clk,
931 .dpll_data = &dpll_unipro_dd,
932 .init = &omap2_init_dpll_parent,
933 .ops = &clkops_noncore_dpll_ops,
934 .recalc = &omap3_dpll_recalc,
935 .round_rate = &omap2_dpll_round_rate,
936 .set_rate = &omap3_noncore_dpll_set_rate,
937 .flags = CLOCK_IN_OMAP4430,
938};
939
940static const struct clksel dpll_unipro_m2x2_div[] = {
941 { .parent = &dpll_unipro_ck, .rates = div31_1to31_rates },
942 { .parent = NULL },
943};
944
945static struct clk dpll_unipro_m2x2_ck = {
946 .name = "dpll_unipro_m2x2_ck",
947 .parent = &dpll_unipro_ck,
948 .clksel = dpll_unipro_m2x2_div,
949 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO,
950 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
951 .ops = &clkops_null,
952 .recalc = &omap2_clksel_recalc,
953 .round_rate = &omap2_clksel_round_rate,
954 .set_rate = &omap2_clksel_set_rate,
955 .flags = CLOCK_IN_OMAP4430,
956};
957
958static struct clk usb_hs_clk_div_ck = {
959 .name = "usb_hs_clk_div_ck",
960 .parent = &dpll_abe_m3_ck,
961 .ops = &clkops_null,
962 .recalc = &followparent_recalc,
963 .flags = CLOCK_IN_OMAP4430,
964};
965
966/* DPLL_USB */
967static struct dpll_data dpll_usb_dd = {
968 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB,
969 .clk_bypass = &usb_hs_clk_div_ck,
970 .clk_ref = &dpll_sys_ref_clk,
971 .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB,
972 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
973 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
974 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
975 .mult_mask = OMAP4430_DPLL_MULT_MASK,
976 .div1_mask = OMAP4430_DPLL_DIV_MASK,
977 .enable_mask = OMAP4430_DPLL_EN_MASK,
978 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
979 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
980 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
981 .max_divider = OMAP4430_MAX_DPLL_DIV,
982 .min_divider = 1,
983};
984
985
986static struct clk dpll_usb_ck = {
987 .name = "dpll_usb_ck",
988 .parent = &dpll_sys_ref_clk,
989 .dpll_data = &dpll_usb_dd,
990 .init = &omap2_init_dpll_parent,
991 .ops = &clkops_noncore_dpll_ops,
992 .recalc = &omap3_dpll_recalc,
993 .round_rate = &omap2_dpll_round_rate,
994 .set_rate = &omap3_noncore_dpll_set_rate,
995 .flags = CLOCK_IN_OMAP4430,
996};
997
998static struct clk dpll_usb_clkdcoldo_ck = {
999 .name = "dpll_usb_clkdcoldo_ck",
1000 .parent = &dpll_usb_ck,
1001 .ops = &clkops_null,
1002 .recalc = &followparent_recalc,
1003 .flags = CLOCK_IN_OMAP4430,
1004};
1005
1006static const struct clksel dpll_usb_m2_div[] = {
1007 { .parent = &dpll_usb_ck, .rates = div31_1to31_rates },
1008 { .parent = NULL },
1009};
1010
1011static struct clk dpll_usb_m2_ck = {
1012 .name = "dpll_usb_m2_ck",
1013 .parent = &dpll_usb_ck,
1014 .clksel = dpll_usb_m2_div,
1015 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB,
1016 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK,
1017 .ops = &clkops_null,
1018 .recalc = &omap2_clksel_recalc,
1019 .round_rate = &omap2_clksel_round_rate,
1020 .set_rate = &omap2_clksel_set_rate,
1021 .flags = CLOCK_IN_OMAP4430,
1022};
1023
1024static const struct clksel ducati_clk_mux_sel[] = {
1025 { .parent = &div_core_ck, .rates = div_1_0_rates },
1026 { .parent = &dpll_per_m6_ck, .rates = div_1_1_rates },
1027 { .parent = NULL },
1028};
1029
1030static struct clk ducati_clk_mux_ck = {
1031 .name = "ducati_clk_mux_ck",
1032 .parent = &div_core_ck,
1033 .clksel = ducati_clk_mux_sel,
1034 .init = &omap2_init_clksel_parent,
1035 .clksel_reg = OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT,
1036 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1037 .ops = &clkops_null,
1038 .recalc = &omap2_clksel_recalc,
1039 .flags = CLOCK_IN_OMAP4430,
1040};
1041
1042static struct clk func_12m_fclk = {
1043 .name = "func_12m_fclk",
1044 .parent = &dpll_per_m2x2_ck,
1045 .ops = &clkops_null,
1046 .recalc = &followparent_recalc,
1047 .flags = CLOCK_IN_OMAP4430,
1048};
1049
1050static struct clk func_24m_clk = {
1051 .name = "func_24m_clk",
1052 .parent = &dpll_per_m2_ck,
1053 .ops = &clkops_null,
1054 .recalc = &followparent_recalc,
1055 .flags = CLOCK_IN_OMAP4430,
1056};
1057
1058static struct clk func_24mc_fclk = {
1059 .name = "func_24mc_fclk",
1060 .parent = &dpll_per_m2x2_ck,
1061 .ops = &clkops_null,
1062 .recalc = &followparent_recalc,
1063 .flags = CLOCK_IN_OMAP4430,
1064};
1065
1066static const struct clksel_rate div2_4to8_rates[] = {
1067 { .div = 4, .val = 0, .flags = RATE_IN_4430 },
1068 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1069 { .div = 0 },
1070};
1071
1072static const struct clksel func_48m_fclk_div[] = {
1073 { .parent = &dpll_per_m2x2_ck, .rates = div2_4to8_rates },
1074 { .parent = NULL },
1075};
1076
1077static struct clk func_48m_fclk = {
1078 .name = "func_48m_fclk",
1079 .parent = &dpll_per_m2x2_ck,
1080 .clksel = func_48m_fclk_div,
1081 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1082 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1083 .ops = &clkops_null,
1084 .recalc = &omap2_clksel_recalc,
1085 .round_rate = &omap2_clksel_round_rate,
1086 .set_rate = &omap2_clksel_set_rate,
1087 .flags = CLOCK_IN_OMAP4430,
1088};
1089
1090static struct clk func_48mc_fclk = {
1091 .name = "func_48mc_fclk",
1092 .parent = &dpll_per_m2x2_ck,
1093 .ops = &clkops_null,
1094 .recalc = &followparent_recalc,
1095 .flags = CLOCK_IN_OMAP4430,
1096};
1097
1098static const struct clksel_rate div2_2to4_rates[] = {
1099 { .div = 2, .val = 0, .flags = RATE_IN_4430 },
1100 { .div = 4, .val = 1, .flags = RATE_IN_4430 },
1101 { .div = 0 },
1102};
1103
1104static const struct clksel func_64m_fclk_div[] = {
1105 { .parent = &dpll_per_m4_ck, .rates = div2_2to4_rates },
1106 { .parent = NULL },
1107};
1108
1109static struct clk func_64m_fclk = {
1110 .name = "func_64m_fclk",
1111 .parent = &dpll_per_m4_ck,
1112 .clksel = func_64m_fclk_div,
1113 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1114 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1115 .ops = &clkops_null,
1116 .recalc = &omap2_clksel_recalc,
1117 .round_rate = &omap2_clksel_round_rate,
1118 .set_rate = &omap2_clksel_set_rate,
1119 .flags = CLOCK_IN_OMAP4430,
1120};
1121
1122static const struct clksel func_96m_fclk_div[] = {
1123 { .parent = &dpll_per_m2x2_ck, .rates = div2_2to4_rates },
1124 { .parent = NULL },
1125};
1126
1127static struct clk func_96m_fclk = {
1128 .name = "func_96m_fclk",
1129 .parent = &dpll_per_m2x2_ck,
1130 .clksel = func_96m_fclk_div,
1131 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1132 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1133 .ops = &clkops_null,
1134 .recalc = &omap2_clksel_recalc,
1135 .round_rate = &omap2_clksel_round_rate,
1136 .set_rate = &omap2_clksel_set_rate,
1137 .flags = CLOCK_IN_OMAP4430,
1138};
1139
1140static const struct clksel hsmmc6_fclk_sel[] = {
1141 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
1142 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
1143 { .parent = NULL },
1144};
1145
1146static struct clk hsmmc6_fclk = {
1147 .name = "hsmmc6_fclk",
1148 .parent = &func_64m_fclk,
1149 .ops = &clkops_null,
1150 .recalc = &followparent_recalc,
1151 .flags = CLOCK_IN_OMAP4430,
1152};
1153
1154static const struct clksel_rate div2_1to8_rates[] = {
1155 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
1156 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
1157 { .div = 0 },
1158};
1159
1160static const struct clksel init_60m_fclk_div[] = {
1161 { .parent = &dpll_usb_m2_ck, .rates = div2_1to8_rates },
1162 { .parent = NULL },
1163};
1164
1165static struct clk init_60m_fclk = {
1166 .name = "init_60m_fclk",
1167 .parent = &dpll_usb_m2_ck,
1168 .clksel = init_60m_fclk_div,
1169 .clksel_reg = OMAP4430_CM_CLKSEL_USB_60MHZ,
1170 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1171 .ops = &clkops_null,
1172 .recalc = &omap2_clksel_recalc,
1173 .round_rate = &omap2_clksel_round_rate,
1174 .set_rate = &omap2_clksel_set_rate,
1175 .flags = CLOCK_IN_OMAP4430,
1176};
1177
1178static const struct clksel l3_div_div[] = {
1179 { .parent = &div_core_ck, .rates = div2_1to2_rates },
1180 { .parent = NULL },
1181};
1182
1183static struct clk l3_div_ck = {
1184 .name = "l3_div_ck",
1185 .parent = &div_core_ck,
1186 .clksel = l3_div_div,
1187 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1188 .clksel_mask = OMAP4430_CLKSEL_L3_MASK,
1189 .ops = &clkops_null,
1190 .recalc = &omap2_clksel_recalc,
1191 .round_rate = &omap2_clksel_round_rate,
1192 .set_rate = &omap2_clksel_set_rate,
1193 .flags = CLOCK_IN_OMAP4430,
1194};
1195
1196static const struct clksel l4_div_div[] = {
1197 { .parent = &l3_div_ck, .rates = div2_1to2_rates },
1198 { .parent = NULL },
1199};
1200
1201static struct clk l4_div_ck = {
1202 .name = "l4_div_ck",
1203 .parent = &l3_div_ck,
1204 .clksel = l4_div_div,
1205 .clksel_reg = OMAP4430_CM_CLKSEL_CORE,
1206 .clksel_mask = OMAP4430_CLKSEL_L4_MASK,
1207 .ops = &clkops_null,
1208 .recalc = &omap2_clksel_recalc,
1209 .round_rate = &omap2_clksel_round_rate,
1210 .set_rate = &omap2_clksel_set_rate,
1211 .flags = CLOCK_IN_OMAP4430,
1212};
1213
1214static struct clk lp_clk_div_ck = {
1215 .name = "lp_clk_div_ck",
1216 .parent = &dpll_abe_m2x2_ck,
1217 .ops = &clkops_null,
1218 .recalc = &followparent_recalc,
1219 .flags = CLOCK_IN_OMAP4430,
1220};
1221
1222static const struct clksel l4_wkup_clk_mux_sel[] = {
1223 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1224 { .parent = &lp_clk_div_ck, .rates = div_1_1_rates },
1225 { .parent = NULL },
1226};
1227
1228static struct clk l4_wkup_clk_mux_ck = {
1229 .name = "l4_wkup_clk_mux_ck",
1230 .parent = &sys_clkin_ck,
1231 .clksel = l4_wkup_clk_mux_sel,
1232 .init = &omap2_init_clksel_parent,
1233 .clksel_reg = OMAP4430_CM_L4_WKUP_CLKSEL,
1234 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1235 .ops = &clkops_null,
1236 .recalc = &omap2_clksel_recalc,
1237 .flags = CLOCK_IN_OMAP4430,
1238};
1239
1240static const struct clksel per_abe_nc_fclk_div[] = {
1241 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
1242 { .parent = NULL },
1243};
1244
1245static struct clk per_abe_nc_fclk = {
1246 .name = "per_abe_nc_fclk",
1247 .parent = &dpll_abe_m2_ck,
1248 .clksel = per_abe_nc_fclk_div,
1249 .clksel_reg = OMAP4430_CM_SCALE_FCLK,
1250 .clksel_mask = OMAP4430_SCALE_FCLK_MASK,
1251 .ops = &clkops_null,
1252 .recalc = &omap2_clksel_recalc,
1253 .round_rate = &omap2_clksel_round_rate,
1254 .set_rate = &omap2_clksel_set_rate,
1255 .flags = CLOCK_IN_OMAP4430,
1256};
1257
1258static const struct clksel mcasp2_fclk_sel[] = {
1259 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1260 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1261 { .parent = NULL },
1262};
1263
1264static struct clk mcasp2_fclk = {
1265 .name = "mcasp2_fclk",
1266 .parent = &func_96m_fclk,
1267 .ops = &clkops_null,
1268 .recalc = &followparent_recalc,
1269 .flags = CLOCK_IN_OMAP4430,
1270};
1271
1272static struct clk mcasp3_fclk = {
1273 .name = "mcasp3_fclk",
1274 .parent = &func_96m_fclk,
1275 .ops = &clkops_null,
1276 .recalc = &followparent_recalc,
1277 .flags = CLOCK_IN_OMAP4430,
1278};
1279
1280static struct clk ocp_abe_iclk = {
1281 .name = "ocp_abe_iclk",
1282 .parent = &aess_fclk,
1283 .ops = &clkops_null,
1284 .recalc = &followparent_recalc,
1285 .flags = CLOCK_IN_OMAP4430,
1286};
1287
1288static struct clk per_abe_24m_fclk = {
1289 .name = "per_abe_24m_fclk",
1290 .parent = &dpll_abe_m2_ck,
1291 .ops = &clkops_null,
1292 .recalc = &followparent_recalc,
1293 .flags = CLOCK_IN_OMAP4430,
1294};
1295
1296static const struct clksel pmd_stm_clock_mux_sel[] = {
1297 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1298 { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates },
1299 { .parent = &dpll_per_m7_ck, .rates = div_1_2_rates },
1300 { .parent = NULL },
1301};
1302
1303static struct clk pmd_stm_clock_mux_ck = {
1304 .name = "pmd_stm_clock_mux_ck",
1305 .parent = &sys_clkin_ck,
1306 .ops = &clkops_null,
1307 .recalc = &followparent_recalc,
1308 .flags = CLOCK_IN_OMAP4430,
1309};
1310
1311static struct clk pmd_trace_clk_mux_ck = {
1312 .name = "pmd_trace_clk_mux_ck",
1313 .parent = &sys_clkin_ck,
1314 .ops = &clkops_null,
1315 .recalc = &followparent_recalc,
1316 .flags = CLOCK_IN_OMAP4430,
1317};
1318
1319static struct clk syc_clk_div_ck = {
1320 .name = "syc_clk_div_ck",
1321 .parent = &sys_clkin_ck,
1322 .clksel = dpll_sys_ref_clk_div,
1323 .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL,
1324 .clksel_mask = OMAP4430_CLKSEL_0_0_MASK,
1325 .ops = &clkops_null,
1326 .recalc = &omap2_clksel_recalc,
1327 .round_rate = &omap2_clksel_round_rate,
1328 .set_rate = &omap2_clksel_set_rate,
1329 .flags = CLOCK_IN_OMAP4430,
1330};
1331
1332/* Leaf clocks controlled by modules */
1333
1334static struct clk aes1_ck = {
1335 .name = "aes1_ck",
1336 .ops = &clkops_omap2_dflt,
1337 .enable_reg = OMAP4430_CM_L4SEC_AES1_CLKCTRL,
1338 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1339 .clkdm_name = "l4_secure_clkdm",
1340 .parent = &l3_div_ck,
1341 .recalc = &followparent_recalc,
1342};
1343
1344static struct clk aes2_ck = {
1345 .name = "aes2_ck",
1346 .ops = &clkops_omap2_dflt,
1347 .enable_reg = OMAP4430_CM_L4SEC_AES2_CLKCTRL,
1348 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1349 .clkdm_name = "l4_secure_clkdm",
1350 .parent = &l3_div_ck,
1351 .recalc = &followparent_recalc,
1352};
1353
1354static struct clk aess_ck = {
1355 .name = "aess_ck",
1356 .ops = &clkops_omap2_dflt,
1357 .enable_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
1358 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1359 .clkdm_name = "abe_clkdm",
1360 .parent = &aess_fclk,
1361 .recalc = &followparent_recalc,
1362};
1363
1364static struct clk cust_efuse_ck = {
1365 .name = "cust_efuse_ck",
1366 .ops = &clkops_omap2_dflt,
1367 .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL,
1368 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1369 .clkdm_name = "l4_cefuse_clkdm",
1370 .parent = &sys_clkin_ck,
1371 .recalc = &followparent_recalc,
1372};
1373
1374static struct clk des3des_ck = {
1375 .name = "des3des_ck",
1376 .ops = &clkops_omap2_dflt,
1377 .enable_reg = OMAP4430_CM_L4SEC_DES3DES_CLKCTRL,
1378 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1379 .clkdm_name = "l4_secure_clkdm",
1380 .parent = &l4_div_ck,
1381 .recalc = &followparent_recalc,
1382};
1383
1384static const struct clksel dmic_sync_mux_sel[] = {
1385 { .parent = &abe_24m_fclk, .rates = div_1_0_rates },
1386 { .parent = &syc_clk_div_ck, .rates = div_1_1_rates },
1387 { .parent = &func_24m_clk, .rates = div_1_2_rates },
1388 { .parent = NULL },
1389};
1390
1391static struct clk dmic_sync_mux_ck = {
1392 .name = "dmic_sync_mux_ck",
1393 .parent = &abe_24m_fclk,
1394 .clksel = dmic_sync_mux_sel,
1395 .init = &omap2_init_clksel_parent,
1396 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1397 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1398 .ops = &clkops_null,
1399 .recalc = &omap2_clksel_recalc,
1400 .flags = CLOCK_IN_OMAP4430,
1401};
1402
1403static const struct clksel func_dmic_abe_gfclk_sel[] = {
1404 { .parent = &dmic_sync_mux_ck, .rates = div_1_0_rates },
1405 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1406 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1407 { .parent = NULL },
1408};
1409
1410/* Merged func_dmic_abe_gfclk into dmic_ck */
1411static struct clk dmic_ck = {
1412 .name = "dmic_ck",
1413 .parent = &dmic_sync_mux_ck,
1414 .clksel = func_dmic_abe_gfclk_sel,
1415 .init = &omap2_init_clksel_parent,
1416 .clksel_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1417 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1418 .ops = &clkops_omap2_dflt,
1419 .recalc = &omap2_clksel_recalc,
1420 .flags = CLOCK_IN_OMAP4430,
1421 .enable_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1422 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1423 .clkdm_name = "abe_clkdm",
1424};
1425
1426static struct clk dss_ck = {
1427 .name = "dss_ck",
1428 .ops = &clkops_omap2_dflt,
1429 .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1430 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1431 .clkdm_name = "l3_dss_clkdm",
1432 .parent = &l3_div_ck,
1433 .recalc = &followparent_recalc,
1434};
1435
1436static struct clk ducati_ck = {
1437 .name = "ducati_ck",
1438 .ops = &clkops_omap2_dflt,
1439 .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
1440 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1441 .clkdm_name = "ducati_clkdm",
1442 .parent = &ducati_clk_mux_ck,
1443 .recalc = &followparent_recalc,
1444};
1445
1446static struct clk emif1_ck = {
1447 .name = "emif1_ck",
1448 .ops = &clkops_omap2_dflt,
1449 .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL,
1450 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1451 .clkdm_name = "l3_emif_clkdm",
1452 .parent = &ddrphy_ck,
1453 .recalc = &followparent_recalc,
1454};
1455
1456static struct clk emif2_ck = {
1457 .name = "emif2_ck",
1458 .ops = &clkops_omap2_dflt,
1459 .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL,
1460 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1461 .clkdm_name = "l3_emif_clkdm",
1462 .parent = &ddrphy_ck,
1463 .recalc = &followparent_recalc,
1464};
1465
1466static const struct clksel fdif_fclk_div[] = {
1467 { .parent = &dpll_per_m4_ck, .rates = div3_1to4_rates },
1468 { .parent = NULL },
1469};
1470
1471/* Merged fdif_fclk into fdif_ck */
1472static struct clk fdif_ck = {
1473 .name = "fdif_ck",
1474 .parent = &dpll_per_m4_ck,
1475 .clksel = fdif_fclk_div,
1476 .clksel_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1477 .clksel_mask = OMAP4430_CLKSEL_FCLK_MASK,
1478 .ops = &clkops_omap2_dflt,
1479 .recalc = &omap2_clksel_recalc,
1480 .round_rate = &omap2_clksel_round_rate,
1481 .set_rate = &omap2_clksel_set_rate,
1482 .flags = CLOCK_IN_OMAP4430,
1483 .enable_reg = OMAP4430_CM_CAM_FDIF_CLKCTRL,
1484 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1485 .clkdm_name = "iss_clkdm",
1486};
1487
1488static const struct clksel per_sgx_fclk_div[] = {
1489 { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates },
1490 { .parent = NULL },
1491};
1492
1493static struct clk per_sgx_fclk = {
1494 .name = "per_sgx_fclk",
1495 .parent = &dpll_per_m2x2_ck,
1496 .clksel = per_sgx_fclk_div,
1497 .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1498 .clksel_mask = OMAP4430_CLKSEL_PER_192M_MASK,
1499 .ops = &clkops_null,
1500 .recalc = &omap2_clksel_recalc,
1501 .round_rate = &omap2_clksel_round_rate,
1502 .set_rate = &omap2_clksel_set_rate,
1503 .flags = CLOCK_IN_OMAP4430,
1504};
1505
1506static const struct clksel sgx_clk_mux_sel[] = {
1507 { .parent = &dpll_core_m7_ck, .rates = div_1_0_rates },
1508 { .parent = &per_sgx_fclk, .rates = div_1_1_rates },
1509 { .parent = NULL },
1510};
1511
1512/* Merged sgx_clk_mux into gfx_ck */
1513static struct clk gfx_ck = {
1514 .name = "gfx_ck",
1515 .parent = &dpll_core_m7_ck,
1516 .clksel = sgx_clk_mux_sel,
1517 .init = &omap2_init_clksel_parent,
1518 .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1519 .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK,
1520 .ops = &clkops_omap2_dflt,
1521 .recalc = &omap2_clksel_recalc,
1522 .flags = CLOCK_IN_OMAP4430,
1523 .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL,
1524 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1525 .clkdm_name = "l3_gfx_clkdm",
1526};
1527
1528static struct clk gpio1_ck = {
1529 .name = "gpio1_ck",
1530 .ops = &clkops_omap2_dflt,
1531 .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1532 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1533 .clkdm_name = "l4_wkup_clkdm",
1534 .parent = &l4_wkup_clk_mux_ck,
1535 .recalc = &followparent_recalc,
1536};
1537
1538static struct clk gpio2_ck = {
1539 .name = "gpio2_ck",
1540 .ops = &clkops_omap2_dflt,
1541 .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1542 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1543 .clkdm_name = "l4_per_clkdm",
1544 .parent = &l4_div_ck,
1545 .recalc = &followparent_recalc,
1546};
1547
1548static struct clk gpio3_ck = {
1549 .name = "gpio3_ck",
1550 .ops = &clkops_omap2_dflt,
1551 .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1552 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1553 .clkdm_name = "l4_per_clkdm",
1554 .parent = &l4_div_ck,
1555 .recalc = &followparent_recalc,
1556};
1557
1558static struct clk gpio4_ck = {
1559 .name = "gpio4_ck",
1560 .ops = &clkops_omap2_dflt,
1561 .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1562 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1563 .clkdm_name = "l4_per_clkdm",
1564 .parent = &l4_div_ck,
1565 .recalc = &followparent_recalc,
1566};
1567
1568static struct clk gpio5_ck = {
1569 .name = "gpio5_ck",
1570 .ops = &clkops_omap2_dflt,
1571 .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
1572 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1573 .clkdm_name = "l4_per_clkdm",
1574 .parent = &l4_div_ck,
1575 .recalc = &followparent_recalc,
1576};
1577
1578static struct clk gpio6_ck = {
1579 .name = "gpio6_ck",
1580 .ops = &clkops_omap2_dflt,
1581 .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1582 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1583 .clkdm_name = "l4_per_clkdm",
1584 .parent = &l4_div_ck,
1585 .recalc = &followparent_recalc,
1586};
1587
1588static struct clk gpmc_ck = {
1589 .name = "gpmc_ck",
1590 .ops = &clkops_omap2_dflt,
1591 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL,
1592 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1593 .clkdm_name = "l3_2_clkdm",
1594 .parent = &l3_div_ck,
1595 .recalc = &followparent_recalc,
1596};
1597
1598static const struct clksel dmt1_clk_mux_sel[] = {
1599 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1600 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
1601 { .parent = NULL },
1602};
1603
1604/* Merged dmt1_clk_mux into gptimer1_ck */
1605static struct clk gptimer1_ck = {
1606 .name = "gptimer1_ck",
1607 .parent = &sys_clkin_ck,
1608 .clksel = dmt1_clk_mux_sel,
1609 .init = &omap2_init_clksel_parent,
1610 .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
1611 .clksel_mask = OMAP4430_CLKSEL_MASK,
1612 .ops = &clkops_omap2_dflt,
1613 .recalc = &omap2_clksel_recalc,
1614 .flags = CLOCK_IN_OMAP4430,
1615 .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
1616 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1617 .clkdm_name = "l4_wkup_clkdm",
1618};
1619
1620/* Merged cm2_dm10_mux into gptimer10_ck */
1621static struct clk gptimer10_ck = {
1622 .name = "gptimer10_ck",
1623 .parent = &sys_clkin_ck,
1624 .clksel = dmt1_clk_mux_sel,
1625 .init = &omap2_init_clksel_parent,
1626 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
1627 .clksel_mask = OMAP4430_CLKSEL_MASK,
1628 .ops = &clkops_omap2_dflt,
1629 .recalc = &omap2_clksel_recalc,
1630 .flags = CLOCK_IN_OMAP4430,
1631 .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
1632 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1633 .clkdm_name = "l4_per_clkdm",
1634};
1635
1636/* Merged cm2_dm11_mux into gptimer11_ck */
1637static struct clk gptimer11_ck = {
1638 .name = "gptimer11_ck",
1639 .parent = &sys_clkin_ck,
1640 .clksel = dmt1_clk_mux_sel,
1641 .init = &omap2_init_clksel_parent,
1642 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
1643 .clksel_mask = OMAP4430_CLKSEL_MASK,
1644 .ops = &clkops_omap2_dflt,
1645 .recalc = &omap2_clksel_recalc,
1646 .flags = CLOCK_IN_OMAP4430,
1647 .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
1648 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1649 .clkdm_name = "l4_per_clkdm",
1650};
1651
1652/* Merged cm2_dm2_mux into gptimer2_ck */
1653static struct clk gptimer2_ck = {
1654 .name = "gptimer2_ck",
1655 .parent = &sys_clkin_ck,
1656 .clksel = dmt1_clk_mux_sel,
1657 .init = &omap2_init_clksel_parent,
1658 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
1659 .clksel_mask = OMAP4430_CLKSEL_MASK,
1660 .ops = &clkops_omap2_dflt,
1661 .recalc = &omap2_clksel_recalc,
1662 .flags = CLOCK_IN_OMAP4430,
1663 .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
1664 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1665 .clkdm_name = "l4_per_clkdm",
1666};
1667
1668/* Merged cm2_dm3_mux into gptimer3_ck */
1669static struct clk gptimer3_ck = {
1670 .name = "gptimer3_ck",
1671 .parent = &sys_clkin_ck,
1672 .clksel = dmt1_clk_mux_sel,
1673 .init = &omap2_init_clksel_parent,
1674 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
1675 .clksel_mask = OMAP4430_CLKSEL_MASK,
1676 .ops = &clkops_omap2_dflt,
1677 .recalc = &omap2_clksel_recalc,
1678 .flags = CLOCK_IN_OMAP4430,
1679 .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
1680 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1681 .clkdm_name = "l4_per_clkdm",
1682};
1683
1684/* Merged cm2_dm4_mux into gptimer4_ck */
1685static struct clk gptimer4_ck = {
1686 .name = "gptimer4_ck",
1687 .parent = &sys_clkin_ck,
1688 .clksel = dmt1_clk_mux_sel,
1689 .init = &omap2_init_clksel_parent,
1690 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
1691 .clksel_mask = OMAP4430_CLKSEL_MASK,
1692 .ops = &clkops_omap2_dflt,
1693 .recalc = &omap2_clksel_recalc,
1694 .flags = CLOCK_IN_OMAP4430,
1695 .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
1696 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1697 .clkdm_name = "l4_per_clkdm",
1698};
1699
1700static const struct clksel timer5_sync_mux_sel[] = {
1701 { .parent = &syc_clk_div_ck, .rates = div_1_0_rates },
1702 { .parent = &sys_32k_ck, .rates = div_1_1_rates },
1703 { .parent = NULL },
1704};
1705
1706/* Merged timer5_sync_mux into gptimer5_ck */
1707static struct clk gptimer5_ck = {
1708 .name = "gptimer5_ck",
1709 .parent = &syc_clk_div_ck,
1710 .clksel = timer5_sync_mux_sel,
1711 .init = &omap2_init_clksel_parent,
1712 .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
1713 .clksel_mask = OMAP4430_CLKSEL_MASK,
1714 .ops = &clkops_omap2_dflt,
1715 .recalc = &omap2_clksel_recalc,
1716 .flags = CLOCK_IN_OMAP4430,
1717 .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
1718 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1719 .clkdm_name = "abe_clkdm",
1720};
1721
1722/* Merged timer6_sync_mux into gptimer6_ck */
1723static struct clk gptimer6_ck = {
1724 .name = "gptimer6_ck",
1725 .parent = &syc_clk_div_ck,
1726 .clksel = timer5_sync_mux_sel,
1727 .init = &omap2_init_clksel_parent,
1728 .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
1729 .clksel_mask = OMAP4430_CLKSEL_MASK,
1730 .ops = &clkops_omap2_dflt,
1731 .recalc = &omap2_clksel_recalc,
1732 .flags = CLOCK_IN_OMAP4430,
1733 .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
1734 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1735 .clkdm_name = "abe_clkdm",
1736};
1737
1738/* Merged timer7_sync_mux into gptimer7_ck */
1739static struct clk gptimer7_ck = {
1740 .name = "gptimer7_ck",
1741 .parent = &syc_clk_div_ck,
1742 .clksel = timer5_sync_mux_sel,
1743 .init = &omap2_init_clksel_parent,
1744 .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
1745 .clksel_mask = OMAP4430_CLKSEL_MASK,
1746 .ops = &clkops_omap2_dflt,
1747 .recalc = &omap2_clksel_recalc,
1748 .flags = CLOCK_IN_OMAP4430,
1749 .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
1750 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1751 .clkdm_name = "abe_clkdm",
1752};
1753
1754/* Merged timer8_sync_mux into gptimer8_ck */
1755static struct clk gptimer8_ck = {
1756 .name = "gptimer8_ck",
1757 .parent = &syc_clk_div_ck,
1758 .clksel = timer5_sync_mux_sel,
1759 .init = &omap2_init_clksel_parent,
1760 .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
1761 .clksel_mask = OMAP4430_CLKSEL_MASK,
1762 .ops = &clkops_omap2_dflt,
1763 .recalc = &omap2_clksel_recalc,
1764 .flags = CLOCK_IN_OMAP4430,
1765 .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
1766 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1767 .clkdm_name = "abe_clkdm",
1768};
1769
1770/* Merged cm2_dm9_mux into gptimer9_ck */
1771static struct clk gptimer9_ck = {
1772 .name = "gptimer9_ck",
1773 .parent = &sys_clkin_ck,
1774 .clksel = dmt1_clk_mux_sel,
1775 .init = &omap2_init_clksel_parent,
1776 .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
1777 .clksel_mask = OMAP4430_CLKSEL_MASK,
1778 .ops = &clkops_omap2_dflt,
1779 .recalc = &omap2_clksel_recalc,
1780 .flags = CLOCK_IN_OMAP4430,
1781 .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
1782 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1783 .clkdm_name = "l4_per_clkdm",
1784};
1785
1786static struct clk hdq1w_ck = {
1787 .name = "hdq1w_ck",
1788 .ops = &clkops_omap2_dflt,
1789 .enable_reg = OMAP4430_CM_L4PER_HDQ1W_CLKCTRL,
1790 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1791 .clkdm_name = "l4_per_clkdm",
1792 .parent = &func_12m_fclk,
1793 .recalc = &followparent_recalc,
1794};
1795
1796/* Merged hsi_fclk into hsi_ck */
1797static struct clk hsi_ck = {
1798 .name = "hsi_ck",
1799 .parent = &dpll_per_m2x2_ck,
1800 .clksel = per_sgx_fclk_div,
1801 .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1802 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1803 .ops = &clkops_omap2_dflt,
1804 .recalc = &omap2_clksel_recalc,
1805 .round_rate = &omap2_clksel_round_rate,
1806 .set_rate = &omap2_clksel_set_rate,
1807 .flags = CLOCK_IN_OMAP4430,
1808 .enable_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
1809 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1810 .clkdm_name = "l3_init_clkdm",
1811};
1812
1813static struct clk i2c1_ck = {
1814 .name = "i2c1_ck",
1815 .ops = &clkops_omap2_dflt,
1816 .enable_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
1817 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1818 .clkdm_name = "l4_per_clkdm",
1819 .parent = &func_96m_fclk,
1820 .recalc = &followparent_recalc,
1821};
1822
1823static struct clk i2c2_ck = {
1824 .name = "i2c2_ck",
1825 .ops = &clkops_omap2_dflt,
1826 .enable_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
1827 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1828 .clkdm_name = "l4_per_clkdm",
1829 .parent = &func_96m_fclk,
1830 .recalc = &followparent_recalc,
1831};
1832
1833static struct clk i2c3_ck = {
1834 .name = "i2c3_ck",
1835 .ops = &clkops_omap2_dflt,
1836 .enable_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
1837 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1838 .clkdm_name = "l4_per_clkdm",
1839 .parent = &func_96m_fclk,
1840 .recalc = &followparent_recalc,
1841};
1842
1843static struct clk i2c4_ck = {
1844 .name = "i2c4_ck",
1845 .ops = &clkops_omap2_dflt,
1846 .enable_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
1847 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1848 .clkdm_name = "l4_per_clkdm",
1849 .parent = &func_96m_fclk,
1850 .recalc = &followparent_recalc,
1851};
1852
1853static struct clk iss_ck = {
1854 .name = "iss_ck",
1855 .ops = &clkops_omap2_dflt,
1856 .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
1857 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1858 .clkdm_name = "iss_clkdm",
1859 .parent = &ducati_clk_mux_ck,
1860 .recalc = &followparent_recalc,
1861};
1862
1863static struct clk ivahd_ck = {
1864 .name = "ivahd_ck",
1865 .ops = &clkops_omap2_dflt,
1866 .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
1867 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1868 .clkdm_name = "ivahd_clkdm",
1869 .parent = &dpll_iva_m5_ck,
1870 .recalc = &followparent_recalc,
1871};
1872
1873static struct clk keyboard_ck = {
1874 .name = "keyboard_ck",
1875 .ops = &clkops_omap2_dflt,
1876 .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
1877 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1878 .clkdm_name = "l4_wkup_clkdm",
1879 .parent = &sys_32k_ck,
1880 .recalc = &followparent_recalc,
1881};
1882
1883static struct clk l3_instr_interconnect_ck = {
1884 .name = "l3_instr_interconnect_ck",
1885 .ops = &clkops_omap2_dflt,
1886 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
1887 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1888 .clkdm_name = "l3_instr_clkdm",
1889 .parent = &l3_div_ck,
1890 .recalc = &followparent_recalc,
1891};
1892
1893static struct clk l3_interconnect_3_ck = {
1894 .name = "l3_interconnect_3_ck",
1895 .ops = &clkops_omap2_dflt,
1896 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
1897 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1898 .clkdm_name = "l3_instr_clkdm",
1899 .parent = &l3_div_ck,
1900 .recalc = &followparent_recalc,
1901};
1902
1903static struct clk mcasp_sync_mux_ck = {
1904 .name = "mcasp_sync_mux_ck",
1905 .parent = &abe_24m_fclk,
1906 .clksel = dmic_sync_mux_sel,
1907 .init = &omap2_init_clksel_parent,
1908 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1909 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1910 .ops = &clkops_null,
1911 .recalc = &omap2_clksel_recalc,
1912 .flags = CLOCK_IN_OMAP4430,
1913};
1914
1915static const struct clksel func_mcasp_abe_gfclk_sel[] = {
1916 { .parent = &mcasp_sync_mux_ck, .rates = div_1_0_rates },
1917 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1918 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1919 { .parent = NULL },
1920};
1921
1922/* Merged func_mcasp_abe_gfclk into mcasp_ck */
1923static struct clk mcasp_ck = {
1924 .name = "mcasp_ck",
1925 .parent = &mcasp_sync_mux_ck,
1926 .clksel = func_mcasp_abe_gfclk_sel,
1927 .init = &omap2_init_clksel_parent,
1928 .clksel_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1929 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1930 .ops = &clkops_omap2_dflt,
1931 .recalc = &omap2_clksel_recalc,
1932 .flags = CLOCK_IN_OMAP4430,
1933 .enable_reg = OMAP4430_CM1_ABE_MCASP_CLKCTRL,
1934 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1935 .clkdm_name = "abe_clkdm",
1936};
1937
1938static struct clk mcbsp1_sync_mux_ck = {
1939 .name = "mcbsp1_sync_mux_ck",
1940 .parent = &abe_24m_fclk,
1941 .clksel = dmic_sync_mux_sel,
1942 .init = &omap2_init_clksel_parent,
1943 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1944 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1945 .ops = &clkops_null,
1946 .recalc = &omap2_clksel_recalc,
1947 .flags = CLOCK_IN_OMAP4430,
1948};
1949
1950static const struct clksel func_mcbsp1_gfclk_sel[] = {
1951 { .parent = &mcbsp1_sync_mux_ck, .rates = div_1_0_rates },
1952 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1953 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1954 { .parent = NULL },
1955};
1956
1957/* Merged func_mcbsp1_gfclk into mcbsp1_ck */
1958static struct clk mcbsp1_ck = {
1959 .name = "mcbsp1_ck",
1960 .parent = &mcbsp1_sync_mux_ck,
1961 .clksel = func_mcbsp1_gfclk_sel,
1962 .init = &omap2_init_clksel_parent,
1963 .clksel_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1964 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
1965 .ops = &clkops_omap2_dflt,
1966 .recalc = &omap2_clksel_recalc,
1967 .flags = CLOCK_IN_OMAP4430,
1968 .enable_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
1969 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
1970 .clkdm_name = "abe_clkdm",
1971};
1972
1973static struct clk mcbsp2_sync_mux_ck = {
1974 .name = "mcbsp2_sync_mux_ck",
1975 .parent = &abe_24m_fclk,
1976 .clksel = dmic_sync_mux_sel,
1977 .init = &omap2_init_clksel_parent,
1978 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1979 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
1980 .ops = &clkops_null,
1981 .recalc = &omap2_clksel_recalc,
1982 .flags = CLOCK_IN_OMAP4430,
1983};
1984
1985static const struct clksel func_mcbsp2_gfclk_sel[] = {
1986 { .parent = &mcbsp2_sync_mux_ck, .rates = div_1_0_rates },
1987 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
1988 { .parent = &slimbus_clk, .rates = div_1_2_rates },
1989 { .parent = NULL },
1990};
1991
1992/* Merged func_mcbsp2_gfclk into mcbsp2_ck */
1993static struct clk mcbsp2_ck = {
1994 .name = "mcbsp2_ck",
1995 .parent = &mcbsp2_sync_mux_ck,
1996 .clksel = func_mcbsp2_gfclk_sel,
1997 .init = &omap2_init_clksel_parent,
1998 .clksel_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
1999 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
2000 .ops = &clkops_omap2_dflt,
2001 .recalc = &omap2_clksel_recalc,
2002 .flags = CLOCK_IN_OMAP4430,
2003 .enable_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
2004 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2005 .clkdm_name = "abe_clkdm",
2006};
2007
2008static struct clk mcbsp3_sync_mux_ck = {
2009 .name = "mcbsp3_sync_mux_ck",
2010 .parent = &abe_24m_fclk,
2011 .clksel = dmic_sync_mux_sel,
2012 .init = &omap2_init_clksel_parent,
2013 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
2014 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
2015 .ops = &clkops_null,
2016 .recalc = &omap2_clksel_recalc,
2017 .flags = CLOCK_IN_OMAP4430,
2018};
2019
2020static const struct clksel func_mcbsp3_gfclk_sel[] = {
2021 { .parent = &mcbsp3_sync_mux_ck, .rates = div_1_0_rates },
2022 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
2023 { .parent = &slimbus_clk, .rates = div_1_2_rates },
2024 { .parent = NULL },
2025};
2026
2027/* Merged func_mcbsp3_gfclk into mcbsp3_ck */
2028static struct clk mcbsp3_ck = {
2029 .name = "mcbsp3_ck",
2030 .parent = &mcbsp3_sync_mux_ck,
2031 .clksel = func_mcbsp3_gfclk_sel,
2032 .init = &omap2_init_clksel_parent,
2033 .clksel_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
2034 .clksel_mask = OMAP4430_CLKSEL_SOURCE_MASK,
2035 .ops = &clkops_omap2_dflt,
2036 .recalc = &omap2_clksel_recalc,
2037 .flags = CLOCK_IN_OMAP4430,
2038 .enable_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
2039 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2040 .clkdm_name = "abe_clkdm",
2041};
2042
2043static struct clk mcbsp4_sync_mux_ck = {
2044 .name = "mcbsp4_sync_mux_ck",
2045 .parent = &func_96m_fclk,
2046 .clksel = mcasp2_fclk_sel,
2047 .init = &omap2_init_clksel_parent,
2048 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2049 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
2050 .ops = &clkops_null,
2051 .recalc = &omap2_clksel_recalc,
2052 .flags = CLOCK_IN_OMAP4430,
2053};
2054
2055static const struct clksel per_mcbsp4_gfclk_sel[] = {
2056 { .parent = &mcbsp4_sync_mux_ck, .rates = div_1_0_rates },
2057 { .parent = &pad_clks_ck, .rates = div_1_1_rates },
2058 { .parent = NULL },
2059};
2060
2061/* Merged per_mcbsp4_gfclk into mcbsp4_ck */
2062static struct clk mcbsp4_ck = {
2063 .name = "mcbsp4_ck",
2064 .parent = &mcbsp4_sync_mux_ck,
2065 .clksel = per_mcbsp4_gfclk_sel,
2066 .init = &omap2_init_clksel_parent,
2067 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2068 .clksel_mask = OMAP4430_CLKSEL_SOURCE_24_24_MASK,
2069 .ops = &clkops_omap2_dflt,
2070 .recalc = &omap2_clksel_recalc,
2071 .flags = CLOCK_IN_OMAP4430,
2072 .enable_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2073 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2074 .clkdm_name = "l4_per_clkdm",
2075};
2076
2077static struct clk mcspi1_ck = {
2078 .name = "mcspi1_ck",
2079 .ops = &clkops_omap2_dflt,
2080 .enable_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL,
2081 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2082 .clkdm_name = "l4_per_clkdm",
2083 .parent = &func_48m_fclk,
2084 .recalc = &followparent_recalc,
2085};
2086
2087static struct clk mcspi2_ck = {
2088 .name = "mcspi2_ck",
2089 .ops = &clkops_omap2_dflt,
2090 .enable_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL,
2091 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2092 .clkdm_name = "l4_per_clkdm",
2093 .parent = &func_48m_fclk,
2094 .recalc = &followparent_recalc,
2095};
2096
2097static struct clk mcspi3_ck = {
2098 .name = "mcspi3_ck",
2099 .ops = &clkops_omap2_dflt,
2100 .enable_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL,
2101 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2102 .clkdm_name = "l4_per_clkdm",
2103 .parent = &func_48m_fclk,
2104 .recalc = &followparent_recalc,
2105};
2106
2107static struct clk mcspi4_ck = {
2108 .name = "mcspi4_ck",
2109 .ops = &clkops_omap2_dflt,
2110 .enable_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL,
2111 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2112 .clkdm_name = "l4_per_clkdm",
2113 .parent = &func_48m_fclk,
2114 .recalc = &followparent_recalc,
2115};
2116
2117/* Merged hsmmc1_fclk into mmc1_ck */
2118static struct clk mmc1_ck = {
2119 .name = "mmc1_ck",
2120 .parent = &func_64m_fclk,
2121 .clksel = hsmmc6_fclk_sel,
2122 .init = &omap2_init_clksel_parent,
2123 .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
2124 .clksel_mask = OMAP4430_CLKSEL_MASK,
2125 .ops = &clkops_omap2_dflt,
2126 .recalc = &omap2_clksel_recalc,
2127 .flags = CLOCK_IN_OMAP4430,
2128 .enable_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
2129 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2130 .clkdm_name = "l3_init_clkdm",
2131};
2132
2133/* Merged hsmmc2_fclk into mmc2_ck */
2134static struct clk mmc2_ck = {
2135 .name = "mmc2_ck",
2136 .parent = &func_64m_fclk,
2137 .clksel = hsmmc6_fclk_sel,
2138 .init = &omap2_init_clksel_parent,
2139 .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2140 .clksel_mask = OMAP4430_CLKSEL_MASK,
2141 .ops = &clkops_omap2_dflt,
2142 .recalc = &omap2_clksel_recalc,
2143 .flags = CLOCK_IN_OMAP4430,
2144 .enable_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2145 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2146 .clkdm_name = "l3_init_clkdm",
2147};
2148
2149static struct clk mmc3_ck = {
2150 .name = "mmc3_ck",
2151 .ops = &clkops_omap2_dflt,
2152 .enable_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
2153 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2154 .clkdm_name = "l4_per_clkdm",
2155 .parent = &func_48m_fclk,
2156 .recalc = &followparent_recalc,
2157};
2158
2159static struct clk mmc4_ck = {
2160 .name = "mmc4_ck",
2161 .ops = &clkops_omap2_dflt,
2162 .enable_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
2163 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2164 .clkdm_name = "l4_per_clkdm",
2165 .parent = &func_48m_fclk,
2166 .recalc = &followparent_recalc,
2167};
2168
2169static struct clk mmc5_ck = {
2170 .name = "mmc5_ck",
2171 .ops = &clkops_omap2_dflt,
2172 .enable_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
2173 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2174 .clkdm_name = "l4_per_clkdm",
2175 .parent = &func_48m_fclk,
2176 .recalc = &followparent_recalc,
2177};
2178
2179static struct clk ocp_wp1_ck = {
2180 .name = "ocp_wp1_ck",
2181 .ops = &clkops_omap2_dflt,
2182 .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL,
2183 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2184 .clkdm_name = "l3_instr_clkdm",
2185 .parent = &l3_div_ck,
2186 .recalc = &followparent_recalc,
2187};
2188
2189static struct clk pdm_ck = {
2190 .name = "pdm_ck",
2191 .ops = &clkops_omap2_dflt,
2192 .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
2193 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2194 .clkdm_name = "abe_clkdm",
2195 .parent = &pad_clks_ck,
2196 .recalc = &followparent_recalc,
2197};
2198
2199static struct clk pkaeip29_ck = {
2200 .name = "pkaeip29_ck",
2201 .ops = &clkops_omap2_dflt,
2202 .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL,
2203 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2204 .clkdm_name = "l4_secure_clkdm",
2205 .parent = &l4_div_ck,
2206 .recalc = &followparent_recalc,
2207};
2208
2209static struct clk rng_ck = {
2210 .name = "rng_ck",
2211 .ops = &clkops_omap2_dflt,
2212 .enable_reg = OMAP4430_CM_L4SEC_RNG_CLKCTRL,
2213 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2214 .clkdm_name = "l4_secure_clkdm",
2215 .parent = &l4_div_ck,
2216 .recalc = &followparent_recalc,
2217};
2218
2219static struct clk sha2md51_ck = {
2220 .name = "sha2md51_ck",
2221 .ops = &clkops_omap2_dflt,
2222 .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL,
2223 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2224 .clkdm_name = "l4_secure_clkdm",
2225 .parent = &l3_div_ck,
2226 .recalc = &followparent_recalc,
2227};
2228
2229static struct clk sl2_ck = {
2230 .name = "sl2_ck",
2231 .ops = &clkops_omap2_dflt,
2232 .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL,
2233 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2234 .clkdm_name = "ivahd_clkdm",
2235 .parent = &dpll_iva_m5_ck,
2236 .recalc = &followparent_recalc,
2237};
2238
2239static struct clk slimbus1_ck = {
2240 .name = "slimbus1_ck",
2241 .ops = &clkops_omap2_dflt,
2242 .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL,
2243 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2244 .clkdm_name = "abe_clkdm",
2245 .parent = &ocp_abe_iclk,
2246 .recalc = &followparent_recalc,
2247};
2248
2249static struct clk slimbus2_ck = {
2250 .name = "slimbus2_ck",
2251 .ops = &clkops_omap2_dflt,
2252 .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL,
2253 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2254 .clkdm_name = "l4_per_clkdm",
2255 .parent = &l4_div_ck,
2256 .recalc = &followparent_recalc,
2257};
2258
2259static struct clk sr_core_ck = {
2260 .name = "sr_core_ck",
2261 .ops = &clkops_omap2_dflt,
2262 .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
2263 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2264 .clkdm_name = "l4_ao_clkdm",
2265 .parent = &l4_wkup_clk_mux_ck,
2266 .recalc = &followparent_recalc,
2267};
2268
2269static struct clk sr_iva_ck = {
2270 .name = "sr_iva_ck",
2271 .ops = &clkops_omap2_dflt,
2272 .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
2273 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2274 .clkdm_name = "l4_ao_clkdm",
2275 .parent = &l4_wkup_clk_mux_ck,
2276 .recalc = &followparent_recalc,
2277};
2278
2279static struct clk sr_mpu_ck = {
2280 .name = "sr_mpu_ck",
2281 .ops = &clkops_omap2_dflt,
2282 .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL,
2283 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2284 .clkdm_name = "l4_ao_clkdm",
2285 .parent = &l4_wkup_clk_mux_ck,
2286 .recalc = &followparent_recalc,
2287};
2288
2289static struct clk tesla_ck = {
2290 .name = "tesla_ck",
2291 .ops = &clkops_omap2_dflt,
2292 .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
2293 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2294 .clkdm_name = "tesla_clkdm",
2295 .parent = &dpll_iva_m4_ck,
2296 .recalc = &followparent_recalc,
2297};
2298
2299static struct clk uart1_ck = {
2300 .name = "uart1_ck",
2301 .ops = &clkops_omap2_dflt,
2302 .enable_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
2303 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2304 .clkdm_name = "l4_per_clkdm",
2305 .parent = &func_48m_fclk,
2306 .recalc = &followparent_recalc,
2307};
2308
2309static struct clk uart2_ck = {
2310 .name = "uart2_ck",
2311 .ops = &clkops_omap2_dflt,
2312 .enable_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
2313 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2314 .clkdm_name = "l4_per_clkdm",
2315 .parent = &func_48m_fclk,
2316 .recalc = &followparent_recalc,
2317};
2318
2319static struct clk uart3_ck = {
2320 .name = "uart3_ck",
2321 .ops = &clkops_omap2_dflt,
2322 .enable_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
2323 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2324 .clkdm_name = "l4_per_clkdm",
2325 .parent = &func_48m_fclk,
2326 .recalc = &followparent_recalc,
2327};
2328
2329static struct clk uart4_ck = {
2330 .name = "uart4_ck",
2331 .ops = &clkops_omap2_dflt,
2332 .enable_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
2333 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2334 .clkdm_name = "l4_per_clkdm",
2335 .parent = &func_48m_fclk,
2336 .recalc = &followparent_recalc,
2337};
2338
2339static struct clk unipro1_ck = {
2340 .name = "unipro1_ck",
2341 .ops = &clkops_omap2_dflt,
2342 .enable_reg = OMAP4430_CM_L3INIT_UNIPRO1_CLKCTRL,
2343 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2344 .clkdm_name = "l3_init_clkdm",
2345 .parent = &func_96m_fclk,
2346 .recalc = &followparent_recalc,
2347};
2348
2349static struct clk usb_host_ck = {
2350 .name = "usb_host_ck",
2351 .ops = &clkops_omap2_dflt,
2352 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2353 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2354 .clkdm_name = "l3_init_clkdm",
2355 .parent = &init_60m_fclk,
2356 .recalc = &followparent_recalc,
2357};
2358
2359static struct clk usb_host_fs_ck = {
2360 .name = "usb_host_fs_ck",
2361 .ops = &clkops_omap2_dflt,
2362 .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL,
2363 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2364 .clkdm_name = "l3_init_clkdm",
2365 .parent = &func_48mc_fclk,
2366 .recalc = &followparent_recalc,
2367};
2368
2369static struct clk usb_otg_ck = {
2370 .name = "usb_otg_ck",
2371 .ops = &clkops_omap2_dflt,
2372 .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2373 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2374 .clkdm_name = "l3_init_clkdm",
2375 .parent = &l3_div_ck,
2376 .recalc = &followparent_recalc,
2377};
2378
2379static struct clk usb_tll_ck = {
2380 .name = "usb_tll_ck",
2381 .ops = &clkops_omap2_dflt,
2382 .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL,
2383 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2384 .clkdm_name = "l3_init_clkdm",
2385 .parent = &l4_div_ck,
2386 .recalc = &followparent_recalc,
2387};
2388
2389static struct clk usbphyocp2scp_ck = {
2390 .name = "usbphyocp2scp_ck",
2391 .ops = &clkops_omap2_dflt,
2392 .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
2393 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2394 .clkdm_name = "l3_init_clkdm",
2395 .parent = &l4_div_ck,
2396 .recalc = &followparent_recalc,
2397};
2398
2399static struct clk usim_ck = {
2400 .name = "usim_ck",
2401 .ops = &clkops_omap2_dflt,
2402 .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2403 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2404 .clkdm_name = "l4_wkup_clkdm",
2405 .parent = &sys_32k_ck,
2406 .recalc = &followparent_recalc,
2407};
2408
2409static struct clk wdt2_ck = {
2410 .name = "wdt2_ck",
2411 .ops = &clkops_omap2_dflt,
2412 .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
2413 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2414 .clkdm_name = "l4_wkup_clkdm",
2415 .parent = &sys_32k_ck,
2416 .recalc = &followparent_recalc,
2417};
2418
2419static struct clk wdt3_ck = {
2420 .name = "wdt3_ck",
2421 .ops = &clkops_omap2_dflt,
2422 .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
2423 .enable_bit = OMAP4430_MODULEMODE_SWCTRL,
2424 .clkdm_name = "abe_clkdm",
2425 .parent = &sys_32k_ck,
2426 .recalc = &followparent_recalc,
2427};
2428
2429/* Remaining optional clocks */
2430static const struct clksel otg_60m_gfclk_sel[] = {
2431 { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates },
2432 { .parent = &xclk60motg_ck, .rates = div_1_1_rates },
2433 { .parent = NULL },
2434};
2435
2436static struct clk otg_60m_gfclk_ck = {
2437 .name = "otg_60m_gfclk_ck",
2438 .parent = &utmi_phy_clkout_ck,
2439 .clksel = otg_60m_gfclk_sel,
2440 .init = &omap2_init_clksel_parent,
2441 .clksel_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
2442 .clksel_mask = OMAP4430_CLKSEL_60M_MASK,
2443 .ops = &clkops_null,
2444 .recalc = &omap2_clksel_recalc,
2445 .flags = CLOCK_IN_OMAP4430,
2446};
2447
2448static const struct clksel stm_clk_div_div[] = {
2449 { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates },
2450 { .parent = NULL },
2451};
2452
2453static struct clk stm_clk_div_ck = {
2454 .name = "stm_clk_div_ck",
2455 .parent = &pmd_stm_clock_mux_ck,
2456 .clksel = stm_clk_div_div,
2457 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2458 .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK,
2459 .ops = &clkops_null,
2460 .recalc = &omap2_clksel_recalc,
2461 .round_rate = &omap2_clksel_round_rate,
2462 .set_rate = &omap2_clksel_set_rate,
2463 .flags = CLOCK_IN_OMAP4430,
2464};
2465
2466static const struct clksel trace_clk_div_div[] = {
2467 { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates },
2468 { .parent = NULL },
2469};
2470
2471static struct clk trace_clk_div_ck = {
2472 .name = "trace_clk_div_ck",
2473 .parent = &pmd_trace_clk_mux_ck,
2474 .clksel = trace_clk_div_div,
2475 .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL,
2476 .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK,
2477 .ops = &clkops_null,
2478 .recalc = &omap2_clksel_recalc,
2479 .round_rate = &omap2_clksel_round_rate,
2480 .set_rate = &omap2_clksel_set_rate,
2481 .flags = CLOCK_IN_OMAP4430,
2482};
2483
2484static const struct clksel_rate div2_14to18_rates[] = {
2485 { .div = 14, .val = 0, .flags = RATE_IN_4430 },
2486 { .div = 18, .val = 1, .flags = RATE_IN_4430 },
2487 { .div = 0 },
2488};
2489
2490static const struct clksel usim_fclk_div[] = {
2491 { .parent = &dpll_per_m4_ck, .rates = div2_14to18_rates },
2492 { .parent = NULL },
2493};
2494
2495static struct clk usim_fclk = {
2496 .name = "usim_fclk",
2497 .parent = &dpll_per_m4_ck,
2498 .clksel = usim_fclk_div,
2499 .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL,
2500 .clksel_mask = OMAP4430_CLKSEL_DIV_MASK,
2501 .ops = &clkops_null,
2502 .recalc = &omap2_clksel_recalc,
2503 .round_rate = &omap2_clksel_round_rate,
2504 .set_rate = &omap2_clksel_set_rate,
2505 .flags = CLOCK_IN_OMAP4430,
2506};
2507
2508static const struct clksel utmi_p1_gfclk_sel[] = {
2509 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2510 { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates },
2511 { .parent = NULL },
2512};
2513
2514static struct clk utmi_p1_gfclk_ck = {
2515 .name = "utmi_p1_gfclk_ck",
2516 .parent = &init_60m_fclk,
2517 .clksel = utmi_p1_gfclk_sel,
2518 .init = &omap2_init_clksel_parent,
2519 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2520 .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK,
2521 .ops = &clkops_null,
2522 .recalc = &omap2_clksel_recalc,
2523 .flags = CLOCK_IN_OMAP4430,
2524};
2525
2526static const struct clksel utmi_p2_gfclk_sel[] = {
2527 { .parent = &init_60m_fclk, .rates = div_1_0_rates },
2528 { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates },
2529 { .parent = NULL },
2530};
2531
2532static struct clk utmi_p2_gfclk_ck = {
2533 .name = "utmi_p2_gfclk_ck",
2534 .parent = &init_60m_fclk,
2535 .clksel = utmi_p2_gfclk_sel,
2536 .init = &omap2_init_clksel_parent,
2537 .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL,
2538 .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK,
2539 .ops = &clkops_null,
2540 .recalc = &omap2_clksel_recalc,
2541 .flags = CLOCK_IN_OMAP4430,
2542};
2543
2544/*
2545 * clkdev
2546 */
2547
2548static struct omap_clk omap44xx_clks[] = {
2549 CLK(NULL, "extalt_clkin_ck", &extalt_clkin_ck, CK_443X),
2550 CLK(NULL, "pad_clks_ck", &pad_clks_ck, CK_443X),
2551 CLK(NULL, "pad_slimbus_core_clks_ck", &pad_slimbus_core_clks_ck, CK_443X),
2552 CLK(NULL, "secure_32k_clk_src_ck", &secure_32k_clk_src_ck, CK_443X),
2553 CLK(NULL, "slimbus_clk", &slimbus_clk, CK_443X),
2554 CLK(NULL, "sys_32k_ck", &sys_32k_ck, CK_443X),
2555 CLK(NULL, "virt_12000000_ck", &virt_12000000_ck, CK_443X),
2556 CLK(NULL, "virt_13000000_ck", &virt_13000000_ck, CK_443X),
2557 CLK(NULL, "virt_16800000_ck", &virt_16800000_ck, CK_443X),
2558 CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_443X),
2559 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_443X),
2560 CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X),
2561 CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X),
2562 CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X),
2563 CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X),
2564 CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X),
2565 CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X),
2566 CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X),
2567 CLK(NULL, "dpll_sys_ref_clk", &dpll_sys_ref_clk, CK_443X),
2568 CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X),
2569 CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X),
2570 CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X),
2571 CLK(NULL, "abe_24m_fclk", &abe_24m_fclk, CK_443X),
2572 CLK(NULL, "abe_clk", &abe_clk, CK_443X),
2573 CLK(NULL, "aess_fclk", &aess_fclk, CK_443X),
2574 CLK(NULL, "dpll_abe_m3_ck", &dpll_abe_m3_ck, CK_443X),
2575 CLK(NULL, "core_hsd_byp_clk_mux_ck", &core_hsd_byp_clk_mux_ck, CK_443X),
2576 CLK(NULL, "dpll_core_ck", &dpll_core_ck, CK_443X),
2577 CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_443X),
2578 CLK(NULL, "dbgclk_mux_ck", &dbgclk_mux_ck, CK_443X),
2579 CLK(NULL, "dpll_core_m2_ck", &dpll_core_m2_ck, CK_443X),
2580 CLK(NULL, "ddrphy_ck", &ddrphy_ck, CK_443X),
2581 CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_443X),
2582 CLK(NULL, "div_core_ck", &div_core_ck, CK_443X),
2583 CLK(NULL, "div_iva_hs_clk", &div_iva_hs_clk, CK_443X),
2584 CLK(NULL, "div_mpu_hs_clk", &div_mpu_hs_clk, CK_443X),
2585 CLK(NULL, "dpll_core_m4_ck", &dpll_core_m4_ck, CK_443X),
2586 CLK(NULL, "dll_clk_div_ck", &dll_clk_div_ck, CK_443X),
2587 CLK(NULL, "dpll_abe_m2_ck", &dpll_abe_m2_ck, CK_443X),
2588 CLK(NULL, "dpll_core_m3_ck", &dpll_core_m3_ck, CK_443X),
2589 CLK(NULL, "dpll_core_m7_ck", &dpll_core_m7_ck, CK_443X),
2590 CLK(NULL, "iva_hsd_byp_clk_mux_ck", &iva_hsd_byp_clk_mux_ck, CK_443X),
2591 CLK(NULL, "dpll_iva_ck", &dpll_iva_ck, CK_443X),
2592 CLK(NULL, "dpll_iva_m4_ck", &dpll_iva_m4_ck, CK_443X),
2593 CLK(NULL, "dpll_iva_m5_ck", &dpll_iva_m5_ck, CK_443X),
2594 CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_443X),
2595 CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_443X),
2596 CLK(NULL, "per_hs_clk_div_ck", &per_hs_clk_div_ck, CK_443X),
2597 CLK(NULL, "per_hsd_byp_clk_mux_ck", &per_hsd_byp_clk_mux_ck, CK_443X),
2598 CLK(NULL, "dpll_per_ck", &dpll_per_ck, CK_443X),
2599 CLK(NULL, "dpll_per_m2_ck", &dpll_per_m2_ck, CK_443X),
2600 CLK(NULL, "dpll_per_m2x2_ck", &dpll_per_m2x2_ck, CK_443X),
2601 CLK(NULL, "dpll_per_m3_ck", &dpll_per_m3_ck, CK_443X),
2602 CLK(NULL, "dpll_per_m4_ck", &dpll_per_m4_ck, CK_443X),
2603 CLK(NULL, "dpll_per_m5_ck", &dpll_per_m5_ck, CK_443X),
2604 CLK(NULL, "dpll_per_m6_ck", &dpll_per_m6_ck, CK_443X),
2605 CLK(NULL, "dpll_per_m7_ck", &dpll_per_m7_ck, CK_443X),
2606 CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X),
2607 CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X),
2608 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X),
2609 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X),
2610 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X),
2611 CLK(NULL, "dpll_usb_m2_ck", &dpll_usb_m2_ck, CK_443X),
2612 CLK(NULL, "ducati_clk_mux_ck", &ducati_clk_mux_ck, CK_443X),
2613 CLK(NULL, "func_12m_fclk", &func_12m_fclk, CK_443X),
2614 CLK(NULL, "func_24m_clk", &func_24m_clk, CK_443X),
2615 CLK(NULL, "func_24mc_fclk", &func_24mc_fclk, CK_443X),
2616 CLK(NULL, "func_48m_fclk", &func_48m_fclk, CK_443X),
2617 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X),
2618 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X),
2619 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X),
2620 CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X),
2621 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X),
2622 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X),
2623 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
2624 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
2625 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
2626 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
2627 CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X),
2628 CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X),
2629 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
2630 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
2631 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X),
2632 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X),
2633 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X),
2634 CLK(NULL, "aes1_ck", &aes1_ck, CK_443X),
2635 CLK(NULL, "aes2_ck", &aes2_ck, CK_443X),
2636 CLK(NULL, "aess_ck", &aess_ck, CK_443X),
2637 CLK(NULL, "cust_efuse_ck", &cust_efuse_ck, CK_443X),
2638 CLK(NULL, "des3des_ck", &des3des_ck, CK_443X),
2639 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
2640 CLK(NULL, "dmic_ck", &dmic_ck, CK_443X),
2641 CLK(NULL, "dss_ck", &dss_ck, CK_443X),
2642 CLK(NULL, "ducati_ck", &ducati_ck, CK_443X),
2643 CLK(NULL, "emif1_ck", &emif1_ck, CK_443X),
2644 CLK(NULL, "emif2_ck", &emif2_ck, CK_443X),
2645 CLK(NULL, "fdif_ck", &fdif_ck, CK_443X),
2646 CLK(NULL, "per_sgx_fclk", &per_sgx_fclk, CK_443X),
2647 CLK(NULL, "gfx_ck", &gfx_ck, CK_443X),
2648 CLK(NULL, "gpio1_ck", &gpio1_ck, CK_443X),
2649 CLK(NULL, "gpio2_ck", &gpio2_ck, CK_443X),
2650 CLK(NULL, "gpio3_ck", &gpio3_ck, CK_443X),
2651 CLK(NULL, "gpio4_ck", &gpio4_ck, CK_443X),
2652 CLK(NULL, "gpio5_ck", &gpio5_ck, CK_443X),
2653 CLK(NULL, "gpio6_ck", &gpio6_ck, CK_443X),
2654 CLK(NULL, "gpmc_ck", &gpmc_ck, CK_443X),
2655 CLK(NULL, "gptimer1_ck", &gptimer1_ck, CK_443X),
2656 CLK(NULL, "gptimer10_ck", &gptimer10_ck, CK_443X),
2657 CLK(NULL, "gptimer11_ck", &gptimer11_ck, CK_443X),
2658 CLK(NULL, "gptimer2_ck", &gptimer2_ck, CK_443X),
2659 CLK(NULL, "gptimer3_ck", &gptimer3_ck, CK_443X),
2660 CLK(NULL, "gptimer4_ck", &gptimer4_ck, CK_443X),
2661 CLK(NULL, "gptimer5_ck", &gptimer5_ck, CK_443X),
2662 CLK(NULL, "gptimer6_ck", &gptimer6_ck, CK_443X),
2663 CLK(NULL, "gptimer7_ck", &gptimer7_ck, CK_443X),
2664 CLK(NULL, "gptimer8_ck", &gptimer8_ck, CK_443X),
2665 CLK(NULL, "gptimer9_ck", &gptimer9_ck, CK_443X),
2666 CLK("omap2_hdq.0", "ick", &hdq1w_ck, CK_443X),
2667 CLK(NULL, "hsi_ck", &hsi_ck, CK_443X),
2668 CLK("i2c_omap.1", "ick", &i2c1_ck, CK_443X),
2669 CLK("i2c_omap.2", "ick", &i2c2_ck, CK_443X),
2670 CLK("i2c_omap.3", "ick", &i2c3_ck, CK_443X),
2671 CLK("i2c_omap.4", "ick", &i2c4_ck, CK_443X),
2672 CLK(NULL, "iss_ck", &iss_ck, CK_443X),
2673 CLK(NULL, "ivahd_ck", &ivahd_ck, CK_443X),
2674 CLK(NULL, "keyboard_ck", &keyboard_ck, CK_443X),
2675 CLK(NULL, "l3_instr_interconnect_ck", &l3_instr_interconnect_ck, CK_443X),
2676 CLK(NULL, "l3_interconnect_3_ck", &l3_interconnect_3_ck, CK_443X),
2677 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
2678 CLK(NULL, "mcasp_ck", &mcasp_ck, CK_443X),
2679 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
2680 CLK("omap-mcbsp.1", "fck", &mcbsp1_ck, CK_443X),
2681 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
2682 CLK("omap-mcbsp.2", "fck", &mcbsp2_ck, CK_443X),
2683 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
2684 CLK("omap-mcbsp.3", "fck", &mcbsp3_ck, CK_443X),
2685 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
2686 CLK("omap-mcbsp.4", "fck", &mcbsp4_ck, CK_443X),
2687 CLK("omap2_mcspi.1", "fck", &mcspi1_ck, CK_443X),
2688 CLK("omap2_mcspi.2", "fck", &mcspi2_ck, CK_443X),
2689 CLK("omap2_mcspi.3", "fck", &mcspi3_ck, CK_443X),
2690 CLK("omap2_mcspi.4", "fck", &mcspi4_ck, CK_443X),
2691 CLK("mmci-omap-hs.0", "fck", &mmc1_ck, CK_443X),
2692 CLK("mmci-omap-hs.1", "fck", &mmc2_ck, CK_443X),
2693 CLK("mmci-omap-hs.2", "fck", &mmc3_ck, CK_443X),
2694 CLK("mmci-omap-hs.3", "fck", &mmc4_ck, CK_443X),
2695 CLK("mmci-omap-hs.4", "fck", &mmc5_ck, CK_443X),
2696 CLK(NULL, "ocp_wp1_ck", &ocp_wp1_ck, CK_443X),
2697 CLK(NULL, "pdm_ck", &pdm_ck, CK_443X),
2698 CLK(NULL, "pkaeip29_ck", &pkaeip29_ck, CK_443X),
2699 CLK("omap_rng", "ick", &rng_ck, CK_443X),
2700 CLK(NULL, "sha2md51_ck", &sha2md51_ck, CK_443X),
2701 CLK(NULL, "sl2_ck", &sl2_ck, CK_443X),
2702 CLK(NULL, "slimbus1_ck", &slimbus1_ck, CK_443X),
2703 CLK(NULL, "slimbus2_ck", &slimbus2_ck, CK_443X),
2704 CLK(NULL, "sr_core_ck", &sr_core_ck, CK_443X),
2705 CLK(NULL, "sr_iva_ck", &sr_iva_ck, CK_443X),
2706 CLK(NULL, "sr_mpu_ck", &sr_mpu_ck, CK_443X),
2707 CLK(NULL, "tesla_ck", &tesla_ck, CK_443X),
2708 CLK(NULL, "uart1_ck", &uart1_ck, CK_443X),
2709 CLK(NULL, "uart2_ck", &uart2_ck, CK_443X),
2710 CLK(NULL, "uart3_ck", &uart3_ck, CK_443X),
2711 CLK(NULL, "uart4_ck", &uart4_ck, CK_443X),
2712 CLK(NULL, "unipro1_ck", &unipro1_ck, CK_443X),
2713 CLK(NULL, "usb_host_ck", &usb_host_ck, CK_443X),
2714 CLK(NULL, "usb_host_fs_ck", &usb_host_fs_ck, CK_443X),
2715 CLK("musb_hdrc", "ick", &usb_otg_ck, CK_443X),
2716 CLK(NULL, "usb_tll_ck", &usb_tll_ck, CK_443X),
2717 CLK(NULL, "usbphyocp2scp_ck", &usbphyocp2scp_ck, CK_443X),
2718 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
2719 CLK("omap_wdt", "fck", &wdt2_ck, CK_443X),
2720 CLK(NULL, "wdt3_ck", &wdt3_ck, CK_443X),
2721 CLK(NULL, "otg_60m_gfclk_ck", &otg_60m_gfclk_ck, CK_443X),
2722 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X),
2723 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X),
2724 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
2725 CLK(NULL, "utmi_p1_gfclk_ck", &utmi_p1_gfclk_ck, CK_443X),
2726 CLK(NULL, "utmi_p2_gfclk_ck", &utmi_p2_gfclk_ck, CK_443X),
2727};
2728
2729int __init omap2_clk_init(void)
2730{
2731 /* struct prcm_config *prcm; */
2732 struct omap_clk *c;
2733 /* u32 clkrate; */
2734 u32 cpu_clkflg;
2735
2736 if (cpu_is_omap44xx()) {
2737 cpu_mask = RATE_IN_4430;
2738 cpu_clkflg = CK_443X;
2739 }
2740
2741 clk_init(&omap2_clk_functions);
2742
2743 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
2744 c++)
2745 clk_preinit(c->lk.clk);
2746
2747 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
2748 c++)
2749 if (c->cpu & cpu_clkflg) {
2750 clkdev_add(&c->lk);
2751 clk_register(c->lk.clk);
2752 /* TODO
2753 omap2_init_clk_clkdm(c->lk.clk);
2754 */
2755 }
2756
2757 recalculate_root_clocks();
2758
2759 /*
2760 * Only enable those clocks we will need, let the drivers
2761 * enable other clocks as necessary
2762 */
2763 clk_enable_init_clocks();
2764
2765 return 0;
2766}
diff --git a/arch/arm/mach-omap2/clock_common_data.c b/arch/arm/mach-omap2/clock_common_data.c
new file mode 100644
index 000000000000..f69096b88cdb
--- /dev/null
+++ b/arch/arm/mach-omap2/clock_common_data.c
@@ -0,0 +1,39 @@
1/*
2 * linux/arch/arm/mach-omap2/clock_common_data.c
3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation
6 *
7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Paul Walmsley
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 * This file contains clock data that is common to both the OMAP2xxx and
16 * OMAP3xxx clock definition files.
17 */
18
19#include "clock.h"
20
21/* clksel_rate data common to 24xx/343x */
22const struct clksel_rate gpt_32k_rates[] = {
23 { .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
24 { .div = 0 }
25};
26
27const struct clksel_rate gpt_sys_rates[] = {
28 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
29 { .div = 0 }
30};
31
32const struct clksel_rate gfx_l3_rates[] = {
33 { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X },
34 { .div = 2, .val = 2, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
35 { .div = 3, .val = 3, .flags = RATE_IN_243X | RATE_IN_343X },
36 { .div = 4, .val = 4, .flags = RATE_IN_243X | RATE_IN_343X },
37 { .div = 0 }
38};
39
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index fcd82320a6a3..1a45ed1e8ba1 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -2,7 +2,7 @@
2 * OMAP2/3 clockdomain framework functions 2 * OMAP2/3 clockdomain framework functions
3 * 3 *
4 * Copyright (C) 2008 Texas Instruments, Inc. 4 * Copyright (C) 2008 Texas Instruments, Inc.
5 * Copyright (C) 2008 Nokia Corporation 5 * Copyright (C) 2008-2009 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley and Jouni Högander 7 * Written by Paul Walmsley and Jouni Högander
8 * 8 *
@@ -10,9 +10,7 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#ifdef CONFIG_OMAP_DEBUG_CLOCKDOMAIN 13#undef DEBUG
14# define DEBUG
15#endif
16 14
17#include <linux/module.h> 15#include <linux/module.h>
18#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h
new file mode 100644
index 000000000000..0e67f75aa35c
--- /dev/null
+++ b/arch/arm/mach-omap2/cm-regbits-44xx.h
@@ -0,0 +1,1474 @@
1/*
2 * OMAP44xx Clock Management register bits
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
23#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
24
25#include "cm.h"
26
27
28/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
29#define OMAP4430_ABE_DYNDEP_SHIFT (1 << 3)
30#define OMAP4430_ABE_DYNDEP_MASK BITFIELD(3, 3)
31
32/*
33 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
34 * CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP,
35 * CM_TESLA_STATICDEP
36 */
37#define OMAP4430_ABE_STATDEP_SHIFT (1 << 3)
38#define OMAP4430_ABE_STATDEP_MASK BITFIELD(3, 3)
39
40/* Used by CM_L4CFG_DYNAMICDEP */
41#define OMAP4430_ALWONCORE_DYNDEP_SHIFT (1 << 16)
42#define OMAP4430_ALWONCORE_DYNDEP_MASK BITFIELD(16, 16)
43
44/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
45#define OMAP4430_ALWONCORE_STATDEP_SHIFT (1 << 16)
46#define OMAP4430_ALWONCORE_STATDEP_MASK BITFIELD(16, 16)
47
48/*
49 * Used by CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB,
50 * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE,
51 * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU
52 */
53#define OMAP4430_AUTO_DPLL_MODE_SHIFT (1 << 0)
54#define OMAP4430_AUTO_DPLL_MODE_MASK BITFIELD(0, 2)
55
56/* Used by CM_L4CFG_DYNAMICDEP */
57#define OMAP4430_CEFUSE_DYNDEP_SHIFT (1 << 17)
58#define OMAP4430_CEFUSE_DYNDEP_MASK BITFIELD(17, 17)
59
60/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
61#define OMAP4430_CEFUSE_STATDEP_SHIFT (1 << 17)
62#define OMAP4430_CEFUSE_STATDEP_MASK BITFIELD(17, 17)
63
64/* Used by CM1_ABE_CLKSTCTRL */
65#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT (1 << 13)
66#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK BITFIELD(13, 13)
67
68/* Used by CM1_ABE_CLKSTCTRL */
69#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT (1 << 12)
70#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK BITFIELD(12, 12)
71
72/* Used by CM_WKUP_CLKSTCTRL */
73#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT (1 << 9)
74#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK BITFIELD(9, 9)
75
76/* Used by CM1_ABE_CLKSTCTRL */
77#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT (1 << 11)
78#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK BITFIELD(11, 11)
79
80/* Used by CM1_ABE_CLKSTCTRL */
81#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT (1 << 8)
82#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK BITFIELD(8, 8)
83
84/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
85#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT (1 << 11)
86#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK BITFIELD(11, 11)
87
88/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
89#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT (1 << 12)
90#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK BITFIELD(12, 12)
91
92/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
93#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT (1 << 13)
94#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK BITFIELD(13, 13)
95
96/* Used by CM_CAM_CLKSTCTRL */
97#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT (1 << 9)
98#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK BITFIELD(9, 9)
99
100/* Used by CM_EMU_CLKSTCTRL */
101#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT (1 << 9)
102#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK BITFIELD(9, 9)
103
104/* Used by CM_CEFUSE_CLKSTCTRL */
105#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT (1 << 9)
106#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK BITFIELD(9, 9)
107
108/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
109#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT (1 << 9)
110#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK BITFIELD(9, 9)
111
112/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
113#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT (1 << 9)
114#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK BITFIELD(9, 9)
115
116/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
117#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT (1 << 10)
118#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK BITFIELD(10, 10)
119
120/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
121#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT (1 << 11)
122#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK BITFIELD(11, 11)
123
124/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
125#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT (1 << 12)
126#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK BITFIELD(12, 12)
127
128/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
129#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT (1 << 13)
130#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK BITFIELD(13, 13)
131
132/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
133#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT (1 << 14)
134#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK BITFIELD(14, 14)
135
136/* Used by CM_DSS_CLKSTCTRL */
137#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT (1 << 10)
138#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK BITFIELD(10, 10)
139
140/* Used by CM_DSS_CLKSTCTRL */
141#define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT (1 << 9)
142#define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK BITFIELD(9, 9)
143
144/* Used by CM_DUCATI_CLKSTCTRL */
145#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT (1 << 8)
146#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK BITFIELD(8, 8)
147
148/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
149#define OMAP4430_CLKACTIVITY_EMAC_50MHZ_CLK_SHIFT (1 << 10)
150#define OMAP4430_CLKACTIVITY_EMAC_50MHZ_CLK_MASK BITFIELD(10, 10)
151
152/* Used by CM_EMU_CLKSTCTRL */
153#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT (1 << 8)
154#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK BITFIELD(8, 8)
155
156/* Used by CM_CAM_CLKSTCTRL */
157#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT (1 << 10)
158#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK BITFIELD(10, 10)
159
160/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
161#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT (1 << 15)
162#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK BITFIELD(15, 15)
163
164/* Used by CM1_ABE_CLKSTCTRL */
165#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT (1 << 10)
166#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK BITFIELD(10, 10)
167
168/* Used by CM_DSS_CLKSTCTRL */
169#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT (1 << 11)
170#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK BITFIELD(11, 11)
171
172/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
173#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT (1 << 20)
174#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK BITFIELD(20, 20)
175
176/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
177#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT (1 << 26)
178#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK BITFIELD(26, 26)
179
180/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
181#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT (1 << 21)
182#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK BITFIELD(21, 21)
183
184/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
185#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT (1 << 27)
186#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK BITFIELD(27, 27)
187
188/* Used by CM_L3INIT_CLKSTCTRL */
189#define OMAP4430_CLKACTIVITY_INIT_32K_GFCLK_SHIFT (1 << 31)
190#define OMAP4430_CLKACTIVITY_INIT_32K_GFCLK_MASK BITFIELD(31, 31)
191
192/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
193#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT (1 << 13)
194#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK BITFIELD(13, 13)
195
196/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
197#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT (1 << 12)
198#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK BITFIELD(12, 12)
199
200/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
201#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT (1 << 28)
202#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK BITFIELD(28, 28)
203
204/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
205#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT (1 << 29)
206#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK BITFIELD(29, 29)
207
208/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
209#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT (1 << 11)
210#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK BITFIELD(11, 11)
211
212/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
213#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT (1 << 16)
214#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK BITFIELD(16, 16)
215
216/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
217#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT (1 << 17)
218#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK BITFIELD(17, 17)
219
220/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
221#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT (1 << 18)
222#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK BITFIELD(18, 18)
223
224/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
225#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT (1 << 19)
226#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK BITFIELD(19, 19)
227
228/* Used by CM_CAM_CLKSTCTRL */
229#define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT (1 << 8)
230#define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK BITFIELD(8, 8)
231
232/* Used by CM_IVAHD_CLKSTCTRL */
233#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT (1 << 8)
234#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK BITFIELD(8, 8)
235
236/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
237#define OMAP4430_CLKACTIVITY_L3INIT_DPLL_ALWON_CLK_SHIFT (1 << 14)
238#define OMAP4430_CLKACTIVITY_L3INIT_DPLL_ALWON_CLK_MASK BITFIELD(14, 14)
239
240/* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */
241#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT (1 << 8)
242#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK BITFIELD(8, 8)
243
244/* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */
245#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT (1 << 8)
246#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK BITFIELD(8, 8)
247
248/* Used by CM_D2D_CLKSTCTRL */
249#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT (1 << 8)
250#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK BITFIELD(8, 8)
251
252/* Used by CM_SDMA_CLKSTCTRL */
253#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT (1 << 8)
254#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK BITFIELD(8, 8)
255
256/* Used by CM_DSS_CLKSTCTRL */
257#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT (1 << 8)
258#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK BITFIELD(8, 8)
259
260/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
261#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT (1 << 8)
262#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK BITFIELD(8, 8)
263
264/* Used by CM_GFX_CLKSTCTRL */
265#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT (1 << 8)
266#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK BITFIELD(8, 8)
267
268/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
269#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT (1 << 8)
270#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK BITFIELD(8, 8)
271
272/* Used by CM_L3INSTR_CLKSTCTRL */
273#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT (1 << 8)
274#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK BITFIELD(8, 8)
275
276/* Used by CM_L4SEC_CLKSTCTRL */
277#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT (1 << 8)
278#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK BITFIELD(8, 8)
279
280/* Used by CM_ALWON_CLKSTCTRL */
281#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT (1 << 8)
282#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK BITFIELD(8, 8)
283
284/* Used by CM_CEFUSE_CLKSTCTRL */
285#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT (1 << 8)
286#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK BITFIELD(8, 8)
287
288/* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */
289#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT (1 << 8)
290#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK BITFIELD(8, 8)
291
292/* Used by CM_D2D_CLKSTCTRL */
293#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT (1 << 9)
294#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK BITFIELD(9, 9)
295
296/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
297#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT (1 << 9)
298#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK BITFIELD(9, 9)
299
300/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
301#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT (1 << 8)
302#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK BITFIELD(8, 8)
303
304/* Used by CM_L4SEC_CLKSTCTRL */
305#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT (1 << 9)
306#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK BITFIELD(9, 9)
307
308/* Used by CM_WKUP_CLKSTCTRL */
309#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT (1 << 12)
310#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK BITFIELD(12, 12)
311
312/* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */
313#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT (1 << 8)
314#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK BITFIELD(8, 8)
315
316/* Used by CM1_ABE_CLKSTCTRL */
317#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT (1 << 9)
318#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK BITFIELD(9, 9)
319
320/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
321#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT (1 << 16)
322#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK BITFIELD(16, 16)
323
324/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
325#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT (1 << 17)
326#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK BITFIELD(17, 17)
327
328/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
329#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT (1 << 18)
330#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK BITFIELD(18, 18)
331
332/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
333#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT (1 << 19)
334#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK BITFIELD(19, 19)
335
336/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
337#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT (1 << 25)
338#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK BITFIELD(25, 25)
339
340/* Used by CM_EMU_CLKSTCTRL */
341#define OMAP4430_CLKACTIVITY_PER_DPLL_EMU_CLK_SHIFT (1 << 10)
342#define OMAP4430_CLKACTIVITY_PER_DPLL_EMU_CLK_MASK BITFIELD(10, 10)
343
344/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
345#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT (1 << 20)
346#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK BITFIELD(20, 20)
347
348/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
349#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT (1 << 21)
350#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK BITFIELD(21, 21)
351
352/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
353#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT (1 << 22)
354#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK BITFIELD(22, 22)
355
356/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */
357#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT (1 << 24)
358#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK BITFIELD(24, 24)
359
360/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */
361#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT (1 << 10)
362#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK BITFIELD(10, 10)
363
364/* Used by CM_GFX_CLKSTCTRL */
365#define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT (1 << 9)
366#define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK BITFIELD(9, 9)
367
368/* Used by CM_ALWON_CLKSTCTRL */
369#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT (1 << 11)
370#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK BITFIELD(11, 11)
371
372/* Used by CM_ALWON_CLKSTCTRL */
373#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT (1 << 10)
374#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK BITFIELD(10, 10)
375
376/* Used by CM_ALWON_CLKSTCTRL */
377#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT (1 << 9)
378#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK BITFIELD(9, 9)
379
380/* Used by CM_WKUP_CLKSTCTRL */
381#define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT (1 << 8)
382#define OMAP4430_CLKACTIVITY_SYS_CLK_MASK BITFIELD(8, 8)
383
384/* Used by CM_TESLA_CLKSTCTRL */
385#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT (1 << 8)
386#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK BITFIELD(8, 8)
387
388/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
389#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT (1 << 22)
390#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK BITFIELD(22, 22)
391
392/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
393#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT (1 << 23)
394#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK BITFIELD(23, 23)
395
396/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
397#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT (1 << 24)
398#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK BITFIELD(24, 24)
399
400/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
401#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT (1 << 15)
402#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK BITFIELD(15, 15)
403
404/* Used by CM_WKUP_CLKSTCTRL */
405#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT (1 << 10)
406#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK BITFIELD(10, 10)
407
408/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
409#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT (1 << 30)
410#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK BITFIELD(30, 30)
411
412/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */
413#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT (1 << 25)
414#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK BITFIELD(25, 25)
415
416/* Used by CM_WKUP_CLKSTCTRL */
417#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT (1 << 11)
418#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK BITFIELD(11, 11)
419
420/*
421 * Used by CM_WKUP_TIMER1_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL,
422 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL,
423 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL,
424 * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL,
425 * CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MMC6_CLKCTRL,
426 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL,
427 * CM1_ABE_TIMER8_CLKCTRL
428 */
429#define OMAP4430_CLKSEL_SHIFT (1 << 24)
430#define OMAP4430_CLKSEL_MASK BITFIELD(24, 24)
431
432/*
433 * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL,
434 * CM_DPLL_SYS_REF_CLKSEL, CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT,
435 * CM_CLKSEL_USB_60MHZ
436 */
437#define OMAP4430_CLKSEL_0_0_SHIFT (1 << 0)
438#define OMAP4430_CLKSEL_0_0_MASK BITFIELD(0, 0)
439
440/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */
441#define OMAP4430_CLKSEL_0_1_SHIFT (1 << 0)
442#define OMAP4430_CLKSEL_0_1_MASK BITFIELD(0, 1)
443
444/* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */
445#define OMAP4430_CLKSEL_24_25_SHIFT (1 << 24)
446#define OMAP4430_CLKSEL_24_25_MASK BITFIELD(24, 25)
447
448/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
449#define OMAP4430_CLKSEL_60M_SHIFT (1 << 24)
450#define OMAP4430_CLKSEL_60M_MASK BITFIELD(24, 24)
451
452/* Used by CM1_ABE_AESS_CLKCTRL */
453#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT (1 << 24)
454#define OMAP4430_CLKSEL_AESS_FCLK_MASK BITFIELD(24, 24)
455
456/* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */
457#define OMAP4430_CLKSEL_CORE_SHIFT (1 << 0)
458#define OMAP4430_CLKSEL_CORE_MASK BITFIELD(0, 0)
459
460/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */
461#define OMAP4430_CLKSEL_CORE_1_1_SHIFT (1 << 1)
462#define OMAP4430_CLKSEL_CORE_1_1_MASK BITFIELD(1, 1)
463
464/* Used by CM_WKUP_USIM_CLKCTRL */
465#define OMAP4430_CLKSEL_DIV_SHIFT (1 << 24)
466#define OMAP4430_CLKSEL_DIV_MASK BITFIELD(24, 24)
467
468/* Used by CM_CAM_FDIF_CLKCTRL */
469#define OMAP4430_CLKSEL_FCLK_SHIFT (1 << 24)
470#define OMAP4430_CLKSEL_FCLK_MASK BITFIELD(24, 25)
471
472/* Used by CM_L4PER_MCBSP4_CLKCTRL */
473#define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT (1 << 25)
474#define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK BITFIELD(25, 25)
475
476/*
477 * Renamed from CLKSEL_INTERNAL_SOURCE Used by CM1_ABE_DMIC_CLKCTRL,
478 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
479 * CM1_ABE_MCBSP3_CLKCTRL
480 */
481#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT (1 << 26)
482#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK BITFIELD(26, 27)
483
484/* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */
485#define OMAP4430_CLKSEL_L3_SHIFT (1 << 4)
486#define OMAP4430_CLKSEL_L3_MASK BITFIELD(4, 4)
487
488/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
489#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT (1 << 2)
490#define OMAP4430_CLKSEL_L3_SHADOW_MASK BITFIELD(2, 2)
491
492/* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */
493#define OMAP4430_CLKSEL_L4_SHIFT (1 << 8)
494#define OMAP4430_CLKSEL_L4_MASK BITFIELD(8, 8)
495
496/* Used by CM_CLKSEL_ABE */
497#define OMAP4430_CLKSEL_OPP_SHIFT (1 << 0)
498#define OMAP4430_CLKSEL_OPP_MASK BITFIELD(0, 1)
499
500/* Used by CM_GFX_GFX_CLKCTRL */
501#define OMAP4430_CLKSEL_PER_192M_SHIFT (1 << 25)
502#define OMAP4430_CLKSEL_PER_192M_MASK BITFIELD(25, 26)
503
504/* Used by CM_EMU_DEBUGSS_CLKCTRL */
505#define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT (1 << 27)
506#define OMAP4430_CLKSEL_PMD_STM_CLK_MASK BITFIELD(27, 29)
507
508/* Used by CM_EMU_DEBUGSS_CLKCTRL */
509#define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT (1 << 24)
510#define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK BITFIELD(24, 26)
511
512/* Used by CM_GFX_GFX_CLKCTRL */
513#define OMAP4430_CLKSEL_SGX_FCLK_SHIFT (1 << 24)
514#define OMAP4430_CLKSEL_SGX_FCLK_MASK BITFIELD(24, 24)
515
516/*
517 * Used by CM1_ABE_DMIC_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL,
518 * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL
519 */
520#define OMAP4430_CLKSEL_SOURCE_SHIFT (1 << 24)
521#define OMAP4430_CLKSEL_SOURCE_MASK BITFIELD(24, 25)
522
523/* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */
524#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT (1 << 24)
525#define OMAP4430_CLKSEL_SOURCE_24_24_MASK BITFIELD(24, 24)
526
527/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
528#define OMAP4430_CLKSEL_UTMI_P1_SHIFT (1 << 24)
529#define OMAP4430_CLKSEL_UTMI_P1_MASK BITFIELD(24, 24)
530
531/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
532#define OMAP4430_CLKSEL_UTMI_P2_SHIFT (1 << 25)
533#define OMAP4430_CLKSEL_UTMI_P2_MASK BITFIELD(25, 25)
534
535/*
536 * Used by CM_WKUP_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_D2D_CLKSTCTRL,
537 * CM_DUCATI_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL,
538 * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_MEMIF_CLKSTCTRL,
539 * CM_SDMA_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_L4PER_CLKSTCTRL, CM_L4SEC_CLKSTCTRL,
540 * CM_L3INIT_CLKSTCTRL, CM_CAM_CLKSTCTRL, CM_CEFUSE_CLKSTCTRL,
541 * CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3_1_CLKSTCTRL_RESTORE,
542 * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL_RESTORE,
543 * CM_L4PER_CLKSTCTRL_RESTORE, CM_MEMIF_CLKSTCTRL_RESTORE, CM_ALWON_CLKSTCTRL,
544 * CM_IVAHD_CLKSTCTRL, CM_DSS_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_TESLA_CLKSTCTRL,
545 * CM1_ABE_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE
546 */
547#define OMAP4430_CLKTRCTRL_SHIFT (1 << 0)
548#define OMAP4430_CLKTRCTRL_MASK BITFIELD(0, 1)
549
550/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
551#define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT (1 << 0)
552#define OMAP4430_CORE_DPLL_EMU_DIV_MASK BITFIELD(0, 6)
553
554/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
555#define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT (1 << 8)
556#define OMAP4430_CORE_DPLL_EMU_MULT_MASK BITFIELD(8, 18)
557
558/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
559#define OMAP4430_D2D_DYNDEP_SHIFT (1 << 18)
560#define OMAP4430_D2D_DYNDEP_MASK BITFIELD(18, 18)
561
562/* Used by CM_MPU_STATICDEP */
563#define OMAP4430_D2D_STATDEP_SHIFT (1 << 18)
564#define OMAP4430_D2D_STATDEP_MASK BITFIELD(18, 18)
565
566/*
567 * Used by CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO,
568 * CM_SSC_DELTAMSTEP_DPLL_USB, CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE,
569 * CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
570 * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA,
571 * CM_SSC_DELTAMSTEP_DPLL_MPU
572 */
573#define OMAP4430_DELTAMSTEP_SHIFT (1 << 0)
574#define OMAP4430_DELTAMSTEP_MASK BITFIELD(0, 19)
575
576/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
577#define OMAP4430_DLL_OVERRIDE_SHIFT (1 << 2)
578#define OMAP4430_DLL_OVERRIDE_MASK BITFIELD(2, 2)
579
580/* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */
581#define OMAP4430_DLL_OVERRIDE_0_0_SHIFT (1 << 0)
582#define OMAP4430_DLL_OVERRIDE_0_0_MASK BITFIELD(0, 0)
583
584/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
585#define OMAP4430_DLL_RESET_SHIFT (1 << 3)
586#define OMAP4430_DLL_RESET_MASK BITFIELD(3, 3)
587
588/*
589 * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB,
590 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
591 * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU
592 */
593#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT (1 << 23)
594#define OMAP4430_DPLL_BYP_CLKSEL_MASK BITFIELD(23, 23)
595
596/* Used by CM_CLKDCOLDO_DPLL_USB */
597#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT (1 << 8)
598#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK BITFIELD(8, 8)
599
600/* Used by CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_CORE */
601#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT (1 << 20)
602#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK BITFIELD(20, 20)
603
604/*
605 * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE,
606 * CM_DIV_M3_DPLL_CORE
607 */
608#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT (1 << 0)
609#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK BITFIELD(0, 4)
610
611/*
612 * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE,
613 * CM_DIV_M3_DPLL_CORE
614 */
615#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT (1 << 5)
616#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK BITFIELD(5, 5)
617
618/*
619 * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE,
620 * CM_DIV_M3_DPLL_CORE
621 */
622#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT (1 << 8)
623#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK BITFIELD(8, 8)
624
625/* Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, CM_DIV_M2_DPLL_ABE */
626#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT (1 << 10)
627#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK BITFIELD(10, 10)
628
629/*
630 * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO,
631 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
632 * CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU
633 */
634#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT (1 << 0)
635#define OMAP4430_DPLL_CLKOUT_DIV_MASK BITFIELD(0, 4)
636
637/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */
638#define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT (1 << 0)
639#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK BITFIELD(0, 6)
640
641/*
642 * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO,
643 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
644 * CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU
645 */
646#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT (1 << 5)
647#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK BITFIELD(5, 5)
648
649/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */
650#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT (1 << 7)
651#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK BITFIELD(7, 7)
652
653/*
654 * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB, CM_DIV_M2_DPLL_CORE_RESTORE,
655 * CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
656 * CM_DIV_M2_DPLL_MPU
657 */
658#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT (1 << 8)
659#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK BITFIELD(8, 8)
660
661/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
662#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT (1 << 8)
663#define OMAP4430_DPLL_CORE_DPLL_EN_MASK BITFIELD(8, 10)
664
665/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
666#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT (1 << 11)
667#define OMAP4430_DPLL_CORE_M2_DIV_MASK BITFIELD(11, 15)
668
669/* Used by CM_SHADOW_FREQ_CONFIG2 */
670#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT (1 << 3)
671#define OMAP4430_DPLL_CORE_M5_DIV_MASK BITFIELD(3, 7)
672
673/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
674#define OMAP4430_DPLL_CORE_SYS_REF_CLKSEL_SHIFT (1 << 1)
675#define OMAP4430_DPLL_CORE_SYS_REF_CLKSEL_MASK BITFIELD(1, 1)
676
677/*
678 * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO,
679 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
680 * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU
681 */
682#define OMAP4430_DPLL_DIV_SHIFT (1 << 0)
683#define OMAP4430_DPLL_DIV_MASK BITFIELD(0, 6)
684
685/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */
686#define OMAP4430_DPLL_DIV_0_7_SHIFT (1 << 0)
687#define OMAP4430_DPLL_DIV_0_7_MASK BITFIELD(0, 7)
688
689/*
690 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_USB,
691 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
692 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
693 */
694#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT (1 << 8)
695#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK BITFIELD(8, 8)
696
697/* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */
698#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT (1 << 3)
699#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK BITFIELD(3, 3)
700
701/*
702 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB,
703 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
704 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
705 */
706#define OMAP4430_DPLL_EN_SHIFT (1 << 0)
707#define OMAP4430_DPLL_EN_MASK BITFIELD(0, 2)
708
709/*
710 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
711 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
712 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
713 */
714#define OMAP4430_DPLL_LPMODE_EN_SHIFT (1 << 10)
715#define OMAP4430_DPLL_LPMODE_EN_MASK BITFIELD(10, 10)
716
717/*
718 * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO,
719 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE,
720 * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU
721 */
722#define OMAP4430_DPLL_MULT_SHIFT (1 << 8)
723#define OMAP4430_DPLL_MULT_MASK BITFIELD(8, 18)
724
725/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */
726#define OMAP4430_DPLL_MULT_USB_SHIFT (1 << 8)
727#define OMAP4430_DPLL_MULT_USB_MASK BITFIELD(8, 19)
728
729/*
730 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO,
731 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
732 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
733 */
734#define OMAP4430_DPLL_REGM4XEN_SHIFT (1 << 11)
735#define OMAP4430_DPLL_REGM4XEN_MASK BITFIELD(11, 11)
736
737/* Used by CM_CLKSEL_DPLL_USB */
738#define OMAP4430_DPLL_SD_DIV_SHIFT (1 << 24)
739#define OMAP4430_DPLL_SD_DIV_MASK BITFIELD(24, 31)
740
741/*
742 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB,
743 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
744 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
745 */
746#define OMAP4430_DPLL_SSC_ACK_SHIFT (1 << 13)
747#define OMAP4430_DPLL_SSC_ACK_MASK BITFIELD(13, 13)
748
749/*
750 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB,
751 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
752 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
753 */
754#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT (1 << 14)
755#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK BITFIELD(14, 14)
756
757/*
758 * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB,
759 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE,
760 * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU
761 */
762#define OMAP4430_DPLL_SSC_EN_SHIFT (1 << 12)
763#define OMAP4430_DPLL_SSC_EN_MASK BITFIELD(12, 12)
764
765/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
766#define OMAP4430_DSS_DYNDEP_SHIFT (1 << 8)
767#define OMAP4430_DSS_DYNDEP_MASK BITFIELD(8, 8)
768
769/*
770 * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE,
771 * CM_MPU_STATICDEP
772 */
773#define OMAP4430_DSS_STATDEP_SHIFT (1 << 8)
774#define OMAP4430_DSS_STATDEP_MASK BITFIELD(8, 8)
775
776/* Used by CM_L3_2_DYNAMICDEP */
777#define OMAP4430_DUCATI_DYNDEP_SHIFT (1 << 0)
778#define OMAP4430_DUCATI_DYNDEP_MASK BITFIELD(0, 0)
779
780/* Used by CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP */
781#define OMAP4430_DUCATI_STATDEP_SHIFT (1 << 0)
782#define OMAP4430_DUCATI_STATDEP_MASK BITFIELD(0, 0)
783
784/* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */
785#define OMAP4430_FREQ_UPDATE_SHIFT (1 << 0)
786#define OMAP4430_FREQ_UPDATE_MASK BITFIELD(0, 0)
787
788/* Used by CM_L3_2_DYNAMICDEP */
789#define OMAP4430_GFX_DYNDEP_SHIFT (1 << 10)
790#define OMAP4430_GFX_DYNDEP_MASK BITFIELD(10, 10)
791
792/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
793#define OMAP4430_GFX_STATDEP_SHIFT (1 << 10)
794#define OMAP4430_GFX_STATDEP_MASK BITFIELD(10, 10)
795
796/* Used by CM_SHADOW_FREQ_CONFIG2 */
797#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT (1 << 0)
798#define OMAP4430_GPMC_FREQ_UPDATE_MASK BITFIELD(0, 0)
799
800/*
801 * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE,
802 * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA
803 */
804#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT (1 << 0)
805#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK BITFIELD(0, 4)
806
807/*
808 * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE,
809 * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA
810 */
811#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT (1 << 5)
812#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK BITFIELD(5, 5)
813
814/*
815 * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE,
816 * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA
817 */
818#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT (1 << 8)
819#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK BITFIELD(8, 8)
820
821/*
822 * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE,
823 * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA
824 */
825#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT (1 << 12)
826#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK BITFIELD(12, 12)
827
828/*
829 * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE,
830 * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA
831 */
832#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT (1 << 0)
833#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK BITFIELD(0, 4)
834
835/*
836 * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE,
837 * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA
838 */
839#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT (1 << 5)
840#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK BITFIELD(5, 5)
841
842/*
843 * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE,
844 * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA
845 */
846#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT (1 << 8)
847#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK BITFIELD(8, 8)
848
849/*
850 * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE,
851 * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA
852 */
853#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT (1 << 12)
854#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK BITFIELD(12, 12)
855
856/*
857 * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE,
858 * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY
859 */
860#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT (1 << 0)
861#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK BITFIELD(0, 4)
862
863/*
864 * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE,
865 * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY
866 */
867#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT (1 << 5)
868#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK BITFIELD(5, 5)
869
870/*
871 * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE,
872 * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY
873 */
874#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT (1 << 8)
875#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK BITFIELD(8, 8)
876
877/*
878 * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE,
879 * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY
880 */
881#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT (1 << 12)
882#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK BITFIELD(12, 12)
883
884/*
885 * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE,
886 * CM_DIV_M7_DPLL_CORE
887 */
888#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT (1 << 0)
889#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK BITFIELD(0, 4)
890
891/*
892 * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE,
893 * CM_DIV_M7_DPLL_CORE
894 */
895#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT (1 << 5)
896#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK BITFIELD(5, 5)
897
898/*
899 * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE,
900 * CM_DIV_M7_DPLL_CORE
901 */
902#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT (1 << 8)
903#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK BITFIELD(8, 8)
904
905/*
906 * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE,
907 * CM_DIV_M7_DPLL_CORE
908 */
909#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT (1 << 12)
910#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK BITFIELD(12, 12)
911
912/*
913 * Used by PRM_PRM_PROFILING_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL,
914 * CM_WKUP_KEYBOARD_CLKCTRL, CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL,
915 * CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL,
916 * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL,
917 * CM_WKUP_WDT2_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL,
918 * CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
919 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
920 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
921 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
922 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
923 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
924 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL,
925 * CM_MEMIF_EMIF_H2_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL,
926 * CM_L4PER_ADC_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL,
927 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL,
928 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL,
929 * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
930 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
931 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL,
932 * CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
933 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
934 * CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL,
935 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
936 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL,
937 * CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL,
938 * CM_L4PER_MSPROHG_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
939 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
940 * CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL,
941 * CM_L4SEC_DES3DES_CLKCTRL, CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
942 * CM_L4SEC_SHA2MD51_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL,
943 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
944 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
945 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
946 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
947 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
948 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
949 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
950 * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE,
951 * CM_L3INSTR_L3_3_CLKCTRL_RESTORE, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
952 * CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
953 * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
954 * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE,
955 * CM_ALWON_MDMINTC_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL,
956 * CM_ALWON_SR_MPU_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, CM_IVAHD_SL2_CLKCTRL,
957 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
958 * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL,
959 * CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, CM1_ABE_MCASP_CLKCTRL,
960 * CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL,
961 * CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, CM1_ABE_TIMER5_CLKCTRL,
962 * CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL,
963 * CM1_ABE_WDT3_CLKCTRL, CM_CM1_PROFILING_CLKCTRL
964 */
965#define OMAP4430_IDLEST_SHIFT (1 << 16)
966#define OMAP4430_IDLEST_MASK BITFIELD(16, 17)
967
968/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
969#define OMAP4430_ISS_DYNDEP_SHIFT (1 << 9)
970#define OMAP4430_ISS_DYNDEP_MASK BITFIELD(9, 9)
971
972/*
973 * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE,
974 * CM_MPU_STATICDEP, CM_TESLA_STATICDEP
975 */
976#define OMAP4430_ISS_STATDEP_SHIFT (1 << 9)
977#define OMAP4430_ISS_STATDEP_MASK BITFIELD(9, 9)
978
979/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
980#define OMAP4430_IVAHD_DYNDEP_SHIFT (1 << 2)
981#define OMAP4430_IVAHD_DYNDEP_MASK BITFIELD(2, 2)
982
983/*
984 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
985 * CM_GFX_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP,
986 * CM_SDMA_STATICDEP_RESTORE, CM_DSS_STATICDEP, CM_MPU_STATICDEP,
987 * CM_TESLA_STATICDEP
988 */
989#define OMAP4430_IVAHD_STATDEP_SHIFT (1 << 2)
990#define OMAP4430_IVAHD_STATDEP_MASK BITFIELD(2, 2)
991
992/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
993#define OMAP4430_L3INIT_DYNDEP_SHIFT (1 << 7)
994#define OMAP4430_L3INIT_DYNDEP_MASK BITFIELD(7, 7)
995
996/*
997 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
998 * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, CM_TESLA_STATICDEP
999 */
1000#define OMAP4430_L3INIT_STATDEP_SHIFT (1 << 7)
1001#define OMAP4430_L3INIT_STATDEP_MASK BITFIELD(7, 7)
1002
1003/*
1004 * Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L3INIT_DYNAMICDEP,
1005 * CM_DSS_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1006 */
1007#define OMAP4430_L3_1_DYNDEP_SHIFT (1 << 5)
1008#define OMAP4430_L3_1_DYNDEP_MASK BITFIELD(5, 5)
1009
1010/*
1011 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
1012 * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP,
1013 * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP,
1014 * CM_MPU_STATICDEP, CM_TESLA_STATICDEP
1015 */
1016#define OMAP4430_L3_1_STATDEP_SHIFT (1 << 5)
1017#define OMAP4430_L3_1_STATDEP_MASK BITFIELD(5, 5)
1018
1019/*
1020 * Used by CM_EMU_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP,
1021 * CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_SDMA_DYNAMICDEP,
1022 * CM_GFX_DYNAMICDEP, CM_L4SEC_DYNAMICDEP, CM_L3INIT_DYNAMICDEP,
1023 * CM_CAM_DYNAMICDEP, CM_IVAHD_DYNAMICDEP
1024 */
1025#define OMAP4430_L3_2_DYNDEP_SHIFT (1 << 6)
1026#define OMAP4430_L3_2_DYNDEP_MASK BITFIELD(6, 6)
1027
1028/*
1029 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
1030 * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP,
1031 * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP,
1032 * CM_MPU_STATICDEP, CM_TESLA_STATICDEP
1033 */
1034#define OMAP4430_L3_2_STATDEP_SHIFT (1 << 6)
1035#define OMAP4430_L3_2_STATDEP_MASK BITFIELD(6, 6)
1036
1037/* Used by CM_L3_1_DYNAMICDEP */
1038#define OMAP4430_L4CFG_DYNDEP_SHIFT (1 << 12)
1039#define OMAP4430_L4CFG_DYNDEP_MASK BITFIELD(12, 12)
1040
1041/*
1042 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
1043 * CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP,
1044 * CM_TESLA_STATICDEP
1045 */
1046#define OMAP4430_L4CFG_STATDEP_SHIFT (1 << 12)
1047#define OMAP4430_L4CFG_STATDEP_MASK BITFIELD(12, 12)
1048
1049/* Used by CM_L3_2_DYNAMICDEP */
1050#define OMAP4430_L4PER_DYNDEP_SHIFT (1 << 13)
1051#define OMAP4430_L4PER_DYNDEP_MASK BITFIELD(13, 13)
1052
1053/*
1054 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
1055 * CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE,
1056 * CM_MPU_STATICDEP, CM_TESLA_STATICDEP
1057 */
1058#define OMAP4430_L4PER_STATDEP_SHIFT (1 << 13)
1059#define OMAP4430_L4PER_STATDEP_MASK BITFIELD(13, 13)
1060
1061/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1062#define OMAP4430_L4SEC_DYNDEP_SHIFT (1 << 14)
1063#define OMAP4430_L4SEC_DYNDEP_MASK BITFIELD(14, 14)
1064
1065/*
1066 * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_L3INIT_STATICDEP,
1067 * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP
1068 */
1069#define OMAP4430_L4SEC_STATDEP_SHIFT (1 << 14)
1070#define OMAP4430_L4SEC_STATDEP_MASK BITFIELD(14, 14)
1071
1072/* Used by CM_L4CFG_DYNAMICDEP */
1073#define OMAP4430_L4WKUP_DYNDEP_SHIFT (1 << 15)
1074#define OMAP4430_L4WKUP_DYNDEP_MASK BITFIELD(15, 15)
1075
1076/*
1077 * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_L3INIT_STATICDEP,
1078 * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, CM_TESLA_STATICDEP
1079 */
1080#define OMAP4430_L4WKUP_STATDEP_SHIFT (1 << 15)
1081#define OMAP4430_L4WKUP_STATDEP_MASK BITFIELD(15, 15)
1082
1083/*
1084 * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1085 * CM_MPU_DYNAMICDEP
1086 */
1087#define OMAP4430_MEMIF_DYNDEP_SHIFT (1 << 4)
1088#define OMAP4430_MEMIF_DYNDEP_MASK BITFIELD(4, 4)
1089
1090/*
1091 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP,
1092 * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP,
1093 * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP,
1094 * CM_MPU_STATICDEP, CM_TESLA_STATICDEP
1095 */
1096#define OMAP4430_MEMIF_STATDEP_SHIFT (1 << 4)
1097#define OMAP4430_MEMIF_STATDEP_MASK BITFIELD(4, 4)
1098
1099/*
1100 * Used by CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO,
1101 * CM_SSC_MODFREQDIV_DPLL_USB, CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE,
1102 * CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1103 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1104 * CM_SSC_MODFREQDIV_DPLL_MPU
1105 */
1106#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT (1 << 8)
1107#define OMAP4430_MODFREQDIV_EXPONENT_MASK BITFIELD(8, 10)
1108
1109/*
1110 * Used by CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO,
1111 * CM_SSC_MODFREQDIV_DPLL_USB, CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE,
1112 * CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1113 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1114 * CM_SSC_MODFREQDIV_DPLL_MPU
1115 */
1116#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT (1 << 0)
1117#define OMAP4430_MODFREQDIV_MANTISSA_MASK BITFIELD(0, 6)
1118
1119/*
1120 * Used by PRM_PRM_PROFILING_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL,
1121 * CM_WKUP_KEYBOARD_CLKCTRL, CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL,
1122 * CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL,
1123 * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL,
1124 * CM_WKUP_WDT2_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL,
1125 * CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1126 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1127 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
1128 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
1129 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1130 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
1131 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL,
1132 * CM_MEMIF_EMIF_H2_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL,
1133 * CM_L4PER_ADC_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL,
1134 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL,
1135 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL,
1136 * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1137 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1138 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL,
1139 * CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
1140 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
1141 * CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL,
1142 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1143 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL,
1144 * CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL,
1145 * CM_L4PER_MSPROHG_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
1146 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
1147 * CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL,
1148 * CM_L4SEC_DES3DES_CLKCTRL, CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
1149 * CM_L4SEC_SHA2MD51_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL,
1150 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
1151 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
1152 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
1153 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
1154 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
1155 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1156 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
1157 * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE,
1158 * CM_L3INSTR_L3_3_CLKCTRL_RESTORE, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
1159 * CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
1160 * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
1161 * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE,
1162 * CM_ALWON_MDMINTC_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL,
1163 * CM_ALWON_SR_MPU_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, CM_IVAHD_SL2_CLKCTRL,
1164 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
1165 * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL,
1166 * CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, CM1_ABE_MCASP_CLKCTRL,
1167 * CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL,
1168 * CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, CM1_ABE_TIMER5_CLKCTRL,
1169 * CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL,
1170 * CM1_ABE_WDT3_CLKCTRL, CM_CM1_PROFILING_CLKCTRL
1171 */
1172#define OMAP4430_MODULEMODE_SHIFT (1 << 0)
1173#define OMAP4430_MODULEMODE_MASK BITFIELD(0, 1)
1174
1175/* Used by CM_DSS_DSS_CLKCTRL */
1176#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT (1 << 9)
1177#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK BITFIELD(9, 9)
1178
1179/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1180#define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT (1 << 8)
1181#define OMAP4430_OPTFCLKEN_BGAP_32K_MASK BITFIELD(8, 8)
1182
1183/* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */
1184#define OMAP4430_OPTFCLKEN_CLK32K_SHIFT (1 << 9)
1185#define OMAP4430_OPTFCLKEN_CLK32K_MASK BITFIELD(9, 9)
1186
1187/* Used by CM_CAM_ISS_CLKCTRL */
1188#define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT (1 << 8)
1189#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK BITFIELD(8, 8)
1190
1191/*
1192 * Used by CM_WKUP_GPIO1_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1193 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1194 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE,
1195 * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE,
1196 * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE
1197 */
1198#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT (1 << 8)
1199#define OMAP4430_OPTFCLKEN_DBCLK_MASK BITFIELD(8, 8)
1200
1201/* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */
1202#define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT (1 << 8)
1203#define OMAP4430_OPTFCLKEN_DLL_CLK_MASK BITFIELD(8, 8)
1204
1205/* Used by CM_DSS_DSS_CLKCTRL */
1206#define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT (1 << 8)
1207#define OMAP4430_OPTFCLKEN_DSSCLK_MASK BITFIELD(8, 8)
1208
1209/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1210#define OMAP4430_OPTFCLKEN_FCLK0_SHIFT (1 << 8)
1211#define OMAP4430_OPTFCLKEN_FCLK0_MASK BITFIELD(8, 8)
1212
1213/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1214#define OMAP4430_OPTFCLKEN_FCLK1_SHIFT (1 << 9)
1215#define OMAP4430_OPTFCLKEN_FCLK1_MASK BITFIELD(9, 9)
1216
1217/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1218#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT (1 << 10)
1219#define OMAP4430_OPTFCLKEN_FCLK2_MASK BITFIELD(10, 10)
1220
1221/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1222#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT (1 << 15)
1223#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK BITFIELD(15, 15)
1224
1225/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1226#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT (1 << 13)
1227#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK BITFIELD(13, 13)
1228
1229/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1230#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT (1 << 14)
1231#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK BITFIELD(14, 14)
1232
1233/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1234#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT (1 << 11)
1235#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK BITFIELD(11, 11)
1236
1237/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1238#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT (1 << 12)
1239#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK BITFIELD(12, 12)
1240
1241/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1242#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT (1 << 8)
1243#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK BITFIELD(8, 8)
1244
1245/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1246#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT (1 << 9)
1247#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK BITFIELD(9, 9)
1248
1249/* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */
1250#define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT (1 << 8)
1251#define OMAP4430_OPTFCLKEN_PHY_48M_MASK BITFIELD(8, 8)
1252
1253/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1254#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT (1 << 10)
1255#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK BITFIELD(10, 10)
1256
1257/* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */
1258#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT (1 << 11)
1259#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK BITFIELD(11, 11)
1260
1261/* Used by CM_DSS_DSS_CLKCTRL */
1262#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT (1 << 10)
1263#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK BITFIELD(10, 10)
1264
1265/* Used by CM_DSS_DSS_CLKCTRL */
1266#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT (1 << 11)
1267#define OMAP4430_OPTFCLKEN_TV_CLK_MASK BITFIELD(11, 11)
1268
1269/* Used by CM_L3INIT_UNIPRO1_CLKCTRL */
1270#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT (1 << 8)
1271#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK BITFIELD(8, 8)
1272
1273/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
1274#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT (1 << 8)
1275#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK BITFIELD(8, 8)
1276
1277/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
1278#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT (1 << 9)
1279#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK BITFIELD(9, 9)
1280
1281/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */
1282#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT (1 << 10)
1283#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK BITFIELD(10, 10)
1284
1285/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1286#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT (1 << 8)
1287#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK BITFIELD(8, 8)
1288
1289/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1290#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT (1 << 9)
1291#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK BITFIELD(9, 9)
1292
1293/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */
1294#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT (1 << 10)
1295#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK BITFIELD(10, 10)
1296
1297/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
1298#define OMAP4430_OPTFCLKEN_XCLK_SHIFT (1 << 8)
1299#define OMAP4430_OPTFCLKEN_XCLK_MASK BITFIELD(8, 8)
1300
1301/* Used by CM_EMU_OVERRIDE_DPLL_PER, CM_EMU_OVERRIDE_DPLL_CORE */
1302#define OMAP4430_OVERRIDE_ENABLE_SHIFT (1 << 19)
1303#define OMAP4430_OVERRIDE_ENABLE_MASK BITFIELD(19, 19)
1304
1305/* Used by CM_CLKSEL_ABE */
1306#define OMAP4430_PAD_CLKS_GATE_SHIFT (1 << 8)
1307#define OMAP4430_PAD_CLKS_GATE_MASK BITFIELD(8, 8)
1308
1309/* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */
1310#define OMAP4430_PERF_CURRENT_SHIFT (1 << 0)
1311#define OMAP4430_PERF_CURRENT_MASK BITFIELD(0, 7)
1312
1313/*
1314 * Used by CM_CORE_DVFS_PERF1, CM_CORE_DVFS_PERF2, CM_CORE_DVFS_PERF3,
1315 * CM_CORE_DVFS_PERF4, CM_IVA_DVFS_PERF_ABE, CM_IVA_DVFS_PERF_IVAHD,
1316 * CM_IVA_DVFS_PERF_TESLA
1317 */
1318#define OMAP4430_PERF_REQ_SHIFT (1 << 0)
1319#define OMAP4430_PERF_REQ_MASK BITFIELD(0, 7)
1320
1321/* Used by CM_EMU_OVERRIDE_DPLL_PER */
1322#define OMAP4430_PER_DPLL_EMU_DIV_SHIFT (1 << 0)
1323#define OMAP4430_PER_DPLL_EMU_DIV_MASK BITFIELD(0, 6)
1324
1325/* Used by CM_EMU_OVERRIDE_DPLL_PER */
1326#define OMAP4430_PER_DPLL_EMU_MULT_SHIFT (1 << 8)
1327#define OMAP4430_PER_DPLL_EMU_MULT_MASK BITFIELD(8, 18)
1328
1329/* Used by CM_RESTORE_ST */
1330#define OMAP4430_PHASE1_COMPLETED_SHIFT (1 << 0)
1331#define OMAP4430_PHASE1_COMPLETED_MASK BITFIELD(0, 0)
1332
1333/* Used by CM_RESTORE_ST */
1334#define OMAP4430_PHASE2A_COMPLETED_SHIFT (1 << 1)
1335#define OMAP4430_PHASE2A_COMPLETED_MASK BITFIELD(1, 1)
1336
1337/* Used by CM_RESTORE_ST */
1338#define OMAP4430_PHASE2B_COMPLETED_SHIFT (1 << 2)
1339#define OMAP4430_PHASE2B_COMPLETED_MASK BITFIELD(2, 2)
1340
1341/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1342#define OMAP4430_PMD_STM_MUX_CTRL_SHIFT (1 << 20)
1343#define OMAP4430_PMD_STM_MUX_CTRL_MASK BITFIELD(20, 21)
1344
1345/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1346#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT (1 << 22)
1347#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK BITFIELD(22, 23)
1348
1349/* Used by CM_DYN_DEP_PRESCAL */
1350#define OMAP4430_PRESCAL_SHIFT (1 << 0)
1351#define OMAP4430_PRESCAL_MASK BITFIELD(0, 5)
1352
1353/* Used by REVISION_CM2, REVISION_CM1 */
1354#define OMAP4430_REV_SHIFT (1 << 0)
1355#define OMAP4430_REV_MASK BITFIELD(0, 7)
1356
1357/*
1358 * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
1359 * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE
1360 */
1361#define OMAP4430_SAR_MODE_SHIFT (1 << 4)
1362#define OMAP4430_SAR_MODE_MASK BITFIELD(4, 4)
1363
1364/* Used by CM_SCALE_FCLK */
1365#define OMAP4430_SCALE_FCLK_SHIFT (1 << 0)
1366#define OMAP4430_SCALE_FCLK_MASK BITFIELD(0, 0)
1367
1368/* Used by CM_L4CFG_DYNAMICDEP */
1369#define OMAP4430_SDMA_DYNDEP_SHIFT (1 << 11)
1370#define OMAP4430_SDMA_DYNDEP_MASK BITFIELD(11, 11)
1371
1372/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1373#define OMAP4430_SDMA_STATDEP_SHIFT (1 << 11)
1374#define OMAP4430_SDMA_STATDEP_MASK BITFIELD(11, 11)
1375
1376/* Used by CM_CLKSEL_ABE */
1377#define OMAP4430_SLIMBUS_CLK_GATE_SHIFT (1 << 10)
1378#define OMAP4430_SLIMBUS_CLK_GATE_MASK BITFIELD(10, 10)
1379
1380/*
1381 * Used by CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_SAD2D_CLKCTRL,
1382 * CM_DUCATI_DUCATI_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL,
1383 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL,
1384 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
1385 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
1386 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
1387 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1388 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1389 * CM_CAM_ISS_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE,
1390 * CM_IVAHD_IVAHD_CLKCTRL, CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL,
1391 * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL
1392 */
1393#define OMAP4430_STBYST_SHIFT (1 << 18)
1394#define OMAP4430_STBYST_MASK BITFIELD(18, 18)
1395
1396/*
1397 * Used by CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB,
1398 * CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY,
1399 * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU
1400 */
1401#define OMAP4430_ST_DPLL_CLK_SHIFT (1 << 0)
1402#define OMAP4430_ST_DPLL_CLK_MASK BITFIELD(0, 0)
1403
1404/* Used by CM_CLKDCOLDO_DPLL_USB */
1405#define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT (1 << 9)
1406#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK BITFIELD(9, 9)
1407
1408/*
1409 * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB, CM_DIV_M2_DPLL_CORE_RESTORE,
1410 * CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
1411 * CM_DIV_M2_DPLL_MPU
1412 */
1413#define OMAP4430_ST_DPLL_CLKOUT_SHIFT (1 << 9)
1414#define OMAP4430_ST_DPLL_CLKOUT_MASK BITFIELD(9, 9)
1415
1416/*
1417 * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE,
1418 * CM_DIV_M3_DPLL_CORE
1419 */
1420#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT (1 << 9)
1421#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK BITFIELD(9, 9)
1422
1423/* Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, CM_DIV_M2_DPLL_ABE */
1424#define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT (1 << 11)
1425#define OMAP4430_ST_DPLL_CLKOUTX2_MASK BITFIELD(11, 11)
1426
1427/*
1428 * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE,
1429 * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA
1430 */
1431#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT (1 << 9)
1432#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK BITFIELD(9, 9)
1433
1434/*
1435 * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE,
1436 * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA
1437 */
1438#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT (1 << 9)
1439#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK BITFIELD(9, 9)
1440
1441/*
1442 * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE,
1443 * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY
1444 */
1445#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT (1 << 9)
1446#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK BITFIELD(9, 9)
1447
1448/*
1449 * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE,
1450 * CM_DIV_M7_DPLL_CORE
1451 */
1452#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT (1 << 9)
1453#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK BITFIELD(9, 9)
1454
1455/* Used by CM_SYS_CLKSEL */
1456#define OMAP4430_SYS_CLKSEL_SHIFT (1 << 0)
1457#define OMAP4430_SYS_CLKSEL_MASK BITFIELD(0, 2)
1458
1459/* Used by CM_L4CFG_DYNAMICDEP */
1460#define OMAP4430_TESLA_DYNDEP_SHIFT (1 << 1)
1461#define OMAP4430_TESLA_DYNDEP_MASK BITFIELD(1, 1)
1462
1463/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1464#define OMAP4430_TESLA_STATDEP_SHIFT (1 << 1)
1465#define OMAP4430_TESLA_STATDEP_MASK BITFIELD(1, 1)
1466
1467/*
1468 * Used by CM_EMU_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP,
1469 * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1470 * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1471 */
1472#define OMAP4430_WINDOWSIZE_SHIFT (1 << 24)
1473#define OMAP4430_WINDOWSIZE_MASK BITFIELD(24, 27)
1474#endif
diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c
index 8eb2dab8c7db..58e4a1c557d8 100644
--- a/arch/arm/mach-omap2/cm.c
+++ b/arch/arm/mach-omap2/cm.c
@@ -21,6 +21,8 @@
21 21
22#include <asm/atomic.h> 22#include <asm/atomic.h>
23 23
24#include <plat/common.h>
25
24#include "cm.h" 26#include "cm.h"
25#include "cm-regbits-24xx.h" 27#include "cm-regbits-24xx.h"
26#include "cm-regbits-34xx.h" 28#include "cm-regbits-34xx.h"
@@ -61,9 +63,8 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
61 mask = 1 << idlest_shift; 63 mask = 1 << idlest_shift;
62 64
63 /* XXX should be OMAP2 CM */ 65 /* XXX should be OMAP2 CM */
64 while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) && 66 omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
65 (i++ < MAX_MODULE_READY_TIME)) 67 MAX_MODULE_READY_TIME, i);
66 udelay(1);
67 68
68 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; 69 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
69} 70}
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index a2fcfcc253cc..90a4086fbdf4 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -4,8 +4,8 @@
4/* 4/*
5 * OMAP2/3 Clock Management (CM) register definitions 5 * OMAP2/3 Clock Management (CM) register definitions
6 * 6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc. 7 * Copyright (C) 2007-2009 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation 8 * Copyright (C) 2007-2009 Nokia Corporation
9 * 9 *
10 * Written by Paul Walmsley 10 * Written by Paul Walmsley
11 * 11 *
@@ -22,6 +22,12 @@
22 OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) 22 OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
23#define OMAP34XX_CM_REGADDR(module, reg) \ 23#define OMAP34XX_CM_REGADDR(module, reg) \
24 OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) 24 OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
25#define OMAP44XX_CM1_REGADDR(module, reg) \
26 OMAP2_L4_IO_ADDRESS(OMAP4430_CM1_BASE + (module) + (reg))
27#define OMAP44XX_CM2_REGADDR(module, reg) \
28 OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE + (module) + (reg))
29
30#include "cm44xx.h"
25 31
26/* 32/*
27 * Architecture-specific global CM registers 33 * Architecture-specific global CM registers
@@ -89,6 +95,11 @@
89#define OMAP3430_CM_CLKSEL2_EMU 0x0050 95#define OMAP3430_CM_CLKSEL2_EMU 0x0050
90#define OMAP3430_CM_CLKSEL3_EMU 0x0054 96#define OMAP3430_CM_CLKSEL3_EMU 0x0054
91 97
98/* CM2.CEFUSE_CM2 register offsets */
99
100/* OMAP4 modulemode control */
101#define OMAP4430_MODULEMODE_HWCTRL 0
102#define OMAP4430_MODULEMODE_SWCTRL 1
92 103
93/* Clock management domain register get/set */ 104/* Clock management domain register get/set */
94 105
diff --git a/arch/arm/mach-omap2/cm44xx.h b/arch/arm/mach-omap2/cm44xx.h
new file mode 100644
index 000000000000..c575b9b0c041
--- /dev/null
+++ b/arch/arm/mach-omap2/cm44xx.h
@@ -0,0 +1,358 @@
1/*
2 * OMAP44xx CM1 & CM2 instance offset macros
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22#ifndef __ARCH_ARM_MACH_OMAP2_CM44XX_H
23#define __ARCH_ARM_MACH_OMAP2_CM44XX_H
24
25
26/* CM1 */
27
28
29/* CM1.OCP_SOCKET_CM1 register offsets */
30#define OMAP4430_REVISION_CM1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_OCP_SOCKET_MOD, 0x0000)
31#define OMAP4430_CM_CM1_PROFILING_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_OCP_SOCKET_MOD, 0x0040)
32
33/* CM1.CKGEN_CM1 register offsets */
34#define OMAP4430_CM_CLKSEL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0000)
35#define OMAP4430_CM_CLKSEL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0008)
36#define OMAP4430_CM_DLL_CTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0010)
37#define OMAP4430_CM_CLKMODE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0020)
38#define OMAP4430_CM_IDLEST_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0024)
39#define OMAP4430_CM_AUTOIDLE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0028)
40#define OMAP4430_CM_CLKSEL_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x002c)
41#define OMAP4430_CM_DIV_M2_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0030)
42#define OMAP4430_CM_DIV_M3_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0034)
43#define OMAP4430_CM_DIV_M4_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0038)
44#define OMAP4430_CM_DIV_M5_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x003c)
45#define OMAP4430_CM_DIV_M6_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0040)
46#define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0044)
47#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0048)
48#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x004c)
49#define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0050)
50#define OMAP4430_CM_CLKMODE_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0060)
51#define OMAP4430_CM_IDLEST_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0064)
52#define OMAP4430_CM_AUTOIDLE_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0068)
53#define OMAP4430_CM_CLKSEL_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x006c)
54#define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0070)
55#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0088)
56#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x008c)
57#define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x009c)
58#define OMAP4430_CM_CLKMODE_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00a0)
59#define OMAP4430_CM_IDLEST_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00a4)
60#define OMAP4430_CM_AUTOIDLE_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00a8)
61#define OMAP4430_CM_CLKSEL_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00ac)
62#define OMAP4430_CM_DIV_M4_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00b8)
63#define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00bc)
64#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00c8)
65#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00cc)
66#define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00dc)
67#define OMAP4430_CM_CLKMODE_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00e0)
68#define OMAP4430_CM_IDLEST_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00e4)
69#define OMAP4430_CM_AUTOIDLE_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00e8)
70#define OMAP4430_CM_CLKSEL_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00ec)
71#define OMAP4430_CM_DIV_M2_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00f0)
72#define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x00f4)
73#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0108)
74#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x010c)
75#define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0120)
76#define OMAP4430_CM_IDLEST_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0124)
77#define OMAP4430_CM_AUTOIDLE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0128)
78#define OMAP4430_CM_CLKSEL_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x012c)
79#define OMAP4430_CM_DIV_M2_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0130)
80#define OMAP4430_CM_DIV_M4_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0138)
81#define OMAP4430_CM_DIV_M5_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x013c)
82#define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0140)
83#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0148)
84#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x014c)
85#define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0160)
86#define OMAP4430_CM_SHADOW_FREQ_CONFIG2 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0164)
87#define OMAP4430_CM_DYN_DEP_PRESCAL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0170)
88#define OMAP4430_CM_RESTORE_ST OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_MOD, 0x0180)
89
90/* CM1.MPU_CM1 register offsets */
91#define OMAP4430_CM_MPU_CLKSTCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_MPU_MOD, 0x0000)
92#define OMAP4430_CM_MPU_STATICDEP OMAP44XX_CM1_REGADDR(OMAP4430_CM1_MPU_MOD, 0x0004)
93#define OMAP4430_CM_MPU_DYNAMICDEP OMAP44XX_CM1_REGADDR(OMAP4430_CM1_MPU_MOD, 0x0008)
94#define OMAP4430_CM_MPU_MPU_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_MPU_MOD, 0x0020)
95
96/* CM1.TESLA_CM1 register offsets */
97#define OMAP4430_CM_TESLA_CLKSTCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_TESLA_MOD, 0x0000)
98#define OMAP4430_CM_TESLA_STATICDEP OMAP44XX_CM1_REGADDR(OMAP4430_CM1_TESLA_MOD, 0x0004)
99#define OMAP4430_CM_TESLA_DYNAMICDEP OMAP44XX_CM1_REGADDR(OMAP4430_CM1_TESLA_MOD, 0x0008)
100#define OMAP4430_CM_TESLA_TESLA_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_TESLA_MOD, 0x0020)
101
102/* CM1.ABE_CM1 register offsets */
103#define OMAP4430_CM1_ABE_CLKSTCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0000)
104#define OMAP4430_CM1_ABE_L4ABE_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0020)
105#define OMAP4430_CM1_ABE_AESS_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0028)
106#define OMAP4430_CM1_ABE_PDM_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0030)
107#define OMAP4430_CM1_ABE_DMIC_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0038)
108#define OMAP4430_CM1_ABE_MCASP_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0040)
109#define OMAP4430_CM1_ABE_MCBSP1_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0048)
110#define OMAP4430_CM1_ABE_MCBSP2_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0050)
111#define OMAP4430_CM1_ABE_MCBSP3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0058)
112#define OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0060)
113#define OMAP4430_CM1_ABE_TIMER5_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0068)
114#define OMAP4430_CM1_ABE_TIMER6_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0070)
115#define OMAP4430_CM1_ABE_TIMER7_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0078)
116#define OMAP4430_CM1_ABE_TIMER8_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0080)
117#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0088)
118
119/* CM1.RESTORE_CM1 register offsets */
120#define OMAP4430_CM_CLKSEL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0000)
121#define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0004)
122#define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0008)
123#define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x000c)
124#define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0010)
125#define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0014)
126#define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0018)
127#define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x001c)
128#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0020)
129#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0024)
130#define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0028)
131#define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x002c)
132#define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0030)
133#define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0034)
134
135/* CM2 */
136
137
138/* CM2.OCP_SOCKET_CM2 register offsets */
139#define OMAP4430_REVISION_CM2 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_OCP_SOCKET_MOD, 0x0000)
140#define OMAP4430_CM_CM2_PROFILING_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_OCP_SOCKET_MOD, 0x0040)
141
142/* CM2.CKGEN_CM2 register offsets */
143#define OMAP4430_CM_CLKSEL_DUCATI_ISS_ROOT OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0000)
144#define OMAP4430_CM_CLKSEL_USB_60MHZ OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0004)
145#define OMAP4430_CM_SCALE_FCLK OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0008)
146#define OMAP4430_CM_CORE_DVFS_PERF1 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0010)
147#define OMAP4430_CM_CORE_DVFS_PERF2 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0014)
148#define OMAP4430_CM_CORE_DVFS_PERF3 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0018)
149#define OMAP4430_CM_CORE_DVFS_PERF4 OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x001c)
150#define OMAP4430_CM_CORE_DVFS_CURRENT OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0024)
151#define OMAP4430_CM_IVA_DVFS_PERF_TESLA OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0028)
152#define OMAP4430_CM_IVA_DVFS_PERF_IVAHD OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x002c)
153#define OMAP4430_CM_IVA_DVFS_PERF_ABE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0030)
154#define OMAP4430_CM_IVA_DVFS_CURRENT OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0038)
155#define OMAP4430_CM_CLKMODE_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0040)
156#define OMAP4430_CM_IDLEST_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0044)
157#define OMAP4430_CM_AUTOIDLE_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0048)
158#define OMAP4430_CM_CLKSEL_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x004c)
159#define OMAP4430_CM_DIV_M2_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0050)
160#define OMAP4430_CM_DIV_M3_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0054)
161#define OMAP4430_CM_DIV_M4_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0058)
162#define OMAP4430_CM_DIV_M5_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x005c)
163#define OMAP4430_CM_DIV_M6_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0060)
164#define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0064)
165#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0068)
166#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x006c)
167#define OMAP4430_CM_EMU_OVERRIDE_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0070)
168#define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0080)
169#define OMAP4430_CM_IDLEST_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0084)
170#define OMAP4430_CM_AUTOIDLE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0088)
171#define OMAP4430_CM_CLKSEL_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x008c)
172#define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0090)
173#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00a8)
174#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00ac)
175#define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00b4)
176#define OMAP4430_CM_CLKMODE_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00c0)
177#define OMAP4430_CM_IDLEST_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00c4)
178#define OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00c8)
179#define OMAP4430_CM_CLKSEL_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00cc)
180#define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00d0)
181#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00e8)
182#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x00ec)
183
184/* CM2.ALWAYS_ON_CM2 register offsets */
185#define OMAP4430_CM_ALWON_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0000)
186#define OMAP4430_CM_ALWON_MDMINTC_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0020)
187#define OMAP4430_CM_ALWON_SR_MPU_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0028)
188#define OMAP4430_CM_ALWON_SR_IVA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0030)
189#define OMAP4430_CM_ALWON_SR_CORE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0038)
190
191/* CM2.CORE_CM2 register offsets */
192#define OMAP4430_CM_L3_1_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0000)
193#define OMAP4430_CM_L3_1_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0008)
194#define OMAP4430_CM_L3_1_L3_1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0020)
195#define OMAP4430_CM_L3_2_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0100)
196#define OMAP4430_CM_L3_2_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0108)
197#define OMAP4430_CM_L3_2_L3_2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0120)
198#define OMAP4430_CM_L3_2_GPMC_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0128)
199#define OMAP4430_CM_L3_2_OCMC_RAM_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0130)
200#define OMAP4430_CM_DUCATI_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0200)
201#define OMAP4430_CM_DUCATI_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0204)
202#define OMAP4430_CM_DUCATI_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0208)
203#define OMAP4430_CM_DUCATI_DUCATI_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0220)
204#define OMAP4430_CM_SDMA_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0300)
205#define OMAP4430_CM_SDMA_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0304)
206#define OMAP4430_CM_SDMA_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0308)
207#define OMAP4430_CM_SDMA_SDMA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0320)
208#define OMAP4430_CM_MEMIF_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0400)
209#define OMAP4430_CM_MEMIF_DMM_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0420)
210#define OMAP4430_CM_MEMIF_EMIF_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0428)
211#define OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0430)
212#define OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0438)
213#define OMAP4430_CM_MEMIF_DLL_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0440)
214#define OMAP4430_CM_MEMIF_EMIF_H1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0450)
215#define OMAP4430_CM_MEMIF_EMIF_H2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0458)
216#define OMAP4430_CM_MEMIF_DLL_H_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0460)
217#define OMAP4430_CM_D2D_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0500)
218#define OMAP4430_CM_D2D_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0504)
219#define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0508)
220#define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0520)
221#define OMAP4430_CM_D2D_MODEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0528)
222#define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0530)
223#define OMAP4430_CM_L4CFG_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0600)
224#define OMAP4430_CM_L4CFG_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0608)
225#define OMAP4430_CM_L4CFG_L4_CFG_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0620)
226#define OMAP4430_CM_L4CFG_HW_SEM_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0628)
227#define OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0630)
228#define OMAP4430_CM_L4CFG_SAR_ROM_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0638)
229#define OMAP4430_CM_L3INSTR_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0700)
230#define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0720)
231#define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0728)
232#define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_MOD, 0x0740)
233
234/* CM2.IVAHD_CM2 register offsets */
235#define OMAP4430_CM_IVAHD_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_IVAHD_MOD, 0x0000)
236#define OMAP4430_CM_IVAHD_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_IVAHD_MOD, 0x0004)
237#define OMAP4430_CM_IVAHD_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_IVAHD_MOD, 0x0008)
238#define OMAP4430_CM_IVAHD_IVAHD_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_IVAHD_MOD, 0x0020)
239#define OMAP4430_CM_IVAHD_SL2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_IVAHD_MOD, 0x0028)
240
241/* CM2.CAM_CM2 register offsets */
242#define OMAP4430_CM_CAM_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CAM_MOD, 0x0000)
243#define OMAP4430_CM_CAM_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CAM_MOD, 0x0004)
244#define OMAP4430_CM_CAM_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CAM_MOD, 0x0008)
245#define OMAP4430_CM_CAM_ISS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CAM_MOD, 0x0020)
246#define OMAP4430_CM_CAM_FDIF_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CAM_MOD, 0x0028)
247
248/* CM2.DSS_CM2 register offsets */
249#define OMAP4430_CM_DSS_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_DSS_MOD, 0x0000)
250#define OMAP4430_CM_DSS_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_DSS_MOD, 0x0004)
251#define OMAP4430_CM_DSS_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_DSS_MOD, 0x0008)
252#define OMAP4430_CM_DSS_DSS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_DSS_MOD, 0x0020)
253#define OMAP4430_CM_DSS_DEISS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_DSS_MOD, 0x0028)
254
255/* CM2.GFX_CM2 register offsets */
256#define OMAP4430_CM_GFX_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_GFX_MOD, 0x0000)
257#define OMAP4430_CM_GFX_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_GFX_MOD, 0x0004)
258#define OMAP4430_CM_GFX_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_GFX_MOD, 0x0008)
259#define OMAP4430_CM_GFX_GFX_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_GFX_MOD, 0x0020)
260
261/* CM2.L3INIT_CM2 register offsets */
262#define OMAP4430_CM_L3INIT_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0000)
263#define OMAP4430_CM_L3INIT_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0004)
264#define OMAP4430_CM_L3INIT_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0008)
265#define OMAP4430_CM_L3INIT_MMC1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0028)
266#define OMAP4430_CM_L3INIT_MMC2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0030)
267#define OMAP4430_CM_L3INIT_HSI_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0038)
268#define OMAP4430_CM_L3INIT_UNIPRO1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0040)
269#define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0058)
270#define OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0060)
271#define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0068)
272#define OMAP4430_CM_L3INIT_P1500_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0078)
273#define OMAP4430_CM_L3INIT_EMAC_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0080)
274#define OMAP4430_CM_L3INIT_SATA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0088)
275#define OMAP4430_CM_L3INIT_TPPSS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0090)
276#define OMAP4430_CM_L3INIT_PCIESS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x0098)
277#define OMAP4430_CM_L3INIT_CCPTX_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x00a8)
278#define OMAP4430_CM_L3INIT_XHPI_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x00c0)
279#define OMAP4430_CM_L3INIT_MMC6_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x00c8)
280#define OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x00d0)
281#define OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L3INIT_MOD, 0x00e0)
282
283/* CM2.L4PER_CM2 register offsets */
284#define OMAP4430_CM_L4PER_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0000)
285#define OMAP4430_CM_L4PER_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0008)
286#define OMAP4430_CM_L4PER_ADC_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0020)
287#define OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0028)
288#define OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0030)
289#define OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0038)
290#define OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0040)
291#define OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0048)
292#define OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0050)
293#define OMAP4430_CM_L4PER_ELM_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0058)
294#define OMAP4430_CM_L4PER_GPIO2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0060)
295#define OMAP4430_CM_L4PER_GPIO3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0068)
296#define OMAP4430_CM_L4PER_GPIO4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0070)
297#define OMAP4430_CM_L4PER_GPIO5_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0078)
298#define OMAP4430_CM_L4PER_GPIO6_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0080)
299#define OMAP4430_CM_L4PER_HDQ1W_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0088)
300#define OMAP4430_CM_L4PER_HECC1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0090)
301#define OMAP4430_CM_L4PER_HECC2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0098)
302#define OMAP4430_CM_L4PER_I2C1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00a0)
303#define OMAP4430_CM_L4PER_I2C2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00a8)
304#define OMAP4430_CM_L4PER_I2C3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00b0)
305#define OMAP4430_CM_L4PER_I2C4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00b8)
306#define OMAP4430_CM_L4PER_L4PER_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00c0)
307#define OMAP4430_CM_L4PER_MCASP2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00d0)
308#define OMAP4430_CM_L4PER_MCASP3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00d8)
309#define OMAP4430_CM_L4PER_MCBSP4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00e0)
310#define OMAP4430_CM_L4PER_MGATE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00e8)
311#define OMAP4430_CM_L4PER_MCSPI1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00f0)
312#define OMAP4430_CM_L4PER_MCSPI2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x00f8)
313#define OMAP4430_CM_L4PER_MCSPI3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0100)
314#define OMAP4430_CM_L4PER_MCSPI4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0108)
315#define OMAP4430_CM_L4PER_MMCSD3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0120)
316#define OMAP4430_CM_L4PER_MMCSD4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0128)
317#define OMAP4430_CM_L4PER_MSPROHG_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0130)
318#define OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0138)
319#define OMAP4430_CM_L4PER_UART1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0140)
320#define OMAP4430_CM_L4PER_UART2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0148)
321#define OMAP4430_CM_L4PER_UART3_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0150)
322#define OMAP4430_CM_L4PER_UART4_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0158)
323#define OMAP4430_CM_L4PER_MMCSD5_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0160)
324#define OMAP4430_CM_L4PER_I2C5_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0168)
325#define OMAP4430_CM_L4SEC_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0180)
326#define OMAP4430_CM_L4SEC_STATICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0184)
327#define OMAP4430_CM_L4SEC_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x0188)
328#define OMAP4430_CM_L4SEC_AES1_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01a0)
329#define OMAP4430_CM_L4SEC_AES2_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01a8)
330#define OMAP4430_CM_L4SEC_DES3DES_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01b0)
331#define OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01b8)
332#define OMAP4430_CM_L4SEC_RNG_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01c0)
333#define OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01c8)
334#define OMAP4430_CM_L4SEC_CRYPTODMA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_L4PER_MOD, 0x01d8)
335
336/* CM2.CEFUSE_CM2 register offsets */
337#define OMAP4430_CM_CEFUSE_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0000)
338#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0020)
339
340/* CM2.RESTORE_CM2 register offsets */
341#define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0000)
342#define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0004)
343#define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0008)
344#define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x000c)
345#define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0010)
346#define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0014)
347#define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0018)
348#define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x001c)
349#define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0020)
350#define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0024)
351#define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0028)
352#define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x002c)
353#define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0030)
354#define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0034)
355#define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0038)
356#define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x003c)
357#define OMAP4430_CM_SDMA_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0040)
358#endif
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 733d3dcff98b..18ad93160abb 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -27,6 +27,8 @@
27#include <mach/gpio.h> 27#include <mach/gpio.h>
28#include <plat/mmc.h> 28#include <plat/mmc.h>
29 29
30#include "mux.h"
31
30#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 32#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
31 33
32static struct resource cam_resources[] = { 34static struct resource cam_resources[] = {
@@ -595,27 +597,40 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
595 597
596 if (cpu_is_omap34xx()) { 598 if (cpu_is_omap34xx()) {
597 if (controller_nr == 0) { 599 if (controller_nr == 0) {
598 omap_cfg_reg(N28_3430_MMC1_CLK); 600 omap_mux_init_signal("sdmmc1_clk",
599 omap_cfg_reg(M27_3430_MMC1_CMD); 601 OMAP_PIN_INPUT_PULLUP);
600 omap_cfg_reg(N27_3430_MMC1_DAT0); 602 omap_mux_init_signal("sdmmc1_cmd",
603 OMAP_PIN_INPUT_PULLUP);
604 omap_mux_init_signal("sdmmc1_dat0",
605 OMAP_PIN_INPUT_PULLUP);
601 if (mmc_controller->slots[0].wires == 4 || 606 if (mmc_controller->slots[0].wires == 4 ||
602 mmc_controller->slots[0].wires == 8) { 607 mmc_controller->slots[0].wires == 8) {
603 omap_cfg_reg(N26_3430_MMC1_DAT1); 608 omap_mux_init_signal("sdmmc1_dat1",
604 omap_cfg_reg(N25_3430_MMC1_DAT2); 609 OMAP_PIN_INPUT_PULLUP);
605 omap_cfg_reg(P28_3430_MMC1_DAT3); 610 omap_mux_init_signal("sdmmc1_dat2",
611 OMAP_PIN_INPUT_PULLUP);
612 omap_mux_init_signal("sdmmc1_dat3",
613 OMAP_PIN_INPUT_PULLUP);
606 } 614 }
607 if (mmc_controller->slots[0].wires == 8) { 615 if (mmc_controller->slots[0].wires == 8) {
608 omap_cfg_reg(P27_3430_MMC1_DAT4); 616 omap_mux_init_signal("sdmmc1_dat4",
609 omap_cfg_reg(P26_3430_MMC1_DAT5); 617 OMAP_PIN_INPUT_PULLUP);
610 omap_cfg_reg(R27_3430_MMC1_DAT6); 618 omap_mux_init_signal("sdmmc1_dat5",
611 omap_cfg_reg(R25_3430_MMC1_DAT7); 619 OMAP_PIN_INPUT_PULLUP);
620 omap_mux_init_signal("sdmmc1_dat6",
621 OMAP_PIN_INPUT_PULLUP);
622 omap_mux_init_signal("sdmmc1_dat7",
623 OMAP_PIN_INPUT_PULLUP);
612 } 624 }
613 } 625 }
614 if (controller_nr == 1) { 626 if (controller_nr == 1) {
615 /* MMC2 */ 627 /* MMC2 */
616 omap_cfg_reg(AE2_3430_MMC2_CLK); 628 omap_mux_init_signal("sdmmc2_clk",
617 omap_cfg_reg(AG5_3430_MMC2_CMD); 629 OMAP_PIN_INPUT_PULLUP);
618 omap_cfg_reg(AH5_3430_MMC2_DAT0); 630 omap_mux_init_signal("sdmmc2_cmd",
631 OMAP_PIN_INPUT_PULLUP);
632 omap_mux_init_signal("sdmmc2_dat0",
633 OMAP_PIN_INPUT_PULLUP);
619 634
620 /* 635 /*
621 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed 636 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
@@ -623,15 +638,22 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
623 */ 638 */
624 if (mmc_controller->slots[0].wires == 4 || 639 if (mmc_controller->slots[0].wires == 4 ||
625 mmc_controller->slots[0].wires == 8) { 640 mmc_controller->slots[0].wires == 8) {
626 omap_cfg_reg(AH4_3430_MMC2_DAT1); 641 omap_mux_init_signal("sdmmc2_dat1",
627 omap_cfg_reg(AG4_3430_MMC2_DAT2); 642 OMAP_PIN_INPUT_PULLUP);
628 omap_cfg_reg(AF4_3430_MMC2_DAT3); 643 omap_mux_init_signal("sdmmc2_dat2",
644 OMAP_PIN_INPUT_PULLUP);
645 omap_mux_init_signal("sdmmc2_dat3",
646 OMAP_PIN_INPUT_PULLUP);
629 } 647 }
630 if (mmc_controller->slots[0].wires == 8) { 648 if (mmc_controller->slots[0].wires == 8) {
631 omap_cfg_reg(AE4_3430_MMC2_DAT4); 649 omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
632 omap_cfg_reg(AH3_3430_MMC2_DAT5); 650 OMAP_PIN_INPUT_PULLUP);
633 omap_cfg_reg(AF3_3430_MMC2_DAT6); 651 omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
634 omap_cfg_reg(AE3_3430_MMC2_DAT7); 652 OMAP_PIN_INPUT_PULLUP);
653 omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
654 OMAP_PIN_INPUT_PULLUP);
655 omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
656 OMAP_PIN_INPUT_PULLUP);
635 } 657 }
636 } 658 }
637 659
diff --git a/arch/arm/mach-omap2/dpll.c b/arch/arm/mach-omap2/dpll.c
new file mode 100644
index 000000000000..f6055b493294
--- /dev/null
+++ b/arch/arm/mach-omap2/dpll.c
@@ -0,0 +1,538 @@
1/*
2 * OMAP3/4 - specific DPLL control functions
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Written by Paul Walmsley
8 * Testing and integration fixes by Jouni Högander
9 *
10 * Parts of this code are based on code written by
11 * Richard Woodruff, Tony Lindgren, Tuukka Tikkanen, Karthik Dasu
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */
17
18#include <linux/module.h>
19#include <linux/kernel.h>
20#include <linux/device.h>
21#include <linux/list.h>
22#include <linux/errno.h>
23#include <linux/delay.h>
24#include <linux/clk.h>
25#include <linux/io.h>
26#include <linux/limits.h>
27#include <linux/bitops.h>
28
29#include <plat/cpu.h>
30#include <plat/clock.h>
31#include <plat/sram.h>
32#include <asm/div64.h>
33#include <asm/clkdev.h>
34
35#include "clock.h"
36#include "prm.h"
37#include "prm-regbits-34xx.h"
38#include "cm.h"
39#include "cm-regbits-34xx.h"
40
41/* CM_AUTOIDLE_PLL*.AUTO_* bit values */
42#define DPLL_AUTOIDLE_DISABLE 0x0
43#define DPLL_AUTOIDLE_LOW_POWER_STOP 0x1
44
45#define MAX_DPLL_WAIT_TRIES 1000000
46
47
48/**
49 * omap3_dpll_recalc - recalculate DPLL rate
50 * @clk: DPLL struct clk
51 *
52 * Recalculate and propagate the DPLL rate.
53 */
54unsigned long omap3_dpll_recalc(struct clk *clk)
55{
56 return omap2_get_dpll_rate(clk);
57}
58
59/* _omap3_dpll_write_clken - write clken_bits arg to a DPLL's enable bits */
60static void _omap3_dpll_write_clken(struct clk *clk, u8 clken_bits)
61{
62 const struct dpll_data *dd;
63 u32 v;
64
65 dd = clk->dpll_data;
66
67 v = __raw_readl(dd->control_reg);
68 v &= ~dd->enable_mask;
69 v |= clken_bits << __ffs(dd->enable_mask);
70 __raw_writel(v, dd->control_reg);
71}
72
73/* _omap3_wait_dpll_status: wait for a DPLL to enter a specific state */
74static int _omap3_wait_dpll_status(struct clk *clk, u8 state)
75{
76 const struct dpll_data *dd;
77 int i = 0;
78 int ret = -EINVAL;
79
80 dd = clk->dpll_data;
81
82 state <<= __ffs(dd->idlest_mask);
83
84 while (((__raw_readl(dd->idlest_reg) & dd->idlest_mask) != state) &&
85 i < MAX_DPLL_WAIT_TRIES) {
86 i++;
87 udelay(1);
88 }
89
90 if (i == MAX_DPLL_WAIT_TRIES) {
91 printk(KERN_ERR "clock: %s failed transition to '%s'\n",
92 clk->name, (state) ? "locked" : "bypassed");
93 } else {
94 pr_debug("clock: %s transition to '%s' in %d loops\n",
95 clk->name, (state) ? "locked" : "bypassed", i);
96
97 ret = 0;
98 }
99
100 return ret;
101}
102
103/* From 3430 TRM ES2 4.7.6.2 */
104static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n)
105{
106 unsigned long fint;
107 u16 f = 0;
108
109 fint = clk->dpll_data->clk_ref->rate / n;
110
111 pr_debug("clock: fint is %lu\n", fint);
112
113 if (fint >= 750000 && fint <= 1000000)
114 f = 0x3;
115 else if (fint > 1000000 && fint <= 1250000)
116 f = 0x4;
117 else if (fint > 1250000 && fint <= 1500000)
118 f = 0x5;
119 else if (fint > 1500000 && fint <= 1750000)
120 f = 0x6;
121 else if (fint > 1750000 && fint <= 2100000)
122 f = 0x7;
123 else if (fint > 7500000 && fint <= 10000000)
124 f = 0xB;
125 else if (fint > 10000000 && fint <= 12500000)
126 f = 0xC;
127 else if (fint > 12500000 && fint <= 15000000)
128 f = 0xD;
129 else if (fint > 15000000 && fint <= 17500000)
130 f = 0xE;
131 else if (fint > 17500000 && fint <= 21000000)
132 f = 0xF;
133 else
134 pr_debug("clock: unknown freqsel setting for %d\n", n);
135
136 return f;
137}
138
139/* Non-CORE DPLL (e.g., DPLLs that do not control SDRC) clock functions */
140
141/*
142 * _omap3_noncore_dpll_lock - instruct a DPLL to lock and wait for readiness
143 * @clk: pointer to a DPLL struct clk
144 *
145 * Instructs a non-CORE DPLL to lock. Waits for the DPLL to report
146 * readiness before returning. Will save and restore the DPLL's
147 * autoidle state across the enable, per the CDP code. If the DPLL
148 * locked successfully, return 0; if the DPLL did not lock in the time
149 * allotted, or DPLL3 was passed in, return -EINVAL.
150 */
151static int _omap3_noncore_dpll_lock(struct clk *clk)
152{
153 u8 ai;
154 int r;
155
156 pr_debug("clock: locking DPLL %s\n", clk->name);
157
158 ai = omap3_dpll_autoidle_read(clk);
159
160 omap3_dpll_deny_idle(clk);
161
162 _omap3_dpll_write_clken(clk, DPLL_LOCKED);
163
164 r = _omap3_wait_dpll_status(clk, 1);
165
166 if (ai)
167 omap3_dpll_allow_idle(clk);
168
169 return r;
170}
171
172/*
173 * _omap3_noncore_dpll_bypass - instruct a DPLL to bypass and wait for readiness
174 * @clk: pointer to a DPLL struct clk
175 *
176 * Instructs a non-CORE DPLL to enter low-power bypass mode. In
177 * bypass mode, the DPLL's rate is set equal to its parent clock's
178 * rate. Waits for the DPLL to report readiness before returning.
179 * Will save and restore the DPLL's autoidle state across the enable,
180 * per the CDP code. If the DPLL entered bypass mode successfully,
181 * return 0; if the DPLL did not enter bypass in the time allotted, or
182 * DPLL3 was passed in, or the DPLL does not support low-power bypass,
183 * return -EINVAL.
184 */
185static int _omap3_noncore_dpll_bypass(struct clk *clk)
186{
187 int r;
188 u8 ai;
189
190 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS)))
191 return -EINVAL;
192
193 pr_debug("clock: configuring DPLL %s for low-power bypass\n",
194 clk->name);
195
196 ai = omap3_dpll_autoidle_read(clk);
197
198 _omap3_dpll_write_clken(clk, DPLL_LOW_POWER_BYPASS);
199
200 r = _omap3_wait_dpll_status(clk, 0);
201
202 if (ai)
203 omap3_dpll_allow_idle(clk);
204 else
205 omap3_dpll_deny_idle(clk);
206
207 return r;
208}
209
210/*
211 * _omap3_noncore_dpll_stop - instruct a DPLL to stop
212 * @clk: pointer to a DPLL struct clk
213 *
214 * Instructs a non-CORE DPLL to enter low-power stop. Will save and
215 * restore the DPLL's autoidle state across the stop, per the CDP
216 * code. If DPLL3 was passed in, or the DPLL does not support
217 * low-power stop, return -EINVAL; otherwise, return 0.
218 */
219static int _omap3_noncore_dpll_stop(struct clk *clk)
220{
221 u8 ai;
222
223 if (!(clk->dpll_data->modes & (1 << DPLL_LOW_POWER_STOP)))
224 return -EINVAL;
225
226 pr_debug("clock: stopping DPLL %s\n", clk->name);
227
228 ai = omap3_dpll_autoidle_read(clk);
229
230 _omap3_dpll_write_clken(clk, DPLL_LOW_POWER_STOP);
231
232 if (ai)
233 omap3_dpll_allow_idle(clk);
234 else
235 omap3_dpll_deny_idle(clk);
236
237 return 0;
238}
239
240/**
241 * omap3_noncore_dpll_enable - instruct a DPLL to enter bypass or lock mode
242 * @clk: pointer to a DPLL struct clk
243 *
244 * Instructs a non-CORE DPLL to enable, e.g., to enter bypass or lock.
245 * The choice of modes depends on the DPLL's programmed rate: if it is
246 * the same as the DPLL's parent clock, it will enter bypass;
247 * otherwise, it will enter lock. This code will wait for the DPLL to
248 * indicate readiness before returning, unless the DPLL takes too long
249 * to enter the target state. Intended to be used as the struct clk's
250 * enable function. If DPLL3 was passed in, or the DPLL does not
251 * support low-power stop, or if the DPLL took too long to enter
252 * bypass or lock, return -EINVAL; otherwise, return 0.
253 */
254int omap3_noncore_dpll_enable(struct clk *clk)
255{
256 int r;
257 struct dpll_data *dd;
258
259 dd = clk->dpll_data;
260 if (!dd)
261 return -EINVAL;
262
263 if (clk->rate == dd->clk_bypass->rate) {
264 WARN_ON(clk->parent != dd->clk_bypass);
265 r = _omap3_noncore_dpll_bypass(clk);
266 } else {
267 WARN_ON(clk->parent != dd->clk_ref);
268 r = _omap3_noncore_dpll_lock(clk);
269 }
270 /*
271 *FIXME: this is dubious - if clk->rate has changed, what about
272 * propagating?
273 */
274 if (!r)
275 clk->rate = omap2_get_dpll_rate(clk);
276
277 return r;
278}
279
280/**
281 * omap3_noncore_dpll_disable - instruct a DPLL to enter low-power stop
282 * @clk: pointer to a DPLL struct clk
283 *
284 * Instructs a non-CORE DPLL to enter low-power stop. This function is
285 * intended for use in struct clkops. No return value.
286 */
287void omap3_noncore_dpll_disable(struct clk *clk)
288{
289 _omap3_noncore_dpll_stop(clk);
290}
291
292
293/* Non-CORE DPLL rate set code */
294
295/*
296 * omap3_noncore_dpll_program - set non-core DPLL M,N values directly
297 * @clk: struct clk * of DPLL to set
298 * @m: DPLL multiplier to set
299 * @n: DPLL divider to set
300 * @freqsel: FREQSEL value to set
301 *
302 * Program the DPLL with the supplied M, N values, and wait for the DPLL to
303 * lock.. Returns -EINVAL upon error, or 0 upon success.
304 */
305int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
306{
307 struct dpll_data *dd = clk->dpll_data;
308 u32 v;
309
310 /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
311 _omap3_noncore_dpll_bypass(clk);
312
313 /* Set jitter correction */
314 if (!cpu_is_omap44xx()) {
315 v = __raw_readl(dd->control_reg);
316 v &= ~dd->freqsel_mask;
317 v |= freqsel << __ffs(dd->freqsel_mask);
318 __raw_writel(v, dd->control_reg);
319 }
320
321 /* Set DPLL multiplier, divider */
322 v = __raw_readl(dd->mult_div1_reg);
323 v &= ~(dd->mult_mask | dd->div1_mask);
324 v |= m << __ffs(dd->mult_mask);
325 v |= (n - 1) << __ffs(dd->div1_mask);
326 __raw_writel(v, dd->mult_div1_reg);
327
328 /* We let the clock framework set the other output dividers later */
329
330 /* REVISIT: Set ramp-up delay? */
331
332 _omap3_noncore_dpll_lock(clk);
333
334 return 0;
335}
336
337/**
338 * omap3_noncore_dpll_set_rate - set non-core DPLL rate
339 * @clk: struct clk * of DPLL to set
340 * @rate: rounded target rate
341 *
342 * Set the DPLL CLKOUT to the target rate. If the DPLL can enter
343 * low-power bypass, and the target rate is the bypass source clock
344 * rate, then configure the DPLL for bypass. Otherwise, round the
345 * target rate if it hasn't been done already, then program and lock
346 * the DPLL. Returns -EINVAL upon error, or 0 upon success.
347 */
348int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
349{
350 struct clk *new_parent = NULL;
351 u16 freqsel = 0;
352 struct dpll_data *dd;
353 int ret;
354
355 if (!clk || !rate)
356 return -EINVAL;
357
358 dd = clk->dpll_data;
359 if (!dd)
360 return -EINVAL;
361
362 if (rate == omap2_get_dpll_rate(clk))
363 return 0;
364
365 /*
366 * Ensure both the bypass and ref clocks are enabled prior to
367 * doing anything; we need the bypass clock running to reprogram
368 * the DPLL.
369 */
370 omap2_clk_enable(dd->clk_bypass);
371 omap2_clk_enable(dd->clk_ref);
372
373 if (dd->clk_bypass->rate == rate &&
374 (clk->dpll_data->modes & (1 << DPLL_LOW_POWER_BYPASS))) {
375 pr_debug("clock: %s: set rate: entering bypass.\n", clk->name);
376
377 ret = _omap3_noncore_dpll_bypass(clk);
378 if (!ret)
379 new_parent = dd->clk_bypass;
380 } else {
381 if (dd->last_rounded_rate != rate)
382 omap2_dpll_round_rate(clk, rate);
383
384 if (dd->last_rounded_rate == 0)
385 return -EINVAL;
386
387 /* No freqsel on OMAP4 */
388 if (!cpu_is_omap44xx()) {
389 freqsel = _omap3_dpll_compute_freqsel(clk,
390 dd->last_rounded_n);
391 if (!freqsel)
392 WARN_ON(1);
393 }
394
395 pr_debug("clock: %s: set rate: locking rate to %lu.\n",
396 clk->name, rate);
397
398 ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m,
399 dd->last_rounded_n, freqsel);
400 if (!ret)
401 new_parent = dd->clk_ref;
402 }
403 if (!ret) {
404 /*
405 * Switch the parent clock in the heirarchy, and make sure
406 * that the new parent's usecount is correct. Note: we
407 * enable the new parent before disabling the old to avoid
408 * any unnecessary hardware disable->enable transitions.
409 */
410 if (clk->usecount) {
411 omap2_clk_enable(new_parent);
412 omap2_clk_disable(clk->parent);
413 }
414 clk_reparent(clk, new_parent);
415 clk->rate = rate;
416 }
417 omap2_clk_disable(dd->clk_ref);
418 omap2_clk_disable(dd->clk_bypass);
419
420 return 0;
421}
422
423/* DPLL autoidle read/set code */
424
425/**
426 * omap3_dpll_autoidle_read - read a DPLL's autoidle bits
427 * @clk: struct clk * of the DPLL to read
428 *
429 * Return the DPLL's autoidle bits, shifted down to bit 0. Returns
430 * -EINVAL if passed a null pointer or if the struct clk does not
431 * appear to refer to a DPLL.
432 */
433u32 omap3_dpll_autoidle_read(struct clk *clk)
434{
435 const struct dpll_data *dd;
436 u32 v;
437
438 if (!clk || !clk->dpll_data)
439 return -EINVAL;
440
441 dd = clk->dpll_data;
442
443 v = __raw_readl(dd->autoidle_reg);
444 v &= dd->autoidle_mask;
445 v >>= __ffs(dd->autoidle_mask);
446
447 return v;
448}
449
450/**
451 * omap3_dpll_allow_idle - enable DPLL autoidle bits
452 * @clk: struct clk * of the DPLL to operate on
453 *
454 * Enable DPLL automatic idle control. This automatic idle mode
455 * switching takes effect only when the DPLL is locked, at least on
456 * OMAP3430. The DPLL will enter low-power stop when its downstream
457 * clocks are gated. No return value.
458 */
459void omap3_dpll_allow_idle(struct clk *clk)
460{
461 const struct dpll_data *dd;
462 u32 v;
463
464 if (!clk || !clk->dpll_data)
465 return;
466
467 dd = clk->dpll_data;
468
469 /*
470 * REVISIT: CORE DPLL can optionally enter low-power bypass
471 * by writing 0x5 instead of 0x1. Add some mechanism to
472 * optionally enter this mode.
473 */
474 v = __raw_readl(dd->autoidle_reg);
475 v &= ~dd->autoidle_mask;
476 v |= DPLL_AUTOIDLE_LOW_POWER_STOP << __ffs(dd->autoidle_mask);
477 __raw_writel(v, dd->autoidle_reg);
478}
479
480/**
481 * omap3_dpll_deny_idle - prevent DPLL from automatically idling
482 * @clk: struct clk * of the DPLL to operate on
483 *
484 * Disable DPLL automatic idle control. No return value.
485 */
486void omap3_dpll_deny_idle(struct clk *clk)
487{
488 const struct dpll_data *dd;
489 u32 v;
490
491 if (!clk || !clk->dpll_data)
492 return;
493
494 dd = clk->dpll_data;
495
496 v = __raw_readl(dd->autoidle_reg);
497 v &= ~dd->autoidle_mask;
498 v |= DPLL_AUTOIDLE_DISABLE << __ffs(dd->autoidle_mask);
499 __raw_writel(v, dd->autoidle_reg);
500
501}
502
503/* Clock control for DPLL outputs */
504
505/**
506 * omap3_clkoutx2_recalc - recalculate DPLL X2 output virtual clock rate
507 * @clk: DPLL output struct clk
508 *
509 * Using parent clock DPLL data, look up DPLL state. If locked, set our
510 * rate to the dpll_clk * 2; otherwise, just use dpll_clk.
511 */
512unsigned long omap3_clkoutx2_recalc(struct clk *clk)
513{
514 const struct dpll_data *dd;
515 unsigned long rate;
516 u32 v;
517 struct clk *pclk;
518
519 /* Walk up the parents of clk, looking for a DPLL */
520 pclk = clk->parent;
521 while (pclk && !pclk->dpll_data)
522 pclk = pclk->parent;
523
524 /* clk does not have a DPLL as a parent? */
525 WARN_ON(!pclk);
526
527 dd = pclk->dpll_data;
528
529 WARN_ON(!dd->enable_mask);
530
531 v = __raw_readl(dd->control_reg) & dd->enable_mask;
532 v >>= __ffs(dd->enable_mask);
533 if (v != OMAP3XXX_EN_DPLL_LOCKED)
534 rate = clk->parent->rate;
535 else
536 rate = clk->parent->rate * 2;
537 return rate;
538}
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c
index 6083e21b3be6..877c6f5807b7 100644
--- a/arch/arm/mach-omap2/gpmc-smc91x.c
+++ b/arch/arm/mach-omap2/gpmc-smc91x.c
@@ -33,17 +33,19 @@ static struct resource gpmc_smc91x_resources[] = {
33}; 33};
34 34
35static struct smc91x_platdata gpmc_smc91x_info = { 35static struct smc91x_platdata gpmc_smc91x_info = {
36 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0, 36 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0,
37 .leda = RPC_LED_100_10,
38 .ledb = RPC_LED_TX_RX,
37}; 39};
38 40
39static struct platform_device gpmc_smc91x_device = { 41static struct platform_device gpmc_smc91x_device = {
40 .name = "smc91x", 42 .name = "smc91x",
41 .id = -1, 43 .id = -1,
42 .num_resources = ARRAY_SIZE(gpmc_smc91x_resources),
43 .resource = gpmc_smc91x_resources,
44 .dev = { 44 .dev = {
45 .platform_data = &gpmc_smc91x_info, 45 .platform_data = &gpmc_smc91x_info,
46 }, 46 },
47 .num_resources = ARRAY_SIZE(gpmc_smc91x_resources),
48 .resource = gpmc_smc91x_resources,
47}; 49};
48 50
49/* 51/*
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index e86f5ca180ea..bd8cb5974726 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -517,7 +517,7 @@ void __init gpmc_init(void)
517 ck = "gpmc_fck"; 517 ck = "gpmc_fck";
518 l = OMAP34XX_GPMC_BASE; 518 l = OMAP34XX_GPMC_BASE;
519 } else if (cpu_is_omap44xx()) { 519 } else if (cpu_is_omap44xx()) {
520 ck = "gpmc_fck"; 520 ck = "gpmc_ck";
521 l = OMAP44XX_GPMC_BASE; 521 l = OMAP44XX_GPMC_BASE;
522 } 522 }
523 523
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
new file mode 100644
index 000000000000..789ca8c02f0c
--- /dev/null
+++ b/arch/arm/mach-omap2/i2c.c
@@ -0,0 +1,56 @@
1/*
2 * Helper module for board specific I2C bus registration
3 *
4 * Copyright (C) 2009 Nokia Corporation.
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 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * 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 St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22#include <plat/cpu.h>
23#include <plat/i2c.h>
24#include <plat/mux.h>
25
26#include "mux.h"
27
28int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
29 struct i2c_board_info const *info,
30 unsigned len)
31{
32 if (cpu_is_omap24xx()) {
33 const int omap24xx_pins[][2] = {
34 { M19_24XX_I2C1_SCL, L15_24XX_I2C1_SDA },
35 { J15_24XX_I2C2_SCL, H19_24XX_I2C2_SDA },
36 };
37 int scl, sda;
38
39 scl = omap24xx_pins[bus_id - 1][0];
40 sda = omap24xx_pins[bus_id - 1][1];
41 omap_cfg_reg(sda);
42 omap_cfg_reg(scl);
43 }
44
45 /* First I2C bus is not muxable */
46 if (cpu_is_omap34xx() && bus_id > 1) {
47 char mux_name[sizeof("i2c2_scl.i2c2_scl")];
48
49 sprintf(mux_name, "i2c%i_scl.i2c%i_scl", bus_id, bus_id);
50 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
51 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
52 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
53 }
54
55 return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
56}
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index f48a4b2654dd..a091b53657b9 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -246,6 +246,31 @@ void __init omap3_check_revision(void)
246 } 246 }
247} 247}
248 248
249void __init omap4_check_revision(void)
250{
251 u32 idcode;
252 u16 hawkeye;
253 u8 rev;
254 char *rev_name = "ES1.0";
255
256 /*
257 * The IC rev detection is done with hawkeye and rev.
258 * Note that rev does not map directly to defined processor
259 * revision numbers as ES1.0 uses value 0.
260 */
261 idcode = read_tap_reg(OMAP_TAP_IDCODE);
262 hawkeye = (idcode >> 12) & 0xffff;
263 rev = (idcode >> 28) & 0xff;
264
265 if ((hawkeye == 0xb852) && (rev == 0x0)) {
266 omap_revision = OMAP4430_REV_ES1_0;
267 pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name);
268 return;
269 }
270
271 pr_err("Unknown OMAP4 CPU id\n");
272}
273
249#define OMAP3_SHOW_FEATURE(feat) \ 274#define OMAP3_SHOW_FEATURE(feat) \
250 if (omap3_has_ ##feat()) \ 275 if (omap3_has_ ##feat()) \
251 printk(#feat" "); 276 printk(#feat" ");
@@ -277,10 +302,10 @@ void __init omap3_cpuinfo(void)
277 } else if (omap3_has_iva() && omap3_has_sgx()) { 302 } else if (omap3_has_iva() && omap3_has_sgx()) {
278 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ 303 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
279 strcpy(cpu_name, "OMAP3430/3530"); 304 strcpy(cpu_name, "OMAP3430/3530");
280 } else if (omap3_has_sgx()) { 305 } else if (omap3_has_iva()) {
281 omap_revision = OMAP3525_REV(rev); 306 omap_revision = OMAP3525_REV(rev);
282 strcpy(cpu_name, "OMAP3525"); 307 strcpy(cpu_name, "OMAP3525");
283 } else if (omap3_has_iva()) { 308 } else if (omap3_has_sgx()) {
284 omap_revision = OMAP3515_REV(rev); 309 omap_revision = OMAP3515_REV(rev);
285 strcpy(cpu_name, "OMAP3515"); 310 strcpy(cpu_name, "OMAP3515");
286 } else { 311 } else {
@@ -336,7 +361,7 @@ void __init omap2_check_revision(void)
336 omap3_check_features(); 361 omap3_check_features();
337 omap3_cpuinfo(); 362 omap3_cpuinfo();
338 } else if (cpu_is_omap44xx()) { 363 } else if (cpu_is_omap44xx()) {
339 printk(KERN_INFO "FIXME: CPU revision = OMAP4430\n"); 364 omap4_check_revision();
340 return; 365 return;
341 } else { 366 } else {
342 pr_err("OMAP revision unknown, please fix!\n"); 367 pr_err("OMAP revision unknown, please fix!\n");
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 59d28b2fd8c5..a8749e8017b9 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -22,19 +22,20 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/omapfb.h>
25 26
26#include <asm/tlb.h> 27#include <asm/tlb.h>
27 28
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
29 30
30#include <plat/mux.h> 31#include <plat/mux.h>
31#include <plat/omapfb.h>
32#include <plat/sram.h> 32#include <plat/sram.h>
33#include <plat/sdrc.h> 33#include <plat/sdrc.h>
34#include <plat/gpmc.h> 34#include <plat/gpmc.h>
35#include <plat/serial.h> 35#include <plat/serial.h>
36#include <plat/mux.h>
37#include <plat/vram.h>
36 38
37#ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */
38#include "clock.h" 39#include "clock.h"
39 40
40#include <plat/omap-pm.h> 41#include <plat/omap-pm.h>
@@ -43,7 +44,6 @@
43 44
44#include <plat/clockdomain.h> 45#include <plat/clockdomain.h>
45#include "clockdomains.h" 46#include "clockdomains.h"
46#endif
47#include <plat/omap_hwmod.h> 47#include <plat/omap_hwmod.h>
48#include "omap_hwmod_2420.h" 48#include "omap_hwmod_2420.h"
49#include "omap_hwmod_2430.h" 49#include "omap_hwmod_2430.h"
@@ -264,6 +264,7 @@ void __init omap2_map_common_io(void)
264 omap2_check_revision(); 264 omap2_check_revision();
265 omap_sram_init(); 265 omap_sram_init();
266 omapfb_reserve_sdram(); 266 omapfb_reserve_sdram();
267 omap_vram_reserve_sdram();
267} 268}
268 269
269/* 270/*
@@ -319,8 +320,8 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
319 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); 320 omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps);
320 pwrdm_init(powerdomains_omap); 321 pwrdm_init(powerdomains_omap);
321 clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps); 322 clkdm_init(clockdomains_omap, clkdm_pwrdm_autodeps);
322 omap2_clk_init();
323#endif 323#endif
324 omap2_clk_init();
324 omap_serial_early_init(); 325 omap_serial_early_init();
325#ifndef CONFIG_ARCH_OMAP4 326#ifndef CONFIG_ARCH_OMAP4
326 omap_hwmod_late_init(); 327 omap_hwmod_late_init();
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index c18a94eca641..e071b3fd1878 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -27,19 +27,52 @@
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/spinlock.h> 29#include <linux/spinlock.h>
30#include <linux/list.h>
31#include <linux/ctype.h>
32#include <linux/debugfs.h>
33#include <linux/seq_file.h>
34#include <linux/uaccess.h>
30 35
31#include <asm/system.h> 36#include <asm/system.h>
32 37
33#include <plat/control.h> 38#include <plat/control.h>
34#include <plat/mux.h> 39#include <plat/mux.h>
35 40
36#ifdef CONFIG_OMAP_MUX 41#include "mux.h"
42
43#define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */
44#define OMAP_MUX_BASE_SZ 0x5ca
45
46struct omap_mux_entry {
47 struct omap_mux mux;
48 struct list_head node;
49};
50
51static unsigned long mux_phys;
52static void __iomem *mux_base;
53
54static inline u16 omap_mux_read(u16 reg)
55{
56 if (cpu_is_omap24xx())
57 return __raw_readb(mux_base + reg);
58 else
59 return __raw_readw(mux_base + reg);
60}
61
62static inline void omap_mux_write(u16 val, u16 reg)
63{
64 if (cpu_is_omap24xx())
65 __raw_writeb(val, mux_base + reg);
66 else
67 __raw_writew(val, mux_base + reg);
68}
69
70#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX)
37 71
38static struct omap_mux_cfg arch_mux_cfg; 72static struct omap_mux_cfg arch_mux_cfg;
39 73
40/* NOTE: See mux.h for the enumeration */ 74/* NOTE: See mux.h for the enumeration */
41 75
42#ifdef CONFIG_ARCH_OMAP24XX
43static struct pin_config __initdata_or_module omap24xx_pins[] = { 76static struct pin_config __initdata_or_module omap24xx_pins[] = {
44/* 77/*
45 * description mux mux pull pull debug 78 * description mux mux pull pull debug
@@ -249,342 +282,14 @@ MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1)
249 282
250#define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) 283#define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins)
251 284
252#else
253#define omap24xx_pins NULL
254#define OMAP24XX_PINS_SZ 0
255#endif /* CONFIG_ARCH_OMAP24XX */
256
257#ifdef CONFIG_ARCH_OMAP34XX
258static struct pin_config __initdata_or_module omap34xx_pins[] = {
259/*
260 * Name, reg-offset,
261 * mux-mode | [active-mode | off-mode]
262 */
263
264/* 34xx I2C */
265MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba,
266 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
267MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc,
268 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
269MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be,
270 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
271MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0,
272 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
273MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2,
274 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
275MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4,
276 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
277MUX_CFG_34XX("AD26_34XX_I2C4_SCL", 0xa00,
278 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
279MUX_CFG_34XX("AE26_34XX_I2C4_SDA", 0xa02,
280 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
281
282/* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/
283MUX_CFG_34XX("Y8_3430_USB1HS_PHY_CLK", 0x5da,
284 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT)
285MUX_CFG_34XX("Y9_3430_USB1HS_PHY_STP", 0x5d8,
286 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT)
287MUX_CFG_34XX("AA14_3430_USB1HS_PHY_DIR", 0x5ec,
288 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
289MUX_CFG_34XX("AA11_3430_USB1HS_PHY_NXT", 0x5ee,
290 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
291MUX_CFG_34XX("W13_3430_USB1HS_PHY_D0", 0x5dc,
292 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
293MUX_CFG_34XX("W12_3430_USB1HS_PHY_D1", 0x5de,
294 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
295MUX_CFG_34XX("W11_3430_USB1HS_PHY_D2", 0x5e0,
296 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
297MUX_CFG_34XX("Y11_3430_USB1HS_PHY_D3", 0x5ea,
298 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
299MUX_CFG_34XX("W9_3430_USB1HS_PHY_D4", 0x5e4,
300 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
301MUX_CFG_34XX("Y12_3430_USB1HS_PHY_D5", 0x5e6,
302 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
303MUX_CFG_34XX("W8_3430_USB1HS_PHY_D6", 0x5e8,
304 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
305MUX_CFG_34XX("Y13_3430_USB1HS_PHY_D7", 0x5e2,
306 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
307
308/* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/
309MUX_CFG_34XX("AA8_3430_USB2HS_PHY_CLK", 0x5f0,
310 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT)
311MUX_CFG_34XX("AA10_3430_USB2HS_PHY_STP", 0x5f2,
312 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT)
313MUX_CFG_34XX("AA9_3430_USB2HS_PHY_DIR", 0x5f4,
314 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
315MUX_CFG_34XX("AB11_3430_USB2HS_PHY_NXT", 0x5f6,
316 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
317MUX_CFG_34XX("AB10_3430_USB2HS_PHY_D0", 0x5f8,
318 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
319MUX_CFG_34XX("AB9_3430_USB2HS_PHY_D1", 0x5fa,
320 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
321MUX_CFG_34XX("W3_3430_USB2HS_PHY_D2", 0x1d4,
322 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
323MUX_CFG_34XX("T4_3430_USB2HS_PHY_D3", 0x1de,
324 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
325MUX_CFG_34XX("T3_3430_USB2HS_PHY_D4", 0x1d8,
326 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
327MUX_CFG_34XX("R3_3430_USB2HS_PHY_D5", 0x1da,
328 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
329MUX_CFG_34XX("R4_3430_USB2HS_PHY_D6", 0x1dc,
330 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
331MUX_CFG_34XX("T2_3430_USB2HS_PHY_D7", 0x1d6,
332 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN)
333
334/* TLL - HSUSB: 12-pin TLL Port 1*/
335MUX_CFG_34XX("Y8_3430_USB1HS_TLL_CLK", 0x5da,
336 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
337MUX_CFG_34XX("Y9_3430_USB1HS_TLL_STP", 0x5d8,
338 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP)
339MUX_CFG_34XX("AA14_3430_USB1HS_TLL_DIR", 0x5ec,
340 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
341MUX_CFG_34XX("AA11_3430_USB1HS_TLL_NXT", 0x5ee,
342 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
343MUX_CFG_34XX("W13_3430_USB1HS_TLL_D0", 0x5dc,
344 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
345MUX_CFG_34XX("W12_3430_USB1HS_TLL_D1", 0x5de,
346 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
347MUX_CFG_34XX("W11_3430_USB1HS_TLL_D2", 0x5e0,
348 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
349MUX_CFG_34XX("Y11_3430_USB1HS_TLL_D3", 0x5ea,
350 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
351MUX_CFG_34XX("W9_3430_USB1HS_TLL_D4", 0x5e4,
352 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
353MUX_CFG_34XX("Y12_3430_USB1HS_TLL_D5", 0x5e6,
354 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
355MUX_CFG_34XX("W8_3430_USB1HS_TLL_D6", 0x5e8,
356 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
357MUX_CFG_34XX("Y13_3430_USB1HS_TLL_D7", 0x5e2,
358 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
359
360/* TLL - HSUSB: 12-pin TLL Port 2*/
361MUX_CFG_34XX("AA8_3430_USB2HS_TLL_CLK", 0x5f0,
362 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
363MUX_CFG_34XX("AA10_3430_USB2HS_TLL_STP", 0x5f2,
364 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP)
365MUX_CFG_34XX("AA9_3430_USB2HS_TLL_DIR", 0x5f4,
366 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
367MUX_CFG_34XX("AB11_3430_USB2HS_TLL_NXT", 0x5f6,
368 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
369MUX_CFG_34XX("AB10_3430_USB2HS_TLL_D0", 0x5f8,
370 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
371MUX_CFG_34XX("AB9_3430_USB2HS_TLL_D1", 0x5fa,
372 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
373MUX_CFG_34XX("W3_3430_USB2HS_TLL_D2", 0x1d4,
374 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
375MUX_CFG_34XX("T4_3430_USB2HS_TLL_D3", 0x1de,
376 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
377MUX_CFG_34XX("T3_3430_USB2HS_TLL_D4", 0x1d8,
378 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
379MUX_CFG_34XX("R3_3430_USB2HS_TLL_D5", 0x1da,
380 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
381MUX_CFG_34XX("R4_3430_USB2HS_TLL_D6", 0x1dc,
382 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
383MUX_CFG_34XX("T2_3430_USB2HS_TLL_D7", 0x1d6,
384 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN)
385
386/* TLL - HSUSB: 12-pin TLL Port 3*/
387MUX_CFG_34XX("AA6_3430_USB3HS_TLL_CLK", 0x180,
388 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
389MUX_CFG_34XX("AB3_3430_USB3HS_TLL_STP", 0x166,
390 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLUP)
391MUX_CFG_34XX("AA3_3430_USB3HS_TLL_DIR", 0x168,
392 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
393MUX_CFG_34XX("Y3_3430_USB3HS_TLL_NXT", 0x16a,
394 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
395MUX_CFG_34XX("AA5_3430_USB3HS_TLL_D0", 0x186,
396 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
397MUX_CFG_34XX("Y4_3430_USB3HS_TLL_D1", 0x184,
398 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
399MUX_CFG_34XX("Y5_3430_USB3HS_TLL_D2", 0x188,
400 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
401MUX_CFG_34XX("W5_3430_USB3HS_TLL_D3", 0x18a,
402 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
403MUX_CFG_34XX("AB12_3430_USB3HS_TLL_D4", 0x16c,
404 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
405MUX_CFG_34XX("AB13_3430_USB3HS_TLL_D5", 0x16e,
406 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
407MUX_CFG_34XX("AA13_3430_USB3HS_TLL_D6", 0x170,
408 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
409MUX_CFG_34XX("AA12_3430_USB3HS_TLL_D7", 0x172,
410 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
411
412/* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */
413MUX_CFG_34XX("AF10_3430_USB1FS_PHY_MM1_RXDP", 0x5d8,
414 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
415MUX_CFG_34XX("AG9_3430_USB1FS_PHY_MM1_RXDM", 0x5ee,
416 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
417MUX_CFG_34XX("W13_3430_USB1FS_PHY_MM1_RXRCV", 0x5dc,
418 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
419MUX_CFG_34XX("W12_3430_USB1FS_PHY_MM1_TXSE0", 0x5de,
420 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
421MUX_CFG_34XX("W11_3430_USB1FS_PHY_MM1_TXDAT", 0x5e0,
422 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
423MUX_CFG_34XX("Y11_3430_USB1FS_PHY_MM1_TXEN_N", 0x5ea,
424 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT)
425
426/* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */
427MUX_CFG_34XX("AF7_3430_USB2FS_PHY_MM2_RXDP", 0x5f2,
428 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
429MUX_CFG_34XX("AH7_3430_USB2FS_PHY_MM2_RXDM", 0x5f6,
430 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
431MUX_CFG_34XX("AB10_3430_USB2FS_PHY_MM2_RXRCV", 0x5f8,
432 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
433MUX_CFG_34XX("AB9_3430_USB2FS_PHY_MM2_TXSE0", 0x5fa,
434 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
435MUX_CFG_34XX("W3_3430_USB2FS_PHY_MM2_TXDAT", 0x1d4,
436 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN)
437MUX_CFG_34XX("T4_3430_USB2FS_PHY_MM2_TXEN_N", 0x1de,
438 OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT)
439
440/* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */
441MUX_CFG_34XX("AH3_3430_USB3FS_PHY_MM3_RXDP", 0x166,
442 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
443MUX_CFG_34XX("AE3_3430_USB3FS_PHY_MM3_RXDM", 0x16a,
444 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
445MUX_CFG_34XX("AD1_3430_USB3FS_PHY_MM3_RXRCV", 0x186,
446 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
447MUX_CFG_34XX("AE1_3430_USB3FS_PHY_MM3_TXSE0", 0x184,
448 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
449MUX_CFG_34XX("AD2_3430_USB3FS_PHY_MM3_TXDAT", 0x188,
450 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN)
451MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a,
452 OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT)
453
454
455/* 34XX GPIO - bidirectional, unless the name has an "_OUT" suffix.
456 * (Always specify PIN_INPUT, except for names suffixed by "_OUT".)
457 * No internal pullup/pulldown without "_UP" or "_DOWN" suffix.
458 */
459MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0,
460 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
461MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18,
462 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
463MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee,
464 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
465MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa,
466 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
467MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4,
468 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
469MUX_CFG_34XX("U8_34XX_GPIO54_DOWN", 0x0b4,
470 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLDOWN)
471MUX_CFG_34XX("L8_34XX_GPIO63", 0x0ce,
472 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
473MUX_CFG_34XX("G25_34XX_GPIO86_OUT", 0x0fc,
474 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
475MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160,
476 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
477MUX_CFG_34XX("AF4_34XX_GPIO135_OUT", 0x162,
478 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
479MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164,
480 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
481MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c,
482 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
483MUX_CFG_34XX("AE6_34XX_GPIO141", 0x16e,
484 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
485MUX_CFG_34XX("AF5_34XX_GPIO142", 0x170,
486 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
487MUX_CFG_34XX("AE5_34XX_GPIO143", 0x172,
488 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
489MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c,
490 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT)
491MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6,
492 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT)
493
494/* OMAP3 SDRC CKE signals to SDR/DDR ram chips */
495MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262,
496 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
497MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264,
498 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT)
499
500/* MMC1 */
501MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144,
502 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
503MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146,
504 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
505MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148,
506 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
507MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a,
508 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
509MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c,
510 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
511MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e,
512 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
513MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150,
514 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
515MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152,
516 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
517MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154,
518 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
519MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156,
520 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
521
522/* MMC2 */
523MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158,
524 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
525MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A,
526 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
527MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c,
528 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
529MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e,
530 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
531MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160,
532 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
533MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162,
534 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
535MUX_CFG_34XX("AE4_3430_MMC2_DAT4", 0x164,
536 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
537MUX_CFG_34XX("AH3_3430_MMC2_DAT5", 0x166,
538 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
539MUX_CFG_34XX("AF3_3430_MMC2_DAT6", 0x168,
540 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
541MUX_CFG_34XX("AE3_3430_MMC2_DAT7", 0x16A,
542 OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP)
543
544/* MMC3 */
545MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8,
546 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
547MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0,
548 OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP)
549MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4,
550 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
551MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6,
552 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
553MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8,
554 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
555MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2,
556 OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP)
557
558/* SYS_NIRQ T2 INT1 */
559MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0,
560 OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP |
561 OMAP34XX_MUX_MODE0)
562/* EHCI GPIO's on OMAP3EVM (Rev >= E) */
563MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea,
564 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
565MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec,
566 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
567MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8,
568 OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP)
569};
570
571#define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins)
572
573#else
574#define omap34xx_pins NULL
575#define OMAP34XX_PINS_SZ 0
576#endif /* CONFIG_ARCH_OMAP34XX */
577
578#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) 285#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
286
579static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg) 287static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg)
580{ 288{
581 u16 orig; 289 u16 orig;
582 u8 warn = 0, debug = 0; 290 u8 warn = 0, debug = 0;
583 291
584 if (cpu_is_omap24xx()) 292 orig = omap_mux_read(cfg->mux_reg - OMAP_MUX_BASE_OFFSET);
585 orig = omap_ctrl_readb(cfg->mux_reg);
586 else
587 orig = omap_ctrl_readw(cfg->mux_reg);
588 293
589#ifdef CONFIG_OMAP_MUX_DEBUG 294#ifdef CONFIG_OMAP_MUX_DEBUG
590 debug = cfg->debug; 295 debug = cfg->debug;
@@ -600,7 +305,6 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r
600#define omap2_cfg_debug(x, y) do {} while (0) 305#define omap2_cfg_debug(x, y) do {} while (0)
601#endif 306#endif
602 307
603#ifdef CONFIG_ARCH_OMAP24XX
604static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) 308static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
605{ 309{
606 static DEFINE_SPINLOCK(mux_spin_lock); 310 static DEFINE_SPINLOCK(mux_spin_lock);
@@ -614,47 +318,692 @@ static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
614 if (cfg->pu_pd_val) 318 if (cfg->pu_pd_val)
615 reg |= OMAP2_PULL_UP; 319 reg |= OMAP2_PULL_UP;
616 omap2_cfg_debug(cfg, reg); 320 omap2_cfg_debug(cfg, reg);
617 omap_ctrl_writeb(reg, cfg->mux_reg); 321 omap_mux_write(reg, cfg->mux_reg - OMAP_MUX_BASE_OFFSET);
618 spin_unlock_irqrestore(&mux_spin_lock, flags); 322 spin_unlock_irqrestore(&mux_spin_lock, flags);
619 323
620 return 0; 324 return 0;
621} 325}
326
327int __init omap2_mux_init(void)
328{
329 u32 mux_pbase;
330
331 if (cpu_is_omap2420())
332 mux_pbase = OMAP2420_CTRL_BASE + OMAP_MUX_BASE_OFFSET;
333 else if (cpu_is_omap2430())
334 mux_pbase = OMAP243X_CTRL_BASE + OMAP_MUX_BASE_OFFSET;
335 else
336 return -ENODEV;
337
338 mux_base = ioremap(mux_pbase, OMAP_MUX_BASE_SZ);
339 if (!mux_base) {
340 printk(KERN_ERR "mux: Could not ioremap\n");
341 return -ENODEV;
342 }
343
344 if (cpu_is_omap24xx()) {
345 arch_mux_cfg.pins = omap24xx_pins;
346 arch_mux_cfg.size = OMAP24XX_PINS_SZ;
347 arch_mux_cfg.cfg_reg = omap24xx_cfg_reg;
348
349 return omap_mux_register(&arch_mux_cfg);
350 }
351
352 return 0;
353}
354
622#else 355#else
623#define omap24xx_cfg_reg NULL 356int __init omap2_mux_init(void)
624#endif 357{
358 return 0;
359}
360#endif /* CONFIG_OMAP_MUX */
361
362/*----------------------------------------------------------------------------*/
625 363
626#ifdef CONFIG_ARCH_OMAP34XX 364#ifdef CONFIG_ARCH_OMAP34XX
627static int __init_or_module omap34xx_cfg_reg(const struct pin_config *cfg) 365static LIST_HEAD(muxmodes);
366static DEFINE_MUTEX(muxmode_mutex);
367
368#ifdef CONFIG_OMAP_MUX
369
370static char *omap_mux_options;
371
372int __init omap_mux_init_gpio(int gpio, int val)
628{ 373{
629 static DEFINE_SPINLOCK(mux_spin_lock); 374 struct omap_mux_entry *e;
630 unsigned long flags; 375 int found = 0;
631 u16 reg = 0; 376
377 if (!gpio)
378 return -EINVAL;
379
380 list_for_each_entry(e, &muxmodes, node) {
381 struct omap_mux *m = &e->mux;
382 if (gpio == m->gpio) {
383 u16 old_mode;
384 u16 mux_mode;
385
386 old_mode = omap_mux_read(m->reg_offset);
387 mux_mode = val & ~(OMAP_MUX_NR_MODES - 1);
388 mux_mode |= OMAP_MUX_MODE4;
389 printk(KERN_DEBUG "mux: Setting signal "
390 "%s.gpio%i 0x%04x -> 0x%04x\n",
391 m->muxnames[0], gpio, old_mode, mux_mode);
392 omap_mux_write(mux_mode, m->reg_offset);
393 found++;
394 }
395 }
632 396
633 spin_lock_irqsave(&mux_spin_lock, flags); 397 if (found == 1)
634 reg |= cfg->mux_val; 398 return 0;
635 omap2_cfg_debug(cfg, reg); 399
636 omap_ctrl_writew(reg, cfg->mux_reg); 400 if (found > 1) {
637 spin_unlock_irqrestore(&mux_spin_lock, flags); 401 printk(KERN_ERR "mux: Multiple gpio paths for gpio%i\n", gpio);
402 return -EINVAL;
403 }
404
405 printk(KERN_ERR "mux: Could not set gpio%i\n", gpio);
406
407 return -ENODEV;
408}
409
410int __init omap_mux_init_signal(char *muxname, int val)
411{
412 struct omap_mux_entry *e;
413 char *m0_name = NULL, *mode_name = NULL;
414 int found = 0;
415
416 mode_name = strchr(muxname, '.');
417 if (mode_name) {
418 *mode_name = '\0';
419 mode_name++;
420 m0_name = muxname;
421 } else {
422 mode_name = muxname;
423 }
424
425 list_for_each_entry(e, &muxmodes, node) {
426 struct omap_mux *m = &e->mux;
427 char *m0_entry = m->muxnames[0];
428 int i;
429
430 if (m0_name && strcmp(m0_name, m0_entry))
431 continue;
432
433 for (i = 0; i < OMAP_MUX_NR_MODES; i++) {
434 char *mode_cur = m->muxnames[i];
435
436 if (!mode_cur)
437 continue;
438
439 if (!strcmp(mode_name, mode_cur)) {
440 u16 old_mode;
441 u16 mux_mode;
442
443 old_mode = omap_mux_read(m->reg_offset);
444 mux_mode = val | i;
445 printk(KERN_DEBUG "mux: Setting signal "
446 "%s.%s 0x%04x -> 0x%04x\n",
447 m0_entry, muxname, old_mode, mux_mode);
448 omap_mux_write(mux_mode, m->reg_offset);
449 found++;
450 }
451 }
452 }
453
454 if (found == 1)
455 return 0;
456
457 if (found > 1) {
458 printk(KERN_ERR "mux: Multiple signal paths (%i) for %s\n",
459 found, muxname);
460 return -EINVAL;
461 }
462
463 printk(KERN_ERR "mux: Could not set signal %s\n", muxname);
464
465 return -ENODEV;
466}
467
468#ifdef CONFIG_DEBUG_FS
469
470#define OMAP_MUX_MAX_NR_FLAGS 10
471#define OMAP_MUX_TEST_FLAG(val, mask) \
472 if (((val) & (mask)) == (mask)) { \
473 i++; \
474 flags[i] = #mask; \
475 }
476
477/* REVISIT: Add checking for non-optimal mux settings */
478static inline void omap_mux_decode(struct seq_file *s, u16 val)
479{
480 char *flags[OMAP_MUX_MAX_NR_FLAGS];
481 char mode[14];
482 int i = -1;
483
484 sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7);
485 i++;
486 flags[i] = mode;
487
488 OMAP_MUX_TEST_FLAG(val, OMAP_PIN_OFF_WAKEUPENABLE);
489 if (val & OMAP_OFF_EN) {
490 if (!(val & OMAP_OFFOUT_EN)) {
491 if (!(val & OMAP_OFF_PULL_UP)) {
492 OMAP_MUX_TEST_FLAG(val,
493 OMAP_PIN_OFF_INPUT_PULLDOWN);
494 } else {
495 OMAP_MUX_TEST_FLAG(val,
496 OMAP_PIN_OFF_INPUT_PULLUP);
497 }
498 } else {
499 if (!(val & OMAP_OFFOUT_VAL)) {
500 OMAP_MUX_TEST_FLAG(val,
501 OMAP_PIN_OFF_OUTPUT_LOW);
502 } else {
503 OMAP_MUX_TEST_FLAG(val,
504 OMAP_PIN_OFF_OUTPUT_HIGH);
505 }
506 }
507 }
508
509 if (val & OMAP_INPUT_EN) {
510 if (val & OMAP_PULL_ENA) {
511 if (!(val & OMAP_PULL_UP)) {
512 OMAP_MUX_TEST_FLAG(val,
513 OMAP_PIN_INPUT_PULLDOWN);
514 } else {
515 OMAP_MUX_TEST_FLAG(val, OMAP_PIN_INPUT_PULLUP);
516 }
517 } else {
518 OMAP_MUX_TEST_FLAG(val, OMAP_PIN_INPUT);
519 }
520 } else {
521 i++;
522 flags[i] = "OMAP_PIN_OUTPUT";
523 }
524
525 do {
526 seq_printf(s, "%s", flags[i]);
527 if (i > 0)
528 seq_printf(s, " | ");
529 } while (i-- > 0);
530}
531
532#define OMAP_MUX_DEFNAME_LEN 16
533
534static int omap_mux_dbg_board_show(struct seq_file *s, void *unused)
535{
536 struct omap_mux_entry *e;
537
538 list_for_each_entry(e, &muxmodes, node) {
539 struct omap_mux *m = &e->mux;
540 char m0_def[OMAP_MUX_DEFNAME_LEN];
541 char *m0_name = m->muxnames[0];
542 u16 val;
543 int i, mode;
544
545 if (!m0_name)
546 continue;
547
548 for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) {
549 if (m0_name[i] == '\0') {
550 m0_def[i] = m0_name[i];
551 break;
552 }
553 m0_def[i] = toupper(m0_name[i]);
554 }
555 val = omap_mux_read(m->reg_offset);
556 mode = val & OMAP_MUX_MODE7;
557
558 seq_printf(s, "OMAP%i_MUX(%s, ",
559 cpu_is_omap34xx() ? 3 : 0, m0_def);
560 omap_mux_decode(s, val);
561 seq_printf(s, "),\n");
562 }
563
564 return 0;
565}
566
567static int omap_mux_dbg_board_open(struct inode *inode, struct file *file)
568{
569 return single_open(file, omap_mux_dbg_board_show, &inode->i_private);
570}
571
572static const struct file_operations omap_mux_dbg_board_fops = {
573 .open = omap_mux_dbg_board_open,
574 .read = seq_read,
575 .llseek = seq_lseek,
576 .release = single_release,
577};
578
579static int omap_mux_dbg_signal_show(struct seq_file *s, void *unused)
580{
581 struct omap_mux *m = s->private;
582 const char *none = "NA";
583 u16 val;
584 int mode;
585
586 val = omap_mux_read(m->reg_offset);
587 mode = val & OMAP_MUX_MODE7;
588
589 seq_printf(s, "name: %s.%s (0x%08lx/0x%03x = 0x%04x), b %s, t %s\n",
590 m->muxnames[0], m->muxnames[mode],
591 mux_phys + m->reg_offset, m->reg_offset, val,
592 m->balls[0] ? m->balls[0] : none,
593 m->balls[1] ? m->balls[1] : none);
594 seq_printf(s, "mode: ");
595 omap_mux_decode(s, val);
596 seq_printf(s, "\n");
597 seq_printf(s, "signals: %s | %s | %s | %s | %s | %s | %s | %s\n",
598 m->muxnames[0] ? m->muxnames[0] : none,
599 m->muxnames[1] ? m->muxnames[1] : none,
600 m->muxnames[2] ? m->muxnames[2] : none,
601 m->muxnames[3] ? m->muxnames[3] : none,
602 m->muxnames[4] ? m->muxnames[4] : none,
603 m->muxnames[5] ? m->muxnames[5] : none,
604 m->muxnames[6] ? m->muxnames[6] : none,
605 m->muxnames[7] ? m->muxnames[7] : none);
638 606
639 return 0; 607 return 0;
640} 608}
609
610#define OMAP_MUX_MAX_ARG_CHAR 7
611
612static ssize_t omap_mux_dbg_signal_write(struct file *file,
613 const char __user *user_buf,
614 size_t count, loff_t *ppos)
615{
616 char buf[OMAP_MUX_MAX_ARG_CHAR];
617 struct seq_file *seqf;
618 struct omap_mux *m;
619 unsigned long val;
620 int buf_size, ret;
621
622 if (count > OMAP_MUX_MAX_ARG_CHAR)
623 return -EINVAL;
624
625 memset(buf, 0, sizeof(buf));
626 buf_size = min(count, sizeof(buf) - 1);
627
628 if (copy_from_user(buf, user_buf, buf_size))
629 return -EFAULT;
630
631 ret = strict_strtoul(buf, 0x10, &val);
632 if (ret < 0)
633 return ret;
634
635 if (val > 0xffff)
636 return -EINVAL;
637
638 seqf = file->private_data;
639 m = seqf->private;
640
641 omap_mux_write((u16)val, m->reg_offset);
642 *ppos += count;
643
644 return count;
645}
646
647static int omap_mux_dbg_signal_open(struct inode *inode, struct file *file)
648{
649 return single_open(file, omap_mux_dbg_signal_show, inode->i_private);
650}
651
652static const struct file_operations omap_mux_dbg_signal_fops = {
653 .open = omap_mux_dbg_signal_open,
654 .read = seq_read,
655 .write = omap_mux_dbg_signal_write,
656 .llseek = seq_lseek,
657 .release = single_release,
658};
659
660static struct dentry *mux_dbg_dir;
661
662static void __init omap_mux_dbg_init(void)
663{
664 struct omap_mux_entry *e;
665
666 mux_dbg_dir = debugfs_create_dir("omap_mux", NULL);
667 if (!mux_dbg_dir)
668 return;
669
670 (void)debugfs_create_file("board", S_IRUGO, mux_dbg_dir,
671 NULL, &omap_mux_dbg_board_fops);
672
673 list_for_each_entry(e, &muxmodes, node) {
674 struct omap_mux *m = &e->mux;
675
676 (void)debugfs_create_file(m->muxnames[0], S_IWUGO, mux_dbg_dir,
677 m, &omap_mux_dbg_signal_fops);
678 }
679}
680
641#else 681#else
642#define omap34xx_cfg_reg NULL 682static inline void omap_mux_dbg_init(void)
683{
684}
685#endif /* CONFIG_DEBUG_FS */
686
687static void __init omap_mux_free_names(struct omap_mux *m)
688{
689 int i;
690
691 for (i = 0; i < OMAP_MUX_NR_MODES; i++)
692 kfree(m->muxnames[i]);
693
694#ifdef CONFIG_DEBUG_FS
695 for (i = 0; i < OMAP_MUX_NR_SIDES; i++)
696 kfree(m->balls[i]);
643#endif 697#endif
644 698
645int __init omap2_mux_init(void) 699}
700
701/* Free all data except for GPIO pins unless CONFIG_DEBUG_FS is set */
702static int __init omap_mux_late_init(void)
646{ 703{
647 if (cpu_is_omap24xx()) { 704 struct omap_mux_entry *e, *tmp;
648 arch_mux_cfg.pins = omap24xx_pins; 705
649 arch_mux_cfg.size = OMAP24XX_PINS_SZ; 706 list_for_each_entry_safe(e, tmp, &muxmodes, node) {
650 arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; 707 struct omap_mux *m = &e->mux;
651 } else if (cpu_is_omap34xx()) { 708 u16 mode = omap_mux_read(m->reg_offset);
652 arch_mux_cfg.pins = omap34xx_pins; 709
653 arch_mux_cfg.size = OMAP34XX_PINS_SZ; 710 if (OMAP_MODE_GPIO(mode))
654 arch_mux_cfg.cfg_reg = omap34xx_cfg_reg; 711 continue;
712
713#ifndef CONFIG_DEBUG_FS
714 mutex_lock(&muxmode_mutex);
715 list_del(&e->node);
716 mutex_unlock(&muxmode_mutex);
717 omap_mux_free_names(m);
718 kfree(m);
719#endif
720
721 }
722
723 omap_mux_dbg_init();
724
725 return 0;
726}
727late_initcall(omap_mux_late_init);
728
729static void __init omap_mux_package_fixup(struct omap_mux *p,
730 struct omap_mux *superset)
731{
732 while (p->reg_offset != OMAP_MUX_TERMINATOR) {
733 struct omap_mux *s = superset;
734 int found = 0;
735
736 while (s->reg_offset != OMAP_MUX_TERMINATOR) {
737 if (s->reg_offset == p->reg_offset) {
738 *s = *p;
739 found++;
740 break;
741 }
742 s++;
743 }
744 if (!found)
745 printk(KERN_ERR "mux: Unknown entry offset 0x%x\n",
746 p->reg_offset);
747 p++;
748 }
749}
750
751#ifdef CONFIG_DEBUG_FS
752
753static void __init omap_mux_package_init_balls(struct omap_ball *b,
754 struct omap_mux *superset)
755{
756 while (b->reg_offset != OMAP_MUX_TERMINATOR) {
757 struct omap_mux *s = superset;
758 int found = 0;
759
760 while (s->reg_offset != OMAP_MUX_TERMINATOR) {
761 if (s->reg_offset == b->reg_offset) {
762 s->balls[0] = b->balls[0];
763 s->balls[1] = b->balls[1];
764 found++;
765 break;
766 }
767 s++;
768 }
769 if (!found)
770 printk(KERN_ERR "mux: Unknown ball offset 0x%x\n",
771 b->reg_offset);
772 b++;
773 }
774}
775
776#else /* CONFIG_DEBUG_FS */
777
778static inline void omap_mux_package_init_balls(struct omap_ball *b,
779 struct omap_mux *superset)
780{
781}
782
783#endif /* CONFIG_DEBUG_FS */
784
785static int __init omap_mux_setup(char *options)
786{
787 if (!options)
788 return 0;
789
790 omap_mux_options = options;
791
792 return 1;
793}
794__setup("omap_mux=", omap_mux_setup);
795
796/*
797 * Note that the omap_mux=some.signal1=0x1234,some.signal2=0x1234
798 * cmdline options only override the bootloader values.
799 * During development, please enable CONFIG_DEBUG_FS, and use the
800 * signal specific entries under debugfs.
801 */
802static void __init omap_mux_set_cmdline_signals(void)
803{
804 char *options, *next_opt, *token;
805
806 if (!omap_mux_options)
807 return;
808
809 options = kmalloc(strlen(omap_mux_options) + 1, GFP_KERNEL);
810 if (!options)
811 return;
812
813 strcpy(options, omap_mux_options);
814 next_opt = options;
815
816 while ((token = strsep(&next_opt, ",")) != NULL) {
817 char *keyval, *name;
818 unsigned long val;
819
820 keyval = token;
821 name = strsep(&keyval, "=");
822 if (name) {
823 int res;
824
825 res = strict_strtoul(keyval, 0x10, &val);
826 if (res < 0)
827 continue;
828
829 omap_mux_init_signal(name, (u16)val);
830 }
831 }
832
833 kfree(options);
834}
835
836static void __init omap_mux_set_board_signals(struct omap_board_mux *board_mux)
837{
838 while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) {
839 omap_mux_write(board_mux->value, board_mux->reg_offset);
840 board_mux++;
841 }
842}
843
844static int __init omap_mux_copy_names(struct omap_mux *src,
845 struct omap_mux *dst)
846{
847 int i;
848
849 for (i = 0; i < OMAP_MUX_NR_MODES; i++) {
850 if (src->muxnames[i]) {
851 dst->muxnames[i] =
852 kmalloc(strlen(src->muxnames[i]) + 1,
853 GFP_KERNEL);
854 if (!dst->muxnames[i])
855 goto free;
856 strcpy(dst->muxnames[i], src->muxnames[i]);
857 }
858 }
859
860#ifdef CONFIG_DEBUG_FS
861 for (i = 0; i < OMAP_MUX_NR_SIDES; i++) {
862 if (src->balls[i]) {
863 dst->balls[i] =
864 kmalloc(strlen(src->balls[i]) + 1,
865 GFP_KERNEL);
866 if (!dst->balls[i])
867 goto free;
868 strcpy(dst->balls[i], src->balls[i]);
869 }
870 }
871#endif
872
873 return 0;
874
875free:
876 omap_mux_free_names(dst);
877 return -ENOMEM;
878
879}
880
881#endif /* CONFIG_OMAP_MUX */
882
883static u16 omap_mux_get_by_gpio(int gpio)
884{
885 struct omap_mux_entry *e;
886 u16 offset = OMAP_MUX_TERMINATOR;
887
888 list_for_each_entry(e, &muxmodes, node) {
889 struct omap_mux *m = &e->mux;
890 if (m->gpio == gpio) {
891 offset = m->reg_offset;
892 break;
893 }
894 }
895
896 return offset;
897}
898
899/* Needed for dynamic muxing of GPIO pins for off-idle */
900u16 omap_mux_get_gpio(int gpio)
901{
902 u16 offset;
903
904 offset = omap_mux_get_by_gpio(gpio);
905 if (offset == OMAP_MUX_TERMINATOR) {
906 printk(KERN_ERR "mux: Could not get gpio%i\n", gpio);
907 return offset;
908 }
909
910 return omap_mux_read(offset);
911}
912
913/* Needed for dynamic muxing of GPIO pins for off-idle */
914void omap_mux_set_gpio(u16 val, int gpio)
915{
916 u16 offset;
917
918 offset = omap_mux_get_by_gpio(gpio);
919 if (offset == OMAP_MUX_TERMINATOR) {
920 printk(KERN_ERR "mux: Could not set gpio%i\n", gpio);
921 return;
922 }
923
924 omap_mux_write(val, offset);
925}
926
927static struct omap_mux * __init omap_mux_list_add(struct omap_mux *src)
928{
929 struct omap_mux_entry *entry;
930 struct omap_mux *m;
931
932 entry = kzalloc(sizeof(struct omap_mux_entry), GFP_KERNEL);
933 if (!entry)
934 return NULL;
935
936 m = &entry->mux;
937 memcpy(m, src, sizeof(struct omap_mux_entry));
938
939#ifdef CONFIG_OMAP_MUX
940 if (omap_mux_copy_names(src, m)) {
941 kfree(entry);
942 return NULL;
655 } 943 }
944#endif
945
946 mutex_lock(&muxmode_mutex);
947 list_add_tail(&entry->node, &muxmodes);
948 mutex_unlock(&muxmode_mutex);
656 949
657 return omap_mux_register(&arch_mux_cfg); 950 return m;
658} 951}
659 952
953/*
954 * Note if CONFIG_OMAP_MUX is not selected, we will only initialize
955 * the GPIO to mux offset mapping that is needed for dynamic muxing
956 * of GPIO pins for off-idle.
957 */
958static void __init omap_mux_init_list(struct omap_mux *superset)
959{
960 while (superset->reg_offset != OMAP_MUX_TERMINATOR) {
961 struct omap_mux *entry;
962
963#ifndef CONFIG_OMAP_MUX
964 /* Skip pins that are not muxed as GPIO by bootloader */
965 if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
966 superset++;
967 continue;
968 }
660#endif 969#endif
970
971 entry = omap_mux_list_add(superset);
972 if (!entry) {
973 printk(KERN_ERR "mux: Could not add entry\n");
974 return;
975 }
976 superset++;
977 }
978}
979
980int __init omap_mux_init(u32 mux_pbase, u32 mux_size,
981 struct omap_mux *superset,
982 struct omap_mux *package_subset,
983 struct omap_board_mux *board_mux,
984 struct omap_ball *package_balls)
985{
986 if (mux_base)
987 return -EBUSY;
988
989 mux_phys = mux_pbase;
990 mux_base = ioremap(mux_pbase, mux_size);
991 if (!mux_base) {
992 printk(KERN_ERR "mux: Could not ioremap\n");
993 return -ENODEV;
994 }
995
996#ifdef CONFIG_OMAP_MUX
997 omap_mux_package_fixup(package_subset, superset);
998 omap_mux_package_init_balls(package_balls, superset);
999 omap_mux_set_cmdline_signals();
1000 omap_mux_set_board_signals(board_mux);
1001#endif
1002
1003 omap_mux_init_list(superset);
1004
1005 return 0;
1006}
1007
1008#endif /* CONFIG_ARCH_OMAP34XX */
1009
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
new file mode 100644
index 000000000000..d8b4d5ad2278
--- /dev/null
+++ b/arch/arm/mach-omap2/mux.h
@@ -0,0 +1,163 @@
1/*
2 * Copyright (C) 2009 Nokia
3 * Copyright (C) 2009 Texas Instruments
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#include "mux34xx.h"
11
12#define OMAP_MUX_TERMINATOR 0xffff
13
14/* 34xx mux mode options for each pin. See TRM for options */
15#define OMAP_MUX_MODE0 0
16#define OMAP_MUX_MODE1 1
17#define OMAP_MUX_MODE2 2
18#define OMAP_MUX_MODE3 3
19#define OMAP_MUX_MODE4 4
20#define OMAP_MUX_MODE5 5
21#define OMAP_MUX_MODE6 6
22#define OMAP_MUX_MODE7 7
23
24/* 24xx/34xx mux bit defines */
25#define OMAP_PULL_ENA (1 << 3)
26#define OMAP_PULL_UP (1 << 4)
27#define OMAP_ALTELECTRICALSEL (1 << 5)
28
29/* 34xx specific mux bit defines */
30#define OMAP_INPUT_EN (1 << 8)
31#define OMAP_OFF_EN (1 << 9)
32#define OMAP_OFFOUT_EN (1 << 10)
33#define OMAP_OFFOUT_VAL (1 << 11)
34#define OMAP_OFF_PULL_EN (1 << 12)
35#define OMAP_OFF_PULL_UP (1 << 13)
36#define OMAP_WAKEUP_EN (1 << 14)
37
38/* Active pin states */
39#define OMAP_PIN_OUTPUT 0
40#define OMAP_PIN_INPUT OMAP_INPUT_EN
41#define OMAP_PIN_INPUT_PULLUP (OMAP_PULL_ENA | OMAP_INPUT_EN \
42 | OMAP_PULL_UP)
43#define OMAP_PIN_INPUT_PULLDOWN (OMAP_PULL_ENA | OMAP_INPUT_EN)
44
45/* Off mode states */
46#define OMAP_PIN_OFF_NONE 0
47#define OMAP_PIN_OFF_OUTPUT_HIGH (OMAP_OFF_EN | OMAP_OFFOUT_EN \
48 | OMAP_OFFOUT_VAL)
49#define OMAP_PIN_OFF_OUTPUT_LOW (OMAP_OFF_EN | OMAP_OFFOUT_EN)
50#define OMAP_PIN_OFF_INPUT_PULLUP (OMAP_OFF_EN | OMAP_OFF_PULL_EN \
51 | OMAP_OFF_PULL_UP)
52#define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN)
53#define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN
54
55#define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4)
56
57/* Flags for omap_mux_init */
58#define OMAP_PACKAGE_MASK 0xffff
59#define OMAP_PACKAGE_CBP 4 /* 515-pin 0.40 0.50 */
60#define OMAP_PACKAGE_CUS 3 /* 423-pin 0.65 */
61#define OMAP_PACKAGE_CBB 2 /* 515-pin 0.40 0.50 */
62#define OMAP_PACKAGE_CBC 1 /* 515-pin 0.50 0.65 */
63
64
65#define OMAP_MUX_NR_MODES 8 /* Available modes */
66#define OMAP_MUX_NR_SIDES 2 /* Bottom & top */
67
68/**
69 * struct omap_mux - data for omap mux register offset and it's value
70 * @reg_offset: mux register offset from the mux base
71 * @gpio: GPIO number
72 * @muxnames: available signal modes for a ball
73 */
74struct omap_mux {
75 u16 reg_offset;
76 u16 gpio;
77#ifdef CONFIG_OMAP_MUX
78 char *muxnames[OMAP_MUX_NR_MODES];
79#ifdef CONFIG_DEBUG_FS
80 char *balls[OMAP_MUX_NR_SIDES];
81#endif
82#endif
83};
84
85/**
86 * struct omap_ball - data for balls on omap package
87 * @reg_offset: mux register offset from the mux base
88 * @balls: available balls on the package
89 */
90struct omap_ball {
91 u16 reg_offset;
92 char *balls[OMAP_MUX_NR_SIDES];
93};
94
95/**
96 * struct omap_board_mux - data for initializing mux registers
97 * @reg_offset: mux register offset from the mux base
98 * @mux_value: desired mux value to set
99 */
100struct omap_board_mux {
101 u16 reg_offset;
102 u16 value;
103};
104
105#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_ARCH_OMAP34XX)
106
107/**
108 * omap_mux_init_gpio - initialize a signal based on the GPIO number
109 * @gpio: GPIO number
110 * @val: Options for the mux register value
111 */
112int omap_mux_init_gpio(int gpio, int val);
113
114/**
115 * omap_mux_init_signal - initialize a signal based on the signal name
116 * @muxname: Mux name in mode0_name.signal_name format
117 * @val: Options for the mux register value
118 */
119int omap_mux_init_signal(char *muxname, int val);
120
121#else
122
123static inline int omap_mux_init_gpio(int gpio, int val)
124{
125 return 0;
126}
127static inline int omap_mux_init_signal(char *muxname, int val)
128{
129 return 0;
130}
131
132#endif
133
134/**
135 * omap_mux_get_gpio() - get mux register value based on GPIO number
136 * @gpio: GPIO number
137 *
138 */
139u16 omap_mux_get_gpio(int gpio);
140
141/**
142 * omap_mux_set_gpio() - set mux register value based on GPIO number
143 * @val: New mux register value
144 * @gpio: GPIO number
145 *
146 */
147void omap_mux_set_gpio(u16 val, int gpio);
148
149/**
150 * omap3_mux_init() - initialize mux system with board specific set
151 * @board_mux: Board specific mux table
152 * @flags: OMAP package type used for the board
153 */
154int omap3_mux_init(struct omap_board_mux *board_mux, int flags);
155
156/**
157 * omap_mux_init - private mux init function, do not call
158 */
159int omap_mux_init(u32 mux_pbase, u32 mux_size,
160 struct omap_mux *superset,
161 struct omap_mux *package_subset,
162 struct omap_board_mux *board_mux,
163 struct omap_ball *package_balls);
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c
new file mode 100644
index 000000000000..68e0a595f9a1
--- /dev/null
+++ b/arch/arm/mach-omap2/mux34xx.c
@@ -0,0 +1,2099 @@
1/*
2 * Copyright (C) 2009 Nokia
3 * Copyright (C) 2009 Texas Instruments
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#include <linux/module.h>
11#include <linux/init.h>
12
13#include "mux.h"
14
15#ifdef CONFIG_OMAP_MUX
16
17#define _OMAP3_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
18{ \
19 .reg_offset = (OMAP3_CONTROL_PADCONF_##M0##_OFFSET), \
20 .gpio = (g), \
21 .muxnames = { m0, m1, m2, m3, m4, m5, m6, m7 }, \
22}
23
24#else
25
26#define _OMAP3_MUXENTRY(M0, g, m0, m1, m2, m3, m4, m5, m6, m7) \
27{ \
28 .reg_offset = (OMAP3_CONTROL_PADCONF_##M0##_OFFSET), \
29 .gpio = (g), \
30}
31
32#endif
33
34#define _OMAP3_BALLENTRY(M0, bb, bt) \
35{ \
36 .reg_offset = (OMAP3_CONTROL_PADCONF_##M0##_OFFSET), \
37 .balls = { bb, bt }, \
38}
39
40/*
41 * Superset of all mux modes for omap3
42 */
43static struct omap_mux __initdata omap3_muxmodes[] = {
44 _OMAP3_MUXENTRY(CAM_D0, 99,
45 "cam_d0", NULL, NULL, NULL,
46 "gpio_99", NULL, NULL, "safe_mode"),
47 _OMAP3_MUXENTRY(CAM_D1, 100,
48 "cam_d1", NULL, NULL, NULL,
49 "gpio_100", NULL, NULL, "safe_mode"),
50 _OMAP3_MUXENTRY(CAM_D10, 109,
51 "cam_d10", NULL, NULL, NULL,
52 "gpio_109", "hw_dbg8", NULL, "safe_mode"),
53 _OMAP3_MUXENTRY(CAM_D11, 110,
54 "cam_d11", NULL, NULL, NULL,
55 "gpio_110", "hw_dbg9", NULL, "safe_mode"),
56 _OMAP3_MUXENTRY(CAM_D2, 101,
57 "cam_d2", NULL, NULL, NULL,
58 "gpio_101", "hw_dbg4", NULL, "safe_mode"),
59 _OMAP3_MUXENTRY(CAM_D3, 102,
60 "cam_d3", NULL, NULL, NULL,
61 "gpio_102", "hw_dbg5", NULL, "safe_mode"),
62 _OMAP3_MUXENTRY(CAM_D4, 103,
63 "cam_d4", NULL, NULL, NULL,
64 "gpio_103", "hw_dbg6", NULL, "safe_mode"),
65 _OMAP3_MUXENTRY(CAM_D5, 104,
66 "cam_d5", NULL, NULL, NULL,
67 "gpio_104", "hw_dbg7", NULL, "safe_mode"),
68 _OMAP3_MUXENTRY(CAM_D6, 105,
69 "cam_d6", NULL, NULL, NULL,
70 "gpio_105", NULL, NULL, "safe_mode"),
71 _OMAP3_MUXENTRY(CAM_D7, 106,
72 "cam_d7", NULL, NULL, NULL,
73 "gpio_106", NULL, NULL, "safe_mode"),
74 _OMAP3_MUXENTRY(CAM_D8, 107,
75 "cam_d8", NULL, NULL, NULL,
76 "gpio_107", NULL, NULL, "safe_mode"),
77 _OMAP3_MUXENTRY(CAM_D9, 108,
78 "cam_d9", NULL, NULL, NULL,
79 "gpio_108", NULL, NULL, "safe_mode"),
80 _OMAP3_MUXENTRY(CAM_FLD, 98,
81 "cam_fld", NULL, "cam_global_reset", NULL,
82 "gpio_98", "hw_dbg3", NULL, "safe_mode"),
83 _OMAP3_MUXENTRY(CAM_HS, 94,
84 "cam_hs", NULL, NULL, NULL,
85 "gpio_94", "hw_dbg0", NULL, "safe_mode"),
86 _OMAP3_MUXENTRY(CAM_PCLK, 97,
87 "cam_pclk", NULL, NULL, NULL,
88 "gpio_97", "hw_dbg2", NULL, "safe_mode"),
89 _OMAP3_MUXENTRY(CAM_STROBE, 126,
90 "cam_strobe", NULL, NULL, NULL,
91 "gpio_126", "hw_dbg11", NULL, "safe_mode"),
92 _OMAP3_MUXENTRY(CAM_VS, 95,
93 "cam_vs", NULL, NULL, NULL,
94 "gpio_95", "hw_dbg1", NULL, "safe_mode"),
95 _OMAP3_MUXENTRY(CAM_WEN, 167,
96 "cam_wen", NULL, "cam_shutter", NULL,
97 "gpio_167", "hw_dbg10", NULL, "safe_mode"),
98 _OMAP3_MUXENTRY(CAM_XCLKA, 96,
99 "cam_xclka", NULL, NULL, NULL,
100 "gpio_96", NULL, NULL, "safe_mode"),
101 _OMAP3_MUXENTRY(CAM_XCLKB, 111,
102 "cam_xclkb", NULL, NULL, NULL,
103 "gpio_111", NULL, NULL, "safe_mode"),
104 _OMAP3_MUXENTRY(CSI2_DX0, 112,
105 "csi2_dx0", NULL, NULL, NULL,
106 "gpio_112", NULL, NULL, "safe_mode"),
107 _OMAP3_MUXENTRY(CSI2_DX1, 114,
108 "csi2_dx1", NULL, NULL, NULL,
109 "gpio_114", NULL, NULL, "safe_mode"),
110 _OMAP3_MUXENTRY(CSI2_DY0, 113,
111 "csi2_dy0", NULL, NULL, NULL,
112 "gpio_113", NULL, NULL, "safe_mode"),
113 _OMAP3_MUXENTRY(CSI2_DY1, 115,
114 "csi2_dy1", NULL, NULL, NULL,
115 "gpio_115", NULL, NULL, "safe_mode"),
116 _OMAP3_MUXENTRY(DSS_ACBIAS, 69,
117 "dss_acbias", NULL, NULL, NULL,
118 "gpio_69", NULL, NULL, "safe_mode"),
119 _OMAP3_MUXENTRY(DSS_DATA0, 70,
120 "dss_data0", NULL, "uart1_cts", NULL,
121 "gpio_70", NULL, NULL, "safe_mode"),
122 _OMAP3_MUXENTRY(DSS_DATA1, 71,
123 "dss_data1", NULL, "uart1_rts", NULL,
124 "gpio_71", NULL, NULL, "safe_mode"),
125 _OMAP3_MUXENTRY(DSS_DATA10, 80,
126 "dss_data10", NULL, NULL, NULL,
127 "gpio_80", NULL, NULL, "safe_mode"),
128 _OMAP3_MUXENTRY(DSS_DATA11, 81,
129 "dss_data11", NULL, NULL, NULL,
130 "gpio_81", NULL, NULL, "safe_mode"),
131 _OMAP3_MUXENTRY(DSS_DATA12, 82,
132 "dss_data12", NULL, NULL, NULL,
133 "gpio_82", NULL, NULL, "safe_mode"),
134 _OMAP3_MUXENTRY(DSS_DATA13, 83,
135 "dss_data13", NULL, NULL, NULL,
136 "gpio_83", NULL, NULL, "safe_mode"),
137 _OMAP3_MUXENTRY(DSS_DATA14, 84,
138 "dss_data14", NULL, NULL, NULL,
139 "gpio_84", NULL, NULL, "safe_mode"),
140 _OMAP3_MUXENTRY(DSS_DATA15, 85,
141 "dss_data15", NULL, NULL, NULL,
142 "gpio_85", NULL, NULL, "safe_mode"),
143 _OMAP3_MUXENTRY(DSS_DATA16, 86,
144 "dss_data16", NULL, NULL, NULL,
145 "gpio_86", NULL, NULL, "safe_mode"),
146 _OMAP3_MUXENTRY(DSS_DATA17, 87,
147 "dss_data17", NULL, NULL, NULL,
148 "gpio_87", NULL, NULL, "safe_mode"),
149 _OMAP3_MUXENTRY(DSS_DATA18, 88,
150 "dss_data18", NULL, "mcspi3_clk", "dss_data0",
151 "gpio_88", NULL, NULL, "safe_mode"),
152 _OMAP3_MUXENTRY(DSS_DATA19, 89,
153 "dss_data19", NULL, "mcspi3_simo", "dss_data1",
154 "gpio_89", NULL, NULL, "safe_mode"),
155 _OMAP3_MUXENTRY(DSS_DATA20, 90,
156 "dss_data20", NULL, "mcspi3_somi", "dss_data2",
157 "gpio_90", NULL, NULL, "safe_mode"),
158 _OMAP3_MUXENTRY(DSS_DATA21, 91,
159 "dss_data21", NULL, "mcspi3_cs0", "dss_data3",
160 "gpio_91", NULL, NULL, "safe_mode"),
161 _OMAP3_MUXENTRY(DSS_DATA22, 92,
162 "dss_data22", NULL, "mcspi3_cs1", "dss_data4",
163 "gpio_92", NULL, NULL, "safe_mode"),
164 _OMAP3_MUXENTRY(DSS_DATA23, 93,
165 "dss_data23", NULL, NULL, "dss_data5",
166 "gpio_93", NULL, NULL, "safe_mode"),
167 _OMAP3_MUXENTRY(DSS_DATA2, 72,
168 "dss_data2", NULL, NULL, NULL,
169 "gpio_72", NULL, NULL, "safe_mode"),
170 _OMAP3_MUXENTRY(DSS_DATA3, 73,
171 "dss_data3", NULL, NULL, NULL,
172 "gpio_73", NULL, NULL, "safe_mode"),
173 _OMAP3_MUXENTRY(DSS_DATA4, 74,
174 "dss_data4", NULL, "uart3_rx_irrx", NULL,
175 "gpio_74", NULL, NULL, "safe_mode"),
176 _OMAP3_MUXENTRY(DSS_DATA5, 75,
177 "dss_data5", NULL, "uart3_tx_irtx", NULL,
178 "gpio_75", NULL, NULL, "safe_mode"),
179 _OMAP3_MUXENTRY(DSS_DATA6, 76,
180 "dss_data6", NULL, "uart1_tx", NULL,
181 "gpio_76", "hw_dbg14", NULL, "safe_mode"),
182 _OMAP3_MUXENTRY(DSS_DATA7, 77,
183 "dss_data7", NULL, "uart1_rx", NULL,
184 "gpio_77", "hw_dbg15", NULL, "safe_mode"),
185 _OMAP3_MUXENTRY(DSS_DATA8, 78,
186 "dss_data8", NULL, NULL, NULL,
187 "gpio_78", "hw_dbg16", NULL, "safe_mode"),
188 _OMAP3_MUXENTRY(DSS_DATA9, 79,
189 "dss_data9", NULL, NULL, NULL,
190 "gpio_79", "hw_dbg17", NULL, "safe_mode"),
191 _OMAP3_MUXENTRY(DSS_HSYNC, 67,
192 "dss_hsync", NULL, NULL, NULL,
193 "gpio_67", "hw_dbg13", NULL, "safe_mode"),
194 _OMAP3_MUXENTRY(DSS_PCLK, 66,
195 "dss_pclk", NULL, NULL, NULL,
196 "gpio_66", "hw_dbg12", NULL, "safe_mode"),
197 _OMAP3_MUXENTRY(DSS_VSYNC, 68,
198 "dss_vsync", NULL, NULL, NULL,
199 "gpio_68", NULL, NULL, "safe_mode"),
200 _OMAP3_MUXENTRY(ETK_CLK, 12,
201 "etk_clk", "mcbsp5_clkx", "sdmmc3_clk", "hsusb1_stp",
202 "gpio_12", "mm1_rxdp", "hsusb1_tll_stp", "hw_dbg0"),
203 _OMAP3_MUXENTRY(ETK_CTL, 13,
204 "etk_ctl", NULL, "sdmmc3_cmd", "hsusb1_clk",
205 "gpio_13", NULL, "hsusb1_tll_clk", "hw_dbg1"),
206 _OMAP3_MUXENTRY(ETK_D0, 14,
207 "etk_d0", "mcspi3_simo", "sdmmc3_dat4", "hsusb1_data0",
208 "gpio_14", "mm1_rxrcv", "hsusb1_tll_data0", "hw_dbg2"),
209 _OMAP3_MUXENTRY(ETK_D1, 15,
210 "etk_d1", "mcspi3_somi", NULL, "hsusb1_data1",
211 "gpio_15", "mm1_txse0", "hsusb1_tll_data1", "hw_dbg3"),
212 _OMAP3_MUXENTRY(ETK_D10, 24,
213 "etk_d10", NULL, "uart1_rx", "hsusb2_clk",
214 "gpio_24", NULL, "hsusb2_tll_clk", "hw_dbg12"),
215 _OMAP3_MUXENTRY(ETK_D11, 25,
216 "etk_d11", NULL, NULL, "hsusb2_stp",
217 "gpio_25", "mm2_rxdp", "hsusb2_tll_stp", "hw_dbg13"),
218 _OMAP3_MUXENTRY(ETK_D12, 26,
219 "etk_d12", NULL, NULL, "hsusb2_dir",
220 "gpio_26", NULL, "hsusb2_tll_dir", "hw_dbg14"),
221 _OMAP3_MUXENTRY(ETK_D13, 27,
222 "etk_d13", NULL, NULL, "hsusb2_nxt",
223 "gpio_27", "mm2_rxdm", "hsusb2_tll_nxt", "hw_dbg15"),
224 _OMAP3_MUXENTRY(ETK_D14, 28,
225 "etk_d14", NULL, NULL, "hsusb2_data0",
226 "gpio_28", "mm2_rxrcv", "hsusb2_tll_data0", "hw_dbg16"),
227 _OMAP3_MUXENTRY(ETK_D15, 29,
228 "etk_d15", NULL, NULL, "hsusb2_data1",
229 "gpio_29", "mm2_txse0", "hsusb2_tll_data1", "hw_dbg17"),
230 _OMAP3_MUXENTRY(ETK_D2, 16,
231 "etk_d2", "mcspi3_cs0", NULL, "hsusb1_data2",
232 "gpio_16", "mm1_txdat", "hsusb1_tll_data2", "hw_dbg4"),
233 _OMAP3_MUXENTRY(ETK_D3, 17,
234 "etk_d3", "mcspi3_clk", "sdmmc3_dat3", "hsusb1_data7",
235 "gpio_17", NULL, "hsusb1_tll_data7", "hw_dbg5"),
236 _OMAP3_MUXENTRY(ETK_D4, 18,
237 "etk_d4", "mcbsp5_dr", "sdmmc3_dat0", "hsusb1_data4",
238 "gpio_18", NULL, "hsusb1_tll_data4", "hw_dbg6"),
239 _OMAP3_MUXENTRY(ETK_D5, 19,
240 "etk_d5", "mcbsp5_fsx", "sdmmc3_dat1", "hsusb1_data5",
241 "gpio_19", NULL, "hsusb1_tll_data5", "hw_dbg7"),
242 _OMAP3_MUXENTRY(ETK_D6, 20,
243 "etk_d6", "mcbsp5_dx", "sdmmc3_dat2", "hsusb1_data6",
244 "gpio_20", NULL, "hsusb1_tll_data6", "hw_dbg8"),
245 _OMAP3_MUXENTRY(ETK_D7, 21,
246 "etk_d7", "mcspi3_cs1", "sdmmc3_dat7", "hsusb1_data3",
247 "gpio_21", "mm1_txen_n", "hsusb1_tll_data3", "hw_dbg9"),
248 _OMAP3_MUXENTRY(ETK_D8, 22,
249 "etk_d8", "sys_drm_msecure", "sdmmc3_dat6", "hsusb1_dir",
250 "gpio_22", NULL, "hsusb1_tll_dir", "hw_dbg10"),
251 _OMAP3_MUXENTRY(ETK_D9, 23,
252 "etk_d9", "sys_secure_indicator", "sdmmc3_dat5", "hsusb1_nxt",
253 "gpio_23", "mm1_rxdm", "hsusb1_tll_nxt", "hw_dbg11"),
254 _OMAP3_MUXENTRY(GPMC_A1, 34,
255 "gpmc_a1", NULL, NULL, NULL,
256 "gpio_34", NULL, NULL, "safe_mode"),
257 _OMAP3_MUXENTRY(GPMC_A10, 43,
258 "gpmc_a10", "sys_ndmareq3", NULL, NULL,
259 "gpio_43", NULL, NULL, "safe_mode"),
260 _OMAP3_MUXENTRY(GPMC_A2, 35,
261 "gpmc_a2", NULL, NULL, NULL,
262 "gpio_35", NULL, NULL, "safe_mode"),
263 _OMAP3_MUXENTRY(GPMC_A3, 36,
264 "gpmc_a3", NULL, NULL, NULL,
265 "gpio_36", NULL, NULL, "safe_mode"),
266 _OMAP3_MUXENTRY(GPMC_A4, 37,
267 "gpmc_a4", NULL, NULL, NULL,
268 "gpio_37", NULL, NULL, "safe_mode"),
269 _OMAP3_MUXENTRY(GPMC_A5, 38,
270 "gpmc_a5", NULL, NULL, NULL,
271 "gpio_38", NULL, NULL, "safe_mode"),
272 _OMAP3_MUXENTRY(GPMC_A6, 39,
273 "gpmc_a6", NULL, NULL, NULL,
274 "gpio_39", NULL, NULL, "safe_mode"),
275 _OMAP3_MUXENTRY(GPMC_A7, 40,
276 "gpmc_a7", NULL, NULL, NULL,
277 "gpio_40", NULL, NULL, "safe_mode"),
278 _OMAP3_MUXENTRY(GPMC_A8, 41,
279 "gpmc_a8", NULL, NULL, NULL,
280 "gpio_41", NULL, NULL, "safe_mode"),
281 _OMAP3_MUXENTRY(GPMC_A9, 42,
282 "gpmc_a9", "sys_ndmareq2", NULL, NULL,
283 "gpio_42", NULL, NULL, "safe_mode"),
284 _OMAP3_MUXENTRY(GPMC_CLK, 59,
285 "gpmc_clk", NULL, NULL, NULL,
286 "gpio_59", NULL, NULL, "safe_mode"),
287 _OMAP3_MUXENTRY(GPMC_D10, 46,
288 "gpmc_d10", NULL, NULL, NULL,
289 "gpio_46", NULL, NULL, "safe_mode"),
290 _OMAP3_MUXENTRY(GPMC_D11, 47,
291 "gpmc_d11", NULL, NULL, NULL,
292 "gpio_47", NULL, NULL, "safe_mode"),
293 _OMAP3_MUXENTRY(GPMC_D12, 48,
294 "gpmc_d12", NULL, NULL, NULL,
295 "gpio_48", NULL, NULL, "safe_mode"),
296 _OMAP3_MUXENTRY(GPMC_D13, 49,
297 "gpmc_d13", NULL, NULL, NULL,
298 "gpio_49", NULL, NULL, "safe_mode"),
299 _OMAP3_MUXENTRY(GPMC_D14, 50,
300 "gpmc_d14", NULL, NULL, NULL,
301 "gpio_50", NULL, NULL, "safe_mode"),
302 _OMAP3_MUXENTRY(GPMC_D15, 51,
303 "gpmc_d15", NULL, NULL, NULL,
304 "gpio_51", NULL, NULL, "safe_mode"),
305 _OMAP3_MUXENTRY(GPMC_D8, 44,
306 "gpmc_d8", NULL, NULL, NULL,
307 "gpio_44", NULL, NULL, "safe_mode"),
308 _OMAP3_MUXENTRY(GPMC_D9, 45,
309 "gpmc_d9", NULL, NULL, NULL,
310 "gpio_45", NULL, NULL, "safe_mode"),
311 _OMAP3_MUXENTRY(GPMC_NBE0_CLE, 60,
312 "gpmc_nbe0_cle", NULL, NULL, NULL,
313 "gpio_60", NULL, NULL, "safe_mode"),
314 _OMAP3_MUXENTRY(GPMC_NBE1, 61,
315 "gpmc_nbe1", NULL, NULL, NULL,
316 "gpio_61", NULL, NULL, "safe_mode"),
317 _OMAP3_MUXENTRY(GPMC_NCS1, 52,
318 "gpmc_ncs1", NULL, NULL, NULL,
319 "gpio_52", NULL, NULL, "safe_mode"),
320 _OMAP3_MUXENTRY(GPMC_NCS2, 53,
321 "gpmc_ncs2", NULL, NULL, NULL,
322 "gpio_53", NULL, NULL, "safe_mode"),
323 _OMAP3_MUXENTRY(GPMC_NCS3, 54,
324 "gpmc_ncs3", "sys_ndmareq0", NULL, NULL,
325 "gpio_54", NULL, NULL, "safe_mode"),
326 _OMAP3_MUXENTRY(GPMC_NCS4, 55,
327 "gpmc_ncs4", "sys_ndmareq1", "mcbsp4_clkx", "gpt9_pwm_evt",
328 "gpio_55", NULL, NULL, "safe_mode"),
329 _OMAP3_MUXENTRY(GPMC_NCS5, 56,
330 "gpmc_ncs5", "sys_ndmareq2", "mcbsp4_dr", "gpt10_pwm_evt",
331 "gpio_56", NULL, NULL, "safe_mode"),
332 _OMAP3_MUXENTRY(GPMC_NCS6, 57,
333 "gpmc_ncs6", "sys_ndmareq3", "mcbsp4_dx", "gpt11_pwm_evt",
334 "gpio_57", NULL, NULL, "safe_mode"),
335 _OMAP3_MUXENTRY(GPMC_NCS7, 58,
336 "gpmc_ncs7", "gpmc_io_dir", "mcbsp4_fsx", "gpt8_pwm_evt",
337 "gpio_58", NULL, NULL, "safe_mode"),
338 _OMAP3_MUXENTRY(GPMC_NWP, 62,
339 "gpmc_nwp", NULL, NULL, NULL,
340 "gpio_62", NULL, NULL, "safe_mode"),
341 _OMAP3_MUXENTRY(GPMC_WAIT1, 63,
342 "gpmc_wait1", NULL, NULL, NULL,
343 "gpio_63", NULL, NULL, "safe_mode"),
344 _OMAP3_MUXENTRY(GPMC_WAIT2, 64,
345 "gpmc_wait2", NULL, NULL, NULL,
346 "gpio_64", NULL, NULL, "safe_mode"),
347 _OMAP3_MUXENTRY(GPMC_WAIT3, 65,
348 "gpmc_wait3", "sys_ndmareq1", NULL, NULL,
349 "gpio_65", NULL, NULL, "safe_mode"),
350 _OMAP3_MUXENTRY(HDQ_SIO, 170,
351 "hdq_sio", "sys_altclk", "i2c2_sccbe", "i2c3_sccbe",
352 "gpio_170", NULL, NULL, "safe_mode"),
353 _OMAP3_MUXENTRY(HSUSB0_CLK, 120,
354 "hsusb0_clk", NULL, NULL, NULL,
355 "gpio_120", NULL, NULL, "safe_mode"),
356 _OMAP3_MUXENTRY(HSUSB0_DATA0, 125,
357 "hsusb0_data0", NULL, "uart3_tx_irtx", NULL,
358 "gpio_125", NULL, NULL, "safe_mode"),
359 _OMAP3_MUXENTRY(HSUSB0_DATA1, 130,
360 "hsusb0_data1", NULL, "uart3_rx_irrx", NULL,
361 "gpio_130", NULL, NULL, "safe_mode"),
362 _OMAP3_MUXENTRY(HSUSB0_DATA2, 131,
363 "hsusb0_data2", NULL, "uart3_rts_sd", NULL,
364 "gpio_131", NULL, NULL, "safe_mode"),
365 _OMAP3_MUXENTRY(HSUSB0_DATA3, 169,
366 "hsusb0_data3", NULL, "uart3_cts_rctx", NULL,
367 "gpio_169", NULL, NULL, "safe_mode"),
368 _OMAP3_MUXENTRY(HSUSB0_DATA4, 188,
369 "hsusb0_data4", NULL, NULL, NULL,
370 "gpio_188", NULL, NULL, "safe_mode"),
371 _OMAP3_MUXENTRY(HSUSB0_DATA5, 189,
372 "hsusb0_data5", NULL, NULL, NULL,
373 "gpio_189", NULL, NULL, "safe_mode"),
374 _OMAP3_MUXENTRY(HSUSB0_DATA6, 190,
375 "hsusb0_data6", NULL, NULL, NULL,
376 "gpio_190", NULL, NULL, "safe_mode"),
377 _OMAP3_MUXENTRY(HSUSB0_DATA7, 191,
378 "hsusb0_data7", NULL, NULL, NULL,
379 "gpio_191", NULL, NULL, "safe_mode"),
380 _OMAP3_MUXENTRY(HSUSB0_DIR, 122,
381 "hsusb0_dir", NULL, NULL, NULL,
382 "gpio_122", NULL, NULL, "safe_mode"),
383 _OMAP3_MUXENTRY(HSUSB0_NXT, 124,
384 "hsusb0_nxt", NULL, NULL, NULL,
385 "gpio_124", NULL, NULL, "safe_mode"),
386 _OMAP3_MUXENTRY(HSUSB0_STP, 121,
387 "hsusb0_stp", NULL, NULL, NULL,
388 "gpio_121", NULL, NULL, "safe_mode"),
389 _OMAP3_MUXENTRY(I2C2_SCL, 168,
390 "i2c2_scl", NULL, NULL, NULL,
391 "gpio_168", NULL, NULL, "safe_mode"),
392 _OMAP3_MUXENTRY(I2C2_SDA, 183,
393 "i2c2_sda", NULL, NULL, NULL,
394 "gpio_183", NULL, NULL, "safe_mode"),
395 _OMAP3_MUXENTRY(I2C3_SCL, 184,
396 "i2c3_scl", NULL, NULL, NULL,
397 "gpio_184", NULL, NULL, "safe_mode"),
398 _OMAP3_MUXENTRY(I2C3_SDA, 185,
399 "i2c3_sda", NULL, NULL, NULL,
400 "gpio_185", NULL, NULL, "safe_mode"),
401 _OMAP3_MUXENTRY(I2C4_SCL, 0,
402 "i2c4_scl", "sys_nvmode1", NULL, NULL,
403 NULL, NULL, NULL, "safe_mode"),
404 _OMAP3_MUXENTRY(I2C4_SDA, 0,
405 "i2c4_sda", "sys_nvmode2", NULL, NULL,
406 NULL, NULL, NULL, "safe_mode"),
407 _OMAP3_MUXENTRY(JTAG_EMU0, 11,
408 "jtag_emu0", NULL, NULL, NULL,
409 "gpio_11", NULL, NULL, "safe_mode"),
410 _OMAP3_MUXENTRY(JTAG_EMU1, 31,
411 "jtag_emu1", NULL, NULL, NULL,
412 "gpio_31", NULL, NULL, "safe_mode"),
413 _OMAP3_MUXENTRY(MCBSP1_CLKR, 156,
414 "mcbsp1_clkr", "mcspi4_clk", NULL, NULL,
415 "gpio_156", NULL, NULL, "safe_mode"),
416 _OMAP3_MUXENTRY(MCBSP1_CLKX, 162,
417 "mcbsp1_clkx", NULL, "mcbsp3_clkx", NULL,
418 "gpio_162", NULL, NULL, "safe_mode"),
419 _OMAP3_MUXENTRY(MCBSP1_DR, 159,
420 "mcbsp1_dr", "mcspi4_somi", "mcbsp3_dr", NULL,
421 "gpio_159", NULL, NULL, "safe_mode"),
422 _OMAP3_MUXENTRY(MCBSP1_DX, 158,
423 "mcbsp1_dx", "mcspi4_simo", "mcbsp3_dx", NULL,
424 "gpio_158", NULL, NULL, "safe_mode"),
425 _OMAP3_MUXENTRY(MCBSP1_FSR, 157,
426 "mcbsp1_fsr", NULL, "cam_global_reset", NULL,
427 "gpio_157", NULL, NULL, "safe_mode"),
428 _OMAP3_MUXENTRY(MCBSP1_FSX, 161,
429 "mcbsp1_fsx", "mcspi4_cs0", "mcbsp3_fsx", NULL,
430 "gpio_161", NULL, NULL, "safe_mode"),
431 _OMAP3_MUXENTRY(MCBSP2_CLKX, 117,
432 "mcbsp2_clkx", NULL, NULL, NULL,
433 "gpio_117", NULL, NULL, "safe_mode"),
434 _OMAP3_MUXENTRY(MCBSP2_DR, 118,
435 "mcbsp2_dr", NULL, NULL, NULL,
436 "gpio_118", NULL, NULL, "safe_mode"),
437 _OMAP3_MUXENTRY(MCBSP2_DX, 119,
438 "mcbsp2_dx", NULL, NULL, NULL,
439 "gpio_119", NULL, NULL, "safe_mode"),
440 _OMAP3_MUXENTRY(MCBSP2_FSX, 116,
441 "mcbsp2_fsx", NULL, NULL, NULL,
442 "gpio_116", NULL, NULL, "safe_mode"),
443 _OMAP3_MUXENTRY(MCBSP3_CLKX, 142,
444 "mcbsp3_clkx", "uart2_tx", NULL, NULL,
445 "gpio_142", "hsusb3_tll_data6", NULL, "safe_mode"),
446 _OMAP3_MUXENTRY(MCBSP3_DR, 141,
447 "mcbsp3_dr", "uart2_rts", NULL, NULL,
448 "gpio_141", "hsusb3_tll_data5", NULL, "safe_mode"),
449 _OMAP3_MUXENTRY(MCBSP3_DX, 140,
450 "mcbsp3_dx", "uart2_cts", NULL, NULL,
451 "gpio_140", "hsusb3_tll_data4", NULL, "safe_mode"),
452 _OMAP3_MUXENTRY(MCBSP3_FSX, 143,
453 "mcbsp3_fsx", "uart2_rx", NULL, NULL,
454 "gpio_143", "hsusb3_tll_data7", NULL, "safe_mode"),
455 _OMAP3_MUXENTRY(MCBSP4_CLKX, 152,
456 "mcbsp4_clkx", NULL, NULL, NULL,
457 "gpio_152", "hsusb3_tll_data1", "mm3_txse0", "safe_mode"),
458 _OMAP3_MUXENTRY(MCBSP4_DR, 153,
459 "mcbsp4_dr", NULL, NULL, NULL,
460 "gpio_153", "hsusb3_tll_data0", "mm3_rxrcv", "safe_mode"),
461 _OMAP3_MUXENTRY(MCBSP4_DX, 154,
462 "mcbsp4_dx", NULL, NULL, NULL,
463 "gpio_154", "hsusb3_tll_data2", "mm3_txdat", "safe_mode"),
464 _OMAP3_MUXENTRY(MCBSP4_FSX, 155,
465 "mcbsp4_fsx", NULL, NULL, NULL,
466 "gpio_155", "hsusb3_tll_data3", "mm3_txen_n", "safe_mode"),
467 _OMAP3_MUXENTRY(MCBSP_CLKS, 160,
468 "mcbsp_clks", NULL, "cam_shutter", NULL,
469 "gpio_160", "uart1_cts", NULL, "safe_mode"),
470 _OMAP3_MUXENTRY(MCSPI1_CLK, 171,
471 "mcspi1_clk", "sdmmc2_dat4", NULL, NULL,
472 "gpio_171", NULL, NULL, "safe_mode"),
473 _OMAP3_MUXENTRY(MCSPI1_CS0, 174,
474 "mcspi1_cs0", "sdmmc2_dat7", NULL, NULL,
475 "gpio_174", NULL, NULL, "safe_mode"),
476 _OMAP3_MUXENTRY(MCSPI1_CS1, 175,
477 "mcspi1_cs1", NULL, NULL, "sdmmc3_cmd",
478 "gpio_175", NULL, NULL, "safe_mode"),
479 _OMAP3_MUXENTRY(MCSPI1_CS2, 176,
480 "mcspi1_cs2", NULL, NULL, "sdmmc3_clk",
481 "gpio_176", NULL, NULL, "safe_mode"),
482 _OMAP3_MUXENTRY(MCSPI1_CS3, 177,
483 "mcspi1_cs3", NULL, "hsusb2_tll_data2", "hsusb2_data2",
484 "gpio_177", "mm2_txdat", NULL, "safe_mode"),
485 _OMAP3_MUXENTRY(MCSPI1_SIMO, 172,
486 "mcspi1_simo", "sdmmc2_dat5", NULL, NULL,
487 "gpio_172", NULL, NULL, "safe_mode"),
488 _OMAP3_MUXENTRY(MCSPI1_SOMI, 173,
489 "mcspi1_somi", "sdmmc2_dat6", NULL, NULL,
490 "gpio_173", NULL, NULL, "safe_mode"),
491 _OMAP3_MUXENTRY(MCSPI2_CLK, 178,
492 "mcspi2_clk", NULL, "hsusb2_tll_data7", "hsusb2_data7",
493 "gpio_178", NULL, NULL, "safe_mode"),
494 _OMAP3_MUXENTRY(MCSPI2_CS0, 181,
495 "mcspi2_cs0", "gpt11_pwm_evt",
496 "hsusb2_tll_data6", "hsusb2_data6",
497 "gpio_181", NULL, NULL, "safe_mode"),
498 _OMAP3_MUXENTRY(MCSPI2_CS1, 182,
499 "mcspi2_cs1", "gpt8_pwm_evt",
500 "hsusb2_tll_data3", "hsusb2_data3",
501 "gpio_182", "mm2_txen_n", NULL, "safe_mode"),
502 _OMAP3_MUXENTRY(MCSPI2_SIMO, 179,
503 "mcspi2_simo", "gpt9_pwm_evt",
504 "hsusb2_tll_data4", "hsusb2_data4",
505 "gpio_179", NULL, NULL, "safe_mode"),
506 _OMAP3_MUXENTRY(MCSPI2_SOMI, 180,
507 "mcspi2_somi", "gpt10_pwm_evt",
508 "hsusb2_tll_data5", "hsusb2_data5",
509 "gpio_180", NULL, NULL, "safe_mode"),
510 _OMAP3_MUXENTRY(SDMMC1_CLK, 120,
511 "sdmmc1_clk", NULL, NULL, NULL,
512 "gpio_120", NULL, NULL, "safe_mode"),
513 _OMAP3_MUXENTRY(SDMMC1_CMD, 121,
514 "sdmmc1_cmd", NULL, NULL, NULL,
515 "gpio_121", NULL, NULL, "safe_mode"),
516 _OMAP3_MUXENTRY(SDMMC1_DAT0, 122,
517 "sdmmc1_dat0", NULL, NULL, NULL,
518 "gpio_122", NULL, NULL, "safe_mode"),
519 _OMAP3_MUXENTRY(SDMMC1_DAT1, 123,
520 "sdmmc1_dat1", NULL, NULL, NULL,
521 "gpio_123", NULL, NULL, "safe_mode"),
522 _OMAP3_MUXENTRY(SDMMC1_DAT2, 124,
523 "sdmmc1_dat2", NULL, NULL, NULL,
524 "gpio_124", NULL, NULL, "safe_mode"),
525 _OMAP3_MUXENTRY(SDMMC1_DAT3, 125,
526 "sdmmc1_dat3", NULL, NULL, NULL,
527 "gpio_125", NULL, NULL, "safe_mode"),
528 _OMAP3_MUXENTRY(SDMMC1_DAT4, 126,
529 "sdmmc1_dat4", NULL, "sim_io", NULL,
530 "gpio_126", NULL, NULL, "safe_mode"),
531 _OMAP3_MUXENTRY(SDMMC1_DAT5, 127,
532 "sdmmc1_dat5", NULL, "sim_clk", NULL,
533 "gpio_127", NULL, NULL, "safe_mode"),
534 _OMAP3_MUXENTRY(SDMMC1_DAT6, 128,
535 "sdmmc1_dat6", NULL, "sim_pwrctrl", NULL,
536 "gpio_128", NULL, NULL, "safe_mode"),
537 _OMAP3_MUXENTRY(SDMMC1_DAT7, 129,
538 "sdmmc1_dat7", NULL, "sim_rst", NULL,
539 "gpio_129", NULL, NULL, "safe_mode"),
540 _OMAP3_MUXENTRY(SDMMC2_CLK, 130,
541 "sdmmc2_clk", "mcspi3_clk", NULL, NULL,
542 "gpio_130", NULL, NULL, "safe_mode"),
543 _OMAP3_MUXENTRY(SDMMC2_CMD, 131,
544 "sdmmc2_cmd", "mcspi3_simo", NULL, NULL,
545 "gpio_131", NULL, NULL, "safe_mode"),
546 _OMAP3_MUXENTRY(SDMMC2_DAT0, 132,
547 "sdmmc2_dat0", "mcspi3_somi", NULL, NULL,
548 "gpio_132", NULL, NULL, "safe_mode"),
549 _OMAP3_MUXENTRY(SDMMC2_DAT1, 133,
550 "sdmmc2_dat1", NULL, NULL, NULL,
551 "gpio_133", NULL, NULL, "safe_mode"),
552 _OMAP3_MUXENTRY(SDMMC2_DAT2, 134,
553 "sdmmc2_dat2", "mcspi3_cs1", NULL, NULL,
554 "gpio_134", NULL, NULL, "safe_mode"),
555 _OMAP3_MUXENTRY(SDMMC2_DAT3, 135,
556 "sdmmc2_dat3", "mcspi3_cs0", NULL, NULL,
557 "gpio_135", NULL, NULL, "safe_mode"),
558 _OMAP3_MUXENTRY(SDMMC2_DAT4, 136,
559 "sdmmc2_dat4", "sdmmc2_dir_dat0", NULL, "sdmmc3_dat0",
560 "gpio_136", NULL, NULL, "safe_mode"),
561 _OMAP3_MUXENTRY(SDMMC2_DAT5, 137,
562 "sdmmc2_dat5", "sdmmc2_dir_dat1",
563 "cam_global_reset", "sdmmc3_dat1",
564 "gpio_137", "hsusb3_tll_stp", "mm3_rxdp", "safe_mode"),
565 _OMAP3_MUXENTRY(SDMMC2_DAT6, 138,
566 "sdmmc2_dat6", "sdmmc2_dir_cmd", "cam_shutter", "sdmmc3_dat2",
567 "gpio_138", "hsusb3_tll_dir", NULL, "safe_mode"),
568 _OMAP3_MUXENTRY(SDMMC2_DAT7, 139,
569 "sdmmc2_dat7", "sdmmc2_clkin", NULL, "sdmmc3_dat3",
570 "gpio_139", "hsusb3_tll_nxt", "mm3_rxdm", "safe_mode"),
571 _OMAP3_MUXENTRY(SDRC_CKE0, 0,
572 "sdrc_cke0", NULL, NULL, NULL,
573 NULL, NULL, NULL, "safe_mode"),
574 _OMAP3_MUXENTRY(SDRC_CKE1, 0,
575 "sdrc_cke1", NULL, NULL, NULL,
576 NULL, NULL, NULL, "safe_mode"),
577 _OMAP3_MUXENTRY(SYS_BOOT0, 2,
578 "sys_boot0", NULL, NULL, NULL,
579 "gpio_2", NULL, NULL, "safe_mode"),
580 _OMAP3_MUXENTRY(SYS_BOOT1, 3,
581 "sys_boot1", NULL, NULL, NULL,
582 "gpio_3", NULL, NULL, "safe_mode"),
583 _OMAP3_MUXENTRY(SYS_BOOT2, 4,
584 "sys_boot2", NULL, NULL, NULL,
585 "gpio_4", NULL, NULL, "safe_mode"),
586 _OMAP3_MUXENTRY(SYS_BOOT3, 5,
587 "sys_boot3", NULL, NULL, NULL,
588 "gpio_5", NULL, NULL, "safe_mode"),
589 _OMAP3_MUXENTRY(SYS_BOOT4, 6,
590 "sys_boot4", "sdmmc2_dir_dat2", NULL, NULL,
591 "gpio_6", NULL, NULL, "safe_mode"),
592 _OMAP3_MUXENTRY(SYS_BOOT5, 7,
593 "sys_boot5", "sdmmc2_dir_dat3", NULL, NULL,
594 "gpio_7", NULL, NULL, "safe_mode"),
595 _OMAP3_MUXENTRY(SYS_BOOT6, 8,
596 "sys_boot6", NULL, NULL, NULL,
597 "gpio_8", NULL, NULL, "safe_mode"),
598 _OMAP3_MUXENTRY(SYS_CLKOUT1, 10,
599 "sys_clkout1", NULL, NULL, NULL,
600 "gpio_10", NULL, NULL, "safe_mode"),
601 _OMAP3_MUXENTRY(SYS_CLKOUT2, 186,
602 "sys_clkout2", NULL, NULL, NULL,
603 "gpio_186", NULL, NULL, "safe_mode"),
604 _OMAP3_MUXENTRY(SYS_CLKREQ, 1,
605 "sys_clkreq", NULL, NULL, NULL,
606 "gpio_1", NULL, NULL, "safe_mode"),
607 _OMAP3_MUXENTRY(SYS_NIRQ, 0,
608 "sys_nirq", NULL, NULL, NULL,
609 "gpio_0", NULL, NULL, "safe_mode"),
610 _OMAP3_MUXENTRY(SYS_NRESWARM, 30,
611 "sys_nreswarm", NULL, NULL, NULL,
612 "gpio_30", NULL, NULL, "safe_mode"),
613 _OMAP3_MUXENTRY(SYS_OFF_MODE, 9,
614 "sys_off_mode", NULL, NULL, NULL,
615 "gpio_9", NULL, NULL, "safe_mode"),
616 _OMAP3_MUXENTRY(UART1_CTS, 150,
617 "uart1_cts", NULL, NULL, NULL,
618 "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"),
619 _OMAP3_MUXENTRY(UART1_RTS, 149,
620 "uart1_rts", NULL, NULL, NULL,
621 "gpio_149", NULL, NULL, "safe_mode"),
622 _OMAP3_MUXENTRY(UART1_RX, 151,
623 "uart1_rx", NULL, "mcbsp1_clkr", "mcspi4_clk",
624 "gpio_151", NULL, NULL, "safe_mode"),
625 _OMAP3_MUXENTRY(UART1_TX, 148,
626 "uart1_tx", NULL, NULL, NULL,
627 "gpio_148", NULL, NULL, "safe_mode"),
628 _OMAP3_MUXENTRY(UART2_CTS, 144,
629 "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL,
630 "gpio_144", NULL, NULL, "safe_mode"),
631 _OMAP3_MUXENTRY(UART2_RTS, 145,
632 "uart2_rts", "mcbsp3_dr", "gpt10_pwm_evt", NULL,
633 "gpio_145", NULL, NULL, "safe_mode"),
634 _OMAP3_MUXENTRY(UART2_RX, 147,
635 "uart2_rx", "mcbsp3_fsx", "gpt8_pwm_evt", NULL,
636 "gpio_147", NULL, NULL, "safe_mode"),
637 _OMAP3_MUXENTRY(UART2_TX, 146,
638 "uart2_tx", "mcbsp3_clkx", "gpt11_pwm_evt", NULL,
639 "gpio_146", NULL, NULL, "safe_mode"),
640 _OMAP3_MUXENTRY(UART3_CTS_RCTX, 163,
641 "uart3_cts_rctx", NULL, NULL, NULL,
642 "gpio_163", NULL, NULL, "safe_mode"),
643 _OMAP3_MUXENTRY(UART3_RTS_SD, 164,
644 "uart3_rts_sd", NULL, NULL, NULL,
645 "gpio_164", NULL, NULL, "safe_mode"),
646 _OMAP3_MUXENTRY(UART3_RX_IRRX, 165,
647 "uart3_rx_irrx", NULL, NULL, NULL,
648 "gpio_165", NULL, NULL, "safe_mode"),
649 _OMAP3_MUXENTRY(UART3_TX_IRTX, 166,
650 "uart3_tx_irtx", NULL, NULL, NULL,
651 "gpio_166", NULL, NULL, "safe_mode"),
652 { .reg_offset = OMAP_MUX_TERMINATOR },
653};
654
655/*
656 * Signals different on CBC package compared to the superset
657 */
658#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBC)
659struct omap_mux __initdata omap3_cbc_subset[] = {
660 { .reg_offset = OMAP_MUX_TERMINATOR },
661};
662#else
663#define omap3_cbc_subset NULL
664#endif
665
666/*
667 * Balls for CBC package
668 * 515-pin s-PBGA Package, 0.65mm Ball Pitch (Top), 0.50mm Ball Pitch (Bottom)
669 *
670 * FIXME: What's up with the outdated TI documentation? See:
671 *
672 * http://wiki.davincidsp.com/index.php/Datasheet_Errata_for_OMAP35x_CBC_Package
673 * http://community.ti.com/forums/t/10982.aspx
674 */
675#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
676 && defined(CONFIG_OMAP_PACKAGE_CBC)
677struct omap_ball __initdata omap3_cbc_ball[] = {
678 _OMAP3_BALLENTRY(CAM_D0, "ae16", NULL),
679 _OMAP3_BALLENTRY(CAM_D1, "ae15", NULL),
680 _OMAP3_BALLENTRY(CAM_D10, "d25", NULL),
681 _OMAP3_BALLENTRY(CAM_D11, "e26", NULL),
682 _OMAP3_BALLENTRY(CAM_D2, "a24", NULL),
683 _OMAP3_BALLENTRY(CAM_D3, "b24", NULL),
684 _OMAP3_BALLENTRY(CAM_D4, "d24", NULL),
685 _OMAP3_BALLENTRY(CAM_D5, "c24", NULL),
686 _OMAP3_BALLENTRY(CAM_D6, "p25", NULL),
687 _OMAP3_BALLENTRY(CAM_D7, "p26", NULL),
688 _OMAP3_BALLENTRY(CAM_D8, "n25", NULL),
689 _OMAP3_BALLENTRY(CAM_D9, "n26", NULL),
690 _OMAP3_BALLENTRY(CAM_FLD, "b23", NULL),
691 _OMAP3_BALLENTRY(CAM_HS, "c23", NULL),
692 _OMAP3_BALLENTRY(CAM_PCLK, "c26", NULL),
693 _OMAP3_BALLENTRY(CAM_STROBE, "d26", NULL),
694 _OMAP3_BALLENTRY(CAM_VS, "d23", NULL),
695 _OMAP3_BALLENTRY(CAM_WEN, "a23", NULL),
696 _OMAP3_BALLENTRY(CAM_XCLKA, "c25", NULL),
697 _OMAP3_BALLENTRY(CAM_XCLKB, "e25", NULL),
698 _OMAP3_BALLENTRY(CSI2_DX0, "ad17", NULL),
699 _OMAP3_BALLENTRY(CSI2_DX1, "ae18", NULL),
700 _OMAP3_BALLENTRY(CSI2_DY0, "ad16", NULL),
701 _OMAP3_BALLENTRY(CSI2_DY1, "ae17", NULL),
702 _OMAP3_BALLENTRY(DSS_ACBIAS, "f26", NULL),
703 _OMAP3_BALLENTRY(DSS_DATA0, "ae21", NULL),
704 _OMAP3_BALLENTRY(DSS_DATA1, "ae22", NULL),
705 _OMAP3_BALLENTRY(DSS_DATA10, "ac26", NULL),
706 _OMAP3_BALLENTRY(DSS_DATA11, "ad26", NULL),
707 _OMAP3_BALLENTRY(DSS_DATA12, "aa25", NULL),
708 _OMAP3_BALLENTRY(DSS_DATA13, "y25", NULL),
709 _OMAP3_BALLENTRY(DSS_DATA14, "aa26", NULL),
710 _OMAP3_BALLENTRY(DSS_DATA15, "ab26", NULL),
711 _OMAP3_BALLENTRY(DSS_DATA16, "l25", NULL),
712 _OMAP3_BALLENTRY(DSS_DATA17, "l26", NULL),
713 _OMAP3_BALLENTRY(DSS_DATA18, "m24", NULL),
714 _OMAP3_BALLENTRY(DSS_DATA19, "m26", NULL),
715 _OMAP3_BALLENTRY(DSS_DATA2, "ae23", NULL),
716 _OMAP3_BALLENTRY(DSS_DATA20, "f25", NULL),
717 _OMAP3_BALLENTRY(DSS_DATA21, "n24", NULL),
718 _OMAP3_BALLENTRY(DSS_DATA22, "ac25", NULL),
719 _OMAP3_BALLENTRY(DSS_DATA23, "ab25", NULL),
720 _OMAP3_BALLENTRY(DSS_DATA3, "ae24", NULL),
721 _OMAP3_BALLENTRY(DSS_DATA4, "ad23", NULL),
722 _OMAP3_BALLENTRY(DSS_DATA5, "ad24", NULL),
723 _OMAP3_BALLENTRY(DSS_DATA6, "g26", NULL),
724 _OMAP3_BALLENTRY(DSS_DATA7, "h25", NULL),
725 _OMAP3_BALLENTRY(DSS_DATA8, "h26", NULL),
726 _OMAP3_BALLENTRY(DSS_DATA9, "j26", NULL),
727 _OMAP3_BALLENTRY(DSS_HSYNC, "k24", NULL),
728 _OMAP3_BALLENTRY(DSS_PCLK, "g25", NULL),
729 _OMAP3_BALLENTRY(DSS_VSYNC, "m25", NULL),
730 _OMAP3_BALLENTRY(ETK_CLK, "ab2", NULL),
731 _OMAP3_BALLENTRY(ETK_CTL, "ab3", NULL),
732 _OMAP3_BALLENTRY(ETK_D0, "ac3", NULL),
733 _OMAP3_BALLENTRY(ETK_D1, "ad4", NULL),
734 _OMAP3_BALLENTRY(ETK_D10, "ae4", NULL),
735 _OMAP3_BALLENTRY(ETK_D11, "af6", NULL),
736 _OMAP3_BALLENTRY(ETK_D12, "ae6", NULL),
737 _OMAP3_BALLENTRY(ETK_D13, "af7", NULL),
738 _OMAP3_BALLENTRY(ETK_D14, "af9", NULL),
739 _OMAP3_BALLENTRY(ETK_D15, "ae9", NULL),
740 _OMAP3_BALLENTRY(ETK_D2, "ad3", NULL),
741 _OMAP3_BALLENTRY(ETK_D3, "aa3", NULL),
742 _OMAP3_BALLENTRY(ETK_D4, "y3", NULL),
743 _OMAP3_BALLENTRY(ETK_D5, "ab1", NULL),
744 _OMAP3_BALLENTRY(ETK_D6, "ae3", NULL),
745 _OMAP3_BALLENTRY(ETK_D7, "ad2", NULL),
746 _OMAP3_BALLENTRY(ETK_D8, "aa4", NULL),
747 _OMAP3_BALLENTRY(ETK_D9, "v2", NULL),
748 _OMAP3_BALLENTRY(GPMC_A1, "j2", NULL),
749 _OMAP3_BALLENTRY(GPMC_A10, "d2", NULL),
750 _OMAP3_BALLENTRY(GPMC_A2, "h1", NULL),
751 _OMAP3_BALLENTRY(GPMC_A3, "h2", NULL),
752 _OMAP3_BALLENTRY(GPMC_A4, "g2", NULL),
753 _OMAP3_BALLENTRY(GPMC_A5, "f1", NULL),
754 _OMAP3_BALLENTRY(GPMC_A6, "f2", NULL),
755 _OMAP3_BALLENTRY(GPMC_A7, "e1", NULL),
756 _OMAP3_BALLENTRY(GPMC_A8, "e2", NULL),
757 _OMAP3_BALLENTRY(GPMC_A9, "d1", NULL),
758 _OMAP3_BALLENTRY(GPMC_CLK, "n1", "l1"),
759 _OMAP3_BALLENTRY(GPMC_D10, "t1", "n1"),
760 _OMAP3_BALLENTRY(GPMC_D11, "u2", "p2"),
761 _OMAP3_BALLENTRY(GPMC_D12, "u1", "p1"),
762 _OMAP3_BALLENTRY(GPMC_D13, "p1", "m1"),
763 _OMAP3_BALLENTRY(GPMC_D14, "l2", "j2"),
764 _OMAP3_BALLENTRY(GPMC_D15, "m2", "k2"),
765 _OMAP3_BALLENTRY(GPMC_D8, "v1", "r1"),
766 _OMAP3_BALLENTRY(GPMC_D9, "y1", "t1"),
767 _OMAP3_BALLENTRY(GPMC_NBE0_CLE, "k2", NULL),
768 _OMAP3_BALLENTRY(GPMC_NBE1, "j1", NULL),
769 _OMAP3_BALLENTRY(GPMC_NCS1, "ad1", "w1"),
770 _OMAP3_BALLENTRY(GPMC_NCS2, "a3", NULL),
771 _OMAP3_BALLENTRY(GPMC_NCS3, "b6", NULL),
772 _OMAP3_BALLENTRY(GPMC_NCS4, "b4", NULL),
773 _OMAP3_BALLENTRY(GPMC_NCS5, "c4", NULL),
774 _OMAP3_BALLENTRY(GPMC_NCS6, "b5", NULL),
775 _OMAP3_BALLENTRY(GPMC_NCS7, "c5", NULL),
776 _OMAP3_BALLENTRY(GPMC_NWP, "ac6", "y5"),
777 _OMAP3_BALLENTRY(GPMC_WAIT1, "ac8", "y8"),
778 _OMAP3_BALLENTRY(GPMC_WAIT2, "b3", NULL),
779 _OMAP3_BALLENTRY(GPMC_WAIT3, "c6", NULL),
780 _OMAP3_BALLENTRY(HDQ_SIO, "j23", NULL),
781 _OMAP3_BALLENTRY(HSUSB0_CLK, "w19", NULL),
782 _OMAP3_BALLENTRY(HSUSB0_DATA0, "v20", NULL),
783 _OMAP3_BALLENTRY(HSUSB0_DATA1, "y20", NULL),
784 _OMAP3_BALLENTRY(HSUSB0_DATA2, "v18", NULL),
785 _OMAP3_BALLENTRY(HSUSB0_DATA3, "w20", NULL),
786 _OMAP3_BALLENTRY(HSUSB0_DATA4, "w17", NULL),
787 _OMAP3_BALLENTRY(HSUSB0_DATA5, "y18", NULL),
788 _OMAP3_BALLENTRY(HSUSB0_DATA6, "y19", NULL),
789 _OMAP3_BALLENTRY(HSUSB0_DATA7, "y17", NULL),
790 _OMAP3_BALLENTRY(HSUSB0_DIR, "v19", NULL),
791 _OMAP3_BALLENTRY(HSUSB0_NXT, "w18", NULL),
792 _OMAP3_BALLENTRY(HSUSB0_STP, "u20", NULL),
793 _OMAP3_BALLENTRY(I2C2_SCL, "c2", NULL),
794 _OMAP3_BALLENTRY(I2C2_SDA, "c1", NULL),
795 _OMAP3_BALLENTRY(I2C3_SCL, "ab4", NULL),
796 _OMAP3_BALLENTRY(I2C3_SDA, "ac4", NULL),
797 _OMAP3_BALLENTRY(I2C4_SCL, "ad15", NULL),
798 _OMAP3_BALLENTRY(I2C4_SDA, "w16", NULL),
799 _OMAP3_BALLENTRY(JTAG_EMU0, "y15", NULL),
800 _OMAP3_BALLENTRY(JTAG_EMU1, "y14", NULL),
801 _OMAP3_BALLENTRY(MCBSP1_CLKR, "u19", NULL),
802 _OMAP3_BALLENTRY(MCBSP1_CLKX, "t17", NULL),
803 _OMAP3_BALLENTRY(MCBSP1_DR, "t20", NULL),
804 _OMAP3_BALLENTRY(MCBSP1_DX, "u17", NULL),
805 _OMAP3_BALLENTRY(MCBSP1_FSR, "v17", NULL),
806 _OMAP3_BALLENTRY(MCBSP1_FSX, "p20", NULL),
807 _OMAP3_BALLENTRY(MCBSP2_CLKX, "r18", NULL),
808 _OMAP3_BALLENTRY(MCBSP2_DR, "t18", NULL),
809 _OMAP3_BALLENTRY(MCBSP2_DX, "r19", NULL),
810 _OMAP3_BALLENTRY(MCBSP2_FSX, "u18", NULL),
811 _OMAP3_BALLENTRY(MCBSP3_CLKX, "u3", NULL),
812 _OMAP3_BALLENTRY(MCBSP3_DR, "n3", NULL),
813 _OMAP3_BALLENTRY(MCBSP3_DX, "p3", NULL),
814 _OMAP3_BALLENTRY(MCBSP3_FSX, "w3", NULL),
815 _OMAP3_BALLENTRY(MCBSP4_CLKX, "v3", NULL),
816 _OMAP3_BALLENTRY(MCBSP4_DR, "u4", NULL),
817 _OMAP3_BALLENTRY(MCBSP4_DX, "r3", NULL),
818 _OMAP3_BALLENTRY(MCBSP4_FSX, "t3", NULL),
819 _OMAP3_BALLENTRY(MCBSP_CLKS, "t19", NULL),
820 _OMAP3_BALLENTRY(MCSPI1_CLK, "p9", NULL),
821 _OMAP3_BALLENTRY(MCSPI1_CS0, "r7", NULL),
822 _OMAP3_BALLENTRY(MCSPI1_CS1, "r8", NULL),
823 _OMAP3_BALLENTRY(MCSPI1_CS2, "r9", NULL),
824 _OMAP3_BALLENTRY(MCSPI1_CS3, "t8", NULL),
825 _OMAP3_BALLENTRY(MCSPI1_SIMO, "p8", NULL),
826 _OMAP3_BALLENTRY(MCSPI1_SOMI, "p7", NULL),
827 _OMAP3_BALLENTRY(MCSPI2_CLK, "w7", NULL),
828 _OMAP3_BALLENTRY(MCSPI2_CS0, "v8", NULL),
829 _OMAP3_BALLENTRY(MCSPI2_CS1, "v9", NULL),
830 _OMAP3_BALLENTRY(MCSPI2_SIMO, "w8", NULL),
831 _OMAP3_BALLENTRY(MCSPI2_SOMI, "u8", NULL),
832 _OMAP3_BALLENTRY(SDMMC1_CLK, "n19", NULL),
833 _OMAP3_BALLENTRY(SDMMC1_CMD, "l18", NULL),
834 _OMAP3_BALLENTRY(SDMMC1_DAT0, "m19", NULL),
835 _OMAP3_BALLENTRY(SDMMC1_DAT1, "m18", NULL),
836 _OMAP3_BALLENTRY(SDMMC1_DAT2, "k18", NULL),
837 _OMAP3_BALLENTRY(SDMMC1_DAT3, "n20", NULL),
838 _OMAP3_BALLENTRY(SDMMC1_DAT4, "m20", NULL),
839 _OMAP3_BALLENTRY(SDMMC1_DAT5, "p17", NULL),
840 _OMAP3_BALLENTRY(SDMMC1_DAT6, "p18", NULL),
841 _OMAP3_BALLENTRY(SDMMC1_DAT7, "p19", NULL),
842 _OMAP3_BALLENTRY(SDMMC2_CLK, "w10", NULL),
843 _OMAP3_BALLENTRY(SDMMC2_CMD, "r10", NULL),
844 _OMAP3_BALLENTRY(SDMMC2_DAT0, "t10", NULL),
845 _OMAP3_BALLENTRY(SDMMC2_DAT1, "t9", NULL),
846 _OMAP3_BALLENTRY(SDMMC2_DAT2, "u10", NULL),
847 _OMAP3_BALLENTRY(SDMMC2_DAT3, "u9", NULL),
848 _OMAP3_BALLENTRY(SDMMC2_DAT4, "v10", NULL),
849 _OMAP3_BALLENTRY(SDMMC2_DAT5, "m3", NULL),
850 _OMAP3_BALLENTRY(SDMMC2_DAT6, "l3", NULL),
851 _OMAP3_BALLENTRY(SDMMC2_DAT7, "k3", NULL),
852 _OMAP3_BALLENTRY(SYS_BOOT0, "f3", NULL),
853 _OMAP3_BALLENTRY(SYS_BOOT1, "d3", NULL),
854 _OMAP3_BALLENTRY(SYS_BOOT2, "c3", NULL),
855 _OMAP3_BALLENTRY(SYS_BOOT3, "e3", NULL),
856 _OMAP3_BALLENTRY(SYS_BOOT4, "e4", NULL),
857 _OMAP3_BALLENTRY(SYS_BOOT5, "g3", NULL),
858 _OMAP3_BALLENTRY(SYS_BOOT6, "d4", NULL),
859 _OMAP3_BALLENTRY(SYS_CLKOUT1, "ae14", NULL),
860 _OMAP3_BALLENTRY(SYS_CLKOUT2, "w11", NULL),
861 _OMAP3_BALLENTRY(SYS_CLKREQ, "w15", NULL),
862 _OMAP3_BALLENTRY(SYS_NIRQ, "v16", NULL),
863 _OMAP3_BALLENTRY(SYS_NRESWARM, "ad7", "aa5"),
864 _OMAP3_BALLENTRY(SYS_OFF_MODE, "v12", NULL),
865 _OMAP3_BALLENTRY(UART1_CTS, "w2", NULL),
866 _OMAP3_BALLENTRY(UART1_RTS, "r2", NULL),
867 _OMAP3_BALLENTRY(UART1_RX, "h3", NULL),
868 _OMAP3_BALLENTRY(UART1_TX, "l4", NULL),
869 _OMAP3_BALLENTRY(UART2_CTS, "y24", NULL),
870 _OMAP3_BALLENTRY(UART2_RTS, "aa24", NULL),
871 _OMAP3_BALLENTRY(UART2_RX, "ad21", NULL),
872 _OMAP3_BALLENTRY(UART2_TX, "ad22", NULL),
873 _OMAP3_BALLENTRY(UART3_CTS_RCTX, "f23", NULL),
874 _OMAP3_BALLENTRY(UART3_RTS_SD, "f24", NULL),
875 _OMAP3_BALLENTRY(UART3_RX_IRRX, "h24", NULL),
876 _OMAP3_BALLENTRY(UART3_TX_IRTX, "g24", NULL),
877 { .reg_offset = OMAP_MUX_TERMINATOR },
878};
879#else
880#define omap3_cbc_ball NULL
881#endif
882
883/*
884 * Signals different on CUS package compared to superset
885 */
886#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CUS)
887struct omap_mux __initdata omap3_cus_subset[] = {
888 _OMAP3_MUXENTRY(CAM_D10, 109,
889 "cam_d10", NULL, NULL, NULL,
890 "gpio_109", NULL, NULL, "safe_mode"),
891 _OMAP3_MUXENTRY(CAM_D11, 110,
892 "cam_d11", NULL, NULL, NULL,
893 "gpio_110", NULL, NULL, "safe_mode"),
894 _OMAP3_MUXENTRY(CAM_D2, 101,
895 "cam_d2", NULL, NULL, NULL,
896 "gpio_101", NULL, NULL, "safe_mode"),
897 _OMAP3_MUXENTRY(CAM_D3, 102,
898 "cam_d3", NULL, NULL, NULL,
899 "gpio_102", NULL, NULL, "safe_mode"),
900 _OMAP3_MUXENTRY(CAM_D4, 103,
901 "cam_d4", NULL, NULL, NULL,
902 "gpio_103", NULL, NULL, "safe_mode"),
903 _OMAP3_MUXENTRY(CAM_D5, 104,
904 "cam_d5", NULL, NULL, NULL,
905 "gpio_104", NULL, NULL, "safe_mode"),
906 _OMAP3_MUXENTRY(CAM_FLD, 98,
907 "cam_fld", NULL, "cam_global_reset", NULL,
908 "gpio_98", NULL, NULL, "safe_mode"),
909 _OMAP3_MUXENTRY(CAM_HS, 94,
910 "cam_hs", NULL, NULL, NULL,
911 "gpio_94", NULL, NULL, "safe_mode"),
912 _OMAP3_MUXENTRY(CAM_PCLK, 97,
913 "cam_pclk", NULL, NULL, NULL,
914 "gpio_97", NULL, NULL, "safe_mode"),
915 _OMAP3_MUXENTRY(CAM_STROBE, 126,
916 "cam_strobe", NULL, NULL, NULL,
917 "gpio_126", NULL, NULL, "safe_mode"),
918 _OMAP3_MUXENTRY(CAM_VS, 95,
919 "cam_vs", NULL, NULL, NULL,
920 "gpio_95", NULL, NULL, "safe_mode"),
921 _OMAP3_MUXENTRY(CAM_WEN, 167,
922 "cam_wen", NULL, "cam_shutter", NULL,
923 "gpio_167", NULL, NULL, "safe_mode"),
924 _OMAP3_MUXENTRY(DSS_DATA6, 76,
925 "dss_data6", NULL, "uart1_tx", NULL,
926 "gpio_76", NULL, NULL, "safe_mode"),
927 _OMAP3_MUXENTRY(DSS_DATA7, 77,
928 "dss_data7", NULL, "uart1_rx", NULL,
929 "gpio_77", NULL, NULL, "safe_mode"),
930 _OMAP3_MUXENTRY(DSS_DATA8, 78,
931 "dss_data8", NULL, NULL, NULL,
932 "gpio_78", NULL, NULL, "safe_mode"),
933 _OMAP3_MUXENTRY(DSS_DATA9, 79,
934 "dss_data9", NULL, NULL, NULL,
935 "gpio_79", NULL, NULL, "safe_mode"),
936 _OMAP3_MUXENTRY(DSS_HSYNC, 67,
937 "dss_hsync", NULL, NULL, NULL,
938 "gpio_67", NULL, NULL, "safe_mode"),
939 _OMAP3_MUXENTRY(DSS_PCLK, 66,
940 "dss_pclk", NULL, NULL, NULL,
941 "gpio_66", NULL, NULL, "safe_mode"),
942 _OMAP3_MUXENTRY(ETK_CLK, 12,
943 "etk_clk", "mcbsp5_clkx", "sdmmc3_clk", "hsusb1_stp",
944 "gpio_12", "mm1_rxdp", "hsusb1_tll_stp", NULL),
945 _OMAP3_MUXENTRY(ETK_CTL, 13,
946 "etk_ctl", NULL, "sdmmc3_cmd", "hsusb1_clk",
947 "gpio_13", NULL, "hsusb1_tll_clk", NULL),
948 _OMAP3_MUXENTRY(ETK_D0, 14,
949 "etk_d0", "mcspi3_simo", "sdmmc3_dat4", "hsusb1_data0",
950 "gpio_14", "mm1_rxrcv", "hsusb1_tll_data0", NULL),
951 _OMAP3_MUXENTRY(ETK_D1, 15,
952 "etk_d1", "mcspi3_somi", NULL, "hsusb1_data1",
953 "gpio_15", "mm1_txse0", "hsusb1_tll_data1", NULL),
954 _OMAP3_MUXENTRY(ETK_D10, 24,
955 "etk_d10", NULL, "uart1_rx", "hsusb2_clk",
956 "gpio_24", NULL, "hsusb2_tll_clk", NULL),
957 _OMAP3_MUXENTRY(ETK_D11, 25,
958 "etk_d11", NULL, NULL, "hsusb2_stp",
959 "gpio_25", "mm2_rxdp", "hsusb2_tll_stp", NULL),
960 _OMAP3_MUXENTRY(ETK_D12, 26,
961 "etk_d12", NULL, NULL, "hsusb2_dir",
962 "gpio_26", NULL, "hsusb2_tll_dir", NULL),
963 _OMAP3_MUXENTRY(ETK_D13, 27,
964 "etk_d13", NULL, NULL, "hsusb2_nxt",
965 "gpio_27", "mm2_rxdm", "hsusb2_tll_nxt", NULL),
966 _OMAP3_MUXENTRY(ETK_D14, 28,
967 "etk_d14", NULL, NULL, "hsusb2_data0",
968 "gpio_28", "mm2_rxrcv", "hsusb2_tll_data0", NULL),
969 _OMAP3_MUXENTRY(ETK_D15, 29,
970 "etk_d15", NULL, NULL, "hsusb2_data1",
971 "gpio_29", "mm2_txse0", "hsusb2_tll_data1", NULL),
972 _OMAP3_MUXENTRY(ETK_D2, 16,
973 "etk_d2", "mcspi3_cs0", NULL, "hsusb1_data2",
974 "gpio_16", "mm1_txdat", "hsusb1_tll_data2", NULL),
975 _OMAP3_MUXENTRY(ETK_D3, 17,
976 "etk_d3", "mcspi3_clk", "sdmmc3_dat3", "hsusb1_data7",
977 "gpio_17", NULL, "hsusb1_tll_data7", NULL),
978 _OMAP3_MUXENTRY(ETK_D4, 18,
979 "etk_d4", "mcbsp5_dr", "sdmmc3_dat0", "hsusb1_data4",
980 "gpio_18", NULL, "hsusb1_tll_data4", NULL),
981 _OMAP3_MUXENTRY(ETK_D5, 19,
982 "etk_d5", "mcbsp5_fsx", "sdmmc3_dat1", "hsusb1_data5",
983 "gpio_19", NULL, "hsusb1_tll_data5", NULL),
984 _OMAP3_MUXENTRY(ETK_D6, 20,
985 "etk_d6", "mcbsp5_dx", "sdmmc3_dat2", "hsusb1_data6",
986 "gpio_20", NULL, "hsusb1_tll_data6", NULL),
987 _OMAP3_MUXENTRY(ETK_D7, 21,
988 "etk_d7", "mcspi3_cs1", "sdmmc3_dat7", "hsusb1_data3",
989 "gpio_21", "mm1_txen_n", "hsusb1_tll_data3", NULL),
990 _OMAP3_MUXENTRY(ETK_D8, 22,
991 "etk_d8", "sys_drm_msecure", "sdmmc3_dat6", "hsusb1_dir",
992 "gpio_22", NULL, "hsusb1_tll_dir", NULL),
993 _OMAP3_MUXENTRY(ETK_D9, 23,
994 "etk_d9", "sys_secure_indicator", "sdmmc3_dat5", "hsusb1_nxt",
995 "gpio_23", "mm1_rxdm", "hsusb1_tll_nxt", NULL),
996 _OMAP3_MUXENTRY(MCBSP3_CLKX, 142,
997 "mcbsp3_clkx", "uart2_tx", NULL, NULL,
998 "gpio_142", NULL, NULL, "safe_mode"),
999 _OMAP3_MUXENTRY(MCBSP3_DR, 141,
1000 "mcbsp3_dr", "uart2_rts", NULL, NULL,
1001 "gpio_141", NULL, NULL, "safe_mode"),
1002 _OMAP3_MUXENTRY(MCBSP3_DX, 140,
1003 "mcbsp3_dx", "uart2_cts", NULL, NULL,
1004 "gpio_140", NULL, NULL, "safe_mode"),
1005 _OMAP3_MUXENTRY(MCBSP3_FSX, 143,
1006 "mcbsp3_fsx", "uart2_rx", NULL, NULL,
1007 "gpio_143", NULL, NULL, "safe_mode"),
1008 _OMAP3_MUXENTRY(SDMMC2_DAT5, 137,
1009 "sdmmc2_dat5", "sdmmc2_dir_dat1",
1010 "cam_global_reset", "sdmmc3_dat1",
1011 "gpio_137", NULL, NULL, "safe_mode"),
1012 _OMAP3_MUXENTRY(SDMMC2_DAT6, 138,
1013 "sdmmc2_dat6", "sdmmc2_dir_cmd", "cam_shutter", "sdmmc3_dat2",
1014 "gpio_138", NULL, NULL, "safe_mode"),
1015 _OMAP3_MUXENTRY(SDMMC2_DAT7, 139,
1016 "sdmmc2_dat7", "sdmmc2_clkin", NULL, "sdmmc3_dat3",
1017 "gpio_139", NULL, NULL, "safe_mode"),
1018 _OMAP3_MUXENTRY(UART1_CTS, 150,
1019 "uart1_cts", NULL, NULL, NULL,
1020 "gpio_150", NULL, NULL, "safe_mode"),
1021 { .reg_offset = OMAP_MUX_TERMINATOR },
1022};
1023#else
1024#define omap3_cus_subset NULL
1025#endif
1026
1027/*
1028 * Balls for CUS package
1029 * 423-pin s-PBGA Package, 0.65mm Ball Pitch (Bottom)
1030 */
1031#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1032 && defined(CONFIG_OMAP_PACKAGE_CUS)
1033struct omap_ball __initdata omap3_cus_ball[] = {
1034 _OMAP3_BALLENTRY(CAM_D0, "ab18", NULL),
1035 _OMAP3_BALLENTRY(CAM_D1, "ac18", NULL),
1036 _OMAP3_BALLENTRY(CAM_D10, "f21", NULL),
1037 _OMAP3_BALLENTRY(CAM_D11, "g21", NULL),
1038 _OMAP3_BALLENTRY(CAM_D2, "g19", NULL),
1039 _OMAP3_BALLENTRY(CAM_D3, "f19", NULL),
1040 _OMAP3_BALLENTRY(CAM_D4, "g20", NULL),
1041 _OMAP3_BALLENTRY(CAM_D5, "b21", NULL),
1042 _OMAP3_BALLENTRY(CAM_D6, "l24", NULL),
1043 _OMAP3_BALLENTRY(CAM_D7, "k24", NULL),
1044 _OMAP3_BALLENTRY(CAM_D8, "j23", NULL),
1045 _OMAP3_BALLENTRY(CAM_D9, "k23", NULL),
1046 _OMAP3_BALLENTRY(CAM_FLD, "h24", NULL),
1047 _OMAP3_BALLENTRY(CAM_HS, "a22", NULL),
1048 _OMAP3_BALLENTRY(CAM_PCLK, "j19", NULL),
1049 _OMAP3_BALLENTRY(CAM_STROBE, "j20", NULL),
1050 _OMAP3_BALLENTRY(CAM_VS, "e18", NULL),
1051 _OMAP3_BALLENTRY(CAM_WEN, "f18", NULL),
1052 _OMAP3_BALLENTRY(CAM_XCLKA, "b22", NULL),
1053 _OMAP3_BALLENTRY(CAM_XCLKB, "c22", NULL),
1054 _OMAP3_BALLENTRY(DSS_ACBIAS, "j21", NULL),
1055 _OMAP3_BALLENTRY(DSS_DATA0, "ac19", NULL),
1056 _OMAP3_BALLENTRY(DSS_DATA1, "ab19", NULL),
1057 _OMAP3_BALLENTRY(DSS_DATA10, "ac22", NULL),
1058 _OMAP3_BALLENTRY(DSS_DATA11, "ac23", NULL),
1059 _OMAP3_BALLENTRY(DSS_DATA12, "ab22", NULL),
1060 _OMAP3_BALLENTRY(DSS_DATA13, "y22", NULL),
1061 _OMAP3_BALLENTRY(DSS_DATA14, "w22", NULL),
1062 _OMAP3_BALLENTRY(DSS_DATA15, "v22", NULL),
1063 _OMAP3_BALLENTRY(DSS_DATA16, "j22", NULL),
1064 _OMAP3_BALLENTRY(DSS_DATA17, "g23", NULL),
1065 _OMAP3_BALLENTRY(DSS_DATA18, "g24", NULL),
1066 _OMAP3_BALLENTRY(DSS_DATA19, "h23", NULL),
1067 _OMAP3_BALLENTRY(DSS_DATA2, "ad20", NULL),
1068 _OMAP3_BALLENTRY(DSS_DATA20, "d23", NULL),
1069 _OMAP3_BALLENTRY(DSS_DATA21, "k22", NULL),
1070 _OMAP3_BALLENTRY(DSS_DATA22, "v21", NULL),
1071 _OMAP3_BALLENTRY(DSS_DATA23, "w21", NULL),
1072 _OMAP3_BALLENTRY(DSS_DATA3, "ac20", NULL),
1073 _OMAP3_BALLENTRY(DSS_DATA4, "ad21", NULL),
1074 _OMAP3_BALLENTRY(DSS_DATA5, "ac21", NULL),
1075 _OMAP3_BALLENTRY(DSS_DATA6, "d24", NULL),
1076 _OMAP3_BALLENTRY(DSS_DATA7, "e23", NULL),
1077 _OMAP3_BALLENTRY(DSS_DATA8, "e24", NULL),
1078 _OMAP3_BALLENTRY(DSS_DATA9, "f23", NULL),
1079 _OMAP3_BALLENTRY(DSS_HSYNC, "e22", NULL),
1080 _OMAP3_BALLENTRY(DSS_PCLK, "g22", NULL),
1081 _OMAP3_BALLENTRY(DSS_VSYNC, "f22", NULL),
1082 _OMAP3_BALLENTRY(ETK_CLK, "ac1", NULL),
1083 _OMAP3_BALLENTRY(ETK_CTL, "ad3", NULL),
1084 _OMAP3_BALLENTRY(ETK_D0, "ad6", NULL),
1085 _OMAP3_BALLENTRY(ETK_D1, "ac6", NULL),
1086 _OMAP3_BALLENTRY(ETK_D10, "ac3", NULL),
1087 _OMAP3_BALLENTRY(ETK_D11, "ac9", NULL),
1088 _OMAP3_BALLENTRY(ETK_D12, "ac10", NULL),
1089 _OMAP3_BALLENTRY(ETK_D13, "ad11", NULL),
1090 _OMAP3_BALLENTRY(ETK_D14, "ac11", NULL),
1091 _OMAP3_BALLENTRY(ETK_D15, "ad12", NULL),
1092 _OMAP3_BALLENTRY(ETK_D2, "ac7", NULL),
1093 _OMAP3_BALLENTRY(ETK_D3, "ad8", NULL),
1094 _OMAP3_BALLENTRY(ETK_D4, "ac5", NULL),
1095 _OMAP3_BALLENTRY(ETK_D5, "ad2", NULL),
1096 _OMAP3_BALLENTRY(ETK_D6, "ac8", NULL),
1097 _OMAP3_BALLENTRY(ETK_D7, "ad9", NULL),
1098 _OMAP3_BALLENTRY(ETK_D8, "ac4", NULL),
1099 _OMAP3_BALLENTRY(ETK_D9, "ad5", NULL),
1100 _OMAP3_BALLENTRY(GPMC_A1, "k4", NULL),
1101 _OMAP3_BALLENTRY(GPMC_A10, "g2", NULL),
1102 _OMAP3_BALLENTRY(GPMC_A2, "k3", NULL),
1103 _OMAP3_BALLENTRY(GPMC_A3, "k2", NULL),
1104 _OMAP3_BALLENTRY(GPMC_A4, "j4", NULL),
1105 _OMAP3_BALLENTRY(GPMC_A5, "j3", NULL),
1106 _OMAP3_BALLENTRY(GPMC_A6, "j2", NULL),
1107 _OMAP3_BALLENTRY(GPMC_A7, "j1", NULL),
1108 _OMAP3_BALLENTRY(GPMC_A8, "h1", NULL),
1109 _OMAP3_BALLENTRY(GPMC_A9, "h2", NULL),
1110 _OMAP3_BALLENTRY(GPMC_CLK, "w2", NULL),
1111 _OMAP3_BALLENTRY(GPMC_D10, "u1", NULL),
1112 _OMAP3_BALLENTRY(GPMC_D11, "r3", NULL),
1113 _OMAP3_BALLENTRY(GPMC_D12, "t3", NULL),
1114 _OMAP3_BALLENTRY(GPMC_D13, "u2", NULL),
1115 _OMAP3_BALLENTRY(GPMC_D14, "v1", NULL),
1116 _OMAP3_BALLENTRY(GPMC_D15, "v2", NULL),
1117 _OMAP3_BALLENTRY(GPMC_D8, "r2", NULL),
1118 _OMAP3_BALLENTRY(GPMC_D9, "t2", NULL),
1119 _OMAP3_BALLENTRY(GPMC_NBE0_CLE, "k5", NULL),
1120 _OMAP3_BALLENTRY(GPMC_NBE1, "l1", NULL),
1121 _OMAP3_BALLENTRY(GPMC_NCS3, "d2", NULL),
1122 _OMAP3_BALLENTRY(GPMC_NCS4, "f4", NULL),
1123 _OMAP3_BALLENTRY(GPMC_NCS5, "g5", NULL),
1124 _OMAP3_BALLENTRY(GPMC_NCS6, "f3", NULL),
1125 _OMAP3_BALLENTRY(GPMC_NCS7, "g4", NULL),
1126 _OMAP3_BALLENTRY(GPMC_NWP, "e1", NULL),
1127 _OMAP3_BALLENTRY(GPMC_WAIT3, "c2", NULL),
1128 _OMAP3_BALLENTRY(HDQ_SIO, "a24", NULL),
1129 _OMAP3_BALLENTRY(HSUSB0_CLK, "r21", NULL),
1130 _OMAP3_BALLENTRY(HSUSB0_DATA0, "t24", NULL),
1131 _OMAP3_BALLENTRY(HSUSB0_DATA1, "t23", NULL),
1132 _OMAP3_BALLENTRY(HSUSB0_DATA2, "u24", NULL),
1133 _OMAP3_BALLENTRY(HSUSB0_DATA3, "u23", NULL),
1134 _OMAP3_BALLENTRY(HSUSB0_DATA4, "w24", NULL),
1135 _OMAP3_BALLENTRY(HSUSB0_DATA5, "v23", NULL),
1136 _OMAP3_BALLENTRY(HSUSB0_DATA6, "w23", NULL),
1137 _OMAP3_BALLENTRY(HSUSB0_DATA7, "t22", NULL),
1138 _OMAP3_BALLENTRY(HSUSB0_DIR, "p23", NULL),
1139 _OMAP3_BALLENTRY(HSUSB0_NXT, "r22", NULL),
1140 _OMAP3_BALLENTRY(HSUSB0_STP, "r23", NULL),
1141 _OMAP3_BALLENTRY(I2C2_SCL, "ac15", NULL),
1142 _OMAP3_BALLENTRY(I2C2_SDA, "ac14", NULL),
1143 _OMAP3_BALLENTRY(I2C3_SCL, "ac13", NULL),
1144 _OMAP3_BALLENTRY(I2C3_SDA, "ac12", NULL),
1145 _OMAP3_BALLENTRY(I2C4_SCL, "y16", NULL),
1146 _OMAP3_BALLENTRY(I2C4_SDA, "y15", NULL),
1147 _OMAP3_BALLENTRY(JTAG_EMU0, "ac24", NULL),
1148 _OMAP3_BALLENTRY(JTAG_EMU1, "ad24", NULL),
1149 _OMAP3_BALLENTRY(MCBSP1_CLKR, "w19", NULL),
1150 _OMAP3_BALLENTRY(MCBSP1_CLKX, "v18", NULL),
1151 _OMAP3_BALLENTRY(MCBSP1_DR, "y18", NULL),
1152 _OMAP3_BALLENTRY(MCBSP1_DX, "w18", NULL),
1153 _OMAP3_BALLENTRY(MCBSP1_FSR, "ab20", NULL),
1154 _OMAP3_BALLENTRY(MCBSP1_FSX, "aa19", NULL),
1155 _OMAP3_BALLENTRY(MCBSP2_CLKX, "t21", NULL),
1156 _OMAP3_BALLENTRY(MCBSP2_DR, "v19", NULL),
1157 _OMAP3_BALLENTRY(MCBSP2_DX, "r20", NULL),
1158 _OMAP3_BALLENTRY(MCBSP2_FSX, "v20", NULL),
1159 _OMAP3_BALLENTRY(MCBSP3_CLKX, "w4", NULL),
1160 _OMAP3_BALLENTRY(MCBSP3_DR, "v5", NULL),
1161 _OMAP3_BALLENTRY(MCBSP3_DX, "v6", NULL),
1162 _OMAP3_BALLENTRY(MCBSP3_FSX, "v4", NULL),
1163 _OMAP3_BALLENTRY(MCBSP_CLKS, "aa18", NULL),
1164 _OMAP3_BALLENTRY(MCSPI1_CLK, "t5", NULL),
1165 _OMAP3_BALLENTRY(MCSPI1_CS0, "t6", NULL),
1166 _OMAP3_BALLENTRY(MCSPI1_CS3, "r5", NULL),
1167 _OMAP3_BALLENTRY(MCSPI1_SIMO, "r4", NULL),
1168 _OMAP3_BALLENTRY(MCSPI1_SOMI, "t4", NULL),
1169 _OMAP3_BALLENTRY(MCSPI2_CLK, "n5", NULL),
1170 _OMAP3_BALLENTRY(MCSPI2_CS0, "m5", NULL),
1171 _OMAP3_BALLENTRY(MCSPI2_CS1, "m4", NULL),
1172 _OMAP3_BALLENTRY(MCSPI2_SIMO, "n4", NULL),
1173 _OMAP3_BALLENTRY(MCSPI2_SOMI, "n3", NULL),
1174 _OMAP3_BALLENTRY(SDMMC1_CLK, "m23", NULL),
1175 _OMAP3_BALLENTRY(SDMMC1_CMD, "l23", NULL),
1176 _OMAP3_BALLENTRY(SDMMC1_DAT0, "m22", NULL),
1177 _OMAP3_BALLENTRY(SDMMC1_DAT1, "m21", NULL),
1178 _OMAP3_BALLENTRY(SDMMC1_DAT2, "m20", NULL),
1179 _OMAP3_BALLENTRY(SDMMC1_DAT3, "n23", NULL),
1180 _OMAP3_BALLENTRY(SDMMC1_DAT4, "n22", NULL),
1181 _OMAP3_BALLENTRY(SDMMC1_DAT5, "n21", NULL),
1182 _OMAP3_BALLENTRY(SDMMC1_DAT6, "n20", NULL),
1183 _OMAP3_BALLENTRY(SDMMC1_DAT7, "p24", NULL),
1184 _OMAP3_BALLENTRY(SDMMC2_CLK, "y1", NULL),
1185 _OMAP3_BALLENTRY(SDMMC2_CMD, "ab5", NULL),
1186 _OMAP3_BALLENTRY(SDMMC2_DAT0, "ab3", NULL),
1187 _OMAP3_BALLENTRY(SDMMC2_DAT1, "y3", NULL),
1188 _OMAP3_BALLENTRY(SDMMC2_DAT2, "w3", NULL),
1189 _OMAP3_BALLENTRY(SDMMC2_DAT3, "v3", NULL),
1190 _OMAP3_BALLENTRY(SDMMC2_DAT4, "ab2", NULL),
1191 _OMAP3_BALLENTRY(SDMMC2_DAT5, "aa2", NULL),
1192 _OMAP3_BALLENTRY(SDMMC2_DAT6, "y2", NULL),
1193 _OMAP3_BALLENTRY(SDMMC2_DAT7, "aa1", NULL),
1194 _OMAP3_BALLENTRY(SYS_BOOT0, "ab12", NULL),
1195 _OMAP3_BALLENTRY(SYS_BOOT1, "ac16", NULL),
1196 _OMAP3_BALLENTRY(SYS_BOOT2, "ad17", NULL),
1197 _OMAP3_BALLENTRY(SYS_BOOT3, "ad18", NULL),
1198 _OMAP3_BALLENTRY(SYS_BOOT4, "ac17", NULL),
1199 _OMAP3_BALLENTRY(SYS_BOOT5, "ab16", NULL),
1200 _OMAP3_BALLENTRY(SYS_BOOT6, "aa15", NULL),
1201 _OMAP3_BALLENTRY(SYS_CLKOUT1, "y7", NULL),
1202 _OMAP3_BALLENTRY(SYS_CLKOUT2, "aa6", NULL),
1203 _OMAP3_BALLENTRY(SYS_CLKREQ, "y13", NULL),
1204 _OMAP3_BALLENTRY(SYS_NIRQ, "w16", NULL),
1205 _OMAP3_BALLENTRY(SYS_NRESWARM, "y10", NULL),
1206 _OMAP3_BALLENTRY(SYS_OFF_MODE, "ad23", NULL),
1207 _OMAP3_BALLENTRY(UART1_CTS, "ac2", NULL),
1208 _OMAP3_BALLENTRY(UART1_RTS, "w6", NULL),
1209 _OMAP3_BALLENTRY(UART1_RX, "v7", NULL),
1210 _OMAP3_BALLENTRY(UART1_TX, "w7", NULL),
1211 _OMAP3_BALLENTRY(UART3_CTS_RCTX, "a23", NULL),
1212 _OMAP3_BALLENTRY(UART3_RTS_SD, "b23", NULL),
1213 _OMAP3_BALLENTRY(UART3_RX_IRRX, "b24", NULL),
1214 _OMAP3_BALLENTRY(UART3_TX_IRTX, "c23", NULL),
1215 { .reg_offset = OMAP_MUX_TERMINATOR },
1216};
1217#else
1218#define omap3_cus_ball NULL
1219#endif
1220
1221/*
1222 * Signals different on CBB package comapared to superset
1223 */
1224#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB)
1225struct omap_mux __initdata omap3_cbb_subset[] = {
1226 _OMAP3_MUXENTRY(CAM_D10, 109,
1227 "cam_d10", NULL, NULL, NULL,
1228 "gpio_109", NULL, NULL, "safe_mode"),
1229 _OMAP3_MUXENTRY(CAM_D11, 110,
1230 "cam_d11", NULL, NULL, NULL,
1231 "gpio_110", NULL, NULL, "safe_mode"),
1232 _OMAP3_MUXENTRY(CAM_D2, 101,
1233 "cam_d2", NULL, NULL, NULL,
1234 "gpio_101", NULL, NULL, "safe_mode"),
1235 _OMAP3_MUXENTRY(CAM_D3, 102,
1236 "cam_d3", NULL, NULL, NULL,
1237 "gpio_102", NULL, NULL, "safe_mode"),
1238 _OMAP3_MUXENTRY(CAM_D4, 103,
1239 "cam_d4", NULL, NULL, NULL,
1240 "gpio_103", NULL, NULL, "safe_mode"),
1241 _OMAP3_MUXENTRY(CAM_D5, 104,
1242 "cam_d5", NULL, NULL, NULL,
1243 "gpio_104", NULL, NULL, "safe_mode"),
1244 _OMAP3_MUXENTRY(CAM_FLD, 98,
1245 "cam_fld", NULL, "cam_global_reset", NULL,
1246 "gpio_98", NULL, NULL, "safe_mode"),
1247 _OMAP3_MUXENTRY(CAM_HS, 94,
1248 "cam_hs", NULL, NULL, NULL,
1249 "gpio_94", NULL, NULL, "safe_mode"),
1250 _OMAP3_MUXENTRY(CAM_PCLK, 97,
1251 "cam_pclk", NULL, NULL, NULL,
1252 "gpio_97", NULL, NULL, "safe_mode"),
1253 _OMAP3_MUXENTRY(CAM_STROBE, 126,
1254 "cam_strobe", NULL, NULL, NULL,
1255 "gpio_126", NULL, NULL, "safe_mode"),
1256 _OMAP3_MUXENTRY(CAM_VS, 95,
1257 "cam_vs", NULL, NULL, NULL,
1258 "gpio_95", NULL, NULL, "safe_mode"),
1259 _OMAP3_MUXENTRY(CAM_WEN, 167,
1260 "cam_wen", NULL, "cam_shutter", NULL,
1261 "gpio_167", NULL, NULL, "safe_mode"),
1262 _OMAP3_MUXENTRY(DSS_DATA6, 76,
1263 "dss_data6", NULL, "uart1_tx", NULL,
1264 "gpio_76", NULL, NULL, "safe_mode"),
1265 _OMAP3_MUXENTRY(DSS_DATA7, 77,
1266 "dss_data7", NULL, "uart1_rx", NULL,
1267 "gpio_77", NULL, NULL, "safe_mode"),
1268 _OMAP3_MUXENTRY(DSS_DATA8, 78,
1269 "dss_data8", NULL, NULL, NULL,
1270 "gpio_78", NULL, NULL, "safe_mode"),
1271 _OMAP3_MUXENTRY(DSS_DATA9, 79,
1272 "dss_data9", NULL, NULL, NULL,
1273 "gpio_79", NULL, NULL, "safe_mode"),
1274 _OMAP3_MUXENTRY(DSS_HSYNC, 67,
1275 "dss_hsync", NULL, NULL, NULL,
1276 "gpio_67", NULL, NULL, "safe_mode"),
1277 _OMAP3_MUXENTRY(DSS_PCLK, 66,
1278 "dss_pclk", NULL, NULL, NULL,
1279 "gpio_66", NULL, NULL, "safe_mode"),
1280 _OMAP3_MUXENTRY(ETK_CLK, 12,
1281 "etk_clk", "mcbsp5_clkx", "sdmmc3_clk", "hsusb1_stp",
1282 "gpio_12", "mm1_rxdp", "hsusb1_tll_stp", NULL),
1283 _OMAP3_MUXENTRY(ETK_CTL, 13,
1284 "etk_ctl", NULL, "sdmmc3_cmd", "hsusb1_clk",
1285 "gpio_13", NULL, "hsusb1_tll_clk", NULL),
1286 _OMAP3_MUXENTRY(ETK_D0, 14,
1287 "etk_d0", "mcspi3_simo", "sdmmc3_dat4", "hsusb1_data0",
1288 "gpio_14", "mm1_rxrcv", "hsusb1_tll_data0", NULL),
1289 _OMAP3_MUXENTRY(ETK_D1, 15,
1290 "etk_d1", "mcspi3_somi", NULL, "hsusb1_data1",
1291 "gpio_15", "mm1_txse0", "hsusb1_tll_data1", NULL),
1292 _OMAP3_MUXENTRY(ETK_D10, 24,
1293 "etk_d10", NULL, "uart1_rx", "hsusb2_clk",
1294 "gpio_24", NULL, "hsusb2_tll_clk", NULL),
1295 _OMAP3_MUXENTRY(ETK_D11, 25,
1296 "etk_d11", NULL, NULL, "hsusb2_stp",
1297 "gpio_25", "mm2_rxdp", "hsusb2_tll_stp", NULL),
1298 _OMAP3_MUXENTRY(ETK_D12, 26,
1299 "etk_d12", NULL, NULL, "hsusb2_dir",
1300 "gpio_26", NULL, "hsusb2_tll_dir", NULL),
1301 _OMAP3_MUXENTRY(ETK_D13, 27,
1302 "etk_d13", NULL, NULL, "hsusb2_nxt",
1303 "gpio_27", "mm2_rxdm", "hsusb2_tll_nxt", NULL),
1304 _OMAP3_MUXENTRY(ETK_D14, 28,
1305 "etk_d14", NULL, NULL, "hsusb2_data0",
1306 "gpio_28", "mm2_rxrcv", "hsusb2_tll_data0", NULL),
1307 _OMAP3_MUXENTRY(ETK_D15, 29,
1308 "etk_d15", NULL, NULL, "hsusb2_data1",
1309 "gpio_29", "mm2_txse0", "hsusb2_tll_data1", NULL),
1310 _OMAP3_MUXENTRY(ETK_D2, 16,
1311 "etk_d2", "mcspi3_cs0", NULL, "hsusb1_data2",
1312 "gpio_16", "mm1_txdat", "hsusb1_tll_data2", NULL),
1313 _OMAP3_MUXENTRY(ETK_D3, 17,
1314 "etk_d3", "mcspi3_clk", "sdmmc3_dat3", "hsusb1_data7",
1315 "gpio_17", NULL, "hsusb1_tll_data7", NULL),
1316 _OMAP3_MUXENTRY(ETK_D4, 18,
1317 "etk_d4", "mcbsp5_dr", "sdmmc3_dat0", "hsusb1_data4",
1318 "gpio_18", NULL, "hsusb1_tll_data4", NULL),
1319 _OMAP3_MUXENTRY(ETK_D5, 19,
1320 "etk_d5", "mcbsp5_fsx", "sdmmc3_dat1", "hsusb1_data5",
1321 "gpio_19", NULL, "hsusb1_tll_data5", NULL),
1322 _OMAP3_MUXENTRY(ETK_D6, 20,
1323 "etk_d6", "mcbsp5_dx", "sdmmc3_dat2", "hsusb1_data6",
1324 "gpio_20", NULL, "hsusb1_tll_data6", NULL),
1325 _OMAP3_MUXENTRY(ETK_D7, 21,
1326 "etk_d7", "mcspi3_cs1", "sdmmc3_dat7", "hsusb1_data3",
1327 "gpio_21", "mm1_txen_n", "hsusb1_tll_data3", NULL),
1328 _OMAP3_MUXENTRY(ETK_D8, 22,
1329 "etk_d8", "sys_drm_msecure", "sdmmc3_dat6", "hsusb1_dir",
1330 "gpio_22", NULL, "hsusb1_tll_dir", NULL),
1331 _OMAP3_MUXENTRY(ETK_D9, 23,
1332 "etk_d9", "sys_secure_indicator", "sdmmc3_dat5", "hsusb1_nxt",
1333 "gpio_23", "mm1_rxdm", "hsusb1_tll_nxt", NULL),
1334 { .reg_offset = OMAP_MUX_TERMINATOR },
1335};
1336#else
1337#define omap3_cbb_subset NULL
1338#endif
1339
1340/*
1341 * Balls for CBB package
1342 * 515-pin s-PBGA Package, 0.50mm Ball Pitch (Top), 0.40mm Ball Pitch (Bottom)
1343 */
1344#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1345 && defined(CONFIG_OMAP_PACKAGE_CBB)
1346struct omap_ball __initdata omap3_cbb_ball[] = {
1347 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL),
1348 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL),
1349 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL),
1350 _OMAP3_BALLENTRY(CAM_D11, "c26", NULL),
1351 _OMAP3_BALLENTRY(CAM_D2, "b24", NULL),
1352 _OMAP3_BALLENTRY(CAM_D3, "c24", NULL),
1353 _OMAP3_BALLENTRY(CAM_D4, "d24", NULL),
1354 _OMAP3_BALLENTRY(CAM_D5, "a25", NULL),
1355 _OMAP3_BALLENTRY(CAM_D6, "k28", NULL),
1356 _OMAP3_BALLENTRY(CAM_D7, "l28", NULL),
1357 _OMAP3_BALLENTRY(CAM_D8, "k27", NULL),
1358 _OMAP3_BALLENTRY(CAM_D9, "l27", NULL),
1359 _OMAP3_BALLENTRY(CAM_FLD, "c23", NULL),
1360 _OMAP3_BALLENTRY(CAM_HS, "a24", NULL),
1361 _OMAP3_BALLENTRY(CAM_PCLK, "c27", NULL),
1362 _OMAP3_BALLENTRY(CAM_STROBE, "d25", NULL),
1363 _OMAP3_BALLENTRY(CAM_VS, "a23", NULL),
1364 _OMAP3_BALLENTRY(CAM_WEN, "b23", NULL),
1365 _OMAP3_BALLENTRY(CAM_XCLKA, "c25", NULL),
1366 _OMAP3_BALLENTRY(CAM_XCLKB, "b26", NULL),
1367 _OMAP3_BALLENTRY(CSI2_DX0, "ag19", NULL),
1368 _OMAP3_BALLENTRY(CSI2_DX1, "ag18", NULL),
1369 _OMAP3_BALLENTRY(CSI2_DY0, "ah19", NULL),
1370 _OMAP3_BALLENTRY(CSI2_DY1, "ah18", NULL),
1371 _OMAP3_BALLENTRY(DSS_ACBIAS, "e27", NULL),
1372 _OMAP3_BALLENTRY(DSS_DATA0, "ag22", NULL),
1373 _OMAP3_BALLENTRY(DSS_DATA1, "ah22", NULL),
1374 _OMAP3_BALLENTRY(DSS_DATA10, "ad28", NULL),
1375 _OMAP3_BALLENTRY(DSS_DATA11, "ad27", NULL),
1376 _OMAP3_BALLENTRY(DSS_DATA12, "ab28", NULL),
1377 _OMAP3_BALLENTRY(DSS_DATA13, "ab27", NULL),
1378 _OMAP3_BALLENTRY(DSS_DATA14, "aa28", NULL),
1379 _OMAP3_BALLENTRY(DSS_DATA15, "aa27", NULL),
1380 _OMAP3_BALLENTRY(DSS_DATA16, "g25", NULL),
1381 _OMAP3_BALLENTRY(DSS_DATA17, "h27", NULL),
1382 _OMAP3_BALLENTRY(DSS_DATA18, "h26", NULL),
1383 _OMAP3_BALLENTRY(DSS_DATA19, "h25", NULL),
1384 _OMAP3_BALLENTRY(DSS_DATA2, "ag23", NULL),
1385 _OMAP3_BALLENTRY(DSS_DATA20, "e28", NULL),
1386 _OMAP3_BALLENTRY(DSS_DATA21, "j26", NULL),
1387 _OMAP3_BALLENTRY(DSS_DATA22, "ac27", NULL),
1388 _OMAP3_BALLENTRY(DSS_DATA23, "ac28", NULL),
1389 _OMAP3_BALLENTRY(DSS_DATA3, "ah23", NULL),
1390 _OMAP3_BALLENTRY(DSS_DATA4, "ag24", NULL),
1391 _OMAP3_BALLENTRY(DSS_DATA5, "ah24", NULL),
1392 _OMAP3_BALLENTRY(DSS_DATA6, "e26", NULL),
1393 _OMAP3_BALLENTRY(DSS_DATA7, "f28", NULL),
1394 _OMAP3_BALLENTRY(DSS_DATA8, "f27", NULL),
1395 _OMAP3_BALLENTRY(DSS_DATA9, "g26", NULL),
1396 _OMAP3_BALLENTRY(DSS_HSYNC, "d26", NULL),
1397 _OMAP3_BALLENTRY(DSS_PCLK, "d28", NULL),
1398 _OMAP3_BALLENTRY(DSS_VSYNC, "d27", NULL),
1399 _OMAP3_BALLENTRY(ETK_CLK, "af10", NULL),
1400 _OMAP3_BALLENTRY(ETK_CTL, "ae10", NULL),
1401 _OMAP3_BALLENTRY(ETK_D0, "af11", NULL),
1402 _OMAP3_BALLENTRY(ETK_D1, "ag12", NULL),
1403 _OMAP3_BALLENTRY(ETK_D10, "ae7", NULL),
1404 _OMAP3_BALLENTRY(ETK_D11, "af7", NULL),
1405 _OMAP3_BALLENTRY(ETK_D12, "ag7", NULL),
1406 _OMAP3_BALLENTRY(ETK_D13, "ah7", NULL),
1407 _OMAP3_BALLENTRY(ETK_D14, "ag8", NULL),
1408 _OMAP3_BALLENTRY(ETK_D15, "ah8", NULL),
1409 _OMAP3_BALLENTRY(ETK_D2, "ah12", NULL),
1410 _OMAP3_BALLENTRY(ETK_D3, "ae13", NULL),
1411 _OMAP3_BALLENTRY(ETK_D4, "ae11", NULL),
1412 _OMAP3_BALLENTRY(ETK_D5, "ah9", NULL),
1413 _OMAP3_BALLENTRY(ETK_D6, "af13", NULL),
1414 _OMAP3_BALLENTRY(ETK_D7, "ah14", NULL),
1415 _OMAP3_BALLENTRY(ETK_D8, "af9", NULL),
1416 _OMAP3_BALLENTRY(ETK_D9, "ag9", NULL),
1417 _OMAP3_BALLENTRY(GPMC_A1, "n4", "ac15"),
1418 _OMAP3_BALLENTRY(GPMC_A10, "k3", "ab19"),
1419 _OMAP3_BALLENTRY(GPMC_A2, "m4", "ab15"),
1420 _OMAP3_BALLENTRY(GPMC_A3, "l4", "ac16"),
1421 _OMAP3_BALLENTRY(GPMC_A4, "k4", "ab16"),
1422 _OMAP3_BALLENTRY(GPMC_A5, "t3", "ac17"),
1423 _OMAP3_BALLENTRY(GPMC_A6, "r3", "ab17"),
1424 _OMAP3_BALLENTRY(GPMC_A7, "n3", "ac18"),
1425 _OMAP3_BALLENTRY(GPMC_A8, "m3", "ab18"),
1426 _OMAP3_BALLENTRY(GPMC_A9, "l3", "ac19"),
1427 _OMAP3_BALLENTRY(GPMC_CLK, "t4", "w2"),
1428 _OMAP3_BALLENTRY(GPMC_D10, "p1", "ab4"),
1429 _OMAP3_BALLENTRY(GPMC_D11, "r1", "ac4"),
1430 _OMAP3_BALLENTRY(GPMC_D12, "r2", "ab6"),
1431 _OMAP3_BALLENTRY(GPMC_D13, "t2", "ac6"),
1432 _OMAP3_BALLENTRY(GPMC_D14, "w1", "ab7"),
1433 _OMAP3_BALLENTRY(GPMC_D15, "y1", "ac7"),
1434 _OMAP3_BALLENTRY(GPMC_D8, "h2", "ab3"),
1435 _OMAP3_BALLENTRY(GPMC_D9, "k2", "ac3"),
1436 _OMAP3_BALLENTRY(GPMC_NBE0_CLE, "g3", "ac12"),
1437 _OMAP3_BALLENTRY(GPMC_NBE1, "u3", NULL),
1438 _OMAP3_BALLENTRY(GPMC_NCS1, "h3", "y1"),
1439 _OMAP3_BALLENTRY(GPMC_NCS2, "v8", NULL),
1440 _OMAP3_BALLENTRY(GPMC_NCS3, "u8", NULL),
1441 _OMAP3_BALLENTRY(GPMC_NCS4, "t8", NULL),
1442 _OMAP3_BALLENTRY(GPMC_NCS5, "r8", NULL),
1443 _OMAP3_BALLENTRY(GPMC_NCS6, "p8", NULL),
1444 _OMAP3_BALLENTRY(GPMC_NCS7, "n8", NULL),
1445 _OMAP3_BALLENTRY(GPMC_NWP, "h1", "ab10"),
1446 _OMAP3_BALLENTRY(GPMC_WAIT1, "l8", "ac10"),
1447 _OMAP3_BALLENTRY(GPMC_WAIT2, "k8", NULL),
1448 _OMAP3_BALLENTRY(GPMC_WAIT3, "j8", NULL),
1449 _OMAP3_BALLENTRY(HDQ_SIO, "j25", NULL),
1450 _OMAP3_BALLENTRY(HSUSB0_CLK, "t28", NULL),
1451 _OMAP3_BALLENTRY(HSUSB0_DATA0, "t27", NULL),
1452 _OMAP3_BALLENTRY(HSUSB0_DATA1, "u28", NULL),
1453 _OMAP3_BALLENTRY(HSUSB0_DATA2, "u27", NULL),
1454 _OMAP3_BALLENTRY(HSUSB0_DATA3, "u26", NULL),
1455 _OMAP3_BALLENTRY(HSUSB0_DATA4, "u25", NULL),
1456 _OMAP3_BALLENTRY(HSUSB0_DATA5, "v28", NULL),
1457 _OMAP3_BALLENTRY(HSUSB0_DATA6, "v27", NULL),
1458 _OMAP3_BALLENTRY(HSUSB0_DATA7, "v26", NULL),
1459 _OMAP3_BALLENTRY(HSUSB0_DIR, "r28", NULL),
1460 _OMAP3_BALLENTRY(HSUSB0_NXT, "t26", NULL),
1461 _OMAP3_BALLENTRY(HSUSB0_STP, "t25", NULL),
1462 _OMAP3_BALLENTRY(I2C2_SCL, "af15", NULL),
1463 _OMAP3_BALLENTRY(I2C2_SDA, "ae15", NULL),
1464 _OMAP3_BALLENTRY(I2C3_SCL, "af14", NULL),
1465 _OMAP3_BALLENTRY(I2C3_SDA, "ag14", NULL),
1466 _OMAP3_BALLENTRY(I2C4_SCL, "ad26", NULL),
1467 _OMAP3_BALLENTRY(I2C4_SDA, "ae26", NULL),
1468 _OMAP3_BALLENTRY(JTAG_EMU0, "aa11", NULL),
1469 _OMAP3_BALLENTRY(JTAG_EMU1, "aa10", NULL),
1470 _OMAP3_BALLENTRY(MCBSP1_CLKR, "y21", NULL),
1471 _OMAP3_BALLENTRY(MCBSP1_CLKX, "w21", NULL),
1472 _OMAP3_BALLENTRY(MCBSP1_DR, "u21", NULL),
1473 _OMAP3_BALLENTRY(MCBSP1_DX, "v21", NULL),
1474 _OMAP3_BALLENTRY(MCBSP1_FSR, "aa21", NULL),
1475 _OMAP3_BALLENTRY(MCBSP1_FSX, "k26", NULL),
1476 _OMAP3_BALLENTRY(MCBSP2_CLKX, "n21", NULL),
1477 _OMAP3_BALLENTRY(MCBSP2_DR, "r21", NULL),
1478 _OMAP3_BALLENTRY(MCBSP2_DX, "m21", NULL),
1479 _OMAP3_BALLENTRY(MCBSP2_FSX, "p21", NULL),
1480 _OMAP3_BALLENTRY(MCBSP3_CLKX, "af5", NULL),
1481 _OMAP3_BALLENTRY(MCBSP3_DR, "ae6", NULL),
1482 _OMAP3_BALLENTRY(MCBSP3_DX, "af6", NULL),
1483 _OMAP3_BALLENTRY(MCBSP3_FSX, "ae5", NULL),
1484 _OMAP3_BALLENTRY(MCBSP4_CLKX, "ae1", NULL),
1485 _OMAP3_BALLENTRY(MCBSP4_DR, "ad1", NULL),
1486 _OMAP3_BALLENTRY(MCBSP4_DX, "ad2", NULL),
1487 _OMAP3_BALLENTRY(MCBSP4_FSX, "ac1", NULL),
1488 _OMAP3_BALLENTRY(MCBSP_CLKS, "t21", NULL),
1489 _OMAP3_BALLENTRY(MCSPI1_CLK, "ab3", NULL),
1490 _OMAP3_BALLENTRY(MCSPI1_CS0, "ac2", NULL),
1491 _OMAP3_BALLENTRY(MCSPI1_CS1, "ac3", NULL),
1492 _OMAP3_BALLENTRY(MCSPI1_CS2, "ab1", NULL),
1493 _OMAP3_BALLENTRY(MCSPI1_CS3, "ab2", NULL),
1494 _OMAP3_BALLENTRY(MCSPI1_SIMO, "ab4", NULL),
1495 _OMAP3_BALLENTRY(MCSPI1_SOMI, "aa4", NULL),
1496 _OMAP3_BALLENTRY(MCSPI2_CLK, "aa3", NULL),
1497 _OMAP3_BALLENTRY(MCSPI2_CS0, "y4", NULL),
1498 _OMAP3_BALLENTRY(MCSPI2_CS1, "v3", NULL),
1499 _OMAP3_BALLENTRY(MCSPI2_SIMO, "y2", NULL),
1500 _OMAP3_BALLENTRY(MCSPI2_SOMI, "y3", NULL),
1501 _OMAP3_BALLENTRY(SDMMC1_CLK, "n28", NULL),
1502 _OMAP3_BALLENTRY(SDMMC1_CMD, "m27", NULL),
1503 _OMAP3_BALLENTRY(SDMMC1_DAT0, "n27", NULL),
1504 _OMAP3_BALLENTRY(SDMMC1_DAT1, "n26", NULL),
1505 _OMAP3_BALLENTRY(SDMMC1_DAT2, "n25", NULL),
1506 _OMAP3_BALLENTRY(SDMMC1_DAT3, "p28", NULL),
1507 _OMAP3_BALLENTRY(SDMMC1_DAT4, "p27", NULL),
1508 _OMAP3_BALLENTRY(SDMMC1_DAT5, "p26", NULL),
1509 _OMAP3_BALLENTRY(SDMMC1_DAT6, "r27", NULL),
1510 _OMAP3_BALLENTRY(SDMMC1_DAT7, "r25", NULL),
1511 _OMAP3_BALLENTRY(SDMMC2_CLK, "ae2", NULL),
1512 _OMAP3_BALLENTRY(SDMMC2_CMD, "ag5", NULL),
1513 _OMAP3_BALLENTRY(SDMMC2_DAT0, "ah5", NULL),
1514 _OMAP3_BALLENTRY(SDMMC2_DAT1, "ah4", NULL),
1515 _OMAP3_BALLENTRY(SDMMC2_DAT2, "ag4", NULL),
1516 _OMAP3_BALLENTRY(SDMMC2_DAT3, "af4", NULL),
1517 _OMAP3_BALLENTRY(SDMMC2_DAT4, "ae4", NULL),
1518 _OMAP3_BALLENTRY(SDMMC2_DAT5, "ah3", NULL),
1519 _OMAP3_BALLENTRY(SDMMC2_DAT6, "af3", NULL),
1520 _OMAP3_BALLENTRY(SDMMC2_DAT7, "ae3", NULL),
1521 _OMAP3_BALLENTRY(SYS_BOOT0, "ah26", NULL),
1522 _OMAP3_BALLENTRY(SYS_BOOT1, "ag26", NULL),
1523 _OMAP3_BALLENTRY(SYS_BOOT2, "ae14", NULL),
1524 _OMAP3_BALLENTRY(SYS_BOOT3, "af18", NULL),
1525 _OMAP3_BALLENTRY(SYS_BOOT4, "af19", NULL),
1526 _OMAP3_BALLENTRY(SYS_BOOT5, "ae21", NULL),
1527 _OMAP3_BALLENTRY(SYS_BOOT6, "af21", NULL),
1528 _OMAP3_BALLENTRY(SYS_CLKOUT1, "ag25", NULL),
1529 _OMAP3_BALLENTRY(SYS_CLKOUT2, "ae22", NULL),
1530 _OMAP3_BALLENTRY(SYS_CLKREQ, "af25", NULL),
1531 _OMAP3_BALLENTRY(SYS_NIRQ, "af26", NULL),
1532 _OMAP3_BALLENTRY(SYS_NRESWARM, "af24", NULL),
1533 _OMAP3_BALLENTRY(SYS_OFF_MODE, "af22", NULL),
1534 _OMAP3_BALLENTRY(UART1_CTS, "w8", NULL),
1535 _OMAP3_BALLENTRY(UART1_RTS, "aa9", NULL),
1536 _OMAP3_BALLENTRY(UART1_RX, "y8", NULL),
1537 _OMAP3_BALLENTRY(UART1_TX, "aa8", NULL),
1538 _OMAP3_BALLENTRY(UART2_CTS, "ab26", NULL),
1539 _OMAP3_BALLENTRY(UART2_RTS, "ab25", NULL),
1540 _OMAP3_BALLENTRY(UART2_RX, "ad25", NULL),
1541 _OMAP3_BALLENTRY(UART2_TX, "aa25", NULL),
1542 _OMAP3_BALLENTRY(UART3_CTS_RCTX, "h18", NULL),
1543 _OMAP3_BALLENTRY(UART3_RTS_SD, "h19", NULL),
1544 _OMAP3_BALLENTRY(UART3_RX_IRRX, "h20", NULL),
1545 _OMAP3_BALLENTRY(UART3_TX_IRTX, "h21", NULL),
1546 { .reg_offset = OMAP_MUX_TERMINATOR },
1547};
1548#else
1549#define omap3_cbb_ball NULL
1550#endif
1551
1552/*
1553 * Signals different on 36XX CBP package comapared to 34XX CBC package
1554 */
1555#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP)
1556struct omap_mux __initdata omap36xx_cbp_subset[] = {
1557 _OMAP3_MUXENTRY(CAM_D0, 99,
1558 "cam_d0", NULL, "csi2_dx2", NULL,
1559 "gpio_99", NULL, NULL, "safe_mode"),
1560 _OMAP3_MUXENTRY(CAM_D1, 100,
1561 "cam_d1", NULL, "csi2_dy2", NULL,
1562 "gpio_100", NULL, NULL, "safe_mode"),
1563 _OMAP3_MUXENTRY(CAM_D10, 109,
1564 "cam_d10", "ssi2_wake", NULL, NULL,
1565 "gpio_109", "hw_dbg8", NULL, "safe_mode"),
1566 _OMAP3_MUXENTRY(CAM_D2, 101,
1567 "cam_d2", "ssi2_rdy_tx", NULL, NULL,
1568 "gpio_101", "hw_dbg4", NULL, "safe_mode"),
1569 _OMAP3_MUXENTRY(CAM_D3, 102,
1570 "cam_d3", "ssi2_dat_rx", NULL, NULL,
1571 "gpio_102", "hw_dbg5", NULL, "safe_mode"),
1572 _OMAP3_MUXENTRY(CAM_D4, 103,
1573 "cam_d4", "ssi2_flag_rx", NULL, NULL,
1574 "gpio_103", "hw_dbg6", NULL, "safe_mode"),
1575 _OMAP3_MUXENTRY(CAM_D5, 104,
1576 "cam_d5", "ssi2_rdy_rx", NULL, NULL,
1577 "gpio_104", "hw_dbg7", NULL, "safe_mode"),
1578 _OMAP3_MUXENTRY(CAM_HS, 94,
1579 "cam_hs", "ssi2_dat_tx", NULL, NULL,
1580 "gpio_94", "hw_dbg0", NULL, "safe_mode"),
1581 _OMAP3_MUXENTRY(CAM_VS, 95,
1582 "cam_vs", "ssi2_flag_tx", NULL, NULL,
1583 "gpio_95", "hw_dbg1", NULL, "safe_mode"),
1584 _OMAP3_MUXENTRY(DSS_DATA0, 70,
1585 "dss_data0", "dsi_dx0", "uart1_cts", NULL,
1586 "gpio_70", NULL, NULL, "safe_mode"),
1587 _OMAP3_MUXENTRY(DSS_DATA1, 71,
1588 "dss_data1", "dsi_dy0", "uart1_rts", NULL,
1589 "gpio_71", NULL, NULL, "safe_mode"),
1590 _OMAP3_MUXENTRY(DSS_DATA2, 72,
1591 "dss_data2", "dsi_dx1", NULL, NULL,
1592 "gpio_72", NULL, NULL, "safe_mode"),
1593 _OMAP3_MUXENTRY(DSS_DATA3, 73,
1594 "dss_data3", "dsi_dy1", NULL, NULL,
1595 "gpio_73", NULL, NULL, "safe_mode"),
1596 _OMAP3_MUXENTRY(DSS_DATA4, 74,
1597 "dss_data4", "dsi_dx2", "uart3_rx_irrx", NULL,
1598 "gpio_74", NULL, NULL, "safe_mode"),
1599 _OMAP3_MUXENTRY(DSS_DATA5, 75,
1600 "dss_data5", "dsi_dy2", "uart3_tx_irtx", NULL,
1601 "gpio_75", NULL, NULL, "safe_mode"),
1602 _OMAP3_MUXENTRY(DSS_DATA6, 76,
1603 "dss_data6", NULL, "uart1_tx", "dssvenc656_data6",
1604 "gpio_76", "hw_dbg14", NULL, "safe_mode"),
1605 _OMAP3_MUXENTRY(DSS_DATA7, 77,
1606 "dss_data7", NULL, "uart1_rx", "dssvenc656_data7",
1607 "gpio_77", "hw_dbg15", NULL, "safe_mode"),
1608 _OMAP3_MUXENTRY(DSS_DATA8, 78,
1609 "dss_data8", NULL, "uart3_rx_irrx", NULL,
1610 "gpio_78", "hw_dbg16", NULL, "safe_mode"),
1611 _OMAP3_MUXENTRY(DSS_DATA9, 79,
1612 "dss_data9", NULL, "uart3_tx_irtx", NULL,
1613 "gpio_79", "hw_dbg17", NULL, "safe_mode"),
1614 _OMAP3_MUXENTRY(ETK_D12, 26,
1615 "etk_d12", "sys_drm_msecure", NULL, "hsusb2_dir",
1616 "gpio_26", NULL, "hsusb2_tll_dir", "hw_dbg14"),
1617 _OMAP3_MUXENTRY(GPMC_A11, 0,
1618 "gpmc_a11", NULL, NULL, NULL,
1619 NULL, NULL, NULL, "safe_mode"),
1620 _OMAP3_MUXENTRY(GPMC_WAIT2, 64,
1621 "gpmc_wait2", NULL, "uart4_tx", NULL,
1622 "gpio_64", NULL, NULL, "safe_mode"),
1623 _OMAP3_MUXENTRY(GPMC_WAIT3, 65,
1624 "gpmc_wait3", "sys_ndmareq1", "uart4_rx", NULL,
1625 "gpio_65", NULL, NULL, "safe_mode"),
1626 _OMAP3_MUXENTRY(HSUSB0_DATA0, 125,
1627 "hsusb0_data0", NULL, "uart3_tx_irtx", NULL,
1628 "gpio_125", "uart2_tx", NULL, "safe_mode"),
1629 _OMAP3_MUXENTRY(HSUSB0_DATA1, 130,
1630 "hsusb0_data1", NULL, "uart3_rx_irrx", NULL,
1631 "gpio_130", "uart2_rx", NULL, "safe_mode"),
1632 _OMAP3_MUXENTRY(HSUSB0_DATA2, 131,
1633 "hsusb0_data2", NULL, "uart3_rts_sd", NULL,
1634 "gpio_131", "uart2_rts", NULL, "safe_mode"),
1635 _OMAP3_MUXENTRY(HSUSB0_DATA3, 169,
1636 "hsusb0_data3", NULL, "uart3_cts_rctx", NULL,
1637 "gpio_169", "uart2_cts", NULL, "safe_mode"),
1638 _OMAP3_MUXENTRY(MCBSP1_CLKR, 156,
1639 "mcbsp1_clkr", "mcspi4_clk", "sim_cd", NULL,
1640 "gpio_156", NULL, NULL, "safe_mode"),
1641 _OMAP3_MUXENTRY(MCBSP1_FSR, 157,
1642 "mcbsp1_fsr", "adpllv2d_dithering_en1",
1643 "cam_global_reset", NULL,
1644 "gpio_157", NULL, NULL, "safe_mode"),
1645 _OMAP3_MUXENTRY(MCBSP4_CLKX, 152,
1646 "mcbsp4_clkx", "ssi1_dat_rx", NULL, NULL,
1647 "gpio_152", "hsusb3_tll_data1", "mm3_txse0", "safe_mode"),
1648 _OMAP3_MUXENTRY(MCBSP4_DR, 153,
1649 "mcbsp4_dr", "ssi1_flag_rx", NULL, NULL,
1650 "gpio_153", "hsusb3_tll_data0", "mm3_rxrcv", "safe_mode"),
1651 _OMAP3_MUXENTRY(MCBSP4_DX, 154,
1652 "mcbsp4_dx", "ssi1_rdy_rx", NULL, NULL,
1653 "gpio_154", "hsusb3_tll_data2", "mm3_txdat", "safe_mode"),
1654 _OMAP3_MUXENTRY(MCBSP4_FSX, 155,
1655 "mcbsp4_fsx", "ssi1_wake", NULL, NULL,
1656 "gpio_155", "hsusb3_tll_data3", "mm3_txen_n", "safe_mode"),
1657 _OMAP3_MUXENTRY(MCSPI1_CS1, 175,
1658 "mcspi1_cs1", "adpllv2d_dithering_en2", NULL, "sdmmc3_cmd",
1659 "gpio_175", NULL, NULL, "safe_mode"),
1660 _OMAP3_MUXENTRY(SAD2D_MBUSFLAG, 0,
1661 "sad2d_mbusflag", "mad2d_sbusflag", NULL, NULL,
1662 NULL, NULL, NULL, NULL),
1663 _OMAP3_MUXENTRY(SAD2D_MCAD28, 0,
1664 "sad2d_mcad28", "mad2d_mcad28", NULL, NULL,
1665 NULL, NULL, NULL, NULL),
1666 _OMAP3_MUXENTRY(SAD2D_MCAD29, 0,
1667 "sad2d_mcad29", "mad2d_mcad29", NULL, NULL,
1668 NULL, NULL, NULL, NULL),
1669 _OMAP3_MUXENTRY(SAD2D_MCAD32, 0,
1670 "sad2d_mcad32", "mad2d_mcad32", NULL, NULL,
1671 NULL, NULL, NULL, NULL),
1672 _OMAP3_MUXENTRY(SAD2D_MCAD33, 0,
1673 "sad2d_mcad33", "mad2d_mcad33", NULL, NULL,
1674 NULL, NULL, NULL, NULL),
1675 _OMAP3_MUXENTRY(SAD2D_MCAD34, 0,
1676 "sad2d_mcad34", "mad2d_mcad34", NULL, NULL,
1677 NULL, NULL, NULL, NULL),
1678 _OMAP3_MUXENTRY(SAD2D_MCAD35, 0,
1679 "sad2d_mcad35", "mad2d_mcad35", NULL, NULL,
1680 NULL, NULL, NULL, NULL),
1681 _OMAP3_MUXENTRY(SAD2D_MCAD36, 0,
1682 "sad2d_mcad36", "mad2d_mcad36", NULL, NULL,
1683 NULL, NULL, NULL, NULL),
1684 _OMAP3_MUXENTRY(SAD2D_MREAD, 0,
1685 "sad2d_mread", "mad2d_sread", NULL, NULL,
1686 NULL, NULL, NULL, NULL),
1687 _OMAP3_MUXENTRY(SAD2D_MWRITE, 0,
1688 "sad2d_mwrite", "mad2d_swrite", NULL, NULL,
1689 NULL, NULL, NULL, NULL),
1690 _OMAP3_MUXENTRY(SAD2D_SBUSFLAG, 0,
1691 "sad2d_sbusflag", "mad2d_mbusflag", NULL, NULL,
1692 NULL, NULL, NULL, NULL),
1693 _OMAP3_MUXENTRY(SAD2D_SREAD, 0,
1694 "sad2d_sread", "mad2d_mread", NULL, NULL,
1695 NULL, NULL, NULL, NULL),
1696 _OMAP3_MUXENTRY(SAD2D_SWRITE, 0,
1697 "sad2d_swrite", "mad2d_mwrite", NULL, NULL,
1698 NULL, NULL, NULL, NULL),
1699 _OMAP3_MUXENTRY(SDMMC1_CLK, 120,
1700 "sdmmc1_clk", "ms_clk", NULL, NULL,
1701 "gpio_120", NULL, NULL, "safe_mode"),
1702 _OMAP3_MUXENTRY(SDMMC1_CMD, 121,
1703 "sdmmc1_cmd", "ms_bs", NULL, NULL,
1704 "gpio_121", NULL, NULL, "safe_mode"),
1705 _OMAP3_MUXENTRY(SDMMC1_DAT0, 122,
1706 "sdmmc1_dat0", "ms_dat0", NULL, NULL,
1707 "gpio_122", NULL, NULL, "safe_mode"),
1708 _OMAP3_MUXENTRY(SDMMC1_DAT1, 123,
1709 "sdmmc1_dat1", "ms_dat1", NULL, NULL,
1710 "gpio_123", NULL, NULL, "safe_mode"),
1711 _OMAP3_MUXENTRY(SDMMC1_DAT2, 124,
1712 "sdmmc1_dat2", "ms_dat2", NULL, NULL,
1713 "gpio_124", NULL, NULL, "safe_mode"),
1714 _OMAP3_MUXENTRY(SDMMC1_DAT3, 125,
1715 "sdmmc1_dat3", "ms_dat3", NULL, NULL,
1716 "gpio_125", NULL, NULL, "safe_mode"),
1717 _OMAP3_MUXENTRY(SDRC_CKE0, 0,
1718 "sdrc_cke0", NULL, NULL, NULL,
1719 NULL, NULL, NULL, "safe_mode_out1"),
1720 _OMAP3_MUXENTRY(SDRC_CKE1, 0,
1721 "sdrc_cke1", NULL, NULL, NULL,
1722 NULL, NULL, NULL, "safe_mode_out1"),
1723 _OMAP3_MUXENTRY(SIM_IO, 126,
1724 "sim_io", "sim_io_low_impedance", NULL, NULL,
1725 "gpio_126", NULL, NULL, "safe_mode"),
1726 _OMAP3_MUXENTRY(SIM_CLK, 127,
1727 "sim_clk", NULL, NULL, NULL,
1728 "gpio_127", NULL, NULL, "safe_mode"),
1729 _OMAP3_MUXENTRY(SIM_PWRCTRL, 128,
1730 "sim_pwrctrl", NULL, NULL, NULL,
1731 "gpio_128", NULL, NULL, "safe_mode"),
1732 _OMAP3_MUXENTRY(SIM_RST, 129,
1733 "sim_rst", NULL, NULL, NULL,
1734 "gpio_129", NULL, NULL, "safe_mode"),
1735 _OMAP3_MUXENTRY(SYS_BOOT0, 2,
1736 "sys_boot0", NULL, NULL, "dss_data18",
1737 "gpio_2", NULL, NULL, "safe_mode"),
1738 _OMAP3_MUXENTRY(SYS_BOOT1, 3,
1739 "sys_boot1", NULL, NULL, "dss_data19",
1740 "gpio_3", NULL, NULL, "safe_mode"),
1741 _OMAP3_MUXENTRY(SYS_BOOT3, 5,
1742 "sys_boot3", NULL, NULL, "dss_data20",
1743 "gpio_5", NULL, NULL, "safe_mode"),
1744 _OMAP3_MUXENTRY(SYS_BOOT4, 6,
1745 "sys_boot4", "sdmmc2_dir_dat2", NULL, "dss_data21",
1746 "gpio_6", NULL, NULL, "safe_mode"),
1747 _OMAP3_MUXENTRY(SYS_BOOT5, 7,
1748 "sys_boot5", "sdmmc2_dir_dat3", NULL, "dss_data22",
1749 "gpio_7", NULL, NULL, "safe_mode"),
1750 _OMAP3_MUXENTRY(SYS_BOOT6, 8,
1751 "sys_boot6", NULL, NULL, "dss_data23",
1752 "gpio_8", NULL, NULL, "safe_mode"),
1753 _OMAP3_MUXENTRY(UART1_CTS, 150,
1754 "uart1_cts", "ssi1_rdy_tx", NULL, NULL,
1755 "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"),
1756 _OMAP3_MUXENTRY(UART1_RTS, 149,
1757 "uart1_rts", "ssi1_flag_tx", NULL, NULL,
1758 "gpio_149", NULL, NULL, "safe_mode"),
1759 _OMAP3_MUXENTRY(UART1_TX, 148,
1760 "uart1_tx", "ssi1_dat_tx", NULL, NULL,
1761 "gpio_148", NULL, NULL, "safe_mode"),
1762 { .reg_offset = OMAP_MUX_TERMINATOR },
1763};
1764#else
1765#define omap36xx_cbp_subset NULL
1766#endif
1767
1768/*
1769 * Balls for 36XX CBP package
1770 * 515-pin s-PBGA Package, 0.50mm Ball Pitch (Top), 0.40mm Ball Pitch (Bottom)
1771 */
1772#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1773 && defined (CONFIG_OMAP_PACKAGE_CBP)
1774struct omap_ball __initdata omap36xx_cbp_ball[] = {
1775 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL),
1776 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL),
1777 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL),
1778 _OMAP3_BALLENTRY(CAM_D11, "c26", NULL),
1779 _OMAP3_BALLENTRY(CAM_D2, "b24", NULL),
1780 _OMAP3_BALLENTRY(CAM_D3, "c24", NULL),
1781 _OMAP3_BALLENTRY(CAM_D4, "d24", NULL),
1782 _OMAP3_BALLENTRY(CAM_D5, "a25", NULL),
1783 _OMAP3_BALLENTRY(CAM_D6, "k28", NULL),
1784 _OMAP3_BALLENTRY(CAM_D7, "l28", NULL),
1785 _OMAP3_BALLENTRY(CAM_D8, "k27", NULL),
1786 _OMAP3_BALLENTRY(CAM_D9, "l27", NULL),
1787 _OMAP3_BALLENTRY(CAM_FLD, "c23", NULL),
1788 _OMAP3_BALLENTRY(CAM_HS, "a24", NULL),
1789 _OMAP3_BALLENTRY(CAM_PCLK, "c27", NULL),
1790 _OMAP3_BALLENTRY(CAM_STROBE, "d25", NULL),
1791 _OMAP3_BALLENTRY(CAM_VS, "a23", NULL),
1792 _OMAP3_BALLENTRY(CAM_WEN, "b23", NULL),
1793 _OMAP3_BALLENTRY(CAM_XCLKA, "c25", NULL),
1794 _OMAP3_BALLENTRY(CAM_XCLKB, "b26", NULL),
1795 _OMAP3_BALLENTRY(CSI2_DX0, "ag19", NULL),
1796 _OMAP3_BALLENTRY(CSI2_DX1, "ag18", NULL),
1797 _OMAP3_BALLENTRY(CSI2_DY0, "ah19", NULL),
1798 _OMAP3_BALLENTRY(CSI2_DY1, "ah18", NULL),
1799 _OMAP3_BALLENTRY(DSS_ACBIAS, "e27", NULL),
1800 _OMAP3_BALLENTRY(DSS_DATA0, "ag22", NULL),
1801 _OMAP3_BALLENTRY(DSS_DATA1, "ah22", NULL),
1802 _OMAP3_BALLENTRY(DSS_DATA10, "ad28", NULL),
1803 _OMAP3_BALLENTRY(DSS_DATA11, "ad27", NULL),
1804 _OMAP3_BALLENTRY(DSS_DATA12, "ab28", NULL),
1805 _OMAP3_BALLENTRY(DSS_DATA13, "ab27", NULL),
1806 _OMAP3_BALLENTRY(DSS_DATA14, "aa28", NULL),
1807 _OMAP3_BALLENTRY(DSS_DATA15, "aa27", NULL),
1808 _OMAP3_BALLENTRY(DSS_DATA16, "g25", NULL),
1809 _OMAP3_BALLENTRY(DSS_DATA17, "h27", NULL),
1810 _OMAP3_BALLENTRY(DSS_DATA18, "h26", NULL),
1811 _OMAP3_BALLENTRY(DSS_DATA19, "h25", NULL),
1812 _OMAP3_BALLENTRY(DSS_DATA2, "ag23", NULL),
1813 _OMAP3_BALLENTRY(DSS_DATA20, "e28", NULL),
1814 _OMAP3_BALLENTRY(DSS_DATA21, "j26", NULL),
1815 _OMAP3_BALLENTRY(DSS_DATA22, "ac27", NULL),
1816 _OMAP3_BALLENTRY(DSS_DATA23, "ac28", NULL),
1817 _OMAP3_BALLENTRY(DSS_DATA3, "ah23", NULL),
1818 _OMAP3_BALLENTRY(DSS_DATA4, "ag24", NULL),
1819 _OMAP3_BALLENTRY(DSS_DATA5, "ah24", NULL),
1820 _OMAP3_BALLENTRY(DSS_DATA6, "e26", NULL),
1821 _OMAP3_BALLENTRY(DSS_DATA7, "f28", NULL),
1822 _OMAP3_BALLENTRY(DSS_DATA8, "f27", NULL),
1823 _OMAP3_BALLENTRY(DSS_DATA9, "g26", NULL),
1824 _OMAP3_BALLENTRY(DSS_HSYNC, "d26", NULL),
1825 _OMAP3_BALLENTRY(DSS_PCLK, "d28", NULL),
1826 _OMAP3_BALLENTRY(DSS_VSYNC, "d27", NULL),
1827 _OMAP3_BALLENTRY(ETK_CLK, "af10", NULL),
1828 _OMAP3_BALLENTRY(ETK_CTL, "ae10", NULL),
1829 _OMAP3_BALLENTRY(ETK_D0, "af11", NULL),
1830 _OMAP3_BALLENTRY(ETK_D1, "ag12", NULL),
1831 _OMAP3_BALLENTRY(ETK_D10, "ae7", NULL),
1832 _OMAP3_BALLENTRY(ETK_D11, "af7", NULL),
1833 _OMAP3_BALLENTRY(ETK_D12, "ag7", NULL),
1834 _OMAP3_BALLENTRY(ETK_D13, "ah7", NULL),
1835 _OMAP3_BALLENTRY(ETK_D14, "ag8", NULL),
1836 _OMAP3_BALLENTRY(ETK_D15, "ah8", NULL),
1837 _OMAP3_BALLENTRY(ETK_D2, "ah12", NULL),
1838 _OMAP3_BALLENTRY(ETK_D3, "ae13", NULL),
1839 _OMAP3_BALLENTRY(ETK_D4, "ae11", NULL),
1840 _OMAP3_BALLENTRY(ETK_D5, "ah9", NULL),
1841 _OMAP3_BALLENTRY(ETK_D6, "af13", NULL),
1842 _OMAP3_BALLENTRY(ETK_D7, "ah14", NULL),
1843 _OMAP3_BALLENTRY(ETK_D8, "af9", NULL),
1844 _OMAP3_BALLENTRY(ETK_D9, "ag9", NULL),
1845 _OMAP3_BALLENTRY(GPMC_A1, "n4", "ac15"),
1846 _OMAP3_BALLENTRY(GPMC_A10, "k3", "ab19"),
1847 _OMAP3_BALLENTRY(GPMC_A11, NULL, "ac20"),
1848 _OMAP3_BALLENTRY(GPMC_A2, "m4", "ab15"),
1849 _OMAP3_BALLENTRY(GPMC_A3, "l4", "ac16"),
1850 _OMAP3_BALLENTRY(GPMC_A4, "k4", "ab16"),
1851 _OMAP3_BALLENTRY(GPMC_A5, "t3", "ac17"),
1852 _OMAP3_BALLENTRY(GPMC_A6, "r3", "ab17"),
1853 _OMAP3_BALLENTRY(GPMC_A7, "n3", "ac18"),
1854 _OMAP3_BALLENTRY(GPMC_A8, "m3", "ab18"),
1855 _OMAP3_BALLENTRY(GPMC_A9, "l3", "ac19"),
1856 _OMAP3_BALLENTRY(GPMC_CLK, "t4", "w2"),
1857 _OMAP3_BALLENTRY(GPMC_D0, "k1", "m2"),
1858 _OMAP3_BALLENTRY(GPMC_D1, "l1", "m1"),
1859 _OMAP3_BALLENTRY(GPMC_D10, "p1", "ab4"),
1860 _OMAP3_BALLENTRY(GPMC_D11, "r1", "ac4"),
1861 _OMAP3_BALLENTRY(GPMC_D12, "r2", "ab6"),
1862 _OMAP3_BALLENTRY(GPMC_D13, "t2", "ac6"),
1863 _OMAP3_BALLENTRY(GPMC_D14, "w1", "ab7"),
1864 _OMAP3_BALLENTRY(GPMC_D15, "y1", "ac7"),
1865 _OMAP3_BALLENTRY(GPMC_D2, "l2", "n2"),
1866 _OMAP3_BALLENTRY(GPMC_D3, "p2", "n1"),
1867 _OMAP3_BALLENTRY(GPMC_D4, "t1", "r2"),
1868 _OMAP3_BALLENTRY(GPMC_D5, "v1", "r1"),
1869 _OMAP3_BALLENTRY(GPMC_D6, "v2", "t2"),
1870 _OMAP3_BALLENTRY(GPMC_D7, "w2", "t1"),
1871 _OMAP3_BALLENTRY(GPMC_D8, "h2", "ab3"),
1872 _OMAP3_BALLENTRY(GPMC_D9, "k2", "ac3"),
1873 _OMAP3_BALLENTRY(GPMC_NADV_ALE, "f3", "w1"),
1874 _OMAP3_BALLENTRY(GPMC_NBE0_CLE, "g3", "ac12"),
1875 _OMAP3_BALLENTRY(GPMC_NBE1, "u3", NULL),
1876 _OMAP3_BALLENTRY(GPMC_NCS0, "g4", "y2"),
1877 _OMAP3_BALLENTRY(GPMC_NCS1, "h3", "y1"),
1878 _OMAP3_BALLENTRY(GPMC_NCS2, "v8", NULL),
1879 _OMAP3_BALLENTRY(GPMC_NCS3, "u8", NULL),
1880 _OMAP3_BALLENTRY(GPMC_NCS4, "t8", NULL),
1881 _OMAP3_BALLENTRY(GPMC_NCS5, "r8", NULL),
1882 _OMAP3_BALLENTRY(GPMC_NCS6, "p8", NULL),
1883 _OMAP3_BALLENTRY(GPMC_NCS7, "n8", NULL),
1884 _OMAP3_BALLENTRY(GPMC_NOE, "g2", "v2"),
1885 _OMAP3_BALLENTRY(GPMC_NWE, "f4", "v1"),
1886 _OMAP3_BALLENTRY(GPMC_NWP, "h1", "ab10"),
1887 _OMAP3_BALLENTRY(GPMC_WAIT0, "m8", "ab12"),
1888 _OMAP3_BALLENTRY(GPMC_WAIT1, "l8", "ac10"),
1889 _OMAP3_BALLENTRY(GPMC_WAIT2, "k8", NULL),
1890 _OMAP3_BALLENTRY(GPMC_WAIT3, "j8", NULL),
1891 _OMAP3_BALLENTRY(HDQ_SIO, "j25", NULL),
1892 _OMAP3_BALLENTRY(HSUSB0_CLK, "t28", NULL),
1893 _OMAP3_BALLENTRY(HSUSB0_DATA0, "t27", NULL),
1894 _OMAP3_BALLENTRY(HSUSB0_DATA1, "u28", NULL),
1895 _OMAP3_BALLENTRY(HSUSB0_DATA2, "u27", NULL),
1896 _OMAP3_BALLENTRY(HSUSB0_DATA3, "u26", NULL),
1897 _OMAP3_BALLENTRY(HSUSB0_DATA4, "u25", NULL),
1898 _OMAP3_BALLENTRY(HSUSB0_DATA5, "v28", NULL),
1899 _OMAP3_BALLENTRY(HSUSB0_DATA6, "v27", NULL),
1900 _OMAP3_BALLENTRY(HSUSB0_DATA7, "v26", NULL),
1901 _OMAP3_BALLENTRY(HSUSB0_DIR, "r28", NULL),
1902 _OMAP3_BALLENTRY(HSUSB0_NXT, "t26", NULL),
1903 _OMAP3_BALLENTRY(HSUSB0_STP, "t25", NULL),
1904 _OMAP3_BALLENTRY(I2C1_SCL, "k21", NULL),
1905 _OMAP3_BALLENTRY(I2C1_SDA, "j21", NULL),
1906 _OMAP3_BALLENTRY(I2C2_SCL, "af15", NULL),
1907 _OMAP3_BALLENTRY(I2C2_SDA, "ae15", NULL),
1908 _OMAP3_BALLENTRY(I2C3_SCL, "af14", NULL),
1909 _OMAP3_BALLENTRY(I2C3_SDA, "ag14", NULL),
1910 _OMAP3_BALLENTRY(I2C4_SCL, "ad26", NULL),
1911 _OMAP3_BALLENTRY(I2C4_SDA, "ae26", NULL),
1912 _OMAP3_BALLENTRY(JTAG_EMU0, "aa11", NULL),
1913 _OMAP3_BALLENTRY(JTAG_EMU1, "aa10", NULL),
1914 _OMAP3_BALLENTRY(JTAG_RTCK, "aa12", NULL),
1915 _OMAP3_BALLENTRY(JTAG_TCK, "aa13", NULL),
1916 _OMAP3_BALLENTRY(JTAG_TDI, "aa20", NULL),
1917 _OMAP3_BALLENTRY(JTAG_TDO, "aa19", NULL),
1918 _OMAP3_BALLENTRY(JTAG_TMS_TMSC, "aa18", NULL),
1919 _OMAP3_BALLENTRY(MCBSP1_CLKR, "y21", NULL),
1920 _OMAP3_BALLENTRY(MCBSP1_CLKX, "w21", NULL),
1921 _OMAP3_BALLENTRY(MCBSP1_DR, "u21", NULL),
1922 _OMAP3_BALLENTRY(MCBSP1_DX, "v21", NULL),
1923 _OMAP3_BALLENTRY(MCBSP1_FSR, "aa21", NULL),
1924 _OMAP3_BALLENTRY(MCBSP1_FSX, "k26", NULL),
1925 _OMAP3_BALLENTRY(MCBSP2_CLKX, "n21", NULL),
1926 _OMAP3_BALLENTRY(MCBSP2_DR, "r21", NULL),
1927 _OMAP3_BALLENTRY(MCBSP2_DX, "m21", NULL),
1928 _OMAP3_BALLENTRY(MCBSP2_FSX, "p21", NULL),
1929 _OMAP3_BALLENTRY(MCBSP3_CLKX, "af5", NULL),
1930 _OMAP3_BALLENTRY(MCBSP3_DR, "ae6", NULL),
1931 _OMAP3_BALLENTRY(MCBSP3_DX, "af6", NULL),
1932 _OMAP3_BALLENTRY(MCBSP3_FSX, "ae5", NULL),
1933 _OMAP3_BALLENTRY(MCBSP4_CLKX, "ae1", NULL),
1934 _OMAP3_BALLENTRY(MCBSP4_DR, "ad1", NULL),
1935 _OMAP3_BALLENTRY(MCBSP4_DX, "ad2", NULL),
1936 _OMAP3_BALLENTRY(MCBSP4_FSX, "ac1", NULL),
1937 _OMAP3_BALLENTRY(MCBSP_CLKS, "t21", NULL),
1938 _OMAP3_BALLENTRY(MCSPI1_CLK, "ab3", NULL),
1939 _OMAP3_BALLENTRY(MCSPI1_CS0, "ac2", NULL),
1940 _OMAP3_BALLENTRY(MCSPI1_CS1, "ac3", NULL),
1941 _OMAP3_BALLENTRY(MCSPI1_CS2, "ab1", NULL),
1942 _OMAP3_BALLENTRY(MCSPI1_CS3, "ab2", NULL),
1943 _OMAP3_BALLENTRY(MCSPI1_SIMO, "ab4", NULL),
1944 _OMAP3_BALLENTRY(MCSPI1_SOMI, "aa4", NULL),
1945 _OMAP3_BALLENTRY(MCSPI2_CLK, "aa3", NULL),
1946 _OMAP3_BALLENTRY(MCSPI2_CS0, "y4", NULL),
1947 _OMAP3_BALLENTRY(MCSPI2_CS1, "v3", NULL),
1948 _OMAP3_BALLENTRY(MCSPI2_SIMO, "y2", NULL),
1949 _OMAP3_BALLENTRY(MCSPI2_SOMI, "y3", NULL),
1950 _OMAP3_BALLENTRY(SDMMC1_CLK, "n28", NULL),
1951 _OMAP3_BALLENTRY(SDMMC1_CMD, "m27", NULL),
1952 _OMAP3_BALLENTRY(SDMMC1_DAT0, "n27", NULL),
1953 _OMAP3_BALLENTRY(SDMMC1_DAT1, "n26", NULL),
1954 _OMAP3_BALLENTRY(SDMMC1_DAT2, "n25", NULL),
1955 _OMAP3_BALLENTRY(SDMMC1_DAT3, "p28", NULL),
1956 _OMAP3_BALLENTRY(SDMMC2_CLK, "ae2", NULL),
1957 _OMAP3_BALLENTRY(SDMMC2_CMD, "ag5", NULL),
1958 _OMAP3_BALLENTRY(SDMMC2_DAT0, "ah5", NULL),
1959 _OMAP3_BALLENTRY(SDMMC2_DAT1, "ah4", NULL),
1960 _OMAP3_BALLENTRY(SDMMC2_DAT2, "ag4", NULL),
1961 _OMAP3_BALLENTRY(SDMMC2_DAT3, "af4", NULL),
1962 _OMAP3_BALLENTRY(SDMMC2_DAT4, "ae4", NULL),
1963 _OMAP3_BALLENTRY(SDMMC2_DAT5, "ah3", NULL),
1964 _OMAP3_BALLENTRY(SDMMC2_DAT6, "af3", NULL),
1965 _OMAP3_BALLENTRY(SDMMC2_DAT7, "ae3", NULL),
1966 _OMAP3_BALLENTRY(SDRC_A0, NULL, "n22"),
1967 _OMAP3_BALLENTRY(SDRC_A1, NULL, "n23"),
1968 _OMAP3_BALLENTRY(SDRC_A10, NULL, "v22"),
1969 _OMAP3_BALLENTRY(SDRC_A11, NULL, "v23"),
1970 _OMAP3_BALLENTRY(SDRC_A12, NULL, "w22"),
1971 _OMAP3_BALLENTRY(SDRC_A13, NULL, "w23"),
1972 _OMAP3_BALLENTRY(SDRC_A14, NULL, "y22"),
1973 _OMAP3_BALLENTRY(SDRC_A2, NULL, "p22"),
1974 _OMAP3_BALLENTRY(SDRC_A3, NULL, "p23"),
1975 _OMAP3_BALLENTRY(SDRC_A4, NULL, "r22"),
1976 _OMAP3_BALLENTRY(SDRC_A5, NULL, "r23"),
1977 _OMAP3_BALLENTRY(SDRC_A6, NULL, "t22"),
1978 _OMAP3_BALLENTRY(SDRC_A7, NULL, "t23"),
1979 _OMAP3_BALLENTRY(SDRC_A8, NULL, "u22"),
1980 _OMAP3_BALLENTRY(SDRC_A9, NULL, "u23"),
1981 _OMAP3_BALLENTRY(SDRC_BA0, "h9", "ab21"),
1982 _OMAP3_BALLENTRY(SDRC_BA1, "h10", "ac21"),
1983 _OMAP3_BALLENTRY(SDRC_CKE0, "h16", "j22"),
1984 _OMAP3_BALLENTRY(SDRC_CKE1, "h17", "j23"),
1985 _OMAP3_BALLENTRY(SDRC_CLK, "a13", "a11"),
1986 _OMAP3_BALLENTRY(SDRC_D0, NULL, "j2"),
1987 _OMAP3_BALLENTRY(SDRC_D1, NULL, "j1"),
1988 _OMAP3_BALLENTRY(SDRC_D10, "c15", "b14"),
1989 _OMAP3_BALLENTRY(SDRC_D11, "b16", "a14"),
1990 _OMAP3_BALLENTRY(SDRC_D12, "d17", "b16"),
1991 _OMAP3_BALLENTRY(SDRC_D13, "c17", "a16"),
1992 _OMAP3_BALLENTRY(SDRC_D14, "b17", "b19"),
1993 _OMAP3_BALLENTRY(SDRC_D15, "d18", "a19"),
1994 _OMAP3_BALLENTRY(SDRC_D16, NULL, "b3"),
1995 _OMAP3_BALLENTRY(SDRC_D17, NULL, "a3"),
1996 _OMAP3_BALLENTRY(SDRC_D18, NULL, "b5"),
1997 _OMAP3_BALLENTRY(SDRC_D19, NULL, "a5"),
1998 _OMAP3_BALLENTRY(SDRC_D2, NULL, "g2"),
1999 _OMAP3_BALLENTRY(SDRC_D20, NULL, "b8"),
2000 _OMAP3_BALLENTRY(SDRC_D21, NULL, "a8"),
2001 _OMAP3_BALLENTRY(SDRC_D22, NULL, "b9"),
2002 _OMAP3_BALLENTRY(SDRC_D23, NULL, "a9"),
2003 _OMAP3_BALLENTRY(SDRC_D24, NULL, "b21"),
2004 _OMAP3_BALLENTRY(SDRC_D25, NULL, "a21"),
2005 _OMAP3_BALLENTRY(SDRC_D26, NULL, "d22"),
2006 _OMAP3_BALLENTRY(SDRC_D27, NULL, "d23"),
2007 _OMAP3_BALLENTRY(SDRC_D28, NULL, "e22"),
2008 _OMAP3_BALLENTRY(SDRC_D29, NULL, "e23"),
2009 _OMAP3_BALLENTRY(SDRC_D3, NULL, "g1"),
2010 _OMAP3_BALLENTRY(SDRC_D30, NULL, "g22"),
2011 _OMAP3_BALLENTRY(SDRC_D31, NULL, "g23"),
2012 _OMAP3_BALLENTRY(SDRC_D4, NULL, "f2"),
2013 _OMAP3_BALLENTRY(SDRC_D5, NULL, "f1"),
2014 _OMAP3_BALLENTRY(SDRC_D6, NULL, "d2"),
2015 _OMAP3_BALLENTRY(SDRC_D7, NULL, "d1"),
2016 _OMAP3_BALLENTRY(SDRC_D8, "c14", "b13"),
2017 _OMAP3_BALLENTRY(SDRC_D9, "b14", "a13"),
2018 _OMAP3_BALLENTRY(SDRC_DM0, NULL, "c1"),
2019 _OMAP3_BALLENTRY(SDRC_DM1, "a16", "a17"),
2020 _OMAP3_BALLENTRY(SDRC_DM2, NULL, "a6"),
2021 _OMAP3_BALLENTRY(SDRC_DM3, NULL, "a20"),
2022 _OMAP3_BALLENTRY(SDRC_DQS0, NULL, "c2"),
2023 _OMAP3_BALLENTRY(SDRC_DQS1, "a17", "b17"),
2024 _OMAP3_BALLENTRY(SDRC_DQS2, NULL, "b6"),
2025 _OMAP3_BALLENTRY(SDRC_DQS3, NULL, "b20"),
2026 _OMAP3_BALLENTRY(SDRC_NCAS, "h13", "l22"),
2027 _OMAP3_BALLENTRY(SDRC_NCLK, "a14", "b11"),
2028 _OMAP3_BALLENTRY(SDRC_NCS0, "h11", "m22"),
2029 _OMAP3_BALLENTRY(SDRC_NCS1, "h12", "m23"),
2030 _OMAP3_BALLENTRY(SDRC_NRAS, "h14", "l23"),
2031 _OMAP3_BALLENTRY(SDRC_NWE, "h15", "k23"),
2032 _OMAP3_BALLENTRY(SIM_CLK, "p26", NULL),
2033 _OMAP3_BALLENTRY(SIM_IO, "p27", NULL),
2034 _OMAP3_BALLENTRY(SIM_PWRCTRL, "r27", NULL),
2035 _OMAP3_BALLENTRY(SIM_RST, "r25", NULL),
2036 _OMAP3_BALLENTRY(SYS_32K, "ae25", NULL),
2037 _OMAP3_BALLENTRY(SYS_BOOT0, "ah26", NULL),
2038 _OMAP3_BALLENTRY(SYS_BOOT1, "ag26", NULL),
2039 _OMAP3_BALLENTRY(SYS_BOOT2, "ae14", NULL),
2040 _OMAP3_BALLENTRY(SYS_BOOT3, "af18", NULL),
2041 _OMAP3_BALLENTRY(SYS_BOOT4, "af19", NULL),
2042 _OMAP3_BALLENTRY(SYS_BOOT5, "ae21", NULL),
2043 _OMAP3_BALLENTRY(SYS_BOOT6, "af21", NULL),
2044 _OMAP3_BALLENTRY(SYS_CLKOUT1, "ag25", NULL),
2045 _OMAP3_BALLENTRY(SYS_CLKOUT2, "ae22", NULL),
2046 _OMAP3_BALLENTRY(SYS_CLKREQ, "af25", NULL),
2047 _OMAP3_BALLENTRY(SYS_NIRQ, "af26", NULL),
2048 _OMAP3_BALLENTRY(SYS_NRESWARM, "af24", NULL),
2049 _OMAP3_BALLENTRY(SYS_OFF_MODE, "af22", NULL),
2050 _OMAP3_BALLENTRY(UART1_CTS, "w8", NULL),
2051 _OMAP3_BALLENTRY(UART1_RTS, "aa9", NULL),
2052 _OMAP3_BALLENTRY(UART1_RX, "y8", NULL),
2053 _OMAP3_BALLENTRY(UART1_TX, "aa8", NULL),
2054 _OMAP3_BALLENTRY(UART2_CTS, "ab26", NULL),
2055 _OMAP3_BALLENTRY(UART2_RTS, "ab25", NULL),
2056 _OMAP3_BALLENTRY(UART2_RX, "ad25", NULL),
2057 _OMAP3_BALLENTRY(UART2_TX, "aa25", NULL),
2058 _OMAP3_BALLENTRY(UART3_CTS_RCTX, "h18", NULL),
2059 _OMAP3_BALLENTRY(UART3_RTS_SD, "h19", NULL),
2060 _OMAP3_BALLENTRY(UART3_RX_IRRX, "h20", NULL),
2061 _OMAP3_BALLENTRY(UART3_TX_IRTX, "h21", NULL),
2062 { .reg_offset = OMAP_MUX_TERMINATOR },
2063};
2064#else
2065#define omap36xx_cbp_ball NULL
2066#endif
2067
2068int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags)
2069{
2070 struct omap_mux *package_subset;
2071 struct omap_ball *package_balls;
2072
2073 switch (flags & OMAP_PACKAGE_MASK) {
2074 case (OMAP_PACKAGE_CBC):
2075 package_subset = omap3_cbc_subset;
2076 package_balls = omap3_cbc_ball;
2077 break;
2078 case (OMAP_PACKAGE_CBB):
2079 package_subset = omap3_cbb_subset;
2080 package_balls = omap3_cbb_ball;
2081 break;
2082 case (OMAP_PACKAGE_CUS):
2083 package_subset = omap3_cus_subset;
2084 package_balls = omap3_cus_ball;
2085 break;
2086 case (OMAP_PACKAGE_CBP):
2087 package_subset = omap36xx_cbp_subset;
2088 package_balls = omap36xx_cbp_ball;
2089 break;
2090 default:
2091 printk(KERN_ERR "mux: Unknown omap package, mux disabled\n");
2092 return -EINVAL;
2093 }
2094
2095 return omap_mux_init(OMAP3_CONTROL_PADCONF_MUX_PBASE,
2096 OMAP3_CONTROL_PADCONF_MUX_SIZE,
2097 omap3_muxmodes, package_subset, board_subset,
2098 package_balls);
2099}
diff --git a/arch/arm/mach-omap2/mux34xx.h b/arch/arm/mach-omap2/mux34xx.h
new file mode 100644
index 000000000000..6543ebf8ecfc
--- /dev/null
+++ b/arch/arm/mach-omap2/mux34xx.h
@@ -0,0 +1,398 @@
1/*
2 * Copyright (C) 2009 Nokia
3 * Copyright (C) 2009 Texas Instruments
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#define OMAP3_CONTROL_PADCONF_MUX_PBASE 0x48002030LU
11
12#define OMAP3_MUX(mode0, mux_value) \
13{ \
14 .reg_offset = (OMAP3_CONTROL_PADCONF_##mode0##_OFFSET), \
15 .value = (mux_value), \
16}
17
18/*
19 * OMAP3 CONTROL_PADCONF* register offsets for pin-muxing
20 *
21 * Extracted from the TRM. Add 0x48002030 to these values to get the
22 * absolute addresses. The name in the macro is the mode-0 name of
23 * the pin. NOTE: These registers are 16-bits wide.
24 *
25 * Note that 34XX TRM uses MMC instead of SDMMC and SAD2D instead
26 * of CHASSIS for some registers. For the defines, we follow the
27 * 36XX naming, and use SDMMC and CHASSIS.
28 */
29#define OMAP3_CONTROL_PADCONF_SDRC_D0_OFFSET 0x000
30#define OMAP3_CONTROL_PADCONF_SDRC_D1_OFFSET 0x002
31#define OMAP3_CONTROL_PADCONF_SDRC_D2_OFFSET 0x004
32#define OMAP3_CONTROL_PADCONF_SDRC_D3_OFFSET 0x006
33#define OMAP3_CONTROL_PADCONF_SDRC_D4_OFFSET 0x008
34#define OMAP3_CONTROL_PADCONF_SDRC_D5_OFFSET 0x00a
35#define OMAP3_CONTROL_PADCONF_SDRC_D6_OFFSET 0x00c
36#define OMAP3_CONTROL_PADCONF_SDRC_D7_OFFSET 0x00e
37#define OMAP3_CONTROL_PADCONF_SDRC_D8_OFFSET 0x010
38#define OMAP3_CONTROL_PADCONF_SDRC_D9_OFFSET 0x012
39#define OMAP3_CONTROL_PADCONF_SDRC_D10_OFFSET 0x014
40#define OMAP3_CONTROL_PADCONF_SDRC_D11_OFFSET 0x016
41#define OMAP3_CONTROL_PADCONF_SDRC_D12_OFFSET 0x018
42#define OMAP3_CONTROL_PADCONF_SDRC_D13_OFFSET 0x01a
43#define OMAP3_CONTROL_PADCONF_SDRC_D14_OFFSET 0x01c
44#define OMAP3_CONTROL_PADCONF_SDRC_D15_OFFSET 0x01e
45#define OMAP3_CONTROL_PADCONF_SDRC_D16_OFFSET 0x020
46#define OMAP3_CONTROL_PADCONF_SDRC_D17_OFFSET 0x022
47#define OMAP3_CONTROL_PADCONF_SDRC_D18_OFFSET 0x024
48#define OMAP3_CONTROL_PADCONF_SDRC_D19_OFFSET 0x026
49#define OMAP3_CONTROL_PADCONF_SDRC_D20_OFFSET 0x028
50#define OMAP3_CONTROL_PADCONF_SDRC_D21_OFFSET 0x02a
51#define OMAP3_CONTROL_PADCONF_SDRC_D22_OFFSET 0x02c
52#define OMAP3_CONTROL_PADCONF_SDRC_D23_OFFSET 0x02e
53#define OMAP3_CONTROL_PADCONF_SDRC_D24_OFFSET 0x030
54#define OMAP3_CONTROL_PADCONF_SDRC_D25_OFFSET 0x032
55#define OMAP3_CONTROL_PADCONF_SDRC_D26_OFFSET 0x034
56#define OMAP3_CONTROL_PADCONF_SDRC_D27_OFFSET 0x036
57#define OMAP3_CONTROL_PADCONF_SDRC_D28_OFFSET 0x038
58#define OMAP3_CONTROL_PADCONF_SDRC_D29_OFFSET 0x03a
59#define OMAP3_CONTROL_PADCONF_SDRC_D30_OFFSET 0x03c
60#define OMAP3_CONTROL_PADCONF_SDRC_D31_OFFSET 0x03e
61#define OMAP3_CONTROL_PADCONF_SDRC_CLK_OFFSET 0x040
62#define OMAP3_CONTROL_PADCONF_SDRC_DQS0_OFFSET 0x042
63#define OMAP3_CONTROL_PADCONF_SDRC_DQS1_OFFSET 0x044
64#define OMAP3_CONTROL_PADCONF_SDRC_DQS2_OFFSET 0x046
65#define OMAP3_CONTROL_PADCONF_SDRC_DQS3_OFFSET 0x048
66#define OMAP3_CONTROL_PADCONF_GPMC_A1_OFFSET 0x04a
67#define OMAP3_CONTROL_PADCONF_GPMC_A2_OFFSET 0x04c
68#define OMAP3_CONTROL_PADCONF_GPMC_A3_OFFSET 0x04e
69#define OMAP3_CONTROL_PADCONF_GPMC_A4_OFFSET 0x050
70#define OMAP3_CONTROL_PADCONF_GPMC_A5_OFFSET 0x052
71#define OMAP3_CONTROL_PADCONF_GPMC_A6_OFFSET 0x054
72#define OMAP3_CONTROL_PADCONF_GPMC_A7_OFFSET 0x056
73#define OMAP3_CONTROL_PADCONF_GPMC_A8_OFFSET 0x058
74#define OMAP3_CONTROL_PADCONF_GPMC_A9_OFFSET 0x05a
75#define OMAP3_CONTROL_PADCONF_GPMC_A10_OFFSET 0x05c
76#define OMAP3_CONTROL_PADCONF_GPMC_D0_OFFSET 0x05e
77#define OMAP3_CONTROL_PADCONF_GPMC_D1_OFFSET 0x060
78#define OMAP3_CONTROL_PADCONF_GPMC_D2_OFFSET 0x062
79#define OMAP3_CONTROL_PADCONF_GPMC_D3_OFFSET 0x064
80#define OMAP3_CONTROL_PADCONF_GPMC_D4_OFFSET 0x066
81#define OMAP3_CONTROL_PADCONF_GPMC_D5_OFFSET 0x068
82#define OMAP3_CONTROL_PADCONF_GPMC_D6_OFFSET 0x06a
83#define OMAP3_CONTROL_PADCONF_GPMC_D7_OFFSET 0x06c
84#define OMAP3_CONTROL_PADCONF_GPMC_D8_OFFSET 0x06e
85#define OMAP3_CONTROL_PADCONF_GPMC_D9_OFFSET 0x070
86#define OMAP3_CONTROL_PADCONF_GPMC_D10_OFFSET 0x072
87#define OMAP3_CONTROL_PADCONF_GPMC_D11_OFFSET 0x074
88#define OMAP3_CONTROL_PADCONF_GPMC_D12_OFFSET 0x076
89#define OMAP3_CONTROL_PADCONF_GPMC_D13_OFFSET 0x078
90#define OMAP3_CONTROL_PADCONF_GPMC_D14_OFFSET 0x07a
91#define OMAP3_CONTROL_PADCONF_GPMC_D15_OFFSET 0x07c
92#define OMAP3_CONTROL_PADCONF_GPMC_NCS0_OFFSET 0x07e
93#define OMAP3_CONTROL_PADCONF_GPMC_NCS1_OFFSET 0x080
94#define OMAP3_CONTROL_PADCONF_GPMC_NCS2_OFFSET 0x082
95#define OMAP3_CONTROL_PADCONF_GPMC_NCS3_OFFSET 0x084
96#define OMAP3_CONTROL_PADCONF_GPMC_NCS4_OFFSET 0x086
97#define OMAP3_CONTROL_PADCONF_GPMC_NCS5_OFFSET 0x088
98#define OMAP3_CONTROL_PADCONF_GPMC_NCS6_OFFSET 0x08a
99#define OMAP3_CONTROL_PADCONF_GPMC_NCS7_OFFSET 0x08c
100#define OMAP3_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x08e
101#define OMAP3_CONTROL_PADCONF_GPMC_NADV_ALE_OFFSET 0x090
102#define OMAP3_CONTROL_PADCONF_GPMC_NOE_OFFSET 0x092
103#define OMAP3_CONTROL_PADCONF_GPMC_NWE_OFFSET 0x094
104#define OMAP3_CONTROL_PADCONF_GPMC_NBE0_CLE_OFFSET 0x096
105#define OMAP3_CONTROL_PADCONF_GPMC_NBE1_OFFSET 0x098
106#define OMAP3_CONTROL_PADCONF_GPMC_NWP_OFFSET 0x09a
107#define OMAP3_CONTROL_PADCONF_GPMC_WAIT0_OFFSET 0x09c
108#define OMAP3_CONTROL_PADCONF_GPMC_WAIT1_OFFSET 0x09e
109#define OMAP3_CONTROL_PADCONF_GPMC_WAIT2_OFFSET 0x0a0
110#define OMAP3_CONTROL_PADCONF_GPMC_WAIT3_OFFSET 0x0a2
111#define OMAP3_CONTROL_PADCONF_DSS_PCLK_OFFSET 0x0a4
112#define OMAP3_CONTROL_PADCONF_DSS_HSYNC_OFFSET 0x0a6
113#define OMAP3_CONTROL_PADCONF_DSS_VSYNC_OFFSET 0x0a8
114#define OMAP3_CONTROL_PADCONF_DSS_ACBIAS_OFFSET 0x0aa
115#define OMAP3_CONTROL_PADCONF_DSS_DATA0_OFFSET 0x0ac
116#define OMAP3_CONTROL_PADCONF_DSS_DATA1_OFFSET 0x0ae
117#define OMAP3_CONTROL_PADCONF_DSS_DATA2_OFFSET 0x0b0
118#define OMAP3_CONTROL_PADCONF_DSS_DATA3_OFFSET 0x0b2
119#define OMAP3_CONTROL_PADCONF_DSS_DATA4_OFFSET 0x0b4
120#define OMAP3_CONTROL_PADCONF_DSS_DATA5_OFFSET 0x0b6
121#define OMAP3_CONTROL_PADCONF_DSS_DATA6_OFFSET 0x0b8
122#define OMAP3_CONTROL_PADCONF_DSS_DATA7_OFFSET 0x0ba
123#define OMAP3_CONTROL_PADCONF_DSS_DATA8_OFFSET 0x0bc
124#define OMAP3_CONTROL_PADCONF_DSS_DATA9_OFFSET 0x0be
125#define OMAP3_CONTROL_PADCONF_DSS_DATA10_OFFSET 0x0c0
126#define OMAP3_CONTROL_PADCONF_DSS_DATA11_OFFSET 0x0c2
127#define OMAP3_CONTROL_PADCONF_DSS_DATA12_OFFSET 0x0c4
128#define OMAP3_CONTROL_PADCONF_DSS_DATA13_OFFSET 0x0c6
129#define OMAP3_CONTROL_PADCONF_DSS_DATA14_OFFSET 0x0c8
130#define OMAP3_CONTROL_PADCONF_DSS_DATA15_OFFSET 0x0ca
131#define OMAP3_CONTROL_PADCONF_DSS_DATA16_OFFSET 0x0cc
132#define OMAP3_CONTROL_PADCONF_DSS_DATA17_OFFSET 0x0ce
133#define OMAP3_CONTROL_PADCONF_DSS_DATA18_OFFSET 0x0d0
134#define OMAP3_CONTROL_PADCONF_DSS_DATA19_OFFSET 0x0d2
135#define OMAP3_CONTROL_PADCONF_DSS_DATA20_OFFSET 0x0d4
136#define OMAP3_CONTROL_PADCONF_DSS_DATA21_OFFSET 0x0d6
137#define OMAP3_CONTROL_PADCONF_DSS_DATA22_OFFSET 0x0d8
138#define OMAP3_CONTROL_PADCONF_DSS_DATA23_OFFSET 0x0da
139#define OMAP3_CONTROL_PADCONF_CAM_HS_OFFSET 0x0dc
140#define OMAP3_CONTROL_PADCONF_CAM_VS_OFFSET 0x0de
141#define OMAP3_CONTROL_PADCONF_CAM_XCLKA_OFFSET 0x0e0
142#define OMAP3_CONTROL_PADCONF_CAM_PCLK_OFFSET 0x0e2
143#define OMAP3_CONTROL_PADCONF_CAM_FLD_OFFSET 0x0e4
144#define OMAP3_CONTROL_PADCONF_CAM_D0_OFFSET 0x0e6
145#define OMAP3_CONTROL_PADCONF_CAM_D1_OFFSET 0x0e8
146#define OMAP3_CONTROL_PADCONF_CAM_D2_OFFSET 0x0ea
147#define OMAP3_CONTROL_PADCONF_CAM_D3_OFFSET 0x0ec
148#define OMAP3_CONTROL_PADCONF_CAM_D4_OFFSET 0x0ee
149#define OMAP3_CONTROL_PADCONF_CAM_D5_OFFSET 0x0f0
150#define OMAP3_CONTROL_PADCONF_CAM_D6_OFFSET 0x0f2
151#define OMAP3_CONTROL_PADCONF_CAM_D7_OFFSET 0x0f4
152#define OMAP3_CONTROL_PADCONF_CAM_D8_OFFSET 0x0f6
153#define OMAP3_CONTROL_PADCONF_CAM_D9_OFFSET 0x0f8
154#define OMAP3_CONTROL_PADCONF_CAM_D10_OFFSET 0x0fa
155#define OMAP3_CONTROL_PADCONF_CAM_D11_OFFSET 0x0fc
156#define OMAP3_CONTROL_PADCONF_CAM_XCLKB_OFFSET 0x0fe
157#define OMAP3_CONTROL_PADCONF_CAM_WEN_OFFSET 0x100
158#define OMAP3_CONTROL_PADCONF_CAM_STROBE_OFFSET 0x102
159#define OMAP3_CONTROL_PADCONF_CSI2_DX0_OFFSET 0x104
160#define OMAP3_CONTROL_PADCONF_CSI2_DY0_OFFSET 0x106
161#define OMAP3_CONTROL_PADCONF_CSI2_DX1_OFFSET 0x108
162#define OMAP3_CONTROL_PADCONF_CSI2_DY1_OFFSET 0x10a
163#define OMAP3_CONTROL_PADCONF_MCBSP2_FSX_OFFSET 0x10c
164#define OMAP3_CONTROL_PADCONF_MCBSP2_CLKX_OFFSET 0x10e
165#define OMAP3_CONTROL_PADCONF_MCBSP2_DR_OFFSET 0x110
166#define OMAP3_CONTROL_PADCONF_MCBSP2_DX_OFFSET 0x112
167#define OMAP3_CONTROL_PADCONF_SDMMC1_CLK_OFFSET 0x114
168#define OMAP3_CONTROL_PADCONF_SDMMC1_CMD_OFFSET 0x116
169#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT0_OFFSET 0x118
170#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT1_OFFSET 0x11a
171#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT2_OFFSET 0x11c
172#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT3_OFFSET 0x11e
173
174/* SDMMC1_DAT4 - DAT7 are SIM_IO SIM_CLK SIM_PWRCTRL and SIM_RST on 36xx */
175#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT4_OFFSET 0x120
176#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT5_OFFSET 0x122
177#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT6_OFFSET 0x124
178#define OMAP3_CONTROL_PADCONF_SDMMC1_DAT7_OFFSET 0x126
179
180#define OMAP3_CONTROL_PADCONF_SDMMC2_CLK_OFFSET 0x128
181#define OMAP3_CONTROL_PADCONF_SDMMC2_CMD_OFFSET 0x12a
182#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT0_OFFSET 0x12c
183#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT1_OFFSET 0x12e
184#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT2_OFFSET 0x130
185#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT3_OFFSET 0x132
186#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT4_OFFSET 0x134
187#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT5_OFFSET 0x136
188#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT6_OFFSET 0x138
189#define OMAP3_CONTROL_PADCONF_SDMMC2_DAT7_OFFSET 0x13a
190#define OMAP3_CONTROL_PADCONF_MCBSP3_DX_OFFSET 0x13c
191#define OMAP3_CONTROL_PADCONF_MCBSP3_DR_OFFSET 0x13e
192#define OMAP3_CONTROL_PADCONF_MCBSP3_CLKX_OFFSET 0x140
193#define OMAP3_CONTROL_PADCONF_MCBSP3_FSX_OFFSET 0x142
194#define OMAP3_CONTROL_PADCONF_UART2_CTS_OFFSET 0x144
195#define OMAP3_CONTROL_PADCONF_UART2_RTS_OFFSET 0x146
196#define OMAP3_CONTROL_PADCONF_UART2_TX_OFFSET 0x148
197#define OMAP3_CONTROL_PADCONF_UART2_RX_OFFSET 0x14a
198#define OMAP3_CONTROL_PADCONF_UART1_TX_OFFSET 0x14c
199#define OMAP3_CONTROL_PADCONF_UART1_RTS_OFFSET 0x14e
200#define OMAP3_CONTROL_PADCONF_UART1_CTS_OFFSET 0x150
201#define OMAP3_CONTROL_PADCONF_UART1_RX_OFFSET 0x152
202#define OMAP3_CONTROL_PADCONF_MCBSP4_CLKX_OFFSET 0x154
203#define OMAP3_CONTROL_PADCONF_MCBSP4_DR_OFFSET 0x156
204#define OMAP3_CONTROL_PADCONF_MCBSP4_DX_OFFSET 0x158
205#define OMAP3_CONTROL_PADCONF_MCBSP4_FSX_OFFSET 0x15a
206#define OMAP3_CONTROL_PADCONF_MCBSP1_CLKR_OFFSET 0x15c
207#define OMAP3_CONTROL_PADCONF_MCBSP1_FSR_OFFSET 0x15e
208#define OMAP3_CONTROL_PADCONF_MCBSP1_DX_OFFSET 0x160
209#define OMAP3_CONTROL_PADCONF_MCBSP1_DR_OFFSET 0x162
210#define OMAP3_CONTROL_PADCONF_MCBSP_CLKS_OFFSET 0x164
211#define OMAP3_CONTROL_PADCONF_MCBSP1_FSX_OFFSET 0x166
212#define OMAP3_CONTROL_PADCONF_MCBSP1_CLKX_OFFSET 0x168
213#define OMAP3_CONTROL_PADCONF_UART3_CTS_RCTX_OFFSET 0x16a
214#define OMAP3_CONTROL_PADCONF_UART3_RTS_SD_OFFSET 0x16c
215#define OMAP3_CONTROL_PADCONF_UART3_RX_IRRX_OFFSET 0x16e
216#define OMAP3_CONTROL_PADCONF_UART3_TX_IRTX_OFFSET 0x170
217#define OMAP3_CONTROL_PADCONF_HSUSB0_CLK_OFFSET 0x172
218#define OMAP3_CONTROL_PADCONF_HSUSB0_STP_OFFSET 0x174
219#define OMAP3_CONTROL_PADCONF_HSUSB0_DIR_OFFSET 0x176
220#define OMAP3_CONTROL_PADCONF_HSUSB0_NXT_OFFSET 0x178
221#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA0_OFFSET 0x17a
222#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA1_OFFSET 0x17c
223#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA2_OFFSET 0x17e
224#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA3_OFFSET 0x180
225#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA4_OFFSET 0x182
226#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA5_OFFSET 0x184
227#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA6_OFFSET 0x186
228#define OMAP3_CONTROL_PADCONF_HSUSB0_DATA7_OFFSET 0x188
229#define OMAP3_CONTROL_PADCONF_I2C1_SCL_OFFSET 0x18a
230#define OMAP3_CONTROL_PADCONF_I2C1_SDA_OFFSET 0x18c
231#define OMAP3_CONTROL_PADCONF_I2C2_SCL_OFFSET 0x18e
232#define OMAP3_CONTROL_PADCONF_I2C2_SDA_OFFSET 0x190
233#define OMAP3_CONTROL_PADCONF_I2C3_SCL_OFFSET 0x192
234#define OMAP3_CONTROL_PADCONF_I2C3_SDA_OFFSET 0x194
235#define OMAP3_CONTROL_PADCONF_HDQ_SIO_OFFSET 0x196
236#define OMAP3_CONTROL_PADCONF_MCSPI1_CLK_OFFSET 0x198
237#define OMAP3_CONTROL_PADCONF_MCSPI1_SIMO_OFFSET 0x19a
238#define OMAP3_CONTROL_PADCONF_MCSPI1_SOMI_OFFSET 0x19c
239#define OMAP3_CONTROL_PADCONF_MCSPI1_CS0_OFFSET 0x19e
240#define OMAP3_CONTROL_PADCONF_MCSPI1_CS1_OFFSET 0x1a0
241#define OMAP3_CONTROL_PADCONF_MCSPI1_CS2_OFFSET 0x1a2
242#define OMAP3_CONTROL_PADCONF_MCSPI1_CS3_OFFSET 0x1a4
243#define OMAP3_CONTROL_PADCONF_MCSPI2_CLK_OFFSET 0x1a6
244#define OMAP3_CONTROL_PADCONF_MCSPI2_SIMO_OFFSET 0x1a8
245#define OMAP3_CONTROL_PADCONF_MCSPI2_SOMI_OFFSET 0x1aa
246#define OMAP3_CONTROL_PADCONF_MCSPI2_CS0_OFFSET 0x1ac
247#define OMAP3_CONTROL_PADCONF_MCSPI2_CS1_OFFSET 0x1ae
248#define OMAP3_CONTROL_PADCONF_SYS_NIRQ_OFFSET 0x1b0
249#define OMAP3_CONTROL_PADCONF_SYS_CLKOUT2_OFFSET 0x1b2
250#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD0_OFFSET 0x1b4
251#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD1_OFFSET 0x1b6
252#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD2_OFFSET 0x1b8
253#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD3_OFFSET 0x1ba
254#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD4_OFFSET 0x1bc
255#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD5_OFFSET 0x1be
256#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD6_OFFSET 0x1c0
257#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD7_OFFSET 0x1c2
258#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD8_OFFSET 0x1c4
259#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD9_OFFSET 0x1c6
260#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD10_OFFSET 0x1c8
261#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD11_OFFSET 0x1ca
262#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD12_OFFSET 0x1cc
263#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD13_OFFSET 0x1ce
264#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD14_OFFSET 0x1d0
265#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD15_OFFSET 0x1d2
266#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD16_OFFSET 0x1d4
267#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD17_OFFSET 0x1d6
268#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD18_OFFSET 0x1d8
269#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD19_OFFSET 0x1da
270#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD20_OFFSET 0x1dc
271#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD21_OFFSET 0x1de
272#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD22_OFFSET 0x1e0
273#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD23_OFFSET 0x1e2
274#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD24_OFFSET 0x1e4
275#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD25_OFFSET 0x1e6
276#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD26_OFFSET 0x1e8
277#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD27_OFFSET 0x1ea
278#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD28_OFFSET 0x1ec
279#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD29_OFFSET 0x1ee
280#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD30_OFFSET 0x1f0
281#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD31_OFFSET 0x1f2
282#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD32_OFFSET 0x1f4
283#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD33_OFFSET 0x1f6
284#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD34_OFFSET 0x1f8
285#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD35_OFFSET 0x1fa
286#define OMAP3_CONTROL_PADCONF_SAD2D_MCAD36_OFFSET 0x1fc
287
288/* Note that 34xx TRM has SAD2D instead of CHASSIS for these */
289#define OMAP3_CONTROL_PADCONF_CHASSIS_CLK26MI_OFFSET 0x1fe
290#define OMAP3_CONTROL_PADCONF_CHASSIS_NRESPWRON_OFFSET 0x200
291#define OMAP3_CONTROL_PADCONF_CHASSIS_NRESWARW_OFFSET 0x202
292#define OMAP3_CONTROL_PADCONF_CHASSIS_NIRQ_OFFSET 0x204
293#define OMAP3_CONTROL_PADCONF_CHASSIS_FIQ_OFFSET 0x206
294#define OMAP3_CONTROL_PADCONF_CHASSIS_ARMIRQ_OFFSET 0x208
295#define OMAP3_CONTROL_PADCONF_CHASSIS_IVAIRQ_OFFSET 0x20a
296#define OMAP3_CONTROL_PADCONF_CHASSIS_DMAREQ0_OFFSET 0x20c
297#define OMAP3_CONTROL_PADCONF_CHASSIS_DMAREQ1_OFFSET 0x20e
298#define OMAP3_CONTROL_PADCONF_CHASSIS_DMAREQ2_OFFSET 0x210
299#define OMAP3_CONTROL_PADCONF_CHASSIS_DMAREQ3_OFFSET 0x212
300#define OMAP3_CONTROL_PADCONF_CHASSIS_NTRST_OFFSET 0x214
301#define OMAP3_CONTROL_PADCONF_CHASSIS_TDI_OFFSET 0x216
302#define OMAP3_CONTROL_PADCONF_CHASSIS_TDO_OFFSET 0x218
303#define OMAP3_CONTROL_PADCONF_CHASSIS_TMS_OFFSET 0x21a
304#define OMAP3_CONTROL_PADCONF_CHASSIS_TCK_OFFSET 0x21c
305#define OMAP3_CONTROL_PADCONF_CHASSIS_RTCK_OFFSET 0x21e
306#define OMAP3_CONTROL_PADCONF_CHASSIS_MSTDBY_OFFSET 0x220
307#define OMAP3_CONTROL_PADCONF_CHASSIS_IDLEREQ_OFFSET 0x222
308#define OMAP3_CONTROL_PADCONF_CHASSIS_IDLEACK_OFFSET 0x224
309
310#define OMAP3_CONTROL_PADCONF_SAD2D_MWRITE_OFFSET 0x226
311#define OMAP3_CONTROL_PADCONF_SAD2D_SWRITE_OFFSET 0x228
312#define OMAP3_CONTROL_PADCONF_SAD2D_MREAD_OFFSET 0x22a
313#define OMAP3_CONTROL_PADCONF_SAD2D_SREAD_OFFSET 0x22c
314#define OMAP3_CONTROL_PADCONF_SAD2D_MBUSFLAG_OFFSET 0x22e
315#define OMAP3_CONTROL_PADCONF_SAD2D_SBUSFLAG_OFFSET 0x230
316#define OMAP3_CONTROL_PADCONF_SDRC_CKE0_OFFSET 0x232
317#define OMAP3_CONTROL_PADCONF_SDRC_CKE1_OFFSET 0x234
318
319/* 36xx only */
320#define OMAP3_CONTROL_PADCONF_GPMC_A11_OFFSET 0x236
321#define OMAP3_CONTROL_PADCONF_SDRC_BA0_OFFSET 0x570
322#define OMAP3_CONTROL_PADCONF_SDRC_BA1_OFFSET 0x572
323#define OMAP3_CONTROL_PADCONF_SDRC_A0_OFFSET 0x574
324#define OMAP3_CONTROL_PADCONF_SDRC_A1_OFFSET 0x576
325#define OMAP3_CONTROL_PADCONF_SDRC_A2_OFFSET 0x578
326#define OMAP3_CONTROL_PADCONF_SDRC_A3_OFFSET 0x57a
327#define OMAP3_CONTROL_PADCONF_SDRC_A4_OFFSET 0x57c
328#define OMAP3_CONTROL_PADCONF_SDRC_A5_OFFSET 0x57e
329#define OMAP3_CONTROL_PADCONF_SDRC_A6_OFFSET 0x580
330#define OMAP3_CONTROL_PADCONF_SDRC_A7_OFFSET 0x582
331#define OMAP3_CONTROL_PADCONF_SDRC_A8_OFFSET 0x584
332#define OMAP3_CONTROL_PADCONF_SDRC_A9_OFFSET 0x586
333#define OMAP3_CONTROL_PADCONF_SDRC_A10_OFFSET 0x588
334#define OMAP3_CONTROL_PADCONF_SDRC_A11_OFFSET 0x58a
335#define OMAP3_CONTROL_PADCONF_SDRC_A12_OFFSET 0x58c
336#define OMAP3_CONTROL_PADCONF_SDRC_A13_OFFSET 0x58e
337#define OMAP3_CONTROL_PADCONF_SDRC_A14_OFFSET 0x590
338#define OMAP3_CONTROL_PADCONF_SDRC_NCS0_OFFSET 0x592
339#define OMAP3_CONTROL_PADCONF_SDRC_NCS1_OFFSET 0x594
340#define OMAP3_CONTROL_PADCONF_SDRC_NCLK_OFFSET 0x596
341#define OMAP3_CONTROL_PADCONF_SDRC_NRAS_OFFSET 0x598
342#define OMAP3_CONTROL_PADCONF_SDRC_NCAS_OFFSET 0x59a
343#define OMAP3_CONTROL_PADCONF_SDRC_NWE_OFFSET 0x59c
344#define OMAP3_CONTROL_PADCONF_SDRC_DM0_OFFSET 0x59e
345#define OMAP3_CONTROL_PADCONF_SDRC_DM1_OFFSET 0x5a0
346#define OMAP3_CONTROL_PADCONF_SDRC_DM2_OFFSET 0x5a2
347#define OMAP3_CONTROL_PADCONF_SDRC_DM3_OFFSET 0x5a4
348
349/* 36xx only, these are SDMMC1_DAT4 - DAT7 on 34xx */
350#define OMAP3_CONTROL_PADCONF_SIM_IO_OFFSET 0x120
351#define OMAP3_CONTROL_PADCONF_SIM_CLK_OFFSET 0x122
352#define OMAP3_CONTROL_PADCONF_SIM_PWRCTRL_OFFSET 0x124
353#define OMAP3_CONTROL_PADCONF_SIM_RST_OFFSET 0x126
354
355#define OMAP3_CONTROL_PADCONF_ETK_CLK_OFFSET 0x5a8
356#define OMAP3_CONTROL_PADCONF_ETK_CTL_OFFSET 0x5aa
357#define OMAP3_CONTROL_PADCONF_ETK_D0_OFFSET 0x5ac
358#define OMAP3_CONTROL_PADCONF_ETK_D1_OFFSET 0x5ae
359#define OMAP3_CONTROL_PADCONF_ETK_D2_OFFSET 0x5b0
360#define OMAP3_CONTROL_PADCONF_ETK_D3_OFFSET 0x5b2
361#define OMAP3_CONTROL_PADCONF_ETK_D4_OFFSET 0x5b4
362#define OMAP3_CONTROL_PADCONF_ETK_D5_OFFSET 0x5b6
363#define OMAP3_CONTROL_PADCONF_ETK_D6_OFFSET 0x5b8
364#define OMAP3_CONTROL_PADCONF_ETK_D7_OFFSET 0x5ba
365#define OMAP3_CONTROL_PADCONF_ETK_D8_OFFSET 0x5bc
366#define OMAP3_CONTROL_PADCONF_ETK_D9_OFFSET 0x5be
367#define OMAP3_CONTROL_PADCONF_ETK_D10_OFFSET 0x5c0
368#define OMAP3_CONTROL_PADCONF_ETK_D11_OFFSET 0x5c2
369#define OMAP3_CONTROL_PADCONF_ETK_D12_OFFSET 0x5c4
370#define OMAP3_CONTROL_PADCONF_ETK_D13_OFFSET 0x5c6
371#define OMAP3_CONTROL_PADCONF_ETK_D14_OFFSET 0x5c8
372#define OMAP3_CONTROL_PADCONF_ETK_D15_OFFSET 0x5ca
373#define OMAP3_CONTROL_PADCONF_I2C4_SCL_OFFSET 0x9d0
374#define OMAP3_CONTROL_PADCONF_I2C4_SDA_OFFSET 0x9d2
375#define OMAP3_CONTROL_PADCONF_SYS_32K_OFFSET 0x9d4
376#define OMAP3_CONTROL_PADCONF_SYS_CLKREQ_OFFSET 0x9d6
377#define OMAP3_CONTROL_PADCONF_SYS_NRESWARM_OFFSET 0x9d8
378#define OMAP3_CONTROL_PADCONF_SYS_BOOT0_OFFSET 0x9da
379#define OMAP3_CONTROL_PADCONF_SYS_BOOT1_OFFSET 0x9dc
380#define OMAP3_CONTROL_PADCONF_SYS_BOOT2_OFFSET 0x9de
381#define OMAP3_CONTROL_PADCONF_SYS_BOOT3_OFFSET 0x9e0
382#define OMAP3_CONTROL_PADCONF_SYS_BOOT4_OFFSET 0x9e2
383#define OMAP3_CONTROL_PADCONF_SYS_BOOT5_OFFSET 0x9e4
384#define OMAP3_CONTROL_PADCONF_SYS_BOOT6_OFFSET 0x9e6
385#define OMAP3_CONTROL_PADCONF_SYS_OFF_MODE_OFFSET 0x9e8
386#define OMAP3_CONTROL_PADCONF_SYS_CLKOUT1_OFFSET 0x9ea
387#define OMAP3_CONTROL_PADCONF_JTAG_NTRST_OFFSET 0x9ec
388#define OMAP3_CONTROL_PADCONF_JTAG_TCK_OFFSET 0x9ee
389#define OMAP3_CONTROL_PADCONF_JTAG_TMS_TMSC_OFFSET 0x9f0
390#define OMAP3_CONTROL_PADCONF_JTAG_TDI_OFFSET 0x9f2
391#define OMAP3_CONTROL_PADCONF_JTAG_EMU0_OFFSET 0x9f4
392#define OMAP3_CONTROL_PADCONF_JTAG_EMU1_OFFSET 0x9f6
393#define OMAP3_CONTROL_PADCONF_SAD2D_SWAKEUP_OFFSET 0xa1c
394#define OMAP3_CONTROL_PADCONF_JTAG_RTCK_OFFSET 0xa1e
395#define OMAP3_CONTROL_PADCONF_JTAG_TDO_OFFSET 0xa20
396
397#define OMAP3_CONTROL_PADCONF_MUX_SIZE \
398 (OMAP3_CONTROL_PADCONF_JTAG_TDO_OFFSET + 0x2)
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
index 4afadba09477..aa3f65c2ac97 100644
--- a/arch/arm/mach-omap2/omap-headsmp.S
+++ b/arch/arm/mach-omap2/omap-headsmp.S
@@ -27,20 +27,39 @@
27 * OMAP4 specific entry point for secondary CPU to jump from ROM 27 * OMAP4 specific entry point for secondary CPU to jump from ROM
28 * code. This routine also provides a holding flag into which 28 * code. This routine also provides a holding flag into which
29 * secondary core is held until we're ready for it to initialise. 29 * secondary core is held until we're ready for it to initialise.
30 * The primary core will update the this flag using a hardware 30 * The primary core will update this flag using a hardware
31 * register AuxCoreBoot1. 31 * register AuxCoreBoot0.
32 */ 32 */
33ENTRY(omap_secondary_startup) 33ENTRY(omap_secondary_startup)
34 mrc p15, 0, r0, c0, c0, 5 34hold: ldr r12,=0x103
35 and r0, r0, #0x0f 35 dsb
36hold: ldr r1, =OMAP4_AUX_CORE_BOOT1_PA @ read from AuxCoreBoot1 36 smc @ read from AuxCoreBoot0
37 ldr r2, [r1] 37 mov r0, r0, lsr #9
38 cmp r2, r0 38 mrc p15, 0, r4, c0, c0, 5
39 and r4, r4, #0x0f
40 cmp r0, r4
39 bne hold 41 bne hold
40 42
41 /* 43 /*
42 * we've been released from the cpu_release,secondary_stack 44 * we've been released from the wait loop,secondary_stack
43 * should now contain the SVC stack for this core 45 * should now contain the SVC stack for this core
44 */ 46 */
45 b secondary_startup 47 b secondary_startup
48END(omap_secondary_startup)
46 49
50
51ENTRY(omap_modify_auxcoreboot0)
52 stmfd sp!, {r1-r12, lr}
53 ldr r12, =0x104
54 dsb
55 smc
56 ldmfd sp!, {r1-r12, pc}
57END(omap_modify_auxcoreboot0)
58
59ENTRY(omap_auxcoreboot_addr)
60 stmfd sp!, {r2-r12, lr}
61 ldr r12, =0x105
62 dsb
63 smc
64 ldmfd sp!, {r2-r12, pc}
65END(omap_auxcoreboot_addr)
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 4890bcf4dadd..38153e5fbca0 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -17,19 +17,15 @@
17 */ 17 */
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/jiffies.h>
21#include <linux/smp.h> 20#include <linux/smp.h>
22#include <linux/io.h> 21#include <linux/io.h>
23 22
23#include <asm/cacheflush.h>
24#include <asm/localtimer.h> 24#include <asm/localtimer.h>
25#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
26#include <mach/hardware.h> 26#include <mach/hardware.h>
27#include <plat/common.h> 27#include <plat/common.h>
28 28
29/* Registers used for communicating startup information */
30static void __iomem *omap4_auxcoreboot_reg0;
31static void __iomem *omap4_auxcoreboot_reg1;
32
33/* SCU base address */ 29/* SCU base address */
34static void __iomem *scu_base; 30static void __iomem *scu_base;
35 31
@@ -65,8 +61,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
65 61
66int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) 62int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
67{ 63{
68 unsigned long timeout;
69
70 /* 64 /*
71 * Set synchronisation state between this boot processor 65 * Set synchronisation state between this boot processor
72 * and the secondary one 66 * and the secondary one
@@ -74,18 +68,15 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
74 spin_lock(&boot_lock); 68 spin_lock(&boot_lock);
75 69
76 /* 70 /*
77 * Update the AuxCoreBoot1 with boot state for secondary core. 71 * Update the AuxCoreBoot0 with boot state for secondary core.
78 * omap_secondary_startup() routine will hold the secondary core till 72 * omap_secondary_startup() routine will hold the secondary core till
79 * the AuxCoreBoot1 register is updated with cpu state 73 * the AuxCoreBoot1 register is updated with cpu state
80 * A barrier is added to ensure that write buffer is drained 74 * A barrier is added to ensure that write buffer is drained
81 */ 75 */
82 __raw_writel(cpu, omap4_auxcoreboot_reg1); 76 omap_modify_auxcoreboot0(0x200, 0x0);
77 flush_cache_all();
83 smp_wmb(); 78 smp_wmb();
84 79
85 timeout = jiffies + (1 * HZ);
86 while (time_before(jiffies, timeout))
87 ;
88
89 /* 80 /*
90 * Now the secondary core is starting up let it run its 81 * Now the secondary core is starting up let it run its
91 * calibrations, then wait for it to finish 82 * calibrations, then wait for it to finish
@@ -99,17 +90,18 @@ static void __init wakeup_secondary(void)
99{ 90{
100 /* 91 /*
101 * Write the address of secondary startup routine into the 92 * Write the address of secondary startup routine into the
102 * AuxCoreBoot0 where ROM code will jump and start executing 93 * AuxCoreBoot1 where ROM code will jump and start executing
103 * on secondary core once out of WFE 94 * on secondary core once out of WFE
104 * A barrier is added to ensure that write buffer is drained 95 * A barrier is added to ensure that write buffer is drained
105 */ 96 */
106 __raw_writel(virt_to_phys(omap_secondary_startup), \ 97 omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup));
107 omap4_auxcoreboot_reg0);
108 smp_wmb(); 98 smp_wmb();
109 99
110 /* 100 /*
111 * Send a 'sev' to wake the secondary core from WFE. 101 * Send a 'sev' to wake the secondary core from WFE.
102 * Drain the outstanding writes to memory
112 */ 103 */
104 dsb();
113 set_event(); 105 set_event();
114 mb(); 106 mb();
115} 107}
@@ -136,7 +128,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
136{ 128{
137 unsigned int ncores = get_core_count(); 129 unsigned int ncores = get_core_count();
138 unsigned int cpu = smp_processor_id(); 130 unsigned int cpu = smp_processor_id();
139 void __iomem *omap4_wkupgen_base;
140 int i; 131 int i;
141 132
142 /* sanity check */ 133 /* sanity check */
@@ -168,12 +159,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
168 for (i = 0; i < max_cpus; i++) 159 for (i = 0; i < max_cpus; i++)
169 set_cpu_present(i, true); 160 set_cpu_present(i, true);
170 161
171 /* Never released */
172 omap4_wkupgen_base = ioremap(OMAP44XX_WKUPGEN_BASE, SZ_4K);
173 BUG_ON(!omap4_wkupgen_base);
174 omap4_auxcoreboot_reg0 = omap4_wkupgen_base + 0x800;
175 omap4_auxcoreboot_reg1 = omap4_wkupgen_base + 0x804;
176
177 if (max_cpus > 1) { 162 if (max_cpus > 1) {
178 /* 163 /*
179 * Enable the local timer or broadcast device for the 164 * Enable the local timer or broadcast device for the
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 633b216a8b26..d8c8545875b1 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -45,6 +45,7 @@
45#include <linux/mutex.h> 45#include <linux/mutex.h>
46#include <linux/bootmem.h> 46#include <linux/bootmem.h>
47 47
48#include <plat/common.h>
48#include <plat/cpu.h> 49#include <plat/cpu.h>
49#include <plat/clockdomain.h> 50#include <plat/clockdomain.h>
50#include <plat/powerdomain.h> 51#include <plat/powerdomain.h>
@@ -210,6 +211,32 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v)
210} 211}
211 212
212/** 213/**
214 * _set_module_autoidle: set the OCP_SYSCONFIG AUTOIDLE field in @v
215 * @oh: struct omap_hwmod *
216 * @autoidle: desired AUTOIDLE bitfield value (0 or 1)
217 * @v: pointer to register contents to modify
218 *
219 * Update the module autoidle bit in @v to be @autoidle for the @oh
220 * hwmod. The autoidle bit controls whether the module can gate
221 * internal clocks automatically when it isn't doing anything; the
222 * exact function of this bit varies on a per-module basis. This
223 * function does not write to the hardware. Returns -EINVAL upon
224 * error or 0 upon success.
225 */
226static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
227 u32 *v)
228{
229 if (!oh->sysconfig ||
230 !(oh->sysconfig->sysc_flags & SYSC_HAS_AUTOIDLE))
231 return -EINVAL;
232
233 *v &= ~SYSC_AUTOIDLE_MASK;
234 *v |= autoidle << SYSC_AUTOIDLE_SHIFT;
235
236 return 0;
237}
238
239/**
213 * _enable_wakeup: set OCP_SYSCONFIG.ENAWAKEUP bit in the hardware 240 * _enable_wakeup: set OCP_SYSCONFIG.ENAWAKEUP bit in the hardware
214 * @oh: struct omap_hwmod * 241 * @oh: struct omap_hwmod *
215 * 242 *
@@ -326,6 +353,9 @@ static int _init_main_clk(struct omap_hwmod *oh)
326 ret = -EINVAL; 353 ret = -EINVAL;
327 oh->_clk = c; 354 oh->_clk = c;
328 355
356 WARN(!c->clkdm, "omap_hwmod: %s: missing clockdomain for %s.\n",
357 oh->clkdev_con_id, c->name);
358
329 return ret; 359 return ret;
330} 360}
331 361
@@ -557,8 +587,19 @@ static void _sysc_enable(struct omap_hwmod *oh)
557 _set_master_standbymode(oh, idlemode, &v); 587 _set_master_standbymode(oh, idlemode, &v);
558 } 588 }
559 589
560 /* XXX OCP AUTOIDLE bit? */ 590 if (oh->sysconfig->sysc_flags & SYSC_HAS_AUTOIDLE) {
591 idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ?
592 0 : 1;
593 _set_module_autoidle(oh, idlemode, &v);
594 }
595
596 /* XXX OCP ENAWAKEUP bit? */
561 597
598 /*
599 * XXX The clock framework should handle this, by
600 * calling into this code. But this must wait until the
601 * clock structures are tagged with omap_hwmod entries
602 */
562 if (oh->flags & HWMOD_SET_DEFAULT_CLOCKACT && 603 if (oh->flags & HWMOD_SET_DEFAULT_CLOCKACT &&
563 oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY) 604 oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY)
564 _set_clockactivity(oh, oh->sysconfig->clockact, &v); 605 _set_clockactivity(oh, oh->sysconfig->clockact, &v);
@@ -622,7 +663,8 @@ static void _sysc_shutdown(struct omap_hwmod *oh)
622 if (oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE) 663 if (oh->sysconfig->sysc_flags & SYSC_HAS_MIDLEMODE)
623 _set_master_standbymode(oh, HWMOD_IDLEMODE_FORCE, &v); 664 _set_master_standbymode(oh, HWMOD_IDLEMODE_FORCE, &v);
624 665
625 /* XXX clear OCP AUTOIDLE bit? */ 666 if (oh->sysconfig->sysc_flags & SYSC_HAS_AUTOIDLE)
667 _set_module_autoidle(oh, 1, &v);
626 668
627 _write_sysconfig(v, oh); 669 _write_sysconfig(v, oh);
628} 670}
@@ -736,7 +778,7 @@ static int _wait_target_ready(struct omap_hwmod *oh)
736static int _reset(struct omap_hwmod *oh) 778static int _reset(struct omap_hwmod *oh)
737{ 779{
738 u32 r, v; 780 u32 r, v;
739 int c; 781 int c = 0;
740 782
741 if (!oh->sysconfig || 783 if (!oh->sysconfig ||
742 !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) || 784 !(oh->sysconfig->sysc_flags & SYSC_HAS_SOFTRESET) ||
@@ -758,13 +800,9 @@ static int _reset(struct omap_hwmod *oh)
758 return r; 800 return r;
759 _write_sysconfig(v, oh); 801 _write_sysconfig(v, oh);
760 802
761 c = 0; 803 omap_test_timeout((omap_hwmod_readl(oh, oh->sysconfig->syss_offs) &
762 while (c < MAX_MODULE_RESET_WAIT && 804 SYSS_RESETDONE_MASK),
763 !(omap_hwmod_readl(oh, oh->sysconfig->syss_offs) & 805 MAX_MODULE_RESET_WAIT, c);
764 SYSS_RESETDONE_MASK)) {
765 udelay(1);
766 c++;
767 }
768 806
769 if (c == MAX_MODULE_RESET_WAIT) 807 if (c == MAX_MODULE_RESET_WAIT)
770 WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n", 808 WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
@@ -884,33 +922,6 @@ static int _shutdown(struct omap_hwmod *oh)
884} 922}
885 923
886/** 924/**
887 * _write_clockact_lock - set the module's clockactivity bits
888 * @oh: struct omap_hwmod *
889 * @clockact: CLOCKACTIVITY field bits
890 *
891 * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh
892 * OCP_SYSCONFIG register. Returns -EINVAL if the hwmod is in the
893 * wrong state or returns 0.
894 */
895static int _write_clockact_lock(struct omap_hwmod *oh, u8 clockact)
896{
897 u32 v;
898
899 if (!oh->sysconfig ||
900 !(oh->sysconfig->sysc_flags & SYSC_HAS_CLOCKACTIVITY))
901 return -EINVAL;
902
903 mutex_lock(&omap_hwmod_mutex);
904 v = oh->_sysc_cache;
905 _set_clockactivity(oh, clockact, &v);
906 _write_sysconfig(v, oh);
907 mutex_unlock(&omap_hwmod_mutex);
908
909 return 0;
910}
911
912
913/**
914 * _setup - do initial configuration of omap_hwmod 925 * _setup - do initial configuration of omap_hwmod
915 * @oh: struct omap_hwmod * 926 * @oh: struct omap_hwmod *
916 * 927 *
@@ -948,11 +959,19 @@ static int _setup(struct omap_hwmod *oh)
948 959
949 _enable(oh); 960 _enable(oh);
950 961
951 if (!(oh->flags & HWMOD_INIT_NO_RESET)) 962 if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
952 _reset(oh); 963 /*
953 964 * XXX Do the OCP_SYSCONFIG bits need to be
954 /* XXX OCP AUTOIDLE bit? */ 965 * reprogrammed after a reset? If not, then this can
955 /* XXX OCP ENAWAKEUP bit? */ 966 * be removed. If they do, then probably the
967 * _enable() function should be split to avoid the
968 * rewrite of the OCP_SYSCONFIG register.
969 */
970 if (oh->sysconfig) {
971 _update_sysc_cache(oh);
972 _sysc_enable(oh);
973 }
974 }
956 975
957 if (!(oh->flags & HWMOD_INIT_NO_IDLE)) 976 if (!(oh->flags & HWMOD_INIT_NO_IDLE))
958 _idle(oh); 977 _idle(oh);
@@ -1348,8 +1367,9 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1348 /* For each IRQ, DMA, memory area, fill in array.*/ 1367 /* For each IRQ, DMA, memory area, fill in array.*/
1349 1368
1350 for (i = 0; i < oh->mpu_irqs_cnt; i++) { 1369 for (i = 0; i < oh->mpu_irqs_cnt; i++) {
1351 (res + r)->start = *(oh->mpu_irqs + i); 1370 (res + r)->name = (oh->mpu_irqs + i)->name;
1352 (res + r)->end = *(oh->mpu_irqs + i); 1371 (res + r)->start = (oh->mpu_irqs + i)->irq;
1372 (res + r)->end = (oh->mpu_irqs + i)->irq;
1353 (res + r)->flags = IORESOURCE_IRQ; 1373 (res + r)->flags = IORESOURCE_IRQ;
1354 r++; 1374 r++;
1355 } 1375 }
@@ -1454,62 +1474,6 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
1454} 1474}
1455 1475
1456/** 1476/**
1457 * omap_hwmod_set_clockact_none - set clockactivity test to BOTH
1458 * @oh: struct omap_hwmod *
1459 *
1460 * On some modules, this function can affect the wakeup latency vs.
1461 * power consumption balance. Intended to be called by the
1462 * omap_device layer. Passes along the return value from
1463 * _write_clockact_lock().
1464 */
1465int omap_hwmod_set_clockact_both(struct omap_hwmod *oh)
1466{
1467 return _write_clockact_lock(oh, CLOCKACT_TEST_BOTH);
1468}
1469
1470/**
1471 * omap_hwmod_set_clockact_none - set clockactivity test to MAIN
1472 * @oh: struct omap_hwmod *
1473 *
1474 * On some modules, this function can affect the wakeup latency vs.
1475 * power consumption balance. Intended to be called by the
1476 * omap_device layer. Passes along the return value from
1477 * _write_clockact_lock().
1478 */
1479int omap_hwmod_set_clockact_main(struct omap_hwmod *oh)
1480{
1481 return _write_clockact_lock(oh, CLOCKACT_TEST_MAIN);
1482}
1483
1484/**
1485 * omap_hwmod_set_clockact_none - set clockactivity test to ICLK
1486 * @oh: struct omap_hwmod *
1487 *
1488 * On some modules, this function can affect the wakeup latency vs.
1489 * power consumption balance. Intended to be called by the
1490 * omap_device layer. Passes along the return value from
1491 * _write_clockact_lock().
1492 */
1493int omap_hwmod_set_clockact_iclk(struct omap_hwmod *oh)
1494{
1495 return _write_clockact_lock(oh, CLOCKACT_TEST_ICLK);
1496}
1497
1498/**
1499 * omap_hwmod_set_clockact_none - set clockactivity test to NONE
1500 * @oh: struct omap_hwmod *
1501 *
1502 * On some modules, this function can affect the wakeup latency vs.
1503 * power consumption balance. Intended to be called by the
1504 * omap_device layer. Passes along the return value from
1505 * _write_clockact_lock().
1506 */
1507int omap_hwmod_set_clockact_none(struct omap_hwmod *oh)
1508{
1509 return _write_clockact_lock(oh, CLOCKACT_TEST_NONE);
1510}
1511
1512/**
1513 * omap_hwmod_enable_wakeup - allow device to wake up the system 1477 * omap_hwmod_enable_wakeup - allow device to wake up the system
1514 * @oh: struct omap_hwmod * 1478 * @oh: struct omap_hwmod *
1515 * 1479 *
diff --git a/arch/arm/mach-omap2/opp2420_data.c b/arch/arm/mach-omap2/opp2420_data.c
new file mode 100644
index 000000000000..126a9396b3a8
--- /dev/null
+++ b/arch/arm/mach-omap2/opp2420_data.c
@@ -0,0 +1,126 @@
1/*
2 * opp2420_data.c - old-style "OPP" table for OMAP2420
3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation
6 *
7 * Richard Woodruff <r-woodruff2@ti.com>
8 *
9 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
10 * These configurations are characterized by voltage and speed for clocks.
11 * The device is only validated for certain combinations. One way to express
12 * these combinations is via the 'ratio's' which the clocks operate with
13 * respect to each other. These ratio sets are for a given voltage/DPLL
14 * setting. All configurations can be described by a DPLL setting and a ratio
15 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
16 *
17 * 2430 differs from 2420 in that there are no more phase synchronizers used.
18 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
19 * 2430 (iva2.1, NOdsp, mdm)
20 *
21 * XXX Missing voltage data.
22 *
23 * THe format described in this file is deprecated. Once a reasonable
24 * OPP API exists, the data in this file should be converted to use it.
25 *
26 * This is technically part of the OMAP2xxx clock code.
27 */
28
29#include "opp2xxx.h"
30#include "sdrc.h"
31#include "clock.h"
32
33/*-------------------------------------------------------------------------
34 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
35 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
36 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
37 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
38 *
39 * Filling in table based on H4 boards and 2430-SDPs variants available.
40 * There are quite a few more rates combinations which could be defined.
41 *
42 * When multiple values are defined the start up will try and choose the
43 * fastest one. If a 'fast' value is defined, then automatically, the /2
44 * one should be included as it can be used. Generally having more that
45 * one fast set does not make sense, as static timings need to be changed
46 * to change the set. The exception is the bypass setting which is
47 * availble for low power bypass.
48 *
49 * Note: This table needs to be sorted, fastest to slowest.
50 *-------------------------------------------------------------------------*/
51const struct prcm_config omap2420_rate_table[] = {
52 /* PRCM I - FAST */
53 {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
54 RI_CM_CLKSEL_DSP_VAL, RI_CM_CLKSEL_GFX_VAL,
55 RI_CM_CLKSEL1_CORE_VAL, MI_CM_CLKSEL1_PLL_12_VAL,
56 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_165MHz,
57 RATE_IN_242X},
58
59 /* PRCM II - FAST */
60 {S12M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
61 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
62 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
63 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
64 RATE_IN_242X},
65
66 {S13M, S600M, S300M, RII_CM_CLKSEL_MPU_VAL, /* 300MHz ARM */
67 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
68 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
69 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
70 RATE_IN_242X},
71
72 /* PRCM III - FAST */
73 {S12M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
74 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
75 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
76 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
77 RATE_IN_242X},
78
79 {S13M, S532M, S266M, RIII_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
80 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
81 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
82 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
83 RATE_IN_242X},
84
85 /* PRCM II - SLOW */
86 {S12M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
87 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
88 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_12_VAL,
89 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
90 RATE_IN_242X},
91
92 {S13M, S300M, S150M, RII_CM_CLKSEL_MPU_VAL, /* 150MHz ARM */
93 RII_CM_CLKSEL_DSP_VAL, RII_CM_CLKSEL_GFX_VAL,
94 RII_CM_CLKSEL1_CORE_VAL, MII_CM_CLKSEL1_PLL_13_VAL,
95 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_100MHz,
96 RATE_IN_242X},
97
98 /* PRCM III - SLOW */
99 {S12M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
100 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
101 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_12_VAL,
102 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
103 RATE_IN_242X},
104
105 {S13M, S266M, S133M, RIII_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
106 RIII_CM_CLKSEL_DSP_VAL, RIII_CM_CLKSEL_GFX_VAL,
107 RIII_CM_CLKSEL1_CORE_VAL, MIII_CM_CLKSEL1_PLL_13_VAL,
108 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_133MHz,
109 RATE_IN_242X},
110
111 /* PRCM-VII (boot-bypass) */
112 {S12M, S12M, S12M, RVII_CM_CLKSEL_MPU_VAL, /* 12MHz ARM*/
113 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
114 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_12_VAL,
115 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
116 RATE_IN_242X},
117
118 /* PRCM-VII (boot-bypass) */
119 {S13M, S13M, S13M, RVII_CM_CLKSEL_MPU_VAL, /* 13MHz ARM */
120 RVII_CM_CLKSEL_DSP_VAL, RVII_CM_CLKSEL_GFX_VAL,
121 RVII_CM_CLKSEL1_CORE_VAL, MVII_CM_CLKSEL1_PLL_13_VAL,
122 MX_CLKSEL2_PLL_2x_VAL, 0, SDRC_RFR_CTRL_BYPASS,
123 RATE_IN_242X},
124
125 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
126};
diff --git a/arch/arm/mach-omap2/opp2430_data.c b/arch/arm/mach-omap2/opp2430_data.c
new file mode 100644
index 000000000000..edb81672c844
--- /dev/null
+++ b/arch/arm/mach-omap2/opp2430_data.c
@@ -0,0 +1,133 @@
1/*
2 * opp2420_data.c - old-style "OPP" table for OMAP2420
3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation
6 *
7 * Richard Woodruff <r-woodruff2@ti.com>
8 *
9 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
10 * These configurations are characterized by voltage and speed for clocks.
11 * The device is only validated for certain combinations. One way to express
12 * these combinations is via the 'ratio's' which the clocks operate with
13 * respect to each other. These ratio sets are for a given voltage/DPLL
14 * setting. All configurations can be described by a DPLL setting and a ratio
15 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
16 *
17 * 2430 differs from 2420 in that there are no more phase synchronizers used.
18 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
19 * 2430 (iva2.1, NOdsp, mdm)
20 *
21 * XXX Missing voltage data.
22 *
23 * THe format described in this file is deprecated. Once a reasonable
24 * OPP API exists, the data in this file should be converted to use it.
25 *
26 * This is technically part of the OMAP2xxx clock code.
27 */
28
29#include "opp2xxx.h"
30#include "sdrc.h"
31#include "clock.h"
32
33/*-------------------------------------------------------------------------
34 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
35 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
36 * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
37 * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
38 *
39 * Filling in table based on H4 boards and 2430-SDPs variants available.
40 * There are quite a few more rates combinations which could be defined.
41 *
42 * When multiple values are defined the start up will try and choose the
43 * fastest one. If a 'fast' value is defined, then automatically, the /2
44 * one should be included as it can be used. Generally having more that
45 * one fast set does not make sense, as static timings need to be changed
46 * to change the set. The exception is the bypass setting which is
47 * availble for low power bypass.
48 *
49 * Note: This table needs to be sorted, fastest to slowest.
50 *-------------------------------------------------------------------------*/
51const struct prcm_config omap2430_rate_table[] = {
52 /* PRCM #4 - ratio2 (ES2.1) - FAST */
53 {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
54 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
55 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
56 MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL,
57 SDRC_RFR_CTRL_133MHz,
58 RATE_IN_243X},
59
60 /* PRCM #2 - ratio1 (ES2) - FAST */
61 {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
62 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
63 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
64 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
65 SDRC_RFR_CTRL_165MHz,
66 RATE_IN_243X},
67
68 /* PRCM #5a - ratio1 - FAST */
69 {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */
70 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
71 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
72 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
73 SDRC_RFR_CTRL_133MHz,
74 RATE_IN_243X},
75
76 /* PRCM #5b - ratio1 - FAST */
77 {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
78 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
79 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
80 MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL,
81 SDRC_RFR_CTRL_100MHz,
82 RATE_IN_243X},
83
84 /* PRCM #4 - ratio1 (ES2.1) - SLOW */
85 {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */
86 R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL,
87 R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL,
88 MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL,
89 SDRC_RFR_CTRL_133MHz,
90 RATE_IN_243X},
91
92 /* PRCM #2 - ratio1 (ES2) - SLOW */
93 {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */
94 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
95 R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL,
96 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
97 SDRC_RFR_CTRL_165MHz,
98 RATE_IN_243X},
99
100 /* PRCM #5a - ratio1 - SLOW */
101 {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */
102 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
103 R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL,
104 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
105 SDRC_RFR_CTRL_133MHz,
106 RATE_IN_243X},
107
108 /* PRCM #5b - ratio1 - SLOW*/
109 {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */
110 R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL,
111 R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL,
112 MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL,
113 SDRC_RFR_CTRL_100MHz,
114 RATE_IN_243X},
115
116 /* PRCM-boot/bypass */
117 {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */
118 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
119 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL,
120 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
121 SDRC_RFR_CTRL_BYPASS,
122 RATE_IN_243X},
123
124 /* PRCM-boot/bypass */
125 {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */
126 RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL,
127 RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL,
128 MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL,
129 SDRC_RFR_CTRL_BYPASS,
130 RATE_IN_243X},
131
132 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
133};
diff --git a/arch/arm/mach-omap2/opp2xxx.h b/arch/arm/mach-omap2/opp2xxx.h
new file mode 100644
index 000000000000..ed6df04e2f29
--- /dev/null
+++ b/arch/arm/mach-omap2/opp2xxx.h
@@ -0,0 +1,424 @@
1/*
2 * opp2xxx.h - macros for old-style OMAP2xxx "OPP" definitions
3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation
6 *
7 * Richard Woodruff <r-woodruff2@ti.com>
8 *
9 * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
10 * These configurations are characterized by voltage and speed for clocks.
11 * The device is only validated for certain combinations. One way to express
12 * these combinations is via the 'ratio's' which the clocks operate with
13 * respect to each other. These ratio sets are for a given voltage/DPLL
14 * setting. All configurations can be described by a DPLL setting and a ratio
15 * There are 3 ratio sets for the 2430 and X ratio sets for 2420.
16 *
17 * 2430 differs from 2420 in that there are no more phase synchronizers used.
18 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
19 * 2430 (iva2.1, NOdsp, mdm)
20 *
21 * XXX Missing voltage data.
22 *
23 * THe format described in this file is deprecated. Once a reasonable
24 * OPP API exists, the data in this file should be converted to use it.
25 *
26 * This is technically part of the OMAP2xxx clock code.
27 */
28
29#ifndef __ARCH_ARM_MACH_OMAP2_OPP2XXX_H
30#define __ARCH_ARM_MACH_OMAP2_OPP2XXX_H
31
32/**
33 * struct prcm_config - define clock rates on a per-OPP basis (24xx)
34 *
35 * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
36 * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
37 * CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL CM_CLKSEL2_PLL, CM_CLKSEL_MDM
38 *
39 * This is deprecated. As soon as we have a decent OPP API, we should
40 * move all this stuff to it.
41 */
42struct prcm_config {
43 unsigned long xtal_speed; /* crystal rate */
44 unsigned long dpll_speed; /* dpll: out*xtal*M/(N-1)table_recalc */
45 unsigned long mpu_speed; /* speed of MPU */
46 unsigned long cm_clksel_mpu; /* mpu divider */
47 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
48 unsigned long cm_clksel_gfx; /* gfx dividers */
49 unsigned long cm_clksel1_core; /* major subsystem dividers */
50 unsigned long cm_clksel1_pll; /* m,n */
51 unsigned long cm_clksel2_pll; /* dpllx1 or x2 out */
52 unsigned long cm_clksel_mdm; /* modem dividers 2430 only */
53 unsigned long base_sdrc_rfr; /* base refresh timing for a set */
54 unsigned char flags;
55};
56
57
58/* Core fields for cm_clksel, not ratio governed */
59#define RX_CLKSEL_DSS1 (0x10 << 8)
60#define RX_CLKSEL_DSS2 (0x0 << 13)
61#define RX_CLKSEL_SSI (0x5 << 20)
62
63/*-------------------------------------------------------------------------
64 * Voltage/DPLL ratios
65 *-------------------------------------------------------------------------*/
66
67/* 2430 Ratio's, 2430-Ratio Config 1 */
68#define R1_CLKSEL_L3 (4 << 0)
69#define R1_CLKSEL_L4 (2 << 5)
70#define R1_CLKSEL_USB (4 << 25)
71#define R1_CM_CLKSEL1_CORE_VAL (R1_CLKSEL_USB | RX_CLKSEL_SSI | \
72 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
73 R1_CLKSEL_L4 | R1_CLKSEL_L3)
74#define R1_CLKSEL_MPU (2 << 0)
75#define R1_CM_CLKSEL_MPU_VAL R1_CLKSEL_MPU
76#define R1_CLKSEL_DSP (2 << 0)
77#define R1_CLKSEL_DSP_IF (2 << 5)
78#define R1_CM_CLKSEL_DSP_VAL (R1_CLKSEL_DSP | R1_CLKSEL_DSP_IF)
79#define R1_CLKSEL_GFX (2 << 0)
80#define R1_CM_CLKSEL_GFX_VAL R1_CLKSEL_GFX
81#define R1_CLKSEL_MDM (4 << 0)
82#define R1_CM_CLKSEL_MDM_VAL R1_CLKSEL_MDM
83
84/* 2430-Ratio Config 2 */
85#define R2_CLKSEL_L3 (6 << 0)
86#define R2_CLKSEL_L4 (2 << 5)
87#define R2_CLKSEL_USB (2 << 25)
88#define R2_CM_CLKSEL1_CORE_VAL (R2_CLKSEL_USB | RX_CLKSEL_SSI | \
89 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
90 R2_CLKSEL_L4 | R2_CLKSEL_L3)
91#define R2_CLKSEL_MPU (2 << 0)
92#define R2_CM_CLKSEL_MPU_VAL R2_CLKSEL_MPU
93#define R2_CLKSEL_DSP (2 << 0)
94#define R2_CLKSEL_DSP_IF (3 << 5)
95#define R2_CM_CLKSEL_DSP_VAL (R2_CLKSEL_DSP | R2_CLKSEL_DSP_IF)
96#define R2_CLKSEL_GFX (2 << 0)
97#define R2_CM_CLKSEL_GFX_VAL R2_CLKSEL_GFX
98#define R2_CLKSEL_MDM (6 << 0)
99#define R2_CM_CLKSEL_MDM_VAL R2_CLKSEL_MDM
100
101/* 2430-Ratio Bootm (BYPASS) */
102#define RB_CLKSEL_L3 (1 << 0)
103#define RB_CLKSEL_L4 (1 << 5)
104#define RB_CLKSEL_USB (1 << 25)
105#define RB_CM_CLKSEL1_CORE_VAL (RB_CLKSEL_USB | RX_CLKSEL_SSI | \
106 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
107 RB_CLKSEL_L4 | RB_CLKSEL_L3)
108#define RB_CLKSEL_MPU (1 << 0)
109#define RB_CM_CLKSEL_MPU_VAL RB_CLKSEL_MPU
110#define RB_CLKSEL_DSP (1 << 0)
111#define RB_CLKSEL_DSP_IF (1 << 5)
112#define RB_CM_CLKSEL_DSP_VAL (RB_CLKSEL_DSP | RB_CLKSEL_DSP_IF)
113#define RB_CLKSEL_GFX (1 << 0)
114#define RB_CM_CLKSEL_GFX_VAL RB_CLKSEL_GFX
115#define RB_CLKSEL_MDM (1 << 0)
116#define RB_CM_CLKSEL_MDM_VAL RB_CLKSEL_MDM
117
118/* 2420 Ratio Equivalents */
119#define RXX_CLKSEL_VLYNQ (0x12 << 15)
120#define RXX_CLKSEL_SSI (0x8 << 20)
121
122/* 2420-PRCM III 532MHz core */
123#define RIII_CLKSEL_L3 (4 << 0) /* 133MHz */
124#define RIII_CLKSEL_L4 (2 << 5) /* 66.5MHz */
125#define RIII_CLKSEL_USB (4 << 25) /* 33.25MHz */
126#define RIII_CM_CLKSEL1_CORE_VAL (RIII_CLKSEL_USB | RXX_CLKSEL_SSI | \
127 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
128 RX_CLKSEL_DSS1 | RIII_CLKSEL_L4 | \
129 RIII_CLKSEL_L3)
130#define RIII_CLKSEL_MPU (2 << 0) /* 266MHz */
131#define RIII_CM_CLKSEL_MPU_VAL RIII_CLKSEL_MPU
132#define RIII_CLKSEL_DSP (3 << 0) /* c5x - 177.3MHz */
133#define RIII_CLKSEL_DSP_IF (2 << 5) /* c5x - 88.67MHz */
134#define RIII_SYNC_DSP (1 << 7) /* Enable sync */
135#define RIII_CLKSEL_IVA (6 << 8) /* iva1 - 88.67MHz */
136#define RIII_SYNC_IVA (1 << 13) /* Enable sync */
137#define RIII_CM_CLKSEL_DSP_VAL (RIII_SYNC_IVA | RIII_CLKSEL_IVA | \
138 RIII_SYNC_DSP | RIII_CLKSEL_DSP_IF | \
139 RIII_CLKSEL_DSP)
140#define RIII_CLKSEL_GFX (2 << 0) /* 66.5MHz */
141#define RIII_CM_CLKSEL_GFX_VAL RIII_CLKSEL_GFX
142
143/* 2420-PRCM II 600MHz core */
144#define RII_CLKSEL_L3 (6 << 0) /* 100MHz */
145#define RII_CLKSEL_L4 (2 << 5) /* 50MHz */
146#define RII_CLKSEL_USB (2 << 25) /* 50MHz */
147#define RII_CM_CLKSEL1_CORE_VAL (RII_CLKSEL_USB | RXX_CLKSEL_SSI | \
148 RXX_CLKSEL_VLYNQ | RX_CLKSEL_DSS2 | \
149 RX_CLKSEL_DSS1 | RII_CLKSEL_L4 | \
150 RII_CLKSEL_L3)
151#define RII_CLKSEL_MPU (2 << 0) /* 300MHz */
152#define RII_CM_CLKSEL_MPU_VAL RII_CLKSEL_MPU
153#define RII_CLKSEL_DSP (3 << 0) /* c5x - 200MHz */
154#define RII_CLKSEL_DSP_IF (2 << 5) /* c5x - 100MHz */
155#define RII_SYNC_DSP (0 << 7) /* Bypass sync */
156#define RII_CLKSEL_IVA (3 << 8) /* iva1 - 200MHz */
157#define RII_SYNC_IVA (0 << 13) /* Bypass sync */
158#define RII_CM_CLKSEL_DSP_VAL (RII_SYNC_IVA | RII_CLKSEL_IVA | \
159 RII_SYNC_DSP | RII_CLKSEL_DSP_IF | \
160 RII_CLKSEL_DSP)
161#define RII_CLKSEL_GFX (2 << 0) /* 50MHz */
162#define RII_CM_CLKSEL_GFX_VAL RII_CLKSEL_GFX
163
164/* 2420-PRCM I 660MHz core */
165#define RI_CLKSEL_L3 (4 << 0) /* 165MHz */
166#define RI_CLKSEL_L4 (2 << 5) /* 82.5MHz */
167#define RI_CLKSEL_USB (4 << 25) /* 41.25MHz */
168#define RI_CM_CLKSEL1_CORE_VAL (RI_CLKSEL_USB | \
169 RXX_CLKSEL_SSI | RXX_CLKSEL_VLYNQ | \
170 RX_CLKSEL_DSS2 | RX_CLKSEL_DSS1 | \
171 RI_CLKSEL_L4 | RI_CLKSEL_L3)
172#define RI_CLKSEL_MPU (2 << 0) /* 330MHz */
173#define RI_CM_CLKSEL_MPU_VAL RI_CLKSEL_MPU
174#define RI_CLKSEL_DSP (3 << 0) /* c5x - 220MHz */
175#define RI_CLKSEL_DSP_IF (2 << 5) /* c5x - 110MHz */
176#define RI_SYNC_DSP (1 << 7) /* Activate sync */
177#define RI_CLKSEL_IVA (4 << 8) /* iva1 - 165MHz */
178#define RI_SYNC_IVA (0 << 13) /* Bypass sync */
179#define RI_CM_CLKSEL_DSP_VAL (RI_SYNC_IVA | RI_CLKSEL_IVA | \
180 RI_SYNC_DSP | RI_CLKSEL_DSP_IF | \
181 RI_CLKSEL_DSP)
182#define RI_CLKSEL_GFX (1 << 0) /* 165MHz */
183#define RI_CM_CLKSEL_GFX_VAL RI_CLKSEL_GFX
184
185/* 2420-PRCM VII (boot) */
186#define RVII_CLKSEL_L3 (1 << 0)
187#define RVII_CLKSEL_L4 (1 << 5)
188#define RVII_CLKSEL_DSS1 (1 << 8)
189#define RVII_CLKSEL_DSS2 (0 << 13)
190#define RVII_CLKSEL_VLYNQ (1 << 15)
191#define RVII_CLKSEL_SSI (1 << 20)
192#define RVII_CLKSEL_USB (1 << 25)
193
194#define RVII_CM_CLKSEL1_CORE_VAL (RVII_CLKSEL_USB | RVII_CLKSEL_SSI | \
195 RVII_CLKSEL_VLYNQ | \
196 RVII_CLKSEL_DSS2 | RVII_CLKSEL_DSS1 | \
197 RVII_CLKSEL_L4 | RVII_CLKSEL_L3)
198
199#define RVII_CLKSEL_MPU (1 << 0) /* all divide by 1 */
200#define RVII_CM_CLKSEL_MPU_VAL RVII_CLKSEL_MPU
201
202#define RVII_CLKSEL_DSP (1 << 0)
203#define RVII_CLKSEL_DSP_IF (1 << 5)
204#define RVII_SYNC_DSP (0 << 7)
205#define RVII_CLKSEL_IVA (1 << 8)
206#define RVII_SYNC_IVA (0 << 13)
207#define RVII_CM_CLKSEL_DSP_VAL (RVII_SYNC_IVA | RVII_CLKSEL_IVA | \
208 RVII_SYNC_DSP | RVII_CLKSEL_DSP_IF | \
209 RVII_CLKSEL_DSP)
210
211#define RVII_CLKSEL_GFX (1 << 0)
212#define RVII_CM_CLKSEL_GFX_VAL RVII_CLKSEL_GFX
213
214/*-------------------------------------------------------------------------
215 * 2430 Target modes: Along with each configuration the CPU has several
216 * modes which goes along with them. Modes mainly are the addition of
217 * describe DPLL combinations to go along with a ratio.
218 *-------------------------------------------------------------------------*/
219
220/* Hardware governed */
221#define MX_48M_SRC (0 << 3)
222#define MX_54M_SRC (0 << 5)
223#define MX_APLLS_CLIKIN_12 (3 << 23)
224#define MX_APLLS_CLIKIN_13 (2 << 23)
225#define MX_APLLS_CLIKIN_19_2 (0 << 23)
226
227/*
228 * 2430 - standalone, 2*ref*M/(n+1), M/N is for exactness not relock speed
229 * #5a (ratio1) baseport-target, target DPLL = 266*2 = 532MHz
230 */
231#define M5A_DPLL_MULT_12 (133 << 12)
232#define M5A_DPLL_DIV_12 (5 << 8)
233#define M5A_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
234 M5A_DPLL_DIV_12 | M5A_DPLL_MULT_12 | \
235 MX_APLLS_CLIKIN_12)
236#define M5A_DPLL_MULT_13 (61 << 12)
237#define M5A_DPLL_DIV_13 (2 << 8)
238#define M5A_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
239 M5A_DPLL_DIV_13 | M5A_DPLL_MULT_13 | \
240 MX_APLLS_CLIKIN_13)
241#define M5A_DPLL_MULT_19 (55 << 12)
242#define M5A_DPLL_DIV_19 (3 << 8)
243#define M5A_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
244 M5A_DPLL_DIV_19 | M5A_DPLL_MULT_19 | \
245 MX_APLLS_CLIKIN_19_2)
246/* #5b (ratio1) target DPLL = 200*2 = 400MHz */
247#define M5B_DPLL_MULT_12 (50 << 12)
248#define M5B_DPLL_DIV_12 (2 << 8)
249#define M5B_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
250 M5B_DPLL_DIV_12 | M5B_DPLL_MULT_12 | \
251 MX_APLLS_CLIKIN_12)
252#define M5B_DPLL_MULT_13 (200 << 12)
253#define M5B_DPLL_DIV_13 (12 << 8)
254
255#define M5B_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
256 M5B_DPLL_DIV_13 | M5B_DPLL_MULT_13 | \
257 MX_APLLS_CLIKIN_13)
258#define M5B_DPLL_MULT_19 (125 << 12)
259#define M5B_DPLL_DIV_19 (31 << 8)
260#define M5B_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
261 M5B_DPLL_DIV_19 | M5B_DPLL_MULT_19 | \
262 MX_APLLS_CLIKIN_19_2)
263/*
264 * #4 (ratio2), DPLL = 399*2 = 798MHz, L3=133MHz
265 */
266#define M4_DPLL_MULT_12 (133 << 12)
267#define M4_DPLL_DIV_12 (3 << 8)
268#define M4_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
269 M4_DPLL_DIV_12 | M4_DPLL_MULT_12 | \
270 MX_APLLS_CLIKIN_12)
271
272#define M4_DPLL_MULT_13 (399 << 12)
273#define M4_DPLL_DIV_13 (12 << 8)
274#define M4_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
275 M4_DPLL_DIV_13 | M4_DPLL_MULT_13 | \
276 MX_APLLS_CLIKIN_13)
277
278#define M4_DPLL_MULT_19 (145 << 12)
279#define M4_DPLL_DIV_19 (6 << 8)
280#define M4_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
281 M4_DPLL_DIV_19 | M4_DPLL_MULT_19 | \
282 MX_APLLS_CLIKIN_19_2)
283
284/*
285 * #3 (ratio2) baseport-target, target DPLL = 330*2 = 660MHz
286 */
287#define M3_DPLL_MULT_12 (55 << 12)
288#define M3_DPLL_DIV_12 (1 << 8)
289#define M3_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
290 M3_DPLL_DIV_12 | M3_DPLL_MULT_12 | \
291 MX_APLLS_CLIKIN_12)
292#define M3_DPLL_MULT_13 (76 << 12)
293#define M3_DPLL_DIV_13 (2 << 8)
294#define M3_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
295 M3_DPLL_DIV_13 | M3_DPLL_MULT_13 | \
296 MX_APLLS_CLIKIN_13)
297#define M3_DPLL_MULT_19 (17 << 12)
298#define M3_DPLL_DIV_19 (0 << 8)
299#define M3_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
300 M3_DPLL_DIV_19 | M3_DPLL_MULT_19 | \
301 MX_APLLS_CLIKIN_19_2)
302
303/*
304 * #2 (ratio1) DPLL = 330*2 = 660MHz, L3=165MHz
305 */
306#define M2_DPLL_MULT_12 (55 << 12)
307#define M2_DPLL_DIV_12 (1 << 8)
308#define M2_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
309 M2_DPLL_DIV_12 | M2_DPLL_MULT_12 | \
310 MX_APLLS_CLIKIN_12)
311
312/* Speed changes - Used 658.7MHz instead of 660MHz for LP-Refresh M=76 N=2,
313 * relock time issue */
314/* Core frequency changed from 330/165 to 329/164 MHz*/
315#define M2_DPLL_MULT_13 (76 << 12)
316#define M2_DPLL_DIV_13 (2 << 8)
317#define M2_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
318 M2_DPLL_DIV_13 | M2_DPLL_MULT_13 | \
319 MX_APLLS_CLIKIN_13)
320
321#define M2_DPLL_MULT_19 (17 << 12)
322#define M2_DPLL_DIV_19 (0 << 8)
323#define M2_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
324 M2_DPLL_DIV_19 | M2_DPLL_MULT_19 | \
325 MX_APLLS_CLIKIN_19_2)
326
327/* boot (boot) */
328#define MB_DPLL_MULT (1 << 12)
329#define MB_DPLL_DIV (0 << 8)
330#define MB_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
331 MB_DPLL_DIV | MB_DPLL_MULT | \
332 MX_APLLS_CLIKIN_12)
333
334#define MB_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
335 MB_DPLL_DIV | MB_DPLL_MULT | \
336 MX_APLLS_CLIKIN_13)
337
338#define MB_CM_CLKSEL1_PLL_19_VAL (MX_48M_SRC | MX_54M_SRC | \
339 MB_DPLL_DIV | MB_DPLL_MULT | \
340 MX_APLLS_CLIKIN_19)
341
342/*
343 * 2430 - chassis (sedna)
344 * 165 (ratio1) same as above #2
345 * 150 (ratio1)
346 * 133 (ratio2) same as above #4
347 * 110 (ratio2) same as above #3
348 * 104 (ratio2)
349 * boot (boot)
350 */
351
352/* PRCM I target DPLL = 2*330MHz = 660MHz */
353#define MI_DPLL_MULT_12 (55 << 12)
354#define MI_DPLL_DIV_12 (1 << 8)
355#define MI_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
356 MI_DPLL_DIV_12 | MI_DPLL_MULT_12 | \
357 MX_APLLS_CLIKIN_12)
358
359/*
360 * 2420 Equivalent - mode registers
361 * PRCM II , target DPLL = 2*300MHz = 600MHz
362 */
363#define MII_DPLL_MULT_12 (50 << 12)
364#define MII_DPLL_DIV_12 (1 << 8)
365#define MII_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
366 MII_DPLL_DIV_12 | MII_DPLL_MULT_12 | \
367 MX_APLLS_CLIKIN_12)
368#define MII_DPLL_MULT_13 (300 << 12)
369#define MII_DPLL_DIV_13 (12 << 8)
370#define MII_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
371 MII_DPLL_DIV_13 | MII_DPLL_MULT_13 | \
372 MX_APLLS_CLIKIN_13)
373
374/* PRCM III target DPLL = 2*266 = 532MHz*/
375#define MIII_DPLL_MULT_12 (133 << 12)
376#define MIII_DPLL_DIV_12 (5 << 8)
377#define MIII_CM_CLKSEL1_PLL_12_VAL (MX_48M_SRC | MX_54M_SRC | \
378 MIII_DPLL_DIV_12 | \
379 MIII_DPLL_MULT_12 | MX_APLLS_CLIKIN_12)
380#define MIII_DPLL_MULT_13 (266 << 12)
381#define MIII_DPLL_DIV_13 (12 << 8)
382#define MIII_CM_CLKSEL1_PLL_13_VAL (MX_48M_SRC | MX_54M_SRC | \
383 MIII_DPLL_DIV_13 | \
384 MIII_DPLL_MULT_13 | MX_APLLS_CLIKIN_13)
385
386/* PRCM VII (boot bypass) */
387#define MVII_CM_CLKSEL1_PLL_12_VAL MB_CM_CLKSEL1_PLL_12_VAL
388#define MVII_CM_CLKSEL1_PLL_13_VAL MB_CM_CLKSEL1_PLL_13_VAL
389
390/* High and low operation value */
391#define MX_CLKSEL2_PLL_2x_VAL (2 << 0)
392#define MX_CLKSEL2_PLL_1x_VAL (1 << 0)
393
394/* MPU speed defines */
395#define S12M 12000000
396#define S13M 13000000
397#define S19M 19200000
398#define S26M 26000000
399#define S100M 100000000
400#define S133M 133000000
401#define S150M 150000000
402#define S164M 164000000
403#define S165M 165000000
404#define S199M 199000000
405#define S200M 200000000
406#define S266M 266000000
407#define S300M 300000000
408#define S329M 329000000
409#define S330M 330000000
410#define S399M 399000000
411#define S400M 400000000
412#define S532M 532000000
413#define S600M 600000000
414#define S658M 658000000
415#define S660M 660000000
416#define S798M 798000000
417
418
419extern const struct prcm_config omap2420_rate_table[];
420extern const struct prcm_config omap2430_rate_table[];
421extern const struct prcm_config *rate_table;
422extern const struct prcm_config *curr_prcm_set;
423
424#endif
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 8baa30d2acfb..860b755d2220 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -326,7 +326,7 @@ int pm_dbg_regset_save(int reg_set)
326 return 0; 326 return 0;
327} 327}
328 328
329static const char pwrdm_state_names[][4] = { 329static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = {
330 "OFF", 330 "OFF",
331 "RET", 331 "RET",
332 "INA", 332 "INA",
@@ -381,7 +381,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
381 381
382 seq_printf(s, "%s (%s)", pwrdm->name, 382 seq_printf(s, "%s (%s)", pwrdm->name,
383 pwrdm_state_names[pwrdm->state]); 383 pwrdm_state_names[pwrdm->state]);
384 for (i = 0; i < 4; i++) 384 for (i = 0; i < PWRDM_MAX_PWRSTS; i++)
385 seq_printf(s, ",%s:%d", pwrdm_state_names[i], 385 seq_printf(s, ",%s:%d", pwrdm_state_names[i],
386 pwrdm->state_counter[i]); 386 pwrdm->state_counter[i]);
387 387
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index b6990e377783..26b3f3ee82a3 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -10,9 +10,7 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#ifdef CONFIG_OMAP_DEBUG_POWERDOMAIN 13#undef DEBUG
14# define DEBUG
15#endif
16 14
17#include <linux/kernel.h> 15#include <linux/kernel.h>
18#include <linux/module.h> 16#include <linux/module.h>
@@ -160,7 +158,7 @@ static __init void _pwrdm_setup(struct powerdomain *pwrdm)
160{ 158{
161 int i; 159 int i;
162 160
163 for (i = 0; i < 4; i++) 161 for (i = 0; i < PWRDM_MAX_PWRSTS; i++)
164 pwrdm->state_counter[i] = 0; 162 pwrdm->state_counter[i] = 0;
165 163
166 pwrdm_wait_transition(pwrdm); 164 pwrdm_wait_transition(pwrdm);
@@ -480,7 +478,7 @@ int pwrdm_add_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
480 if (IS_ERR(p)) { 478 if (IS_ERR(p)) {
481 pr_debug("powerdomain: hardware cannot set/clear wake up of " 479 pr_debug("powerdomain: hardware cannot set/clear wake up of "
482 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); 480 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
483 return IS_ERR(p); 481 return PTR_ERR(p);
484 } 482 }
485 483
486 pr_debug("powerdomain: hardware will wake up %s when %s wakes up\n", 484 pr_debug("powerdomain: hardware will wake up %s when %s wakes up\n",
@@ -513,7 +511,7 @@ int pwrdm_del_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
513 if (IS_ERR(p)) { 511 if (IS_ERR(p)) {
514 pr_debug("powerdomain: hardware cannot set/clear wake up of " 512 pr_debug("powerdomain: hardware cannot set/clear wake up of "
515 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); 513 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
516 return IS_ERR(p); 514 return PTR_ERR(p);
517 } 515 }
518 516
519 pr_debug("powerdomain: hardware will no longer wake up %s after %s " 517 pr_debug("powerdomain: hardware will no longer wake up %s after %s "
@@ -550,7 +548,7 @@ int pwrdm_read_wkdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
550 if (IS_ERR(p)) { 548 if (IS_ERR(p)) {
551 pr_debug("powerdomain: hardware cannot set/clear wake up of " 549 pr_debug("powerdomain: hardware cannot set/clear wake up of "
552 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name); 550 "%s when %s wakes up\n", pwrdm1->name, pwrdm2->name);
553 return IS_ERR(p); 551 return PTR_ERR(p);
554 } 552 }
555 553
556 return prm_read_mod_bits_shift(pwrdm1->prcm_offs, PM_WKDEP, 554 return prm_read_mod_bits_shift(pwrdm1->prcm_offs, PM_WKDEP,
@@ -573,10 +571,10 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
573{ 571{
574 struct powerdomain *p; 572 struct powerdomain *p;
575 573
576 if (!pwrdm1) 574 if (!cpu_is_omap34xx())
577 return -EINVAL; 575 return -EINVAL;
578 576
579 if (!cpu_is_omap34xx()) 577 if (!pwrdm1)
580 return -EINVAL; 578 return -EINVAL;
581 579
582 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); 580 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
@@ -584,7 +582,7 @@ int pwrdm_add_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
584 pr_debug("powerdomain: hardware cannot set/clear sleep " 582 pr_debug("powerdomain: hardware cannot set/clear sleep "
585 "dependency affecting %s from %s\n", pwrdm1->name, 583 "dependency affecting %s from %s\n", pwrdm1->name,
586 pwrdm2->name); 584 pwrdm2->name);
587 return IS_ERR(p); 585 return PTR_ERR(p);
588 } 586 }
589 587
590 pr_debug("powerdomain: will prevent %s from sleeping if %s is active\n", 588 pr_debug("powerdomain: will prevent %s from sleeping if %s is active\n",
@@ -612,10 +610,10 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
612{ 610{
613 struct powerdomain *p; 611 struct powerdomain *p;
614 612
615 if (!pwrdm1) 613 if (!cpu_is_omap34xx())
616 return -EINVAL; 614 return -EINVAL;
617 615
618 if (!cpu_is_omap34xx()) 616 if (!pwrdm1)
619 return -EINVAL; 617 return -EINVAL;
620 618
621 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); 619 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
@@ -623,7 +621,7 @@ int pwrdm_del_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
623 pr_debug("powerdomain: hardware cannot set/clear sleep " 621 pr_debug("powerdomain: hardware cannot set/clear sleep "
624 "dependency affecting %s from %s\n", pwrdm1->name, 622 "dependency affecting %s from %s\n", pwrdm1->name,
625 pwrdm2->name); 623 pwrdm2->name);
626 return IS_ERR(p); 624 return PTR_ERR(p);
627 } 625 }
628 626
629 pr_debug("powerdomain: will no longer prevent %s from sleeping if " 627 pr_debug("powerdomain: will no longer prevent %s from sleeping if "
@@ -655,10 +653,10 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
655{ 653{
656 struct powerdomain *p; 654 struct powerdomain *p;
657 655
658 if (!pwrdm1) 656 if (!cpu_is_omap34xx())
659 return -EINVAL; 657 return -EINVAL;
660 658
661 if (!cpu_is_omap34xx()) 659 if (!pwrdm1)
662 return -EINVAL; 660 return -EINVAL;
663 661
664 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs); 662 p = _pwrdm_deps_lookup(pwrdm2, pwrdm1->sleepdep_srcs);
@@ -666,7 +664,7 @@ int pwrdm_read_sleepdep(struct powerdomain *pwrdm1, struct powerdomain *pwrdm2)
666 pr_debug("powerdomain: hardware cannot set/clear sleep " 664 pr_debug("powerdomain: hardware cannot set/clear sleep "
667 "dependency affecting %s from %s\n", pwrdm1->name, 665 "dependency affecting %s from %s\n", pwrdm1->name,
668 pwrdm2->name); 666 pwrdm2->name);
669 return IS_ERR(p); 667 return PTR_ERR(p);
670 } 668 }
671 669
672 return prm_read_mod_bits_shift(pwrdm1->prcm_offs, OMAP3430_CM_SLEEPDEP, 670 return prm_read_mod_bits_shift(pwrdm1->prcm_offs, OMAP3430_CM_SLEEPDEP,
@@ -985,6 +983,9 @@ int pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
985 if (pwrdm->banks < (bank + 1)) 983 if (pwrdm->banks < (bank + 1))
986 return -EEXIST; 984 return -EEXIST;
987 985
986 if (pwrdm->flags & PWRDM_HAS_MPU_QUIRK)
987 bank = 1;
988
988 /* 989 /*
989 * The register bit names below may not correspond to the 990 * The register bit names below may not correspond to the
990 * actual names of the bits in each powerdomain's register, 991 * actual names of the bits in each powerdomain's register,
@@ -1032,6 +1033,9 @@ int pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
1032 if (pwrdm->banks < (bank + 1)) 1033 if (pwrdm->banks < (bank + 1))
1033 return -EEXIST; 1034 return -EEXIST;
1034 1035
1036 if (pwrdm->flags & PWRDM_HAS_MPU_QUIRK)
1037 bank = 1;
1038
1035 /* 1039 /*
1036 * The register bit names below may not correspond to the 1040 * The register bit names below may not correspond to the
1037 * actual names of the bits in each powerdomain's register, 1041 * actual names of the bits in each powerdomain's register,
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h
index fd09b0827df0..588f7e07d0ea 100644
--- a/arch/arm/mach-omap2/powerdomains34xx.h
+++ b/arch/arm/mach-omap2/powerdomains34xx.h
@@ -190,6 +190,7 @@ static struct powerdomain mpu_34xx_pwrdm = {
190 .wkdep_srcs = mpu_34xx_wkdeps, 190 .wkdep_srcs = mpu_34xx_wkdeps,
191 .pwrsts = PWRSTS_OFF_RET_ON, 191 .pwrsts = PWRSTS_OFF_RET_ON,
192 .pwrsts_logic_ret = PWRSTS_OFF_RET, 192 .pwrsts_logic_ret = PWRSTS_OFF_RET,
193 .flags = PWRDM_HAS_MPU_QUIRK,
193 .banks = 1, 194 .banks = 1,
194 .pwrsts_mem_ret = { 195 .pwrsts_mem_ret = {
195 [0] = PWRSTS_OFF_RET, 196 [0] = PWRSTS_OFF_RET,
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index cb1ae84e0925..61ac2a418bd0 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -4,10 +4,12 @@
4/* 4/*
5 * OMAP2/3 PRCM base and module definitions 5 * OMAP2/3 PRCM base and module definitions
6 * 6 *
7 * Copyright (C) 2007-2008 Texas Instruments, Inc. 7 * Copyright (C) 2007-2009 Texas Instruments, Inc.
8 * Copyright (C) 2007-2008 Nokia Corporation 8 * Copyright (C) 2007-2009 Nokia Corporation
9 * 9 *
10 * Written by Paul Walmsley 10 * Written by Paul Walmsley
11 * OMAP4 defines in this file are automatically generated from the OMAP hardware
12 * databases.
11 * 13 *
12 * This program is free software; you can redistribute it and/or modify 14 * 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 15 * it under the terms of the GNU General Public License version 2 as
@@ -49,6 +51,73 @@
49#define OMAP3430_NEON_MOD 0xb00 51#define OMAP3430_NEON_MOD 0xb00
50#define OMAP3430ES2_USBHOST_MOD 0xc00 52#define OMAP3430ES2_USBHOST_MOD 0xc00
51 53
54#define BITS(n_bit) \
55 (((1 << n_bit) - 1) | (1 << n_bit))
56
57#define BITFIELD(l_bit, u_bit) \
58 (BITS(u_bit) & ~((BITS(l_bit)) >> 1))
59
60/* OMAP44XX specific module offsets */
61
62/* CM1 instances */
63
64#define OMAP4430_CM1_OCP_SOCKET_MOD 0x0000
65#define OMAP4430_CM1_CKGEN_MOD 0x0100
66#define OMAP4430_CM1_MPU_MOD 0x0300
67#define OMAP4430_CM1_TESLA_MOD 0x0400
68#define OMAP4430_CM1_ABE_MOD 0x0500
69#define OMAP4430_CM1_RESTORE_MOD 0x0e00
70#define OMAP4430_CM1_INSTR_MOD 0x0f00
71
72/* CM2 instances */
73
74#define OMAP4430_CM2_OCP_SOCKET_MOD 0x0000
75#define OMAP4430_CM2_CKGEN_MOD 0x0100
76#define OMAP4430_CM2_ALWAYS_ON_MOD 0x0600
77#define OMAP4430_CM2_CORE_MOD 0x0700
78#define OMAP4430_CM2_IVAHD_MOD 0x0f00
79#define OMAP4430_CM2_CAM_MOD 0x1000
80#define OMAP4430_CM2_DSS_MOD 0x1100
81#define OMAP4430_CM2_GFX_MOD 0x1200
82#define OMAP4430_CM2_L3INIT_MOD 0x1300
83#define OMAP4430_CM2_L4PER_MOD 0x1400
84#define OMAP4430_CM2_CEFUSE_MOD 0x1600
85#define OMAP4430_CM2_RESTORE_MOD 0x1e00
86#define OMAP4430_CM2_INSTR_MOD 0x1f00
87
88/* PRM instances */
89
90#define OMAP4430_PRM_OCP_SOCKET_MOD 0x0000
91#define OMAP4430_PRM_CKGEN_MOD 0x0100
92#define OMAP4430_PRM_MPU_MOD 0x0300
93#define OMAP4430_PRM_TESLA_MOD 0x0400
94#define OMAP4430_PRM_ABE_MOD 0x0500
95#define OMAP4430_PRM_ALWAYS_ON_MOD 0x0600
96#define OMAP4430_PRM_CORE_MOD 0x0700
97#define OMAP4430_PRM_IVAHD_MOD 0x0f00
98#define OMAP4430_PRM_CAM_MOD 0x1000
99#define OMAP4430_PRM_DSS_MOD 0x1100
100#define OMAP4430_PRM_GFX_MOD 0x1200
101#define OMAP4430_PRM_L3INIT_MOD 0x1300
102#define OMAP4430_PRM_L4PER_MOD 0x1400
103#define OMAP4430_PRM_CEFUSE_MOD 0x1600
104#define OMAP4430_PRM_WKUP_MOD 0x1700
105#define OMAP4430_PRM_WKUP_CM_MOD 0x1800
106#define OMAP4430_PRM_EMU_MOD 0x1900
107#define OMAP4430_PRM_EMU_CM_MOD 0x1a00
108#define OMAP4430_PRM_DEVICE_MOD 0x1b00
109#define OMAP4430_PRM_INSTR_MOD 0x1f00
110
111/* SCRM instances */
112
113#define OMAP4430_SCRM_SCRM_MOD 0x0000
114
115/* CHIRONSS instances */
116
117#define OMAP4430_CHIRONSS_CHIRONSS_OCP_SOCKET_PRCM_MOD 0x0000
118#define OMAP4430_CHIRONSS_CHIRONSS_DEVICE_PRM_MOD 0x0200
119#define OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD 0x0400
120#define OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD 0x0800
52 121
53/* 24XX register bits shared between CM & PRM registers */ 122/* 24XX register bits shared between CM & PRM registers */
54 123
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 029d376198d4..3ea8177ffb25 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -34,6 +34,7 @@
34 34
35static void __iomem *prm_base; 35static void __iomem *prm_base;
36static void __iomem *cm_base; 36static void __iomem *cm_base;
37static void __iomem *cm2_base;
37 38
38#define MAX_MODULE_ENABLE_WAIT 100000 39#define MAX_MODULE_ENABLE_WAIT 100000
39 40
@@ -170,14 +171,12 @@ u32 prm_read_mod_reg(s16 module, u16 idx)
170{ 171{
171 return __omap_prcm_read(prm_base, module, idx); 172 return __omap_prcm_read(prm_base, module, idx);
172} 173}
173EXPORT_SYMBOL(prm_read_mod_reg);
174 174
175/* Write into a register in a PRM module */ 175/* Write into a register in a PRM module */
176void prm_write_mod_reg(u32 val, s16 module, u16 idx) 176void prm_write_mod_reg(u32 val, s16 module, u16 idx)
177{ 177{
178 __omap_prcm_write(val, prm_base, module, idx); 178 __omap_prcm_write(val, prm_base, module, idx);
179} 179}
180EXPORT_SYMBOL(prm_write_mod_reg);
181 180
182/* Read-modify-write a register in a PRM module. Caller must lock */ 181/* Read-modify-write a register in a PRM module. Caller must lock */
183u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx) 182u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
@@ -191,21 +190,18 @@ u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
191 190
192 return v; 191 return v;
193} 192}
194EXPORT_SYMBOL(prm_rmw_mod_reg_bits);
195 193
196/* Read a register in a CM module */ 194/* Read a register in a CM module */
197u32 cm_read_mod_reg(s16 module, u16 idx) 195u32 cm_read_mod_reg(s16 module, u16 idx)
198{ 196{
199 return __omap_prcm_read(cm_base, module, idx); 197 return __omap_prcm_read(cm_base, module, idx);
200} 198}
201EXPORT_SYMBOL(cm_read_mod_reg);
202 199
203/* Write into a register in a CM module */ 200/* Write into a register in a CM module */
204void cm_write_mod_reg(u32 val, s16 module, u16 idx) 201void cm_write_mod_reg(u32 val, s16 module, u16 idx)
205{ 202{
206 __omap_prcm_write(val, cm_base, module, idx); 203 __omap_prcm_write(val, cm_base, module, idx);
207} 204}
208EXPORT_SYMBOL(cm_write_mod_reg);
209 205
210/* Read-modify-write a register in a CM module. Caller must lock */ 206/* Read-modify-write a register in a CM module. Caller must lock */
211u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx) 207u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
@@ -219,7 +215,6 @@ u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx)
219 215
220 return v; 216 return v;
221} 217}
222EXPORT_SYMBOL(cm_rmw_mod_reg_bits);
223 218
224/** 219/**
225 * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness 220 * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
@@ -247,9 +242,8 @@ int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const char *name)
247 BUG(); 242 BUG();
248 243
249 /* Wait for lock */ 244 /* Wait for lock */
250 while (((__raw_readl(reg) & mask) != ena) && 245 omap_test_timeout(((__raw_readl(reg) & mask) == ena),
251 (i++ < MAX_MODULE_ENABLE_WAIT)) 246 MAX_MODULE_ENABLE_WAIT, i);
252 udelay(1);
253 247
254 if (i < MAX_MODULE_ENABLE_WAIT) 248 if (i < MAX_MODULE_ENABLE_WAIT)
255 pr_debug("cm: Module associated with clock %s ready after %d " 249 pr_debug("cm: Module associated with clock %s ready after %d "
@@ -265,6 +259,7 @@ void __init omap2_set_globals_prcm(struct omap_globals *omap2_globals)
265{ 259{
266 prm_base = omap2_globals->prm; 260 prm_base = omap2_globals->prm;
267 cm_base = omap2_globals->cm; 261 cm_base = omap2_globals->cm;
262 cm2_base = omap2_globals->cm2;
268} 263}
269 264
270#ifdef CONFIG_ARCH_OMAP3 265#ifdef CONFIG_ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h
new file mode 100644
index 000000000000..301c810fb269
--- /dev/null
+++ b/arch/arm/mach-omap2/prm-regbits-44xx.h
@@ -0,0 +1,2205 @@
1/*
2 * OMAP44xx Power Management register bits
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H
23#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H
24
25#include "prm.h"
26
27
28/*
29 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
30 * PRM_LDO_SRAM_MPU_SETUP
31 */
32#define OMAP4430_ABBOFF_ACT_EXPORT_SHIFT (1 << 1)
33#define OMAP4430_ABBOFF_ACT_EXPORT_MASK BITFIELD(1, 1)
34
35/*
36 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
37 * PRM_LDO_SRAM_MPU_SETUP
38 */
39#define OMAP4430_ABBOFF_SLEEP_EXPORT_SHIFT (1 << 2)
40#define OMAP4430_ABBOFF_SLEEP_EXPORT_MASK BITFIELD(2, 2)
41
42/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
43#define OMAP4430_ABB_IVA_DONE_EN_SHIFT (1 << 31)
44#define OMAP4430_ABB_IVA_DONE_EN_MASK BITFIELD(31, 31)
45
46/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
47#define OMAP4430_ABB_IVA_DONE_ST_SHIFT (1 << 31)
48#define OMAP4430_ABB_IVA_DONE_ST_MASK BITFIELD(31, 31)
49
50/* Used by PRM_IRQENABLE_MPU_2 */
51#define OMAP4430_ABB_MPU_DONE_EN_SHIFT (1 << 7)
52#define OMAP4430_ABB_MPU_DONE_EN_MASK BITFIELD(7, 7)
53
54/* Used by PRM_IRQSTATUS_MPU_2 */
55#define OMAP4430_ABB_MPU_DONE_ST_SHIFT (1 << 7)
56#define OMAP4430_ABB_MPU_DONE_ST_MASK BITFIELD(7, 7)
57
58/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
59#define OMAP4430_ACTIVE_FBB_SEL_SHIFT (1 << 2)
60#define OMAP4430_ACTIVE_FBB_SEL_MASK BITFIELD(2, 2)
61
62/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
63#define OMAP4430_ACTIVE_RBB_SEL_SHIFT (1 << 1)
64#define OMAP4430_ACTIVE_RBB_SEL_MASK BITFIELD(1, 1)
65
66/* Used by PM_ABE_PWRSTCTRL */
67#define OMAP4430_AESSMEM_ONSTATE_SHIFT (1 << 16)
68#define OMAP4430_AESSMEM_ONSTATE_MASK BITFIELD(16, 17)
69
70/* Used by PM_ABE_PWRSTCTRL */
71#define OMAP4430_AESSMEM_RETSTATE_SHIFT (1 << 8)
72#define OMAP4430_AESSMEM_RETSTATE_MASK BITFIELD(8, 8)
73
74/* Used by PM_ABE_PWRSTST */
75#define OMAP4430_AESSMEM_STATEST_SHIFT (1 << 4)
76#define OMAP4430_AESSMEM_STATEST_MASK BITFIELD(4, 5)
77
78/*
79 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
80 * PRM_LDO_SRAM_MPU_SETUP
81 */
82#define OMAP4430_AIPOFF_SHIFT (1 << 8)
83#define OMAP4430_AIPOFF_MASK BITFIELD(8, 8)
84
85/* Used by PRM_VOLTCTRL */
86#define OMAP4430_AUTO_CTRL_VDD_CORE_L_SHIFT (1 << 0)
87#define OMAP4430_AUTO_CTRL_VDD_CORE_L_MASK BITFIELD(0, 1)
88
89/* Used by PRM_VOLTCTRL */
90#define OMAP4430_AUTO_CTRL_VDD_IVA_L_SHIFT (1 << 4)
91#define OMAP4430_AUTO_CTRL_VDD_IVA_L_MASK BITFIELD(4, 5)
92
93/* Used by PRM_VOLTCTRL */
94#define OMAP4430_AUTO_CTRL_VDD_MPU_L_SHIFT (1 << 2)
95#define OMAP4430_AUTO_CTRL_VDD_MPU_L_MASK BITFIELD(2, 3)
96
97/* Used by PM_CAM_PWRSTCTRL */
98#define OMAP4430_CAM_MEM_ONSTATE_SHIFT (1 << 16)
99#define OMAP4430_CAM_MEM_ONSTATE_MASK BITFIELD(16, 17)
100
101/* Used by PM_CAM_PWRSTST */
102#define OMAP4430_CAM_MEM_STATEST_SHIFT (1 << 4)
103#define OMAP4430_CAM_MEM_STATEST_MASK BITFIELD(4, 5)
104
105/* Used by PRM_CLKREQCTRL */
106#define OMAP4430_CLKREQ_COND_SHIFT (1 << 0)
107#define OMAP4430_CLKREQ_COND_MASK BITFIELD(0, 2)
108
109/* Used by PRM_VC_VAL_SMPS_RA_CMD */
110#define OMAP4430_CMDRA_VDD_CORE_L_SHIFT (1 << 0)
111#define OMAP4430_CMDRA_VDD_CORE_L_MASK BITFIELD(0, 7)
112
113/* Used by PRM_VC_VAL_SMPS_RA_CMD */
114#define OMAP4430_CMDRA_VDD_IVA_L_SHIFT (1 << 8)
115#define OMAP4430_CMDRA_VDD_IVA_L_MASK BITFIELD(8, 15)
116
117/* Used by PRM_VC_VAL_SMPS_RA_CMD */
118#define OMAP4430_CMDRA_VDD_MPU_L_SHIFT (1 << 16)
119#define OMAP4430_CMDRA_VDD_MPU_L_MASK BITFIELD(16, 23)
120
121/* Used by PRM_VC_CFG_CHANNEL */
122#define OMAP4430_CMD_VDD_CORE_L_SHIFT (1 << 4)
123#define OMAP4430_CMD_VDD_CORE_L_MASK BITFIELD(4, 4)
124
125/* Used by PRM_VC_CFG_CHANNEL */
126#define OMAP4430_CMD_VDD_IVA_L_SHIFT (1 << 12)
127#define OMAP4430_CMD_VDD_IVA_L_MASK BITFIELD(12, 12)
128
129/* Used by PRM_VC_CFG_CHANNEL */
130#define OMAP4430_CMD_VDD_MPU_L_SHIFT (1 << 17)
131#define OMAP4430_CMD_VDD_MPU_L_MASK BITFIELD(17, 17)
132
133/* Used by PM_CORE_PWRSTCTRL */
134#define OMAP4430_CORE_OCMRAM_ONSTATE_SHIFT (1 << 18)
135#define OMAP4430_CORE_OCMRAM_ONSTATE_MASK BITFIELD(18, 19)
136
137/* Used by PM_CORE_PWRSTCTRL */
138#define OMAP4430_CORE_OCMRAM_RETSTATE_SHIFT (1 << 9)
139#define OMAP4430_CORE_OCMRAM_RETSTATE_MASK BITFIELD(9, 9)
140
141/* Used by PM_CORE_PWRSTST */
142#define OMAP4430_CORE_OCMRAM_STATEST_SHIFT (1 << 6)
143#define OMAP4430_CORE_OCMRAM_STATEST_MASK BITFIELD(6, 7)
144
145/* Used by PM_CORE_PWRSTCTRL */
146#define OMAP4430_CORE_OTHER_BANK_ONSTATE_SHIFT (1 << 16)
147#define OMAP4430_CORE_OTHER_BANK_ONSTATE_MASK BITFIELD(16, 17)
148
149/* Used by PM_CORE_PWRSTCTRL */
150#define OMAP4430_CORE_OTHER_BANK_RETSTATE_SHIFT (1 << 8)
151#define OMAP4430_CORE_OTHER_BANK_RETSTATE_MASK BITFIELD(8, 8)
152
153/* Used by PM_CORE_PWRSTST */
154#define OMAP4430_CORE_OTHER_BANK_STATEST_SHIFT (1 << 4)
155#define OMAP4430_CORE_OTHER_BANK_STATEST_MASK BITFIELD(4, 5)
156
157/* Used by PRM_VC_VAL_BYPASS */
158#define OMAP4430_DATA_SHIFT (1 << 16)
159#define OMAP4430_DATA_MASK BITFIELD(16, 23)
160
161/* Used by PRM_DEVICE_OFF_CTRL */
162#define OMAP4430_DEVICE_OFF_ENABLE_SHIFT (1 << 0)
163#define OMAP4430_DEVICE_OFF_ENABLE_MASK BITFIELD(0, 0)
164
165/* Used by PRM_VC_CFG_I2C_MODE */
166#define OMAP4430_DFILTEREN_SHIFT (1 << 6)
167#define OMAP4430_DFILTEREN_MASK BITFIELD(6, 6)
168
169/* Used by PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */
170#define OMAP4430_DPLL_ABE_RECAL_EN_SHIFT (1 << 4)
171#define OMAP4430_DPLL_ABE_RECAL_EN_MASK BITFIELD(4, 4)
172
173/* Used by PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */
174#define OMAP4430_DPLL_ABE_RECAL_ST_SHIFT (1 << 4)
175#define OMAP4430_DPLL_ABE_RECAL_ST_MASK BITFIELD(4, 4)
176
177/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
178#define OMAP4430_DPLL_CORE_RECAL_EN_SHIFT (1 << 0)
179#define OMAP4430_DPLL_CORE_RECAL_EN_MASK BITFIELD(0, 0)
180
181/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
182#define OMAP4430_DPLL_CORE_RECAL_ST_SHIFT (1 << 0)
183#define OMAP4430_DPLL_CORE_RECAL_ST_MASK BITFIELD(0, 0)
184
185/* Used by PRM_IRQENABLE_MPU */
186#define OMAP4430_DPLL_DDRPHY_RECAL_EN_SHIFT (1 << 6)
187#define OMAP4430_DPLL_DDRPHY_RECAL_EN_MASK BITFIELD(6, 6)
188
189/* Used by PRM_IRQSTATUS_MPU */
190#define OMAP4430_DPLL_DDRPHY_RECAL_ST_SHIFT (1 << 6)
191#define OMAP4430_DPLL_DDRPHY_RECAL_ST_MASK BITFIELD(6, 6)
192
193/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */
194#define OMAP4430_DPLL_IVA_RECAL_EN_SHIFT (1 << 2)
195#define OMAP4430_DPLL_IVA_RECAL_EN_MASK BITFIELD(2, 2)
196
197/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */
198#define OMAP4430_DPLL_IVA_RECAL_ST_SHIFT (1 << 2)
199#define OMAP4430_DPLL_IVA_RECAL_ST_MASK BITFIELD(2, 2)
200
201/* Used by PRM_IRQENABLE_MPU */
202#define OMAP4430_DPLL_MPU_RECAL_EN_SHIFT (1 << 1)
203#define OMAP4430_DPLL_MPU_RECAL_EN_MASK BITFIELD(1, 1)
204
205/* Used by PRM_IRQSTATUS_MPU */
206#define OMAP4430_DPLL_MPU_RECAL_ST_SHIFT (1 << 1)
207#define OMAP4430_DPLL_MPU_RECAL_ST_MASK BITFIELD(1, 1)
208
209/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
210#define OMAP4430_DPLL_PER_RECAL_EN_SHIFT (1 << 3)
211#define OMAP4430_DPLL_PER_RECAL_EN_MASK BITFIELD(3, 3)
212
213/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
214#define OMAP4430_DPLL_PER_RECAL_ST_SHIFT (1 << 3)
215#define OMAP4430_DPLL_PER_RECAL_ST_MASK BITFIELD(3, 3)
216
217/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
218#define OMAP4430_DPLL_UNIPRO_RECAL_EN_SHIFT (1 << 7)
219#define OMAP4430_DPLL_UNIPRO_RECAL_EN_MASK BITFIELD(7, 7)
220
221/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
222#define OMAP4430_DPLL_UNIPRO_RECAL_ST_SHIFT (1 << 7)
223#define OMAP4430_DPLL_UNIPRO_RECAL_ST_MASK BITFIELD(7, 7)
224
225/* Used by PRM_IRQENABLE_MPU */
226#define OMAP4430_DPLL_USB_RECAL_EN_SHIFT (1 << 5)
227#define OMAP4430_DPLL_USB_RECAL_EN_MASK BITFIELD(5, 5)
228
229/* Used by PRM_IRQSTATUS_MPU */
230#define OMAP4430_DPLL_USB_RECAL_ST_SHIFT (1 << 5)
231#define OMAP4430_DPLL_USB_RECAL_ST_MASK BITFIELD(5, 5)
232
233/* Used by PM_DSS_PWRSTCTRL */
234#define OMAP4430_DSS_MEM_ONSTATE_SHIFT (1 << 16)
235#define OMAP4430_DSS_MEM_ONSTATE_MASK BITFIELD(16, 17)
236
237/* Used by PM_DSS_PWRSTCTRL */
238#define OMAP4430_DSS_MEM_RETSTATE_SHIFT (1 << 8)
239#define OMAP4430_DSS_MEM_RETSTATE_MASK BITFIELD(8, 8)
240
241/* Used by PM_DSS_PWRSTST */
242#define OMAP4430_DSS_MEM_STATEST_SHIFT (1 << 4)
243#define OMAP4430_DSS_MEM_STATEST_MASK BITFIELD(4, 5)
244
245/* Used by PM_CORE_PWRSTCTRL */
246#define OMAP4430_DUCATI_L2RAM_ONSTATE_SHIFT (1 << 20)
247#define OMAP4430_DUCATI_L2RAM_ONSTATE_MASK BITFIELD(20, 21)
248
249/* Used by PM_CORE_PWRSTCTRL */
250#define OMAP4430_DUCATI_L2RAM_RETSTATE_SHIFT (1 << 10)
251#define OMAP4430_DUCATI_L2RAM_RETSTATE_MASK BITFIELD(10, 10)
252
253/* Used by PM_CORE_PWRSTST */
254#define OMAP4430_DUCATI_L2RAM_STATEST_SHIFT (1 << 8)
255#define OMAP4430_DUCATI_L2RAM_STATEST_MASK BITFIELD(8, 9)
256
257/* Used by PM_CORE_PWRSTCTRL */
258#define OMAP4430_DUCATI_UNICACHE_ONSTATE_SHIFT (1 << 22)
259#define OMAP4430_DUCATI_UNICACHE_ONSTATE_MASK BITFIELD(22, 23)
260
261/* Used by PM_CORE_PWRSTCTRL */
262#define OMAP4430_DUCATI_UNICACHE_RETSTATE_SHIFT (1 << 11)
263#define OMAP4430_DUCATI_UNICACHE_RETSTATE_MASK BITFIELD(11, 11)
264
265/* Used by PM_CORE_PWRSTST */
266#define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT (1 << 10)
267#define OMAP4430_DUCATI_UNICACHE_STATEST_MASK BITFIELD(10, 11)
268
269/* Used by RM_MPU_RSTST */
270#define OMAP4430_EMULATION_RST_SHIFT (1 << 0)
271#define OMAP4430_EMULATION_RST_MASK BITFIELD(0, 0)
272
273/* Used by RM_DUCATI_RSTST */
274#define OMAP4430_EMULATION_RST1ST_SHIFT (1 << 3)
275#define OMAP4430_EMULATION_RST1ST_MASK BITFIELD(3, 3)
276
277/* Used by RM_DUCATI_RSTST */
278#define OMAP4430_EMULATION_RST2ST_SHIFT (1 << 4)
279#define OMAP4430_EMULATION_RST2ST_MASK BITFIELD(4, 4)
280
281/* Used by RM_IVAHD_RSTST */
282#define OMAP4430_EMULATION_SEQ1_RST1ST_SHIFT (1 << 3)
283#define OMAP4430_EMULATION_SEQ1_RST1ST_MASK BITFIELD(3, 3)
284
285/* Used by RM_IVAHD_RSTST */
286#define OMAP4430_EMULATION_SEQ2_RST2ST_SHIFT (1 << 4)
287#define OMAP4430_EMULATION_SEQ2_RST2ST_MASK BITFIELD(4, 4)
288
289/* Used by PM_EMU_PWRSTCTRL */
290#define OMAP4430_EMU_BANK_ONSTATE_SHIFT (1 << 16)
291#define OMAP4430_EMU_BANK_ONSTATE_MASK BITFIELD(16, 17)
292
293/* Used by PM_EMU_PWRSTST */
294#define OMAP4430_EMU_BANK_STATEST_SHIFT (1 << 4)
295#define OMAP4430_EMU_BANK_STATEST_MASK BITFIELD(4, 5)
296
297/*
298 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
299 * PRM_LDO_SRAM_MPU_SETUP, PRM_SRAM_WKUP_SETUP
300 */
301#define OMAP4430_ENABLE_RTA_EXPORT_SHIFT (1 << 0)
302#define OMAP4430_ENABLE_RTA_EXPORT_MASK BITFIELD(0, 0)
303
304/*
305 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
306 * PRM_LDO_SRAM_MPU_SETUP
307 */
308#define OMAP4430_ENFUNC1_SHIFT (1 << 3)
309#define OMAP4430_ENFUNC1_MASK BITFIELD(3, 3)
310
311/*
312 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
313 * PRM_LDO_SRAM_MPU_SETUP
314 */
315#define OMAP4430_ENFUNC3_SHIFT (1 << 5)
316#define OMAP4430_ENFUNC3_MASK BITFIELD(5, 5)
317
318/*
319 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
320 * PRM_LDO_SRAM_MPU_SETUP
321 */
322#define OMAP4430_ENFUNC4_SHIFT (1 << 6)
323#define OMAP4430_ENFUNC4_MASK BITFIELD(6, 6)
324
325/*
326 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
327 * PRM_LDO_SRAM_MPU_SETUP
328 */
329#define OMAP4430_ENFUNC5_SHIFT (1 << 7)
330#define OMAP4430_ENFUNC5_MASK BITFIELD(7, 7)
331
332/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
333#define OMAP4430_ERRORGAIN_SHIFT (1 << 16)
334#define OMAP4430_ERRORGAIN_MASK BITFIELD(16, 23)
335
336/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
337#define OMAP4430_ERROROFFSET_SHIFT (1 << 24)
338#define OMAP4430_ERROROFFSET_MASK BITFIELD(24, 31)
339
340/* Used by PRM_RSTST */
341#define OMAP4430_EXTERNAL_WARM_RST_SHIFT (1 << 5)
342#define OMAP4430_EXTERNAL_WARM_RST_MASK BITFIELD(5, 5)
343
344/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
345#define OMAP4430_FORCEUPDATE_SHIFT (1 << 1)
346#define OMAP4430_FORCEUPDATE_MASK BITFIELD(1, 1)
347
348/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */
349#define OMAP4430_FORCEUPDATEWAIT_SHIFT (1 << 8)
350#define OMAP4430_FORCEUPDATEWAIT_MASK BITFIELD(8, 31)
351
352/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_TESLA */
353#define OMAP4430_FORCEWKUP_EN_SHIFT (1 << 10)
354#define OMAP4430_FORCEWKUP_EN_MASK BITFIELD(10, 10)
355
356/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_TESLA */
357#define OMAP4430_FORCEWKUP_ST_SHIFT (1 << 10)
358#define OMAP4430_FORCEWKUP_ST_MASK BITFIELD(10, 10)
359
360/* Used by PM_GFX_PWRSTCTRL */
361#define OMAP4430_GFX_MEM_ONSTATE_SHIFT (1 << 16)
362#define OMAP4430_GFX_MEM_ONSTATE_MASK BITFIELD(16, 17)
363
364/* Used by PM_GFX_PWRSTST */
365#define OMAP4430_GFX_MEM_STATEST_SHIFT (1 << 4)
366#define OMAP4430_GFX_MEM_STATEST_MASK BITFIELD(4, 5)
367
368/* Used by PRM_RSTST */
369#define OMAP4430_GLOBAL_COLD_RST_SHIFT (1 << 0)
370#define OMAP4430_GLOBAL_COLD_RST_MASK BITFIELD(0, 0)
371
372/* Used by PRM_RSTST */
373#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT (1 << 1)
374#define OMAP4430_GLOBAL_WARM_SW_RST_MASK BITFIELD(1, 1)
375
376/* Used by PRM_IO_PMCTRL */
377#define OMAP4430_GLOBAL_WUEN_SHIFT (1 << 16)
378#define OMAP4430_GLOBAL_WUEN_MASK BITFIELD(16, 16)
379
380/* Used by PRM_VC_CFG_I2C_MODE */
381#define OMAP4430_HSMCODE_SHIFT (1 << 0)
382#define OMAP4430_HSMCODE_MASK BITFIELD(0, 2)
383
384/* Used by PRM_VC_CFG_I2C_MODE */
385#define OMAP4430_HSMODEEN_SHIFT (1 << 3)
386#define OMAP4430_HSMODEEN_MASK BITFIELD(3, 3)
387
388/* Used by PRM_VC_CFG_I2C_CLK */
389#define OMAP4430_HSSCLH_SHIFT (1 << 16)
390#define OMAP4430_HSSCLH_MASK BITFIELD(16, 23)
391
392/* Used by PRM_VC_CFG_I2C_CLK */
393#define OMAP4430_HSSCLL_SHIFT (1 << 24)
394#define OMAP4430_HSSCLL_MASK BITFIELD(24, 31)
395
396/* Used by PM_IVAHD_PWRSTCTRL */
397#define OMAP4430_HWA_MEM_ONSTATE_SHIFT (1 << 16)
398#define OMAP4430_HWA_MEM_ONSTATE_MASK BITFIELD(16, 17)
399
400/* Used by PM_IVAHD_PWRSTCTRL */
401#define OMAP4430_HWA_MEM_RETSTATE_SHIFT (1 << 8)
402#define OMAP4430_HWA_MEM_RETSTATE_MASK BITFIELD(8, 8)
403
404/* Used by PM_IVAHD_PWRSTST */
405#define OMAP4430_HWA_MEM_STATEST_SHIFT (1 << 4)
406#define OMAP4430_HWA_MEM_STATEST_MASK BITFIELD(4, 5)
407
408/* Used by RM_MPU_RSTST */
409#define OMAP4430_ICECRUSHER_MPU_RST_SHIFT (1 << 1)
410#define OMAP4430_ICECRUSHER_MPU_RST_MASK BITFIELD(1, 1)
411
412/* Used by RM_DUCATI_RSTST */
413#define OMAP4430_ICECRUSHER_RST1ST_SHIFT (1 << 5)
414#define OMAP4430_ICECRUSHER_RST1ST_MASK BITFIELD(5, 5)
415
416/* Used by RM_DUCATI_RSTST */
417#define OMAP4430_ICECRUSHER_RST2ST_SHIFT (1 << 6)
418#define OMAP4430_ICECRUSHER_RST2ST_MASK BITFIELD(6, 6)
419
420/* Used by RM_IVAHD_RSTST */
421#define OMAP4430_ICECRUSHER_SEQ1_RST1ST_SHIFT (1 << 5)
422#define OMAP4430_ICECRUSHER_SEQ1_RST1ST_MASK BITFIELD(5, 5)
423
424/* Used by RM_IVAHD_RSTST */
425#define OMAP4430_ICECRUSHER_SEQ2_RST2ST_SHIFT (1 << 6)
426#define OMAP4430_ICECRUSHER_SEQ2_RST2ST_MASK BITFIELD(6, 6)
427
428/* Used by PRM_RSTST */
429#define OMAP4430_ICEPICK_RST_SHIFT (1 << 9)
430#define OMAP4430_ICEPICK_RST_MASK BITFIELD(9, 9)
431
432/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
433#define OMAP4430_INITVDD_SHIFT (1 << 2)
434#define OMAP4430_INITVDD_MASK BITFIELD(2, 2)
435
436/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
437#define OMAP4430_INITVOLTAGE_SHIFT (1 << 8)
438#define OMAP4430_INITVOLTAGE_MASK BITFIELD(8, 15)
439
440/*
441 * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST,
442 * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST,
443 * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST
444 */
445#define OMAP4430_INTRANSITION_SHIFT (1 << 20)
446#define OMAP4430_INTRANSITION_MASK BITFIELD(20, 20)
447
448/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
449#define OMAP4430_IO_EN_SHIFT (1 << 9)
450#define OMAP4430_IO_EN_MASK BITFIELD(9, 9)
451
452/* Used by PRM_IO_PMCTRL */
453#define OMAP4430_IO_ON_STATUS_SHIFT (1 << 5)
454#define OMAP4430_IO_ON_STATUS_MASK BITFIELD(5, 5)
455
456/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
457#define OMAP4430_IO_ST_SHIFT (1 << 9)
458#define OMAP4430_IO_ST_MASK BITFIELD(9, 9)
459
460/* Used by PRM_IO_PMCTRL */
461#define OMAP4430_ISOCLK_OVERRIDE_SHIFT (1 << 0)
462#define OMAP4430_ISOCLK_OVERRIDE_MASK BITFIELD(0, 0)
463
464/* Used by PRM_IO_PMCTRL */
465#define OMAP4430_ISOCLK_STATUS_SHIFT (1 << 1)
466#define OMAP4430_ISOCLK_STATUS_MASK BITFIELD(1, 1)
467
468/* Used by PRM_IO_PMCTRL */
469#define OMAP4430_ISOOVR_EXTEND_SHIFT (1 << 4)
470#define OMAP4430_ISOOVR_EXTEND_MASK BITFIELD(4, 4)
471
472/* Used by PRM_IO_COUNT */
473#define OMAP4430_ISO_2_ON_TIME_SHIFT (1 << 0)
474#define OMAP4430_ISO_2_ON_TIME_MASK BITFIELD(0, 7)
475
476/* Used by PM_L3INIT_PWRSTCTRL */
477#define OMAP4430_L3INIT_BANK1_ONSTATE_SHIFT (1 << 16)
478#define OMAP4430_L3INIT_BANK1_ONSTATE_MASK BITFIELD(16, 17)
479
480/* Used by PM_L3INIT_PWRSTCTRL */
481#define OMAP4430_L3INIT_BANK1_RETSTATE_SHIFT (1 << 8)
482#define OMAP4430_L3INIT_BANK1_RETSTATE_MASK BITFIELD(8, 8)
483
484/* Used by PM_L3INIT_PWRSTST */
485#define OMAP4430_L3INIT_BANK1_STATEST_SHIFT (1 << 4)
486#define OMAP4430_L3INIT_BANK1_STATEST_MASK BITFIELD(4, 5)
487
488/*
489 * Used by PM_CORE_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_ABE_PWRSTCTRL,
490 * PM_MPU_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_TESLA_PWRSTCTRL,
491 * PM_IVAHD_PWRSTCTRL
492 */
493#define OMAP4430_LOGICRETSTATE_SHIFT (1 << 2)
494#define OMAP4430_LOGICRETSTATE_MASK BITFIELD(2, 2)
495
496/*
497 * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST,
498 * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST,
499 * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST
500 */
501#define OMAP4430_LOGICSTATEST_SHIFT (1 << 2)
502#define OMAP4430_LOGICSTATEST_MASK BITFIELD(2, 2)
503
504/*
505 * Used by RM_WKUP_GPIO1_CONTEXT, RM_WKUP_KEYBOARD_CONTEXT,
506 * RM_WKUP_L4WKUP_CONTEXT, RM_WKUP_RTC_CONTEXT, RM_WKUP_SARRAM_CONTEXT,
507 * RM_WKUP_SYNCTIMER_CONTEXT, RM_WKUP_TIMER12_CONTEXT, RM_WKUP_TIMER1_CONTEXT,
508 * RM_WKUP_USIM_CONTEXT, RM_WKUP_WDT1_CONTEXT, RM_WKUP_WDT2_CONTEXT,
509 * RM_EMU_DEBUGSS_CONTEXT, RM_D2D_SAD2D_CONTEXT, RM_D2D_SAD2D_FW_CONTEXT,
510 * RM_DUCATI_DUCATI_CONTEXT, RM_L3INSTR_L3_3_CONTEXT,
511 * RM_L3INSTR_L3_INSTR_CONTEXT, RM_L3INSTR_OCP_WP1_CONTEXT,
512 * RM_L3_1_L3_1_CONTEXT, RM_L3_2_L3_2_CONTEXT, RM_L3_2_OCMC_RAM_CONTEXT,
513 * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_SAR_ROM_CONTEXT, RM_MEMIF_DLL_CONTEXT,
514 * RM_MEMIF_DLL_H_CONTEXT, RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_FW_CONTEXT,
515 * RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT, RM_L3INIT_CCPTX_CONTEXT,
516 * RM_L3INIT_EMAC_CONTEXT, RM_L3INIT_P1500_CONTEXT, RM_L3INIT_PCIESS_CONTEXT,
517 * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT,
518 * RM_L3INIT_USBPHYOCP2SCP_CONTEXT, RM_L3INIT_XHPI_CONTEXT,
519 * RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT,
520 * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT,
521 * RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT, RM_ABE_TIMER5_CONTEXT,
522 * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT,
523 * RM_ABE_WDT3_CONTEXT, RM_GFX_GFX_CONTEXT, RM_MPU_MPU_CONTEXT,
524 * RM_CEFUSE_CEFUSE_CONTEXT, RM_ALWON_MDMINTC_CONTEXT,
525 * RM_ALWON_SR_CORE_CONTEXT, RM_ALWON_SR_IVA_CONTEXT, RM_ALWON_SR_MPU_CONTEXT,
526 * RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT, RM_L4PER_ADC_CONTEXT,
527 * RM_L4PER_DMTIMER10_CONTEXT, RM_L4PER_DMTIMER11_CONTEXT,
528 * RM_L4PER_DMTIMER2_CONTEXT, RM_L4PER_DMTIMER3_CONTEXT,
529 * RM_L4PER_DMTIMER4_CONTEXT, RM_L4PER_DMTIMER9_CONTEXT, RM_L4PER_ELM_CONTEXT,
530 * RM_L4PER_HDQ1W_CONTEXT, RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT,
531 * RM_L4PER_I2C2_CONTEXT, RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT,
532 * RM_L4PER_I2C5_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCASP2_CONTEXT,
533 * RM_L4PER_MCASP3_CONTEXT, RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MCSPI1_CONTEXT,
534 * RM_L4PER_MCSPI2_CONTEXT, RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT,
535 * RM_L4PER_MGATE_CONTEXT, RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT,
536 * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_MSPROHG_CONTEXT,
537 * RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT,
538 * RM_TESLA_TESLA_CONTEXT, RM_IVAHD_IVAHD_CONTEXT, RM_IVAHD_SL2_CONTEXT
539 */
540#define OMAP4430_LOSTCONTEXT_DFF_SHIFT (1 << 0)
541#define OMAP4430_LOSTCONTEXT_DFF_MASK BITFIELD(0, 0)
542
543/*
544 * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_D2D_SAD2D_CONTEXT,
545 * RM_D2D_SAD2D_FW_CONTEXT, RM_DUCATI_DUCATI_CONTEXT, RM_L3INSTR_L3_3_CONTEXT,
546 * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_GPMC_CONTEXT,
547 * RM_L3_2_L3_2_CONTEXT, RM_L4CFG_HW_SEM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT,
548 * RM_L4CFG_MAILBOX_CONTEXT, RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT,
549 * RM_MEMIF_EMIF_2_CONTEXT, RM_MEMIF_EMIF_FW_CONTEXT, RM_MEMIF_EMIF_H1_CONTEXT,
550 * RM_MEMIF_EMIF_H2_CONTEXT, RM_SDMA_SDMA_CONTEXT, RM_L3INIT_HSI_CONTEXT,
551 * RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT, RM_L3INIT_MMC6_CONTEXT,
552 * RM_L3INIT_USB_HOST_CONTEXT, RM_L3INIT_USB_HOST_FS_CONTEXT,
553 * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_USB_TLL_CONTEXT, RM_DSS_DSS_CONTEXT,
554 * RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT, RM_L4PER_GPIO4_CONTEXT,
555 * RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT, RM_L4PER_I2C1_CONTEXT,
556 * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT,
557 * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4SEC_AES1_CONTEXT,
558 * RM_L4SEC_AES2_CONTEXT, RM_L4SEC_CRYPTODMA_CONTEXT, RM_L4SEC_DES3DES_CONTEXT,
559 * RM_L4SEC_RNG_CONTEXT, RM_L4SEC_SHA2MD51_CONTEXT, RM_TESLA_TESLA_CONTEXT
560 */
561#define OMAP4430_LOSTCONTEXT_RFF_SHIFT (1 << 1)
562#define OMAP4430_LOSTCONTEXT_RFF_MASK BITFIELD(1, 1)
563
564/* Used by RM_ABE_AESS_CONTEXT */
565#define OMAP4430_LOSTMEM_AESSMEM_SHIFT (1 << 8)
566#define OMAP4430_LOSTMEM_AESSMEM_MASK BITFIELD(8, 8)
567
568/* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */
569#define OMAP4430_LOSTMEM_CAM_MEM_SHIFT (1 << 8)
570#define OMAP4430_LOSTMEM_CAM_MEM_MASK BITFIELD(8, 8)
571
572/* Used by RM_L3INSTR_OCP_WP1_CONTEXT */
573#define OMAP4430_LOSTMEM_CORE_NRET_BANK_SHIFT (1 << 8)
574#define OMAP4430_LOSTMEM_CORE_NRET_BANK_MASK BITFIELD(8, 8)
575
576/* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_MEMIF_DMM_CONTEXT */
577#define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_SHIFT (1 << 9)
578#define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_MASK BITFIELD(9, 9)
579
580/* Used by RM_L3_2_OCMC_RAM_CONTEXT */
581#define OMAP4430_LOSTMEM_CORE_OCMRAM_SHIFT (1 << 8)
582#define OMAP4430_LOSTMEM_CORE_OCMRAM_MASK BITFIELD(8, 8)
583
584/*
585 * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_MEMIF_DMM_CONTEXT,
586 * RM_SDMA_SDMA_CONTEXT
587 */
588#define OMAP4430_LOSTMEM_CORE_OTHER_BANK_SHIFT (1 << 8)
589#define OMAP4430_LOSTMEM_CORE_OTHER_BANK_MASK BITFIELD(8, 8)
590
591/* Used by RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT */
592#define OMAP4430_LOSTMEM_DSS_MEM_SHIFT (1 << 8)
593#define OMAP4430_LOSTMEM_DSS_MEM_MASK BITFIELD(8, 8)
594
595/* Used by RM_DUCATI_DUCATI_CONTEXT */
596#define OMAP4430_LOSTMEM_DUCATI_L2RAM_SHIFT (1 << 9)
597#define OMAP4430_LOSTMEM_DUCATI_L2RAM_MASK BITFIELD(9, 9)
598
599/* Used by RM_DUCATI_DUCATI_CONTEXT */
600#define OMAP4430_LOSTMEM_DUCATI_UNICACHE_SHIFT (1 << 8)
601#define OMAP4430_LOSTMEM_DUCATI_UNICACHE_MASK BITFIELD(8, 8)
602
603/* Used by RM_EMU_DEBUGSS_CONTEXT */
604#define OMAP4430_LOSTMEM_EMU_BANK_SHIFT (1 << 8)
605#define OMAP4430_LOSTMEM_EMU_BANK_MASK BITFIELD(8, 8)
606
607/* Used by RM_GFX_GFX_CONTEXT */
608#define OMAP4430_LOSTMEM_GFX_MEM_SHIFT (1 << 8)
609#define OMAP4430_LOSTMEM_GFX_MEM_MASK BITFIELD(8, 8)
610
611/* Used by RM_IVAHD_IVAHD_CONTEXT */
612#define OMAP4430_LOSTMEM_HWA_MEM_SHIFT (1 << 10)
613#define OMAP4430_LOSTMEM_HWA_MEM_MASK BITFIELD(10, 10)
614
615/*
616 * Used by RM_L3INIT_CCPTX_CONTEXT, RM_L3INIT_EMAC_CONTEXT,
617 * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT,
618 * RM_L3INIT_MMC6_CONTEXT, RM_L3INIT_PCIESS_CONTEXT, RM_L3INIT_SATA_CONTEXT,
619 * RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT,
620 * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_XHPI_CONTEXT
621 */
622#define OMAP4430_LOSTMEM_L3INIT_BANK1_SHIFT (1 << 8)
623#define OMAP4430_LOSTMEM_L3INIT_BANK1_MASK BITFIELD(8, 8)
624
625/* Used by RM_MPU_MPU_CONTEXT */
626#define OMAP4430_LOSTMEM_MPU_L1_SHIFT (1 << 8)
627#define OMAP4430_LOSTMEM_MPU_L1_MASK BITFIELD(8, 8)
628
629/* Used by RM_MPU_MPU_CONTEXT */
630#define OMAP4430_LOSTMEM_MPU_L2_SHIFT (1 << 9)
631#define OMAP4430_LOSTMEM_MPU_L2_MASK BITFIELD(9, 9)
632
633/* Used by RM_MPU_MPU_CONTEXT */
634#define OMAP4430_LOSTMEM_MPU_RAM_SHIFT (1 << 10)
635#define OMAP4430_LOSTMEM_MPU_RAM_MASK BITFIELD(10, 10)
636
637/*
638 * Used by RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT,
639 * RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT,
640 * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT
641 */
642#define OMAP4430_LOSTMEM_NONRETAINED_BANK_SHIFT (1 << 8)
643#define OMAP4430_LOSTMEM_NONRETAINED_BANK_MASK BITFIELD(8, 8)
644
645/*
646 * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT,
647 * RM_ABE_MCBSP3_CONTEXT, RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT
648 */
649#define OMAP4430_LOSTMEM_PERIHPMEM_SHIFT (1 << 8)
650#define OMAP4430_LOSTMEM_PERIHPMEM_MASK BITFIELD(8, 8)
651
652/*
653 * Used by RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_UART1_CONTEXT,
654 * RM_L4PER_UART2_CONTEXT, RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT,
655 * RM_L4SEC_CRYPTODMA_CONTEXT
656 */
657#define OMAP4430_LOSTMEM_RETAINED_BANK_SHIFT (1 << 8)
658#define OMAP4430_LOSTMEM_RETAINED_BANK_MASK BITFIELD(8, 8)
659
660/* Used by RM_IVAHD_SL2_CONTEXT */
661#define OMAP4430_LOSTMEM_SL2_MEM_SHIFT (1 << 8)
662#define OMAP4430_LOSTMEM_SL2_MEM_MASK BITFIELD(8, 8)
663
664/* Used by RM_IVAHD_IVAHD_CONTEXT */
665#define OMAP4430_LOSTMEM_TCM1_MEM_SHIFT (1 << 8)
666#define OMAP4430_LOSTMEM_TCM1_MEM_MASK BITFIELD(8, 8)
667
668/* Used by RM_IVAHD_IVAHD_CONTEXT */
669#define OMAP4430_LOSTMEM_TCM2_MEM_SHIFT (1 << 9)
670#define OMAP4430_LOSTMEM_TCM2_MEM_MASK BITFIELD(9, 9)
671
672/* Used by RM_TESLA_TESLA_CONTEXT */
673#define OMAP4430_LOSTMEM_TESLA_EDMA_SHIFT (1 << 10)
674#define OMAP4430_LOSTMEM_TESLA_EDMA_MASK BITFIELD(10, 10)
675
676/* Used by RM_TESLA_TESLA_CONTEXT */
677#define OMAP4430_LOSTMEM_TESLA_L1_SHIFT (1 << 8)
678#define OMAP4430_LOSTMEM_TESLA_L1_MASK BITFIELD(8, 8)
679
680/* Used by RM_TESLA_TESLA_CONTEXT */
681#define OMAP4430_LOSTMEM_TESLA_L2_SHIFT (1 << 9)
682#define OMAP4430_LOSTMEM_TESLA_L2_MASK BITFIELD(9, 9)
683
684/* Used by RM_WKUP_SARRAM_CONTEXT */
685#define OMAP4430_LOSTMEM_WKUP_BANK_SHIFT (1 << 8)
686#define OMAP4430_LOSTMEM_WKUP_BANK_MASK BITFIELD(8, 8)
687
688/*
689 * Used by PM_CORE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_L3INIT_PWRSTCTRL,
690 * PM_ABE_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_MPU_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL,
691 * PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_TESLA_PWRSTCTRL, PM_IVAHD_PWRSTCTRL
692 */
693#define OMAP4430_LOWPOWERSTATECHANGE_SHIFT (1 << 4)
694#define OMAP4430_LOWPOWERSTATECHANGE_MASK BITFIELD(4, 4)
695
696/* Used by PM_CORE_PWRSTCTRL */
697#define OMAP4430_MEMORYCHANGE_SHIFT (1 << 3)
698#define OMAP4430_MEMORYCHANGE_MASK BITFIELD(3, 3)
699
700/* Used by PRM_MODEM_IF_CTRL */
701#define OMAP4430_MODEM_READY_SHIFT (1 << 1)
702#define OMAP4430_MODEM_READY_MASK BITFIELD(1, 1)
703
704/* Used by PRM_MODEM_IF_CTRL */
705#define OMAP4430_MODEM_SHUTDOWN_IRQ_SHIFT (1 << 9)
706#define OMAP4430_MODEM_SHUTDOWN_IRQ_MASK BITFIELD(9, 9)
707
708/* Used by PRM_MODEM_IF_CTRL */
709#define OMAP4430_MODEM_SLEEP_ST_SHIFT (1 << 16)
710#define OMAP4430_MODEM_SLEEP_ST_MASK BITFIELD(16, 16)
711
712/* Used by PRM_MODEM_IF_CTRL */
713#define OMAP4430_MODEM_WAKE_IRQ_SHIFT (1 << 8)
714#define OMAP4430_MODEM_WAKE_IRQ_MASK BITFIELD(8, 8)
715
716/* Used by PM_MPU_PWRSTCTRL */
717#define OMAP4430_MPU_L1_ONSTATE_SHIFT (1 << 16)
718#define OMAP4430_MPU_L1_ONSTATE_MASK BITFIELD(16, 17)
719
720/* Used by PM_MPU_PWRSTCTRL */
721#define OMAP4430_MPU_L1_RETSTATE_SHIFT (1 << 8)
722#define OMAP4430_MPU_L1_RETSTATE_MASK BITFIELD(8, 8)
723
724/* Used by PM_MPU_PWRSTST */
725#define OMAP4430_MPU_L1_STATEST_SHIFT (1 << 4)
726#define OMAP4430_MPU_L1_STATEST_MASK BITFIELD(4, 5)
727
728/* Used by PM_MPU_PWRSTCTRL */
729#define OMAP4430_MPU_L2_ONSTATE_SHIFT (1 << 18)
730#define OMAP4430_MPU_L2_ONSTATE_MASK BITFIELD(18, 19)
731
732/* Used by PM_MPU_PWRSTCTRL */
733#define OMAP4430_MPU_L2_RETSTATE_SHIFT (1 << 9)
734#define OMAP4430_MPU_L2_RETSTATE_MASK BITFIELD(9, 9)
735
736/* Used by PM_MPU_PWRSTST */
737#define OMAP4430_MPU_L2_STATEST_SHIFT (1 << 6)
738#define OMAP4430_MPU_L2_STATEST_MASK BITFIELD(6, 7)
739
740/* Used by PM_MPU_PWRSTCTRL */
741#define OMAP4430_MPU_RAM_ONSTATE_SHIFT (1 << 20)
742#define OMAP4430_MPU_RAM_ONSTATE_MASK BITFIELD(20, 21)
743
744/* Used by PM_MPU_PWRSTCTRL */
745#define OMAP4430_MPU_RAM_RETSTATE_SHIFT (1 << 10)
746#define OMAP4430_MPU_RAM_RETSTATE_MASK BITFIELD(10, 10)
747
748/* Used by PM_MPU_PWRSTST */
749#define OMAP4430_MPU_RAM_STATEST_SHIFT (1 << 8)
750#define OMAP4430_MPU_RAM_STATEST_MASK BITFIELD(8, 9)
751
752/* Used by PRM_RSTST */
753#define OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT (1 << 2)
754#define OMAP4430_MPU_SECURITY_VIOL_RST_MASK BITFIELD(2, 2)
755
756/* Used by PRM_RSTST */
757#define OMAP4430_MPU_WDT_RST_SHIFT (1 << 3)
758#define OMAP4430_MPU_WDT_RST_MASK BITFIELD(3, 3)
759
760/* Used by PM_L4PER_PWRSTCTRL */
761#define OMAP4430_NONRETAINED_BANK_ONSTATE_SHIFT (1 << 18)
762#define OMAP4430_NONRETAINED_BANK_ONSTATE_MASK BITFIELD(18, 19)
763
764/* Used by PM_L4PER_PWRSTCTRL */
765#define OMAP4430_NONRETAINED_BANK_RETSTATE_SHIFT (1 << 9)
766#define OMAP4430_NONRETAINED_BANK_RETSTATE_MASK BITFIELD(9, 9)
767
768/* Used by PM_L4PER_PWRSTST */
769#define OMAP4430_NONRETAINED_BANK_STATEST_SHIFT (1 << 6)
770#define OMAP4430_NONRETAINED_BANK_STATEST_MASK BITFIELD(6, 7)
771
772/* Used by PM_CORE_PWRSTCTRL */
773#define OMAP4430_OCP_NRET_BANK_ONSTATE_SHIFT (1 << 24)
774#define OMAP4430_OCP_NRET_BANK_ONSTATE_MASK BITFIELD(24, 25)
775
776/* Used by PM_CORE_PWRSTCTRL */
777#define OMAP4430_OCP_NRET_BANK_RETSTATE_SHIFT (1 << 12)
778#define OMAP4430_OCP_NRET_BANK_RETSTATE_MASK BITFIELD(12, 12)
779
780/* Used by PM_CORE_PWRSTST */
781#define OMAP4430_OCP_NRET_BANK_STATEST_SHIFT (1 << 12)
782#define OMAP4430_OCP_NRET_BANK_STATEST_MASK BITFIELD(12, 13)
783
784/*
785 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
786 * PRM_VC_VAL_CMD_VDD_MPU_L
787 */
788#define OMAP4430_OFF_SHIFT (1 << 0)
789#define OMAP4430_OFF_MASK BITFIELD(0, 7)
790
791/* Used by PRM_LDO_BANDGAP_CTRL */
792#define OMAP4430_OFF_ENABLE_SHIFT (1 << 0)
793#define OMAP4430_OFF_ENABLE_MASK BITFIELD(0, 0)
794
795/*
796 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
797 * PRM_VC_VAL_CMD_VDD_MPU_L
798 */
799#define OMAP4430_ON_SHIFT (1 << 24)
800#define OMAP4430_ON_MASK BITFIELD(24, 31)
801
802/*
803 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
804 * PRM_VC_VAL_CMD_VDD_MPU_L
805 */
806#define OMAP4430_ONLP_SHIFT (1 << 16)
807#define OMAP4430_ONLP_MASK BITFIELD(16, 23)
808
809/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
810#define OMAP4430_OPP_CHANGE_SHIFT (1 << 2)
811#define OMAP4430_OPP_CHANGE_MASK BITFIELD(2, 2)
812
813/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
814#define OMAP4430_OPP_SEL_SHIFT (1 << 0)
815#define OMAP4430_OPP_SEL_MASK BITFIELD(0, 1)
816
817/* Used by PRM_SRAM_COUNT */
818#define OMAP4430_PCHARGECNT_VALUE_SHIFT (1 << 0)
819#define OMAP4430_PCHARGECNT_VALUE_MASK BITFIELD(0, 5)
820
821/* Used by PRM_PSCON_COUNT */
822#define OMAP4430_PCHARGE_TIME_SHIFT (1 << 0)
823#define OMAP4430_PCHARGE_TIME_MASK BITFIELD(0, 7)
824
825/* Used by PM_ABE_PWRSTCTRL */
826#define OMAP4430_PERIPHMEM_ONSTATE_SHIFT (1 << 20)
827#define OMAP4430_PERIPHMEM_ONSTATE_MASK BITFIELD(20, 21)
828
829/* Used by PM_ABE_PWRSTCTRL */
830#define OMAP4430_PERIPHMEM_RETSTATE_SHIFT (1 << 10)
831#define OMAP4430_PERIPHMEM_RETSTATE_MASK BITFIELD(10, 10)
832
833/* Used by PM_ABE_PWRSTST */
834#define OMAP4430_PERIPHMEM_STATEST_SHIFT (1 << 8)
835#define OMAP4430_PERIPHMEM_STATEST_MASK BITFIELD(8, 9)
836
837/* Used by PRM_PHASE1_CNDP */
838#define OMAP4430_PHASE1_CNDP_SHIFT (1 << 0)
839#define OMAP4430_PHASE1_CNDP_MASK BITFIELD(0, 31)
840
841/* Used by PRM_PHASE2A_CNDP */
842#define OMAP4430_PHASE2A_CNDP_SHIFT (1 << 0)
843#define OMAP4430_PHASE2A_CNDP_MASK BITFIELD(0, 31)
844
845/* Used by PRM_PHASE2B_CNDP */
846#define OMAP4430_PHASE2B_CNDP_SHIFT (1 << 0)
847#define OMAP4430_PHASE2B_CNDP_MASK BITFIELD(0, 31)
848
849/* Used by PRM_PSCON_COUNT */
850#define OMAP4430_PONOUT_2_PGOODIN_TIME_SHIFT (1 << 8)
851#define OMAP4430_PONOUT_2_PGOODIN_TIME_MASK BITFIELD(8, 15)
852
853/*
854 * Used by PM_EMU_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_CAM_PWRSTCTRL,
855 * PM_L3INIT_PWRSTCTRL, PM_ABE_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_MPU_PWRSTCTRL,
856 * PM_CEFUSE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL,
857 * PM_TESLA_PWRSTCTRL, PM_IVAHD_PWRSTCTRL
858 */
859#define OMAP4430_POWERSTATE_SHIFT (1 << 0)
860#define OMAP4430_POWERSTATE_MASK BITFIELD(0, 1)
861
862/*
863 * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST,
864 * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST,
865 * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST
866 */
867#define OMAP4430_POWERSTATEST_SHIFT (1 << 0)
868#define OMAP4430_POWERSTATEST_MASK BITFIELD(0, 1)
869
870/* Used by PRM_PWRREQCTRL */
871#define OMAP4430_PWRREQ_COND_SHIFT (1 << 0)
872#define OMAP4430_PWRREQ_COND_MASK BITFIELD(0, 1)
873
874/* Used by PRM_VC_CFG_CHANNEL */
875#define OMAP4430_RACEN_VDD_CORE_L_SHIFT (1 << 3)
876#define OMAP4430_RACEN_VDD_CORE_L_MASK BITFIELD(3, 3)
877
878/* Used by PRM_VC_CFG_CHANNEL */
879#define OMAP4430_RACEN_VDD_IVA_L_SHIFT (1 << 11)
880#define OMAP4430_RACEN_VDD_IVA_L_MASK BITFIELD(11, 11)
881
882/* Used by PRM_VC_CFG_CHANNEL */
883#define OMAP4430_RACEN_VDD_MPU_L_SHIFT (1 << 20)
884#define OMAP4430_RACEN_VDD_MPU_L_MASK BITFIELD(20, 20)
885
886/* Used by PRM_VC_CFG_CHANNEL */
887#define OMAP4430_RAC_VDD_CORE_L_SHIFT (1 << 2)
888#define OMAP4430_RAC_VDD_CORE_L_MASK BITFIELD(2, 2)
889
890/* Used by PRM_VC_CFG_CHANNEL */
891#define OMAP4430_RAC_VDD_IVA_L_SHIFT (1 << 10)
892#define OMAP4430_RAC_VDD_IVA_L_MASK BITFIELD(10, 10)
893
894/* Used by PRM_VC_CFG_CHANNEL */
895#define OMAP4430_RAC_VDD_MPU_L_SHIFT (1 << 19)
896#define OMAP4430_RAC_VDD_MPU_L_MASK BITFIELD(19, 19)
897
898/*
899 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
900 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
901 * PRM_VOLTSETUP_MPU_RET_SLEEP
902 */
903#define OMAP4430_RAMP_DOWN_COUNT_SHIFT (1 << 16)
904#define OMAP4430_RAMP_DOWN_COUNT_MASK BITFIELD(16, 21)
905
906/*
907 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
908 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
909 * PRM_VOLTSETUP_MPU_RET_SLEEP
910 */
911#define OMAP4430_RAMP_DOWN_PRESCAL_SHIFT (1 << 24)
912#define OMAP4430_RAMP_DOWN_PRESCAL_MASK BITFIELD(24, 25)
913
914/*
915 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
916 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
917 * PRM_VOLTSETUP_MPU_RET_SLEEP
918 */
919#define OMAP4430_RAMP_UP_COUNT_SHIFT (1 << 0)
920#define OMAP4430_RAMP_UP_COUNT_MASK BITFIELD(0, 5)
921
922/*
923 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
924 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
925 * PRM_VOLTSETUP_MPU_RET_SLEEP
926 */
927#define OMAP4430_RAMP_UP_PRESCAL_SHIFT (1 << 8)
928#define OMAP4430_RAMP_UP_PRESCAL_MASK BITFIELD(8, 9)
929
930/* Used by PRM_VC_CFG_CHANNEL */
931#define OMAP4430_RAV_VDD_CORE_L_SHIFT (1 << 1)
932#define OMAP4430_RAV_VDD_CORE_L_MASK BITFIELD(1, 1)
933
934/* Used by PRM_VC_CFG_CHANNEL */
935#define OMAP4430_RAV_VDD_IVA_L_SHIFT (1 << 9)
936#define OMAP4430_RAV_VDD_IVA_L_MASK BITFIELD(9, 9)
937
938/* Used by PRM_VC_CFG_CHANNEL */
939#define OMAP4430_RAV_VDD_MPU_L_SHIFT (1 << 18)
940#define OMAP4430_RAV_VDD_MPU_L_MASK BITFIELD(18, 18)
941
942/* Used by PRM_VC_VAL_BYPASS */
943#define OMAP4430_REGADDR_SHIFT (1 << 8)
944#define OMAP4430_REGADDR_MASK BITFIELD(8, 15)
945
946/*
947 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
948 * PRM_VC_VAL_CMD_VDD_MPU_L
949 */
950#define OMAP4430_RET_SHIFT (1 << 8)
951#define OMAP4430_RET_MASK BITFIELD(8, 15)
952
953/* Used by PM_L4PER_PWRSTCTRL */
954#define OMAP4430_RETAINED_BANK_ONSTATE_SHIFT (1 << 16)
955#define OMAP4430_RETAINED_BANK_ONSTATE_MASK BITFIELD(16, 17)
956
957/* Used by PM_L4PER_PWRSTCTRL */
958#define OMAP4430_RETAINED_BANK_RETSTATE_SHIFT (1 << 8)
959#define OMAP4430_RETAINED_BANK_RETSTATE_MASK BITFIELD(8, 8)
960
961/* Used by PM_L4PER_PWRSTST */
962#define OMAP4430_RETAINED_BANK_STATEST_SHIFT (1 << 4)
963#define OMAP4430_RETAINED_BANK_STATEST_MASK BITFIELD(4, 5)
964
965/*
966 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
967 * PRM_LDO_SRAM_MPU_CTRL
968 */
969#define OMAP4430_RETMODE_ENABLE_SHIFT (1 << 0)
970#define OMAP4430_RETMODE_ENABLE_MASK BITFIELD(0, 0)
971
972/* Used by REVISION_PRM */
973#define OMAP4430_REV_SHIFT (1 << 0)
974#define OMAP4430_REV_MASK BITFIELD(0, 7)
975
976/* Used by RM_DUCATI_RSTCTRL, RM_TESLA_RSTCTRL, RM_IVAHD_RSTCTRL */
977#define OMAP4430_RST1_SHIFT (1 << 0)
978#define OMAP4430_RST1_MASK BITFIELD(0, 0)
979
980/* Used by RM_DUCATI_RSTST, RM_TESLA_RSTST, RM_IVAHD_RSTST */
981#define OMAP4430_RST1ST_SHIFT (1 << 0)
982#define OMAP4430_RST1ST_MASK BITFIELD(0, 0)
983
984/* Used by RM_DUCATI_RSTCTRL, RM_TESLA_RSTCTRL, RM_IVAHD_RSTCTRL */
985#define OMAP4430_RST2_SHIFT (1 << 1)
986#define OMAP4430_RST2_MASK BITFIELD(1, 1)
987
988/* Used by RM_DUCATI_RSTST, RM_TESLA_RSTST, RM_IVAHD_RSTST */
989#define OMAP4430_RST2ST_SHIFT (1 << 1)
990#define OMAP4430_RST2ST_MASK BITFIELD(1, 1)
991
992/* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL */
993#define OMAP4430_RST3_SHIFT (1 << 2)
994#define OMAP4430_RST3_MASK BITFIELD(2, 2)
995
996/* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST */
997#define OMAP4430_RST3ST_SHIFT (1 << 2)
998#define OMAP4430_RST3ST_MASK BITFIELD(2, 2)
999
1000/* Used by PRM_RSTTIME */
1001#define OMAP4430_RSTTIME1_SHIFT (1 << 0)
1002#define OMAP4430_RSTTIME1_MASK BITFIELD(0, 9)
1003
1004/* Used by PRM_RSTTIME */
1005#define OMAP4430_RSTTIME2_SHIFT (1 << 10)
1006#define OMAP4430_RSTTIME2_MASK BITFIELD(10, 14)
1007
1008/* Used by PRM_RSTCTRL */
1009#define OMAP4430_RST_GLOBAL_COLD_SW_SHIFT (1 << 1)
1010#define OMAP4430_RST_GLOBAL_COLD_SW_MASK BITFIELD(1, 1)
1011
1012/* Used by PRM_RSTCTRL */
1013#define OMAP4430_RST_GLOBAL_WARM_SW_SHIFT (1 << 0)
1014#define OMAP4430_RST_GLOBAL_WARM_SW_MASK BITFIELD(0, 0)
1015
1016/* Used by PRM_VC_CFG_CHANNEL */
1017#define OMAP4430_SA_VDD_CORE_L_SHIFT (1 << 0)
1018#define OMAP4430_SA_VDD_CORE_L_MASK BITFIELD(0, 0)
1019
1020/* Renamed from SA_VDD_CORE_L Used by PRM_VC_SMPS_SA */
1021#define OMAP4430_SA_VDD_CORE_L_0_6_SHIFT (1 << 0)
1022#define OMAP4430_SA_VDD_CORE_L_0_6_MASK BITFIELD(0, 6)
1023
1024/* Used by PRM_VC_CFG_CHANNEL */
1025#define OMAP4430_SA_VDD_IVA_L_SHIFT (1 << 8)
1026#define OMAP4430_SA_VDD_IVA_L_MASK BITFIELD(8, 8)
1027
1028/* Renamed from SA_VDD_IVA_L Used by PRM_VC_SMPS_SA */
1029#define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT (1 << 8)
1030#define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK BITFIELD(8, 14)
1031
1032/* Used by PRM_VC_CFG_CHANNEL */
1033#define OMAP4430_SA_VDD_MPU_L_SHIFT (1 << 16)
1034#define OMAP4430_SA_VDD_MPU_L_MASK BITFIELD(16, 16)
1035
1036/* Renamed from SA_VDD_MPU_L Used by PRM_VC_SMPS_SA */
1037#define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT (1 << 16)
1038#define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK BITFIELD(16, 22)
1039
1040/* Used by PRM_VC_CFG_I2C_CLK */
1041#define OMAP4430_SCLH_SHIFT (1 << 0)
1042#define OMAP4430_SCLH_MASK BITFIELD(0, 7)
1043
1044/* Used by PRM_VC_CFG_I2C_CLK */
1045#define OMAP4430_SCLL_SHIFT (1 << 8)
1046#define OMAP4430_SCLL_MASK BITFIELD(8, 15)
1047
1048/* Used by PRM_RSTST */
1049#define OMAP4430_SECURE_WDT_RST_SHIFT (1 << 4)
1050#define OMAP4430_SECURE_WDT_RST_MASK BITFIELD(4, 4)
1051
1052/* Used by PM_IVAHD_PWRSTCTRL */
1053#define OMAP4430_SL2_MEM_ONSTATE_SHIFT (1 << 18)
1054#define OMAP4430_SL2_MEM_ONSTATE_MASK BITFIELD(18, 19)
1055
1056/* Used by PM_IVAHD_PWRSTCTRL */
1057#define OMAP4430_SL2_MEM_RETSTATE_SHIFT (1 << 9)
1058#define OMAP4430_SL2_MEM_RETSTATE_MASK BITFIELD(9, 9)
1059
1060/* Used by PM_IVAHD_PWRSTST */
1061#define OMAP4430_SL2_MEM_STATEST_SHIFT (1 << 6)
1062#define OMAP4430_SL2_MEM_STATEST_MASK BITFIELD(6, 7)
1063
1064/* Used by PRM_VC_VAL_BYPASS */
1065#define OMAP4430_SLAVEADDR_SHIFT (1 << 0)
1066#define OMAP4430_SLAVEADDR_MASK BITFIELD(0, 6)
1067
1068/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1069#define OMAP4430_SLEEP_RBB_SEL_SHIFT (1 << 3)
1070#define OMAP4430_SLEEP_RBB_SEL_MASK BITFIELD(3, 3)
1071
1072/* Used by PRM_SRAM_COUNT */
1073#define OMAP4430_SLPCNT_VALUE_SHIFT (1 << 16)
1074#define OMAP4430_SLPCNT_VALUE_MASK BITFIELD(16, 23)
1075
1076/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1077#define OMAP4430_SMPSWAITTIMEMAX_SHIFT (1 << 8)
1078#define OMAP4430_SMPSWAITTIMEMAX_MASK BITFIELD(8, 23)
1079
1080/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1081#define OMAP4430_SMPSWAITTIMEMIN_SHIFT (1 << 8)
1082#define OMAP4430_SMPSWAITTIMEMIN_MASK BITFIELD(8, 23)
1083
1084/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1085#define OMAP4430_SR2EN_SHIFT (1 << 0)
1086#define OMAP4430_SR2EN_MASK BITFIELD(0, 0)
1087
1088/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
1089#define OMAP4430_SR2_IN_TRANSITION_SHIFT (1 << 6)
1090#define OMAP4430_SR2_IN_TRANSITION_MASK BITFIELD(6, 6)
1091
1092/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
1093#define OMAP4430_SR2_STATUS_SHIFT (1 << 3)
1094#define OMAP4430_SR2_STATUS_MASK BITFIELD(3, 4)
1095
1096/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1097#define OMAP4430_SR2_WTCNT_VALUE_SHIFT (1 << 8)
1098#define OMAP4430_SR2_WTCNT_VALUE_MASK BITFIELD(8, 15)
1099
1100/*
1101 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
1102 * PRM_LDO_SRAM_MPU_CTRL
1103 */
1104#define OMAP4430_SRAMLDO_STATUS_SHIFT (1 << 8)
1105#define OMAP4430_SRAMLDO_STATUS_MASK BITFIELD(8, 8)
1106
1107/*
1108 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
1109 * PRM_LDO_SRAM_MPU_CTRL
1110 */
1111#define OMAP4430_SRAM_IN_TRANSITION_SHIFT (1 << 9)
1112#define OMAP4430_SRAM_IN_TRANSITION_MASK BITFIELD(9, 9)
1113
1114/* Used by PRM_VC_CFG_I2C_MODE */
1115#define OMAP4430_SRMODEEN_SHIFT (1 << 4)
1116#define OMAP4430_SRMODEEN_MASK BITFIELD(4, 4)
1117
1118/* Used by PRM_VOLTSETUP_WARMRESET */
1119#define OMAP4430_STABLE_COUNT_SHIFT (1 << 0)
1120#define OMAP4430_STABLE_COUNT_MASK BITFIELD(0, 5)
1121
1122/* Used by PRM_VOLTSETUP_WARMRESET */
1123#define OMAP4430_STABLE_PRESCAL_SHIFT (1 << 8)
1124#define OMAP4430_STABLE_PRESCAL_MASK BITFIELD(8, 9)
1125
1126/* Used by PM_IVAHD_PWRSTCTRL */
1127#define OMAP4430_TCM1_MEM_ONSTATE_SHIFT (1 << 20)
1128#define OMAP4430_TCM1_MEM_ONSTATE_MASK BITFIELD(20, 21)
1129
1130/* Used by PM_IVAHD_PWRSTCTRL */
1131#define OMAP4430_TCM1_MEM_RETSTATE_SHIFT (1 << 10)
1132#define OMAP4430_TCM1_MEM_RETSTATE_MASK BITFIELD(10, 10)
1133
1134/* Used by PM_IVAHD_PWRSTST */
1135#define OMAP4430_TCM1_MEM_STATEST_SHIFT (1 << 8)
1136#define OMAP4430_TCM1_MEM_STATEST_MASK BITFIELD(8, 9)
1137
1138/* Used by PM_IVAHD_PWRSTCTRL */
1139#define OMAP4430_TCM2_MEM_ONSTATE_SHIFT (1 << 22)
1140#define OMAP4430_TCM2_MEM_ONSTATE_MASK BITFIELD(22, 23)
1141
1142/* Used by PM_IVAHD_PWRSTCTRL */
1143#define OMAP4430_TCM2_MEM_RETSTATE_SHIFT (1 << 11)
1144#define OMAP4430_TCM2_MEM_RETSTATE_MASK BITFIELD(11, 11)
1145
1146/* Used by PM_IVAHD_PWRSTST */
1147#define OMAP4430_TCM2_MEM_STATEST_SHIFT (1 << 10)
1148#define OMAP4430_TCM2_MEM_STATEST_MASK BITFIELD(10, 11)
1149
1150/* Used by RM_TESLA_RSTST */
1151#define OMAP4430_TESLASS_EMU_RSTST_SHIFT (1 << 2)
1152#define OMAP4430_TESLASS_EMU_RSTST_MASK BITFIELD(2, 2)
1153
1154/* Used by RM_TESLA_RSTST */
1155#define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_SHIFT (1 << 3)
1156#define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_MASK BITFIELD(3, 3)
1157
1158/* Used by PM_TESLA_PWRSTCTRL */
1159#define OMAP4430_TESLA_EDMA_ONSTATE_SHIFT (1 << 20)
1160#define OMAP4430_TESLA_EDMA_ONSTATE_MASK BITFIELD(20, 21)
1161
1162/* Used by PM_TESLA_PWRSTCTRL */
1163#define OMAP4430_TESLA_EDMA_RETSTATE_SHIFT (1 << 10)
1164#define OMAP4430_TESLA_EDMA_RETSTATE_MASK BITFIELD(10, 10)
1165
1166/* Used by PM_TESLA_PWRSTST */
1167#define OMAP4430_TESLA_EDMA_STATEST_SHIFT (1 << 8)
1168#define OMAP4430_TESLA_EDMA_STATEST_MASK BITFIELD(8, 9)
1169
1170/* Used by PM_TESLA_PWRSTCTRL */
1171#define OMAP4430_TESLA_L1_ONSTATE_SHIFT (1 << 16)
1172#define OMAP4430_TESLA_L1_ONSTATE_MASK BITFIELD(16, 17)
1173
1174/* Used by PM_TESLA_PWRSTCTRL */
1175#define OMAP4430_TESLA_L1_RETSTATE_SHIFT (1 << 8)
1176#define OMAP4430_TESLA_L1_RETSTATE_MASK BITFIELD(8, 8)
1177
1178/* Used by PM_TESLA_PWRSTST */
1179#define OMAP4430_TESLA_L1_STATEST_SHIFT (1 << 4)
1180#define OMAP4430_TESLA_L1_STATEST_MASK BITFIELD(4, 5)
1181
1182/* Used by PM_TESLA_PWRSTCTRL */
1183#define OMAP4430_TESLA_L2_ONSTATE_SHIFT (1 << 18)
1184#define OMAP4430_TESLA_L2_ONSTATE_MASK BITFIELD(18, 19)
1185
1186/* Used by PM_TESLA_PWRSTCTRL */
1187#define OMAP4430_TESLA_L2_RETSTATE_SHIFT (1 << 9)
1188#define OMAP4430_TESLA_L2_RETSTATE_MASK BITFIELD(9, 9)
1189
1190/* Used by PM_TESLA_PWRSTST */
1191#define OMAP4430_TESLA_L2_STATEST_SHIFT (1 << 6)
1192#define OMAP4430_TESLA_L2_STATEST_MASK BITFIELD(6, 7)
1193
1194/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1195#define OMAP4430_TIMEOUT_SHIFT (1 << 0)
1196#define OMAP4430_TIMEOUT_MASK BITFIELD(0, 15)
1197
1198/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
1199#define OMAP4430_TIMEOUTEN_SHIFT (1 << 3)
1200#define OMAP4430_TIMEOUTEN_MASK BITFIELD(3, 3)
1201
1202/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1203#define OMAP4430_TRANSITION_EN_SHIFT (1 << 8)
1204#define OMAP4430_TRANSITION_EN_MASK BITFIELD(8, 8)
1205
1206/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1207#define OMAP4430_TRANSITION_ST_SHIFT (1 << 8)
1208#define OMAP4430_TRANSITION_ST_MASK BITFIELD(8, 8)
1209
1210/* Used by PRM_VC_VAL_BYPASS */
1211#define OMAP4430_VALID_SHIFT (1 << 24)
1212#define OMAP4430_VALID_MASK BITFIELD(24, 24)
1213
1214/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1215#define OMAP4430_VC_BYPASSACK_EN_SHIFT (1 << 14)
1216#define OMAP4430_VC_BYPASSACK_EN_MASK BITFIELD(14, 14)
1217
1218/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1219#define OMAP4430_VC_BYPASSACK_ST_SHIFT (1 << 14)
1220#define OMAP4430_VC_BYPASSACK_ST_MASK BITFIELD(14, 14)
1221
1222/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1223#define OMAP4430_VC_IVA_VPACK_EN_SHIFT (1 << 30)
1224#define OMAP4430_VC_IVA_VPACK_EN_MASK BITFIELD(30, 30)
1225
1226/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1227#define OMAP4430_VC_IVA_VPACK_ST_SHIFT (1 << 30)
1228#define OMAP4430_VC_IVA_VPACK_ST_MASK BITFIELD(30, 30)
1229
1230/* Used by PRM_IRQENABLE_MPU_2 */
1231#define OMAP4430_VC_MPU_VPACK_EN_SHIFT (1 << 6)
1232#define OMAP4430_VC_MPU_VPACK_EN_MASK BITFIELD(6, 6)
1233
1234/* Used by PRM_IRQSTATUS_MPU_2 */
1235#define OMAP4430_VC_MPU_VPACK_ST_SHIFT (1 << 6)
1236#define OMAP4430_VC_MPU_VPACK_ST_MASK BITFIELD(6, 6)
1237
1238/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1239#define OMAP4430_VC_RAERR_EN_SHIFT (1 << 12)
1240#define OMAP4430_VC_RAERR_EN_MASK BITFIELD(12, 12)
1241
1242/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1243#define OMAP4430_VC_RAERR_ST_SHIFT (1 << 12)
1244#define OMAP4430_VC_RAERR_ST_MASK BITFIELD(12, 12)
1245
1246/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1247#define OMAP4430_VC_SAERR_EN_SHIFT (1 << 11)
1248#define OMAP4430_VC_SAERR_EN_MASK BITFIELD(11, 11)
1249
1250/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1251#define OMAP4430_VC_SAERR_ST_SHIFT (1 << 11)
1252#define OMAP4430_VC_SAERR_ST_MASK BITFIELD(11, 11)
1253
1254/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1255#define OMAP4430_VC_TOERR_EN_SHIFT (1 << 13)
1256#define OMAP4430_VC_TOERR_EN_MASK BITFIELD(13, 13)
1257
1258/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1259#define OMAP4430_VC_TOERR_ST_SHIFT (1 << 13)
1260#define OMAP4430_VC_TOERR_ST_MASK BITFIELD(13, 13)
1261
1262/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1263#define OMAP4430_VDDMAX_SHIFT (1 << 24)
1264#define OMAP4430_VDDMAX_MASK BITFIELD(24, 31)
1265
1266/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1267#define OMAP4430_VDDMIN_SHIFT (1 << 16)
1268#define OMAP4430_VDDMIN_MASK BITFIELD(16, 23)
1269
1270/* Used by PRM_VOLTCTRL */
1271#define OMAP4430_VDD_CORE_I2C_DISABLE_SHIFT (1 << 12)
1272#define OMAP4430_VDD_CORE_I2C_DISABLE_MASK BITFIELD(12, 12)
1273
1274/* Used by PRM_RSTST */
1275#define OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT (1 << 8)
1276#define OMAP4430_VDD_CORE_VOLT_MGR_RST_MASK BITFIELD(8, 8)
1277
1278/* Used by PRM_VOLTCTRL */
1279#define OMAP4430_VDD_IVA_I2C_DISABLE_SHIFT (1 << 14)
1280#define OMAP4430_VDD_IVA_I2C_DISABLE_MASK BITFIELD(14, 14)
1281
1282/* Used by PRM_VOLTCTRL */
1283#define OMAP4430_VDD_IVA_PRESENCE_SHIFT (1 << 9)
1284#define OMAP4430_VDD_IVA_PRESENCE_MASK BITFIELD(9, 9)
1285
1286/* Used by PRM_RSTST */
1287#define OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT (1 << 7)
1288#define OMAP4430_VDD_IVA_VOLT_MGR_RST_MASK BITFIELD(7, 7)
1289
1290/* Used by PRM_VOLTCTRL */
1291#define OMAP4430_VDD_MPU_I2C_DISABLE_SHIFT (1 << 13)
1292#define OMAP4430_VDD_MPU_I2C_DISABLE_MASK BITFIELD(13, 13)
1293
1294/* Used by PRM_VOLTCTRL */
1295#define OMAP4430_VDD_MPU_PRESENCE_SHIFT (1 << 8)
1296#define OMAP4430_VDD_MPU_PRESENCE_MASK BITFIELD(8, 8)
1297
1298/* Used by PRM_RSTST */
1299#define OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT (1 << 6)
1300#define OMAP4430_VDD_MPU_VOLT_MGR_RST_MASK BITFIELD(6, 6)
1301
1302/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1303#define OMAP4430_VOLRA_VDD_CORE_L_SHIFT (1 << 0)
1304#define OMAP4430_VOLRA_VDD_CORE_L_MASK BITFIELD(0, 7)
1305
1306/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1307#define OMAP4430_VOLRA_VDD_IVA_L_SHIFT (1 << 8)
1308#define OMAP4430_VOLRA_VDD_IVA_L_MASK BITFIELD(8, 15)
1309
1310/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1311#define OMAP4430_VOLRA_VDD_MPU_L_SHIFT (1 << 16)
1312#define OMAP4430_VOLRA_VDD_MPU_L_MASK BITFIELD(16, 23)
1313
1314/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
1315#define OMAP4430_VPENABLE_SHIFT (1 << 0)
1316#define OMAP4430_VPENABLE_MASK BITFIELD(0, 0)
1317
1318/* Used by PRM_VP_CORE_STATUS, PRM_VP_IVA_STATUS, PRM_VP_MPU_STATUS */
1319#define OMAP4430_VPINIDLE_SHIFT (1 << 0)
1320#define OMAP4430_VPINIDLE_MASK BITFIELD(0, 0)
1321
1322/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */
1323#define OMAP4430_VPVOLTAGE_SHIFT (1 << 0)
1324#define OMAP4430_VPVOLTAGE_MASK BITFIELD(0, 7)
1325
1326/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1327#define OMAP4430_VP_CORE_EQVALUE_EN_SHIFT (1 << 20)
1328#define OMAP4430_VP_CORE_EQVALUE_EN_MASK BITFIELD(20, 20)
1329
1330/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1331#define OMAP4430_VP_CORE_EQVALUE_ST_SHIFT (1 << 20)
1332#define OMAP4430_VP_CORE_EQVALUE_ST_MASK BITFIELD(20, 20)
1333
1334/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1335#define OMAP4430_VP_CORE_MAXVDD_EN_SHIFT (1 << 18)
1336#define OMAP4430_VP_CORE_MAXVDD_EN_MASK BITFIELD(18, 18)
1337
1338/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1339#define OMAP4430_VP_CORE_MAXVDD_ST_SHIFT (1 << 18)
1340#define OMAP4430_VP_CORE_MAXVDD_ST_MASK BITFIELD(18, 18)
1341
1342/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1343#define OMAP4430_VP_CORE_MINVDD_EN_SHIFT (1 << 17)
1344#define OMAP4430_VP_CORE_MINVDD_EN_MASK BITFIELD(17, 17)
1345
1346/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1347#define OMAP4430_VP_CORE_MINVDD_ST_SHIFT (1 << 17)
1348#define OMAP4430_VP_CORE_MINVDD_ST_MASK BITFIELD(17, 17)
1349
1350/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1351#define OMAP4430_VP_CORE_NOSMPSACK_EN_SHIFT (1 << 19)
1352#define OMAP4430_VP_CORE_NOSMPSACK_EN_MASK BITFIELD(19, 19)
1353
1354/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1355#define OMAP4430_VP_CORE_NOSMPSACK_ST_SHIFT (1 << 19)
1356#define OMAP4430_VP_CORE_NOSMPSACK_ST_MASK BITFIELD(19, 19)
1357
1358/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1359#define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_SHIFT (1 << 16)
1360#define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_MASK BITFIELD(16, 16)
1361
1362/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1363#define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_SHIFT (1 << 16)
1364#define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_MASK BITFIELD(16, 16)
1365
1366/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1367#define OMAP4430_VP_CORE_TRANXDONE_EN_SHIFT (1 << 21)
1368#define OMAP4430_VP_CORE_TRANXDONE_EN_MASK BITFIELD(21, 21)
1369
1370/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1371#define OMAP4430_VP_CORE_TRANXDONE_ST_SHIFT (1 << 21)
1372#define OMAP4430_VP_CORE_TRANXDONE_ST_MASK BITFIELD(21, 21)
1373
1374/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1375#define OMAP4430_VP_IVA_EQVALUE_EN_SHIFT (1 << 28)
1376#define OMAP4430_VP_IVA_EQVALUE_EN_MASK BITFIELD(28, 28)
1377
1378/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1379#define OMAP4430_VP_IVA_EQVALUE_ST_SHIFT (1 << 28)
1380#define OMAP4430_VP_IVA_EQVALUE_ST_MASK BITFIELD(28, 28)
1381
1382/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1383#define OMAP4430_VP_IVA_MAXVDD_EN_SHIFT (1 << 26)
1384#define OMAP4430_VP_IVA_MAXVDD_EN_MASK BITFIELD(26, 26)
1385
1386/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1387#define OMAP4430_VP_IVA_MAXVDD_ST_SHIFT (1 << 26)
1388#define OMAP4430_VP_IVA_MAXVDD_ST_MASK BITFIELD(26, 26)
1389
1390/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1391#define OMAP4430_VP_IVA_MINVDD_EN_SHIFT (1 << 25)
1392#define OMAP4430_VP_IVA_MINVDD_EN_MASK BITFIELD(25, 25)
1393
1394/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1395#define OMAP4430_VP_IVA_MINVDD_ST_SHIFT (1 << 25)
1396#define OMAP4430_VP_IVA_MINVDD_ST_MASK BITFIELD(25, 25)
1397
1398/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1399#define OMAP4430_VP_IVA_NOSMPSACK_EN_SHIFT (1 << 27)
1400#define OMAP4430_VP_IVA_NOSMPSACK_EN_MASK BITFIELD(27, 27)
1401
1402/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1403#define OMAP4430_VP_IVA_NOSMPSACK_ST_SHIFT (1 << 27)
1404#define OMAP4430_VP_IVA_NOSMPSACK_ST_MASK BITFIELD(27, 27)
1405
1406/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1407#define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_SHIFT (1 << 24)
1408#define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_MASK BITFIELD(24, 24)
1409
1410/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1411#define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_SHIFT (1 << 24)
1412#define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_MASK BITFIELD(24, 24)
1413
1414/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1415#define OMAP4430_VP_IVA_TRANXDONE_EN_SHIFT (1 << 29)
1416#define OMAP4430_VP_IVA_TRANXDONE_EN_MASK BITFIELD(29, 29)
1417
1418/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1419#define OMAP4430_VP_IVA_TRANXDONE_ST_SHIFT (1 << 29)
1420#define OMAP4430_VP_IVA_TRANXDONE_ST_MASK BITFIELD(29, 29)
1421
1422/* Used by PRM_IRQENABLE_MPU_2 */
1423#define OMAP4430_VP_MPU_EQVALUE_EN_SHIFT (1 << 4)
1424#define OMAP4430_VP_MPU_EQVALUE_EN_MASK BITFIELD(4, 4)
1425
1426/* Used by PRM_IRQSTATUS_MPU_2 */
1427#define OMAP4430_VP_MPU_EQVALUE_ST_SHIFT (1 << 4)
1428#define OMAP4430_VP_MPU_EQVALUE_ST_MASK BITFIELD(4, 4)
1429
1430/* Used by PRM_IRQENABLE_MPU_2 */
1431#define OMAP4430_VP_MPU_MAXVDD_EN_SHIFT (1 << 2)
1432#define OMAP4430_VP_MPU_MAXVDD_EN_MASK BITFIELD(2, 2)
1433
1434/* Used by PRM_IRQSTATUS_MPU_2 */
1435#define OMAP4430_VP_MPU_MAXVDD_ST_SHIFT (1 << 2)
1436#define OMAP4430_VP_MPU_MAXVDD_ST_MASK BITFIELD(2, 2)
1437
1438/* Used by PRM_IRQENABLE_MPU_2 */
1439#define OMAP4430_VP_MPU_MINVDD_EN_SHIFT (1 << 1)
1440#define OMAP4430_VP_MPU_MINVDD_EN_MASK BITFIELD(1, 1)
1441
1442/* Used by PRM_IRQSTATUS_MPU_2 */
1443#define OMAP4430_VP_MPU_MINVDD_ST_SHIFT (1 << 1)
1444#define OMAP4430_VP_MPU_MINVDD_ST_MASK BITFIELD(1, 1)
1445
1446/* Used by PRM_IRQENABLE_MPU_2 */
1447#define OMAP4430_VP_MPU_NOSMPSACK_EN_SHIFT (1 << 3)
1448#define OMAP4430_VP_MPU_NOSMPSACK_EN_MASK BITFIELD(3, 3)
1449
1450/* Used by PRM_IRQSTATUS_MPU_2 */
1451#define OMAP4430_VP_MPU_NOSMPSACK_ST_SHIFT (1 << 3)
1452#define OMAP4430_VP_MPU_NOSMPSACK_ST_MASK BITFIELD(3, 3)
1453
1454/* Used by PRM_IRQENABLE_MPU_2 */
1455#define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_SHIFT (1 << 0)
1456#define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_MASK BITFIELD(0, 0)
1457
1458/* Used by PRM_IRQSTATUS_MPU_2 */
1459#define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_SHIFT (1 << 0)
1460#define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_MASK BITFIELD(0, 0)
1461
1462/* Used by PRM_IRQENABLE_MPU_2 */
1463#define OMAP4430_VP_MPU_TRANXDONE_EN_SHIFT (1 << 5)
1464#define OMAP4430_VP_MPU_TRANXDONE_EN_MASK BITFIELD(5, 5)
1465
1466/* Used by PRM_IRQSTATUS_MPU_2 */
1467#define OMAP4430_VP_MPU_TRANXDONE_ST_SHIFT (1 << 5)
1468#define OMAP4430_VP_MPU_TRANXDONE_ST_MASK BITFIELD(5, 5)
1469
1470/* Used by PRM_SRAM_COUNT */
1471#define OMAP4430_VSETUPCNT_VALUE_SHIFT (1 << 8)
1472#define OMAP4430_VSETUPCNT_VALUE_MASK BITFIELD(8, 15)
1473
1474/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1475#define OMAP4430_VSTEPMAX_SHIFT (1 << 0)
1476#define OMAP4430_VSTEPMAX_MASK BITFIELD(0, 7)
1477
1478/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1479#define OMAP4430_VSTEPMIN_SHIFT (1 << 0)
1480#define OMAP4430_VSTEPMIN_MASK BITFIELD(0, 7)
1481
1482/* Used by PRM_MODEM_IF_CTRL */
1483#define OMAP4430_WAKE_MODEM_SHIFT (1 << 0)
1484#define OMAP4430_WAKE_MODEM_MASK BITFIELD(0, 0)
1485
1486/* Used by PM_DSS_DSS_WKDEP */
1487#define OMAP4430_WKUPDEP_DISPC_DUCATI_SHIFT (1 << 1)
1488#define OMAP4430_WKUPDEP_DISPC_DUCATI_MASK BITFIELD(1, 1)
1489
1490/* Used by PM_DSS_DSS_WKDEP */
1491#define OMAP4430_WKUPDEP_DISPC_MPU_SHIFT (1 << 0)
1492#define OMAP4430_WKUPDEP_DISPC_MPU_MASK BITFIELD(0, 0)
1493
1494/* Used by PM_DSS_DSS_WKDEP */
1495#define OMAP4430_WKUPDEP_DISPC_SDMA_SHIFT (1 << 3)
1496#define OMAP4430_WKUPDEP_DISPC_SDMA_MASK BITFIELD(3, 3)
1497
1498/* Used by PM_DSS_DSS_WKDEP */
1499#define OMAP4430_WKUPDEP_DISPC_TESLA_SHIFT (1 << 2)
1500#define OMAP4430_WKUPDEP_DISPC_TESLA_MASK BITFIELD(2, 2)
1501
1502/* Used by PM_ABE_DMIC_WKDEP */
1503#define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_SHIFT (1 << 7)
1504#define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_MASK BITFIELD(7, 7)
1505
1506/* Used by PM_ABE_DMIC_WKDEP */
1507#define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_SHIFT (1 << 6)
1508#define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_MASK BITFIELD(6, 6)
1509
1510/* Used by PM_ABE_DMIC_WKDEP */
1511#define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_SHIFT (1 << 0)
1512#define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_MASK BITFIELD(0, 0)
1513
1514/* Used by PM_ABE_DMIC_WKDEP */
1515#define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_SHIFT (1 << 2)
1516#define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_MASK BITFIELD(2, 2)
1517
1518/* Used by PM_L4PER_DMTIMER10_WKDEP */
1519#define OMAP4430_WKUPDEP_DMTIMER10_MPU_SHIFT (1 << 0)
1520#define OMAP4430_WKUPDEP_DMTIMER10_MPU_MASK BITFIELD(0, 0)
1521
1522/* Used by PM_L4PER_DMTIMER11_WKDEP */
1523#define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_SHIFT (1 << 1)
1524#define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_MASK BITFIELD(1, 1)
1525
1526/* Used by PM_L4PER_DMTIMER11_WKDEP */
1527#define OMAP4430_WKUPDEP_DMTIMER11_MPU_SHIFT (1 << 0)
1528#define OMAP4430_WKUPDEP_DMTIMER11_MPU_MASK BITFIELD(0, 0)
1529
1530/* Used by PM_L4PER_DMTIMER2_WKDEP */
1531#define OMAP4430_WKUPDEP_DMTIMER2_MPU_SHIFT (1 << 0)
1532#define OMAP4430_WKUPDEP_DMTIMER2_MPU_MASK BITFIELD(0, 0)
1533
1534/* Used by PM_L4PER_DMTIMER3_WKDEP */
1535#define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_SHIFT (1 << 1)
1536#define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_MASK BITFIELD(1, 1)
1537
1538/* Used by PM_L4PER_DMTIMER3_WKDEP */
1539#define OMAP4430_WKUPDEP_DMTIMER3_MPU_SHIFT (1 << 0)
1540#define OMAP4430_WKUPDEP_DMTIMER3_MPU_MASK BITFIELD(0, 0)
1541
1542/* Used by PM_L4PER_DMTIMER4_WKDEP */
1543#define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_SHIFT (1 << 1)
1544#define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_MASK BITFIELD(1, 1)
1545
1546/* Used by PM_L4PER_DMTIMER4_WKDEP */
1547#define OMAP4430_WKUPDEP_DMTIMER4_MPU_SHIFT (1 << 0)
1548#define OMAP4430_WKUPDEP_DMTIMER4_MPU_MASK BITFIELD(0, 0)
1549
1550/* Used by PM_L4PER_DMTIMER9_WKDEP */
1551#define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_SHIFT (1 << 1)
1552#define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_MASK BITFIELD(1, 1)
1553
1554/* Used by PM_L4PER_DMTIMER9_WKDEP */
1555#define OMAP4430_WKUPDEP_DMTIMER9_MPU_SHIFT (1 << 0)
1556#define OMAP4430_WKUPDEP_DMTIMER9_MPU_MASK BITFIELD(0, 0)
1557
1558/* Used by PM_DSS_DSS_WKDEP */
1559#define OMAP4430_WKUPDEP_DSI1_DUCATI_SHIFT (1 << 5)
1560#define OMAP4430_WKUPDEP_DSI1_DUCATI_MASK BITFIELD(5, 5)
1561
1562/* Used by PM_DSS_DSS_WKDEP */
1563#define OMAP4430_WKUPDEP_DSI1_MPU_SHIFT (1 << 4)
1564#define OMAP4430_WKUPDEP_DSI1_MPU_MASK BITFIELD(4, 4)
1565
1566/* Used by PM_DSS_DSS_WKDEP */
1567#define OMAP4430_WKUPDEP_DSI1_SDMA_SHIFT (1 << 7)
1568#define OMAP4430_WKUPDEP_DSI1_SDMA_MASK BITFIELD(7, 7)
1569
1570/* Used by PM_DSS_DSS_WKDEP */
1571#define OMAP4430_WKUPDEP_DSI1_TESLA_SHIFT (1 << 6)
1572#define OMAP4430_WKUPDEP_DSI1_TESLA_MASK BITFIELD(6, 6)
1573
1574/* Used by PM_DSS_DSS_WKDEP */
1575#define OMAP4430_WKUPDEP_DSI2_DUCATI_SHIFT (1 << 9)
1576#define OMAP4430_WKUPDEP_DSI2_DUCATI_MASK BITFIELD(9, 9)
1577
1578/* Used by PM_DSS_DSS_WKDEP */
1579#define OMAP4430_WKUPDEP_DSI2_MPU_SHIFT (1 << 8)
1580#define OMAP4430_WKUPDEP_DSI2_MPU_MASK BITFIELD(8, 8)
1581
1582/* Used by PM_DSS_DSS_WKDEP */
1583#define OMAP4430_WKUPDEP_DSI2_SDMA_SHIFT (1 << 11)
1584#define OMAP4430_WKUPDEP_DSI2_SDMA_MASK BITFIELD(11, 11)
1585
1586/* Used by PM_DSS_DSS_WKDEP */
1587#define OMAP4430_WKUPDEP_DSI2_TESLA_SHIFT (1 << 10)
1588#define OMAP4430_WKUPDEP_DSI2_TESLA_MASK BITFIELD(10, 10)
1589
1590/* Used by PM_WKUP_GPIO1_WKDEP */
1591#define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_SHIFT (1 << 1)
1592#define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_MASK BITFIELD(1, 1)
1593
1594/* Used by PM_WKUP_GPIO1_WKDEP */
1595#define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT (1 << 0)
1596#define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_MASK BITFIELD(0, 0)
1597
1598/* Used by PM_WKUP_GPIO1_WKDEP */
1599#define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_SHIFT (1 << 6)
1600#define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_MASK BITFIELD(6, 6)
1601
1602/* Used by PM_L4PER_GPIO2_WKDEP */
1603#define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_SHIFT (1 << 1)
1604#define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_MASK BITFIELD(1, 1)
1605
1606/* Used by PM_L4PER_GPIO2_WKDEP */
1607#define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT (1 << 0)
1608#define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_MASK BITFIELD(0, 0)
1609
1610/* Used by PM_L4PER_GPIO2_WKDEP */
1611#define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_SHIFT (1 << 6)
1612#define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_MASK BITFIELD(6, 6)
1613
1614/* Used by PM_L4PER_GPIO3_WKDEP */
1615#define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT (1 << 0)
1616#define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_MASK BITFIELD(0, 0)
1617
1618/* Used by PM_L4PER_GPIO3_WKDEP */
1619#define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_SHIFT (1 << 6)
1620#define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_MASK BITFIELD(6, 6)
1621
1622/* Used by PM_L4PER_GPIO4_WKDEP */
1623#define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT (1 << 0)
1624#define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_MASK BITFIELD(0, 0)
1625
1626/* Used by PM_L4PER_GPIO4_WKDEP */
1627#define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_SHIFT (1 << 6)
1628#define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_MASK BITFIELD(6, 6)
1629
1630/* Used by PM_L4PER_GPIO5_WKDEP */
1631#define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT (1 << 0)
1632#define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_MASK BITFIELD(0, 0)
1633
1634/* Used by PM_L4PER_GPIO5_WKDEP */
1635#define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_SHIFT (1 << 6)
1636#define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_MASK BITFIELD(6, 6)
1637
1638/* Used by PM_L4PER_GPIO6_WKDEP */
1639#define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT (1 << 0)
1640#define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_MASK BITFIELD(0, 0)
1641
1642/* Used by PM_L4PER_GPIO6_WKDEP */
1643#define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_SHIFT (1 << 6)
1644#define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_MASK BITFIELD(6, 6)
1645
1646/* Used by PM_DSS_DSS_WKDEP */
1647#define OMAP4430_WKUPDEP_HDMIDMA_SDMA_SHIFT (1 << 19)
1648#define OMAP4430_WKUPDEP_HDMIDMA_SDMA_MASK BITFIELD(19, 19)
1649
1650/* Used by PM_DSS_DSS_WKDEP */
1651#define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_SHIFT (1 << 13)
1652#define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_MASK BITFIELD(13, 13)
1653
1654/* Used by PM_DSS_DSS_WKDEP */
1655#define OMAP4430_WKUPDEP_HDMIIRQ_MPU_SHIFT (1 << 12)
1656#define OMAP4430_WKUPDEP_HDMIIRQ_MPU_MASK BITFIELD(12, 12)
1657
1658/* Used by PM_DSS_DSS_WKDEP */
1659#define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_SHIFT (1 << 14)
1660#define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_MASK BITFIELD(14, 14)
1661
1662/* Used by PM_L4PER_HECC1_WKDEP */
1663#define OMAP4430_WKUPDEP_HECC1_MPU_SHIFT (1 << 0)
1664#define OMAP4430_WKUPDEP_HECC1_MPU_MASK BITFIELD(0, 0)
1665
1666/* Used by PM_L4PER_HECC2_WKDEP */
1667#define OMAP4430_WKUPDEP_HECC2_MPU_SHIFT (1 << 0)
1668#define OMAP4430_WKUPDEP_HECC2_MPU_MASK BITFIELD(0, 0)
1669
1670/* Used by PM_L3INIT_HSI_WKDEP */
1671#define OMAP4430_WKUPDEP_HSI_DSP_TESLA_SHIFT (1 << 6)
1672#define OMAP4430_WKUPDEP_HSI_DSP_TESLA_MASK BITFIELD(6, 6)
1673
1674/* Used by PM_L3INIT_HSI_WKDEP */
1675#define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_SHIFT (1 << 1)
1676#define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_MASK BITFIELD(1, 1)
1677
1678/* Used by PM_L3INIT_HSI_WKDEP */
1679#define OMAP4430_WKUPDEP_HSI_MCU_MPU_SHIFT (1 << 0)
1680#define OMAP4430_WKUPDEP_HSI_MCU_MPU_MASK BITFIELD(0, 0)
1681
1682/* Used by PM_L4PER_I2C1_WKDEP */
1683#define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_SHIFT (1 << 7)
1684#define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_MASK BITFIELD(7, 7)
1685
1686/* Used by PM_L4PER_I2C1_WKDEP */
1687#define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_SHIFT (1 << 1)
1688#define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_MASK BITFIELD(1, 1)
1689
1690/* Used by PM_L4PER_I2C1_WKDEP */
1691#define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_SHIFT (1 << 0)
1692#define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_MASK BITFIELD(0, 0)
1693
1694/* Used by PM_L4PER_I2C2_WKDEP */
1695#define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_SHIFT (1 << 7)
1696#define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_MASK BITFIELD(7, 7)
1697
1698/* Used by PM_L4PER_I2C2_WKDEP */
1699#define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_SHIFT (1 << 1)
1700#define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_MASK BITFIELD(1, 1)
1701
1702/* Used by PM_L4PER_I2C2_WKDEP */
1703#define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_SHIFT (1 << 0)
1704#define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_MASK BITFIELD(0, 0)
1705
1706/* Used by PM_L4PER_I2C3_WKDEP */
1707#define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_SHIFT (1 << 7)
1708#define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_MASK BITFIELD(7, 7)
1709
1710/* Used by PM_L4PER_I2C3_WKDEP */
1711#define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_SHIFT (1 << 1)
1712#define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_MASK BITFIELD(1, 1)
1713
1714/* Used by PM_L4PER_I2C3_WKDEP */
1715#define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_SHIFT (1 << 0)
1716#define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_MASK BITFIELD(0, 0)
1717
1718/* Used by PM_L4PER_I2C4_WKDEP */
1719#define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_SHIFT (1 << 7)
1720#define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_MASK BITFIELD(7, 7)
1721
1722/* Used by PM_L4PER_I2C4_WKDEP */
1723#define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_SHIFT (1 << 1)
1724#define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_MASK BITFIELD(1, 1)
1725
1726/* Used by PM_L4PER_I2C4_WKDEP */
1727#define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_SHIFT (1 << 0)
1728#define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_MASK BITFIELD(0, 0)
1729
1730/* Used by PM_L4PER_I2C5_WKDEP */
1731#define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_SHIFT (1 << 7)
1732#define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_MASK BITFIELD(7, 7)
1733
1734/* Used by PM_L4PER_I2C5_WKDEP */
1735#define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_SHIFT (1 << 0)
1736#define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_MASK BITFIELD(0, 0)
1737
1738/* Used by PM_WKUP_KEYBOARD_WKDEP */
1739#define OMAP4430_WKUPDEP_KEYBOARD_MPU_SHIFT (1 << 0)
1740#define OMAP4430_WKUPDEP_KEYBOARD_MPU_MASK BITFIELD(0, 0)
1741
1742/* Used by PM_ABE_MCASP_WKDEP */
1743#define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_SHIFT (1 << 7)
1744#define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_MASK BITFIELD(7, 7)
1745
1746/* Used by PM_ABE_MCASP_WKDEP */
1747#define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_SHIFT (1 << 6)
1748#define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_MASK BITFIELD(6, 6)
1749
1750/* Used by PM_ABE_MCASP_WKDEP */
1751#define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_SHIFT (1 << 0)
1752#define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_MASK BITFIELD(0, 0)
1753
1754/* Used by PM_ABE_MCASP_WKDEP */
1755#define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_SHIFT (1 << 2)
1756#define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_MASK BITFIELD(2, 2)
1757
1758/* Used by PM_L4PER_MCASP2_WKDEP */
1759#define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_SHIFT (1 << 7)
1760#define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_MASK BITFIELD(7, 7)
1761
1762/* Used by PM_L4PER_MCASP2_WKDEP */
1763#define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_SHIFT (1 << 6)
1764#define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_MASK BITFIELD(6, 6)
1765
1766/* Used by PM_L4PER_MCASP2_WKDEP */
1767#define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_SHIFT (1 << 0)
1768#define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_MASK BITFIELD(0, 0)
1769
1770/* Used by PM_L4PER_MCASP2_WKDEP */
1771#define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_SHIFT (1 << 2)
1772#define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_MASK BITFIELD(2, 2)
1773
1774/* Used by PM_L4PER_MCASP3_WKDEP */
1775#define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_SHIFT (1 << 7)
1776#define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_MASK BITFIELD(7, 7)
1777
1778/* Used by PM_L4PER_MCASP3_WKDEP */
1779#define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_SHIFT (1 << 6)
1780#define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_MASK BITFIELD(6, 6)
1781
1782/* Used by PM_L4PER_MCASP3_WKDEP */
1783#define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_SHIFT (1 << 0)
1784#define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_MASK BITFIELD(0, 0)
1785
1786/* Used by PM_L4PER_MCASP3_WKDEP */
1787#define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_SHIFT (1 << 2)
1788#define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_MASK BITFIELD(2, 2)
1789
1790/* Used by PM_ABE_MCBSP1_WKDEP */
1791#define OMAP4430_WKUPDEP_MCBSP1_MPU_SHIFT (1 << 0)
1792#define OMAP4430_WKUPDEP_MCBSP1_MPU_MASK BITFIELD(0, 0)
1793
1794/* Used by PM_ABE_MCBSP1_WKDEP */
1795#define OMAP4430_WKUPDEP_MCBSP1_SDMA_SHIFT (1 << 3)
1796#define OMAP4430_WKUPDEP_MCBSP1_SDMA_MASK BITFIELD(3, 3)
1797
1798/* Used by PM_ABE_MCBSP1_WKDEP */
1799#define OMAP4430_WKUPDEP_MCBSP1_TESLA_SHIFT (1 << 2)
1800#define OMAP4430_WKUPDEP_MCBSP1_TESLA_MASK BITFIELD(2, 2)
1801
1802/* Used by PM_ABE_MCBSP2_WKDEP */
1803#define OMAP4430_WKUPDEP_MCBSP2_MPU_SHIFT (1 << 0)
1804#define OMAP4430_WKUPDEP_MCBSP2_MPU_MASK BITFIELD(0, 0)
1805
1806/* Used by PM_ABE_MCBSP2_WKDEP */
1807#define OMAP4430_WKUPDEP_MCBSP2_SDMA_SHIFT (1 << 3)
1808#define OMAP4430_WKUPDEP_MCBSP2_SDMA_MASK BITFIELD(3, 3)
1809
1810/* Used by PM_ABE_MCBSP2_WKDEP */
1811#define OMAP4430_WKUPDEP_MCBSP2_TESLA_SHIFT (1 << 2)
1812#define OMAP4430_WKUPDEP_MCBSP2_TESLA_MASK BITFIELD(2, 2)
1813
1814/* Used by PM_ABE_MCBSP3_WKDEP */
1815#define OMAP4430_WKUPDEP_MCBSP3_MPU_SHIFT (1 << 0)
1816#define OMAP4430_WKUPDEP_MCBSP3_MPU_MASK BITFIELD(0, 0)
1817
1818/* Used by PM_ABE_MCBSP3_WKDEP */
1819#define OMAP4430_WKUPDEP_MCBSP3_SDMA_SHIFT (1 << 3)
1820#define OMAP4430_WKUPDEP_MCBSP3_SDMA_MASK BITFIELD(3, 3)
1821
1822/* Used by PM_ABE_MCBSP3_WKDEP */
1823#define OMAP4430_WKUPDEP_MCBSP3_TESLA_SHIFT (1 << 2)
1824#define OMAP4430_WKUPDEP_MCBSP3_TESLA_MASK BITFIELD(2, 2)
1825
1826/* Used by PM_L4PER_MCBSP4_WKDEP */
1827#define OMAP4430_WKUPDEP_MCBSP4_MPU_SHIFT (1 << 0)
1828#define OMAP4430_WKUPDEP_MCBSP4_MPU_MASK BITFIELD(0, 0)
1829
1830/* Used by PM_L4PER_MCBSP4_WKDEP */
1831#define OMAP4430_WKUPDEP_MCBSP4_SDMA_SHIFT (1 << 3)
1832#define OMAP4430_WKUPDEP_MCBSP4_SDMA_MASK BITFIELD(3, 3)
1833
1834/* Used by PM_L4PER_MCBSP4_WKDEP */
1835#define OMAP4430_WKUPDEP_MCBSP4_TESLA_SHIFT (1 << 2)
1836#define OMAP4430_WKUPDEP_MCBSP4_TESLA_MASK BITFIELD(2, 2)
1837
1838/* Used by PM_L4PER_MCSPI1_WKDEP */
1839#define OMAP4430_WKUPDEP_MCSPI1_DUCATI_SHIFT (1 << 1)
1840#define OMAP4430_WKUPDEP_MCSPI1_DUCATI_MASK BITFIELD(1, 1)
1841
1842/* Used by PM_L4PER_MCSPI1_WKDEP */
1843#define OMAP4430_WKUPDEP_MCSPI1_MPU_SHIFT (1 << 0)
1844#define OMAP4430_WKUPDEP_MCSPI1_MPU_MASK BITFIELD(0, 0)
1845
1846/* Used by PM_L4PER_MCSPI1_WKDEP */
1847#define OMAP4430_WKUPDEP_MCSPI1_SDMA_SHIFT (1 << 3)
1848#define OMAP4430_WKUPDEP_MCSPI1_SDMA_MASK BITFIELD(3, 3)
1849
1850/* Used by PM_L4PER_MCSPI1_WKDEP */
1851#define OMAP4430_WKUPDEP_MCSPI1_TESLA_SHIFT (1 << 2)
1852#define OMAP4430_WKUPDEP_MCSPI1_TESLA_MASK BITFIELD(2, 2)
1853
1854/* Used by PM_L4PER_MCSPI2_WKDEP */
1855#define OMAP4430_WKUPDEP_MCSPI2_DUCATI_SHIFT (1 << 1)
1856#define OMAP4430_WKUPDEP_MCSPI2_DUCATI_MASK BITFIELD(1, 1)
1857
1858/* Used by PM_L4PER_MCSPI2_WKDEP */
1859#define OMAP4430_WKUPDEP_MCSPI2_MPU_SHIFT (1 << 0)
1860#define OMAP4430_WKUPDEP_MCSPI2_MPU_MASK BITFIELD(0, 0)
1861
1862/* Used by PM_L4PER_MCSPI2_WKDEP */
1863#define OMAP4430_WKUPDEP_MCSPI2_SDMA_SHIFT (1 << 3)
1864#define OMAP4430_WKUPDEP_MCSPI2_SDMA_MASK BITFIELD(3, 3)
1865
1866/* Used by PM_L4PER_MCSPI3_WKDEP */
1867#define OMAP4430_WKUPDEP_MCSPI3_MPU_SHIFT (1 << 0)
1868#define OMAP4430_WKUPDEP_MCSPI3_MPU_MASK BITFIELD(0, 0)
1869
1870/* Used by PM_L4PER_MCSPI3_WKDEP */
1871#define OMAP4430_WKUPDEP_MCSPI3_SDMA_SHIFT (1 << 3)
1872#define OMAP4430_WKUPDEP_MCSPI3_SDMA_MASK BITFIELD(3, 3)
1873
1874/* Used by PM_L4PER_MCSPI4_WKDEP */
1875#define OMAP4430_WKUPDEP_MCSPI4_MPU_SHIFT (1 << 0)
1876#define OMAP4430_WKUPDEP_MCSPI4_MPU_MASK BITFIELD(0, 0)
1877
1878/* Used by PM_L4PER_MCSPI4_WKDEP */
1879#define OMAP4430_WKUPDEP_MCSPI4_SDMA_SHIFT (1 << 3)
1880#define OMAP4430_WKUPDEP_MCSPI4_SDMA_MASK BITFIELD(3, 3)
1881
1882/* Used by PM_L3INIT_MMC1_WKDEP */
1883#define OMAP4430_WKUPDEP_MMC1_DUCATI_SHIFT (1 << 1)
1884#define OMAP4430_WKUPDEP_MMC1_DUCATI_MASK BITFIELD(1, 1)
1885
1886/* Used by PM_L3INIT_MMC1_WKDEP */
1887#define OMAP4430_WKUPDEP_MMC1_MPU_SHIFT (1 << 0)
1888#define OMAP4430_WKUPDEP_MMC1_MPU_MASK BITFIELD(0, 0)
1889
1890/* Used by PM_L3INIT_MMC1_WKDEP */
1891#define OMAP4430_WKUPDEP_MMC1_SDMA_SHIFT (1 << 3)
1892#define OMAP4430_WKUPDEP_MMC1_SDMA_MASK BITFIELD(3, 3)
1893
1894/* Used by PM_L3INIT_MMC1_WKDEP */
1895#define OMAP4430_WKUPDEP_MMC1_TESLA_SHIFT (1 << 2)
1896#define OMAP4430_WKUPDEP_MMC1_TESLA_MASK BITFIELD(2, 2)
1897
1898/* Used by PM_L3INIT_MMC2_WKDEP */
1899#define OMAP4430_WKUPDEP_MMC2_DUCATI_SHIFT (1 << 1)
1900#define OMAP4430_WKUPDEP_MMC2_DUCATI_MASK BITFIELD(1, 1)
1901
1902/* Used by PM_L3INIT_MMC2_WKDEP */
1903#define OMAP4430_WKUPDEP_MMC2_MPU_SHIFT (1 << 0)
1904#define OMAP4430_WKUPDEP_MMC2_MPU_MASK BITFIELD(0, 0)
1905
1906/* Used by PM_L3INIT_MMC2_WKDEP */
1907#define OMAP4430_WKUPDEP_MMC2_SDMA_SHIFT (1 << 3)
1908#define OMAP4430_WKUPDEP_MMC2_SDMA_MASK BITFIELD(3, 3)
1909
1910/* Used by PM_L3INIT_MMC2_WKDEP */
1911#define OMAP4430_WKUPDEP_MMC2_TESLA_SHIFT (1 << 2)
1912#define OMAP4430_WKUPDEP_MMC2_TESLA_MASK BITFIELD(2, 2)
1913
1914/* Used by PM_L3INIT_MMC6_WKDEP */
1915#define OMAP4430_WKUPDEP_MMC6_DUCATI_SHIFT (1 << 1)
1916#define OMAP4430_WKUPDEP_MMC6_DUCATI_MASK BITFIELD(1, 1)
1917
1918/* Used by PM_L3INIT_MMC6_WKDEP */
1919#define OMAP4430_WKUPDEP_MMC6_MPU_SHIFT (1 << 0)
1920#define OMAP4430_WKUPDEP_MMC6_MPU_MASK BITFIELD(0, 0)
1921
1922/* Used by PM_L3INIT_MMC6_WKDEP */
1923#define OMAP4430_WKUPDEP_MMC6_TESLA_SHIFT (1 << 2)
1924#define OMAP4430_WKUPDEP_MMC6_TESLA_MASK BITFIELD(2, 2)
1925
1926/* Used by PM_L4PER_MMCSD3_WKDEP */
1927#define OMAP4430_WKUPDEP_MMCSD3_DUCATI_SHIFT (1 << 1)
1928#define OMAP4430_WKUPDEP_MMCSD3_DUCATI_MASK BITFIELD(1, 1)
1929
1930/* Used by PM_L4PER_MMCSD3_WKDEP */
1931#define OMAP4430_WKUPDEP_MMCSD3_MPU_SHIFT (1 << 0)
1932#define OMAP4430_WKUPDEP_MMCSD3_MPU_MASK BITFIELD(0, 0)
1933
1934/* Used by PM_L4PER_MMCSD3_WKDEP */
1935#define OMAP4430_WKUPDEP_MMCSD3_SDMA_SHIFT (1 << 3)
1936#define OMAP4430_WKUPDEP_MMCSD3_SDMA_MASK BITFIELD(3, 3)
1937
1938/* Used by PM_L4PER_MMCSD4_WKDEP */
1939#define OMAP4430_WKUPDEP_MMCSD4_DUCATI_SHIFT (1 << 1)
1940#define OMAP4430_WKUPDEP_MMCSD4_DUCATI_MASK BITFIELD(1, 1)
1941
1942/* Used by PM_L4PER_MMCSD4_WKDEP */
1943#define OMAP4430_WKUPDEP_MMCSD4_MPU_SHIFT (1 << 0)
1944#define OMAP4430_WKUPDEP_MMCSD4_MPU_MASK BITFIELD(0, 0)
1945
1946/* Used by PM_L4PER_MMCSD4_WKDEP */
1947#define OMAP4430_WKUPDEP_MMCSD4_SDMA_SHIFT (1 << 3)
1948#define OMAP4430_WKUPDEP_MMCSD4_SDMA_MASK BITFIELD(3, 3)
1949
1950/* Used by PM_L4PER_MMCSD5_WKDEP */
1951#define OMAP4430_WKUPDEP_MMCSD5_DUCATI_SHIFT (1 << 1)
1952#define OMAP4430_WKUPDEP_MMCSD5_DUCATI_MASK BITFIELD(1, 1)
1953
1954/* Used by PM_L4PER_MMCSD5_WKDEP */
1955#define OMAP4430_WKUPDEP_MMCSD5_MPU_SHIFT (1 << 0)
1956#define OMAP4430_WKUPDEP_MMCSD5_MPU_MASK BITFIELD(0, 0)
1957
1958/* Used by PM_L4PER_MMCSD5_WKDEP */
1959#define OMAP4430_WKUPDEP_MMCSD5_SDMA_SHIFT (1 << 3)
1960#define OMAP4430_WKUPDEP_MMCSD5_SDMA_MASK BITFIELD(3, 3)
1961
1962/* Used by PM_L3INIT_PCIESS_WKDEP */
1963#define OMAP4430_WKUPDEP_PCIESS_MPU_SHIFT (1 << 0)
1964#define OMAP4430_WKUPDEP_PCIESS_MPU_MASK BITFIELD(0, 0)
1965
1966/* Used by PM_L3INIT_PCIESS_WKDEP */
1967#define OMAP4430_WKUPDEP_PCIESS_TESLA_SHIFT (1 << 2)
1968#define OMAP4430_WKUPDEP_PCIESS_TESLA_MASK BITFIELD(2, 2)
1969
1970/* Used by PM_ABE_PDM_WKDEP */
1971#define OMAP4430_WKUPDEP_PDM_DMA_SDMA_SHIFT (1 << 7)
1972#define OMAP4430_WKUPDEP_PDM_DMA_SDMA_MASK BITFIELD(7, 7)
1973
1974/* Used by PM_ABE_PDM_WKDEP */
1975#define OMAP4430_WKUPDEP_PDM_DMA_TESLA_SHIFT (1 << 6)
1976#define OMAP4430_WKUPDEP_PDM_DMA_TESLA_MASK BITFIELD(6, 6)
1977
1978/* Used by PM_ABE_PDM_WKDEP */
1979#define OMAP4430_WKUPDEP_PDM_IRQ_MPU_SHIFT (1 << 0)
1980#define OMAP4430_WKUPDEP_PDM_IRQ_MPU_MASK BITFIELD(0, 0)
1981
1982/* Used by PM_ABE_PDM_WKDEP */
1983#define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_SHIFT (1 << 2)
1984#define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_MASK BITFIELD(2, 2)
1985
1986/* Used by PM_WKUP_RTC_WKDEP */
1987#define OMAP4430_WKUPDEP_RTC_MPU_SHIFT (1 << 0)
1988#define OMAP4430_WKUPDEP_RTC_MPU_MASK BITFIELD(0, 0)
1989
1990/* Used by PM_L3INIT_SATA_WKDEP */
1991#define OMAP4430_WKUPDEP_SATA_MPU_SHIFT (1 << 0)
1992#define OMAP4430_WKUPDEP_SATA_MPU_MASK BITFIELD(0, 0)
1993
1994/* Used by PM_L3INIT_SATA_WKDEP */
1995#define OMAP4430_WKUPDEP_SATA_TESLA_SHIFT (1 << 2)
1996#define OMAP4430_WKUPDEP_SATA_TESLA_MASK BITFIELD(2, 2)
1997
1998/* Used by PM_ABE_SLIMBUS_WKDEP */
1999#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT (1 << 7)
2000#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK BITFIELD(7, 7)
2001
2002/* Used by PM_ABE_SLIMBUS_WKDEP */
2003#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_SHIFT (1 << 6)
2004#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_MASK BITFIELD(6, 6)
2005
2006/* Used by PM_ABE_SLIMBUS_WKDEP */
2007#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT (1 << 0)
2008#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK BITFIELD(0, 0)
2009
2010/* Used by PM_ABE_SLIMBUS_WKDEP */
2011#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_SHIFT (1 << 2)
2012#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_MASK BITFIELD(2, 2)
2013
2014/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2015#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_SHIFT (1 << 7)
2016#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_MASK BITFIELD(7, 7)
2017
2018/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2019#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_SHIFT (1 << 6)
2020#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_MASK BITFIELD(6, 6)
2021
2022/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2023#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_SHIFT (1 << 0)
2024#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_MASK BITFIELD(0, 0)
2025
2026/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2027#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_SHIFT (1 << 2)
2028#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_MASK BITFIELD(2, 2)
2029
2030/* Used by PM_ALWON_SR_CORE_WKDEP */
2031#define OMAP4430_WKUPDEP_SR_CORE_DUCATI_SHIFT (1 << 1)
2032#define OMAP4430_WKUPDEP_SR_CORE_DUCATI_MASK BITFIELD(1, 1)
2033
2034/* Used by PM_ALWON_SR_CORE_WKDEP */
2035#define OMAP4430_WKUPDEP_SR_CORE_MPU_SHIFT (1 << 0)
2036#define OMAP4430_WKUPDEP_SR_CORE_MPU_MASK BITFIELD(0, 0)
2037
2038/* Used by PM_ALWON_SR_IVA_WKDEP */
2039#define OMAP4430_WKUPDEP_SR_IVA_DUCATI_SHIFT (1 << 1)
2040#define OMAP4430_WKUPDEP_SR_IVA_DUCATI_MASK BITFIELD(1, 1)
2041
2042/* Used by PM_ALWON_SR_IVA_WKDEP */
2043#define OMAP4430_WKUPDEP_SR_IVA_MPU_SHIFT (1 << 0)
2044#define OMAP4430_WKUPDEP_SR_IVA_MPU_MASK BITFIELD(0, 0)
2045
2046/* Used by PM_ALWON_SR_MPU_WKDEP */
2047#define OMAP4430_WKUPDEP_SR_MPU_MPU_SHIFT (1 << 0)
2048#define OMAP4430_WKUPDEP_SR_MPU_MPU_MASK BITFIELD(0, 0)
2049
2050/* Used by PM_WKUP_TIMER12_WKDEP */
2051#define OMAP4430_WKUPDEP_TIMER12_MPU_SHIFT (1 << 0)
2052#define OMAP4430_WKUPDEP_TIMER12_MPU_MASK BITFIELD(0, 0)
2053
2054/* Used by PM_WKUP_TIMER1_WKDEP */
2055#define OMAP4430_WKUPDEP_TIMER1_MPU_SHIFT (1 << 0)
2056#define OMAP4430_WKUPDEP_TIMER1_MPU_MASK BITFIELD(0, 0)
2057
2058/* Used by PM_ABE_TIMER5_WKDEP */
2059#define OMAP4430_WKUPDEP_TIMER5_MPU_SHIFT (1 << 0)
2060#define OMAP4430_WKUPDEP_TIMER5_MPU_MASK BITFIELD(0, 0)
2061
2062/* Used by PM_ABE_TIMER5_WKDEP */
2063#define OMAP4430_WKUPDEP_TIMER5_TESLA_SHIFT (1 << 2)
2064#define OMAP4430_WKUPDEP_TIMER5_TESLA_MASK BITFIELD(2, 2)
2065
2066/* Used by PM_ABE_TIMER6_WKDEP */
2067#define OMAP4430_WKUPDEP_TIMER6_MPU_SHIFT (1 << 0)
2068#define OMAP4430_WKUPDEP_TIMER6_MPU_MASK BITFIELD(0, 0)
2069
2070/* Used by PM_ABE_TIMER6_WKDEP */
2071#define OMAP4430_WKUPDEP_TIMER6_TESLA_SHIFT (1 << 2)
2072#define OMAP4430_WKUPDEP_TIMER6_TESLA_MASK BITFIELD(2, 2)
2073
2074/* Used by PM_ABE_TIMER7_WKDEP */
2075#define OMAP4430_WKUPDEP_TIMER7_MPU_SHIFT (1 << 0)
2076#define OMAP4430_WKUPDEP_TIMER7_MPU_MASK BITFIELD(0, 0)
2077
2078/* Used by PM_ABE_TIMER7_WKDEP */
2079#define OMAP4430_WKUPDEP_TIMER7_TESLA_SHIFT (1 << 2)
2080#define OMAP4430_WKUPDEP_TIMER7_TESLA_MASK BITFIELD(2, 2)
2081
2082/* Used by PM_ABE_TIMER8_WKDEP */
2083#define OMAP4430_WKUPDEP_TIMER8_MPU_SHIFT (1 << 0)
2084#define OMAP4430_WKUPDEP_TIMER8_MPU_MASK BITFIELD(0, 0)
2085
2086/* Used by PM_ABE_TIMER8_WKDEP */
2087#define OMAP4430_WKUPDEP_TIMER8_TESLA_SHIFT (1 << 2)
2088#define OMAP4430_WKUPDEP_TIMER8_TESLA_MASK BITFIELD(2, 2)
2089
2090/* Used by PM_L4PER_UART1_WKDEP */
2091#define OMAP4430_WKUPDEP_UART1_MPU_SHIFT (1 << 0)
2092#define OMAP4430_WKUPDEP_UART1_MPU_MASK BITFIELD(0, 0)
2093
2094/* Used by PM_L4PER_UART1_WKDEP */
2095#define OMAP4430_WKUPDEP_UART1_SDMA_SHIFT (1 << 3)
2096#define OMAP4430_WKUPDEP_UART1_SDMA_MASK BITFIELD(3, 3)
2097
2098/* Used by PM_L4PER_UART2_WKDEP */
2099#define OMAP4430_WKUPDEP_UART2_MPU_SHIFT (1 << 0)
2100#define OMAP4430_WKUPDEP_UART2_MPU_MASK BITFIELD(0, 0)
2101
2102/* Used by PM_L4PER_UART2_WKDEP */
2103#define OMAP4430_WKUPDEP_UART2_SDMA_SHIFT (1 << 3)
2104#define OMAP4430_WKUPDEP_UART2_SDMA_MASK BITFIELD(3, 3)
2105
2106/* Used by PM_L4PER_UART3_WKDEP */
2107#define OMAP4430_WKUPDEP_UART3_DUCATI_SHIFT (1 << 1)
2108#define OMAP4430_WKUPDEP_UART3_DUCATI_MASK BITFIELD(1, 1)
2109
2110/* Used by PM_L4PER_UART3_WKDEP */
2111#define OMAP4430_WKUPDEP_UART3_MPU_SHIFT (1 << 0)
2112#define OMAP4430_WKUPDEP_UART3_MPU_MASK BITFIELD(0, 0)
2113
2114/* Used by PM_L4PER_UART3_WKDEP */
2115#define OMAP4430_WKUPDEP_UART3_SDMA_SHIFT (1 << 3)
2116#define OMAP4430_WKUPDEP_UART3_SDMA_MASK BITFIELD(3, 3)
2117
2118/* Used by PM_L4PER_UART3_WKDEP */
2119#define OMAP4430_WKUPDEP_UART3_TESLA_SHIFT (1 << 2)
2120#define OMAP4430_WKUPDEP_UART3_TESLA_MASK BITFIELD(2, 2)
2121
2122/* Used by PM_L4PER_UART4_WKDEP */
2123#define OMAP4430_WKUPDEP_UART4_MPU_SHIFT (1 << 0)
2124#define OMAP4430_WKUPDEP_UART4_MPU_MASK BITFIELD(0, 0)
2125
2126/* Used by PM_L4PER_UART4_WKDEP */
2127#define OMAP4430_WKUPDEP_UART4_SDMA_SHIFT (1 << 3)
2128#define OMAP4430_WKUPDEP_UART4_SDMA_MASK BITFIELD(3, 3)
2129
2130/* Used by PM_L3INIT_UNIPRO1_WKDEP */
2131#define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_SHIFT (1 << 1)
2132#define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_MASK BITFIELD(1, 1)
2133
2134/* Used by PM_L3INIT_UNIPRO1_WKDEP */
2135#define OMAP4430_WKUPDEP_UNIPRO1_MPU_SHIFT (1 << 0)
2136#define OMAP4430_WKUPDEP_UNIPRO1_MPU_MASK BITFIELD(0, 0)
2137
2138/* Used by PM_L3INIT_USB_HOST_WKDEP */
2139#define OMAP4430_WKUPDEP_USB_HOST_DUCATI_SHIFT (1 << 1)
2140#define OMAP4430_WKUPDEP_USB_HOST_DUCATI_MASK BITFIELD(1, 1)
2141
2142/* Used by PM_L3INIT_USB_HOST_FS_WKDEP */
2143#define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_SHIFT (1 << 1)
2144#define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_MASK BITFIELD(1, 1)
2145
2146/* Used by PM_L3INIT_USB_HOST_FS_WKDEP */
2147#define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_SHIFT (1 << 0)
2148#define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_MASK BITFIELD(0, 0)
2149
2150/* Used by PM_L3INIT_USB_HOST_WKDEP */
2151#define OMAP4430_WKUPDEP_USB_HOST_MPU_SHIFT (1 << 0)
2152#define OMAP4430_WKUPDEP_USB_HOST_MPU_MASK BITFIELD(0, 0)
2153
2154/* Used by PM_L3INIT_USB_OTG_WKDEP */
2155#define OMAP4430_WKUPDEP_USB_OTG_DUCATI_SHIFT (1 << 1)
2156#define OMAP4430_WKUPDEP_USB_OTG_DUCATI_MASK BITFIELD(1, 1)
2157
2158/* Used by PM_L3INIT_USB_OTG_WKDEP */
2159#define OMAP4430_WKUPDEP_USB_OTG_MPU_SHIFT (1 << 0)
2160#define OMAP4430_WKUPDEP_USB_OTG_MPU_MASK BITFIELD(0, 0)
2161
2162/* Used by PM_L3INIT_USB_TLL_WKDEP */
2163#define OMAP4430_WKUPDEP_USB_TLL_DUCATI_SHIFT (1 << 1)
2164#define OMAP4430_WKUPDEP_USB_TLL_DUCATI_MASK BITFIELD(1, 1)
2165
2166/* Used by PM_L3INIT_USB_TLL_WKDEP */
2167#define OMAP4430_WKUPDEP_USB_TLL_MPU_SHIFT (1 << 0)
2168#define OMAP4430_WKUPDEP_USB_TLL_MPU_MASK BITFIELD(0, 0)
2169
2170/* Used by PM_WKUP_USIM_WKDEP */
2171#define OMAP4430_WKUPDEP_USIM_MPU_SHIFT (1 << 0)
2172#define OMAP4430_WKUPDEP_USIM_MPU_MASK BITFIELD(0, 0)
2173
2174/* Used by PM_WKUP_USIM_WKDEP */
2175#define OMAP4430_WKUPDEP_USIM_SDMA_SHIFT (1 << 3)
2176#define OMAP4430_WKUPDEP_USIM_SDMA_MASK BITFIELD(3, 3)
2177
2178/* Used by PM_WKUP_WDT2_WKDEP */
2179#define OMAP4430_WKUPDEP_WDT2_DUCATI_SHIFT (1 << 1)
2180#define OMAP4430_WKUPDEP_WDT2_DUCATI_MASK BITFIELD(1, 1)
2181
2182/* Used by PM_WKUP_WDT2_WKDEP */
2183#define OMAP4430_WKUPDEP_WDT2_MPU_SHIFT (1 << 0)
2184#define OMAP4430_WKUPDEP_WDT2_MPU_MASK BITFIELD(0, 0)
2185
2186/* Used by PM_ABE_WDT3_WKDEP */
2187#define OMAP4430_WKUPDEP_WDT3_MPU_SHIFT (1 << 0)
2188#define OMAP4430_WKUPDEP_WDT3_MPU_MASK BITFIELD(0, 0)
2189
2190/* Used by PM_L3INIT_HSI_WKDEP */
2191#define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_SHIFT (1 << 8)
2192#define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_MASK BITFIELD(8, 8)
2193
2194/* Used by PM_L3INIT_XHPI_WKDEP */
2195#define OMAP4430_WKUPDEP_XHPI_DUCATI_SHIFT (1 << 1)
2196#define OMAP4430_WKUPDEP_XHPI_DUCATI_MASK BITFIELD(1, 1)
2197
2198/* Used by PRM_IO_PMCTRL */
2199#define OMAP4430_WUCLK_CTRL_SHIFT (1 << 8)
2200#define OMAP4430_WUCLK_CTRL_MASK BITFIELD(8, 8)
2201
2202/* Used by PRM_IO_PMCTRL */
2203#define OMAP4430_WUCLK_STATUS_SHIFT (1 << 9)
2204#define OMAP4430_WUCLK_STATUS_MASK BITFIELD(9, 9)
2205#endif
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index a117f853ea39..ea050ce188a7 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -4,8 +4,8 @@
4/* 4/*
5 * OMAP2/3 Power/Reset Management (PRM) register definitions 5 * OMAP2/3 Power/Reset Management (PRM) register definitions
6 * 6 *
7 * Copyright (C) 2007 Texas Instruments, Inc. 7 * Copyright (C) 2007-2009 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation 8 * Copyright (C) 2009 Nokia Corporation
9 * 9 *
10 * Written by Paul Walmsley 10 * Written by Paul Walmsley
11 * 11 *
@@ -22,6 +22,10 @@
22 OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) 22 OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))
23#define OMAP34XX_PRM_REGADDR(module, reg) \ 23#define OMAP34XX_PRM_REGADDR(module, reg) \
24 OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) 24 OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))
25#define OMAP44XX_PRM_REGADDR(module, reg) \
26 OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (module) + (reg))
27
28#include "prm44xx.h"
25 29
26/* 30/*
27 * Architecture-specific global PRM registers 31 * Architecture-specific global PRM registers
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
new file mode 100644
index 000000000000..89be97f0589d
--- /dev/null
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -0,0 +1,411 @@
1/*
2 * OMAP44xx PRM instance offset macros
3 *
4 * Copyright (C) 2009 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation.
20 */
21
22#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_H
23#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H
24
25
26/* PRM */
27
28
29/* PRM.OCP_SOCKET_PRM register offsets */
30#define OMAP4430_REVISION_PRM OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0000)
31#define OMAP4430_PRM_IRQSTATUS_MPU OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0010)
32#define OMAP4430_PRM_IRQSTATUS_MPU_2 OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0014)
33#define OMAP4430_PRM_IRQENABLE_MPU OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0018)
34#define OMAP4430_PRM_IRQENABLE_MPU_2 OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x001c)
35#define OMAP4430_PRM_IRQSTATUS_DUCATI OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0020)
36#define OMAP4430_PRM_IRQENABLE_DUCATI OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0028)
37#define OMAP4430_PRM_IRQSTATUS_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0030)
38#define OMAP4430_PRM_IRQENABLE_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0038)
39#define OMAP4430_PRM_PRM_PROFILING_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0040)
40
41/* PRM.CKGEN_PRM register offsets */
42#define OMAP4430_CM_ABE_DSS_SYS_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0000)
43#define OMAP4430_CM_DPLL_SYS_REF_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0004)
44#define OMAP4430_CM_L4_WKUP_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0008)
45#define OMAP4430_CM_ABE_PLL_REF_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x000c)
46#define OMAP4430_CM_SYS_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0010)
47
48/* PRM.MPU_PRM register offsets */
49#define OMAP4430_PM_MPU_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_MPU_MOD, 0x0000)
50#define OMAP4430_PM_MPU_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_MPU_MOD, 0x0004)
51#define OMAP4430_RM_MPU_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_MPU_MOD, 0x0014)
52#define OMAP4430_RM_MPU_MPU_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_MPU_MOD, 0x0024)
53
54/* PRM.TESLA_PRM register offsets */
55#define OMAP4430_PM_TESLA_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_TESLA_MOD, 0x0000)
56#define OMAP4430_PM_TESLA_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_TESLA_MOD, 0x0004)
57#define OMAP4430_RM_TESLA_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_TESLA_MOD, 0x0010)
58#define OMAP4430_RM_TESLA_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_TESLA_MOD, 0x0014)
59#define OMAP4430_RM_TESLA_TESLA_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_TESLA_MOD, 0x0024)
60
61/* PRM.ABE_PRM register offsets */
62#define OMAP4430_PM_ABE_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0000)
63#define OMAP4430_PM_ABE_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0004)
64#define OMAP4430_RM_ABE_AESS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x002c)
65#define OMAP4430_PM_ABE_PDM_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0030)
66#define OMAP4430_RM_ABE_PDM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0034)
67#define OMAP4430_PM_ABE_DMIC_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0038)
68#define OMAP4430_RM_ABE_DMIC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x003c)
69#define OMAP4430_PM_ABE_MCASP_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0040)
70#define OMAP4430_RM_ABE_MCASP_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0044)
71#define OMAP4430_PM_ABE_MCBSP1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0048)
72#define OMAP4430_RM_ABE_MCBSP1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x004c)
73#define OMAP4430_PM_ABE_MCBSP2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0050)
74#define OMAP4430_RM_ABE_MCBSP2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0054)
75#define OMAP4430_PM_ABE_MCBSP3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0058)
76#define OMAP4430_RM_ABE_MCBSP3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x005c)
77#define OMAP4430_PM_ABE_SLIMBUS_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0060)
78#define OMAP4430_RM_ABE_SLIMBUS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0064)
79#define OMAP4430_PM_ABE_TIMER5_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0068)
80#define OMAP4430_RM_ABE_TIMER5_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x006c)
81#define OMAP4430_PM_ABE_TIMER6_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0070)
82#define OMAP4430_RM_ABE_TIMER6_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0074)
83#define OMAP4430_PM_ABE_TIMER7_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0078)
84#define OMAP4430_RM_ABE_TIMER7_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x007c)
85#define OMAP4430_PM_ABE_TIMER8_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0080)
86#define OMAP4430_RM_ABE_TIMER8_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0084)
87#define OMAP4430_PM_ABE_WDT3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x0088)
88#define OMAP4430_RM_ABE_WDT3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ABE_MOD, 0x008c)
89
90/* PRM.ALWAYS_ON_PRM register offsets */
91#define OMAP4430_RM_ALWON_MDMINTC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x0024)
92#define OMAP4430_PM_ALWON_SR_MPU_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x0028)
93#define OMAP4430_RM_ALWON_SR_MPU_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x002c)
94#define OMAP4430_PM_ALWON_SR_IVA_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x0030)
95#define OMAP4430_RM_ALWON_SR_IVA_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x0034)
96#define OMAP4430_PM_ALWON_SR_CORE_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x0038)
97#define OMAP4430_RM_ALWON_SR_CORE_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_ALWAYS_ON_MOD, 0x003c)
98
99/* PRM.CORE_PRM register offsets */
100#define OMAP4430_PM_CORE_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0000)
101#define OMAP4430_PM_CORE_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0004)
102#define OMAP4430_RM_L3_1_L3_1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0024)
103#define OMAP4430_RM_L3_2_L3_2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0124)
104#define OMAP4430_RM_L3_2_GPMC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x012c)
105#define OMAP4430_RM_L3_2_OCMC_RAM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0134)
106#define OMAP4430_RM_DUCATI_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0210)
107#define OMAP4430_RM_DUCATI_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0214)
108#define OMAP4430_RM_DUCATI_DUCATI_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0224)
109#define OMAP4430_RM_SDMA_SDMA_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0324)
110#define OMAP4430_RM_MEMIF_DMM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0424)
111#define OMAP4430_RM_MEMIF_EMIF_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x042c)
112#define OMAP4430_RM_MEMIF_EMIF_1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0434)
113#define OMAP4430_RM_MEMIF_EMIF_2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x043c)
114#define OMAP4430_RM_MEMIF_DLL_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0444)
115#define OMAP4430_RM_MEMIF_EMIF_H1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0454)
116#define OMAP4430_RM_MEMIF_EMIF_H2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x045c)
117#define OMAP4430_RM_MEMIF_DLL_H_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0464)
118#define OMAP4430_RM_D2D_SAD2D_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0524)
119#define OMAP4430_RM_D2D_MODEM_ICR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x052c)
120#define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0534)
121#define OMAP4430_RM_L4CFG_L4_CFG_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0624)
122#define OMAP4430_RM_L4CFG_HW_SEM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x062c)
123#define OMAP4430_RM_L4CFG_MAILBOX_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0634)
124#define OMAP4430_RM_L4CFG_SAR_ROM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x063c)
125#define OMAP4430_RM_L3INSTR_L3_3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0724)
126#define OMAP4430_RM_L3INSTR_L3_INSTR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x072c)
127#define OMAP4430_RM_L3INSTR_OCP_WP1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_MOD, 0x0744)
128
129/* PRM.IVAHD_PRM register offsets */
130#define OMAP4430_PM_IVAHD_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x0000)
131#define OMAP4430_PM_IVAHD_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x0004)
132#define OMAP4430_RM_IVAHD_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x0010)
133#define OMAP4430_RM_IVAHD_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x0014)
134#define OMAP4430_RM_IVAHD_IVAHD_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x0024)
135#define OMAP4430_RM_IVAHD_SL2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_IVAHD_MOD, 0x002c)
136
137/* PRM.CAM_PRM register offsets */
138#define OMAP4430_PM_CAM_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CAM_MOD, 0x0000)
139#define OMAP4430_PM_CAM_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CAM_MOD, 0x0004)
140#define OMAP4430_RM_CAM_ISS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CAM_MOD, 0x0024)
141#define OMAP4430_RM_CAM_FDIF_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CAM_MOD, 0x002c)
142
143/* PRM.DSS_PRM register offsets */
144#define OMAP4430_PM_DSS_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DSS_MOD, 0x0000)
145#define OMAP4430_PM_DSS_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DSS_MOD, 0x0004)
146#define OMAP4430_PM_DSS_DSS_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DSS_MOD, 0x0020)
147#define OMAP4430_RM_DSS_DSS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DSS_MOD, 0x0024)
148#define OMAP4430_RM_DSS_DEISS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DSS_MOD, 0x002c)
149
150/* PRM.GFX_PRM register offsets */
151#define OMAP4430_PM_GFX_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_GFX_MOD, 0x0000)
152#define OMAP4430_PM_GFX_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_GFX_MOD, 0x0004)
153#define OMAP4430_RM_GFX_GFX_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_GFX_MOD, 0x0024)
154
155/* PRM.L3INIT_PRM register offsets */
156#define OMAP4430_PM_L3INIT_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0000)
157#define OMAP4430_PM_L3INIT_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0004)
158#define OMAP4430_PM_L3INIT_MMC1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0028)
159#define OMAP4430_RM_L3INIT_MMC1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x002c)
160#define OMAP4430_PM_L3INIT_MMC2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0030)
161#define OMAP4430_RM_L3INIT_MMC2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0034)
162#define OMAP4430_PM_L3INIT_HSI_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0038)
163#define OMAP4430_RM_L3INIT_HSI_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x003c)
164#define OMAP4430_PM_L3INIT_UNIPRO1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0040)
165#define OMAP4430_RM_L3INIT_UNIPRO1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0044)
166#define OMAP4430_PM_L3INIT_USB_HOST_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0058)
167#define OMAP4430_RM_L3INIT_USB_HOST_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x005c)
168#define OMAP4430_PM_L3INIT_USB_OTG_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0060)
169#define OMAP4430_RM_L3INIT_USB_OTG_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0064)
170#define OMAP4430_PM_L3INIT_USB_TLL_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0068)
171#define OMAP4430_RM_L3INIT_USB_TLL_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x006c)
172#define OMAP4430_RM_L3INIT_P1500_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x007c)
173#define OMAP4430_RM_L3INIT_EMAC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0084)
174#define OMAP4430_PM_L3INIT_SATA_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0088)
175#define OMAP4430_RM_L3INIT_SATA_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x008c)
176#define OMAP4430_RM_L3INIT_TPPSS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0094)
177#define OMAP4430_PM_L3INIT_PCIESS_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x0098)
178#define OMAP4430_RM_L3INIT_PCIESS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x009c)
179#define OMAP4430_RM_L3INIT_CCPTX_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00ac)
180#define OMAP4430_PM_L3INIT_XHPI_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00c0)
181#define OMAP4430_RM_L3INIT_XHPI_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00c4)
182#define OMAP4430_PM_L3INIT_MMC6_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00c8)
183#define OMAP4430_RM_L3INIT_MMC6_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00cc)
184#define OMAP4430_PM_L3INIT_USB_HOST_FS_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00d0)
185#define OMAP4430_RM_L3INIT_USB_HOST_FS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00d4)
186#define OMAP4430_RM_L3INIT_USBPHYOCP2SCP_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L3INIT_MOD, 0x00e4)
187
188/* PRM.L4PER_PRM register offsets */
189#define OMAP4430_PM_L4PER_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0000)
190#define OMAP4430_PM_L4PER_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0004)
191#define OMAP4430_RM_L4PER_ADC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0024)
192#define OMAP4430_PM_L4PER_DMTIMER10_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0028)
193#define OMAP4430_RM_L4PER_DMTIMER10_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x002c)
194#define OMAP4430_PM_L4PER_DMTIMER11_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0030)
195#define OMAP4430_RM_L4PER_DMTIMER11_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0034)
196#define OMAP4430_PM_L4PER_DMTIMER2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0038)
197#define OMAP4430_RM_L4PER_DMTIMER2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x003c)
198#define OMAP4430_PM_L4PER_DMTIMER3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0040)
199#define OMAP4430_RM_L4PER_DMTIMER3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0044)
200#define OMAP4430_PM_L4PER_DMTIMER4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0048)
201#define OMAP4430_RM_L4PER_DMTIMER4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x004c)
202#define OMAP4430_PM_L4PER_DMTIMER9_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0050)
203#define OMAP4430_RM_L4PER_DMTIMER9_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0054)
204#define OMAP4430_RM_L4PER_ELM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x005c)
205#define OMAP4430_PM_L4PER_GPIO2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0060)
206#define OMAP4430_RM_L4PER_GPIO2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0064)
207#define OMAP4430_PM_L4PER_GPIO3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0068)
208#define OMAP4430_RM_L4PER_GPIO3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x006c)
209#define OMAP4430_PM_L4PER_GPIO4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0070)
210#define OMAP4430_RM_L4PER_GPIO4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0074)
211#define OMAP4430_PM_L4PER_GPIO5_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0078)
212#define OMAP4430_RM_L4PER_GPIO5_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x007c)
213#define OMAP4430_PM_L4PER_GPIO6_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0080)
214#define OMAP4430_RM_L4PER_GPIO6_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0084)
215#define OMAP4430_RM_L4PER_HDQ1W_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x008c)
216#define OMAP4430_PM_L4PER_HECC1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0090)
217#define OMAP4430_RM_L4PER_HECC1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0094)
218#define OMAP4430_PM_L4PER_HECC2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0098)
219#define OMAP4430_RM_L4PER_HECC2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x009c)
220#define OMAP4430_PM_L4PER_I2C1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00a0)
221#define OMAP4430_RM_L4PER_I2C1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00a4)
222#define OMAP4430_PM_L4PER_I2C2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00a8)
223#define OMAP4430_RM_L4PER_I2C2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00ac)
224#define OMAP4430_PM_L4PER_I2C3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00b0)
225#define OMAP4430_RM_L4PER_I2C3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00b4)
226#define OMAP4430_PM_L4PER_I2C4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00b8)
227#define OMAP4430_RM_L4PER_I2C4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00bc)
228#define OMAP4430_RM_L4PER_L4_PER_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00c0)
229#define OMAP4430_PM_L4PER_MCASP2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00d0)
230#define OMAP4430_RM_L4PER_MCASP2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00d4)
231#define OMAP4430_PM_L4PER_MCASP3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00d8)
232#define OMAP4430_RM_L4PER_MCASP3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00dc)
233#define OMAP4430_PM_L4PER_MCBSP4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00e0)
234#define OMAP4430_RM_L4PER_MCBSP4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00e4)
235#define OMAP4430_RM_L4PER_MGATE_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00ec)
236#define OMAP4430_PM_L4PER_MCSPI1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00f0)
237#define OMAP4430_RM_L4PER_MCSPI1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00f4)
238#define OMAP4430_PM_L4PER_MCSPI2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00f8)
239#define OMAP4430_RM_L4PER_MCSPI2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x00fc)
240#define OMAP4430_PM_L4PER_MCSPI3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0100)
241#define OMAP4430_RM_L4PER_MCSPI3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0104)
242#define OMAP4430_PM_L4PER_MCSPI4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0108)
243#define OMAP4430_RM_L4PER_MCSPI4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x010c)
244#define OMAP4430_PM_L4PER_MMCSD3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0120)
245#define OMAP4430_RM_L4PER_MMCSD3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0124)
246#define OMAP4430_PM_L4PER_MMCSD4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0128)
247#define OMAP4430_RM_L4PER_MMCSD4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x012c)
248#define OMAP4430_RM_L4PER_MSPROHG_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0134)
249#define OMAP4430_PM_L4PER_SLIMBUS2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0138)
250#define OMAP4430_RM_L4PER_SLIMBUS2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x013c)
251#define OMAP4430_PM_L4PER_UART1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0140)
252#define OMAP4430_RM_L4PER_UART1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0144)
253#define OMAP4430_PM_L4PER_UART2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0148)
254#define OMAP4430_RM_L4PER_UART2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x014c)
255#define OMAP4430_PM_L4PER_UART3_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0150)
256#define OMAP4430_RM_L4PER_UART3_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0154)
257#define OMAP4430_PM_L4PER_UART4_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0158)
258#define OMAP4430_RM_L4PER_UART4_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x015c)
259#define OMAP4430_PM_L4PER_MMCSD5_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0160)
260#define OMAP4430_RM_L4PER_MMCSD5_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0164)
261#define OMAP4430_PM_L4PER_I2C5_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x0168)
262#define OMAP4430_RM_L4PER_I2C5_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x016c)
263#define OMAP4430_RM_L4SEC_AES1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01a4)
264#define OMAP4430_RM_L4SEC_AES2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01ac)
265#define OMAP4430_RM_L4SEC_DES3DES_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01b4)
266#define OMAP4430_RM_L4SEC_PKAEIP29_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01bc)
267#define OMAP4430_RM_L4SEC_RNG_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01c4)
268#define OMAP4430_RM_L4SEC_SHA2MD51_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01cc)
269#define OMAP4430_RM_L4SEC_CRYPTODMA_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_L4PER_MOD, 0x01dc)
270
271/* PRM.CEFUSE_PRM register offsets */
272#define OMAP4430_PM_CEFUSE_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CEFUSE_MOD, 0x0000)
273#define OMAP4430_PM_CEFUSE_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CEFUSE_MOD, 0x0004)
274#define OMAP4430_RM_CEFUSE_CEFUSE_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CEFUSE_MOD, 0x0024)
275
276/* PRM.WKUP_PRM register offsets */
277#define OMAP4430_RM_WKUP_L4WKUP_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0024)
278#define OMAP4430_RM_WKUP_WDT1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x002c)
279#define OMAP4430_PM_WKUP_WDT2_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0030)
280#define OMAP4430_RM_WKUP_WDT2_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0034)
281#define OMAP4430_PM_WKUP_GPIO1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0038)
282#define OMAP4430_RM_WKUP_GPIO1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x003c)
283#define OMAP4430_PM_WKUP_TIMER1_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0040)
284#define OMAP4430_RM_WKUP_TIMER1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0044)
285#define OMAP4430_PM_WKUP_TIMER12_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0048)
286#define OMAP4430_RM_WKUP_TIMER12_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x004c)
287#define OMAP4430_RM_WKUP_SYNCTIMER_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0054)
288#define OMAP4430_PM_WKUP_USIM_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0058)
289#define OMAP4430_RM_WKUP_USIM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x005c)
290#define OMAP4430_RM_WKUP_SARRAM_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0064)
291#define OMAP4430_PM_WKUP_KEYBOARD_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0078)
292#define OMAP4430_RM_WKUP_KEYBOARD_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x007c)
293#define OMAP4430_PM_WKUP_RTC_WKDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0080)
294#define OMAP4430_RM_WKUP_RTC_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_MOD, 0x0084)
295
296/* PRM.WKUP_CM register offsets */
297#define OMAP4430_CM_WKUP_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0000)
298#define OMAP4430_CM_WKUP_L4WKUP_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0020)
299#define OMAP4430_CM_WKUP_WDT1_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0028)
300#define OMAP4430_CM_WKUP_WDT2_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0030)
301#define OMAP4430_CM_WKUP_GPIO1_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0038)
302#define OMAP4430_CM_WKUP_TIMER1_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0040)
303#define OMAP4430_CM_WKUP_TIMER12_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0048)
304#define OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0050)
305#define OMAP4430_CM_WKUP_USIM_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0058)
306#define OMAP4430_CM_WKUP_SARRAM_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0060)
307#define OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0078)
308#define OMAP4430_CM_WKUP_RTC_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0080)
309#define OMAP4430_CM_WKUP_BANDGAP_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_WKUP_CM_MOD, 0x0088)
310
311/* PRM.EMU_PRM register offsets */
312#define OMAP4430_PM_EMU_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_MOD, 0x0000)
313#define OMAP4430_PM_EMU_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_MOD, 0x0004)
314#define OMAP4430_RM_EMU_DEBUGSS_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_MOD, 0x0024)
315
316/* PRM.EMU_CM register offsets */
317#define OMAP4430_CM_EMU_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_CM_MOD, 0x0000)
318#define OMAP4430_CM_EMU_DYNAMICDEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_CM_MOD, 0x0008)
319#define OMAP4430_CM_EMU_DEBUGSS_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_EMU_CM_MOD, 0x0020)
320
321/* PRM.DEVICE_PRM register offsets */
322#define OMAP4430_PRM_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0000)
323#define OMAP4430_PRM_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0004)
324#define OMAP4430_PRM_RSTTIME OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0008)
325#define OMAP4430_PRM_CLKREQCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x000c)
326#define OMAP4430_PRM_VOLTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0010)
327#define OMAP4430_PRM_PWRREQCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0014)
328#define OMAP4430_PRM_PSCON_COUNT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0018)
329#define OMAP4430_PRM_IO_COUNT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x001c)
330#define OMAP4430_PRM_IO_PMCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0020)
331#define OMAP4430_PRM_VOLTSETUP_WARMRESET OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0024)
332#define OMAP4430_PRM_VOLTSETUP_CORE_OFF OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0028)
333#define OMAP4430_PRM_VOLTSETUP_MPU_OFF OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x002c)
334#define OMAP4430_PRM_VOLTSETUP_IVA_OFF OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0030)
335#define OMAP4430_PRM_VOLTSETUP_CORE_RET_SLEEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0034)
336#define OMAP4430_PRM_VOLTSETUP_MPU_RET_SLEEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0038)
337#define OMAP4430_PRM_VOLTSETUP_IVA_RET_SLEEP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x003c)
338#define OMAP4430_PRM_VP_CORE_CONFIG OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0040)
339#define OMAP4430_PRM_VP_CORE_STATUS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0044)
340#define OMAP4430_PRM_VP_CORE_VLIMITTO OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0048)
341#define OMAP4430_PRM_VP_CORE_VOLTAGE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x004c)
342#define OMAP4430_PRM_VP_CORE_VSTEPMAX OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0050)
343#define OMAP4430_PRM_VP_CORE_VSTEPMIN OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0054)
344#define OMAP4430_PRM_VP_MPU_CONFIG OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0058)
345#define OMAP4430_PRM_VP_MPU_STATUS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x005c)
346#define OMAP4430_PRM_VP_MPU_VLIMITTO OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0060)
347#define OMAP4430_PRM_VP_MPU_VOLTAGE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0064)
348#define OMAP4430_PRM_VP_MPU_VSTEPMAX OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0068)
349#define OMAP4430_PRM_VP_MPU_VSTEPMIN OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x006c)
350#define OMAP4430_PRM_VP_IVA_CONFIG OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0070)
351#define OMAP4430_PRM_VP_IVA_STATUS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0074)
352#define OMAP4430_PRM_VP_IVA_VLIMITTO OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0078)
353#define OMAP4430_PRM_VP_IVA_VOLTAGE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x007c)
354#define OMAP4430_PRM_VP_IVA_VSTEPMAX OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0080)
355#define OMAP4430_PRM_VP_IVA_VSTEPMIN OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0084)
356#define OMAP4430_PRM_VC_SMPS_SA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0088)
357#define OMAP4430_PRM_VC_VAL_SMPS_RA_VOL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x008c)
358#define OMAP4430_PRM_VC_VAL_SMPS_RA_CMD OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0090)
359#define OMAP4430_PRM_VC_VAL_CMD_VDD_CORE_L OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0094)
360#define OMAP4430_PRM_VC_VAL_CMD_VDD_MPU_L OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x0098)
361#define OMAP4430_PRM_VC_VAL_CMD_VDD_IVA_L OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x009c)
362#define OMAP4430_PRM_VC_VAL_BYPASS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00a0)
363#define OMAP4430_PRM_VC_CFG_CHANNEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00a4)
364#define OMAP4430_PRM_VC_CFG_I2C_MODE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00a8)
365#define OMAP4430_PRM_VC_CFG_I2C_CLK OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00ac)
366#define OMAP4430_PRM_SRAM_COUNT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00b0)
367#define OMAP4430_PRM_SRAM_WKUP_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00b4)
368#define OMAP4430_PRM_LDO_SRAM_CORE_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00b8)
369#define OMAP4430_PRM_LDO_SRAM_CORE_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00bc)
370#define OMAP4430_PRM_LDO_SRAM_MPU_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00c0)
371#define OMAP4430_PRM_LDO_SRAM_MPU_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00c4)
372#define OMAP4430_PRM_LDO_SRAM_IVA_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00c8)
373#define OMAP4430_PRM_LDO_SRAM_IVA_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00cc)
374#define OMAP4430_PRM_LDO_ABB_MPU_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00d0)
375#define OMAP4430_PRM_LDO_ABB_MPU_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00d4)
376#define OMAP4430_PRM_LDO_ABB_IVA_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00d8)
377#define OMAP4430_PRM_LDO_ABB_IVA_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00dc)
378#define OMAP4430_PRM_LDO_BANDGAP_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e0)
379#define OMAP4430_PRM_DEVICE_OFF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e4)
380#define OMAP4430_PRM_PHASE1_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e8)
381#define OMAP4430_PRM_PHASE2A_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00ec)
382#define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f0)
383#define OMAP4430_PRM_MODEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f4)
384
385/* CHIRON_PRCM */
386
387
388/* CHIRON_PRCM.CHIRONSS_OCP_SOCKET_PRCM register offsets */
389#define OMAP4430_REVISION_PRCM OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_OCP_SOCKET_PRCM_MOD, 0x0000)
390
391/* CHIRON_PRCM.CHIRONSS_DEVICE_PRM register offsets */
392#define OMAP4430_CHIRON_PRCM_PRM_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_DEVICE_PRM_MOD, 0x0000)
393
394/* CHIRON_PRCM.CHIRONSS_CPU0 register offsets */
395#define OMAP4430_PM_PDA_CPU0_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0000)
396#define OMAP4430_PM_PDA_CPU0_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0004)
397#define OMAP4430_RM_PDA_CPU0_CPU0_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0008)
398#define OMAP4430_RM_PDA_CPU0_CPU0_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x000c)
399#define OMAP4430_RM_PDA_CPU0_CPU0_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0010)
400#define OMAP4430_CM_PDA_CPU0_CPU0_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0014)
401#define OMAP4430_CM_PDA_CPU0_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0018)
402
403/* CHIRON_PRCM.CHIRONSS_CPU1 register offsets */
404#define OMAP4430_PM_PDA_CPU1_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0000)
405#define OMAP4430_PM_PDA_CPU1_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0004)
406#define OMAP4430_RM_PDA_CPU1_CPU1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0008)
407#define OMAP4430_RM_PDA_CPU1_CPU1_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x000c)
408#define OMAP4430_RM_PDA_CPU1_CPU1_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0010)
409#define OMAP4430_CM_PDA_CPU1_CPU1_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0014)
410#define OMAP4430_CM_PDA_CPU1_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0018)
411#endif
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c
index 9a592199321c..cbfbd142e946 100644
--- a/arch/arm/mach-omap2/sdrc.c
+++ b/arch/arm/mach-omap2/sdrc.c
@@ -160,3 +160,19 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
160 sdrc_write_reg(l, SDRC_POWER); 160 sdrc_write_reg(l, SDRC_POWER);
161 omap2_sms_save_context(); 161 omap2_sms_save_context();
162} 162}
163
164void omap2_sms_write_rot_control(u32 val, unsigned ctx)
165{
166 sms_write_reg(val, SMS_ROT_CONTROL(ctx));
167}
168
169void omap2_sms_write_rot_size(u32 val, unsigned ctx)
170{
171 sms_write_reg(val, SMS_ROT_SIZE(ctx));
172}
173
174void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx)
175{
176 sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx));
177}
178
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
index 48207b018989..68f57bb67fc5 100644
--- a/arch/arm/mach-omap2/sdrc.h
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -18,6 +18,9 @@
18#include <plat/sdrc.h> 18#include <plat/sdrc.h>
19 19
20#ifndef __ASSEMBLER__ 20#ifndef __ASSEMBLER__
21
22#include <linux/io.h>
23
21extern void __iomem *omap2_sdrc_base; 24extern void __iomem *omap2_sdrc_base;
22extern void __iomem *omap2_sms_base; 25extern void __iomem *omap2_sms_base;
23 26
@@ -56,4 +59,20 @@ static inline u32 sms_read_reg(u16 reg)
56 OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) 59 OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg))
57#endif /* __ASSEMBLER__ */ 60#endif /* __ASSEMBLER__ */
58 61
62/* Minimum frequency that the SDRC DLL can lock at */
63#define MIN_SDRC_DLL_LOCK_FREQ 83000000
64
65/* Scale factor for fixed-point arith in omap3_core_dpll_m2_set_rate() */
66#define SDRC_MPURATE_SCALE 8
67
68/* 2^SDRC_MPURATE_BASE_SHIFT: MPU MHz that SDRC_MPURATE_LOOPS is defined for */
69#define SDRC_MPURATE_BASE_SHIFT 9
70
71/*
72 * SDRC_MPURATE_LOOPS: Number of MPU loops to execute at
73 * 2^MPURATE_BASE_SHIFT MHz for SDRC to stabilize
74 */
75#define SDRC_MPURATE_LOOPS 96
76
77
59#endif 78#endif
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 2e17b57f5b23..19805a7de06c 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -33,6 +33,7 @@
33#include "pm.h" 33#include "pm.h"
34#include "prm-regbits-34xx.h" 34#include "prm-regbits-34xx.h"
35 35
36#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52
36#define UART_OMAP_WER 0x17 /* Wake-up enable register */ 37#define UART_OMAP_WER 0x17 /* Wake-up enable register */
37 38
38#define DEFAULT_TIMEOUT (5 * HZ) 39#define DEFAULT_TIMEOUT (5 * HZ)
@@ -572,6 +573,23 @@ static struct omap_uart_state omap_uart[] = {
572#endif 573#endif
573}; 574};
574 575
576/*
577 * Override the default 8250 read handler: mem_serial_in()
578 * Empty RX fifo read causes an abort on omap3630 and omap4
579 * This function makes sure that an empty rx fifo is not read on these silicons
580 * (OMAP1/2/3430 are not affected)
581 */
582static unsigned int serial_in_override(struct uart_port *up, int offset)
583{
584 if (UART_RX == offset) {
585 unsigned int lsr;
586 lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR);
587 if (!(lsr & UART_LSR_DR))
588 return -EPERM;
589 }
590 return serial_read_reg(omap_uart[up->line].p, offset);
591}
592
575void __init omap_serial_early_init(void) 593void __init omap_serial_early_init(void)
576{ 594{
577 int i; 595 int i;
@@ -622,33 +640,74 @@ void __init omap_serial_early_init(void)
622 uart->num = i; 640 uart->num = i;
623 p->private_data = uart; 641 p->private_data = uart;
624 uart->p = p; 642 uart->p = p;
625 list_add_tail(&uart->node, &uart_list);
626 643
627 if (cpu_is_omap44xx()) 644 if (cpu_is_omap44xx())
628 p->irq += 32; 645 p->irq += 32;
629
630 omap_uart_enable_clocks(uart);
631 } 646 }
632} 647}
633 648
634void __init omap_serial_init(void) 649/**
650 * omap_serial_init_port() - initialize single serial port
651 * @port: serial port number (0-3)
652 *
653 * This function initialies serial driver for given @port only.
654 * Platforms can call this function instead of omap_serial_init()
655 * if they don't plan to use all available UARTs as serial ports.
656 *
657 * Don't mix calls to omap_serial_init_port() and omap_serial_init(),
658 * use only one of the two.
659 */
660void __init omap_serial_init_port(int port)
635{ 661{
636 int i; 662 struct omap_uart_state *uart;
663 struct platform_device *pdev;
664 struct device *dev;
637 665
638 for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { 666 BUG_ON(port < 0);
639 struct omap_uart_state *uart = &omap_uart[i]; 667 BUG_ON(port >= ARRAY_SIZE(omap_uart));
640 struct platform_device *pdev = &uart->pdev;
641 struct device *dev = &pdev->dev;
642 668
643 omap_uart_reset(uart); 669 uart = &omap_uart[port];
644 omap_uart_idle_init(uart); 670 pdev = &uart->pdev;
671 dev = &pdev->dev;
645 672
646 if (WARN_ON(platform_device_register(pdev))) 673 omap_uart_enable_clocks(uart);
647 continue; 674
648 if ((cpu_is_omap34xx() && uart->padconf) || 675 omap_uart_reset(uart);
649 (uart->wk_en && uart->wk_mask)) { 676 omap_uart_idle_init(uart);
650 device_init_wakeup(dev, true); 677
651 DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout); 678 list_add_tail(&uart->node, &uart_list);
652 } 679
680 if (WARN_ON(platform_device_register(pdev)))
681 return;
682
683 if ((cpu_is_omap34xx() && uart->padconf) ||
684 (uart->wk_en && uart->wk_mask)) {
685 device_init_wakeup(dev, true);
686 DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout);
653 } 687 }
688
689 /* omap44xx: Never read empty UART fifo
690 * omap3xxx: Never read empty UART fifo on UARTs
691 * with IP rev >=0x52
692 */
693 if (cpu_is_omap44xx())
694 uart->p->serial_in = serial_in_override;
695 else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
696 >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
697 uart->p->serial_in = serial_in_override;
698}
699
700/**
701 * omap_serial_init() - intialize all supported serial ports
702 *
703 * Initializes all available UARTs as serial ports. Platforms
704 * can call this function when they want to have default behaviour
705 * for serial ports (e.g initialize them all as serial ports).
706 */
707void __init omap_serial_init(void)
708{
709 int i;
710
711 for (i = 0; i < ARRAY_SIZE(omap_uart); i++)
712 omap_serial_init_port(i);
654} 713}
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
index 82aa4a3d160c..de99ba2a57ab 100644
--- a/arch/arm/mach-omap2/sram34xx.S
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -91,8 +91,19 @@
91 * new SDRC_ACTIM_CTRL_B_1 register contents 91 * new SDRC_ACTIM_CTRL_B_1 register contents
92 * new SDRC_MR_1 register value 92 * new SDRC_MR_1 register value
93 * 93 *
94 * If the param SDRC_RFR_CTRL_1 is 0, the parameters 94 * If the param SDRC_RFR_CTRL_1 is 0, the parameters are not programmed into
95 * are not programmed into the SDRC CS1 registers 95 * the SDRC CS1 registers
96 *
97 * NOTE: This code no longer attempts to program the SDRC AC timing and MR
98 * registers. This is because the code currently cannot ensure that all
99 * L3 initiators (e.g., sDMA, IVA, DSS DISPC, etc.) are not accessing the
100 * SDRAM when the registers are written. If the registers are changed while
101 * an initiator is accessing SDRAM, memory can be corrupted and/or the SDRC
102 * may enter an unpredictable state. In the future, the intent is to
103 * re-enable this code in cases where we can ensure that no initiators are
104 * touching the SDRAM. Until that time, users who know that their use case
105 * can satisfy the above requirement can enable the CONFIG_OMAP3_SDRC_AC_TIMING
106 * option.
96 */ 107 */
97ENTRY(omap3_sram_configure_core_dpll) 108ENTRY(omap3_sram_configure_core_dpll)
98 stmfd sp!, {r1-r12, lr} @ store regs to stack 109 stmfd sp!, {r1-r12, lr} @ store regs to stack
@@ -219,6 +230,7 @@ configure_sdrc:
219 ldr r12, omap_sdrc_rfr_ctrl_0_val @ fetch value from SRAM 230 ldr r12, omap_sdrc_rfr_ctrl_0_val @ fetch value from SRAM
220 ldr r11, omap3_sdrc_rfr_ctrl_0 @ fetch addr from SRAM 231 ldr r11, omap3_sdrc_rfr_ctrl_0 @ fetch addr from SRAM
221 str r12, [r11] @ store 232 str r12, [r11] @ store
233#ifdef CONFIG_OMAP3_SDRC_AC_TIMING
222 ldr r12, omap_sdrc_actim_ctrl_a_0_val 234 ldr r12, omap_sdrc_actim_ctrl_a_0_val
223 ldr r11, omap3_sdrc_actim_ctrl_a_0 235 ldr r11, omap3_sdrc_actim_ctrl_a_0
224 str r12, [r11] 236 str r12, [r11]
@@ -228,11 +240,13 @@ configure_sdrc:
228 ldr r12, omap_sdrc_mr_0_val 240 ldr r12, omap_sdrc_mr_0_val
229 ldr r11, omap3_sdrc_mr_0 241 ldr r11, omap3_sdrc_mr_0
230 str r12, [r11] 242 str r12, [r11]
243#endif
231 ldr r12, omap_sdrc_rfr_ctrl_1_val 244 ldr r12, omap_sdrc_rfr_ctrl_1_val
232 cmp r12, #0 @ if SDRC_RFR_CTRL_1 is 0, 245 cmp r12, #0 @ if SDRC_RFR_CTRL_1 is 0,
233 beq skip_cs1_prog @ do not program cs1 params 246 beq skip_cs1_prog @ do not program cs1 params
234 ldr r11, omap3_sdrc_rfr_ctrl_1 247 ldr r11, omap3_sdrc_rfr_ctrl_1
235 str r12, [r11] 248 str r12, [r11]
249#ifdef CONFIG_OMAP3_SDRC_AC_TIMING
236 ldr r12, omap_sdrc_actim_ctrl_a_1_val 250 ldr r12, omap_sdrc_actim_ctrl_a_1_val
237 ldr r11, omap3_sdrc_actim_ctrl_a_1 251 ldr r11, omap3_sdrc_actim_ctrl_a_1
238 str r12, [r11] 252 str r12, [r11]
@@ -242,6 +256,7 @@ configure_sdrc:
242 ldr r12, omap_sdrc_mr_1_val 256 ldr r12, omap_sdrc_mr_1_val
243 ldr r11, omap3_sdrc_mr_1 257 ldr r11, omap3_sdrc_mr_1
244 str r12, [r11] 258 str r12, [r11]
259#endif
245skip_cs1_prog: 260skip_cs1_prog:
246 ldr r12, [r11] @ posted-write barrier for SDRC 261 ldr r12, [r11] @ posted-write barrier for SDRC
247 bx lr 262 bx lr
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index e448abd5ec5d..f1df873d59db 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -27,6 +27,8 @@
27#include <mach/irqs.h> 27#include <mach/irqs.h>
28#include <plat/usb.h> 28#include <plat/usb.h>
29 29
30#include "mux.h"
31
30#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) 32#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE)
31 33
32static struct resource ehci_resources[] = { 34static struct resource ehci_resources[] = {
@@ -72,32 +74,44 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode)
72{ 74{
73 switch (port_mode[0]) { 75 switch (port_mode[0]) {
74 case EHCI_HCD_OMAP_MODE_PHY: 76 case EHCI_HCD_OMAP_MODE_PHY:
75 omap_cfg_reg(Y9_3430_USB1HS_PHY_STP); 77 omap_mux_init_signal("hsusb1_stp", OMAP_PIN_OUTPUT);
76 omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK); 78 omap_mux_init_signal("hsusb1_clk", OMAP_PIN_OUTPUT);
77 omap_cfg_reg(AA14_3430_USB1HS_PHY_DIR); 79 omap_mux_init_signal("hsusb1_dir", OMAP_PIN_INPUT_PULLDOWN);
78 omap_cfg_reg(AA11_3430_USB1HS_PHY_NXT); 80 omap_mux_init_signal("hsusb1_nxt", OMAP_PIN_INPUT_PULLDOWN);
79 omap_cfg_reg(W13_3430_USB1HS_PHY_DATA0); 81 omap_mux_init_signal("hsusb1_data0", OMAP_PIN_INPUT_PULLDOWN);
80 omap_cfg_reg(W12_3430_USB1HS_PHY_DATA1); 82 omap_mux_init_signal("hsusb1_data1", OMAP_PIN_INPUT_PULLDOWN);
81 omap_cfg_reg(W11_3430_USB1HS_PHY_DATA2); 83 omap_mux_init_signal("hsusb1_data2", OMAP_PIN_INPUT_PULLDOWN);
82 omap_cfg_reg(Y11_3430_USB1HS_PHY_DATA3); 84 omap_mux_init_signal("hsusb1_data3", OMAP_PIN_INPUT_PULLDOWN);
83 omap_cfg_reg(W9_3430_USB1HS_PHY_DATA4); 85 omap_mux_init_signal("hsusb1_data4", OMAP_PIN_INPUT_PULLDOWN);
84 omap_cfg_reg(Y12_3430_USB1HS_PHY_DATA5); 86 omap_mux_init_signal("hsusb1_data5", OMAP_PIN_INPUT_PULLDOWN);
85 omap_cfg_reg(W8_3430_USB1HS_PHY_DATA6); 87 omap_mux_init_signal("hsusb1_data6", OMAP_PIN_INPUT_PULLDOWN);
86 omap_cfg_reg(Y13_3430_USB1HS_PHY_DATA7); 88 omap_mux_init_signal("hsusb1_data7", OMAP_PIN_INPUT_PULLDOWN);
87 break; 89 break;
88 case EHCI_HCD_OMAP_MODE_TLL: 90 case EHCI_HCD_OMAP_MODE_TLL:
89 omap_cfg_reg(Y9_3430_USB1HS_TLL_STP); 91 omap_mux_init_signal("hsusb1_tll_stp",
90 omap_cfg_reg(Y8_3430_USB1HS_TLL_CLK); 92 OMAP_PIN_INPUT_PULLUP);
91 omap_cfg_reg(AA14_3430_USB1HS_TLL_DIR); 93 omap_mux_init_signal("hsusb1_tll_clk",
92 omap_cfg_reg(AA11_3430_USB1HS_TLL_NXT); 94 OMAP_PIN_INPUT_PULLDOWN);
93 omap_cfg_reg(W13_3430_USB1HS_TLL_DATA0); 95 omap_mux_init_signal("hsusb1_tll_dir",
94 omap_cfg_reg(W12_3430_USB1HS_TLL_DATA1); 96 OMAP_PIN_INPUT_PULLDOWN);
95 omap_cfg_reg(W11_3430_USB1HS_TLL_DATA2); 97 omap_mux_init_signal("hsusb1_tll_nxt",
96 omap_cfg_reg(Y11_3430_USB1HS_TLL_DATA3); 98 OMAP_PIN_INPUT_PULLDOWN);
97 omap_cfg_reg(W9_3430_USB1HS_TLL_DATA4); 99 omap_mux_init_signal("hsusb1_tll_data0",
98 omap_cfg_reg(Y12_3430_USB1HS_TLL_DATA5); 100 OMAP_PIN_INPUT_PULLDOWN);
99 omap_cfg_reg(W8_3430_USB1HS_TLL_DATA6); 101 omap_mux_init_signal("hsusb1_tll_data1",
100 omap_cfg_reg(Y13_3430_USB1HS_TLL_DATA7); 102 OMAP_PIN_INPUT_PULLDOWN);
103 omap_mux_init_signal("hsusb1_tll_data2",
104 OMAP_PIN_INPUT_PULLDOWN);
105 omap_mux_init_signal("hsusb1_tll_data3",
106 OMAP_PIN_INPUT_PULLDOWN);
107 omap_mux_init_signal("hsusb1_tll_data4",
108 OMAP_PIN_INPUT_PULLDOWN);
109 omap_mux_init_signal("hsusb1_tll_data5",
110 OMAP_PIN_INPUT_PULLDOWN);
111 omap_mux_init_signal("hsusb1_tll_data6",
112 OMAP_PIN_INPUT_PULLDOWN);
113 omap_mux_init_signal("hsusb1_tll_data7",
114 OMAP_PIN_INPUT_PULLDOWN);
101 break; 115 break;
102 case EHCI_HCD_OMAP_MODE_UNKNOWN: 116 case EHCI_HCD_OMAP_MODE_UNKNOWN:
103 /* FALLTHROUGH */ 117 /* FALLTHROUGH */
@@ -107,32 +121,52 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode)
107 121
108 switch (port_mode[1]) { 122 switch (port_mode[1]) {
109 case EHCI_HCD_OMAP_MODE_PHY: 123 case EHCI_HCD_OMAP_MODE_PHY:
110 omap_cfg_reg(AA10_3430_USB2HS_PHY_STP); 124 omap_mux_init_signal("hsusb2_stp", OMAP_PIN_OUTPUT);
111 omap_cfg_reg(AA8_3430_USB2HS_PHY_CLK); 125 omap_mux_init_signal("hsusb2_clk", OMAP_PIN_OUTPUT);
112 omap_cfg_reg(AA9_3430_USB2HS_PHY_DIR); 126 omap_mux_init_signal("hsusb2_dir", OMAP_PIN_INPUT_PULLDOWN);
113 omap_cfg_reg(AB11_3430_USB2HS_PHY_NXT); 127 omap_mux_init_signal("hsusb2_nxt", OMAP_PIN_INPUT_PULLDOWN);
114 omap_cfg_reg(AB10_3430_USB2HS_PHY_DATA0); 128 omap_mux_init_signal("hsusb2_data0",
115 omap_cfg_reg(AB9_3430_USB2HS_PHY_DATA1); 129 OMAP_PIN_INPUT_PULLDOWN);
116 omap_cfg_reg(W3_3430_USB2HS_PHY_DATA2); 130 omap_mux_init_signal("hsusb2_data1",
117 omap_cfg_reg(T4_3430_USB2HS_PHY_DATA3); 131 OMAP_PIN_INPUT_PULLDOWN);
118 omap_cfg_reg(T3_3430_USB2HS_PHY_DATA4); 132 omap_mux_init_signal("hsusb2_data2",
119 omap_cfg_reg(R3_3430_USB2HS_PHY_DATA5); 133 OMAP_PIN_INPUT_PULLDOWN);
120 omap_cfg_reg(R4_3430_USB2HS_PHY_DATA6); 134 omap_mux_init_signal("hsusb2_data3",
121 omap_cfg_reg(T2_3430_USB2HS_PHY_DATA7); 135 OMAP_PIN_INPUT_PULLDOWN);
136 omap_mux_init_signal("hsusb2_data4",
137 OMAP_PIN_INPUT_PULLDOWN);
138 omap_mux_init_signal("hsusb2_data5",
139 OMAP_PIN_INPUT_PULLDOWN);
140 omap_mux_init_signal("hsusb2_data6",
141 OMAP_PIN_INPUT_PULLDOWN);
142 omap_mux_init_signal("hsusb2_data7",
143 OMAP_PIN_INPUT_PULLDOWN);
122 break; 144 break;
123 case EHCI_HCD_OMAP_MODE_TLL: 145 case EHCI_HCD_OMAP_MODE_TLL:
124 omap_cfg_reg(AA10_3430_USB2HS_TLL_STP); 146 omap_mux_init_signal("hsusb2_tll_stp",
125 omap_cfg_reg(AA8_3430_USB2HS_TLL_CLK); 147 OMAP_PIN_INPUT_PULLUP);
126 omap_cfg_reg(AA9_3430_USB2HS_TLL_DIR); 148 omap_mux_init_signal("hsusb2_tll_clk",
127 omap_cfg_reg(AB11_3430_USB2HS_TLL_NXT); 149 OMAP_PIN_INPUT_PULLDOWN);
128 omap_cfg_reg(AB10_3430_USB2HS_TLL_DATA0); 150 omap_mux_init_signal("hsusb2_tll_dir",
129 omap_cfg_reg(AB9_3430_USB2HS_TLL_DATA1); 151 OMAP_PIN_INPUT_PULLDOWN);
130 omap_cfg_reg(W3_3430_USB2HS_TLL_DATA2); 152 omap_mux_init_signal("hsusb2_tll_nxt",
131 omap_cfg_reg(T4_3430_USB2HS_TLL_DATA3); 153 OMAP_PIN_INPUT_PULLDOWN);
132 omap_cfg_reg(T3_3430_USB2HS_TLL_DATA4); 154 omap_mux_init_signal("hsusb2_tll_data0",
133 omap_cfg_reg(R3_3430_USB2HS_TLL_DATA5); 155 OMAP_PIN_INPUT_PULLDOWN);
134 omap_cfg_reg(R4_3430_USB2HS_TLL_DATA6); 156 omap_mux_init_signal("hsusb2_tll_data1",
135 omap_cfg_reg(T2_3430_USB2HS_TLL_DATA7); 157 OMAP_PIN_INPUT_PULLDOWN);
158 omap_mux_init_signal("hsusb2_tll_data2",
159 OMAP_PIN_INPUT_PULLDOWN);
160 omap_mux_init_signal("hsusb2_tll_data3",
161 OMAP_PIN_INPUT_PULLDOWN);
162 omap_mux_init_signal("hsusb2_tll_data4",
163 OMAP_PIN_INPUT_PULLDOWN);
164 omap_mux_init_signal("hsusb2_tll_data5",
165 OMAP_PIN_INPUT_PULLDOWN);
166 omap_mux_init_signal("hsusb2_tll_data6",
167 OMAP_PIN_INPUT_PULLDOWN);
168 omap_mux_init_signal("hsusb2_tll_data7",
169 OMAP_PIN_INPUT_PULLDOWN);
136 break; 170 break;
137 case EHCI_HCD_OMAP_MODE_UNKNOWN: 171 case EHCI_HCD_OMAP_MODE_UNKNOWN:
138 /* FALLTHROUGH */ 172 /* FALLTHROUGH */
@@ -145,18 +179,30 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode)
145 printk(KERN_WARNING "Port3 can't be used in PHY mode\n"); 179 printk(KERN_WARNING "Port3 can't be used in PHY mode\n");
146 break; 180 break;
147 case EHCI_HCD_OMAP_MODE_TLL: 181 case EHCI_HCD_OMAP_MODE_TLL:
148 omap_cfg_reg(AB3_3430_USB3HS_TLL_STP); 182 omap_mux_init_signal("hsusb3_tll_stp",
149 omap_cfg_reg(AA6_3430_USB3HS_TLL_CLK); 183 OMAP_PIN_INPUT_PULLUP);
150 omap_cfg_reg(AA3_3430_USB3HS_TLL_DIR); 184 omap_mux_init_signal("hsusb3_tll_clk",
151 omap_cfg_reg(Y3_3430_USB3HS_TLL_NXT); 185 OMAP_PIN_INPUT_PULLDOWN);
152 omap_cfg_reg(AA5_3430_USB3HS_TLL_DATA0); 186 omap_mux_init_signal("hsusb3_tll_dir",
153 omap_cfg_reg(Y4_3430_USB3HS_TLL_DATA1); 187 OMAP_PIN_INPUT_PULLDOWN);
154 omap_cfg_reg(Y5_3430_USB3HS_TLL_DATA2); 188 omap_mux_init_signal("hsusb3_tll_nxt",
155 omap_cfg_reg(W5_3430_USB3HS_TLL_DATA3); 189 OMAP_PIN_INPUT_PULLDOWN);
156 omap_cfg_reg(AB12_3430_USB3HS_TLL_DATA4); 190 omap_mux_init_signal("hsusb3_tll_data0",
157 omap_cfg_reg(AB13_3430_USB3HS_TLL_DATA5); 191 OMAP_PIN_INPUT_PULLDOWN);
158 omap_cfg_reg(AA13_3430_USB3HS_TLL_DATA6); 192 omap_mux_init_signal("hsusb3_tll_data1",
159 omap_cfg_reg(AA12_3430_USB3HS_TLL_DATA7); 193 OMAP_PIN_INPUT_PULLDOWN);
194 omap_mux_init_signal("hsusb3_tll_data2",
195 OMAP_PIN_INPUT_PULLDOWN);
196 omap_mux_init_signal("hsusb3_tll_data3",
197 OMAP_PIN_INPUT_PULLDOWN);
198 omap_mux_init_signal("hsusb3_tll_data4",
199 OMAP_PIN_INPUT_PULLDOWN);
200 omap_mux_init_signal("hsusb3_tll_data5",
201 OMAP_PIN_INPUT_PULLDOWN);
202 omap_mux_init_signal("hsusb3_tll_data6",
203 OMAP_PIN_INPUT_PULLDOWN);
204 omap_mux_init_signal("hsusb3_tll_data7",
205 OMAP_PIN_INPUT_PULLDOWN);
160 break; 206 break;
161 case EHCI_HCD_OMAP_MODE_UNKNOWN: 207 case EHCI_HCD_OMAP_MODE_UNKNOWN:
162 /* FALLTHROUGH */ 208 /* FALLTHROUGH */
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index 36dc5413cc97..bdf96eb523bc 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -463,7 +463,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
463 writel(win_enable, PCI_BAR_ENABLE); 463 writel(win_enable, PCI_BAR_ENABLE);
464 464
465 /* 465 /*
466 * Disable automatic update of address remaping when writing to BARs. 466 * Disable automatic update of address remapping when writing to BARs.
467 */ 467 */
468 orion5x_setbits(PCI_ADDR_DECODE_CTRL, 1); 468 orion5x_setbits(PCI_ADDR_DECODE_CTRL, 1);
469} 469}
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index d89c6adbe8bc..8a0837ea0294 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -63,6 +63,15 @@ config ARCH_VIPER
63 select HAVE_PWM 63 select HAVE_PWM
64 select PXA_HAVE_BOARD_IRQS 64 select PXA_HAVE_BOARD_IRQS
65 select PXA_HAVE_ISA_IRQS 65 select PXA_HAVE_ISA_IRQS
66 select ARCOM_PCMCIA
67
68config MACH_ARCOM_ZEUS
69 bool "Arcom/Eurotech ZEUS SBC"
70 select PXA27x
71 select ISA
72 select PXA_HAVE_BOARD_IRQS
73 select PXA_HAVE_ISA_IRQS
74 select ARCOM_PCMCIA
66 75
67config MACH_BALLOON3 76config MACH_BALLOON3
68 bool "Balloon 3 board" 77 bool "Balloon 3 board"
@@ -101,6 +110,8 @@ config MACH_CM_X300
101 bool "CompuLab CM-X300 modules" 110 bool "CompuLab CM-X300 modules"
102 select PXA3xx 111 select PXA3xx
103 select CPU_PXA300 112 select CPU_PXA300
113 select CPU_PXA310
114 select HAVE_PWM
104 115
105config ARCH_GUMSTIX 116config ARCH_GUMSTIX
106 bool "Gumstix XScale 255 boards" 117 bool "Gumstix XScale 255 boards"
@@ -179,6 +190,11 @@ config MACH_TRIZEPS_ANY
179 190
180endchoice 191endchoice
181 192
193config ARCOM_PCMCIA
194 bool
195 help
196 Generic option for Arcom Viper/Zeus PCMCIA
197
182config TRIZEPS_PCMCIA 198config TRIZEPS_PCMCIA
183 bool 199 bool
184 help 200 help
@@ -226,7 +242,6 @@ config MACH_COLIBRI300
226 select PXA3xx 242 select PXA3xx
227 select CPU_PXA300 243 select CPU_PXA300
228 select CPU_PXA310 244 select CPU_PXA310
229 select HAVE_PWM
230 245
231config MACH_COLIBRI320 246config MACH_COLIBRI320
232 bool "Toradex Colibri PXA320" 247 bool "Toradex Colibri PXA320"
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index b5d29e60a341..f64afda7e6f6 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -38,6 +38,7 @@ obj-$(CONFIG_MACH_SAAR) += saar.o
38# 3rd Party Dev Platforms 38# 3rd Party Dev Platforms
39obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 39obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
40obj-$(CONFIG_ARCH_VIPER) += viper.o 40obj-$(CONFIG_ARCH_VIPER) += viper.o
41obj-$(CONFIG_MACH_ARCOM_ZEUS) += zeus.o
41obj-$(CONFIG_MACH_BALLOON3) += balloon3.o 42obj-$(CONFIG_MACH_BALLOON3) += balloon3.o
42obj-$(CONFIG_MACH_CSB726) += csb726.o 43obj-$(CONFIG_MACH_CSB726) += csb726.o
43obj-$(CONFIG_CSB726_CSB701) += csb701.o 44obj-$(CONFIG_CSB726_CSB701) += csb701.o
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 3395463bb5a6..8e10db148f1b 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -4,7 +4,6 @@
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 <mach/hardware.h>
8#include <mach/udc.h> 7#include <mach/udc.h>
9#include <mach/pxafb.h> 8#include <mach/pxafb.h>
10#include <mach/mmc.h> 9#include <mach/mmc.h>
@@ -14,6 +13,7 @@
14#include <mach/pxa2xx_spi.h> 13#include <mach/pxa2xx_spi.h>
15#include <mach/camera.h> 14#include <mach/camera.h>
16#include <mach/audio.h> 15#include <mach/audio.h>
16#include <mach/hardware.h>
17#include <plat/i2c.h> 17#include <plat/i2c.h>
18#include <plat/pxa3xx_nand.h> 18#include <plat/pxa3xx_nand.h>
19 19
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 1c0de808b54d..c8a01bc85fde 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -497,16 +497,15 @@ static int em_x270_usb_hub_init(void)
497 goto err_free_vbus_gpio; 497 goto err_free_vbus_gpio;
498 498
499 /* USB Hub power-on and reset */ 499 /* USB Hub power-on and reset */
500 gpio_direction_output(usb_hub_reset, 0); 500 gpio_direction_output(usb_hub_reset, 1);
501 gpio_direction_output(GPIO9_USB_VBUS_EN, 0);
501 regulator_enable(em_x270_usb_ldo); 502 regulator_enable(em_x270_usb_ldo);
502 gpio_set_value(usb_hub_reset, 1);
503 gpio_set_value(usb_hub_reset, 0); 503 gpio_set_value(usb_hub_reset, 0);
504 gpio_set_value(usb_hub_reset, 1);
504 regulator_disable(em_x270_usb_ldo); 505 regulator_disable(em_x270_usb_ldo);
505 regulator_enable(em_x270_usb_ldo); 506 regulator_enable(em_x270_usb_ldo);
506 gpio_set_value(usb_hub_reset, 1); 507 gpio_set_value(usb_hub_reset, 0);
507 508 gpio_set_value(GPIO9_USB_VBUS_EN, 1);
508 /* enable VBUS */
509 gpio_direction_output(GPIO9_USB_VBUS_EN, 1);
510 509
511 return 0; 510 return 0;
512 511
diff --git a/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h b/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h
new file mode 100644
index 000000000000..d428be4db44c
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/arcom-pcmcia.h
@@ -0,0 +1,11 @@
1#ifndef __ARCOM_PCMCIA_H
2#define __ARCOM_PCMCIA_H
3
4struct arcom_pcmcia_pdata {
5 int cd_gpio;
6 int rdy_gpio;
7 int pwr_gpio;
8 void (*reset)(int state);
9};
10
11#endif
diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h
index 8721b8010221..ae536e86d8e8 100644
--- a/arch/arm/mach-pxa/include/mach/palmld.h
+++ b/arch/arm/mach-pxa/include/mach/palmld.h
@@ -91,7 +91,7 @@
91/* BATTERY */ 91/* BATTERY */
92#define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */ 92#define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
93#define PALMLD_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */ 93#define PALMLD_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
94#define PALMLD_BAT_MAX_CURRENT 0 /* unknokn */ 94#define PALMLD_BAT_MAX_CURRENT 0 /* unknown */
95#define PALMLD_BAT_MIN_CURRENT 0 /* unknown */ 95#define PALMLD_BAT_MIN_CURRENT 0 /* unknown */
96#define PALMLD_BAT_MAX_CHARGE 1 /* unknown */ 96#define PALMLD_BAT_MAX_CHARGE 1 /* unknown */
97#define PALMLD_BAT_MIN_CHARGE 1 /* unknown */ 97#define PALMLD_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h
index d15662aba008..6baf7469d4ec 100644
--- a/arch/arm/mach-pxa/include/mach/palmt5.h
+++ b/arch/arm/mach-pxa/include/mach/palmt5.h
@@ -66,7 +66,7 @@
66/* BATTERY */ 66/* BATTERY */
67#define PALMT5_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ 67#define PALMT5_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
68#define PALMT5_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ 68#define PALMT5_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
69#define PALMT5_BAT_MAX_CURRENT 0 /* unknokn */ 69#define PALMT5_BAT_MAX_CURRENT 0 /* unknown */
70#define PALMT5_BAT_MIN_CURRENT 0 /* unknown */ 70#define PALMT5_BAT_MIN_CURRENT 0 /* unknown */
71#define PALMT5_BAT_MAX_CHARGE 1 /* unknown */ 71#define PALMT5_BAT_MAX_CHARGE 1 /* unknown */
72#define PALMT5_BAT_MIN_CHARGE 1 /* unknown */ 72#define PALMT5_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/include/mach/palmtc.h
index 3dc9b074ab46..3f9dd3fd4638 100644
--- a/arch/arm/mach-pxa/include/mach/palmtc.h
+++ b/arch/arm/mach-pxa/include/mach/palmtc.h
@@ -68,7 +68,7 @@
68/* BATTERY */ 68/* BATTERY */
69#define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */ 69#define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */
70#define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */ 70#define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */
71#define PALMTC_BAT_MAX_CURRENT 0 /* unknokn */ 71#define PALMTC_BAT_MAX_CURRENT 0 /* unknown */
72#define PALMTC_BAT_MIN_CURRENT 0 /* unknown */ 72#define PALMTC_BAT_MIN_CURRENT 0 /* unknown */
73#define PALMTC_BAT_MAX_CHARGE 1 /* unknown */ 73#define PALMTC_BAT_MAX_CHARGE 1 /* unknown */
74#define PALMTC_BAT_MIN_CHARGE 1 /* unknown */ 74#define PALMTC_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/palmte2.h b/arch/arm/mach-pxa/include/mach/palmte2.h
index 12361341f9d8..f89e989a7637 100644
--- a/arch/arm/mach-pxa/include/mach/palmte2.h
+++ b/arch/arm/mach-pxa/include/mach/palmte2.h
@@ -59,7 +59,7 @@
59/* BATTERY */ 59/* BATTERY */
60#define PALMTE2_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ 60#define PALMTE2_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
61#define PALMTE2_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ 61#define PALMTE2_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
62#define PALMTE2_BAT_MAX_CURRENT 0 /* unknokn */ 62#define PALMTE2_BAT_MAX_CURRENT 0 /* unknown */
63#define PALMTE2_BAT_MIN_CURRENT 0 /* unknown */ 63#define PALMTE2_BAT_MIN_CURRENT 0 /* unknown */
64#define PALMTE2_BAT_MAX_CHARGE 1 /* unknown */ 64#define PALMTE2_BAT_MAX_CHARGE 1 /* unknown */
65#define PALMTE2_BAT_MIN_CHARGE 1 /* unknown */ 65#define PALMTE2_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h
index 1be0db6ed55e..10abc4f2e8e4 100644
--- a/arch/arm/mach-pxa/include/mach/palmtx.h
+++ b/arch/arm/mach-pxa/include/mach/palmtx.h
@@ -94,7 +94,7 @@
94/* BATTERY */ 94/* BATTERY */
95#define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ 95#define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
96#define PALMTX_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ 96#define PALMTX_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
97#define PALMTX_BAT_MAX_CURRENT 0 /* unknokn */ 97#define PALMTX_BAT_MAX_CURRENT 0 /* unknown */
98#define PALMTX_BAT_MIN_CURRENT 0 /* unknown */ 98#define PALMTX_BAT_MIN_CURRENT 0 /* unknown */
99#define PALMTX_BAT_MAX_CHARGE 1 /* unknown */ 99#define PALMTX_BAT_MAX_CHARGE 1 /* unknown */
100#define PALMTX_BAT_MIN_CHARGE 1 /* unknown */ 100#define PALMTX_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h b/arch/arm/mach-pxa/include/mach/palmz72.h
index 2806ef69ba5a..2bbcf70dd935 100644
--- a/arch/arm/mach-pxa/include/mach/palmz72.h
+++ b/arch/arm/mach-pxa/include/mach/palmz72.h
@@ -49,7 +49,7 @@
49/* Battery */ 49/* Battery */
50#define PALMZ72_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ 50#define PALMZ72_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
51#define PALMZ72_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ 51#define PALMZ72_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
52#define PALMZ72_BAT_MAX_CURRENT 0 /* unknokn */ 52#define PALMZ72_BAT_MAX_CURRENT 0 /* unknown */
53#define PALMZ72_BAT_MIN_CURRENT 0 /* unknown */ 53#define PALMZ72_BAT_MIN_CURRENT 0 /* unknown */
54#define PALMZ72_BAT_MAX_CHARGE 1 /* unknown */ 54#define PALMZ72_BAT_MAX_CHARGE 1 /* unknown */
55#define PALMZ72_BAT_MIN_CHARGE 1 /* unknown */ 55#define PALMZ72_BAT_MIN_CHARGE 1 /* unknown */
diff --git a/arch/arm/mach-pxa/include/mach/viper.h b/arch/arm/mach-pxa/include/mach/viper.h
index 10988c270ca3..5f5fbf1f6489 100644
--- a/arch/arm/mach-pxa/include/mach/viper.h
+++ b/arch/arm/mach-pxa/include/mach/viper.h
@@ -85,8 +85,6 @@
85/* Interrupt and Configuration Register (VIPER_ICR) */ 85/* Interrupt and Configuration Register (VIPER_ICR) */
86/* This is a write only register. Only CF_RST is used under Linux */ 86/* This is a write only register. Only CF_RST is used under Linux */
87 87
88extern void viper_cf_rst(int state);
89
90#define VIPER_ICR_RETRIG (1 << 0) 88#define VIPER_ICR_RETRIG (1 << 0)
91#define VIPER_ICR_AUTO_CLR (1 << 1) 89#define VIPER_ICR_AUTO_CLR (1 << 1)
92#define VIPER_ICR_R_DIS (1 << 2) 90#define VIPER_ICR_R_DIS (1 << 2)
diff --git a/arch/arm/mach-pxa/include/mach/zeus.h b/arch/arm/mach-pxa/include/mach/zeus.h
new file mode 100644
index 000000000000..c387046d2f28
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/zeus.h
@@ -0,0 +1,82 @@
1/*
2 * arch/arm/mach-pxa/include/mach/zeus.h
3 *
4 * Author: David Vrabel
5 * Created: Sept 28, 2005
6 * Copyright: Arcom Control Systems Ltd.
7 *
8 * Maintained by: Marc Zyngier <maz@misterjones.org>
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 _MACH_ZEUS_H
16#define _MACH_ZEUS_H
17
18/* Physical addresses */
19#define ZEUS_FLASH_PHYS PXA_CS0_PHYS
20#define ZEUS_ETH0_PHYS PXA_CS1_PHYS
21#define ZEUS_ETH1_PHYS PXA_CS2_PHYS
22#define ZEUS_CPLD_PHYS (PXA_CS4_PHYS+0x2000000)
23#define ZEUS_SRAM_PHYS PXA_CS5_PHYS
24#define ZEUS_PC104IO_PHYS (0x30000000)
25
26#define ZEUS_CPLD_VERSION_PHYS (ZEUS_CPLD_PHYS + 0x00000000)
27#define ZEUS_CPLD_ISA_IRQ_PHYS (ZEUS_CPLD_PHYS + 0x00800000)
28#define ZEUS_CPLD_CONTROL_PHYS (ZEUS_CPLD_PHYS + 0x01000000)
29#define ZEUS_CPLD_EXTWDOG_PHYS (ZEUS_CPLD_PHYS + 0x01800000)
30
31/* GPIOs */
32#define ZEUS_AC97_GPIO 0
33#define ZEUS_WAKEUP_GPIO 1
34#define ZEUS_UARTA_GPIO 9
35#define ZEUS_UARTB_GPIO 10
36#define ZEUS_UARTC_GPIO 12
37#define ZEUS_UARTD_GPIO 11
38#define ZEUS_ETH0_GPIO 14
39#define ZEUS_ISA_GPIO 17
40#define ZEUS_BKLEN_GPIO 19
41#define ZEUS_USB2_PWREN_GPIO 22
42#define ZEUS_PTT_GPIO 27
43#define ZEUS_CF_CD_GPIO 35
44#define ZEUS_MMC_WP_GPIO 52
45#define ZEUS_MMC_CD_GPIO 53
46#define ZEUS_EXTGPIO_GPIO 91
47#define ZEUS_CF_PWEN_GPIO 97
48#define ZEUS_CF_RDY_GPIO 99
49#define ZEUS_LCD_EN_GPIO 101
50#define ZEUS_ETH1_GPIO 113
51#define ZEUS_CAN_GPIO 116
52
53#define ZEUS_EXT0_GPIO_BASE 128
54#define ZEUS_EXT1_GPIO_BASE 160
55#define ZEUS_USER_GPIO_BASE 192
56
57#define ZEUS_EXT0_GPIO(x) (ZEUS_EXT0_GPIO_BASE + (x))
58#define ZEUS_EXT1_GPIO(x) (ZEUS_EXT1_GPIO_BASE + (x))
59#define ZEUS_USER_GPIO(x) (ZEUS_USER_GPIO_BASE + (x))
60
61/*
62 * CPLD registers:
63 * Only 4 registers, but spreaded over a 32MB address space.
64 * Be gentle, and remap that over 32kB...
65 */
66
67#define ZEUS_CPLD (0xf0000000)
68#define ZEUS_CPLD_VERSION (ZEUS_CPLD + 0x0000)
69#define ZEUS_CPLD_ISA_IRQ (ZEUS_CPLD + 0x1000)
70#define ZEUS_CPLD_CONTROL (ZEUS_CPLD + 0x2000)
71#define ZEUS_CPLD_EXTWDOG (ZEUS_CPLD + 0x3000)
72
73/* CPLD register bits */
74#define ZEUS_CPLD_CONTROL_CF_RST 0x01
75
76#define ZEUS_PC104IO (0xf1000000)
77
78#define ZEUS_SRAM_SIZE (256 * 1024)
79
80#endif
81
82
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index cf0d71b7797e..5352b4e5a7dd 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -47,6 +47,7 @@
47#include <mach/pxafb.h> 47#include <mach/pxafb.h>
48#include <plat/i2c.h> 48#include <plat/i2c.h>
49#include <mach/regs-uart.h> 49#include <mach/regs-uart.h>
50#include <mach/arcom-pcmcia.h>
50#include <mach/viper.h> 51#include <mach/viper.h>
51 52
52#include <asm/setup.h> 53#include <asm/setup.h>
@@ -76,14 +77,28 @@ static void viper_icr_clear_bit(unsigned int bit)
76} 77}
77 78
78/* This function is used from the pcmcia module to reset the CF */ 79/* This function is used from the pcmcia module to reset the CF */
79void viper_cf_rst(int state) 80static void viper_cf_reset(int state)
80{ 81{
81 if (state) 82 if (state)
82 viper_icr_set_bit(VIPER_ICR_CF_RST); 83 viper_icr_set_bit(VIPER_ICR_CF_RST);
83 else 84 else
84 viper_icr_clear_bit(VIPER_ICR_CF_RST); 85 viper_icr_clear_bit(VIPER_ICR_CF_RST);
85} 86}
86EXPORT_SYMBOL(viper_cf_rst); 87
88static struct arcom_pcmcia_pdata viper_pcmcia_info = {
89 .cd_gpio = VIPER_CF_CD_GPIO,
90 .rdy_gpio = VIPER_CF_RDY_GPIO,
91 .pwr_gpio = VIPER_CF_POWER_GPIO,
92 .reset = viper_cf_reset,
93};
94
95static struct platform_device viper_pcmcia_device = {
96 .name = "viper-pcmcia",
97 .id = -1,
98 .dev = {
99 .platform_data = &viper_pcmcia_info,
100 },
101};
87 102
88/* 103/*
89 * The CPLD version register was not present on VIPER boards prior to 104 * The CPLD version register was not present on VIPER boards prior to
@@ -685,6 +700,7 @@ static struct platform_device *viper_devs[] __initdata = {
685 &viper_mtd_devices[0], 700 &viper_mtd_devices[0],
686 &viper_mtd_devices[1], 701 &viper_mtd_devices[1],
687 &viper_backlight_device, 702 &viper_backlight_device,
703 &viper_pcmcia_device,
688}; 704};
689 705
690static mfp_cfg_t viper_pin_config[] __initdata = { 706static mfp_cfg_t viper_pin_config[] __initdata = {
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
new file mode 100644
index 000000000000..5b986a8bd9e6
--- /dev/null
+++ b/arch/arm/mach-pxa/zeus.c
@@ -0,0 +1,820 @@
1/*
2 * Support for the Arcom ZEUS.
3 *
4 * Copyright (C) 2006 Arcom Control Systems Ltd.
5 *
6 * Loosely based on Arcom's 2.6.16.28.
7 * Maintained by Marc Zyngier <maz@misterjones.org>
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 <linux/cpufreq.h>
15#include <linux/interrupt.h>
16#include <linux/irq.h>
17#include <linux/pm.h>
18#include <linux/gpio.h>
19#include <linux/serial_8250.h>
20#include <linux/dm9000.h>
21#include <linux/mmc/host.h>
22#include <linux/spi/spi.h>
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h>
25#include <linux/mtd/physmap.h>
26#include <linux/i2c.h>
27#include <linux/i2c/pca953x.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/mach/map.h>
32
33#include <plat/i2c.h>
34
35#include <mach/pxa2xx-regs.h>
36#include <mach/regs-uart.h>
37#include <mach/ohci.h>
38#include <mach/mmc.h>
39#include <mach/pxa27x-udc.h>
40#include <mach/udc.h>
41#include <mach/pxafb.h>
42#include <mach/pxa2xx_spi.h>
43#include <mach/mfp-pxa27x.h>
44#include <mach/pm.h>
45#include <mach/audio.h>
46#include <mach/arcom-pcmcia.h>
47#include <mach/zeus.h>
48
49#include "generic.h"
50
51/*
52 * Interrupt handling
53 */
54
55static unsigned long zeus_irq_enabled_mask;
56static const int zeus_isa_irqs[] = { 3, 4, 5, 6, 7, 10, 11, 12, };
57static const int zeus_isa_irq_map[] = {
58 0, /* ISA irq #0, invalid */
59 0, /* ISA irq #1, invalid */
60 0, /* ISA irq #2, invalid */
61 1 << 0, /* ISA irq #3 */
62 1 << 1, /* ISA irq #4 */
63 1 << 2, /* ISA irq #5 */
64 1 << 3, /* ISA irq #6 */
65 1 << 4, /* ISA irq #7 */
66 0, /* ISA irq #8, invalid */
67 0, /* ISA irq #9, invalid */
68 1 << 5, /* ISA irq #10 */
69 1 << 6, /* ISA irq #11 */
70 1 << 7, /* ISA irq #12 */
71};
72
73static inline int zeus_irq_to_bitmask(unsigned int irq)
74{
75 return zeus_isa_irq_map[irq - PXA_ISA_IRQ(0)];
76}
77
78static inline int zeus_bit_to_irq(int bit)
79{
80 return zeus_isa_irqs[bit] + PXA_ISA_IRQ(0);
81}
82
83static void zeus_ack_irq(unsigned int irq)
84{
85 __raw_writew(zeus_irq_to_bitmask(irq), ZEUS_CPLD_ISA_IRQ);
86}
87
88static void zeus_mask_irq(unsigned int irq)
89{
90 zeus_irq_enabled_mask &= ~(zeus_irq_to_bitmask(irq));
91}
92
93static void zeus_unmask_irq(unsigned int irq)
94{
95 zeus_irq_enabled_mask |= zeus_irq_to_bitmask(irq);
96}
97
98static inline unsigned long zeus_irq_pending(void)
99{
100 return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask;
101}
102
103static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc)
104{
105 unsigned long pending;
106
107 pending = zeus_irq_pending();
108 do {
109 /* we're in a chained irq handler,
110 * so ack the interrupt by hand */
111 desc->chip->ack(gpio_to_irq(ZEUS_ISA_GPIO));
112
113 if (likely(pending)) {
114 irq = zeus_bit_to_irq(__ffs(pending));
115 generic_handle_irq(irq);
116 }
117 pending = zeus_irq_pending();
118 } while (pending);
119}
120
121static struct irq_chip zeus_irq_chip = {
122 .name = "ISA",
123 .ack = zeus_ack_irq,
124 .mask = zeus_mask_irq,
125 .unmask = zeus_unmask_irq,
126};
127
128static void __init zeus_init_irq(void)
129{
130 int level;
131 int isa_irq;
132
133 pxa27x_init_irq();
134
135 /* Peripheral IRQs. It would be nice to move those inside driver
136 configuration, but it is not supported at the moment. */
137 set_irq_type(gpio_to_irq(ZEUS_AC97_GPIO), IRQ_TYPE_EDGE_RISING);
138 set_irq_type(gpio_to_irq(ZEUS_WAKEUP_GPIO), IRQ_TYPE_EDGE_RISING);
139 set_irq_type(gpio_to_irq(ZEUS_PTT_GPIO), IRQ_TYPE_EDGE_RISING);
140 set_irq_type(gpio_to_irq(ZEUS_EXTGPIO_GPIO), IRQ_TYPE_EDGE_FALLING);
141 set_irq_type(gpio_to_irq(ZEUS_CAN_GPIO), IRQ_TYPE_EDGE_FALLING);
142
143 /* Setup ISA IRQs */
144 for (level = 0; level < ARRAY_SIZE(zeus_isa_irqs); level++) {
145 isa_irq = zeus_bit_to_irq(level);
146 set_irq_chip(isa_irq, &zeus_irq_chip);
147 set_irq_handler(isa_irq, handle_edge_irq);
148 set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
149 }
150
151 set_irq_type(gpio_to_irq(ZEUS_ISA_GPIO), IRQ_TYPE_EDGE_RISING);
152 set_irq_chained_handler(gpio_to_irq(ZEUS_ISA_GPIO), zeus_irq_handler);
153}
154
155
156/*
157 * Platform devices
158 */
159
160/* Flash */
161static struct resource zeus_mtd_resources[] = {
162 [0] = { /* NOR Flash (up to 64MB) */
163 .start = ZEUS_FLASH_PHYS,
164 .end = ZEUS_FLASH_PHYS + SZ_64M - 1,
165 .flags = IORESOURCE_MEM,
166 },
167 [1] = { /* SRAM */
168 .start = ZEUS_SRAM_PHYS,
169 .end = ZEUS_SRAM_PHYS + SZ_512K - 1,
170 .flags = IORESOURCE_MEM,
171 },
172};
173
174static struct physmap_flash_data zeus_flash_data[] = {
175 [0] = {
176 .width = 2,
177 .parts = NULL,
178 .nr_parts = 0,
179 },
180};
181
182static struct platform_device zeus_mtd_devices[] = {
183 [0] = {
184 .name = "physmap-flash",
185 .id = 0,
186 .dev = {
187 .platform_data = &zeus_flash_data[0],
188 },
189 .resource = &zeus_mtd_resources[0],
190 .num_resources = 1,
191 },
192};
193
194/* Serial */
195static struct resource zeus_serial_resources[] = {
196 {
197 .start = 0x10000000,
198 .end = 0x1000000f,
199 .flags = IORESOURCE_MEM,
200 },
201 {
202 .start = 0x10800000,
203 .end = 0x1080000f,
204 .flags = IORESOURCE_MEM,
205 },
206 {
207 .start = 0x11000000,
208 .end = 0x1100000f,
209 .flags = IORESOURCE_MEM,
210 },
211 {
212 .start = 0x40100000,
213 .end = 0x4010001f,
214 .flags = IORESOURCE_MEM,
215 },
216 {
217 .start = 0x40200000,
218 .end = 0x4020001f,
219 .flags = IORESOURCE_MEM,
220 },
221 {
222 .start = 0x40700000,
223 .end = 0x4070001f,
224 .flags = IORESOURCE_MEM,
225 },
226};
227
228static struct plat_serial8250_port serial_platform_data[] = {
229 /* External UARTs */
230 /* FIXME: Shared IRQs on COM1-COM4 will not work properly on v1i1 hardware. */
231 { /* COM1 */
232 .mapbase = 0x10000000,
233 .irq = gpio_to_irq(ZEUS_UARTA_GPIO),
234 .irqflags = IRQF_TRIGGER_RISING,
235 .uartclk = 14745600,
236 .regshift = 1,
237 .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
238 .iotype = UPIO_MEM,
239 },
240 { /* COM2 */
241 .mapbase = 0x10800000,
242 .irq = gpio_to_irq(ZEUS_UARTB_GPIO),
243 .irqflags = IRQF_TRIGGER_RISING,
244 .uartclk = 14745600,
245 .regshift = 1,
246 .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
247 .iotype = UPIO_MEM,
248 },
249 { /* COM3 */
250 .mapbase = 0x11000000,
251 .irq = gpio_to_irq(ZEUS_UARTC_GPIO),
252 .irqflags = IRQF_TRIGGER_RISING,
253 .uartclk = 14745600,
254 .regshift = 1,
255 .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
256 .iotype = UPIO_MEM,
257 },
258 { /* COM4 */
259 .mapbase = 0x11800000,
260 .irq = gpio_to_irq(ZEUS_UARTD_GPIO),
261 .irqflags = IRQF_TRIGGER_RISING,
262 .uartclk = 14745600,
263 .regshift = 1,
264 .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
265 .iotype = UPIO_MEM,
266 },
267 /* Internal UARTs */
268 { /* FFUART */
269 .membase = (void *)&FFUART,
270 .mapbase = __PREG(FFUART),
271 .irq = IRQ_FFUART,
272 .uartclk = 921600 * 16,
273 .regshift = 2,
274 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
275 .iotype = UPIO_MEM,
276 },
277 { /* BTUART */
278 .membase = (void *)&BTUART,
279 .mapbase = __PREG(BTUART),
280 .irq = IRQ_BTUART,
281 .uartclk = 921600 * 16,
282 .regshift = 2,
283 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
284 .iotype = UPIO_MEM,
285 },
286 { /* STUART */
287 .membase = (void *)&STUART,
288 .mapbase = __PREG(STUART),
289 .irq = IRQ_STUART,
290 .uartclk = 921600 * 16,
291 .regshift = 2,
292 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
293 .iotype = UPIO_MEM,
294 },
295 { },
296};
297
298static struct platform_device zeus_serial_device = {
299 .name = "serial8250",
300 .id = PLAT8250_DEV_PLATFORM,
301 .dev = {
302 .platform_data = serial_platform_data,
303 },
304 .num_resources = ARRAY_SIZE(zeus_serial_resources),
305 .resource = zeus_serial_resources,
306};
307
308/* Ethernet */
309static struct resource zeus_dm9k0_resource[] = {
310 [0] = {
311 .start = ZEUS_ETH0_PHYS,
312 .end = ZEUS_ETH0_PHYS + 1,
313 .flags = IORESOURCE_MEM
314 },
315 [1] = {
316 .start = ZEUS_ETH0_PHYS + 2,
317 .end = ZEUS_ETH0_PHYS + 3,
318 .flags = IORESOURCE_MEM
319 },
320 [2] = {
321 .start = gpio_to_irq(ZEUS_ETH0_GPIO),
322 .end = gpio_to_irq(ZEUS_ETH0_GPIO),
323 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
324 },
325};
326
327static struct resource zeus_dm9k1_resource[] = {
328 [0] = {
329 .start = ZEUS_ETH1_PHYS,
330 .end = ZEUS_ETH1_PHYS + 1,
331 .flags = IORESOURCE_MEM
332 },
333 [1] = {
334 .start = ZEUS_ETH1_PHYS + 2,
335 .end = ZEUS_ETH1_PHYS + 3,
336 .flags = IORESOURCE_MEM,
337 },
338 [2] = {
339 .start = gpio_to_irq(ZEUS_ETH1_GPIO),
340 .end = gpio_to_irq(ZEUS_ETH1_GPIO),
341 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
342 },
343};
344
345static struct dm9000_plat_data zeus_dm9k_platdata = {
346 .flags = DM9000_PLATF_16BITONLY,
347};
348
349static struct platform_device zeus_dm9k0_device = {
350 .name = "dm9000",
351 .id = 0,
352 .num_resources = ARRAY_SIZE(zeus_dm9k0_resource),
353 .resource = zeus_dm9k0_resource,
354 .dev = {
355 .platform_data = &zeus_dm9k_platdata,
356 }
357};
358
359static struct platform_device zeus_dm9k1_device = {
360 .name = "dm9000",
361 .id = 1,
362 .num_resources = ARRAY_SIZE(zeus_dm9k1_resource),
363 .resource = zeus_dm9k1_resource,
364 .dev = {
365 .platform_data = &zeus_dm9k_platdata,
366 }
367};
368
369/* External SRAM */
370static struct resource zeus_sram_resource = {
371 .start = ZEUS_SRAM_PHYS,
372 .end = ZEUS_SRAM_PHYS + ZEUS_SRAM_SIZE * 2 - 1,
373 .flags = IORESOURCE_MEM,
374};
375
376static struct platform_device zeus_sram_device = {
377 .name = "pxa2xx-8bit-sram",
378 .id = 0,
379 .num_resources = 1,
380 .resource = &zeus_sram_resource,
381};
382
383/* SPI interface on SSP3 */
384static struct pxa2xx_spi_master pxa2xx_spi_ssp3_master_info = {
385 .num_chipselect = 1,
386 .enable_dma = 1,
387};
388
389static struct platform_device pxa2xx_spi_ssp3_device = {
390 .name = "pxa2xx-spi",
391 .id = 3,
392 .dev = {
393 .platform_data = &pxa2xx_spi_ssp3_master_info,
394 },
395};
396
397/* Leds */
398static struct gpio_led zeus_leds[] = {
399 [0] = {
400 .name = "zeus:yellow:1",
401 .default_trigger = "heartbeat",
402 .gpio = ZEUS_EXT0_GPIO(3),
403 .active_low = 1,
404 },
405 [1] = {
406 .name = "zeus:yellow:2",
407 .default_trigger = "default-on",
408 .gpio = ZEUS_EXT0_GPIO(4),
409 .active_low = 1,
410 },
411 [2] = {
412 .name = "zeus:yellow:3",
413 .default_trigger = "default-on",
414 .gpio = ZEUS_EXT0_GPIO(5),
415 .active_low = 1,
416 },
417};
418
419static struct gpio_led_platform_data zeus_leds_info = {
420 .leds = zeus_leds,
421 .num_leds = ARRAY_SIZE(zeus_leds),
422};
423
424static struct platform_device zeus_leds_device = {
425 .name = "leds-gpio",
426 .id = -1,
427 .dev = {
428 .platform_data = &zeus_leds_info,
429 },
430};
431
432static void zeus_cf_reset(int state)
433{
434 u16 cpld_state = __raw_readw(ZEUS_CPLD_CONTROL);
435
436 if (state)
437 cpld_state |= ZEUS_CPLD_CONTROL_CF_RST;
438 else
439 cpld_state &= ~ZEUS_CPLD_CONTROL_CF_RST;
440
441 __raw_writew(cpld_state, ZEUS_CPLD_CONTROL);
442}
443
444static struct arcom_pcmcia_pdata zeus_pcmcia_info = {
445 .cd_gpio = ZEUS_CF_CD_GPIO,
446 .rdy_gpio = ZEUS_CF_RDY_GPIO,
447 .pwr_gpio = ZEUS_CF_PWEN_GPIO,
448 .reset = zeus_cf_reset,
449};
450
451static struct platform_device zeus_pcmcia_device = {
452 .name = "zeus-pcmcia",
453 .id = -1,
454 .dev = {
455 .platform_data = &zeus_pcmcia_info,
456 },
457};
458
459static struct platform_device *zeus_devices[] __initdata = {
460 &zeus_serial_device,
461 &zeus_mtd_devices[0],
462 &zeus_dm9k0_device,
463 &zeus_dm9k1_device,
464 &zeus_sram_device,
465 &pxa2xx_spi_ssp3_device,
466 &zeus_leds_device,
467 &zeus_pcmcia_device,
468};
469
470/* AC'97 */
471static pxa2xx_audio_ops_t zeus_ac97_info = {
472 .reset_gpio = 95,
473};
474
475
476/*
477 * USB host
478 */
479
480static int zeus_ohci_init(struct device *dev)
481{
482 int err;
483
484 /* Switch on port 2. */
485 if ((err = gpio_request(ZEUS_USB2_PWREN_GPIO, "USB2_PWREN"))) {
486 dev_err(dev, "Can't request USB2_PWREN\n");
487 return err;
488 }
489
490 if ((err = gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 1))) {
491 gpio_free(ZEUS_USB2_PWREN_GPIO);
492 dev_err(dev, "Can't enable USB2_PWREN\n");
493 return err;
494 }
495
496 /* Port 2 is shared between host and client interface. */
497 UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
498
499 return 0;
500}
501
502static void zeus_ohci_exit(struct device *dev)
503{
504 /* Power-off port 2 */
505 gpio_direction_output(ZEUS_USB2_PWREN_GPIO, 0);
506 gpio_free(ZEUS_USB2_PWREN_GPIO);
507}
508
509static struct pxaohci_platform_data zeus_ohci_platform_data = {
510 .port_mode = PMM_NPS_MODE,
511 .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
512 .init = zeus_ohci_init,
513 .exit = zeus_ohci_exit,
514};
515
516/*
517 * Flat Panel
518 */
519
520static void zeus_lcd_power(int on, struct fb_var_screeninfo *si)
521{
522 gpio_set_value(ZEUS_LCD_EN_GPIO, on);
523}
524
525static void zeus_backlight_power(int on)
526{
527 gpio_set_value(ZEUS_BKLEN_GPIO, on);
528}
529
530static int zeus_setup_fb_gpios(void)
531{
532 int err;
533
534 if ((err = gpio_request(ZEUS_LCD_EN_GPIO, "LCD_EN")))
535 goto out_err;
536
537 if ((err = gpio_direction_output(ZEUS_LCD_EN_GPIO, 0)))
538 goto out_err_lcd;
539
540 if ((err = gpio_request(ZEUS_BKLEN_GPIO, "BKLEN")))
541 goto out_err_lcd;
542
543 if ((err = gpio_direction_output(ZEUS_BKLEN_GPIO, 0)))
544 goto out_err_bkl;
545
546 return 0;
547
548out_err_bkl:
549 gpio_free(ZEUS_BKLEN_GPIO);
550out_err_lcd:
551 gpio_free(ZEUS_LCD_EN_GPIO);
552out_err:
553 return err;
554}
555
556static struct pxafb_mode_info zeus_fb_mode_info[] = {
557 {
558 .pixclock = 39722,
559
560 .xres = 640,
561 .yres = 480,
562
563 .bpp = 16,
564
565 .hsync_len = 63,
566 .left_margin = 16,
567 .right_margin = 81,
568
569 .vsync_len = 2,
570 .upper_margin = 12,
571 .lower_margin = 31,
572
573 .sync = 0,
574 },
575};
576
577static struct pxafb_mach_info zeus_fb_info = {
578 .modes = zeus_fb_mode_info,
579 .num_modes = 1,
580 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
581 .pxafb_lcd_power = zeus_lcd_power,
582 .pxafb_backlight_power = zeus_backlight_power,
583};
584
585/*
586 * MMC/SD Device
587 *
588 * The card detect interrupt isn't debounced so we delay it by 250ms
589 * to give the card a chance to fully insert/eject.
590 */
591
592static struct pxamci_platform_data zeus_mci_platform_data = {
593 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
594 .detect_delay = HZ/4,
595 .gpio_card_detect = ZEUS_MMC_CD_GPIO,
596 .gpio_card_ro = ZEUS_MMC_WP_GPIO,
597 .gpio_card_ro_invert = 1,
598 .gpio_power = -1
599};
600
601/*
602 * USB Device Controller
603 */
604static void zeus_udc_command(int cmd)
605{
606 switch (cmd) {
607 case PXA2XX_UDC_CMD_DISCONNECT:
608 pr_info("zeus: disconnecting USB client\n");
609 UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
610 break;
611
612 case PXA2XX_UDC_CMD_CONNECT:
613 pr_info("zeus: connecting USB client\n");
614 UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE;
615 break;
616 }
617}
618
619static struct pxa2xx_udc_mach_info zeus_udc_info = {
620 .udc_command = zeus_udc_command,
621};
622
623static void zeus_power_off(void)
624{
625 local_irq_disable();
626 pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
627}
628
629int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio,
630 unsigned ngpio, void *context)
631{
632 int i;
633 u8 pcb_info = 0;
634
635 for (i = 0; i < 8; i++) {
636 int pcb_bit = gpio + i + 8;
637
638 if (gpio_request(pcb_bit, "pcb info")) {
639 dev_err(&client->dev, "Can't request pcb info %d\n", i);
640 continue;
641 }
642
643 if (gpio_direction_input(pcb_bit)) {
644 dev_err(&client->dev, "Can't read pcb info %d\n", i);
645 gpio_free(pcb_bit);
646 continue;
647 }
648
649 pcb_info |= !!gpio_get_value(pcb_bit) << i;
650
651 gpio_free(pcb_bit);
652 }
653
654 dev_info(&client->dev, "Zeus PCB version %d issue %d\n",
655 pcb_info >> 4, pcb_info & 0xf);
656
657 return 0;
658}
659
660static struct pca953x_platform_data zeus_pca953x_pdata[] = {
661 [0] = { .gpio_base = ZEUS_EXT0_GPIO_BASE, },
662 [1] = {
663 .gpio_base = ZEUS_EXT1_GPIO_BASE,
664 .setup = zeus_get_pcb_info,
665 },
666 [2] = { .gpio_base = ZEUS_USER_GPIO_BASE, },
667};
668
669static struct i2c_board_info __initdata zeus_i2c_devices[] = {
670 {
671 I2C_BOARD_INFO("pca9535", 0x21),
672 .platform_data = &zeus_pca953x_pdata[0],
673 },
674 {
675 I2C_BOARD_INFO("pca9535", 0x22),
676 .platform_data = &zeus_pca953x_pdata[1],
677 },
678 {
679 I2C_BOARD_INFO("pca9535", 0x20),
680 .platform_data = &zeus_pca953x_pdata[2],
681 .irq = gpio_to_irq(ZEUS_EXTGPIO_GPIO),
682 },
683 { I2C_BOARD_INFO("lm75a", 0x48) },
684 { I2C_BOARD_INFO("24c01", 0x50) },
685 { I2C_BOARD_INFO("isl1208", 0x6f) },
686};
687
688static mfp_cfg_t zeus_pin_config[] __initdata = {
689 GPIO15_nCS_1,
690 GPIO78_nCS_2,
691 GPIO80_nCS_4,
692 GPIO33_nCS_5,
693
694 GPIO22_GPIO,
695 GPIO32_MMC_CLK,
696 GPIO92_MMC_DAT_0,
697 GPIO109_MMC_DAT_1,
698 GPIO110_MMC_DAT_2,
699 GPIO111_MMC_DAT_3,
700 GPIO112_MMC_CMD,
701
702 GPIO88_USBH1_PWR,
703 GPIO89_USBH1_PEN,
704 GPIO119_USBH2_PWR,
705 GPIO120_USBH2_PEN,
706
707 GPIO86_LCD_LDD_16,
708 GPIO87_LCD_LDD_17,
709
710 GPIO102_GPIO,
711 GPIO104_CIF_DD_2,
712 GPIO105_CIF_DD_1,
713
714 GPIO48_nPOE,
715 GPIO49_nPWE,
716 GPIO50_nPIOR,
717 GPIO51_nPIOW,
718 GPIO85_nPCE_1,
719 GPIO54_nPCE_2,
720 GPIO79_PSKTSEL,
721 GPIO55_nPREG,
722 GPIO56_nPWAIT,
723 GPIO57_nIOIS16,
724 GPIO36_GPIO, /* CF CD */
725 GPIO97_GPIO, /* CF PWREN */
726 GPIO99_GPIO, /* CF RDY */
727};
728
729static void __init zeus_init(void)
730{
731 u16 dm9000_msc = 0xe279;
732
733 system_rev = __raw_readw(ZEUS_CPLD_VERSION);
734 pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
735
736 /* Fix timings for dm9000s (CS1/CS2)*/
737 MSC0 = (MSC0 & 0xffff) | (dm9000_msc << 16);
738 MSC1 = (MSC1 & 0xffff0000) | dm9000_msc;
739
740 pm_power_off = zeus_power_off;
741
742 pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config));
743
744 platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices));
745
746 pxa_set_ohci_info(&zeus_ohci_platform_data);
747
748 if (zeus_setup_fb_gpios())
749 pr_err("Failed to setup fb gpios\n");
750 else
751 set_pxa_fb_info(&zeus_fb_info);
752
753 pxa_set_mci_info(&zeus_mci_platform_data);
754 pxa_set_udc_info(&zeus_udc_info);
755 pxa_set_ac97_info(&zeus_ac97_info);
756 pxa_set_i2c_info(NULL);
757 i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices));
758}
759
760static struct map_desc zeus_io_desc[] __initdata = {
761 {
762 .virtual = ZEUS_CPLD_VERSION,
763 .pfn = __phys_to_pfn(ZEUS_CPLD_VERSION_PHYS),
764 .length = 0x1000,
765 .type = MT_DEVICE,
766 },
767 {
768 .virtual = ZEUS_CPLD_ISA_IRQ,
769 .pfn = __phys_to_pfn(ZEUS_CPLD_ISA_IRQ_PHYS),
770 .length = 0x1000,
771 .type = MT_DEVICE,
772 },
773 {
774 .virtual = ZEUS_CPLD_CONTROL,
775 .pfn = __phys_to_pfn(ZEUS_CPLD_CONTROL_PHYS),
776 .length = 0x1000,
777 .type = MT_DEVICE,
778 },
779 {
780 .virtual = ZEUS_CPLD_EXTWDOG,
781 .pfn = __phys_to_pfn(ZEUS_CPLD_EXTWDOG_PHYS),
782 .length = 0x1000,
783 .type = MT_DEVICE,
784 },
785 {
786 .virtual = ZEUS_PC104IO,
787 .pfn = __phys_to_pfn(ZEUS_PC104IO_PHYS),
788 .length = 0x00800000,
789 .type = MT_DEVICE,
790 },
791};
792
793static void __init zeus_map_io(void)
794{
795 pxa_map_io();
796
797 iotable_init(zeus_io_desc, ARRAY_SIZE(zeus_io_desc));
798
799 /* Clear PSPR to ensure a full restart on wake-up. */
800 PMCR = PSPR = 0;
801
802 /* enable internal 32.768Khz oscillator (ignore OSCC_OOK) */
803 OSCC |= OSCC_OON;
804
805 /* Some clock cycles later (from OSCC_ON), programme PCFR (OPDE...).
806 * float chip selects and PCMCIA */
807 PCFR = PCFR_OPDE | PCFR_DC_EN | PCFR_FS | PCFR_FP;
808}
809
810MACHINE_START(ARCOM_ZEUS, "Arcom ZEUS")
811 /* Maintainer: Marc Zyngier <maz@misterjones.org> */
812 .phys_io = 0x40000000,
813 .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc),
814 .boot_params = 0xa0000100,
815 .map_io = zeus_map_io,
816 .init_irq = zeus_init_irq,
817 .timer = &pxa_timer,
818 .init_machine = zeus_init,
819MACHINE_END
820
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index c48e1f2c3349..ee5e392430e8 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -70,7 +70,7 @@ config MACH_REALVIEW_PBX
70 bool "Support RealView/PBX platform" 70 bool "Support RealView/PBX platform"
71 select ARM_GIC 71 select ARM_GIC
72 select HAVE_PATA_PLATFORM 72 select HAVE_PATA_PLATFORM
73 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !HIGH_PHYS_OFFSET 73 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
74 select ZONE_DMA if SPARSEMEM 74 select ZONE_DMA if SPARSEMEM
75 help 75 help
76 Include support for the ARM(R) RealView PBX platform. 76 Include support for the ARM(R) RealView PBX platform.
diff --git a/arch/arm/mach-s3c2400/Kconfig b/arch/arm/mach-s3c2400/Kconfig
index deab0722836e..fdd8f5e96faf 100644
--- a/arch/arm/mach-s3c2400/Kconfig
+++ b/arch/arm/mach-s3c2400/Kconfig
@@ -1,13 +1,7 @@
1# arch/arm/mach-s3c2400/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
6 4
7
8
9menu "S3C2400 Machines" 5menu "S3C2400 Machines"
10 6
11
12endmenu 7endmenu
13
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index dd1fcc7e6708..554731868b07 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2410/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h b/arch/arm/mach-s3c2410/include/mach/spi.h
index 193b39d654ed..4d9588373aa5 100644
--- a/arch/arm/mach-s3c2410/include/mach/spi.h
+++ b/arch/arm/mach-s3c2410/include/mach/spi.h
@@ -18,6 +18,8 @@ struct s3c2410_spi_info {
18 unsigned int num_cs; /* total chipselects */ 18 unsigned int num_cs; /* total chipselects */
19 int bus_num; /* bus number to use. */ 19 int bus_num; /* bus number to use. */
20 20
21 unsigned int use_fiq:1; /* use fiq */
22
21 void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable); 23 void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
22 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); 24 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
23}; 25};
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index c2bdc4635d12..9a8c0657ae50 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2412/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
@@ -90,6 +88,4 @@ config MACH_VSTMS
90 help 88 help
91 Say Y here if you are using an VSTMS board 89 Say Y here if you are using an VSTMS board
92 90
93
94endmenu 91endmenu
95
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index cf10e14b7b49..80879358eb2f 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2440/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
@@ -122,4 +120,3 @@ config MACH_MINI2440
122 available via various sources. It can come with a 3.5" or 7" touch LCD. 120 available via various sources. It can come with a 3.5" or 7" touch LCD.
123 121
124endmenu 122endmenu
125
diff --git a/arch/arm/mach-s3c2442/Kconfig b/arch/arm/mach-s3c2442/Kconfig
index 103e913f2258..8d3811852fc7 100644
--- a/arch/arm/mach-s3c2442/Kconfig
+++ b/arch/arm/mach-s3c2442/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2442/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
@@ -36,6 +34,4 @@ config MACH_NEO1973_GTA02
36 help 34 help
37 Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone 35 Say Y here if you are using the Openmoko GTA02 / Freerunner GSM Phone
38 36
39
40endmenu 37endmenu
41
diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index f76d6ff4aeb9..0b4a3a03071f 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -268,6 +268,9 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
268 268
269 .batteries = gta02_batteries, 269 .batteries = gta02_batteries,
270 .num_batteries = ARRAY_SIZE(gta02_batteries), 270 .num_batteries = ARRAY_SIZE(gta02_batteries),
271
272 .charger_reference_current_ma = 1000,
273
271 .reg_init_data = { 274 .reg_init_data = {
272 [PCF50633_REGULATOR_AUTO] = { 275 [PCF50633_REGULATOR_AUTO] = {
273 .constraints = { 276 .constraints = {
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
index 212141baebec..4314c4424909 100644
--- a/arch/arm/mach-s3c2443/Kconfig
+++ b/arch/arm/mach-s3c2443/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2443/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
index 585211ca0187..7d74fd5c8d66 100644
--- a/arch/arm/mach-s3c24a0/include/mach/memory.h
+++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
@@ -15,5 +15,7 @@
15 15
16#define __virt_to_bus(x) __virt_to_phys(x) 16#define __virt_to_bus(x) __virt_to_phys(x)
17#define __bus_to_virt(x) __phys_to_virt(x) 17#define __bus_to_virt(x) __phys_to_virt(x)
18#define __pfn_to_bus(x) __pfn_to_phys(x)
19#define __bus_to_pfn(x) __phys_to_pfn(x)
18 20
19#endif 21#endif
diff --git a/arch/arm/mach-s3c6400/Kconfig b/arch/arm/mach-s3c6400/Kconfig
index 770b72067e3d..a250bf68709f 100644
--- a/arch/arm/mach-s3c6400/Kconfig
+++ b/arch/arm/mach-s3c6400/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c6400/Kconfig
2#
3# Copyright 2008 Openmoko, Inc. 1# Copyright 2008 Openmoko, Inc.
4# Simtec Electronics, Ben Dooks <ben@simtec.co.uk> 2# Simtec Electronics, Ben Dooks <ben@simtec.co.uk>
5# 3#
diff --git a/arch/arm/mach-s3c6400/setup-sdhci.c b/arch/arm/mach-s3c6400/setup-sdhci.c
index b93dafbee1f4..1039937403be 100644
--- a/arch/arm/mach-s3c6400/setup-sdhci.c
+++ b/arch/arm/mach-s3c6400/setup-sdhci.c
@@ -30,7 +30,7 @@ char *s3c6400_hsmmc_clksrcs[4] = {
30 [0] = "hsmmc", 30 [0] = "hsmmc",
31 [1] = "hsmmc", 31 [1] = "hsmmc",
32 [2] = "mmc_bus", 32 [2] = "mmc_bus",
33 /* [3] = "48m", - note not succesfully used yet */ 33 /* [3] = "48m", - note not successfully used yet */
34}; 34};
35 35
36void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev, 36void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig
index 72d4b11b2077..162f4561f80f 100644
--- a/arch/arm/mach-s3c6410/Kconfig
+++ b/arch/arm/mach-s3c6410/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c6410/Kconfig
2#
3# Copyright 2008 Openmoko, Inc. 1# Copyright 2008 Openmoko, Inc.
4# Copyright 2008 Simtec Electronics 2# Copyright 2008 Simtec Electronics
5# 3#
diff --git a/arch/arm/mach-s3c6410/setup-sdhci.c b/arch/arm/mach-s3c6410/setup-sdhci.c
index 20666f3bd478..816d2d9f9ef8 100644
--- a/arch/arm/mach-s3c6410/setup-sdhci.c
+++ b/arch/arm/mach-s3c6410/setup-sdhci.c
@@ -30,7 +30,7 @@ char *s3c6410_hsmmc_clksrcs[4] = {
30 [0] = "hsmmc", 30 [0] = "hsmmc",
31 [1] = "hsmmc", 31 [1] = "hsmmc",
32 [2] = "mmc_bus", 32 [2] = "mmc_bus",
33 /* [3] = "48m", - note not succesfully used yet */ 33 /* [3] = "48m", - note not successfully used yet */
34}; 34};
35 35
36 36
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 0dd2b8c6eabe..27ec167d2808 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s5pc100/Kconfig
2#
3# Copyright 2009 Samsung Electronics Co. 1# Copyright 2009 Samsung Electronics Co.
4# Byungho Min <bhmin@samsung.com> 2# Byungho Min <bhmin@samsung.com>
5# 3#
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
index 03a7f3857c5e..b17d52f7cc48 100644
--- a/arch/arm/mach-sa1100/Kconfig
+++ b/arch/arm/mach-sa1100/Kconfig
@@ -4,6 +4,7 @@ menu "SA11x0 Implementations"
4 4
5config SA1100_ASSABET 5config SA1100_ASSABET
6 bool "Assabet" 6 bool "Assabet"
7 select CPU_FREQ_SA1110
7 help 8 help
8 Say Y here if you are using the Intel(R) StrongARM(R) SA-1110 9 Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
9 Microprocessor Development Board (also known as the Assabet). 10 Microprocessor Development Board (also known as the Assabet).
@@ -19,6 +20,7 @@ config ASSABET_NEPONSET
19 20
20config SA1100_CERF 21config SA1100_CERF
21 bool "CerfBoard" 22 bool "CerfBoard"
23 select CPU_FREQ_SA1110
22 help 24 help
23 The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued). 25 The Intrinsyc CerfBoard is based on the StrongARM 1110 (Discontinued).
24 More information is available at: 26 More information is available at:
@@ -45,6 +47,7 @@ endchoice
45 47
46config SA1100_COLLIE 48config SA1100_COLLIE
47 bool "Sharp Zaurus SL5500" 49 bool "Sharp Zaurus SL5500"
50 # FIXME: select CPU_FREQ_SA11x0
48 select SHARP_LOCOMO 51 select SHARP_LOCOMO
49 select SHARP_SCOOP 52 select SHARP_SCOOP
50 select SHARP_PARAM 53 select SHARP_PARAM
@@ -54,6 +57,7 @@ config SA1100_COLLIE
54config SA1100_H3100 57config SA1100_H3100
55 bool "Compaq iPAQ H3100" 58 bool "Compaq iPAQ H3100"
56 select HTC_EGPIO 59 select HTC_EGPIO
60 select CPU_FREQ_SA1100
57 help 61 help
58 Say Y here if you intend to run this kernel on the Compaq iPAQ 62 Say Y here if you intend to run this kernel on the Compaq iPAQ
59 H3100 handheld computer. Information about this machine and the 63 H3100 handheld computer. Information about this machine and the
@@ -64,6 +68,7 @@ config SA1100_H3100
64config SA1100_H3600 68config SA1100_H3600
65 bool "Compaq iPAQ H3600/H3700" 69 bool "Compaq iPAQ H3600/H3700"
66 select HTC_EGPIO 70 select HTC_EGPIO
71 select CPU_FREQ_SA1100
67 help 72 help
68 Say Y here if you intend to run this kernel on the Compaq iPAQ 73 Say Y here if you intend to run this kernel on the Compaq iPAQ
69 H3600 handheld computer. Information about this machine and the 74 H3600 handheld computer. Information about this machine and the
@@ -74,6 +79,7 @@ config SA1100_H3600
74config SA1100_BADGE4 79config SA1100_BADGE4
75 bool "HP Labs BadgePAD 4" 80 bool "HP Labs BadgePAD 4"
76 select SA1111 81 select SA1111
82 select CPU_FREQ_SA1100
77 help 83 help
78 Say Y here if you want to build a kernel for the HP Laboratories 84 Say Y here if you want to build a kernel for the HP Laboratories
79 BadgePAD 4. 85 BadgePAD 4.
@@ -81,6 +87,7 @@ config SA1100_BADGE4
81config SA1100_JORNADA720 87config SA1100_JORNADA720
82 bool "HP Jornada 720" 88 bool "HP Jornada 720"
83 select SA1111 89 select SA1111
90 # FIXME: select CPU_FREQ_SA11x0
84 help 91 help
85 Say Y here if you want to build a kernel for the HP Jornada 720 92 Say Y here if you want to build a kernel for the HP Jornada 720
86 handheld computer. See <http://www.hp.com/jornada/products/720> 93 handheld computer. See <http://www.hp.com/jornada/products/720>
@@ -98,12 +105,14 @@ config SA1100_JORNADA720_SSP
98 105
99config SA1100_HACKKIT 106config SA1100_HACKKIT
100 bool "HackKit Core CPU Board" 107 bool "HackKit Core CPU Board"
108 select CPU_FREQ_SA1100
101 help 109 help
102 Say Y here to support the HackKit Core CPU Board 110 Say Y here to support the HackKit Core CPU Board
103 <http://hackkit.eletztrick.de>; 111 <http://hackkit.eletztrick.de>;
104 112
105config SA1100_LART 113config SA1100_LART
106 bool "LART" 114 bool "LART"
115 select CPU_FREQ_SA1100
107 help 116 help
108 Say Y here if you are using the Linux Advanced Radio Terminal 117 Say Y here if you are using the Linux Advanced Radio Terminal
109 (also known as the LART). See <http://www.lartmaker.nl/> for 118 (also known as the LART). See <http://www.lartmaker.nl/> for
@@ -111,6 +120,7 @@ config SA1100_LART
111 120
112config SA1100_PLEB 121config SA1100_PLEB
113 bool "PLEB" 122 bool "PLEB"
123 select CPU_FREQ_SA1100
114 help 124 help
115 Say Y here if you are using version 1 of the Portable Linux 125 Say Y here if you are using version 1 of the Portable Linux
116 Embedded Board (also known as PLEB). 126 Embedded Board (also known as PLEB).
@@ -119,6 +129,7 @@ config SA1100_PLEB
119 129
120config SA1100_SHANNON 130config SA1100_SHANNON
121 bool "Shannon" 131 bool "Shannon"
132 select CPU_FREQ_SA1100
122 help 133 help
123 The Shannon (also known as a Tuxscreen, and also as a IS2630) was a 134 The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
124 limited edition webphone produced by Philips. The Shannon is a SA1100 135 limited edition webphone produced by Philips. The Shannon is a SA1100
@@ -127,6 +138,7 @@ config SA1100_SHANNON
127 138
128config SA1100_SIMPAD 139config SA1100_SIMPAD
129 bool "Simpad" 140 bool "Simpad"
141 select CPU_FREQ_SA1110
130 help 142 help
131 The SIEMENS webpad SIMpad is based on the StrongARM 1110. There 143 The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
132 are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB 144 are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
@@ -145,3 +157,4 @@ config SA1100_SSP
145endmenu 157endmenu
146 158
147endif 159endif
160
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index cb4521a6f42d..ad660350c296 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -65,7 +65,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
65 65
66 66
67/** 67/**
68 * sa1100_request_dma - allocate one of the SA11x0's DMA chanels 68 * sa1100_request_dma - allocate one of the SA11x0's DMA channels
69 * @device: The SA11x0 peripheral targeted by this request 69 * @device: The SA11x0 peripheral targeted by this request
70 * @device_id: An ascii name for the claiming device 70 * @device_id: An ascii name for the claiming device
71 * @callback: Function to be called when the DMA completes 71 * @callback: Function to be called when the DMA completes
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 9faea1511c1f..3c1fcd696714 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -58,7 +58,6 @@ static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
58 2802 /* 280.2 MHz */ 58 2802 /* 280.2 MHz */
59}; 59};
60 60
61#if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110)
62/* rounds up(!) */ 61/* rounds up(!) */
63unsigned int sa11x0_freq_to_ppcr(unsigned int khz) 62unsigned int sa11x0_freq_to_ppcr(unsigned int khz)
64{ 63{
@@ -110,17 +109,6 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
110 return cclk_frequency_100khz[PPCR & 0xf] * 100; 109 return cclk_frequency_100khz[PPCR & 0xf] * 100;
111} 110}
112 111
113#else
114/*
115 * We still need to provide this so building without cpufreq works.
116 */
117unsigned int cpufreq_get(unsigned int cpu)
118{
119 return cclk_frequency_100khz[PPCR & 0xf] * 100;
120}
121EXPORT_SYMBOL(cpufreq_get);
122#endif
123
124/* 112/*
125 * This is the SA11x0 sched_clock implementation. This has 113 * This is the SA11x0 sched_clock implementation. This has
126 * a resolution of 271ns, and a maximum value of 32025597s (370 days). 114 * a resolution of 271ns, and a maximum value of 32025597s (370 days).
diff --git a/arch/arm/mach-u300/include/mach/coh901318.h b/arch/arm/mach-u300/include/mach/coh901318.h
new file mode 100644
index 000000000000..f4cfee9c7d28
--- /dev/null
+++ b/arch/arm/mach-u300/include/mach/coh901318.h
@@ -0,0 +1,281 @@
1/*
2 *
3 * include/linux/coh901318.h
4 *
5 *
6 * Copyright (C) 2007-2009 ST-Ericsson
7 * License terms: GNU General Public License (GPL) version 2
8 * DMA driver for COH 901 318
9 * Author: Per Friden <per.friden@stericsson.com>
10 */
11
12#ifndef COH901318_H
13#define COH901318_H
14
15#include <linux/device.h>
16#include <linux/dmaengine.h>
17
18#define MAX_DMA_PACKET_SIZE_SHIFT 11
19#define MAX_DMA_PACKET_SIZE (1 << MAX_DMA_PACKET_SIZE_SHIFT)
20
21/**
22 * struct coh901318_lli - linked list item for DMAC
23 * @control: control settings for DMAC
24 * @src_addr: transfer source address
25 * @dst_addr: transfer destination address
26 * @link_addr: physical address to next lli
27 * @virt_link_addr: virtual addres of next lli (only used by pool_free)
28 * @phy_this: physical address of current lli (only used by pool_free)
29 */
30struct coh901318_lli {
31 u32 control;
32 dma_addr_t src_addr;
33 dma_addr_t dst_addr;
34 dma_addr_t link_addr;
35
36 void *virt_link_addr;
37 dma_addr_t phy_this;
38};
39/**
40 * struct coh901318_params - parameters for DMAC configuration
41 * @config: DMA config register
42 * @ctrl_lli_last: DMA control register for the last lli in the list
43 * @ctrl_lli: DMA control register for an lli
44 * @ctrl_lli_chained: DMA control register for a chained lli
45 */
46struct coh901318_params {
47 u32 config;
48 u32 ctrl_lli_last;
49 u32 ctrl_lli;
50 u32 ctrl_lli_chained;
51};
52/**
53 * struct coh_dma_channel - dma channel base
54 * @name: ascii name of dma channel
55 * @number: channel id number
56 * @desc_nbr_max: number of preallocated descriptortors
57 * @priority_high: prio of channel, 0 low otherwise high.
58 * @param: configuration parameters
59 * @dev_addr: physical address of periphal connected to channel
60 */
61struct coh_dma_channel {
62 const char name[32];
63 const int number;
64 const int desc_nbr_max;
65 const int priority_high;
66 const struct coh901318_params param;
67 const dma_addr_t dev_addr;
68};
69
70/**
71 * dma_access_memory_state_t - register dma for memory access
72 *
73 * @dev: The dma device
74 * @active: 1 means dma intends to access memory
75 * 0 means dma wont access memory
76 */
77typedef void (*dma_access_memory_state_t)(struct device *dev,
78 bool active);
79
80/**
81 * struct powersave - DMA power save structure
82 * @lock: lock protecting data in this struct
83 * @started_channels: bit mask indicating active dma channels
84 */
85struct powersave {
86 spinlock_t lock;
87 u64 started_channels;
88};
89/**
90 * struct coh901318_platform - platform arch structure
91 * @chans_slave: specifying dma slave channels
92 * @chans_memcpy: specifying dma memcpy channels
93 * @access_memory_state: requesting DMA memeory access (on / off)
94 * @chan_conf: dma channel configurations
95 * @max_channels: max number of dma chanenls
96 */
97struct coh901318_platform {
98 const int *chans_slave;
99 const int *chans_memcpy;
100 const dma_access_memory_state_t access_memory_state;
101 const struct coh_dma_channel *chan_conf;
102 const int max_channels;
103};
104
105/**
106 * coh901318_get_bytes_left() - Get number of bytes left on a current transfer
107 * @chan: dma channel handle
108 * return number of bytes left, or negative on error
109 */
110u32 coh901318_get_bytes_left(struct dma_chan *chan);
111
112/**
113 * coh901318_stop() - Stops dma transfer
114 * @chan: dma channel handle
115 * return 0 on success otherwise negative value
116 */
117void coh901318_stop(struct dma_chan *chan);
118
119/**
120 * coh901318_continue() - Resumes a stopped dma transfer
121 * @chan: dma channel handle
122 * return 0 on success otherwise negative value
123 */
124void coh901318_continue(struct dma_chan *chan);
125
126/**
127 * coh901318_filter_id() - DMA channel filter function
128 * @chan: dma channel handle
129 * @chan_id: id of dma channel to be filter out
130 *
131 * In dma_request_channel() it specifies what channel id to be requested
132 */
133bool coh901318_filter_id(struct dma_chan *chan, void *chan_id);
134
135/*
136 * DMA Controller - this access the static mappings of the coh901318 dma.
137 *
138 */
139
140#define COH901318_MOD32_MASK (0x1F)
141#define COH901318_WORD_MASK (0xFFFFFFFF)
142/* INT_STATUS - Interrupt Status Registers 32bit (R/-) */
143#define COH901318_INT_STATUS1 (0x0000)
144#define COH901318_INT_STATUS2 (0x0004)
145/* TC_INT_STATUS - Terminal Count Interrupt Status Registers 32bit (R/-) */
146#define COH901318_TC_INT_STATUS1 (0x0008)
147#define COH901318_TC_INT_STATUS2 (0x000C)
148/* TC_INT_CLEAR - Terminal Count Interrupt Clear Registers 32bit (-/W) */
149#define COH901318_TC_INT_CLEAR1 (0x0010)
150#define COH901318_TC_INT_CLEAR2 (0x0014)
151/* RAW_TC_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
152#define COH901318_RAW_TC_INT_STATUS1 (0x0018)
153#define COH901318_RAW_TC_INT_STATUS2 (0x001C)
154/* BE_INT_STATUS - Bus Error Interrupt Status Registers 32bit (R/-) */
155#define COH901318_BE_INT_STATUS1 (0x0020)
156#define COH901318_BE_INT_STATUS2 (0x0024)
157/* BE_INT_CLEAR - Bus Error Interrupt Clear Registers 32bit (-/W) */
158#define COH901318_BE_INT_CLEAR1 (0x0028)
159#define COH901318_BE_INT_CLEAR2 (0x002C)
160/* RAW_BE_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */
161#define COH901318_RAW_BE_INT_STATUS1 (0x0030)
162#define COH901318_RAW_BE_INT_STATUS2 (0x0034)
163
164/*
165 * CX_CFG - Channel Configuration Registers 32bit (R/W)
166 */
167#define COH901318_CX_CFG (0x0100)
168#define COH901318_CX_CFG_SPACING (0x04)
169/* Channel enable activates tha dma job */
170#define COH901318_CX_CFG_CH_ENABLE (0x00000001)
171#define COH901318_CX_CFG_CH_DISABLE (0x00000000)
172/* Request Mode */
173#define COH901318_CX_CFG_RM_MASK (0x00000006)
174#define COH901318_CX_CFG_RM_MEMORY_TO_MEMORY (0x0 << 1)
175#define COH901318_CX_CFG_RM_PRIMARY_TO_MEMORY (0x1 << 1)
176#define COH901318_CX_CFG_RM_MEMORY_TO_PRIMARY (0x1 << 1)
177#define COH901318_CX_CFG_RM_PRIMARY_TO_SECONDARY (0x3 << 1)
178#define COH901318_CX_CFG_RM_SECONDARY_TO_PRIMARY (0x3 << 1)
179/* Linked channel request field. RM must == 11 */
180#define COH901318_CX_CFG_LCRF_SHIFT 3
181#define COH901318_CX_CFG_LCRF_MASK (0x000001F8)
182#define COH901318_CX_CFG_LCR_DISABLE (0x00000000)
183/* Terminal Counter Interrupt Request Mask */
184#define COH901318_CX_CFG_TC_IRQ_ENABLE (0x00000200)
185#define COH901318_CX_CFG_TC_IRQ_DISABLE (0x00000000)
186/* Bus Error interrupt Mask */
187#define COH901318_CX_CFG_BE_IRQ_ENABLE (0x00000400)
188#define COH901318_CX_CFG_BE_IRQ_DISABLE (0x00000000)
189
190/*
191 * CX_STAT - Channel Status Registers 32bit (R/-)
192 */
193#define COH901318_CX_STAT (0x0200)
194#define COH901318_CX_STAT_SPACING (0x04)
195#define COH901318_CX_STAT_RBE_IRQ_IND (0x00000008)
196#define COH901318_CX_STAT_RTC_IRQ_IND (0x00000004)
197#define COH901318_CX_STAT_ACTIVE (0x00000002)
198#define COH901318_CX_STAT_ENABLED (0x00000001)
199
200/*
201 * CX_CTRL - Channel Control Registers 32bit (R/W)
202 */
203#define COH901318_CX_CTRL (0x0400)
204#define COH901318_CX_CTRL_SPACING (0x10)
205/* Transfer Count Enable */
206#define COH901318_CX_CTRL_TC_ENABLE (0x00001000)
207#define COH901318_CX_CTRL_TC_DISABLE (0x00000000)
208/* Transfer Count Value 0 - 4095 */
209#define COH901318_CX_CTRL_TC_VALUE_MASK (0x00000FFF)
210/* Burst count */
211#define COH901318_CX_CTRL_BURST_COUNT_MASK (0x0000E000)
212#define COH901318_CX_CTRL_BURST_COUNT_64_BYTES (0x7 << 13)
213#define COH901318_CX_CTRL_BURST_COUNT_48_BYTES (0x6 << 13)
214#define COH901318_CX_CTRL_BURST_COUNT_32_BYTES (0x5 << 13)
215#define COH901318_CX_CTRL_BURST_COUNT_16_BYTES (0x4 << 13)
216#define COH901318_CX_CTRL_BURST_COUNT_8_BYTES (0x3 << 13)
217#define COH901318_CX_CTRL_BURST_COUNT_4_BYTES (0x2 << 13)
218#define COH901318_CX_CTRL_BURST_COUNT_2_BYTES (0x1 << 13)
219#define COH901318_CX_CTRL_BURST_COUNT_1_BYTE (0x0 << 13)
220/* Source bus size */
221#define COH901318_CX_CTRL_SRC_BUS_SIZE_MASK (0x00030000)
222#define COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS (0x2 << 16)
223#define COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS (0x1 << 16)
224#define COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS (0x0 << 16)
225/* Source address increment */
226#define COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE (0x00040000)
227#define COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE (0x00000000)
228/* Destination Bus Size */
229#define COH901318_CX_CTRL_DST_BUS_SIZE_MASK (0x00180000)
230#define COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS (0x2 << 19)
231#define COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS (0x1 << 19)
232#define COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS (0x0 << 19)
233/* Destination address increment */
234#define COH901318_CX_CTRL_DST_ADDR_INC_ENABLE (0x00200000)
235#define COH901318_CX_CTRL_DST_ADDR_INC_DISABLE (0x00000000)
236/* Master Mode (Master2 is only connected to MSL) */
237#define COH901318_CX_CTRL_MASTER_MODE_MASK (0x00C00000)
238#define COH901318_CX_CTRL_MASTER_MODE_M2R_M1W (0x3 << 22)
239#define COH901318_CX_CTRL_MASTER_MODE_M1R_M2W (0x2 << 22)
240#define COH901318_CX_CTRL_MASTER_MODE_M2RW (0x1 << 22)
241#define COH901318_CX_CTRL_MASTER_MODE_M1RW (0x0 << 22)
242/* Terminal Count flag to PER enable */
243#define COH901318_CX_CTRL_TCP_ENABLE (0x01000000)
244#define COH901318_CX_CTRL_TCP_DISABLE (0x00000000)
245/* Terminal Count flags to CPU enable */
246#define COH901318_CX_CTRL_TC_IRQ_ENABLE (0x02000000)
247#define COH901318_CX_CTRL_TC_IRQ_DISABLE (0x00000000)
248/* Hand shake to peripheral */
249#define COH901318_CX_CTRL_HSP_ENABLE (0x04000000)
250#define COH901318_CX_CTRL_HSP_DISABLE (0x00000000)
251#define COH901318_CX_CTRL_HSS_ENABLE (0x08000000)
252#define COH901318_CX_CTRL_HSS_DISABLE (0x00000000)
253/* DMA mode */
254#define COH901318_CX_CTRL_DDMA_MASK (0x30000000)
255#define COH901318_CX_CTRL_DDMA_LEGACY (0x0 << 28)
256#define COH901318_CX_CTRL_DDMA_DEMAND_DMA1 (0x1 << 28)
257#define COH901318_CX_CTRL_DDMA_DEMAND_DMA2 (0x2 << 28)
258/* Primary Request Data Destination */
259#define COH901318_CX_CTRL_PRDD_MASK (0x40000000)
260#define COH901318_CX_CTRL_PRDD_DEST (0x1 << 30)
261#define COH901318_CX_CTRL_PRDD_SOURCE (0x0 << 30)
262
263/*
264 * CX_SRC_ADDR - Channel Source Address Registers 32bit (R/W)
265 */
266#define COH901318_CX_SRC_ADDR (0x0404)
267#define COH901318_CX_SRC_ADDR_SPACING (0x10)
268
269/*
270 * CX_DST_ADDR - Channel Destination Address Registers 32bit R/W
271 */
272#define COH901318_CX_DST_ADDR (0x0408)
273#define COH901318_CX_DST_ADDR_SPACING (0x10)
274
275/*
276 * CX_LNK_ADDR - Channel Link Address Registers 32bit (R/W)
277 */
278#define COH901318_CX_LNK_ADDR (0x040C)
279#define COH901318_CX_LNK_ADDR_SPACING (0x10)
280#define COH901318_CX_LNK_LINK_IMMEDIATE (0x00000001)
281#endif /* COH901318_H */
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h
index 88333dfb19fc..56721a0cd2af 100644
--- a/arch/arm/mach-u300/include/mach/u300-regs.h
+++ b/arch/arm/mach-u300/include/mach/u300-regs.h
@@ -6,7 +6,7 @@
6 * Copyright (C) 2006-2009 ST-Ericsson AB 6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2 7 * License terms: GNU General Public License (GPL) version 2
8 * Basic register address definitions in physical memory and 8 * Basic register address definitions in physical memory and
9 * some block defintions for core devices like the timer. 9 * some block definitions for core devices like the timer.
10 * Author: Linus Walleij <linus.walleij@stericsson.com> 10 * Author: Linus Walleij <linus.walleij@stericsson.com>
11 */ 11 */
12 12
diff --git a/arch/arm/mach-w90x900/include/mach/nuc900_spi.h b/arch/arm/mach-w90x900/include/mach/nuc900_spi.h
new file mode 100644
index 000000000000..bd94819e314f
--- /dev/null
+++ b/arch/arm/mach-w90x900/include/mach/nuc900_spi.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-w90x900/include/mach/nuc900_spi.h
3 *
4 * Copyright (c) 2009 Nuvoton technology corporation.
5 *
6 * Wan ZongShun <mcuos.com@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;version 2 of the License.
11 *
12 */
13
14#ifndef __ASM_ARCH_SPI_H
15#define __ASM_ARCH_SPI_H
16
17extern void mfp_set_groupg(struct device *dev);
18
19struct nuc900_spi_info {
20 unsigned int num_cs;
21 unsigned int lsb;
22 unsigned int txneg;
23 unsigned int rxneg;
24 unsigned int divider;
25 unsigned int sleep;
26 unsigned int txnum;
27 unsigned int txbitlen;
28 int bus_num;
29};
30
31struct nuc900_spi_chip {
32 unsigned char bits_per_word;
33};
34
35#endif /* __ASM_ARCH_SPI_H */
diff --git a/arch/arm/mm/cache-fa.S b/arch/arm/mm/cache-fa.S
index b63a8f7b95cf..a89444a3c016 100644
--- a/arch/arm/mm/cache-fa.S
+++ b/arch/arm/mm/cache-fa.S
@@ -127,15 +127,16 @@ ENTRY(fa_coherent_user_range)
127 mov pc, lr 127 mov pc, lr
128 128
129/* 129/*
130 * flush_kern_dcache_page(kaddr) 130 * flush_kern_dcache_area(void *addr, size_t size)
131 * 131 *
132 * Ensure that the data held in the page kaddr is written back 132 * Ensure that the data held in the page kaddr is written back
133 * to the page in question. 133 * to the page in question.
134 * 134 *
135 * - kaddr - kernel address (guaranteed to be page aligned) 135 * - addr - kernel address
136 * - size - size of region
136 */ 137 */
137ENTRY(fa_flush_kern_dcache_page) 138ENTRY(fa_flush_kern_dcache_area)
138 add r1, r0, #PAGE_SZ 139 add r1, r0, r1
1391: mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line 1401: mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line
140 add r0, r0, #CACHE_DLINESIZE 141 add r0, r0, #CACHE_DLINESIZE
141 cmp r0, r1 142 cmp r0, r1
@@ -213,7 +214,7 @@ ENTRY(fa_cache_fns)
213 .long fa_flush_user_cache_range 214 .long fa_flush_user_cache_range
214 .long fa_coherent_kern_range 215 .long fa_coherent_kern_range
215 .long fa_coherent_user_range 216 .long fa_coherent_user_range
216 .long fa_flush_kern_dcache_page 217 .long fa_flush_kern_dcache_area
217 .long fa_dma_inv_range 218 .long fa_dma_inv_range
218 .long fa_dma_clean_range 219 .long fa_dma_clean_range
219 .long fa_dma_flush_range 220 .long fa_dma_flush_range
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 747f9a9021bb..cb8fc6573b1b 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -28,69 +28,120 @@
28static void __iomem *l2x0_base; 28static void __iomem *l2x0_base;
29static DEFINE_SPINLOCK(l2x0_lock); 29static DEFINE_SPINLOCK(l2x0_lock);
30 30
31static inline void sync_writel(unsigned long val, unsigned long reg, 31static inline void cache_wait(void __iomem *reg, unsigned long mask)
32 unsigned long complete_mask)
33{ 32{
34 unsigned long flags;
35
36 spin_lock_irqsave(&l2x0_lock, flags);
37 writel(val, l2x0_base + reg);
38 /* wait for the operation to complete */ 33 /* wait for the operation to complete */
39 while (readl(l2x0_base + reg) & complete_mask) 34 while (readl(reg) & mask)
40 ; 35 ;
41 spin_unlock_irqrestore(&l2x0_lock, flags);
42} 36}
43 37
44static inline void cache_sync(void) 38static inline void cache_sync(void)
45{ 39{
46 sync_writel(0, L2X0_CACHE_SYNC, 1); 40 void __iomem *base = l2x0_base;
41 writel(0, base + L2X0_CACHE_SYNC);
42 cache_wait(base + L2X0_CACHE_SYNC, 1);
47} 43}
48 44
49static inline void l2x0_inv_all(void) 45static inline void l2x0_inv_all(void)
50{ 46{
47 unsigned long flags;
48
51 /* invalidate all ways */ 49 /* invalidate all ways */
52 sync_writel(0xff, L2X0_INV_WAY, 0xff); 50 spin_lock_irqsave(&l2x0_lock, flags);
51 writel(0xff, l2x0_base + L2X0_INV_WAY);
52 cache_wait(l2x0_base + L2X0_INV_WAY, 0xff);
53 cache_sync(); 53 cache_sync();
54 spin_unlock_irqrestore(&l2x0_lock, flags);
54} 55}
55 56
56static void l2x0_inv_range(unsigned long start, unsigned long end) 57static void l2x0_inv_range(unsigned long start, unsigned long end)
57{ 58{
58 unsigned long addr; 59 void __iomem *base = l2x0_base;
60 unsigned long flags;
59 61
62 spin_lock_irqsave(&l2x0_lock, flags);
60 if (start & (CACHE_LINE_SIZE - 1)) { 63 if (start & (CACHE_LINE_SIZE - 1)) {
61 start &= ~(CACHE_LINE_SIZE - 1); 64 start &= ~(CACHE_LINE_SIZE - 1);
62 sync_writel(start, L2X0_CLEAN_INV_LINE_PA, 1); 65 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
66 writel(start, base + L2X0_CLEAN_INV_LINE_PA);
63 start += CACHE_LINE_SIZE; 67 start += CACHE_LINE_SIZE;
64 } 68 }
65 69
66 if (end & (CACHE_LINE_SIZE - 1)) { 70 if (end & (CACHE_LINE_SIZE - 1)) {
67 end &= ~(CACHE_LINE_SIZE - 1); 71 end &= ~(CACHE_LINE_SIZE - 1);
68 sync_writel(end, L2X0_CLEAN_INV_LINE_PA, 1); 72 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
73 writel(end, base + L2X0_CLEAN_INV_LINE_PA);
69 } 74 }
70 75
71 for (addr = start; addr < end; addr += CACHE_LINE_SIZE) 76 while (start < end) {
72 sync_writel(addr, L2X0_INV_LINE_PA, 1); 77 unsigned long blk_end = start + min(end - start, 4096UL);
78
79 while (start < blk_end) {
80 cache_wait(base + L2X0_INV_LINE_PA, 1);
81 writel(start, base + L2X0_INV_LINE_PA);
82 start += CACHE_LINE_SIZE;
83 }
84
85 if (blk_end < end) {
86 spin_unlock_irqrestore(&l2x0_lock, flags);
87 spin_lock_irqsave(&l2x0_lock, flags);
88 }
89 }
90 cache_wait(base + L2X0_INV_LINE_PA, 1);
73 cache_sync(); 91 cache_sync();
92 spin_unlock_irqrestore(&l2x0_lock, flags);
74} 93}
75 94
76static void l2x0_clean_range(unsigned long start, unsigned long end) 95static void l2x0_clean_range(unsigned long start, unsigned long end)
77{ 96{
78 unsigned long addr; 97 void __iomem *base = l2x0_base;
98 unsigned long flags;
79 99
100 spin_lock_irqsave(&l2x0_lock, flags);
80 start &= ~(CACHE_LINE_SIZE - 1); 101 start &= ~(CACHE_LINE_SIZE - 1);
81 for (addr = start; addr < end; addr += CACHE_LINE_SIZE) 102 while (start < end) {
82 sync_writel(addr, L2X0_CLEAN_LINE_PA, 1); 103 unsigned long blk_end = start + min(end - start, 4096UL);
104
105 while (start < blk_end) {
106 cache_wait(base + L2X0_CLEAN_LINE_PA, 1);
107 writel(start, base + L2X0_CLEAN_LINE_PA);
108 start += CACHE_LINE_SIZE;
109 }
110
111 if (blk_end < end) {
112 spin_unlock_irqrestore(&l2x0_lock, flags);
113 spin_lock_irqsave(&l2x0_lock, flags);
114 }
115 }
116 cache_wait(base + L2X0_CLEAN_LINE_PA, 1);
83 cache_sync(); 117 cache_sync();
118 spin_unlock_irqrestore(&l2x0_lock, flags);
84} 119}
85 120
86static void l2x0_flush_range(unsigned long start, unsigned long end) 121static void l2x0_flush_range(unsigned long start, unsigned long end)
87{ 122{
88 unsigned long addr; 123 void __iomem *base = l2x0_base;
124 unsigned long flags;
89 125
126 spin_lock_irqsave(&l2x0_lock, flags);
90 start &= ~(CACHE_LINE_SIZE - 1); 127 start &= ~(CACHE_LINE_SIZE - 1);
91 for (addr = start; addr < end; addr += CACHE_LINE_SIZE) 128 while (start < end) {
92 sync_writel(addr, L2X0_CLEAN_INV_LINE_PA, 1); 129 unsigned long blk_end = start + min(end - start, 4096UL);
130
131 while (start < blk_end) {
132 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
133 writel(start, base + L2X0_CLEAN_INV_LINE_PA);
134 start += CACHE_LINE_SIZE;
135 }
136
137 if (blk_end < end) {
138 spin_unlock_irqrestore(&l2x0_lock, flags);
139 spin_lock_irqsave(&l2x0_lock, flags);
140 }
141 }
142 cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
93 cache_sync(); 143 cache_sync();
144 spin_unlock_irqrestore(&l2x0_lock, flags);
94} 145}
95 146
96void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) 147void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S
index 8a4abebc478a..2a482731ea36 100644
--- a/arch/arm/mm/cache-v3.S
+++ b/arch/arm/mm/cache-v3.S
@@ -72,14 +72,15 @@ ENTRY(v3_coherent_user_range)
72 mov pc, lr 72 mov pc, lr
73 73
74/* 74/*
75 * flush_kern_dcache_page(void *page) 75 * flush_kern_dcache_area(void *page, size_t size)
76 * 76 *
77 * Ensure no D cache aliasing occurs, either with itself or 77 * Ensure no D cache aliasing occurs, either with itself or
78 * the I cache 78 * the I cache
79 * 79 *
80 * - addr - page aligned address 80 * - addr - kernel address
81 * - size - region size
81 */ 82 */
82ENTRY(v3_flush_kern_dcache_page) 83ENTRY(v3_flush_kern_dcache_area)
83 /* FALLTHROUGH */ 84 /* FALLTHROUGH */
84 85
85/* 86/*
@@ -129,7 +130,7 @@ ENTRY(v3_cache_fns)
129 .long v3_flush_user_cache_range 130 .long v3_flush_user_cache_range
130 .long v3_coherent_kern_range 131 .long v3_coherent_kern_range
131 .long v3_coherent_user_range 132 .long v3_coherent_user_range
132 .long v3_flush_kern_dcache_page 133 .long v3_flush_kern_dcache_area
133 .long v3_dma_inv_range 134 .long v3_dma_inv_range
134 .long v3_dma_clean_range 135 .long v3_dma_clean_range
135 .long v3_dma_flush_range 136 .long v3_dma_flush_range
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S
index 3668611cb400..5c7da3e372e9 100644
--- a/arch/arm/mm/cache-v4.S
+++ b/arch/arm/mm/cache-v4.S
@@ -82,14 +82,15 @@ ENTRY(v4_coherent_user_range)
82 mov pc, lr 82 mov pc, lr
83 83
84/* 84/*
85 * flush_kern_dcache_page(void *page) 85 * flush_kern_dcache_area(void *addr, size_t size)
86 * 86 *
87 * Ensure no D cache aliasing occurs, either with itself or 87 * Ensure no D cache aliasing occurs, either with itself or
88 * the I cache 88 * the I cache
89 * 89 *
90 * - addr - page aligned address 90 * - addr - kernel address
91 * - size - region size
91 */ 92 */
92ENTRY(v4_flush_kern_dcache_page) 93ENTRY(v4_flush_kern_dcache_area)
93 /* FALLTHROUGH */ 94 /* FALLTHROUGH */
94 95
95/* 96/*
@@ -141,7 +142,7 @@ ENTRY(v4_cache_fns)
141 .long v4_flush_user_cache_range 142 .long v4_flush_user_cache_range
142 .long v4_coherent_kern_range 143 .long v4_coherent_kern_range
143 .long v4_coherent_user_range 144 .long v4_coherent_user_range
144 .long v4_flush_kern_dcache_page 145 .long v4_flush_kern_dcache_area
145 .long v4_dma_inv_range 146 .long v4_dma_inv_range
146 .long v4_dma_clean_range 147 .long v4_dma_clean_range
147 .long v4_dma_flush_range 148 .long v4_dma_flush_range
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S
index 2ebc1b3bf856..3dbedf1ec0e7 100644
--- a/arch/arm/mm/cache-v4wb.S
+++ b/arch/arm/mm/cache-v4wb.S
@@ -114,15 +114,16 @@ ENTRY(v4wb_flush_user_cache_range)
114 mov pc, lr 114 mov pc, lr
115 115
116/* 116/*
117 * flush_kern_dcache_page(void *page) 117 * flush_kern_dcache_area(void *addr, size_t size)
118 * 118 *
119 * Ensure no D cache aliasing occurs, either with itself or 119 * Ensure no D cache aliasing occurs, either with itself or
120 * the I cache 120 * the I cache
121 * 121 *
122 * - addr - page aligned address 122 * - addr - kernel address
123 * - size - region size
123 */ 124 */
124ENTRY(v4wb_flush_kern_dcache_page) 125ENTRY(v4wb_flush_kern_dcache_area)
125 add r1, r0, #PAGE_SZ 126 add r1, r0, r1
126 /* fall through */ 127 /* fall through */
127 128
128/* 129/*
@@ -224,7 +225,7 @@ ENTRY(v4wb_cache_fns)
224 .long v4wb_flush_user_cache_range 225 .long v4wb_flush_user_cache_range
225 .long v4wb_coherent_kern_range 226 .long v4wb_coherent_kern_range
226 .long v4wb_coherent_user_range 227 .long v4wb_coherent_user_range
227 .long v4wb_flush_kern_dcache_page 228 .long v4wb_flush_kern_dcache_area
228 .long v4wb_dma_inv_range 229 .long v4wb_dma_inv_range
229 .long v4wb_dma_clean_range 230 .long v4wb_dma_clean_range
230 .long v4wb_dma_flush_range 231 .long v4wb_dma_flush_range
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S
index c54fa2cc40e6..b3b7410270b4 100644
--- a/arch/arm/mm/cache-v4wt.S
+++ b/arch/arm/mm/cache-v4wt.S
@@ -117,17 +117,18 @@ ENTRY(v4wt_coherent_user_range)
117 mov pc, lr 117 mov pc, lr
118 118
119/* 119/*
120 * flush_kern_dcache_page(void *page) 120 * flush_kern_dcache_area(void *addr, size_t size)
121 * 121 *
122 * Ensure no D cache aliasing occurs, either with itself or 122 * Ensure no D cache aliasing occurs, either with itself or
123 * the I cache 123 * the I cache
124 * 124 *
125 * - addr - page aligned address 125 * - addr - kernel address
126 * - size - region size
126 */ 127 */
127ENTRY(v4wt_flush_kern_dcache_page) 128ENTRY(v4wt_flush_kern_dcache_area)
128 mov r2, #0 129 mov r2, #0
129 mcr p15, 0, r2, c7, c5, 0 @ invalidate I cache 130 mcr p15, 0, r2, c7, c5, 0 @ invalidate I cache
130 add r1, r0, #PAGE_SZ 131 add r1, r0, r1
131 /* fallthrough */ 132 /* fallthrough */
132 133
133/* 134/*
@@ -180,7 +181,7 @@ ENTRY(v4wt_cache_fns)
180 .long v4wt_flush_user_cache_range 181 .long v4wt_flush_user_cache_range
181 .long v4wt_coherent_kern_range 182 .long v4wt_coherent_kern_range
182 .long v4wt_coherent_user_range 183 .long v4wt_coherent_user_range
183 .long v4wt_flush_kern_dcache_page 184 .long v4wt_flush_kern_dcache_area
184 .long v4wt_dma_inv_range 185 .long v4wt_dma_inv_range
185 .long v4wt_dma_clean_range 186 .long v4wt_dma_clean_range
186 .long v4wt_dma_flush_range 187 .long v4wt_dma_flush_range
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S
index 295e25dd6381..4ba0a24ce6f5 100644
--- a/arch/arm/mm/cache-v6.S
+++ b/arch/arm/mm/cache-v6.S
@@ -159,15 +159,16 @@ ENDPROC(v6_coherent_user_range)
159ENDPROC(v6_coherent_kern_range) 159ENDPROC(v6_coherent_kern_range)
160 160
161/* 161/*
162 * v6_flush_kern_dcache_page(kaddr) 162 * v6_flush_kern_dcache_area(void *addr, size_t size)
163 * 163 *
164 * Ensure that the data held in the page kaddr is written back 164 * Ensure that the data held in the page kaddr is written back
165 * to the page in question. 165 * to the page in question.
166 * 166 *
167 * - kaddr - kernel address (guaranteed to be page aligned) 167 * - addr - kernel address
168 * - size - region size
168 */ 169 */
169ENTRY(v6_flush_kern_dcache_page) 170ENTRY(v6_flush_kern_dcache_area)
170 add r1, r0, #PAGE_SZ 171 add r1, r0, r1
1711: 1721:
172#ifdef HARVARD_CACHE 173#ifdef HARVARD_CACHE
173 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line 174 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line
@@ -271,7 +272,7 @@ ENTRY(v6_cache_fns)
271 .long v6_flush_user_cache_range 272 .long v6_flush_user_cache_range
272 .long v6_coherent_kern_range 273 .long v6_coherent_kern_range
273 .long v6_coherent_user_range 274 .long v6_coherent_user_range
274 .long v6_flush_kern_dcache_page 275 .long v6_flush_kern_dcache_area
275 .long v6_dma_inv_range 276 .long v6_dma_inv_range
276 .long v6_dma_clean_range 277 .long v6_dma_clean_range
277 .long v6_dma_flush_range 278 .long v6_dma_flush_range
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index e1bd9759617f..9073db849fb4 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -186,16 +186,17 @@ ENDPROC(v7_coherent_kern_range)
186ENDPROC(v7_coherent_user_range) 186ENDPROC(v7_coherent_user_range)
187 187
188/* 188/*
189 * v7_flush_kern_dcache_page(kaddr) 189 * v7_flush_kern_dcache_area(void *addr, size_t size)
190 * 190 *
191 * Ensure that the data held in the page kaddr is written back 191 * Ensure that the data held in the page kaddr is written back
192 * to the page in question. 192 * to the page in question.
193 * 193 *
194 * - kaddr - kernel address (guaranteed to be page aligned) 194 * - addr - kernel address
195 * - size - region size
195 */ 196 */
196ENTRY(v7_flush_kern_dcache_page) 197ENTRY(v7_flush_kern_dcache_area)
197 dcache_line_size r2, r3 198 dcache_line_size r2, r3
198 add r1, r0, #PAGE_SZ 199 add r1, r0, r1
1991: 2001:
200 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line 201 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line
201 add r0, r0, r2 202 add r0, r0, r2
@@ -203,7 +204,7 @@ ENTRY(v7_flush_kern_dcache_page)
203 blo 1b 204 blo 1b
204 dsb 205 dsb
205 mov pc, lr 206 mov pc, lr
206ENDPROC(v7_flush_kern_dcache_page) 207ENDPROC(v7_flush_kern_dcache_area)
207 208
208/* 209/*
209 * v7_dma_inv_range(start,end) 210 * v7_dma_inv_range(start,end)
@@ -279,7 +280,7 @@ ENTRY(v7_cache_fns)
279 .long v7_flush_user_cache_range 280 .long v7_flush_user_cache_range
280 .long v7_coherent_kern_range 281 .long v7_coherent_kern_range
281 .long v7_coherent_user_range 282 .long v7_coherent_user_range
282 .long v7_flush_kern_dcache_page 283 .long v7_flush_kern_dcache_area
283 .long v7_dma_inv_range 284 .long v7_dma_inv_range
284 .long v7_dma_clean_range 285 .long v7_dma_clean_range
285 .long v7_dma_flush_range 286 .long v7_dma_flush_range
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index 329594e760cd..6f3a4b7a3b82 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -131,7 +131,7 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
131 */ 131 */
132 if (addr) 132 if (addr)
133#endif 133#endif
134 __cpuc_flush_dcache_page(addr); 134 __cpuc_flush_dcache_area(addr, PAGE_SIZE);
135 135
136 /* 136 /*
137 * If this is a page cache page, and we have an aliasing VIPT cache, 137 * If this is a page cache page, and we have an aliasing VIPT cache,
@@ -258,5 +258,5 @@ void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned l
258 * in this mapping of the page. FIXME: this is overkill 258 * in this mapping of the page. FIXME: this is overkill
259 * since we actually ask for a write-back and invalidate. 259 * since we actually ask for a write-back and invalidate.
260 */ 260 */
261 __cpuc_flush_dcache_page(page_address(page)); 261 __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
262} 262}
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index 30f82fb5918c..2be1ec7c1b41 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -79,7 +79,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
79 unsigned int idx = type + KM_TYPE_NR * smp_processor_id(); 79 unsigned int idx = type + KM_TYPE_NR * smp_processor_id();
80 80
81 if (kvaddr >= (void *)FIXADDR_START) { 81 if (kvaddr >= (void *)FIXADDR_START) {
82 __cpuc_flush_dcache_page((void *)vaddr); 82 __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
83#ifdef CONFIG_DEBUG_HIGHMEM 83#ifdef CONFIG_DEBUG_HIGHMEM
84 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx)); 84 BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
85 set_pte_ext(TOP_PTE(vaddr), __pte(0), 0); 85 set_pte_ext(TOP_PTE(vaddr), __pte(0), 0);
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index 2b7996401b0f..f5abc51c5a07 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -54,7 +54,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
54 * We enforce the MAP_FIXED case. 54 * We enforce the MAP_FIXED case.
55 */ 55 */
56 if (flags & MAP_FIXED) { 56 if (flags & MAP_FIXED) {
57 if (aliasing && flags & MAP_SHARED && addr & (SHMLBA - 1)) 57 if (aliasing && flags & MAP_SHARED &&
58 (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
58 return -EINVAL; 59 return -EINVAL;
59 return addr; 60 return addr;
60 } 61 }
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 900811cc9130..374a8311bc84 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -61,7 +61,7 @@ void setup_mm_for_reboot(char mode)
61 61
62void flush_dcache_page(struct page *page) 62void flush_dcache_page(struct page *page)
63{ 63{
64 __cpuc_flush_dcache_page(page_address(page)); 64 __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
65} 65}
66EXPORT_SYMBOL(flush_dcache_page); 66EXPORT_SYMBOL(flush_dcache_page);
67 67
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index d9fb4b98c49f..8012e24282b2 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -231,17 +231,18 @@ ENTRY(arm1020_coherent_user_range)
231 mov pc, lr 231 mov pc, lr
232 232
233/* 233/*
234 * flush_kern_dcache_page(void *page) 234 * flush_kern_dcache_area(void *addr, size_t size)
235 * 235 *
236 * Ensure no D cache aliasing occurs, either with itself or 236 * Ensure no D cache aliasing occurs, either with itself or
237 * the I cache 237 * the I cache
238 * 238 *
239 * - page - page aligned address 239 * - addr - kernel address
240 * - size - region size
240 */ 241 */
241ENTRY(arm1020_flush_kern_dcache_page) 242ENTRY(arm1020_flush_kern_dcache_area)
242 mov ip, #0 243 mov ip, #0
243#ifndef CONFIG_CPU_DCACHE_DISABLE 244#ifndef CONFIG_CPU_DCACHE_DISABLE
244 add r1, r0, #PAGE_SZ 245 add r1, r0, r1
2451: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2461: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
246 mcr p15, 0, ip, c7, c10, 4 @ drain WB 247 mcr p15, 0, ip, c7, c10, 4 @ drain WB
247 add r0, r0, #CACHE_DLINESIZE 248 add r0, r0, #CACHE_DLINESIZE
@@ -335,7 +336,7 @@ ENTRY(arm1020_cache_fns)
335 .long arm1020_flush_user_cache_range 336 .long arm1020_flush_user_cache_range
336 .long arm1020_coherent_kern_range 337 .long arm1020_coherent_kern_range
337 .long arm1020_coherent_user_range 338 .long arm1020_coherent_user_range
338 .long arm1020_flush_kern_dcache_page 339 .long arm1020_flush_kern_dcache_area
339 .long arm1020_dma_inv_range 340 .long arm1020_dma_inv_range
340 .long arm1020_dma_clean_range 341 .long arm1020_dma_clean_range
341 .long arm1020_dma_flush_range 342 .long arm1020_dma_flush_range
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 7453b75dcea5..41fe25d234f5 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -225,17 +225,18 @@ ENTRY(arm1020e_coherent_user_range)
225 mov pc, lr 225 mov pc, lr
226 226
227/* 227/*
228 * flush_kern_dcache_page(void *page) 228 * flush_kern_dcache_area(void *addr, size_t size)
229 * 229 *
230 * Ensure no D cache aliasing occurs, either with itself or 230 * Ensure no D cache aliasing occurs, either with itself or
231 * the I cache 231 * the I cache
232 * 232 *
233 * - page - page aligned address 233 * - addr - kernel address
234 * - size - region size
234 */ 235 */
235ENTRY(arm1020e_flush_kern_dcache_page) 236ENTRY(arm1020e_flush_kern_dcache_area)
236 mov ip, #0 237 mov ip, #0
237#ifndef CONFIG_CPU_DCACHE_DISABLE 238#ifndef CONFIG_CPU_DCACHE_DISABLE
238 add r1, r0, #PAGE_SZ 239 add r1, r0, r1
2391: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2401: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
240 add r0, r0, #CACHE_DLINESIZE 241 add r0, r0, #CACHE_DLINESIZE
241 cmp r0, r1 242 cmp r0, r1
@@ -321,7 +322,7 @@ ENTRY(arm1020e_cache_fns)
321 .long arm1020e_flush_user_cache_range 322 .long arm1020e_flush_user_cache_range
322 .long arm1020e_coherent_kern_range 323 .long arm1020e_coherent_kern_range
323 .long arm1020e_coherent_user_range 324 .long arm1020e_coherent_user_range
324 .long arm1020e_flush_kern_dcache_page 325 .long arm1020e_flush_kern_dcache_area
325 .long arm1020e_dma_inv_range 326 .long arm1020e_dma_inv_range
326 .long arm1020e_dma_clean_range 327 .long arm1020e_dma_clean_range
327 .long arm1020e_dma_flush_range 328 .long arm1020e_dma_flush_range
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
index 8eb72d75a8b6..20a5b1b31a70 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.S
@@ -214,17 +214,18 @@ ENTRY(arm1022_coherent_user_range)
214 mov pc, lr 214 mov pc, lr
215 215
216/* 216/*
217 * flush_kern_dcache_page(void *page) 217 * flush_kern_dcache_area(void *addr, size_t size)
218 * 218 *
219 * Ensure no D cache aliasing occurs, either with itself or 219 * Ensure no D cache aliasing occurs, either with itself or
220 * the I cache 220 * the I cache
221 * 221 *
222 * - page - page aligned address 222 * - addr - kernel address
223 * - size - region size
223 */ 224 */
224ENTRY(arm1022_flush_kern_dcache_page) 225ENTRY(arm1022_flush_kern_dcache_area)
225 mov ip, #0 226 mov ip, #0
226#ifndef CONFIG_CPU_DCACHE_DISABLE 227#ifndef CONFIG_CPU_DCACHE_DISABLE
227 add r1, r0, #PAGE_SZ 228 add r1, r0, r1
2281: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2291: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
229 add r0, r0, #CACHE_DLINESIZE 230 add r0, r0, #CACHE_DLINESIZE
230 cmp r0, r1 231 cmp r0, r1
@@ -310,7 +311,7 @@ ENTRY(arm1022_cache_fns)
310 .long arm1022_flush_user_cache_range 311 .long arm1022_flush_user_cache_range
311 .long arm1022_coherent_kern_range 312 .long arm1022_coherent_kern_range
312 .long arm1022_coherent_user_range 313 .long arm1022_coherent_user_range
313 .long arm1022_flush_kern_dcache_page 314 .long arm1022_flush_kern_dcache_area
314 .long arm1022_dma_inv_range 315 .long arm1022_dma_inv_range
315 .long arm1022_dma_clean_range 316 .long arm1022_dma_clean_range
316 .long arm1022_dma_flush_range 317 .long arm1022_dma_flush_range
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
index 3b59f0d67139..96aedb10fcc4 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.S
@@ -208,17 +208,18 @@ ENTRY(arm1026_coherent_user_range)
208 mov pc, lr 208 mov pc, lr
209 209
210/* 210/*
211 * flush_kern_dcache_page(void *page) 211 * flush_kern_dcache_area(void *addr, size_t size)
212 * 212 *
213 * Ensure no D cache aliasing occurs, either with itself or 213 * Ensure no D cache aliasing occurs, either with itself or
214 * the I cache 214 * the I cache
215 * 215 *
216 * - page - page aligned address 216 * - addr - kernel address
217 * - size - region size
217 */ 218 */
218ENTRY(arm1026_flush_kern_dcache_page) 219ENTRY(arm1026_flush_kern_dcache_area)
219 mov ip, #0 220 mov ip, #0
220#ifndef CONFIG_CPU_DCACHE_DISABLE 221#ifndef CONFIG_CPU_DCACHE_DISABLE
221 add r1, r0, #PAGE_SZ 222 add r1, r0, r1
2221: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2231: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
223 add r0, r0, #CACHE_DLINESIZE 224 add r0, r0, #CACHE_DLINESIZE
224 cmp r0, r1 225 cmp r0, r1
@@ -304,7 +305,7 @@ ENTRY(arm1026_cache_fns)
304 .long arm1026_flush_user_cache_range 305 .long arm1026_flush_user_cache_range
305 .long arm1026_coherent_kern_range 306 .long arm1026_coherent_kern_range
306 .long arm1026_coherent_user_range 307 .long arm1026_coherent_user_range
307 .long arm1026_flush_kern_dcache_page 308 .long arm1026_flush_kern_dcache_area
308 .long arm1026_dma_inv_range 309 .long arm1026_dma_inv_range
309 .long arm1026_dma_clean_range 310 .long arm1026_dma_clean_range
310 .long arm1026_dma_flush_range 311 .long arm1026_dma_flush_range
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index 2b7c197cc58d..471669e2d7cb 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -207,15 +207,16 @@ ENTRY(arm920_coherent_user_range)
207 mov pc, lr 207 mov pc, lr
208 208
209/* 209/*
210 * flush_kern_dcache_page(void *page) 210 * flush_kern_dcache_area(void *addr, size_t size)
211 * 211 *
212 * Ensure no D cache aliasing occurs, either with itself or 212 * Ensure no D cache aliasing occurs, either with itself or
213 * the I cache 213 * the I cache
214 * 214 *
215 * - addr - page aligned address 215 * - addr - kernel address
216 * - size - region size
216 */ 217 */
217ENTRY(arm920_flush_kern_dcache_page) 218ENTRY(arm920_flush_kern_dcache_area)
218 add r1, r0, #PAGE_SZ 219 add r1, r0, r1
2191: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2201: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
220 add r0, r0, #CACHE_DLINESIZE 221 add r0, r0, #CACHE_DLINESIZE
221 cmp r0, r1 222 cmp r0, r1
@@ -293,7 +294,7 @@ ENTRY(arm920_cache_fns)
293 .long arm920_flush_user_cache_range 294 .long arm920_flush_user_cache_range
294 .long arm920_coherent_kern_range 295 .long arm920_coherent_kern_range
295 .long arm920_coherent_user_range 296 .long arm920_coherent_user_range
296 .long arm920_flush_kern_dcache_page 297 .long arm920_flush_kern_dcache_area
297 .long arm920_dma_inv_range 298 .long arm920_dma_inv_range
298 .long arm920_dma_clean_range 299 .long arm920_dma_clean_range
299 .long arm920_dma_flush_range 300 .long arm920_dma_flush_range
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index 06a1aa4e3398..ee111b00fa41 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -209,15 +209,16 @@ ENTRY(arm922_coherent_user_range)
209 mov pc, lr 209 mov pc, lr
210 210
211/* 211/*
212 * flush_kern_dcache_page(void *page) 212 * flush_kern_dcache_area(void *addr, size_t size)
213 * 213 *
214 * Ensure no D cache aliasing occurs, either with itself or 214 * Ensure no D cache aliasing occurs, either with itself or
215 * the I cache 215 * the I cache
216 * 216 *
217 * - addr - page aligned address 217 * - addr - kernel address
218 * - size - region size
218 */ 219 */
219ENTRY(arm922_flush_kern_dcache_page) 220ENTRY(arm922_flush_kern_dcache_area)
220 add r1, r0, #PAGE_SZ 221 add r1, r0, r1
2211: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2221: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
222 add r0, r0, #CACHE_DLINESIZE 223 add r0, r0, #CACHE_DLINESIZE
223 cmp r0, r1 224 cmp r0, r1
@@ -295,7 +296,7 @@ ENTRY(arm922_cache_fns)
295 .long arm922_flush_user_cache_range 296 .long arm922_flush_user_cache_range
296 .long arm922_coherent_kern_range 297 .long arm922_coherent_kern_range
297 .long arm922_coherent_user_range 298 .long arm922_coherent_user_range
298 .long arm922_flush_kern_dcache_page 299 .long arm922_flush_kern_dcache_area
299 .long arm922_dma_inv_range 300 .long arm922_dma_inv_range
300 .long arm922_dma_clean_range 301 .long arm922_dma_clean_range
301 .long arm922_dma_flush_range 302 .long arm922_dma_flush_range
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index cb53435a85ae..8deb5bde58e4 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -251,15 +251,16 @@ ENTRY(arm925_coherent_user_range)
251 mov pc, lr 251 mov pc, lr
252 252
253/* 253/*
254 * flush_kern_dcache_page(void *page) 254 * flush_kern_dcache_area(void *addr, size_t size)
255 * 255 *
256 * Ensure no D cache aliasing occurs, either with itself or 256 * Ensure no D cache aliasing occurs, either with itself or
257 * the I cache 257 * the I cache
258 * 258 *
259 * - addr - page aligned address 259 * - addr - kernel address
260 * - size - region size
260 */ 261 */
261ENTRY(arm925_flush_kern_dcache_page) 262ENTRY(arm925_flush_kern_dcache_area)
262 add r1, r0, #PAGE_SZ 263 add r1, r0, r1
2631: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2641: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
264 add r0, r0, #CACHE_DLINESIZE 265 add r0, r0, #CACHE_DLINESIZE
265 cmp r0, r1 266 cmp r0, r1
@@ -346,7 +347,7 @@ ENTRY(arm925_cache_fns)
346 .long arm925_flush_user_cache_range 347 .long arm925_flush_user_cache_range
347 .long arm925_coherent_kern_range 348 .long arm925_coherent_kern_range
348 .long arm925_coherent_user_range 349 .long arm925_coherent_user_range
349 .long arm925_flush_kern_dcache_page 350 .long arm925_flush_kern_dcache_area
350 .long arm925_dma_inv_range 351 .long arm925_dma_inv_range
351 .long arm925_dma_clean_range 352 .long arm925_dma_clean_range
352 .long arm925_dma_flush_range 353 .long arm925_dma_flush_range
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 1c4848704bb3..64db6e275a44 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -214,15 +214,16 @@ ENTRY(arm926_coherent_user_range)
214 mov pc, lr 214 mov pc, lr
215 215
216/* 216/*
217 * flush_kern_dcache_page(void *page) 217 * flush_kern_dcache_area(void *addr, size_t size)
218 * 218 *
219 * Ensure no D cache aliasing occurs, either with itself or 219 * Ensure no D cache aliasing occurs, either with itself or
220 * the I cache 220 * the I cache
221 * 221 *
222 * - addr - page aligned address 222 * - addr - kernel address
223 * - size - region size
223 */ 224 */
224ENTRY(arm926_flush_kern_dcache_page) 225ENTRY(arm926_flush_kern_dcache_area)
225 add r1, r0, #PAGE_SZ 226 add r1, r0, r1
2261: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2271: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
227 add r0, r0, #CACHE_DLINESIZE 228 add r0, r0, #CACHE_DLINESIZE
228 cmp r0, r1 229 cmp r0, r1
@@ -309,7 +310,7 @@ ENTRY(arm926_cache_fns)
309 .long arm926_flush_user_cache_range 310 .long arm926_flush_user_cache_range
310 .long arm926_coherent_kern_range 311 .long arm926_coherent_kern_range
311 .long arm926_coherent_user_range 312 .long arm926_coherent_user_range
312 .long arm926_flush_kern_dcache_page 313 .long arm926_flush_kern_dcache_area
313 .long arm926_dma_inv_range 314 .long arm926_dma_inv_range
314 .long arm926_dma_clean_range 315 .long arm926_dma_clean_range
315 .long arm926_dma_flush_range 316 .long arm926_dma_flush_range
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S
index 5b0f8464c8f2..8196b9f401fb 100644
--- a/arch/arm/mm/proc-arm940.S
+++ b/arch/arm/mm/proc-arm940.S
@@ -141,14 +141,15 @@ ENTRY(arm940_coherent_user_range)
141 /* FALLTHROUGH */ 141 /* FALLTHROUGH */
142 142
143/* 143/*
144 * flush_kern_dcache_page(void *page) 144 * flush_kern_dcache_area(void *addr, size_t size)
145 * 145 *
146 * Ensure no D cache aliasing occurs, either with itself or 146 * Ensure no D cache aliasing occurs, either with itself or
147 * the I cache 147 * the I cache
148 * 148 *
149 * - addr - page aligned address 149 * - addr - kernel address
150 * - size - region size
150 */ 151 */
151ENTRY(arm940_flush_kern_dcache_page) 152ENTRY(arm940_flush_kern_dcache_area)
152 mov ip, #0 153 mov ip, #0
153 mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments 154 mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments
1541: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries 1551: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries
@@ -238,7 +239,7 @@ ENTRY(arm940_cache_fns)
238 .long arm940_flush_user_cache_range 239 .long arm940_flush_user_cache_range
239 .long arm940_coherent_kern_range 240 .long arm940_coherent_kern_range
240 .long arm940_coherent_user_range 241 .long arm940_coherent_user_range
241 .long arm940_flush_kern_dcache_page 242 .long arm940_flush_kern_dcache_area
242 .long arm940_dma_inv_range 243 .long arm940_dma_inv_range
243 .long arm940_dma_clean_range 244 .long arm940_dma_clean_range
244 .long arm940_dma_flush_range 245 .long arm940_dma_flush_range
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S
index 40c0449a139b..9a951239c86c 100644
--- a/arch/arm/mm/proc-arm946.S
+++ b/arch/arm/mm/proc-arm946.S
@@ -183,16 +183,17 @@ ENTRY(arm946_coherent_user_range)
183 mov pc, lr 183 mov pc, lr
184 184
185/* 185/*
186 * flush_kern_dcache_page(void *page) 186 * flush_kern_dcache_area(void *addr, size_t size)
187 * 187 *
188 * Ensure no D cache aliasing occurs, either with itself or 188 * Ensure no D cache aliasing occurs, either with itself or
189 * the I cache 189 * the I cache
190 * 190 *
191 * - addr - page aligned address 191 * - addr - kernel address
192 * - size - region size
192 * (same as arm926) 193 * (same as arm926)
193 */ 194 */
194ENTRY(arm946_flush_kern_dcache_page) 195ENTRY(arm946_flush_kern_dcache_area)
195 add r1, r0, #PAGE_SZ 196 add r1, r0, r1
1961: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 1971: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
197 add r0, r0, #CACHE_DLINESIZE 198 add r0, r0, #CACHE_DLINESIZE
198 cmp r0, r1 199 cmp r0, r1
@@ -280,7 +281,7 @@ ENTRY(arm946_cache_fns)
280 .long arm946_flush_user_cache_range 281 .long arm946_flush_user_cache_range
281 .long arm946_coherent_kern_range 282 .long arm946_coherent_kern_range
282 .long arm946_coherent_user_range 283 .long arm946_coherent_user_range
283 .long arm946_flush_kern_dcache_page 284 .long arm946_flush_kern_dcache_area
284 .long arm946_dma_inv_range 285 .long arm946_dma_inv_range
285 .long arm946_dma_clean_range 286 .long arm946_dma_clean_range
286 .long arm946_dma_flush_range 287 .long arm946_dma_flush_range
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index d0d7795200fc..dbc39383e66a 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -226,16 +226,17 @@ ENTRY(feroceon_coherent_user_range)
226 mov pc, lr 226 mov pc, lr
227 227
228/* 228/*
229 * flush_kern_dcache_page(void *page) 229 * flush_kern_dcache_area(void *addr, size_t size)
230 * 230 *
231 * Ensure no D cache aliasing occurs, either with itself or 231 * Ensure no D cache aliasing occurs, either with itself or
232 * the I cache 232 * the I cache
233 * 233 *
234 * - addr - page aligned address 234 * - addr - kernel address
235 * - size - region size
235 */ 236 */
236 .align 5 237 .align 5
237ENTRY(feroceon_flush_kern_dcache_page) 238ENTRY(feroceon_flush_kern_dcache_area)
238 add r1, r0, #PAGE_SZ 239 add r1, r0, r1
2391: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 2401: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
240 add r0, r0, #CACHE_DLINESIZE 241 add r0, r0, #CACHE_DLINESIZE
241 cmp r0, r1 242 cmp r0, r1
@@ -246,7 +247,7 @@ ENTRY(feroceon_flush_kern_dcache_page)
246 mov pc, lr 247 mov pc, lr
247 248
248 .align 5 249 .align 5
249ENTRY(feroceon_range_flush_kern_dcache_page) 250ENTRY(feroceon_range_flush_kern_dcache_area)
250 mrs r2, cpsr 251 mrs r2, cpsr
251 add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive 252 add r1, r0, #PAGE_SZ - CACHE_DLINESIZE @ top addr is inclusive
252 orr r3, r2, #PSR_I_BIT 253 orr r3, r2, #PSR_I_BIT
@@ -372,7 +373,7 @@ ENTRY(feroceon_cache_fns)
372 .long feroceon_flush_user_cache_range 373 .long feroceon_flush_user_cache_range
373 .long feroceon_coherent_kern_range 374 .long feroceon_coherent_kern_range
374 .long feroceon_coherent_user_range 375 .long feroceon_coherent_user_range
375 .long feroceon_flush_kern_dcache_page 376 .long feroceon_flush_kern_dcache_area
376 .long feroceon_dma_inv_range 377 .long feroceon_dma_inv_range
377 .long feroceon_dma_clean_range 378 .long feroceon_dma_clean_range
378 .long feroceon_dma_flush_range 379 .long feroceon_dma_flush_range
@@ -383,7 +384,7 @@ ENTRY(feroceon_range_cache_fns)
383 .long feroceon_flush_user_cache_range 384 .long feroceon_flush_user_cache_range
384 .long feroceon_coherent_kern_range 385 .long feroceon_coherent_kern_range
385 .long feroceon_coherent_user_range 386 .long feroceon_coherent_user_range
386 .long feroceon_range_flush_kern_dcache_page 387 .long feroceon_range_flush_kern_dcache_area
387 .long feroceon_range_dma_inv_range 388 .long feroceon_range_dma_inv_range
388 .long feroceon_range_dma_clean_range 389 .long feroceon_range_dma_clean_range
389 .long feroceon_range_dma_flush_range 390 .long feroceon_range_dma_flush_range
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S
index 52b5fd74fbb3..9674d36cc97d 100644
--- a/arch/arm/mm/proc-mohawk.S
+++ b/arch/arm/mm/proc-mohawk.S
@@ -186,15 +186,16 @@ ENTRY(mohawk_coherent_user_range)
186 mov pc, lr 186 mov pc, lr
187 187
188/* 188/*
189 * flush_kern_dcache_page(void *page) 189 * flush_kern_dcache_area(void *addr, size_t size)
190 * 190 *
191 * Ensure no D cache aliasing occurs, either with itself or 191 * Ensure no D cache aliasing occurs, either with itself or
192 * the I cache 192 * the I cache
193 * 193 *
194 * - addr - page aligned address 194 * - addr - kernel address
195 * - size - region size
195 */ 196 */
196ENTRY(mohawk_flush_kern_dcache_page) 197ENTRY(mohawk_flush_kern_dcache_area)
197 add r1, r0, #PAGE_SZ 198 add r1, r0, r1
1981: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 1991: mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
199 add r0, r0, #CACHE_DLINESIZE 200 add r0, r0, #CACHE_DLINESIZE
200 cmp r0, r1 201 cmp r0, r1
@@ -273,7 +274,7 @@ ENTRY(mohawk_cache_fns)
273 .long mohawk_flush_user_cache_range 274 .long mohawk_flush_user_cache_range
274 .long mohawk_coherent_kern_range 275 .long mohawk_coherent_kern_range
275 .long mohawk_coherent_user_range 276 .long mohawk_coherent_user_range
276 .long mohawk_flush_kern_dcache_page 277 .long mohawk_flush_kern_dcache_area
277 .long mohawk_dma_inv_range 278 .long mohawk_dma_inv_range
278 .long mohawk_dma_clean_range 279 .long mohawk_dma_clean_range
279 .long mohawk_dma_flush_range 280 .long mohawk_dma_flush_range
diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c
index ac5c80062b70..3e6210b4d6d4 100644
--- a/arch/arm/mm/proc-syms.c
+++ b/arch/arm/mm/proc-syms.c
@@ -27,8 +27,7 @@ EXPORT_SYMBOL(__cpuc_flush_kern_all);
27EXPORT_SYMBOL(__cpuc_flush_user_all); 27EXPORT_SYMBOL(__cpuc_flush_user_all);
28EXPORT_SYMBOL(__cpuc_flush_user_range); 28EXPORT_SYMBOL(__cpuc_flush_user_range);
29EXPORT_SYMBOL(__cpuc_coherent_kern_range); 29EXPORT_SYMBOL(__cpuc_coherent_kern_range);
30EXPORT_SYMBOL(__cpuc_flush_dcache_page); 30EXPORT_SYMBOL(__cpuc_flush_dcache_area);
31EXPORT_SYMBOL(dmac_inv_range); /* because of flush_ioremap_region() */
32#else 31#else
33EXPORT_SYMBOL(cpu_cache); 32EXPORT_SYMBOL(cpu_cache);
34#endif 33#endif
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 5485c821101c..395cc90c6613 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -254,10 +254,9 @@ __pj4_v6_proc_info:
254 .long 0x560f5810 254 .long 0x560f5810
255 .long 0xff0ffff0 255 .long 0xff0ffff0
256 .long PMD_TYPE_SECT | \ 256 .long PMD_TYPE_SECT | \
257 PMD_SECT_BUFFERABLE | \
258 PMD_SECT_CACHEABLE | \
259 PMD_SECT_AP_WRITE | \ 257 PMD_SECT_AP_WRITE | \
260 PMD_SECT_AP_READ 258 PMD_SECT_AP_READ | \
259 PMD_FLAGS
261 .long PMD_TYPE_SECT | \ 260 .long PMD_TYPE_SECT | \
262 PMD_SECT_XN | \ 261 PMD_SECT_XN | \
263 PMD_SECT_AP_WRITE | \ 262 PMD_SECT_AP_WRITE | \
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index fab134e29826..96456f548798 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -226,15 +226,16 @@ ENTRY(xsc3_coherent_user_range)
226 mov pc, lr 226 mov pc, lr
227 227
228/* 228/*
229 * flush_kern_dcache_page(void *page) 229 * flush_kern_dcache_area(void *addr, size_t size)
230 * 230 *
231 * Ensure no D cache aliasing occurs, either with itself or 231 * Ensure no D cache aliasing occurs, either with itself or
232 * the I cache. 232 * the I cache.
233 * 233 *
234 * - addr - page aligned address 234 * - addr - kernel address
235 * - size - region size
235 */ 236 */
236ENTRY(xsc3_flush_kern_dcache_page) 237ENTRY(xsc3_flush_kern_dcache_area)
237 add r1, r0, #PAGE_SZ 238 add r1, r0, r1
2381: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line 2391: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line
239 add r0, r0, #CACHELINESIZE 240 add r0, r0, #CACHELINESIZE
240 cmp r0, r1 241 cmp r0, r1
@@ -309,7 +310,7 @@ ENTRY(xsc3_cache_fns)
309 .long xsc3_flush_user_cache_range 310 .long xsc3_flush_user_cache_range
310 .long xsc3_coherent_kern_range 311 .long xsc3_coherent_kern_range
311 .long xsc3_coherent_user_range 312 .long xsc3_coherent_user_range
312 .long xsc3_flush_kern_dcache_page 313 .long xsc3_flush_kern_dcache_area
313 .long xsc3_dma_inv_range 314 .long xsc3_dma_inv_range
314 .long xsc3_dma_clean_range 315 .long xsc3_dma_clean_range
315 .long xsc3_dma_flush_range 316 .long xsc3_dma_flush_range
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index f056c283682d..93df47265f2d 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -284,15 +284,16 @@ ENTRY(xscale_coherent_user_range)
284 mov pc, lr 284 mov pc, lr
285 285
286/* 286/*
287 * flush_kern_dcache_page(void *page) 287 * flush_kern_dcache_area(void *addr, size_t size)
288 * 288 *
289 * Ensure no D cache aliasing occurs, either with itself or 289 * Ensure no D cache aliasing occurs, either with itself or
290 * the I cache 290 * the I cache
291 * 291 *
292 * - addr - page aligned address 292 * - addr - kernel address
293 * - size - region size
293 */ 294 */
294ENTRY(xscale_flush_kern_dcache_page) 295ENTRY(xscale_flush_kern_dcache_area)
295 add r1, r0, #PAGE_SZ 296 add r1, r0, r1
2961: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2971: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
297 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry 298 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
298 add r0, r0, #CACHELINESIZE 299 add r0, r0, #CACHELINESIZE
@@ -368,7 +369,7 @@ ENTRY(xscale_cache_fns)
368 .long xscale_flush_user_cache_range 369 .long xscale_flush_user_cache_range
369 .long xscale_coherent_kern_range 370 .long xscale_coherent_kern_range
370 .long xscale_coherent_user_range 371 .long xscale_coherent_user_range
371 .long xscale_flush_kern_dcache_page 372 .long xscale_flush_kern_dcache_area
372 .long xscale_dma_inv_range 373 .long xscale_dma_inv_range
373 .long xscale_dma_clean_range 374 .long xscale_dma_clean_range
374 .long xscale_dma_flush_range 375 .long xscale_dma_flush_range
@@ -392,7 +393,7 @@ ENTRY(xscale_80200_A0_A1_cache_fns)
392 .long xscale_flush_user_cache_range 393 .long xscale_flush_user_cache_range
393 .long xscale_coherent_kern_range 394 .long xscale_coherent_kern_range
394 .long xscale_coherent_user_range 395 .long xscale_coherent_user_range
395 .long xscale_flush_kern_dcache_page 396 .long xscale_flush_kern_dcache_area
396 .long xscale_dma_flush_range 397 .long xscale_dma_flush_range
397 .long xscale_dma_clean_range 398 .long xscale_dma_clean_range
398 .long xscale_dma_flush_range 399 .long xscale_dma_flush_range
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile
index 4cbca9da1505..996cbac6932c 100644
--- a/arch/arm/plat-mxc/Makefile
+++ b/arch/arm/plat-mxc/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o
9obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o 9obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
10obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o 10obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
11obj-$(CONFIG_MXC_PWM) += pwm.o 11obj-$(CONFIG_MXC_PWM) += pwm.o
12obj-$(CONFIG_USB_EHCI_MXC) += ehci.o
12obj-$(CONFIG_MXC_ULPI) += ulpi.o 13obj-$(CONFIG_MXC_ULPI) += ulpi.o
13obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o 14obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
14obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o 15obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o
diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c
new file mode 100644
index 000000000000..41599be882e8
--- /dev/null
+++ b/arch/arm/plat-mxc/ehci.c
@@ -0,0 +1,92 @@
1/*
2 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * 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 Foundation,
16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#include <linux/platform_device.h>
20#include <linux/io.h>
21
22#include <mach/hardware.h>
23#include <mach/mxc_ehci.h>
24
25#define USBCTRL_OTGBASE_OFFSET 0x600
26
27#define MX31_OTG_SIC_SHIFT 29
28#define MX31_OTG_SIC_MASK (0xf << MX31_OTG_SIC_SHIFT)
29#define MX31_OTG_PM_BIT (1 << 24)
30
31#define MX31_H2_SIC_SHIFT 21
32#define MX31_H2_SIC_MASK (0xf << MX31_H2_SIC_SHIFT)
33#define MX31_H2_PM_BIT (1 << 16)
34#define MX31_H2_DT_BIT (1 << 5)
35
36#define MX31_H1_SIC_SHIFT 13
37#define MX31_H1_SIC_MASK (0xf << MX31_H1_SIC_SHIFT)
38#define MX31_H1_PM_BIT (1 << 8)
39#define MX31_H1_DT_BIT (1 << 4)
40
41int mxc_set_usbcontrol(int port, unsigned int flags)
42{
43 unsigned int v;
44
45 if (cpu_is_mx31()) {
46 v = readl(IO_ADDRESS(MX31_OTG_BASE_ADDR +
47 USBCTRL_OTGBASE_OFFSET));
48
49 switch (port) {
50 case 0: /* OTG port */
51 v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
52 v |= (flags & MXC_EHCI_INTERFACE_MASK)
53 << MX31_OTG_SIC_SHIFT;
54 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
55 v |= MX31_OTG_PM_BIT;
56
57 break;
58 case 1: /* H1 port */
59 v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT);
60 v |= (flags & MXC_EHCI_INTERFACE_MASK)
61 << MX31_H1_SIC_SHIFT;
62 if (flags & MXC_EHCI_POWER_PINS_ENABLED)
63 v |= MX31_H1_PM_BIT;
64
65 if (!(flags & MXC_EHCI_TTL_ENABLED))
66 v |= MX31_H1_DT_BIT;
67
68 break;
69 case 2: /* H2 port */
70 v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT);
71 v |= (flags & MXC_EHCI_INTERFACE_MASK)
72 << MX31_H2_SIC_SHIFT;
73 if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
74 v |= MX31_H2_PM_BIT;
75
76 if (!(flags & MXC_EHCI_TTL_ENABLED))
77 v |= MX31_H2_DT_BIT;
78
79 break;
80 }
81
82 writel(v, IO_ADDRESS(MX31_OTG_BASE_ADDR +
83 USBCTRL_OTGBASE_OFFSET));
84 return 0;
85 }
86
87 printk(KERN_WARNING
88 "%s() unable to setup USBCONTROL for this CPU\n", __func__);
89 return -EINVAL;
90}
91EXPORT_SYMBOL(mxc_set_usbcontrol);
92
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
index eaabd4e96925..e1fc6da1cd10 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
@@ -112,7 +112,7 @@ enum iomux_gp_func {
112 * setups a single pin: 112 * setups a single pin:
113 * - reserves the pin so that it is not claimed by another driver 113 * - reserves the pin so that it is not claimed by another driver
114 * - setups the iomux according to the configuration 114 * - setups the iomux according to the configuration
115 * - if the pin is configured as a GPIO, we claim it throug kernel gpiolib 115 * - if the pin is configured as a GPIO, we claim it through kernel gpiolib
116 */ 116 */
117int mxc_iomux_alloc_pin(const unsigned int pin, const char *label); 117int mxc_iomux_alloc_pin(const unsigned int pin, const char *label);
118/* 118/*
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h b/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h
index 9f13061192c8..3887f3fe29d4 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h
@@ -48,7 +48,7 @@
48 * setups a single pin: 48 * setups a single pin:
49 * - reserves the pin so that it is not claimed by another driver 49 * - reserves the pin so that it is not claimed by another driver
50 * - setups the iomux according to the configuration 50 * - setups the iomux according to the configuration
51 * - if the pin is configured as a GPIO, we claim it throug kernel gpiolib 51 * - if the pin is configured as a GPIO, we claim it through kernel gpiolib
52 */ 52 */
53int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label); 53int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label);
54/* 54/*
diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
new file mode 100644
index 000000000000..8f796239393e
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
@@ -0,0 +1,37 @@
1#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
2#define __INCLUDE_ASM_ARCH_MXC_EHCI_H
3
4/* values for portsc field */
5#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
6#define MXC_EHCI_FORCE_FS (1 << 24)
7#define MXC_EHCI_UTMI_8BIT (0 << 28)
8#define MXC_EHCI_UTMI_16BIT (1 << 28)
9#define MXC_EHCI_SERIAL (1 << 29)
10#define MXC_EHCI_MODE_UTMI (0 << 30)
11#define MXC_EHCI_MODE_PHILIPS (1 << 30)
12#define MXC_EHCI_MODE_ULPI (2 << 30)
13#define MXC_EHCI_MODE_SERIAL (3 << 30)
14
15/* values for flags field */
16#define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0)
17#define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0)
18#define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0)
19#define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0)
20#define MXC_EHCI_INTERFACE_MASK (0xf)
21
22#define MXC_EHCI_POWER_PINS_ENABLED (1 << 5)
23#define MXC_EHCI_TTL_ENABLED (1 << 6)
24
25struct mxc_usbh_platform_data {
26 int (*init)(struct platform_device *pdev);
27 int (*exit)(struct platform_device *pdev);
28
29 unsigned int portsc;
30 unsigned int flags;
31 struct otg_transceiver *otg;
32};
33
34int mxc_set_usbcontrol(int port, unsigned int flags);
35
36#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */
37
diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h
index 2b972df22d12..5d2d21d414e0 100644
--- a/arch/arm/plat-mxc/include/mach/mxc_nand.h
+++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h
@@ -22,6 +22,7 @@
22 22
23struct mxc_nand_platform_data { 23struct mxc_nand_platform_data {
24 int width; /* data bus width in bytes */ 24 int width; /* data bus width in bytes */
25 int hw_ecc; /* 0 if supress hardware ECC */ 25 int hw_ecc:1; /* 0 if supress hardware ECC */
26 int flash_bbt:1; /* set to 1 to use a flash based bbt */
26}; 27};
27#endif /* __ASM_ARCH_NAND_H */ 28#endif /* __ASM_ARCH_NAND_H */
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 5cdbd605ac05..4ff6dfe04283 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -94,7 +94,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
94 * register to follow the ratio of duty_ns vs. period_ns 94 * register to follow the ratio of duty_ns vs. period_ns
95 * accordingly. 95 * accordingly.
96 * 96 *
97 * This is good enought for programming the brightness of 97 * This is good enough for programming the brightness of
98 * the LCD backlight. 98 * the LCD backlight.
99 * 99 *
100 * The real implementation would divide PERCLK[0] first by 100 * The real implementation would divide PERCLK[0] first by
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index f348ddfb0492..e2ea04a4c8a1 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -27,6 +27,7 @@ config ARCH_OMAP4
27 bool "TI OMAP4" 27 bool "TI OMAP4"
28 select CPU_V7 28 select CPU_V7
29 select ARM_GIC 29 select ARM_GIC
30 select COMMON_CLKDEV
30 31
31endchoice 32endchoice
32 33
@@ -42,28 +43,6 @@ config OMAP_DEBUG_LEDS
42 depends on OMAP_DEBUG_DEVICES 43 depends on OMAP_DEBUG_DEVICES
43 default y if LEDS || LEDS_OMAP_DEBUG 44 default y if LEDS || LEDS_OMAP_DEBUG
44 45
45config OMAP_DEBUG_POWERDOMAIN
46 bool "Emit debug messages from powerdomain layer"
47 depends on ARCH_OMAP2 || ARCH_OMAP3
48 help
49 Say Y here if you want to compile in powerdomain layer
50 debugging messages for OMAP2/3. These messages can
51 provide more detail as to why some powerdomain calls
52 may be failing, and will also emit a descriptive message
53 for every powerdomain register write. However, the
54 extra detail costs some memory.
55
56config OMAP_DEBUG_CLOCKDOMAIN
57 bool "Emit debug messages from clockdomain layer"
58 depends on ARCH_OMAP2 || ARCH_OMAP3
59 help
60 Say Y here if you want to compile in clockdomain layer
61 debugging messages for OMAP2/3. These messages can
62 provide more detail as to why some clockdomain calls
63 may be failing, and will also emit a descriptive message
64 for every clockdomain register write. However, the
65 extra detail costs some memory.
66
67config OMAP_RESET_CLOCKS 46config OMAP_RESET_CLOCKS
68 bool "Reset unused clocks during boot" 47 bool "Reset unused clocks during boot"
69 depends on ARCH_OMAP 48 depends on ARCH_OMAP
@@ -78,28 +57,28 @@ config OMAP_RESET_CLOCKS
78 57
79config OMAP_MUX 58config OMAP_MUX
80 bool "OMAP multiplexing support" 59 bool "OMAP multiplexing support"
81 depends on ARCH_OMAP 60 depends on ARCH_OMAP
82 default y 61 default y
83 help 62 help
84 Pin multiplexing support for OMAP boards. If your bootloader 63 Pin multiplexing support for OMAP boards. If your bootloader
85 sets the multiplexing correctly, say N. Otherwise, or if unsure, 64 sets the multiplexing correctly, say N. Otherwise, or if unsure,
86 say Y. 65 say Y.
87 66
88config OMAP_MUX_DEBUG 67config OMAP_MUX_DEBUG
89 bool "Multiplexing debug output" 68 bool "Multiplexing debug output"
90 depends on OMAP_MUX 69 depends on OMAP_MUX
91 help 70 help
92 Makes the multiplexing functions print out a lot of debug info. 71 Makes the multiplexing functions print out a lot of debug info.
93 This is useful if you want to find out the correct values of the 72 This is useful if you want to find out the correct values of the
94 multiplexing registers. 73 multiplexing registers.
95 74
96config OMAP_MUX_WARNINGS 75config OMAP_MUX_WARNINGS
97 bool "Warn about pins the bootloader didn't set up" 76 bool "Warn about pins the bootloader didn't set up"
98 depends on OMAP_MUX 77 depends on OMAP_MUX
99 default y 78 default y
100 help 79 help
101 Choose Y here to warn whenever driver initialization logic needs 80 Choose Y here to warn whenever driver initialization logic needs
102 to change the pin multiplexing setup. When there are no warnings 81 to change the pin multiplexing setup. When there are no warnings
103 printed, it's safe to deselect OMAP_MUX for your product. 82 printed, it's safe to deselect OMAP_MUX for your product.
104 83
105config OMAP_MCBSP 84config OMAP_MCBSP
@@ -125,7 +104,7 @@ config OMAP_IOMMU_DEBUG
125 tristate 104 tristate
126 105
127choice 106choice
128 prompt "System timer" 107 prompt "System timer"
129 default OMAP_MPU_TIMER 108 default OMAP_MPU_TIMER
130 109
131config OMAP_MPU_TIMER 110config OMAP_MPU_TIMER
@@ -148,11 +127,11 @@ config OMAP_32K_TIMER
148endchoice 127endchoice
149 128
150config OMAP_32K_TIMER_HZ 129config OMAP_32K_TIMER_HZ
151 int "Kernel internal timer frequency for 32KHz timer" 130 int "Kernel internal timer frequency for 32KHz timer"
152 range 32 1024 131 range 32 1024
153 depends on OMAP_32K_TIMER 132 depends on OMAP_32K_TIMER
154 default "128" 133 default "128"
155 help 134 help
156 Kernel internal timer frequency should be a divisor of 32768, 135 Kernel internal timer frequency should be a divisor of 32768,
157 such as 64 or 128. 136 such as 64 or 128.
158 137
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 681bfc37ebb2..89cafc937249 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -40,36 +40,10 @@ static struct clk_functions *arch_clock;
40 * clock framework is not up , it is defined here to avoid rework in 40 * clock framework is not up , it is defined here to avoid rework in
41 * every driver. Also dummy prcm reset function is added */ 41 * every driver. Also dummy prcm reset function is added */
42 42
43/* Dummy hooks only for OMAP4.For rest OMAPs, common clkdev is used */
44#if defined(CONFIG_ARCH_OMAP4)
45struct clk *clk_get(struct device *dev, const char *id)
46{
47 return NULL;
48}
49EXPORT_SYMBOL(clk_get);
50
51void clk_put(struct clk *clk)
52{
53}
54EXPORT_SYMBOL(clk_put);
55
56void omap2_clk_prepare_for_reboot(void)
57{
58}
59EXPORT_SYMBOL(omap2_clk_prepare_for_reboot);
60
61void omap_prcm_arch_reset(char mode)
62{
63}
64EXPORT_SYMBOL(omap_prcm_arch_reset);
65#endif
66int clk_enable(struct clk *clk) 43int clk_enable(struct clk *clk)
67{ 44{
68 unsigned long flags; 45 unsigned long flags;
69 int ret = 0; 46 int ret = 0;
70 if (cpu_is_omap44xx())
71 /* OMAP4 clk framework not supported yet */
72 return 0;
73 47
74 if (clk == NULL || IS_ERR(clk)) 48 if (clk == NULL || IS_ERR(clk))
75 return -EINVAL; 49 return -EINVAL;
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index cc050b3313bd..bf1eaf3a27d4 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -280,16 +280,18 @@ void __init omap2_set_globals_343x(void)
280#if defined(CONFIG_ARCH_OMAP4) 280#if defined(CONFIG_ARCH_OMAP4)
281static struct omap_globals omap4_globals = { 281static struct omap_globals omap4_globals = {
282 .class = OMAP443X_CLASS, 282 .class = OMAP443X_CLASS,
283 .tap = OMAP2_L4_IO_ADDRESS(0x4830a000), 283 .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE),
284 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE), 284 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE),
285 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 285 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
286 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 286 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
287 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
287}; 288};
288 289
289void __init omap2_set_globals_443x(void) 290void __init omap2_set_globals_443x(void)
290{ 291{
291 omap2_set_globals_tap(&omap4_globals); 292 omap2_set_globals_tap(&omap4_globals);
292 omap2_set_globals_control(&omap4_globals); 293 omap2_set_globals_control(&omap4_globals);
294 omap2_set_globals_prcm(&omap4_globals);
293} 295}
294#endif 296#endif
295 297
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
index 09c1107637f6..923c9621096b 100644
--- a/arch/arm/plat-omap/debug-devices.c
+++ b/arch/arm/plat-omap/debug-devices.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/smc91x.h>
16 17
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18 19
@@ -24,6 +25,12 @@
24 * platforms include H2, H3, H4, and Perseus2. 25 * platforms include H2, H3, H4, and Perseus2.
25 */ 26 */
26 27
28static struct smc91x_platdata smc91x_info = {
29 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
30 .leda = RPC_LED_100_10,
31 .ledb = RPC_LED_TX_RX,
32};
33
27static struct resource smc91x_resources[] = { 34static struct resource smc91x_resources[] = {
28 [0] = { 35 [0] = {
29 .flags = IORESOURCE_MEM, 36 .flags = IORESOURCE_MEM,
@@ -36,6 +43,9 @@ static struct resource smc91x_resources[] = {
36static struct platform_device smc91x_device = { 43static struct platform_device smc91x_device = {
37 .name = "smc91x", 44 .name = "smc91x",
38 .id = -1, 45 .id = -1,
46 .dev = {
47 .platform_data = &smc91x_info,
48 },
39 .num_resources = ARRAY_SIZE(smc91x_resources), 49 .num_resources = ARRAY_SIZE(smc91x_resources),
40 .resource = smc91x_resources, 50 .resource = smc91x_resources,
41}; 51};
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 6c768b71ad64..53fcef7c5201 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -293,7 +293,7 @@ static int fpga_resume_noirq(struct device *dev)
293 return 0; 293 return 0;
294} 294}
295 295
296static struct dev_pm_ops fpga_dev_pm_ops = { 296static const struct dev_pm_ops fpga_dev_pm_ops = {
297 .suspend_noirq = fpga_suspend_noirq, 297 .suspend_noirq = fpga_suspend_noirq,
298 .resume_noirq = fpga_resume_noirq, 298 .resume_noirq = fpga_resume_noirq,
299}; 299};
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index f86617869b38..30b5db73017a 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -242,6 +242,39 @@ fail:
242 242
243/*-------------------------------------------------------------------------*/ 243/*-------------------------------------------------------------------------*/
244 244
245#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
246
247#ifdef CONFIG_ARCH_OMAP24XX
248#define OMAP_RNG_BASE 0x480A0000
249#else
250#define OMAP_RNG_BASE 0xfffe5000
251#endif
252
253static struct resource rng_resources[] = {
254 {
255 .start = OMAP_RNG_BASE,
256 .end = OMAP_RNG_BASE + 0x4f,
257 .flags = IORESOURCE_MEM,
258 },
259};
260
261static struct platform_device omap_rng_device = {
262 .name = "omap_rng",
263 .id = -1,
264 .num_resources = ARRAY_SIZE(rng_resources),
265 .resource = rng_resources,
266};
267
268static void omap_init_rng(void)
269{
270 (void) platform_device_register(&omap_rng_device);
271}
272#else
273static inline void omap_init_rng(void) {}
274#endif
275
276/*-------------------------------------------------------------------------*/
277
245/* Numbering for the SPI-capable controllers when used for SPI: 278/* Numbering for the SPI-capable controllers when used for SPI:
246 * spi = 1 279 * spi = 1
247 * uwire = 2 280 * uwire = 2
@@ -324,39 +357,6 @@ static void omap_init_wdt(void)
324static inline void omap_init_wdt(void) {} 357static inline void omap_init_wdt(void) {}
325#endif 358#endif
326 359
327/*-------------------------------------------------------------------------*/
328
329#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
330
331#ifdef CONFIG_ARCH_OMAP24XX
332#define OMAP_RNG_BASE 0x480A0000
333#else
334#define OMAP_RNG_BASE 0xfffe5000
335#endif
336
337static struct resource rng_resources[] = {
338 {
339 .start = OMAP_RNG_BASE,
340 .end = OMAP_RNG_BASE + 0x4f,
341 .flags = IORESOURCE_MEM,
342 },
343};
344
345static struct platform_device omap_rng_device = {
346 .name = "omap_rng",
347 .id = -1,
348 .num_resources = ARRAY_SIZE(rng_resources),
349 .resource = rng_resources,
350};
351
352static void omap_init_rng(void)
353{
354 (void) platform_device_register(&omap_rng_device);
355}
356#else
357static inline void omap_init_rng(void) {}
358#endif
359
360/* 360/*
361 * This gets called after board-specific INIT_MACHINE, and initializes most 361 * This gets called after board-specific INIT_MACHINE, and initializes most
362 * on-chip peripherals accessible on this board (except for few like USB): 362 * on-chip peripherals accessible on this board (except for few like USB):
@@ -384,9 +384,9 @@ static int __init omap_init_devices(void)
384 */ 384 */
385 omap_init_dsp(); 385 omap_init_dsp();
386 omap_init_kp(); 386 omap_init_kp();
387 omap_init_rng();
387 omap_init_uwire(); 388 omap_init_uwire();
388 omap_init_wdt(); 389 omap_init_wdt();
389 omap_init_rng();
390 return 0; 390 return 0;
391} 391}
392arch_initcall(omap_init_devices); 392arch_initcall(omap_init_devices);
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index be4ce070fb4c..09d82b3c66ce 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -47,7 +47,6 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
47#endif 47#endif
48 48
49#define OMAP_DMA_ACTIVE 0x01 49#define OMAP_DMA_ACTIVE 0x01
50#define OMAP_DMA_CCR_EN (1 << 7)
51#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe 50#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe
52 51
53#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) 52#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
@@ -1120,17 +1119,8 @@ int omap_dma_running(void)
1120{ 1119{
1121 int lch; 1120 int lch;
1122 1121
1123 /* 1122 if (cpu_class_is_omap1())
1124 * On OMAP1510, internal LCD controller will start the transfer 1123 if (omap_lcd_dma_running())
1125 * when it gets enabled, so assume DMA running if LCD enabled.
1126 */
1127 if (cpu_is_omap1510())
1128 if (omap_readw(0xfffec000 + 0x00) & (1 << 0))
1129 return 1;
1130
1131 /* Check if LCD DMA is running */
1132 if (cpu_is_omap16xx())
1133 if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN)
1134 return 1; 1124 return 1;
1135 1125
1136 for (lch = 0; lch < dma_chan_count; lch++) 1126 for (lch = 0; lch < dma_chan_count; lch++)
@@ -1252,7 +1242,7 @@ static void create_dma_lch_chain(int lch_head, int lch_queue)
1252 * OMAP_DMA_DYNAMIC_CHAIN 1242 * OMAP_DMA_DYNAMIC_CHAIN
1253 * @params - Channel parameters 1243 * @params - Channel parameters
1254 * 1244 *
1255 * @return - Succes : 0 1245 * @return - Success : 0
1256 * Failure: -EINVAL/-ENOMEM 1246 * Failure: -EINVAL/-ENOMEM
1257 */ 1247 */
1258int omap_request_dma_chain(int dev_id, const char *dev_name, 1248int omap_request_dma_chain(int dev_id, const char *dev_name,
@@ -1990,377 +1980,6 @@ static struct irqaction omap24xx_dma_irq;
1990 1980
1991/*----------------------------------------------------------------------------*/ 1981/*----------------------------------------------------------------------------*/
1992 1982
1993static struct lcd_dma_info {
1994 spinlock_t lock;
1995 int reserved;
1996 void (*callback)(u16 status, void *data);
1997 void *cb_data;
1998
1999 int active;
2000 unsigned long addr, size;
2001 int rotate, data_type, xres, yres;
2002 int vxres;
2003 int mirror;
2004 int xscale, yscale;
2005 int ext_ctrl;
2006 int src_port;
2007 int single_transfer;
2008} lcd_dma;
2009
2010void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
2011 int data_type)
2012{
2013 lcd_dma.addr = addr;
2014 lcd_dma.data_type = data_type;
2015 lcd_dma.xres = fb_xres;
2016 lcd_dma.yres = fb_yres;
2017}
2018EXPORT_SYMBOL(omap_set_lcd_dma_b1);
2019
2020void omap_set_lcd_dma_src_port(int port)
2021{
2022 lcd_dma.src_port = port;
2023}
2024
2025void omap_set_lcd_dma_ext_controller(int external)
2026{
2027 lcd_dma.ext_ctrl = external;
2028}
2029EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller);
2030
2031void omap_set_lcd_dma_single_transfer(int single)
2032{
2033 lcd_dma.single_transfer = single;
2034}
2035EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer);
2036
2037void omap_set_lcd_dma_b1_rotation(int rotate)
2038{
2039 if (omap_dma_in_1510_mode()) {
2040 printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n");
2041 BUG();
2042 return;
2043 }
2044 lcd_dma.rotate = rotate;
2045}
2046EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation);
2047
2048void omap_set_lcd_dma_b1_mirror(int mirror)
2049{
2050 if (omap_dma_in_1510_mode()) {
2051 printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n");
2052 BUG();
2053 }
2054 lcd_dma.mirror = mirror;
2055}
2056EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
2057
2058void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
2059{
2060 if (omap_dma_in_1510_mode()) {
2061 printk(KERN_ERR "DMA virtual resulotion is not supported "
2062 "in 1510 mode\n");
2063 BUG();
2064 }
2065 lcd_dma.vxres = vxres;
2066}
2067EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres);
2068
2069void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale)
2070{
2071 if (omap_dma_in_1510_mode()) {
2072 printk(KERN_ERR "DMA scale is not supported in 1510 mode\n");
2073 BUG();
2074 }
2075 lcd_dma.xscale = xscale;
2076 lcd_dma.yscale = yscale;
2077}
2078EXPORT_SYMBOL(omap_set_lcd_dma_b1_scale);
2079
2080static void set_b1_regs(void)
2081{
2082 unsigned long top, bottom;
2083 int es;
2084 u16 w;
2085 unsigned long en, fn;
2086 long ei, fi;
2087 unsigned long vxres;
2088 unsigned int xscale, yscale;
2089
2090 switch (lcd_dma.data_type) {
2091 case OMAP_DMA_DATA_TYPE_S8:
2092 es = 1;
2093 break;
2094 case OMAP_DMA_DATA_TYPE_S16:
2095 es = 2;
2096 break;
2097 case OMAP_DMA_DATA_TYPE_S32:
2098 es = 4;
2099 break;
2100 default:
2101 BUG();
2102 return;
2103 }
2104
2105 vxres = lcd_dma.vxres ? lcd_dma.vxres : lcd_dma.xres;
2106 xscale = lcd_dma.xscale ? lcd_dma.xscale : 1;
2107 yscale = lcd_dma.yscale ? lcd_dma.yscale : 1;
2108 BUG_ON(vxres < lcd_dma.xres);
2109
2110#define PIXADDR(x, y) (lcd_dma.addr + \
2111 ((y) * vxres * yscale + (x) * xscale) * es)
2112#define PIXSTEP(sx, sy, dx, dy) (PIXADDR(dx, dy) - PIXADDR(sx, sy) - es + 1)
2113
2114 switch (lcd_dma.rotate) {
2115 case 0:
2116 if (!lcd_dma.mirror) {
2117 top = PIXADDR(0, 0);
2118 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
2119 /* 1510 DMA requires the bottom address to be 2 more
2120 * than the actual last memory access location. */
2121 if (omap_dma_in_1510_mode() &&
2122 lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32)
2123 bottom += 2;
2124 ei = PIXSTEP(0, 0, 1, 0);
2125 fi = PIXSTEP(lcd_dma.xres - 1, 0, 0, 1);
2126 } else {
2127 top = PIXADDR(lcd_dma.xres - 1, 0);
2128 bottom = PIXADDR(0, lcd_dma.yres - 1);
2129 ei = PIXSTEP(1, 0, 0, 0);
2130 fi = PIXSTEP(0, 0, lcd_dma.xres - 1, 1);
2131 }
2132 en = lcd_dma.xres;
2133 fn = lcd_dma.yres;
2134 break;
2135 case 90:
2136 if (!lcd_dma.mirror) {
2137 top = PIXADDR(0, lcd_dma.yres - 1);
2138 bottom = PIXADDR(lcd_dma.xres - 1, 0);
2139 ei = PIXSTEP(0, 1, 0, 0);
2140 fi = PIXSTEP(0, 0, 1, lcd_dma.yres - 1);
2141 } else {
2142 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
2143 bottom = PIXADDR(0, 0);
2144 ei = PIXSTEP(0, 1, 0, 0);
2145 fi = PIXSTEP(1, 0, 0, lcd_dma.yres - 1);
2146 }
2147 en = lcd_dma.yres;
2148 fn = lcd_dma.xres;
2149 break;
2150 case 180:
2151 if (!lcd_dma.mirror) {
2152 top = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
2153 bottom = PIXADDR(0, 0);
2154 ei = PIXSTEP(1, 0, 0, 0);
2155 fi = PIXSTEP(0, 1, lcd_dma.xres - 1, 0);
2156 } else {
2157 top = PIXADDR(0, lcd_dma.yres - 1);
2158 bottom = PIXADDR(lcd_dma.xres - 1, 0);
2159 ei = PIXSTEP(0, 0, 1, 0);
2160 fi = PIXSTEP(lcd_dma.xres - 1, 1, 0, 0);
2161 }
2162 en = lcd_dma.xres;
2163 fn = lcd_dma.yres;
2164 break;
2165 case 270:
2166 if (!lcd_dma.mirror) {
2167 top = PIXADDR(lcd_dma.xres - 1, 0);
2168 bottom = PIXADDR(0, lcd_dma.yres - 1);
2169 ei = PIXSTEP(0, 0, 0, 1);
2170 fi = PIXSTEP(1, lcd_dma.yres - 1, 0, 0);
2171 } else {
2172 top = PIXADDR(0, 0);
2173 bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1);
2174 ei = PIXSTEP(0, 0, 0, 1);
2175 fi = PIXSTEP(0, lcd_dma.yres - 1, 1, 0);
2176 }
2177 en = lcd_dma.yres;
2178 fn = lcd_dma.xres;
2179 break;
2180 default:
2181 BUG();
2182 return; /* Suppress warning about uninitialized vars */
2183 }
2184
2185 if (omap_dma_in_1510_mode()) {
2186 omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
2187 omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
2188 omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
2189 omap_writew(bottom, OMAP1510_DMA_LCD_BOT_F1_L);
2190
2191 return;
2192 }
2193
2194 /* 1610 regs */
2195 omap_writew(top >> 16, OMAP1610_DMA_LCD_TOP_B1_U);
2196 omap_writew(top, OMAP1610_DMA_LCD_TOP_B1_L);
2197 omap_writew(bottom >> 16, OMAP1610_DMA_LCD_BOT_B1_U);
2198 omap_writew(bottom, OMAP1610_DMA_LCD_BOT_B1_L);
2199
2200 omap_writew(en, OMAP1610_DMA_LCD_SRC_EN_B1);
2201 omap_writew(fn, OMAP1610_DMA_LCD_SRC_FN_B1);
2202
2203 w = omap_readw(OMAP1610_DMA_LCD_CSDP);
2204 w &= ~0x03;
2205 w |= lcd_dma.data_type;
2206 omap_writew(w, OMAP1610_DMA_LCD_CSDP);
2207
2208 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
2209 /* Always set the source port as SDRAM for now*/
2210 w &= ~(0x03 << 6);
2211 if (lcd_dma.callback != NULL)
2212 w |= 1 << 1; /* Block interrupt enable */
2213 else
2214 w &= ~(1 << 1);
2215 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
2216
2217 if (!(lcd_dma.rotate || lcd_dma.mirror ||
2218 lcd_dma.vxres || lcd_dma.xscale || lcd_dma.yscale))
2219 return;
2220
2221 w = omap_readw(OMAP1610_DMA_LCD_CCR);
2222 /* Set the double-indexed addressing mode */
2223 w |= (0x03 << 12);
2224 omap_writew(w, OMAP1610_DMA_LCD_CCR);
2225
2226 omap_writew(ei, OMAP1610_DMA_LCD_SRC_EI_B1);
2227 omap_writew(fi >> 16, OMAP1610_DMA_LCD_SRC_FI_B1_U);
2228 omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L);
2229}
2230
2231static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id)
2232{
2233 u16 w;
2234
2235 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
2236 if (unlikely(!(w & (1 << 3)))) {
2237 printk(KERN_WARNING "Spurious LCD DMA IRQ\n");
2238 return IRQ_NONE;
2239 }
2240 /* Ack the IRQ */
2241 w |= (1 << 3);
2242 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
2243 lcd_dma.active = 0;
2244 if (lcd_dma.callback != NULL)
2245 lcd_dma.callback(w, lcd_dma.cb_data);
2246
2247 return IRQ_HANDLED;
2248}
2249
2250int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
2251 void *data)
2252{
2253 spin_lock_irq(&lcd_dma.lock);
2254 if (lcd_dma.reserved) {
2255 spin_unlock_irq(&lcd_dma.lock);
2256 printk(KERN_ERR "LCD DMA channel already reserved\n");
2257 BUG();
2258 return -EBUSY;
2259 }
2260 lcd_dma.reserved = 1;
2261 spin_unlock_irq(&lcd_dma.lock);
2262 lcd_dma.callback = callback;
2263 lcd_dma.cb_data = data;
2264 lcd_dma.active = 0;
2265 lcd_dma.single_transfer = 0;
2266 lcd_dma.rotate = 0;
2267 lcd_dma.vxres = 0;
2268 lcd_dma.mirror = 0;
2269 lcd_dma.xscale = 0;
2270 lcd_dma.yscale = 0;
2271 lcd_dma.ext_ctrl = 0;
2272 lcd_dma.src_port = 0;
2273
2274 return 0;
2275}
2276EXPORT_SYMBOL(omap_request_lcd_dma);
2277
2278void omap_free_lcd_dma(void)
2279{
2280 spin_lock(&lcd_dma.lock);
2281 if (!lcd_dma.reserved) {
2282 spin_unlock(&lcd_dma.lock);
2283 printk(KERN_ERR "LCD DMA is not reserved\n");
2284 BUG();
2285 return;
2286 }
2287 if (!enable_1510_mode)
2288 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1,
2289 OMAP1610_DMA_LCD_CCR);
2290 lcd_dma.reserved = 0;
2291 spin_unlock(&lcd_dma.lock);
2292}
2293EXPORT_SYMBOL(omap_free_lcd_dma);
2294
2295void omap_enable_lcd_dma(void)
2296{
2297 u16 w;
2298
2299 /*
2300 * Set the Enable bit only if an external controller is
2301 * connected. Otherwise the OMAP internal controller will
2302 * start the transfer when it gets enabled.
2303 */
2304 if (enable_1510_mode || !lcd_dma.ext_ctrl)
2305 return;
2306
2307 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
2308 w |= 1 << 8;
2309 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
2310
2311 lcd_dma.active = 1;
2312
2313 w = omap_readw(OMAP1610_DMA_LCD_CCR);
2314 w |= 1 << 7;
2315 omap_writew(w, OMAP1610_DMA_LCD_CCR);
2316}
2317EXPORT_SYMBOL(omap_enable_lcd_dma);
2318
2319void omap_setup_lcd_dma(void)
2320{
2321 BUG_ON(lcd_dma.active);
2322 if (!enable_1510_mode) {
2323 /* Set some reasonable defaults */
2324 omap_writew(0x5440, OMAP1610_DMA_LCD_CCR);
2325 omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP);
2326 omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL);
2327 }
2328 set_b1_regs();
2329 if (!enable_1510_mode) {
2330 u16 w;
2331
2332 w = omap_readw(OMAP1610_DMA_LCD_CCR);
2333 /*
2334 * If DMA was already active set the end_prog bit to have
2335 * the programmed register set loaded into the active
2336 * register set.
2337 */
2338 w |= 1 << 11; /* End_prog */
2339 if (!lcd_dma.single_transfer)
2340 w |= (3 << 8); /* Auto_init, repeat */
2341 omap_writew(w, OMAP1610_DMA_LCD_CCR);
2342 }
2343}
2344EXPORT_SYMBOL(omap_setup_lcd_dma);
2345
2346void omap_stop_lcd_dma(void)
2347{
2348 u16 w;
2349
2350 lcd_dma.active = 0;
2351 if (enable_1510_mode || !lcd_dma.ext_ctrl)
2352 return;
2353
2354 w = omap_readw(OMAP1610_DMA_LCD_CCR);
2355 w &= ~(1 << 7);
2356 omap_writew(w, OMAP1610_DMA_LCD_CCR);
2357
2358 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
2359 w &= ~(1 << 8);
2360 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
2361}
2362EXPORT_SYMBOL(omap_stop_lcd_dma);
2363
2364void omap_dma_global_context_save(void) 1983void omap_dma_global_context_save(void)
2365{ 1984{
2366 omap_dma_global_context.dma_irqenable_l0 = 1985 omap_dma_global_context.dma_irqenable_l0 =
@@ -2465,14 +2084,6 @@ static int __init omap_init_dma(void)
2465 dma_chan_count = 16; 2084 dma_chan_count = 16;
2466 } else 2085 } else
2467 dma_chan_count = 9; 2086 dma_chan_count = 9;
2468 if (cpu_is_omap16xx()) {
2469 u16 w;
2470
2471 /* this would prevent OMAP sleep */
2472 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
2473 w &= ~(1 << 8);
2474 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
2475 }
2476 } else if (cpu_class_is_omap2()) { 2087 } else if (cpu_class_is_omap2()) {
2477 u8 revision = dma_read(REVISION) & 0xff; 2088 u8 revision = dma_read(REVISION) & 0xff;
2478 printk(KERN_INFO "OMAP DMA hardware revision %d.%d\n", 2089 printk(KERN_INFO "OMAP DMA hardware revision %d.%d\n",
@@ -2483,7 +2094,6 @@ static int __init omap_init_dma(void)
2483 return 0; 2094 return 0;
2484 } 2095 }
2485 2096
2486 spin_lock_init(&lcd_dma.lock);
2487 spin_lock_init(&dma_chan_lock); 2097 spin_lock_init(&dma_chan_lock);
2488 2098
2489 for (ch = 0; ch < dma_chan_count; ch++) { 2099 for (ch = 0; ch < dma_chan_count; ch++) {
@@ -2548,22 +2158,6 @@ static int __init omap_init_dma(void)
2548 } 2158 }
2549 } 2159 }
2550 2160
2551
2552 /* FIXME: Update LCD DMA to work on 24xx */
2553 if (cpu_class_is_omap1()) {
2554 r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
2555 "LCD DMA", NULL);
2556 if (r != 0) {
2557 int i;
2558
2559 printk(KERN_ERR "unable to request IRQ for LCD DMA "
2560 "(error %d)\n", r);
2561 for (i = 0; i < dma_chan_count; i++)
2562 free_irq(omap1_dma_irq[i], (void *) (i + 1));
2563 goto out_free;
2564 }
2565 }
2566
2567 return 0; 2161 return 0;
2568 2162
2569out_free: 2163out_free:
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 78a4ce538dbd..d3eea4f47533 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -28,13 +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#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/omapfb.h>
31 32
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33#include <asm/mach/map.h> 34#include <asm/mach/map.h>
34 35
35#include <plat/board.h> 36#include <plat/board.h>
36#include <plat/sram.h> 37#include <plat/sram.h>
37#include <plat/omapfb.h>
38 38
39#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 39#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
40 40
@@ -55,6 +55,10 @@ static struct platform_device omap_fb_device = {
55 .num_resources = 0, 55 .num_resources = 0,
56}; 56};
57 57
58void omapfb_set_platform_data(struct omapfb_platform_data *data)
59{
60}
61
58static inline int ranges_overlap(unsigned long start1, unsigned long size1, 62static inline int ranges_overlap(unsigned long start1, unsigned long size1,
59 unsigned long start2, unsigned long size2) 63 unsigned long start2, unsigned long size2)
60{ 64{
@@ -327,7 +331,33 @@ static inline int omap_init_fb(void)
327 331
328arch_initcall(omap_init_fb); 332arch_initcall(omap_init_fb);
329 333
330#else 334#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
335
336static u64 omap_fb_dma_mask = ~(u32)0;
337static struct omapfb_platform_data omapfb_config;
338
339static struct platform_device omap_fb_device = {
340 .name = "omapfb",
341 .id = -1,
342 .dev = {
343 .dma_mask = &omap_fb_dma_mask,
344 .coherent_dma_mask = ~(u32)0,
345 .platform_data = &omapfb_config,
346 },
347 .num_resources = 0,
348};
349
350void omapfb_set_platform_data(struct omapfb_platform_data *data)
351{
352 omapfb_config = *data;
353}
354
355static inline int omap_init_fb(void)
356{
357 return platform_device_register(&omap_fb_device);
358}
359
360arch_initcall(omap_init_fb);
331 361
332void omapfb_reserve_sdram(void) {} 362void omapfb_reserve_sdram(void) {}
333unsigned long omapfb_reserve_sram(unsigned long sram_pstart, 363unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
@@ -339,5 +369,20 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
339 return 0; 369 return 0;
340} 370}
341 371
372#else
373
374void omapfb_set_platform_data(struct omapfb_platform_data *data)
375{
376}
377
378void omapfb_reserve_sdram(void) {}
379unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
380 unsigned long sram_vstart,
381 unsigned long sram_size,
382 unsigned long start_avail,
383 unsigned long size_avail)
384{
385 return 0;
386}
342 387
343#endif 388#endif
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 055160e0620e..04846811d0aa 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1431,7 +1431,7 @@ static int omap_mpuio_resume_noirq(struct device *dev)
1431 return 0; 1431 return 0;
1432} 1432}
1433 1433
1434static struct dev_pm_ops omap_mpuio_dev_pm_ops = { 1434static const struct dev_pm_ops omap_mpuio_dev_pm_ops = {
1435 .suspend_noirq = omap_mpuio_suspend_noirq, 1435 .suspend_noirq = omap_mpuio_suspend_noirq,
1436 .resume_noirq = omap_mpuio_resume_noirq, 1436 .resume_noirq = omap_mpuio_resume_noirq,
1437}; 1437};
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index c08362dbb8ed..33fff4ef382d 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -80,47 +80,8 @@ static struct platform_device omap_i2c_devices[] = {
80#endif 80#endif
81}; 81};
82 82
83#if defined(CONFIG_ARCH_OMAP24XX)
84static const int omap24xx_pins[][2] = {
85 { M19_24XX_I2C1_SCL, L15_24XX_I2C1_SDA },
86 { J15_24XX_I2C2_SCL, H19_24XX_I2C2_SDA },
87};
88#else
89static const int omap24xx_pins[][2] = {};
90#endif
91#if defined(CONFIG_ARCH_OMAP34XX)
92static const int omap34xx_pins[][2] = {
93 { K21_34XX_I2C1_SCL, J21_34XX_I2C1_SDA},
94 { AF15_34XX_I2C2_SCL, AE15_34XX_I2C2_SDA},
95 { AF14_34XX_I2C3_SCL, AG14_34XX_I2C3_SDA},
96};
97#else
98static const int omap34xx_pins[][2] = {};
99#endif
100
101#define OMAP_I2C_CMDLINE_SETUP (BIT(31)) 83#define OMAP_I2C_CMDLINE_SETUP (BIT(31))
102 84
103static void __init omap_i2c_mux_pins(int bus)
104{
105 int scl, sda;
106
107 if (cpu_class_is_omap1()) {
108 scl = I2C_SCL;
109 sda = I2C_SDA;
110 } else if (cpu_is_omap24xx()) {
111 scl = omap24xx_pins[bus][0];
112 sda = omap24xx_pins[bus][1];
113 } else if (cpu_is_omap34xx()) {
114 scl = omap34xx_pins[bus][0];
115 sda = omap34xx_pins[bus][1];
116 } else {
117 return;
118 }
119
120 omap_cfg_reg(sda);
121 omap_cfg_reg(scl);
122}
123
124static int __init omap_i2c_nr_ports(void) 85static int __init omap_i2c_nr_ports(void)
125{ 86{
126 int ports = 0; 87 int ports = 0;
@@ -156,7 +117,6 @@ static int __init omap_i2c_add_bus(int bus_id)
156 res[1].start = irq; 117 res[1].start = irq;
157 } 118 }
158 119
159 omap_i2c_mux_pins(bus_id - 1);
160 return platform_device_register(pdev); 120 return platform_device_register(pdev);
161} 121}
162 122
@@ -209,7 +169,7 @@ out:
209subsys_initcall(omap_register_i2c_bus_cmdline); 169subsys_initcall(omap_register_i2c_bus_cmdline);
210 170
211/** 171/**
212 * omap_register_i2c_bus - register I2C bus with device descriptors 172 * omap_plat_register_i2c_bus - register I2C bus with device descriptors
213 * @bus_id: bus id counting from number 1 173 * @bus_id: bus id counting from number 1
214 * @clkrate: clock rate of the bus in kHz 174 * @clkrate: clock rate of the bus in kHz
215 * @info: pointer into I2C device descriptor table or NULL 175 * @info: pointer into I2C device descriptor table or NULL
@@ -217,7 +177,7 @@ subsys_initcall(omap_register_i2c_bus_cmdline);
217 * 177 *
218 * Returns 0 on success or an error code. 178 * Returns 0 on success or an error code.
219 */ 179 */
220int __init omap_register_i2c_bus(int bus_id, u32 clkrate, 180int __init omap_plat_register_i2c_bus(int bus_id, u32 clkrate,
221 struct i2c_board_info const *info, 181 struct i2c_board_info const *info,
222 unsigned len) 182 unsigned len)
223{ 183{
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h
index abb17b604f82..376ce18216ff 100644
--- a/arch/arm/plat-omap/include/plat/board.h
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -114,15 +114,6 @@ struct omap_pwm_led_platform_data {
114 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off); 114 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
115}; 115};
116 116
117/* See arch/arm/plat-omap/include/mach/gpio-switch.h for definitions */
118struct omap_gpio_switch_config {
119 char name[12];
120 u16 gpio;
121 int flags:4;
122 int type:4;
123 int key_code:24; /* Linux key code */
124};
125
126struct omap_uart_config { 117struct omap_uart_config {
127 /* Bit field of UARTs present; bit 0 --> UART1 */ 118 /* Bit field of UARTs present; bit 0 --> UART1 */
128 unsigned int enabled_uarts; 119 unsigned int enabled_uarts;
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h
new file mode 100644
index 000000000000..35b36caf5f91
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h
@@ -0,0 +1,41 @@
1/*
2 * clkdev <-> OMAP integration
3 *
4 * Russell King <linux@arm.linux.org.uk>
5 *
6 */
7
8#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H
9#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H
10
11#include <asm/clkdev.h>
12
13struct omap_clk {
14 u16 cpu;
15 struct clk_lookup lk;
16};
17
18#define CLK(dev, con, ck, cp) \
19 { \
20 .cpu = cp, \
21 .lk = { \
22 .dev_id = dev, \
23 .con_id = con, \
24 .clk = ck, \
25 }, \
26 }
27
28
29#define CK_310 (1 << 0)
30#define CK_7XX (1 << 1)
31#define CK_1510 (1 << 2)
32#define CK_16XX (1 << 3)
33#define CK_243X (1 << 4)
34#define CK_242X (1 << 5)
35#define CK_343X (1 << 6)
36#define CK_3430ES1 (1 << 7)
37#define CK_3430ES2 (1 << 8)
38#define CK_443X (1 << 9)
39
40#endif
41
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h
index 4b8b0d65cbf2..309b6d1dccdb 100644
--- a/arch/arm/plat-omap/include/plat/clock.h
+++ b/arch/arm/plat-omap/include/plat/clock.h
@@ -13,6 +13,8 @@
13#ifndef __ARCH_ARM_OMAP_CLOCK_H 13#ifndef __ARCH_ARM_OMAP_CLOCK_H
14#define __ARCH_ARM_OMAP_CLOCK_H 14#define __ARCH_ARM_OMAP_CLOCK_H
15 15
16#include <linux/list.h>
17
16struct module; 18struct module;
17struct clk; 19struct clk;
18struct clockdomain; 20struct clockdomain;
@@ -148,6 +150,8 @@ extern const struct clkops clkops_null;
148#define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ 150#define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */
149#define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ 151#define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */
150#define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ 152#define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */
153#define CLOCK_IN_OMAP4430 (1 << 13)
154#define ALWAYS_ENABLED (1 << 14)
151/* bits 13-31 are currently free */ 155/* bits 13-31 are currently free */
152 156
153/* Clksel_rate flags */ 157/* Clksel_rate flags */
@@ -156,6 +160,7 @@ extern const struct clkops clkops_null;
156#define RATE_IN_243X (1 << 2) 160#define RATE_IN_243X (1 << 2)
157#define RATE_IN_343X (1 << 3) /* rates common to all 343X */ 161#define RATE_IN_343X (1 << 3) /* rates common to all 343X */
158#define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */ 162#define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */
163#define RATE_IN_4430 (1 << 5)
159 164
160#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) 165#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X)
161 166
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index 064f1730f43b..32c22272425d 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -27,7 +27,7 @@
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H 27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H 28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29 29
30#include <linux/i2c.h> 30#include <plat/i2c.h>
31 31
32struct sys_timer; 32struct sys_timer;
33 33
@@ -36,18 +36,6 @@ extern void __iomem *gic_cpu_base_addr;
36 36
37extern void omap_map_common_io(void); 37extern void omap_map_common_io(void);
38extern struct sys_timer omap_timer; 38extern struct sys_timer omap_timer;
39#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
40extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
41 struct i2c_board_info const *info,
42 unsigned len);
43#else
44static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
45 struct i2c_board_info const *info,
46 unsigned len)
47{
48 return 0;
49}
50#endif
51 39
52/* IO bases for various OMAP processors */ 40/* IO bases for various OMAP processors */
53struct omap_globals { 41struct omap_globals {
@@ -58,6 +46,7 @@ struct omap_globals {
58 void __iomem *ctrl; /* System Control Module */ 46 void __iomem *ctrl; /* System Control Module */
59 void __iomem *prm; /* Power and Reset Management */ 47 void __iomem *prm; /* Power and Reset Management */
60 void __iomem *cm; /* Clock Management */ 48 void __iomem *cm; /* Clock Management */
49 void __iomem *cm2;
61}; 50};
62 51
63void omap2_set_globals_242x(void); 52void omap2_set_globals_242x(void);
@@ -71,4 +60,24 @@ void omap2_set_globals_sdrc(struct omap_globals *);
71void omap2_set_globals_control(struct omap_globals *); 60void omap2_set_globals_control(struct omap_globals *);
72void omap2_set_globals_prcm(struct omap_globals *); 61void omap2_set_globals_prcm(struct omap_globals *);
73 62
63/**
64 * omap_test_timeout - busy-loop, testing a condition
65 * @cond: condition to test until it evaluates to true
66 * @timeout: maximum number of microseconds in the timeout
67 * @index: loop index (integer)
68 *
69 * Loop waiting for @cond to become true or until at least @timeout
70 * microseconds have passed. To use, define some integer @index in the
71 * calling code. After running, if @index == @timeout, then the loop has
72 * timed out.
73 */
74#define omap_test_timeout(cond, timeout, index) \
75({ \
76 for (index = 0; index < timeout; index++) { \
77 if (cond) \
78 break; \
79 udelay(1); \
80 } \
81})
82
74#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ 83#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 2e1789001dfe..9a028bdebb06 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -176,11 +176,13 @@ IS_OMAP_CLASS(15xx, 0x15)
176IS_OMAP_CLASS(16xx, 0x16) 176IS_OMAP_CLASS(16xx, 0x16)
177IS_OMAP_CLASS(24xx, 0x24) 177IS_OMAP_CLASS(24xx, 0x24)
178IS_OMAP_CLASS(34xx, 0x34) 178IS_OMAP_CLASS(34xx, 0x34)
179IS_OMAP_CLASS(44xx, 0x44)
179 180
180IS_OMAP_SUBCLASS(242x, 0x242) 181IS_OMAP_SUBCLASS(242x, 0x242)
181IS_OMAP_SUBCLASS(243x, 0x243) 182IS_OMAP_SUBCLASS(243x, 0x243)
182IS_OMAP_SUBCLASS(343x, 0x343) 183IS_OMAP_SUBCLASS(343x, 0x343)
183IS_OMAP_SUBCLASS(363x, 0x363) 184IS_OMAP_SUBCLASS(363x, 0x363)
185IS_OMAP_SUBCLASS(443x, 0x443)
184 186
185#define cpu_is_omap7xx() 0 187#define cpu_is_omap7xx() 0
186#define cpu_is_omap15xx() 0 188#define cpu_is_omap15xx() 0
@@ -393,11 +395,11 @@ IS_OMAP_TYPE(3517, 0x3517)
393 (!omap3_has_iva()) && \ 395 (!omap3_has_iva()) && \
394 (!omap3_has_sgx())) 396 (!omap3_has_sgx()))
395# define cpu_is_omap3515() (cpu_is_omap3430() && \ 397# define cpu_is_omap3515() (cpu_is_omap3430() && \
396 (omap3_has_iva()) && \ 398 (!omap3_has_iva()) && \
397 (!omap3_has_sgx())) 399 (omap3_has_sgx()))
398# define cpu_is_omap3525() (cpu_is_omap3430() && \ 400# define cpu_is_omap3525() (cpu_is_omap3430() && \
399 (omap3_has_sgx()) && \ 401 (!omap3_has_sgx()) && \
400 (!omap3_has_iva())) 402 (omap3_has_iva()))
401# define cpu_is_omap3530() (cpu_is_omap3430()) 403# define cpu_is_omap3530() (cpu_is_omap3430())
402# define cpu_is_omap3505() is_omap3505() 404# define cpu_is_omap3505() is_omap3505()
403# define cpu_is_omap3517() is_omap3517() 405# define cpu_is_omap3517() is_omap3517()
@@ -408,8 +410,8 @@ IS_OMAP_TYPE(3517, 0x3517)
408# if defined(CONFIG_ARCH_OMAP4) 410# if defined(CONFIG_ARCH_OMAP4)
409# undef cpu_is_omap44xx 411# undef cpu_is_omap44xx
410# undef cpu_is_omap443x 412# undef cpu_is_omap443x
411# define cpu_is_omap44xx() 1 413# define cpu_is_omap44xx() is_omap44xx()
412# define cpu_is_omap443x() 1 414# define cpu_is_omap443x() is_omap443x()
413# endif 415# endif
414 416
415/* Macros to detect if we have OMAP1 or OMAP2 */ 417/* Macros to detect if we have OMAP1 or OMAP2 */
@@ -436,14 +438,15 @@ IS_OMAP_TYPE(3517, 0x3517)
436#define OMAP3630_REV_ES1_0 0x36300034 438#define OMAP3630_REV_ES1_0 0x36300034
437 439
438#define OMAP35XX_CLASS 0x35000034 440#define OMAP35XX_CLASS 0x35000034
439#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 12)) 441#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
440#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 12)) 442#define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 8))
441#define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 12)) 443#define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 8))
442#define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 12)) 444#define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 8))
443#define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 12)) 445#define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8))
444#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 12)) 446#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
445 447
446#define OMAP443X_CLASS 0x44300034 448#define OMAP443X_CLASS 0x44300044
449#define OMAP4430_REV_ES1_0 0x44300044
447 450
448/* 451/*
449 * omap_chip bits 452 * omap_chip bits
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
new file mode 100644
index 000000000000..c66e464732df
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -0,0 +1,575 @@
1/*
2 * linux/include/asm-arm/arch-omap/display.h
3 *
4 * Copyright (C) 2008 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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 version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __ASM_ARCH_OMAP_DISPLAY_H
21#define __ASM_ARCH_OMAP_DISPLAY_H
22
23#include <linux/list.h>
24#include <linux/kobject.h>
25#include <linux/device.h>
26#include <asm/atomic.h>
27
28#define DISPC_IRQ_FRAMEDONE (1 << 0)
29#define DISPC_IRQ_VSYNC (1 << 1)
30#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)
31#define DISPC_IRQ_EVSYNC_ODD (1 << 3)
32#define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4)
33#define DISPC_IRQ_PROG_LINE_NUM (1 << 5)
34#define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6)
35#define DISPC_IRQ_GFX_END_WIN (1 << 7)
36#define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8)
37#define DISPC_IRQ_OCP_ERR (1 << 9)
38#define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10)
39#define DISPC_IRQ_VID1_END_WIN (1 << 11)
40#define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12)
41#define DISPC_IRQ_VID2_END_WIN (1 << 13)
42#define DISPC_IRQ_SYNC_LOST (1 << 14)
43#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15)
44#define DISPC_IRQ_WAKEUP (1 << 16)
45
46struct omap_dss_device;
47struct omap_overlay_manager;
48
49enum omap_display_type {
50 OMAP_DISPLAY_TYPE_NONE = 0,
51 OMAP_DISPLAY_TYPE_DPI = 1 << 0,
52 OMAP_DISPLAY_TYPE_DBI = 1 << 1,
53 OMAP_DISPLAY_TYPE_SDI = 1 << 2,
54 OMAP_DISPLAY_TYPE_DSI = 1 << 3,
55 OMAP_DISPLAY_TYPE_VENC = 1 << 4,
56};
57
58enum omap_plane {
59 OMAP_DSS_GFX = 0,
60 OMAP_DSS_VIDEO1 = 1,
61 OMAP_DSS_VIDEO2 = 2
62};
63
64enum omap_channel {
65 OMAP_DSS_CHANNEL_LCD = 0,
66 OMAP_DSS_CHANNEL_DIGIT = 1,
67};
68
69enum omap_color_mode {
70 OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */
71 OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */
72 OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */
73 OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */
74 OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */
75 OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */
76 OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */
77 OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */
78 OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */
79 OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
80 OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
81 OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */
82 OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */
83 OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */
84
85 OMAP_DSS_COLOR_GFX_OMAP2 =
86 OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
87 OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
88 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
89 OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P,
90
91 OMAP_DSS_COLOR_VID_OMAP2 =
92 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
93 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
94 OMAP_DSS_COLOR_UYVY,
95
96 OMAP_DSS_COLOR_GFX_OMAP3 =
97 OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 |
98 OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 |
99 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
100 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
101 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 |
102 OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
103
104 OMAP_DSS_COLOR_VID1_OMAP3 =
105 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 |
106 OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P |
107 OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY,
108
109 OMAP_DSS_COLOR_VID2_OMAP3 =
110 OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 |
111 OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U |
112 OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 |
113 OMAP_DSS_COLOR_UYVY | OMAP_DSS_COLOR_ARGB32 |
114 OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32,
115};
116
117enum omap_lcd_display_type {
118 OMAP_DSS_LCD_DISPLAY_STN,
119 OMAP_DSS_LCD_DISPLAY_TFT,
120};
121
122enum omap_dss_load_mode {
123 OMAP_DSS_LOAD_CLUT_AND_FRAME = 0,
124 OMAP_DSS_LOAD_CLUT_ONLY = 1,
125 OMAP_DSS_LOAD_FRAME_ONLY = 2,
126 OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3,
127};
128
129enum omap_dss_trans_key_type {
130 OMAP_DSS_COLOR_KEY_GFX_DST = 0,
131 OMAP_DSS_COLOR_KEY_VID_SRC = 1,
132};
133
134enum omap_rfbi_te_mode {
135 OMAP_DSS_RFBI_TE_MODE_1 = 1,
136 OMAP_DSS_RFBI_TE_MODE_2 = 2,
137};
138
139enum omap_panel_config {
140 OMAP_DSS_LCD_IVS = 1<<0,
141 OMAP_DSS_LCD_IHS = 1<<1,
142 OMAP_DSS_LCD_IPC = 1<<2,
143 OMAP_DSS_LCD_IEO = 1<<3,
144 OMAP_DSS_LCD_RF = 1<<4,
145 OMAP_DSS_LCD_ONOFF = 1<<5,
146
147 OMAP_DSS_LCD_TFT = 1<<20,
148};
149
150enum omap_dss_venc_type {
151 OMAP_DSS_VENC_TYPE_COMPOSITE,
152 OMAP_DSS_VENC_TYPE_SVIDEO,
153};
154
155enum omap_display_caps {
156 OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0,
157 OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1,
158};
159
160enum omap_dss_update_mode {
161 OMAP_DSS_UPDATE_DISABLED = 0,
162 OMAP_DSS_UPDATE_AUTO,
163 OMAP_DSS_UPDATE_MANUAL,
164};
165
166enum omap_dss_display_state {
167 OMAP_DSS_DISPLAY_DISABLED = 0,
168 OMAP_DSS_DISPLAY_ACTIVE,
169 OMAP_DSS_DISPLAY_SUSPENDED,
170};
171
172/* XXX perhaps this should be removed */
173enum omap_dss_overlay_managers {
174 OMAP_DSS_OVL_MGR_LCD,
175 OMAP_DSS_OVL_MGR_TV,
176};
177
178enum omap_dss_rotation_type {
179 OMAP_DSS_ROT_DMA = 0,
180 OMAP_DSS_ROT_VRFB = 1,
181};
182
183/* clockwise rotation angle */
184enum omap_dss_rotation_angle {
185 OMAP_DSS_ROT_0 = 0,
186 OMAP_DSS_ROT_90 = 1,
187 OMAP_DSS_ROT_180 = 2,
188 OMAP_DSS_ROT_270 = 3,
189};
190
191enum omap_overlay_caps {
192 OMAP_DSS_OVL_CAP_SCALE = 1 << 0,
193 OMAP_DSS_OVL_CAP_DISPC = 1 << 1,
194};
195
196enum omap_overlay_manager_caps {
197 OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0,
198};
199
200/* RFBI */
201
202struct rfbi_timings {
203 int cs_on_time;
204 int cs_off_time;
205 int we_on_time;
206 int we_off_time;
207 int re_on_time;
208 int re_off_time;
209 int we_cycle_time;
210 int re_cycle_time;
211 int cs_pulse_width;
212 int access_time;
213
214 int clk_div;
215
216 u32 tim[5]; /* set by rfbi_convert_timings() */
217
218 int converted;
219};
220
221void omap_rfbi_write_command(const void *buf, u32 len);
222void omap_rfbi_read_data(void *buf, u32 len);
223void omap_rfbi_write_data(const void *buf, u32 len);
224void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
225 u16 x, u16 y,
226 u16 w, u16 h);
227int omap_rfbi_enable_te(bool enable, unsigned line);
228int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
229 unsigned hs_pulse_time, unsigned vs_pulse_time,
230 int hs_pol_inv, int vs_pol_inv, int extif_div);
231
232/* DSI */
233void dsi_bus_lock(void);
234void dsi_bus_unlock(void);
235int dsi_vc_dcs_write(int channel, u8 *data, int len);
236int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len);
237int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen);
238int dsi_vc_set_max_rx_packet_size(int channel, u16 len);
239int dsi_vc_send_null(int channel);
240int dsi_vc_send_bta_sync(int channel);
241
242/* Board specific data */
243struct omap_dss_board_info {
244 int (*get_last_off_on_transaction_id)(struct device *dev);
245 int num_devices;
246 struct omap_dss_device **devices;
247 struct omap_dss_device *default_device;
248};
249
250struct omap_video_timings {
251 /* Unit: pixels */
252 u16 x_res;
253 /* Unit: pixels */
254 u16 y_res;
255 /* Unit: KHz */
256 u32 pixel_clock;
257 /* Unit: pixel clocks */
258 u16 hsw; /* Horizontal synchronization pulse width */
259 /* Unit: pixel clocks */
260 u16 hfp; /* Horizontal front porch */
261 /* Unit: pixel clocks */
262 u16 hbp; /* Horizontal back porch */
263 /* Unit: line clocks */
264 u16 vsw; /* Vertical synchronization pulse width */
265 /* Unit: line clocks */
266 u16 vfp; /* Vertical front porch */
267 /* Unit: line clocks */
268 u16 vbp; /* Vertical back porch */
269};
270
271#ifdef CONFIG_OMAP2_DSS_VENC
272/* Hardcoded timings for tv modes. Venc only uses these to
273 * identify the mode, and does not actually use the configs
274 * itself. However, the configs should be something that
275 * a normal monitor can also show */
276const extern struct omap_video_timings omap_dss_pal_timings;
277const extern struct omap_video_timings omap_dss_ntsc_timings;
278#endif
279
280struct omap_overlay_info {
281 bool enabled;
282
283 u32 paddr;
284 void __iomem *vaddr;
285 u16 screen_width;
286 u16 width;
287 u16 height;
288 enum omap_color_mode color_mode;
289 u8 rotation;
290 enum omap_dss_rotation_type rotation_type;
291 bool mirror;
292
293 u16 pos_x;
294 u16 pos_y;
295 u16 out_width; /* if 0, out_width == width */
296 u16 out_height; /* if 0, out_height == height */
297 u8 global_alpha;
298};
299
300struct omap_overlay {
301 struct kobject kobj;
302 struct list_head list;
303
304 /* static fields */
305 const char *name;
306 int id;
307 enum omap_color_mode supported_modes;
308 enum omap_overlay_caps caps;
309
310 /* dynamic fields */
311 struct omap_overlay_manager *manager;
312 struct omap_overlay_info info;
313
314 /* if true, info has been changed, but not applied() yet */
315 bool info_dirty;
316
317 int (*set_manager)(struct omap_overlay *ovl,
318 struct omap_overlay_manager *mgr);
319 int (*unset_manager)(struct omap_overlay *ovl);
320
321 int (*set_overlay_info)(struct omap_overlay *ovl,
322 struct omap_overlay_info *info);
323 void (*get_overlay_info)(struct omap_overlay *ovl,
324 struct omap_overlay_info *info);
325
326 int (*wait_for_go)(struct omap_overlay *ovl);
327};
328
329struct omap_overlay_manager_info {
330 u32 default_color;
331
332 enum omap_dss_trans_key_type trans_key_type;
333 u32 trans_key;
334 bool trans_enabled;
335
336 bool alpha_enabled;
337};
338
339struct omap_overlay_manager {
340 struct kobject kobj;
341 struct list_head list;
342
343 /* static fields */
344 const char *name;
345 int id;
346 enum omap_overlay_manager_caps caps;
347 int num_overlays;
348 struct omap_overlay **overlays;
349 enum omap_display_type supported_displays;
350
351 /* dynamic fields */
352 struct omap_dss_device *device;
353 struct omap_overlay_manager_info info;
354
355 bool device_changed;
356 /* if true, info has been changed but not applied() yet */
357 bool info_dirty;
358
359 int (*set_device)(struct omap_overlay_manager *mgr,
360 struct omap_dss_device *dssdev);
361 int (*unset_device)(struct omap_overlay_manager *mgr);
362
363 int (*set_manager_info)(struct omap_overlay_manager *mgr,
364 struct omap_overlay_manager_info *info);
365 void (*get_manager_info)(struct omap_overlay_manager *mgr,
366 struct omap_overlay_manager_info *info);
367
368 int (*apply)(struct omap_overlay_manager *mgr);
369 int (*wait_for_go)(struct omap_overlay_manager *mgr);
370};
371
372struct omap_dss_device {
373 struct device dev;
374
375 enum omap_display_type type;
376
377 union {
378 struct {
379 u8 data_lines;
380 } dpi;
381
382 struct {
383 u8 channel;
384 u8 data_lines;
385 } rfbi;
386
387 struct {
388 u8 datapairs;
389 } sdi;
390
391 struct {
392 u8 clk_lane;
393 u8 clk_pol;
394 u8 data1_lane;
395 u8 data1_pol;
396 u8 data2_lane;
397 u8 data2_pol;
398
399 struct {
400 u16 regn;
401 u16 regm;
402 u16 regm3;
403 u16 regm4;
404
405 u16 lp_clk_div;
406
407 u16 lck_div;
408 u16 pck_div;
409 } div;
410
411 bool ext_te;
412 u8 ext_te_gpio;
413 } dsi;
414
415 struct {
416 enum omap_dss_venc_type type;
417 bool invert_polarity;
418 } venc;
419 } phy;
420
421 struct {
422 struct omap_video_timings timings;
423
424 int acbi; /* ac-bias pin transitions per interrupt */
425 /* Unit: line clocks */
426 int acb; /* ac-bias pin frequency */
427
428 enum omap_panel_config config;
429
430 u8 recommended_bpp;
431
432 struct omap_dss_device *ctrl;
433 } panel;
434
435 struct {
436 u8 pixel_size;
437 struct rfbi_timings rfbi_timings;
438 struct omap_dss_device *panel;
439 } ctrl;
440
441 int reset_gpio;
442
443 int max_backlight_level;
444
445 const char *name;
446
447 /* used to match device to driver */
448 const char *driver_name;
449
450 void *data;
451
452 struct omap_dss_driver *driver;
453
454 /* helper variable for driver suspend/resume */
455 bool activate_after_resume;
456
457 enum omap_display_caps caps;
458
459 struct omap_overlay_manager *manager;
460
461 enum omap_dss_display_state state;
462
463 int (*enable)(struct omap_dss_device *dssdev);
464 void (*disable)(struct omap_dss_device *dssdev);
465
466 int (*suspend)(struct omap_dss_device *dssdev);
467 int (*resume)(struct omap_dss_device *dssdev);
468
469 void (*get_resolution)(struct omap_dss_device *dssdev,
470 u16 *xres, u16 *yres);
471 int (*get_recommended_bpp)(struct omap_dss_device *dssdev);
472
473 int (*check_timings)(struct omap_dss_device *dssdev,
474 struct omap_video_timings *timings);
475 void (*set_timings)(struct omap_dss_device *dssdev,
476 struct omap_video_timings *timings);
477 void (*get_timings)(struct omap_dss_device *dssdev,
478 struct omap_video_timings *timings);
479 int (*update)(struct omap_dss_device *dssdev,
480 u16 x, u16 y, u16 w, u16 h);
481 int (*sync)(struct omap_dss_device *dssdev);
482 int (*wait_vsync)(struct omap_dss_device *dssdev);
483
484 int (*set_update_mode)(struct omap_dss_device *dssdev,
485 enum omap_dss_update_mode);
486 enum omap_dss_update_mode (*get_update_mode)
487 (struct omap_dss_device *dssdev);
488
489 int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
490 int (*get_te)(struct omap_dss_device *dssdev);
491
492 u8 (*get_rotate)(struct omap_dss_device *dssdev);
493 int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate);
494
495 bool (*get_mirror)(struct omap_dss_device *dssdev);
496 int (*set_mirror)(struct omap_dss_device *dssdev, bool enable);
497
498 int (*run_test)(struct omap_dss_device *dssdev, int test);
499 int (*memory_read)(struct omap_dss_device *dssdev,
500 void *buf, size_t size,
501 u16 x, u16 y, u16 w, u16 h);
502
503 int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
504 u32 (*get_wss)(struct omap_dss_device *dssdev);
505
506 /* platform specific */
507 int (*platform_enable)(struct omap_dss_device *dssdev);
508 void (*platform_disable)(struct omap_dss_device *dssdev);
509 int (*set_backlight)(struct omap_dss_device *dssdev, int level);
510 int (*get_backlight)(struct omap_dss_device *dssdev);
511};
512
513struct omap_dss_driver {
514 struct device_driver driver;
515
516 int (*probe)(struct omap_dss_device *);
517 void (*remove)(struct omap_dss_device *);
518
519 int (*enable)(struct omap_dss_device *display);
520 void (*disable)(struct omap_dss_device *display);
521 int (*suspend)(struct omap_dss_device *display);
522 int (*resume)(struct omap_dss_device *display);
523 int (*run_test)(struct omap_dss_device *display, int test);
524
525 void (*setup_update)(struct omap_dss_device *dssdev,
526 u16 x, u16 y, u16 w, u16 h);
527
528 int (*enable_te)(struct omap_dss_device *dssdev, bool enable);
529 int (*wait_for_te)(struct omap_dss_device *dssdev);
530
531 u8 (*get_rotate)(struct omap_dss_device *dssdev);
532 int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate);
533
534 bool (*get_mirror)(struct omap_dss_device *dssdev);
535 int (*set_mirror)(struct omap_dss_device *dssdev, bool enable);
536
537 int (*memory_read)(struct omap_dss_device *dssdev,
538 void *buf, size_t size,
539 u16 x, u16 y, u16 w, u16 h);
540};
541
542int omap_dss_register_driver(struct omap_dss_driver *);
543void omap_dss_unregister_driver(struct omap_dss_driver *);
544
545int omap_dss_register_device(struct omap_dss_device *);
546void omap_dss_unregister_device(struct omap_dss_device *);
547
548void omap_dss_get_device(struct omap_dss_device *dssdev);
549void omap_dss_put_device(struct omap_dss_device *dssdev);
550#define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL)
551struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from);
552struct omap_dss_device *omap_dss_find_device(void *data,
553 int (*match)(struct omap_dss_device *dssdev, void *data));
554
555int omap_dss_start_device(struct omap_dss_device *dssdev);
556void omap_dss_stop_device(struct omap_dss_device *dssdev);
557
558int omap_dss_get_num_overlay_managers(void);
559struct omap_overlay_manager *omap_dss_get_overlay_manager(int num);
560
561int omap_dss_get_num_overlays(void);
562struct omap_overlay *omap_dss_get_overlay(int num);
563
564typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
565int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
566int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
567
568int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
569int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
570 unsigned long timeout);
571
572#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
573#define to_dss_device(x) container_of((x), struct omap_dss_device, dev)
574
575#endif
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index 1c017b29b7e9..4ede9e17a0be 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -401,33 +401,6 @@
401 401
402/*----------------------------------------------------------------------------*/ 402/*----------------------------------------------------------------------------*/
403 403
404/* Hardware registers for LCD DMA */
405#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
406#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
407#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
408#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
409#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
410#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
411
412#define OMAP1610_DMA_LCD_BASE (0xfffee300)
413#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
414#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
415#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
416#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
417#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
418#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
419#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
420#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
421#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
422#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
423#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
424#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
425#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
426#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
427#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
428#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
429#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
430
431#define OMAP1_DMA_TOUT_IRQ (1 << 0) 404#define OMAP1_DMA_TOUT_IRQ (1 << 0)
432#define OMAP_DMA_DROP_IRQ (1 << 1) 405#define OMAP_DMA_DROP_IRQ (1 << 1)
433#define OMAP_DMA_HALF_IRQ (1 << 2) 406#define OMAP_DMA_HALF_IRQ (1 << 2)
@@ -441,6 +414,8 @@
441#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10) 414#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
442#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) 415#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
443 416
417#define OMAP_DMA_CCR_EN (1 << 7)
418
444#define OMAP_DMA_DATA_TYPE_S8 0x00 419#define OMAP_DMA_DATA_TYPE_S8 0x00
445#define OMAP_DMA_DATA_TYPE_S16 0x01 420#define OMAP_DMA_DATA_TYPE_S16 0x01
446#define OMAP_DMA_DATA_TYPE_S32 0x02 421#define OMAP_DMA_DATA_TYPE_S32 0x02
@@ -503,14 +478,6 @@
503#define DMA_CH_PRIO_HIGH 0x1 478#define DMA_CH_PRIO_HIGH 0x1
504#define DMA_CH_PRIO_LOW 0x0 /* Def */ 479#define DMA_CH_PRIO_LOW 0x0 /* Def */
505 480
506/* LCD DMA block numbers */
507enum {
508 OMAP_LCD_DMA_B1_TOP,
509 OMAP_LCD_DMA_B1_BOTTOM,
510 OMAP_LCD_DMA_B2_TOP,
511 OMAP_LCD_DMA_B2_BOTTOM
512};
513
514enum omap_dma_burst_mode { 481enum omap_dma_burst_mode {
515 OMAP_DMA_DATA_BURST_DIS = 0, 482 OMAP_DMA_DATA_BURST_DIS = 0,
516 OMAP_DMA_DATA_BURST_4, 483 OMAP_DMA_DATA_BURST_4,
@@ -661,20 +628,13 @@ extern int omap_modify_dma_chain_params(int chain_id,
661extern int omap_dma_chain_status(int chain_id); 628extern int omap_dma_chain_status(int chain_id);
662#endif 629#endif
663 630
664/* LCD DMA functions */ 631#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP)
665extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data), 632#include <mach/lcd_dma.h>
666 void *data); 633#else
667extern void omap_free_lcd_dma(void); 634static inline int omap_lcd_dma_running(void)
668extern void omap_setup_lcd_dma(void); 635{
669extern void omap_enable_lcd_dma(void); 636 return 0;
670extern void omap_stop_lcd_dma(void); 637}
671extern void omap_set_lcd_dma_ext_controller(int external); 638#endif
672extern void omap_set_lcd_dma_single_transfer(int single);
673extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
674 int data_type);
675extern void omap_set_lcd_dma_b1_rotation(int rotate);
676extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
677extern void omap_set_lcd_dma_b1_mirror(int mirror);
678extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
679 639
680#endif /* __ASM_ARCH_DMA_H */ 640#endif /* __ASM_ARCH_DMA_H */
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index 696e0ca051b7..e081338e0b23 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -45,7 +45,7 @@
45#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) 45#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1)
46#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) 46#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10)
47#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) 47#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0)
48#define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1) 48#define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(2)
49#define GPMC_CONFIG1_MUXADDDATA (1 << 9) 49#define GPMC_CONFIG1_MUXADDDATA (1 << 9)
50#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) 50#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4)
51#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) 51#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3)
diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h
new file mode 100644
index 000000000000..585d9ca68b97
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/i2c.h
@@ -0,0 +1,39 @@
1/*
2 * Helper module for board specific I2C bus registration
3 *
4 * Copyright (C) 2009 Nokia Corporation.
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 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * 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 St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 */
21
22#include <linux/i2c.h>
23
24#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
25extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
26 struct i2c_board_info const *info,
27 unsigned len);
28#else
29static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
30 struct i2c_board_info const *info,
31 unsigned len)
32{
33 return 0;
34}
35#endif
36
37int omap_plat_register_i2c_bus(int bus_id, u32 clkrate,
38 struct i2c_board_info const *info,
39 unsigned len);
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index ce5dd2d1dc21..97d6c50c3dcb 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -472,8 +472,22 @@
472#endif 472#endif
473#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS) 473#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS)
474 474
475#define TWL6030_IRQ_BASE (OMAP_FPGA_IRQ_END)
476#ifdef CONFIG_TWL4030_CORE
477#define TWL6030_BASE_NR_IRQS 20
478#else
479#define TWL6030_BASE_NR_IRQS 0
480#endif
481#define TWL6030_IRQ_END (TWL6030_IRQ_BASE + TWL6030_BASE_NR_IRQS)
482
475/* Total number of interrupts depends on the enabled blocks above */ 483/* Total number of interrupts depends on the enabled blocks above */
476#define NR_IRQS TWL4030_GPIO_IRQ_END 484#if (TWL4030_GPIO_IRQ_END > TWL6030_IRQ_END)
485#define TWL_IRQ_END TWL4030_GPIO_IRQ_END
486#else
487#define TWL_IRQ_END TWL6030_IRQ_END
488#endif
489
490#define NR_IRQS TWL_IRQ_END
477 491
478#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) 492#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
479 493
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h
index ba77de601501..8f069cc80350 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -130,58 +130,11 @@
130#define OMAP2_PULL_UP (1 << 4) 130#define OMAP2_PULL_UP (1 << 4)
131#define OMAP2_ALTELECTRICALSEL (1 << 5) 131#define OMAP2_ALTELECTRICALSEL (1 << 5)
132 132
133/* 34xx specific mux bit defines */
134#define OMAP3_INPUT_EN (1 << 8)
135#define OMAP3_OFF_EN (1 << 9)
136#define OMAP3_OFFOUT_EN (1 << 10)
137#define OMAP3_OFFOUT_VAL (1 << 11)
138#define OMAP3_OFF_PULL_EN (1 << 12)
139#define OMAP3_OFF_PULL_UP (1 << 13)
140#define OMAP3_WAKEUP_EN (1 << 14)
141
142/* 34xx mux mode options for each pin. See TRM for options */
143#define OMAP34XX_MUX_MODE0 0
144#define OMAP34XX_MUX_MODE1 1
145#define OMAP34XX_MUX_MODE2 2
146#define OMAP34XX_MUX_MODE3 3
147#define OMAP34XX_MUX_MODE4 4
148#define OMAP34XX_MUX_MODE5 5
149#define OMAP34XX_MUX_MODE6 6
150#define OMAP34XX_MUX_MODE7 7
151
152/* 34xx active pin states */
153#define OMAP34XX_PIN_OUTPUT 0
154#define OMAP34XX_PIN_INPUT OMAP3_INPUT_EN
155#define OMAP34XX_PIN_INPUT_PULLUP (OMAP2_PULL_ENA | OMAP3_INPUT_EN \
156 | OMAP2_PULL_UP)
157#define OMAP34XX_PIN_INPUT_PULLDOWN (OMAP2_PULL_ENA | OMAP3_INPUT_EN)
158
159/* 34xx off mode states */
160#define OMAP34XX_PIN_OFF_NONE 0
161#define OMAP34XX_PIN_OFF_OUTPUT_HIGH (OMAP3_OFF_EN | OMAP3_OFFOUT_EN \
162 | OMAP3_OFFOUT_VAL)
163#define OMAP34XX_PIN_OFF_OUTPUT_LOW (OMAP3_OFF_EN | OMAP3_OFFOUT_EN)
164#define OMAP34XX_PIN_OFF_INPUT_PULLUP (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN \
165 | OMAP3_OFF_PULL_UP)
166#define OMAP34XX_PIN_OFF_INPUT_PULLDOWN (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN)
167#define OMAP34XX_PIN_OFF_WAKEUPENABLE OMAP3_WAKEUP_EN
168
169#define MUX_CFG_34XX(desc, reg_offset, mux_value) { \
170 .name = desc, \
171 .debug = 0, \
172 .mux_reg = reg_offset, \
173 .mux_val = mux_value \
174},
175
176struct pin_config { 133struct pin_config {
177 char *name; 134 char *name;
178 const unsigned int mux_reg; 135 const unsigned int mux_reg;
179 unsigned char debug; 136 unsigned char debug;
180 137
181#if defined(CONFIG_ARCH_OMAP34XX)
182 u16 mux_val; /* Wake-up, off mode, pull, mux mode */
183#endif
184
185#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX) 138#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX)
186 const unsigned char mask_offset; 139 const unsigned char mask_offset;
187 const unsigned char mask; 140 const unsigned char mask;
@@ -219,11 +172,17 @@ enum omap7xx_index {
219 AA17_7XX_USB_DM, 172 AA17_7XX_USB_DM,
220 W16_7XX_USB_PU_EN, 173 W16_7XX_USB_PU_EN,
221 W17_7XX_USB_VBUSI, 174 W17_7XX_USB_VBUSI,
175 W18_7XX_USB_DMCK_OUT,
176 W19_7XX_USB_DCRST,
222 177
223 /* MMC */ 178 /* MMC */
224 MMC_7XX_CMD, 179 MMC_7XX_CMD,
225 MMC_7XX_CLK, 180 MMC_7XX_CLK,
226 MMC_7XX_DAT0, 181 MMC_7XX_DAT0,
182
183 /* I2C */
184 I2C_7XX_SCL,
185 I2C_7XX_SDA,
227}; 186};
228 187
229enum omap1xxx_index { 188enum omap1xxx_index {
@@ -681,181 +640,6 @@ enum omap24xx_index {
681 640
682}; 641};
683 642
684enum omap34xx_index {
685 /* 34xx I2C */
686 K21_34XX_I2C1_SCL,
687 J21_34XX_I2C1_SDA,
688 AF15_34XX_I2C2_SCL,
689 AE15_34XX_I2C2_SDA,
690 AF14_34XX_I2C3_SCL,
691 AG14_34XX_I2C3_SDA,
692 AD26_34XX_I2C4_SCL,
693 AE26_34XX_I2C4_SDA,
694
695 /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/
696 Y8_3430_USB1HS_PHY_CLK,
697 Y9_3430_USB1HS_PHY_STP,
698 AA14_3430_USB1HS_PHY_DIR,
699 AA11_3430_USB1HS_PHY_NXT,
700 W13_3430_USB1HS_PHY_DATA0,
701 W12_3430_USB1HS_PHY_DATA1,
702 W11_3430_USB1HS_PHY_DATA2,
703 Y11_3430_USB1HS_PHY_DATA3,
704 W9_3430_USB1HS_PHY_DATA4,
705 Y12_3430_USB1HS_PHY_DATA5,
706 W8_3430_USB1HS_PHY_DATA6,
707 Y13_3430_USB1HS_PHY_DATA7,
708
709 /* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/
710 AA8_3430_USB2HS_PHY_CLK,
711 AA10_3430_USB2HS_PHY_STP,
712 AA9_3430_USB2HS_PHY_DIR,
713 AB11_3430_USB2HS_PHY_NXT,
714 AB10_3430_USB2HS_PHY_DATA0,
715 AB9_3430_USB2HS_PHY_DATA1,
716 W3_3430_USB2HS_PHY_DATA2,
717 T4_3430_USB2HS_PHY_DATA3,
718 T3_3430_USB2HS_PHY_DATA4,
719 R3_3430_USB2HS_PHY_DATA5,
720 R4_3430_USB2HS_PHY_DATA6,
721 T2_3430_USB2HS_PHY_DATA7,
722
723
724 /* TLL - HSUSB: 12-pin TLL Port 1*/
725 Y8_3430_USB1HS_TLL_CLK,
726 Y9_3430_USB1HS_TLL_STP,
727 AA14_3430_USB1HS_TLL_DIR,
728 AA11_3430_USB1HS_TLL_NXT,
729 W13_3430_USB1HS_TLL_DATA0,
730 W12_3430_USB1HS_TLL_DATA1,
731 W11_3430_USB1HS_TLL_DATA2,
732 Y11_3430_USB1HS_TLL_DATA3,
733 W9_3430_USB1HS_TLL_DATA4,
734 Y12_3430_USB1HS_TLL_DATA5,
735 W8_3430_USB1HS_TLL_DATA6,
736 Y13_3430_USB1HS_TLL_DATA7,
737
738 /* TLL - HSUSB: 12-pin TLL Port 2*/
739 AA8_3430_USB2HS_TLL_CLK,
740 AA10_3430_USB2HS_TLL_STP,
741 AA9_3430_USB2HS_TLL_DIR,
742 AB11_3430_USB2HS_TLL_NXT,
743 AB10_3430_USB2HS_TLL_DATA0,
744 AB9_3430_USB2HS_TLL_DATA1,
745 W3_3430_USB2HS_TLL_DATA2,
746 T4_3430_USB2HS_TLL_DATA3,
747 T3_3430_USB2HS_TLL_DATA4,
748 R3_3430_USB2HS_TLL_DATA5,
749 R4_3430_USB2HS_TLL_DATA6,
750 T2_3430_USB2HS_TLL_DATA7,
751
752 /* TLL - HSUSB: 12-pin TLL Port 3*/
753 AA6_3430_USB3HS_TLL_CLK,
754 AB3_3430_USB3HS_TLL_STP,
755 AA3_3430_USB3HS_TLL_DIR,
756 Y3_3430_USB3HS_TLL_NXT,
757 AA5_3430_USB3HS_TLL_DATA0,
758 Y4_3430_USB3HS_TLL_DATA1,
759 Y5_3430_USB3HS_TLL_DATA2,
760 W5_3430_USB3HS_TLL_DATA3,
761 AB12_3430_USB3HS_TLL_DATA4,
762 AB13_3430_USB3HS_TLL_DATA5,
763 AA13_3430_USB3HS_TLL_DATA6,
764 AA12_3430_USB3HS_TLL_DATA7,
765
766 /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */
767 AF10_3430_USB1FS_PHY_MM1_RXDP,
768 AG9_3430_USB1FS_PHY_MM1_RXDM,
769 W13_3430_USB1FS_PHY_MM1_RXRCV,
770 W12_3430_USB1FS_PHY_MM1_TXSE0,
771 W11_3430_USB1FS_PHY_MM1_TXDAT,
772 Y11_3430_USB1FS_PHY_MM1_TXEN_N,
773
774 /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */
775 AF7_3430_USB2FS_PHY_MM2_RXDP,
776 AH7_3430_USB2FS_PHY_MM2_RXDM,
777 AB10_3430_USB2FS_PHY_MM2_RXRCV,
778 AB9_3430_USB2FS_PHY_MM2_TXSE0,
779 W3_3430_USB2FS_PHY_MM2_TXDAT,
780 T4_3430_USB2FS_PHY_MM2_TXEN_N,
781
782 /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */
783 AH3_3430_USB3FS_PHY_MM3_RXDP,
784 AE3_3430_USB3FS_PHY_MM3_RXDM,
785 AD1_3430_USB3FS_PHY_MM3_RXRCV,
786 AE1_3430_USB3FS_PHY_MM3_TXSE0,
787 AD2_3430_USB3FS_PHY_MM3_TXDAT,
788 AC1_3430_USB3FS_PHY_MM3_TXEN_N,
789
790 /* 34xx GPIO
791 * - normally these are bidirectional, no internal pullup/pulldown
792 * - "_UP" suffix (GPIO3_UP) if internal pullup is configured
793 * - "_DOWN" suffix (GPIO3_DOWN) with internal pulldown
794 * - "_OUT" suffix (GPIO3_OUT) for output-only pins (unlike 24xx)
795 */
796 AF26_34XX_GPIO0,
797 AF22_34XX_GPIO9,
798 AG9_34XX_GPIO23,
799 AH8_34XX_GPIO29,
800 U8_34XX_GPIO54_OUT,
801 U8_34XX_GPIO54_DOWN,
802 L8_34XX_GPIO63,
803 G25_34XX_GPIO86_OUT,
804 AG4_34XX_GPIO134_OUT,
805 AF4_34XX_GPIO135_OUT,
806 AE4_34XX_GPIO136_OUT,
807 AF6_34XX_GPIO140_UP,
808 AE6_34XX_GPIO141,
809 AF5_34XX_GPIO142,
810 AE5_34XX_GPIO143,
811 H19_34XX_GPIO164_OUT,
812 J25_34XX_GPIO170,
813
814 /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */
815 H16_34XX_SDRC_CKE0,
816 H17_34XX_SDRC_CKE1,
817
818 /* MMC1 */
819 N28_3430_MMC1_CLK,
820 M27_3430_MMC1_CMD,
821 N27_3430_MMC1_DAT0,
822 N26_3430_MMC1_DAT1,
823 N25_3430_MMC1_DAT2,
824 P28_3430_MMC1_DAT3,
825 P27_3430_MMC1_DAT4,
826 P26_3430_MMC1_DAT5,
827 R27_3430_MMC1_DAT6,
828 R25_3430_MMC1_DAT7,
829
830 /* MMC2 */
831 AE2_3430_MMC2_CLK,
832 AG5_3430_MMC2_CMD,
833 AH5_3430_MMC2_DAT0,
834 AH4_3430_MMC2_DAT1,
835 AG4_3430_MMC2_DAT2,
836 AF4_3430_MMC2_DAT3,
837 AE4_3430_MMC2_DAT4,
838 AH3_3430_MMC2_DAT5,
839 AF3_3430_MMC2_DAT6,
840 AE3_3430_MMC2_DAT7,
841
842 /* MMC3 */
843 AF10_3430_MMC3_CLK,
844 AC3_3430_MMC3_CMD,
845 AE11_3430_MMC3_DAT0,
846 AH9_3430_MMC3_DAT1,
847 AF13_3430_MMC3_DAT2,
848 AF13_3430_MMC3_DAT3,
849
850 /* SYS_NIRQ T2 INT1 */
851 AF26_34XX_SYS_NIRQ,
852
853 /* EHCI GPIO's for OMAP3EVM (Rev >= E) */
854 AH14_34XX_GPIO21,
855 AF9_34XX_GPIO22,
856 U3_34XX_GPIO61,
857};
858
859struct omap_mux_cfg { 643struct omap_mux_cfg {
860 struct pin_config *pins; 644 struct pin_config *pins;
861 unsigned long size; 645 unsigned long size;
@@ -865,14 +649,14 @@ struct omap_mux_cfg {
865#ifdef CONFIG_OMAP_MUX 649#ifdef CONFIG_OMAP_MUX
866/* setup pin muxing in Linux */ 650/* setup pin muxing in Linux */
867extern int omap1_mux_init(void); 651extern int omap1_mux_init(void);
868extern int omap2_mux_init(void);
869extern int omap_mux_register(struct omap_mux_cfg *); 652extern int omap_mux_register(struct omap_mux_cfg *);
870extern int omap_cfg_reg(unsigned long reg_cfg); 653extern int omap_cfg_reg(unsigned long reg_cfg);
871#else 654#else
872/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ 655/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
873static inline int omap1_mux_init(void) { return 0; } 656static inline int omap1_mux_init(void) { return 0; }
874static inline int omap2_mux_init(void) { return 0; }
875static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } 657static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
876#endif 658#endif
877 659
660extern int omap2_mux_init(void);
661
878#endif 662#endif
diff --git a/arch/arm/plat-omap/include/plat/omap16xx.h b/arch/arm/plat-omap/include/plat/omap16xx.h
index 0e69b504c25f..7560b4d583a3 100644
--- a/arch/arm/plat-omap/include/plat/omap16xx.h
+++ b/arch/arm/plat-omap/include/plat/omap16xx.h
@@ -124,7 +124,7 @@
124#define TIPB_SWITCH_BASE (0xfffbc800) 124#define TIPB_SWITCH_BASE (0xfffbc800)
125#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) 125#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160)
126 126
127/* UART3 Registers Maping through MPU bus */ 127/* UART3 Registers Mapping through MPU bus */
128#define UART3_RHR (OMAP_UART3_BASE + 0) 128#define UART3_RHR (OMAP_UART3_BASE + 0)
129#define UART3_THR (OMAP_UART3_BASE + 0) 129#define UART3_THR (OMAP_UART3_BASE + 0)
130#define UART3_DLL (OMAP_UART3_BASE + 0) 130#define UART3_DLL (OMAP_UART3_BASE + 0)
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h
index e52902a15c1a..ef870de43c29 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -26,8 +26,10 @@
26#define OMAP44XX_EMIF2_BASE 0x4d000000 26#define OMAP44XX_EMIF2_BASE 0x4d000000
27#define OMAP44XX_DMM_BASE 0x4e000000 27#define OMAP44XX_DMM_BASE 0x4e000000
28#define OMAP4430_32KSYNCT_BASE 0x4a304000 28#define OMAP4430_32KSYNCT_BASE 0x4a304000
29#define OMAP4430_CM_BASE 0x4a004000 29#define OMAP4430_CM1_BASE 0x4a004000
30#define OMAP4430_PRM_BASE 0x48306000 30#define OMAP4430_CM_BASE OMAP4430_CM1_BASE
31#define OMAP4430_CM2_BASE 0x4a008000
32#define OMAP4430_PRM_BASE 0x4a306000
31#define OMAP44XX_GPMC_BASE 0x50000000 33#define OMAP44XX_GPMC_BASE 0x50000000
32#define OMAP443X_SCM_BASE 0x4a002000 34#define OMAP443X_SCM_BASE 0x4a002000
33#define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE 35#define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 11a9773a4e7f..dc1fac1d805c 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -50,8 +50,8 @@
50 * @pm_lats: ptr to an omap_device_pm_latency table 50 * @pm_lats: ptr to an omap_device_pm_latency table
51 * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats 51 * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats
52 * @pm_lat_level: array index of the last odpl entry executed - -1 if never 52 * @pm_lat_level: array index of the last odpl entry executed - -1 if never
53 * @dev_wakeup_lat: dev wakeup latency in microseconds 53 * @dev_wakeup_lat: dev wakeup latency in nanoseconds
54 * @_dev_wakeup_lat_limit: dev wakeup latency limit in usec - set by OMAP PM 54 * @_dev_wakeup_lat_limit: dev wakeup latency limit in nsec - set by OMAP PM
55 * @_state: one of OMAP_DEVICE_STATE_* (see above) 55 * @_state: one of OMAP_DEVICE_STATE_* (see above)
56 * @flags: device flags 56 * @flags: device flags
57 * 57 *
@@ -137,5 +137,7 @@ struct omap_device_pm_latency {
137}; 137};
138 138
139 139
140#endif 140/* Get omap_device pointer from platform_device pointer */
141#define to_omap_device(x) container_of((x), struct omap_device, pdev)
141 142
143#endif
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index dbdd123eca16..007935a921ea 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -50,6 +50,8 @@ struct omap_device;
50#define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) 50#define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT)
51#define SYSC_SOFTRESET_SHIFT 1 51#define SYSC_SOFTRESET_SHIFT 1
52#define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) 52#define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT)
53#define SYSC_AUTOIDLE_SHIFT 0
54#define SYSC_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT)
53 55
54/* OCP SYSSTATUS bit shifts/masks */ 56/* OCP SYSSTATUS bit shifts/masks */
55#define SYSS_RESETDONE_SHIFT 0 57#define SYSS_RESETDONE_SHIFT 0
@@ -62,7 +64,21 @@ struct omap_device;
62 64
63 65
64/** 66/**
65 * struct omap_hwmod_dma_info - MPU address space handled by the hwmod 67 * struct omap_hwmod_irq_info - MPU IRQs used by the hwmod
68 * @name: name of the IRQ channel (module local name)
69 * @irq_ch: IRQ channel ID
70 *
71 * @name should be something short, e.g., "tx" or "rx". It is for use
72 * by platform_get_resource_byname(). It is defined locally to the
73 * hwmod.
74 */
75struct omap_hwmod_irq_info {
76 const char *name;
77 u16 irq;
78};
79
80/**
81 * struct omap_hwmod_dma_info - DMA channels used by the hwmod
66 * @name: name of the DMA channel (module local name) 82 * @name: name of the DMA channel (module local name)
67 * @dma_ch: DMA channel ID 83 * @dma_ch: DMA channel ID
68 * 84 *
@@ -294,13 +310,17 @@ struct omap_hwmod_omap4_prcm {
294 * SDRAM controller, etc. 310 * SDRAM controller, etc.
295 * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM 311 * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM
296 * controller, etc. 312 * controller, etc.
313 * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE)
314 * when module is enabled, rather than the default, which is to
315 * enable autoidle
297 * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup 316 * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup
298 */ 317 */
299#define HWMOD_SWSUP_SIDLE (1 << 0) 318#define HWMOD_SWSUP_SIDLE (1 << 0)
300#define HWMOD_SWSUP_MSTANDBY (1 << 1) 319#define HWMOD_SWSUP_MSTANDBY (1 << 1)
301#define HWMOD_INIT_NO_RESET (1 << 2) 320#define HWMOD_INIT_NO_RESET (1 << 2)
302#define HWMOD_INIT_NO_IDLE (1 << 3) 321#define HWMOD_INIT_NO_IDLE (1 << 3)
303#define HWMOD_SET_DEFAULT_CLOCKACT (1 << 4) 322#define HWMOD_NO_OCP_AUTOIDLE (1 << 4)
323#define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5)
304 324
305/* 325/*
306 * omap_hwmod._int_flags definitions 326 * omap_hwmod._int_flags definitions
@@ -373,7 +393,7 @@ struct omap_hwmod_omap4_prcm {
373struct omap_hwmod { 393struct omap_hwmod {
374 const char *name; 394 const char *name;
375 struct omap_device *od; 395 struct omap_device *od;
376 u8 *mpu_irqs; 396 struct omap_hwmod_irq_info *mpu_irqs;
377 struct omap_hwmod_dma_info *sdma_chs; 397 struct omap_hwmod_dma_info *sdma_chs;
378 union { 398 union {
379 struct omap_hwmod_omap2_prcm omap2; 399 struct omap_hwmod_omap2_prcm omap2;
diff --git a/arch/arm/plat-omap/include/plat/omapfb.h b/arch/arm/plat-omap/include/plat/omapfb.h
deleted file mode 100644
index bfef7ab95f17..000000000000
--- a/arch/arm/plat-omap/include/plat/omapfb.h
+++ /dev/null
@@ -1,398 +0,0 @@
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_WINDOW_ROTATE 0x00080000
66#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
67
68/* Values from DSP must map to lower 16-bits */
69#define OMAPFB_FORMAT_MASK 0x00ff
70#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
71#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
72#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
73#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
74#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
75
76#define OMAPFB_EVENT_READY 1
77#define OMAPFB_EVENT_DISABLED 2
78
79#define OMAPFB_MEMTYPE_SDRAM 0
80#define OMAPFB_MEMTYPE_SRAM 1
81#define OMAPFB_MEMTYPE_MAX 1
82
83enum omapfb_color_format {
84 OMAPFB_COLOR_RGB565 = 0,
85 OMAPFB_COLOR_YUV422,
86 OMAPFB_COLOR_YUV420,
87 OMAPFB_COLOR_CLUT_8BPP,
88 OMAPFB_COLOR_CLUT_4BPP,
89 OMAPFB_COLOR_CLUT_2BPP,
90 OMAPFB_COLOR_CLUT_1BPP,
91 OMAPFB_COLOR_RGB444,
92 OMAPFB_COLOR_YUY422,
93};
94
95struct omapfb_update_window {
96 __u32 x, y;
97 __u32 width, height;
98 __u32 format;
99 __u32 out_x, out_y;
100 __u32 out_width, out_height;
101 __u32 reserved[8];
102};
103
104struct omapfb_update_window_old {
105 __u32 x, y;
106 __u32 width, height;
107 __u32 format;
108};
109
110enum omapfb_plane {
111 OMAPFB_PLANE_GFX = 0,
112 OMAPFB_PLANE_VID1,
113 OMAPFB_PLANE_VID2,
114};
115
116enum omapfb_channel_out {
117 OMAPFB_CHANNEL_OUT_LCD = 0,
118 OMAPFB_CHANNEL_OUT_DIGIT,
119};
120
121struct omapfb_plane_info {
122 __u32 pos_x;
123 __u32 pos_y;
124 __u8 enabled;
125 __u8 channel_out;
126 __u8 mirror;
127 __u8 reserved1;
128 __u32 out_width;
129 __u32 out_height;
130 __u32 reserved2[12];
131};
132
133struct omapfb_mem_info {
134 __u32 size;
135 __u8 type;
136 __u8 reserved[3];
137};
138
139struct omapfb_caps {
140 __u32 ctrl;
141 __u32 plane_color;
142 __u32 wnd_color;
143};
144
145enum omapfb_color_key_type {
146 OMAPFB_COLOR_KEY_DISABLED = 0,
147 OMAPFB_COLOR_KEY_GFX_DST,
148 OMAPFB_COLOR_KEY_VID_SRC,
149};
150
151struct omapfb_color_key {
152 __u8 channel_out;
153 __u32 background;
154 __u32 trans_key;
155 __u8 key_type;
156};
157
158enum omapfb_update_mode {
159 OMAPFB_UPDATE_DISABLED = 0,
160 OMAPFB_AUTO_UPDATE,
161 OMAPFB_MANUAL_UPDATE
162};
163
164#ifdef __KERNEL__
165
166#include <linux/completion.h>
167#include <linux/interrupt.h>
168#include <linux/fb.h>
169#include <linux/mutex.h>
170
171#include <plat/board.h>
172
173#define OMAP_LCDC_INV_VSYNC 0x0001
174#define OMAP_LCDC_INV_HSYNC 0x0002
175#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
176#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
177#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
178#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
179
180#define OMAP_LCDC_SIGNAL_MASK 0x003f
181
182#define OMAP_LCDC_PANEL_TFT 0x0100
183
184#define OMAPFB_PLANE_XRES_MIN 8
185#define OMAPFB_PLANE_YRES_MIN 8
186
187#ifdef CONFIG_ARCH_OMAP1
188#define OMAPFB_PLANE_NUM 1
189#else
190#define OMAPFB_PLANE_NUM 3
191#endif
192
193struct omapfb_device;
194
195struct lcd_panel {
196 const char *name;
197 int config; /* TFT/STN, signal inversion */
198 int bpp; /* Pixel format in fb mem */
199 int data_lines; /* Lines on LCD HW interface */
200
201 int x_res, y_res;
202 int pixel_clock; /* In kHz */
203 int hsw; /* Horizontal synchronization
204 pulse width */
205 int hfp; /* Horizontal front porch */
206 int hbp; /* Horizontal back porch */
207 int vsw; /* Vertical synchronization
208 pulse width */
209 int vfp; /* Vertical front porch */
210 int vbp; /* Vertical back porch */
211 int acb; /* ac-bias pin frequency */
212 int pcd; /* pixel clock divider.
213 Obsolete use pixel_clock instead */
214
215 int (*init) (struct lcd_panel *panel,
216 struct omapfb_device *fbdev);
217 void (*cleanup) (struct lcd_panel *panel);
218 int (*enable) (struct lcd_panel *panel);
219 void (*disable) (struct lcd_panel *panel);
220 unsigned long (*get_caps) (struct lcd_panel *panel);
221 int (*set_bklight_level)(struct lcd_panel *panel,
222 unsigned int level);
223 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
224 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
225 int (*run_test) (struct lcd_panel *panel, int test_num);
226};
227
228struct extif_timings {
229 int cs_on_time;
230 int cs_off_time;
231 int we_on_time;
232 int we_off_time;
233 int re_on_time;
234 int re_off_time;
235 int we_cycle_time;
236 int re_cycle_time;
237 int cs_pulse_width;
238 int access_time;
239
240 int clk_div;
241
242 u32 tim[5]; /* set by extif->convert_timings */
243
244 int converted;
245};
246
247struct lcd_ctrl_extif {
248 int (*init) (struct omapfb_device *fbdev);
249 void (*cleanup) (void);
250 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
251 unsigned long (*get_max_tx_rate)(void);
252 int (*convert_timings) (struct extif_timings *timings);
253 void (*set_timings) (const struct extif_timings *timings);
254 void (*set_bits_per_cycle)(int bpc);
255 void (*write_command) (const void *buf, unsigned int len);
256 void (*read_data) (void *buf, unsigned int len);
257 void (*write_data) (const void *buf, unsigned int len);
258 void (*transfer_area) (int width, int height,
259 void (callback)(void * data), void *data);
260 int (*setup_tearsync) (unsigned pin_cnt,
261 unsigned hs_pulse_time, unsigned vs_pulse_time,
262 int hs_pol_inv, int vs_pol_inv, int div);
263 int (*enable_tearsync) (int enable, unsigned line);
264
265 unsigned long max_transmit_size;
266};
267
268struct omapfb_notifier_block {
269 struct notifier_block nb;
270 void *data;
271 int plane_idx;
272};
273
274typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
275 unsigned long event,
276 void *fbi);
277
278struct omapfb_mem_region {
279 u32 paddr;
280 void __iomem *vaddr;
281 unsigned long size;
282 u8 type; /* OMAPFB_PLANE_MEM_* */
283 unsigned alloc:1; /* allocated by the driver */
284 unsigned map:1; /* kernel mapped by the driver */
285};
286
287struct omapfb_mem_desc {
288 int region_cnt;
289 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
290};
291
292struct lcd_ctrl {
293 const char *name;
294 void *data;
295
296 int (*init) (struct omapfb_device *fbdev,
297 int ext_mode,
298 struct omapfb_mem_desc *req_md);
299 void (*cleanup) (void);
300 void (*bind_client) (struct omapfb_notifier_block *nb);
301 void (*get_caps) (int plane, struct omapfb_caps *caps);
302 int (*set_update_mode)(enum omapfb_update_mode mode);
303 enum omapfb_update_mode (*get_update_mode)(void);
304 int (*setup_plane) (int plane, int channel_out,
305 unsigned long offset,
306 int screen_width,
307 int pos_x, int pos_y, int width,
308 int height, int color_mode);
309 int (*set_rotate) (int angle);
310 int (*setup_mem) (int plane, size_t size,
311 int mem_type, unsigned long *paddr);
312 int (*mmap) (struct fb_info *info,
313 struct vm_area_struct *vma);
314 int (*set_scale) (int plane,
315 int orig_width, int orig_height,
316 int out_width, int out_height);
317 int (*enable_plane) (int plane, int enable);
318 int (*update_window) (struct fb_info *fbi,
319 struct omapfb_update_window *win,
320 void (*callback)(void *),
321 void *callback_data);
322 void (*sync) (void);
323 void (*suspend) (void);
324 void (*resume) (void);
325 int (*run_test) (int test_num);
326 int (*setcolreg) (u_int regno, u16 red, u16 green,
327 u16 blue, u16 transp,
328 int update_hw_mem);
329 int (*set_color_key) (struct omapfb_color_key *ck);
330 int (*get_color_key) (struct omapfb_color_key *ck);
331};
332
333enum omapfb_state {
334 OMAPFB_DISABLED = 0,
335 OMAPFB_SUSPENDED= 99,
336 OMAPFB_ACTIVE = 100
337};
338
339struct omapfb_plane_struct {
340 int idx;
341 struct omapfb_plane_info info;
342 enum omapfb_color_format color_mode;
343 struct omapfb_device *fbdev;
344};
345
346struct omapfb_device {
347 int state;
348 int ext_lcdc; /* Using external
349 LCD controller */
350 struct mutex rqueue_mutex;
351
352 int palette_size;
353 u32 pseudo_palette[17];
354
355 struct lcd_panel *panel; /* LCD panel */
356 const struct lcd_ctrl *ctrl; /* LCD controller */
357 const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
358 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
359 interface */
360 struct device *dev;
361 struct fb_var_screeninfo new_var; /* for mode changes */
362
363 struct omapfb_mem_desc mem_desc;
364 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
365};
366
367struct omapfb_platform_data {
368 struct omap_lcd_config lcd;
369 struct omapfb_mem_desc mem_desc;
370 void *ctrl_platform_data;
371};
372
373#ifdef CONFIG_ARCH_OMAP1
374extern struct lcd_ctrl omap1_lcd_ctrl;
375#else
376extern struct lcd_ctrl omap2_disp_ctrl;
377#endif
378
379extern void omapfb_reserve_sdram(void);
380extern void omapfb_register_panel(struct lcd_panel *panel);
381extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
382extern void omapfb_notify_clients(struct omapfb_device *fbdev,
383 unsigned long event);
384extern int omapfb_register_client(struct omapfb_notifier_block *nb,
385 omapfb_notifier_callback_t callback,
386 void *callback_data);
387extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
388extern int omapfb_update_window_async(struct fb_info *fbi,
389 struct omapfb_update_window *win,
390 void (*callback)(void *),
391 void *callback_data);
392
393/* in arch/arm/plat-omap/fb.c */
394extern void omapfb_set_ctrl_platform_data(void *pdata);
395
396#endif /* __KERNEL__ */
397
398#endif /* __OMAPFB_H */
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h
index 3d45ee1d3cf4..0b960051eaed 100644
--- a/arch/arm/plat-omap/include/plat/powerdomain.h
+++ b/arch/arm/plat-omap/include/plat/powerdomain.h
@@ -28,6 +28,8 @@
28#define PWRDM_POWER_INACTIVE 0x2 28#define PWRDM_POWER_INACTIVE 0x2
29#define PWRDM_POWER_ON 0x3 29#define PWRDM_POWER_ON 0x3
30 30
31#define PWRDM_MAX_PWRSTS 4
32
31/* Powerdomain allowable state bitfields */ 33/* Powerdomain allowable state bitfields */
32#define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ 34#define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \
33 (1 << PWRDM_POWER_ON)) 35 (1 << PWRDM_POWER_ON))
@@ -40,7 +42,10 @@
40 42
41/* Powerdomain flags */ 43/* Powerdomain flags */
42#define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */ 44#define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */
43 45#define PWRDM_HAS_MPU_QUIRK (1 << 1) /* MPU pwr domain has MEM bank 0 bits
46 * in MEM bank 1 position. This is
47 * true for OMAP3430
48 */
44 49
45/* 50/*
46 * Number of memory banks that are power-controllable. On OMAP3430, the 51 * Number of memory banks that are power-controllable. On OMAP3430, the
@@ -85,15 +90,15 @@ struct powerdomain {
85 /* Used to represent the OMAP chip types containing this pwrdm */ 90 /* Used to represent the OMAP chip types containing this pwrdm */
86 const struct omap_chip_id omap_chip; 91 const struct omap_chip_id omap_chip;
87 92
88 /* Bit shift of this powerdomain's PM_WKDEP/CM_SLEEPDEP bit */
89 const u8 dep_bit;
90
91 /* Powerdomains that can be told to wake this powerdomain up */ 93 /* Powerdomains that can be told to wake this powerdomain up */
92 struct pwrdm_dep *wkdep_srcs; 94 struct pwrdm_dep *wkdep_srcs;
93 95
94 /* Powerdomains that can be told to keep this pwrdm from inactivity */ 96 /* Powerdomains that can be told to keep this pwrdm from inactivity */
95 struct pwrdm_dep *sleepdep_srcs; 97 struct pwrdm_dep *sleepdep_srcs;
96 98
99 /* Bit shift of this powerdomain's PM_WKDEP/CM_SLEEPDEP bit */
100 const u8 dep_bit;
101
97 /* Possible powerdomain power states */ 102 /* Possible powerdomain power states */
98 const u8 pwrsts; 103 const u8 pwrsts;
99 104
@@ -118,11 +123,11 @@ struct powerdomain {
118 struct list_head node; 123 struct list_head node;
119 124
120 int state; 125 int state;
121 unsigned state_counter[4]; 126 unsigned state_counter[PWRDM_MAX_PWRSTS];
122 127
123#ifdef CONFIG_PM_DEBUG 128#ifdef CONFIG_PM_DEBUG
124 s64 timer; 129 s64 timer;
125 s64 state_timer[4]; 130 s64 state_timer[PWRDM_MAX_PWRSTS];
126#endif 131#endif
127}; 132};
128 133
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index f704030d2a70..7b76f50564ba 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -94,7 +94,10 @@
94 94
95/* SMS register offsets - read/write with sms_{read,write}_reg() */ 95/* SMS register offsets - read/write with sms_{read,write}_reg() */
96 96
97#define SMS_SYSCONFIG 0x010 97#define SMS_SYSCONFIG 0x010
98#define SMS_ROT_CONTROL(context) (0x180 + 0x10 * context)
99#define SMS_ROT_SIZE(context) (0x184 + 0x10 * context)
100#define SMS_ROT_PHYSICAL_BA(context) (0x188 + 0x10 * context)
98/* REVISIT: fill in other SMS registers here */ 101/* REVISIT: fill in other SMS registers here */
99 102
100 103
@@ -129,6 +132,10 @@ int omap2_sdrc_get_params(unsigned long r,
129void omap2_sms_save_context(void); 132void omap2_sms_save_context(void);
130void omap2_sms_restore_context(void); 133void omap2_sms_restore_context(void);
131 134
135void omap2_sms_write_rot_control(u32 val, unsigned ctx);
136void omap2_sms_write_rot_size(u32 val, unsigned ctx);
137void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx);
138
132#ifdef CONFIG_ARCH_OMAP2 139#ifdef CONFIG_ARCH_OMAP2
133 140
134struct memory_timings { 141struct memory_timings {
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index 9951345a25d6..f5a4a92393ef 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -53,6 +53,7 @@
53#ifndef __ASSEMBLER__ 53#ifndef __ASSEMBLER__
54extern void __init omap_serial_early_init(void); 54extern void __init omap_serial_early_init(void);
55extern void omap_serial_init(void); 55extern void omap_serial_init(void);
56extern void omap_serial_init_port(int port);
56extern int omap_uart_can_sleep(void); 57extern int omap_uart_can_sleep(void);
57extern void omap_uart_check_wakeup(void); 58extern void omap_uart_check_wakeup(void);
58extern void omap_uart_prepare_suspend(void); 59extern void omap_uart_prepare_suspend(void);
diff --git a/arch/arm/plat-omap/include/plat/smp.h b/arch/arm/plat-omap/include/plat/smp.h
index dcaa8fde7063..8983d54c4fd2 100644
--- a/arch/arm/plat-omap/include/plat/smp.h
+++ b/arch/arm/plat-omap/include/plat/smp.h
@@ -28,6 +28,8 @@
28 28
29/* Needed for secondary core boot */ 29/* Needed for secondary core boot */
30extern void omap_secondary_startup(void); 30extern void omap_secondary_startup(void);
31extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
32extern void omap_auxcoreboot_addr(u32 cpu_addr);
31 33
32/* 34/*
33 * We use Soft IRQ1 as the IPI 35 * We use Soft IRQ1 as the IPI
diff --git a/arch/arm/plat-omap/include/plat/vram.h b/arch/arm/plat-omap/include/plat/vram.h
new file mode 100644
index 000000000000..edd4987758a6
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/vram.h
@@ -0,0 +1,62 @@
1/*
2 * VRAM manager for OMAP
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@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 version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#ifndef __OMAP_VRAM_H__
22#define __OMAP_VRAM_H__
23
24#include <linux/types.h>
25
26#define OMAP_VRAM_MEMTYPE_SDRAM 0
27#define OMAP_VRAM_MEMTYPE_SRAM 1
28#define OMAP_VRAM_MEMTYPE_MAX 1
29
30extern int omap_vram_add_region(unsigned long paddr, size_t size);
31extern int omap_vram_free(unsigned long paddr, size_t size);
32extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
33extern int omap_vram_reserve(unsigned long paddr, size_t size);
34extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram,
35 unsigned long *largest_free_block);
36
37#ifdef CONFIG_OMAP2_VRAM
38extern void omap_vram_set_sdram_vram(u32 size, u32 start);
39extern void omap_vram_set_sram_vram(u32 size, u32 start);
40
41extern void omap_vram_reserve_sdram(void);
42extern unsigned long omap_vram_reserve_sram(unsigned long sram_pstart,
43 unsigned long sram_vstart,
44 unsigned long sram_size,
45 unsigned long pstart_avail,
46 unsigned long size_avail);
47#else
48static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { }
49static inline void omap_vram_set_sram_vram(u32 size, u32 start) { }
50
51static inline void omap_vram_reserve_sdram(void) { }
52static inline unsigned long omap_vram_reserve_sram(unsigned long sram_pstart,
53 unsigned long sram_vstart,
54 unsigned long sram_size,
55 unsigned long pstart_avail,
56 unsigned long size_avail)
57{
58 return 0;
59}
60#endif
61
62#endif
diff --git a/arch/arm/plat-omap/include/plat/vrfb.h b/arch/arm/plat-omap/include/plat/vrfb.h
new file mode 100644
index 000000000000..d8a03ced3b10
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/vrfb.h
@@ -0,0 +1,50 @@
1/*
2 * VRFB Rotation Engine
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@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 version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#ifndef __OMAP_VRFB_H__
22#define __OMAP_VRFB_H__
23
24#define OMAP_VRFB_LINE_LEN 2048
25
26struct vrfb {
27 u8 context;
28 void __iomem *vaddr[4];
29 unsigned long paddr[4];
30 u16 xres;
31 u16 yres;
32 u16 xoffset;
33 u16 yoffset;
34 u8 bytespp;
35 bool yuv_mode;
36};
37
38extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
39extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
40extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
41 u8 bytespp);
42extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp);
43extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp);
44extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
45 u16 width, u16 height,
46 unsigned bytespp, bool yuv_mode);
47extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot);
48extern void omap_vrfb_restore_context(void);
49
50#endif /* __VRFB_H */
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index 05aebcad215b..06703635ace1 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -54,8 +54,12 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
54{ 54{
55 struct pin_config *reg; 55 struct pin_config *reg;
56 56
57 if (cpu_is_omap44xx()) 57 if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
58 return 0; 58 printk(KERN_ERR "mux: Broken omap_cfg_reg(%lu) entry\n",
59 index);
60 WARN_ON(1);
61 return -EINVAL;
62 }
59 63
60 if (mux_cfg == NULL) { 64 if (mux_cfg == NULL) {
61 printk(KERN_ERR "Pin mux table not initialized\n"); 65 printk(KERN_ERR "Pin mux table not initialized\n");
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index bb16e624a557..1e5648d3e3d8 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -134,18 +134,18 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
134 (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit)) 134 (od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
135 break; 135 break;
136 136
137 getnstimeofday(&a); 137 read_persistent_clock(&a);
138 138
139 /* XXX check return code */ 139 /* XXX check return code */
140 odpl->activate_func(od); 140 odpl->activate_func(od);
141 141
142 getnstimeofday(&b); 142 read_persistent_clock(&b);
143 143
144 c = timespec_sub(b, a); 144 c = timespec_sub(b, a);
145 act_lat = timespec_to_ns(&c) * NSEC_PER_USEC; 145 act_lat = timespec_to_ns(&c);
146 146
147 pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time " 147 pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time "
148 "%llu usec\n", od->pdev.name, od->pm_lat_level, 148 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
149 act_lat); 149 act_lat);
150 150
151 WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: " 151 WARN(act_lat > odpl->activate_lat, "omap_device: %s.%d: "
@@ -190,18 +190,18 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
190 od->_dev_wakeup_lat_limit)) 190 od->_dev_wakeup_lat_limit))
191 break; 191 break;
192 192
193 getnstimeofday(&a); 193 read_persistent_clock(&a);
194 194
195 /* XXX check return code */ 195 /* XXX check return code */
196 odpl->deactivate_func(od); 196 odpl->deactivate_func(od);
197 197
198 getnstimeofday(&b); 198 read_persistent_clock(&b);
199 199
200 c = timespec_sub(b, a); 200 c = timespec_sub(b, a);
201 deact_lat = timespec_to_ns(&c) * NSEC_PER_USEC; 201 deact_lat = timespec_to_ns(&c);
202 202
203 pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time " 203 pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time "
204 "%llu usec\n", od->pdev.name, od->pm_lat_level, 204 "%llu nsec\n", od->pdev.name, od->pm_lat_level,
205 deact_lat); 205 deact_lat);
206 206
207 WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: " 207 WARN(deact_lat > odpl->deactivate_lat, "omap_device: %s.%d: "
@@ -459,7 +459,7 @@ int omap_device_enable(struct platform_device *pdev)
459 ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT); 459 ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT);
460 460
461 od->dev_wakeup_lat = 0; 461 od->dev_wakeup_lat = 0;
462 od->_dev_wakeup_lat_limit = INT_MAX; 462 od->_dev_wakeup_lat_limit = UINT_MAX;
463 od->_state = OMAP_DEVICE_STATE_ENABLED; 463 od->_state = OMAP_DEVICE_STATE_ENABLED;
464 464
465 return ret; 465 return ret;
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 3e923668778d..d8d5094b37ed 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -28,6 +28,7 @@
28#include <plat/sram.h> 28#include <plat/sram.h>
29#include <plat/board.h> 29#include <plat/board.h>
30#include <plat/cpu.h> 30#include <plat/cpu.h>
31#include <plat/vram.h>
31 32
32#include <plat/control.h> 33#include <plat/control.h>
33 34
@@ -47,8 +48,10 @@
47#define OMAP3_SRAM_VA 0xfe400000 48#define OMAP3_SRAM_VA 0xfe400000
48#define OMAP3_SRAM_PUB_PA 0x40208000 49#define OMAP3_SRAM_PUB_PA 0x40208000
49#define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000) 50#define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000)
50#define OMAP4_SRAM_PA 0x40200000 /*0x402f0000*/ 51#define OMAP4_SRAM_PA 0x40300000
51#define OMAP4_SRAM_VA 0xfe400000 /*0xfe4f0000*/ 52#define OMAP4_SRAM_VA 0xfe400000
53#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
54#define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000)
52 55
53#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) 56#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
54#define SRAM_BOOTLOADER_SZ 0x00 57#define SRAM_BOOTLOADER_SZ 0x00
@@ -139,6 +142,10 @@ void __init omap_detect_sram(void)
139 } else { 142 } else {
140 omap_sram_size = 0x8000; /* 32K */ 143 omap_sram_size = 0x8000; /* 32K */
141 } 144 }
145 } else if (cpu_is_omap44xx()) {
146 omap_sram_base = OMAP4_SRAM_PUB_VA;
147 omap_sram_start = OMAP4_SRAM_PUB_PA;
148 omap_sram_size = 0xa000; /* 40K */
142 } else { 149 } else {
143 omap_sram_base = OMAP2_SRAM_PUB_VA; 150 omap_sram_base = OMAP2_SRAM_PUB_VA;
144 omap_sram_start = OMAP2_SRAM_PUB_PA; 151 omap_sram_start = OMAP2_SRAM_PUB_PA;
@@ -152,7 +159,7 @@ void __init omap_detect_sram(void)
152 } else if (cpu_is_omap44xx()) { 159 } else if (cpu_is_omap44xx()) {
153 omap_sram_base = OMAP4_SRAM_VA; 160 omap_sram_base = OMAP4_SRAM_VA;
154 omap_sram_start = OMAP4_SRAM_PA; 161 omap_sram_start = OMAP4_SRAM_PA;
155 omap_sram_size = 0x8000; /* 32K */ 162 omap_sram_size = 0xe000; /* 56K */
156 } else { 163 } else {
157 omap_sram_base = OMAP2_SRAM_VA; 164 omap_sram_base = OMAP2_SRAM_VA;
158 omap_sram_start = OMAP2_SRAM_PA; 165 omap_sram_start = OMAP2_SRAM_PA;
@@ -185,6 +192,13 @@ void __init omap_detect_sram(void)
185 omap_sram_start + SRAM_BOOTLOADER_SZ, 192 omap_sram_start + SRAM_BOOTLOADER_SZ,
186 omap_sram_size - SRAM_BOOTLOADER_SZ); 193 omap_sram_size - SRAM_BOOTLOADER_SZ);
187 omap_sram_size -= reserved; 194 omap_sram_size -= reserved;
195
196 reserved = omap_vram_reserve_sram(omap_sram_start, omap_sram_base,
197 omap_sram_size,
198 omap_sram_start + SRAM_BOOTLOADER_SZ,
199 omap_sram_size - SRAM_BOOTLOADER_SZ);
200 omap_sram_size -= reserved;
201
188 omap_sram_ceil = omap_sram_base + omap_sram_size; 202 omap_sram_ceil = omap_sram_base + omap_sram_size;
189} 203}
190 204
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index 51033a4503c3..d3bf17cd36f3 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -137,7 +137,13 @@ static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device)
137 if (is_device) { 137 if (is_device) {
138 if (cpu_is_omap24xx()) 138 if (cpu_is_omap24xx())
139 omap_cfg_reg(J20_24XX_USB0_PUEN); 139 omap_cfg_reg(J20_24XX_USB0_PUEN);
140 else 140 else if (cpu_is_omap7xx()) {
141 omap_cfg_reg(AA17_7XX_USB_DM);
142 omap_cfg_reg(W16_7XX_USB_PU_EN);
143 omap_cfg_reg(W17_7XX_USB_VBUSI);
144 omap_cfg_reg(W18_7XX_USB_DMCK_OUT);
145 omap_cfg_reg(W19_7XX_USB_DCRST);
146 } else
141 omap_cfg_reg(W4_USB_PUEN); 147 omap_cfg_reg(W4_USB_PUEN);
142 } 148 }
143 149
diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig
index e139a72c2149..9e9d0286e48f 100644
--- a/arch/arm/plat-s3c/Kconfig
+++ b/arch/arm/plat-s3c/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/plat-s3c/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h
index 065985978413..226147b7e026 100644
--- a/arch/arm/plat-s3c/include/plat/nand.h
+++ b/arch/arm/plat-s3c/include/plat/nand.h
@@ -17,6 +17,7 @@
17 * Setting this flag will allow the kernel to 17 * Setting this flag will allow the kernel to
18 * look for it at boot time and also skip the NAND 18 * look for it at boot time and also skip the NAND
19 * scan. 19 * scan.
20 * @options: Default value to set into 'struct nand_chip' options.
20 * @nr_chips: Number of chips in this set 21 * @nr_chips: Number of chips in this set
21 * @nr_partitions: Number of partitions pointed to by @partitions 22 * @nr_partitions: Number of partitions pointed to by @partitions
22 * @name: Name of set (optional) 23 * @name: Name of set (optional)
@@ -31,6 +32,7 @@ struct s3c2410_nand_set {
31 unsigned int disable_ecc:1; 32 unsigned int disable_ecc:1;
32 unsigned int flash_bbt:1; 33 unsigned int flash_bbt:1;
33 34
35 unsigned int options;
34 int nr_chips; 36 int nr_chips;
35 int nr_partitions; 37 int nr_partitions;
36 char *name; 38 char *name;
diff --git a/arch/arm/plat-s3c/pwm.c b/arch/arm/plat-s3c/pwm.c
index 4fdc5b307fd2..ef019f27b67d 100644
--- a/arch/arm/plat-s3c/pwm.c
+++ b/arch/arm/plat-s3c/pwm.c
@@ -368,7 +368,7 @@ static int s3c_pwm_probe(struct platform_device *pdev)
368 return ret; 368 return ret;
369} 369}
370 370
371static int s3c_pwm_remove(struct platform_device *pdev) 371static int __devexit s3c_pwm_remove(struct platform_device *pdev)
372{ 372{
373 struct pwm_device *pwm = platform_get_drvdata(pdev); 373 struct pwm_device *pwm = platform_get_drvdata(pdev);
374 374
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 20fbf936bb93..342647eb91d8 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/plat-s3c24xx/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c
index df47322492d5..ce47627f3368 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -365,7 +365,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
365 return ret; 365 return ret;
366} 366}
367 367
368static int s3c_adc_remove(struct platform_device *pdev) 368static int __devexit s3c_adc_remove(struct platform_device *pdev)
369{ 369{
370 struct adc_device *adc = platform_get_drvdata(pdev); 370 struct adc_device *adc = platform_get_drvdata(pdev);
371 371
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index f65192d5b1d7..f0ea7943ac5a 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1403,11 +1403,13 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int channel)
1403 ord = &dma_order->channels[channel]; 1403 ord = &dma_order->channels[channel];
1404 1404
1405 for (ch = 0; ch < dma_channels; ch++) { 1405 for (ch = 0; ch < dma_channels; ch++) {
1406 int tmp;
1406 if (!is_channel_valid(ord->list[ch])) 1407 if (!is_channel_valid(ord->list[ch]))
1407 continue; 1408 continue;
1408 1409
1409 if (s3c2410_chans[ord->list[ch]].in_use == 0) { 1410 tmp = ord->list[ch] & ~DMA_CH_VALID;
1410 ch = ord->list[ch] & ~DMA_CH_VALID; 1411 if (s3c2410_chans[tmp].in_use == 0) {
1412 ch = tmp;
1411 goto found; 1413 goto found;
1412 } 1414 }
1413 } 1415 }
diff --git a/arch/arm/plat-s3c24xx/include/plat/map.h b/arch/arm/plat-s3c24xx/include/plat/map.h
index c4d133436fc7..bd534d32b993 100644
--- a/arch/arm/plat-s3c24xx/include/plat/map.h
+++ b/arch/arm/plat-s3c24xx/include/plat/map.h
@@ -64,7 +64,7 @@
64/* the calculation for the VA of this must ensure that 64/* the calculation for the VA of this must ensure that
65 * it is the same distance apart from the UART in the 65 * it is the same distance apart from the UART in the
66 * phsyical address space, as the initial mapping for the IO 66 * phsyical address space, as the initial mapping for the IO
67 * is done as a 1:1 maping. This puts it (currently) at 67 * is done as a 1:1 mapping. This puts it (currently) at
68 * 0xFA800000, which is not in the way of any current mapping 68 * 0xFA800000, which is not in the way of any current mapping
69 * by the base system. 69 * by the base system.
70*/ 70*/
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
index ef0f521437d7..ad0d44ef1f93 100644
--- a/arch/arm/plat-s3c24xx/irq.c
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -522,6 +522,8 @@ int s3c24xx_set_fiq(unsigned int irq, bool on)
522 __raw_writel(intmod, S3C2410_INTMOD); 522 __raw_writel(intmod, S3C2410_INTMOD);
523 return 0; 523 return 0;
524} 524}
525
526EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
525#endif 527#endif
526 528
527 529
diff --git a/arch/arm/plat-s3c64xx/Kconfig b/arch/arm/plat-s3c64xx/Kconfig
index bcfa778614d8..e6da87a5885c 100644
--- a/arch/arm/plat-s3c64xx/Kconfig
+++ b/arch/arm/plat-s3c64xx/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/plat-s3c64xx/Kconfig
2#
3# Copyright 2008 Openmoko, Inc. 1# Copyright 2008 Openmoko, Inc.
4# Copyright 2008 Simtec Electronics 2# Copyright 2008 Simtec Electronics
5# Ben Dooks <ben@simtec.co.uk> 3# Ben Dooks <ben@simtec.co.uk>
diff --git a/arch/arm/plat-s5pc1xx/Kconfig b/arch/arm/plat-s5pc1xx/Kconfig
index 1608e62b0c9d..b7b9e91c0243 100644
--- a/arch/arm/plat-s5pc1xx/Kconfig
+++ b/arch/arm/plat-s5pc1xx/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/plat-s5pc1xx/Kconfig
2#
3# Copyright 2009 Samsung Electronics Co. 1# Copyright 2009 Samsung Electronics Co.
4# Byungho Min <bhmin@samsung.com> 2# Byungho Min <bhmin@samsung.com>
5# 3#
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 1dbaa29ac4d7..635cb1865e4d 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -4,7 +4,7 @@
4# Copyright (C) 2001 Russell King 4# Copyright (C) 2001 Russell King
5# 5#
6 6
7include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types 7include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
8 @echo ' Generating $@' 8 @echo ' Generating $@'
9 @mkdir -p $(dir $@) 9 @mkdir -p $(dir $@)
10 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } 10 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index ce319ef64bc1..04fef71d7be9 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -1,6 +1,6 @@
1#!/bin/awk 1#!/bin/awk
2# 2#
3# Awk script to generate include/asm-arm/mach-types.h 3# Awk script to generate include/generated/mach-types.h
4# 4#
5BEGIN { nr = 0 } 5BEGIN { nr = 0 }
6/^#/ { next } 6/^#/ { next }
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 07b976da6174..c3a74ce24ef6 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Wed Nov 25 22:14:58 2009 15# Last update: Wed Dec 16 20:06:34 2009
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1776,6 +1776,7 @@ cybook3 MACH_CYBOOK3 CYBOOK3 1784
1776wdg002 MACH_WDG002 WDG002 1785 1776wdg002 MACH_WDG002 WDG002 1785
1777sg560adsl MACH_SG560ADSL SG560ADSL 1786 1777sg560adsl MACH_SG560ADSL SG560ADSL 1786
1778nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787 1778nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787
1779dove_db MACH_DOVE_DB DOVE_DB 1788
1779marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789 1780marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
1780vandihud MACH_VANDIHUD VANDIHUD 1790 1781vandihud MACH_VANDIHUD VANDIHUD 1790
1781magx_e8 MACH_MAGX_E8 MAGX_E8 1791 1782magx_e8 MACH_MAGX_E8 MAGX_E8 1791
@@ -2536,3 +2537,44 @@ c3ax03 MACH_C3AX03 C3AX03 2549
2536mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 2537mxt_td60 MACH_MXT_TD60 MXT_TD60 2550
2537esyx MACH_ESYX ESYX 2551 2538esyx MACH_ESYX ESYX 2551
2538bulldog MACH_BULLDOG BULLDOG 2553 2539bulldog MACH_BULLDOG BULLDOG 2553
2540derell_me2000 MACH_DERELL_ME2000 DERELL_ME2000 2554
2541bcmring_base MACH_BCMRING_BASE BCMRING_BASE 2555
2542bcmring_evm MACH_BCMRING_EVM BCMRING_EVM 2556
2543bcmring_evm_jazz MACH_BCMRING_EVM_JAZZ BCMRING_EVM_JAZZ 2557
2544bcmring_sp MACH_BCMRING_SP BCMRING_SP 2558
2545bcmring_sv MACH_BCMRING_SV BCMRING_SV 2559
2546bcmring_sv_jazz MACH_BCMRING_SV_JAZZ BCMRING_SV_JAZZ 2560
2547bcmring_tablet MACH_BCMRING_TABLET BCMRING_TABLET 2561
2548bcmring_vp MACH_BCMRING_VP BCMRING_VP 2562
2549bcmring_evm_seikor MACH_BCMRING_EVM_SEIKOR BCMRING_EVM_SEIKOR 2563
2550bcmring_sp_wqvga MACH_BCMRING_SP_WQVGA BCMRING_SP_WQVGA 2564
2551bcmring_custom MACH_BCMRING_CUSTOM BCMRING_CUSTOM 2565
2552acer_s200 MACH_ACER_S200 ACER_S200 2566
2553bt270 MACH_BT270 BT270 2567
2554iseo MACH_ISEO ISEO 2568
2555cezanne MACH_CEZANNE CEZANNE 2569
2556lucca MACH_LUCCA LUCCA 2570
2557supersmart MACH_SUPERSMART SUPERSMART 2571
2558magnolia2 MACH_MAGNOLIA2 MAGNOLIA2 2573
2559emxx MACH_EMXX EMXX 2574
2560outlaw MACH_OUTLAW OUTLAW 2575
2561riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576
2562riot_vox MACH_RIOT_VOX RIOT_VOX 2577
2563riot_x37 MACH_RIOT_X37 RIOT_X37 2578
2564mega25mx MACH_MEGA25MX MEGA25MX 2579
2565benzina2 MACH_BENZINA2 BENZINA2 2580
2566ignite MACH_IGNITE IGNITE 2581
2567foggia MACH_FOGGIA FOGGIA 2582
2568arezzo MACH_AREZZO AREZZO 2583
2569leica_skywalker MACH_LEICA_SKYWALKER LEICA_SKYWALKER 2584
2570jacinto2_jamr MACH_JACINTO2_JAMR JACINTO2_JAMR 2585
2571gts_nova MACH_GTS_NOVA GTS_NOVA 2586
2572p3600 MACH_P3600 P3600 2587
2573dlt2 MACH_DLT2 DLT2 2588
2574df3120 MACH_DF3120 DF3120 2589
2575ecucore_9g20 MACH_ECUCORE_9G20 ECUCORE_9G20 2590
2576nautel_lpc3240 MACH_NAUTEL_LPC3240 NAUTEL_LPC3240 2591
2577glacier MACH_GLACIER GLACIER 2592
2578phrazer_bulldog MACH_PHRAZER_BULLDOG PHRAZER_BULLDOG 2593
2579omap3_bulldog MACH_OMAP3_BULLDOG OMAP3_BULLDOG 2594
2580pca101 MACH_PCA101 PCA101 2595
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 2d7423af1197..aed05bc3c2ea 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -38,16 +38,72 @@ union vfp_state *last_VFP_context[NR_CPUS];
38 */ 38 */
39unsigned int VFP_arch; 39unsigned int VFP_arch;
40 40
41/*
42 * Per-thread VFP initialization.
43 */
44static void vfp_thread_flush(struct thread_info *thread)
45{
46 union vfp_state *vfp = &thread->vfpstate;
47 unsigned int cpu;
48
49 memset(vfp, 0, sizeof(union vfp_state));
50
51 vfp->hard.fpexc = FPEXC_EN;
52 vfp->hard.fpscr = FPSCR_ROUND_NEAREST;
53
54 /*
55 * Disable VFP to ensure we initialize it first. We must ensure
56 * that the modification of last_VFP_context[] and hardware disable
57 * are done for the same CPU and without preemption.
58 */
59 cpu = get_cpu();
60 if (last_VFP_context[cpu] == vfp)
61 last_VFP_context[cpu] = NULL;
62 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
63 put_cpu();
64}
65
66static void vfp_thread_release(struct thread_info *thread)
67{
68 /* release case: Per-thread VFP cleanup. */
69 union vfp_state *vfp = &thread->vfpstate;
70 unsigned int cpu = thread->cpu;
71
72 if (last_VFP_context[cpu] == vfp)
73 last_VFP_context[cpu] = NULL;
74}
75
76/*
77 * When this function is called with the following 'cmd's, the following
78 * is true while this function is being run:
79 * THREAD_NOFTIFY_SWTICH:
80 * - the previously running thread will not be scheduled onto another CPU.
81 * - the next thread to be run (v) will not be running on another CPU.
82 * - thread->cpu is the local CPU number
83 * - not preemptible as we're called in the middle of a thread switch
84 * THREAD_NOTIFY_FLUSH:
85 * - the thread (v) will be running on the local CPU, so
86 * v === current_thread_info()
87 * - thread->cpu is the local CPU number at the time it is accessed,
88 * but may change at any time.
89 * - we could be preempted if tree preempt rcu is enabled, so
90 * it is unsafe to use thread->cpu.
91 * THREAD_NOTIFY_RELEASE:
92 * - the thread (v) will not be running on any CPU; it is a dead thread.
93 * - thread->cpu will be the last CPU the thread ran on, which may not
94 * be the current CPU.
95 * - we could be preempted if tree preempt rcu is enabled.
96 */
41static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) 97static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
42{ 98{
43 struct thread_info *thread = v; 99 struct thread_info *thread = v;
44 union vfp_state *vfp;
45 __u32 cpu = thread->cpu;
46 100
47 if (likely(cmd == THREAD_NOTIFY_SWITCH)) { 101 if (likely(cmd == THREAD_NOTIFY_SWITCH)) {
48 u32 fpexc = fmrx(FPEXC); 102 u32 fpexc = fmrx(FPEXC);
49 103
50#ifdef CONFIG_SMP 104#ifdef CONFIG_SMP
105 unsigned int cpu = thread->cpu;
106
51 /* 107 /*
52 * On SMP, if VFP is enabled, save the old state in 108 * On SMP, if VFP is enabled, save the old state in
53 * case the thread migrates to a different CPU. The 109 * case the thread migrates to a different CPU. The
@@ -74,25 +130,10 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v)
74 return NOTIFY_DONE; 130 return NOTIFY_DONE;
75 } 131 }
76 132
77 vfp = &thread->vfpstate; 133 if (cmd == THREAD_NOTIFY_FLUSH)
78 if (cmd == THREAD_NOTIFY_FLUSH) { 134 vfp_thread_flush(thread);
79 /* 135 else
80 * Per-thread VFP initialisation. 136 vfp_thread_release(thread);
81 */
82 memset(vfp, 0, sizeof(union vfp_state));
83
84 vfp->hard.fpexc = FPEXC_EN;
85 vfp->hard.fpscr = FPSCR_ROUND_NEAREST;
86
87 /*
88 * Disable VFP to ensure we initialise it first.
89 */
90 fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
91 }
92
93 /* flush and release case: Per-thread VFP cleanup. */
94 if (last_VFP_context[cpu] == vfp)
95 last_VFP_context[cpu] = NULL;
96 137
97 return NOTIFY_DONE; 138 return NOTIFY_DONE;
98} 139}
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index d856354f4272..f2b319333184 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -112,6 +112,11 @@ config CPU_AT32AP7002
112 bool 112 bool
113 select CPU_AT32AP700X 113 select CPU_AT32AP700X
114 114
115# AP700X boards
116config BOARD_ATNGW100_COMMON
117 bool
118 select CPU_AT32AP7000
119
115choice 120choice
116 prompt "AVR32 board type" 121 prompt "AVR32 board type"
117 default BOARD_ATSTK1000 122 default BOARD_ATSTK1000
@@ -119,9 +124,13 @@ choice
119config BOARD_ATSTK1000 124config BOARD_ATSTK1000
120 bool "ATSTK1000 evaluation board" 125 bool "ATSTK1000 evaluation board"
121 126
122config BOARD_ATNGW100 127config BOARD_ATNGW100_MKI
123 bool "ATNGW100 Network Gateway" 128 bool "ATNGW100 Network Gateway"
124 select CPU_AT32AP7000 129 select BOARD_ATNGW100_COMMON
130
131config BOARD_ATNGW100_MKII
132 bool "ATNGW100 mkII Network Gateway"
133 select BOARD_ATNGW100_COMMON
125 134
126config BOARD_HAMMERHEAD 135config BOARD_HAMMERHEAD
127 bool "Hammerhead board" 136 bool "Hammerhead board"
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index c21a3290d542..ead8a75203a9 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -32,7 +32,7 @@ head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o
32head-y += arch/avr32/kernel/head.o 32head-y += arch/avr32/kernel/head.o
33core-y += $(machdirs) 33core-y += $(machdirs)
34core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ 34core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
35core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/ 35core-$(CONFIG_BOARD_ATNGW100_COMMON) += arch/avr32/boards/atngw100/
36core-$(CONFIG_BOARD_HAMMERHEAD) += arch/avr32/boards/hammerhead/ 36core-$(CONFIG_BOARD_HAMMERHEAD) += arch/avr32/boards/hammerhead/
37core-$(CONFIG_BOARD_FAVR_32) += arch/avr32/boards/favr-32/ 37core-$(CONFIG_BOARD_FAVR_32) += arch/avr32/boards/favr-32/
38core-$(CONFIG_BOARD_MERISC) += arch/avr32/boards/merisc/ 38core-$(CONFIG_BOARD_MERISC) += arch/avr32/boards/merisc/
diff --git a/arch/avr32/boards/atngw100/Kconfig b/arch/avr32/boards/atngw100/Kconfig
index be27a0218ab4..4e55617ade2d 100644
--- a/arch/avr32/boards/atngw100/Kconfig
+++ b/arch/avr32/boards/atngw100/Kconfig
@@ -1,6 +1,17 @@
1# NGW100 customization 1# NGW100 customization
2 2
3if BOARD_ATNGW100 3if BOARD_ATNGW100_COMMON
4
5config BOARD_ATNGW100_MKII_LCD
6 bool "Enable ATNGW100 mkII LCD interface"
7 depends on BOARD_ATNGW100_MKII
8 help
9 This enables the LCD controller (LCDC) in the AT32AP7000. Since the
10 LCDC is multiplexed with MACB1 (LAN) Ethernet port, only one can be
11 enabled at a time.
12
13 This choice enables the LCDC and disables the MACB1 interface marked
14 LAN on the PCB.
4 15
5choice 16choice
6 prompt "Select an NGW100 add-on board to support" 17 prompt "Select an NGW100 add-on board to support"
@@ -11,15 +22,11 @@ config BOARD_ATNGW100_ADDON_NONE
11 22
12config BOARD_ATNGW100_EVKLCD10X 23config BOARD_ATNGW100_EVKLCD10X
13 bool "EVKLCD10X addon board" 24 bool "EVKLCD10X addon board"
25 depends on BOARD_ATNGW100_MKI || BOARD_ATNGW100_MKII_LCD
14 help 26 help
15 This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA) 27 This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA)
16 addon board for the NGW100. By enabling this the LCD controller and 28 addon board for the NGW100 and NGW100 mkII. By enabling this the LCD
17 AC97 controller is added as platform devices. 29 controller and AC97 controller is added as platform devices.
18
19 This choice disables the detect pin and the write-protect pin for the
20 MCI platform device, since it conflicts with the LCD platform device.
21 The MCI pins can be reenabled by editing the "add device function" but
22 this may break the setup for other displays that use these pins.
23 30
24config BOARD_ATNGW100_MRMT 31config BOARD_ATNGW100_MRMT
25 bool "Mediama RMT1/2 add-on board" 32 bool "Mediama RMT1/2 add-on board"
@@ -55,4 +62,4 @@ if BOARD_ATNGW100_MRMT
55source "arch/avr32/boards/atngw100/Kconfig_mrmt" 62source "arch/avr32/boards/atngw100/Kconfig_mrmt"
56endif 63endif
57 64
58endif # BOARD_ATNGW100 65endif # BOARD_ATNGW100_COMMON
diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c
index 00337112c5ac..20388750d564 100644
--- a/arch/avr32/boards/atngw100/evklcd10x.c
+++ b/arch/avr32/boards/atngw100/evklcd10x.c
@@ -164,7 +164,12 @@ static int __init atevklcd10x_init(void)
164 164
165 at32_add_device_lcdc(0, &atevklcd10x_lcdc_data, 165 at32_add_device_lcdc(0, &atevklcd10x_lcdc_data,
166 fbmem_start, fbmem_size, 166 fbmem_start, fbmem_size,
167 ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL); 167#ifdef CONFIG_BOARD_ATNGW100_MKII
168 ATMEL_LCDC_PRI_18BIT | ATMEL_LCDC_PC_DVAL
169#else
170 ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL
171#endif
172 );
168 173
169 at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH); 174 at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH);
170 175
diff --git a/arch/avr32/boards/atngw100/mrmt.c b/arch/avr32/boards/atngw100/mrmt.c
index bf78e516a85f..7919be311f4a 100644
--- a/arch/avr32/boards/atngw100/mrmt.c
+++ b/arch/avr32/boards/atngw100/mrmt.c
@@ -302,6 +302,7 @@ static int __init mrmt1_init(void)
302 at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ), 302 at32_select_periph( GPIO_PIOB_BASE, 1 << (PB_EXTINT_BASE+TS_IRQ),
303 GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH); 303 GPIO_PERIPH_A, AT32_GPIOF_DEGLITCH);
304 set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING ); 304 set_irq_type( AT32_EXTINT(TS_IRQ), IRQ_TYPE_EDGE_FALLING );
305 at32_spi_setup_slaves(0,spi01_board_info,ARRAY_SIZE(spi01_board_info));
305 spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info)); 306 spi_register_board_info(spi01_board_info,ARRAY_SIZE(spi01_board_info));
306#endif 307#endif
307 308
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index bc299fbbeb4e..8c6a2440e345 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -20,6 +20,7 @@
20#include <linux/leds.h> 20#include <linux/leds.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/atmel-mci.h> 22#include <linux/atmel-mci.h>
23#include <linux/usb/atmel_usba_udc.h>
23 24
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/setup.h> 26#include <asm/setup.h>
@@ -36,6 +37,75 @@ unsigned long at32_board_osc_rates[3] = {
36 [2] = 12000000, /* 12 MHz on osc1 */ 37 [2] = 12000000, /* 12 MHz on osc1 */
37}; 38};
38 39
40/*
41 * The ATNGW100 mkII is very similar to the ATNGW100. Both have the AT32AP7000
42 * chip on board; the difference is that the ATNGW100 mkII has 128 MB 32-bit
43 * SDRAM (the ATNGW100 has 32 MB 16-bit SDRAM) and 256 MB 16-bit NAND flash
44 * (the ATNGW100 has none.)
45 *
46 * The RAM difference is handled by the boot loader, so the only difference we
47 * end up handling here is the NAND flash, EBI pin reservation and if LCDC or
48 * MACB1 should be enabled.
49 */
50#ifdef CONFIG_BOARD_ATNGW100_MKII
51#include <linux/mtd/partitions.h>
52#include <mach/smc.h>
53
54static struct smc_timing nand_timing __initdata = {
55 .ncs_read_setup = 0,
56 .nrd_setup = 10,
57 .ncs_write_setup = 0,
58 .nwe_setup = 10,
59
60 .ncs_read_pulse = 30,
61 .nrd_pulse = 15,
62 .ncs_write_pulse = 30,
63 .nwe_pulse = 15,
64
65 .read_cycle = 30,
66 .write_cycle = 30,
67
68 .ncs_read_recover = 0,
69 .nrd_recover = 15,
70 .ncs_write_recover = 0,
71 /* WE# high -> RE# low min 60 ns */
72 .nwe_recover = 50,
73};
74
75static struct smc_config nand_config __initdata = {
76 .bus_width = 2,
77 .nrd_controlled = 1,
78 .nwe_controlled = 1,
79 .nwait_mode = 0,
80 .byte_write = 0,
81 .tdf_cycles = 2,
82 .tdf_mode = 0,
83};
84
85static struct mtd_partition nand_partitions[] = {
86 {
87 .name = "main",
88 .offset = 0x00000000,
89 .size = MTDPART_SIZ_FULL,
90 },
91};
92
93static struct mtd_partition *nand_part_info(int size, int *num_partitions)
94{
95 *num_partitions = ARRAY_SIZE(nand_partitions);
96 return nand_partitions;
97}
98
99static struct atmel_nand_data atngw100mkii_nand_data __initdata = {
100 .cle = 21,
101 .ale = 22,
102 .rdy_pin = GPIO_PIN_PB(28),
103 .enable_pin = GPIO_PIN_PE(23),
104 .bus_width_16 = true,
105 .partition_info = nand_part_info,
106};
107#endif
108
39/* Initialized by bootloader-specific startup code. */ 109/* Initialized by bootloader-specific startup code. */
40struct tag *bootloader_tags __initdata; 110struct tag *bootloader_tags __initdata;
41 111
@@ -56,9 +126,9 @@ static struct spi_board_info spi0_board_info[] __initdata = {
56static struct mci_platform_data __initdata mci0_data = { 126static struct mci_platform_data __initdata mci0_data = {
57 .slot[0] = { 127 .slot[0] = {
58 .bus_width = 4, 128 .bus_width = 4,
59#if defined(CONFIG_BOARD_ATNGW100_EVKLCD10X) || defined(CONFIG_BOARD_ATNGW100_MRMT1) 129#if defined(CONFIG_BOARD_ATNGW100_MKII)
60 .detect_pin = GPIO_PIN_NONE, 130 .detect_pin = GPIO_PIN_PC(25),
61 .wp_pin = GPIO_PIN_NONE, 131 .wp_pin = GPIO_PIN_PE(22),
62#else 132#else
63 .detect_pin = GPIO_PIN_PC(25), 133 .detect_pin = GPIO_PIN_PC(25),
64 .wp_pin = GPIO_PIN_PE(0), 134 .wp_pin = GPIO_PIN_PE(0),
@@ -66,6 +136,14 @@ static struct mci_platform_data __initdata mci0_data = {
66 }, 136 },
67}; 137};
68 138
139static struct usba_platform_data atngw100_usba_data __initdata = {
140#if defined(CONFIG_BOARD_ATNGW100_MKII)
141 .vbus_pin = GPIO_PIN_PE(26),
142#else
143 .vbus_pin = -ENODEV,
144#endif
145};
146
69/* 147/*
70 * The next two functions should go away as the boot loader is 148 * The next two functions should go away as the boot loader is
71 * supposed to initialize the macb address registers with a valid 149 * supposed to initialize the macb address registers with a valid
@@ -173,18 +251,27 @@ static int __init atngw100_init(void)
173 unsigned i; 251 unsigned i;
174 252
175 /* 253 /*
176 * ATNGW100 uses 16-bit SDRAM interface, so we don't need to 254 * ATNGW100 mkII uses 32-bit SDRAM interface. Reserve the
177 * reserve any pins for it. 255 * SDRAM-specific pins so that nobody messes with them.
178 */ 256 */
257#ifdef CONFIG_BOARD_ATNGW100_MKII
258 at32_reserve_pin(GPIO_PIOE_BASE, ATMEL_EBI_PE_DATA_ALL);
259
260 smc_set_timing(&nand_config, &nand_timing);
261 smc_set_configuration(3, &nand_config);
262 at32_add_device_nand(0, &atngw100mkii_nand_data);
263#endif
179 264
180 at32_add_device_usart(0); 265 at32_add_device_usart(0);
181 266
182 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 267 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
268#ifndef CONFIG_BOARD_ATNGW100_MKII_LCD
183 set_hw_addr(at32_add_device_eth(1, &eth_data[1])); 269 set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
270#endif
184 271
185 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); 272 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
186 at32_add_device_mci(0, &mci0_data); 273 at32_add_device_mci(0, &mci0_data);
187 at32_add_device_usba(0, NULL); 274 at32_add_device_usba(0, &atngw100_usba_data);
188 275
189 for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) { 276 for (i = 0; i < ARRAY_SIZE(ngw_leds); i++) {
190 at32_select_gpio(ngw_leds[i].gpio, 277 at32_select_gpio(ngw_leds[i].gpio,
@@ -194,10 +281,14 @@ static int __init atngw100_init(void)
194 281
195 /* all these i2c/smbus pins should have external pullups for 282 /* all these i2c/smbus pins should have external pullups for
196 * open-drain sharing among all I2C devices. SDA and SCL do; 283 * open-drain sharing among all I2C devices. SDA and SCL do;
197 * PB28/EXTINT3 doesn't; it should be SMBALERT# (for PMBus), 284 * PB28/EXTINT3 (ATNGW100) and PE21 (ATNGW100 mkII) doesn't; it should
198 * but it's not available off-board. 285 * be SMBALERT# (for PMBus), but it's not available off-board.
199 */ 286 */
287#ifdef CONFIG_BOARD_ATNGW100_MKII
288 at32_select_periph(GPIO_PIOE_BASE, 1 << 21, 0, AT32_GPIOF_PULLUP);
289#else
200 at32_select_periph(GPIO_PIOB_BASE, 1 << 28, 0, AT32_GPIOF_PULLUP); 290 at32_select_periph(GPIO_PIOB_BASE, 1 << 28, 0, AT32_GPIOF_PULLUP);
291#endif
201 at32_select_gpio(i2c_gpio_data.sda_pin, 292 at32_select_gpio(i2c_gpio_data.sda_pin,
202 AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); 293 AT32_GPIOF_MULTIDRV | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
203 at32_select_gpio(i2c_gpio_data.scl_pin, 294 at32_select_gpio(i2c_gpio_data.scl_pin,
@@ -211,14 +302,22 @@ postcore_initcall(atngw100_init);
211 302
212static int __init atngw100_arch_init(void) 303static int __init atngw100_arch_init(void)
213{ 304{
214 /* PB30 is the otherwise unused jumper on the mainboard, with an 305 /* PB30 (ATNGW100) and PE30 (ATNGW100 mkII) is the otherwise unused
215 * external pullup; the jumper grounds it. Use it however you 306 * jumper on the mainboard, with an external pullup; the jumper grounds
216 * like, including letting U-Boot or Linux tweak boot sequences. 307 * it. Use it however you like, including letting U-Boot or Linux tweak
308 * boot sequences.
217 */ 309 */
310#ifdef CONFIG_BOARD_ATNGW100_MKII
311 at32_select_gpio(GPIO_PIN_PE(30), 0);
312 gpio_request(GPIO_PIN_PE(30), "j15");
313 gpio_direction_input(GPIO_PIN_PE(30));
314 gpio_export(GPIO_PIN_PE(30), false);
315#else
218 at32_select_gpio(GPIO_PIN_PB(30), 0); 316 at32_select_gpio(GPIO_PIN_PB(30), 0);
219 gpio_request(GPIO_PIN_PB(30), "j15"); 317 gpio_request(GPIO_PIN_PB(30), "j15");
220 gpio_direction_input(GPIO_PIN_PB(30)); 318 gpio_direction_input(GPIO_PIN_PB(30));
221 gpio_export(GPIO_PIN_PB(30), false); 319 gpio_export(GPIO_PIN_PB(30), false);
320#endif
222 321
223 /* set_irq_type() after the arch_initcall for EIC has run, and 322 /* set_irq_type() after the arch_initcall for EIC has run, and
224 * before the I2C subsystem could try using this IRQ. 323 * before the I2C subsystem could try using this IRQ.
diff --git a/arch/avr32/boards/hammerhead/Kconfig b/arch/avr32/boards/hammerhead/Kconfig
index fda2331f9789..5c13d785cc70 100644
--- a/arch/avr32/boards/hammerhead/Kconfig
+++ b/arch/avr32/boards/hammerhead/Kconfig
@@ -24,7 +24,7 @@ config BOARD_HAMMERHEAD_SND
24 bool "Atmel AC97 Sound support" 24 bool "Atmel AC97 Sound support"
25 help 25 help
26 This enables Sound support for the Hammerhead board. You may 26 This enables Sound support for the Hammerhead board. You may
27 also go trough the ALSA settings to get it working. 27 also go through the ALSA settings to get it working.
28 28
29 Choose 'Y' here if you have ordered a Corona daugther board and 29 Choose 'Y' here if you have ordered a Corona daugther board and
30 want to make your board funky. 30 want to make your board funky.
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index 574aca975334..32205c9d37d4 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.27-rc1 3# Linux kernel version: 2.6.32-rc5
4# Tue Aug 5 16:00:47 2008 4# Thu Oct 29 09:39:22 2009
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
24 25
25# 26#
26# General setup 27# General setup
@@ -34,22 +35,37 @@ CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
37CONFIG_BSD_PROCESS_ACCT=y 39CONFIG_BSD_PROCESS_ACCT=y
38CONFIG_BSD_PROCESS_ACCT_V3=y 40CONFIG_BSD_PROCESS_ACCT_V3=y
39# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_TREE_RCU=y
48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
41# CONFIG_IKCONFIG is not set 53# CONFIG_IKCONFIG is not set
42CONFIG_LOG_BUF_SHIFT=14 54CONFIG_LOG_BUF_SHIFT=14
43# CONFIG_CGROUPS is not set
44# CONFIG_GROUP_SCHED is not set 55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
45CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
46CONFIG_SYSFS_DEPRECATED_V2=y 58CONFIG_SYSFS_DEPRECATED_V2=y
47# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
48# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
49CONFIG_BLK_DEV_INITRD=y 61CONFIG_BLK_DEV_INITRD=y
50CONFIG_INITRAMFS_SOURCE="" 62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
51CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
53CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
54# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
55CONFIG_KALLSYMS=y 71CONFIG_KALLSYMS=y
@@ -59,38 +75,40 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 75CONFIG_PRINTK=y
60CONFIG_BUG=y 76CONFIG_BUG=y
61CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set
63# CONFIG_BASE_FULL is not set 78# CONFIG_BASE_FULL is not set
64CONFIG_FUTEX=y 79CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y
66CONFIG_EPOLL=y 80CONFIG_EPOLL=y
67CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y 82CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
71CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLUB_DEBUG=y 91CONFIG_SLUB_DEBUG=y
92# CONFIG_COMPAT_BRK is not set
73# CONFIG_SLAB is not set 93# CONFIG_SLAB is not set
74CONFIG_SLUB=y 94CONFIG_SLUB=y
75# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
76CONFIG_PROFILING=y 96CONFIG_PROFILING=y
77# CONFIG_MARKERS is not set 97CONFIG_TRACEPOINTS=y
78CONFIG_OPROFILE=m 98CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y 100CONFIG_KPROBES=y
81# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
82# CONFIG_HAVE_IOREMAP_PROT is not set
83CONFIG_HAVE_KPROBES=y 101CONFIG_HAVE_KPROBES=y
84# CONFIG_HAVE_KRETPROBES is not set
85# CONFIG_HAVE_ARCH_TRACEHOOK is not set
86# CONFIG_HAVE_DMA_ATTRS is not set
87# CONFIG_USE_GENERIC_SMP_HELPERS is not set
88CONFIG_HAVE_CLK=y 102CONFIG_HAVE_CLK=y
89CONFIG_PROC_PAGE_MONITOR=y 103
104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
90# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
91CONFIG_SLABINFO=y 110CONFIG_SLABINFO=y
92CONFIG_RT_MUTEXES=y 111CONFIG_RT_MUTEXES=y
93# CONFIG_TINY_SHMEM is not set
94CONFIG_BASE_SMALL=1 112CONFIG_BASE_SMALL=1
95CONFIG_MODULES=y 113CONFIG_MODULES=y
96# CONFIG_MODULE_FORCE_LOAD is not set 114# CONFIG_MODULE_FORCE_LOAD is not set
@@ -98,11 +116,8 @@ CONFIG_MODULE_UNLOAD=y
98CONFIG_MODULE_FORCE_UNLOAD=y 116CONFIG_MODULE_FORCE_UNLOAD=y
99# CONFIG_MODVERSIONS is not set 117# CONFIG_MODVERSIONS is not set
100# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
101CONFIG_KMOD=y
102CONFIG_BLOCK=y 119CONFIG_BLOCK=y
103# CONFIG_LBD is not set 120CONFIG_LBDAF=y
104# CONFIG_BLK_DEV_IO_TRACE is not set
105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
107# CONFIG_BLK_DEV_INTEGRITY is not set 122# CONFIG_BLK_DEV_INTEGRITY is not set
108 123
@@ -118,7 +133,7 @@ CONFIG_IOSCHED_CFQ=y
118CONFIG_DEFAULT_CFQ=y 133CONFIG_DEFAULT_CFQ=y
119# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
120CONFIG_DEFAULT_IOSCHED="cfq" 135CONFIG_DEFAULT_IOSCHED="cfq"
121CONFIG_CLASSIC_RCU=y 136CONFIG_FREEZER=y
122 137
123# 138#
124# System Type and features 139# System Type and features
@@ -133,8 +148,23 @@ CONFIG_PERFORMANCE_COUNTERS=y
133CONFIG_PLATFORM_AT32AP=y 148CONFIG_PLATFORM_AT32AP=y
134CONFIG_CPU_AT32AP700X=y 149CONFIG_CPU_AT32AP700X=y
135CONFIG_CPU_AT32AP7000=y 150CONFIG_CPU_AT32AP7000=y
151CONFIG_BOARD_ATNGW100_COMMON=y
136# CONFIG_BOARD_ATSTK1000 is not set 152# CONFIG_BOARD_ATSTK1000 is not set
137CONFIG_BOARD_ATNGW100=y 153CONFIG_BOARD_ATNGW100_MKI=y
154# CONFIG_BOARD_ATNGW100_MKII is not set
155# CONFIG_BOARD_HAMMERHEAD is not set
156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159# CONFIG_BOARD_ATSTK1002 is not set
160# CONFIG_BOARD_ATSTK1003 is not set
161# CONFIG_BOARD_ATSTK1004 is not set
162# CONFIG_BOARD_ATSTK1006 is not set
163# CONFIG_BOARD_ATSTK1000_J2_LED8 is not set
164# CONFIG_BOARD_ATSTK1000_J2_RGB is not set
165CONFIG_BOARD_ATNGW100_ADDON_NONE=y
166# CONFIG_BOARD_ATNGW100_EVKLCD10X is not set
167# CONFIG_BOARD_ATNGW100_MRMT is not set
138CONFIG_LOADER_U_BOOT=y 168CONFIG_LOADER_U_BOOT=y
139 169
140# 170#
@@ -150,7 +180,7 @@ CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set 180# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set 181# CONFIG_PREEMPT is not set
152CONFIG_QUICKLIST=y 182CONFIG_QUICKLIST=y
153# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 183# CONFIG_HAVE_ARCH_BOOTMEM is not set
154# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 184# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
155# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 185# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
156CONFIG_ARCH_FLATMEM_ENABLE=y 186CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -162,14 +192,16 @@ CONFIG_FLATMEM_MANUAL=y
162# CONFIG_SPARSEMEM_MANUAL is not set 192# CONFIG_SPARSEMEM_MANUAL is not set
163CONFIG_FLATMEM=y 193CONFIG_FLATMEM=y
164CONFIG_FLAT_NODE_MEM_MAP=y 194CONFIG_FLAT_NODE_MEM_MAP=y
165# CONFIG_SPARSEMEM_STATIC is not set
166# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
167CONFIG_PAGEFLAGS_EXTENDED=y 195CONFIG_PAGEFLAGS_EXTENDED=y
168CONFIG_SPLIT_PTLOCK_CPUS=4 196CONFIG_SPLIT_PTLOCK_CPUS=4
169# CONFIG_RESOURCES_64BIT is not set 197# CONFIG_PHYS_ADDR_T_64BIT is not set
170CONFIG_ZONE_DMA_FLAG=0 198CONFIG_ZONE_DMA_FLAG=0
171CONFIG_NR_QUICK=2 199CONFIG_NR_QUICK=2
172CONFIG_VIRT_TO_BUS=y 200CONFIG_VIRT_TO_BUS=y
201CONFIG_HAVE_MLOCK=y
202CONFIG_HAVE_MLOCKED_PAGE_BIT=y
203# CONFIG_KSM is not set
204CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
173# CONFIG_OWNERSHIP_TRACE is not set 205# CONFIG_OWNERSHIP_TRACE is not set
174CONFIG_NMI_DEBUGGING=y 206CONFIG_NMI_DEBUGGING=y
175# CONFIG_HZ_100 is not set 207# CONFIG_HZ_100 is not set
@@ -177,7 +209,7 @@ CONFIG_HZ_250=y
177# CONFIG_HZ_300 is not set 209# CONFIG_HZ_300 is not set
178# CONFIG_HZ_1000 is not set 210# CONFIG_HZ_1000 is not set
179CONFIG_HZ=250 211CONFIG_HZ=250
180# CONFIG_SCHED_HRTICK is not set 212CONFIG_SCHED_HRTICK=y
181CONFIG_CMDLINE="" 213CONFIG_CMDLINE=""
182 214
183# 215#
@@ -188,6 +220,7 @@ CONFIG_PM=y
188CONFIG_PM_SLEEP=y 220CONFIG_PM_SLEEP=y
189CONFIG_SUSPEND=y 221CONFIG_SUSPEND=y
190CONFIG_SUSPEND_FREEZER=y 222CONFIG_SUSPEND_FREEZER=y
223# CONFIG_PM_RUNTIME is not set
191CONFIG_ARCH_SUSPEND_POSSIBLE=y 224CONFIG_ARCH_SUSPEND_POSSIBLE=y
192 225
193# 226#
@@ -219,6 +252,8 @@ CONFIG_CPU_FREQ_AT32AP=y
219# Executable file formats 252# Executable file formats
220# 253#
221CONFIG_BINFMT_ELF=y 254CONFIG_BINFMT_ELF=y
255# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
256# CONFIG_HAVE_AOUT is not set
222# CONFIG_BINFMT_MISC is not set 257# CONFIG_BINFMT_MISC is not set
223CONFIG_NET=y 258CONFIG_NET=y
224 259
@@ -271,7 +306,6 @@ CONFIG_INET_TCP_DIAG=y
271CONFIG_TCP_CONG_CUBIC=y 306CONFIG_TCP_CONG_CUBIC=y
272CONFIG_DEFAULT_TCP_CONG="cubic" 307CONFIG_DEFAULT_TCP_CONG="cubic"
273# CONFIG_TCP_MD5SIG is not set 308# CONFIG_TCP_MD5SIG is not set
274# CONFIG_IP_VS is not set
275CONFIG_IPV6=y 309CONFIG_IPV6=y
276# CONFIG_IPV6_PRIVACY is not set 310# CONFIG_IPV6_PRIVACY is not set
277# CONFIG_IPV6_ROUTER_PREF is not set 311# CONFIG_IPV6_ROUTER_PREF is not set
@@ -314,10 +348,12 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
314CONFIG_NETFILTER_XT_MATCH_MARK=m 348CONFIG_NETFILTER_XT_MATCH_MARK=m
315CONFIG_NETFILTER_XT_MATCH_POLICY=m 349CONFIG_NETFILTER_XT_MATCH_POLICY=m
316CONFIG_NETFILTER_XT_MATCH_STATE=m 350CONFIG_NETFILTER_XT_MATCH_STATE=m
351# CONFIG_IP_VS is not set
317 352
318# 353#
319# IP: Netfilter Configuration 354# IP: Netfilter Configuration
320# 355#
356CONFIG_NF_DEFRAG_IPV4=m
321CONFIG_NF_CONNTRACK_IPV4=m 357CONFIG_NF_CONNTRACK_IPV4=m
322CONFIG_NF_CONNTRACK_PROC_COMPAT=y 358CONFIG_NF_CONNTRACK_PROC_COMPAT=y
323CONFIG_IP_NF_IPTABLES=m 359CONFIG_IP_NF_IPTABLES=m
@@ -343,16 +379,18 @@ CONFIG_IP_NF_MANGLE=m
343CONFIG_NF_CONNTRACK_IPV6=m 379CONFIG_NF_CONNTRACK_IPV6=m
344CONFIG_IP6_NF_IPTABLES=m 380CONFIG_IP6_NF_IPTABLES=m
345CONFIG_IP6_NF_MATCH_IPV6HEADER=m 381CONFIG_IP6_NF_MATCH_IPV6HEADER=m
346CONFIG_IP6_NF_FILTER=m
347CONFIG_IP6_NF_TARGET_LOG=m 382CONFIG_IP6_NF_TARGET_LOG=m
383CONFIG_IP6_NF_FILTER=m
348CONFIG_IP6_NF_TARGET_REJECT=m 384CONFIG_IP6_NF_TARGET_REJECT=m
349CONFIG_IP6_NF_MANGLE=m 385CONFIG_IP6_NF_MANGLE=m
350# CONFIG_IP_DCCP is not set 386# CONFIG_IP_DCCP is not set
351# CONFIG_IP_SCTP is not set 387# CONFIG_IP_SCTP is not set
388# CONFIG_RDS is not set
352# CONFIG_TIPC is not set 389# CONFIG_TIPC is not set
353# CONFIG_ATM is not set 390# CONFIG_ATM is not set
354CONFIG_STP=m 391CONFIG_STP=m
355CONFIG_BRIDGE=m 392CONFIG_BRIDGE=m
393# CONFIG_NET_DSA is not set
356CONFIG_VLAN_8021Q=m 394CONFIG_VLAN_8021Q=m
357# CONFIG_VLAN_8021Q_GVRP is not set 395# CONFIG_VLAN_8021Q_GVRP is not set
358# CONFIG_DECNET is not set 396# CONFIG_DECNET is not set
@@ -364,26 +402,33 @@ CONFIG_LLC=m
364# CONFIG_LAPB is not set 402# CONFIG_LAPB is not set
365# CONFIG_ECONET is not set 403# CONFIG_ECONET is not set
366# CONFIG_WAN_ROUTER is not set 404# CONFIG_WAN_ROUTER is not set
405# CONFIG_PHONET is not set
406# CONFIG_IEEE802154 is not set
367# CONFIG_NET_SCHED is not set 407# CONFIG_NET_SCHED is not set
408# CONFIG_DCB is not set
368 409
369# 410#
370# Network testing 411# Network testing
371# 412#
372# CONFIG_NET_PKTGEN is not set 413# CONFIG_NET_PKTGEN is not set
373# CONFIG_NET_TCPPROBE is not set 414# CONFIG_NET_TCPPROBE is not set
415# CONFIG_NET_DROP_MONITOR is not set
374# CONFIG_HAMRADIO is not set 416# CONFIG_HAMRADIO is not set
375# CONFIG_CAN is not set 417# CONFIG_CAN is not set
376# CONFIG_IRDA is not set 418# CONFIG_IRDA is not set
377# CONFIG_BT is not set 419# CONFIG_BT is not set
378# CONFIG_AF_RXRPC is not set 420# CONFIG_AF_RXRPC is not set
421CONFIG_WIRELESS=y
422# CONFIG_CFG80211 is not set
423CONFIG_CFG80211_DEFAULT_PS_VALUE=0
424# CONFIG_WIRELESS_OLD_REGULATORY is not set
425# CONFIG_WIRELESS_EXT is not set
426# CONFIG_LIB80211 is not set
379 427
380# 428#
381# Wireless 429# CFG80211 needs to be enabled for MAC80211
382# 430#
383# CONFIG_CFG80211 is not set 431# CONFIG_WIMAX is not set
384# CONFIG_WIRELESS_EXT is not set
385# CONFIG_MAC80211 is not set
386# CONFIG_IEEE80211 is not set
387# CONFIG_RFKILL is not set 432# CONFIG_RFKILL is not set
388# CONFIG_NET_9P is not set 433# CONFIG_NET_9P is not set
389 434
@@ -395,6 +440,7 @@ CONFIG_LLC=m
395# Generic Driver Options 440# Generic Driver Options
396# 441#
397CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 442CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
443# CONFIG_DEVTMPFS is not set
398CONFIG_STANDALONE=y 444CONFIG_STANDALONE=y
399# CONFIG_PREVENT_FIRMWARE_BUILD is not set 445# CONFIG_PREVENT_FIRMWARE_BUILD is not set
400# CONFIG_FW_LOADER is not set 446# CONFIG_FW_LOADER is not set
@@ -404,6 +450,7 @@ CONFIG_STANDALONE=y
404# CONFIG_CONNECTOR is not set 450# CONFIG_CONNECTOR is not set
405CONFIG_MTD=y 451CONFIG_MTD=y
406# CONFIG_MTD_DEBUG is not set 452# CONFIG_MTD_DEBUG is not set
453# CONFIG_MTD_TESTS is not set
407# CONFIG_MTD_CONCAT is not set 454# CONFIG_MTD_CONCAT is not set
408CONFIG_MTD_PARTITIONS=y 455CONFIG_MTD_PARTITIONS=y
409# CONFIG_MTD_REDBOOT_PARTS is not set 456# CONFIG_MTD_REDBOOT_PARTS is not set
@@ -453,16 +500,17 @@ CONFIG_MTD_CFI_UTIL=y
453# 500#
454# CONFIG_MTD_COMPLEX_MAPPINGS is not set 501# CONFIG_MTD_COMPLEX_MAPPINGS is not set
455CONFIG_MTD_PHYSMAP=y 502CONFIG_MTD_PHYSMAP=y
456CONFIG_MTD_PHYSMAP_START=0x80000000 503# CONFIG_MTD_PHYSMAP_COMPAT is not set
457CONFIG_MTD_PHYSMAP_LEN=0x0
458CONFIG_MTD_PHYSMAP_BANKWIDTH=2
459# CONFIG_MTD_PLATRAM is not set 504# CONFIG_MTD_PLATRAM is not set
460 505
461# 506#
462# Self-contained MTD device drivers 507# Self-contained MTD device drivers
463# 508#
464CONFIG_MTD_DATAFLASH=y 509CONFIG_MTD_DATAFLASH=y
510# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
511# CONFIG_MTD_DATAFLASH_OTP is not set
465# CONFIG_MTD_M25P80 is not set 512# CONFIG_MTD_M25P80 is not set
513# CONFIG_MTD_SST25L is not set
466# CONFIG_MTD_SLRAM is not set 514# CONFIG_MTD_SLRAM is not set
467# CONFIG_MTD_PHRAM is not set 515# CONFIG_MTD_PHRAM is not set
468# CONFIG_MTD_MTDRAM is not set 516# CONFIG_MTD_MTDRAM is not set
@@ -478,9 +526,22 @@ CONFIG_MTD_DATAFLASH=y
478# CONFIG_MTD_ONENAND is not set 526# CONFIG_MTD_ONENAND is not set
479 527
480# 528#
529# LPDDR flash memory drivers
530#
531# CONFIG_MTD_LPDDR is not set
532
533#
481# UBI - Unsorted block images 534# UBI - Unsorted block images
482# 535#
483# CONFIG_MTD_UBI is not set 536CONFIG_MTD_UBI=y
537CONFIG_MTD_UBI_WL_THRESHOLD=4096
538CONFIG_MTD_UBI_BEB_RESERVE=1
539# CONFIG_MTD_UBI_GLUEBI is not set
540
541#
542# UBI debugging options
543#
544# CONFIG_MTD_UBI_DEBUG is not set
484# CONFIG_PARPORT is not set 545# CONFIG_PARPORT is not set
485CONFIG_BLK_DEV=y 546CONFIG_BLK_DEV=y
486# CONFIG_BLK_DEV_COW_COMMON is not set 547# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -498,10 +559,20 @@ CONFIG_MISC_DEVICES=y
498CONFIG_ATMEL_TCLIB=y 559CONFIG_ATMEL_TCLIB=y
499CONFIG_ATMEL_TCB_CLKSRC=y 560CONFIG_ATMEL_TCB_CLKSRC=y
500CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 561CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
501# CONFIG_EEPROM_93CX6 is not set 562# CONFIG_ICS932S401 is not set
502# CONFIG_ATMEL_SSC is not set 563# CONFIG_ATMEL_SSC is not set
503# CONFIG_ENCLOSURE_SERVICES is not set 564# CONFIG_ENCLOSURE_SERVICES is not set
504# CONFIG_HAVE_IDE is not set 565# CONFIG_ISL29003 is not set
566# CONFIG_C2PORT is not set
567
568#
569# EEPROM support
570#
571CONFIG_EEPROM_AT24=m
572# CONFIG_EEPROM_AT25 is not set
573# CONFIG_EEPROM_LEGACY is not set
574# CONFIG_EEPROM_MAX6875 is not set
575# CONFIG_EEPROM_93CX6 is not set
505 576
506# 577#
507# SCSI device support 578# SCSI device support
@@ -534,26 +605,37 @@ CONFIG_PHYLIB=y
534# CONFIG_BROADCOM_PHY is not set 605# CONFIG_BROADCOM_PHY is not set
535# CONFIG_ICPLUS_PHY is not set 606# CONFIG_ICPLUS_PHY is not set
536# CONFIG_REALTEK_PHY is not set 607# CONFIG_REALTEK_PHY is not set
608# CONFIG_NATIONAL_PHY is not set
609# CONFIG_STE10XP is not set
610# CONFIG_LSI_ET1011C_PHY is not set
537# CONFIG_FIXED_PHY is not set 611# CONFIG_FIXED_PHY is not set
538# CONFIG_MDIO_BITBANG is not set 612# CONFIG_MDIO_BITBANG is not set
539CONFIG_NET_ETHERNET=y 613CONFIG_NET_ETHERNET=y
540# CONFIG_MII is not set 614# CONFIG_MII is not set
541CONFIG_MACB=y 615CONFIG_MACB=y
542# CONFIG_ENC28J60 is not set 616# CONFIG_ENC28J60 is not set
617# CONFIG_ETHOC is not set
618# CONFIG_DNET is not set
543# CONFIG_IBM_NEW_EMAC_ZMII is not set 619# CONFIG_IBM_NEW_EMAC_ZMII is not set
544# CONFIG_IBM_NEW_EMAC_RGMII is not set 620# CONFIG_IBM_NEW_EMAC_RGMII is not set
545# CONFIG_IBM_NEW_EMAC_TAH is not set 621# CONFIG_IBM_NEW_EMAC_TAH is not set
546# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 622# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
623# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
624# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
625# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
547# CONFIG_B44 is not set 626# CONFIG_B44 is not set
627# CONFIG_KS8842 is not set
628# CONFIG_KS8851 is not set
629# CONFIG_KS8851_MLL is not set
548# CONFIG_NETDEV_1000 is not set 630# CONFIG_NETDEV_1000 is not set
549# CONFIG_NETDEV_10000 is not set 631# CONFIG_NETDEV_10000 is not set
632CONFIG_WLAN=y
633# CONFIG_WLAN_PRE80211 is not set
634# CONFIG_WLAN_80211 is not set
550 635
551# 636#
552# Wireless LAN 637# Enable WiMAX (Networking options) to see the WiMAX drivers
553# 638#
554# CONFIG_WLAN_PRE80211 is not set
555# CONFIG_WLAN_80211 is not set
556# CONFIG_IWLWIFI_LEDS is not set
557# CONFIG_WAN is not set 639# CONFIG_WAN is not set
558CONFIG_PPP=m 640CONFIG_PPP=m
559# CONFIG_PPP_MULTILINK is not set 641# CONFIG_PPP_MULTILINK is not set
@@ -603,9 +685,11 @@ CONFIG_SERIAL_ATMEL=y
603CONFIG_SERIAL_ATMEL_CONSOLE=y 685CONFIG_SERIAL_ATMEL_CONSOLE=y
604CONFIG_SERIAL_ATMEL_PDC=y 686CONFIG_SERIAL_ATMEL_PDC=y
605# CONFIG_SERIAL_ATMEL_TTYAT is not set 687# CONFIG_SERIAL_ATMEL_TTYAT is not set
688# CONFIG_SERIAL_MAX3100 is not set
606CONFIG_SERIAL_CORE=y 689CONFIG_SERIAL_CORE=y
607CONFIG_SERIAL_CORE_CONSOLE=y 690CONFIG_SERIAL_CORE_CONSOLE=y
608CONFIG_UNIX98_PTYS=y 691CONFIG_UNIX98_PTYS=y
692# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
609# CONFIG_LEGACY_PTYS is not set 693# CONFIG_LEGACY_PTYS is not set
610# CONFIG_IPMI_HANDLER is not set 694# CONFIG_IPMI_HANDLER is not set
611# CONFIG_HW_RANDOM is not set 695# CONFIG_HW_RANDOM is not set
@@ -614,7 +698,9 @@ CONFIG_UNIX98_PTYS=y
614# CONFIG_TCG_TPM is not set 698# CONFIG_TCG_TPM is not set
615CONFIG_I2C=m 699CONFIG_I2C=m
616CONFIG_I2C_BOARDINFO=y 700CONFIG_I2C_BOARDINFO=y
701CONFIG_I2C_COMPAT=y
617CONFIG_I2C_CHARDEV=m 702CONFIG_I2C_CHARDEV=m
703CONFIG_I2C_HELPER_AUTO=y
618CONFIG_I2C_ALGOBIT=m 704CONFIG_I2C_ALGOBIT=m
619 705
620# 706#
@@ -624,6 +710,7 @@ CONFIG_I2C_ALGOBIT=m
624# 710#
625# I2C system bus drivers (mostly embedded / system-on-chip) 711# I2C system bus drivers (mostly embedded / system-on-chip)
626# 712#
713# CONFIG_I2C_DESIGNWARE is not set
627CONFIG_I2C_GPIO=m 714CONFIG_I2C_GPIO=m
628# CONFIG_I2C_OCORES is not set 715# CONFIG_I2C_OCORES is not set
629# CONFIG_I2C_SIMTEC is not set 716# CONFIG_I2C_SIMTEC is not set
@@ -644,14 +731,6 @@ CONFIG_I2C_GPIO=m
644# Miscellaneous I2C Chip support 731# Miscellaneous I2C Chip support
645# 732#
646# CONFIG_DS1682 is not set 733# CONFIG_DS1682 is not set
647CONFIG_EEPROM_AT24=m
648# CONFIG_EEPROM_LEGACY is not set
649# CONFIG_SENSORS_PCF8574 is not set
650# CONFIG_PCF8575 is not set
651# CONFIG_SENSORS_PCA9539 is not set
652# CONFIG_SENSORS_PCF8591 is not set
653# CONFIG_TPS65010 is not set
654# CONFIG_SENSORS_MAX6875 is not set
655# CONFIG_SENSORS_TSL2550 is not set 734# CONFIG_SENSORS_TSL2550 is not set
656# CONFIG_I2C_DEBUG_CORE is not set 735# CONFIG_I2C_DEBUG_CORE is not set
657# CONFIG_I2C_DEBUG_ALGO is not set 736# CONFIG_I2C_DEBUG_ALGO is not set
@@ -666,19 +745,28 @@ CONFIG_SPI_MASTER=y
666# 745#
667CONFIG_SPI_ATMEL=y 746CONFIG_SPI_ATMEL=y
668# CONFIG_SPI_BITBANG is not set 747# CONFIG_SPI_BITBANG is not set
748# CONFIG_SPI_GPIO is not set
669 749
670# 750#
671# SPI Protocol Masters 751# SPI Protocol Masters
672# 752#
673# CONFIG_EEPROM_AT25 is not set
674CONFIG_SPI_SPIDEV=m 753CONFIG_SPI_SPIDEV=m
675# CONFIG_SPI_TLE62X0 is not set 754# CONFIG_SPI_TLE62X0 is not set
755
756#
757# PPS support
758#
759# CONFIG_PPS is not set
676CONFIG_ARCH_REQUIRE_GPIOLIB=y 760CONFIG_ARCH_REQUIRE_GPIOLIB=y
677CONFIG_GPIOLIB=y 761CONFIG_GPIOLIB=y
678# CONFIG_DEBUG_GPIO is not set 762# CONFIG_DEBUG_GPIO is not set
679CONFIG_GPIO_SYSFS=y 763CONFIG_GPIO_SYSFS=y
680 764
681# 765#
766# Memory mapped GPIO expanders:
767#
768
769#
682# I2C GPIO expanders: 770# I2C GPIO expanders:
683# 771#
684# CONFIG_GPIO_MAX732X is not set 772# CONFIG_GPIO_MAX732X is not set
@@ -694,11 +782,15 @@ CONFIG_GPIO_SYSFS=y
694# 782#
695# CONFIG_GPIO_MAX7301 is not set 783# CONFIG_GPIO_MAX7301 is not set
696# CONFIG_GPIO_MCP23S08 is not set 784# CONFIG_GPIO_MCP23S08 is not set
785# CONFIG_GPIO_MC33880 is not set
786
787#
788# AC97 GPIO expanders:
789#
697# CONFIG_W1 is not set 790# CONFIG_W1 is not set
698# CONFIG_POWER_SUPPLY is not set 791# CONFIG_POWER_SUPPLY is not set
699# CONFIG_HWMON is not set 792# CONFIG_HWMON is not set
700# CONFIG_THERMAL is not set 793# CONFIG_THERMAL is not set
701# CONFIG_THERMAL_HWMON is not set
702CONFIG_WATCHDOG=y 794CONFIG_WATCHDOG=y
703# CONFIG_WATCHDOG_NOWAYOUT is not set 795# CONFIG_WATCHDOG_NOWAYOUT is not set
704 796
@@ -707,11 +799,11 @@ CONFIG_WATCHDOG=y
707# 799#
708# CONFIG_SOFT_WATCHDOG is not set 800# CONFIG_SOFT_WATCHDOG is not set
709CONFIG_AT32AP700X_WDT=y 801CONFIG_AT32AP700X_WDT=y
802CONFIG_SSB_POSSIBLE=y
710 803
711# 804#
712# Sonics Silicon Backplane 805# Sonics Silicon Backplane
713# 806#
714CONFIG_SSB_POSSIBLE=y
715# CONFIG_SSB is not set 807# CONFIG_SSB is not set
716 808
717# 809#
@@ -720,22 +812,17 @@ CONFIG_SSB_POSSIBLE=y
720# CONFIG_MFD_CORE is not set 812# CONFIG_MFD_CORE is not set
721# CONFIG_MFD_SM501 is not set 813# CONFIG_MFD_SM501 is not set
722# CONFIG_HTC_PASIC3 is not set 814# CONFIG_HTC_PASIC3 is not set
723 815# CONFIG_TPS65010 is not set
724# 816# CONFIG_MFD_TMIO is not set
725# Multimedia devices 817# CONFIG_MFD_WM8400 is not set
726# 818# CONFIG_MFD_WM831X is not set
727 819# CONFIG_MFD_WM8350_I2C is not set
728# 820# CONFIG_MFD_PCF50633 is not set
729# Multimedia core support 821# CONFIG_MFD_MC13783 is not set
730# 822# CONFIG_AB3100_CORE is not set
731# CONFIG_VIDEO_DEV is not set 823# CONFIG_EZX_PCAP is not set
732# CONFIG_DVB_CORE is not set 824# CONFIG_REGULATOR is not set
733# CONFIG_VIDEO_MEDIA is not set 825# CONFIG_MEDIA_SUPPORT is not set
734
735#
736# Multimedia drivers
737#
738# CONFIG_DAB is not set
739 826
740# 827#
741# Graphics support 828# Graphics support
@@ -756,32 +843,43 @@ CONFIG_USB_SUPPORT=y
756# CONFIG_USB_ARCH_HAS_EHCI is not set 843# CONFIG_USB_ARCH_HAS_EHCI is not set
757# CONFIG_USB_OTG_WHITELIST is not set 844# CONFIG_USB_OTG_WHITELIST is not set
758# CONFIG_USB_OTG_BLACKLIST_HUB is not set 845# CONFIG_USB_OTG_BLACKLIST_HUB is not set
846# CONFIG_USB_GADGET_MUSB_HDRC is not set
759 847
760# 848#
761# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 849# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
762# 850#
763CONFIG_USB_GADGET=y 851CONFIG_USB_GADGET=y
764# CONFIG_USB_GADGET_DEBUG is not set 852# CONFIG_USB_GADGET_DEBUG is not set
765# CONFIG_USB_GADGET_DEBUG_FILES is not set 853# CONFIG_USB_GADGET_DEBUG_FILES is not set
854# CONFIG_USB_GADGET_DEBUG_FS is not set
855CONFIG_USB_GADGET_VBUS_DRAW=2
766CONFIG_USB_GADGET_SELECTED=y 856CONFIG_USB_GADGET_SELECTED=y
767# CONFIG_USB_GADGET_AMD5536UDC is not set 857# CONFIG_USB_GADGET_AT91 is not set
768CONFIG_USB_GADGET_ATMEL_USBA=y 858CONFIG_USB_GADGET_ATMEL_USBA=y
769CONFIG_USB_ATMEL_USBA=y 859CONFIG_USB_ATMEL_USBA=y
770# CONFIG_USB_GADGET_FSL_USB2 is not set 860# CONFIG_USB_GADGET_FSL_USB2 is not set
771# CONFIG_USB_GADGET_NET2280 is not set
772# CONFIG_USB_GADGET_PXA25X is not set
773# CONFIG_USB_GADGET_M66592 is not set
774# CONFIG_USB_GADGET_PXA27X is not set
775# CONFIG_USB_GADGET_GOKU is not set
776# CONFIG_USB_GADGET_LH7A40X is not set 861# CONFIG_USB_GADGET_LH7A40X is not set
777# CONFIG_USB_GADGET_OMAP is not set 862# CONFIG_USB_GADGET_OMAP is not set
863# CONFIG_USB_GADGET_PXA25X is not set
864# CONFIG_USB_GADGET_R8A66597 is not set
865# CONFIG_USB_GADGET_PXA27X is not set
866# CONFIG_USB_GADGET_S3C_HSOTG is not set
867# CONFIG_USB_GADGET_IMX is not set
778# CONFIG_USB_GADGET_S3C2410 is not set 868# CONFIG_USB_GADGET_S3C2410 is not set
779# CONFIG_USB_GADGET_AT91 is not set 869# CONFIG_USB_GADGET_M66592 is not set
870# CONFIG_USB_GADGET_AMD5536UDC is not set
871# CONFIG_USB_GADGET_FSL_QE is not set
872# CONFIG_USB_GADGET_CI13XXX is not set
873# CONFIG_USB_GADGET_NET2280 is not set
874# CONFIG_USB_GADGET_GOKU is not set
875# CONFIG_USB_GADGET_LANGWELL is not set
780# CONFIG_USB_GADGET_DUMMY_HCD is not set 876# CONFIG_USB_GADGET_DUMMY_HCD is not set
781CONFIG_USB_GADGET_DUALSPEED=y 877CONFIG_USB_GADGET_DUALSPEED=y
782CONFIG_USB_ZERO=m 878CONFIG_USB_ZERO=m
879# CONFIG_USB_AUDIO is not set
783CONFIG_USB_ETH=m 880CONFIG_USB_ETH=m
784CONFIG_USB_ETH_RNDIS=y 881CONFIG_USB_ETH_RNDIS=y
882# CONFIG_USB_ETH_EEM is not set
785CONFIG_USB_GADGETFS=m 883CONFIG_USB_GADGETFS=m
786CONFIG_USB_FILE_STORAGE=m 884CONFIG_USB_FILE_STORAGE=m
787# CONFIG_USB_FILE_STORAGE_TEST is not set 885# CONFIG_USB_FILE_STORAGE_TEST is not set
@@ -789,12 +887,18 @@ CONFIG_USB_G_SERIAL=m
789# CONFIG_USB_MIDI_GADGET is not set 887# CONFIG_USB_MIDI_GADGET is not set
790# CONFIG_USB_G_PRINTER is not set 888# CONFIG_USB_G_PRINTER is not set
791CONFIG_USB_CDC_COMPOSITE=m 889CONFIG_USB_CDC_COMPOSITE=m
890
891#
892# OTG and related infrastructure
893#
894# CONFIG_USB_GPIO_VBUS is not set
895# CONFIG_NOP_USB_XCEIV is not set
792CONFIG_MMC=y 896CONFIG_MMC=y
793# CONFIG_MMC_DEBUG is not set 897# CONFIG_MMC_DEBUG is not set
794# CONFIG_MMC_UNSAFE_RESUME is not set 898# CONFIG_MMC_UNSAFE_RESUME is not set
795 899
796# 900#
797# MMC/SD Card Drivers 901# MMC/SD/SDIO Card Drivers
798# 902#
799CONFIG_MMC_BLOCK=y 903CONFIG_MMC_BLOCK=y
800CONFIG_MMC_BLOCK_BOUNCE=y 904CONFIG_MMC_BLOCK_BOUNCE=y
@@ -802,10 +906,12 @@ CONFIG_MMC_BLOCK_BOUNCE=y
802CONFIG_MMC_TEST=m 906CONFIG_MMC_TEST=m
803 907
804# 908#
805# MMC/SD Host Controller Drivers 909# MMC/SD/SDIO Host Controller Drivers
806# 910#
807# CONFIG_MMC_SDHCI is not set 911# CONFIG_MMC_SDHCI is not set
912# CONFIG_MMC_AT91 is not set
808CONFIG_MMC_ATMELMCI=y 913CONFIG_MMC_ATMELMCI=y
914# CONFIG_MMC_ATMELMCI_DMA is not set
809CONFIG_MMC_SPI=m 915CONFIG_MMC_SPI=m
810# CONFIG_MEMSTICK is not set 916# CONFIG_MEMSTICK is not set
811CONFIG_NEW_LEDS=y 917CONFIG_NEW_LEDS=y
@@ -815,7 +921,11 @@ CONFIG_LEDS_CLASS=y
815# LED drivers 921# LED drivers
816# 922#
817CONFIG_LEDS_GPIO=y 923CONFIG_LEDS_GPIO=y
924CONFIG_LEDS_GPIO_PLATFORM=y
925# CONFIG_LEDS_LP3944 is not set
818# CONFIG_LEDS_PCA955X is not set 926# CONFIG_LEDS_PCA955X is not set
927# CONFIG_LEDS_DAC124S085 is not set
928# CONFIG_LEDS_BD2802 is not set
819 929
820# 930#
821# LED Triggers 931# LED Triggers
@@ -823,7 +933,13 @@ CONFIG_LEDS_GPIO=y
823CONFIG_LEDS_TRIGGERS=y 933CONFIG_LEDS_TRIGGERS=y
824CONFIG_LEDS_TRIGGER_TIMER=y 934CONFIG_LEDS_TRIGGER_TIMER=y
825CONFIG_LEDS_TRIGGER_HEARTBEAT=y 935CONFIG_LEDS_TRIGGER_HEARTBEAT=y
936# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
937# CONFIG_LEDS_TRIGGER_GPIO is not set
826CONFIG_LEDS_TRIGGER_DEFAULT_ON=y 938CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
939
940#
941# iptables trigger is under Netfilter config (LED target)
942#
827# CONFIG_ACCESSIBILITY is not set 943# CONFIG_ACCESSIBILITY is not set
828CONFIG_RTC_LIB=y 944CONFIG_RTC_LIB=y
829CONFIG_RTC_CLASS=y 945CONFIG_RTC_CLASS=y
@@ -855,25 +971,33 @@ CONFIG_RTC_INTF_DEV=y
855# CONFIG_RTC_DRV_M41T80 is not set 971# CONFIG_RTC_DRV_M41T80 is not set
856# CONFIG_RTC_DRV_S35390A is not set 972# CONFIG_RTC_DRV_S35390A is not set
857# CONFIG_RTC_DRV_FM3130 is not set 973# CONFIG_RTC_DRV_FM3130 is not set
974# CONFIG_RTC_DRV_RX8581 is not set
975# CONFIG_RTC_DRV_RX8025 is not set
858 976
859# 977#
860# SPI RTC drivers 978# SPI RTC drivers
861# 979#
862# CONFIG_RTC_DRV_M41T94 is not set 980# CONFIG_RTC_DRV_M41T94 is not set
863# CONFIG_RTC_DRV_DS1305 is not set 981# CONFIG_RTC_DRV_DS1305 is not set
982# CONFIG_RTC_DRV_DS1390 is not set
864# CONFIG_RTC_DRV_MAX6902 is not set 983# CONFIG_RTC_DRV_MAX6902 is not set
865# CONFIG_RTC_DRV_R9701 is not set 984# CONFIG_RTC_DRV_R9701 is not set
866# CONFIG_RTC_DRV_RS5C348 is not set 985# CONFIG_RTC_DRV_RS5C348 is not set
986# CONFIG_RTC_DRV_DS3234 is not set
987# CONFIG_RTC_DRV_PCF2123 is not set
867 988
868# 989#
869# Platform RTC drivers 990# Platform RTC drivers
870# 991#
992# CONFIG_RTC_DRV_DS1286 is not set
871# CONFIG_RTC_DRV_DS1511 is not set 993# CONFIG_RTC_DRV_DS1511 is not set
872# CONFIG_RTC_DRV_DS1553 is not set 994# CONFIG_RTC_DRV_DS1553 is not set
873# CONFIG_RTC_DRV_DS1742 is not set 995# CONFIG_RTC_DRV_DS1742 is not set
874# CONFIG_RTC_DRV_STK17TA8 is not set 996# CONFIG_RTC_DRV_STK17TA8 is not set
875# CONFIG_RTC_DRV_M48T86 is not set 997# CONFIG_RTC_DRV_M48T86 is not set
998# CONFIG_RTC_DRV_M48T35 is not set
876# CONFIG_RTC_DRV_M48T59 is not set 999# CONFIG_RTC_DRV_M48T59 is not set
1000# CONFIG_RTC_DRV_BQ4802 is not set
877# CONFIG_RTC_DRV_V3020 is not set 1001# CONFIG_RTC_DRV_V3020 is not set
878 1002
879# 1003#
@@ -892,24 +1016,38 @@ CONFIG_DMA_ENGINE=y
892# DMA Clients 1016# DMA Clients
893# 1017#
894# CONFIG_NET_DMA is not set 1018# CONFIG_NET_DMA is not set
1019# CONFIG_ASYNC_TX_DMA is not set
895# CONFIG_DMATEST is not set 1020# CONFIG_DMATEST is not set
1021# CONFIG_AUXDISPLAY is not set
896# CONFIG_UIO is not set 1022# CONFIG_UIO is not set
897 1023
898# 1024#
1025# TI VLYNQ
1026#
1027# CONFIG_STAGING is not set
1028
1029#
899# File systems 1030# File systems
900# 1031#
901CONFIG_EXT2_FS=m 1032CONFIG_EXT2_FS=y
902# CONFIG_EXT2_FS_XATTR is not set 1033# CONFIG_EXT2_FS_XATTR is not set
903# CONFIG_EXT2_FS_XIP is not set 1034# CONFIG_EXT2_FS_XIP is not set
904CONFIG_EXT3_FS=m 1035CONFIG_EXT3_FS=y
1036# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
905# CONFIG_EXT3_FS_XATTR is not set 1037# CONFIG_EXT3_FS_XATTR is not set
906# CONFIG_EXT4DEV_FS is not set 1038# CONFIG_EXT4_FS is not set
907CONFIG_JBD=m 1039CONFIG_JBD=y
1040# CONFIG_JBD_DEBUG is not set
908# CONFIG_REISERFS_FS is not set 1041# CONFIG_REISERFS_FS is not set
909# CONFIG_JFS_FS is not set 1042# CONFIG_JFS_FS is not set
910# CONFIG_FS_POSIX_ACL is not set 1043# CONFIG_FS_POSIX_ACL is not set
911# CONFIG_XFS_FS is not set 1044# CONFIG_XFS_FS is not set
1045# CONFIG_GFS2_FS is not set
912# CONFIG_OCFS2_FS is not set 1046# CONFIG_OCFS2_FS is not set
1047# CONFIG_BTRFS_FS is not set
1048# CONFIG_NILFS2_FS is not set
1049CONFIG_FILE_LOCKING=y
1050CONFIG_FSNOTIFY=y
913# CONFIG_DNOTIFY is not set 1051# CONFIG_DNOTIFY is not set
914CONFIG_INOTIFY=y 1052CONFIG_INOTIFY=y
915CONFIG_INOTIFY_USER=y 1053CONFIG_INOTIFY_USER=y
@@ -917,6 +1055,12 @@ CONFIG_INOTIFY_USER=y
917# CONFIG_AUTOFS_FS is not set 1055# CONFIG_AUTOFS_FS is not set
918# CONFIG_AUTOFS4_FS is not set 1056# CONFIG_AUTOFS4_FS is not set
919CONFIG_FUSE_FS=m 1057CONFIG_FUSE_FS=m
1058# CONFIG_CUSE is not set
1059
1060#
1061# Caches
1062#
1063# CONFIG_FSCACHE is not set
920 1064
921# 1065#
922# CD-ROM/DVD Filesystems 1066# CD-ROM/DVD Filesystems
@@ -940,15 +1084,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
940CONFIG_PROC_FS=y 1084CONFIG_PROC_FS=y
941# CONFIG_PROC_KCORE is not set 1085# CONFIG_PROC_KCORE is not set
942CONFIG_PROC_SYSCTL=y 1086CONFIG_PROC_SYSCTL=y
1087CONFIG_PROC_PAGE_MONITOR=y
943CONFIG_SYSFS=y 1088CONFIG_SYSFS=y
944CONFIG_TMPFS=y 1089CONFIG_TMPFS=y
945# CONFIG_TMPFS_POSIX_ACL is not set 1090# CONFIG_TMPFS_POSIX_ACL is not set
946# CONFIG_HUGETLB_PAGE is not set 1091# CONFIG_HUGETLB_PAGE is not set
947CONFIG_CONFIGFS_FS=m 1092CONFIG_CONFIGFS_FS=m
948 1093CONFIG_MISC_FILESYSTEMS=y
949#
950# Miscellaneous filesystems
951#
952# CONFIG_ADFS_FS is not set 1094# CONFIG_ADFS_FS is not set
953# CONFIG_AFFS_FS is not set 1095# CONFIG_AFFS_FS is not set
954# CONFIG_HFS_FS is not set 1096# CONFIG_HFS_FS is not set
@@ -967,7 +1109,9 @@ CONFIG_JFFS2_ZLIB=y
967# CONFIG_JFFS2_LZO is not set 1109# CONFIG_JFFS2_LZO is not set
968CONFIG_JFFS2_RTIME=y 1110CONFIG_JFFS2_RTIME=y
969# CONFIG_JFFS2_RUBIN is not set 1111# CONFIG_JFFS2_RUBIN is not set
1112# CONFIG_UBIFS_FS is not set
970# CONFIG_CRAMFS is not set 1113# CONFIG_CRAMFS is not set
1114# CONFIG_SQUASHFS is not set
971# CONFIG_VXFS_FS is not set 1115# CONFIG_VXFS_FS is not set
972# CONFIG_MINIX_FS is not set 1116# CONFIG_MINIX_FS is not set
973# CONFIG_OMFS_FS is not set 1117# CONFIG_OMFS_FS is not set
@@ -975,7 +1119,9 @@ CONFIG_JFFS2_RTIME=y
975# CONFIG_QNX4FS_FS is not set 1119# CONFIG_QNX4FS_FS is not set
976# CONFIG_ROMFS_FS is not set 1120# CONFIG_ROMFS_FS is not set
977# CONFIG_SYSV_FS is not set 1121# CONFIG_SYSV_FS is not set
978# CONFIG_UFS_FS is not set 1122CONFIG_UFS_FS=y
1123# CONFIG_UFS_FS_WRITE is not set
1124# CONFIG_UFS_DEBUG is not set
979CONFIG_NETWORK_FILESYSTEMS=y 1125CONFIG_NETWORK_FILESYSTEMS=y
980CONFIG_NFS_FS=y 1126CONFIG_NFS_FS=y
981CONFIG_NFS_V3=y 1127CONFIG_NFS_V3=y
@@ -1060,14 +1206,18 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1060CONFIG_ENABLE_MUST_CHECK=y 1206CONFIG_ENABLE_MUST_CHECK=y
1061CONFIG_FRAME_WARN=1024 1207CONFIG_FRAME_WARN=1024
1062CONFIG_MAGIC_SYSRQ=y 1208CONFIG_MAGIC_SYSRQ=y
1209# CONFIG_STRIP_ASM_SYMS is not set
1063# CONFIG_UNUSED_SYMBOLS is not set 1210# CONFIG_UNUSED_SYMBOLS is not set
1064# CONFIG_DEBUG_FS is not set 1211CONFIG_DEBUG_FS=y
1065# CONFIG_HEADERS_CHECK is not set 1212# CONFIG_HEADERS_CHECK is not set
1066CONFIG_DEBUG_KERNEL=y 1213CONFIG_DEBUG_KERNEL=y
1067# CONFIG_DEBUG_SHIRQ is not set 1214# CONFIG_DEBUG_SHIRQ is not set
1068CONFIG_DETECT_SOFTLOCKUP=y 1215CONFIG_DETECT_SOFTLOCKUP=y
1069# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1216# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1070CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1217CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1218CONFIG_DETECT_HUNG_TASK=y
1219# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1220CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1071CONFIG_SCHED_DEBUG=y 1221CONFIG_SCHED_DEBUG=y
1072# CONFIG_SCHEDSTATS is not set 1222# CONFIG_SCHEDSTATS is not set
1073# CONFIG_TIMER_STATS is not set 1223# CONFIG_TIMER_STATS is not set
@@ -1083,6 +1233,7 @@ CONFIG_SCHED_DEBUG=y
1083# CONFIG_LOCK_STAT is not set 1233# CONFIG_LOCK_STAT is not set
1084# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1234# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1085# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1235# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1236CONFIG_STACKTRACE=y
1086# CONFIG_DEBUG_KOBJECT is not set 1237# CONFIG_DEBUG_KOBJECT is not set
1087CONFIG_DEBUG_BUGVERBOSE=y 1238CONFIG_DEBUG_BUGVERBOSE=y
1088# CONFIG_DEBUG_INFO is not set 1239# CONFIG_DEBUG_INFO is not set
@@ -1091,13 +1242,39 @@ CONFIG_DEBUG_BUGVERBOSE=y
1091# CONFIG_DEBUG_MEMORY_INIT is not set 1242# CONFIG_DEBUG_MEMORY_INIT is not set
1092# CONFIG_DEBUG_LIST is not set 1243# CONFIG_DEBUG_LIST is not set
1093# CONFIG_DEBUG_SG is not set 1244# CONFIG_DEBUG_SG is not set
1245# CONFIG_DEBUG_NOTIFIERS is not set
1246# CONFIG_DEBUG_CREDENTIALS is not set
1094CONFIG_FRAME_POINTER=y 1247CONFIG_FRAME_POINTER=y
1095# CONFIG_BOOT_PRINTK_DELAY is not set 1248# CONFIG_BOOT_PRINTK_DELAY is not set
1096# CONFIG_RCU_TORTURE_TEST is not set 1249# CONFIG_RCU_TORTURE_TEST is not set
1250# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1097# CONFIG_KPROBES_SANITY_TEST is not set 1251# CONFIG_KPROBES_SANITY_TEST is not set
1098# CONFIG_BACKTRACE_SELF_TEST is not set 1252# CONFIG_BACKTRACE_SELF_TEST is not set
1253# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1254# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1099# CONFIG_LKDTM is not set 1255# CONFIG_LKDTM is not set
1100# CONFIG_FAULT_INJECTION is not set 1256# CONFIG_FAULT_INJECTION is not set
1257# CONFIG_PAGE_POISONING is not set
1258CONFIG_NOP_TRACER=y
1259CONFIG_RING_BUFFER=y
1260CONFIG_EVENT_TRACING=y
1261CONFIG_CONTEXT_SWITCH_TRACER=y
1262CONFIG_RING_BUFFER_ALLOW_SWAP=y
1263CONFIG_TRACING=y
1264CONFIG_TRACING_SUPPORT=y
1265CONFIG_FTRACE=y
1266# CONFIG_IRQSOFF_TRACER is not set
1267# CONFIG_SCHED_TRACER is not set
1268# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1269# CONFIG_BOOT_TRACER is not set
1270CONFIG_BRANCH_PROFILE_NONE=y
1271# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1272# CONFIG_PROFILE_ALL_BRANCHES is not set
1273# CONFIG_KMEMTRACE is not set
1274# CONFIG_WORKQUEUE_TRACER is not set
1275# CONFIG_BLK_DEV_IO_TRACE is not set
1276# CONFIG_RING_BUFFER_BENCHMARK is not set
1277# CONFIG_DYNAMIC_DEBUG is not set
1101# CONFIG_SAMPLES is not set 1278# CONFIG_SAMPLES is not set
1102 1279
1103# 1280#
@@ -1105,19 +1282,30 @@ CONFIG_FRAME_POINTER=y
1105# 1282#
1106# CONFIG_KEYS is not set 1283# CONFIG_KEYS is not set
1107# CONFIG_SECURITY is not set 1284# CONFIG_SECURITY is not set
1285# CONFIG_SECURITYFS is not set
1108# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1286# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1109CONFIG_CRYPTO=y 1287CONFIG_CRYPTO=y
1110 1288
1111# 1289#
1112# Crypto core or helper 1290# Crypto core or helper
1113# 1291#
1292# CONFIG_CRYPTO_FIPS is not set
1114CONFIG_CRYPTO_ALGAPI=y 1293CONFIG_CRYPTO_ALGAPI=y
1294CONFIG_CRYPTO_ALGAPI2=y
1115CONFIG_CRYPTO_AEAD=y 1295CONFIG_CRYPTO_AEAD=y
1296CONFIG_CRYPTO_AEAD2=y
1116CONFIG_CRYPTO_BLKCIPHER=y 1297CONFIG_CRYPTO_BLKCIPHER=y
1298CONFIG_CRYPTO_BLKCIPHER2=y
1117CONFIG_CRYPTO_HASH=y 1299CONFIG_CRYPTO_HASH=y
1300CONFIG_CRYPTO_HASH2=y
1301CONFIG_CRYPTO_RNG=m
1302CONFIG_CRYPTO_RNG2=y
1303CONFIG_CRYPTO_PCOMP=y
1118CONFIG_CRYPTO_MANAGER=y 1304CONFIG_CRYPTO_MANAGER=y
1305CONFIG_CRYPTO_MANAGER2=y
1119# CONFIG_CRYPTO_GF128MUL is not set 1306# CONFIG_CRYPTO_GF128MUL is not set
1120# CONFIG_CRYPTO_NULL is not set 1307# CONFIG_CRYPTO_NULL is not set
1308CONFIG_CRYPTO_WORKQUEUE=y
1121# CONFIG_CRYPTO_CRYPTD is not set 1309# CONFIG_CRYPTO_CRYPTD is not set
1122CONFIG_CRYPTO_AUTHENC=y 1310CONFIG_CRYPTO_AUTHENC=y
1123# CONFIG_CRYPTO_TEST is not set 1311# CONFIG_CRYPTO_TEST is not set
@@ -1145,11 +1333,13 @@ CONFIG_CRYPTO_PCBC=m
1145# 1333#
1146CONFIG_CRYPTO_HMAC=y 1334CONFIG_CRYPTO_HMAC=y
1147# CONFIG_CRYPTO_XCBC is not set 1335# CONFIG_CRYPTO_XCBC is not set
1336# CONFIG_CRYPTO_VMAC is not set
1148 1337
1149# 1338#
1150# Digest 1339# Digest
1151# 1340#
1152# CONFIG_CRYPTO_CRC32C is not set 1341# CONFIG_CRYPTO_CRC32C is not set
1342# CONFIG_CRYPTO_GHASH is not set
1153# CONFIG_CRYPTO_MD4 is not set 1343# CONFIG_CRYPTO_MD4 is not set
1154CONFIG_CRYPTO_MD5=y 1344CONFIG_CRYPTO_MD5=y
1155# CONFIG_CRYPTO_MICHAEL_MIC is not set 1345# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1166,7 +1356,7 @@ CONFIG_CRYPTO_SHA1=y
1166# 1356#
1167# Ciphers 1357# Ciphers
1168# 1358#
1169# CONFIG_CRYPTO_AES is not set 1359CONFIG_CRYPTO_AES=m
1170# CONFIG_CRYPTO_ANUBIS is not set 1360# CONFIG_CRYPTO_ANUBIS is not set
1171CONFIG_CRYPTO_ARC4=m 1361CONFIG_CRYPTO_ARC4=m
1172# CONFIG_CRYPTO_BLOWFISH is not set 1362# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1186,15 +1376,21 @@ CONFIG_CRYPTO_DES=y
1186# Compression 1376# Compression
1187# 1377#
1188CONFIG_CRYPTO_DEFLATE=y 1378CONFIG_CRYPTO_DEFLATE=y
1379# CONFIG_CRYPTO_ZLIB is not set
1189# CONFIG_CRYPTO_LZO is not set 1380# CONFIG_CRYPTO_LZO is not set
1381
1382#
1383# Random Number Generation
1384#
1385CONFIG_CRYPTO_ANSI_CPRNG=m
1190CONFIG_CRYPTO_HW=y 1386CONFIG_CRYPTO_HW=y
1387CONFIG_BINARY_PRINTF=y
1191 1388
1192# 1389#
1193# Library routines 1390# Library routines
1194# 1391#
1195CONFIG_BITREVERSE=y 1392CONFIG_BITREVERSE=y
1196# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1393CONFIG_GENERIC_FIND_LAST_BIT=y
1197# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1198CONFIG_CRC_CCITT=m 1394CONFIG_CRC_CCITT=m
1199# CONFIG_CRC16 is not set 1395# CONFIG_CRC16 is not set
1200# CONFIG_CRC_T10DIF is not set 1396# CONFIG_CRC_T10DIF is not set
@@ -1204,8 +1400,9 @@ CONFIG_CRC7=m
1204# CONFIG_LIBCRC32C is not set 1400# CONFIG_LIBCRC32C is not set
1205CONFIG_ZLIB_INFLATE=y 1401CONFIG_ZLIB_INFLATE=y
1206CONFIG_ZLIB_DEFLATE=y 1402CONFIG_ZLIB_DEFLATE=y
1403CONFIG_DECOMPRESS_GZIP=y
1207CONFIG_GENERIC_ALLOCATOR=y 1404CONFIG_GENERIC_ALLOCATOR=y
1208CONFIG_PLIST=y
1209CONFIG_HAS_IOMEM=y 1405CONFIG_HAS_IOMEM=y
1210CONFIG_HAS_IOPORT=y 1406CONFIG_HAS_IOPORT=y
1211CONFIG_HAS_DMA=y 1407CONFIG_HAS_DMA=y
1408CONFIG_NLATTR=y
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig
index 86a45b5c9d0d..c732cc397ad0 100644
--- a/arch/avr32/configs/atngw100_evklcd100_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd100_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.6 3# Linux kernel version: 2.6.32-rc5
4# Wed Jun 18 16:06:32 2008 4# Thu Oct 29 09:36:39 2009
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
24 25
25# 26#
26# General setup 27# General setup
@@ -34,22 +35,37 @@ CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
37CONFIG_BSD_PROCESS_ACCT=y 39CONFIG_BSD_PROCESS_ACCT=y
38CONFIG_BSD_PROCESS_ACCT_V3=y 40CONFIG_BSD_PROCESS_ACCT_V3=y
39# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_TREE_RCU=y
48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
41# CONFIG_IKCONFIG is not set 53# CONFIG_IKCONFIG is not set
42CONFIG_LOG_BUF_SHIFT=14 54CONFIG_LOG_BUF_SHIFT=14
43# CONFIG_CGROUPS is not set
44# CONFIG_GROUP_SCHED is not set 55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
45CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
46CONFIG_SYSFS_DEPRECATED_V2=y 58CONFIG_SYSFS_DEPRECATED_V2=y
47# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
48# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
49CONFIG_BLK_DEV_INITRD=y 61CONFIG_BLK_DEV_INITRD=y
50CONFIG_INITRAMFS_SOURCE="" 62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
51CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
53CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
54# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
55CONFIG_KALLSYMS=y 71CONFIG_KALLSYMS=y
@@ -59,43 +75,51 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 75CONFIG_PRINTK=y
60CONFIG_BUG=y 76CONFIG_BUG=y
61CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set
63# CONFIG_BASE_FULL is not set 78# CONFIG_BASE_FULL is not set
64CONFIG_FUTEX=y 79CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y
66CONFIG_EPOLL=y 80CONFIG_EPOLL=y
67CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y 82CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
71CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLUB_DEBUG=y 91CONFIG_SLUB_DEBUG=y
92# CONFIG_COMPAT_BRK is not set
73# CONFIG_SLAB is not set 93# CONFIG_SLAB is not set
74CONFIG_SLUB=y 94CONFIG_SLUB=y
75# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
76CONFIG_PROFILING=y 96CONFIG_PROFILING=y
77# CONFIG_MARKERS is not set 97CONFIG_TRACEPOINTS=y
78CONFIG_OPROFILE=m 98CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y 100CONFIG_KPROBES=y
81CONFIG_HAVE_KPROBES=y 101CONFIG_HAVE_KPROBES=y
82# CONFIG_HAVE_KRETPROBES is not set 102CONFIG_HAVE_CLK=y
83CONFIG_PROC_PAGE_MONITOR=y 103
104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
84CONFIG_SLABINFO=y 110CONFIG_SLABINFO=y
85CONFIG_RT_MUTEXES=y 111CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1 112CONFIG_BASE_SMALL=1
88CONFIG_MODULES=y 113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
89CONFIG_MODULE_UNLOAD=y 115CONFIG_MODULE_UNLOAD=y
90CONFIG_MODULE_FORCE_UNLOAD=y 116CONFIG_MODULE_FORCE_UNLOAD=y
91# CONFIG_MODVERSIONS is not set 117# CONFIG_MODVERSIONS is not set
92# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
93CONFIG_KMOD=y
94CONFIG_BLOCK=y 119CONFIG_BLOCK=y
95# CONFIG_LBD is not set 120CONFIG_LBDAF=y
96# CONFIG_BLK_DEV_IO_TRACE is not set
97# CONFIG_LSF is not set
98# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set
99 123
100# 124#
101# IO Schedulers 125# IO Schedulers
@@ -109,7 +133,7 @@ CONFIG_IOSCHED_CFQ=y
109CONFIG_DEFAULT_CFQ=y 133CONFIG_DEFAULT_CFQ=y
110# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
111CONFIG_DEFAULT_IOSCHED="cfq" 135CONFIG_DEFAULT_IOSCHED="cfq"
112CONFIG_CLASSIC_RCU=y 136CONFIG_FREEZER=y
113 137
114# 138#
115# System Type and features 139# System Type and features
@@ -124,13 +148,26 @@ CONFIG_PERFORMANCE_COUNTERS=y
124CONFIG_PLATFORM_AT32AP=y 148CONFIG_PLATFORM_AT32AP=y
125CONFIG_CPU_AT32AP700X=y 149CONFIG_CPU_AT32AP700X=y
126CONFIG_CPU_AT32AP7000=y 150CONFIG_CPU_AT32AP7000=y
151CONFIG_BOARD_ATNGW100_COMMON=y
127# CONFIG_BOARD_ATSTK1000 is not set 152# CONFIG_BOARD_ATSTK1000 is not set
128CONFIG_BOARD_ATNGW100=y 153CONFIG_BOARD_ATNGW100_MKI=y
154# CONFIG_BOARD_ATNGW100_MKII is not set
155# CONFIG_BOARD_HAMMERHEAD is not set
156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159# CONFIG_BOARD_ATSTK1002 is not set
160# CONFIG_BOARD_ATSTK1003 is not set
161# CONFIG_BOARD_ATSTK1004 is not set
162# CONFIG_BOARD_ATSTK1006 is not set
163# CONFIG_BOARD_ATSTK1000_J2_LED8 is not set
164# CONFIG_BOARD_ATSTK1000_J2_RGB is not set
165# CONFIG_BOARD_ATNGW100_ADDON_NONE is not set
129CONFIG_BOARD_ATNGW100_EVKLCD10X=y 166CONFIG_BOARD_ATNGW100_EVKLCD10X=y
167# CONFIG_BOARD_ATNGW100_MRMT is not set
130CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA=y 168CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA=y
131# CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA is not set 169# CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA is not set
132# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set 170# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set
133CONFIG_BOARD_ATNGW100_I2C_GPIO=y
134CONFIG_LOADER_U_BOOT=y 171CONFIG_LOADER_U_BOOT=y
135 172
136# 173#
@@ -139,14 +176,14 @@ CONFIG_LOADER_U_BOOT=y
139# CONFIG_AP700X_32_BIT_SMC is not set 176# CONFIG_AP700X_32_BIT_SMC is not set
140CONFIG_AP700X_16_BIT_SMC=y 177CONFIG_AP700X_16_BIT_SMC=y
141# CONFIG_AP700X_8_BIT_SMC is not set 178# CONFIG_AP700X_8_BIT_SMC is not set
142CONFIG_GPIO_DEV=y
143CONFIG_LOAD_ADDRESS=0x10000000 179CONFIG_LOAD_ADDRESS=0x10000000
144CONFIG_ENTRY_ADDRESS=0x90000000 180CONFIG_ENTRY_ADDRESS=0x90000000
145CONFIG_PHYS_OFFSET=0x10000000 181CONFIG_PHYS_OFFSET=0x10000000
146CONFIG_PREEMPT_NONE=y 182CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 183# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 184# CONFIG_PREEMPT is not set
149# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 185CONFIG_QUICKLIST=y
186# CONFIG_HAVE_ARCH_BOOTMEM is not set
150# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 187# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
151# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 188# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
152CONFIG_ARCH_FLATMEM_ENABLE=y 189CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -158,33 +195,36 @@ CONFIG_FLATMEM_MANUAL=y
158# CONFIG_SPARSEMEM_MANUAL is not set 195# CONFIG_SPARSEMEM_MANUAL is not set
159CONFIG_FLATMEM=y 196CONFIG_FLATMEM=y
160CONFIG_FLAT_NODE_MEM_MAP=y 197CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 198CONFIG_PAGEFLAGS_EXTENDED=y
162# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 199CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 200# CONFIG_PHYS_ADDR_T_64BIT is not set
165CONFIG_ZONE_DMA_FLAG=0 201CONFIG_ZONE_DMA_FLAG=0
202CONFIG_NR_QUICK=2
166CONFIG_VIRT_TO_BUS=y 203CONFIG_VIRT_TO_BUS=y
204CONFIG_HAVE_MLOCK=y
205CONFIG_HAVE_MLOCKED_PAGE_BIT=y
206# CONFIG_KSM is not set
207CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
167# CONFIG_OWNERSHIP_TRACE is not set 208# CONFIG_OWNERSHIP_TRACE is not set
168CONFIG_NMI_DEBUGGING=y 209CONFIG_NMI_DEBUGGING=y
169CONFIG_DW_DMAC=y
170# CONFIG_HZ_100 is not set 210# CONFIG_HZ_100 is not set
171CONFIG_HZ_250=y 211CONFIG_HZ_250=y
172# CONFIG_HZ_300 is not set 212# CONFIG_HZ_300 is not set
173# CONFIG_HZ_1000 is not set 213# CONFIG_HZ_1000 is not set
174CONFIG_HZ=250 214CONFIG_HZ=250
175# CONFIG_SCHED_HRTICK is not set 215CONFIG_SCHED_HRTICK=y
176CONFIG_CMDLINE="" 216CONFIG_CMDLINE=""
177 217
178# 218#
179# Power management options 219# Power management options
180# 220#
181CONFIG_ARCH_SUSPEND_POSSIBLE=y
182CONFIG_PM=y 221CONFIG_PM=y
183# CONFIG_PM_LEGACY is not set
184# CONFIG_PM_DEBUG is not set 222# CONFIG_PM_DEBUG is not set
185CONFIG_PM_SLEEP=y 223CONFIG_PM_SLEEP=y
186CONFIG_SUSPEND=y 224CONFIG_SUSPEND=y
187CONFIG_SUSPEND_FREEZER=y 225CONFIG_SUSPEND_FREEZER=y
226# CONFIG_PM_RUNTIME is not set
227CONFIG_ARCH_SUSPEND_POSSIBLE=y
188 228
189# 229#
190# CPU Frequency scaling 230# CPU Frequency scaling
@@ -194,6 +234,7 @@ CONFIG_CPU_FREQ_TABLE=y
194# CONFIG_CPU_FREQ_DEBUG is not set 234# CONFIG_CPU_FREQ_DEBUG is not set
195# CONFIG_CPU_FREQ_STAT is not set 235# CONFIG_CPU_FREQ_STAT is not set
196# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set 236# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
237# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
197# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 238# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
198CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 239CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
199# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 240# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -214,11 +255,9 @@ CONFIG_CPU_FREQ_AT32AP=y
214# Executable file formats 255# Executable file formats
215# 256#
216CONFIG_BINFMT_ELF=y 257CONFIG_BINFMT_ELF=y
258# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
259# CONFIG_HAVE_AOUT is not set
217# CONFIG_BINFMT_MISC is not set 260# CONFIG_BINFMT_MISC is not set
218
219#
220# Networking
221#
222CONFIG_NET=y 261CONFIG_NET=y
223 262
224# 263#
@@ -232,6 +271,7 @@ CONFIG_XFRM_USER=y
232# CONFIG_XFRM_SUB_POLICY is not set 271# CONFIG_XFRM_SUB_POLICY is not set
233# CONFIG_XFRM_MIGRATE is not set 272# CONFIG_XFRM_MIGRATE is not set
234# CONFIG_XFRM_STATISTICS is not set 273# CONFIG_XFRM_STATISTICS is not set
274CONFIG_XFRM_IPCOMP=y
235CONFIG_NET_KEY=y 275CONFIG_NET_KEY=y
236# CONFIG_NET_KEY_MIGRATE is not set 276# CONFIG_NET_KEY_MIGRATE is not set
237CONFIG_INET=y 277CONFIG_INET=y
@@ -269,7 +309,6 @@ CONFIG_INET_TCP_DIAG=y
269CONFIG_TCP_CONG_CUBIC=y 309CONFIG_TCP_CONG_CUBIC=y
270CONFIG_DEFAULT_TCP_CONG="cubic" 310CONFIG_DEFAULT_TCP_CONG="cubic"
271# CONFIG_TCP_MD5SIG is not set 311# CONFIG_TCP_MD5SIG is not set
272# CONFIG_IP_VS is not set
273CONFIG_IPV6=y 312CONFIG_IPV6=y
274# CONFIG_IPV6_PRIVACY is not set 313# CONFIG_IPV6_PRIVACY is not set
275# CONFIG_IPV6_ROUTER_PREF is not set 314# CONFIG_IPV6_ROUTER_PREF is not set
@@ -285,8 +324,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
285CONFIG_INET6_XFRM_MODE_BEET=y 324CONFIG_INET6_XFRM_MODE_BEET=y
286# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 325# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
287CONFIG_IPV6_SIT=y 326CONFIG_IPV6_SIT=y
327CONFIG_IPV6_NDISC_NODETYPE=y
288# CONFIG_IPV6_TUNNEL is not set 328# CONFIG_IPV6_TUNNEL is not set
289# CONFIG_IPV6_MULTIPLE_TABLES is not set 329# CONFIG_IPV6_MULTIPLE_TABLES is not set
330# CONFIG_IPV6_MROUTE is not set
290# CONFIG_NETWORK_SECMARK is not set 331# CONFIG_NETWORK_SECMARK is not set
291CONFIG_NETFILTER=y 332CONFIG_NETFILTER=y
292# CONFIG_NETFILTER_DEBUG is not set 333# CONFIG_NETFILTER_DEBUG is not set
@@ -310,10 +351,12 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
310CONFIG_NETFILTER_XT_MATCH_MARK=m 351CONFIG_NETFILTER_XT_MATCH_MARK=m
311CONFIG_NETFILTER_XT_MATCH_POLICY=m 352CONFIG_NETFILTER_XT_MATCH_POLICY=m
312CONFIG_NETFILTER_XT_MATCH_STATE=m 353CONFIG_NETFILTER_XT_MATCH_STATE=m
354# CONFIG_IP_VS is not set
313 355
314# 356#
315# IP: Netfilter Configuration 357# IP: Netfilter Configuration
316# 358#
359CONFIG_NF_DEFRAG_IPV4=m
317CONFIG_NF_CONNTRACK_IPV4=m 360CONFIG_NF_CONNTRACK_IPV4=m
318CONFIG_NF_CONNTRACK_PROC_COMPAT=y 361CONFIG_NF_CONNTRACK_PROC_COMPAT=y
319CONFIG_IP_NF_IPTABLES=m 362CONFIG_IP_NF_IPTABLES=m
@@ -339,16 +382,20 @@ CONFIG_IP_NF_MANGLE=m
339CONFIG_NF_CONNTRACK_IPV6=m 382CONFIG_NF_CONNTRACK_IPV6=m
340CONFIG_IP6_NF_IPTABLES=m 383CONFIG_IP6_NF_IPTABLES=m
341CONFIG_IP6_NF_MATCH_IPV6HEADER=m 384CONFIG_IP6_NF_MATCH_IPV6HEADER=m
342CONFIG_IP6_NF_FILTER=m
343CONFIG_IP6_NF_TARGET_LOG=m 385CONFIG_IP6_NF_TARGET_LOG=m
386CONFIG_IP6_NF_FILTER=m
344CONFIG_IP6_NF_TARGET_REJECT=m 387CONFIG_IP6_NF_TARGET_REJECT=m
345CONFIG_IP6_NF_MANGLE=m 388CONFIG_IP6_NF_MANGLE=m
346# CONFIG_IP_DCCP is not set 389# CONFIG_IP_DCCP is not set
347# CONFIG_IP_SCTP is not set 390# CONFIG_IP_SCTP is not set
391# CONFIG_RDS is not set
348# CONFIG_TIPC is not set 392# CONFIG_TIPC is not set
349# CONFIG_ATM is not set 393# CONFIG_ATM is not set
394CONFIG_STP=m
350CONFIG_BRIDGE=m 395CONFIG_BRIDGE=m
396# CONFIG_NET_DSA is not set
351CONFIG_VLAN_8021Q=m 397CONFIG_VLAN_8021Q=m
398# CONFIG_VLAN_8021Q_GVRP is not set
352# CONFIG_DECNET is not set 399# CONFIG_DECNET is not set
353CONFIG_LLC=m 400CONFIG_LLC=m
354# CONFIG_LLC2 is not set 401# CONFIG_LLC2 is not set
@@ -358,26 +405,33 @@ CONFIG_LLC=m
358# CONFIG_LAPB is not set 405# CONFIG_LAPB is not set
359# CONFIG_ECONET is not set 406# CONFIG_ECONET is not set
360# CONFIG_WAN_ROUTER is not set 407# CONFIG_WAN_ROUTER is not set
408# CONFIG_PHONET is not set
409# CONFIG_IEEE802154 is not set
361# CONFIG_NET_SCHED is not set 410# CONFIG_NET_SCHED is not set
411# CONFIG_DCB is not set
362 412
363# 413#
364# Network testing 414# Network testing
365# 415#
366# CONFIG_NET_PKTGEN is not set 416# CONFIG_NET_PKTGEN is not set
367# CONFIG_NET_TCPPROBE is not set 417# CONFIG_NET_TCPPROBE is not set
418# CONFIG_NET_DROP_MONITOR is not set
368# CONFIG_HAMRADIO is not set 419# CONFIG_HAMRADIO is not set
369# CONFIG_CAN is not set 420# CONFIG_CAN is not set
370# CONFIG_IRDA is not set 421# CONFIG_IRDA is not set
371# CONFIG_BT is not set 422# CONFIG_BT is not set
372# CONFIG_AF_RXRPC is not set 423# CONFIG_AF_RXRPC is not set
424CONFIG_WIRELESS=y
425# CONFIG_CFG80211 is not set
426CONFIG_CFG80211_DEFAULT_PS_VALUE=0
427# CONFIG_WIRELESS_OLD_REGULATORY is not set
428# CONFIG_WIRELESS_EXT is not set
429# CONFIG_LIB80211 is not set
373 430
374# 431#
375# Wireless 432# CFG80211 needs to be enabled for MAC80211
376# 433#
377# CONFIG_CFG80211 is not set 434# CONFIG_WIMAX is not set
378# CONFIG_WIRELESS_EXT is not set
379# CONFIG_MAC80211 is not set
380# CONFIG_IEEE80211 is not set
381# CONFIG_RFKILL is not set 435# CONFIG_RFKILL is not set
382# CONFIG_NET_9P is not set 436# CONFIG_NET_9P is not set
383 437
@@ -389,6 +443,7 @@ CONFIG_LLC=m
389# Generic Driver Options 443# Generic Driver Options
390# 444#
391CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 445CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
446# CONFIG_DEVTMPFS is not set
392CONFIG_STANDALONE=y 447CONFIG_STANDALONE=y
393# CONFIG_PREVENT_FIRMWARE_BUILD is not set 448# CONFIG_PREVENT_FIRMWARE_BUILD is not set
394# CONFIG_FW_LOADER is not set 449# CONFIG_FW_LOADER is not set
@@ -398,10 +453,12 @@ CONFIG_STANDALONE=y
398# CONFIG_CONNECTOR is not set 453# CONFIG_CONNECTOR is not set
399CONFIG_MTD=y 454CONFIG_MTD=y
400# CONFIG_MTD_DEBUG is not set 455# CONFIG_MTD_DEBUG is not set
456# CONFIG_MTD_TESTS is not set
401# CONFIG_MTD_CONCAT is not set 457# CONFIG_MTD_CONCAT is not set
402CONFIG_MTD_PARTITIONS=y 458CONFIG_MTD_PARTITIONS=y
403# CONFIG_MTD_REDBOOT_PARTS is not set 459# CONFIG_MTD_REDBOOT_PARTS is not set
404CONFIG_MTD_CMDLINE_PARTS=y 460CONFIG_MTD_CMDLINE_PARTS=y
461# CONFIG_MTD_AR7_PARTS is not set
405 462
406# 463#
407# User Modules And Translation Layers 464# User Modules And Translation Layers
@@ -446,16 +503,17 @@ CONFIG_MTD_CFI_UTIL=y
446# 503#
447# CONFIG_MTD_COMPLEX_MAPPINGS is not set 504# CONFIG_MTD_COMPLEX_MAPPINGS is not set
448CONFIG_MTD_PHYSMAP=y 505CONFIG_MTD_PHYSMAP=y
449CONFIG_MTD_PHYSMAP_START=0x80000000 506# CONFIG_MTD_PHYSMAP_COMPAT is not set
450CONFIG_MTD_PHYSMAP_LEN=0x0
451CONFIG_MTD_PHYSMAP_BANKWIDTH=2
452# CONFIG_MTD_PLATRAM is not set 507# CONFIG_MTD_PLATRAM is not set
453 508
454# 509#
455# Self-contained MTD device drivers 510# Self-contained MTD device drivers
456# 511#
457CONFIG_MTD_DATAFLASH=y 512CONFIG_MTD_DATAFLASH=y
513# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
514# CONFIG_MTD_DATAFLASH_OTP is not set
458# CONFIG_MTD_M25P80 is not set 515# CONFIG_MTD_M25P80 is not set
516# CONFIG_MTD_SST25L is not set
459# CONFIG_MTD_SLRAM is not set 517# CONFIG_MTD_SLRAM is not set
460# CONFIG_MTD_PHRAM is not set 518# CONFIG_MTD_PHRAM is not set
461# CONFIG_MTD_MTDRAM is not set 519# CONFIG_MTD_MTDRAM is not set
@@ -471,6 +529,11 @@ CONFIG_MTD_DATAFLASH=y
471# CONFIG_MTD_ONENAND is not set 529# CONFIG_MTD_ONENAND is not set
472 530
473# 531#
532# LPDDR flash memory drivers
533#
534# CONFIG_MTD_LPDDR is not set
535
536#
474# UBI - Unsorted block images 537# UBI - Unsorted block images
475# 538#
476CONFIG_MTD_UBI=y 539CONFIG_MTD_UBI=y
@@ -499,10 +562,20 @@ CONFIG_MISC_DEVICES=y
499CONFIG_ATMEL_TCLIB=y 562CONFIG_ATMEL_TCLIB=y
500CONFIG_ATMEL_TCB_CLKSRC=y 563CONFIG_ATMEL_TCB_CLKSRC=y
501CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 564CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
502# CONFIG_EEPROM_93CX6 is not set 565# CONFIG_ICS932S401 is not set
503# CONFIG_ATMEL_SSC is not set 566# CONFIG_ATMEL_SSC is not set
504# CONFIG_ENCLOSURE_SERVICES is not set 567# CONFIG_ENCLOSURE_SERVICES is not set
505# CONFIG_HAVE_IDE is not set 568# CONFIG_ISL29003 is not set
569# CONFIG_C2PORT is not set
570
571#
572# EEPROM support
573#
574# CONFIG_EEPROM_AT24 is not set
575# CONFIG_EEPROM_AT25 is not set
576# CONFIG_EEPROM_LEGACY is not set
577# CONFIG_EEPROM_MAX6875 is not set
578# CONFIG_EEPROM_93CX6 is not set
506 579
507# 580#
508# SCSI device support 581# SCSI device support
@@ -514,7 +587,6 @@ CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
514# CONFIG_ATA is not set 587# CONFIG_ATA is not set
515# CONFIG_MD is not set 588# CONFIG_MD is not set
516CONFIG_NETDEVICES=y 589CONFIG_NETDEVICES=y
517# CONFIG_NETDEVICES_MULTIQUEUE is not set
518# CONFIG_DUMMY is not set 590# CONFIG_DUMMY is not set
519# CONFIG_BONDING is not set 591# CONFIG_BONDING is not set
520# CONFIG_MACVLAN is not set 592# CONFIG_MACVLAN is not set
@@ -536,25 +608,37 @@ CONFIG_PHYLIB=y
536# CONFIG_BROADCOM_PHY is not set 608# CONFIG_BROADCOM_PHY is not set
537# CONFIG_ICPLUS_PHY is not set 609# CONFIG_ICPLUS_PHY is not set
538# CONFIG_REALTEK_PHY is not set 610# CONFIG_REALTEK_PHY is not set
611# CONFIG_NATIONAL_PHY is not set
612# CONFIG_STE10XP is not set
613# CONFIG_LSI_ET1011C_PHY is not set
539# CONFIG_FIXED_PHY is not set 614# CONFIG_FIXED_PHY is not set
540# CONFIG_MDIO_BITBANG is not set 615# CONFIG_MDIO_BITBANG is not set
541CONFIG_NET_ETHERNET=y 616CONFIG_NET_ETHERNET=y
542# CONFIG_MII is not set 617# CONFIG_MII is not set
543CONFIG_MACB=y 618CONFIG_MACB=y
544# CONFIG_ENC28J60 is not set 619# CONFIG_ENC28J60 is not set
620# CONFIG_ETHOC is not set
621# CONFIG_DNET is not set
545# CONFIG_IBM_NEW_EMAC_ZMII is not set 622# CONFIG_IBM_NEW_EMAC_ZMII is not set
546# CONFIG_IBM_NEW_EMAC_RGMII is not set 623# CONFIG_IBM_NEW_EMAC_RGMII is not set
547# CONFIG_IBM_NEW_EMAC_TAH is not set 624# CONFIG_IBM_NEW_EMAC_TAH is not set
548# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 625# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
626# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
627# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
628# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
549# CONFIG_B44 is not set 629# CONFIG_B44 is not set
630# CONFIG_KS8842 is not set
631# CONFIG_KS8851 is not set
632# CONFIG_KS8851_MLL is not set
550# CONFIG_NETDEV_1000 is not set 633# CONFIG_NETDEV_1000 is not set
551# CONFIG_NETDEV_10000 is not set 634# CONFIG_NETDEV_10000 is not set
635CONFIG_WLAN=y
636# CONFIG_WLAN_PRE80211 is not set
637# CONFIG_WLAN_80211 is not set
552 638
553# 639#
554# Wireless LAN 640# Enable WiMAX (Networking options) to see the WiMAX drivers
555# 641#
556# CONFIG_WLAN_PRE80211 is not set
557# CONFIG_WLAN_80211 is not set
558# CONFIG_WAN is not set 642# CONFIG_WAN is not set
559CONFIG_PPP=m 643CONFIG_PPP=m
560# CONFIG_PPP_MULTILINK is not set 644# CONFIG_PPP_MULTILINK is not set
@@ -598,15 +682,30 @@ CONFIG_INPUT_EVDEV=m
598# CONFIG_INPUT_TABLET is not set 682# CONFIG_INPUT_TABLET is not set
599CONFIG_INPUT_TOUCHSCREEN=y 683CONFIG_INPUT_TOUCHSCREEN=y
600# CONFIG_TOUCHSCREEN_ADS7846 is not set 684# CONFIG_TOUCHSCREEN_ADS7846 is not set
685# CONFIG_TOUCHSCREEN_AD7877 is not set
686# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
687# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
688# CONFIG_TOUCHSCREEN_AD7879 is not set
689# CONFIG_TOUCHSCREEN_EETI is not set
601# CONFIG_TOUCHSCREEN_FUJITSU is not set 690# CONFIG_TOUCHSCREEN_FUJITSU is not set
602# CONFIG_TOUCHSCREEN_GUNZE is not set 691# CONFIG_TOUCHSCREEN_GUNZE is not set
603# CONFIG_TOUCHSCREEN_ELO is not set 692# CONFIG_TOUCHSCREEN_ELO is not set
693# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
694# CONFIG_TOUCHSCREEN_MCS5000 is not set
604# CONFIG_TOUCHSCREEN_MTOUCH is not set 695# CONFIG_TOUCHSCREEN_MTOUCH is not set
696# CONFIG_TOUCHSCREEN_INEXIO is not set
605# CONFIG_TOUCHSCREEN_MK712 is not set 697# CONFIG_TOUCHSCREEN_MK712 is not set
606# CONFIG_TOUCHSCREEN_PENMOUNT is not set 698# CONFIG_TOUCHSCREEN_PENMOUNT is not set
607# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 699# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
608# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 700# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
609# CONFIG_TOUCHSCREEN_UCB1400 is not set 701CONFIG_TOUCHSCREEN_WM97XX=m
702CONFIG_TOUCHSCREEN_WM9705=y
703CONFIG_TOUCHSCREEN_WM9712=y
704CONFIG_TOUCHSCREEN_WM9713=y
705# CONFIG_TOUCHSCREEN_WM97XX_ATMEL is not set
706# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
707# CONFIG_TOUCHSCREEN_TSC2007 is not set
708# CONFIG_TOUCHSCREEN_W90X900 is not set
610# CONFIG_INPUT_MISC is not set 709# CONFIG_INPUT_MISC is not set
611 710
612# 711#
@@ -619,9 +718,11 @@ CONFIG_INPUT_TOUCHSCREEN=y
619# Character devices 718# Character devices
620# 719#
621CONFIG_VT=y 720CONFIG_VT=y
721CONFIG_CONSOLE_TRANSLATIONS=y
622CONFIG_VT_CONSOLE=y 722CONFIG_VT_CONSOLE=y
623CONFIG_HW_CONSOLE=y 723CONFIG_HW_CONSOLE=y
624# CONFIG_VT_HW_CONSOLE_BINDING is not set 724# CONFIG_VT_HW_CONSOLE_BINDING is not set
725CONFIG_DEVKMEM=y
625# CONFIG_SERIAL_NONSTANDARD is not set 726# CONFIG_SERIAL_NONSTANDARD is not set
626 727
627# 728#
@@ -636,9 +737,11 @@ CONFIG_SERIAL_ATMEL=y
636CONFIG_SERIAL_ATMEL_CONSOLE=y 737CONFIG_SERIAL_ATMEL_CONSOLE=y
637CONFIG_SERIAL_ATMEL_PDC=y 738CONFIG_SERIAL_ATMEL_PDC=y
638# CONFIG_SERIAL_ATMEL_TTYAT is not set 739# CONFIG_SERIAL_ATMEL_TTYAT is not set
740# CONFIG_SERIAL_MAX3100 is not set
639CONFIG_SERIAL_CORE=y 741CONFIG_SERIAL_CORE=y
640CONFIG_SERIAL_CORE_CONSOLE=y 742CONFIG_SERIAL_CORE_CONSOLE=y
641CONFIG_UNIX98_PTYS=y 743CONFIG_UNIX98_PTYS=y
744# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
642# CONFIG_LEGACY_PTYS is not set 745# CONFIG_LEGACY_PTYS is not set
643# CONFIG_IPMI_HANDLER is not set 746# CONFIG_IPMI_HANDLER is not set
644# CONFIG_HW_RANDOM is not set 747# CONFIG_HW_RANDOM is not set
@@ -647,45 +750,44 @@ CONFIG_UNIX98_PTYS=y
647# CONFIG_TCG_TPM is not set 750# CONFIG_TCG_TPM is not set
648CONFIG_I2C=m 751CONFIG_I2C=m
649CONFIG_I2C_BOARDINFO=y 752CONFIG_I2C_BOARDINFO=y
753CONFIG_I2C_COMPAT=y
650CONFIG_I2C_CHARDEV=m 754CONFIG_I2C_CHARDEV=m
755CONFIG_I2C_HELPER_AUTO=y
756CONFIG_I2C_ALGOBIT=m
651 757
652# 758#
653# I2C Algorithms 759# I2C Hardware Bus support
654# 760#
655CONFIG_I2C_ALGOBIT=m
656# CONFIG_I2C_ALGOPCF is not set
657# CONFIG_I2C_ALGOPCA is not set
658 761
659# 762#
660# I2C Hardware Bus support 763# I2C system bus drivers (mostly embedded / system-on-chip)
661# 764#
662CONFIG_I2C_ATMELTWI=m 765# CONFIG_I2C_DESIGNWARE is not set
663CONFIG_I2C_GPIO=m 766CONFIG_I2C_GPIO=m
664# CONFIG_I2C_OCORES is not set 767# CONFIG_I2C_OCORES is not set
665# CONFIG_I2C_PARPORT_LIGHT is not set
666# CONFIG_I2C_SIMTEC is not set 768# CONFIG_I2C_SIMTEC is not set
769
770#
771# External I2C/SMBus adapter drivers
772#
773# CONFIG_I2C_PARPORT_LIGHT is not set
667# CONFIG_I2C_TAOS_EVM is not set 774# CONFIG_I2C_TAOS_EVM is not set
775
776#
777# Other I2C/SMBus bus drivers
778#
779# CONFIG_I2C_PCA_PLATFORM is not set
668# CONFIG_I2C_STUB is not set 780# CONFIG_I2C_STUB is not set
669 781
670# 782#
671# Miscellaneous I2C Chip support 783# Miscellaneous I2C Chip support
672# 784#
673# CONFIG_DS1682 is not set 785# CONFIG_DS1682 is not set
674# CONFIG_EEPROM_LEGACY is not set
675# CONFIG_SENSORS_PCF8574 is not set
676# CONFIG_PCF8575 is not set
677# CONFIG_SENSORS_PCF8591 is not set
678# CONFIG_TPS65010 is not set
679# CONFIG_SENSORS_MAX6875 is not set
680# CONFIG_SENSORS_TSL2550 is not set 786# CONFIG_SENSORS_TSL2550 is not set
681# CONFIG_I2C_DEBUG_CORE is not set 787# CONFIG_I2C_DEBUG_CORE is not set
682# CONFIG_I2C_DEBUG_ALGO is not set 788# CONFIG_I2C_DEBUG_ALGO is not set
683# CONFIG_I2C_DEBUG_BUS is not set 789# CONFIG_I2C_DEBUG_BUS is not set
684# CONFIG_I2C_DEBUG_CHIP is not set 790# CONFIG_I2C_DEBUG_CHIP is not set
685
686#
687# SPI support
688#
689CONFIG_SPI=y 791CONFIG_SPI=y
690# CONFIG_SPI_DEBUG is not set 792# CONFIG_SPI_DEBUG is not set
691CONFIG_SPI_MASTER=y 793CONFIG_SPI_MASTER=y
@@ -695,30 +797,48 @@ CONFIG_SPI_MASTER=y
695# 797#
696CONFIG_SPI_ATMEL=y 798CONFIG_SPI_ATMEL=y
697# CONFIG_SPI_BITBANG is not set 799# CONFIG_SPI_BITBANG is not set
800# CONFIG_SPI_GPIO is not set
698 801
699# 802#
700# SPI Protocol Masters 803# SPI Protocol Masters
701# 804#
702# CONFIG_EEPROM_AT25 is not set
703CONFIG_SPI_SPIDEV=m 805CONFIG_SPI_SPIDEV=m
704# CONFIG_SPI_TLE62X0 is not set 806# CONFIG_SPI_TLE62X0 is not set
705CONFIG_HAVE_GPIO_LIB=y
706 807
707# 808#
708# GPIO Support 809# PPS support
709# 810#
811# CONFIG_PPS is not set
812CONFIG_ARCH_REQUIRE_GPIOLIB=y
813CONFIG_GPIOLIB=y
710# CONFIG_DEBUG_GPIO is not set 814# CONFIG_DEBUG_GPIO is not set
815# CONFIG_GPIO_SYSFS is not set
816
817#
818# Memory mapped GPIO expanders:
819#
711 820
712# 821#
713# I2C GPIO expanders: 822# I2C GPIO expanders:
714# 823#
824# CONFIG_GPIO_MAX732X is not set
715# CONFIG_GPIO_PCA953X is not set 825# CONFIG_GPIO_PCA953X is not set
716# CONFIG_GPIO_PCF857X is not set 826# CONFIG_GPIO_PCF857X is not set
717 827
718# 828#
829# PCI GPIO expanders:
830#
831
832#
719# SPI GPIO expanders: 833# SPI GPIO expanders:
720# 834#
835# CONFIG_GPIO_MAX7301 is not set
721# CONFIG_GPIO_MCP23S08 is not set 836# CONFIG_GPIO_MCP23S08 is not set
837# CONFIG_GPIO_MC33880 is not set
838
839#
840# AC97 GPIO expanders:
841#
722# CONFIG_W1 is not set 842# CONFIG_W1 is not set
723# CONFIG_POWER_SUPPLY is not set 843# CONFIG_POWER_SUPPLY is not set
724# CONFIG_HWMON is not set 844# CONFIG_HWMON is not set
@@ -731,24 +851,31 @@ CONFIG_WATCHDOG=y
731# 851#
732# CONFIG_SOFT_WATCHDOG is not set 852# CONFIG_SOFT_WATCHDOG is not set
733CONFIG_AT32AP700X_WDT=y 853CONFIG_AT32AP700X_WDT=y
854CONFIG_SSB_POSSIBLE=y
734 855
735# 856#
736# Sonics Silicon Backplane 857# Sonics Silicon Backplane
737# 858#
738CONFIG_SSB_POSSIBLE=y
739# CONFIG_SSB is not set 859# CONFIG_SSB is not set
740 860
741# 861#
742# Multifunction device drivers 862# Multifunction device drivers
743# 863#
864# CONFIG_MFD_CORE is not set
744# CONFIG_MFD_SM501 is not set 865# CONFIG_MFD_SM501 is not set
745 866# CONFIG_HTC_PASIC3 is not set
746# 867# CONFIG_UCB1400_CORE is not set
747# Multimedia devices 868# CONFIG_TPS65010 is not set
748# 869# CONFIG_MFD_TMIO is not set
749# CONFIG_VIDEO_DEV is not set 870# CONFIG_MFD_WM8400 is not set
750# CONFIG_DVB_CORE is not set 871# CONFIG_MFD_WM831X is not set
751# CONFIG_DAB is not set 872# CONFIG_MFD_WM8350_I2C is not set
873# CONFIG_MFD_PCF50633 is not set
874# CONFIG_MFD_MC13783 is not set
875# CONFIG_AB3100_CORE is not set
876# CONFIG_EZX_PCAP is not set
877# CONFIG_REGULATOR is not set
878# CONFIG_MEDIA_SUPPORT is not set
752 879
753# 880#
754# Graphics support 881# Graphics support
@@ -758,6 +885,7 @@ CONFIG_SSB_POSSIBLE=y
758CONFIG_FB=y 885CONFIG_FB=y
759# CONFIG_FIRMWARE_EDID is not set 886# CONFIG_FIRMWARE_EDID is not set
760# CONFIG_FB_DDC is not set 887# CONFIG_FB_DDC is not set
888# CONFIG_FB_BOOT_VESA_SUPPORT is not set
761CONFIG_FB_CFB_FILLRECT=y 889CONFIG_FB_CFB_FILLRECT=y
762CONFIG_FB_CFB_COPYAREA=y 890CONFIG_FB_CFB_COPYAREA=y
763CONFIG_FB_CFB_IMAGEBLIT=y 891CONFIG_FB_CFB_IMAGEBLIT=y
@@ -765,8 +893,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
765# CONFIG_FB_SYS_FILLRECT is not set 893# CONFIG_FB_SYS_FILLRECT is not set
766# CONFIG_FB_SYS_COPYAREA is not set 894# CONFIG_FB_SYS_COPYAREA is not set
767# CONFIG_FB_SYS_IMAGEBLIT is not set 895# CONFIG_FB_SYS_IMAGEBLIT is not set
896# CONFIG_FB_FOREIGN_ENDIAN is not set
768# CONFIG_FB_SYS_FOPS is not set 897# CONFIG_FB_SYS_FOPS is not set
769CONFIG_FB_DEFERRED_IO=y
770# CONFIG_FB_SVGALIB is not set 898# CONFIG_FB_SVGALIB is not set
771# CONFIG_FB_MACMODES is not set 899# CONFIG_FB_MACMODES is not set
772# CONFIG_FB_BACKLIGHT is not set 900# CONFIG_FB_BACKLIGHT is not set
@@ -779,6 +907,9 @@ CONFIG_FB_DEFERRED_IO=y
779# CONFIG_FB_S1D13XXX is not set 907# CONFIG_FB_S1D13XXX is not set
780CONFIG_FB_ATMEL=y 908CONFIG_FB_ATMEL=y
781# CONFIG_FB_VIRTUAL is not set 909# CONFIG_FB_VIRTUAL is not set
910# CONFIG_FB_METRONOME is not set
911# CONFIG_FB_MB862XX is not set
912# CONFIG_FB_BROADSHEET is not set
782# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 913# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
783 914
784# 915#
@@ -792,119 +923,124 @@ CONFIG_FB_ATMEL=y
792CONFIG_DUMMY_CONSOLE=y 923CONFIG_DUMMY_CONSOLE=y
793# CONFIG_FRAMEBUFFER_CONSOLE is not set 924# CONFIG_FRAMEBUFFER_CONSOLE is not set
794# CONFIG_LOGO is not set 925# CONFIG_LOGO is not set
795
796#
797# Sound
798#
799CONFIG_SOUND=y 926CONFIG_SOUND=y
800 927CONFIG_SOUND_OSS_CORE=y
801# 928CONFIG_SOUND_OSS_CORE_PRECLAIM=y
802# Advanced Linux Sound Architecture
803#
804CONFIG_SND=y 929CONFIG_SND=y
805CONFIG_SND_TIMER=m 930CONFIG_SND_TIMER=y
806CONFIG_SND_PCM=m 931CONFIG_SND_PCM=m
807# CONFIG_SND_SEQUENCER is not set 932# CONFIG_SND_SEQUENCER is not set
808CONFIG_SND_OSSEMUL=y 933CONFIG_SND_OSSEMUL=y
809CONFIG_SND_MIXER_OSS=m 934CONFIG_SND_MIXER_OSS=m
810CONFIG_SND_PCM_OSS=m 935CONFIG_SND_PCM_OSS=m
811CONFIG_SND_PCM_OSS_PLUGINS=y 936CONFIG_SND_PCM_OSS_PLUGINS=y
937CONFIG_SND_HRTIMER=y
812# CONFIG_SND_DYNAMIC_MINORS is not set 938# CONFIG_SND_DYNAMIC_MINORS is not set
813# CONFIG_SND_SUPPORT_OLD_API is not set 939# CONFIG_SND_SUPPORT_OLD_API is not set
814CONFIG_SND_VERBOSE_PROCFS=y 940CONFIG_SND_VERBOSE_PROCFS=y
815# CONFIG_SND_VERBOSE_PRINTK is not set 941# CONFIG_SND_VERBOSE_PRINTK is not set
816# CONFIG_SND_DEBUG is not set 942# CONFIG_SND_DEBUG is not set
817 943CONFIG_SND_VMASTER=y
818# 944# CONFIG_SND_RAWMIDI_SEQ is not set
819# Generic devices 945# CONFIG_SND_OPL3_LIB_SEQ is not set
820# 946# CONFIG_SND_OPL4_LIB_SEQ is not set
947# CONFIG_SND_SBAWE_SEQ is not set
948# CONFIG_SND_EMU10K1_SEQ is not set
821CONFIG_SND_AC97_CODEC=m 949CONFIG_SND_AC97_CODEC=m
822# CONFIG_SND_DUMMY is not set 950# CONFIG_SND_DRIVERS is not set
823# CONFIG_SND_MTPAV is not set
824# CONFIG_SND_SERIAL_U16550 is not set
825# CONFIG_SND_MPU401 is not set
826 951
827# 952#
828# AVR32 devices 953# Atmel devices (AVR32 and AT91)
829#
830CONFIG_SND_ATMEL_AC97=m
831
832#
833# SPI devices
834#
835
836#
837# System on Chip audio support
838# 954#
955# CONFIG_SND_ATMEL_ABDAC is not set
956CONFIG_SND_ATMEL_AC97C=m
957# CONFIG_SND_SPI is not set
839# CONFIG_SND_SOC is not set 958# CONFIG_SND_SOC is not set
840
841#
842# SoC Audio support for SuperH
843#
844
845#
846# ALSA SoC audio for Freescale SOCs
847#
848
849#
850# Open Sound System
851#
852# CONFIG_SOUND_PRIME is not set 959# CONFIG_SOUND_PRIME is not set
853CONFIG_AC97_BUS=m 960CONFIG_AC97_BUS=m
854CONFIG_HID_SUPPORT=y 961CONFIG_HID_SUPPORT=y
855CONFIG_HID=y 962CONFIG_HID=y
856# CONFIG_HID_DEBUG is not set
857# CONFIG_HIDRAW is not set 963# CONFIG_HIDRAW is not set
964# CONFIG_HID_PID is not set
965
966#
967# Special HID drivers
968#
858CONFIG_USB_SUPPORT=y 969CONFIG_USB_SUPPORT=y
859# CONFIG_USB_ARCH_HAS_HCD is not set 970# CONFIG_USB_ARCH_HAS_HCD is not set
860# CONFIG_USB_ARCH_HAS_OHCI is not set 971# CONFIG_USB_ARCH_HAS_OHCI is not set
861# CONFIG_USB_ARCH_HAS_EHCI is not set 972# CONFIG_USB_ARCH_HAS_EHCI is not set
973# CONFIG_USB_OTG_WHITELIST is not set
974# CONFIG_USB_OTG_BLACKLIST_HUB is not set
975# CONFIG_USB_GADGET_MUSB_HDRC is not set
862 976
863# 977#
864# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 978# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
865# 979#
866CONFIG_USB_GADGET=y 980CONFIG_USB_GADGET=y
867# CONFIG_USB_GADGET_DEBUG is not set 981# CONFIG_USB_GADGET_DEBUG is not set
868# CONFIG_USB_GADGET_DEBUG_FILES is not set 982# CONFIG_USB_GADGET_DEBUG_FILES is not set
983# CONFIG_USB_GADGET_DEBUG_FS is not set
984CONFIG_USB_GADGET_VBUS_DRAW=350
869CONFIG_USB_GADGET_SELECTED=y 985CONFIG_USB_GADGET_SELECTED=y
870# CONFIG_USB_GADGET_AMD5536UDC is not set 986# CONFIG_USB_GADGET_AT91 is not set
871CONFIG_USB_GADGET_ATMEL_USBA=y 987CONFIG_USB_GADGET_ATMEL_USBA=y
872CONFIG_USB_ATMEL_USBA=y 988CONFIG_USB_ATMEL_USBA=y
873# CONFIG_USB_GADGET_FSL_USB2 is not set 989# CONFIG_USB_GADGET_FSL_USB2 is not set
874# CONFIG_USB_GADGET_NET2280 is not set
875# CONFIG_USB_GADGET_PXA2XX is not set
876# CONFIG_USB_GADGET_M66592 is not set
877# CONFIG_USB_GADGET_GOKU is not set
878# CONFIG_USB_GADGET_LH7A40X is not set 990# CONFIG_USB_GADGET_LH7A40X is not set
879# CONFIG_USB_GADGET_OMAP is not set 991# CONFIG_USB_GADGET_OMAP is not set
992# CONFIG_USB_GADGET_PXA25X is not set
993# CONFIG_USB_GADGET_R8A66597 is not set
994# CONFIG_USB_GADGET_PXA27X is not set
995# CONFIG_USB_GADGET_S3C_HSOTG is not set
996# CONFIG_USB_GADGET_IMX is not set
880# CONFIG_USB_GADGET_S3C2410 is not set 997# CONFIG_USB_GADGET_S3C2410 is not set
881# CONFIG_USB_GADGET_AT91 is not set 998# CONFIG_USB_GADGET_M66592 is not set
999# CONFIG_USB_GADGET_AMD5536UDC is not set
1000# CONFIG_USB_GADGET_FSL_QE is not set
1001# CONFIG_USB_GADGET_CI13XXX is not set
1002# CONFIG_USB_GADGET_NET2280 is not set
1003# CONFIG_USB_GADGET_GOKU is not set
1004# CONFIG_USB_GADGET_LANGWELL is not set
882# CONFIG_USB_GADGET_DUMMY_HCD is not set 1005# CONFIG_USB_GADGET_DUMMY_HCD is not set
883CONFIG_USB_GADGET_DUALSPEED=y 1006CONFIG_USB_GADGET_DUALSPEED=y
884CONFIG_USB_ZERO=m 1007CONFIG_USB_ZERO=m
1008# CONFIG_USB_AUDIO is not set
885CONFIG_USB_ETH=m 1009CONFIG_USB_ETH=m
886CONFIG_USB_ETH_RNDIS=y 1010CONFIG_USB_ETH_RNDIS=y
1011# CONFIG_USB_ETH_EEM is not set
887CONFIG_USB_GADGETFS=m 1012CONFIG_USB_GADGETFS=m
888CONFIG_USB_FILE_STORAGE=m 1013CONFIG_USB_FILE_STORAGE=m
889# CONFIG_USB_FILE_STORAGE_TEST is not set 1014# CONFIG_USB_FILE_STORAGE_TEST is not set
890CONFIG_USB_G_SERIAL=m 1015CONFIG_USB_G_SERIAL=m
891# CONFIG_USB_MIDI_GADGET is not set 1016# CONFIG_USB_MIDI_GADGET is not set
892# CONFIG_USB_G_PRINTER is not set 1017# CONFIG_USB_G_PRINTER is not set
1018CONFIG_USB_CDC_COMPOSITE=m
1019
1020#
1021# OTG and related infrastructure
1022#
1023# CONFIG_USB_GPIO_VBUS is not set
1024# CONFIG_NOP_USB_XCEIV is not set
893CONFIG_MMC=y 1025CONFIG_MMC=y
894# CONFIG_MMC_DEBUG is not set 1026# CONFIG_MMC_DEBUG is not set
895# CONFIG_MMC_UNSAFE_RESUME is not set 1027# CONFIG_MMC_UNSAFE_RESUME is not set
896 1028
897# 1029#
898# MMC/SD Card Drivers 1030# MMC/SD/SDIO Card Drivers
899# 1031#
900CONFIG_MMC_BLOCK=y 1032CONFIG_MMC_BLOCK=y
901CONFIG_MMC_BLOCK_BOUNCE=y 1033CONFIG_MMC_BLOCK_BOUNCE=y
902# CONFIG_SDIO_UART is not set 1034# CONFIG_SDIO_UART is not set
1035# CONFIG_MMC_TEST is not set
903 1036
904# 1037#
905# MMC/SD Host Controller Drivers 1038# MMC/SD/SDIO Host Controller Drivers
906# 1039#
1040# CONFIG_MMC_SDHCI is not set
1041# CONFIG_MMC_AT91 is not set
907CONFIG_MMC_ATMELMCI=y 1042CONFIG_MMC_ATMELMCI=y
1043# CONFIG_MMC_ATMELMCI_DMA is not set
908# CONFIG_MMC_SPI is not set 1044# CONFIG_MMC_SPI is not set
909# CONFIG_MEMSTICK is not set 1045# CONFIG_MEMSTICK is not set
910CONFIG_NEW_LEDS=y 1046CONFIG_NEW_LEDS=y
@@ -913,7 +1049,13 @@ CONFIG_LEDS_CLASS=y
913# 1049#
914# LED drivers 1050# LED drivers
915# 1051#
1052# CONFIG_LEDS_PCA9532 is not set
916CONFIG_LEDS_GPIO=y 1053CONFIG_LEDS_GPIO=y
1054CONFIG_LEDS_GPIO_PLATFORM=y
1055# CONFIG_LEDS_LP3944 is not set
1056# CONFIG_LEDS_PCA955X is not set
1057# CONFIG_LEDS_DAC124S085 is not set
1058# CONFIG_LEDS_BD2802 is not set
917 1059
918# 1060#
919# LED Triggers 1061# LED Triggers
@@ -921,6 +1063,14 @@ CONFIG_LEDS_GPIO=y
921CONFIG_LEDS_TRIGGERS=y 1063CONFIG_LEDS_TRIGGERS=y
922CONFIG_LEDS_TRIGGER_TIMER=y 1064CONFIG_LEDS_TRIGGER_TIMER=y
923CONFIG_LEDS_TRIGGER_HEARTBEAT=y 1065CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1066# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1067# CONFIG_LEDS_TRIGGER_GPIO is not set
1068# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1069
1070#
1071# iptables trigger is under Netfilter config (LED target)
1072#
1073# CONFIG_ACCESSIBILITY is not set
924CONFIG_RTC_LIB=y 1074CONFIG_RTC_LIB=y
925CONFIG_RTC_CLASS=y 1075CONFIG_RTC_CLASS=y
926CONFIG_RTC_HCTOSYS=y 1076CONFIG_RTC_HCTOSYS=y
@@ -950,51 +1100,84 @@ CONFIG_RTC_INTF_DEV=y
950# CONFIG_RTC_DRV_PCF8583 is not set 1100# CONFIG_RTC_DRV_PCF8583 is not set
951# CONFIG_RTC_DRV_M41T80 is not set 1101# CONFIG_RTC_DRV_M41T80 is not set
952# CONFIG_RTC_DRV_S35390A is not set 1102# CONFIG_RTC_DRV_S35390A is not set
1103# CONFIG_RTC_DRV_FM3130 is not set
1104# CONFIG_RTC_DRV_RX8581 is not set
1105# CONFIG_RTC_DRV_RX8025 is not set
953 1106
954# 1107#
955# SPI RTC drivers 1108# SPI RTC drivers
956# 1109#
1110# CONFIG_RTC_DRV_M41T94 is not set
1111# CONFIG_RTC_DRV_DS1305 is not set
1112# CONFIG_RTC_DRV_DS1390 is not set
957# CONFIG_RTC_DRV_MAX6902 is not set 1113# CONFIG_RTC_DRV_MAX6902 is not set
958# CONFIG_RTC_DRV_R9701 is not set 1114# CONFIG_RTC_DRV_R9701 is not set
959# CONFIG_RTC_DRV_RS5C348 is not set 1115# CONFIG_RTC_DRV_RS5C348 is not set
1116# CONFIG_RTC_DRV_DS3234 is not set
1117# CONFIG_RTC_DRV_PCF2123 is not set
960 1118
961# 1119#
962# Platform RTC drivers 1120# Platform RTC drivers
963# 1121#
1122# CONFIG_RTC_DRV_DS1286 is not set
964# CONFIG_RTC_DRV_DS1511 is not set 1123# CONFIG_RTC_DRV_DS1511 is not set
965# CONFIG_RTC_DRV_DS1553 is not set 1124# CONFIG_RTC_DRV_DS1553 is not set
966# CONFIG_RTC_DRV_DS1742 is not set 1125# CONFIG_RTC_DRV_DS1742 is not set
967# CONFIG_RTC_DRV_STK17TA8 is not set 1126# CONFIG_RTC_DRV_STK17TA8 is not set
968# CONFIG_RTC_DRV_M48T86 is not set 1127# CONFIG_RTC_DRV_M48T86 is not set
1128# CONFIG_RTC_DRV_M48T35 is not set
969# CONFIG_RTC_DRV_M48T59 is not set 1129# CONFIG_RTC_DRV_M48T59 is not set
1130# CONFIG_RTC_DRV_BQ4802 is not set
970# CONFIG_RTC_DRV_V3020 is not set 1131# CONFIG_RTC_DRV_V3020 is not set
971 1132
972# 1133#
973# on-CPU RTC drivers 1134# on-CPU RTC drivers
974# 1135#
975CONFIG_RTC_DRV_AT32AP700X=y 1136CONFIG_RTC_DRV_AT32AP700X=y
1137CONFIG_DMADEVICES=y
976 1138
977# 1139#
978# Userspace I/O 1140# DMA Devices
979# 1141#
1142CONFIG_DW_DMAC=y
1143CONFIG_DMA_ENGINE=y
1144
1145#
1146# DMA Clients
1147#
1148# CONFIG_NET_DMA is not set
1149# CONFIG_ASYNC_TX_DMA is not set
1150# CONFIG_DMATEST is not set
1151# CONFIG_AUXDISPLAY is not set
980# CONFIG_UIO is not set 1152# CONFIG_UIO is not set
981 1153
982# 1154#
1155# TI VLYNQ
1156#
1157# CONFIG_STAGING is not set
1158
1159#
983# File systems 1160# File systems
984# 1161#
985CONFIG_EXT2_FS=y 1162CONFIG_EXT2_FS=y
986# CONFIG_EXT2_FS_XATTR is not set 1163# CONFIG_EXT2_FS_XATTR is not set
987# CONFIG_EXT2_FS_XIP is not set 1164# CONFIG_EXT2_FS_XIP is not set
988CONFIG_EXT3_FS=y 1165CONFIG_EXT3_FS=y
1166# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
989# CONFIG_EXT3_FS_XATTR is not set 1167# CONFIG_EXT3_FS_XATTR is not set
990# CONFIG_EXT4DEV_FS is not set 1168# CONFIG_EXT4_FS is not set
991CONFIG_JBD=y 1169CONFIG_JBD=y
1170# CONFIG_JBD_DEBUG is not set
992# CONFIG_REISERFS_FS is not set 1171# CONFIG_REISERFS_FS is not set
993# CONFIG_JFS_FS is not set 1172# CONFIG_JFS_FS is not set
994# CONFIG_FS_POSIX_ACL is not set 1173# CONFIG_FS_POSIX_ACL is not set
995# CONFIG_XFS_FS is not set 1174# CONFIG_XFS_FS is not set
996# CONFIG_GFS2_FS is not set 1175# CONFIG_GFS2_FS is not set
997# CONFIG_OCFS2_FS is not set 1176# CONFIG_OCFS2_FS is not set
1177# CONFIG_BTRFS_FS is not set
1178# CONFIG_NILFS2_FS is not set
1179CONFIG_FILE_LOCKING=y
1180CONFIG_FSNOTIFY=y
998# CONFIG_DNOTIFY is not set 1181# CONFIG_DNOTIFY is not set
999CONFIG_INOTIFY=y 1182CONFIG_INOTIFY=y
1000CONFIG_INOTIFY_USER=y 1183CONFIG_INOTIFY_USER=y
@@ -1002,6 +1185,12 @@ CONFIG_INOTIFY_USER=y
1002# CONFIG_AUTOFS_FS is not set 1185# CONFIG_AUTOFS_FS is not set
1003# CONFIG_AUTOFS4_FS is not set 1186# CONFIG_AUTOFS4_FS is not set
1004CONFIG_FUSE_FS=m 1187CONFIG_FUSE_FS=m
1188# CONFIG_CUSE is not set
1189
1190#
1191# Caches
1192#
1193# CONFIG_FSCACHE is not set
1005 1194
1006# 1195#
1007# CD-ROM/DVD Filesystems 1196# CD-ROM/DVD Filesystems
@@ -1025,15 +1214,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1025CONFIG_PROC_FS=y 1214CONFIG_PROC_FS=y
1026# CONFIG_PROC_KCORE is not set 1215# CONFIG_PROC_KCORE is not set
1027CONFIG_PROC_SYSCTL=y 1216CONFIG_PROC_SYSCTL=y
1217CONFIG_PROC_PAGE_MONITOR=y
1028CONFIG_SYSFS=y 1218CONFIG_SYSFS=y
1029CONFIG_TMPFS=y 1219CONFIG_TMPFS=y
1030# CONFIG_TMPFS_POSIX_ACL is not set 1220# CONFIG_TMPFS_POSIX_ACL is not set
1031# CONFIG_HUGETLB_PAGE is not set 1221# CONFIG_HUGETLB_PAGE is not set
1032CONFIG_CONFIGFS_FS=y 1222CONFIG_CONFIGFS_FS=y
1033 1223CONFIG_MISC_FILESYSTEMS=y
1034#
1035# Miscellaneous filesystems
1036#
1037# CONFIG_ADFS_FS is not set 1224# CONFIG_ADFS_FS is not set
1038# CONFIG_AFFS_FS is not set 1225# CONFIG_AFFS_FS is not set
1039# CONFIG_HFS_FS is not set 1226# CONFIG_HFS_FS is not set
@@ -1059,8 +1246,10 @@ CONFIG_UBIFS_FS_LZO=y
1059CONFIG_UBIFS_FS_ZLIB=y 1246CONFIG_UBIFS_FS_ZLIB=y
1060# CONFIG_UBIFS_FS_DEBUG is not set 1247# CONFIG_UBIFS_FS_DEBUG is not set
1061# CONFIG_CRAMFS is not set 1248# CONFIG_CRAMFS is not set
1249# CONFIG_SQUASHFS is not set
1062# CONFIG_VXFS_FS is not set 1250# CONFIG_VXFS_FS is not set
1063# CONFIG_MINIX_FS is not set 1251# CONFIG_MINIX_FS is not set
1252# CONFIG_OMFS_FS is not set
1064# CONFIG_HPFS_FS is not set 1253# CONFIG_HPFS_FS is not set
1065# CONFIG_QNX4FS_FS is not set 1254# CONFIG_QNX4FS_FS is not set
1066# CONFIG_ROMFS_FS is not set 1255# CONFIG_ROMFS_FS is not set
@@ -1071,19 +1260,16 @@ CONFIG_NFS_FS=y
1071CONFIG_NFS_V3=y 1260CONFIG_NFS_V3=y
1072# CONFIG_NFS_V3_ACL is not set 1261# CONFIG_NFS_V3_ACL is not set
1073# CONFIG_NFS_V4 is not set 1262# CONFIG_NFS_V4 is not set
1074# CONFIG_NFS_DIRECTIO is not set 1263CONFIG_ROOT_NFS=y
1075CONFIG_NFSD=m 1264CONFIG_NFSD=m
1076CONFIG_NFSD_V3=y 1265CONFIG_NFSD_V3=y
1077# CONFIG_NFSD_V3_ACL is not set 1266# CONFIG_NFSD_V3_ACL is not set
1078# CONFIG_NFSD_V4 is not set 1267# CONFIG_NFSD_V4 is not set
1079CONFIG_NFSD_TCP=y
1080CONFIG_ROOT_NFS=y
1081CONFIG_LOCKD=y 1268CONFIG_LOCKD=y
1082CONFIG_LOCKD_V4=y 1269CONFIG_LOCKD_V4=y
1083CONFIG_EXPORTFS=m 1270CONFIG_EXPORTFS=m
1084CONFIG_NFS_COMMON=y 1271CONFIG_NFS_COMMON=y
1085CONFIG_SUNRPC=y 1272CONFIG_SUNRPC=y
1086# CONFIG_SUNRPC_BIND34 is not set
1087# CONFIG_RPCSEC_GSS_KRB5 is not set 1273# CONFIG_RPCSEC_GSS_KRB5 is not set
1088# CONFIG_RPCSEC_GSS_SPKM3 is not set 1274# CONFIG_RPCSEC_GSS_SPKM3 is not set
1089CONFIG_SMB_FS=m 1275CONFIG_SMB_FS=m
@@ -1151,16 +1337,24 @@ CONFIG_NLS_UTF8=m
1151# CONFIG_PRINTK_TIME is not set 1337# CONFIG_PRINTK_TIME is not set
1152CONFIG_ENABLE_WARN_DEPRECATED=y 1338CONFIG_ENABLE_WARN_DEPRECATED=y
1153CONFIG_ENABLE_MUST_CHECK=y 1339CONFIG_ENABLE_MUST_CHECK=y
1340CONFIG_FRAME_WARN=1024
1154CONFIG_MAGIC_SYSRQ=y 1341CONFIG_MAGIC_SYSRQ=y
1342# CONFIG_STRIP_ASM_SYMS is not set
1155# CONFIG_UNUSED_SYMBOLS is not set 1343# CONFIG_UNUSED_SYMBOLS is not set
1156# CONFIG_DEBUG_FS is not set 1344CONFIG_DEBUG_FS=y
1157# CONFIG_HEADERS_CHECK is not set 1345# CONFIG_HEADERS_CHECK is not set
1158CONFIG_DEBUG_KERNEL=y 1346CONFIG_DEBUG_KERNEL=y
1159# CONFIG_DEBUG_SHIRQ is not set 1347# CONFIG_DEBUG_SHIRQ is not set
1160CONFIG_DETECT_SOFTLOCKUP=y 1348CONFIG_DETECT_SOFTLOCKUP=y
1349# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1350CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1351CONFIG_DETECT_HUNG_TASK=y
1352# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1353CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1161CONFIG_SCHED_DEBUG=y 1354CONFIG_SCHED_DEBUG=y
1162# CONFIG_SCHEDSTATS is not set 1355# CONFIG_SCHEDSTATS is not set
1163# CONFIG_TIMER_STATS is not set 1356# CONFIG_TIMER_STATS is not set
1357# CONFIG_DEBUG_OBJECTS is not set
1164# CONFIG_SLUB_DEBUG_ON is not set 1358# CONFIG_SLUB_DEBUG_ON is not set
1165# CONFIG_SLUB_STATS is not set 1359# CONFIG_SLUB_STATS is not set
1166# CONFIG_DEBUG_RT_MUTEXES is not set 1360# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1172,19 +1366,48 @@ CONFIG_SCHED_DEBUG=y
1172# CONFIG_LOCK_STAT is not set 1366# CONFIG_LOCK_STAT is not set
1173# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1367# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1174# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1368# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1369CONFIG_STACKTRACE=y
1175# CONFIG_DEBUG_KOBJECT is not set 1370# CONFIG_DEBUG_KOBJECT is not set
1176CONFIG_DEBUG_BUGVERBOSE=y 1371CONFIG_DEBUG_BUGVERBOSE=y
1177# CONFIG_DEBUG_INFO is not set 1372# CONFIG_DEBUG_INFO is not set
1178# CONFIG_DEBUG_VM is not set 1373# CONFIG_DEBUG_VM is not set
1374# CONFIG_DEBUG_WRITECOUNT is not set
1375# CONFIG_DEBUG_MEMORY_INIT is not set
1179# CONFIG_DEBUG_LIST is not set 1376# CONFIG_DEBUG_LIST is not set
1180# CONFIG_DEBUG_SG is not set 1377# CONFIG_DEBUG_SG is not set
1378# CONFIG_DEBUG_NOTIFIERS is not set
1379# CONFIG_DEBUG_CREDENTIALS is not set
1181CONFIG_FRAME_POINTER=y 1380CONFIG_FRAME_POINTER=y
1182# CONFIG_BOOT_PRINTK_DELAY is not set 1381# CONFIG_BOOT_PRINTK_DELAY is not set
1183# CONFIG_RCU_TORTURE_TEST is not set 1382# CONFIG_RCU_TORTURE_TEST is not set
1383# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1184# CONFIG_KPROBES_SANITY_TEST is not set 1384# CONFIG_KPROBES_SANITY_TEST is not set
1185# CONFIG_BACKTRACE_SELF_TEST is not set 1385# CONFIG_BACKTRACE_SELF_TEST is not set
1386# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1387# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1186# CONFIG_LKDTM is not set 1388# CONFIG_LKDTM is not set
1187# CONFIG_FAULT_INJECTION is not set 1389# CONFIG_FAULT_INJECTION is not set
1390# CONFIG_PAGE_POISONING is not set
1391CONFIG_NOP_TRACER=y
1392CONFIG_RING_BUFFER=y
1393CONFIG_EVENT_TRACING=y
1394CONFIG_CONTEXT_SWITCH_TRACER=y
1395CONFIG_RING_BUFFER_ALLOW_SWAP=y
1396CONFIG_TRACING=y
1397CONFIG_TRACING_SUPPORT=y
1398CONFIG_FTRACE=y
1399# CONFIG_IRQSOFF_TRACER is not set
1400# CONFIG_SCHED_TRACER is not set
1401# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1402# CONFIG_BOOT_TRACER is not set
1403CONFIG_BRANCH_PROFILE_NONE=y
1404# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1405# CONFIG_PROFILE_ALL_BRANCHES is not set
1406# CONFIG_KMEMTRACE is not set
1407# CONFIG_WORKQUEUE_TRACER is not set
1408# CONFIG_BLK_DEV_IO_TRACE is not set
1409# CONFIG_RING_BUFFER_BENCHMARK is not set
1410# CONFIG_DYNAMIC_DEBUG is not set
1188# CONFIG_SAMPLES is not set 1411# CONFIG_SAMPLES is not set
1189 1412
1190# 1413#
@@ -1192,63 +1415,118 @@ CONFIG_FRAME_POINTER=y
1192# 1415#
1193# CONFIG_KEYS is not set 1416# CONFIG_KEYS is not set
1194# CONFIG_SECURITY is not set 1417# CONFIG_SECURITY is not set
1418# CONFIG_SECURITYFS is not set
1195# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1419# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1196CONFIG_CRYPTO=y 1420CONFIG_CRYPTO=y
1421
1422#
1423# Crypto core or helper
1424#
1425# CONFIG_CRYPTO_FIPS is not set
1197CONFIG_CRYPTO_ALGAPI=y 1426CONFIG_CRYPTO_ALGAPI=y
1427CONFIG_CRYPTO_ALGAPI2=y
1198CONFIG_CRYPTO_AEAD=y 1428CONFIG_CRYPTO_AEAD=y
1429CONFIG_CRYPTO_AEAD2=y
1199CONFIG_CRYPTO_BLKCIPHER=y 1430CONFIG_CRYPTO_BLKCIPHER=y
1200# CONFIG_CRYPTO_SEQIV is not set 1431CONFIG_CRYPTO_BLKCIPHER2=y
1201CONFIG_CRYPTO_HASH=y 1432CONFIG_CRYPTO_HASH=y
1433CONFIG_CRYPTO_HASH2=y
1434CONFIG_CRYPTO_RNG=m
1435CONFIG_CRYPTO_RNG2=y
1436CONFIG_CRYPTO_PCOMP=y
1202CONFIG_CRYPTO_MANAGER=y 1437CONFIG_CRYPTO_MANAGER=y
1438CONFIG_CRYPTO_MANAGER2=y
1439# CONFIG_CRYPTO_GF128MUL is not set
1440# CONFIG_CRYPTO_NULL is not set
1441CONFIG_CRYPTO_WORKQUEUE=y
1442# CONFIG_CRYPTO_CRYPTD is not set
1443CONFIG_CRYPTO_AUTHENC=y
1444# CONFIG_CRYPTO_TEST is not set
1445
1446#
1447# Authenticated Encryption with Associated Data
1448#
1449# CONFIG_CRYPTO_CCM is not set
1450# CONFIG_CRYPTO_GCM is not set
1451# CONFIG_CRYPTO_SEQIV is not set
1452
1453#
1454# Block modes
1455#
1456CONFIG_CRYPTO_CBC=y
1457# CONFIG_CRYPTO_CTR is not set
1458# CONFIG_CRYPTO_CTS is not set
1459CONFIG_CRYPTO_ECB=m
1460# CONFIG_CRYPTO_LRW is not set
1461# CONFIG_CRYPTO_PCBC is not set
1462# CONFIG_CRYPTO_XTS is not set
1463
1464#
1465# Hash modes
1466#
1203CONFIG_CRYPTO_HMAC=y 1467CONFIG_CRYPTO_HMAC=y
1204# CONFIG_CRYPTO_XCBC is not set 1468# CONFIG_CRYPTO_XCBC is not set
1205# CONFIG_CRYPTO_NULL is not set 1469# CONFIG_CRYPTO_VMAC is not set
1470
1471#
1472# Digest
1473#
1474# CONFIG_CRYPTO_CRC32C is not set
1475# CONFIG_CRYPTO_GHASH is not set
1206# CONFIG_CRYPTO_MD4 is not set 1476# CONFIG_CRYPTO_MD4 is not set
1207CONFIG_CRYPTO_MD5=y 1477CONFIG_CRYPTO_MD5=y
1478# CONFIG_CRYPTO_MICHAEL_MIC is not set
1479# CONFIG_CRYPTO_RMD128 is not set
1480# CONFIG_CRYPTO_RMD160 is not set
1481# CONFIG_CRYPTO_RMD256 is not set
1482# CONFIG_CRYPTO_RMD320 is not set
1208CONFIG_CRYPTO_SHA1=y 1483CONFIG_CRYPTO_SHA1=y
1209# CONFIG_CRYPTO_SHA256 is not set 1484# CONFIG_CRYPTO_SHA256 is not set
1210# CONFIG_CRYPTO_SHA512 is not set 1485# CONFIG_CRYPTO_SHA512 is not set
1211# CONFIG_CRYPTO_WP512 is not set
1212# CONFIG_CRYPTO_TGR192 is not set 1486# CONFIG_CRYPTO_TGR192 is not set
1213# CONFIG_CRYPTO_GF128MUL is not set 1487# CONFIG_CRYPTO_WP512 is not set
1214CONFIG_CRYPTO_ECB=m 1488
1215CONFIG_CRYPTO_CBC=y 1489#
1216# CONFIG_CRYPTO_PCBC is not set 1490# Ciphers
1217# CONFIG_CRYPTO_LRW is not set 1491#
1218# CONFIG_CRYPTO_XTS is not set 1492CONFIG_CRYPTO_AES=m
1219# CONFIG_CRYPTO_CTR is not set 1493# CONFIG_CRYPTO_ANUBIS is not set
1220# CONFIG_CRYPTO_GCM is not set 1494CONFIG_CRYPTO_ARC4=m
1221# CONFIG_CRYPTO_CCM is not set
1222# CONFIG_CRYPTO_CRYPTD is not set
1223CONFIG_CRYPTO_DES=y
1224# CONFIG_CRYPTO_FCRYPT is not set
1225# CONFIG_CRYPTO_BLOWFISH is not set 1495# CONFIG_CRYPTO_BLOWFISH is not set
1226# CONFIG_CRYPTO_TWOFISH is not set 1496# CONFIG_CRYPTO_CAMELLIA is not set
1227# CONFIG_CRYPTO_SERPENT is not set
1228# CONFIG_CRYPTO_AES is not set
1229# CONFIG_CRYPTO_CAST5 is not set 1497# CONFIG_CRYPTO_CAST5 is not set
1230# CONFIG_CRYPTO_CAST6 is not set 1498# CONFIG_CRYPTO_CAST6 is not set
1231# CONFIG_CRYPTO_TEA is not set 1499CONFIG_CRYPTO_DES=y
1232CONFIG_CRYPTO_ARC4=m 1500# CONFIG_CRYPTO_FCRYPT is not set
1233# CONFIG_CRYPTO_KHAZAD is not set 1501# CONFIG_CRYPTO_KHAZAD is not set
1234# CONFIG_CRYPTO_ANUBIS is not set
1235# CONFIG_CRYPTO_SEED is not set
1236# CONFIG_CRYPTO_SALSA20 is not set 1502# CONFIG_CRYPTO_SALSA20 is not set
1503# CONFIG_CRYPTO_SEED is not set
1504# CONFIG_CRYPTO_SERPENT is not set
1505# CONFIG_CRYPTO_TEA is not set
1506# CONFIG_CRYPTO_TWOFISH is not set
1507
1508#
1509# Compression
1510#
1237CONFIG_CRYPTO_DEFLATE=y 1511CONFIG_CRYPTO_DEFLATE=y
1238# CONFIG_CRYPTO_MICHAEL_MIC is not set 1512# CONFIG_CRYPTO_ZLIB is not set
1239# CONFIG_CRYPTO_CRC32C is not set
1240# CONFIG_CRYPTO_CAMELLIA is not set
1241# CONFIG_CRYPTO_TEST is not set
1242CONFIG_CRYPTO_AUTHENC=y
1243CONFIG_CRYPTO_LZO=y 1513CONFIG_CRYPTO_LZO=y
1514
1515#
1516# Random Number Generation
1517#
1518CONFIG_CRYPTO_ANSI_CPRNG=m
1244CONFIG_CRYPTO_HW=y 1519CONFIG_CRYPTO_HW=y
1520CONFIG_BINARY_PRINTF=y
1245 1521
1246# 1522#
1247# Library routines 1523# Library routines
1248# 1524#
1249CONFIG_BITREVERSE=y 1525CONFIG_BITREVERSE=y
1526CONFIG_GENERIC_FIND_LAST_BIT=y
1250CONFIG_CRC_CCITT=m 1527CONFIG_CRC_CCITT=m
1251CONFIG_CRC16=y 1528CONFIG_CRC16=y
1529# CONFIG_CRC_T10DIF is not set
1252# CONFIG_CRC_ITU_T is not set 1530# CONFIG_CRC_ITU_T is not set
1253CONFIG_CRC32=y 1531CONFIG_CRC32=y
1254# CONFIG_CRC7 is not set 1532# CONFIG_CRC7 is not set
@@ -1257,8 +1535,9 @@ CONFIG_ZLIB_INFLATE=y
1257CONFIG_ZLIB_DEFLATE=y 1535CONFIG_ZLIB_DEFLATE=y
1258CONFIG_LZO_COMPRESS=y 1536CONFIG_LZO_COMPRESS=y
1259CONFIG_LZO_DECOMPRESS=y 1537CONFIG_LZO_DECOMPRESS=y
1538CONFIG_DECOMPRESS_GZIP=y
1260CONFIG_GENERIC_ALLOCATOR=y 1539CONFIG_GENERIC_ALLOCATOR=y
1261CONFIG_PLIST=y
1262CONFIG_HAS_IOMEM=y 1540CONFIG_HAS_IOMEM=y
1263CONFIG_HAS_IOPORT=y 1541CONFIG_HAS_IOPORT=y
1264CONFIG_HAS_DMA=y 1542CONFIG_HAS_DMA=y
1543CONFIG_NLATTR=y
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig
index a96b68ea5e83..5ef67da343bc 100644
--- a/arch/avr32/configs/atngw100_evklcd101_defconfig
+++ b/arch/avr32/configs/atngw100_evklcd101_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.6 3# Linux kernel version: 2.6.32-rc5
4# Wed Jun 18 16:09:32 2008 4# Thu Oct 29 09:37:19 2009
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
24 25
25# 26#
26# General setup 27# General setup
@@ -34,22 +35,37 @@ CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
37CONFIG_BSD_PROCESS_ACCT=y 39CONFIG_BSD_PROCESS_ACCT=y
38CONFIG_BSD_PROCESS_ACCT_V3=y 40CONFIG_BSD_PROCESS_ACCT_V3=y
39# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
40# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_TREE_RCU=y
48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
41# CONFIG_IKCONFIG is not set 53# CONFIG_IKCONFIG is not set
42CONFIG_LOG_BUF_SHIFT=14 54CONFIG_LOG_BUF_SHIFT=14
43# CONFIG_CGROUPS is not set
44# CONFIG_GROUP_SCHED is not set 55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
45CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
46CONFIG_SYSFS_DEPRECATED_V2=y 58CONFIG_SYSFS_DEPRECATED_V2=y
47# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
48# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
49CONFIG_BLK_DEV_INITRD=y 61CONFIG_BLK_DEV_INITRD=y
50CONFIG_INITRAMFS_SOURCE="" 62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
51CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
52CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
53CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
54# CONFIG_SYSCTL_SYSCALL is not set 70# CONFIG_SYSCTL_SYSCALL is not set
55CONFIG_KALLSYMS=y 71CONFIG_KALLSYMS=y
@@ -59,43 +75,51 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 75CONFIG_PRINTK=y
60CONFIG_BUG=y 76CONFIG_BUG=y
61CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set
63# CONFIG_BASE_FULL is not set 78# CONFIG_BASE_FULL is not set
64CONFIG_FUTEX=y 79CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y
66CONFIG_EPOLL=y 80CONFIG_EPOLL=y
67CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y 82CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 84CONFIG_SHMEM=y
85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
71CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLUB_DEBUG=y 91CONFIG_SLUB_DEBUG=y
92# CONFIG_COMPAT_BRK is not set
73# CONFIG_SLAB is not set 93# CONFIG_SLAB is not set
74CONFIG_SLUB=y 94CONFIG_SLUB=y
75# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
76CONFIG_PROFILING=y 96CONFIG_PROFILING=y
77# CONFIG_MARKERS is not set 97CONFIG_TRACEPOINTS=y
78CONFIG_OPROFILE=m 98CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y 100CONFIG_KPROBES=y
81CONFIG_HAVE_KPROBES=y 101CONFIG_HAVE_KPROBES=y
82# CONFIG_HAVE_KRETPROBES is not set 102CONFIG_HAVE_CLK=y
83CONFIG_PROC_PAGE_MONITOR=y 103
104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
84CONFIG_SLABINFO=y 110CONFIG_SLABINFO=y
85CONFIG_RT_MUTEXES=y 111CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1 112CONFIG_BASE_SMALL=1
88CONFIG_MODULES=y 113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
89CONFIG_MODULE_UNLOAD=y 115CONFIG_MODULE_UNLOAD=y
90CONFIG_MODULE_FORCE_UNLOAD=y 116CONFIG_MODULE_FORCE_UNLOAD=y
91# CONFIG_MODVERSIONS is not set 117# CONFIG_MODVERSIONS is not set
92# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
93CONFIG_KMOD=y
94CONFIG_BLOCK=y 119CONFIG_BLOCK=y
95# CONFIG_LBD is not set 120CONFIG_LBDAF=y
96# CONFIG_BLK_DEV_IO_TRACE is not set
97# CONFIG_LSF is not set
98# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set
99 123
100# 124#
101# IO Schedulers 125# IO Schedulers
@@ -109,7 +133,7 @@ CONFIG_IOSCHED_CFQ=y
109CONFIG_DEFAULT_CFQ=y 133CONFIG_DEFAULT_CFQ=y
110# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
111CONFIG_DEFAULT_IOSCHED="cfq" 135CONFIG_DEFAULT_IOSCHED="cfq"
112CONFIG_CLASSIC_RCU=y 136CONFIG_FREEZER=y
113 137
114# 138#
115# System Type and features 139# System Type and features
@@ -124,13 +148,20 @@ CONFIG_PERFORMANCE_COUNTERS=y
124CONFIG_PLATFORM_AT32AP=y 148CONFIG_PLATFORM_AT32AP=y
125CONFIG_CPU_AT32AP700X=y 149CONFIG_CPU_AT32AP700X=y
126CONFIG_CPU_AT32AP7000=y 150CONFIG_CPU_AT32AP7000=y
151CONFIG_BOARD_ATNGW100_COMMON=y
127# CONFIG_BOARD_ATSTK1000 is not set 152# CONFIG_BOARD_ATSTK1000 is not set
128CONFIG_BOARD_ATNGW100=y 153CONFIG_BOARD_ATNGW100_MKI=y
154# CONFIG_BOARD_ATNGW100_MKII is not set
155# CONFIG_BOARD_HAMMERHEAD is not set
156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159# CONFIG_BOARD_ATNGW100_ADDON_NONE is not set
129CONFIG_BOARD_ATNGW100_EVKLCD10X=y 160CONFIG_BOARD_ATNGW100_EVKLCD10X=y
161# CONFIG_BOARD_ATNGW100_MRMT is not set
130# CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA is not set 162# CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA is not set
131CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA=y 163CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA=y
132# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set 164# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set
133CONFIG_BOARD_ATNGW100_I2C_GPIO=y
134CONFIG_LOADER_U_BOOT=y 165CONFIG_LOADER_U_BOOT=y
135 166
136# 167#
@@ -139,14 +170,14 @@ CONFIG_LOADER_U_BOOT=y
139# CONFIG_AP700X_32_BIT_SMC is not set 170# CONFIG_AP700X_32_BIT_SMC is not set
140CONFIG_AP700X_16_BIT_SMC=y 171CONFIG_AP700X_16_BIT_SMC=y
141# CONFIG_AP700X_8_BIT_SMC is not set 172# CONFIG_AP700X_8_BIT_SMC is not set
142CONFIG_GPIO_DEV=y
143CONFIG_LOAD_ADDRESS=0x10000000 173CONFIG_LOAD_ADDRESS=0x10000000
144CONFIG_ENTRY_ADDRESS=0x90000000 174CONFIG_ENTRY_ADDRESS=0x90000000
145CONFIG_PHYS_OFFSET=0x10000000 175CONFIG_PHYS_OFFSET=0x10000000
146CONFIG_PREEMPT_NONE=y 176CONFIG_PREEMPT_NONE=y
147# CONFIG_PREEMPT_VOLUNTARY is not set 177# CONFIG_PREEMPT_VOLUNTARY is not set
148# CONFIG_PREEMPT is not set 178# CONFIG_PREEMPT is not set
149# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 179CONFIG_QUICKLIST=y
180# CONFIG_HAVE_ARCH_BOOTMEM is not set
150# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 181# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
151# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 182# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
152CONFIG_ARCH_FLATMEM_ENABLE=y 183CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -158,33 +189,36 @@ CONFIG_FLATMEM_MANUAL=y
158# CONFIG_SPARSEMEM_MANUAL is not set 189# CONFIG_SPARSEMEM_MANUAL is not set
159CONFIG_FLATMEM=y 190CONFIG_FLATMEM=y
160CONFIG_FLAT_NODE_MEM_MAP=y 191CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set 192CONFIG_PAGEFLAGS_EXTENDED=y
162# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4 193CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set 194# CONFIG_PHYS_ADDR_T_64BIT is not set
165CONFIG_ZONE_DMA_FLAG=0 195CONFIG_ZONE_DMA_FLAG=0
196CONFIG_NR_QUICK=2
166CONFIG_VIRT_TO_BUS=y 197CONFIG_VIRT_TO_BUS=y
198CONFIG_HAVE_MLOCK=y
199CONFIG_HAVE_MLOCKED_PAGE_BIT=y
200# CONFIG_KSM is not set
201CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
167# CONFIG_OWNERSHIP_TRACE is not set 202# CONFIG_OWNERSHIP_TRACE is not set
168CONFIG_NMI_DEBUGGING=y 203CONFIG_NMI_DEBUGGING=y
169CONFIG_DW_DMAC=y
170# CONFIG_HZ_100 is not set 204# CONFIG_HZ_100 is not set
171CONFIG_HZ_250=y 205CONFIG_HZ_250=y
172# CONFIG_HZ_300 is not set 206# CONFIG_HZ_300 is not set
173# CONFIG_HZ_1000 is not set 207# CONFIG_HZ_1000 is not set
174CONFIG_HZ=250 208CONFIG_HZ=250
175# CONFIG_SCHED_HRTICK is not set 209CONFIG_SCHED_HRTICK=y
176CONFIG_CMDLINE="" 210CONFIG_CMDLINE=""
177 211
178# 212#
179# Power management options 213# Power management options
180# 214#
181CONFIG_ARCH_SUSPEND_POSSIBLE=y
182CONFIG_PM=y 215CONFIG_PM=y
183# CONFIG_PM_LEGACY is not set
184# CONFIG_PM_DEBUG is not set 216# CONFIG_PM_DEBUG is not set
185CONFIG_PM_SLEEP=y 217CONFIG_PM_SLEEP=y
186CONFIG_SUSPEND=y 218CONFIG_SUSPEND=y
187CONFIG_SUSPEND_FREEZER=y 219CONFIG_SUSPEND_FREEZER=y
220# CONFIG_PM_RUNTIME is not set
221CONFIG_ARCH_SUSPEND_POSSIBLE=y
188 222
189# 223#
190# CPU Frequency scaling 224# CPU Frequency scaling
@@ -194,6 +228,7 @@ CONFIG_CPU_FREQ_TABLE=y
194# CONFIG_CPU_FREQ_DEBUG is not set 228# CONFIG_CPU_FREQ_DEBUG is not set
195# CONFIG_CPU_FREQ_STAT is not set 229# CONFIG_CPU_FREQ_STAT is not set
196# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set 230# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
231# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
197# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 232# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
198CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 233CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
199# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 234# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -214,11 +249,9 @@ CONFIG_CPU_FREQ_AT32AP=y
214# Executable file formats 249# Executable file formats
215# 250#
216CONFIG_BINFMT_ELF=y 251CONFIG_BINFMT_ELF=y
252# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
253# CONFIG_HAVE_AOUT is not set
217# CONFIG_BINFMT_MISC is not set 254# CONFIG_BINFMT_MISC is not set
218
219#
220# Networking
221#
222CONFIG_NET=y 255CONFIG_NET=y
223 256
224# 257#
@@ -232,6 +265,7 @@ CONFIG_XFRM_USER=y
232# CONFIG_XFRM_SUB_POLICY is not set 265# CONFIG_XFRM_SUB_POLICY is not set
233# CONFIG_XFRM_MIGRATE is not set 266# CONFIG_XFRM_MIGRATE is not set
234# CONFIG_XFRM_STATISTICS is not set 267# CONFIG_XFRM_STATISTICS is not set
268CONFIG_XFRM_IPCOMP=y
235CONFIG_NET_KEY=y 269CONFIG_NET_KEY=y
236# CONFIG_NET_KEY_MIGRATE is not set 270# CONFIG_NET_KEY_MIGRATE is not set
237CONFIG_INET=y 271CONFIG_INET=y
@@ -269,7 +303,6 @@ CONFIG_INET_TCP_DIAG=y
269CONFIG_TCP_CONG_CUBIC=y 303CONFIG_TCP_CONG_CUBIC=y
270CONFIG_DEFAULT_TCP_CONG="cubic" 304CONFIG_DEFAULT_TCP_CONG="cubic"
271# CONFIG_TCP_MD5SIG is not set 305# CONFIG_TCP_MD5SIG is not set
272# CONFIG_IP_VS is not set
273CONFIG_IPV6=y 306CONFIG_IPV6=y
274# CONFIG_IPV6_PRIVACY is not set 307# CONFIG_IPV6_PRIVACY is not set
275# CONFIG_IPV6_ROUTER_PREF is not set 308# CONFIG_IPV6_ROUTER_PREF is not set
@@ -285,8 +318,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
285CONFIG_INET6_XFRM_MODE_BEET=y 318CONFIG_INET6_XFRM_MODE_BEET=y
286# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 319# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
287CONFIG_IPV6_SIT=y 320CONFIG_IPV6_SIT=y
321CONFIG_IPV6_NDISC_NODETYPE=y
288# CONFIG_IPV6_TUNNEL is not set 322# CONFIG_IPV6_TUNNEL is not set
289# CONFIG_IPV6_MULTIPLE_TABLES is not set 323# CONFIG_IPV6_MULTIPLE_TABLES is not set
324# CONFIG_IPV6_MROUTE is not set
290# CONFIG_NETWORK_SECMARK is not set 325# CONFIG_NETWORK_SECMARK is not set
291CONFIG_NETFILTER=y 326CONFIG_NETFILTER=y
292# CONFIG_NETFILTER_DEBUG is not set 327# CONFIG_NETFILTER_DEBUG is not set
@@ -310,10 +345,12 @@ CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
310CONFIG_NETFILTER_XT_MATCH_MARK=m 345CONFIG_NETFILTER_XT_MATCH_MARK=m
311CONFIG_NETFILTER_XT_MATCH_POLICY=m 346CONFIG_NETFILTER_XT_MATCH_POLICY=m
312CONFIG_NETFILTER_XT_MATCH_STATE=m 347CONFIG_NETFILTER_XT_MATCH_STATE=m
348# CONFIG_IP_VS is not set
313 349
314# 350#
315# IP: Netfilter Configuration 351# IP: Netfilter Configuration
316# 352#
353CONFIG_NF_DEFRAG_IPV4=m
317CONFIG_NF_CONNTRACK_IPV4=m 354CONFIG_NF_CONNTRACK_IPV4=m
318CONFIG_NF_CONNTRACK_PROC_COMPAT=y 355CONFIG_NF_CONNTRACK_PROC_COMPAT=y
319CONFIG_IP_NF_IPTABLES=m 356CONFIG_IP_NF_IPTABLES=m
@@ -339,16 +376,20 @@ CONFIG_IP_NF_MANGLE=m
339CONFIG_NF_CONNTRACK_IPV6=m 376CONFIG_NF_CONNTRACK_IPV6=m
340CONFIG_IP6_NF_IPTABLES=m 377CONFIG_IP6_NF_IPTABLES=m
341CONFIG_IP6_NF_MATCH_IPV6HEADER=m 378CONFIG_IP6_NF_MATCH_IPV6HEADER=m
342CONFIG_IP6_NF_FILTER=m
343CONFIG_IP6_NF_TARGET_LOG=m 379CONFIG_IP6_NF_TARGET_LOG=m
380CONFIG_IP6_NF_FILTER=m
344CONFIG_IP6_NF_TARGET_REJECT=m 381CONFIG_IP6_NF_TARGET_REJECT=m
345CONFIG_IP6_NF_MANGLE=m 382CONFIG_IP6_NF_MANGLE=m
346# CONFIG_IP_DCCP is not set 383# CONFIG_IP_DCCP is not set
347# CONFIG_IP_SCTP is not set 384# CONFIG_IP_SCTP is not set
385# CONFIG_RDS is not set
348# CONFIG_TIPC is not set 386# CONFIG_TIPC is not set
349# CONFIG_ATM is not set 387# CONFIG_ATM is not set
388CONFIG_STP=m
350CONFIG_BRIDGE=m 389CONFIG_BRIDGE=m
390# CONFIG_NET_DSA is not set
351CONFIG_VLAN_8021Q=m 391CONFIG_VLAN_8021Q=m
392# CONFIG_VLAN_8021Q_GVRP is not set
352# CONFIG_DECNET is not set 393# CONFIG_DECNET is not set
353CONFIG_LLC=m 394CONFIG_LLC=m
354# CONFIG_LLC2 is not set 395# CONFIG_LLC2 is not set
@@ -358,26 +399,33 @@ CONFIG_LLC=m
358# CONFIG_LAPB is not set 399# CONFIG_LAPB is not set
359# CONFIG_ECONET is not set 400# CONFIG_ECONET is not set
360# CONFIG_WAN_ROUTER is not set 401# CONFIG_WAN_ROUTER is not set
402# CONFIG_PHONET is not set
403# CONFIG_IEEE802154 is not set
361# CONFIG_NET_SCHED is not set 404# CONFIG_NET_SCHED is not set
405# CONFIG_DCB is not set
362 406
363# 407#
364# Network testing 408# Network testing
365# 409#
366# CONFIG_NET_PKTGEN is not set 410# CONFIG_NET_PKTGEN is not set
367# CONFIG_NET_TCPPROBE is not set 411# CONFIG_NET_TCPPROBE is not set
412# CONFIG_NET_DROP_MONITOR is not set
368# CONFIG_HAMRADIO is not set 413# CONFIG_HAMRADIO is not set
369# CONFIG_CAN is not set 414# CONFIG_CAN is not set
370# CONFIG_IRDA is not set 415# CONFIG_IRDA is not set
371# CONFIG_BT is not set 416# CONFIG_BT is not set
372# CONFIG_AF_RXRPC is not set 417# CONFIG_AF_RXRPC is not set
418CONFIG_WIRELESS=y
419# CONFIG_CFG80211 is not set
420CONFIG_CFG80211_DEFAULT_PS_VALUE=0
421# CONFIG_WIRELESS_OLD_REGULATORY is not set
422# CONFIG_WIRELESS_EXT is not set
423# CONFIG_LIB80211 is not set
373 424
374# 425#
375# Wireless 426# CFG80211 needs to be enabled for MAC80211
376# 427#
377# CONFIG_CFG80211 is not set 428# CONFIG_WIMAX is not set
378# CONFIG_WIRELESS_EXT is not set
379# CONFIG_MAC80211 is not set
380# CONFIG_IEEE80211 is not set
381# CONFIG_RFKILL is not set 429# CONFIG_RFKILL is not set
382# CONFIG_NET_9P is not set 430# CONFIG_NET_9P is not set
383 431
@@ -389,6 +437,7 @@ CONFIG_LLC=m
389# Generic Driver Options 437# Generic Driver Options
390# 438#
391CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 439CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
440# CONFIG_DEVTMPFS is not set
392CONFIG_STANDALONE=y 441CONFIG_STANDALONE=y
393# CONFIG_PREVENT_FIRMWARE_BUILD is not set 442# CONFIG_PREVENT_FIRMWARE_BUILD is not set
394# CONFIG_FW_LOADER is not set 443# CONFIG_FW_LOADER is not set
@@ -398,10 +447,12 @@ CONFIG_STANDALONE=y
398# CONFIG_CONNECTOR is not set 447# CONFIG_CONNECTOR is not set
399CONFIG_MTD=y 448CONFIG_MTD=y
400# CONFIG_MTD_DEBUG is not set 449# CONFIG_MTD_DEBUG is not set
450# CONFIG_MTD_TESTS is not set
401# CONFIG_MTD_CONCAT is not set 451# CONFIG_MTD_CONCAT is not set
402CONFIG_MTD_PARTITIONS=y 452CONFIG_MTD_PARTITIONS=y
403# CONFIG_MTD_REDBOOT_PARTS is not set 453# CONFIG_MTD_REDBOOT_PARTS is not set
404CONFIG_MTD_CMDLINE_PARTS=y 454CONFIG_MTD_CMDLINE_PARTS=y
455# CONFIG_MTD_AR7_PARTS is not set
405 456
406# 457#
407# User Modules And Translation Layers 458# User Modules And Translation Layers
@@ -446,16 +497,17 @@ CONFIG_MTD_CFI_UTIL=y
446# 497#
447# CONFIG_MTD_COMPLEX_MAPPINGS is not set 498# CONFIG_MTD_COMPLEX_MAPPINGS is not set
448CONFIG_MTD_PHYSMAP=y 499CONFIG_MTD_PHYSMAP=y
449CONFIG_MTD_PHYSMAP_START=0x80000000 500# CONFIG_MTD_PHYSMAP_COMPAT is not set
450CONFIG_MTD_PHYSMAP_LEN=0x0
451CONFIG_MTD_PHYSMAP_BANKWIDTH=2
452# CONFIG_MTD_PLATRAM is not set 501# CONFIG_MTD_PLATRAM is not set
453 502
454# 503#
455# Self-contained MTD device drivers 504# Self-contained MTD device drivers
456# 505#
457CONFIG_MTD_DATAFLASH=y 506CONFIG_MTD_DATAFLASH=y
507# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
508# CONFIG_MTD_DATAFLASH_OTP is not set
458# CONFIG_MTD_M25P80 is not set 509# CONFIG_MTD_M25P80 is not set
510# CONFIG_MTD_SST25L is not set
459# CONFIG_MTD_SLRAM is not set 511# CONFIG_MTD_SLRAM is not set
460# CONFIG_MTD_PHRAM is not set 512# CONFIG_MTD_PHRAM is not set
461# CONFIG_MTD_MTDRAM is not set 513# CONFIG_MTD_MTDRAM is not set
@@ -471,6 +523,11 @@ CONFIG_MTD_DATAFLASH=y
471# CONFIG_MTD_ONENAND is not set 523# CONFIG_MTD_ONENAND is not set
472 524
473# 525#
526# LPDDR flash memory drivers
527#
528# CONFIG_MTD_LPDDR is not set
529
530#
474# UBI - Unsorted block images 531# UBI - Unsorted block images
475# 532#
476CONFIG_MTD_UBI=y 533CONFIG_MTD_UBI=y
@@ -499,10 +556,20 @@ CONFIG_MISC_DEVICES=y
499CONFIG_ATMEL_TCLIB=y 556CONFIG_ATMEL_TCLIB=y
500CONFIG_ATMEL_TCB_CLKSRC=y 557CONFIG_ATMEL_TCB_CLKSRC=y
501CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 558CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
502# CONFIG_EEPROM_93CX6 is not set 559# CONFIG_ICS932S401 is not set
503# CONFIG_ATMEL_SSC is not set 560# CONFIG_ATMEL_SSC is not set
504# CONFIG_ENCLOSURE_SERVICES is not set 561# CONFIG_ENCLOSURE_SERVICES is not set
505# CONFIG_HAVE_IDE is not set 562# CONFIG_ISL29003 is not set
563# CONFIG_C2PORT is not set
564
565#
566# EEPROM support
567#
568# CONFIG_EEPROM_AT24 is not set
569# CONFIG_EEPROM_AT25 is not set
570# CONFIG_EEPROM_LEGACY is not set
571# CONFIG_EEPROM_MAX6875 is not set
572# CONFIG_EEPROM_93CX6 is not set
506 573
507# 574#
508# SCSI device support 575# SCSI device support
@@ -514,7 +581,6 @@ CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
514# CONFIG_ATA is not set 581# CONFIG_ATA is not set
515# CONFIG_MD is not set 582# CONFIG_MD is not set
516CONFIG_NETDEVICES=y 583CONFIG_NETDEVICES=y
517# CONFIG_NETDEVICES_MULTIQUEUE is not set
518# CONFIG_DUMMY is not set 584# CONFIG_DUMMY is not set
519# CONFIG_BONDING is not set 585# CONFIG_BONDING is not set
520# CONFIG_MACVLAN is not set 586# CONFIG_MACVLAN is not set
@@ -536,25 +602,37 @@ CONFIG_PHYLIB=y
536# CONFIG_BROADCOM_PHY is not set 602# CONFIG_BROADCOM_PHY is not set
537# CONFIG_ICPLUS_PHY is not set 603# CONFIG_ICPLUS_PHY is not set
538# CONFIG_REALTEK_PHY is not set 604# CONFIG_REALTEK_PHY is not set
605# CONFIG_NATIONAL_PHY is not set
606# CONFIG_STE10XP is not set
607# CONFIG_LSI_ET1011C_PHY is not set
539# CONFIG_FIXED_PHY is not set 608# CONFIG_FIXED_PHY is not set
540# CONFIG_MDIO_BITBANG is not set 609# CONFIG_MDIO_BITBANG is not set
541CONFIG_NET_ETHERNET=y 610CONFIG_NET_ETHERNET=y
542# CONFIG_MII is not set 611# CONFIG_MII is not set
543CONFIG_MACB=y 612CONFIG_MACB=y
544# CONFIG_ENC28J60 is not set 613# CONFIG_ENC28J60 is not set
614# CONFIG_ETHOC is not set
615# CONFIG_DNET is not set
545# CONFIG_IBM_NEW_EMAC_ZMII is not set 616# CONFIG_IBM_NEW_EMAC_ZMII is not set
546# CONFIG_IBM_NEW_EMAC_RGMII is not set 617# CONFIG_IBM_NEW_EMAC_RGMII is not set
547# CONFIG_IBM_NEW_EMAC_TAH is not set 618# CONFIG_IBM_NEW_EMAC_TAH is not set
548# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 619# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
620# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
621# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
622# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
549# CONFIG_B44 is not set 623# CONFIG_B44 is not set
624# CONFIG_KS8842 is not set
625# CONFIG_KS8851 is not set
626# CONFIG_KS8851_MLL is not set
550# CONFIG_NETDEV_1000 is not set 627# CONFIG_NETDEV_1000 is not set
551# CONFIG_NETDEV_10000 is not set 628# CONFIG_NETDEV_10000 is not set
629CONFIG_WLAN=y
630# CONFIG_WLAN_PRE80211 is not set
631# CONFIG_WLAN_80211 is not set
552 632
553# 633#
554# Wireless LAN 634# Enable WiMAX (Networking options) to see the WiMAX drivers
555# 635#
556# CONFIG_WLAN_PRE80211 is not set
557# CONFIG_WLAN_80211 is not set
558# CONFIG_WAN is not set 636# CONFIG_WAN is not set
559CONFIG_PPP=m 637CONFIG_PPP=m
560# CONFIG_PPP_MULTILINK is not set 638# CONFIG_PPP_MULTILINK is not set
@@ -598,15 +676,30 @@ CONFIG_INPUT_EVDEV=m
598# CONFIG_INPUT_TABLET is not set 676# CONFIG_INPUT_TABLET is not set
599CONFIG_INPUT_TOUCHSCREEN=y 677CONFIG_INPUT_TOUCHSCREEN=y
600# CONFIG_TOUCHSCREEN_ADS7846 is not set 678# CONFIG_TOUCHSCREEN_ADS7846 is not set
679# CONFIG_TOUCHSCREEN_AD7877 is not set
680# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
681# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
682# CONFIG_TOUCHSCREEN_AD7879 is not set
683# CONFIG_TOUCHSCREEN_EETI is not set
601# CONFIG_TOUCHSCREEN_FUJITSU is not set 684# CONFIG_TOUCHSCREEN_FUJITSU is not set
602# CONFIG_TOUCHSCREEN_GUNZE is not set 685# CONFIG_TOUCHSCREEN_GUNZE is not set
603# CONFIG_TOUCHSCREEN_ELO is not set 686# CONFIG_TOUCHSCREEN_ELO is not set
687# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
688# CONFIG_TOUCHSCREEN_MCS5000 is not set
604# CONFIG_TOUCHSCREEN_MTOUCH is not set 689# CONFIG_TOUCHSCREEN_MTOUCH is not set
690# CONFIG_TOUCHSCREEN_INEXIO is not set
605# CONFIG_TOUCHSCREEN_MK712 is not set 691# CONFIG_TOUCHSCREEN_MK712 is not set
606# CONFIG_TOUCHSCREEN_PENMOUNT is not set 692# CONFIG_TOUCHSCREEN_PENMOUNT is not set
607# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set 693# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
608# CONFIG_TOUCHSCREEN_TOUCHWIN is not set 694# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
609# CONFIG_TOUCHSCREEN_UCB1400 is not set 695CONFIG_TOUCHSCREEN_WM97XX=m
696CONFIG_TOUCHSCREEN_WM9705=y
697CONFIG_TOUCHSCREEN_WM9712=y
698CONFIG_TOUCHSCREEN_WM9713=y
699# CONFIG_TOUCHSCREEN_WM97XX_ATMEL is not set
700# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
701# CONFIG_TOUCHSCREEN_TSC2007 is not set
702# CONFIG_TOUCHSCREEN_W90X900 is not set
610# CONFIG_INPUT_MISC is not set 703# CONFIG_INPUT_MISC is not set
611 704
612# 705#
@@ -619,9 +712,11 @@ CONFIG_INPUT_TOUCHSCREEN=y
619# Character devices 712# Character devices
620# 713#
621CONFIG_VT=y 714CONFIG_VT=y
715CONFIG_CONSOLE_TRANSLATIONS=y
622CONFIG_VT_CONSOLE=y 716CONFIG_VT_CONSOLE=y
623CONFIG_HW_CONSOLE=y 717CONFIG_HW_CONSOLE=y
624# CONFIG_VT_HW_CONSOLE_BINDING is not set 718# CONFIG_VT_HW_CONSOLE_BINDING is not set
719CONFIG_DEVKMEM=y
625# CONFIG_SERIAL_NONSTANDARD is not set 720# CONFIG_SERIAL_NONSTANDARD is not set
626 721
627# 722#
@@ -636,9 +731,11 @@ CONFIG_SERIAL_ATMEL=y
636CONFIG_SERIAL_ATMEL_CONSOLE=y 731CONFIG_SERIAL_ATMEL_CONSOLE=y
637CONFIG_SERIAL_ATMEL_PDC=y 732CONFIG_SERIAL_ATMEL_PDC=y
638# CONFIG_SERIAL_ATMEL_TTYAT is not set 733# CONFIG_SERIAL_ATMEL_TTYAT is not set
734# CONFIG_SERIAL_MAX3100 is not set
639CONFIG_SERIAL_CORE=y 735CONFIG_SERIAL_CORE=y
640CONFIG_SERIAL_CORE_CONSOLE=y 736CONFIG_SERIAL_CORE_CONSOLE=y
641CONFIG_UNIX98_PTYS=y 737CONFIG_UNIX98_PTYS=y
738# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
642# CONFIG_LEGACY_PTYS is not set 739# CONFIG_LEGACY_PTYS is not set
643# CONFIG_IPMI_HANDLER is not set 740# CONFIG_IPMI_HANDLER is not set
644# CONFIG_HW_RANDOM is not set 741# CONFIG_HW_RANDOM is not set
@@ -647,45 +744,44 @@ CONFIG_UNIX98_PTYS=y
647# CONFIG_TCG_TPM is not set 744# CONFIG_TCG_TPM is not set
648CONFIG_I2C=m 745CONFIG_I2C=m
649CONFIG_I2C_BOARDINFO=y 746CONFIG_I2C_BOARDINFO=y
747CONFIG_I2C_COMPAT=y
650CONFIG_I2C_CHARDEV=m 748CONFIG_I2C_CHARDEV=m
749CONFIG_I2C_HELPER_AUTO=y
750CONFIG_I2C_ALGOBIT=m
651 751
652# 752#
653# I2C Algorithms 753# I2C Hardware Bus support
654# 754#
655CONFIG_I2C_ALGOBIT=m
656# CONFIG_I2C_ALGOPCF is not set
657# CONFIG_I2C_ALGOPCA is not set
658 755
659# 756#
660# I2C Hardware Bus support 757# I2C system bus drivers (mostly embedded / system-on-chip)
661# 758#
662CONFIG_I2C_ATMELTWI=m 759# CONFIG_I2C_DESIGNWARE is not set
663CONFIG_I2C_GPIO=m 760CONFIG_I2C_GPIO=m
664# CONFIG_I2C_OCORES is not set 761# CONFIG_I2C_OCORES is not set
665# CONFIG_I2C_PARPORT_LIGHT is not set
666# CONFIG_I2C_SIMTEC is not set 762# CONFIG_I2C_SIMTEC is not set
763
764#
765# External I2C/SMBus adapter drivers
766#
767# CONFIG_I2C_PARPORT_LIGHT is not set
667# CONFIG_I2C_TAOS_EVM is not set 768# CONFIG_I2C_TAOS_EVM is not set
769
770#
771# Other I2C/SMBus bus drivers
772#
773# CONFIG_I2C_PCA_PLATFORM is not set
668# CONFIG_I2C_STUB is not set 774# CONFIG_I2C_STUB is not set
669 775
670# 776#
671# Miscellaneous I2C Chip support 777# Miscellaneous I2C Chip support
672# 778#
673# CONFIG_DS1682 is not set 779# CONFIG_DS1682 is not set
674# CONFIG_EEPROM_LEGACY is not set
675# CONFIG_SENSORS_PCF8574 is not set
676# CONFIG_PCF8575 is not set
677# CONFIG_SENSORS_PCF8591 is not set
678# CONFIG_TPS65010 is not set
679# CONFIG_SENSORS_MAX6875 is not set
680# CONFIG_SENSORS_TSL2550 is not set 780# CONFIG_SENSORS_TSL2550 is not set
681# CONFIG_I2C_DEBUG_CORE is not set 781# CONFIG_I2C_DEBUG_CORE is not set
682# CONFIG_I2C_DEBUG_ALGO is not set 782# CONFIG_I2C_DEBUG_ALGO is not set
683# CONFIG_I2C_DEBUG_BUS is not set 783# CONFIG_I2C_DEBUG_BUS is not set
684# CONFIG_I2C_DEBUG_CHIP is not set 784# CONFIG_I2C_DEBUG_CHIP is not set
685
686#
687# SPI support
688#
689CONFIG_SPI=y 785CONFIG_SPI=y
690# CONFIG_SPI_DEBUG is not set 786# CONFIG_SPI_DEBUG is not set
691CONFIG_SPI_MASTER=y 787CONFIG_SPI_MASTER=y
@@ -695,30 +791,48 @@ CONFIG_SPI_MASTER=y
695# 791#
696CONFIG_SPI_ATMEL=y 792CONFIG_SPI_ATMEL=y
697# CONFIG_SPI_BITBANG is not set 793# CONFIG_SPI_BITBANG is not set
794# CONFIG_SPI_GPIO is not set
698 795
699# 796#
700# SPI Protocol Masters 797# SPI Protocol Masters
701# 798#
702# CONFIG_EEPROM_AT25 is not set
703CONFIG_SPI_SPIDEV=m 799CONFIG_SPI_SPIDEV=m
704# CONFIG_SPI_TLE62X0 is not set 800# CONFIG_SPI_TLE62X0 is not set
705CONFIG_HAVE_GPIO_LIB=y
706 801
707# 802#
708# GPIO Support 803# PPS support
709# 804#
805# CONFIG_PPS is not set
806CONFIG_ARCH_REQUIRE_GPIOLIB=y
807CONFIG_GPIOLIB=y
710# CONFIG_DEBUG_GPIO is not set 808# CONFIG_DEBUG_GPIO is not set
809# CONFIG_GPIO_SYSFS is not set
810
811#
812# Memory mapped GPIO expanders:
813#
711 814
712# 815#
713# I2C GPIO expanders: 816# I2C GPIO expanders:
714# 817#
818# CONFIG_GPIO_MAX732X is not set
715# CONFIG_GPIO_PCA953X is not set 819# CONFIG_GPIO_PCA953X is not set
716# CONFIG_GPIO_PCF857X is not set 820# CONFIG_GPIO_PCF857X is not set
717 821
718# 822#
823# PCI GPIO expanders:
824#
825
826#
719# SPI GPIO expanders: 827# SPI GPIO expanders:
720# 828#
829# CONFIG_GPIO_MAX7301 is not set
721# CONFIG_GPIO_MCP23S08 is not set 830# CONFIG_GPIO_MCP23S08 is not set
831# CONFIG_GPIO_MC33880 is not set
832
833#
834# AC97 GPIO expanders:
835#
722# CONFIG_W1 is not set 836# CONFIG_W1 is not set
723# CONFIG_POWER_SUPPLY is not set 837# CONFIG_POWER_SUPPLY is not set
724# CONFIG_HWMON is not set 838# CONFIG_HWMON is not set
@@ -731,24 +845,31 @@ CONFIG_WATCHDOG=y
731# 845#
732# CONFIG_SOFT_WATCHDOG is not set 846# CONFIG_SOFT_WATCHDOG is not set
733CONFIG_AT32AP700X_WDT=y 847CONFIG_AT32AP700X_WDT=y
848CONFIG_SSB_POSSIBLE=y
734 849
735# 850#
736# Sonics Silicon Backplane 851# Sonics Silicon Backplane
737# 852#
738CONFIG_SSB_POSSIBLE=y
739# CONFIG_SSB is not set 853# CONFIG_SSB is not set
740 854
741# 855#
742# Multifunction device drivers 856# Multifunction device drivers
743# 857#
858# CONFIG_MFD_CORE is not set
744# CONFIG_MFD_SM501 is not set 859# CONFIG_MFD_SM501 is not set
745 860# CONFIG_HTC_PASIC3 is not set
746# 861# CONFIG_UCB1400_CORE is not set
747# Multimedia devices 862# CONFIG_TPS65010 is not set
748# 863# CONFIG_MFD_TMIO is not set
749# CONFIG_VIDEO_DEV is not set 864# CONFIG_MFD_WM8400 is not set
750# CONFIG_DVB_CORE is not set 865# CONFIG_MFD_WM831X is not set
751# CONFIG_DAB is not set 866# CONFIG_MFD_WM8350_I2C is not set
867# CONFIG_MFD_PCF50633 is not set
868# CONFIG_MFD_MC13783 is not set
869# CONFIG_AB3100_CORE is not set
870# CONFIG_EZX_PCAP is not set
871# CONFIG_REGULATOR is not set
872# CONFIG_MEDIA_SUPPORT is not set
752 873
753# 874#
754# Graphics support 875# Graphics support
@@ -758,6 +879,7 @@ CONFIG_SSB_POSSIBLE=y
758CONFIG_FB=y 879CONFIG_FB=y
759# CONFIG_FIRMWARE_EDID is not set 880# CONFIG_FIRMWARE_EDID is not set
760# CONFIG_FB_DDC is not set 881# CONFIG_FB_DDC is not set
882# CONFIG_FB_BOOT_VESA_SUPPORT is not set
761CONFIG_FB_CFB_FILLRECT=y 883CONFIG_FB_CFB_FILLRECT=y
762CONFIG_FB_CFB_COPYAREA=y 884CONFIG_FB_CFB_COPYAREA=y
763CONFIG_FB_CFB_IMAGEBLIT=y 885CONFIG_FB_CFB_IMAGEBLIT=y
@@ -765,8 +887,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
765# CONFIG_FB_SYS_FILLRECT is not set 887# CONFIG_FB_SYS_FILLRECT is not set
766# CONFIG_FB_SYS_COPYAREA is not set 888# CONFIG_FB_SYS_COPYAREA is not set
767# CONFIG_FB_SYS_IMAGEBLIT is not set 889# CONFIG_FB_SYS_IMAGEBLIT is not set
890# CONFIG_FB_FOREIGN_ENDIAN is not set
768# CONFIG_FB_SYS_FOPS is not set 891# CONFIG_FB_SYS_FOPS is not set
769CONFIG_FB_DEFERRED_IO=y
770# CONFIG_FB_SVGALIB is not set 892# CONFIG_FB_SVGALIB is not set
771# CONFIG_FB_MACMODES is not set 893# CONFIG_FB_MACMODES is not set
772# CONFIG_FB_BACKLIGHT is not set 894# CONFIG_FB_BACKLIGHT is not set
@@ -779,6 +901,9 @@ CONFIG_FB_DEFERRED_IO=y
779# CONFIG_FB_S1D13XXX is not set 901# CONFIG_FB_S1D13XXX is not set
780CONFIG_FB_ATMEL=y 902CONFIG_FB_ATMEL=y
781# CONFIG_FB_VIRTUAL is not set 903# CONFIG_FB_VIRTUAL is not set
904# CONFIG_FB_METRONOME is not set
905# CONFIG_FB_MB862XX is not set
906# CONFIG_FB_BROADSHEET is not set
782# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 907# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
783 908
784# 909#
@@ -792,119 +917,124 @@ CONFIG_FB_ATMEL=y
792CONFIG_DUMMY_CONSOLE=y 917CONFIG_DUMMY_CONSOLE=y
793# CONFIG_FRAMEBUFFER_CONSOLE is not set 918# CONFIG_FRAMEBUFFER_CONSOLE is not set
794# CONFIG_LOGO is not set 919# CONFIG_LOGO is not set
795
796#
797# Sound
798#
799CONFIG_SOUND=y 920CONFIG_SOUND=y
800 921CONFIG_SOUND_OSS_CORE=y
801# 922CONFIG_SOUND_OSS_CORE_PRECLAIM=y
802# Advanced Linux Sound Architecture
803#
804CONFIG_SND=y 923CONFIG_SND=y
805CONFIG_SND_TIMER=m 924CONFIG_SND_TIMER=y
806CONFIG_SND_PCM=m 925CONFIG_SND_PCM=m
807# CONFIG_SND_SEQUENCER is not set 926# CONFIG_SND_SEQUENCER is not set
808CONFIG_SND_OSSEMUL=y 927CONFIG_SND_OSSEMUL=y
809CONFIG_SND_MIXER_OSS=m 928CONFIG_SND_MIXER_OSS=m
810CONFIG_SND_PCM_OSS=m 929CONFIG_SND_PCM_OSS=m
811CONFIG_SND_PCM_OSS_PLUGINS=y 930CONFIG_SND_PCM_OSS_PLUGINS=y
931CONFIG_SND_HRTIMER=y
812# CONFIG_SND_DYNAMIC_MINORS is not set 932# CONFIG_SND_DYNAMIC_MINORS is not set
813# CONFIG_SND_SUPPORT_OLD_API is not set 933# CONFIG_SND_SUPPORT_OLD_API is not set
814CONFIG_SND_VERBOSE_PROCFS=y 934CONFIG_SND_VERBOSE_PROCFS=y
815# CONFIG_SND_VERBOSE_PRINTK is not set 935# CONFIG_SND_VERBOSE_PRINTK is not set
816# CONFIG_SND_DEBUG is not set 936# CONFIG_SND_DEBUG is not set
817 937CONFIG_SND_VMASTER=y
818# 938# CONFIG_SND_RAWMIDI_SEQ is not set
819# Generic devices 939# CONFIG_SND_OPL3_LIB_SEQ is not set
820# 940# CONFIG_SND_OPL4_LIB_SEQ is not set
941# CONFIG_SND_SBAWE_SEQ is not set
942# CONFIG_SND_EMU10K1_SEQ is not set
821CONFIG_SND_AC97_CODEC=m 943CONFIG_SND_AC97_CODEC=m
822# CONFIG_SND_DUMMY is not set 944# CONFIG_SND_DRIVERS is not set
823# CONFIG_SND_MTPAV is not set
824# CONFIG_SND_SERIAL_U16550 is not set
825# CONFIG_SND_MPU401 is not set
826 945
827# 946#
828# AVR32 devices 947# Atmel devices (AVR32 and AT91)
829#
830CONFIG_SND_ATMEL_AC97=m
831
832#
833# SPI devices
834#
835
836#
837# System on Chip audio support
838# 948#
949# CONFIG_SND_ATMEL_ABDAC is not set
950CONFIG_SND_ATMEL_AC97C=m
951# CONFIG_SND_SPI is not set
839# CONFIG_SND_SOC is not set 952# CONFIG_SND_SOC is not set
840
841#
842# SoC Audio support for SuperH
843#
844
845#
846# ALSA SoC audio for Freescale SOCs
847#
848
849#
850# Open Sound System
851#
852# CONFIG_SOUND_PRIME is not set 953# CONFIG_SOUND_PRIME is not set
853CONFIG_AC97_BUS=m 954CONFIG_AC97_BUS=m
854CONFIG_HID_SUPPORT=y 955CONFIG_HID_SUPPORT=y
855CONFIG_HID=y 956CONFIG_HID=y
856# CONFIG_HID_DEBUG is not set
857# CONFIG_HIDRAW is not set 957# CONFIG_HIDRAW is not set
958# CONFIG_HID_PID is not set
959
960#
961# Special HID drivers
962#
858CONFIG_USB_SUPPORT=y 963CONFIG_USB_SUPPORT=y
859# CONFIG_USB_ARCH_HAS_HCD is not set 964# CONFIG_USB_ARCH_HAS_HCD is not set
860# CONFIG_USB_ARCH_HAS_OHCI is not set 965# CONFIG_USB_ARCH_HAS_OHCI is not set
861# CONFIG_USB_ARCH_HAS_EHCI is not set 966# CONFIG_USB_ARCH_HAS_EHCI is not set
967# CONFIG_USB_OTG_WHITELIST is not set
968# CONFIG_USB_OTG_BLACKLIST_HUB is not set
969# CONFIG_USB_GADGET_MUSB_HDRC is not set
862 970
863# 971#
864# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 972# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
865# 973#
866CONFIG_USB_GADGET=y 974CONFIG_USB_GADGET=y
867# CONFIG_USB_GADGET_DEBUG is not set 975# CONFIG_USB_GADGET_DEBUG is not set
868# CONFIG_USB_GADGET_DEBUG_FILES is not set 976# CONFIG_USB_GADGET_DEBUG_FILES is not set
977# CONFIG_USB_GADGET_DEBUG_FS is not set
978CONFIG_USB_GADGET_VBUS_DRAW=350
869CONFIG_USB_GADGET_SELECTED=y 979CONFIG_USB_GADGET_SELECTED=y
870# CONFIG_USB_GADGET_AMD5536UDC is not set 980# CONFIG_USB_GADGET_AT91 is not set
871CONFIG_USB_GADGET_ATMEL_USBA=y 981CONFIG_USB_GADGET_ATMEL_USBA=y
872CONFIG_USB_ATMEL_USBA=y 982CONFIG_USB_ATMEL_USBA=y
873# CONFIG_USB_GADGET_FSL_USB2 is not set 983# CONFIG_USB_GADGET_FSL_USB2 is not set
874# CONFIG_USB_GADGET_NET2280 is not set
875# CONFIG_USB_GADGET_PXA2XX is not set
876# CONFIG_USB_GADGET_M66592 is not set
877# CONFIG_USB_GADGET_GOKU is not set
878# CONFIG_USB_GADGET_LH7A40X is not set 984# CONFIG_USB_GADGET_LH7A40X is not set
879# CONFIG_USB_GADGET_OMAP is not set 985# CONFIG_USB_GADGET_OMAP is not set
986# CONFIG_USB_GADGET_PXA25X is not set
987# CONFIG_USB_GADGET_R8A66597 is not set
988# CONFIG_USB_GADGET_PXA27X is not set
989# CONFIG_USB_GADGET_S3C_HSOTG is not set
990# CONFIG_USB_GADGET_IMX is not set
880# CONFIG_USB_GADGET_S3C2410 is not set 991# CONFIG_USB_GADGET_S3C2410 is not set
881# CONFIG_USB_GADGET_AT91 is not set 992# CONFIG_USB_GADGET_M66592 is not set
993# CONFIG_USB_GADGET_AMD5536UDC is not set
994# CONFIG_USB_GADGET_FSL_QE is not set
995# CONFIG_USB_GADGET_CI13XXX is not set
996# CONFIG_USB_GADGET_NET2280 is not set
997# CONFIG_USB_GADGET_GOKU is not set
998# CONFIG_USB_GADGET_LANGWELL is not set
882# CONFIG_USB_GADGET_DUMMY_HCD is not set 999# CONFIG_USB_GADGET_DUMMY_HCD is not set
883CONFIG_USB_GADGET_DUALSPEED=y 1000CONFIG_USB_GADGET_DUALSPEED=y
884CONFIG_USB_ZERO=m 1001CONFIG_USB_ZERO=m
1002# CONFIG_USB_AUDIO is not set
885CONFIG_USB_ETH=m 1003CONFIG_USB_ETH=m
886CONFIG_USB_ETH_RNDIS=y 1004CONFIG_USB_ETH_RNDIS=y
1005# CONFIG_USB_ETH_EEM is not set
887CONFIG_USB_GADGETFS=m 1006CONFIG_USB_GADGETFS=m
888CONFIG_USB_FILE_STORAGE=m 1007CONFIG_USB_FILE_STORAGE=m
889# CONFIG_USB_FILE_STORAGE_TEST is not set 1008# CONFIG_USB_FILE_STORAGE_TEST is not set
890CONFIG_USB_G_SERIAL=m 1009CONFIG_USB_G_SERIAL=m
891# CONFIG_USB_MIDI_GADGET is not set 1010# CONFIG_USB_MIDI_GADGET is not set
892# CONFIG_USB_G_PRINTER is not set 1011# CONFIG_USB_G_PRINTER is not set
1012CONFIG_USB_CDC_COMPOSITE=m
1013
1014#
1015# OTG and related infrastructure
1016#
1017# CONFIG_USB_GPIO_VBUS is not set
1018# CONFIG_NOP_USB_XCEIV is not set
893CONFIG_MMC=y 1019CONFIG_MMC=y
894# CONFIG_MMC_DEBUG is not set 1020# CONFIG_MMC_DEBUG is not set
895# CONFIG_MMC_UNSAFE_RESUME is not set 1021# CONFIG_MMC_UNSAFE_RESUME is not set
896 1022
897# 1023#
898# MMC/SD Card Drivers 1024# MMC/SD/SDIO Card Drivers
899# 1025#
900CONFIG_MMC_BLOCK=y 1026CONFIG_MMC_BLOCK=y
901CONFIG_MMC_BLOCK_BOUNCE=y 1027CONFIG_MMC_BLOCK_BOUNCE=y
902# CONFIG_SDIO_UART is not set 1028# CONFIG_SDIO_UART is not set
1029# CONFIG_MMC_TEST is not set
903 1030
904# 1031#
905# MMC/SD Host Controller Drivers 1032# MMC/SD/SDIO Host Controller Drivers
906# 1033#
1034# CONFIG_MMC_SDHCI is not set
1035# CONFIG_MMC_AT91 is not set
907CONFIG_MMC_ATMELMCI=y 1036CONFIG_MMC_ATMELMCI=y
1037# CONFIG_MMC_ATMELMCI_DMA is not set
908# CONFIG_MMC_SPI is not set 1038# CONFIG_MMC_SPI is not set
909# CONFIG_MEMSTICK is not set 1039# CONFIG_MEMSTICK is not set
910CONFIG_NEW_LEDS=y 1040CONFIG_NEW_LEDS=y
@@ -913,7 +1043,13 @@ CONFIG_LEDS_CLASS=y
913# 1043#
914# LED drivers 1044# LED drivers
915# 1045#
1046# CONFIG_LEDS_PCA9532 is not set
916CONFIG_LEDS_GPIO=y 1047CONFIG_LEDS_GPIO=y
1048CONFIG_LEDS_GPIO_PLATFORM=y
1049# CONFIG_LEDS_LP3944 is not set
1050# CONFIG_LEDS_PCA955X is not set
1051# CONFIG_LEDS_DAC124S085 is not set
1052# CONFIG_LEDS_BD2802 is not set
917 1053
918# 1054#
919# LED Triggers 1055# LED Triggers
@@ -921,6 +1057,14 @@ CONFIG_LEDS_GPIO=y
921CONFIG_LEDS_TRIGGERS=y 1057CONFIG_LEDS_TRIGGERS=y
922CONFIG_LEDS_TRIGGER_TIMER=y 1058CONFIG_LEDS_TRIGGER_TIMER=y
923CONFIG_LEDS_TRIGGER_HEARTBEAT=y 1059CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1060# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1061# CONFIG_LEDS_TRIGGER_GPIO is not set
1062# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1063
1064#
1065# iptables trigger is under Netfilter config (LED target)
1066#
1067# CONFIG_ACCESSIBILITY is not set
924CONFIG_RTC_LIB=y 1068CONFIG_RTC_LIB=y
925CONFIG_RTC_CLASS=y 1069CONFIG_RTC_CLASS=y
926CONFIG_RTC_HCTOSYS=y 1070CONFIG_RTC_HCTOSYS=y
@@ -950,51 +1094,84 @@ CONFIG_RTC_INTF_DEV=y
950# CONFIG_RTC_DRV_PCF8583 is not set 1094# CONFIG_RTC_DRV_PCF8583 is not set
951# CONFIG_RTC_DRV_M41T80 is not set 1095# CONFIG_RTC_DRV_M41T80 is not set
952# CONFIG_RTC_DRV_S35390A is not set 1096# CONFIG_RTC_DRV_S35390A is not set
1097# CONFIG_RTC_DRV_FM3130 is not set
1098# CONFIG_RTC_DRV_RX8581 is not set
1099# CONFIG_RTC_DRV_RX8025 is not set
953 1100
954# 1101#
955# SPI RTC drivers 1102# SPI RTC drivers
956# 1103#
1104# CONFIG_RTC_DRV_M41T94 is not set
1105# CONFIG_RTC_DRV_DS1305 is not set
1106# CONFIG_RTC_DRV_DS1390 is not set
957# CONFIG_RTC_DRV_MAX6902 is not set 1107# CONFIG_RTC_DRV_MAX6902 is not set
958# CONFIG_RTC_DRV_R9701 is not set 1108# CONFIG_RTC_DRV_R9701 is not set
959# CONFIG_RTC_DRV_RS5C348 is not set 1109# CONFIG_RTC_DRV_RS5C348 is not set
1110# CONFIG_RTC_DRV_DS3234 is not set
1111# CONFIG_RTC_DRV_PCF2123 is not set
960 1112
961# 1113#
962# Platform RTC drivers 1114# Platform RTC drivers
963# 1115#
1116# CONFIG_RTC_DRV_DS1286 is not set
964# CONFIG_RTC_DRV_DS1511 is not set 1117# CONFIG_RTC_DRV_DS1511 is not set
965# CONFIG_RTC_DRV_DS1553 is not set 1118# CONFIG_RTC_DRV_DS1553 is not set
966# CONFIG_RTC_DRV_DS1742 is not set 1119# CONFIG_RTC_DRV_DS1742 is not set
967# CONFIG_RTC_DRV_STK17TA8 is not set 1120# CONFIG_RTC_DRV_STK17TA8 is not set
968# CONFIG_RTC_DRV_M48T86 is not set 1121# CONFIG_RTC_DRV_M48T86 is not set
1122# CONFIG_RTC_DRV_M48T35 is not set
969# CONFIG_RTC_DRV_M48T59 is not set 1123# CONFIG_RTC_DRV_M48T59 is not set
1124# CONFIG_RTC_DRV_BQ4802 is not set
970# CONFIG_RTC_DRV_V3020 is not set 1125# CONFIG_RTC_DRV_V3020 is not set
971 1126
972# 1127#
973# on-CPU RTC drivers 1128# on-CPU RTC drivers
974# 1129#
975CONFIG_RTC_DRV_AT32AP700X=y 1130CONFIG_RTC_DRV_AT32AP700X=y
1131CONFIG_DMADEVICES=y
976 1132
977# 1133#
978# Userspace I/O 1134# DMA Devices
979# 1135#
1136CONFIG_DW_DMAC=y
1137CONFIG_DMA_ENGINE=y
1138
1139#
1140# DMA Clients
1141#
1142# CONFIG_NET_DMA is not set
1143# CONFIG_ASYNC_TX_DMA is not set
1144# CONFIG_DMATEST is not set
1145# CONFIG_AUXDISPLAY is not set
980# CONFIG_UIO is not set 1146# CONFIG_UIO is not set
981 1147
982# 1148#
1149# TI VLYNQ
1150#
1151# CONFIG_STAGING is not set
1152
1153#
983# File systems 1154# File systems
984# 1155#
985CONFIG_EXT2_FS=y 1156CONFIG_EXT2_FS=y
986# CONFIG_EXT2_FS_XATTR is not set 1157# CONFIG_EXT2_FS_XATTR is not set
987# CONFIG_EXT2_FS_XIP is not set 1158# CONFIG_EXT2_FS_XIP is not set
988CONFIG_EXT3_FS=y 1159CONFIG_EXT3_FS=y
1160# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
989# CONFIG_EXT3_FS_XATTR is not set 1161# CONFIG_EXT3_FS_XATTR is not set
990# CONFIG_EXT4DEV_FS is not set 1162# CONFIG_EXT4_FS is not set
991CONFIG_JBD=y 1163CONFIG_JBD=y
1164# CONFIG_JBD_DEBUG is not set
992# CONFIG_REISERFS_FS is not set 1165# CONFIG_REISERFS_FS is not set
993# CONFIG_JFS_FS is not set 1166# CONFIG_JFS_FS is not set
994# CONFIG_FS_POSIX_ACL is not set 1167# CONFIG_FS_POSIX_ACL is not set
995# CONFIG_XFS_FS is not set 1168# CONFIG_XFS_FS is not set
996# CONFIG_GFS2_FS is not set 1169# CONFIG_GFS2_FS is not set
997# CONFIG_OCFS2_FS is not set 1170# CONFIG_OCFS2_FS is not set
1171# CONFIG_BTRFS_FS is not set
1172# CONFIG_NILFS2_FS is not set
1173CONFIG_FILE_LOCKING=y
1174CONFIG_FSNOTIFY=y
998# CONFIG_DNOTIFY is not set 1175# CONFIG_DNOTIFY is not set
999CONFIG_INOTIFY=y 1176CONFIG_INOTIFY=y
1000CONFIG_INOTIFY_USER=y 1177CONFIG_INOTIFY_USER=y
@@ -1002,6 +1179,12 @@ CONFIG_INOTIFY_USER=y
1002# CONFIG_AUTOFS_FS is not set 1179# CONFIG_AUTOFS_FS is not set
1003# CONFIG_AUTOFS4_FS is not set 1180# CONFIG_AUTOFS4_FS is not set
1004CONFIG_FUSE_FS=m 1181CONFIG_FUSE_FS=m
1182# CONFIG_CUSE is not set
1183
1184#
1185# Caches
1186#
1187# CONFIG_FSCACHE is not set
1005 1188
1006# 1189#
1007# CD-ROM/DVD Filesystems 1190# CD-ROM/DVD Filesystems
@@ -1025,15 +1208,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1025CONFIG_PROC_FS=y 1208CONFIG_PROC_FS=y
1026# CONFIG_PROC_KCORE is not set 1209# CONFIG_PROC_KCORE is not set
1027CONFIG_PROC_SYSCTL=y 1210CONFIG_PROC_SYSCTL=y
1211CONFIG_PROC_PAGE_MONITOR=y
1028CONFIG_SYSFS=y 1212CONFIG_SYSFS=y
1029CONFIG_TMPFS=y 1213CONFIG_TMPFS=y
1030# CONFIG_TMPFS_POSIX_ACL is not set 1214# CONFIG_TMPFS_POSIX_ACL is not set
1031# CONFIG_HUGETLB_PAGE is not set 1215# CONFIG_HUGETLB_PAGE is not set
1032CONFIG_CONFIGFS_FS=y 1216CONFIG_CONFIGFS_FS=y
1033 1217CONFIG_MISC_FILESYSTEMS=y
1034#
1035# Miscellaneous filesystems
1036#
1037# CONFIG_ADFS_FS is not set 1218# CONFIG_ADFS_FS is not set
1038# CONFIG_AFFS_FS is not set 1219# CONFIG_AFFS_FS is not set
1039# CONFIG_HFS_FS is not set 1220# CONFIG_HFS_FS is not set
@@ -1059,8 +1240,10 @@ CONFIG_UBIFS_FS_LZO=y
1059CONFIG_UBIFS_FS_ZLIB=y 1240CONFIG_UBIFS_FS_ZLIB=y
1060# CONFIG_UBIFS_FS_DEBUG is not set 1241# CONFIG_UBIFS_FS_DEBUG is not set
1061# CONFIG_CRAMFS is not set 1242# CONFIG_CRAMFS is not set
1243# CONFIG_SQUASHFS is not set
1062# CONFIG_VXFS_FS is not set 1244# CONFIG_VXFS_FS is not set
1063# CONFIG_MINIX_FS is not set 1245# CONFIG_MINIX_FS is not set
1246# CONFIG_OMFS_FS is not set
1064# CONFIG_HPFS_FS is not set 1247# CONFIG_HPFS_FS is not set
1065# CONFIG_QNX4FS_FS is not set 1248# CONFIG_QNX4FS_FS is not set
1066# CONFIG_ROMFS_FS is not set 1249# CONFIG_ROMFS_FS is not set
@@ -1071,19 +1254,16 @@ CONFIG_NFS_FS=y
1071CONFIG_NFS_V3=y 1254CONFIG_NFS_V3=y
1072# CONFIG_NFS_V3_ACL is not set 1255# CONFIG_NFS_V3_ACL is not set
1073# CONFIG_NFS_V4 is not set 1256# CONFIG_NFS_V4 is not set
1074# CONFIG_NFS_DIRECTIO is not set 1257CONFIG_ROOT_NFS=y
1075CONFIG_NFSD=m 1258CONFIG_NFSD=m
1076CONFIG_NFSD_V3=y 1259CONFIG_NFSD_V3=y
1077# CONFIG_NFSD_V3_ACL is not set 1260# CONFIG_NFSD_V3_ACL is not set
1078# CONFIG_NFSD_V4 is not set 1261# CONFIG_NFSD_V4 is not set
1079CONFIG_NFSD_TCP=y
1080CONFIG_ROOT_NFS=y
1081CONFIG_LOCKD=y 1262CONFIG_LOCKD=y
1082CONFIG_LOCKD_V4=y 1263CONFIG_LOCKD_V4=y
1083CONFIG_EXPORTFS=m 1264CONFIG_EXPORTFS=m
1084CONFIG_NFS_COMMON=y 1265CONFIG_NFS_COMMON=y
1085CONFIG_SUNRPC=y 1266CONFIG_SUNRPC=y
1086# CONFIG_SUNRPC_BIND34 is not set
1087# CONFIG_RPCSEC_GSS_KRB5 is not set 1267# CONFIG_RPCSEC_GSS_KRB5 is not set
1088# CONFIG_RPCSEC_GSS_SPKM3 is not set 1268# CONFIG_RPCSEC_GSS_SPKM3 is not set
1089CONFIG_SMB_FS=m 1269CONFIG_SMB_FS=m
@@ -1151,16 +1331,24 @@ CONFIG_NLS_UTF8=m
1151# CONFIG_PRINTK_TIME is not set 1331# CONFIG_PRINTK_TIME is not set
1152CONFIG_ENABLE_WARN_DEPRECATED=y 1332CONFIG_ENABLE_WARN_DEPRECATED=y
1153CONFIG_ENABLE_MUST_CHECK=y 1333CONFIG_ENABLE_MUST_CHECK=y
1334CONFIG_FRAME_WARN=1024
1154CONFIG_MAGIC_SYSRQ=y 1335CONFIG_MAGIC_SYSRQ=y
1336# CONFIG_STRIP_ASM_SYMS is not set
1155# CONFIG_UNUSED_SYMBOLS is not set 1337# CONFIG_UNUSED_SYMBOLS is not set
1156# CONFIG_DEBUG_FS is not set 1338CONFIG_DEBUG_FS=y
1157# CONFIG_HEADERS_CHECK is not set 1339# CONFIG_HEADERS_CHECK is not set
1158CONFIG_DEBUG_KERNEL=y 1340CONFIG_DEBUG_KERNEL=y
1159# CONFIG_DEBUG_SHIRQ is not set 1341# CONFIG_DEBUG_SHIRQ is not set
1160CONFIG_DETECT_SOFTLOCKUP=y 1342CONFIG_DETECT_SOFTLOCKUP=y
1343# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1344CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1345CONFIG_DETECT_HUNG_TASK=y
1346# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1347CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1161CONFIG_SCHED_DEBUG=y 1348CONFIG_SCHED_DEBUG=y
1162# CONFIG_SCHEDSTATS is not set 1349# CONFIG_SCHEDSTATS is not set
1163# CONFIG_TIMER_STATS is not set 1350# CONFIG_TIMER_STATS is not set
1351# CONFIG_DEBUG_OBJECTS is not set
1164# CONFIG_SLUB_DEBUG_ON is not set 1352# CONFIG_SLUB_DEBUG_ON is not set
1165# CONFIG_SLUB_STATS is not set 1353# CONFIG_SLUB_STATS is not set
1166# CONFIG_DEBUG_RT_MUTEXES is not set 1354# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1172,19 +1360,48 @@ CONFIG_SCHED_DEBUG=y
1172# CONFIG_LOCK_STAT is not set 1360# CONFIG_LOCK_STAT is not set
1173# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1361# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1174# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1362# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1363CONFIG_STACKTRACE=y
1175# CONFIG_DEBUG_KOBJECT is not set 1364# CONFIG_DEBUG_KOBJECT is not set
1176CONFIG_DEBUG_BUGVERBOSE=y 1365CONFIG_DEBUG_BUGVERBOSE=y
1177# CONFIG_DEBUG_INFO is not set 1366# CONFIG_DEBUG_INFO is not set
1178# CONFIG_DEBUG_VM is not set 1367# CONFIG_DEBUG_VM is not set
1368# CONFIG_DEBUG_WRITECOUNT is not set
1369# CONFIG_DEBUG_MEMORY_INIT is not set
1179# CONFIG_DEBUG_LIST is not set 1370# CONFIG_DEBUG_LIST is not set
1180# CONFIG_DEBUG_SG is not set 1371# CONFIG_DEBUG_SG is not set
1372# CONFIG_DEBUG_NOTIFIERS is not set
1373# CONFIG_DEBUG_CREDENTIALS is not set
1181CONFIG_FRAME_POINTER=y 1374CONFIG_FRAME_POINTER=y
1182# CONFIG_BOOT_PRINTK_DELAY is not set 1375# CONFIG_BOOT_PRINTK_DELAY is not set
1183# CONFIG_RCU_TORTURE_TEST is not set 1376# CONFIG_RCU_TORTURE_TEST is not set
1377# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1184# CONFIG_KPROBES_SANITY_TEST is not set 1378# CONFIG_KPROBES_SANITY_TEST is not set
1185# CONFIG_BACKTRACE_SELF_TEST is not set 1379# CONFIG_BACKTRACE_SELF_TEST is not set
1380# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1381# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1186# CONFIG_LKDTM is not set 1382# CONFIG_LKDTM is not set
1187# CONFIG_FAULT_INJECTION is not set 1383# CONFIG_FAULT_INJECTION is not set
1384# CONFIG_PAGE_POISONING is not set
1385CONFIG_NOP_TRACER=y
1386CONFIG_RING_BUFFER=y
1387CONFIG_EVENT_TRACING=y
1388CONFIG_CONTEXT_SWITCH_TRACER=y
1389CONFIG_RING_BUFFER_ALLOW_SWAP=y
1390CONFIG_TRACING=y
1391CONFIG_TRACING_SUPPORT=y
1392CONFIG_FTRACE=y
1393# CONFIG_IRQSOFF_TRACER is not set
1394# CONFIG_SCHED_TRACER is not set
1395# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1396# CONFIG_BOOT_TRACER is not set
1397CONFIG_BRANCH_PROFILE_NONE=y
1398# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1399# CONFIG_PROFILE_ALL_BRANCHES is not set
1400# CONFIG_KMEMTRACE is not set
1401# CONFIG_WORKQUEUE_TRACER is not set
1402# CONFIG_BLK_DEV_IO_TRACE is not set
1403# CONFIG_RING_BUFFER_BENCHMARK is not set
1404# CONFIG_DYNAMIC_DEBUG is not set
1188# CONFIG_SAMPLES is not set 1405# CONFIG_SAMPLES is not set
1189 1406
1190# 1407#
@@ -1192,63 +1409,118 @@ CONFIG_FRAME_POINTER=y
1192# 1409#
1193# CONFIG_KEYS is not set 1410# CONFIG_KEYS is not set
1194# CONFIG_SECURITY is not set 1411# CONFIG_SECURITY is not set
1412# CONFIG_SECURITYFS is not set
1195# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1413# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1196CONFIG_CRYPTO=y 1414CONFIG_CRYPTO=y
1415
1416#
1417# Crypto core or helper
1418#
1419# CONFIG_CRYPTO_FIPS is not set
1197CONFIG_CRYPTO_ALGAPI=y 1420CONFIG_CRYPTO_ALGAPI=y
1421CONFIG_CRYPTO_ALGAPI2=y
1198CONFIG_CRYPTO_AEAD=y 1422CONFIG_CRYPTO_AEAD=y
1423CONFIG_CRYPTO_AEAD2=y
1199CONFIG_CRYPTO_BLKCIPHER=y 1424CONFIG_CRYPTO_BLKCIPHER=y
1200# CONFIG_CRYPTO_SEQIV is not set 1425CONFIG_CRYPTO_BLKCIPHER2=y
1201CONFIG_CRYPTO_HASH=y 1426CONFIG_CRYPTO_HASH=y
1427CONFIG_CRYPTO_HASH2=y
1428CONFIG_CRYPTO_RNG=m
1429CONFIG_CRYPTO_RNG2=y
1430CONFIG_CRYPTO_PCOMP=y
1202CONFIG_CRYPTO_MANAGER=y 1431CONFIG_CRYPTO_MANAGER=y
1432CONFIG_CRYPTO_MANAGER2=y
1433# CONFIG_CRYPTO_GF128MUL is not set
1434# CONFIG_CRYPTO_NULL is not set
1435CONFIG_CRYPTO_WORKQUEUE=y
1436# CONFIG_CRYPTO_CRYPTD is not set
1437CONFIG_CRYPTO_AUTHENC=y
1438# CONFIG_CRYPTO_TEST is not set
1439
1440#
1441# Authenticated Encryption with Associated Data
1442#
1443# CONFIG_CRYPTO_CCM is not set
1444# CONFIG_CRYPTO_GCM is not set
1445# CONFIG_CRYPTO_SEQIV is not set
1446
1447#
1448# Block modes
1449#
1450CONFIG_CRYPTO_CBC=y
1451# CONFIG_CRYPTO_CTR is not set
1452# CONFIG_CRYPTO_CTS is not set
1453CONFIG_CRYPTO_ECB=m
1454# CONFIG_CRYPTO_LRW is not set
1455# CONFIG_CRYPTO_PCBC is not set
1456# CONFIG_CRYPTO_XTS is not set
1457
1458#
1459# Hash modes
1460#
1203CONFIG_CRYPTO_HMAC=y 1461CONFIG_CRYPTO_HMAC=y
1204# CONFIG_CRYPTO_XCBC is not set 1462# CONFIG_CRYPTO_XCBC is not set
1205# CONFIG_CRYPTO_NULL is not set 1463# CONFIG_CRYPTO_VMAC is not set
1464
1465#
1466# Digest
1467#
1468# CONFIG_CRYPTO_CRC32C is not set
1469# CONFIG_CRYPTO_GHASH is not set
1206# CONFIG_CRYPTO_MD4 is not set 1470# CONFIG_CRYPTO_MD4 is not set
1207CONFIG_CRYPTO_MD5=y 1471CONFIG_CRYPTO_MD5=y
1472# CONFIG_CRYPTO_MICHAEL_MIC is not set
1473# CONFIG_CRYPTO_RMD128 is not set
1474# CONFIG_CRYPTO_RMD160 is not set
1475# CONFIG_CRYPTO_RMD256 is not set
1476# CONFIG_CRYPTO_RMD320 is not set
1208CONFIG_CRYPTO_SHA1=y 1477CONFIG_CRYPTO_SHA1=y
1209# CONFIG_CRYPTO_SHA256 is not set 1478# CONFIG_CRYPTO_SHA256 is not set
1210# CONFIG_CRYPTO_SHA512 is not set 1479# CONFIG_CRYPTO_SHA512 is not set
1211# CONFIG_CRYPTO_WP512 is not set
1212# CONFIG_CRYPTO_TGR192 is not set 1480# CONFIG_CRYPTO_TGR192 is not set
1213# CONFIG_CRYPTO_GF128MUL is not set 1481# CONFIG_CRYPTO_WP512 is not set
1214CONFIG_CRYPTO_ECB=m 1482
1215CONFIG_CRYPTO_CBC=y 1483#
1216# CONFIG_CRYPTO_PCBC is not set 1484# Ciphers
1217# CONFIG_CRYPTO_LRW is not set 1485#
1218# CONFIG_CRYPTO_XTS is not set 1486CONFIG_CRYPTO_AES=m
1219# CONFIG_CRYPTO_CTR is not set 1487# CONFIG_CRYPTO_ANUBIS is not set
1220# CONFIG_CRYPTO_GCM is not set 1488CONFIG_CRYPTO_ARC4=m
1221# CONFIG_CRYPTO_CCM is not set
1222# CONFIG_CRYPTO_CRYPTD is not set
1223CONFIG_CRYPTO_DES=y
1224# CONFIG_CRYPTO_FCRYPT is not set
1225# CONFIG_CRYPTO_BLOWFISH is not set 1489# CONFIG_CRYPTO_BLOWFISH is not set
1226# CONFIG_CRYPTO_TWOFISH is not set 1490# CONFIG_CRYPTO_CAMELLIA is not set
1227# CONFIG_CRYPTO_SERPENT is not set
1228# CONFIG_CRYPTO_AES is not set
1229# CONFIG_CRYPTO_CAST5 is not set 1491# CONFIG_CRYPTO_CAST5 is not set
1230# CONFIG_CRYPTO_CAST6 is not set 1492# CONFIG_CRYPTO_CAST6 is not set
1231# CONFIG_CRYPTO_TEA is not set 1493CONFIG_CRYPTO_DES=y
1232CONFIG_CRYPTO_ARC4=m 1494# CONFIG_CRYPTO_FCRYPT is not set
1233# CONFIG_CRYPTO_KHAZAD is not set 1495# CONFIG_CRYPTO_KHAZAD is not set
1234# CONFIG_CRYPTO_ANUBIS is not set
1235# CONFIG_CRYPTO_SEED is not set
1236# CONFIG_CRYPTO_SALSA20 is not set 1496# CONFIG_CRYPTO_SALSA20 is not set
1497# CONFIG_CRYPTO_SEED is not set
1498# CONFIG_CRYPTO_SERPENT is not set
1499# CONFIG_CRYPTO_TEA is not set
1500# CONFIG_CRYPTO_TWOFISH is not set
1501
1502#
1503# Compression
1504#
1237CONFIG_CRYPTO_DEFLATE=y 1505CONFIG_CRYPTO_DEFLATE=y
1238# CONFIG_CRYPTO_MICHAEL_MIC is not set 1506# CONFIG_CRYPTO_ZLIB is not set
1239# CONFIG_CRYPTO_CRC32C is not set
1240# CONFIG_CRYPTO_CAMELLIA is not set
1241# CONFIG_CRYPTO_TEST is not set
1242CONFIG_CRYPTO_AUTHENC=y
1243CONFIG_CRYPTO_LZO=y 1507CONFIG_CRYPTO_LZO=y
1508
1509#
1510# Random Number Generation
1511#
1512CONFIG_CRYPTO_ANSI_CPRNG=m
1244CONFIG_CRYPTO_HW=y 1513CONFIG_CRYPTO_HW=y
1514CONFIG_BINARY_PRINTF=y
1245 1515
1246# 1516#
1247# Library routines 1517# Library routines
1248# 1518#
1249CONFIG_BITREVERSE=y 1519CONFIG_BITREVERSE=y
1520CONFIG_GENERIC_FIND_LAST_BIT=y
1250CONFIG_CRC_CCITT=m 1521CONFIG_CRC_CCITT=m
1251CONFIG_CRC16=y 1522CONFIG_CRC16=y
1523# CONFIG_CRC_T10DIF is not set
1252# CONFIG_CRC_ITU_T is not set 1524# CONFIG_CRC_ITU_T is not set
1253CONFIG_CRC32=y 1525CONFIG_CRC32=y
1254# CONFIG_CRC7 is not set 1526# CONFIG_CRC7 is not set
@@ -1257,8 +1529,9 @@ CONFIG_ZLIB_INFLATE=y
1257CONFIG_ZLIB_DEFLATE=y 1529CONFIG_ZLIB_DEFLATE=y
1258CONFIG_LZO_COMPRESS=y 1530CONFIG_LZO_COMPRESS=y
1259CONFIG_LZO_DECOMPRESS=y 1531CONFIG_LZO_DECOMPRESS=y
1532CONFIG_DECOMPRESS_GZIP=y
1260CONFIG_GENERIC_ALLOCATOR=y 1533CONFIG_GENERIC_ALLOCATOR=y
1261CONFIG_PLIST=y
1262CONFIG_HAS_IOMEM=y 1534CONFIG_HAS_IOMEM=y
1263CONFIG_HAS_IOPORT=y 1535CONFIG_HAS_IOPORT=y
1264CONFIG_HAS_DMA=y 1536CONFIG_HAS_DMA=y
1537CONFIG_NLATTR=y
diff --git a/arch/arm/configs/da830_omapl137_defconfig b/arch/avr32/configs/atngw100mkii_defconfig
index 7c8e38f5c5ab..9b8b5b3b9c71 100644
--- a/arch/arm/configs/da830_omapl137_defconfig
+++ b/arch/avr32/configs/atngw100mkii_defconfig
@@ -1,66 +1,58 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30-rc2-davinci1 3# Linux kernel version: 2.6.32-rc5
4# Wed May 13 15:33:29 2009 4# Thu Nov 5 15:32:26 2009
5# 5#
6CONFIG_ARM=y 6CONFIG_AVR32=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12# CONFIG_NO_IOPORT is not set
13CONFIG_GENERIC_HARDIRQS=y 8CONFIG_GENERIC_HARDIRQS=y
14CONFIG_STACKTRACE_SUPPORT=y 9CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_HAVE_LATENCYTOP_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y 10CONFIG_LOCKDEP_SUPPORT=y
17CONFIG_TRACE_IRQFLAGS_SUPPORT=y 11CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y 12CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y 13CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y 14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set 18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set 19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ZONE_DMA=y 22CONFIG_GENERIC_BUG=y
26CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
27CONFIG_VECTORS_BASE=0xffff0000
28CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
29 25
30# 26#
31# General setup 27# General setup
32# 28#
33CONFIG_EXPERIMENTAL=y 29CONFIG_EXPERIMENTAL=y
34CONFIG_BROKEN_ON_SMP=y 30CONFIG_BROKEN_ON_SMP=y
35CONFIG_LOCK_KERNEL=y
36CONFIG_INIT_ENV_ARG_LIMIT=32 31CONFIG_INIT_ENV_ARG_LIMIT=32
37CONFIG_LOCALVERSION="" 32CONFIG_LOCALVERSION=""
38CONFIG_LOCALVERSION_AUTO=y 33# CONFIG_LOCALVERSION_AUTO is not set
39# CONFIG_SWAP is not set 34CONFIG_SWAP=y
40CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
41CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
42CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
43CONFIG_POSIX_MQUEUE_SYSCTL=y 38CONFIG_POSIX_MQUEUE_SYSCTL=y
44# CONFIG_BSD_PROCESS_ACCT is not set 39CONFIG_BSD_PROCESS_ACCT=y
40CONFIG_BSD_PROCESS_ACCT_V3=y
45# CONFIG_TASKSTATS is not set 41# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set 42# CONFIG_AUDIT is not set
47 43
48# 44#
49# RCU Subsystem 45# RCU Subsystem
50# 46#
51CONFIG_CLASSIC_RCU=y 47CONFIG_TREE_RCU=y
52# CONFIG_TREE_RCU is not set 48# CONFIG_TREE_PREEMPT_RCU is not set
53# CONFIG_PREEMPT_RCU is not set 49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
54# CONFIG_TREE_RCU_TRACE is not set 52# CONFIG_TREE_RCU_TRACE is not set
55# CONFIG_PREEMPT_RCU_TRACE is not set 53# CONFIG_IKCONFIG is not set
56CONFIG_IKCONFIG=y
57CONFIG_IKCONFIG_PROC=y
58CONFIG_LOG_BUF_SHIFT=14 54CONFIG_LOG_BUF_SHIFT=14
59CONFIG_GROUP_SCHED=y 55# CONFIG_GROUP_SCHED is not set
60CONFIG_FAIR_GROUP_SCHED=y
61# CONFIG_RT_GROUP_SCHED is not set
62CONFIG_USER_SCHED=y
63# CONFIG_CGROUP_SCHED is not set
64# CONFIG_CGROUPS is not set 56# CONFIG_CGROUPS is not set
65CONFIG_SYSFS_DEPRECATED=y 57CONFIG_SYSFS_DEPRECATED=y
66CONFIG_SYSFS_DEPRECATED_V2=y 58CONFIG_SYSFS_DEPRECATED_V2=y
@@ -75,17 +67,15 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
76CONFIG_ANON_INODES=y 68CONFIG_ANON_INODES=y
77CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
78CONFIG_UID16=y 70# CONFIG_SYSCTL_SYSCALL is not set
79CONFIG_SYSCTL_SYSCALL=y
80CONFIG_KALLSYMS=y 71CONFIG_KALLSYMS=y
81# CONFIG_KALLSYMS_ALL is not set 72# CONFIG_KALLSYMS_ALL is not set
82# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
83# CONFIG_STRIP_ASM_SYMS is not set
84CONFIG_HOTPLUG=y 74CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y 75CONFIG_PRINTK=y
86CONFIG_BUG=y 76CONFIG_BUG=y
87CONFIG_ELF_CORE=y 77CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y 78# CONFIG_BASE_FULL is not set
89CONFIG_FUTEX=y 79CONFIG_FUTEX=y
90CONFIG_EPOLL=y 80CONFIG_EPOLL=y
91CONFIG_SIGNALFD=y 81CONFIG_SIGNALFD=y
@@ -93,32 +83,41 @@ CONFIG_TIMERFD=y
93CONFIG_EVENTFD=y 83CONFIG_EVENTFD=y
94CONFIG_SHMEM=y 84CONFIG_SHMEM=y
95CONFIG_AIO=y 85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
96CONFIG_VM_EVENT_COUNTERS=y 90CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y 91CONFIG_SLUB_DEBUG=y
98CONFIG_COMPAT_BRK=y 92# CONFIG_COMPAT_BRK is not set
99# CONFIG_SLAB is not set 93# CONFIG_SLAB is not set
100CONFIG_SLUB=y 94CONFIG_SLUB=y
101# CONFIG_SLOB is not set 95# CONFIG_SLOB is not set
102# CONFIG_PROFILING is not set 96CONFIG_PROFILING=y
103# CONFIG_MARKERS is not set 97CONFIG_TRACEPOINTS=y
98CONFIG_OPROFILE=m
104CONFIG_HAVE_OPROFILE=y 99CONFIG_HAVE_OPROFILE=y
105# CONFIG_KPROBES is not set 100CONFIG_KPROBES=y
106CONFIG_HAVE_KPROBES=y 101CONFIG_HAVE_KPROBES=y
107CONFIG_HAVE_KRETPROBES=y
108CONFIG_HAVE_CLK=y 102CONFIG_HAVE_CLK=y
109# CONFIG_SLOW_WORK is not set 103
110CONFIG_HAVE_GENERIC_DMA_COHERENT=y 104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
111CONFIG_SLABINFO=y 110CONFIG_SLABINFO=y
112CONFIG_RT_MUTEXES=y 111CONFIG_RT_MUTEXES=y
113CONFIG_BASE_SMALL=0 112CONFIG_BASE_SMALL=1
114CONFIG_MODULES=y 113CONFIG_MODULES=y
115# CONFIG_MODULE_FORCE_LOAD is not set 114# CONFIG_MODULE_FORCE_LOAD is not set
116CONFIG_MODULE_UNLOAD=y 115CONFIG_MODULE_UNLOAD=y
117CONFIG_MODULE_FORCE_UNLOAD=y 116CONFIG_MODULE_FORCE_UNLOAD=y
118CONFIG_MODVERSIONS=y 117# CONFIG_MODVERSIONS is not set
119# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
120CONFIG_BLOCK=y 119CONFIG_BLOCK=y
121# CONFIG_LBD is not set 120CONFIG_LBDAF=y
122# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
123# CONFIG_BLK_DEV_INTEGRITY is not set 122# CONFIG_BLK_DEV_INTEGRITY is not set
124 123
@@ -126,133 +125,62 @@ CONFIG_BLOCK=y
126# IO Schedulers 125# IO Schedulers
127# 126#
128CONFIG_IOSCHED_NOOP=y 127CONFIG_IOSCHED_NOOP=y
129CONFIG_IOSCHED_AS=y 128# CONFIG_IOSCHED_AS is not set
130# CONFIG_IOSCHED_DEADLINE is not set 129# CONFIG_IOSCHED_DEADLINE is not set
131# CONFIG_IOSCHED_CFQ is not set 130CONFIG_IOSCHED_CFQ=y
132CONFIG_DEFAULT_AS=y 131# CONFIG_DEFAULT_AS is not set
133# CONFIG_DEFAULT_DEADLINE is not set 132# CONFIG_DEFAULT_DEADLINE is not set
134# CONFIG_DEFAULT_CFQ is not set 133CONFIG_DEFAULT_CFQ=y
135# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
136CONFIG_DEFAULT_IOSCHED="anticipatory" 135CONFIG_DEFAULT_IOSCHED="cfq"
137# CONFIG_FREEZER is not set 136CONFIG_FREEZER=y
138
139#
140# System Type
141#
142# CONFIG_ARCH_AAEC2000 is not set
143# CONFIG_ARCH_INTEGRATOR is not set
144# CONFIG_ARCH_REALVIEW is not set
145# CONFIG_ARCH_VERSATILE is not set
146# CONFIG_ARCH_AT91 is not set
147# CONFIG_ARCH_CLPS711X is not set
148# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_GEMINI is not set
151# CONFIG_ARCH_FOOTBRIDGE is not set
152# CONFIG_ARCH_NETX is not set
153# CONFIG_ARCH_H720X is not set
154# CONFIG_ARCH_IMX is not set
155# CONFIG_ARCH_IOP13XX is not set
156# CONFIG_ARCH_IOP32X is not set
157# CONFIG_ARCH_IOP33X is not set
158# CONFIG_ARCH_IXP23XX is not set
159# CONFIG_ARCH_IXP2000 is not set
160# CONFIG_ARCH_IXP4XX is not set
161# CONFIG_ARCH_L7200 is not set
162# CONFIG_ARCH_KIRKWOOD is not set
163# CONFIG_ARCH_KS8695 is not set
164# CONFIG_ARCH_NS9XXX is not set
165# CONFIG_ARCH_LOKI is not set
166# CONFIG_ARCH_MV78XX0 is not set
167# CONFIG_ARCH_MXC is not set
168# CONFIG_ARCH_ORION5X is not set
169# CONFIG_ARCH_PNX4008 is not set
170# CONFIG_ARCH_PXA is not set
171# CONFIG_ARCH_MMP is not set
172# CONFIG_ARCH_RPC is not set
173# CONFIG_ARCH_SA1100 is not set
174# CONFIG_ARCH_S3C2410 is not set
175# CONFIG_ARCH_S3C64XX is not set
176# CONFIG_ARCH_SHARK is not set
177# CONFIG_ARCH_LH7A40X is not set
178CONFIG_ARCH_DAVINCI=y
179# CONFIG_ARCH_OMAP is not set
180# CONFIG_ARCH_MSM is not set
181# CONFIG_ARCH_W90X900 is not set
182CONFIG_CP_INTC=y
183
184#
185# TI DaVinci Implementations
186#
187
188#
189# DaVinci Core Type
190#
191# CONFIG_ARCH_DAVINCI_DM644x is not set
192# CONFIG_ARCH_DAVINCI_DM646x is not set
193# CONFIG_ARCH_DAVINCI_DM355 is not set
194CONFIG_ARCH_DAVINCI_DA830=y
195
196#
197# DaVinci Board Type
198#
199CONFIG_MACH_DAVINCI_DA830_EVM=y
200CONFIG_DAVINCI_MUX=y
201# CONFIG_DAVINCI_MUX_DEBUG is not set
202# CONFIG_DAVINCI_MUX_WARNINGS is not set
203CONFIG_DAVINCI_RESET_CLOCKS=y
204
205#
206# Processor Type
207#
208CONFIG_CPU_32=y
209CONFIG_CPU_ARM926T=y
210CONFIG_CPU_32v5=y
211CONFIG_CPU_ABRT_EV5TJ=y
212CONFIG_CPU_PABRT_NOIFAR=y
213CONFIG_CPU_CACHE_VIVT=y
214CONFIG_CPU_COPY_V4WB=y
215CONFIG_CPU_TLB_V4WBI=y
216CONFIG_CPU_CP15=y
217CONFIG_CPU_CP15_MMU=y
218
219#
220# Processor Features
221#
222CONFIG_ARM_THUMB=y
223# CONFIG_CPU_ICACHE_DISABLE is not set
224# CONFIG_CPU_DCACHE_DISABLE is not set
225CONFIG_CPU_DCACHE_WRITETHROUGH=y
226# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
227# CONFIG_OUTER_CACHE is not set
228CONFIG_COMMON_CLKDEV=y
229
230#
231# Bus support
232#
233# CONFIG_PCI_SYSCALL is not set
234# CONFIG_ARCH_SUPPORTS_MSI is not set
235# CONFIG_PCCARD is not set
236 137
237# 138#
238# Kernel Features 139# System Type and features
239# 140#
240CONFIG_TICK_ONESHOT=y 141CONFIG_TICK_ONESHOT=y
241CONFIG_NO_HZ=y 142CONFIG_NO_HZ=y
242CONFIG_HIGH_RES_TIMERS=y 143CONFIG_HIGH_RES_TIMERS=y
243CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 144CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
244CONFIG_VMSPLIT_3G=y 145CONFIG_SUBARCH_AVR32B=y
245# CONFIG_VMSPLIT_2G is not set 146CONFIG_MMU=y
246# CONFIG_VMSPLIT_1G is not set 147CONFIG_PERFORMANCE_COUNTERS=y
247CONFIG_PAGE_OFFSET=0xC0000000 148CONFIG_PLATFORM_AT32AP=y
248CONFIG_PREEMPT=y 149CONFIG_CPU_AT32AP700X=y
249CONFIG_HZ=100 150CONFIG_CPU_AT32AP7000=y
250CONFIG_AEABI=y 151CONFIG_BOARD_ATNGW100_COMMON=y
251# CONFIG_OABI_COMPAT is not set 152# CONFIG_BOARD_ATSTK1000 is not set
252CONFIG_ARCH_FLATMEM_HAS_HOLES=y 153# CONFIG_BOARD_ATNGW100_MKI is not set
253# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set 154CONFIG_BOARD_ATNGW100_MKII=y
254# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set 155# CONFIG_BOARD_HAMMERHEAD is not set
255# CONFIG_HIGHMEM is not set 156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159# CONFIG_BOARD_ATNGW100_MKII_LCD is not set
160CONFIG_BOARD_ATNGW100_ADDON_NONE=y
161# CONFIG_BOARD_ATNGW100_EVKLCD10X is not set
162# CONFIG_BOARD_ATNGW100_MRMT is not set
163CONFIG_LOADER_U_BOOT=y
164
165#
166# Atmel AVR32 AP options
167#
168# CONFIG_AP700X_32_BIT_SMC is not set
169CONFIG_AP700X_16_BIT_SMC=y
170# CONFIG_AP700X_8_BIT_SMC is not set
171CONFIG_LOAD_ADDRESS=0x10000000
172CONFIG_ENTRY_ADDRESS=0x90000000
173CONFIG_PHYS_OFFSET=0x10000000
174CONFIG_PREEMPT_NONE=y
175# CONFIG_PREEMPT_VOLUNTARY is not set
176# CONFIG_PREEMPT is not set
177CONFIG_QUICKLIST=y
178# CONFIG_HAVE_ARCH_BOOTMEM is not set
179# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
180# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
181CONFIG_ARCH_FLATMEM_ENABLE=y
182# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
183# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
256CONFIG_SELECT_MEMORY_MODEL=y 184CONFIG_SELECT_MEMORY_MODEL=y
257CONFIG_FLATMEM_MANUAL=y 185CONFIG_FLATMEM_MANUAL=y
258# CONFIG_DISCONTIGMEM_MANUAL is not set 186# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -260,86 +188,109 @@ CONFIG_FLATMEM_MANUAL=y
260CONFIG_FLATMEM=y 188CONFIG_FLATMEM=y
261CONFIG_FLAT_NODE_MEM_MAP=y 189CONFIG_FLAT_NODE_MEM_MAP=y
262CONFIG_PAGEFLAGS_EXTENDED=y 190CONFIG_PAGEFLAGS_EXTENDED=y
263CONFIG_SPLIT_PTLOCK_CPUS=4096 191CONFIG_SPLIT_PTLOCK_CPUS=4
264# CONFIG_PHYS_ADDR_T_64BIT is not set 192# CONFIG_PHYS_ADDR_T_64BIT is not set
265CONFIG_ZONE_DMA_FLAG=1 193CONFIG_ZONE_DMA_FLAG=0
266CONFIG_BOUNCE=y 194CONFIG_NR_QUICK=2
267CONFIG_VIRT_TO_BUS=y 195CONFIG_VIRT_TO_BUS=y
268CONFIG_UNEVICTABLE_LRU=y
269CONFIG_HAVE_MLOCK=y 196CONFIG_HAVE_MLOCK=y
270CONFIG_HAVE_MLOCKED_PAGE_BIT=y 197CONFIG_HAVE_MLOCKED_PAGE_BIT=y
271CONFIG_LEDS=y 198# CONFIG_KSM is not set
272# CONFIG_LEDS_CPU is not set 199CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
273CONFIG_ALIGNMENT_TRAP=y 200# CONFIG_OWNERSHIP_TRACE is not set
274 201CONFIG_NMI_DEBUGGING=y
275# 202# CONFIG_HZ_100 is not set
276# Boot options 203CONFIG_HZ_250=y
277# 204# CONFIG_HZ_300 is not set
278CONFIG_ZBOOT_ROM_TEXT=0x0 205# CONFIG_HZ_1000 is not set
279CONFIG_ZBOOT_ROM_BSS=0x0 206CONFIG_HZ=250
207CONFIG_SCHED_HRTICK=y
280CONFIG_CMDLINE="" 208CONFIG_CMDLINE=""
281# CONFIG_XIP_KERNEL is not set
282# CONFIG_KEXEC is not set
283 209
284# 210#
285# CPU Power Management 211# Power management options
286# 212#
287# CONFIG_CPU_IDLE is not set 213CONFIG_PM=y
214# CONFIG_PM_DEBUG is not set
215CONFIG_PM_SLEEP=y
216CONFIG_SUSPEND=y
217CONFIG_SUSPEND_FREEZER=y
218# CONFIG_PM_RUNTIME is not set
219CONFIG_ARCH_SUSPEND_POSSIBLE=y
288 220
289# 221#
290# Floating point emulation 222# CPU Frequency scaling
291# 223#
224CONFIG_CPU_FREQ=y
225CONFIG_CPU_FREQ_TABLE=y
226# CONFIG_CPU_FREQ_DEBUG is not set
227# CONFIG_CPU_FREQ_STAT is not set
228# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
229# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
230# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
231CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
232# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
233CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
234# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
235CONFIG_CPU_FREQ_GOV_USERSPACE=y
236CONFIG_CPU_FREQ_GOV_ONDEMAND=y
237# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
238CONFIG_CPU_FREQ_AT32AP=y
292 239
293# 240#
294# At least one emulation must be selected 241# Bus options
295# 242#
296# CONFIG_VFP is not set 243# CONFIG_ARCH_SUPPORTS_MSI is not set
244# CONFIG_PCCARD is not set
297 245
298# 246#
299# Userspace binary formats 247# Executable file formats
300# 248#
301CONFIG_BINFMT_ELF=y 249CONFIG_BINFMT_ELF=y
302# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 250# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
303CONFIG_HAVE_AOUT=y 251# CONFIG_HAVE_AOUT is not set
304# CONFIG_BINFMT_AOUT is not set
305# CONFIG_BINFMT_MISC is not set 252# CONFIG_BINFMT_MISC is not set
306
307#
308# Power management options
309#
310# CONFIG_PM is not set
311CONFIG_ARCH_SUSPEND_POSSIBLE=y
312CONFIG_NET=y 253CONFIG_NET=y
313 254
314# 255#
315# Networking options 256# Networking options
316# 257#
317CONFIG_PACKET=y 258CONFIG_PACKET=y
318# CONFIG_PACKET_MMAP is not set 259CONFIG_PACKET_MMAP=y
319CONFIG_UNIX=y 260CONFIG_UNIX=y
320CONFIG_XFRM=y 261CONFIG_XFRM=y
321# CONFIG_XFRM_USER is not set 262CONFIG_XFRM_USER=y
322# CONFIG_XFRM_SUB_POLICY is not set 263# CONFIG_XFRM_SUB_POLICY is not set
323# CONFIG_XFRM_MIGRATE is not set 264# CONFIG_XFRM_MIGRATE is not set
324# CONFIG_XFRM_STATISTICS is not set 265# CONFIG_XFRM_STATISTICS is not set
325# CONFIG_NET_KEY is not set 266CONFIG_XFRM_IPCOMP=y
267CONFIG_NET_KEY=y
268# CONFIG_NET_KEY_MIGRATE is not set
326CONFIG_INET=y 269CONFIG_INET=y
327# CONFIG_IP_MULTICAST is not set 270CONFIG_IP_MULTICAST=y
328# CONFIG_IP_ADVANCED_ROUTER is not set 271CONFIG_IP_ADVANCED_ROUTER=y
272CONFIG_ASK_IP_FIB_HASH=y
273# CONFIG_IP_FIB_TRIE is not set
329CONFIG_IP_FIB_HASH=y 274CONFIG_IP_FIB_HASH=y
275# CONFIG_IP_MULTIPLE_TABLES is not set
276# CONFIG_IP_ROUTE_MULTIPATH is not set
277# CONFIG_IP_ROUTE_VERBOSE is not set
330CONFIG_IP_PNP=y 278CONFIG_IP_PNP=y
331CONFIG_IP_PNP_DHCP=y 279CONFIG_IP_PNP_DHCP=y
332# CONFIG_IP_PNP_BOOTP is not set 280# CONFIG_IP_PNP_BOOTP is not set
333# CONFIG_IP_PNP_RARP is not set 281# CONFIG_IP_PNP_RARP is not set
334# CONFIG_NET_IPIP is not set 282# CONFIG_NET_IPIP is not set
335# CONFIG_NET_IPGRE is not set 283# CONFIG_NET_IPGRE is not set
284CONFIG_IP_MROUTE=y
285CONFIG_IP_PIMSM_V1=y
286# CONFIG_IP_PIMSM_V2 is not set
336# CONFIG_ARPD is not set 287# CONFIG_ARPD is not set
337# CONFIG_SYN_COOKIES is not set 288CONFIG_SYN_COOKIES=y
338# CONFIG_INET_AH is not set 289CONFIG_INET_AH=y
339# CONFIG_INET_ESP is not set 290CONFIG_INET_ESP=y
340# CONFIG_INET_IPCOMP is not set 291CONFIG_INET_IPCOMP=y
341# CONFIG_INET_XFRM_TUNNEL is not set 292CONFIG_INET_XFRM_TUNNEL=y
342CONFIG_INET_TUNNEL=m 293CONFIG_INET_TUNNEL=y
343CONFIG_INET_XFRM_MODE_TRANSPORT=y 294CONFIG_INET_XFRM_MODE_TRANSPORT=y
344CONFIG_INET_XFRM_MODE_TUNNEL=y 295CONFIG_INET_XFRM_MODE_TUNNEL=y
345CONFIG_INET_XFRM_MODE_BEET=y 296CONFIG_INET_XFRM_MODE_BEET=y
@@ -350,21 +301,21 @@ CONFIG_INET_TCP_DIAG=y
350CONFIG_TCP_CONG_CUBIC=y 301CONFIG_TCP_CONG_CUBIC=y
351CONFIG_DEFAULT_TCP_CONG="cubic" 302CONFIG_DEFAULT_TCP_CONG="cubic"
352# CONFIG_TCP_MD5SIG is not set 303# CONFIG_TCP_MD5SIG is not set
353CONFIG_IPV6=m 304CONFIG_IPV6=y
354# CONFIG_IPV6_PRIVACY is not set 305# CONFIG_IPV6_PRIVACY is not set
355# CONFIG_IPV6_ROUTER_PREF is not set 306# CONFIG_IPV6_ROUTER_PREF is not set
356# CONFIG_IPV6_OPTIMISTIC_DAD is not set 307# CONFIG_IPV6_OPTIMISTIC_DAD is not set
357# CONFIG_INET6_AH is not set 308CONFIG_INET6_AH=y
358# CONFIG_INET6_ESP is not set 309CONFIG_INET6_ESP=y
359# CONFIG_INET6_IPCOMP is not set 310CONFIG_INET6_IPCOMP=y
360# CONFIG_IPV6_MIP6 is not set 311# CONFIG_IPV6_MIP6 is not set
361# CONFIG_INET6_XFRM_TUNNEL is not set 312CONFIG_INET6_XFRM_TUNNEL=y
362# CONFIG_INET6_TUNNEL is not set 313CONFIG_INET6_TUNNEL=y
363CONFIG_INET6_XFRM_MODE_TRANSPORT=m 314CONFIG_INET6_XFRM_MODE_TRANSPORT=y
364CONFIG_INET6_XFRM_MODE_TUNNEL=m 315CONFIG_INET6_XFRM_MODE_TUNNEL=y
365CONFIG_INET6_XFRM_MODE_BEET=m 316CONFIG_INET6_XFRM_MODE_BEET=y
366# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 317# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
367CONFIG_IPV6_SIT=m 318CONFIG_IPV6_SIT=y
368CONFIG_IPV6_NDISC_NODETYPE=y 319CONFIG_IPV6_NDISC_NODETYPE=y
369# CONFIG_IPV6_TUNNEL is not set 320# CONFIG_IPV6_TUNNEL is not set
370# CONFIG_IPV6_MULTIPLE_TABLES is not set 321# CONFIG_IPV6_MULTIPLE_TABLES is not set
@@ -372,38 +323,73 @@ CONFIG_IPV6_NDISC_NODETYPE=y
372# CONFIG_NETWORK_SECMARK is not set 323# CONFIG_NETWORK_SECMARK is not set
373CONFIG_NETFILTER=y 324CONFIG_NETFILTER=y
374# CONFIG_NETFILTER_DEBUG is not set 325# CONFIG_NETFILTER_DEBUG is not set
375CONFIG_NETFILTER_ADVANCED=y 326# CONFIG_NETFILTER_ADVANCED is not set
376 327
377# 328#
378# Core Netfilter Configuration 329# Core Netfilter Configuration
379# 330#
380# CONFIG_NETFILTER_NETLINK_QUEUE is not set 331CONFIG_NETFILTER_NETLINK=m
381# CONFIG_NETFILTER_NETLINK_LOG is not set 332CONFIG_NETFILTER_NETLINK_LOG=m
382# CONFIG_NF_CONNTRACK is not set 333CONFIG_NF_CONNTRACK=m
383# CONFIG_NETFILTER_XTABLES is not set 334CONFIG_NF_CONNTRACK_FTP=m
335CONFIG_NF_CONNTRACK_IRC=m
336CONFIG_NF_CONNTRACK_SIP=m
337CONFIG_NF_CT_NETLINK=m
338CONFIG_NETFILTER_XTABLES=y
339CONFIG_NETFILTER_XT_TARGET_MARK=m
340CONFIG_NETFILTER_XT_TARGET_NFLOG=m
341CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
342CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
343CONFIG_NETFILTER_XT_MATCH_MARK=m
344CONFIG_NETFILTER_XT_MATCH_POLICY=m
345CONFIG_NETFILTER_XT_MATCH_STATE=m
384# CONFIG_IP_VS is not set 346# CONFIG_IP_VS is not set
385 347
386# 348#
387# IP: Netfilter Configuration 349# IP: Netfilter Configuration
388# 350#
389# CONFIG_NF_DEFRAG_IPV4 is not set 351CONFIG_NF_DEFRAG_IPV4=m
390# CONFIG_IP_NF_QUEUE is not set 352CONFIG_NF_CONNTRACK_IPV4=m
391# CONFIG_IP_NF_IPTABLES is not set 353CONFIG_NF_CONNTRACK_PROC_COMPAT=y
392# CONFIG_IP_NF_ARPTABLES is not set 354CONFIG_IP_NF_IPTABLES=m
355CONFIG_IP_NF_FILTER=m
356CONFIG_IP_NF_TARGET_REJECT=m
357CONFIG_IP_NF_TARGET_LOG=m
358# CONFIG_IP_NF_TARGET_ULOG is not set
359CONFIG_NF_NAT=m
360CONFIG_NF_NAT_NEEDED=y
361CONFIG_IP_NF_TARGET_MASQUERADE=m
362CONFIG_NF_NAT_FTP=m
363CONFIG_NF_NAT_IRC=m
364# CONFIG_NF_NAT_TFTP is not set
365# CONFIG_NF_NAT_AMANDA is not set
366# CONFIG_NF_NAT_PPTP is not set
367# CONFIG_NF_NAT_H323 is not set
368CONFIG_NF_NAT_SIP=m
369CONFIG_IP_NF_MANGLE=m
393 370
394# 371#
395# IPv6: Netfilter Configuration 372# IPv6: Netfilter Configuration
396# 373#
397# CONFIG_IP6_NF_QUEUE is not set 374CONFIG_NF_CONNTRACK_IPV6=m
398# CONFIG_IP6_NF_IPTABLES is not set 375CONFIG_IP6_NF_IPTABLES=m
376CONFIG_IP6_NF_MATCH_IPV6HEADER=m
377CONFIG_IP6_NF_TARGET_LOG=m
378CONFIG_IP6_NF_FILTER=m
379CONFIG_IP6_NF_TARGET_REJECT=m
380CONFIG_IP6_NF_MANGLE=m
399# CONFIG_IP_DCCP is not set 381# CONFIG_IP_DCCP is not set
400# CONFIG_IP_SCTP is not set 382# CONFIG_IP_SCTP is not set
383# CONFIG_RDS is not set
401# CONFIG_TIPC is not set 384# CONFIG_TIPC is not set
402# CONFIG_ATM is not set 385# CONFIG_ATM is not set
403# CONFIG_BRIDGE is not set 386CONFIG_STP=m
387CONFIG_BRIDGE=m
404# CONFIG_NET_DSA is not set 388# CONFIG_NET_DSA is not set
405# CONFIG_VLAN_8021Q is not set 389CONFIG_VLAN_8021Q=m
390# CONFIG_VLAN_8021Q_GVRP is not set
406# CONFIG_DECNET is not set 391# CONFIG_DECNET is not set
392CONFIG_LLC=m
407# CONFIG_LLC2 is not set 393# CONFIG_LLC2 is not set
408# CONFIG_IPX is not set 394# CONFIG_IPX is not set
409# CONFIG_ATALK is not set 395# CONFIG_ATALK is not set
@@ -412,6 +398,7 @@ CONFIG_NETFILTER_ADVANCED=y
412# CONFIG_ECONET is not set 398# CONFIG_ECONET is not set
413# CONFIG_WAN_ROUTER is not set 399# CONFIG_WAN_ROUTER is not set
414# CONFIG_PHONET is not set 400# CONFIG_PHONET is not set
401# CONFIG_IEEE802154 is not set
415# CONFIG_NET_SCHED is not set 402# CONFIG_NET_SCHED is not set
416# CONFIG_DCB is not set 403# CONFIG_DCB is not set
417 404
@@ -419,12 +406,23 @@ CONFIG_NETFILTER_ADVANCED=y
419# Network testing 406# Network testing
420# 407#
421# CONFIG_NET_PKTGEN is not set 408# CONFIG_NET_PKTGEN is not set
409# CONFIG_NET_TCPPROBE is not set
410# CONFIG_NET_DROP_MONITOR is not set
422# CONFIG_HAMRADIO is not set 411# CONFIG_HAMRADIO is not set
423# CONFIG_CAN is not set 412# CONFIG_CAN is not set
424# CONFIG_IRDA is not set 413# CONFIG_IRDA is not set
425# CONFIG_BT is not set 414# CONFIG_BT is not set
426# CONFIG_AF_RXRPC is not set 415# CONFIG_AF_RXRPC is not set
427# CONFIG_WIRELESS is not set 416CONFIG_WIRELESS=y
417# CONFIG_CFG80211 is not set
418CONFIG_CFG80211_DEFAULT_PS_VALUE=0
419# CONFIG_WIRELESS_OLD_REGULATORY is not set
420# CONFIG_WIRELESS_EXT is not set
421# CONFIG_LIB80211 is not set
422
423#
424# CFG80211 needs to be enabled for MAC80211
425#
428# CONFIG_WIMAX is not set 426# CONFIG_WIMAX is not set
429# CONFIG_RFKILL is not set 427# CONFIG_RFKILL is not set
430# CONFIG_NET_9P is not set 428# CONFIG_NET_9P is not set
@@ -437,28 +435,138 @@ CONFIG_NETFILTER_ADVANCED=y
437# Generic Driver Options 435# Generic Driver Options
438# 436#
439CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 437CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
438# CONFIG_DEVTMPFS is not set
440CONFIG_STANDALONE=y 439CONFIG_STANDALONE=y
441CONFIG_PREVENT_FIRMWARE_BUILD=y 440# CONFIG_PREVENT_FIRMWARE_BUILD is not set
442# CONFIG_FW_LOADER is not set 441# CONFIG_FW_LOADER is not set
443# CONFIG_DEBUG_DRIVER is not set 442# CONFIG_DEBUG_DRIVER is not set
444# CONFIG_DEBUG_DEVRES is not set 443# CONFIG_DEBUG_DEVRES is not set
445# CONFIG_SYS_HYPERVISOR is not set 444# CONFIG_SYS_HYPERVISOR is not set
446# CONFIG_CONNECTOR is not set 445# CONFIG_CONNECTOR is not set
447# CONFIG_MTD is not set 446CONFIG_MTD=y
447# CONFIG_MTD_DEBUG is not set
448# CONFIG_MTD_TESTS is not set
449# CONFIG_MTD_CONCAT is not set
450CONFIG_MTD_PARTITIONS=y
451# CONFIG_MTD_REDBOOT_PARTS is not set
452CONFIG_MTD_CMDLINE_PARTS=y
453# CONFIG_MTD_AR7_PARTS is not set
454
455#
456# User Modules And Translation Layers
457#
458CONFIG_MTD_CHAR=y
459CONFIG_MTD_BLKDEVS=y
460CONFIG_MTD_BLOCK=y
461# CONFIG_FTL is not set
462# CONFIG_NFTL is not set
463# CONFIG_INFTL is not set
464# CONFIG_RFD_FTL is not set
465# CONFIG_SSFDC is not set
466# CONFIG_MTD_OOPS is not set
467
468#
469# RAM/ROM/Flash chip drivers
470#
471CONFIG_MTD_CFI=y
472# CONFIG_MTD_JEDECPROBE is not set
473CONFIG_MTD_GEN_PROBE=y
474# CONFIG_MTD_CFI_ADV_OPTIONS is not set
475CONFIG_MTD_MAP_BANK_WIDTH_1=y
476CONFIG_MTD_MAP_BANK_WIDTH_2=y
477CONFIG_MTD_MAP_BANK_WIDTH_4=y
478# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
479# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
480# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
481CONFIG_MTD_CFI_I1=y
482CONFIG_MTD_CFI_I2=y
483# CONFIG_MTD_CFI_I4 is not set
484# CONFIG_MTD_CFI_I8 is not set
485CONFIG_MTD_CFI_INTELEXT=y
486# CONFIG_MTD_CFI_AMDSTD is not set
487# CONFIG_MTD_CFI_STAA is not set
488CONFIG_MTD_CFI_UTIL=y
489# CONFIG_MTD_RAM is not set
490# CONFIG_MTD_ROM is not set
491# CONFIG_MTD_ABSENT is not set
492
493#
494# Mapping drivers for chip access
495#
496# CONFIG_MTD_COMPLEX_MAPPINGS is not set
497CONFIG_MTD_PHYSMAP=y
498# CONFIG_MTD_PHYSMAP_COMPAT is not set
499# CONFIG_MTD_PLATRAM is not set
500
501#
502# Self-contained MTD device drivers
503#
504CONFIG_MTD_DATAFLASH=y
505# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
506# CONFIG_MTD_DATAFLASH_OTP is not set
507# CONFIG_MTD_M25P80 is not set
508# CONFIG_MTD_SST25L is not set
509# CONFIG_MTD_SLRAM is not set
510# CONFIG_MTD_PHRAM is not set
511# CONFIG_MTD_MTDRAM is not set
512# CONFIG_MTD_BLOCK2MTD is not set
513
514#
515# Disk-On-Chip Device Drivers
516#
517# CONFIG_MTD_DOC2000 is not set
518# CONFIG_MTD_DOC2001 is not set
519# CONFIG_MTD_DOC2001PLUS is not set
520CONFIG_MTD_NAND=y
521# CONFIG_MTD_NAND_VERIFY_WRITE is not set
522# CONFIG_MTD_NAND_ECC_SMC is not set
523# CONFIG_MTD_NAND_MUSEUM_IDS is not set
524CONFIG_MTD_NAND_IDS=y
525# CONFIG_MTD_NAND_DISKONCHIP is not set
526CONFIG_MTD_NAND_ATMEL=y
527CONFIG_MTD_NAND_ATMEL_ECC_HW=y
528# CONFIG_MTD_NAND_ATMEL_ECC_SOFT is not set
529# CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set
530# CONFIG_MTD_NAND_NANDSIM is not set
531# CONFIG_MTD_NAND_PLATFORM is not set
532# CONFIG_MTD_ONENAND is not set
533
534#
535# LPDDR flash memory drivers
536#
537# CONFIG_MTD_LPDDR is not set
538
539#
540# UBI - Unsorted block images
541#
542CONFIG_MTD_UBI=y
543CONFIG_MTD_UBI_WL_THRESHOLD=4096
544CONFIG_MTD_UBI_BEB_RESERVE=1
545# CONFIG_MTD_UBI_GLUEBI is not set
546
547#
548# UBI debugging options
549#
550# CONFIG_MTD_UBI_DEBUG is not set
448# CONFIG_PARPORT is not set 551# CONFIG_PARPORT is not set
449CONFIG_BLK_DEV=y 552CONFIG_BLK_DEV=y
450# CONFIG_BLK_DEV_COW_COMMON is not set 553# CONFIG_BLK_DEV_COW_COMMON is not set
451CONFIG_BLK_DEV_LOOP=m 554CONFIG_BLK_DEV_LOOP=m
452# CONFIG_BLK_DEV_CRYPTOLOOP is not set 555# CONFIG_BLK_DEV_CRYPTOLOOP is not set
453# CONFIG_BLK_DEV_NBD is not set 556CONFIG_BLK_DEV_NBD=m
454CONFIG_BLK_DEV_RAM=y 557CONFIG_BLK_DEV_RAM=m
455CONFIG_BLK_DEV_RAM_COUNT=1 558CONFIG_BLK_DEV_RAM_COUNT=16
456CONFIG_BLK_DEV_RAM_SIZE=32768 559CONFIG_BLK_DEV_RAM_SIZE=4096
457# CONFIG_BLK_DEV_XIP is not set 560# CONFIG_BLK_DEV_XIP is not set
458# CONFIG_CDROM_PKTCDVD is not set 561# CONFIG_CDROM_PKTCDVD is not set
459# CONFIG_ATA_OVER_ETH is not set 562# CONFIG_ATA_OVER_ETH is not set
460CONFIG_MISC_DEVICES=y 563CONFIG_MISC_DEVICES=y
564# CONFIG_ATMEL_PWM is not set
565CONFIG_ATMEL_TCLIB=y
566CONFIG_ATMEL_TCB_CLKSRC=y
567CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
461# CONFIG_ICS932S401 is not set 568# CONFIG_ICS932S401 is not set
569# CONFIG_ATMEL_SSC is not set
462# CONFIG_ENCLOSURE_SERVICES is not set 570# CONFIG_ENCLOSURE_SERVICES is not set
463# CONFIG_ISL29003 is not set 571# CONFIG_ISL29003 is not set
464# CONFIG_C2PORT is not set 572# CONFIG_C2PORT is not set
@@ -466,60 +574,22 @@ CONFIG_MISC_DEVICES=y
466# 574#
467# EEPROM support 575# EEPROM support
468# 576#
469CONFIG_EEPROM_AT24=y 577# CONFIG_EEPROM_AT24 is not set
578# CONFIG_EEPROM_AT25 is not set
470# CONFIG_EEPROM_LEGACY is not set 579# CONFIG_EEPROM_LEGACY is not set
580# CONFIG_EEPROM_MAX6875 is not set
471# CONFIG_EEPROM_93CX6 is not set 581# CONFIG_EEPROM_93CX6 is not set
472CONFIG_HAVE_IDE=y
473# CONFIG_IDE is not set
474 582
475# 583#
476# SCSI device support 584# SCSI device support
477# 585#
478# CONFIG_RAID_ATTRS is not set 586# CONFIG_RAID_ATTRS is not set
479CONFIG_SCSI=m 587# CONFIG_SCSI is not set
480CONFIG_SCSI_DMA=y 588# CONFIG_SCSI_DMA is not set
481# CONFIG_SCSI_TGT is not set
482# CONFIG_SCSI_NETLINK is not set 589# CONFIG_SCSI_NETLINK is not set
483CONFIG_SCSI_PROC_FS=y
484
485#
486# SCSI support type (disk, tape, CD-ROM)
487#
488CONFIG_BLK_DEV_SD=m
489# CONFIG_CHR_DEV_ST is not set
490# CONFIG_CHR_DEV_OSST is not set
491# CONFIG_BLK_DEV_SR is not set
492# CONFIG_CHR_DEV_SG is not set
493# CONFIG_CHR_DEV_SCH is not set
494
495#
496# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
497#
498# CONFIG_SCSI_MULTI_LUN is not set
499# CONFIG_SCSI_CONSTANTS is not set
500# CONFIG_SCSI_LOGGING is not set
501# CONFIG_SCSI_SCAN_ASYNC is not set
502CONFIG_SCSI_WAIT_SCAN=m
503
504#
505# SCSI Transports
506#
507# CONFIG_SCSI_SPI_ATTRS is not set
508# CONFIG_SCSI_FC_ATTRS is not set
509# CONFIG_SCSI_ISCSI_ATTRS is not set
510# CONFIG_SCSI_SAS_LIBSAS is not set
511# CONFIG_SCSI_SRP_ATTRS is not set
512CONFIG_SCSI_LOWLEVEL=y
513# CONFIG_ISCSI_TCP is not set
514# CONFIG_LIBFC is not set
515# CONFIG_LIBFCOE is not set
516# CONFIG_SCSI_DEBUG is not set
517# CONFIG_SCSI_DH is not set
518# CONFIG_SCSI_OSD_INITIATOR is not set
519# CONFIG_ATA is not set 590# CONFIG_ATA is not set
520# CONFIG_MD is not set 591# CONFIG_MD is not set
521CONFIG_NETDEVICES=y 592CONFIG_NETDEVICES=y
522CONFIG_COMPAT_NET_DEV_OPS=y
523# CONFIG_DUMMY is not set 593# CONFIG_DUMMY is not set
524# CONFIG_BONDING is not set 594# CONFIG_BONDING is not set
525# CONFIG_MACVLAN is not set 595# CONFIG_MACVLAN is not set
@@ -534,7 +604,7 @@ CONFIG_PHYLIB=y
534# CONFIG_MARVELL_PHY is not set 604# CONFIG_MARVELL_PHY is not set
535# CONFIG_DAVICOM_PHY is not set 605# CONFIG_DAVICOM_PHY is not set
536# CONFIG_QSEMI_PHY is not set 606# CONFIG_QSEMI_PHY is not set
537CONFIG_LXT_PHY=y 607# CONFIG_LXT_PHY is not set
538# CONFIG_CICADA_PHY is not set 608# CONFIG_CICADA_PHY is not set
539# CONFIG_VITESSE_PHY is not set 609# CONFIG_VITESSE_PHY is not set
540# CONFIG_SMSC_PHY is not set 610# CONFIG_SMSC_PHY is not set
@@ -543,18 +613,14 @@ CONFIG_LXT_PHY=y
543# CONFIG_REALTEK_PHY is not set 613# CONFIG_REALTEK_PHY is not set
544# CONFIG_NATIONAL_PHY is not set 614# CONFIG_NATIONAL_PHY is not set
545# CONFIG_STE10XP is not set 615# CONFIG_STE10XP is not set
546CONFIG_LSI_ET1011C_PHY=y 616# CONFIG_LSI_ET1011C_PHY is not set
547# CONFIG_FIXED_PHY is not set 617# CONFIG_FIXED_PHY is not set
548# CONFIG_MDIO_BITBANG is not set 618# CONFIG_MDIO_BITBANG is not set
549CONFIG_NET_ETHERNET=y 619CONFIG_NET_ETHERNET=y
550CONFIG_MII=y 620# CONFIG_MII is not set
551# CONFIG_AX88796 is not set 621CONFIG_MACB=y
552# CONFIG_SMC91X is not set 622# CONFIG_ENC28J60 is not set
553CONFIG_TI_DAVINCI_EMAC=y
554# CONFIG_DM9000 is not set
555# CONFIG_ETHOC is not set 623# CONFIG_ETHOC is not set
556# CONFIG_SMC911X is not set
557# CONFIG_SMSC911X is not set
558# CONFIG_DNET is not set 624# CONFIG_DNET is not set
559# CONFIG_IBM_NEW_EMAC_ZMII is not set 625# CONFIG_IBM_NEW_EMAC_ZMII is not set
560# CONFIG_IBM_NEW_EMAC_RGMII is not set 626# CONFIG_IBM_NEW_EMAC_RGMII is not set
@@ -564,12 +630,12 @@ CONFIG_TI_DAVINCI_EMAC=y
564# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 630# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
565# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 631# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
566# CONFIG_B44 is not set 632# CONFIG_B44 is not set
633# CONFIG_KS8842 is not set
634# CONFIG_KS8851 is not set
635# CONFIG_KS8851_MLL is not set
567# CONFIG_NETDEV_1000 is not set 636# CONFIG_NETDEV_1000 is not set
568# CONFIG_NETDEV_10000 is not set 637# CONFIG_NETDEV_10000 is not set
569 638CONFIG_WLAN=y
570#
571# Wireless LAN
572#
573# CONFIG_WLAN_PRE80211 is not set 639# CONFIG_WLAN_PRE80211 is not set
574# CONFIG_WLAN_80211 is not set 640# CONFIG_WLAN_80211 is not set
575 641
@@ -577,112 +643,71 @@ CONFIG_TI_DAVINCI_EMAC=y
577# Enable WiMAX (Networking options) to see the WiMAX drivers 643# Enable WiMAX (Networking options) to see the WiMAX drivers
578# 644#
579# CONFIG_WAN is not set 645# CONFIG_WAN is not set
580# CONFIG_PPP is not set 646CONFIG_PPP=m
647# CONFIG_PPP_MULTILINK is not set
648CONFIG_PPP_FILTER=y
649CONFIG_PPP_ASYNC=m
650# CONFIG_PPP_SYNC_TTY is not set
651CONFIG_PPP_DEFLATE=m
652CONFIG_PPP_BSDCOMP=m
653CONFIG_PPP_MPPE=m
654CONFIG_PPPOE=m
655# CONFIG_PPPOL2TP is not set
581# CONFIG_SLIP is not set 656# CONFIG_SLIP is not set
582CONFIG_NETCONSOLE=y 657CONFIG_SLHC=m
583# CONFIG_NETCONSOLE_DYNAMIC is not set 658# CONFIG_NETCONSOLE is not set
584CONFIG_NETPOLL=y 659# CONFIG_NETPOLL is not set
585CONFIG_NETPOLL_TRAP=y 660# CONFIG_NET_POLL_CONTROLLER is not set
586CONFIG_NET_POLL_CONTROLLER=y
587# CONFIG_ISDN is not set 661# CONFIG_ISDN is not set
662# CONFIG_PHONE is not set
588 663
589# 664#
590# Input device support 665# Input device support
591# 666#
592CONFIG_INPUT=y 667# CONFIG_INPUT is not set
593# CONFIG_INPUT_FF_MEMLESS is not set
594# CONFIG_INPUT_POLLDEV is not set
595
596#
597# Userland interfaces
598#
599CONFIG_INPUT_MOUSEDEV=m
600CONFIG_INPUT_MOUSEDEV_PSAUX=y
601CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
602CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
603# CONFIG_INPUT_JOYDEV is not set
604CONFIG_INPUT_EVDEV=m
605CONFIG_INPUT_EVBUG=m
606
607#
608# Input Device Drivers
609#
610CONFIG_INPUT_KEYBOARD=y
611CONFIG_KEYBOARD_ATKBD=m
612# CONFIG_KEYBOARD_SUNKBD is not set
613# CONFIG_KEYBOARD_LKKBD is not set
614CONFIG_KEYBOARD_XTKBD=m
615# CONFIG_KEYBOARD_NEWTON is not set
616# CONFIG_KEYBOARD_STOWAWAY is not set
617CONFIG_KEYBOARD_GPIO=y
618# CONFIG_INPUT_MOUSE is not set
619# CONFIG_INPUT_JOYSTICK is not set
620# CONFIG_INPUT_TABLET is not set
621CONFIG_INPUT_TOUCHSCREEN=y
622# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
623# CONFIG_TOUCHSCREEN_AD7879 is not set
624# CONFIG_TOUCHSCREEN_FUJITSU is not set
625# CONFIG_TOUCHSCREEN_GUNZE is not set
626# CONFIG_TOUCHSCREEN_ELO is not set
627# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
628# CONFIG_TOUCHSCREEN_MTOUCH is not set
629# CONFIG_TOUCHSCREEN_INEXIO is not set
630# CONFIG_TOUCHSCREEN_MK712 is not set
631# CONFIG_TOUCHSCREEN_PENMOUNT is not set
632# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
633# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
634# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
635# CONFIG_TOUCHSCREEN_TSC2007 is not set
636# CONFIG_INPUT_MISC is not set
637 668
638# 669#
639# Hardware I/O ports 670# Hardware I/O ports
640# 671#
641CONFIG_SERIO=y 672# CONFIG_SERIO is not set
642CONFIG_SERIO_SERPORT=y
643CONFIG_SERIO_LIBPS2=y
644# CONFIG_SERIO_RAW is not set
645# CONFIG_GAMEPORT is not set 673# CONFIG_GAMEPORT is not set
646 674
647# 675#
648# Character devices 676# Character devices
649# 677#
650CONFIG_VT=y 678# CONFIG_VT is not set
651CONFIG_CONSOLE_TRANSLATIONS=y 679# CONFIG_DEVKMEM is not set
652# CONFIG_VT_CONSOLE is not set
653CONFIG_HW_CONSOLE=y
654# CONFIG_VT_HW_CONSOLE_BINDING is not set
655CONFIG_DEVKMEM=y
656# CONFIG_SERIAL_NONSTANDARD is not set 680# CONFIG_SERIAL_NONSTANDARD is not set
657 681
658# 682#
659# Serial drivers 683# Serial drivers
660# 684#
661CONFIG_SERIAL_8250=y 685# CONFIG_SERIAL_8250 is not set
662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_NR_UARTS=3
664CONFIG_SERIAL_8250_RUNTIME_UARTS=3
665# CONFIG_SERIAL_8250_EXTENDED is not set
666 686
667# 687#
668# Non-8250 serial port support 688# Non-8250 serial port support
669# 689#
690CONFIG_SERIAL_ATMEL=y
691CONFIG_SERIAL_ATMEL_CONSOLE=y
692CONFIG_SERIAL_ATMEL_PDC=y
693# CONFIG_SERIAL_ATMEL_TTYAT is not set
694# CONFIG_SERIAL_MAX3100 is not set
670CONFIG_SERIAL_CORE=y 695CONFIG_SERIAL_CORE=y
671CONFIG_SERIAL_CORE_CONSOLE=y 696CONFIG_SERIAL_CORE_CONSOLE=y
672CONFIG_UNIX98_PTYS=y 697CONFIG_UNIX98_PTYS=y
673# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 698# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
674CONFIG_LEGACY_PTYS=y 699# CONFIG_LEGACY_PTYS is not set
675CONFIG_LEGACY_PTY_COUNT=256
676# CONFIG_IPMI_HANDLER is not set 700# CONFIG_IPMI_HANDLER is not set
677CONFIG_HW_RANDOM=m 701# CONFIG_HW_RANDOM is not set
678# CONFIG_HW_RANDOM_TIMERIOMEM is not set
679# CONFIG_R3964 is not set 702# CONFIG_R3964 is not set
680# CONFIG_RAW_DRIVER is not set 703# CONFIG_RAW_DRIVER is not set
681# CONFIG_TCG_TPM is not set 704# CONFIG_TCG_TPM is not set
682CONFIG_I2C=y 705CONFIG_I2C=m
683CONFIG_I2C_BOARDINFO=y 706CONFIG_I2C_BOARDINFO=y
684CONFIG_I2C_CHARDEV=y 707CONFIG_I2C_COMPAT=y
708CONFIG_I2C_CHARDEV=m
685CONFIG_I2C_HELPER_AUTO=y 709CONFIG_I2C_HELPER_AUTO=y
710CONFIG_I2C_ALGOBIT=m
686 711
687# 712#
688# I2C Hardware Bus support 713# I2C Hardware Bus support
@@ -691,8 +716,8 @@ CONFIG_I2C_HELPER_AUTO=y
691# 716#
692# I2C system bus drivers (mostly embedded / system-on-chip) 717# I2C system bus drivers (mostly embedded / system-on-chip)
693# 718#
694CONFIG_I2C_DAVINCI=y 719# CONFIG_I2C_DESIGNWARE is not set
695# CONFIG_I2C_GPIO is not set 720CONFIG_I2C_GPIO=m
696# CONFIG_I2C_OCORES is not set 721# CONFIG_I2C_OCORES is not set
697# CONFIG_I2C_SIMTEC is not set 722# CONFIG_I2C_SIMTEC is not set
698 723
@@ -712,18 +737,36 @@ CONFIG_I2C_DAVINCI=y
712# Miscellaneous I2C Chip support 737# Miscellaneous I2C Chip support
713# 738#
714# CONFIG_DS1682 is not set 739# CONFIG_DS1682 is not set
715# CONFIG_SENSORS_PCA9539 is not set
716# CONFIG_SENSORS_MAX6875 is not set
717# CONFIG_SENSORS_TSL2550 is not set 740# CONFIG_SENSORS_TSL2550 is not set
718# CONFIG_I2C_DEBUG_CORE is not set 741# CONFIG_I2C_DEBUG_CORE is not set
719# CONFIG_I2C_DEBUG_ALGO is not set 742# CONFIG_I2C_DEBUG_ALGO is not set
720# CONFIG_I2C_DEBUG_BUS is not set 743# CONFIG_I2C_DEBUG_BUS is not set
721# CONFIG_I2C_DEBUG_CHIP is not set 744# CONFIG_I2C_DEBUG_CHIP is not set
722# CONFIG_SPI is not set 745CONFIG_SPI=y
746# CONFIG_SPI_DEBUG is not set
747CONFIG_SPI_MASTER=y
748
749#
750# SPI Master Controller Drivers
751#
752CONFIG_SPI_ATMEL=y
753# CONFIG_SPI_BITBANG is not set
754# CONFIG_SPI_GPIO is not set
755
756#
757# SPI Protocol Masters
758#
759CONFIG_SPI_SPIDEV=m
760# CONFIG_SPI_TLE62X0 is not set
761
762#
763# PPS support
764#
765# CONFIG_PPS is not set
723CONFIG_ARCH_REQUIRE_GPIOLIB=y 766CONFIG_ARCH_REQUIRE_GPIOLIB=y
724CONFIG_GPIOLIB=y 767CONFIG_GPIOLIB=y
725# CONFIG_DEBUG_GPIO is not set 768# CONFIG_DEBUG_GPIO is not set
726# CONFIG_GPIO_SYSFS is not set 769CONFIG_GPIO_SYSFS=y
727 770
728# 771#
729# Memory mapped GPIO expanders: 772# Memory mapped GPIO expanders:
@@ -734,7 +777,7 @@ CONFIG_GPIOLIB=y
734# 777#
735# CONFIG_GPIO_MAX732X is not set 778# CONFIG_GPIO_MAX732X is not set
736# CONFIG_GPIO_PCA953X is not set 779# CONFIG_GPIO_PCA953X is not set
737CONFIG_GPIO_PCF857X=m 780# CONFIG_GPIO_PCF857X is not set
738 781
739# 782#
740# PCI GPIO expanders: 783# PCI GPIO expanders:
@@ -743,11 +786,17 @@ CONFIG_GPIO_PCF857X=m
743# 786#
744# SPI GPIO expanders: 787# SPI GPIO expanders:
745# 788#
789# CONFIG_GPIO_MAX7301 is not set
790# CONFIG_GPIO_MCP23S08 is not set
791# CONFIG_GPIO_MC33880 is not set
792
793#
794# AC97 GPIO expanders:
795#
746# CONFIG_W1 is not set 796# CONFIG_W1 is not set
747# CONFIG_POWER_SUPPLY is not set 797# CONFIG_POWER_SUPPLY is not set
748# CONFIG_HWMON is not set 798# CONFIG_HWMON is not set
749# CONFIG_THERMAL is not set 799# CONFIG_THERMAL is not set
750# CONFIG_THERMAL_HWMON is not set
751CONFIG_WATCHDOG=y 800CONFIG_WATCHDOG=y
752# CONFIG_WATCHDOG_NOWAYOUT is not set 801# CONFIG_WATCHDOG_NOWAYOUT is not set
753 802
@@ -755,7 +804,7 @@ CONFIG_WATCHDOG=y
755# Watchdog Device Drivers 804# Watchdog Device Drivers
756# 805#
757# CONFIG_SOFT_WATCHDOG is not set 806# CONFIG_SOFT_WATCHDOG is not set
758# CONFIG_DAVINCI_WATCHDOG is not set 807CONFIG_AT32AP700X_WDT=y
759CONFIG_SSB_POSSIBLE=y 808CONFIG_SSB_POSSIBLE=y
760 809
761# 810#
@@ -768,35 +817,18 @@ CONFIG_SSB_POSSIBLE=y
768# 817#
769# CONFIG_MFD_CORE is not set 818# CONFIG_MFD_CORE is not set
770# CONFIG_MFD_SM501 is not set 819# CONFIG_MFD_SM501 is not set
771# CONFIG_MFD_ASIC3 is not set
772# CONFIG_HTC_EGPIO is not set
773# CONFIG_HTC_PASIC3 is not set 820# CONFIG_HTC_PASIC3 is not set
774# CONFIG_TPS65010 is not set 821# CONFIG_TPS65010 is not set
775# CONFIG_TWL4030_CORE is not set
776# CONFIG_MFD_TMIO is not set 822# CONFIG_MFD_TMIO is not set
777# CONFIG_MFD_T7L66XB is not set
778# CONFIG_MFD_TC6387XB is not set
779# CONFIG_MFD_TC6393XB is not set
780# CONFIG_PMIC_DA903X is not set
781# CONFIG_MFD_WM8400 is not set 823# CONFIG_MFD_WM8400 is not set
824# CONFIG_MFD_WM831X is not set
782# CONFIG_MFD_WM8350_I2C is not set 825# CONFIG_MFD_WM8350_I2C is not set
783# CONFIG_MFD_PCF50633 is not set 826# CONFIG_MFD_PCF50633 is not set
784 827# CONFIG_MFD_MC13783 is not set
785# 828# CONFIG_AB3100_CORE is not set
786# Multimedia devices 829# CONFIG_EZX_PCAP is not set
787# 830# CONFIG_REGULATOR is not set
788 831# CONFIG_MEDIA_SUPPORT is not set
789#
790# Multimedia core support
791#
792# CONFIG_VIDEO_DEV is not set
793# CONFIG_DVB_CORE is not set
794# CONFIG_VIDEO_MEDIA is not set
795
796#
797# Multimedia drivers
798#
799# CONFIG_DAB is not set
800 832
801# 833#
802# Graphics support 834# Graphics support
@@ -810,78 +842,194 @@ CONFIG_SSB_POSSIBLE=y
810# Display device support 842# Display device support
811# 843#
812# CONFIG_DISPLAY_SUPPORT is not set 844# CONFIG_DISPLAY_SUPPORT is not set
845# CONFIG_SOUND is not set
846CONFIG_USB_SUPPORT=y
847# CONFIG_USB_ARCH_HAS_HCD is not set
848# CONFIG_USB_ARCH_HAS_OHCI is not set
849# CONFIG_USB_ARCH_HAS_EHCI is not set
850# CONFIG_USB_OTG_WHITELIST is not set
851# CONFIG_USB_OTG_BLACKLIST_HUB is not set
852# CONFIG_USB_GADGET_MUSB_HDRC is not set
813 853
814# 854#
815# Console display driver support 855# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
816# 856#
817# CONFIG_VGA_CONSOLE is not set 857CONFIG_USB_GADGET=y
818CONFIG_DUMMY_CONSOLE=y 858# CONFIG_USB_GADGET_DEBUG is not set
819CONFIG_SOUND=m 859# CONFIG_USB_GADGET_DEBUG_FILES is not set
820# CONFIG_SOUND_OSS_CORE is not set 860# CONFIG_USB_GADGET_DEBUG_FS is not set
821CONFIG_SND=m 861CONFIG_USB_GADGET_VBUS_DRAW=2
822CONFIG_SND_TIMER=m 862CONFIG_USB_GADGET_SELECTED=y
823CONFIG_SND_PCM=m
824CONFIG_SND_JACK=y
825# CONFIG_SND_SEQUENCER is not set
826# CONFIG_SND_MIXER_OSS is not set
827# CONFIG_SND_PCM_OSS is not set
828# CONFIG_SND_HRTIMER is not set
829# CONFIG_SND_DYNAMIC_MINORS is not set
830CONFIG_SND_SUPPORT_OLD_API=y
831CONFIG_SND_VERBOSE_PROCFS=y
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_ARM=y
840CONFIG_SND_SOC=m
841CONFIG_SND_DAVINCI_SOC=m
842CONFIG_SND_SOC_I2C_AND_SPI=m
843# CONFIG_SND_SOC_ALL_CODECS is not set
844# CONFIG_SOUND_PRIME is not set
845# CONFIG_HID_SUPPORT is not set
846# CONFIG_USB_SUPPORT is not set
847# CONFIG_USB_MUSB_HOST is not set
848# CONFIG_USB_MUSB_PERIPHERAL is not set
849# CONFIG_USB_MUSB_OTG is not set
850# CONFIG_USB_GADGET_MUSB_HDRC is not set
851# CONFIG_USB_GADGET_AT91 is not set 863# CONFIG_USB_GADGET_AT91 is not set
852# CONFIG_USB_GADGET_ATMEL_USBA is not set 864CONFIG_USB_GADGET_ATMEL_USBA=y
865CONFIG_USB_ATMEL_USBA=y
853# CONFIG_USB_GADGET_FSL_USB2 is not set 866# CONFIG_USB_GADGET_FSL_USB2 is not set
854# CONFIG_USB_GADGET_LH7A40X is not set 867# CONFIG_USB_GADGET_LH7A40X is not set
855# CONFIG_USB_GADGET_OMAP is not set 868# CONFIG_USB_GADGET_OMAP is not set
856# CONFIG_USB_GADGET_PXA25X is not set 869# CONFIG_USB_GADGET_PXA25X is not set
870# CONFIG_USB_GADGET_R8A66597 is not set
857# CONFIG_USB_GADGET_PXA27X is not set 871# CONFIG_USB_GADGET_PXA27X is not set
858# CONFIG_USB_GADGET_S3C2410 is not set 872# CONFIG_USB_GADGET_S3C_HSOTG is not set
859# CONFIG_USB_GADGET_IMX is not set 873# CONFIG_USB_GADGET_IMX is not set
874# CONFIG_USB_GADGET_S3C2410 is not set
860# CONFIG_USB_GADGET_M66592 is not set 875# CONFIG_USB_GADGET_M66592 is not set
861# CONFIG_USB_GADGET_AMD5536UDC is not set 876# CONFIG_USB_GADGET_AMD5536UDC is not set
862# CONFIG_USB_GADGET_FSL_QE is not set 877# CONFIG_USB_GADGET_FSL_QE is not set
863# CONFIG_USB_GADGET_CI13XXX is not set 878# CONFIG_USB_GADGET_CI13XXX is not set
864# CONFIG_USB_GADGET_NET2280 is not set 879# CONFIG_USB_GADGET_NET2280 is not set
865# CONFIG_USB_GADGET_GOKU is not set 880# CONFIG_USB_GADGET_GOKU is not set
881# CONFIG_USB_GADGET_LANGWELL is not set
866# CONFIG_USB_GADGET_DUMMY_HCD is not set 882# CONFIG_USB_GADGET_DUMMY_HCD is not set
867# CONFIG_USB_ZERO is not set 883CONFIG_USB_GADGET_DUALSPEED=y
868# CONFIG_USB_ETH is not set 884CONFIG_USB_ZERO=m
869# CONFIG_USB_GADGETFS is not set 885# CONFIG_USB_AUDIO is not set
870# CONFIG_USB_FILE_STORAGE is not set 886CONFIG_USB_ETH=m
871# CONFIG_USB_G_SERIAL is not set 887CONFIG_USB_ETH_RNDIS=y
888# CONFIG_USB_ETH_EEM is not set
889CONFIG_USB_GADGETFS=m
890CONFIG_USB_FILE_STORAGE=m
891# CONFIG_USB_FILE_STORAGE_TEST is not set
892CONFIG_USB_G_SERIAL=m
872# CONFIG_USB_MIDI_GADGET is not set 893# CONFIG_USB_MIDI_GADGET is not set
873# CONFIG_USB_G_PRINTER is not set 894# CONFIG_USB_G_PRINTER is not set
874# CONFIG_USB_CDC_COMPOSITE is not set 895CONFIG_USB_CDC_COMPOSITE=m
875# CONFIG_MMC is not set 896
897#
898# OTG and related infrastructure
899#
900# CONFIG_USB_GPIO_VBUS is not set
901# CONFIG_NOP_USB_XCEIV is not set
902CONFIG_MMC=y
903# CONFIG_MMC_DEBUG is not set
904# CONFIG_MMC_UNSAFE_RESUME is not set
905
906#
907# MMC/SD/SDIO Card Drivers
908#
909CONFIG_MMC_BLOCK=y
910CONFIG_MMC_BLOCK_BOUNCE=y
911# CONFIG_SDIO_UART is not set
912CONFIG_MMC_TEST=m
913
914#
915# MMC/SD/SDIO Host Controller Drivers
916#
917# CONFIG_MMC_SDHCI is not set
918# CONFIG_MMC_AT91 is not set
919CONFIG_MMC_ATMELMCI=y
920# CONFIG_MMC_ATMELMCI_DMA is not set
921CONFIG_MMC_SPI=m
876# CONFIG_MEMSTICK is not set 922# CONFIG_MEMSTICK is not set
923CONFIG_NEW_LEDS=y
924CONFIG_LEDS_CLASS=y
925
926#
927# LED drivers
928#
929CONFIG_LEDS_GPIO=y
930CONFIG_LEDS_GPIO_PLATFORM=y
931# CONFIG_LEDS_LP3944 is not set
932# CONFIG_LEDS_PCA955X is not set
933# CONFIG_LEDS_DAC124S085 is not set
934# CONFIG_LEDS_BD2802 is not set
935
936#
937# LED Triggers
938#
939CONFIG_LEDS_TRIGGERS=y
940CONFIG_LEDS_TRIGGER_TIMER=y
941CONFIG_LEDS_TRIGGER_HEARTBEAT=y
942# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
943# CONFIG_LEDS_TRIGGER_GPIO is not set
944CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
945
946#
947# iptables trigger is under Netfilter config (LED target)
948#
877# CONFIG_ACCESSIBILITY is not set 949# CONFIG_ACCESSIBILITY is not set
878# CONFIG_NEW_LEDS is not set
879CONFIG_RTC_LIB=y 950CONFIG_RTC_LIB=y
880# CONFIG_RTC_CLASS is not set 951CONFIG_RTC_CLASS=y
881# CONFIG_DMADEVICES is not set 952CONFIG_RTC_HCTOSYS=y
953CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
954# CONFIG_RTC_DEBUG is not set
955
956#
957# RTC interfaces
958#
959CONFIG_RTC_INTF_SYSFS=y
960CONFIG_RTC_INTF_PROC=y
961CONFIG_RTC_INTF_DEV=y
962# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
963# CONFIG_RTC_DRV_TEST is not set
964
965#
966# I2C RTC drivers
967#
968# CONFIG_RTC_DRV_DS1307 is not set
969# CONFIG_RTC_DRV_DS1374 is not set
970# CONFIG_RTC_DRV_DS1672 is not set
971# CONFIG_RTC_DRV_MAX6900 is not set
972# CONFIG_RTC_DRV_RS5C372 is not set
973# CONFIG_RTC_DRV_ISL1208 is not set
974# CONFIG_RTC_DRV_X1205 is not set
975# CONFIG_RTC_DRV_PCF8563 is not set
976# CONFIG_RTC_DRV_PCF8583 is not set
977# CONFIG_RTC_DRV_M41T80 is not set
978# CONFIG_RTC_DRV_S35390A is not set
979# CONFIG_RTC_DRV_FM3130 is not set
980# CONFIG_RTC_DRV_RX8581 is not set
981# CONFIG_RTC_DRV_RX8025 is not set
982
983#
984# SPI RTC drivers
985#
986# CONFIG_RTC_DRV_M41T94 is not set
987# CONFIG_RTC_DRV_DS1305 is not set
988# CONFIG_RTC_DRV_DS1390 is not set
989# CONFIG_RTC_DRV_MAX6902 is not set
990# CONFIG_RTC_DRV_R9701 is not set
991# CONFIG_RTC_DRV_RS5C348 is not set
992# CONFIG_RTC_DRV_DS3234 is not set
993# CONFIG_RTC_DRV_PCF2123 is not set
994
995#
996# Platform RTC drivers
997#
998# CONFIG_RTC_DRV_DS1286 is not set
999# CONFIG_RTC_DRV_DS1511 is not set
1000# CONFIG_RTC_DRV_DS1553 is not set
1001# CONFIG_RTC_DRV_DS1742 is not set
1002# CONFIG_RTC_DRV_STK17TA8 is not set
1003# CONFIG_RTC_DRV_M48T86 is not set
1004# CONFIG_RTC_DRV_M48T35 is not set
1005# CONFIG_RTC_DRV_M48T59 is not set
1006# CONFIG_RTC_DRV_BQ4802 is not set
1007# CONFIG_RTC_DRV_V3020 is not set
1008
1009#
1010# on-CPU RTC drivers
1011#
1012CONFIG_RTC_DRV_AT32AP700X=y
1013CONFIG_DMADEVICES=y
1014
1015#
1016# DMA Devices
1017#
1018CONFIG_DW_DMAC=y
1019CONFIG_DMA_ENGINE=y
1020
1021#
1022# DMA Clients
1023#
1024# CONFIG_NET_DMA is not set
1025# CONFIG_ASYNC_TX_DMA is not set
1026# CONFIG_DMATEST is not set
882# CONFIG_AUXDISPLAY is not set 1027# CONFIG_AUXDISPLAY is not set
883# CONFIG_REGULATOR is not set
884# CONFIG_UIO is not set 1028# CONFIG_UIO is not set
1029
1030#
1031# TI VLYNQ
1032#
885# CONFIG_STAGING is not set 1033# CONFIG_STAGING is not set
886 1034
887# 1035#
@@ -892,31 +1040,28 @@ CONFIG_EXT2_FS=y
892# CONFIG_EXT2_FS_XIP is not set 1040# CONFIG_EXT2_FS_XIP is not set
893CONFIG_EXT3_FS=y 1041CONFIG_EXT3_FS=y
894# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 1042# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
895CONFIG_EXT3_FS_XATTR=y 1043# CONFIG_EXT3_FS_XATTR is not set
896# CONFIG_EXT3_FS_POSIX_ACL is not set
897# CONFIG_EXT3_FS_SECURITY is not set
898# CONFIG_EXT4_FS is not set 1044# CONFIG_EXT4_FS is not set
899CONFIG_JBD=y 1045CONFIG_JBD=y
900# CONFIG_JBD_DEBUG is not set 1046# CONFIG_JBD_DEBUG is not set
901CONFIG_FS_MBCACHE=y
902# CONFIG_REISERFS_FS is not set 1047# CONFIG_REISERFS_FS is not set
903# CONFIG_JFS_FS is not set 1048# CONFIG_JFS_FS is not set
904# CONFIG_FS_POSIX_ACL is not set 1049# CONFIG_FS_POSIX_ACL is not set
905CONFIG_FILE_LOCKING=y 1050# CONFIG_XFS_FS is not set
906CONFIG_XFS_FS=m 1051# CONFIG_GFS2_FS is not set
907# CONFIG_XFS_QUOTA is not set
908# CONFIG_XFS_POSIX_ACL is not set
909# CONFIG_XFS_RT is not set
910# CONFIG_XFS_DEBUG is not set
911# CONFIG_OCFS2_FS is not set 1052# CONFIG_OCFS2_FS is not set
912# CONFIG_BTRFS_FS is not set 1053# CONFIG_BTRFS_FS is not set
913CONFIG_DNOTIFY=y 1054# CONFIG_NILFS2_FS is not set
1055CONFIG_FILE_LOCKING=y
1056CONFIG_FSNOTIFY=y
1057# CONFIG_DNOTIFY is not set
914CONFIG_INOTIFY=y 1058CONFIG_INOTIFY=y
915CONFIG_INOTIFY_USER=y 1059CONFIG_INOTIFY_USER=y
916# CONFIG_QUOTA is not set 1060# CONFIG_QUOTA is not set
917# CONFIG_AUTOFS_FS is not set 1061# CONFIG_AUTOFS_FS is not set
918CONFIG_AUTOFS4_FS=m 1062# CONFIG_AUTOFS4_FS is not set
919# CONFIG_FUSE_FS is not set 1063CONFIG_FUSE_FS=m
1064# CONFIG_CUSE is not set
920 1065
921# 1066#
922# Caches 1067# Caches
@@ -932,10 +1077,10 @@ CONFIG_AUTOFS4_FS=m
932# 1077#
933# DOS/FAT/NT Filesystems 1078# DOS/FAT/NT Filesystems
934# 1079#
935CONFIG_FAT_FS=y 1080CONFIG_FAT_FS=m
936CONFIG_MSDOS_FS=y 1081CONFIG_MSDOS_FS=m
937CONFIG_VFAT_FS=y 1082CONFIG_VFAT_FS=m
938CONFIG_FAT_DEFAULT_CODEPAGE=437 1083CONFIG_FAT_DEFAULT_CODEPAGE=850
939CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 1084CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
940# CONFIG_NTFS_FS is not set 1085# CONFIG_NTFS_FS is not set
941 1086
@@ -943,13 +1088,14 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
943# Pseudo filesystems 1088# Pseudo filesystems
944# 1089#
945CONFIG_PROC_FS=y 1090CONFIG_PROC_FS=y
1091# CONFIG_PROC_KCORE is not set
946CONFIG_PROC_SYSCTL=y 1092CONFIG_PROC_SYSCTL=y
947CONFIG_PROC_PAGE_MONITOR=y 1093CONFIG_PROC_PAGE_MONITOR=y
948CONFIG_SYSFS=y 1094CONFIG_SYSFS=y
949CONFIG_TMPFS=y 1095CONFIG_TMPFS=y
950# CONFIG_TMPFS_POSIX_ACL is not set 1096# CONFIG_TMPFS_POSIX_ACL is not set
951# CONFIG_HUGETLB_PAGE is not set 1097# CONFIG_HUGETLB_PAGE is not set
952# CONFIG_CONFIGFS_FS is not set 1098CONFIG_CONFIGFS_FS=m
953CONFIG_MISC_FILESYSTEMS=y 1099CONFIG_MISC_FILESYSTEMS=y
954# CONFIG_ADFS_FS is not set 1100# CONFIG_ADFS_FS is not set
955# CONFIG_AFFS_FS is not set 1101# CONFIG_AFFS_FS is not set
@@ -958,17 +1104,30 @@ CONFIG_MISC_FILESYSTEMS=y
958# CONFIG_BEFS_FS is not set 1104# CONFIG_BEFS_FS is not set
959# CONFIG_BFS_FS is not set 1105# CONFIG_BFS_FS is not set
960# CONFIG_EFS_FS is not set 1106# CONFIG_EFS_FS is not set
961CONFIG_CRAMFS=y 1107CONFIG_JFFS2_FS=y
1108CONFIG_JFFS2_FS_DEBUG=0
1109CONFIG_JFFS2_FS_WRITEBUFFER=y
1110# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1111# CONFIG_JFFS2_SUMMARY is not set
1112# CONFIG_JFFS2_FS_XATTR is not set
1113# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1114CONFIG_JFFS2_ZLIB=y
1115# CONFIG_JFFS2_LZO is not set
1116CONFIG_JFFS2_RTIME=y
1117# CONFIG_JFFS2_RUBIN is not set
1118# CONFIG_UBIFS_FS is not set
1119# CONFIG_CRAMFS is not set
962# CONFIG_SQUASHFS is not set 1120# CONFIG_SQUASHFS is not set
963# CONFIG_VXFS_FS is not set 1121# CONFIG_VXFS_FS is not set
964CONFIG_MINIX_FS=m 1122# CONFIG_MINIX_FS is not set
965# CONFIG_OMFS_FS is not set 1123# CONFIG_OMFS_FS is not set
966# CONFIG_HPFS_FS is not set 1124# CONFIG_HPFS_FS is not set
967# CONFIG_QNX4FS_FS is not set 1125# CONFIG_QNX4FS_FS is not set
968# CONFIG_ROMFS_FS is not set 1126# CONFIG_ROMFS_FS is not set
969# CONFIG_SYSV_FS is not set 1127# CONFIG_SYSV_FS is not set
970# CONFIG_UFS_FS is not set 1128CONFIG_UFS_FS=y
971# CONFIG_NILFS2_FS is not set 1129# CONFIG_UFS_FS_WRITE is not set
1130# CONFIG_UFS_DEBUG is not set
972CONFIG_NETWORK_FILESYSTEMS=y 1131CONFIG_NETWORK_FILESYSTEMS=y
973CONFIG_NFS_FS=y 1132CONFIG_NFS_FS=y
974CONFIG_NFS_V3=y 1133CONFIG_NFS_V3=y
@@ -988,7 +1147,12 @@ CONFIG_SUNRPC=y
988# CONFIG_RPCSEC_GSS_SPKM3 is not set 1147# CONFIG_RPCSEC_GSS_SPKM3 is not set
989CONFIG_SMB_FS=m 1148CONFIG_SMB_FS=m
990# CONFIG_SMB_NLS_DEFAULT is not set 1149# CONFIG_SMB_NLS_DEFAULT is not set
991# CONFIG_CIFS is not set 1150CONFIG_CIFS=m
1151# CONFIG_CIFS_STATS is not set
1152# CONFIG_CIFS_WEAK_PW_HASH is not set
1153# CONFIG_CIFS_XATTR is not set
1154# CONFIG_CIFS_DEBUG2 is not set
1155# CONFIG_CIFS_EXPERIMENTAL is not set
992# CONFIG_NCP_FS is not set 1156# CONFIG_NCP_FS is not set
993# CONFIG_CODA_FS is not set 1157# CONFIG_CODA_FS is not set
994# CONFIG_AFS_FS is not set 1158# CONFIG_AFS_FS is not set
@@ -996,30 +1160,14 @@ CONFIG_SMB_FS=m
996# 1160#
997# Partition Types 1161# Partition Types
998# 1162#
999CONFIG_PARTITION_ADVANCED=y 1163# CONFIG_PARTITION_ADVANCED is not set
1000# CONFIG_ACORN_PARTITION is not set
1001# CONFIG_OSF_PARTITION is not set
1002# CONFIG_AMIGA_PARTITION is not set
1003# CONFIG_ATARI_PARTITION is not set
1004# CONFIG_MAC_PARTITION is not set
1005CONFIG_MSDOS_PARTITION=y 1164CONFIG_MSDOS_PARTITION=y
1006# CONFIG_BSD_DISKLABEL is not set 1165CONFIG_NLS=m
1007# CONFIG_MINIX_SUBPARTITION is not set
1008# CONFIG_SOLARIS_X86_PARTITION is not set
1009# CONFIG_UNIXWARE_DISKLABEL is not set
1010# CONFIG_LDM_PARTITION is not set
1011# CONFIG_SGI_PARTITION is not set
1012# CONFIG_ULTRIX_PARTITION is not set
1013# CONFIG_SUN_PARTITION is not set
1014# CONFIG_KARMA_PARTITION is not set
1015# CONFIG_EFI_PARTITION is not set
1016# CONFIG_SYSV68_PARTITION is not set
1017CONFIG_NLS=y
1018CONFIG_NLS_DEFAULT="iso8859-1" 1166CONFIG_NLS_DEFAULT="iso8859-1"
1019CONFIG_NLS_CODEPAGE_437=y 1167CONFIG_NLS_CODEPAGE_437=m
1020# CONFIG_NLS_CODEPAGE_737 is not set 1168# CONFIG_NLS_CODEPAGE_737 is not set
1021# CONFIG_NLS_CODEPAGE_775 is not set 1169# CONFIG_NLS_CODEPAGE_775 is not set
1022# CONFIG_NLS_CODEPAGE_850 is not set 1170CONFIG_NLS_CODEPAGE_850=m
1023# CONFIG_NLS_CODEPAGE_852 is not set 1171# CONFIG_NLS_CODEPAGE_852 is not set
1024# CONFIG_NLS_CODEPAGE_855 is not set 1172# CONFIG_NLS_CODEPAGE_855 is not set
1025# CONFIG_NLS_CODEPAGE_857 is not set 1173# CONFIG_NLS_CODEPAGE_857 is not set
@@ -1039,8 +1187,8 @@ CONFIG_NLS_CODEPAGE_437=y
1039# CONFIG_NLS_ISO8859_8 is not set 1187# CONFIG_NLS_ISO8859_8 is not set
1040# CONFIG_NLS_CODEPAGE_1250 is not set 1188# CONFIG_NLS_CODEPAGE_1250 is not set
1041# CONFIG_NLS_CODEPAGE_1251 is not set 1189# CONFIG_NLS_CODEPAGE_1251 is not set
1042CONFIG_NLS_ASCII=m 1190# CONFIG_NLS_ASCII is not set
1043CONFIG_NLS_ISO8859_1=y 1191CONFIG_NLS_ISO8859_1=m
1044# CONFIG_NLS_ISO8859_2 is not set 1192# CONFIG_NLS_ISO8859_2 is not set
1045# CONFIG_NLS_ISO8859_3 is not set 1193# CONFIG_NLS_ISO8859_3 is not set
1046# CONFIG_NLS_ISO8859_4 is not set 1194# CONFIG_NLS_ISO8859_4 is not set
@@ -1063,7 +1211,8 @@ CONFIG_NLS_UTF8=m
1063CONFIG_ENABLE_WARN_DEPRECATED=y 1211CONFIG_ENABLE_WARN_DEPRECATED=y
1064CONFIG_ENABLE_MUST_CHECK=y 1212CONFIG_ENABLE_MUST_CHECK=y
1065CONFIG_FRAME_WARN=1024 1213CONFIG_FRAME_WARN=1024
1066# CONFIG_MAGIC_SYSRQ is not set 1214CONFIG_MAGIC_SYSRQ=y
1215# CONFIG_STRIP_ASM_SYMS is not set
1067# CONFIG_UNUSED_SYMBOLS is not set 1216# CONFIG_UNUSED_SYMBOLS is not set
1068CONFIG_DEBUG_FS=y 1217CONFIG_DEBUG_FS=y
1069# CONFIG_HEADERS_CHECK is not set 1218# CONFIG_HEADERS_CHECK is not set
@@ -1077,21 +1226,20 @@ CONFIG_DETECT_HUNG_TASK=y
1077CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 1226CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1078CONFIG_SCHED_DEBUG=y 1227CONFIG_SCHED_DEBUG=y
1079# CONFIG_SCHEDSTATS is not set 1228# CONFIG_SCHEDSTATS is not set
1080CONFIG_TIMER_STATS=y 1229# CONFIG_TIMER_STATS is not set
1081# CONFIG_DEBUG_OBJECTS is not set 1230# CONFIG_DEBUG_OBJECTS is not set
1082# CONFIG_SLUB_DEBUG_ON is not set 1231# CONFIG_SLUB_DEBUG_ON is not set
1083# CONFIG_SLUB_STATS is not set 1232# CONFIG_SLUB_STATS is not set
1084CONFIG_DEBUG_PREEMPT=y 1233# CONFIG_DEBUG_RT_MUTEXES is not set
1085CONFIG_DEBUG_RT_MUTEXES=y
1086CONFIG_DEBUG_PI_LIST=y
1087# CONFIG_RT_MUTEX_TESTER is not set 1234# CONFIG_RT_MUTEX_TESTER is not set
1088# CONFIG_DEBUG_SPINLOCK is not set 1235# CONFIG_DEBUG_SPINLOCK is not set
1089CONFIG_DEBUG_MUTEXES=y 1236# CONFIG_DEBUG_MUTEXES is not set
1090# CONFIG_DEBUG_LOCK_ALLOC is not set 1237# CONFIG_DEBUG_LOCK_ALLOC is not set
1091# CONFIG_PROVE_LOCKING is not set 1238# CONFIG_PROVE_LOCKING is not set
1092# CONFIG_LOCK_STAT is not set 1239# CONFIG_LOCK_STAT is not set
1093# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1240# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1094# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1241# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1242CONFIG_STACKTRACE=y
1095# CONFIG_DEBUG_KOBJECT is not set 1243# CONFIG_DEBUG_KOBJECT is not set
1096CONFIG_DEBUG_BUGVERBOSE=y 1244CONFIG_DEBUG_BUGVERBOSE=y
1097# CONFIG_DEBUG_INFO is not set 1245# CONFIG_DEBUG_INFO is not set
@@ -1101,42 +1249,39 @@ CONFIG_DEBUG_BUGVERBOSE=y
1101# CONFIG_DEBUG_LIST is not set 1249# CONFIG_DEBUG_LIST is not set
1102# CONFIG_DEBUG_SG is not set 1250# CONFIG_DEBUG_SG is not set
1103# CONFIG_DEBUG_NOTIFIERS is not set 1251# CONFIG_DEBUG_NOTIFIERS is not set
1252# CONFIG_DEBUG_CREDENTIALS is not set
1253CONFIG_FRAME_POINTER=y
1104# CONFIG_BOOT_PRINTK_DELAY is not set 1254# CONFIG_BOOT_PRINTK_DELAY is not set
1105# CONFIG_RCU_TORTURE_TEST is not set 1255# CONFIG_RCU_TORTURE_TEST is not set
1106# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1256# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1257# CONFIG_KPROBES_SANITY_TEST is not set
1107# CONFIG_BACKTRACE_SELF_TEST is not set 1258# CONFIG_BACKTRACE_SELF_TEST is not set
1108# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1259# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1260# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1261# CONFIG_LKDTM is not set
1109# CONFIG_FAULT_INJECTION is not set 1262# CONFIG_FAULT_INJECTION is not set
1110# CONFIG_LATENCYTOP is not set
1111# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1112# CONFIG_PAGE_POISONING is not set 1263# CONFIG_PAGE_POISONING is not set
1113CONFIG_HAVE_FUNCTION_TRACER=y 1264CONFIG_NOP_TRACER=y
1265CONFIG_RING_BUFFER=y
1266CONFIG_EVENT_TRACING=y
1267CONFIG_CONTEXT_SWITCH_TRACER=y
1268CONFIG_RING_BUFFER_ALLOW_SWAP=y
1269CONFIG_TRACING=y
1114CONFIG_TRACING_SUPPORT=y 1270CONFIG_TRACING_SUPPORT=y
1115 1271CONFIG_FTRACE=y
1116#
1117# Tracers
1118#
1119# CONFIG_FUNCTION_TRACER is not set
1120# CONFIG_IRQSOFF_TRACER is not set 1272# CONFIG_IRQSOFF_TRACER is not set
1121# CONFIG_PREEMPT_TRACER is not set
1122# CONFIG_SCHED_TRACER is not set 1273# CONFIG_SCHED_TRACER is not set
1123# CONFIG_CONTEXT_SWITCH_TRACER is not set 1274# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1124# CONFIG_EVENT_TRACER is not set
1125# CONFIG_BOOT_TRACER is not set 1275# CONFIG_BOOT_TRACER is not set
1126# CONFIG_TRACE_BRANCH_PROFILING is not set 1276CONFIG_BRANCH_PROFILE_NONE=y
1127# CONFIG_STACK_TRACER is not set 1277# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1278# CONFIG_PROFILE_ALL_BRANCHES is not set
1128# CONFIG_KMEMTRACE is not set 1279# CONFIG_KMEMTRACE is not set
1129# CONFIG_WORKQUEUE_TRACER is not set 1280# CONFIG_WORKQUEUE_TRACER is not set
1130# CONFIG_BLK_DEV_IO_TRACE is not set 1281# CONFIG_BLK_DEV_IO_TRACE is not set
1282# CONFIG_RING_BUFFER_BENCHMARK is not set
1131# CONFIG_DYNAMIC_DEBUG is not set 1283# CONFIG_DYNAMIC_DEBUG is not set
1132# CONFIG_SAMPLES is not set 1284# CONFIG_SAMPLES is not set
1133CONFIG_HAVE_ARCH_KGDB=y
1134# CONFIG_KGDB is not set
1135CONFIG_ARM_UNWIND=y
1136CONFIG_DEBUG_USER=y
1137CONFIG_DEBUG_ERRORS=y
1138# CONFIG_DEBUG_STACK_USAGE is not set
1139# CONFIG_DEBUG_LL is not set
1140 1285
1141# 1286#
1142# Security options 1287# Security options
@@ -1151,12 +1296,24 @@ CONFIG_CRYPTO=y
1151# Crypto core or helper 1296# Crypto core or helper
1152# 1297#
1153# CONFIG_CRYPTO_FIPS is not set 1298# CONFIG_CRYPTO_FIPS is not set
1154# CONFIG_CRYPTO_MANAGER is not set 1299CONFIG_CRYPTO_ALGAPI=y
1155# CONFIG_CRYPTO_MANAGER2 is not set 1300CONFIG_CRYPTO_ALGAPI2=y
1301CONFIG_CRYPTO_AEAD=y
1302CONFIG_CRYPTO_AEAD2=y
1303CONFIG_CRYPTO_BLKCIPHER=y
1304CONFIG_CRYPTO_BLKCIPHER2=y
1305CONFIG_CRYPTO_HASH=y
1306CONFIG_CRYPTO_HASH2=y
1307CONFIG_CRYPTO_RNG=m
1308CONFIG_CRYPTO_RNG2=y
1309CONFIG_CRYPTO_PCOMP=y
1310CONFIG_CRYPTO_MANAGER=y
1311CONFIG_CRYPTO_MANAGER2=y
1156# CONFIG_CRYPTO_GF128MUL is not set 1312# CONFIG_CRYPTO_GF128MUL is not set
1157# CONFIG_CRYPTO_NULL is not set 1313# CONFIG_CRYPTO_NULL is not set
1314CONFIG_CRYPTO_WORKQUEUE=y
1158# CONFIG_CRYPTO_CRYPTD is not set 1315# CONFIG_CRYPTO_CRYPTD is not set
1159# CONFIG_CRYPTO_AUTHENC is not set 1316CONFIG_CRYPTO_AUTHENC=y
1160# CONFIG_CRYPTO_TEST is not set 1317# CONFIG_CRYPTO_TEST is not set
1161 1318
1162# 1319#
@@ -1169,32 +1326,34 @@ CONFIG_CRYPTO=y
1169# 1326#
1170# Block modes 1327# Block modes
1171# 1328#
1172# CONFIG_CRYPTO_CBC is not set 1329CONFIG_CRYPTO_CBC=y
1173# CONFIG_CRYPTO_CTR is not set 1330# CONFIG_CRYPTO_CTR is not set
1174# CONFIG_CRYPTO_CTS is not set 1331# CONFIG_CRYPTO_CTS is not set
1175# CONFIG_CRYPTO_ECB is not set 1332CONFIG_CRYPTO_ECB=m
1176# CONFIG_CRYPTO_LRW is not set 1333# CONFIG_CRYPTO_LRW is not set
1177# CONFIG_CRYPTO_PCBC is not set 1334CONFIG_CRYPTO_PCBC=m
1178# CONFIG_CRYPTO_XTS is not set 1335# CONFIG_CRYPTO_XTS is not set
1179 1336
1180# 1337#
1181# Hash modes 1338# Hash modes
1182# 1339#
1183# CONFIG_CRYPTO_HMAC is not set 1340CONFIG_CRYPTO_HMAC=y
1184# CONFIG_CRYPTO_XCBC is not set 1341# CONFIG_CRYPTO_XCBC is not set
1342# CONFIG_CRYPTO_VMAC is not set
1185 1343
1186# 1344#
1187# Digest 1345# Digest
1188# 1346#
1189# CONFIG_CRYPTO_CRC32C is not set 1347# CONFIG_CRYPTO_CRC32C is not set
1348# CONFIG_CRYPTO_GHASH is not set
1190# CONFIG_CRYPTO_MD4 is not set 1349# CONFIG_CRYPTO_MD4 is not set
1191# CONFIG_CRYPTO_MD5 is not set 1350CONFIG_CRYPTO_MD5=y
1192# CONFIG_CRYPTO_MICHAEL_MIC is not set 1351# CONFIG_CRYPTO_MICHAEL_MIC is not set
1193# CONFIG_CRYPTO_RMD128 is not set 1352# CONFIG_CRYPTO_RMD128 is not set
1194# CONFIG_CRYPTO_RMD160 is not set 1353# CONFIG_CRYPTO_RMD160 is not set
1195# CONFIG_CRYPTO_RMD256 is not set 1354# CONFIG_CRYPTO_RMD256 is not set
1196# CONFIG_CRYPTO_RMD320 is not set 1355# CONFIG_CRYPTO_RMD320 is not set
1197# CONFIG_CRYPTO_SHA1 is not set 1356CONFIG_CRYPTO_SHA1=y
1198# CONFIG_CRYPTO_SHA256 is not set 1357# CONFIG_CRYPTO_SHA256 is not set
1199# CONFIG_CRYPTO_SHA512 is not set 1358# CONFIG_CRYPTO_SHA512 is not set
1200# CONFIG_CRYPTO_TGR192 is not set 1359# CONFIG_CRYPTO_TGR192 is not set
@@ -1203,14 +1362,14 @@ CONFIG_CRYPTO=y
1203# 1362#
1204# Ciphers 1363# Ciphers
1205# 1364#
1206# CONFIG_CRYPTO_AES is not set 1365CONFIG_CRYPTO_AES=m
1207# CONFIG_CRYPTO_ANUBIS is not set 1366# CONFIG_CRYPTO_ANUBIS is not set
1208# CONFIG_CRYPTO_ARC4 is not set 1367CONFIG_CRYPTO_ARC4=m
1209# CONFIG_CRYPTO_BLOWFISH is not set 1368# CONFIG_CRYPTO_BLOWFISH is not set
1210# CONFIG_CRYPTO_CAMELLIA is not set 1369# CONFIG_CRYPTO_CAMELLIA is not set
1211# CONFIG_CRYPTO_CAST5 is not set 1370# CONFIG_CRYPTO_CAST5 is not set
1212# CONFIG_CRYPTO_CAST6 is not set 1371# CONFIG_CRYPTO_CAST6 is not set
1213# CONFIG_CRYPTO_DES is not set 1372CONFIG_CRYPTO_DES=y
1214# CONFIG_CRYPTO_FCRYPT is not set 1373# CONFIG_CRYPTO_FCRYPT is not set
1215# CONFIG_CRYPTO_KHAZAD is not set 1374# CONFIG_CRYPTO_KHAZAD is not set
1216# CONFIG_CRYPTO_SALSA20 is not set 1375# CONFIG_CRYPTO_SALSA20 is not set
@@ -1222,16 +1381,16 @@ CONFIG_CRYPTO=y
1222# 1381#
1223# Compression 1382# Compression
1224# 1383#
1225# CONFIG_CRYPTO_DEFLATE is not set 1384CONFIG_CRYPTO_DEFLATE=y
1226# CONFIG_CRYPTO_ZLIB is not set 1385# CONFIG_CRYPTO_ZLIB is not set
1227# CONFIG_CRYPTO_LZO is not set 1386# CONFIG_CRYPTO_LZO is not set
1228 1387
1229# 1388#
1230# Random Number Generation 1389# Random Number Generation
1231# 1390#
1232# CONFIG_CRYPTO_ANSI_CPRNG is not set 1391CONFIG_CRYPTO_ANSI_CPRNG=m
1233# CONFIG_CRYPTO_HW is not set 1392CONFIG_CRYPTO_HW=y
1234# CONFIG_BINARY_PRINTF is not set 1393CONFIG_BINARY_PRINTF=y
1235 1394
1236# 1395#
1237# Library routines 1396# Library routines
@@ -1240,12 +1399,13 @@ CONFIG_BITREVERSE=y
1240CONFIG_GENERIC_FIND_LAST_BIT=y 1399CONFIG_GENERIC_FIND_LAST_BIT=y
1241CONFIG_CRC_CCITT=m 1400CONFIG_CRC_CCITT=m
1242# CONFIG_CRC16 is not set 1401# CONFIG_CRC16 is not set
1243CONFIG_CRC_T10DIF=m 1402# CONFIG_CRC_T10DIF is not set
1244# CONFIG_CRC_ITU_T is not set 1403CONFIG_CRC_ITU_T=m
1245CONFIG_CRC32=y 1404CONFIG_CRC32=y
1246# CONFIG_CRC7 is not set 1405CONFIG_CRC7=m
1247# CONFIG_LIBCRC32C is not set 1406# CONFIG_LIBCRC32C is not set
1248CONFIG_ZLIB_INFLATE=y 1407CONFIG_ZLIB_INFLATE=y
1408CONFIG_ZLIB_DEFLATE=y
1249CONFIG_DECOMPRESS_GZIP=y 1409CONFIG_DECOMPRESS_GZIP=y
1250CONFIG_GENERIC_ALLOCATOR=y 1410CONFIG_GENERIC_ALLOCATOR=y
1251CONFIG_HAS_IOMEM=y 1411CONFIG_HAS_IOMEM=y
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
new file mode 100644
index 000000000000..01e913d66be4
--- /dev/null
+++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig
@@ -0,0 +1,1549 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc5
4# Thu Nov 5 15:33:09 2009
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"
24CONFIG_CONSTRUCTORS=y
25
26#
27# General setup
28#
29CONFIG_EXPERIMENTAL=y
30CONFIG_BROKEN_ON_SMP=y
31CONFIG_INIT_ENV_ARG_LIMIT=32
32CONFIG_LOCALVERSION=""
33# CONFIG_LOCALVERSION_AUTO is not set
34CONFIG_SWAP=y
35CONFIG_SYSVIPC=y
36CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
39CONFIG_BSD_PROCESS_ACCT=y
40CONFIG_BSD_PROCESS_ACCT_V3=y
41# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_TREE_RCU=y
48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_IKCONFIG is not set
54CONFIG_LOG_BUF_SHIFT=14
55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y
59# CONFIG_RELAY is not set
60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
69CONFIG_EMBEDDED=y
70# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_ALL is not set
73# CONFIG_KALLSYMS_EXTRA_PASS is not set
74CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y
76CONFIG_BUG=y
77CONFIG_ELF_CORE=y
78# CONFIG_BASE_FULL is not set
79CONFIG_FUTEX=y
80CONFIG_EPOLL=y
81CONFIG_SIGNALFD=y
82CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y
85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_SLUB_DEBUG=y
92# CONFIG_COMPAT_BRK is not set
93# CONFIG_SLAB is not set
94CONFIG_SLUB=y
95# CONFIG_SLOB is not set
96CONFIG_PROFILING=y
97CONFIG_TRACEPOINTS=y
98CONFIG_OPROFILE=m
99CONFIG_HAVE_OPROFILE=y
100CONFIG_KPROBES=y
101CONFIG_HAVE_KPROBES=y
102CONFIG_HAVE_CLK=y
103
104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
110CONFIG_SLABINFO=y
111CONFIG_RT_MUTEXES=y
112CONFIG_BASE_SMALL=1
113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
115CONFIG_MODULE_UNLOAD=y
116CONFIG_MODULE_FORCE_UNLOAD=y
117# CONFIG_MODVERSIONS is not set
118# CONFIG_MODULE_SRCVERSION_ALL is not set
119CONFIG_BLOCK=y
120CONFIG_LBDAF=y
121# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set
123
124#
125# IO Schedulers
126#
127CONFIG_IOSCHED_NOOP=y
128# CONFIG_IOSCHED_AS is not set
129# CONFIG_IOSCHED_DEADLINE is not set
130CONFIG_IOSCHED_CFQ=y
131# CONFIG_DEFAULT_AS is not set
132# CONFIG_DEFAULT_DEADLINE is not set
133CONFIG_DEFAULT_CFQ=y
134# CONFIG_DEFAULT_NOOP is not set
135CONFIG_DEFAULT_IOSCHED="cfq"
136CONFIG_FREEZER=y
137
138#
139# System Type and features
140#
141CONFIG_TICK_ONESHOT=y
142CONFIG_NO_HZ=y
143CONFIG_HIGH_RES_TIMERS=y
144CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
145CONFIG_SUBARCH_AVR32B=y
146CONFIG_MMU=y
147CONFIG_PERFORMANCE_COUNTERS=y
148CONFIG_PLATFORM_AT32AP=y
149CONFIG_CPU_AT32AP700X=y
150CONFIG_CPU_AT32AP7000=y
151CONFIG_BOARD_ATNGW100_COMMON=y
152# CONFIG_BOARD_ATSTK1000 is not set
153# CONFIG_BOARD_ATNGW100_MKI is not set
154CONFIG_BOARD_ATNGW100_MKII=y
155# CONFIG_BOARD_HAMMERHEAD is not set
156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159CONFIG_BOARD_ATNGW100_MKII_LCD=y
160# CONFIG_BOARD_ATNGW100_ADDON_NONE is not set
161CONFIG_BOARD_ATNGW100_EVKLCD10X=y
162# CONFIG_BOARD_ATNGW100_MRMT is not set
163CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA=y
164# CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA is not set
165# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set
166CONFIG_LOADER_U_BOOT=y
167
168#
169# Atmel AVR32 AP options
170#
171# CONFIG_AP700X_32_BIT_SMC is not set
172CONFIG_AP700X_16_BIT_SMC=y
173# CONFIG_AP700X_8_BIT_SMC is not set
174CONFIG_LOAD_ADDRESS=0x10000000
175CONFIG_ENTRY_ADDRESS=0x90000000
176CONFIG_PHYS_OFFSET=0x10000000
177CONFIG_PREEMPT_NONE=y
178# CONFIG_PREEMPT_VOLUNTARY is not set
179# CONFIG_PREEMPT is not set
180CONFIG_QUICKLIST=y
181# CONFIG_HAVE_ARCH_BOOTMEM is not set
182# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
183# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
184CONFIG_ARCH_FLATMEM_ENABLE=y
185# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
186# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
187CONFIG_SELECT_MEMORY_MODEL=y
188CONFIG_FLATMEM_MANUAL=y
189# CONFIG_DISCONTIGMEM_MANUAL is not set
190# CONFIG_SPARSEMEM_MANUAL is not set
191CONFIG_FLATMEM=y
192CONFIG_FLAT_NODE_MEM_MAP=y
193CONFIG_PAGEFLAGS_EXTENDED=y
194CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_PHYS_ADDR_T_64BIT is not set
196CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2
198CONFIG_VIRT_TO_BUS=y
199CONFIG_HAVE_MLOCK=y
200CONFIG_HAVE_MLOCKED_PAGE_BIT=y
201# CONFIG_KSM is not set
202CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
203# CONFIG_OWNERSHIP_TRACE is not set
204CONFIG_NMI_DEBUGGING=y
205# CONFIG_HZ_100 is not set
206CONFIG_HZ_250=y
207# CONFIG_HZ_300 is not set
208# CONFIG_HZ_1000 is not set
209CONFIG_HZ=250
210CONFIG_SCHED_HRTICK=y
211CONFIG_CMDLINE=""
212
213#
214# Power management options
215#
216CONFIG_PM=y
217# CONFIG_PM_DEBUG is not set
218CONFIG_PM_SLEEP=y
219CONFIG_SUSPEND=y
220CONFIG_SUSPEND_FREEZER=y
221# CONFIG_PM_RUNTIME is not set
222CONFIG_ARCH_SUSPEND_POSSIBLE=y
223
224#
225# CPU Frequency scaling
226#
227CONFIG_CPU_FREQ=y
228CONFIG_CPU_FREQ_TABLE=y
229# CONFIG_CPU_FREQ_DEBUG is not set
230# CONFIG_CPU_FREQ_STAT is not set
231# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
232# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
233# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
234CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
235# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
236CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
237# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
238CONFIG_CPU_FREQ_GOV_USERSPACE=y
239CONFIG_CPU_FREQ_GOV_ONDEMAND=y
240# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
241CONFIG_CPU_FREQ_AT32AP=y
242
243#
244# Bus options
245#
246# CONFIG_ARCH_SUPPORTS_MSI is not set
247# CONFIG_PCCARD is not set
248
249#
250# Executable file formats
251#
252CONFIG_BINFMT_ELF=y
253# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
254# CONFIG_HAVE_AOUT is not set
255# CONFIG_BINFMT_MISC is not set
256CONFIG_NET=y
257
258#
259# Networking options
260#
261CONFIG_PACKET=y
262CONFIG_PACKET_MMAP=y
263CONFIG_UNIX=y
264CONFIG_XFRM=y
265CONFIG_XFRM_USER=y
266# CONFIG_XFRM_SUB_POLICY is not set
267# CONFIG_XFRM_MIGRATE is not set
268# CONFIG_XFRM_STATISTICS is not set
269CONFIG_XFRM_IPCOMP=y
270CONFIG_NET_KEY=y
271# CONFIG_NET_KEY_MIGRATE is not set
272CONFIG_INET=y
273CONFIG_IP_MULTICAST=y
274CONFIG_IP_ADVANCED_ROUTER=y
275CONFIG_ASK_IP_FIB_HASH=y
276# CONFIG_IP_FIB_TRIE is not set
277CONFIG_IP_FIB_HASH=y
278# CONFIG_IP_MULTIPLE_TABLES is not set
279# CONFIG_IP_ROUTE_MULTIPATH is not set
280# CONFIG_IP_ROUTE_VERBOSE is not set
281CONFIG_IP_PNP=y
282CONFIG_IP_PNP_DHCP=y
283# CONFIG_IP_PNP_BOOTP is not set
284# CONFIG_IP_PNP_RARP is not set
285# CONFIG_NET_IPIP is not set
286# CONFIG_NET_IPGRE is not set
287CONFIG_IP_MROUTE=y
288CONFIG_IP_PIMSM_V1=y
289# CONFIG_IP_PIMSM_V2 is not set
290# CONFIG_ARPD is not set
291CONFIG_SYN_COOKIES=y
292CONFIG_INET_AH=y
293CONFIG_INET_ESP=y
294CONFIG_INET_IPCOMP=y
295CONFIG_INET_XFRM_TUNNEL=y
296CONFIG_INET_TUNNEL=y
297CONFIG_INET_XFRM_MODE_TRANSPORT=y
298CONFIG_INET_XFRM_MODE_TUNNEL=y
299CONFIG_INET_XFRM_MODE_BEET=y
300# CONFIG_INET_LRO is not set
301CONFIG_INET_DIAG=y
302CONFIG_INET_TCP_DIAG=y
303# CONFIG_TCP_CONG_ADVANCED is not set
304CONFIG_TCP_CONG_CUBIC=y
305CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_TCP_MD5SIG is not set
307CONFIG_IPV6=y
308# CONFIG_IPV6_PRIVACY is not set
309# CONFIG_IPV6_ROUTER_PREF is not set
310# CONFIG_IPV6_OPTIMISTIC_DAD is not set
311CONFIG_INET6_AH=y
312CONFIG_INET6_ESP=y
313CONFIG_INET6_IPCOMP=y
314# CONFIG_IPV6_MIP6 is not set
315CONFIG_INET6_XFRM_TUNNEL=y
316CONFIG_INET6_TUNNEL=y
317CONFIG_INET6_XFRM_MODE_TRANSPORT=y
318CONFIG_INET6_XFRM_MODE_TUNNEL=y
319CONFIG_INET6_XFRM_MODE_BEET=y
320# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
321CONFIG_IPV6_SIT=y
322CONFIG_IPV6_NDISC_NODETYPE=y
323# CONFIG_IPV6_TUNNEL is not set
324# CONFIG_IPV6_MULTIPLE_TABLES is not set
325# CONFIG_IPV6_MROUTE is not set
326# CONFIG_NETWORK_SECMARK is not set
327CONFIG_NETFILTER=y
328# CONFIG_NETFILTER_DEBUG is not set
329# CONFIG_NETFILTER_ADVANCED is not set
330
331#
332# Core Netfilter Configuration
333#
334CONFIG_NETFILTER_NETLINK=m
335CONFIG_NETFILTER_NETLINK_LOG=m
336CONFIG_NF_CONNTRACK=m
337CONFIG_NF_CONNTRACK_FTP=m
338CONFIG_NF_CONNTRACK_IRC=m
339CONFIG_NF_CONNTRACK_SIP=m
340CONFIG_NF_CT_NETLINK=m
341CONFIG_NETFILTER_XTABLES=y
342CONFIG_NETFILTER_XT_TARGET_MARK=m
343CONFIG_NETFILTER_XT_TARGET_NFLOG=m
344CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
345CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
346CONFIG_NETFILTER_XT_MATCH_MARK=m
347CONFIG_NETFILTER_XT_MATCH_POLICY=m
348CONFIG_NETFILTER_XT_MATCH_STATE=m
349# CONFIG_IP_VS is not set
350
351#
352# IP: Netfilter Configuration
353#
354CONFIG_NF_DEFRAG_IPV4=m
355CONFIG_NF_CONNTRACK_IPV4=m
356CONFIG_NF_CONNTRACK_PROC_COMPAT=y
357CONFIG_IP_NF_IPTABLES=m
358CONFIG_IP_NF_FILTER=m
359CONFIG_IP_NF_TARGET_REJECT=m
360CONFIG_IP_NF_TARGET_LOG=m
361# CONFIG_IP_NF_TARGET_ULOG is not set
362CONFIG_NF_NAT=m
363CONFIG_NF_NAT_NEEDED=y
364CONFIG_IP_NF_TARGET_MASQUERADE=m
365CONFIG_NF_NAT_FTP=m
366CONFIG_NF_NAT_IRC=m
367# CONFIG_NF_NAT_TFTP is not set
368# CONFIG_NF_NAT_AMANDA is not set
369# CONFIG_NF_NAT_PPTP is not set
370# CONFIG_NF_NAT_H323 is not set
371CONFIG_NF_NAT_SIP=m
372CONFIG_IP_NF_MANGLE=m
373
374#
375# IPv6: Netfilter Configuration
376#
377CONFIG_NF_CONNTRACK_IPV6=m
378CONFIG_IP6_NF_IPTABLES=m
379CONFIG_IP6_NF_MATCH_IPV6HEADER=m
380CONFIG_IP6_NF_TARGET_LOG=m
381CONFIG_IP6_NF_FILTER=m
382CONFIG_IP6_NF_TARGET_REJECT=m
383CONFIG_IP6_NF_MANGLE=m
384# CONFIG_IP_DCCP is not set
385# CONFIG_IP_SCTP is not set
386# CONFIG_RDS is not set
387# CONFIG_TIPC is not set
388# CONFIG_ATM is not set
389CONFIG_STP=m
390CONFIG_BRIDGE=m
391# CONFIG_NET_DSA is not set
392CONFIG_VLAN_8021Q=m
393# CONFIG_VLAN_8021Q_GVRP is not set
394# CONFIG_DECNET is not set
395CONFIG_LLC=m
396# CONFIG_LLC2 is not set
397# CONFIG_IPX is not set
398# CONFIG_ATALK is not set
399# CONFIG_X25 is not set
400# CONFIG_LAPB is not set
401# CONFIG_ECONET is not set
402# CONFIG_WAN_ROUTER is not set
403# CONFIG_PHONET is not set
404# CONFIG_IEEE802154 is not set
405# CONFIG_NET_SCHED is not set
406# CONFIG_DCB is not set
407
408#
409# Network testing
410#
411# CONFIG_NET_PKTGEN is not set
412# CONFIG_NET_TCPPROBE is not set
413# CONFIG_NET_DROP_MONITOR is not set
414# CONFIG_HAMRADIO is not set
415# CONFIG_CAN is not set
416# CONFIG_IRDA is not set
417# CONFIG_BT is not set
418# CONFIG_AF_RXRPC is not set
419CONFIG_WIRELESS=y
420# CONFIG_CFG80211 is not set
421CONFIG_CFG80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIRELESS_OLD_REGULATORY is not set
423# CONFIG_WIRELESS_EXT is not set
424# CONFIG_LIB80211 is not set
425
426#
427# CFG80211 needs to be enabled for MAC80211
428#
429# CONFIG_WIMAX is not set
430# CONFIG_RFKILL is not set
431# CONFIG_NET_9P is not set
432
433#
434# Device Drivers
435#
436
437#
438# Generic Driver Options
439#
440CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
441# CONFIG_DEVTMPFS is not set
442CONFIG_STANDALONE=y
443# CONFIG_PREVENT_FIRMWARE_BUILD is not set
444# CONFIG_FW_LOADER is not set
445# CONFIG_DEBUG_DRIVER is not set
446# CONFIG_DEBUG_DEVRES is not set
447# CONFIG_SYS_HYPERVISOR is not set
448# CONFIG_CONNECTOR is not set
449CONFIG_MTD=y
450# CONFIG_MTD_DEBUG is not set
451# CONFIG_MTD_TESTS is not set
452# CONFIG_MTD_CONCAT is not set
453CONFIG_MTD_PARTITIONS=y
454# CONFIG_MTD_REDBOOT_PARTS is not set
455CONFIG_MTD_CMDLINE_PARTS=y
456# CONFIG_MTD_AR7_PARTS is not set
457
458#
459# User Modules And Translation Layers
460#
461CONFIG_MTD_CHAR=y
462CONFIG_MTD_BLKDEVS=y
463CONFIG_MTD_BLOCK=y
464# CONFIG_FTL is not set
465# CONFIG_NFTL is not set
466# CONFIG_INFTL is not set
467# CONFIG_RFD_FTL is not set
468# CONFIG_SSFDC is not set
469# CONFIG_MTD_OOPS is not set
470
471#
472# RAM/ROM/Flash chip drivers
473#
474CONFIG_MTD_CFI=y
475# CONFIG_MTD_JEDECPROBE is not set
476CONFIG_MTD_GEN_PROBE=y
477# CONFIG_MTD_CFI_ADV_OPTIONS is not set
478CONFIG_MTD_MAP_BANK_WIDTH_1=y
479CONFIG_MTD_MAP_BANK_WIDTH_2=y
480CONFIG_MTD_MAP_BANK_WIDTH_4=y
481# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
482# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
483# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
484CONFIG_MTD_CFI_I1=y
485CONFIG_MTD_CFI_I2=y
486# CONFIG_MTD_CFI_I4 is not set
487# CONFIG_MTD_CFI_I8 is not set
488CONFIG_MTD_CFI_INTELEXT=y
489# CONFIG_MTD_CFI_AMDSTD is not set
490# CONFIG_MTD_CFI_STAA is not set
491CONFIG_MTD_CFI_UTIL=y
492# CONFIG_MTD_RAM is not set
493# CONFIG_MTD_ROM is not set
494# CONFIG_MTD_ABSENT is not set
495
496#
497# Mapping drivers for chip access
498#
499# CONFIG_MTD_COMPLEX_MAPPINGS is not set
500CONFIG_MTD_PHYSMAP=y
501# CONFIG_MTD_PHYSMAP_COMPAT is not set
502# CONFIG_MTD_PLATRAM is not set
503
504#
505# Self-contained MTD device drivers
506#
507CONFIG_MTD_DATAFLASH=y
508# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
509# CONFIG_MTD_DATAFLASH_OTP is not set
510# CONFIG_MTD_M25P80 is not set
511# CONFIG_MTD_SST25L is not set
512# CONFIG_MTD_SLRAM is not set
513# CONFIG_MTD_PHRAM is not set
514# CONFIG_MTD_MTDRAM is not set
515# CONFIG_MTD_BLOCK2MTD is not set
516
517#
518# Disk-On-Chip Device Drivers
519#
520# CONFIG_MTD_DOC2000 is not set
521# CONFIG_MTD_DOC2001 is not set
522# CONFIG_MTD_DOC2001PLUS is not set
523CONFIG_MTD_NAND=y
524# CONFIG_MTD_NAND_VERIFY_WRITE is not set
525# CONFIG_MTD_NAND_ECC_SMC is not set
526# CONFIG_MTD_NAND_MUSEUM_IDS is not set
527CONFIG_MTD_NAND_IDS=y
528# CONFIG_MTD_NAND_DISKONCHIP is not set
529CONFIG_MTD_NAND_ATMEL=y
530CONFIG_MTD_NAND_ATMEL_ECC_HW=y
531# CONFIG_MTD_NAND_ATMEL_ECC_SOFT is not set
532# CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set
533# CONFIG_MTD_NAND_NANDSIM is not set
534# CONFIG_MTD_NAND_PLATFORM is not set
535# CONFIG_MTD_ONENAND is not set
536
537#
538# LPDDR flash memory drivers
539#
540# CONFIG_MTD_LPDDR is not set
541
542#
543# UBI - Unsorted block images
544#
545CONFIG_MTD_UBI=y
546CONFIG_MTD_UBI_WL_THRESHOLD=4096
547CONFIG_MTD_UBI_BEB_RESERVE=1
548# CONFIG_MTD_UBI_GLUEBI is not set
549
550#
551# UBI debugging options
552#
553# CONFIG_MTD_UBI_DEBUG is not set
554# CONFIG_PARPORT is not set
555CONFIG_BLK_DEV=y
556# CONFIG_BLK_DEV_COW_COMMON is not set
557CONFIG_BLK_DEV_LOOP=m
558# CONFIG_BLK_DEV_CRYPTOLOOP is not set
559CONFIG_BLK_DEV_NBD=m
560CONFIG_BLK_DEV_RAM=m
561CONFIG_BLK_DEV_RAM_COUNT=16
562CONFIG_BLK_DEV_RAM_SIZE=4096
563# CONFIG_BLK_DEV_XIP is not set
564# CONFIG_CDROM_PKTCDVD is not set
565# CONFIG_ATA_OVER_ETH is not set
566CONFIG_MISC_DEVICES=y
567# CONFIG_ATMEL_PWM is not set
568CONFIG_ATMEL_TCLIB=y
569CONFIG_ATMEL_TCB_CLKSRC=y
570CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
571# CONFIG_ICS932S401 is not set
572# CONFIG_ATMEL_SSC is not set
573# CONFIG_ENCLOSURE_SERVICES is not set
574# CONFIG_ISL29003 is not set
575# CONFIG_C2PORT is not set
576
577#
578# EEPROM support
579#
580# CONFIG_EEPROM_AT24 is not set
581# CONFIG_EEPROM_AT25 is not set
582# CONFIG_EEPROM_LEGACY is not set
583# CONFIG_EEPROM_MAX6875 is not set
584# CONFIG_EEPROM_93CX6 is not set
585
586#
587# SCSI device support
588#
589# CONFIG_RAID_ATTRS is not set
590# CONFIG_SCSI is not set
591# CONFIG_SCSI_DMA is not set
592# CONFIG_SCSI_NETLINK is not set
593# CONFIG_ATA is not set
594# CONFIG_MD is not set
595CONFIG_NETDEVICES=y
596# CONFIG_DUMMY is not set
597# CONFIG_BONDING is not set
598# CONFIG_MACVLAN is not set
599# CONFIG_EQUALIZER is not set
600# CONFIG_TUN is not set
601# CONFIG_VETH is not set
602CONFIG_PHYLIB=y
603
604#
605# MII PHY device drivers
606#
607# CONFIG_MARVELL_PHY is not set
608# CONFIG_DAVICOM_PHY is not set
609# CONFIG_QSEMI_PHY is not set
610# CONFIG_LXT_PHY is not set
611# CONFIG_CICADA_PHY is not set
612# CONFIG_VITESSE_PHY is not set
613# CONFIG_SMSC_PHY is not set
614# CONFIG_BROADCOM_PHY is not set
615# CONFIG_ICPLUS_PHY is not set
616# CONFIG_REALTEK_PHY is not set
617# CONFIG_NATIONAL_PHY is not set
618# CONFIG_STE10XP is not set
619# CONFIG_LSI_ET1011C_PHY is not set
620# CONFIG_FIXED_PHY is not set
621# CONFIG_MDIO_BITBANG is not set
622CONFIG_NET_ETHERNET=y
623# CONFIG_MII is not set
624CONFIG_MACB=y
625# CONFIG_ENC28J60 is not set
626# CONFIG_ETHOC is not set
627# CONFIG_DNET is not set
628# CONFIG_IBM_NEW_EMAC_ZMII is not set
629# CONFIG_IBM_NEW_EMAC_RGMII is not set
630# CONFIG_IBM_NEW_EMAC_TAH is not set
631# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
632# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
633# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
634# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
635# CONFIG_B44 is not set
636# CONFIG_KS8842 is not set
637# CONFIG_KS8851 is not set
638# CONFIG_KS8851_MLL is not set
639# CONFIG_NETDEV_1000 is not set
640# CONFIG_NETDEV_10000 is not set
641CONFIG_WLAN=y
642# CONFIG_WLAN_PRE80211 is not set
643# CONFIG_WLAN_80211 is not set
644
645#
646# Enable WiMAX (Networking options) to see the WiMAX drivers
647#
648# CONFIG_WAN is not set
649CONFIG_PPP=m
650# CONFIG_PPP_MULTILINK is not set
651CONFIG_PPP_FILTER=y
652CONFIG_PPP_ASYNC=m
653# CONFIG_PPP_SYNC_TTY is not set
654CONFIG_PPP_DEFLATE=m
655CONFIG_PPP_BSDCOMP=m
656CONFIG_PPP_MPPE=m
657CONFIG_PPPOE=m
658# CONFIG_PPPOL2TP is not set
659# CONFIG_SLIP is not set
660CONFIG_SLHC=m
661# CONFIG_NETCONSOLE is not set
662# CONFIG_NETPOLL is not set
663# CONFIG_NET_POLL_CONTROLLER is not set
664# CONFIG_ISDN is not set
665# CONFIG_PHONE is not set
666
667#
668# Input device support
669#
670CONFIG_INPUT=y
671# CONFIG_INPUT_FF_MEMLESS is not set
672# CONFIG_INPUT_POLLDEV is not set
673
674#
675# Userland interfaces
676#
677# CONFIG_INPUT_MOUSEDEV is not set
678# CONFIG_INPUT_JOYDEV is not set
679CONFIG_INPUT_EVDEV=m
680# CONFIG_INPUT_EVBUG is not set
681
682#
683# Input Device Drivers
684#
685# CONFIG_INPUT_KEYBOARD is not set
686# CONFIG_INPUT_MOUSE is not set
687# CONFIG_INPUT_JOYSTICK is not set
688# CONFIG_INPUT_TABLET is not set
689CONFIG_INPUT_TOUCHSCREEN=y
690# CONFIG_TOUCHSCREEN_ADS7846 is not set
691# CONFIG_TOUCHSCREEN_AD7877 is not set
692# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
693# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
694# CONFIG_TOUCHSCREEN_AD7879 is not set
695# CONFIG_TOUCHSCREEN_EETI is not set
696# CONFIG_TOUCHSCREEN_FUJITSU is not set
697# CONFIG_TOUCHSCREEN_GUNZE is not set
698# CONFIG_TOUCHSCREEN_ELO is not set
699# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
700# CONFIG_TOUCHSCREEN_MCS5000 is not set
701# CONFIG_TOUCHSCREEN_MTOUCH is not set
702# CONFIG_TOUCHSCREEN_INEXIO is not set
703# CONFIG_TOUCHSCREEN_MK712 is not set
704# CONFIG_TOUCHSCREEN_PENMOUNT is not set
705# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
706# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
707CONFIG_TOUCHSCREEN_WM97XX=m
708CONFIG_TOUCHSCREEN_WM9705=y
709CONFIG_TOUCHSCREEN_WM9712=y
710CONFIG_TOUCHSCREEN_WM9713=y
711# CONFIG_TOUCHSCREEN_WM97XX_ATMEL is not set
712# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
713# CONFIG_TOUCHSCREEN_TSC2007 is not set
714# CONFIG_TOUCHSCREEN_W90X900 is not set
715# CONFIG_INPUT_MISC is not set
716
717#
718# Hardware I/O ports
719#
720# CONFIG_SERIO is not set
721# CONFIG_GAMEPORT is not set
722
723#
724# Character devices
725#
726CONFIG_VT=y
727CONFIG_CONSOLE_TRANSLATIONS=y
728CONFIG_VT_CONSOLE=y
729CONFIG_HW_CONSOLE=y
730# CONFIG_VT_HW_CONSOLE_BINDING is not set
731CONFIG_DEVKMEM=y
732# CONFIG_SERIAL_NONSTANDARD is not set
733
734#
735# Serial drivers
736#
737# CONFIG_SERIAL_8250 is not set
738
739#
740# Non-8250 serial port support
741#
742CONFIG_SERIAL_ATMEL=y
743CONFIG_SERIAL_ATMEL_CONSOLE=y
744CONFIG_SERIAL_ATMEL_PDC=y
745# CONFIG_SERIAL_ATMEL_TTYAT is not set
746# CONFIG_SERIAL_MAX3100 is not set
747CONFIG_SERIAL_CORE=y
748CONFIG_SERIAL_CORE_CONSOLE=y
749CONFIG_UNIX98_PTYS=y
750# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
751# CONFIG_LEGACY_PTYS is not set
752# CONFIG_IPMI_HANDLER is not set
753# CONFIG_HW_RANDOM is not set
754# CONFIG_R3964 is not set
755# CONFIG_RAW_DRIVER is not set
756# CONFIG_TCG_TPM is not set
757CONFIG_I2C=m
758CONFIG_I2C_BOARDINFO=y
759CONFIG_I2C_COMPAT=y
760CONFIG_I2C_CHARDEV=m
761CONFIG_I2C_HELPER_AUTO=y
762CONFIG_I2C_ALGOBIT=m
763
764#
765# I2C Hardware Bus support
766#
767
768#
769# I2C system bus drivers (mostly embedded / system-on-chip)
770#
771# CONFIG_I2C_DESIGNWARE is not set
772CONFIG_I2C_GPIO=m
773# CONFIG_I2C_OCORES is not set
774# CONFIG_I2C_SIMTEC is not set
775
776#
777# External I2C/SMBus adapter drivers
778#
779# CONFIG_I2C_PARPORT_LIGHT is not set
780# CONFIG_I2C_TAOS_EVM is not set
781
782#
783# Other I2C/SMBus bus drivers
784#
785# CONFIG_I2C_PCA_PLATFORM is not set
786# CONFIG_I2C_STUB is not set
787
788#
789# Miscellaneous I2C Chip support
790#
791# CONFIG_DS1682 is not set
792# CONFIG_SENSORS_TSL2550 is not set
793# CONFIG_I2C_DEBUG_CORE is not set
794# CONFIG_I2C_DEBUG_ALGO is not set
795# CONFIG_I2C_DEBUG_BUS is not set
796# CONFIG_I2C_DEBUG_CHIP is not set
797CONFIG_SPI=y
798# CONFIG_SPI_DEBUG is not set
799CONFIG_SPI_MASTER=y
800
801#
802# SPI Master Controller Drivers
803#
804CONFIG_SPI_ATMEL=y
805# CONFIG_SPI_BITBANG is not set
806# CONFIG_SPI_GPIO is not set
807
808#
809# SPI Protocol Masters
810#
811CONFIG_SPI_SPIDEV=m
812# CONFIG_SPI_TLE62X0 is not set
813
814#
815# PPS support
816#
817# CONFIG_PPS is not set
818CONFIG_ARCH_REQUIRE_GPIOLIB=y
819CONFIG_GPIOLIB=y
820# CONFIG_DEBUG_GPIO is not set
821# CONFIG_GPIO_SYSFS is not set
822
823#
824# Memory mapped GPIO expanders:
825#
826
827#
828# I2C GPIO expanders:
829#
830# CONFIG_GPIO_MAX732X is not set
831# CONFIG_GPIO_PCA953X is not set
832# CONFIG_GPIO_PCF857X is not set
833
834#
835# PCI GPIO expanders:
836#
837
838#
839# SPI GPIO expanders:
840#
841# CONFIG_GPIO_MAX7301 is not set
842# CONFIG_GPIO_MCP23S08 is not set
843# CONFIG_GPIO_MC33880 is not set
844
845#
846# AC97 GPIO expanders:
847#
848# CONFIG_W1 is not set
849# CONFIG_POWER_SUPPLY is not set
850# CONFIG_HWMON is not set
851# CONFIG_THERMAL is not set
852CONFIG_WATCHDOG=y
853# CONFIG_WATCHDOG_NOWAYOUT is not set
854
855#
856# Watchdog Device Drivers
857#
858# CONFIG_SOFT_WATCHDOG is not set
859CONFIG_AT32AP700X_WDT=y
860CONFIG_SSB_POSSIBLE=y
861
862#
863# Sonics Silicon Backplane
864#
865# CONFIG_SSB is not set
866
867#
868# Multifunction device drivers
869#
870# CONFIG_MFD_CORE is not set
871# CONFIG_MFD_SM501 is not set
872# CONFIG_HTC_PASIC3 is not set
873# CONFIG_UCB1400_CORE is not set
874# CONFIG_TPS65010 is not set
875# CONFIG_MFD_TMIO is not set
876# CONFIG_MFD_WM8400 is not set
877# CONFIG_MFD_WM831X is not set
878# CONFIG_MFD_WM8350_I2C is not set
879# CONFIG_MFD_PCF50633 is not set
880# CONFIG_MFD_MC13783 is not set
881# CONFIG_AB3100_CORE is not set
882# CONFIG_EZX_PCAP is not set
883# CONFIG_REGULATOR is not set
884# CONFIG_MEDIA_SUPPORT is not set
885
886#
887# Graphics support
888#
889# CONFIG_VGASTATE is not set
890# CONFIG_VIDEO_OUTPUT_CONTROL is not set
891CONFIG_FB=y
892# CONFIG_FIRMWARE_EDID is not set
893# CONFIG_FB_DDC is not set
894# CONFIG_FB_BOOT_VESA_SUPPORT is not set
895CONFIG_FB_CFB_FILLRECT=y
896CONFIG_FB_CFB_COPYAREA=y
897CONFIG_FB_CFB_IMAGEBLIT=y
898# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
899# CONFIG_FB_SYS_FILLRECT is not set
900# CONFIG_FB_SYS_COPYAREA is not set
901# CONFIG_FB_SYS_IMAGEBLIT is not set
902# CONFIG_FB_FOREIGN_ENDIAN is not set
903# CONFIG_FB_SYS_FOPS is not set
904# CONFIG_FB_SVGALIB is not set
905# CONFIG_FB_MACMODES is not set
906# CONFIG_FB_BACKLIGHT is not set
907# CONFIG_FB_MODE_HELPERS is not set
908# CONFIG_FB_TILEBLITTING is not set
909
910#
911# Frame buffer hardware drivers
912#
913# CONFIG_FB_S1D13XXX is not set
914CONFIG_FB_ATMEL=y
915# CONFIG_FB_VIRTUAL is not set
916# CONFIG_FB_METRONOME is not set
917# CONFIG_FB_MB862XX is not set
918# CONFIG_FB_BROADSHEET is not set
919# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
920
921#
922# Display device support
923#
924# CONFIG_DISPLAY_SUPPORT is not set
925
926#
927# Console display driver support
928#
929CONFIG_DUMMY_CONSOLE=y
930# CONFIG_FRAMEBUFFER_CONSOLE is not set
931# CONFIG_LOGO is not set
932CONFIG_SOUND=y
933CONFIG_SOUND_OSS_CORE=y
934CONFIG_SOUND_OSS_CORE_PRECLAIM=y
935CONFIG_SND=y
936CONFIG_SND_TIMER=y
937CONFIG_SND_PCM=m
938# CONFIG_SND_SEQUENCER is not set
939CONFIG_SND_OSSEMUL=y
940CONFIG_SND_MIXER_OSS=m
941CONFIG_SND_PCM_OSS=m
942CONFIG_SND_PCM_OSS_PLUGINS=y
943CONFIG_SND_HRTIMER=y
944# CONFIG_SND_DYNAMIC_MINORS is not set
945# CONFIG_SND_SUPPORT_OLD_API is not set
946CONFIG_SND_VERBOSE_PROCFS=y
947# CONFIG_SND_VERBOSE_PRINTK is not set
948# CONFIG_SND_DEBUG is not set
949CONFIG_SND_VMASTER=y
950# CONFIG_SND_RAWMIDI_SEQ is not set
951# CONFIG_SND_OPL3_LIB_SEQ is not set
952# CONFIG_SND_OPL4_LIB_SEQ is not set
953# CONFIG_SND_SBAWE_SEQ is not set
954# CONFIG_SND_EMU10K1_SEQ is not set
955CONFIG_SND_AC97_CODEC=m
956# CONFIG_SND_DRIVERS is not set
957
958#
959# Atmel devices (AVR32 and AT91)
960#
961# CONFIG_SND_ATMEL_ABDAC is not set
962CONFIG_SND_ATMEL_AC97C=m
963# CONFIG_SND_SPI is not set
964# CONFIG_SND_SOC is not set
965# CONFIG_SOUND_PRIME is not set
966CONFIG_AC97_BUS=m
967CONFIG_HID_SUPPORT=y
968CONFIG_HID=y
969# CONFIG_HIDRAW is not set
970# CONFIG_HID_PID is not set
971
972#
973# Special HID drivers
974#
975CONFIG_USB_SUPPORT=y
976# CONFIG_USB_ARCH_HAS_HCD is not set
977# CONFIG_USB_ARCH_HAS_OHCI is not set
978# CONFIG_USB_ARCH_HAS_EHCI is not set
979# CONFIG_USB_OTG_WHITELIST is not set
980# CONFIG_USB_OTG_BLACKLIST_HUB is not set
981# CONFIG_USB_GADGET_MUSB_HDRC is not set
982
983#
984# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
985#
986CONFIG_USB_GADGET=y
987# CONFIG_USB_GADGET_DEBUG is not set
988# CONFIG_USB_GADGET_DEBUG_FILES is not set
989# CONFIG_USB_GADGET_DEBUG_FS is not set
990CONFIG_USB_GADGET_VBUS_DRAW=350
991CONFIG_USB_GADGET_SELECTED=y
992# CONFIG_USB_GADGET_AT91 is not set
993CONFIG_USB_GADGET_ATMEL_USBA=y
994CONFIG_USB_ATMEL_USBA=y
995# CONFIG_USB_GADGET_FSL_USB2 is not set
996# CONFIG_USB_GADGET_LH7A40X is not set
997# CONFIG_USB_GADGET_OMAP is not set
998# CONFIG_USB_GADGET_PXA25X is not set
999# CONFIG_USB_GADGET_R8A66597 is not set
1000# CONFIG_USB_GADGET_PXA27X is not set
1001# CONFIG_USB_GADGET_S3C_HSOTG is not set
1002# CONFIG_USB_GADGET_IMX is not set
1003# CONFIG_USB_GADGET_S3C2410 is not set
1004# CONFIG_USB_GADGET_M66592 is not set
1005# CONFIG_USB_GADGET_AMD5536UDC is not set
1006# CONFIG_USB_GADGET_FSL_QE is not set
1007# CONFIG_USB_GADGET_CI13XXX is not set
1008# CONFIG_USB_GADGET_NET2280 is not set
1009# CONFIG_USB_GADGET_GOKU is not set
1010# CONFIG_USB_GADGET_LANGWELL is not set
1011# CONFIG_USB_GADGET_DUMMY_HCD is not set
1012CONFIG_USB_GADGET_DUALSPEED=y
1013CONFIG_USB_ZERO=m
1014# CONFIG_USB_AUDIO is not set
1015CONFIG_USB_ETH=m
1016CONFIG_USB_ETH_RNDIS=y
1017# CONFIG_USB_ETH_EEM is not set
1018CONFIG_USB_GADGETFS=m
1019CONFIG_USB_FILE_STORAGE=m
1020# CONFIG_USB_FILE_STORAGE_TEST is not set
1021CONFIG_USB_G_SERIAL=m
1022# CONFIG_USB_MIDI_GADGET is not set
1023# CONFIG_USB_G_PRINTER is not set
1024CONFIG_USB_CDC_COMPOSITE=m
1025
1026#
1027# OTG and related infrastructure
1028#
1029# CONFIG_USB_GPIO_VBUS is not set
1030# CONFIG_NOP_USB_XCEIV is not set
1031CONFIG_MMC=y
1032# CONFIG_MMC_DEBUG is not set
1033# CONFIG_MMC_UNSAFE_RESUME is not set
1034
1035#
1036# MMC/SD/SDIO Card Drivers
1037#
1038CONFIG_MMC_BLOCK=y
1039CONFIG_MMC_BLOCK_BOUNCE=y
1040# CONFIG_SDIO_UART is not set
1041# CONFIG_MMC_TEST is not set
1042
1043#
1044# MMC/SD/SDIO Host Controller Drivers
1045#
1046# CONFIG_MMC_SDHCI is not set
1047# CONFIG_MMC_AT91 is not set
1048CONFIG_MMC_ATMELMCI=y
1049# CONFIG_MMC_ATMELMCI_DMA is not set
1050# CONFIG_MMC_SPI is not set
1051# CONFIG_MEMSTICK is not set
1052CONFIG_NEW_LEDS=y
1053CONFIG_LEDS_CLASS=y
1054
1055#
1056# LED drivers
1057#
1058# CONFIG_LEDS_PCA9532 is not set
1059CONFIG_LEDS_GPIO=y
1060CONFIG_LEDS_GPIO_PLATFORM=y
1061# CONFIG_LEDS_LP3944 is not set
1062# CONFIG_LEDS_PCA955X is not set
1063# CONFIG_LEDS_DAC124S085 is not set
1064# CONFIG_LEDS_BD2802 is not set
1065
1066#
1067# LED Triggers
1068#
1069CONFIG_LEDS_TRIGGERS=y
1070CONFIG_LEDS_TRIGGER_TIMER=y
1071CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1072# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1073# CONFIG_LEDS_TRIGGER_GPIO is not set
1074# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1075
1076#
1077# iptables trigger is under Netfilter config (LED target)
1078#
1079# CONFIG_ACCESSIBILITY is not set
1080CONFIG_RTC_LIB=y
1081CONFIG_RTC_CLASS=y
1082CONFIG_RTC_HCTOSYS=y
1083CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1084# CONFIG_RTC_DEBUG is not set
1085
1086#
1087# RTC interfaces
1088#
1089CONFIG_RTC_INTF_SYSFS=y
1090CONFIG_RTC_INTF_PROC=y
1091CONFIG_RTC_INTF_DEV=y
1092# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1093# CONFIG_RTC_DRV_TEST is not set
1094
1095#
1096# I2C RTC drivers
1097#
1098# CONFIG_RTC_DRV_DS1307 is not set
1099# CONFIG_RTC_DRV_DS1374 is not set
1100# CONFIG_RTC_DRV_DS1672 is not set
1101# CONFIG_RTC_DRV_MAX6900 is not set
1102# CONFIG_RTC_DRV_RS5C372 is not set
1103# CONFIG_RTC_DRV_ISL1208 is not set
1104# CONFIG_RTC_DRV_X1205 is not set
1105# CONFIG_RTC_DRV_PCF8563 is not set
1106# CONFIG_RTC_DRV_PCF8583 is not set
1107# CONFIG_RTC_DRV_M41T80 is not set
1108# CONFIG_RTC_DRV_S35390A is not set
1109# CONFIG_RTC_DRV_FM3130 is not set
1110# CONFIG_RTC_DRV_RX8581 is not set
1111# CONFIG_RTC_DRV_RX8025 is not set
1112
1113#
1114# SPI RTC drivers
1115#
1116# CONFIG_RTC_DRV_M41T94 is not set
1117# CONFIG_RTC_DRV_DS1305 is not set
1118# CONFIG_RTC_DRV_DS1390 is not set
1119# CONFIG_RTC_DRV_MAX6902 is not set
1120# CONFIG_RTC_DRV_R9701 is not set
1121# CONFIG_RTC_DRV_RS5C348 is not set
1122# CONFIG_RTC_DRV_DS3234 is not set
1123# CONFIG_RTC_DRV_PCF2123 is not set
1124
1125#
1126# Platform RTC drivers
1127#
1128# CONFIG_RTC_DRV_DS1286 is not set
1129# CONFIG_RTC_DRV_DS1511 is not set
1130# CONFIG_RTC_DRV_DS1553 is not set
1131# CONFIG_RTC_DRV_DS1742 is not set
1132# CONFIG_RTC_DRV_STK17TA8 is not set
1133# CONFIG_RTC_DRV_M48T86 is not set
1134# CONFIG_RTC_DRV_M48T35 is not set
1135# CONFIG_RTC_DRV_M48T59 is not set
1136# CONFIG_RTC_DRV_BQ4802 is not set
1137# CONFIG_RTC_DRV_V3020 is not set
1138
1139#
1140# on-CPU RTC drivers
1141#
1142CONFIG_RTC_DRV_AT32AP700X=y
1143CONFIG_DMADEVICES=y
1144
1145#
1146# DMA Devices
1147#
1148CONFIG_DW_DMAC=y
1149CONFIG_DMA_ENGINE=y
1150
1151#
1152# DMA Clients
1153#
1154# CONFIG_NET_DMA is not set
1155# CONFIG_ASYNC_TX_DMA is not set
1156# CONFIG_DMATEST is not set
1157# CONFIG_AUXDISPLAY is not set
1158# CONFIG_UIO is not set
1159
1160#
1161# TI VLYNQ
1162#
1163# CONFIG_STAGING is not set
1164
1165#
1166# File systems
1167#
1168CONFIG_EXT2_FS=y
1169# CONFIG_EXT2_FS_XATTR is not set
1170# CONFIG_EXT2_FS_XIP is not set
1171CONFIG_EXT3_FS=y
1172# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1173# CONFIG_EXT3_FS_XATTR is not set
1174# CONFIG_EXT4_FS is not set
1175CONFIG_JBD=y
1176# CONFIG_JBD_DEBUG is not set
1177# CONFIG_REISERFS_FS is not set
1178# CONFIG_JFS_FS is not set
1179# CONFIG_FS_POSIX_ACL is not set
1180# CONFIG_XFS_FS is not set
1181# CONFIG_GFS2_FS is not set
1182# CONFIG_OCFS2_FS is not set
1183# CONFIG_BTRFS_FS is not set
1184# CONFIG_NILFS2_FS is not set
1185CONFIG_FILE_LOCKING=y
1186CONFIG_FSNOTIFY=y
1187# CONFIG_DNOTIFY is not set
1188CONFIG_INOTIFY=y
1189CONFIG_INOTIFY_USER=y
1190# CONFIG_QUOTA is not set
1191# CONFIG_AUTOFS_FS is not set
1192# CONFIG_AUTOFS4_FS is not set
1193CONFIG_FUSE_FS=m
1194# CONFIG_CUSE is not set
1195
1196#
1197# Caches
1198#
1199# CONFIG_FSCACHE is not set
1200
1201#
1202# CD-ROM/DVD Filesystems
1203#
1204# CONFIG_ISO9660_FS is not set
1205# CONFIG_UDF_FS is not set
1206
1207#
1208# DOS/FAT/NT Filesystems
1209#
1210CONFIG_FAT_FS=m
1211CONFIG_MSDOS_FS=m
1212CONFIG_VFAT_FS=m
1213CONFIG_FAT_DEFAULT_CODEPAGE=850
1214CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1215# CONFIG_NTFS_FS is not set
1216
1217#
1218# Pseudo filesystems
1219#
1220CONFIG_PROC_FS=y
1221# CONFIG_PROC_KCORE is not set
1222CONFIG_PROC_SYSCTL=y
1223CONFIG_PROC_PAGE_MONITOR=y
1224CONFIG_SYSFS=y
1225CONFIG_TMPFS=y
1226# CONFIG_TMPFS_POSIX_ACL is not set
1227# CONFIG_HUGETLB_PAGE is not set
1228CONFIG_CONFIGFS_FS=y
1229CONFIG_MISC_FILESYSTEMS=y
1230# CONFIG_ADFS_FS is not set
1231# CONFIG_AFFS_FS is not set
1232# CONFIG_HFS_FS is not set
1233# CONFIG_HFSPLUS_FS is not set
1234# CONFIG_BEFS_FS is not set
1235# CONFIG_BFS_FS is not set
1236# CONFIG_EFS_FS is not set
1237CONFIG_JFFS2_FS=y
1238CONFIG_JFFS2_FS_DEBUG=0
1239CONFIG_JFFS2_FS_WRITEBUFFER=y
1240# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1241# CONFIG_JFFS2_SUMMARY is not set
1242# CONFIG_JFFS2_FS_XATTR is not set
1243# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1244CONFIG_JFFS2_ZLIB=y
1245# CONFIG_JFFS2_LZO is not set
1246CONFIG_JFFS2_RTIME=y
1247# CONFIG_JFFS2_RUBIN is not set
1248CONFIG_UBIFS_FS=y
1249# CONFIG_UBIFS_FS_XATTR is not set
1250# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1251CONFIG_UBIFS_FS_LZO=y
1252CONFIG_UBIFS_FS_ZLIB=y
1253# CONFIG_UBIFS_FS_DEBUG is not set
1254# CONFIG_CRAMFS is not set
1255# CONFIG_SQUASHFS is not set
1256# CONFIG_VXFS_FS is not set
1257# CONFIG_MINIX_FS is not set
1258# CONFIG_OMFS_FS is not set
1259# CONFIG_HPFS_FS is not set
1260# CONFIG_QNX4FS_FS is not set
1261# CONFIG_ROMFS_FS is not set
1262# CONFIG_SYSV_FS is not set
1263# CONFIG_UFS_FS is not set
1264CONFIG_NETWORK_FILESYSTEMS=y
1265CONFIG_NFS_FS=y
1266CONFIG_NFS_V3=y
1267# CONFIG_NFS_V3_ACL is not set
1268# CONFIG_NFS_V4 is not set
1269CONFIG_ROOT_NFS=y
1270CONFIG_NFSD=m
1271CONFIG_NFSD_V3=y
1272# CONFIG_NFSD_V3_ACL is not set
1273# CONFIG_NFSD_V4 is not set
1274CONFIG_LOCKD=y
1275CONFIG_LOCKD_V4=y
1276CONFIG_EXPORTFS=m
1277CONFIG_NFS_COMMON=y
1278CONFIG_SUNRPC=y
1279# CONFIG_RPCSEC_GSS_KRB5 is not set
1280# CONFIG_RPCSEC_GSS_SPKM3 is not set
1281CONFIG_SMB_FS=m
1282# CONFIG_SMB_NLS_DEFAULT is not set
1283CONFIG_CIFS=m
1284# CONFIG_CIFS_STATS is not set
1285# CONFIG_CIFS_WEAK_PW_HASH is not set
1286# CONFIG_CIFS_XATTR is not set
1287# CONFIG_CIFS_DEBUG2 is not set
1288# CONFIG_CIFS_EXPERIMENTAL is not set
1289# CONFIG_NCP_FS is not set
1290# CONFIG_CODA_FS is not set
1291# CONFIG_AFS_FS is not set
1292
1293#
1294# Partition Types
1295#
1296# CONFIG_PARTITION_ADVANCED is not set
1297CONFIG_MSDOS_PARTITION=y
1298CONFIG_NLS=m
1299CONFIG_NLS_DEFAULT="iso8859-1"
1300CONFIG_NLS_CODEPAGE_437=m
1301# CONFIG_NLS_CODEPAGE_737 is not set
1302# CONFIG_NLS_CODEPAGE_775 is not set
1303CONFIG_NLS_CODEPAGE_850=m
1304# CONFIG_NLS_CODEPAGE_852 is not set
1305# CONFIG_NLS_CODEPAGE_855 is not set
1306# CONFIG_NLS_CODEPAGE_857 is not set
1307# CONFIG_NLS_CODEPAGE_860 is not set
1308# CONFIG_NLS_CODEPAGE_861 is not set
1309# CONFIG_NLS_CODEPAGE_862 is not set
1310# CONFIG_NLS_CODEPAGE_863 is not set
1311# CONFIG_NLS_CODEPAGE_864 is not set
1312# CONFIG_NLS_CODEPAGE_865 is not set
1313# CONFIG_NLS_CODEPAGE_866 is not set
1314# CONFIG_NLS_CODEPAGE_869 is not set
1315# CONFIG_NLS_CODEPAGE_936 is not set
1316# CONFIG_NLS_CODEPAGE_950 is not set
1317# CONFIG_NLS_CODEPAGE_932 is not set
1318# CONFIG_NLS_CODEPAGE_949 is not set
1319# CONFIG_NLS_CODEPAGE_874 is not set
1320# CONFIG_NLS_ISO8859_8 is not set
1321# CONFIG_NLS_CODEPAGE_1250 is not set
1322# CONFIG_NLS_CODEPAGE_1251 is not set
1323# CONFIG_NLS_ASCII is not set
1324CONFIG_NLS_ISO8859_1=m
1325# CONFIG_NLS_ISO8859_2 is not set
1326# CONFIG_NLS_ISO8859_3 is not set
1327# CONFIG_NLS_ISO8859_4 is not set
1328# CONFIG_NLS_ISO8859_5 is not set
1329# CONFIG_NLS_ISO8859_6 is not set
1330# CONFIG_NLS_ISO8859_7 is not set
1331# CONFIG_NLS_ISO8859_9 is not set
1332# CONFIG_NLS_ISO8859_13 is not set
1333# CONFIG_NLS_ISO8859_14 is not set
1334# CONFIG_NLS_ISO8859_15 is not set
1335# CONFIG_NLS_KOI8_R is not set
1336# CONFIG_NLS_KOI8_U is not set
1337CONFIG_NLS_UTF8=m
1338# CONFIG_DLM is not set
1339
1340#
1341# Kernel hacking
1342#
1343# CONFIG_PRINTK_TIME is not set
1344CONFIG_ENABLE_WARN_DEPRECATED=y
1345CONFIG_ENABLE_MUST_CHECK=y
1346CONFIG_FRAME_WARN=1024
1347CONFIG_MAGIC_SYSRQ=y
1348# CONFIG_STRIP_ASM_SYMS is not set
1349# CONFIG_UNUSED_SYMBOLS is not set
1350CONFIG_DEBUG_FS=y
1351# CONFIG_HEADERS_CHECK is not set
1352CONFIG_DEBUG_KERNEL=y
1353# CONFIG_DEBUG_SHIRQ is not set
1354CONFIG_DETECT_SOFTLOCKUP=y
1355# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1356CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1357CONFIG_DETECT_HUNG_TASK=y
1358# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1359CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1360CONFIG_SCHED_DEBUG=y
1361# CONFIG_SCHEDSTATS is not set
1362# CONFIG_TIMER_STATS is not set
1363# CONFIG_DEBUG_OBJECTS is not set
1364# CONFIG_SLUB_DEBUG_ON is not set
1365# CONFIG_SLUB_STATS is not set
1366# CONFIG_DEBUG_RT_MUTEXES is not set
1367# CONFIG_RT_MUTEX_TESTER is not set
1368# CONFIG_DEBUG_SPINLOCK is not set
1369# CONFIG_DEBUG_MUTEXES is not set
1370# CONFIG_DEBUG_LOCK_ALLOC is not set
1371# CONFIG_PROVE_LOCKING is not set
1372# CONFIG_LOCK_STAT is not set
1373# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1374# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1375CONFIG_STACKTRACE=y
1376# CONFIG_DEBUG_KOBJECT is not set
1377CONFIG_DEBUG_BUGVERBOSE=y
1378# CONFIG_DEBUG_INFO is not set
1379# CONFIG_DEBUG_VM is not set
1380# CONFIG_DEBUG_WRITECOUNT is not set
1381# CONFIG_DEBUG_MEMORY_INIT is not set
1382# CONFIG_DEBUG_LIST is not set
1383# CONFIG_DEBUG_SG is not set
1384# CONFIG_DEBUG_NOTIFIERS is not set
1385# CONFIG_DEBUG_CREDENTIALS is not set
1386CONFIG_FRAME_POINTER=y
1387# CONFIG_BOOT_PRINTK_DELAY is not set
1388# CONFIG_RCU_TORTURE_TEST is not set
1389# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1390# CONFIG_KPROBES_SANITY_TEST is not set
1391# CONFIG_BACKTRACE_SELF_TEST is not set
1392# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1393# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1394# CONFIG_LKDTM is not set
1395# CONFIG_FAULT_INJECTION is not set
1396# CONFIG_PAGE_POISONING is not set
1397CONFIG_NOP_TRACER=y
1398CONFIG_RING_BUFFER=y
1399CONFIG_EVENT_TRACING=y
1400CONFIG_CONTEXT_SWITCH_TRACER=y
1401CONFIG_RING_BUFFER_ALLOW_SWAP=y
1402CONFIG_TRACING=y
1403CONFIG_TRACING_SUPPORT=y
1404CONFIG_FTRACE=y
1405# CONFIG_IRQSOFF_TRACER is not set
1406# CONFIG_SCHED_TRACER is not set
1407# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1408# CONFIG_BOOT_TRACER is not set
1409CONFIG_BRANCH_PROFILE_NONE=y
1410# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1411# CONFIG_PROFILE_ALL_BRANCHES is not set
1412# CONFIG_KMEMTRACE is not set
1413# CONFIG_WORKQUEUE_TRACER is not set
1414# CONFIG_BLK_DEV_IO_TRACE is not set
1415# CONFIG_RING_BUFFER_BENCHMARK is not set
1416# CONFIG_DYNAMIC_DEBUG is not set
1417# CONFIG_SAMPLES is not set
1418
1419#
1420# Security options
1421#
1422# CONFIG_KEYS is not set
1423# CONFIG_SECURITY is not set
1424# CONFIG_SECURITYFS is not set
1425# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1426CONFIG_CRYPTO=y
1427
1428#
1429# Crypto core or helper
1430#
1431# CONFIG_CRYPTO_FIPS is not set
1432CONFIG_CRYPTO_ALGAPI=y
1433CONFIG_CRYPTO_ALGAPI2=y
1434CONFIG_CRYPTO_AEAD=y
1435CONFIG_CRYPTO_AEAD2=y
1436CONFIG_CRYPTO_BLKCIPHER=y
1437CONFIG_CRYPTO_BLKCIPHER2=y
1438CONFIG_CRYPTO_HASH=y
1439CONFIG_CRYPTO_HASH2=y
1440CONFIG_CRYPTO_RNG=m
1441CONFIG_CRYPTO_RNG2=y
1442CONFIG_CRYPTO_PCOMP=y
1443CONFIG_CRYPTO_MANAGER=y
1444CONFIG_CRYPTO_MANAGER2=y
1445# CONFIG_CRYPTO_GF128MUL is not set
1446# CONFIG_CRYPTO_NULL is not set
1447CONFIG_CRYPTO_WORKQUEUE=y
1448# CONFIG_CRYPTO_CRYPTD is not set
1449CONFIG_CRYPTO_AUTHENC=y
1450# CONFIG_CRYPTO_TEST is not set
1451
1452#
1453# Authenticated Encryption with Associated Data
1454#
1455# CONFIG_CRYPTO_CCM is not set
1456# CONFIG_CRYPTO_GCM is not set
1457# CONFIG_CRYPTO_SEQIV is not set
1458
1459#
1460# Block modes
1461#
1462CONFIG_CRYPTO_CBC=y
1463# CONFIG_CRYPTO_CTR is not set
1464# CONFIG_CRYPTO_CTS is not set
1465CONFIG_CRYPTO_ECB=m
1466# CONFIG_CRYPTO_LRW is not set
1467# CONFIG_CRYPTO_PCBC is not set
1468# CONFIG_CRYPTO_XTS is not set
1469
1470#
1471# Hash modes
1472#
1473CONFIG_CRYPTO_HMAC=y
1474# CONFIG_CRYPTO_XCBC is not set
1475# CONFIG_CRYPTO_VMAC is not set
1476
1477#
1478# Digest
1479#
1480# CONFIG_CRYPTO_CRC32C is not set
1481# CONFIG_CRYPTO_GHASH is not set
1482# CONFIG_CRYPTO_MD4 is not set
1483CONFIG_CRYPTO_MD5=y
1484# CONFIG_CRYPTO_MICHAEL_MIC is not set
1485# CONFIG_CRYPTO_RMD128 is not set
1486# CONFIG_CRYPTO_RMD160 is not set
1487# CONFIG_CRYPTO_RMD256 is not set
1488# CONFIG_CRYPTO_RMD320 is not set
1489CONFIG_CRYPTO_SHA1=y
1490# CONFIG_CRYPTO_SHA256 is not set
1491# CONFIG_CRYPTO_SHA512 is not set
1492# CONFIG_CRYPTO_TGR192 is not set
1493# CONFIG_CRYPTO_WP512 is not set
1494
1495#
1496# Ciphers
1497#
1498CONFIG_CRYPTO_AES=m
1499# CONFIG_CRYPTO_ANUBIS is not set
1500CONFIG_CRYPTO_ARC4=m
1501# CONFIG_CRYPTO_BLOWFISH is not set
1502# CONFIG_CRYPTO_CAMELLIA is not set
1503# CONFIG_CRYPTO_CAST5 is not set
1504# CONFIG_CRYPTO_CAST6 is not set
1505CONFIG_CRYPTO_DES=y
1506# CONFIG_CRYPTO_FCRYPT is not set
1507# CONFIG_CRYPTO_KHAZAD is not set
1508# CONFIG_CRYPTO_SALSA20 is not set
1509# CONFIG_CRYPTO_SEED is not set
1510# CONFIG_CRYPTO_SERPENT is not set
1511# CONFIG_CRYPTO_TEA is not set
1512# CONFIG_CRYPTO_TWOFISH is not set
1513
1514#
1515# Compression
1516#
1517CONFIG_CRYPTO_DEFLATE=y
1518# CONFIG_CRYPTO_ZLIB is not set
1519CONFIG_CRYPTO_LZO=y
1520
1521#
1522# Random Number Generation
1523#
1524CONFIG_CRYPTO_ANSI_CPRNG=m
1525CONFIG_CRYPTO_HW=y
1526CONFIG_BINARY_PRINTF=y
1527
1528#
1529# Library routines
1530#
1531CONFIG_BITREVERSE=y
1532CONFIG_GENERIC_FIND_LAST_BIT=y
1533CONFIG_CRC_CCITT=m
1534CONFIG_CRC16=y
1535# CONFIG_CRC_T10DIF is not set
1536# CONFIG_CRC_ITU_T is not set
1537CONFIG_CRC32=y
1538# CONFIG_CRC7 is not set
1539# CONFIG_LIBCRC32C is not set
1540CONFIG_ZLIB_INFLATE=y
1541CONFIG_ZLIB_DEFLATE=y
1542CONFIG_LZO_COMPRESS=y
1543CONFIG_LZO_DECOMPRESS=y
1544CONFIG_DECOMPRESS_GZIP=y
1545CONFIG_GENERIC_ALLOCATOR=y
1546CONFIG_HAS_IOMEM=y
1547CONFIG_HAS_IOPORT=y
1548CONFIG_HAS_DMA=y
1549CONFIG_NLATTR=y
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
new file mode 100644
index 000000000000..bbf6bc316ecf
--- /dev/null
+++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig
@@ -0,0 +1,1549 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc5
4# Thu Nov 5 15:33:32 2009
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"
24CONFIG_CONSTRUCTORS=y
25
26#
27# General setup
28#
29CONFIG_EXPERIMENTAL=y
30CONFIG_BROKEN_ON_SMP=y
31CONFIG_INIT_ENV_ARG_LIMIT=32
32CONFIG_LOCALVERSION=""
33# CONFIG_LOCALVERSION_AUTO is not set
34CONFIG_SWAP=y
35CONFIG_SYSVIPC=y
36CONFIG_SYSVIPC_SYSCTL=y
37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
39CONFIG_BSD_PROCESS_ACCT=y
40CONFIG_BSD_PROCESS_ACCT_V3=y
41# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_TREE_RCU=y
48# CONFIG_TREE_PREEMPT_RCU is not set
49# CONFIG_RCU_TRACE is not set
50CONFIG_RCU_FANOUT=32
51# CONFIG_RCU_FANOUT_EXACT is not set
52# CONFIG_TREE_RCU_TRACE is not set
53# CONFIG_IKCONFIG is not set
54CONFIG_LOG_BUF_SHIFT=14
55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y
59# CONFIG_RELAY is not set
60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
69CONFIG_EMBEDDED=y
70# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_ALL is not set
73# CONFIG_KALLSYMS_EXTRA_PASS is not set
74CONFIG_HOTPLUG=y
75CONFIG_PRINTK=y
76CONFIG_BUG=y
77CONFIG_ELF_CORE=y
78# CONFIG_BASE_FULL is not set
79CONFIG_FUTEX=y
80CONFIG_EPOLL=y
81CONFIG_SIGNALFD=y
82CONFIG_TIMERFD=y
83CONFIG_EVENTFD=y
84CONFIG_SHMEM=y
85CONFIG_AIO=y
86
87#
88# Kernel Performance Events And Counters
89#
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_SLUB_DEBUG=y
92# CONFIG_COMPAT_BRK is not set
93# CONFIG_SLAB is not set
94CONFIG_SLUB=y
95# CONFIG_SLOB is not set
96CONFIG_PROFILING=y
97CONFIG_TRACEPOINTS=y
98CONFIG_OPROFILE=m
99CONFIG_HAVE_OPROFILE=y
100CONFIG_KPROBES=y
101CONFIG_HAVE_KPROBES=y
102CONFIG_HAVE_CLK=y
103
104#
105# GCOV-based kernel profiling
106#
107# CONFIG_GCOV_KERNEL is not set
108CONFIG_SLOW_WORK=y
109# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
110CONFIG_SLABINFO=y
111CONFIG_RT_MUTEXES=y
112CONFIG_BASE_SMALL=1
113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
115CONFIG_MODULE_UNLOAD=y
116CONFIG_MODULE_FORCE_UNLOAD=y
117# CONFIG_MODVERSIONS is not set
118# CONFIG_MODULE_SRCVERSION_ALL is not set
119CONFIG_BLOCK=y
120CONFIG_LBDAF=y
121# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set
123
124#
125# IO Schedulers
126#
127CONFIG_IOSCHED_NOOP=y
128# CONFIG_IOSCHED_AS is not set
129# CONFIG_IOSCHED_DEADLINE is not set
130CONFIG_IOSCHED_CFQ=y
131# CONFIG_DEFAULT_AS is not set
132# CONFIG_DEFAULT_DEADLINE is not set
133CONFIG_DEFAULT_CFQ=y
134# CONFIG_DEFAULT_NOOP is not set
135CONFIG_DEFAULT_IOSCHED="cfq"
136CONFIG_FREEZER=y
137
138#
139# System Type and features
140#
141CONFIG_TICK_ONESHOT=y
142CONFIG_NO_HZ=y
143CONFIG_HIGH_RES_TIMERS=y
144CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
145CONFIG_SUBARCH_AVR32B=y
146CONFIG_MMU=y
147CONFIG_PERFORMANCE_COUNTERS=y
148CONFIG_PLATFORM_AT32AP=y
149CONFIG_CPU_AT32AP700X=y
150CONFIG_CPU_AT32AP7000=y
151CONFIG_BOARD_ATNGW100_COMMON=y
152# CONFIG_BOARD_ATSTK1000 is not set
153# CONFIG_BOARD_ATNGW100_MKI is not set
154CONFIG_BOARD_ATNGW100_MKII=y
155# CONFIG_BOARD_HAMMERHEAD is not set
156# CONFIG_BOARD_FAVR_32 is not set
157# CONFIG_BOARD_MERISC is not set
158# CONFIG_BOARD_MIMC200 is not set
159CONFIG_BOARD_ATNGW100_MKII_LCD=y
160# CONFIG_BOARD_ATNGW100_ADDON_NONE is not set
161CONFIG_BOARD_ATNGW100_EVKLCD10X=y
162# CONFIG_BOARD_ATNGW100_MRMT is not set
163# CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA is not set
164CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA=y
165# CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA is not set
166CONFIG_LOADER_U_BOOT=y
167
168#
169# Atmel AVR32 AP options
170#
171# CONFIG_AP700X_32_BIT_SMC is not set
172CONFIG_AP700X_16_BIT_SMC=y
173# CONFIG_AP700X_8_BIT_SMC is not set
174CONFIG_LOAD_ADDRESS=0x10000000
175CONFIG_ENTRY_ADDRESS=0x90000000
176CONFIG_PHYS_OFFSET=0x10000000
177CONFIG_PREEMPT_NONE=y
178# CONFIG_PREEMPT_VOLUNTARY is not set
179# CONFIG_PREEMPT is not set
180CONFIG_QUICKLIST=y
181# CONFIG_HAVE_ARCH_BOOTMEM is not set
182# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
183# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
184CONFIG_ARCH_FLATMEM_ENABLE=y
185# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
186# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
187CONFIG_SELECT_MEMORY_MODEL=y
188CONFIG_FLATMEM_MANUAL=y
189# CONFIG_DISCONTIGMEM_MANUAL is not set
190# CONFIG_SPARSEMEM_MANUAL is not set
191CONFIG_FLATMEM=y
192CONFIG_FLAT_NODE_MEM_MAP=y
193CONFIG_PAGEFLAGS_EXTENDED=y
194CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_PHYS_ADDR_T_64BIT is not set
196CONFIG_ZONE_DMA_FLAG=0
197CONFIG_NR_QUICK=2
198CONFIG_VIRT_TO_BUS=y
199CONFIG_HAVE_MLOCK=y
200CONFIG_HAVE_MLOCKED_PAGE_BIT=y
201# CONFIG_KSM is not set
202CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
203# CONFIG_OWNERSHIP_TRACE is not set
204CONFIG_NMI_DEBUGGING=y
205# CONFIG_HZ_100 is not set
206CONFIG_HZ_250=y
207# CONFIG_HZ_300 is not set
208# CONFIG_HZ_1000 is not set
209CONFIG_HZ=250
210CONFIG_SCHED_HRTICK=y
211CONFIG_CMDLINE=""
212
213#
214# Power management options
215#
216CONFIG_PM=y
217# CONFIG_PM_DEBUG is not set
218CONFIG_PM_SLEEP=y
219CONFIG_SUSPEND=y
220CONFIG_SUSPEND_FREEZER=y
221# CONFIG_PM_RUNTIME is not set
222CONFIG_ARCH_SUSPEND_POSSIBLE=y
223
224#
225# CPU Frequency scaling
226#
227CONFIG_CPU_FREQ=y
228CONFIG_CPU_FREQ_TABLE=y
229# CONFIG_CPU_FREQ_DEBUG is not set
230# CONFIG_CPU_FREQ_STAT is not set
231# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
232# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
233# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
234CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
235# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
236CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
237# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
238CONFIG_CPU_FREQ_GOV_USERSPACE=y
239CONFIG_CPU_FREQ_GOV_ONDEMAND=y
240# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
241CONFIG_CPU_FREQ_AT32AP=y
242
243#
244# Bus options
245#
246# CONFIG_ARCH_SUPPORTS_MSI is not set
247# CONFIG_PCCARD is not set
248
249#
250# Executable file formats
251#
252CONFIG_BINFMT_ELF=y
253# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
254# CONFIG_HAVE_AOUT is not set
255# CONFIG_BINFMT_MISC is not set
256CONFIG_NET=y
257
258#
259# Networking options
260#
261CONFIG_PACKET=y
262CONFIG_PACKET_MMAP=y
263CONFIG_UNIX=y
264CONFIG_XFRM=y
265CONFIG_XFRM_USER=y
266# CONFIG_XFRM_SUB_POLICY is not set
267# CONFIG_XFRM_MIGRATE is not set
268# CONFIG_XFRM_STATISTICS is not set
269CONFIG_XFRM_IPCOMP=y
270CONFIG_NET_KEY=y
271# CONFIG_NET_KEY_MIGRATE is not set
272CONFIG_INET=y
273CONFIG_IP_MULTICAST=y
274CONFIG_IP_ADVANCED_ROUTER=y
275CONFIG_ASK_IP_FIB_HASH=y
276# CONFIG_IP_FIB_TRIE is not set
277CONFIG_IP_FIB_HASH=y
278# CONFIG_IP_MULTIPLE_TABLES is not set
279# CONFIG_IP_ROUTE_MULTIPATH is not set
280# CONFIG_IP_ROUTE_VERBOSE is not set
281CONFIG_IP_PNP=y
282CONFIG_IP_PNP_DHCP=y
283# CONFIG_IP_PNP_BOOTP is not set
284# CONFIG_IP_PNP_RARP is not set
285# CONFIG_NET_IPIP is not set
286# CONFIG_NET_IPGRE is not set
287CONFIG_IP_MROUTE=y
288CONFIG_IP_PIMSM_V1=y
289# CONFIG_IP_PIMSM_V2 is not set
290# CONFIG_ARPD is not set
291CONFIG_SYN_COOKIES=y
292CONFIG_INET_AH=y
293CONFIG_INET_ESP=y
294CONFIG_INET_IPCOMP=y
295CONFIG_INET_XFRM_TUNNEL=y
296CONFIG_INET_TUNNEL=y
297CONFIG_INET_XFRM_MODE_TRANSPORT=y
298CONFIG_INET_XFRM_MODE_TUNNEL=y
299CONFIG_INET_XFRM_MODE_BEET=y
300# CONFIG_INET_LRO is not set
301CONFIG_INET_DIAG=y
302CONFIG_INET_TCP_DIAG=y
303# CONFIG_TCP_CONG_ADVANCED is not set
304CONFIG_TCP_CONG_CUBIC=y
305CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_TCP_MD5SIG is not set
307CONFIG_IPV6=y
308# CONFIG_IPV6_PRIVACY is not set
309# CONFIG_IPV6_ROUTER_PREF is not set
310# CONFIG_IPV6_OPTIMISTIC_DAD is not set
311CONFIG_INET6_AH=y
312CONFIG_INET6_ESP=y
313CONFIG_INET6_IPCOMP=y
314# CONFIG_IPV6_MIP6 is not set
315CONFIG_INET6_XFRM_TUNNEL=y
316CONFIG_INET6_TUNNEL=y
317CONFIG_INET6_XFRM_MODE_TRANSPORT=y
318CONFIG_INET6_XFRM_MODE_TUNNEL=y
319CONFIG_INET6_XFRM_MODE_BEET=y
320# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
321CONFIG_IPV6_SIT=y
322CONFIG_IPV6_NDISC_NODETYPE=y
323# CONFIG_IPV6_TUNNEL is not set
324# CONFIG_IPV6_MULTIPLE_TABLES is not set
325# CONFIG_IPV6_MROUTE is not set
326# CONFIG_NETWORK_SECMARK is not set
327CONFIG_NETFILTER=y
328# CONFIG_NETFILTER_DEBUG is not set
329# CONFIG_NETFILTER_ADVANCED is not set
330
331#
332# Core Netfilter Configuration
333#
334CONFIG_NETFILTER_NETLINK=m
335CONFIG_NETFILTER_NETLINK_LOG=m
336CONFIG_NF_CONNTRACK=m
337CONFIG_NF_CONNTRACK_FTP=m
338CONFIG_NF_CONNTRACK_IRC=m
339CONFIG_NF_CONNTRACK_SIP=m
340CONFIG_NF_CT_NETLINK=m
341CONFIG_NETFILTER_XTABLES=y
342CONFIG_NETFILTER_XT_TARGET_MARK=m
343CONFIG_NETFILTER_XT_TARGET_NFLOG=m
344CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
345CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
346CONFIG_NETFILTER_XT_MATCH_MARK=m
347CONFIG_NETFILTER_XT_MATCH_POLICY=m
348CONFIG_NETFILTER_XT_MATCH_STATE=m
349# CONFIG_IP_VS is not set
350
351#
352# IP: Netfilter Configuration
353#
354CONFIG_NF_DEFRAG_IPV4=m
355CONFIG_NF_CONNTRACK_IPV4=m
356CONFIG_NF_CONNTRACK_PROC_COMPAT=y
357CONFIG_IP_NF_IPTABLES=m
358CONFIG_IP_NF_FILTER=m
359CONFIG_IP_NF_TARGET_REJECT=m
360CONFIG_IP_NF_TARGET_LOG=m
361# CONFIG_IP_NF_TARGET_ULOG is not set
362CONFIG_NF_NAT=m
363CONFIG_NF_NAT_NEEDED=y
364CONFIG_IP_NF_TARGET_MASQUERADE=m
365CONFIG_NF_NAT_FTP=m
366CONFIG_NF_NAT_IRC=m
367# CONFIG_NF_NAT_TFTP is not set
368# CONFIG_NF_NAT_AMANDA is not set
369# CONFIG_NF_NAT_PPTP is not set
370# CONFIG_NF_NAT_H323 is not set
371CONFIG_NF_NAT_SIP=m
372CONFIG_IP_NF_MANGLE=m
373
374#
375# IPv6: Netfilter Configuration
376#
377CONFIG_NF_CONNTRACK_IPV6=m
378CONFIG_IP6_NF_IPTABLES=m
379CONFIG_IP6_NF_MATCH_IPV6HEADER=m
380CONFIG_IP6_NF_TARGET_LOG=m
381CONFIG_IP6_NF_FILTER=m
382CONFIG_IP6_NF_TARGET_REJECT=m
383CONFIG_IP6_NF_MANGLE=m
384# CONFIG_IP_DCCP is not set
385# CONFIG_IP_SCTP is not set
386# CONFIG_RDS is not set
387# CONFIG_TIPC is not set
388# CONFIG_ATM is not set
389CONFIG_STP=m
390CONFIG_BRIDGE=m
391# CONFIG_NET_DSA is not set
392CONFIG_VLAN_8021Q=m
393# CONFIG_VLAN_8021Q_GVRP is not set
394# CONFIG_DECNET is not set
395CONFIG_LLC=m
396# CONFIG_LLC2 is not set
397# CONFIG_IPX is not set
398# CONFIG_ATALK is not set
399# CONFIG_X25 is not set
400# CONFIG_LAPB is not set
401# CONFIG_ECONET is not set
402# CONFIG_WAN_ROUTER is not set
403# CONFIG_PHONET is not set
404# CONFIG_IEEE802154 is not set
405# CONFIG_NET_SCHED is not set
406# CONFIG_DCB is not set
407
408#
409# Network testing
410#
411# CONFIG_NET_PKTGEN is not set
412# CONFIG_NET_TCPPROBE is not set
413# CONFIG_NET_DROP_MONITOR is not set
414# CONFIG_HAMRADIO is not set
415# CONFIG_CAN is not set
416# CONFIG_IRDA is not set
417# CONFIG_BT is not set
418# CONFIG_AF_RXRPC is not set
419CONFIG_WIRELESS=y
420# CONFIG_CFG80211 is not set
421CONFIG_CFG80211_DEFAULT_PS_VALUE=0
422# CONFIG_WIRELESS_OLD_REGULATORY is not set
423# CONFIG_WIRELESS_EXT is not set
424# CONFIG_LIB80211 is not set
425
426#
427# CFG80211 needs to be enabled for MAC80211
428#
429# CONFIG_WIMAX is not set
430# CONFIG_RFKILL is not set
431# CONFIG_NET_9P is not set
432
433#
434# Device Drivers
435#
436
437#
438# Generic Driver Options
439#
440CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
441# CONFIG_DEVTMPFS is not set
442CONFIG_STANDALONE=y
443# CONFIG_PREVENT_FIRMWARE_BUILD is not set
444# CONFIG_FW_LOADER is not set
445# CONFIG_DEBUG_DRIVER is not set
446# CONFIG_DEBUG_DEVRES is not set
447# CONFIG_SYS_HYPERVISOR is not set
448# CONFIG_CONNECTOR is not set
449CONFIG_MTD=y
450# CONFIG_MTD_DEBUG is not set
451# CONFIG_MTD_TESTS is not set
452# CONFIG_MTD_CONCAT is not set
453CONFIG_MTD_PARTITIONS=y
454# CONFIG_MTD_REDBOOT_PARTS is not set
455CONFIG_MTD_CMDLINE_PARTS=y
456# CONFIG_MTD_AR7_PARTS is not set
457
458#
459# User Modules And Translation Layers
460#
461CONFIG_MTD_CHAR=y
462CONFIG_MTD_BLKDEVS=y
463CONFIG_MTD_BLOCK=y
464# CONFIG_FTL is not set
465# CONFIG_NFTL is not set
466# CONFIG_INFTL is not set
467# CONFIG_RFD_FTL is not set
468# CONFIG_SSFDC is not set
469# CONFIG_MTD_OOPS is not set
470
471#
472# RAM/ROM/Flash chip drivers
473#
474CONFIG_MTD_CFI=y
475# CONFIG_MTD_JEDECPROBE is not set
476CONFIG_MTD_GEN_PROBE=y
477# CONFIG_MTD_CFI_ADV_OPTIONS is not set
478CONFIG_MTD_MAP_BANK_WIDTH_1=y
479CONFIG_MTD_MAP_BANK_WIDTH_2=y
480CONFIG_MTD_MAP_BANK_WIDTH_4=y
481# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
482# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
483# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
484CONFIG_MTD_CFI_I1=y
485CONFIG_MTD_CFI_I2=y
486# CONFIG_MTD_CFI_I4 is not set
487# CONFIG_MTD_CFI_I8 is not set
488CONFIG_MTD_CFI_INTELEXT=y
489# CONFIG_MTD_CFI_AMDSTD is not set
490# CONFIG_MTD_CFI_STAA is not set
491CONFIG_MTD_CFI_UTIL=y
492# CONFIG_MTD_RAM is not set
493# CONFIG_MTD_ROM is not set
494# CONFIG_MTD_ABSENT is not set
495
496#
497# Mapping drivers for chip access
498#
499# CONFIG_MTD_COMPLEX_MAPPINGS is not set
500CONFIG_MTD_PHYSMAP=y
501# CONFIG_MTD_PHYSMAP_COMPAT is not set
502# CONFIG_MTD_PLATRAM is not set
503
504#
505# Self-contained MTD device drivers
506#
507CONFIG_MTD_DATAFLASH=y
508# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
509# CONFIG_MTD_DATAFLASH_OTP is not set
510# CONFIG_MTD_M25P80 is not set
511# CONFIG_MTD_SST25L is not set
512# CONFIG_MTD_SLRAM is not set
513# CONFIG_MTD_PHRAM is not set
514# CONFIG_MTD_MTDRAM is not set
515# CONFIG_MTD_BLOCK2MTD is not set
516
517#
518# Disk-On-Chip Device Drivers
519#
520# CONFIG_MTD_DOC2000 is not set
521# CONFIG_MTD_DOC2001 is not set
522# CONFIG_MTD_DOC2001PLUS is not set
523CONFIG_MTD_NAND=y
524# CONFIG_MTD_NAND_VERIFY_WRITE is not set
525# CONFIG_MTD_NAND_ECC_SMC is not set
526# CONFIG_MTD_NAND_MUSEUM_IDS is not set
527CONFIG_MTD_NAND_IDS=y
528# CONFIG_MTD_NAND_DISKONCHIP is not set
529CONFIG_MTD_NAND_ATMEL=y
530CONFIG_MTD_NAND_ATMEL_ECC_HW=y
531# CONFIG_MTD_NAND_ATMEL_ECC_SOFT is not set
532# CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set
533# CONFIG_MTD_NAND_NANDSIM is not set
534# CONFIG_MTD_NAND_PLATFORM is not set
535# CONFIG_MTD_ONENAND is not set
536
537#
538# LPDDR flash memory drivers
539#
540# CONFIG_MTD_LPDDR is not set
541
542#
543# UBI - Unsorted block images
544#
545CONFIG_MTD_UBI=y
546CONFIG_MTD_UBI_WL_THRESHOLD=4096
547CONFIG_MTD_UBI_BEB_RESERVE=1
548# CONFIG_MTD_UBI_GLUEBI is not set
549
550#
551# UBI debugging options
552#
553# CONFIG_MTD_UBI_DEBUG is not set
554# CONFIG_PARPORT is not set
555CONFIG_BLK_DEV=y
556# CONFIG_BLK_DEV_COW_COMMON is not set
557CONFIG_BLK_DEV_LOOP=m
558# CONFIG_BLK_DEV_CRYPTOLOOP is not set
559CONFIG_BLK_DEV_NBD=m
560CONFIG_BLK_DEV_RAM=m
561CONFIG_BLK_DEV_RAM_COUNT=16
562CONFIG_BLK_DEV_RAM_SIZE=4096
563# CONFIG_BLK_DEV_XIP is not set
564# CONFIG_CDROM_PKTCDVD is not set
565# CONFIG_ATA_OVER_ETH is not set
566CONFIG_MISC_DEVICES=y
567# CONFIG_ATMEL_PWM is not set
568CONFIG_ATMEL_TCLIB=y
569CONFIG_ATMEL_TCB_CLKSRC=y
570CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
571# CONFIG_ICS932S401 is not set
572# CONFIG_ATMEL_SSC is not set
573# CONFIG_ENCLOSURE_SERVICES is not set
574# CONFIG_ISL29003 is not set
575# CONFIG_C2PORT is not set
576
577#
578# EEPROM support
579#
580# CONFIG_EEPROM_AT24 is not set
581# CONFIG_EEPROM_AT25 is not set
582# CONFIG_EEPROM_LEGACY is not set
583# CONFIG_EEPROM_MAX6875 is not set
584# CONFIG_EEPROM_93CX6 is not set
585
586#
587# SCSI device support
588#
589# CONFIG_RAID_ATTRS is not set
590# CONFIG_SCSI is not set
591# CONFIG_SCSI_DMA is not set
592# CONFIG_SCSI_NETLINK is not set
593# CONFIG_ATA is not set
594# CONFIG_MD is not set
595CONFIG_NETDEVICES=y
596# CONFIG_DUMMY is not set
597# CONFIG_BONDING is not set
598# CONFIG_MACVLAN is not set
599# CONFIG_EQUALIZER is not set
600# CONFIG_TUN is not set
601# CONFIG_VETH is not set
602CONFIG_PHYLIB=y
603
604#
605# MII PHY device drivers
606#
607# CONFIG_MARVELL_PHY is not set
608# CONFIG_DAVICOM_PHY is not set
609# CONFIG_QSEMI_PHY is not set
610# CONFIG_LXT_PHY is not set
611# CONFIG_CICADA_PHY is not set
612# CONFIG_VITESSE_PHY is not set
613# CONFIG_SMSC_PHY is not set
614# CONFIG_BROADCOM_PHY is not set
615# CONFIG_ICPLUS_PHY is not set
616# CONFIG_REALTEK_PHY is not set
617# CONFIG_NATIONAL_PHY is not set
618# CONFIG_STE10XP is not set
619# CONFIG_LSI_ET1011C_PHY is not set
620# CONFIG_FIXED_PHY is not set
621# CONFIG_MDIO_BITBANG is not set
622CONFIG_NET_ETHERNET=y
623# CONFIG_MII is not set
624CONFIG_MACB=y
625# CONFIG_ENC28J60 is not set
626# CONFIG_ETHOC is not set
627# CONFIG_DNET is not set
628# CONFIG_IBM_NEW_EMAC_ZMII is not set
629# CONFIG_IBM_NEW_EMAC_RGMII is not set
630# CONFIG_IBM_NEW_EMAC_TAH is not set
631# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
632# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
633# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
634# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
635# CONFIG_B44 is not set
636# CONFIG_KS8842 is not set
637# CONFIG_KS8851 is not set
638# CONFIG_KS8851_MLL is not set
639# CONFIG_NETDEV_1000 is not set
640# CONFIG_NETDEV_10000 is not set
641CONFIG_WLAN=y
642# CONFIG_WLAN_PRE80211 is not set
643# CONFIG_WLAN_80211 is not set
644
645#
646# Enable WiMAX (Networking options) to see the WiMAX drivers
647#
648# CONFIG_WAN is not set
649CONFIG_PPP=m
650# CONFIG_PPP_MULTILINK is not set
651CONFIG_PPP_FILTER=y
652CONFIG_PPP_ASYNC=m
653# CONFIG_PPP_SYNC_TTY is not set
654CONFIG_PPP_DEFLATE=m
655CONFIG_PPP_BSDCOMP=m
656CONFIG_PPP_MPPE=m
657CONFIG_PPPOE=m
658# CONFIG_PPPOL2TP is not set
659# CONFIG_SLIP is not set
660CONFIG_SLHC=m
661# CONFIG_NETCONSOLE is not set
662# CONFIG_NETPOLL is not set
663# CONFIG_NET_POLL_CONTROLLER is not set
664# CONFIG_ISDN is not set
665# CONFIG_PHONE is not set
666
667#
668# Input device support
669#
670CONFIG_INPUT=y
671# CONFIG_INPUT_FF_MEMLESS is not set
672# CONFIG_INPUT_POLLDEV is not set
673
674#
675# Userland interfaces
676#
677# CONFIG_INPUT_MOUSEDEV is not set
678# CONFIG_INPUT_JOYDEV is not set
679CONFIG_INPUT_EVDEV=m
680# CONFIG_INPUT_EVBUG is not set
681
682#
683# Input Device Drivers
684#
685# CONFIG_INPUT_KEYBOARD is not set
686# CONFIG_INPUT_MOUSE is not set
687# CONFIG_INPUT_JOYSTICK is not set
688# CONFIG_INPUT_TABLET is not set
689CONFIG_INPUT_TOUCHSCREEN=y
690# CONFIG_TOUCHSCREEN_ADS7846 is not set
691# CONFIG_TOUCHSCREEN_AD7877 is not set
692# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
693# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
694# CONFIG_TOUCHSCREEN_AD7879 is not set
695# CONFIG_TOUCHSCREEN_EETI is not set
696# CONFIG_TOUCHSCREEN_FUJITSU is not set
697# CONFIG_TOUCHSCREEN_GUNZE is not set
698# CONFIG_TOUCHSCREEN_ELO is not set
699# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
700# CONFIG_TOUCHSCREEN_MCS5000 is not set
701# CONFIG_TOUCHSCREEN_MTOUCH is not set
702# CONFIG_TOUCHSCREEN_INEXIO is not set
703# CONFIG_TOUCHSCREEN_MK712 is not set
704# CONFIG_TOUCHSCREEN_PENMOUNT is not set
705# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
706# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
707CONFIG_TOUCHSCREEN_WM97XX=m
708CONFIG_TOUCHSCREEN_WM9705=y
709CONFIG_TOUCHSCREEN_WM9712=y
710CONFIG_TOUCHSCREEN_WM9713=y
711# CONFIG_TOUCHSCREEN_WM97XX_ATMEL is not set
712# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
713# CONFIG_TOUCHSCREEN_TSC2007 is not set
714# CONFIG_TOUCHSCREEN_W90X900 is not set
715# CONFIG_INPUT_MISC is not set
716
717#
718# Hardware I/O ports
719#
720# CONFIG_SERIO is not set
721# CONFIG_GAMEPORT is not set
722
723#
724# Character devices
725#
726CONFIG_VT=y
727CONFIG_CONSOLE_TRANSLATIONS=y
728CONFIG_VT_CONSOLE=y
729CONFIG_HW_CONSOLE=y
730# CONFIG_VT_HW_CONSOLE_BINDING is not set
731CONFIG_DEVKMEM=y
732# CONFIG_SERIAL_NONSTANDARD is not set
733
734#
735# Serial drivers
736#
737# CONFIG_SERIAL_8250 is not set
738
739#
740# Non-8250 serial port support
741#
742CONFIG_SERIAL_ATMEL=y
743CONFIG_SERIAL_ATMEL_CONSOLE=y
744CONFIG_SERIAL_ATMEL_PDC=y
745# CONFIG_SERIAL_ATMEL_TTYAT is not set
746# CONFIG_SERIAL_MAX3100 is not set
747CONFIG_SERIAL_CORE=y
748CONFIG_SERIAL_CORE_CONSOLE=y
749CONFIG_UNIX98_PTYS=y
750# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
751# CONFIG_LEGACY_PTYS is not set
752# CONFIG_IPMI_HANDLER is not set
753# CONFIG_HW_RANDOM is not set
754# CONFIG_R3964 is not set
755# CONFIG_RAW_DRIVER is not set
756# CONFIG_TCG_TPM is not set
757CONFIG_I2C=m
758CONFIG_I2C_BOARDINFO=y
759CONFIG_I2C_COMPAT=y
760CONFIG_I2C_CHARDEV=m
761CONFIG_I2C_HELPER_AUTO=y
762CONFIG_I2C_ALGOBIT=m
763
764#
765# I2C Hardware Bus support
766#
767
768#
769# I2C system bus drivers (mostly embedded / system-on-chip)
770#
771# CONFIG_I2C_DESIGNWARE is not set
772CONFIG_I2C_GPIO=m
773# CONFIG_I2C_OCORES is not set
774# CONFIG_I2C_SIMTEC is not set
775
776#
777# External I2C/SMBus adapter drivers
778#
779# CONFIG_I2C_PARPORT_LIGHT is not set
780# CONFIG_I2C_TAOS_EVM is not set
781
782#
783# Other I2C/SMBus bus drivers
784#
785# CONFIG_I2C_PCA_PLATFORM is not set
786# CONFIG_I2C_STUB is not set
787
788#
789# Miscellaneous I2C Chip support
790#
791# CONFIG_DS1682 is not set
792# CONFIG_SENSORS_TSL2550 is not set
793# CONFIG_I2C_DEBUG_CORE is not set
794# CONFIG_I2C_DEBUG_ALGO is not set
795# CONFIG_I2C_DEBUG_BUS is not set
796# CONFIG_I2C_DEBUG_CHIP is not set
797CONFIG_SPI=y
798# CONFIG_SPI_DEBUG is not set
799CONFIG_SPI_MASTER=y
800
801#
802# SPI Master Controller Drivers
803#
804CONFIG_SPI_ATMEL=y
805# CONFIG_SPI_BITBANG is not set
806# CONFIG_SPI_GPIO is not set
807
808#
809# SPI Protocol Masters
810#
811CONFIG_SPI_SPIDEV=m
812# CONFIG_SPI_TLE62X0 is not set
813
814#
815# PPS support
816#
817# CONFIG_PPS is not set
818CONFIG_ARCH_REQUIRE_GPIOLIB=y
819CONFIG_GPIOLIB=y
820# CONFIG_DEBUG_GPIO is not set
821# CONFIG_GPIO_SYSFS is not set
822
823#
824# Memory mapped GPIO expanders:
825#
826
827#
828# I2C GPIO expanders:
829#
830# CONFIG_GPIO_MAX732X is not set
831# CONFIG_GPIO_PCA953X is not set
832# CONFIG_GPIO_PCF857X is not set
833
834#
835# PCI GPIO expanders:
836#
837
838#
839# SPI GPIO expanders:
840#
841# CONFIG_GPIO_MAX7301 is not set
842# CONFIG_GPIO_MCP23S08 is not set
843# CONFIG_GPIO_MC33880 is not set
844
845#
846# AC97 GPIO expanders:
847#
848# CONFIG_W1 is not set
849# CONFIG_POWER_SUPPLY is not set
850# CONFIG_HWMON is not set
851# CONFIG_THERMAL is not set
852CONFIG_WATCHDOG=y
853# CONFIG_WATCHDOG_NOWAYOUT is not set
854
855#
856# Watchdog Device Drivers
857#
858# CONFIG_SOFT_WATCHDOG is not set
859CONFIG_AT32AP700X_WDT=y
860CONFIG_SSB_POSSIBLE=y
861
862#
863# Sonics Silicon Backplane
864#
865# CONFIG_SSB is not set
866
867#
868# Multifunction device drivers
869#
870# CONFIG_MFD_CORE is not set
871# CONFIG_MFD_SM501 is not set
872# CONFIG_HTC_PASIC3 is not set
873# CONFIG_UCB1400_CORE is not set
874# CONFIG_TPS65010 is not set
875# CONFIG_MFD_TMIO is not set
876# CONFIG_MFD_WM8400 is not set
877# CONFIG_MFD_WM831X is not set
878# CONFIG_MFD_WM8350_I2C is not set
879# CONFIG_MFD_PCF50633 is not set
880# CONFIG_MFD_MC13783 is not set
881# CONFIG_AB3100_CORE is not set
882# CONFIG_EZX_PCAP is not set
883# CONFIG_REGULATOR is not set
884# CONFIG_MEDIA_SUPPORT is not set
885
886#
887# Graphics support
888#
889# CONFIG_VGASTATE is not set
890# CONFIG_VIDEO_OUTPUT_CONTROL is not set
891CONFIG_FB=y
892# CONFIG_FIRMWARE_EDID is not set
893# CONFIG_FB_DDC is not set
894# CONFIG_FB_BOOT_VESA_SUPPORT is not set
895CONFIG_FB_CFB_FILLRECT=y
896CONFIG_FB_CFB_COPYAREA=y
897CONFIG_FB_CFB_IMAGEBLIT=y
898# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
899# CONFIG_FB_SYS_FILLRECT is not set
900# CONFIG_FB_SYS_COPYAREA is not set
901# CONFIG_FB_SYS_IMAGEBLIT is not set
902# CONFIG_FB_FOREIGN_ENDIAN is not set
903# CONFIG_FB_SYS_FOPS is not set
904# CONFIG_FB_SVGALIB is not set
905# CONFIG_FB_MACMODES is not set
906# CONFIG_FB_BACKLIGHT is not set
907# CONFIG_FB_MODE_HELPERS is not set
908# CONFIG_FB_TILEBLITTING is not set
909
910#
911# Frame buffer hardware drivers
912#
913# CONFIG_FB_S1D13XXX is not set
914CONFIG_FB_ATMEL=y
915# CONFIG_FB_VIRTUAL is not set
916# CONFIG_FB_METRONOME is not set
917# CONFIG_FB_MB862XX is not set
918# CONFIG_FB_BROADSHEET is not set
919# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
920
921#
922# Display device support
923#
924# CONFIG_DISPLAY_SUPPORT is not set
925
926#
927# Console display driver support
928#
929CONFIG_DUMMY_CONSOLE=y
930# CONFIG_FRAMEBUFFER_CONSOLE is not set
931# CONFIG_LOGO is not set
932CONFIG_SOUND=y
933CONFIG_SOUND_OSS_CORE=y
934CONFIG_SOUND_OSS_CORE_PRECLAIM=y
935CONFIG_SND=y
936CONFIG_SND_TIMER=y
937CONFIG_SND_PCM=m
938# CONFIG_SND_SEQUENCER is not set
939CONFIG_SND_OSSEMUL=y
940CONFIG_SND_MIXER_OSS=m
941CONFIG_SND_PCM_OSS=m
942CONFIG_SND_PCM_OSS_PLUGINS=y
943CONFIG_SND_HRTIMER=y
944# CONFIG_SND_DYNAMIC_MINORS is not set
945# CONFIG_SND_SUPPORT_OLD_API is not set
946CONFIG_SND_VERBOSE_PROCFS=y
947# CONFIG_SND_VERBOSE_PRINTK is not set
948# CONFIG_SND_DEBUG is not set
949CONFIG_SND_VMASTER=y
950# CONFIG_SND_RAWMIDI_SEQ is not set
951# CONFIG_SND_OPL3_LIB_SEQ is not set
952# CONFIG_SND_OPL4_LIB_SEQ is not set
953# CONFIG_SND_SBAWE_SEQ is not set
954# CONFIG_SND_EMU10K1_SEQ is not set
955CONFIG_SND_AC97_CODEC=m
956# CONFIG_SND_DRIVERS is not set
957
958#
959# Atmel devices (AVR32 and AT91)
960#
961# CONFIG_SND_ATMEL_ABDAC is not set
962CONFIG_SND_ATMEL_AC97C=m
963# CONFIG_SND_SPI is not set
964# CONFIG_SND_SOC is not set
965# CONFIG_SOUND_PRIME is not set
966CONFIG_AC97_BUS=m
967CONFIG_HID_SUPPORT=y
968CONFIG_HID=y
969# CONFIG_HIDRAW is not set
970# CONFIG_HID_PID is not set
971
972#
973# Special HID drivers
974#
975CONFIG_USB_SUPPORT=y
976# CONFIG_USB_ARCH_HAS_HCD is not set
977# CONFIG_USB_ARCH_HAS_OHCI is not set
978# CONFIG_USB_ARCH_HAS_EHCI is not set
979# CONFIG_USB_OTG_WHITELIST is not set
980# CONFIG_USB_OTG_BLACKLIST_HUB is not set
981# CONFIG_USB_GADGET_MUSB_HDRC is not set
982
983#
984# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
985#
986CONFIG_USB_GADGET=y
987# CONFIG_USB_GADGET_DEBUG is not set
988# CONFIG_USB_GADGET_DEBUG_FILES is not set
989# CONFIG_USB_GADGET_DEBUG_FS is not set
990CONFIG_USB_GADGET_VBUS_DRAW=350
991CONFIG_USB_GADGET_SELECTED=y
992# CONFIG_USB_GADGET_AT91 is not set
993CONFIG_USB_GADGET_ATMEL_USBA=y
994CONFIG_USB_ATMEL_USBA=y
995# CONFIG_USB_GADGET_FSL_USB2 is not set
996# CONFIG_USB_GADGET_LH7A40X is not set
997# CONFIG_USB_GADGET_OMAP is not set
998# CONFIG_USB_GADGET_PXA25X is not set
999# CONFIG_USB_GADGET_R8A66597 is not set
1000# CONFIG_USB_GADGET_PXA27X is not set
1001# CONFIG_USB_GADGET_S3C_HSOTG is not set
1002# CONFIG_USB_GADGET_IMX is not set
1003# CONFIG_USB_GADGET_S3C2410 is not set
1004# CONFIG_USB_GADGET_M66592 is not set
1005# CONFIG_USB_GADGET_AMD5536UDC is not set
1006# CONFIG_USB_GADGET_FSL_QE is not set
1007# CONFIG_USB_GADGET_CI13XXX is not set
1008# CONFIG_USB_GADGET_NET2280 is not set
1009# CONFIG_USB_GADGET_GOKU is not set
1010# CONFIG_USB_GADGET_LANGWELL is not set
1011# CONFIG_USB_GADGET_DUMMY_HCD is not set
1012CONFIG_USB_GADGET_DUALSPEED=y
1013CONFIG_USB_ZERO=m
1014# CONFIG_USB_AUDIO is not set
1015CONFIG_USB_ETH=m
1016CONFIG_USB_ETH_RNDIS=y
1017# CONFIG_USB_ETH_EEM is not set
1018CONFIG_USB_GADGETFS=m
1019CONFIG_USB_FILE_STORAGE=m
1020# CONFIG_USB_FILE_STORAGE_TEST is not set
1021CONFIG_USB_G_SERIAL=m
1022# CONFIG_USB_MIDI_GADGET is not set
1023# CONFIG_USB_G_PRINTER is not set
1024CONFIG_USB_CDC_COMPOSITE=m
1025
1026#
1027# OTG and related infrastructure
1028#
1029# CONFIG_USB_GPIO_VBUS is not set
1030# CONFIG_NOP_USB_XCEIV is not set
1031CONFIG_MMC=y
1032# CONFIG_MMC_DEBUG is not set
1033# CONFIG_MMC_UNSAFE_RESUME is not set
1034
1035#
1036# MMC/SD/SDIO Card Drivers
1037#
1038CONFIG_MMC_BLOCK=y
1039CONFIG_MMC_BLOCK_BOUNCE=y
1040# CONFIG_SDIO_UART is not set
1041# CONFIG_MMC_TEST is not set
1042
1043#
1044# MMC/SD/SDIO Host Controller Drivers
1045#
1046# CONFIG_MMC_SDHCI is not set
1047# CONFIG_MMC_AT91 is not set
1048CONFIG_MMC_ATMELMCI=y
1049# CONFIG_MMC_ATMELMCI_DMA is not set
1050# CONFIG_MMC_SPI is not set
1051# CONFIG_MEMSTICK is not set
1052CONFIG_NEW_LEDS=y
1053CONFIG_LEDS_CLASS=y
1054
1055#
1056# LED drivers
1057#
1058# CONFIG_LEDS_PCA9532 is not set
1059CONFIG_LEDS_GPIO=y
1060CONFIG_LEDS_GPIO_PLATFORM=y
1061# CONFIG_LEDS_LP3944 is not set
1062# CONFIG_LEDS_PCA955X is not set
1063# CONFIG_LEDS_DAC124S085 is not set
1064# CONFIG_LEDS_BD2802 is not set
1065
1066#
1067# LED Triggers
1068#
1069CONFIG_LEDS_TRIGGERS=y
1070CONFIG_LEDS_TRIGGER_TIMER=y
1071CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1072# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1073# CONFIG_LEDS_TRIGGER_GPIO is not set
1074# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1075
1076#
1077# iptables trigger is under Netfilter config (LED target)
1078#
1079# CONFIG_ACCESSIBILITY is not set
1080CONFIG_RTC_LIB=y
1081CONFIG_RTC_CLASS=y
1082CONFIG_RTC_HCTOSYS=y
1083CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1084# CONFIG_RTC_DEBUG is not set
1085
1086#
1087# RTC interfaces
1088#
1089CONFIG_RTC_INTF_SYSFS=y
1090CONFIG_RTC_INTF_PROC=y
1091CONFIG_RTC_INTF_DEV=y
1092# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1093# CONFIG_RTC_DRV_TEST is not set
1094
1095#
1096# I2C RTC drivers
1097#
1098# CONFIG_RTC_DRV_DS1307 is not set
1099# CONFIG_RTC_DRV_DS1374 is not set
1100# CONFIG_RTC_DRV_DS1672 is not set
1101# CONFIG_RTC_DRV_MAX6900 is not set
1102# CONFIG_RTC_DRV_RS5C372 is not set
1103# CONFIG_RTC_DRV_ISL1208 is not set
1104# CONFIG_RTC_DRV_X1205 is not set
1105# CONFIG_RTC_DRV_PCF8563 is not set
1106# CONFIG_RTC_DRV_PCF8583 is not set
1107# CONFIG_RTC_DRV_M41T80 is not set
1108# CONFIG_RTC_DRV_S35390A is not set
1109# CONFIG_RTC_DRV_FM3130 is not set
1110# CONFIG_RTC_DRV_RX8581 is not set
1111# CONFIG_RTC_DRV_RX8025 is not set
1112
1113#
1114# SPI RTC drivers
1115#
1116# CONFIG_RTC_DRV_M41T94 is not set
1117# CONFIG_RTC_DRV_DS1305 is not set
1118# CONFIG_RTC_DRV_DS1390 is not set
1119# CONFIG_RTC_DRV_MAX6902 is not set
1120# CONFIG_RTC_DRV_R9701 is not set
1121# CONFIG_RTC_DRV_RS5C348 is not set
1122# CONFIG_RTC_DRV_DS3234 is not set
1123# CONFIG_RTC_DRV_PCF2123 is not set
1124
1125#
1126# Platform RTC drivers
1127#
1128# CONFIG_RTC_DRV_DS1286 is not set
1129# CONFIG_RTC_DRV_DS1511 is not set
1130# CONFIG_RTC_DRV_DS1553 is not set
1131# CONFIG_RTC_DRV_DS1742 is not set
1132# CONFIG_RTC_DRV_STK17TA8 is not set
1133# CONFIG_RTC_DRV_M48T86 is not set
1134# CONFIG_RTC_DRV_M48T35 is not set
1135# CONFIG_RTC_DRV_M48T59 is not set
1136# CONFIG_RTC_DRV_BQ4802 is not set
1137# CONFIG_RTC_DRV_V3020 is not set
1138
1139#
1140# on-CPU RTC drivers
1141#
1142CONFIG_RTC_DRV_AT32AP700X=y
1143CONFIG_DMADEVICES=y
1144
1145#
1146# DMA Devices
1147#
1148CONFIG_DW_DMAC=y
1149CONFIG_DMA_ENGINE=y
1150
1151#
1152# DMA Clients
1153#
1154# CONFIG_NET_DMA is not set
1155# CONFIG_ASYNC_TX_DMA is not set
1156# CONFIG_DMATEST is not set
1157# CONFIG_AUXDISPLAY is not set
1158# CONFIG_UIO is not set
1159
1160#
1161# TI VLYNQ
1162#
1163# CONFIG_STAGING is not set
1164
1165#
1166# File systems
1167#
1168CONFIG_EXT2_FS=y
1169# CONFIG_EXT2_FS_XATTR is not set
1170# CONFIG_EXT2_FS_XIP is not set
1171CONFIG_EXT3_FS=y
1172# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1173# CONFIG_EXT3_FS_XATTR is not set
1174# CONFIG_EXT4_FS is not set
1175CONFIG_JBD=y
1176# CONFIG_JBD_DEBUG is not set
1177# CONFIG_REISERFS_FS is not set
1178# CONFIG_JFS_FS is not set
1179# CONFIG_FS_POSIX_ACL is not set
1180# CONFIG_XFS_FS is not set
1181# CONFIG_GFS2_FS is not set
1182# CONFIG_OCFS2_FS is not set
1183# CONFIG_BTRFS_FS is not set
1184# CONFIG_NILFS2_FS is not set
1185CONFIG_FILE_LOCKING=y
1186CONFIG_FSNOTIFY=y
1187# CONFIG_DNOTIFY is not set
1188CONFIG_INOTIFY=y
1189CONFIG_INOTIFY_USER=y
1190# CONFIG_QUOTA is not set
1191# CONFIG_AUTOFS_FS is not set
1192# CONFIG_AUTOFS4_FS is not set
1193CONFIG_FUSE_FS=m
1194# CONFIG_CUSE is not set
1195
1196#
1197# Caches
1198#
1199# CONFIG_FSCACHE is not set
1200
1201#
1202# CD-ROM/DVD Filesystems
1203#
1204# CONFIG_ISO9660_FS is not set
1205# CONFIG_UDF_FS is not set
1206
1207#
1208# DOS/FAT/NT Filesystems
1209#
1210CONFIG_FAT_FS=m
1211CONFIG_MSDOS_FS=m
1212CONFIG_VFAT_FS=m
1213CONFIG_FAT_DEFAULT_CODEPAGE=850
1214CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1215# CONFIG_NTFS_FS is not set
1216
1217#
1218# Pseudo filesystems
1219#
1220CONFIG_PROC_FS=y
1221# CONFIG_PROC_KCORE is not set
1222CONFIG_PROC_SYSCTL=y
1223CONFIG_PROC_PAGE_MONITOR=y
1224CONFIG_SYSFS=y
1225CONFIG_TMPFS=y
1226# CONFIG_TMPFS_POSIX_ACL is not set
1227# CONFIG_HUGETLB_PAGE is not set
1228CONFIG_CONFIGFS_FS=y
1229CONFIG_MISC_FILESYSTEMS=y
1230# CONFIG_ADFS_FS is not set
1231# CONFIG_AFFS_FS is not set
1232# CONFIG_HFS_FS is not set
1233# CONFIG_HFSPLUS_FS is not set
1234# CONFIG_BEFS_FS is not set
1235# CONFIG_BFS_FS is not set
1236# CONFIG_EFS_FS is not set
1237CONFIG_JFFS2_FS=y
1238CONFIG_JFFS2_FS_DEBUG=0
1239CONFIG_JFFS2_FS_WRITEBUFFER=y
1240# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1241# CONFIG_JFFS2_SUMMARY is not set
1242# CONFIG_JFFS2_FS_XATTR is not set
1243# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1244CONFIG_JFFS2_ZLIB=y
1245# CONFIG_JFFS2_LZO is not set
1246CONFIG_JFFS2_RTIME=y
1247# CONFIG_JFFS2_RUBIN is not set
1248CONFIG_UBIFS_FS=y
1249# CONFIG_UBIFS_FS_XATTR is not set
1250# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1251CONFIG_UBIFS_FS_LZO=y
1252CONFIG_UBIFS_FS_ZLIB=y
1253# CONFIG_UBIFS_FS_DEBUG is not set
1254# CONFIG_CRAMFS is not set
1255# CONFIG_SQUASHFS is not set
1256# CONFIG_VXFS_FS is not set
1257# CONFIG_MINIX_FS is not set
1258# CONFIG_OMFS_FS is not set
1259# CONFIG_HPFS_FS is not set
1260# CONFIG_QNX4FS_FS is not set
1261# CONFIG_ROMFS_FS is not set
1262# CONFIG_SYSV_FS is not set
1263# CONFIG_UFS_FS is not set
1264CONFIG_NETWORK_FILESYSTEMS=y
1265CONFIG_NFS_FS=y
1266CONFIG_NFS_V3=y
1267# CONFIG_NFS_V3_ACL is not set
1268# CONFIG_NFS_V4 is not set
1269CONFIG_ROOT_NFS=y
1270CONFIG_NFSD=m
1271CONFIG_NFSD_V3=y
1272# CONFIG_NFSD_V3_ACL is not set
1273# CONFIG_NFSD_V4 is not set
1274CONFIG_LOCKD=y
1275CONFIG_LOCKD_V4=y
1276CONFIG_EXPORTFS=m
1277CONFIG_NFS_COMMON=y
1278CONFIG_SUNRPC=y
1279# CONFIG_RPCSEC_GSS_KRB5 is not set
1280# CONFIG_RPCSEC_GSS_SPKM3 is not set
1281CONFIG_SMB_FS=m
1282# CONFIG_SMB_NLS_DEFAULT is not set
1283CONFIG_CIFS=m
1284# CONFIG_CIFS_STATS is not set
1285# CONFIG_CIFS_WEAK_PW_HASH is not set
1286# CONFIG_CIFS_XATTR is not set
1287# CONFIG_CIFS_DEBUG2 is not set
1288# CONFIG_CIFS_EXPERIMENTAL is not set
1289# CONFIG_NCP_FS is not set
1290# CONFIG_CODA_FS is not set
1291# CONFIG_AFS_FS is not set
1292
1293#
1294# Partition Types
1295#
1296# CONFIG_PARTITION_ADVANCED is not set
1297CONFIG_MSDOS_PARTITION=y
1298CONFIG_NLS=m
1299CONFIG_NLS_DEFAULT="iso8859-1"
1300CONFIG_NLS_CODEPAGE_437=m
1301# CONFIG_NLS_CODEPAGE_737 is not set
1302# CONFIG_NLS_CODEPAGE_775 is not set
1303CONFIG_NLS_CODEPAGE_850=m
1304# CONFIG_NLS_CODEPAGE_852 is not set
1305# CONFIG_NLS_CODEPAGE_855 is not set
1306# CONFIG_NLS_CODEPAGE_857 is not set
1307# CONFIG_NLS_CODEPAGE_860 is not set
1308# CONFIG_NLS_CODEPAGE_861 is not set
1309# CONFIG_NLS_CODEPAGE_862 is not set
1310# CONFIG_NLS_CODEPAGE_863 is not set
1311# CONFIG_NLS_CODEPAGE_864 is not set
1312# CONFIG_NLS_CODEPAGE_865 is not set
1313# CONFIG_NLS_CODEPAGE_866 is not set
1314# CONFIG_NLS_CODEPAGE_869 is not set
1315# CONFIG_NLS_CODEPAGE_936 is not set
1316# CONFIG_NLS_CODEPAGE_950 is not set
1317# CONFIG_NLS_CODEPAGE_932 is not set
1318# CONFIG_NLS_CODEPAGE_949 is not set
1319# CONFIG_NLS_CODEPAGE_874 is not set
1320# CONFIG_NLS_ISO8859_8 is not set
1321# CONFIG_NLS_CODEPAGE_1250 is not set
1322# CONFIG_NLS_CODEPAGE_1251 is not set
1323# CONFIG_NLS_ASCII is not set
1324CONFIG_NLS_ISO8859_1=m
1325# CONFIG_NLS_ISO8859_2 is not set
1326# CONFIG_NLS_ISO8859_3 is not set
1327# CONFIG_NLS_ISO8859_4 is not set
1328# CONFIG_NLS_ISO8859_5 is not set
1329# CONFIG_NLS_ISO8859_6 is not set
1330# CONFIG_NLS_ISO8859_7 is not set
1331# CONFIG_NLS_ISO8859_9 is not set
1332# CONFIG_NLS_ISO8859_13 is not set
1333# CONFIG_NLS_ISO8859_14 is not set
1334# CONFIG_NLS_ISO8859_15 is not set
1335# CONFIG_NLS_KOI8_R is not set
1336# CONFIG_NLS_KOI8_U is not set
1337CONFIG_NLS_UTF8=m
1338# CONFIG_DLM is not set
1339
1340#
1341# Kernel hacking
1342#
1343# CONFIG_PRINTK_TIME is not set
1344CONFIG_ENABLE_WARN_DEPRECATED=y
1345CONFIG_ENABLE_MUST_CHECK=y
1346CONFIG_FRAME_WARN=1024
1347CONFIG_MAGIC_SYSRQ=y
1348# CONFIG_STRIP_ASM_SYMS is not set
1349# CONFIG_UNUSED_SYMBOLS is not set
1350CONFIG_DEBUG_FS=y
1351# CONFIG_HEADERS_CHECK is not set
1352CONFIG_DEBUG_KERNEL=y
1353# CONFIG_DEBUG_SHIRQ is not set
1354CONFIG_DETECT_SOFTLOCKUP=y
1355# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1356CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1357CONFIG_DETECT_HUNG_TASK=y
1358# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1359CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1360CONFIG_SCHED_DEBUG=y
1361# CONFIG_SCHEDSTATS is not set
1362# CONFIG_TIMER_STATS is not set
1363# CONFIG_DEBUG_OBJECTS is not set
1364# CONFIG_SLUB_DEBUG_ON is not set
1365# CONFIG_SLUB_STATS is not set
1366# CONFIG_DEBUG_RT_MUTEXES is not set
1367# CONFIG_RT_MUTEX_TESTER is not set
1368# CONFIG_DEBUG_SPINLOCK is not set
1369# CONFIG_DEBUG_MUTEXES is not set
1370# CONFIG_DEBUG_LOCK_ALLOC is not set
1371# CONFIG_PROVE_LOCKING is not set
1372# CONFIG_LOCK_STAT is not set
1373# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1374# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1375CONFIG_STACKTRACE=y
1376# CONFIG_DEBUG_KOBJECT is not set
1377CONFIG_DEBUG_BUGVERBOSE=y
1378# CONFIG_DEBUG_INFO is not set
1379# CONFIG_DEBUG_VM is not set
1380# CONFIG_DEBUG_WRITECOUNT is not set
1381# CONFIG_DEBUG_MEMORY_INIT is not set
1382# CONFIG_DEBUG_LIST is not set
1383# CONFIG_DEBUG_SG is not set
1384# CONFIG_DEBUG_NOTIFIERS is not set
1385# CONFIG_DEBUG_CREDENTIALS is not set
1386CONFIG_FRAME_POINTER=y
1387# CONFIG_BOOT_PRINTK_DELAY is not set
1388# CONFIG_RCU_TORTURE_TEST is not set
1389# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1390# CONFIG_KPROBES_SANITY_TEST is not set
1391# CONFIG_BACKTRACE_SELF_TEST is not set
1392# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1393# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1394# CONFIG_LKDTM is not set
1395# CONFIG_FAULT_INJECTION is not set
1396# CONFIG_PAGE_POISONING is not set
1397CONFIG_NOP_TRACER=y
1398CONFIG_RING_BUFFER=y
1399CONFIG_EVENT_TRACING=y
1400CONFIG_CONTEXT_SWITCH_TRACER=y
1401CONFIG_RING_BUFFER_ALLOW_SWAP=y
1402CONFIG_TRACING=y
1403CONFIG_TRACING_SUPPORT=y
1404CONFIG_FTRACE=y
1405# CONFIG_IRQSOFF_TRACER is not set
1406# CONFIG_SCHED_TRACER is not set
1407# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1408# CONFIG_BOOT_TRACER is not set
1409CONFIG_BRANCH_PROFILE_NONE=y
1410# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1411# CONFIG_PROFILE_ALL_BRANCHES is not set
1412# CONFIG_KMEMTRACE is not set
1413# CONFIG_WORKQUEUE_TRACER is not set
1414# CONFIG_BLK_DEV_IO_TRACE is not set
1415# CONFIG_RING_BUFFER_BENCHMARK is not set
1416# CONFIG_DYNAMIC_DEBUG is not set
1417# CONFIG_SAMPLES is not set
1418
1419#
1420# Security options
1421#
1422# CONFIG_KEYS is not set
1423# CONFIG_SECURITY is not set
1424# CONFIG_SECURITYFS is not set
1425# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1426CONFIG_CRYPTO=y
1427
1428#
1429# Crypto core or helper
1430#
1431# CONFIG_CRYPTO_FIPS is not set
1432CONFIG_CRYPTO_ALGAPI=y
1433CONFIG_CRYPTO_ALGAPI2=y
1434CONFIG_CRYPTO_AEAD=y
1435CONFIG_CRYPTO_AEAD2=y
1436CONFIG_CRYPTO_BLKCIPHER=y
1437CONFIG_CRYPTO_BLKCIPHER2=y
1438CONFIG_CRYPTO_HASH=y
1439CONFIG_CRYPTO_HASH2=y
1440CONFIG_CRYPTO_RNG=m
1441CONFIG_CRYPTO_RNG2=y
1442CONFIG_CRYPTO_PCOMP=y
1443CONFIG_CRYPTO_MANAGER=y
1444CONFIG_CRYPTO_MANAGER2=y
1445# CONFIG_CRYPTO_GF128MUL is not set
1446# CONFIG_CRYPTO_NULL is not set
1447CONFIG_CRYPTO_WORKQUEUE=y
1448# CONFIG_CRYPTO_CRYPTD is not set
1449CONFIG_CRYPTO_AUTHENC=y
1450# CONFIG_CRYPTO_TEST is not set
1451
1452#
1453# Authenticated Encryption with Associated Data
1454#
1455# CONFIG_CRYPTO_CCM is not set
1456# CONFIG_CRYPTO_GCM is not set
1457# CONFIG_CRYPTO_SEQIV is not set
1458
1459#
1460# Block modes
1461#
1462CONFIG_CRYPTO_CBC=y
1463# CONFIG_CRYPTO_CTR is not set
1464# CONFIG_CRYPTO_CTS is not set
1465CONFIG_CRYPTO_ECB=m
1466# CONFIG_CRYPTO_LRW is not set
1467# CONFIG_CRYPTO_PCBC is not set
1468# CONFIG_CRYPTO_XTS is not set
1469
1470#
1471# Hash modes
1472#
1473CONFIG_CRYPTO_HMAC=y
1474# CONFIG_CRYPTO_XCBC is not set
1475# CONFIG_CRYPTO_VMAC is not set
1476
1477#
1478# Digest
1479#
1480# CONFIG_CRYPTO_CRC32C is not set
1481# CONFIG_CRYPTO_GHASH is not set
1482# CONFIG_CRYPTO_MD4 is not set
1483CONFIG_CRYPTO_MD5=y
1484# CONFIG_CRYPTO_MICHAEL_MIC is not set
1485# CONFIG_CRYPTO_RMD128 is not set
1486# CONFIG_CRYPTO_RMD160 is not set
1487# CONFIG_CRYPTO_RMD256 is not set
1488# CONFIG_CRYPTO_RMD320 is not set
1489CONFIG_CRYPTO_SHA1=y
1490# CONFIG_CRYPTO_SHA256 is not set
1491# CONFIG_CRYPTO_SHA512 is not set
1492# CONFIG_CRYPTO_TGR192 is not set
1493# CONFIG_CRYPTO_WP512 is not set
1494
1495#
1496# Ciphers
1497#
1498CONFIG_CRYPTO_AES=m
1499# CONFIG_CRYPTO_ANUBIS is not set
1500CONFIG_CRYPTO_ARC4=m
1501# CONFIG_CRYPTO_BLOWFISH is not set
1502# CONFIG_CRYPTO_CAMELLIA is not set
1503# CONFIG_CRYPTO_CAST5 is not set
1504# CONFIG_CRYPTO_CAST6 is not set
1505CONFIG_CRYPTO_DES=y
1506# CONFIG_CRYPTO_FCRYPT is not set
1507# CONFIG_CRYPTO_KHAZAD is not set
1508# CONFIG_CRYPTO_SALSA20 is not set
1509# CONFIG_CRYPTO_SEED is not set
1510# CONFIG_CRYPTO_SERPENT is not set
1511# CONFIG_CRYPTO_TEA is not set
1512# CONFIG_CRYPTO_TWOFISH is not set
1513
1514#
1515# Compression
1516#
1517CONFIG_CRYPTO_DEFLATE=y
1518# CONFIG_CRYPTO_ZLIB is not set
1519CONFIG_CRYPTO_LZO=y
1520
1521#
1522# Random Number Generation
1523#
1524CONFIG_CRYPTO_ANSI_CPRNG=m
1525CONFIG_CRYPTO_HW=y
1526CONFIG_BINARY_PRINTF=y
1527
1528#
1529# Library routines
1530#
1531CONFIG_BITREVERSE=y
1532CONFIG_GENERIC_FIND_LAST_BIT=y
1533CONFIG_CRC_CCITT=m
1534CONFIG_CRC16=y
1535# CONFIG_CRC_T10DIF is not set
1536# CONFIG_CRC_ITU_T is not set
1537CONFIG_CRC32=y
1538# CONFIG_CRC7 is not set
1539# CONFIG_LIBCRC32C is not set
1540CONFIG_ZLIB_INFLATE=y
1541CONFIG_ZLIB_DEFLATE=y
1542CONFIG_LZO_COMPRESS=y
1543CONFIG_LZO_DECOMPRESS=y
1544CONFIG_DECOMPRESS_GZIP=y
1545CONFIG_GENERIC_ALLOCATOR=y
1546CONFIG_HAS_IOMEM=y
1547CONFIG_HAS_IOPORT=y
1548CONFIG_HAS_DMA=y
1549CONFIG_NLATTR=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index 0abe90adb1a4..42dafce02389 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.27-rc1 3# Linux kernel version: 2.6.32-rc5
4# Mon Aug 4 16:02:27 2008 4# Thu Oct 29 13:00:55 2009
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
24 25
25# 26#
26# General setup 27# General setup
@@ -34,21 +35,36 @@ CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
39# CONFIG_AUDIT is not set 41# CONFIG_AUDIT is not set
42
43#
44# RCU Subsystem
45#
46CONFIG_TREE_RCU=y
47# CONFIG_TREE_PREEMPT_RCU is not set
48# CONFIG_RCU_TRACE is not set
49CONFIG_RCU_FANOUT=32
50# CONFIG_RCU_FANOUT_EXACT is not set
51# CONFIG_TREE_RCU_TRACE is not set
40# CONFIG_IKCONFIG is not set 52# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14 53CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set
43# CONFIG_GROUP_SCHED is not set 54# CONFIG_GROUP_SCHED is not set
55# CONFIG_CGROUPS is not set
44CONFIG_SYSFS_DEPRECATED=y 56CONFIG_SYSFS_DEPRECATED=y
45CONFIG_SYSFS_DEPRECATED_V2=y 57CONFIG_SYSFS_DEPRECATED_V2=y
46CONFIG_RELAY=y 58CONFIG_RELAY=y
47# CONFIG_NAMESPACES is not set 59# CONFIG_NAMESPACES is not set
48CONFIG_BLK_DEV_INITRD=y 60CONFIG_BLK_DEV_INITRD=y
49CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
62CONFIG_RD_GZIP=y
63# CONFIG_RD_BZIP2 is not set
64# CONFIG_RD_LZMA is not set
50CONFIG_CC_OPTIMIZE_FOR_SIZE=y 65CONFIG_CC_OPTIMIZE_FOR_SIZE=y
51CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
52CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
53# CONFIG_SYSCTL_SYSCALL is not set 69# CONFIG_SYSCTL_SYSCALL is not set
54CONFIG_KALLSYMS=y 70CONFIG_KALLSYMS=y
@@ -58,38 +74,40 @@ CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y 74CONFIG_PRINTK=y
59CONFIG_BUG=y 75CONFIG_BUG=y
60CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
61# CONFIG_COMPAT_BRK is not set
62# CONFIG_BASE_FULL is not set 77# CONFIG_BASE_FULL is not set
63CONFIG_FUTEX=y 78CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y 79CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y 82CONFIG_EVENTFD=y
69CONFIG_SHMEM=y 83CONFIG_SHMEM=y
84CONFIG_AIO=y
85
86#
87# Kernel Performance Events And Counters
88#
70CONFIG_VM_EVENT_COUNTERS=y 89CONFIG_VM_EVENT_COUNTERS=y
71CONFIG_SLUB_DEBUG=y 90CONFIG_SLUB_DEBUG=y
91# CONFIG_COMPAT_BRK is not set
72# CONFIG_SLAB is not set 92# CONFIG_SLAB is not set
73CONFIG_SLUB=y 93CONFIG_SLUB=y
74# CONFIG_SLOB is not set 94# CONFIG_SLOB is not set
75CONFIG_PROFILING=y 95CONFIG_PROFILING=y
76# CONFIG_MARKERS is not set 96CONFIG_TRACEPOINTS=y
77CONFIG_OPROFILE=m 97CONFIG_OPROFILE=m
78CONFIG_HAVE_OPROFILE=y 98CONFIG_HAVE_OPROFILE=y
79CONFIG_KPROBES=y 99CONFIG_KPROBES=y
80# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
81# CONFIG_HAVE_IOREMAP_PROT is not set
82CONFIG_HAVE_KPROBES=y 100CONFIG_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 101CONFIG_HAVE_CLK=y
88CONFIG_PROC_PAGE_MONITOR=y 102
103#
104# GCOV-based kernel profiling
105#
106# CONFIG_GCOV_KERNEL is not set
107# CONFIG_SLOW_WORK is not set
89# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 108# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
90CONFIG_SLABINFO=y 109CONFIG_SLABINFO=y
91CONFIG_RT_MUTEXES=y 110CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=1 111CONFIG_BASE_SMALL=1
94CONFIG_MODULES=y 112CONFIG_MODULES=y
95# CONFIG_MODULE_FORCE_LOAD is not set 113# CONFIG_MODULE_FORCE_LOAD is not set
@@ -97,11 +115,8 @@ CONFIG_MODULE_UNLOAD=y
97# CONFIG_MODULE_FORCE_UNLOAD is not set 115# CONFIG_MODULE_FORCE_UNLOAD is not set
98# CONFIG_MODVERSIONS is not set 116# CONFIG_MODVERSIONS is not set
99# CONFIG_MODULE_SRCVERSION_ALL is not set 117# CONFIG_MODULE_SRCVERSION_ALL is not set
100CONFIG_KMOD=y
101CONFIG_BLOCK=y 118CONFIG_BLOCK=y
102# CONFIG_LBD is not set 119CONFIG_LBDAF=y
103# CONFIG_BLK_DEV_IO_TRACE is not set
104# CONFIG_LSF is not set
105# CONFIG_BLK_DEV_BSG is not set 120# CONFIG_BLK_DEV_BSG is not set
106# CONFIG_BLK_DEV_INTEGRITY is not set 121# CONFIG_BLK_DEV_INTEGRITY is not set
107 122
@@ -117,7 +132,7 @@ CONFIG_IOSCHED_CFQ=y
117CONFIG_DEFAULT_CFQ=y 132CONFIG_DEFAULT_CFQ=y
118# CONFIG_DEFAULT_NOOP is not set 133# CONFIG_DEFAULT_NOOP is not set
119CONFIG_DEFAULT_IOSCHED="cfq" 134CONFIG_DEFAULT_IOSCHED="cfq"
120CONFIG_CLASSIC_RCU=y 135CONFIG_FREEZER=y
121 136
122# 137#
123# System Type and features 138# System Type and features
@@ -133,7 +148,12 @@ CONFIG_PLATFORM_AT32AP=y
133CONFIG_CPU_AT32AP700X=y 148CONFIG_CPU_AT32AP700X=y
134CONFIG_CPU_AT32AP7000=y 149CONFIG_CPU_AT32AP7000=y
135CONFIG_BOARD_ATSTK1000=y 150CONFIG_BOARD_ATSTK1000=y
136# CONFIG_BOARD_ATNGW100 is not set 151# CONFIG_BOARD_ATNGW100_MKI is not set
152# CONFIG_BOARD_ATNGW100_MKII is not set
153# CONFIG_BOARD_HAMMERHEAD is not set
154# CONFIG_BOARD_FAVR_32 is not set
155# CONFIG_BOARD_MERISC is not set
156# CONFIG_BOARD_MIMC200 is not set
137CONFIG_BOARD_ATSTK1002=y 157CONFIG_BOARD_ATSTK1002=y
138# CONFIG_BOARD_ATSTK1003 is not set 158# CONFIG_BOARD_ATSTK1003 is not set
139# CONFIG_BOARD_ATSTK1004 is not set 159# CONFIG_BOARD_ATSTK1004 is not set
@@ -159,7 +179,7 @@ CONFIG_PREEMPT_NONE=y
159# CONFIG_PREEMPT_VOLUNTARY is not set 179# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set 180# CONFIG_PREEMPT is not set
161CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
162# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 182# CONFIG_HAVE_ARCH_BOOTMEM is not set
163# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 183# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
164# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 184# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
165CONFIG_ARCH_FLATMEM_ENABLE=y 185CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -171,14 +191,16 @@ CONFIG_FLATMEM_MANUAL=y
171# CONFIG_SPARSEMEM_MANUAL is not set 191# CONFIG_SPARSEMEM_MANUAL is not set
172CONFIG_FLATMEM=y 192CONFIG_FLATMEM=y
173CONFIG_FLAT_NODE_MEM_MAP=y 193CONFIG_FLAT_NODE_MEM_MAP=y
174# CONFIG_SPARSEMEM_STATIC is not set
175# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
176CONFIG_PAGEFLAGS_EXTENDED=y 194CONFIG_PAGEFLAGS_EXTENDED=y
177CONFIG_SPLIT_PTLOCK_CPUS=4 195CONFIG_SPLIT_PTLOCK_CPUS=4
178# CONFIG_RESOURCES_64BIT is not set 196# CONFIG_PHYS_ADDR_T_64BIT is not set
179CONFIG_ZONE_DMA_FLAG=0 197CONFIG_ZONE_DMA_FLAG=0
180CONFIG_NR_QUICK=2 198CONFIG_NR_QUICK=2
181CONFIG_VIRT_TO_BUS=y 199CONFIG_VIRT_TO_BUS=y
200CONFIG_HAVE_MLOCK=y
201CONFIG_HAVE_MLOCKED_PAGE_BIT=y
202# CONFIG_KSM is not set
203CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
182# CONFIG_OWNERSHIP_TRACE is not set 204# CONFIG_OWNERSHIP_TRACE is not set
183CONFIG_NMI_DEBUGGING=y 205CONFIG_NMI_DEBUGGING=y
184# CONFIG_HZ_100 is not set 206# CONFIG_HZ_100 is not set
@@ -186,7 +208,7 @@ CONFIG_HZ_250=y
186# CONFIG_HZ_300 is not set 208# CONFIG_HZ_300 is not set
187# CONFIG_HZ_1000 is not set 209# CONFIG_HZ_1000 is not set
188CONFIG_HZ=250 210CONFIG_HZ=250
189# CONFIG_SCHED_HRTICK is not set 211CONFIG_SCHED_HRTICK=y
190CONFIG_CMDLINE="" 212CONFIG_CMDLINE=""
191 213
192# 214#
@@ -197,6 +219,7 @@ CONFIG_PM=y
197CONFIG_PM_SLEEP=y 219CONFIG_PM_SLEEP=y
198CONFIG_SUSPEND=y 220CONFIG_SUSPEND=y
199CONFIG_SUSPEND_FREEZER=y 221CONFIG_SUSPEND_FREEZER=y
222# CONFIG_PM_RUNTIME is not set
200CONFIG_ARCH_SUSPEND_POSSIBLE=y 223CONFIG_ARCH_SUSPEND_POSSIBLE=y
201 224
202# 225#
@@ -228,6 +251,8 @@ CONFIG_CPU_FREQ_AT32AP=y
228# Executable file formats 251# Executable file formats
229# 252#
230CONFIG_BINFMT_ELF=y 253CONFIG_BINFMT_ELF=y
254# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
255# CONFIG_HAVE_AOUT is not set
231# CONFIG_BINFMT_MISC is not set 256# CONFIG_BINFMT_MISC is not set
232CONFIG_NET=y 257CONFIG_NET=y
233 258
@@ -295,10 +320,12 @@ CONFIG_IPV6_TUNNEL=m
295# CONFIG_NETFILTER is not set 320# CONFIG_NETFILTER is not set
296# CONFIG_IP_DCCP is not set 321# CONFIG_IP_DCCP is not set
297# CONFIG_IP_SCTP is not set 322# CONFIG_IP_SCTP is not set
323# CONFIG_RDS is not set
298# CONFIG_TIPC is not set 324# CONFIG_TIPC is not set
299# CONFIG_ATM is not set 325# CONFIG_ATM is not set
300CONFIG_STP=m 326CONFIG_STP=m
301CONFIG_BRIDGE=m 327CONFIG_BRIDGE=m
328# CONFIG_NET_DSA is not set
302# CONFIG_VLAN_8021Q is not set 329# CONFIG_VLAN_8021Q is not set
303# CONFIG_DECNET is not set 330# CONFIG_DECNET is not set
304CONFIG_LLC=m 331CONFIG_LLC=m
@@ -309,26 +336,33 @@ CONFIG_LLC=m
309# CONFIG_LAPB is not set 336# CONFIG_LAPB is not set
310# CONFIG_ECONET is not set 337# CONFIG_ECONET is not set
311# CONFIG_WAN_ROUTER is not set 338# CONFIG_WAN_ROUTER is not set
339# CONFIG_PHONET is not set
340# CONFIG_IEEE802154 is not set
312# CONFIG_NET_SCHED is not set 341# CONFIG_NET_SCHED is not set
342# CONFIG_DCB is not set
313 343
314# 344#
315# Network testing 345# Network testing
316# 346#
317# CONFIG_NET_PKTGEN is not set 347# CONFIG_NET_PKTGEN is not set
318# CONFIG_NET_TCPPROBE is not set 348# CONFIG_NET_TCPPROBE is not set
349# CONFIG_NET_DROP_MONITOR is not set
319# CONFIG_HAMRADIO is not set 350# CONFIG_HAMRADIO is not set
320# CONFIG_CAN is not set 351# CONFIG_CAN is not set
321# CONFIG_IRDA is not set 352# CONFIG_IRDA is not set
322# CONFIG_BT is not set 353# CONFIG_BT is not set
323# CONFIG_AF_RXRPC is not set 354# CONFIG_AF_RXRPC is not set
355CONFIG_WIRELESS=y
356# CONFIG_CFG80211 is not set
357CONFIG_CFG80211_DEFAULT_PS_VALUE=0
358# CONFIG_WIRELESS_OLD_REGULATORY is not set
359# CONFIG_WIRELESS_EXT is not set
360# CONFIG_LIB80211 is not set
324 361
325# 362#
326# Wireless 363# CFG80211 needs to be enabled for MAC80211
327# 364#
328# CONFIG_CFG80211 is not set 365# CONFIG_WIMAX 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 366# CONFIG_RFKILL is not set
333# CONFIG_NET_9P is not set 367# CONFIG_NET_9P is not set
334 368
@@ -340,6 +374,7 @@ CONFIG_LLC=m
340# Generic Driver Options 374# Generic Driver Options
341# 375#
342CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 376CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
377# CONFIG_DEVTMPFS is not set
343CONFIG_STANDALONE=y 378CONFIG_STANDALONE=y
344# CONFIG_PREVENT_FIRMWARE_BUILD is not set 379# CONFIG_PREVENT_FIRMWARE_BUILD is not set
345# CONFIG_FW_LOADER is not set 380# CONFIG_FW_LOADER is not set
@@ -349,6 +384,7 @@ CONFIG_STANDALONE=y
349# CONFIG_CONNECTOR is not set 384# CONFIG_CONNECTOR is not set
350CONFIG_MTD=y 385CONFIG_MTD=y
351# CONFIG_MTD_DEBUG is not set 386# CONFIG_MTD_DEBUG is not set
387# CONFIG_MTD_TESTS is not set
352# CONFIG_MTD_CONCAT is not set 388# CONFIG_MTD_CONCAT is not set
353CONFIG_MTD_PARTITIONS=y 389CONFIG_MTD_PARTITIONS=y
354# CONFIG_MTD_REDBOOT_PARTS is not set 390# CONFIG_MTD_REDBOOT_PARTS is not set
@@ -398,17 +434,18 @@ CONFIG_MTD_CFI_UTIL=y
398# 434#
399# CONFIG_MTD_COMPLEX_MAPPINGS is not set 435# CONFIG_MTD_COMPLEX_MAPPINGS is not set
400CONFIG_MTD_PHYSMAP=y 436CONFIG_MTD_PHYSMAP=y
401CONFIG_MTD_PHYSMAP_START=0x8000000 437# CONFIG_MTD_PHYSMAP_COMPAT is not set
402CONFIG_MTD_PHYSMAP_LEN=0x0
403CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# CONFIG_MTD_PLATRAM is not set 438# CONFIG_MTD_PLATRAM is not set
405 439
406# 440#
407# Self-contained MTD device drivers 441# Self-contained MTD device drivers
408# 442#
409CONFIG_MTD_DATAFLASH=m 443CONFIG_MTD_DATAFLASH=m
444# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
445# CONFIG_MTD_DATAFLASH_OTP is not set
410CONFIG_MTD_M25P80=m 446CONFIG_MTD_M25P80=m
411CONFIG_M25PXX_USE_FAST_READ=y 447CONFIG_M25PXX_USE_FAST_READ=y
448# CONFIG_MTD_SST25L is not set
412# CONFIG_MTD_SLRAM is not set 449# CONFIG_MTD_SLRAM is not set
413# CONFIG_MTD_PHRAM is not set 450# CONFIG_MTD_PHRAM is not set
414# CONFIG_MTD_MTDRAM is not set 451# CONFIG_MTD_MTDRAM is not set
@@ -424,9 +461,22 @@ CONFIG_M25PXX_USE_FAST_READ=y
424# CONFIG_MTD_ONENAND is not set 461# CONFIG_MTD_ONENAND is not set
425 462
426# 463#
464# LPDDR flash memory drivers
465#
466# CONFIG_MTD_LPDDR is not set
467
468#
427# UBI - Unsorted block images 469# UBI - Unsorted block images
428# 470#
429# CONFIG_MTD_UBI is not set 471CONFIG_MTD_UBI=y
472CONFIG_MTD_UBI_WL_THRESHOLD=4096
473CONFIG_MTD_UBI_BEB_RESERVE=1
474# CONFIG_MTD_UBI_GLUEBI is not set
475
476#
477# UBI debugging options
478#
479# CONFIG_MTD_UBI_DEBUG is not set
430# CONFIG_PARPORT is not set 480# CONFIG_PARPORT is not set
431CONFIG_BLK_DEV=y 481CONFIG_BLK_DEV=y
432# CONFIG_BLK_DEV_COW_COMMON is not set 482# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -444,10 +494,20 @@ CONFIG_ATMEL_PWM=m
444CONFIG_ATMEL_TCLIB=y 494CONFIG_ATMEL_TCLIB=y
445CONFIG_ATMEL_TCB_CLKSRC=y 495CONFIG_ATMEL_TCB_CLKSRC=y
446CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 496CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
447# CONFIG_EEPROM_93CX6 is not set 497# CONFIG_ICS932S401 is not set
448CONFIG_ATMEL_SSC=m 498CONFIG_ATMEL_SSC=m
449# CONFIG_ENCLOSURE_SERVICES is not set 499# CONFIG_ENCLOSURE_SERVICES is not set
450# CONFIG_HAVE_IDE is not set 500# CONFIG_ISL29003 is not set
501# CONFIG_C2PORT is not set
502
503#
504# EEPROM support
505#
506CONFIG_EEPROM_AT24=m
507# CONFIG_EEPROM_AT25 is not set
508# CONFIG_EEPROM_LEGACY is not set
509# CONFIG_EEPROM_MAX6875 is not set
510# CONFIG_EEPROM_93CX6 is not set
451 511
452# 512#
453# SCSI device support 513# SCSI device support
@@ -469,10 +529,6 @@ CONFIG_BLK_DEV_SR=m
469# CONFIG_BLK_DEV_SR_VENDOR is not set 529# CONFIG_BLK_DEV_SR_VENDOR is not set
470# CONFIG_CHR_DEV_SG is not set 530# CONFIG_CHR_DEV_SG is not set
471# CONFIG_CHR_DEV_SCH is not set 531# CONFIG_CHR_DEV_SCH is not set
472
473#
474# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
475#
476# CONFIG_SCSI_MULTI_LUN is not set 532# CONFIG_SCSI_MULTI_LUN is not set
477# CONFIG_SCSI_CONSTANTS is not set 533# CONFIG_SCSI_CONSTANTS is not set
478# CONFIG_SCSI_LOGGING is not set 534# CONFIG_SCSI_LOGGING is not set
@@ -489,8 +545,10 @@ CONFIG_SCSI_WAIT_SCAN=m
489# CONFIG_SCSI_SRP_ATTRS is not set 545# CONFIG_SCSI_SRP_ATTRS is not set
490# CONFIG_SCSI_LOWLEVEL is not set 546# CONFIG_SCSI_LOWLEVEL is not set
491# CONFIG_SCSI_DH is not set 547# CONFIG_SCSI_DH is not set
548# CONFIG_SCSI_OSD_INITIATOR is not set
492CONFIG_ATA=m 549CONFIG_ATA=m
493# CONFIG_ATA_NONSTANDARD is not set 550# CONFIG_ATA_NONSTANDARD is not set
551CONFIG_ATA_VERBOSE_ERROR=y
494# CONFIG_SATA_PMP is not set 552# CONFIG_SATA_PMP is not set
495CONFIG_ATA_SFF=y 553CONFIG_ATA_SFF=y
496# CONFIG_SATA_MV is not set 554# CONFIG_SATA_MV is not set
@@ -519,26 +577,37 @@ CONFIG_PHYLIB=y
519# CONFIG_BROADCOM_PHY is not set 577# CONFIG_BROADCOM_PHY is not set
520# CONFIG_ICPLUS_PHY is not set 578# CONFIG_ICPLUS_PHY is not set
521# CONFIG_REALTEK_PHY is not set 579# CONFIG_REALTEK_PHY is not set
580# CONFIG_NATIONAL_PHY is not set
581# CONFIG_STE10XP is not set
582# CONFIG_LSI_ET1011C_PHY is not set
522# CONFIG_FIXED_PHY is not set 583# CONFIG_FIXED_PHY is not set
523# CONFIG_MDIO_BITBANG is not set 584# CONFIG_MDIO_BITBANG is not set
524CONFIG_NET_ETHERNET=y 585CONFIG_NET_ETHERNET=y
525# CONFIG_MII is not set 586# CONFIG_MII is not set
526CONFIG_MACB=y 587CONFIG_MACB=y
527# CONFIG_ENC28J60 is not set 588# CONFIG_ENC28J60 is not set
589# CONFIG_ETHOC is not set
590# CONFIG_DNET is not set
528# CONFIG_IBM_NEW_EMAC_ZMII is not set 591# CONFIG_IBM_NEW_EMAC_ZMII is not set
529# CONFIG_IBM_NEW_EMAC_RGMII is not set 592# CONFIG_IBM_NEW_EMAC_RGMII is not set
530# CONFIG_IBM_NEW_EMAC_TAH is not set 593# CONFIG_IBM_NEW_EMAC_TAH is not set
531# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 594# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
595# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
596# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
597# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
532# CONFIG_B44 is not set 598# CONFIG_B44 is not set
599# CONFIG_KS8842 is not set
600# CONFIG_KS8851 is not set
601# CONFIG_KS8851_MLL is not set
533# CONFIG_NETDEV_1000 is not set 602# CONFIG_NETDEV_1000 is not set
534# CONFIG_NETDEV_10000 is not set 603# CONFIG_NETDEV_10000 is not set
604CONFIG_WLAN=y
605# CONFIG_WLAN_PRE80211 is not set
606# CONFIG_WLAN_80211 is not set
535 607
536# 608#
537# Wireless LAN 609# Enable WiMAX (Networking options) to see the WiMAX drivers
538# 610#
539# CONFIG_WLAN_PRE80211 is not set
540# CONFIG_WLAN_80211 is not set
541# CONFIG_IWLWIFI_LEDS is not set
542# CONFIG_WAN is not set 611# CONFIG_WAN is not set
543CONFIG_PPP=m 612CONFIG_PPP=m
544# CONFIG_PPP_MULTILINK is not set 613# CONFIG_PPP_MULTILINK is not set
@@ -580,18 +649,25 @@ CONFIG_INPUT_EVDEV=m
580# Input Device Drivers 649# Input Device Drivers
581# 650#
582CONFIG_INPUT_KEYBOARD=y 651CONFIG_INPUT_KEYBOARD=y
652# CONFIG_KEYBOARD_ADP5588 is not set
583# CONFIG_KEYBOARD_ATKBD is not set 653# CONFIG_KEYBOARD_ATKBD is not set
584# CONFIG_KEYBOARD_SUNKBD is not set 654# CONFIG_QT2160 is not set
585# CONFIG_KEYBOARD_LKKBD is not set 655# CONFIG_KEYBOARD_LKKBD is not set
586# CONFIG_KEYBOARD_XTKBD is not set 656CONFIG_KEYBOARD_GPIO=m
657# CONFIG_KEYBOARD_MATRIX is not set
658# CONFIG_KEYBOARD_LM8323 is not set
659# CONFIG_KEYBOARD_MAX7359 is not set
587# CONFIG_KEYBOARD_NEWTON is not set 660# CONFIG_KEYBOARD_NEWTON is not set
661# CONFIG_KEYBOARD_OPENCORES is not set
588# CONFIG_KEYBOARD_STOWAWAY is not set 662# CONFIG_KEYBOARD_STOWAWAY is not set
589CONFIG_KEYBOARD_GPIO=m 663# CONFIG_KEYBOARD_SUNKBD is not set
664# CONFIG_KEYBOARD_XTKBD is not set
590CONFIG_INPUT_MOUSE=y 665CONFIG_INPUT_MOUSE=y
591# CONFIG_MOUSE_PS2 is not set 666# CONFIG_MOUSE_PS2 is not set
592# CONFIG_MOUSE_SERIAL is not set 667# CONFIG_MOUSE_SERIAL is not set
593# CONFIG_MOUSE_VSXXXAA is not set 668# CONFIG_MOUSE_VSXXXAA is not set
594CONFIG_MOUSE_GPIO=m 669CONFIG_MOUSE_GPIO=m
670# CONFIG_MOUSE_SYNAPTICS_I2C is not set
595# CONFIG_INPUT_JOYSTICK is not set 671# CONFIG_INPUT_JOYSTICK is not set
596# CONFIG_INPUT_TABLET is not set 672# CONFIG_INPUT_TABLET is not set
597# CONFIG_INPUT_TOUCHSCREEN is not set 673# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -622,9 +698,11 @@ CONFIG_SERIAL_ATMEL=y
622CONFIG_SERIAL_ATMEL_CONSOLE=y 698CONFIG_SERIAL_ATMEL_CONSOLE=y
623CONFIG_SERIAL_ATMEL_PDC=y 699CONFIG_SERIAL_ATMEL_PDC=y
624# CONFIG_SERIAL_ATMEL_TTYAT is not set 700# CONFIG_SERIAL_ATMEL_TTYAT is not set
701# CONFIG_SERIAL_MAX3100 is not set
625CONFIG_SERIAL_CORE=y 702CONFIG_SERIAL_CORE=y
626CONFIG_SERIAL_CORE_CONSOLE=y 703CONFIG_SERIAL_CORE_CONSOLE=y
627CONFIG_UNIX98_PTYS=y 704CONFIG_UNIX98_PTYS=y
705# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
628# CONFIG_LEGACY_PTYS is not set 706# CONFIG_LEGACY_PTYS is not set
629# CONFIG_IPMI_HANDLER is not set 707# CONFIG_IPMI_HANDLER is not set
630# CONFIG_HW_RANDOM is not set 708# CONFIG_HW_RANDOM is not set
@@ -633,7 +711,9 @@ CONFIG_UNIX98_PTYS=y
633# CONFIG_TCG_TPM is not set 711# CONFIG_TCG_TPM is not set
634CONFIG_I2C=m 712CONFIG_I2C=m
635CONFIG_I2C_BOARDINFO=y 713CONFIG_I2C_BOARDINFO=y
714CONFIG_I2C_COMPAT=y
636CONFIG_I2C_CHARDEV=m 715CONFIG_I2C_CHARDEV=m
716CONFIG_I2C_HELPER_AUTO=y
637CONFIG_I2C_ALGOBIT=m 717CONFIG_I2C_ALGOBIT=m
638 718
639# 719#
@@ -643,6 +723,7 @@ CONFIG_I2C_ALGOBIT=m
643# 723#
644# I2C system bus drivers (mostly embedded / system-on-chip) 724# I2C system bus drivers (mostly embedded / system-on-chip)
645# 725#
726# CONFIG_I2C_DESIGNWARE is not set
646CONFIG_I2C_GPIO=m 727CONFIG_I2C_GPIO=m
647# CONFIG_I2C_OCORES is not set 728# CONFIG_I2C_OCORES is not set
648# CONFIG_I2C_SIMTEC is not set 729# CONFIG_I2C_SIMTEC is not set
@@ -663,14 +744,6 @@ CONFIG_I2C_GPIO=m
663# Miscellaneous I2C Chip support 744# Miscellaneous I2C Chip support
664# 745#
665# CONFIG_DS1682 is not set 746# CONFIG_DS1682 is not set
666CONFIG_EEPROM_AT24=m
667# CONFIG_EEPROM_LEGACY is not set
668# CONFIG_SENSORS_PCF8574 is not set
669# CONFIG_PCF8575 is not set
670# CONFIG_SENSORS_PCA9539 is not set
671# CONFIG_SENSORS_PCF8591 is not set
672# CONFIG_TPS65010 is not set
673# CONFIG_SENSORS_MAX6875 is not set
674# CONFIG_SENSORS_TSL2550 is not set 747# CONFIG_SENSORS_TSL2550 is not set
675# CONFIG_I2C_DEBUG_CORE is not set 748# CONFIG_I2C_DEBUG_CORE is not set
676# CONFIG_I2C_DEBUG_ALGO is not set 749# CONFIG_I2C_DEBUG_ALGO is not set
@@ -685,19 +758,28 @@ CONFIG_SPI_MASTER=y
685# 758#
686CONFIG_SPI_ATMEL=y 759CONFIG_SPI_ATMEL=y
687# CONFIG_SPI_BITBANG is not set 760# CONFIG_SPI_BITBANG is not set
761# CONFIG_SPI_GPIO is not set
688 762
689# 763#
690# SPI Protocol Masters 764# SPI Protocol Masters
691# 765#
692# CONFIG_EEPROM_AT25 is not set
693CONFIG_SPI_SPIDEV=m 766CONFIG_SPI_SPIDEV=m
694# CONFIG_SPI_TLE62X0 is not set 767# CONFIG_SPI_TLE62X0 is not set
768
769#
770# PPS support
771#
772# CONFIG_PPS is not set
695CONFIG_ARCH_REQUIRE_GPIOLIB=y 773CONFIG_ARCH_REQUIRE_GPIOLIB=y
696CONFIG_GPIOLIB=y 774CONFIG_GPIOLIB=y
697# CONFIG_DEBUG_GPIO is not set 775# CONFIG_DEBUG_GPIO is not set
698CONFIG_GPIO_SYSFS=y 776CONFIG_GPIO_SYSFS=y
699 777
700# 778#
779# Memory mapped GPIO expanders:
780#
781
782#
701# I2C GPIO expanders: 783# I2C GPIO expanders:
702# 784#
703# CONFIG_GPIO_MAX732X is not set 785# CONFIG_GPIO_MAX732X is not set
@@ -713,11 +795,15 @@ CONFIG_GPIO_SYSFS=y
713# 795#
714# CONFIG_GPIO_MAX7301 is not set 796# CONFIG_GPIO_MAX7301 is not set
715# CONFIG_GPIO_MCP23S08 is not set 797# CONFIG_GPIO_MCP23S08 is not set
798# CONFIG_GPIO_MC33880 is not set
799
800#
801# AC97 GPIO expanders:
802#
716# CONFIG_W1 is not set 803# CONFIG_W1 is not set
717# CONFIG_POWER_SUPPLY is not set 804# CONFIG_POWER_SUPPLY is not set
718# CONFIG_HWMON is not set 805# CONFIG_HWMON is not set
719# CONFIG_THERMAL is not set 806# CONFIG_THERMAL is not set
720# CONFIG_THERMAL_HWMON is not set
721CONFIG_WATCHDOG=y 807CONFIG_WATCHDOG=y
722# CONFIG_WATCHDOG_NOWAYOUT is not set 808# CONFIG_WATCHDOG_NOWAYOUT is not set
723 809
@@ -726,11 +812,11 @@ CONFIG_WATCHDOG=y
726# 812#
727# CONFIG_SOFT_WATCHDOG is not set 813# CONFIG_SOFT_WATCHDOG is not set
728CONFIG_AT32AP700X_WDT=y 814CONFIG_AT32AP700X_WDT=y
815CONFIG_SSB_POSSIBLE=y
729 816
730# 817#
731# Sonics Silicon Backplane 818# Sonics Silicon Backplane
732# 819#
733CONFIG_SSB_POSSIBLE=y
734# CONFIG_SSB is not set 820# CONFIG_SSB is not set
735 821
736# 822#
@@ -739,22 +825,17 @@ CONFIG_SSB_POSSIBLE=y
739# CONFIG_MFD_CORE is not set 825# CONFIG_MFD_CORE is not set
740# CONFIG_MFD_SM501 is not set 826# CONFIG_MFD_SM501 is not set
741# CONFIG_HTC_PASIC3 is not set 827# CONFIG_HTC_PASIC3 is not set
742 828# CONFIG_TPS65010 is not set
743# 829# CONFIG_MFD_TMIO is not set
744# Multimedia devices 830# CONFIG_MFD_WM8400 is not set
745# 831# CONFIG_MFD_WM831X is not set
746 832# CONFIG_MFD_WM8350_I2C is not set
747# 833# CONFIG_MFD_PCF50633 is not set
748# Multimedia core support 834# CONFIG_MFD_MC13783 is not set
749# 835# CONFIG_AB3100_CORE is not set
750# CONFIG_VIDEO_DEV is not set 836# CONFIG_EZX_PCAP is not set
751# CONFIG_DVB_CORE is not set 837# CONFIG_REGULATOR is not set
752# CONFIG_VIDEO_MEDIA is not set 838# CONFIG_MEDIA_SUPPORT is not set
753
754#
755# Multimedia drivers
756#
757# CONFIG_DAB is not set
758 839
759# 840#
760# Graphics support 841# Graphics support
@@ -764,6 +845,7 @@ CONFIG_SSB_POSSIBLE=y
764CONFIG_FB=y 845CONFIG_FB=y
765# CONFIG_FIRMWARE_EDID is not set 846# CONFIG_FIRMWARE_EDID is not set
766# CONFIG_FB_DDC is not set 847# CONFIG_FB_DDC is not set
848# CONFIG_FB_BOOT_VESA_SUPPORT is not set
767CONFIG_FB_CFB_FILLRECT=y 849CONFIG_FB_CFB_FILLRECT=y
768CONFIG_FB_CFB_COPYAREA=y 850CONFIG_FB_CFB_COPYAREA=y
769CONFIG_FB_CFB_IMAGEBLIT=y 851CONFIG_FB_CFB_IMAGEBLIT=y
@@ -785,10 +867,15 @@ CONFIG_FB_CFB_IMAGEBLIT=y
785# CONFIG_FB_S1D13XXX is not set 867# CONFIG_FB_S1D13XXX is not set
786CONFIG_FB_ATMEL=y 868CONFIG_FB_ATMEL=y
787# CONFIG_FB_VIRTUAL is not set 869# CONFIG_FB_VIRTUAL is not set
870# CONFIG_FB_METRONOME is not set
871# CONFIG_FB_MB862XX is not set
872# CONFIG_FB_BROADSHEET is not set
788CONFIG_BACKLIGHT_LCD_SUPPORT=y 873CONFIG_BACKLIGHT_LCD_SUPPORT=y
789CONFIG_LCD_CLASS_DEVICE=y 874CONFIG_LCD_CLASS_DEVICE=y
875# CONFIG_LCD_LMS283GF05 is not set
790CONFIG_LCD_LTV350QV=y 876CONFIG_LCD_LTV350QV=y
791# CONFIG_LCD_ILI9320 is not set 877# CONFIG_LCD_ILI9320 is not set
878# CONFIG_LCD_TDO24M is not set
792# CONFIG_LCD_VGG2432A4 is not set 879# CONFIG_LCD_VGG2432A4 is not set
793# CONFIG_LCD_PLATFORM is not set 880# CONFIG_LCD_PLATFORM is not set
794# CONFIG_BACKLIGHT_CLASS_DEVICE is not set 881# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
@@ -799,6 +886,8 @@ CONFIG_LCD_LTV350QV=y
799# CONFIG_DISPLAY_SUPPORT is not set 886# CONFIG_DISPLAY_SUPPORT is not set
800# CONFIG_LOGO is not set 887# CONFIG_LOGO is not set
801CONFIG_SOUND=m 888CONFIG_SOUND=m
889CONFIG_SOUND_OSS_CORE=y
890CONFIG_SOUND_OSS_CORE_PRECLAIM=y
802CONFIG_SND=m 891CONFIG_SND=m
803CONFIG_SND_TIMER=m 892CONFIG_SND_TIMER=m
804CONFIG_SND_PCM=m 893CONFIG_SND_PCM=m
@@ -807,12 +896,24 @@ CONFIG_SND_OSSEMUL=y
807CONFIG_SND_MIXER_OSS=m 896CONFIG_SND_MIXER_OSS=m
808CONFIG_SND_PCM_OSS=m 897CONFIG_SND_PCM_OSS=m
809CONFIG_SND_PCM_OSS_PLUGINS=y 898CONFIG_SND_PCM_OSS_PLUGINS=y
899# CONFIG_SND_HRTIMER is not set
810# CONFIG_SND_DYNAMIC_MINORS is not set 900# CONFIG_SND_DYNAMIC_MINORS is not set
811# CONFIG_SND_SUPPORT_OLD_API is not set 901# CONFIG_SND_SUPPORT_OLD_API is not set
812# CONFIG_SND_VERBOSE_PROCFS is not set 902# CONFIG_SND_VERBOSE_PROCFS is not set
813# CONFIG_SND_VERBOSE_PRINTK is not set 903# CONFIG_SND_VERBOSE_PRINTK is not set
814# CONFIG_SND_DEBUG is not set 904# CONFIG_SND_DEBUG is not set
905# CONFIG_SND_RAWMIDI_SEQ is not set
906# CONFIG_SND_OPL3_LIB_SEQ is not set
907# CONFIG_SND_OPL4_LIB_SEQ is not set
908# CONFIG_SND_SBAWE_SEQ is not set
909# CONFIG_SND_EMU10K1_SEQ is not set
815# CONFIG_SND_DRIVERS is not set 910# CONFIG_SND_DRIVERS is not set
911
912#
913# Atmel devices (AVR32 and AT91)
914#
915# CONFIG_SND_ATMEL_ABDAC is not set
916# CONFIG_SND_ATMEL_AC97C is not set
816CONFIG_SND_SPI=y 917CONFIG_SND_SPI=y
817CONFIG_SND_AT73C213=m 918CONFIG_SND_AT73C213=m
818CONFIG_SND_AT73C213_TARGET_BITRATE=48000 919CONFIG_SND_AT73C213_TARGET_BITRATE=48000
@@ -825,33 +926,43 @@ CONFIG_USB_SUPPORT=y
825# CONFIG_USB_ARCH_HAS_EHCI is not set 926# CONFIG_USB_ARCH_HAS_EHCI is not set
826# CONFIG_USB_OTG_WHITELIST is not set 927# CONFIG_USB_OTG_WHITELIST is not set
827# CONFIG_USB_OTG_BLACKLIST_HUB is not set 928# CONFIG_USB_OTG_BLACKLIST_HUB is not set
929# CONFIG_USB_GADGET_MUSB_HDRC is not set
828 930
829# 931#
830# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 932# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
831# 933#
832CONFIG_USB_GADGET=y 934CONFIG_USB_GADGET=y
833# CONFIG_USB_GADGET_DEBUG is not set 935# CONFIG_USB_GADGET_DEBUG is not set
834# CONFIG_USB_GADGET_DEBUG_FILES is not set 936# CONFIG_USB_GADGET_DEBUG_FILES is not set
835# CONFIG_USB_GADGET_DEBUG_FS is not set 937# CONFIG_USB_GADGET_DEBUG_FS is not set
938CONFIG_USB_GADGET_VBUS_DRAW=2
836CONFIG_USB_GADGET_SELECTED=y 939CONFIG_USB_GADGET_SELECTED=y
837# CONFIG_USB_GADGET_AMD5536UDC is not set 940# CONFIG_USB_GADGET_AT91 is not set
838CONFIG_USB_GADGET_ATMEL_USBA=y 941CONFIG_USB_GADGET_ATMEL_USBA=y
839CONFIG_USB_ATMEL_USBA=y 942CONFIG_USB_ATMEL_USBA=y
840# CONFIG_USB_GADGET_FSL_USB2 is not set 943# CONFIG_USB_GADGET_FSL_USB2 is not set
841# CONFIG_USB_GADGET_NET2280 is not set
842# CONFIG_USB_GADGET_PXA25X is not set
843# CONFIG_USB_GADGET_M66592 is not set
844# CONFIG_USB_GADGET_PXA27X is not set
845# CONFIG_USB_GADGET_GOKU is not set
846# CONFIG_USB_GADGET_LH7A40X is not set 944# CONFIG_USB_GADGET_LH7A40X is not set
847# CONFIG_USB_GADGET_OMAP is not set 945# CONFIG_USB_GADGET_OMAP is not set
946# CONFIG_USB_GADGET_PXA25X is not set
947# CONFIG_USB_GADGET_R8A66597 is not set
948# CONFIG_USB_GADGET_PXA27X is not set
949# CONFIG_USB_GADGET_S3C_HSOTG is not set
950# CONFIG_USB_GADGET_IMX is not set
848# CONFIG_USB_GADGET_S3C2410 is not set 951# CONFIG_USB_GADGET_S3C2410 is not set
849# CONFIG_USB_GADGET_AT91 is not set 952# CONFIG_USB_GADGET_M66592 is not set
953# CONFIG_USB_GADGET_AMD5536UDC is not set
954# CONFIG_USB_GADGET_FSL_QE is not set
955# CONFIG_USB_GADGET_CI13XXX is not set
956# CONFIG_USB_GADGET_NET2280 is not set
957# CONFIG_USB_GADGET_GOKU is not set
958# CONFIG_USB_GADGET_LANGWELL is not set
850# CONFIG_USB_GADGET_DUMMY_HCD is not set 959# CONFIG_USB_GADGET_DUMMY_HCD is not set
851CONFIG_USB_GADGET_DUALSPEED=y 960CONFIG_USB_GADGET_DUALSPEED=y
852CONFIG_USB_ZERO=m 961CONFIG_USB_ZERO=m
962# CONFIG_USB_AUDIO is not set
853CONFIG_USB_ETH=m 963CONFIG_USB_ETH=m
854CONFIG_USB_ETH_RNDIS=y 964CONFIG_USB_ETH_RNDIS=y
965# CONFIG_USB_ETH_EEM is not set
855CONFIG_USB_GADGETFS=m 966CONFIG_USB_GADGETFS=m
856CONFIG_USB_FILE_STORAGE=m 967CONFIG_USB_FILE_STORAGE=m
857# CONFIG_USB_FILE_STORAGE_TEST is not set 968# CONFIG_USB_FILE_STORAGE_TEST is not set
@@ -859,12 +970,18 @@ CONFIG_USB_G_SERIAL=m
859# CONFIG_USB_MIDI_GADGET is not set 970# CONFIG_USB_MIDI_GADGET is not set
860# CONFIG_USB_G_PRINTER is not set 971# CONFIG_USB_G_PRINTER is not set
861CONFIG_USB_CDC_COMPOSITE=m 972CONFIG_USB_CDC_COMPOSITE=m
973
974#
975# OTG and related infrastructure
976#
977# CONFIG_USB_GPIO_VBUS is not set
978# CONFIG_NOP_USB_XCEIV is not set
862CONFIG_MMC=y 979CONFIG_MMC=y
863# CONFIG_MMC_DEBUG is not set 980# CONFIG_MMC_DEBUG is not set
864# CONFIG_MMC_UNSAFE_RESUME is not set 981# CONFIG_MMC_UNSAFE_RESUME is not set
865 982
866# 983#
867# MMC/SD Card Drivers 984# MMC/SD/SDIO Card Drivers
868# 985#
869CONFIG_MMC_BLOCK=y 986CONFIG_MMC_BLOCK=y
870CONFIG_MMC_BLOCK_BOUNCE=y 987CONFIG_MMC_BLOCK_BOUNCE=y
@@ -872,10 +989,12 @@ CONFIG_MMC_BLOCK_BOUNCE=y
872# CONFIG_MMC_TEST is not set 989# CONFIG_MMC_TEST is not set
873 990
874# 991#
875# MMC/SD Host Controller Drivers 992# MMC/SD/SDIO Host Controller Drivers
876# 993#
877# CONFIG_MMC_SDHCI is not set 994# CONFIG_MMC_SDHCI is not set
995# CONFIG_MMC_AT91 is not set
878CONFIG_MMC_ATMELMCI=y 996CONFIG_MMC_ATMELMCI=y
997# CONFIG_MMC_ATMELMCI_DMA is not set
879CONFIG_MMC_SPI=m 998CONFIG_MMC_SPI=m
880# CONFIG_MEMSTICK is not set 999# CONFIG_MEMSTICK is not set
881CONFIG_NEW_LEDS=y 1000CONFIG_NEW_LEDS=y
@@ -887,7 +1006,11 @@ CONFIG_LEDS_CLASS=m
887CONFIG_LEDS_ATMEL_PWM=m 1006CONFIG_LEDS_ATMEL_PWM=m
888# CONFIG_LEDS_PCA9532 is not set 1007# CONFIG_LEDS_PCA9532 is not set
889CONFIG_LEDS_GPIO=m 1008CONFIG_LEDS_GPIO=m
1009CONFIG_LEDS_GPIO_PLATFORM=y
1010# CONFIG_LEDS_LP3944 is not set
890# CONFIG_LEDS_PCA955X is not set 1011# CONFIG_LEDS_PCA955X is not set
1012# CONFIG_LEDS_DAC124S085 is not set
1013# CONFIG_LEDS_BD2802 is not set
891 1014
892# 1015#
893# LED Triggers 1016# LED Triggers
@@ -895,7 +1018,13 @@ CONFIG_LEDS_GPIO=m
895CONFIG_LEDS_TRIGGERS=y 1018CONFIG_LEDS_TRIGGERS=y
896CONFIG_LEDS_TRIGGER_TIMER=m 1019CONFIG_LEDS_TRIGGER_TIMER=m
897CONFIG_LEDS_TRIGGER_HEARTBEAT=m 1020CONFIG_LEDS_TRIGGER_HEARTBEAT=m
1021# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1022# CONFIG_LEDS_TRIGGER_GPIO is not set
898CONFIG_LEDS_TRIGGER_DEFAULT_ON=m 1023CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
1024
1025#
1026# iptables trigger is under Netfilter config (LED target)
1027#
899# CONFIG_ACCESSIBILITY is not set 1028# CONFIG_ACCESSIBILITY is not set
900CONFIG_RTC_LIB=y 1029CONFIG_RTC_LIB=y
901CONFIG_RTC_CLASS=y 1030CONFIG_RTC_CLASS=y
@@ -927,25 +1056,33 @@ CONFIG_RTC_INTF_DEV=y
927# CONFIG_RTC_DRV_M41T80 is not set 1056# CONFIG_RTC_DRV_M41T80 is not set
928# CONFIG_RTC_DRV_S35390A is not set 1057# CONFIG_RTC_DRV_S35390A is not set
929# CONFIG_RTC_DRV_FM3130 is not set 1058# CONFIG_RTC_DRV_FM3130 is not set
1059# CONFIG_RTC_DRV_RX8581 is not set
1060# CONFIG_RTC_DRV_RX8025 is not set
930 1061
931# 1062#
932# SPI RTC drivers 1063# SPI RTC drivers
933# 1064#
934# CONFIG_RTC_DRV_M41T94 is not set 1065# CONFIG_RTC_DRV_M41T94 is not set
935# CONFIG_RTC_DRV_DS1305 is not set 1066# CONFIG_RTC_DRV_DS1305 is not set
1067# CONFIG_RTC_DRV_DS1390 is not set
936# CONFIG_RTC_DRV_MAX6902 is not set 1068# CONFIG_RTC_DRV_MAX6902 is not set
937# CONFIG_RTC_DRV_R9701 is not set 1069# CONFIG_RTC_DRV_R9701 is not set
938# CONFIG_RTC_DRV_RS5C348 is not set 1070# CONFIG_RTC_DRV_RS5C348 is not set
1071# CONFIG_RTC_DRV_DS3234 is not set
1072# CONFIG_RTC_DRV_PCF2123 is not set
939 1073
940# 1074#
941# Platform RTC drivers 1075# Platform RTC drivers
942# 1076#
1077# CONFIG_RTC_DRV_DS1286 is not set
943# CONFIG_RTC_DRV_DS1511 is not set 1078# CONFIG_RTC_DRV_DS1511 is not set
944# CONFIG_RTC_DRV_DS1553 is not set 1079# CONFIG_RTC_DRV_DS1553 is not set
945# CONFIG_RTC_DRV_DS1742 is not set 1080# CONFIG_RTC_DRV_DS1742 is not set
946# CONFIG_RTC_DRV_STK17TA8 is not set 1081# CONFIG_RTC_DRV_STK17TA8 is not set
947# CONFIG_RTC_DRV_M48T86 is not set 1082# CONFIG_RTC_DRV_M48T86 is not set
1083# CONFIG_RTC_DRV_M48T35 is not set
948# CONFIG_RTC_DRV_M48T59 is not set 1084# CONFIG_RTC_DRV_M48T59 is not set
1085# CONFIG_RTC_DRV_BQ4802 is not set
949# CONFIG_RTC_DRV_V3020 is not set 1086# CONFIG_RTC_DRV_V3020 is not set
950 1087
951# 1088#
@@ -964,25 +1101,45 @@ CONFIG_DMA_ENGINE=y
964# DMA Clients 1101# DMA Clients
965# 1102#
966# CONFIG_NET_DMA is not set 1103# CONFIG_NET_DMA is not set
1104# CONFIG_ASYNC_TX_DMA is not set
967# CONFIG_DMATEST is not set 1105# CONFIG_DMATEST is not set
1106# CONFIG_AUXDISPLAY is not set
968# CONFIG_UIO is not set 1107# CONFIG_UIO is not set
969 1108
970# 1109#
1110# TI VLYNQ
1111#
1112# CONFIG_STAGING is not set
1113
1114#
971# File systems 1115# File systems
972# 1116#
973CONFIG_EXT2_FS=y 1117CONFIG_EXT2_FS=y
974# CONFIG_EXT2_FS_XATTR is not set 1118# CONFIG_EXT2_FS_XATTR is not set
975# CONFIG_EXT2_FS_XIP is not set 1119# CONFIG_EXT2_FS_XIP is not set
976CONFIG_EXT3_FS=y 1120CONFIG_EXT3_FS=y
1121# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
977# CONFIG_EXT3_FS_XATTR is not set 1122# CONFIG_EXT3_FS_XATTR is not set
978# CONFIG_EXT4DEV_FS is not set 1123CONFIG_EXT4_FS=y
1124CONFIG_EXT4_FS_XATTR=y
1125# CONFIG_EXT4_FS_POSIX_ACL is not set
1126# CONFIG_EXT4_FS_SECURITY is not set
1127# CONFIG_EXT4_DEBUG is not set
979CONFIG_JBD=y 1128CONFIG_JBD=y
980# CONFIG_JBD_DEBUG is not set 1129# CONFIG_JBD_DEBUG is not set
1130CONFIG_JBD2=y
1131# CONFIG_JBD2_DEBUG is not set
1132CONFIG_FS_MBCACHE=y
981# CONFIG_REISERFS_FS is not set 1133# CONFIG_REISERFS_FS is not set
982# CONFIG_JFS_FS is not set 1134# CONFIG_JFS_FS is not set
983# CONFIG_FS_POSIX_ACL is not set 1135# CONFIG_FS_POSIX_ACL is not set
984# CONFIG_XFS_FS is not set 1136# CONFIG_XFS_FS is not set
1137# CONFIG_GFS2_FS is not set
985# CONFIG_OCFS2_FS is not set 1138# CONFIG_OCFS2_FS is not set
1139# CONFIG_BTRFS_FS is not set
1140# CONFIG_NILFS2_FS is not set
1141CONFIG_FILE_LOCKING=y
1142CONFIG_FSNOTIFY=y
986# CONFIG_DNOTIFY is not set 1143# CONFIG_DNOTIFY is not set
987CONFIG_INOTIFY=y 1144CONFIG_INOTIFY=y
988CONFIG_INOTIFY_USER=y 1145CONFIG_INOTIFY_USER=y
@@ -990,6 +1147,12 @@ CONFIG_INOTIFY_USER=y
990# CONFIG_AUTOFS_FS is not set 1147# CONFIG_AUTOFS_FS is not set
991# CONFIG_AUTOFS4_FS is not set 1148# CONFIG_AUTOFS4_FS is not set
992CONFIG_FUSE_FS=m 1149CONFIG_FUSE_FS=m
1150# CONFIG_CUSE is not set
1151
1152#
1153# Caches
1154#
1155# CONFIG_FSCACHE is not set
993 1156
994# 1157#
995# CD-ROM/DVD Filesystems 1158# CD-ROM/DVD Filesystems
@@ -1013,15 +1176,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1013CONFIG_PROC_FS=y 1176CONFIG_PROC_FS=y
1014CONFIG_PROC_KCORE=y 1177CONFIG_PROC_KCORE=y
1015CONFIG_PROC_SYSCTL=y 1178CONFIG_PROC_SYSCTL=y
1179CONFIG_PROC_PAGE_MONITOR=y
1016CONFIG_SYSFS=y 1180CONFIG_SYSFS=y
1017CONFIG_TMPFS=y 1181CONFIG_TMPFS=y
1018# CONFIG_TMPFS_POSIX_ACL is not set 1182# CONFIG_TMPFS_POSIX_ACL is not set
1019# CONFIG_HUGETLB_PAGE is not set 1183# CONFIG_HUGETLB_PAGE is not set
1020# CONFIG_CONFIGFS_FS is not set 1184# CONFIG_CONFIGFS_FS is not set
1021 1185CONFIG_MISC_FILESYSTEMS=y
1022#
1023# Miscellaneous filesystems
1024#
1025# CONFIG_ADFS_FS is not set 1186# CONFIG_ADFS_FS is not set
1026# CONFIG_AFFS_FS is not set 1187# CONFIG_AFFS_FS is not set
1027# CONFIG_HFS_FS is not set 1188# CONFIG_HFS_FS is not set
@@ -1039,7 +1200,14 @@ CONFIG_JFFS2_ZLIB=y
1039# CONFIG_JFFS2_LZO is not set 1200# CONFIG_JFFS2_LZO is not set
1040CONFIG_JFFS2_RTIME=y 1201CONFIG_JFFS2_RTIME=y
1041# CONFIG_JFFS2_RUBIN is not set 1202# CONFIG_JFFS2_RUBIN is not set
1203CONFIG_UBIFS_FS=y
1204# CONFIG_UBIFS_FS_XATTR is not set
1205# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1206CONFIG_UBIFS_FS_LZO=y
1207CONFIG_UBIFS_FS_ZLIB=y
1208# CONFIG_UBIFS_FS_DEBUG is not set
1042# CONFIG_CRAMFS is not set 1209# CONFIG_CRAMFS is not set
1210# CONFIG_SQUASHFS is not set
1043# CONFIG_VXFS_FS is not set 1211# CONFIG_VXFS_FS is not set
1044CONFIG_MINIX_FS=m 1212CONFIG_MINIX_FS=m
1045# CONFIG_OMFS_FS is not set 1213# CONFIG_OMFS_FS is not set
@@ -1122,6 +1290,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1122CONFIG_ENABLE_MUST_CHECK=y 1290CONFIG_ENABLE_MUST_CHECK=y
1123CONFIG_FRAME_WARN=1024 1291CONFIG_FRAME_WARN=1024
1124CONFIG_MAGIC_SYSRQ=y 1292CONFIG_MAGIC_SYSRQ=y
1293# CONFIG_STRIP_ASM_SYMS is not set
1125# CONFIG_UNUSED_SYMBOLS is not set 1294# CONFIG_UNUSED_SYMBOLS is not set
1126CONFIG_DEBUG_FS=y 1295CONFIG_DEBUG_FS=y
1127# CONFIG_HEADERS_CHECK is not set 1296# CONFIG_HEADERS_CHECK is not set
@@ -1130,6 +1299,9 @@ CONFIG_DEBUG_KERNEL=y
1130CONFIG_DETECT_SOFTLOCKUP=y 1299CONFIG_DETECT_SOFTLOCKUP=y
1131# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1300# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1132CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1301CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1302CONFIG_DETECT_HUNG_TASK=y
1303# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1304CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1133CONFIG_SCHED_DEBUG=y 1305CONFIG_SCHED_DEBUG=y
1134# CONFIG_SCHEDSTATS is not set 1306# CONFIG_SCHEDSTATS is not set
1135# CONFIG_TIMER_STATS is not set 1307# CONFIG_TIMER_STATS is not set
@@ -1145,6 +1317,7 @@ CONFIG_SCHED_DEBUG=y
1145# CONFIG_LOCK_STAT is not set 1317# CONFIG_LOCK_STAT is not set
1146# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1318# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1147# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1319# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1320CONFIG_STACKTRACE=y
1148# CONFIG_DEBUG_KOBJECT is not set 1321# CONFIG_DEBUG_KOBJECT is not set
1149CONFIG_DEBUG_BUGVERBOSE=y 1322CONFIG_DEBUG_BUGVERBOSE=y
1150# CONFIG_DEBUG_INFO is not set 1323# CONFIG_DEBUG_INFO is not set
@@ -1153,13 +1326,39 @@ CONFIG_DEBUG_BUGVERBOSE=y
1153# CONFIG_DEBUG_MEMORY_INIT is not set 1326# CONFIG_DEBUG_MEMORY_INIT is not set
1154# CONFIG_DEBUG_LIST is not set 1327# CONFIG_DEBUG_LIST is not set
1155# CONFIG_DEBUG_SG is not set 1328# CONFIG_DEBUG_SG is not set
1329# CONFIG_DEBUG_NOTIFIERS is not set
1330# CONFIG_DEBUG_CREDENTIALS is not set
1156CONFIG_FRAME_POINTER=y 1331CONFIG_FRAME_POINTER=y
1157# CONFIG_BOOT_PRINTK_DELAY is not set 1332# CONFIG_BOOT_PRINTK_DELAY is not set
1158# CONFIG_RCU_TORTURE_TEST is not set 1333# CONFIG_RCU_TORTURE_TEST is not set
1334# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1159# CONFIG_KPROBES_SANITY_TEST is not set 1335# CONFIG_KPROBES_SANITY_TEST is not set
1160# CONFIG_BACKTRACE_SELF_TEST is not set 1336# CONFIG_BACKTRACE_SELF_TEST is not set
1337# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1338# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1161# CONFIG_LKDTM is not set 1339# CONFIG_LKDTM is not set
1162# CONFIG_FAULT_INJECTION is not set 1340# CONFIG_FAULT_INJECTION is not set
1341# CONFIG_PAGE_POISONING is not set
1342CONFIG_NOP_TRACER=y
1343CONFIG_RING_BUFFER=y
1344CONFIG_EVENT_TRACING=y
1345CONFIG_CONTEXT_SWITCH_TRACER=y
1346CONFIG_RING_BUFFER_ALLOW_SWAP=y
1347CONFIG_TRACING=y
1348CONFIG_TRACING_SUPPORT=y
1349CONFIG_FTRACE=y
1350# CONFIG_IRQSOFF_TRACER is not set
1351# CONFIG_SCHED_TRACER is not set
1352# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1353# CONFIG_BOOT_TRACER is not set
1354CONFIG_BRANCH_PROFILE_NONE=y
1355# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1356# CONFIG_PROFILE_ALL_BRANCHES is not set
1357# CONFIG_KMEMTRACE is not set
1358# CONFIG_WORKQUEUE_TRACER is not set
1359# CONFIG_BLK_DEV_IO_TRACE is not set
1360# CONFIG_RING_BUFFER_BENCHMARK is not set
1361# CONFIG_DYNAMIC_DEBUG is not set
1163# CONFIG_SAMPLES is not set 1362# CONFIG_SAMPLES is not set
1164 1363
1165# 1364#
@@ -1167,19 +1366,30 @@ CONFIG_FRAME_POINTER=y
1167# 1366#
1168# CONFIG_KEYS is not set 1367# CONFIG_KEYS is not set
1169# CONFIG_SECURITY is not set 1368# CONFIG_SECURITY is not set
1369# CONFIG_SECURITYFS is not set
1170# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1370# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1171CONFIG_CRYPTO=y 1371CONFIG_CRYPTO=y
1172 1372
1173# 1373#
1174# Crypto core or helper 1374# Crypto core or helper
1175# 1375#
1176CONFIG_CRYPTO_ALGAPI=m 1376# CONFIG_CRYPTO_FIPS is not set
1377CONFIG_CRYPTO_ALGAPI=y
1378CONFIG_CRYPTO_ALGAPI2=y
1177CONFIG_CRYPTO_AEAD=m 1379CONFIG_CRYPTO_AEAD=m
1380CONFIG_CRYPTO_AEAD2=y
1178CONFIG_CRYPTO_BLKCIPHER=m 1381CONFIG_CRYPTO_BLKCIPHER=m
1382CONFIG_CRYPTO_BLKCIPHER2=y
1179CONFIG_CRYPTO_HASH=m 1383CONFIG_CRYPTO_HASH=m
1384CONFIG_CRYPTO_HASH2=y
1385CONFIG_CRYPTO_RNG=m
1386CONFIG_CRYPTO_RNG2=y
1387CONFIG_CRYPTO_PCOMP=y
1180CONFIG_CRYPTO_MANAGER=m 1388CONFIG_CRYPTO_MANAGER=m
1389CONFIG_CRYPTO_MANAGER2=y
1181# CONFIG_CRYPTO_GF128MUL is not set 1390# CONFIG_CRYPTO_GF128MUL is not set
1182# CONFIG_CRYPTO_NULL is not set 1391# CONFIG_CRYPTO_NULL is not set
1392CONFIG_CRYPTO_WORKQUEUE=y
1183# CONFIG_CRYPTO_CRYPTD is not set 1393# CONFIG_CRYPTO_CRYPTD is not set
1184CONFIG_CRYPTO_AUTHENC=m 1394CONFIG_CRYPTO_AUTHENC=m
1185# CONFIG_CRYPTO_TEST is not set 1395# CONFIG_CRYPTO_TEST is not set
@@ -1207,11 +1417,13 @@ CONFIG_CRYPTO_CBC=m
1207# 1417#
1208CONFIG_CRYPTO_HMAC=m 1418CONFIG_CRYPTO_HMAC=m
1209# CONFIG_CRYPTO_XCBC is not set 1419# CONFIG_CRYPTO_XCBC is not set
1420# CONFIG_CRYPTO_VMAC is not set
1210 1421
1211# 1422#
1212# Digest 1423# Digest
1213# 1424#
1214# CONFIG_CRYPTO_CRC32C is not set 1425# CONFIG_CRYPTO_CRC32C is not set
1426# CONFIG_CRYPTO_GHASH is not set
1215# CONFIG_CRYPTO_MD4 is not set 1427# CONFIG_CRYPTO_MD4 is not set
1216CONFIG_CRYPTO_MD5=m 1428CONFIG_CRYPTO_MD5=m
1217# CONFIG_CRYPTO_MICHAEL_MIC is not set 1429# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1228,7 +1440,7 @@ CONFIG_CRYPTO_SHA1=m
1228# 1440#
1229# Ciphers 1441# Ciphers
1230# 1442#
1231# CONFIG_CRYPTO_AES is not set 1443CONFIG_CRYPTO_AES=m
1232# CONFIG_CRYPTO_ANUBIS is not set 1444# CONFIG_CRYPTO_ANUBIS is not set
1233# CONFIG_CRYPTO_ARC4 is not set 1445# CONFIG_CRYPTO_ARC4 is not set
1234# CONFIG_CRYPTO_BLOWFISH is not set 1446# CONFIG_CRYPTO_BLOWFISH is not set
@@ -1247,18 +1459,24 @@ CONFIG_CRYPTO_DES=m
1247# 1459#
1248# Compression 1460# Compression
1249# 1461#
1250CONFIG_CRYPTO_DEFLATE=m 1462CONFIG_CRYPTO_DEFLATE=y
1251# CONFIG_CRYPTO_LZO is not set 1463# CONFIG_CRYPTO_ZLIB is not set
1464CONFIG_CRYPTO_LZO=y
1465
1466#
1467# Random Number Generation
1468#
1469CONFIG_CRYPTO_ANSI_CPRNG=m
1252# CONFIG_CRYPTO_HW is not set 1470# CONFIG_CRYPTO_HW is not set
1471CONFIG_BINARY_PRINTF=y
1253 1472
1254# 1473#
1255# Library routines 1474# Library routines
1256# 1475#
1257CONFIG_BITREVERSE=y 1476CONFIG_BITREVERSE=y
1258# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1477CONFIG_GENERIC_FIND_LAST_BIT=y
1259# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1260CONFIG_CRC_CCITT=m 1478CONFIG_CRC_CCITT=m
1261# CONFIG_CRC16 is not set 1479CONFIG_CRC16=y
1262CONFIG_CRC_T10DIF=m 1480CONFIG_CRC_T10DIF=m
1263CONFIG_CRC_ITU_T=m 1481CONFIG_CRC_ITU_T=m
1264CONFIG_CRC32=y 1482CONFIG_CRC32=y
@@ -1266,8 +1484,11 @@ CONFIG_CRC7=m
1266# CONFIG_LIBCRC32C is not set 1484# CONFIG_LIBCRC32C is not set
1267CONFIG_ZLIB_INFLATE=y 1485CONFIG_ZLIB_INFLATE=y
1268CONFIG_ZLIB_DEFLATE=y 1486CONFIG_ZLIB_DEFLATE=y
1487CONFIG_LZO_COMPRESS=y
1488CONFIG_LZO_DECOMPRESS=y
1489CONFIG_DECOMPRESS_GZIP=y
1269CONFIG_GENERIC_ALLOCATOR=y 1490CONFIG_GENERIC_ALLOCATOR=y
1270CONFIG_PLIST=y
1271CONFIG_HAS_IOMEM=y 1491CONFIG_HAS_IOMEM=y
1272CONFIG_HAS_IOPORT=y 1492CONFIG_HAS_IOPORT=y
1273CONFIG_HAS_DMA=y 1493CONFIG_HAS_DMA=y
1494CONFIG_NLATTR=y
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig
index c1603c4860e0..363e2381f32a 100644
--- a/arch/avr32/configs/atstk1006_defconfig
+++ b/arch/avr32/configs/atstk1006_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.28-rc8 3# Linux kernel version: 2.6.32-rc5
4# Thu Dec 18 11:22:23 2008 4# Thu Oct 29 13:00:25 2009
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -21,6 +21,7 @@ CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24CONFIG_CONSTRUCTORS=y
24 25
25# 26#
26# General setup 27# General setup
@@ -34,21 +35,36 @@ CONFIG_SWAP=y
34CONFIG_SYSVIPC=y 35CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y 36CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
38CONFIG_POSIX_MQUEUE_SYSCTL=y
37# CONFIG_BSD_PROCESS_ACCT is not set 39# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 40# CONFIG_TASKSTATS is not set
39# CONFIG_AUDIT is not set 41# CONFIG_AUDIT is not set
42
43#
44# RCU Subsystem
45#
46CONFIG_TREE_RCU=y
47# CONFIG_TREE_PREEMPT_RCU is not set
48# CONFIG_RCU_TRACE is not set
49CONFIG_RCU_FANOUT=32
50# CONFIG_RCU_FANOUT_EXACT is not set
51# CONFIG_TREE_RCU_TRACE is not set
40# CONFIG_IKCONFIG is not set 52# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14 53CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set
43# CONFIG_GROUP_SCHED is not set 54# CONFIG_GROUP_SCHED is not set
55# CONFIG_CGROUPS is not set
44CONFIG_SYSFS_DEPRECATED=y 56CONFIG_SYSFS_DEPRECATED=y
45CONFIG_SYSFS_DEPRECATED_V2=y 57CONFIG_SYSFS_DEPRECATED_V2=y
46CONFIG_RELAY=y 58CONFIG_RELAY=y
47# CONFIG_NAMESPACES is not set 59# CONFIG_NAMESPACES is not set
48CONFIG_BLK_DEV_INITRD=y 60CONFIG_BLK_DEV_INITRD=y
49CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
62CONFIG_RD_GZIP=y
63# CONFIG_RD_BZIP2 is not set
64# CONFIG_RD_LZMA is not set
50CONFIG_CC_OPTIMIZE_FOR_SIZE=y 65CONFIG_CC_OPTIMIZE_FOR_SIZE=y
51CONFIG_SYSCTL=y 66CONFIG_SYSCTL=y
67CONFIG_ANON_INODES=y
52CONFIG_EMBEDDED=y 68CONFIG_EMBEDDED=y
53# CONFIG_SYSCTL_SYSCALL is not set 69# CONFIG_SYSCTL_SYSCALL is not set
54CONFIG_KALLSYMS=y 70CONFIG_KALLSYMS=y
@@ -58,32 +74,40 @@ CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y 74CONFIG_PRINTK=y
59CONFIG_BUG=y 75CONFIG_BUG=y
60CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
61# CONFIG_COMPAT_BRK is not set
62# CONFIG_BASE_FULL is not set 77# CONFIG_BASE_FULL is not set
63CONFIG_FUTEX=y 78CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y 79CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y 80CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y 81CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y 82CONFIG_EVENTFD=y
69CONFIG_SHMEM=y 83CONFIG_SHMEM=y
70CONFIG_AIO=y 84CONFIG_AIO=y
85
86#
87# Kernel Performance Events And Counters
88#
71CONFIG_VM_EVENT_COUNTERS=y 89CONFIG_VM_EVENT_COUNTERS=y
72CONFIG_SLUB_DEBUG=y 90CONFIG_SLUB_DEBUG=y
91# CONFIG_COMPAT_BRK is not set
73# CONFIG_SLAB is not set 92# CONFIG_SLAB is not set
74CONFIG_SLUB=y 93CONFIG_SLUB=y
75# CONFIG_SLOB is not set 94# CONFIG_SLOB is not set
76CONFIG_PROFILING=y 95CONFIG_PROFILING=y
77# CONFIG_MARKERS is not set 96CONFIG_TRACEPOINTS=y
78CONFIG_OPROFILE=m 97CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y 98CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y 99CONFIG_KPROBES=y
81CONFIG_HAVE_KPROBES=y 100CONFIG_HAVE_KPROBES=y
82CONFIG_HAVE_CLK=y 101CONFIG_HAVE_CLK=y
102
103#
104# GCOV-based kernel profiling
105#
106# CONFIG_GCOV_KERNEL is not set
107# CONFIG_SLOW_WORK is not set
83# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 108# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
84CONFIG_SLABINFO=y 109CONFIG_SLABINFO=y
85CONFIG_RT_MUTEXES=y 110CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1 111CONFIG_BASE_SMALL=1
88CONFIG_MODULES=y 112CONFIG_MODULES=y
89# CONFIG_MODULE_FORCE_LOAD is not set 113# CONFIG_MODULE_FORCE_LOAD is not set
@@ -91,11 +115,8 @@ CONFIG_MODULE_UNLOAD=y
91# CONFIG_MODULE_FORCE_UNLOAD is not set 115# CONFIG_MODULE_FORCE_UNLOAD is not set
92# CONFIG_MODVERSIONS is not set 116# CONFIG_MODVERSIONS is not set
93# CONFIG_MODULE_SRCVERSION_ALL is not set 117# CONFIG_MODULE_SRCVERSION_ALL is not set
94CONFIG_KMOD=y
95CONFIG_BLOCK=y 118CONFIG_BLOCK=y
96# CONFIG_LBD is not set 119CONFIG_LBDAF=y
97# CONFIG_BLK_DEV_IO_TRACE is not set
98# CONFIG_LSF is not set
99# CONFIG_BLK_DEV_BSG is not set 120# CONFIG_BLK_DEV_BSG is not set
100# CONFIG_BLK_DEV_INTEGRITY is not set 121# CONFIG_BLK_DEV_INTEGRITY is not set
101 122
@@ -111,7 +132,6 @@ CONFIG_IOSCHED_CFQ=y
111CONFIG_DEFAULT_CFQ=y 132CONFIG_DEFAULT_CFQ=y
112# CONFIG_DEFAULT_NOOP is not set 133# CONFIG_DEFAULT_NOOP is not set
113CONFIG_DEFAULT_IOSCHED="cfq" 134CONFIG_DEFAULT_IOSCHED="cfq"
114CONFIG_CLASSIC_RCU=y
115CONFIG_FREEZER=y 135CONFIG_FREEZER=y
116 136
117# 137#
@@ -128,8 +148,11 @@ CONFIG_PLATFORM_AT32AP=y
128CONFIG_CPU_AT32AP700X=y 148CONFIG_CPU_AT32AP700X=y
129CONFIG_CPU_AT32AP7000=y 149CONFIG_CPU_AT32AP7000=y
130CONFIG_BOARD_ATSTK1000=y 150CONFIG_BOARD_ATSTK1000=y
131# CONFIG_BOARD_ATNGW100 is not set 151# CONFIG_BOARD_ATNGW100_MKI is not set
152# CONFIG_BOARD_ATNGW100_MKII is not set
153# CONFIG_BOARD_HAMMERHEAD is not set
132# CONFIG_BOARD_FAVR_32 is not set 154# CONFIG_BOARD_FAVR_32 is not set
155# CONFIG_BOARD_MERISC is not set
133# CONFIG_BOARD_MIMC200 is not set 156# CONFIG_BOARD_MIMC200 is not set
134# CONFIG_BOARD_ATSTK1002 is not set 157# CONFIG_BOARD_ATSTK1002 is not set
135# CONFIG_BOARD_ATSTK1003 is not set 158# CONFIG_BOARD_ATSTK1003 is not set
@@ -156,7 +179,7 @@ CONFIG_PREEMPT_NONE=y
156# CONFIG_PREEMPT_VOLUNTARY is not set 179# CONFIG_PREEMPT_VOLUNTARY is not set
157# CONFIG_PREEMPT is not set 180# CONFIG_PREEMPT is not set
158CONFIG_QUICKLIST=y 181CONFIG_QUICKLIST=y
159# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 182# CONFIG_HAVE_ARCH_BOOTMEM is not set
160# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 183# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
161# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 184# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
162CONFIG_ARCH_FLATMEM_ENABLE=y 185CONFIG_ARCH_FLATMEM_ENABLE=y
@@ -170,12 +193,14 @@ CONFIG_FLATMEM=y
170CONFIG_FLAT_NODE_MEM_MAP=y 193CONFIG_FLAT_NODE_MEM_MAP=y
171CONFIG_PAGEFLAGS_EXTENDED=y 194CONFIG_PAGEFLAGS_EXTENDED=y
172CONFIG_SPLIT_PTLOCK_CPUS=4 195CONFIG_SPLIT_PTLOCK_CPUS=4
173# CONFIG_RESOURCES_64BIT is not set
174# CONFIG_PHYS_ADDR_T_64BIT is not set 196# CONFIG_PHYS_ADDR_T_64BIT is not set
175CONFIG_ZONE_DMA_FLAG=0 197CONFIG_ZONE_DMA_FLAG=0
176CONFIG_NR_QUICK=2 198CONFIG_NR_QUICK=2
177CONFIG_VIRT_TO_BUS=y 199CONFIG_VIRT_TO_BUS=y
178CONFIG_UNEVICTABLE_LRU=y 200CONFIG_HAVE_MLOCK=y
201CONFIG_HAVE_MLOCKED_PAGE_BIT=y
202# CONFIG_KSM is not set
203CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
179# CONFIG_OWNERSHIP_TRACE is not set 204# CONFIG_OWNERSHIP_TRACE is not set
180CONFIG_NMI_DEBUGGING=y 205CONFIG_NMI_DEBUGGING=y
181# CONFIG_HZ_100 is not set 206# CONFIG_HZ_100 is not set
@@ -194,6 +219,7 @@ CONFIG_PM=y
194CONFIG_PM_SLEEP=y 219CONFIG_PM_SLEEP=y
195CONFIG_SUSPEND=y 220CONFIG_SUSPEND=y
196CONFIG_SUSPEND_FREEZER=y 221CONFIG_SUSPEND_FREEZER=y
222# CONFIG_PM_RUNTIME is not set
197CONFIG_ARCH_SUSPEND_POSSIBLE=y 223CONFIG_ARCH_SUSPEND_POSSIBLE=y
198 224
199# 225#
@@ -294,6 +320,7 @@ CONFIG_IPV6_TUNNEL=m
294# CONFIG_NETFILTER is not set 320# CONFIG_NETFILTER is not set
295# CONFIG_IP_DCCP is not set 321# CONFIG_IP_DCCP is not set
296# CONFIG_IP_SCTP is not set 322# CONFIG_IP_SCTP is not set
323# CONFIG_RDS is not set
297# CONFIG_TIPC is not set 324# CONFIG_TIPC is not set
298# CONFIG_ATM is not set 325# CONFIG_ATM is not set
299CONFIG_STP=m 326CONFIG_STP=m
@@ -309,20 +336,24 @@ CONFIG_LLC=m
309# CONFIG_LAPB is not set 336# CONFIG_LAPB is not set
310# CONFIG_ECONET is not set 337# CONFIG_ECONET is not set
311# CONFIG_WAN_ROUTER is not set 338# CONFIG_WAN_ROUTER is not set
339# CONFIG_PHONET is not set
340# CONFIG_IEEE802154 is not set
312# CONFIG_NET_SCHED is not set 341# CONFIG_NET_SCHED is not set
342# CONFIG_DCB is not set
313 343
314# 344#
315# Network testing 345# Network testing
316# 346#
317# CONFIG_NET_PKTGEN is not set 347# CONFIG_NET_PKTGEN is not set
318# CONFIG_NET_TCPPROBE is not set 348# CONFIG_NET_TCPPROBE is not set
349# CONFIG_NET_DROP_MONITOR is not set
319# CONFIG_HAMRADIO is not set 350# CONFIG_HAMRADIO is not set
320# CONFIG_CAN is not set 351# CONFIG_CAN is not set
321# CONFIG_IRDA is not set 352# CONFIG_IRDA is not set
322# CONFIG_BT is not set 353# CONFIG_BT is not set
323# CONFIG_AF_RXRPC is not set 354# CONFIG_AF_RXRPC is not set
324# CONFIG_PHONET is not set
325# CONFIG_WIRELESS is not set 355# CONFIG_WIRELESS is not set
356# CONFIG_WIMAX is not set
326# CONFIG_RFKILL is not set 357# CONFIG_RFKILL is not set
327# CONFIG_NET_9P is not set 358# CONFIG_NET_9P is not set
328 359
@@ -334,6 +365,7 @@ CONFIG_LLC=m
334# Generic Driver Options 365# Generic Driver Options
335# 366#
336CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 367CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
368# CONFIG_DEVTMPFS is not set
337CONFIG_STANDALONE=y 369CONFIG_STANDALONE=y
338# CONFIG_PREVENT_FIRMWARE_BUILD is not set 370# CONFIG_PREVENT_FIRMWARE_BUILD is not set
339# CONFIG_FW_LOADER is not set 371# CONFIG_FW_LOADER is not set
@@ -343,6 +375,7 @@ CONFIG_STANDALONE=y
343# CONFIG_CONNECTOR is not set 375# CONFIG_CONNECTOR is not set
344CONFIG_MTD=y 376CONFIG_MTD=y
345# CONFIG_MTD_DEBUG is not set 377# CONFIG_MTD_DEBUG is not set
378# CONFIG_MTD_TESTS is not set
346# CONFIG_MTD_CONCAT is not set 379# CONFIG_MTD_CONCAT is not set
347CONFIG_MTD_PARTITIONS=y 380CONFIG_MTD_PARTITIONS=y
348# CONFIG_MTD_REDBOOT_PARTS is not set 381# CONFIG_MTD_REDBOOT_PARTS is not set
@@ -393,9 +426,7 @@ CONFIG_MTD_CFI_UTIL=y
393# 426#
394# CONFIG_MTD_COMPLEX_MAPPINGS is not set 427# CONFIG_MTD_COMPLEX_MAPPINGS is not set
395CONFIG_MTD_PHYSMAP=y 428CONFIG_MTD_PHYSMAP=y
396CONFIG_MTD_PHYSMAP_START=0x8000000 429# CONFIG_MTD_PHYSMAP_COMPAT is not set
397CONFIG_MTD_PHYSMAP_LEN=0x0
398CONFIG_MTD_PHYSMAP_BANKWIDTH=2
399# CONFIG_MTD_PLATRAM is not set 430# CONFIG_MTD_PLATRAM is not set
400 431
401# 432#
@@ -406,6 +437,7 @@ CONFIG_MTD_DATAFLASH=m
406CONFIG_MTD_DATAFLASH_OTP=y 437CONFIG_MTD_DATAFLASH_OTP=y
407CONFIG_MTD_M25P80=m 438CONFIG_MTD_M25P80=m
408CONFIG_M25PXX_USE_FAST_READ=y 439CONFIG_M25PXX_USE_FAST_READ=y
440# CONFIG_MTD_SST25L is not set
409# CONFIG_MTD_SLRAM is not set 441# CONFIG_MTD_SLRAM is not set
410# CONFIG_MTD_PHRAM is not set 442# CONFIG_MTD_PHRAM is not set
411# CONFIG_MTD_MTDRAM is not set 443# CONFIG_MTD_MTDRAM is not set
@@ -432,6 +464,11 @@ CONFIG_MTD_NAND_ATMEL_ECC_HW=y
432# CONFIG_MTD_ONENAND is not set 464# CONFIG_MTD_ONENAND is not set
433 465
434# 466#
467# LPDDR flash memory drivers
468#
469# CONFIG_MTD_LPDDR is not set
470
471#
435# UBI - Unsorted block images 472# UBI - Unsorted block images
436# 473#
437CONFIG_MTD_UBI=y 474CONFIG_MTD_UBI=y
@@ -460,13 +497,22 @@ CONFIG_ATMEL_PWM=m
460CONFIG_ATMEL_TCLIB=y 497CONFIG_ATMEL_TCLIB=y
461CONFIG_ATMEL_TCB_CLKSRC=y 498CONFIG_ATMEL_TCB_CLKSRC=y
462CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 499CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
463# CONFIG_EEPROM_93CX6 is not set
464# CONFIG_ICS932S401 is not set 500# CONFIG_ICS932S401 is not set
465CONFIG_ATMEL_SSC=m 501CONFIG_ATMEL_SSC=m
466# CONFIG_ENCLOSURE_SERVICES is not set 502# CONFIG_ENCLOSURE_SERVICES is not set
503# CONFIG_ISL29003 is not set
467# CONFIG_C2PORT is not set 504# CONFIG_C2PORT is not set
468 505
469# 506#
507# EEPROM support
508#
509# CONFIG_EEPROM_AT24 is not set
510# CONFIG_EEPROM_AT25 is not set
511# CONFIG_EEPROM_LEGACY is not set
512# CONFIG_EEPROM_MAX6875 is not set
513# CONFIG_EEPROM_93CX6 is not set
514
515#
470# SCSI device support 516# SCSI device support
471# 517#
472# CONFIG_RAID_ATTRS is not set 518# CONFIG_RAID_ATTRS is not set
@@ -486,10 +532,6 @@ CONFIG_BLK_DEV_SR=m
486# CONFIG_BLK_DEV_SR_VENDOR is not set 532# CONFIG_BLK_DEV_SR_VENDOR is not set
487# CONFIG_CHR_DEV_SG is not set 533# CONFIG_CHR_DEV_SG is not set
488# CONFIG_CHR_DEV_SCH is not set 534# CONFIG_CHR_DEV_SCH is not set
489
490#
491# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
492#
493# CONFIG_SCSI_MULTI_LUN is not set 535# CONFIG_SCSI_MULTI_LUN is not set
494# CONFIG_SCSI_CONSTANTS is not set 536# CONFIG_SCSI_CONSTANTS is not set
495# CONFIG_SCSI_LOGGING is not set 537# CONFIG_SCSI_LOGGING is not set
@@ -506,8 +548,10 @@ CONFIG_SCSI_WAIT_SCAN=m
506# CONFIG_SCSI_SRP_ATTRS is not set 548# CONFIG_SCSI_SRP_ATTRS is not set
507# CONFIG_SCSI_LOWLEVEL is not set 549# CONFIG_SCSI_LOWLEVEL is not set
508# CONFIG_SCSI_DH is not set 550# CONFIG_SCSI_DH is not set
551# CONFIG_SCSI_OSD_INITIATOR is not set
509CONFIG_ATA=m 552CONFIG_ATA=m
510# CONFIG_ATA_NONSTANDARD is not set 553# CONFIG_ATA_NONSTANDARD is not set
554CONFIG_ATA_VERBOSE_ERROR=y
511# CONFIG_SATA_PMP is not set 555# CONFIG_SATA_PMP is not set
512CONFIG_ATA_SFF=y 556CONFIG_ATA_SFF=y
513# CONFIG_SATA_MV is not set 557# CONFIG_SATA_MV is not set
@@ -536,12 +580,17 @@ CONFIG_PHYLIB=y
536# CONFIG_BROADCOM_PHY is not set 580# CONFIG_BROADCOM_PHY is not set
537# CONFIG_ICPLUS_PHY is not set 581# CONFIG_ICPLUS_PHY is not set
538# CONFIG_REALTEK_PHY is not set 582# CONFIG_REALTEK_PHY is not set
583# CONFIG_NATIONAL_PHY is not set
584# CONFIG_STE10XP is not set
585# CONFIG_LSI_ET1011C_PHY is not set
539# CONFIG_FIXED_PHY is not set 586# CONFIG_FIXED_PHY is not set
540# CONFIG_MDIO_BITBANG is not set 587# CONFIG_MDIO_BITBANG is not set
541CONFIG_NET_ETHERNET=y 588CONFIG_NET_ETHERNET=y
542# CONFIG_MII is not set 589# CONFIG_MII is not set
543CONFIG_MACB=y 590CONFIG_MACB=y
544# CONFIG_ENC28J60 is not set 591# CONFIG_ENC28J60 is not set
592# CONFIG_ETHOC is not set
593# CONFIG_DNET is not set
545# CONFIG_IBM_NEW_EMAC_ZMII is not set 594# CONFIG_IBM_NEW_EMAC_ZMII is not set
546# CONFIG_IBM_NEW_EMAC_RGMII is not set 595# CONFIG_IBM_NEW_EMAC_RGMII is not set
547# CONFIG_IBM_NEW_EMAC_TAH is not set 596# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -550,15 +599,18 @@ CONFIG_MACB=y
550# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 599# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
551# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 600# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
552# CONFIG_B44 is not set 601# CONFIG_B44 is not set
602# CONFIG_KS8842 is not set
603# CONFIG_KS8851 is not set
604# CONFIG_KS8851_MLL is not set
553# CONFIG_NETDEV_1000 is not set 605# CONFIG_NETDEV_1000 is not set
554# CONFIG_NETDEV_10000 is not set 606# CONFIG_NETDEV_10000 is not set
607CONFIG_WLAN=y
608# CONFIG_WLAN_PRE80211 is not set
609# CONFIG_WLAN_80211 is not set
555 610
556# 611#
557# Wireless LAN 612# Enable WiMAX (Networking options) to see the WiMAX drivers
558# 613#
559# CONFIG_WLAN_PRE80211 is not set
560# CONFIG_WLAN_80211 is not set
561# CONFIG_IWLWIFI_LEDS is not set
562# CONFIG_WAN is not set 614# CONFIG_WAN is not set
563CONFIG_PPP=m 615CONFIG_PPP=m
564# CONFIG_PPP_MULTILINK is not set 616# CONFIG_PPP_MULTILINK is not set
@@ -600,18 +652,25 @@ CONFIG_INPUT_EVDEV=m
600# Input Device Drivers 652# Input Device Drivers
601# 653#
602CONFIG_INPUT_KEYBOARD=y 654CONFIG_INPUT_KEYBOARD=y
655# CONFIG_KEYBOARD_ADP5588 is not set
603# CONFIG_KEYBOARD_ATKBD is not set 656# CONFIG_KEYBOARD_ATKBD is not set
604# CONFIG_KEYBOARD_SUNKBD is not set 657# CONFIG_QT2160 is not set
605# CONFIG_KEYBOARD_LKKBD is not set 658# CONFIG_KEYBOARD_LKKBD is not set
606# CONFIG_KEYBOARD_XTKBD is not set 659CONFIG_KEYBOARD_GPIO=m
660# CONFIG_KEYBOARD_MATRIX is not set
661# CONFIG_KEYBOARD_LM8323 is not set
662# CONFIG_KEYBOARD_MAX7359 is not set
607# CONFIG_KEYBOARD_NEWTON is not set 663# CONFIG_KEYBOARD_NEWTON is not set
664# CONFIG_KEYBOARD_OPENCORES is not set
608# CONFIG_KEYBOARD_STOWAWAY is not set 665# CONFIG_KEYBOARD_STOWAWAY is not set
609CONFIG_KEYBOARD_GPIO=m 666# CONFIG_KEYBOARD_SUNKBD is not set
667# CONFIG_KEYBOARD_XTKBD is not set
610CONFIG_INPUT_MOUSE=y 668CONFIG_INPUT_MOUSE=y
611# CONFIG_MOUSE_PS2 is not set 669# CONFIG_MOUSE_PS2 is not set
612# CONFIG_MOUSE_SERIAL is not set 670# CONFIG_MOUSE_SERIAL is not set
613# CONFIG_MOUSE_VSXXXAA is not set 671# CONFIG_MOUSE_VSXXXAA is not set
614CONFIG_MOUSE_GPIO=m 672CONFIG_MOUSE_GPIO=m
673# CONFIG_MOUSE_SYNAPTICS_I2C is not set
615# CONFIG_INPUT_JOYSTICK is not set 674# CONFIG_INPUT_JOYSTICK is not set
616# CONFIG_INPUT_TABLET is not set 675# CONFIG_INPUT_TABLET is not set
617# CONFIG_INPUT_TOUCHSCREEN is not set 676# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -642,9 +701,11 @@ CONFIG_SERIAL_ATMEL=y
642CONFIG_SERIAL_ATMEL_CONSOLE=y 701CONFIG_SERIAL_ATMEL_CONSOLE=y
643CONFIG_SERIAL_ATMEL_PDC=y 702CONFIG_SERIAL_ATMEL_PDC=y
644# CONFIG_SERIAL_ATMEL_TTYAT is not set 703# CONFIG_SERIAL_ATMEL_TTYAT is not set
704# CONFIG_SERIAL_MAX3100 is not set
645CONFIG_SERIAL_CORE=y 705CONFIG_SERIAL_CORE=y
646CONFIG_SERIAL_CORE_CONSOLE=y 706CONFIG_SERIAL_CORE_CONSOLE=y
647CONFIG_UNIX98_PTYS=y 707CONFIG_UNIX98_PTYS=y
708# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
648# CONFIG_LEGACY_PTYS is not set 709# CONFIG_LEGACY_PTYS is not set
649# CONFIG_IPMI_HANDLER is not set 710# CONFIG_IPMI_HANDLER is not set
650# CONFIG_HW_RANDOM is not set 711# CONFIG_HW_RANDOM is not set
@@ -653,6 +714,7 @@ CONFIG_UNIX98_PTYS=y
653# CONFIG_TCG_TPM is not set 714# CONFIG_TCG_TPM is not set
654CONFIG_I2C=m 715CONFIG_I2C=m
655CONFIG_I2C_BOARDINFO=y 716CONFIG_I2C_BOARDINFO=y
717CONFIG_I2C_COMPAT=y
656CONFIG_I2C_CHARDEV=m 718CONFIG_I2C_CHARDEV=m
657CONFIG_I2C_HELPER_AUTO=y 719CONFIG_I2C_HELPER_AUTO=y
658CONFIG_I2C_ALGOBIT=m 720CONFIG_I2C_ALGOBIT=m
@@ -664,6 +726,7 @@ CONFIG_I2C_ALGOBIT=m
664# 726#
665# I2C system bus drivers (mostly embedded / system-on-chip) 727# I2C system bus drivers (mostly embedded / system-on-chip)
666# 728#
729# CONFIG_I2C_DESIGNWARE is not set
667CONFIG_I2C_GPIO=m 730CONFIG_I2C_GPIO=m
668# CONFIG_I2C_OCORES is not set 731# CONFIG_I2C_OCORES is not set
669# CONFIG_I2C_SIMTEC is not set 732# CONFIG_I2C_SIMTEC is not set
@@ -684,14 +747,6 @@ CONFIG_I2C_GPIO=m
684# Miscellaneous I2C Chip support 747# Miscellaneous I2C Chip support
685# 748#
686# CONFIG_DS1682 is not set 749# CONFIG_DS1682 is not set
687# CONFIG_EEPROM_AT24 is not set
688# CONFIG_EEPROM_LEGACY is not set
689# CONFIG_SENSORS_PCF8574 is not set
690# CONFIG_PCF8575 is not set
691# CONFIG_SENSORS_PCA9539 is not set
692# CONFIG_SENSORS_PCF8591 is not set
693# CONFIG_TPS65010 is not set
694# CONFIG_SENSORS_MAX6875 is not set
695# CONFIG_SENSORS_TSL2550 is not set 750# CONFIG_SENSORS_TSL2550 is not set
696# CONFIG_I2C_DEBUG_CORE is not set 751# CONFIG_I2C_DEBUG_CORE is not set
697# CONFIG_I2C_DEBUG_ALGO is not set 752# CONFIG_I2C_DEBUG_ALGO is not set
@@ -706,13 +761,18 @@ CONFIG_SPI_MASTER=y
706# 761#
707CONFIG_SPI_ATMEL=y 762CONFIG_SPI_ATMEL=y
708# CONFIG_SPI_BITBANG is not set 763# CONFIG_SPI_BITBANG is not set
764# CONFIG_SPI_GPIO is not set
709 765
710# 766#
711# SPI Protocol Masters 767# SPI Protocol Masters
712# 768#
713# CONFIG_EEPROM_AT25 is not set
714CONFIG_SPI_SPIDEV=m 769CONFIG_SPI_SPIDEV=m
715# CONFIG_SPI_TLE62X0 is not set 770# CONFIG_SPI_TLE62X0 is not set
771
772#
773# PPS support
774#
775# CONFIG_PPS is not set
716CONFIG_ARCH_REQUIRE_GPIOLIB=y 776CONFIG_ARCH_REQUIRE_GPIOLIB=y
717CONFIG_GPIOLIB=y 777CONFIG_GPIOLIB=y
718# CONFIG_DEBUG_GPIO is not set 778# CONFIG_DEBUG_GPIO is not set
@@ -738,11 +798,15 @@ CONFIG_GPIO_SYSFS=y
738# 798#
739# CONFIG_GPIO_MAX7301 is not set 799# CONFIG_GPIO_MAX7301 is not set
740# CONFIG_GPIO_MCP23S08 is not set 800# CONFIG_GPIO_MCP23S08 is not set
801# CONFIG_GPIO_MC33880 is not set
802
803#
804# AC97 GPIO expanders:
805#
741# CONFIG_W1 is not set 806# CONFIG_W1 is not set
742# CONFIG_POWER_SUPPLY is not set 807# CONFIG_POWER_SUPPLY is not set
743# CONFIG_HWMON is not set 808# CONFIG_HWMON is not set
744# CONFIG_THERMAL is not set 809# CONFIG_THERMAL is not set
745# CONFIG_THERMAL_HWMON is not set
746CONFIG_WATCHDOG=y 810CONFIG_WATCHDOG=y
747# CONFIG_WATCHDOG_NOWAYOUT is not set 811# CONFIG_WATCHDOG_NOWAYOUT is not set
748 812
@@ -764,26 +828,17 @@ CONFIG_SSB_POSSIBLE=y
764# CONFIG_MFD_CORE is not set 828# CONFIG_MFD_CORE is not set
765# CONFIG_MFD_SM501 is not set 829# CONFIG_MFD_SM501 is not set
766# CONFIG_HTC_PASIC3 is not set 830# CONFIG_HTC_PASIC3 is not set
831# CONFIG_TPS65010 is not set
767# CONFIG_MFD_TMIO is not set 832# CONFIG_MFD_TMIO is not set
768# CONFIG_MFD_WM8400 is not set 833# CONFIG_MFD_WM8400 is not set
834# CONFIG_MFD_WM831X is not set
769# CONFIG_MFD_WM8350_I2C is not set 835# CONFIG_MFD_WM8350_I2C is not set
836# CONFIG_MFD_PCF50633 is not set
837# CONFIG_MFD_MC13783 is not set
838# CONFIG_AB3100_CORE is not set
839# CONFIG_EZX_PCAP is not set
770# CONFIG_REGULATOR is not set 840# CONFIG_REGULATOR is not set
771 841# CONFIG_MEDIA_SUPPORT is not set
772#
773# Multimedia devices
774#
775
776#
777# Multimedia core support
778#
779# CONFIG_VIDEO_DEV is not set
780# CONFIG_DVB_CORE is not set
781# CONFIG_VIDEO_MEDIA is not set
782
783#
784# Multimedia drivers
785#
786# CONFIG_DAB is not set
787 842
788# 843#
789# Graphics support 844# Graphics support
@@ -817,8 +872,10 @@ CONFIG_FB_ATMEL=y
817# CONFIG_FB_VIRTUAL is not set 872# CONFIG_FB_VIRTUAL is not set
818# CONFIG_FB_METRONOME is not set 873# CONFIG_FB_METRONOME is not set
819# CONFIG_FB_MB862XX is not set 874# CONFIG_FB_MB862XX is not set
875# CONFIG_FB_BROADSHEET is not set
820CONFIG_BACKLIGHT_LCD_SUPPORT=y 876CONFIG_BACKLIGHT_LCD_SUPPORT=y
821CONFIG_LCD_CLASS_DEVICE=y 877CONFIG_LCD_CLASS_DEVICE=y
878# CONFIG_LCD_LMS283GF05 is not set
822CONFIG_LCD_LTV350QV=y 879CONFIG_LCD_LTV350QV=y
823# CONFIG_LCD_ILI9320 is not set 880# CONFIG_LCD_ILI9320 is not set
824# CONFIG_LCD_TDO24M is not set 881# CONFIG_LCD_TDO24M is not set
@@ -833,6 +890,7 @@ CONFIG_LCD_LTV350QV=y
833# CONFIG_LOGO is not set 890# CONFIG_LOGO is not set
834CONFIG_SOUND=m 891CONFIG_SOUND=m
835CONFIG_SOUND_OSS_CORE=y 892CONFIG_SOUND_OSS_CORE=y
893CONFIG_SOUND_OSS_CORE_PRECLAIM=y
836CONFIG_SND=m 894CONFIG_SND=m
837CONFIG_SND_TIMER=m 895CONFIG_SND_TIMER=m
838CONFIG_SND_PCM=m 896CONFIG_SND_PCM=m
@@ -841,16 +899,28 @@ CONFIG_SND_OSSEMUL=y
841CONFIG_SND_MIXER_OSS=m 899CONFIG_SND_MIXER_OSS=m
842CONFIG_SND_PCM_OSS=m 900CONFIG_SND_PCM_OSS=m
843CONFIG_SND_PCM_OSS_PLUGINS=y 901CONFIG_SND_PCM_OSS_PLUGINS=y
902# CONFIG_SND_HRTIMER is not set
844# CONFIG_SND_DYNAMIC_MINORS is not set 903# CONFIG_SND_DYNAMIC_MINORS is not set
845# CONFIG_SND_SUPPORT_OLD_API is not set 904# CONFIG_SND_SUPPORT_OLD_API is not set
846# CONFIG_SND_VERBOSE_PROCFS is not set 905# CONFIG_SND_VERBOSE_PROCFS is not set
847# CONFIG_SND_VERBOSE_PRINTK is not set 906# CONFIG_SND_VERBOSE_PRINTK is not set
848# CONFIG_SND_DEBUG is not set 907# CONFIG_SND_DEBUG is not set
908# CONFIG_SND_RAWMIDI_SEQ is not set
909# CONFIG_SND_OPL3_LIB_SEQ is not set
910# CONFIG_SND_OPL4_LIB_SEQ is not set
911# CONFIG_SND_SBAWE_SEQ is not set
912# CONFIG_SND_EMU10K1_SEQ is not set
849CONFIG_SND_DRIVERS=y 913CONFIG_SND_DRIVERS=y
850# CONFIG_SND_DUMMY is not set 914# CONFIG_SND_DUMMY is not set
851# CONFIG_SND_MTPAV is not set 915# CONFIG_SND_MTPAV is not set
852# CONFIG_SND_SERIAL_U16550 is not set 916# CONFIG_SND_SERIAL_U16550 is not set
853# CONFIG_SND_MPU401 is not set 917# CONFIG_SND_MPU401 is not set
918
919#
920# Atmel devices (AVR32 and AT91)
921#
922# CONFIG_SND_ATMEL_ABDAC is not set
923# CONFIG_SND_ATMEL_AC97C is not set
854CONFIG_SND_SPI=y 924CONFIG_SND_SPI=y
855CONFIG_SND_AT73C213=m 925CONFIG_SND_AT73C213=m
856CONFIG_SND_AT73C213_TARGET_BITRATE=48000 926CONFIG_SND_AT73C213_TARGET_BITRATE=48000
@@ -863,11 +933,10 @@ CONFIG_USB_SUPPORT=y
863# CONFIG_USB_ARCH_HAS_EHCI is not set 933# CONFIG_USB_ARCH_HAS_EHCI is not set
864# CONFIG_USB_OTG_WHITELIST is not set 934# CONFIG_USB_OTG_WHITELIST is not set
865# CONFIG_USB_OTG_BLACKLIST_HUB is not set 935# CONFIG_USB_OTG_BLACKLIST_HUB is not set
866# CONFIG_USB_MUSB_HDRC is not set
867# CONFIG_USB_GADGET_MUSB_HDRC is not set 936# CONFIG_USB_GADGET_MUSB_HDRC is not set
868 937
869# 938#
870# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 939# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
871# 940#
872CONFIG_USB_GADGET=y 941CONFIG_USB_GADGET=y
873# CONFIG_USB_GADGET_DEBUG is not set 942# CONFIG_USB_GADGET_DEBUG is not set
@@ -882,18 +951,25 @@ CONFIG_USB_ATMEL_USBA=y
882# CONFIG_USB_GADGET_LH7A40X is not set 951# CONFIG_USB_GADGET_LH7A40X is not set
883# CONFIG_USB_GADGET_OMAP is not set 952# CONFIG_USB_GADGET_OMAP is not set
884# CONFIG_USB_GADGET_PXA25X is not set 953# CONFIG_USB_GADGET_PXA25X is not set
954# CONFIG_USB_GADGET_R8A66597 is not set
885# CONFIG_USB_GADGET_PXA27X is not set 955# CONFIG_USB_GADGET_PXA27X is not set
956# CONFIG_USB_GADGET_S3C_HSOTG is not set
957# CONFIG_USB_GADGET_IMX is not set
886# CONFIG_USB_GADGET_S3C2410 is not set 958# CONFIG_USB_GADGET_S3C2410 is not set
887# CONFIG_USB_GADGET_M66592 is not set 959# CONFIG_USB_GADGET_M66592 is not set
888# CONFIG_USB_GADGET_AMD5536UDC is not set 960# CONFIG_USB_GADGET_AMD5536UDC is not set
889# CONFIG_USB_GADGET_FSL_QE is not set 961# CONFIG_USB_GADGET_FSL_QE is not set
962# CONFIG_USB_GADGET_CI13XXX is not set
890# CONFIG_USB_GADGET_NET2280 is not set 963# CONFIG_USB_GADGET_NET2280 is not set
891# CONFIG_USB_GADGET_GOKU is not set 964# CONFIG_USB_GADGET_GOKU is not set
965# CONFIG_USB_GADGET_LANGWELL is not set
892# CONFIG_USB_GADGET_DUMMY_HCD is not set 966# CONFIG_USB_GADGET_DUMMY_HCD is not set
893CONFIG_USB_GADGET_DUALSPEED=y 967CONFIG_USB_GADGET_DUALSPEED=y
894CONFIG_USB_ZERO=m 968CONFIG_USB_ZERO=m
969# CONFIG_USB_AUDIO is not set
895CONFIG_USB_ETH=m 970CONFIG_USB_ETH=m
896CONFIG_USB_ETH_RNDIS=y 971CONFIG_USB_ETH_RNDIS=y
972# CONFIG_USB_ETH_EEM is not set
897CONFIG_USB_GADGETFS=m 973CONFIG_USB_GADGETFS=m
898CONFIG_USB_FILE_STORAGE=m 974CONFIG_USB_FILE_STORAGE=m
899# CONFIG_USB_FILE_STORAGE_TEST is not set 975# CONFIG_USB_FILE_STORAGE_TEST is not set
@@ -901,6 +977,12 @@ CONFIG_USB_G_SERIAL=m
901# CONFIG_USB_MIDI_GADGET is not set 977# CONFIG_USB_MIDI_GADGET is not set
902# CONFIG_USB_G_PRINTER is not set 978# CONFIG_USB_G_PRINTER is not set
903# CONFIG_USB_CDC_COMPOSITE is not set 979# CONFIG_USB_CDC_COMPOSITE is not set
980
981#
982# OTG and related infrastructure
983#
984# CONFIG_USB_GPIO_VBUS is not set
985# CONFIG_NOP_USB_XCEIV is not set
904CONFIG_MMC=y 986CONFIG_MMC=y
905# CONFIG_MMC_DEBUG is not set 987# CONFIG_MMC_DEBUG is not set
906# CONFIG_MMC_UNSAFE_RESUME is not set 988# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -917,6 +999,7 @@ CONFIG_MMC_BLOCK_BOUNCE=y
917# MMC/SD/SDIO Host Controller Drivers 999# MMC/SD/SDIO Host Controller Drivers
918# 1000#
919# CONFIG_MMC_SDHCI is not set 1001# CONFIG_MMC_SDHCI is not set
1002# CONFIG_MMC_AT91 is not set
920CONFIG_MMC_ATMELMCI=y 1003CONFIG_MMC_ATMELMCI=y
921# CONFIG_MMC_ATMELMCI_DMA is not set 1004# CONFIG_MMC_ATMELMCI_DMA is not set
922CONFIG_MMC_SPI=m 1005CONFIG_MMC_SPI=m
@@ -930,7 +1013,11 @@ CONFIG_LEDS_CLASS=m
930CONFIG_LEDS_ATMEL_PWM=m 1013CONFIG_LEDS_ATMEL_PWM=m
931# CONFIG_LEDS_PCA9532 is not set 1014# CONFIG_LEDS_PCA9532 is not set
932CONFIG_LEDS_GPIO=m 1015CONFIG_LEDS_GPIO=m
1016CONFIG_LEDS_GPIO_PLATFORM=y
1017# CONFIG_LEDS_LP3944 is not set
933# CONFIG_LEDS_PCA955X is not set 1018# CONFIG_LEDS_PCA955X is not set
1019# CONFIG_LEDS_DAC124S085 is not set
1020# CONFIG_LEDS_BD2802 is not set
934 1021
935# 1022#
936# LED Triggers 1023# LED Triggers
@@ -939,7 +1026,12 @@ CONFIG_LEDS_TRIGGERS=y
939CONFIG_LEDS_TRIGGER_TIMER=m 1026CONFIG_LEDS_TRIGGER_TIMER=m
940CONFIG_LEDS_TRIGGER_HEARTBEAT=m 1027CONFIG_LEDS_TRIGGER_HEARTBEAT=m
941# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set 1028# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
1029# CONFIG_LEDS_TRIGGER_GPIO is not set
942CONFIG_LEDS_TRIGGER_DEFAULT_ON=m 1030CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
1031
1032#
1033# iptables trigger is under Netfilter config (LED target)
1034#
943# CONFIG_ACCESSIBILITY is not set 1035# CONFIG_ACCESSIBILITY is not set
944CONFIG_RTC_LIB=y 1036CONFIG_RTC_LIB=y
945CONFIG_RTC_CLASS=y 1037CONFIG_RTC_CLASS=y
@@ -972,6 +1064,7 @@ CONFIG_RTC_INTF_DEV=y
972# CONFIG_RTC_DRV_S35390A is not set 1064# CONFIG_RTC_DRV_S35390A is not set
973# CONFIG_RTC_DRV_FM3130 is not set 1065# CONFIG_RTC_DRV_FM3130 is not set
974# CONFIG_RTC_DRV_RX8581 is not set 1066# CONFIG_RTC_DRV_RX8581 is not set
1067# CONFIG_RTC_DRV_RX8025 is not set
975 1068
976# 1069#
977# SPI RTC drivers 1070# SPI RTC drivers
@@ -983,6 +1076,7 @@ CONFIG_RTC_INTF_DEV=y
983# CONFIG_RTC_DRV_R9701 is not set 1076# CONFIG_RTC_DRV_R9701 is not set
984# CONFIG_RTC_DRV_RS5C348 is not set 1077# CONFIG_RTC_DRV_RS5C348 is not set
985# CONFIG_RTC_DRV_DS3234 is not set 1078# CONFIG_RTC_DRV_DS3234 is not set
1079# CONFIG_RTC_DRV_PCF2123 is not set
986 1080
987# 1081#
988# Platform RTC drivers 1082# Platform RTC drivers
@@ -1014,32 +1108,42 @@ CONFIG_DMA_ENGINE=y
1014# DMA Clients 1108# DMA Clients
1015# 1109#
1016# CONFIG_NET_DMA is not set 1110# CONFIG_NET_DMA is not set
1111# CONFIG_ASYNC_TX_DMA is not set
1017# CONFIG_DMATEST is not set 1112# CONFIG_DMATEST is not set
1113# CONFIG_AUXDISPLAY is not set
1018# CONFIG_UIO is not set 1114# CONFIG_UIO is not set
1115
1116#
1117# TI VLYNQ
1118#
1019# CONFIG_STAGING is not set 1119# CONFIG_STAGING is not set
1020CONFIG_STAGING_EXCLUDE_BUILD=y
1021 1120
1022# 1121#
1023# File systems 1122# File systems
1024# 1123#
1025CONFIG_EXT2_FS=m 1124CONFIG_EXT2_FS=y
1026# CONFIG_EXT2_FS_XATTR is not set 1125# CONFIG_EXT2_FS_XATTR is not set
1027# CONFIG_EXT2_FS_XIP is not set 1126# CONFIG_EXT2_FS_XIP is not set
1028CONFIG_EXT3_FS=m 1127CONFIG_EXT3_FS=y
1128# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1029# CONFIG_EXT3_FS_XATTR is not set 1129# CONFIG_EXT3_FS_XATTR is not set
1030CONFIG_EXT4_FS=m 1130CONFIG_EXT4_FS=y
1031CONFIG_EXT4DEV_COMPAT=y
1032# CONFIG_EXT4_FS_XATTR is not set 1131# CONFIG_EXT4_FS_XATTR is not set
1033CONFIG_JBD=m 1132# CONFIG_EXT4_DEBUG is not set
1133CONFIG_JBD=y
1034# CONFIG_JBD_DEBUG is not set 1134# CONFIG_JBD_DEBUG is not set
1035CONFIG_JBD2=m 1135CONFIG_JBD2=y
1036# CONFIG_JBD2_DEBUG is not set 1136# CONFIG_JBD2_DEBUG is not set
1037# CONFIG_REISERFS_FS is not set 1137# CONFIG_REISERFS_FS is not set
1038# CONFIG_JFS_FS is not set 1138# CONFIG_JFS_FS is not set
1039# CONFIG_FS_POSIX_ACL is not set 1139# CONFIG_FS_POSIX_ACL is not set
1040CONFIG_FILE_LOCKING=y
1041# CONFIG_XFS_FS is not set 1140# CONFIG_XFS_FS is not set
1141# CONFIG_GFS2_FS is not set
1042# CONFIG_OCFS2_FS is not set 1142# CONFIG_OCFS2_FS is not set
1143# CONFIG_BTRFS_FS is not set
1144# CONFIG_NILFS2_FS is not set
1145CONFIG_FILE_LOCKING=y
1146CONFIG_FSNOTIFY=y
1043# CONFIG_DNOTIFY is not set 1147# CONFIG_DNOTIFY is not set
1044CONFIG_INOTIFY=y 1148CONFIG_INOTIFY=y
1045CONFIG_INOTIFY_USER=y 1149CONFIG_INOTIFY_USER=y
@@ -1047,6 +1151,12 @@ CONFIG_INOTIFY_USER=y
1047# CONFIG_AUTOFS_FS is not set 1151# CONFIG_AUTOFS_FS is not set
1048# CONFIG_AUTOFS4_FS is not set 1152# CONFIG_AUTOFS4_FS is not set
1049CONFIG_FUSE_FS=m 1153CONFIG_FUSE_FS=m
1154# CONFIG_CUSE is not set
1155
1156#
1157# Caches
1158#
1159# CONFIG_FSCACHE is not set
1050 1160
1051# 1161#
1052# CD-ROM/DVD Filesystems 1162# CD-ROM/DVD Filesystems
@@ -1076,10 +1186,7 @@ CONFIG_TMPFS=y
1076# CONFIG_TMPFS_POSIX_ACL is not set 1186# CONFIG_TMPFS_POSIX_ACL is not set
1077# CONFIG_HUGETLB_PAGE is not set 1187# CONFIG_HUGETLB_PAGE is not set
1078# CONFIG_CONFIGFS_FS is not set 1188# CONFIG_CONFIGFS_FS is not set
1079 1189CONFIG_MISC_FILESYSTEMS=y
1080#
1081# Miscellaneous filesystems
1082#
1083# CONFIG_ADFS_FS is not set 1190# CONFIG_ADFS_FS is not set
1084# CONFIG_AFFS_FS is not set 1191# CONFIG_AFFS_FS is not set
1085# CONFIG_HFS_FS is not set 1192# CONFIG_HFS_FS is not set
@@ -1099,12 +1206,13 @@ CONFIG_JFFS2_ZLIB=y
1099CONFIG_JFFS2_RTIME=y 1206CONFIG_JFFS2_RTIME=y
1100# CONFIG_JFFS2_RUBIN is not set 1207# CONFIG_JFFS2_RUBIN is not set
1101CONFIG_UBIFS_FS=y 1208CONFIG_UBIFS_FS=y
1102CONFIG_UBIFS_FS_XATTR=y 1209# CONFIG_UBIFS_FS_XATTR is not set
1103# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set 1210# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1104CONFIG_UBIFS_FS_LZO=y 1211CONFIG_UBIFS_FS_LZO=y
1105CONFIG_UBIFS_FS_ZLIB=y 1212CONFIG_UBIFS_FS_ZLIB=y
1106# CONFIG_UBIFS_FS_DEBUG is not set 1213# CONFIG_UBIFS_FS_DEBUG is not set
1107# CONFIG_CRAMFS is not set 1214# CONFIG_CRAMFS is not set
1215# CONFIG_SQUASHFS is not set
1108# CONFIG_VXFS_FS is not set 1216# CONFIG_VXFS_FS is not set
1109CONFIG_MINIX_FS=m 1217CONFIG_MINIX_FS=m
1110# CONFIG_OMFS_FS is not set 1218# CONFIG_OMFS_FS is not set
@@ -1124,7 +1232,6 @@ CONFIG_LOCKD=y
1124CONFIG_LOCKD_V4=y 1232CONFIG_LOCKD_V4=y
1125CONFIG_NFS_COMMON=y 1233CONFIG_NFS_COMMON=y
1126CONFIG_SUNRPC=y 1234CONFIG_SUNRPC=y
1127# CONFIG_SUNRPC_REGISTER_V4 is not set
1128# CONFIG_RPCSEC_GSS_KRB5 is not set 1235# CONFIG_RPCSEC_GSS_KRB5 is not set
1129# CONFIG_RPCSEC_GSS_SPKM3 is not set 1236# CONFIG_RPCSEC_GSS_SPKM3 is not set
1130# CONFIG_SMB_FS is not set 1237# CONFIG_SMB_FS is not set
@@ -1188,6 +1295,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1188CONFIG_ENABLE_MUST_CHECK=y 1295CONFIG_ENABLE_MUST_CHECK=y
1189CONFIG_FRAME_WARN=1024 1296CONFIG_FRAME_WARN=1024
1190CONFIG_MAGIC_SYSRQ=y 1297CONFIG_MAGIC_SYSRQ=y
1298# CONFIG_STRIP_ASM_SYMS is not set
1191# CONFIG_UNUSED_SYMBOLS is not set 1299# CONFIG_UNUSED_SYMBOLS is not set
1192CONFIG_DEBUG_FS=y 1300CONFIG_DEBUG_FS=y
1193# CONFIG_HEADERS_CHECK is not set 1301# CONFIG_HEADERS_CHECK is not set
@@ -1196,6 +1304,9 @@ CONFIG_DEBUG_KERNEL=y
1196CONFIG_DETECT_SOFTLOCKUP=y 1304CONFIG_DETECT_SOFTLOCKUP=y
1197# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1305# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1198CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1306CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1307CONFIG_DETECT_HUNG_TASK=y
1308# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1309CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1199CONFIG_SCHED_DEBUG=y 1310CONFIG_SCHED_DEBUG=y
1200# CONFIG_SCHEDSTATS is not set 1311# CONFIG_SCHEDSTATS is not set
1201# CONFIG_TIMER_STATS is not set 1312# CONFIG_TIMER_STATS is not set
@@ -1211,6 +1322,7 @@ CONFIG_SCHED_DEBUG=y
1211# CONFIG_LOCK_STAT is not set 1322# CONFIG_LOCK_STAT is not set
1212# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1323# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1213# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1324# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1325CONFIG_STACKTRACE=y
1214# CONFIG_DEBUG_KOBJECT is not set 1326# CONFIG_DEBUG_KOBJECT is not set
1215CONFIG_DEBUG_BUGVERBOSE=y 1327CONFIG_DEBUG_BUGVERBOSE=y
1216# CONFIG_DEBUG_INFO is not set 1328# CONFIG_DEBUG_INFO is not set
@@ -1219,6 +1331,8 @@ CONFIG_DEBUG_BUGVERBOSE=y
1219# CONFIG_DEBUG_MEMORY_INIT is not set 1331# CONFIG_DEBUG_MEMORY_INIT is not set
1220# CONFIG_DEBUG_LIST is not set 1332# CONFIG_DEBUG_LIST is not set
1221# CONFIG_DEBUG_SG is not set 1333# CONFIG_DEBUG_SG is not set
1334# CONFIG_DEBUG_NOTIFIERS is not set
1335# CONFIG_DEBUG_CREDENTIALS is not set
1222CONFIG_FRAME_POINTER=y 1336CONFIG_FRAME_POINTER=y
1223# CONFIG_BOOT_PRINTK_DELAY is not set 1337# CONFIG_BOOT_PRINTK_DELAY is not set
1224# CONFIG_RCU_TORTURE_TEST is not set 1338# CONFIG_RCU_TORTURE_TEST is not set
@@ -1226,17 +1340,30 @@ CONFIG_FRAME_POINTER=y
1226# CONFIG_KPROBES_SANITY_TEST is not set 1340# CONFIG_KPROBES_SANITY_TEST is not set
1227# CONFIG_BACKTRACE_SELF_TEST is not set 1341# CONFIG_BACKTRACE_SELF_TEST is not set
1228# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1342# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1343# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1229# CONFIG_LKDTM is not set 1344# CONFIG_LKDTM is not set
1230# CONFIG_FAULT_INJECTION is not set 1345# CONFIG_FAULT_INJECTION is not set
1231 1346# CONFIG_PAGE_POISONING is not set
1232# 1347CONFIG_NOP_TRACER=y
1233# Tracers 1348CONFIG_RING_BUFFER=y
1234# 1349CONFIG_EVENT_TRACING=y
1350CONFIG_CONTEXT_SWITCH_TRACER=y
1351CONFIG_RING_BUFFER_ALLOW_SWAP=y
1352CONFIG_TRACING=y
1353CONFIG_TRACING_SUPPORT=y
1354CONFIG_FTRACE=y
1235# CONFIG_IRQSOFF_TRACER is not set 1355# CONFIG_IRQSOFF_TRACER is not set
1236# CONFIG_SCHED_TRACER is not set 1356# CONFIG_SCHED_TRACER is not set
1237# CONFIG_CONTEXT_SWITCH_TRACER is not set 1357# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1238# CONFIG_BOOT_TRACER is not set 1358# CONFIG_BOOT_TRACER is not set
1239# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1359CONFIG_BRANCH_PROFILE_NONE=y
1360# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1361# CONFIG_PROFILE_ALL_BRANCHES is not set
1362# CONFIG_KMEMTRACE is not set
1363# CONFIG_WORKQUEUE_TRACER is not set
1364# CONFIG_BLK_DEV_IO_TRACE is not set
1365# CONFIG_RING_BUFFER_BENCHMARK is not set
1366# CONFIG_DYNAMIC_DEBUG is not set
1240# CONFIG_SAMPLES is not set 1367# CONFIG_SAMPLES is not set
1241 1368
1242# 1369#
@@ -1262,10 +1389,12 @@ CONFIG_CRYPTO_HASH=m
1262CONFIG_CRYPTO_HASH2=y 1389CONFIG_CRYPTO_HASH2=y
1263CONFIG_CRYPTO_RNG=m 1390CONFIG_CRYPTO_RNG=m
1264CONFIG_CRYPTO_RNG2=y 1391CONFIG_CRYPTO_RNG2=y
1392CONFIG_CRYPTO_PCOMP=y
1265CONFIG_CRYPTO_MANAGER=m 1393CONFIG_CRYPTO_MANAGER=m
1266CONFIG_CRYPTO_MANAGER2=y 1394CONFIG_CRYPTO_MANAGER2=y
1267# CONFIG_CRYPTO_GF128MUL is not set 1395# CONFIG_CRYPTO_GF128MUL is not set
1268# CONFIG_CRYPTO_NULL is not set 1396# CONFIG_CRYPTO_NULL is not set
1397CONFIG_CRYPTO_WORKQUEUE=y
1269# CONFIG_CRYPTO_CRYPTD is not set 1398# CONFIG_CRYPTO_CRYPTD is not set
1270CONFIG_CRYPTO_AUTHENC=m 1399CONFIG_CRYPTO_AUTHENC=m
1271# CONFIG_CRYPTO_TEST is not set 1400# CONFIG_CRYPTO_TEST is not set
@@ -1293,11 +1422,13 @@ CONFIG_CRYPTO_CBC=m
1293# 1422#
1294CONFIG_CRYPTO_HMAC=m 1423CONFIG_CRYPTO_HMAC=m
1295# CONFIG_CRYPTO_XCBC is not set 1424# CONFIG_CRYPTO_XCBC is not set
1425# CONFIG_CRYPTO_VMAC is not set
1296 1426
1297# 1427#
1298# Digest 1428# Digest
1299# 1429#
1300# CONFIG_CRYPTO_CRC32C is not set 1430# CONFIG_CRYPTO_CRC32C is not set
1431# CONFIG_CRYPTO_GHASH is not set
1301# CONFIG_CRYPTO_MD4 is not set 1432# CONFIG_CRYPTO_MD4 is not set
1302CONFIG_CRYPTO_MD5=m 1433CONFIG_CRYPTO_MD5=m
1303# CONFIG_CRYPTO_MICHAEL_MIC is not set 1434# CONFIG_CRYPTO_MICHAEL_MIC is not set
@@ -1334,6 +1465,7 @@ CONFIG_CRYPTO_DES=m
1334# Compression 1465# Compression
1335# 1466#
1336CONFIG_CRYPTO_DEFLATE=y 1467CONFIG_CRYPTO_DEFLATE=y
1468# CONFIG_CRYPTO_ZLIB is not set
1337CONFIG_CRYPTO_LZO=y 1469CONFIG_CRYPTO_LZO=y
1338 1470
1339# 1471#
@@ -1341,11 +1473,13 @@ CONFIG_CRYPTO_LZO=y
1341# 1473#
1342CONFIG_CRYPTO_ANSI_CPRNG=m 1474CONFIG_CRYPTO_ANSI_CPRNG=m
1343# CONFIG_CRYPTO_HW is not set 1475# CONFIG_CRYPTO_HW is not set
1476CONFIG_BINARY_PRINTF=y
1344 1477
1345# 1478#
1346# Library routines 1479# Library routines
1347# 1480#
1348CONFIG_BITREVERSE=y 1481CONFIG_BITREVERSE=y
1482CONFIG_GENERIC_FIND_LAST_BIT=y
1349CONFIG_CRC_CCITT=m 1483CONFIG_CRC_CCITT=m
1350CONFIG_CRC16=y 1484CONFIG_CRC16=y
1351CONFIG_CRC_T10DIF=m 1485CONFIG_CRC_T10DIF=m
@@ -1357,8 +1491,9 @@ CONFIG_ZLIB_INFLATE=y
1357CONFIG_ZLIB_DEFLATE=y 1491CONFIG_ZLIB_DEFLATE=y
1358CONFIG_LZO_COMPRESS=y 1492CONFIG_LZO_COMPRESS=y
1359CONFIG_LZO_DECOMPRESS=y 1493CONFIG_LZO_DECOMPRESS=y
1494CONFIG_DECOMPRESS_GZIP=y
1360CONFIG_GENERIC_ALLOCATOR=y 1495CONFIG_GENERIC_ALLOCATOR=y
1361CONFIG_PLIST=y
1362CONFIG_HAS_IOMEM=y 1496CONFIG_HAS_IOMEM=y
1363CONFIG_HAS_IOPORT=y 1497CONFIG_HAS_IOPORT=y
1364CONFIG_HAS_DMA=y 1498CONFIG_HAS_DMA=y
1499CONFIG_NLATTR=y
diff --git a/arch/avr32/include/asm/asm-offsets.h b/arch/avr32/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/avr32/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
index d5d1d41c600a..3b3159b710d4 100644
--- a/arch/avr32/include/asm/elf.h
+++ b/arch/avr32/include/asm/elf.h
@@ -77,7 +77,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
77#endif 77#endif
78#define ELF_ARCH EM_AVR32 78#define ELF_ARCH EM_AVR32
79 79
80#define USE_ELF_CORE_DUMP
81#define ELF_EXEC_PAGESIZE 4096 80#define ELF_EXEC_PAGESIZE 4096
82 81
83/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 82/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/avr32/include/asm/hardirq.h b/arch/avr32/include/asm/hardirq.h
index 015bc75ea798..9e36e3ff77d2 100644
--- a/arch/avr32/include/asm/hardirq.h
+++ b/arch/avr32/include/asm/hardirq.h
@@ -1,23 +1,6 @@
1#ifndef __ASM_AVR32_HARDIRQ_H 1#ifndef __ASM_AVR32_HARDIRQ_H
2#define __ASM_AVR32_HARDIRQ_H 2#define __ASM_AVR32_HARDIRQ_H
3
4#include <linux/threads.h>
5#include <asm/irq.h>
6
7#ifndef __ASSEMBLY__ 3#ifndef __ASSEMBLY__
8 4#include <asm-generic/hardirq.h>
9#include <linux/cache.h>
10
11/* entry.S is sensitive to the offsets of these fields */
12typedef struct {
13 unsigned int __softirq_pending;
14} ____cacheline_aligned irq_cpustat_t;
15
16void ack_bad_irq(unsigned int irq);
17
18/* Standard mappings for irq_cpustat_t above */
19#include <linux/irq_cpustat.h>
20
21#endif /* __ASSEMBLY__ */ 5#endif /* __ASSEMBLY__ */
22
23#endif /* __ASM_AVR32_HARDIRQ_H */ 6#endif /* __ASM_AVR32_HARDIRQ_H */
diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
index 483d666c27c0..66a197266637 100644
--- a/arch/avr32/include/asm/syscalls.h
+++ b/arch/avr32/include/asm/syscalls.h
@@ -29,10 +29,6 @@ asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
29 struct pt_regs *); 29 struct pt_regs *);
30asmlinkage int sys_rt_sigreturn(struct pt_regs *); 30asmlinkage int sys_rt_sigreturn(struct pt_regs *);
31 31
32/* kernel/sys_avr32.c */
33asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
34 unsigned long, unsigned long, off_t);
35
36/* mm/cache.c */ 32/* mm/cache.c */
37asmlinkage int sys_cacheflush(int, void __user *, size_t); 33asmlinkage int sys_cacheflush(int, void __user *, size_t);
38 34
diff --git a/arch/avr32/kernel/irq.c b/arch/avr32/kernel/irq.c
index 9f572229d318..9604f7758f9a 100644
--- a/arch/avr32/kernel/irq.c
+++ b/arch/avr32/kernel/irq.c
@@ -16,15 +16,6 @@
16#include <linux/seq_file.h> 16#include <linux/seq_file.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18 18
19/*
20 * 'what should we do if we get a hw irq event on an illegal vector'.
21 * each architecture has to answer this themselves.
22 */
23void ack_bad_irq(unsigned int irq)
24{
25 printk("unexpected IRQ %u\n", irq);
26}
27
28/* May be overridden by platform code */ 19/* May be overridden by platform code */
29int __weak nmi_enable(void) 20int __weak nmi_enable(void)
30{ 21{
@@ -51,7 +42,7 @@ int show_interrupts(struct seq_file *p, void *v)
51 } 42 }
52 43
53 if (i < NR_IRQS) { 44 if (i < NR_IRQS) {
54 spin_lock_irqsave(&irq_desc[i].lock, flags); 45 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
55 action = irq_desc[i].action; 46 action = irq_desc[i].action;
56 if (!action) 47 if (!action)
57 goto unlock; 48 goto unlock;
@@ -66,7 +57,7 @@ int show_interrupts(struct seq_file *p, void *v)
66 57
67 seq_putc(p, '\n'); 58 seq_putc(p, '\n');
68 unlock: 59 unlock:
69 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 60 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
70 } 61 }
71 62
72 return 0; 63 return 0;
diff --git a/arch/avr32/kernel/sys_avr32.c b/arch/avr32/kernel/sys_avr32.c
index 5d2daeaf356f..459349b5ed5a 100644
--- a/arch/avr32/kernel/sys_avr32.c
+++ b/arch/avr32/kernel/sys_avr32.c
@@ -5,39 +5,8 @@
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8#include <linux/errno.h>
9#include <linux/fs.h>
10#include <linux/file.h>
11#include <linux/mm.h>
12#include <linux/unistd.h> 8#include <linux/unistd.h>
13 9
14#include <asm/mman.h>
15#include <asm/uaccess.h>
16#include <asm/syscalls.h>
17
18asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
19 unsigned long prot, unsigned long flags,
20 unsigned long fd, off_t offset)
21{
22 int error = -EBADF;
23 struct file *file = NULL;
24
25 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
26 if (!(flags & MAP_ANONYMOUS)) {
27 file = fget(fd);
28 if (!file)
29 return error;
30 }
31
32 down_write(&current->mm->mmap_sem);
33 error = do_mmap_pgoff(file, addr, len, prot, flags, offset);
34 up_write(&current->mm->mmap_sem);
35
36 if (file)
37 fput(file);
38 return error;
39}
40
41int kernel_execve(const char *file, char **argv, char **envp) 10int kernel_execve(const char *file, char **argv, char **envp)
42{ 11{
43 register long scno asm("r8") = __NR_execve; 12 register long scno asm("r8") = __NR_execve;
diff --git a/arch/avr32/kernel/syscall-stubs.S b/arch/avr32/kernel/syscall-stubs.S
index f7244cd02fbb..0447a3e2ba64 100644
--- a/arch/avr32/kernel/syscall-stubs.S
+++ b/arch/avr32/kernel/syscall-stubs.S
@@ -61,7 +61,7 @@ __sys_execve:
61__sys_mmap2: 61__sys_mmap2:
62 pushm lr 62 pushm lr
63 st.w --sp, ARG6 63 st.w --sp, ARG6
64 call sys_mmap2 64 call sys_mmap_pgoff
65 sub sp, -4 65 sub sp, -4
66 popm pc 66 popm pc
67 67
diff --git a/arch/avr32/kernel/vmlinux.lds.S b/arch/avr32/kernel/vmlinux.lds.S
index c4b56654349a..9cd2bd91d64a 100644
--- a/arch/avr32/kernel/vmlinux.lds.S
+++ b/arch/avr32/kernel/vmlinux.lds.S
@@ -39,30 +39,10 @@ SECTIONS
39 __tagtable_begin = .; 39 __tagtable_begin = .;
40 *(.taglist.init) 40 *(.taglist.init)
41 __tagtable_end = .; 41 __tagtable_end = .;
42 INIT_DATA
43 . = ALIGN(16);
44 __setup_start = .;
45 *(.init.setup)
46 __setup_end = .;
47 . = ALIGN(4);
48 __initcall_start = .;
49 INITCALLS
50 __initcall_end = .;
51 __con_initcall_start = .;
52 *(.con_initcall.init)
53 __con_initcall_end = .;
54 __security_initcall_start = .;
55 *(.security_initcall.init)
56 __security_initcall_end = .;
57#ifdef CONFIG_BLK_DEV_INITRD
58 . = ALIGN(32);
59 __initramfs_start = .;
60 *(.init.ramfs)
61 __initramfs_end = .;
62#endif
63 . = ALIGN(PAGE_SIZE);
64 __init_end = .;
65 } 42 }
43 INIT_DATA_SECTION(16)
44 . = ALIGN(PAGE_SIZE);
45 __init_end = .;
66 46
67 .text : AT(ADDR(.text) - LOAD_OFFSET) { 47 .text : AT(ADDR(.text) - LOAD_OFFSET) {
68 _evba = .; 48 _evba = .;
@@ -78,34 +58,16 @@ SECTIONS
78 _etext = .; 58 _etext = .;
79 } = 0xd703d703 59 } = 0xd703d703
80 60
81 . = ALIGN(4); 61 EXCEPTION_TABLE(4)
82 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
83 __start___ex_table = .;
84 *(__ex_table)
85 __stop___ex_table = .;
86 }
87
88 RODATA 62 RODATA
89 63
90 . = ALIGN(THREAD_SIZE);
91
92 .data : AT(ADDR(.data) - LOAD_OFFSET) { 64 .data : AT(ADDR(.data) - LOAD_OFFSET) {
93 _data = .; 65 _data = .;
94 _sdata = .; 66 _sdata = .;
95 /*
96 * First, the init task union, aligned to an 8K boundary.
97 */
98 *(.data.init_task)
99 67
100 /* Then, the page-aligned data */ 68 INIT_TASK_DATA(THREAD_SIZE)
101 . = ALIGN(PAGE_SIZE); 69 PAGE_ALIGNED_DATA(PAGE_SIZE);
102 *(.data.page_aligned) 70 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
103
104 /* Then, the cacheline aligned data */
105 . = ALIGN(L1_CACHE_BYTES);
106 *(.data.cacheline_aligned)
107
108 /* And the rest... */
109 *(.data.rel*) 71 *(.data.rel*)
110 DATA_DATA 72 DATA_DATA
111 CONSTRUCTORS 73 CONSTRUCTORS
@@ -113,16 +75,8 @@ SECTIONS
113 _edata = .; 75 _edata = .;
114 } 76 }
115 77
116 78 BSS_SECTION(0, 8, 8)
117 . = ALIGN(8); 79 _end = .;
118 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
119 __bss_start = .;
120 *(.bss)
121 *(COMMON)
122 . = ALIGN(8);
123 __bss_stop = .;
124 _end = .;
125 }
126 80
127 DWARF_DEBUG 81 DWARF_DEBUG
128 82
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index eb9d4dc2e86d..1aa1ea5e9212 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -15,6 +15,8 @@
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <linux/usb/atmel_usba_udc.h> 17#include <linux/usb/atmel_usba_udc.h>
18
19#include <mach/atmel-mci.h>
18#include <linux/atmel-mci.h> 20#include <linux/atmel-mci.h>
19 21
20#include <asm/io.h> 22#include <asm/io.h>
@@ -1181,19 +1183,32 @@ static struct resource atmel_spi1_resource[] = {
1181DEFINE_DEV(atmel_spi, 1); 1183DEFINE_DEV(atmel_spi, 1);
1182DEV_CLK(spi_clk, atmel_spi1, pba, 1); 1184DEV_CLK(spi_clk, atmel_spi1, pba, 1);
1183 1185
1184static void __init 1186void __init
1185at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, 1187at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n)
1186 unsigned int n, const u8 *pins)
1187{ 1188{
1189 /*
1190 * Manage the chipselects as GPIOs, normally using the same pins
1191 * the SPI controller expects; but boards can use other pins.
1192 */
1193 static u8 __initdata spi_pins[][4] = {
1194 { GPIO_PIN_PA(3), GPIO_PIN_PA(4),
1195 GPIO_PIN_PA(5), GPIO_PIN_PA(20) },
1196 { GPIO_PIN_PB(2), GPIO_PIN_PB(3),
1197 GPIO_PIN_PB(4), GPIO_PIN_PA(27) },
1198 };
1188 unsigned int pin, mode; 1199 unsigned int pin, mode;
1189 1200
1201 /* There are only 2 SPI controllers */
1202 if (bus_num > 1)
1203 return;
1204
1190 for (; n; n--, b++) { 1205 for (; n; n--, b++) {
1191 b->bus_num = bus_num; 1206 b->bus_num = bus_num;
1192 if (b->chip_select >= 4) 1207 if (b->chip_select >= 4)
1193 continue; 1208 continue;
1194 pin = (unsigned)b->controller_data; 1209 pin = (unsigned)b->controller_data;
1195 if (!pin) { 1210 if (!pin) {
1196 pin = pins[b->chip_select]; 1211 pin = spi_pins[bus_num][b->chip_select];
1197 b->controller_data = (void *)pin; 1212 b->controller_data = (void *)pin;
1198 } 1213 }
1199 mode = AT32_GPIOF_OUTPUT; 1214 mode = AT32_GPIOF_OUTPUT;
@@ -1206,16 +1221,6 @@ at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b,
1206struct platform_device *__init 1221struct platform_device *__init
1207at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n) 1222at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n)
1208{ 1223{
1209 /*
1210 * Manage the chipselects as GPIOs, normally using the same pins
1211 * the SPI controller expects; but boards can use other pins.
1212 */
1213 static u8 __initdata spi0_pins[] =
1214 { GPIO_PIN_PA(3), GPIO_PIN_PA(4),
1215 GPIO_PIN_PA(5), GPIO_PIN_PA(20), };
1216 static u8 __initdata spi1_pins[] =
1217 { GPIO_PIN_PB(2), GPIO_PIN_PB(3),
1218 GPIO_PIN_PB(4), GPIO_PIN_PA(27), };
1219 struct platform_device *pdev; 1224 struct platform_device *pdev;
1220 u32 pin_mask; 1225 u32 pin_mask;
1221 1226
@@ -1228,7 +1233,7 @@ at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n)
1228 select_peripheral(PIOA, (1 << 0), PERIPH_A, AT32_GPIOF_PULLUP); 1233 select_peripheral(PIOA, (1 << 0), PERIPH_A, AT32_GPIOF_PULLUP);
1229 select_peripheral(PIOA, pin_mask, PERIPH_A, 0); 1234 select_peripheral(PIOA, pin_mask, PERIPH_A, 0);
1230 1235
1231 at32_spi_setup_slaves(0, b, n, spi0_pins); 1236 at32_spi_setup_slaves(0, b, n);
1232 break; 1237 break;
1233 1238
1234 case 1: 1239 case 1:
@@ -1239,7 +1244,7 @@ at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n)
1239 select_peripheral(PIOB, (1 << 0), PERIPH_B, AT32_GPIOF_PULLUP); 1244 select_peripheral(PIOB, (1 << 0), PERIPH_B, AT32_GPIOF_PULLUP);
1240 select_peripheral(PIOB, pin_mask, PERIPH_B, 0); 1245 select_peripheral(PIOB, pin_mask, PERIPH_B, 0);
1241 1246
1242 at32_spi_setup_slaves(1, b, n, spi1_pins); 1247 at32_spi_setup_slaves(1, b, n);
1243 break; 1248 break;
1244 1249
1245 default: 1250 default:
@@ -1320,7 +1325,7 @@ struct platform_device *__init
1320at32_add_device_mci(unsigned int id, struct mci_platform_data *data) 1325at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1321{ 1326{
1322 struct platform_device *pdev; 1327 struct platform_device *pdev;
1323 struct dw_dma_slave *dws = &data->dma_slave; 1328 struct mci_dma_slave *slave;
1324 u32 pioa_mask; 1329 u32 pioa_mask;
1325 u32 piob_mask; 1330 u32 piob_mask;
1326 1331
@@ -1339,13 +1344,17 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1339 ARRAY_SIZE(atmel_mci0_resource))) 1344 ARRAY_SIZE(atmel_mci0_resource)))
1340 goto fail; 1345 goto fail;
1341 1346
1342 dws->dma_dev = &dw_dmac0_device.dev; 1347 slave = kzalloc(sizeof(struct mci_dma_slave), GFP_KERNEL);
1343 dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT; 1348
1344 dws->cfg_hi = (DWC_CFGH_SRC_PER(0) 1349 slave->sdata.dma_dev = &dw_dmac0_device.dev;
1350 slave->sdata.reg_width = DW_DMA_SLAVE_WIDTH_32BIT;
1351 slave->sdata.cfg_hi = (DWC_CFGH_SRC_PER(0)
1345 | DWC_CFGH_DST_PER(1)); 1352 | DWC_CFGH_DST_PER(1));
1346 dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL 1353 slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL
1347 | DWC_CFGL_HS_SRC_POL); 1354 | DWC_CFGL_HS_SRC_POL);
1348 1355
1356 data->dma_slave = slave;
1357
1349 if (platform_device_add_data(pdev, data, 1358 if (platform_device_add_data(pdev, data,
1350 sizeof(struct mci_platform_data))) 1359 sizeof(struct mci_platform_data)))
1351 goto fail; 1360 goto fail;
@@ -1411,6 +1420,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1411 return pdev; 1420 return pdev;
1412 1421
1413fail: 1422fail:
1423 data->dma_slave = NULL;
1424 kfree(slave);
1414 platform_device_put(pdev); 1425 platform_device_put(pdev);
1415 return NULL; 1426 return NULL;
1416} 1427}
diff --git a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
new file mode 100644
index 000000000000..a9b38967f703
--- /dev/null
+++ b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h
@@ -0,0 +1,24 @@
1#ifndef __MACH_ATMEL_MCI_H
2#define __MACH_ATMEL_MCI_H
3
4#include <linux/dw_dmac.h>
5
6/**
7 * struct mci_dma_data - DMA data for MCI interface
8 */
9struct mci_dma_data {
10 struct dw_dma_slave sdata;
11};
12
13/* accessor macros */
14#define slave_data_ptr(s) (&(s)->sdata)
15#define find_slave_dev(s) ((s)->sdata.dma_dev)
16
17#define setup_dma_addr(s, t, r) do { \
18 if (s) { \
19 (s)->sdata.tx_reg = (t); \
20 (s)->sdata.rx_reg = (r); \
21 } \
22} while (0)
23
24#endif /* __MACH_ATMEL_MCI_H */
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index ddedb471f33e..c7f25bb1d068 100644
--- a/arch/avr32/mach-at32ap/include/mach/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
@@ -49,6 +49,7 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data);
49struct spi_board_info; 49struct spi_board_info;
50struct platform_device * 50struct platform_device *
51at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); 51at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);
52void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n);
52 53
53struct atmel_lcdfb_info; 54struct atmel_lcdfb_info;
54struct platform_device * 55struct platform_device *
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index ae6a60f10120..53c1e1d45c68 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -5,6 +5,10 @@
5 5
6mainmenu "Blackfin Kernel Configuration" 6mainmenu "Blackfin Kernel Configuration"
7 7
8config SYMBOL_PREFIX
9 string
10 default "_"
11
8config MMU 12config MMU
9 def_bool n 13 def_bool n
10 14
@@ -28,6 +32,9 @@ config BLACKFIN
28 select HAVE_OPROFILE 32 select HAVE_OPROFILE
29 select ARCH_WANT_OPTIONAL_GPIOLIB 33 select ARCH_WANT_OPTIONAL_GPIOLIB
30 34
35config GENERIC_CSUM
36 def_bool y
37
31config GENERIC_BUG 38config GENERIC_BUG
32 def_bool y 39 def_bool y
33 depends on BUG 40 depends on BUG
@@ -173,7 +180,7 @@ config BF539
173 help 180 help
174 BF539 Processor Support. 181 BF539 Processor Support.
175 182
176config BF542 183config BF542_std
177 bool "BF542" 184 bool "BF542"
178 help 185 help
179 BF542 Processor Support. 186 BF542 Processor Support.
@@ -183,7 +190,7 @@ config BF542M
183 help 190 help
184 BF542 Processor Support. 191 BF542 Processor Support.
185 192
186config BF544 193config BF544_std
187 bool "BF544" 194 bool "BF544"
188 help 195 help
189 BF544 Processor Support. 196 BF544 Processor Support.
@@ -193,7 +200,7 @@ config BF544M
193 help 200 help
194 BF544 Processor Support. 201 BF544 Processor Support.
195 202
196config BF547 203config BF547_std
197 bool "BF547" 204 bool "BF547"
198 help 205 help
199 BF547 Processor Support. 206 BF547 Processor Support.
@@ -203,7 +210,7 @@ config BF547M
203 help 210 help
204 BF547 Processor Support. 211 BF547 Processor Support.
205 212
206config BF548 213config BF548_std
207 bool "BF548" 214 bool "BF548"
208 help 215 help
209 BF548 Processor Support. 216 BF548 Processor Support.
@@ -213,7 +220,7 @@ config BF548M
213 help 220 help
214 BF548 Processor Support. 221 BF548 Processor Support.
215 222
216config BF549 223config BF549_std
217 bool "BF549" 224 bool "BF549"
218 help 225 help
219 BF549 Processor Support. 226 BF549 Processor Support.
@@ -307,31 +314,11 @@ config BF_REV_NONE
307 314
308endchoice 315endchoice
309 316
310config BF51x
311 bool
312 depends on (BF512 || BF514 || BF516 || BF518)
313 default y
314
315config BF52x
316 bool
317 depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527)
318 default y
319
320config BF53x 317config BF53x
321 bool 318 bool
322 depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) 319 depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
323 default y 320 default y
324 321
325config BF54xM
326 bool
327 depends on (BF542M || BF544M || BF547M || BF548M || BF549M)
328 default y
329
330config BF54x
331 bool
332 depends on (BF542 || BF544 || BF547 || BF548 || BF549 || BF54xM)
333 default y
334
335config MEM_GENERIC_BOARD 322config MEM_GENERIC_BOARD
336 bool 323 bool
337 depends on GENERIC_BOARD 324 depends on GENERIC_BOARD
@@ -913,6 +900,12 @@ config DMA_UNCACHED_2M
913 bool "Enable 2M DMA region" 900 bool "Enable 2M DMA region"
914config DMA_UNCACHED_1M 901config DMA_UNCACHED_1M
915 bool "Enable 1M DMA region" 902 bool "Enable 1M DMA region"
903config DMA_UNCACHED_512K
904 bool "Enable 512K DMA region"
905config DMA_UNCACHED_256K
906 bool "Enable 256K DMA region"
907config DMA_UNCACHED_128K
908 bool "Enable 128K DMA region"
916config DMA_UNCACHED_NONE 909config DMA_UNCACHED_NONE
917 bool "Disable DMA region" 910 bool "Disable DMA region"
918endchoice 911endchoice
@@ -1274,6 +1267,8 @@ source "net/Kconfig"
1274 1267
1275source "drivers/Kconfig" 1268source "drivers/Kconfig"
1276 1269
1270source "drivers/firmware/Kconfig"
1271
1277source "fs/Kconfig" 1272source "fs/Kconfig"
1278 1273
1279source "arch/blackfin/Kconfig.debug" 1274source "arch/blackfin/Kconfig.debug"
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index f063b772934b..d4c7177e7656 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -16,6 +16,7 @@ GZFLAGS := -9
16KBUILD_CFLAGS += $(call cc-option,-mno-fdpic) 16KBUILD_CFLAGS += $(call cc-option,-mno-fdpic)
17KBUILD_AFLAGS += $(call cc-option,-mno-fdpic) 17KBUILD_AFLAGS += $(call cc-option,-mno-fdpic)
18CFLAGS_MODULE += -mlong-calls 18CFLAGS_MODULE += -mlong-calls
19LDFLAGS_MODULE += -m elf32bfin
19KALLSYMS += --symbol-prefix=_ 20KALLSYMS += --symbol-prefix=_
20 21
21KBUILD_DEFCONFIG := BF537-STAMP_defconfig 22KBUILD_DEFCONFIG := BF537-STAMP_defconfig
@@ -137,7 +138,7 @@ archclean:
137 138
138INSTALL_PATH ?= /tftpboot 139INSTALL_PATH ?= /tftpboot
139boot := arch/$(ARCH)/boot 140boot := arch/$(ARCH)/boot
140BOOT_TARGETS = vmImage vmImage.bz2 vmImage.gz vmImage.lzma 141BOOT_TARGETS = vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma
141PHONY += $(BOOT_TARGETS) install 142PHONY += $(BOOT_TARGETS) install
142KBUILD_IMAGE := $(boot)/vmImage 143KBUILD_IMAGE := $(boot)/vmImage
143 144
@@ -151,6 +152,7 @@ install:
151 152
152define archhelp 153define archhelp
153 echo '* vmImage - Alias to selected kernel format (vmImage.gz by default)' 154 echo '* vmImage - Alias to selected kernel format (vmImage.gz by default)'
155 echo ' vmImage.bin - Uncompressed Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bin)'
154 echo ' vmImage.bz2 - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bz2)' 156 echo ' vmImage.bz2 - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bz2)'
155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' 157 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' 158 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
diff --git a/arch/blackfin/boot/Makefile b/arch/blackfin/boot/Makefile
index fd9ccc5fea10..e9c48c6f8c1f 100644
--- a/arch/blackfin/boot/Makefile
+++ b/arch/blackfin/boot/Makefile
@@ -8,7 +8,7 @@
8 8
9MKIMAGE := $(srctree)/scripts/mkuboot.sh 9MKIMAGE := $(srctree)/scripts/mkuboot.sh
10 10
11targets := vmImage vmImage.bz2 vmImage.gz vmImage.lzma 11targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma
12extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma 12extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
13 13
14quiet_cmd_uimage = UIMAGE $@ 14quiet_cmd_uimage = UIMAGE $@
@@ -29,6 +29,9 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
29$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE 29$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
30 $(call if_changed,lzma) 30 $(call if_changed,lzma)
31 31
32$(obj)/vmImage.bin: $(obj)/vmlinux.bin
33 $(call if_changed,uimage,none)
34
32$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2 35$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
33 $(call if_changed,uimage,bzip2) 36 $(call if_changed,uimage,bzip2)
34 37
@@ -38,6 +41,7 @@ $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
38$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma 41$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
39 $(call if_changed,uimage,lzma) 42 $(call if_changed,uimage,lzma)
40 43
44suffix-y := bin
41suffix-$(CONFIG_KERNEL_GZIP) := gz 45suffix-$(CONFIG_KERNEL_GZIP) := gz
42suffix-$(CONFIG_KERNEL_BZIP2) := bz2 46suffix-$(CONFIG_KERNEL_BZIP2) := bz2
43suffix-$(CONFIG_KERNEL_LZMA) := lzma 47suffix-$(CONFIG_KERNEL_LZMA) := lzma
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig
index 9905b26009e5..e31559419817 100644
--- a/arch/blackfin/configs/BF518F-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -316,6 +317,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
316# CONFIG_PHYS_ADDR_T_64BIT is not set 317# CONFIG_PHYS_ADDR_T_64BIT is not set
317CONFIG_ZONE_DMA_FLAG=1 318CONFIG_ZONE_DMA_FLAG=1
318CONFIG_VIRT_TO_BUS=y 319CONFIG_VIRT_TO_BUS=y
320CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
319CONFIG_BFIN_GPTIMERS=m 321CONFIG_BFIN_GPTIMERS=m
320# CONFIG_DMA_UNCACHED_4M is not set 322# CONFIG_DMA_UNCACHED_4M is not set
321# CONFIG_DMA_UNCACHED_2M is not set 323# CONFIG_DMA_UNCACHED_2M is not set
@@ -438,17 +440,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
438# CONFIG_TIPC is not set 440# CONFIG_TIPC is not set
439# CONFIG_ATM is not set 441# CONFIG_ATM is not set
440# CONFIG_BRIDGE is not set 442# CONFIG_BRIDGE is not set
441CONFIG_NET_DSA=y 443# CONFIG_NET_DSA is not set
442# CONFIG_NET_DSA_TAG_DSA is not set
443# CONFIG_NET_DSA_TAG_EDSA is not set
444# CONFIG_NET_DSA_TAG_TRAILER is not set
445CONFIG_NET_DSA_TAG_STPID=y
446# CONFIG_NET_DSA_MV88E6XXX is not set
447# CONFIG_NET_DSA_MV88E6060 is not set
448# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
449# CONFIG_NET_DSA_MV88E6131 is not set
450# CONFIG_NET_DSA_MV88E6123_61_65 is not set
451CONFIG_NET_DSA_KSZ8893M=y
452# CONFIG_VLAN_8021Q is not set 444# CONFIG_VLAN_8021Q is not set
453# CONFIG_DECNET is not set 445# CONFIG_DECNET is not set
454# CONFIG_LLC2 is not set 446# CONFIG_LLC2 is not set
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig
index 9dc682088023..075e0fdcb399 100644
--- a/arch/blackfin/configs/BF526-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF526-EZBRD_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -321,6 +322,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
321# CONFIG_PHYS_ADDR_T_64BIT is not set 322# CONFIG_PHYS_ADDR_T_64BIT is not set
322CONFIG_ZONE_DMA_FLAG=1 323CONFIG_ZONE_DMA_FLAG=1
323CONFIG_VIRT_TO_BUS=y 324CONFIG_VIRT_TO_BUS=y
325CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
324CONFIG_BFIN_GPTIMERS=m 326CONFIG_BFIN_GPTIMERS=m
325# CONFIG_DMA_UNCACHED_4M is not set 327# CONFIG_DMA_UNCACHED_4M is not set
326# CONFIG_DMA_UNCACHED_2M is not set 328# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig
index 77e35d4baf53..6d1a623fb149 100644
--- a/arch/blackfin/configs/BF527-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -321,6 +322,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
321# CONFIG_PHYS_ADDR_T_64BIT is not set 322# CONFIG_PHYS_ADDR_T_64BIT is not set
322CONFIG_ZONE_DMA_FLAG=1 323CONFIG_ZONE_DMA_FLAG=1
323CONFIG_VIRT_TO_BUS=y 324CONFIG_VIRT_TO_BUS=y
325CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
324CONFIG_BFIN_GPTIMERS=y 326CONFIG_BFIN_GPTIMERS=y
325# CONFIG_DMA_UNCACHED_4M is not set 327# CONFIG_DMA_UNCACHED_4M is not set
326# CONFIG_DMA_UNCACHED_2M is not set 328# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index 4c044805cb5c..50f9a23ccdbd 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -283,6 +284,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
283# CONFIG_PHYS_ADDR_T_64BIT is not set 284# CONFIG_PHYS_ADDR_T_64BIT is not set
284CONFIG_ZONE_DMA_FLAG=1 285CONFIG_ZONE_DMA_FLAG=1
285CONFIG_VIRT_TO_BUS=y 286CONFIG_VIRT_TO_BUS=y
287CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
286CONFIG_BFIN_GPTIMERS=m 288CONFIG_BFIN_GPTIMERS=m
287# CONFIG_DMA_UNCACHED_4M is not set 289# CONFIG_DMA_UNCACHED_4M is not set
288# CONFIG_DMA_UNCACHED_2M is not set 290# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index c99bbcd09a68..6c60c8286318 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -283,6 +284,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
283# CONFIG_PHYS_ADDR_T_64BIT is not set 284# CONFIG_PHYS_ADDR_T_64BIT is not set
284CONFIG_ZONE_DMA_FLAG=1 285CONFIG_ZONE_DMA_FLAG=1
285CONFIG_VIRT_TO_BUS=y 286CONFIG_VIRT_TO_BUS=y
287CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
286CONFIG_BFIN_GPTIMERS=m 288CONFIG_BFIN_GPTIMERS=m
287# CONFIG_DMA_UNCACHED_4M is not set 289# CONFIG_DMA_UNCACHED_4M is not set
288# CONFIG_DMA_UNCACHED_2M is not set 290# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index 092ffda80e68..2908595b67c5 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -290,6 +291,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
290# CONFIG_PHYS_ADDR_T_64BIT is not set 291# CONFIG_PHYS_ADDR_T_64BIT is not set
291CONFIG_ZONE_DMA_FLAG=1 292CONFIG_ZONE_DMA_FLAG=1
292CONFIG_VIRT_TO_BUS=y 293CONFIG_VIRT_TO_BUS=y
294CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
293CONFIG_BFIN_GPTIMERS=m 295CONFIG_BFIN_GPTIMERS=m
294# CONFIG_DMA_UNCACHED_4M is not set 296# CONFIG_DMA_UNCACHED_4M is not set
295# CONFIG_DMA_UNCACHED_2M is not set 297# CONFIG_DMA_UNCACHED_2M is not set
@@ -704,10 +706,7 @@ CONFIG_CONFIG_INPUT_PCF8574=m
704# 706#
705# Hardware I/O ports 707# Hardware I/O ports
706# 708#
707CONFIG_SERIO=y 709# CONFIG_SERIO is not set
708CONFIG_SERIO_SERPORT=y
709CONFIG_SERIO_LIBPS2=y
710# CONFIG_SERIO_RAW is not set
711# CONFIG_GAMEPORT is not set 710# CONFIG_GAMEPORT is not set
712 711
713# 712#
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig
index fa698a89f6fe..09ea2499555e 100644
--- a/arch/blackfin/configs/BF538-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF538-EZKIT_defconfig
@@ -67,6 +67,7 @@ CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 71# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 72# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 73CONFIG_HAVE_OPROFILE=y
@@ -301,6 +302,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
301# CONFIG_PHYS_ADDR_T_64BIT is not set 302# CONFIG_PHYS_ADDR_T_64BIT is not set
302CONFIG_ZONE_DMA_FLAG=1 303CONFIG_ZONE_DMA_FLAG=1
303CONFIG_VIRT_TO_BUS=y 304CONFIG_VIRT_TO_BUS=y
305CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
304CONFIG_BFIN_GPTIMERS=m 306CONFIG_BFIN_GPTIMERS=m
305# CONFIG_DMA_UNCACHED_4M is not set 307# CONFIG_DMA_UNCACHED_4M is not set
306# CONFIG_DMA_UNCACHED_2M is not set 308# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index f773ad1155d4..eb3e98b6f3f0 100644
--- a/arch/blackfin/configs/BF548-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -1,22 +1,29 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28.10 3# Linux kernel version: 2.6.31.5
4# Thu May 21 05:50:01 2009 4# Mon Nov 2 22:02:56 2009
5# 5#
6# CONFIG_MMU is not set 6# CONFIG_MMU is not set
7# CONFIG_FPU is not set 7# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y 10CONFIG_BLACKFIN=y
11CONFIG_GENERIC_CSUM=y
12CONFIG_GENERIC_BUG=y
11CONFIG_ZONE_DMA=y 13CONFIG_ZONE_DMA=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 14CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 16CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_GPIO=y 19CONFIG_GENERIC_GPIO=y
17CONFIG_FORCE_MAX_ZONEORDER=14 20CONFIG_FORCE_MAX_ZONEORDER=14
18CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
20 27
21# 28#
22# General setup 29# General setup
@@ -26,22 +33,40 @@ CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
27CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_HAVE_KERNEL_GZIP=y
37CONFIG_HAVE_KERNEL_BZIP2=y
38CONFIG_HAVE_KERNEL_LZMA=y
39CONFIG_KERNEL_GZIP=y
40# CONFIG_KERNEL_BZIP2 is not set
41# CONFIG_KERNEL_LZMA is not set
29CONFIG_SYSVIPC=y 42CONFIG_SYSVIPC=y
30CONFIG_SYSVIPC_SYSCTL=y 43CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 44# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 45# CONFIG_BSD_PROCESS_ACCT is not set
33# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
34# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
35CONFIG_IKCONFIG=y 57CONFIG_IKCONFIG=y
36CONFIG_IKCONFIG_PROC=y 58CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=14 59CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set 60# CONFIG_GROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
40# CONFIG_SYSFS_DEPRECATED_V2 is not set 62# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
43CONFIG_BLK_DEV_INITRD=y 65CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 66CONFIG_INITRAMFS_SOURCE=""
67CONFIG_RD_GZIP=y
68# CONFIG_RD_BZIP2 is not set
69# CONFIG_RD_LZMA is not set
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 70# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
47CONFIG_ANON_INODES=y 72CONFIG_ANON_INODES=y
@@ -62,17 +87,28 @@ CONFIG_EPOLL=y
62# CONFIG_TIMERFD is not set 87# CONFIG_TIMERFD is not set
63# CONFIG_EVENTFD is not set 88# CONFIG_EVENTFD is not set
64# CONFIG_AIO is not set 89# CONFIG_AIO is not set
90
91#
92# Performance Counters
93#
65CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
66CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 97CONFIG_SLAB=y
68# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
100CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 101# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 102# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 103CONFIG_HAVE_OPROFILE=y
104
105#
106# GCOV-based kernel profiling
107#
108# CONFIG_GCOV_KERNEL is not set
109# CONFIG_SLOW_WORK is not set
73# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 110# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
74CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
75CONFIG_TINY_SHMEM=y
76CONFIG_BASE_SMALL=0 112CONFIG_BASE_SMALL=0
77CONFIG_MODULES=y 113CONFIG_MODULES=y
78# CONFIG_MODULE_FORCE_LOAD is not set 114# CONFIG_MODULE_FORCE_LOAD is not set
@@ -80,11 +116,8 @@ CONFIG_MODULE_UNLOAD=y
80# CONFIG_MODULE_FORCE_UNLOAD is not set 116# CONFIG_MODULE_FORCE_UNLOAD is not set
81# CONFIG_MODVERSIONS is not set 117# CONFIG_MODVERSIONS is not set
82# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y
84CONFIG_BLOCK=y 119CONFIG_BLOCK=y
85# CONFIG_LBD is not set 120# CONFIG_LBDAF is not set
86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
88# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
89# CONFIG_BLK_DEV_INTEGRITY is not set 122# CONFIG_BLK_DEV_INTEGRITY is not set
90 123
@@ -94,13 +127,12 @@ CONFIG_BLOCK=y
94CONFIG_IOSCHED_NOOP=y 127CONFIG_IOSCHED_NOOP=y
95CONFIG_IOSCHED_AS=y 128CONFIG_IOSCHED_AS=y
96# CONFIG_IOSCHED_DEADLINE is not set 129# CONFIG_IOSCHED_DEADLINE is not set
97CONFIG_IOSCHED_CFQ=y 130# CONFIG_IOSCHED_CFQ is not set
98CONFIG_DEFAULT_AS=y 131CONFIG_DEFAULT_AS=y
99# CONFIG_DEFAULT_DEADLINE is not set 132# CONFIG_DEFAULT_DEADLINE is not set
100# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
101# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
102CONFIG_DEFAULT_IOSCHED="anticipatory" 135CONFIG_DEFAULT_IOSCHED="anticipatory"
103CONFIG_CLASSIC_RCU=y
104# CONFIG_PREEMPT_NONE is not set 136# CONFIG_PREEMPT_NONE is not set
105CONFIG_PREEMPT_VOLUNTARY=y 137CONFIG_PREEMPT_VOLUNTARY=y
106# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
@@ -137,7 +169,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
137# CONFIG_BF544M is not set 169# CONFIG_BF544M is not set
138# CONFIG_BF547 is not set 170# CONFIG_BF547 is not set
139# CONFIG_BF547M is not set 171# CONFIG_BF547M is not set
140CONFIG_BF548=y 172CONFIG_BF548_std=y
141# CONFIG_BF548M is not set 173# CONFIG_BF548M is not set
142# CONFIG_BF549 is not set 174# CONFIG_BF549 is not set
143# CONFIG_BF549M is not set 175# CONFIG_BF549M is not set
@@ -195,7 +227,7 @@ CONFIG_BFIN548_EZKIT=y
195# 227#
196# BF548 Specific Configuration 228# BF548 Specific Configuration
197# 229#
198# CONFIG_DEB_DMA_URGENT is not set 230CONFIG_DEB_DMA_URGENT=y
199# CONFIG_BF548_ATAPI_ALTERNATIVE_PORT is not set 231# CONFIG_BF548_ATAPI_ALTERNATIVE_PORT is not set
200 232
201# 233#
@@ -352,10 +384,11 @@ CONFIG_FLATMEM=y
352CONFIG_FLAT_NODE_MEM_MAP=y 384CONFIG_FLAT_NODE_MEM_MAP=y
353CONFIG_PAGEFLAGS_EXTENDED=y 385CONFIG_PAGEFLAGS_EXTENDED=y
354CONFIG_SPLIT_PTLOCK_CPUS=4 386CONFIG_SPLIT_PTLOCK_CPUS=4
355# CONFIG_RESOURCES_64BIT is not set
356# CONFIG_PHYS_ADDR_T_64BIT is not set 387# CONFIG_PHYS_ADDR_T_64BIT is not set
357CONFIG_ZONE_DMA_FLAG=1 388CONFIG_ZONE_DMA_FLAG=1
358CONFIG_VIRT_TO_BUS=y 389CONFIG_VIRT_TO_BUS=y
390CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
391CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
359CONFIG_BFIN_GPTIMERS=m 392CONFIG_BFIN_GPTIMERS=m
360# CONFIG_DMA_UNCACHED_4M is not set 393# CONFIG_DMA_UNCACHED_4M is not set
361CONFIG_DMA_UNCACHED_2M=y 394CONFIG_DMA_UNCACHED_2M=y
@@ -366,14 +399,13 @@ CONFIG_DMA_UNCACHED_2M=y
366# Cache Support 399# Cache Support
367# 400#
368CONFIG_BFIN_ICACHE=y 401CONFIG_BFIN_ICACHE=y
369# CONFIG_BFIN_ICACHE_LOCK is not set 402CONFIG_BFIN_EXTMEM_ICACHEABLE=y
403# CONFIG_BFIN_L2_ICACHEABLE is not set
370CONFIG_BFIN_DCACHE=y 404CONFIG_BFIN_DCACHE=y
371# CONFIG_BFIN_DCACHE_BANKA is not set 405# CONFIG_BFIN_DCACHE_BANKA is not set
372CONFIG_BFIN_EXTMEM_ICACHEABLE=y
373CONFIG_BFIN_EXTMEM_DCACHEABLE=y 406CONFIG_BFIN_EXTMEM_DCACHEABLE=y
374CONFIG_BFIN_EXTMEM_WRITEBACK=y 407# CONFIG_BFIN_EXTMEM_WRITEBACK is not set
375# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 408CONFIG_BFIN_EXTMEM_WRITETHROUGH=y
376# CONFIG_BFIN_L2_ICACHEABLE is not set
377# CONFIG_BFIN_L2_DCACHEABLE is not set 409# CONFIG_BFIN_L2_DCACHEABLE is not set
378 410
379# 411#
@@ -382,7 +414,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
382# CONFIG_MPU is not set 414# CONFIG_MPU is not set
383 415
384# 416#
385# Asynchonous Memory Configuration 417# Asynchronous Memory Configuration
386# 418#
387 419
388# 420#
@@ -441,11 +473,6 @@ CONFIG_NET=y
441CONFIG_PACKET=y 473CONFIG_PACKET=y
442# CONFIG_PACKET_MMAP is not set 474# CONFIG_PACKET_MMAP is not set
443CONFIG_UNIX=y 475CONFIG_UNIX=y
444CONFIG_XFRM=y
445# CONFIG_XFRM_USER is not set
446# CONFIG_XFRM_SUB_POLICY is not set
447# CONFIG_XFRM_MIGRATE is not set
448# CONFIG_XFRM_STATISTICS is not set
449# CONFIG_NET_KEY is not set 476# CONFIG_NET_KEY is not set
450CONFIG_INET=y 477CONFIG_INET=y
451# CONFIG_IP_MULTICAST is not set 478# CONFIG_IP_MULTICAST is not set
@@ -469,13 +496,11 @@ CONFIG_IP_PNP=y
469# CONFIG_INET_XFRM_MODE_BEET is not set 496# CONFIG_INET_XFRM_MODE_BEET is not set
470# CONFIG_INET_LRO is not set 497# CONFIG_INET_LRO is not set
471# CONFIG_INET_DIAG is not set 498# CONFIG_INET_DIAG is not set
472CONFIG_INET_TCP_DIAG=y
473# CONFIG_TCP_CONG_ADVANCED is not set 499# CONFIG_TCP_CONG_ADVANCED is not set
474CONFIG_TCP_CONG_CUBIC=y 500CONFIG_TCP_CONG_CUBIC=y
475CONFIG_DEFAULT_TCP_CONG="cubic" 501CONFIG_DEFAULT_TCP_CONG="cubic"
476# CONFIG_TCP_MD5SIG is not set 502# CONFIG_TCP_MD5SIG is not set
477# CONFIG_IPV6 is not set 503# CONFIG_IPV6 is not set
478# CONFIG_NETLABEL is not set
479# CONFIG_NETWORK_SECMARK is not set 504# CONFIG_NETWORK_SECMARK is not set
480# CONFIG_NETFILTER is not set 505# CONFIG_NETFILTER is not set
481# CONFIG_IP_DCCP is not set 506# CONFIG_IP_DCCP is not set
@@ -493,7 +518,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
493# CONFIG_LAPB is not set 518# CONFIG_LAPB is not set
494# CONFIG_ECONET is not set 519# CONFIG_ECONET is not set
495# CONFIG_WAN_ROUTER is not set 520# CONFIG_WAN_ROUTER is not set
521# CONFIG_PHONET is not set
522# CONFIG_IEEE802154 is not set
496# CONFIG_NET_SCHED is not set 523# CONFIG_NET_SCHED is not set
524# CONFIG_DCB is not set
497 525
498# 526#
499# Network testing 527# Network testing
@@ -548,14 +576,10 @@ CONFIG_SIR_BFIN_DMA=y
548# CONFIG_MCS_FIR is not set 576# CONFIG_MCS_FIR is not set
549# CONFIG_BT is not set 577# CONFIG_BT is not set
550# CONFIG_AF_RXRPC is not set 578# CONFIG_AF_RXRPC is not set
551# CONFIG_PHONET is not set 579# CONFIG_WIRELESS is not set
552CONFIG_WIRELESS=y
553# CONFIG_CFG80211 is not set
554CONFIG_WIRELESS_OLD_REGULATORY=y
555CONFIG_WIRELESS_EXT=y 580CONFIG_WIRELESS_EXT=y
556CONFIG_WIRELESS_EXT_SYSFS=y 581CONFIG_LIB80211=m
557# CONFIG_MAC80211 is not set 582# CONFIG_WIMAX is not set
558# CONFIG_IEEE80211 is not set
559# CONFIG_RFKILL is not set 583# CONFIG_RFKILL is not set
560# CONFIG_NET_9P is not set 584# CONFIG_NET_9P is not set
561 585
@@ -578,6 +602,7 @@ CONFIG_EXTRA_FIRMWARE=""
578# CONFIG_CONNECTOR is not set 602# CONFIG_CONNECTOR is not set
579CONFIG_MTD=y 603CONFIG_MTD=y
580# CONFIG_MTD_DEBUG is not set 604# CONFIG_MTD_DEBUG is not set
605# CONFIG_MTD_TESTS is not set
581# CONFIG_MTD_CONCAT is not set 606# CONFIG_MTD_CONCAT is not set
582CONFIG_MTD_PARTITIONS=y 607CONFIG_MTD_PARTITIONS=y
583# CONFIG_MTD_REDBOOT_PARTS is not set 608# CONFIG_MTD_REDBOOT_PARTS is not set
@@ -653,7 +678,6 @@ CONFIG_MTD_NAND=y
653# CONFIG_MTD_NAND_VERIFY_WRITE is not set 678# CONFIG_MTD_NAND_VERIFY_WRITE is not set
654# CONFIG_MTD_NAND_ECC_SMC is not set 679# CONFIG_MTD_NAND_ECC_SMC is not set
655# CONFIG_MTD_NAND_MUSEUM_IDS is not set 680# CONFIG_MTD_NAND_MUSEUM_IDS is not set
656# CONFIG_MTD_NAND_BFIN is not set
657CONFIG_MTD_NAND_IDS=y 681CONFIG_MTD_NAND_IDS=y
658CONFIG_MTD_NAND_BF5XX=y 682CONFIG_MTD_NAND_BF5XX=y
659CONFIG_MTD_NAND_BF5XX_HWECC=y 683CONFIG_MTD_NAND_BF5XX_HWECC=y
@@ -665,6 +689,11 @@ CONFIG_MTD_NAND_BF5XX_HWECC=y
665# CONFIG_MTD_ONENAND is not set 689# CONFIG_MTD_ONENAND is not set
666 690
667# 691#
692# LPDDR flash memory drivers
693#
694# CONFIG_MTD_LPDDR is not set
695
696#
668# UBI - Unsorted block images 697# UBI - Unsorted block images
669# 698#
670# CONFIG_MTD_UBI is not set 699# CONFIG_MTD_UBI is not set
@@ -682,10 +711,20 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
682# CONFIG_ATA_OVER_ETH is not set 711# CONFIG_ATA_OVER_ETH is not set
683# CONFIG_BLK_DEV_HD is not set 712# CONFIG_BLK_DEV_HD is not set
684CONFIG_MISC_DEVICES=y 713CONFIG_MISC_DEVICES=y
685# CONFIG_EEPROM_93CX6 is not set
686# CONFIG_ICS932S401 is not set 714# CONFIG_ICS932S401 is not set
687# CONFIG_ENCLOSURE_SERVICES is not set 715# CONFIG_ENCLOSURE_SERVICES is not set
716# CONFIG_ISL29003 is not set
717# CONFIG_AD525X_DPOT is not set
688# CONFIG_C2PORT is not set 718# CONFIG_C2PORT is not set
719
720#
721# EEPROM support
722#
723# CONFIG_EEPROM_AT24 is not set
724# CONFIG_EEPROM_AT25 is not set
725# CONFIG_EEPROM_LEGACY is not set
726# CONFIG_EEPROM_MAX6875 is not set
727# CONFIG_EEPROM_93CX6 is not set
689CONFIG_HAVE_IDE=y 728CONFIG_HAVE_IDE=y
690# CONFIG_IDE is not set 729# CONFIG_IDE is not set
691 730
@@ -709,10 +748,6 @@ CONFIG_BLK_DEV_SR=m
709# CONFIG_BLK_DEV_SR_VENDOR is not set 748# CONFIG_BLK_DEV_SR_VENDOR is not set
710# CONFIG_CHR_DEV_SG is not set 749# CONFIG_CHR_DEV_SG is not set
711# CONFIG_CHR_DEV_SCH is not set 750# CONFIG_CHR_DEV_SCH is not set
712
713#
714# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
715#
716# CONFIG_SCSI_MULTI_LUN is not set 751# CONFIG_SCSI_MULTI_LUN is not set
717# CONFIG_SCSI_CONSTANTS is not set 752# CONFIG_SCSI_CONSTANTS is not set
718# CONFIG_SCSI_LOGGING is not set 753# CONFIG_SCSI_LOGGING is not set
@@ -729,6 +764,7 @@ CONFIG_SCSI_WAIT_SCAN=m
729# CONFIG_SCSI_SRP_ATTRS is not set 764# CONFIG_SCSI_SRP_ATTRS is not set
730# CONFIG_SCSI_LOWLEVEL is not set 765# CONFIG_SCSI_LOWLEVEL is not set
731# CONFIG_SCSI_DH is not set 766# CONFIG_SCSI_DH is not set
767# CONFIG_SCSI_OSD_INITIATOR is not set
732CONFIG_ATA=y 768CONFIG_ATA=y
733# CONFIG_ATA_NONSTANDARD is not set 769# CONFIG_ATA_NONSTANDARD is not set
734CONFIG_SATA_PMP=y 770CONFIG_SATA_PMP=y
@@ -744,13 +780,34 @@ CONFIG_NETDEVICES=y
744# CONFIG_EQUALIZER is not set 780# CONFIG_EQUALIZER is not set
745# CONFIG_TUN is not set 781# CONFIG_TUN is not set
746# CONFIG_VETH is not set 782# CONFIG_VETH is not set
747# CONFIG_PHYLIB is not set 783CONFIG_PHYLIB=y
784
785#
786# MII PHY device drivers
787#
788# CONFIG_MARVELL_PHY is not set
789# CONFIG_DAVICOM_PHY is not set
790# CONFIG_QSEMI_PHY is not set
791# CONFIG_LXT_PHY is not set
792# CONFIG_CICADA_PHY is not set
793# CONFIG_VITESSE_PHY is not set
794# CONFIG_SMSC_PHY is not set
795# CONFIG_BROADCOM_PHY is not set
796# CONFIG_ICPLUS_PHY is not set
797# CONFIG_REALTEK_PHY is not set
798# CONFIG_NATIONAL_PHY is not set
799# CONFIG_STE10XP is not set
800# CONFIG_LSI_ET1011C_PHY is not set
801# CONFIG_FIXED_PHY is not set
802# CONFIG_MDIO_BITBANG is not set
748CONFIG_NET_ETHERNET=y 803CONFIG_NET_ETHERNET=y
749CONFIG_MII=y 804CONFIG_MII=y
750# CONFIG_SMC91X is not set 805# CONFIG_SMC91X is not set
751CONFIG_SMSC911X=y
752# CONFIG_DM9000 is not set 806# CONFIG_DM9000 is not set
753# CONFIG_ENC28J60 is not set 807# CONFIG_ENC28J60 is not set
808# CONFIG_ETHOC is not set
809CONFIG_SMSC911X=y
810# CONFIG_DNET is not set
754# CONFIG_IBM_NEW_EMAC_ZMII is not set 811# CONFIG_IBM_NEW_EMAC_ZMII is not set
755# CONFIG_IBM_NEW_EMAC_RGMII is not set 812# CONFIG_IBM_NEW_EMAC_RGMII is not set
756# CONFIG_IBM_NEW_EMAC_TAH is not set 813# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -759,6 +816,8 @@ CONFIG_SMSC911X=y
759# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 816# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
760# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 817# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
761# CONFIG_B44 is not set 818# CONFIG_B44 is not set
819# CONFIG_KS8842 is not set
820# CONFIG_KS8851 is not set
762# CONFIG_NETDEV_1000 is not set 821# CONFIG_NETDEV_1000 is not set
763# CONFIG_NETDEV_10000 is not set 822# CONFIG_NETDEV_10000 is not set
764 823
@@ -771,13 +830,16 @@ CONFIG_LIBERTAS=m
771# CONFIG_LIBERTAS_USB is not set 830# CONFIG_LIBERTAS_USB is not set
772CONFIG_LIBERTAS_SDIO=m 831CONFIG_LIBERTAS_SDIO=m
773CONFIG_POWEROF2_BLOCKSIZE_ONLY=y 832CONFIG_POWEROF2_BLOCKSIZE_ONLY=y
833# CONFIG_LIBERTAS_SPI is not set
774# CONFIG_LIBERTAS_DEBUG is not set 834# CONFIG_LIBERTAS_DEBUG is not set
775# CONFIG_USB_ZD1201 is not set 835# CONFIG_USB_ZD1201 is not set
776# CONFIG_USB_NET_RNDIS_WLAN is not set
777# CONFIG_IWLWIFI_LEDS is not set
778# CONFIG_HOSTAP is not set 836# CONFIG_HOSTAP is not set
779 837
780# 838#
839# Enable WiMAX (Networking options) to see the WiMAX drivers
840#
841
842#
781# USB Network Adapters 843# USB Network Adapters
782# 844#
783# CONFIG_USB_CATC is not set 845# CONFIG_USB_CATC is not set
@@ -813,28 +875,31 @@ CONFIG_INPUT_EVBUG=m
813# Input Device Drivers 875# Input Device Drivers
814# 876#
815CONFIG_INPUT_KEYBOARD=y 877CONFIG_INPUT_KEYBOARD=y
878# CONFIG_KEYBOARD_ADP5588 is not set
816# CONFIG_KEYBOARD_ATKBD is not set 879# CONFIG_KEYBOARD_ATKBD is not set
817# CONFIG_KEYBOARD_SUNKBD is not set 880CONFIG_KEYBOARD_BFIN=y
818# CONFIG_KEYBOARD_LKKBD is not set 881# CONFIG_KEYBOARD_LKKBD is not set
819# CONFIG_KEYBOARD_XTKBD is not set
820# CONFIG_KEYBOARD_NEWTON is not set
821# CONFIG_KEYBOARD_STOWAWAY is not set
822# CONFIG_KEYBOARD_GPIO is not set 882# CONFIG_KEYBOARD_GPIO is not set
823CONFIG_KEYBOARD_BFIN=y 883# CONFIG_KEYBOARD_MATRIX is not set
884# CONFIG_KEYBOARD_NEWTON is not set
824# CONFIG_KEYBOARD_OPENCORES is not set 885# CONFIG_KEYBOARD_OPENCORES is not set
825# CONFIG_KEYBOARD_ADP5588 is not set 886# CONFIG_KEYBOARD_STOWAWAY is not set
887# CONFIG_KEYBOARD_SUNKBD is not set
888# CONFIG_KEYBOARD_XTKBD is not set
826# CONFIG_INPUT_MOUSE is not set 889# CONFIG_INPUT_MOUSE is not set
827# CONFIG_INPUT_JOYSTICK is not set 890# CONFIG_INPUT_JOYSTICK is not set
828# CONFIG_INPUT_TABLET is not set 891# CONFIG_INPUT_TABLET is not set
829CONFIG_INPUT_TOUCHSCREEN=y 892CONFIG_INPUT_TOUCHSCREEN=y
893# CONFIG_TOUCHSCREEN_ADS7846 is not set
830CONFIG_TOUCHSCREEN_AD7877=m 894CONFIG_TOUCHSCREEN_AD7877=m
831# CONFIG_TOUCHSCREEN_AD7879_I2C is not set 895# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
832# CONFIG_TOUCHSCREEN_AD7879_SPI is not set 896# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
833# CONFIG_TOUCHSCREEN_AD7879 is not set 897# CONFIG_TOUCHSCREEN_AD7879 is not set
834# CONFIG_TOUCHSCREEN_ADS7846 is not set 898# CONFIG_TOUCHSCREEN_EETI is not set
835# CONFIG_TOUCHSCREEN_FUJITSU is not set 899# CONFIG_TOUCHSCREEN_FUJITSU is not set
836# CONFIG_TOUCHSCREEN_GUNZE is not set 900# CONFIG_TOUCHSCREEN_GUNZE is not set
837# CONFIG_TOUCHSCREEN_ELO is not set 901# CONFIG_TOUCHSCREEN_ELO is not set
902# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
838# CONFIG_TOUCHSCREEN_MTOUCH is not set 903# CONFIG_TOUCHSCREEN_MTOUCH is not set
839# CONFIG_TOUCHSCREEN_INEXIO is not set 904# CONFIG_TOUCHSCREEN_INEXIO is not set
840# CONFIG_TOUCHSCREEN_MK712 is not set 905# CONFIG_TOUCHSCREEN_MK712 is not set
@@ -844,6 +909,8 @@ CONFIG_TOUCHSCREEN_AD7877=m
844# CONFIG_TOUCHSCREEN_WM97XX is not set 909# CONFIG_TOUCHSCREEN_WM97XX is not set
845# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set 910# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
846# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set 911# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
912# CONFIG_TOUCHSCREEN_TSC2007 is not set
913# CONFIG_TOUCHSCREEN_W90X900 is not set
847CONFIG_INPUT_MISC=y 914CONFIG_INPUT_MISC=y
848# CONFIG_INPUT_ATI_REMOTE is not set 915# CONFIG_INPUT_ATI_REMOTE is not set
849# CONFIG_INPUT_ATI_REMOTE2 is not set 916# CONFIG_INPUT_ATI_REMOTE2 is not set
@@ -852,7 +919,11 @@ CONFIG_INPUT_MISC=y
852# CONFIG_INPUT_YEALINK is not set 919# CONFIG_INPUT_YEALINK is not set
853# CONFIG_INPUT_CM109 is not set 920# CONFIG_INPUT_CM109 is not set
854# CONFIG_INPUT_UINPUT is not set 921# CONFIG_INPUT_UINPUT is not set
855# CONFIG_CONFIG_INPUT_PCF8574 is not set 922# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
923# CONFIG_INPUT_BFIN_ROTARY is not set
924# CONFIG_INPUT_AD714X is not set
925# CONFIG_INPUT_ADXL34X is not set
926# CONFIG_INPUT_PCF8574 is not set
856 927
857# 928#
858# Hardware I/O ports 929# Hardware I/O ports
@@ -863,16 +934,13 @@ CONFIG_INPUT_MISC=y
863# 934#
864# Character devices 935# Character devices
865# 936#
866# CONFIG_AD9960 is not set
867CONFIG_BFIN_DMA_INTERFACE=m 937CONFIG_BFIN_DMA_INTERFACE=m
868# CONFIG_BFIN_PPI is not set 938# CONFIG_BFIN_PPI is not set
869# CONFIG_BFIN_PPIFCD is not set 939# CONFIG_BFIN_PPIFCD is not set
870# CONFIG_BFIN_SIMPLE_TIMER is not set 940# CONFIG_BFIN_SIMPLE_TIMER is not set
871# CONFIG_BFIN_SPI_ADC is not set 941# CONFIG_BFIN_SPI_ADC is not set
872CONFIG_BFIN_SPORT=m 942CONFIG_BFIN_SPORT=m
873# CONFIG_BFIN_TIMER_LATENCY is not set
874# CONFIG_BFIN_TWI_LCD is not set 943# CONFIG_BFIN_TWI_LCD is not set
875CONFIG_SIMPLE_GPIO=m
876CONFIG_VT=y 944CONFIG_VT=y
877CONFIG_CONSOLE_TRANSLATIONS=y 945CONFIG_CONSOLE_TRANSLATIONS=y
878CONFIG_VT_CONSOLE=y 946CONFIG_VT_CONSOLE=y
@@ -890,6 +958,7 @@ CONFIG_BFIN_JTAG_COMM=m
890# 958#
891# Non-8250 serial port support 959# Non-8250 serial port support
892# 960#
961# CONFIG_SERIAL_MAX3100 is not set
893CONFIG_SERIAL_BFIN=y 962CONFIG_SERIAL_BFIN=y
894CONFIG_SERIAL_BFIN_CONSOLE=y 963CONFIG_SERIAL_BFIN_CONSOLE=y
895CONFIG_SERIAL_BFIN_DMA=y 964CONFIG_SERIAL_BFIN_DMA=y
@@ -903,6 +972,7 @@ CONFIG_SERIAL_CORE=y
903CONFIG_SERIAL_CORE_CONSOLE=y 972CONFIG_SERIAL_CORE_CONSOLE=y
904# CONFIG_SERIAL_BFIN_SPORT is not set 973# CONFIG_SERIAL_BFIN_SPORT is not set
905CONFIG_UNIX98_PTYS=y 974CONFIG_UNIX98_PTYS=y
975# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
906# CONFIG_LEGACY_PTYS is not set 976# CONFIG_LEGACY_PTYS is not set
907CONFIG_BFIN_OTP=y 977CONFIG_BFIN_OTP=y
908# CONFIG_BFIN_OTP_WRITE_ENABLE is not set 978# CONFIG_BFIN_OTP_WRITE_ENABLE is not set
@@ -951,14 +1021,9 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
951# Miscellaneous I2C Chip support 1021# Miscellaneous I2C Chip support
952# 1022#
953# CONFIG_DS1682 is not set 1023# CONFIG_DS1682 is not set
954# CONFIG_EEPROM_AT24 is not set
955# CONFIG_SENSORS_AD5252 is not set
956# CONFIG_EEPROM_LEGACY is not set
957# CONFIG_SENSORS_PCF8574 is not set 1024# CONFIG_SENSORS_PCF8574 is not set
958# CONFIG_PCF8575 is not set 1025# CONFIG_PCF8575 is not set
959# CONFIG_SENSORS_PCA9539 is not set 1026# CONFIG_SENSORS_PCA9539 is not set
960# CONFIG_SENSORS_PCF8591 is not set
961# CONFIG_SENSORS_MAX6875 is not set
962# CONFIG_SENSORS_TSL2550 is not set 1027# CONFIG_SENSORS_TSL2550 is not set
963# CONFIG_I2C_DEBUG_CORE is not set 1028# CONFIG_I2C_DEBUG_CORE is not set
964# CONFIG_I2C_DEBUG_ALGO is not set 1029# CONFIG_I2C_DEBUG_ALGO is not set
@@ -975,13 +1040,18 @@ CONFIG_SPI_BFIN=y
975# CONFIG_SPI_BFIN_LOCK is not set 1040# CONFIG_SPI_BFIN_LOCK is not set
976# CONFIG_SPI_BFIN_SPORT is not set 1041# CONFIG_SPI_BFIN_SPORT is not set
977# CONFIG_SPI_BITBANG is not set 1042# CONFIG_SPI_BITBANG is not set
1043# CONFIG_SPI_GPIO is not set
978 1044
979# 1045#
980# SPI Protocol Masters 1046# SPI Protocol Masters
981# 1047#
982# CONFIG_EEPROM_AT25 is not set
983# CONFIG_SPI_SPIDEV is not set 1048# CONFIG_SPI_SPIDEV is not set
984# CONFIG_SPI_TLE62X0 is not set 1049# CONFIG_SPI_TLE62X0 is not set
1050
1051#
1052# PPS support
1053#
1054# CONFIG_PPS is not set
985CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 1055CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
986CONFIG_GPIOLIB=y 1056CONFIG_GPIOLIB=y
987# CONFIG_DEBUG_GPIO is not set 1057# CONFIG_DEBUG_GPIO is not set
@@ -997,6 +1067,7 @@ CONFIG_GPIO_SYSFS=y
997# CONFIG_GPIO_MAX732X is not set 1067# CONFIG_GPIO_MAX732X is not set
998# CONFIG_GPIO_PCA953X is not set 1068# CONFIG_GPIO_PCA953X is not set
999# CONFIG_GPIO_PCF857X is not set 1069# CONFIG_GPIO_PCF857X is not set
1070# CONFIG_GPIO_ADP5588 is not set
1000 1071
1001# 1072#
1002# PCI GPIO expanders: 1073# PCI GPIO expanders:
@@ -1038,28 +1109,19 @@ CONFIG_SSB_POSSIBLE=y
1038# CONFIG_MFD_CORE is not set 1109# CONFIG_MFD_CORE is not set
1039# CONFIG_MFD_SM501 is not set 1110# CONFIG_MFD_SM501 is not set
1040# CONFIG_HTC_PASIC3 is not set 1111# CONFIG_HTC_PASIC3 is not set
1112# CONFIG_UCB1400_CORE is not set
1113# CONFIG_TPS65010 is not set
1114# CONFIG_TWL4030_CORE is not set
1041# CONFIG_MFD_TMIO is not set 1115# CONFIG_MFD_TMIO is not set
1042# CONFIG_PMIC_DA903X is not set 1116# CONFIG_PMIC_DA903X is not set
1043# CONFIG_PMIC_ADP5520 is not set 1117# CONFIG_PMIC_ADP5520 is not set
1044# CONFIG_MFD_WM8400 is not set 1118# CONFIG_MFD_WM8400 is not set
1045# CONFIG_MFD_WM8350_I2C is not set 1119# CONFIG_MFD_WM8350_I2C is not set
1120# CONFIG_MFD_PCF50633 is not set
1121# CONFIG_AB3100_CORE is not set
1122# CONFIG_EZX_PCAP is not set
1046# CONFIG_REGULATOR is not set 1123# CONFIG_REGULATOR is not set
1047 1124# CONFIG_MEDIA_SUPPORT is not set
1048#
1049# Multimedia devices
1050#
1051
1052#
1053# Multimedia core support
1054#
1055# CONFIG_VIDEO_DEV is not set
1056# CONFIG_DVB_CORE is not set
1057# CONFIG_VIDEO_MEDIA is not set
1058
1059#
1060# Multimedia drivers
1061#
1062# CONFIG_DAB is not set
1063 1125
1064# 1126#
1065# Graphics support 1127# Graphics support
@@ -1096,6 +1158,7 @@ CONFIG_FB_BF54X_LQ043=y
1096# CONFIG_FB_VIRTUAL is not set 1158# CONFIG_FB_VIRTUAL is not set
1097# CONFIG_FB_METRONOME is not set 1159# CONFIG_FB_METRONOME is not set
1098# CONFIG_FB_MB862XX is not set 1160# CONFIG_FB_MB862XX is not set
1161# CONFIG_FB_BROADSHEET is not set
1099# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1162# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1100 1163
1101# 1164#
@@ -1132,6 +1195,7 @@ CONFIG_SOUND_OSS_CORE=y
1132CONFIG_SND=y 1195CONFIG_SND=y
1133CONFIG_SND_TIMER=y 1196CONFIG_SND_TIMER=y
1134CONFIG_SND_PCM=y 1197CONFIG_SND_PCM=y
1198CONFIG_SND_JACK=y
1135# CONFIG_SND_SEQUENCER is not set 1199# CONFIG_SND_SEQUENCER is not set
1136CONFIG_SND_OSSEMUL=y 1200CONFIG_SND_OSSEMUL=y
1137CONFIG_SND_MIXER_OSS=y 1201CONFIG_SND_MIXER_OSS=y
@@ -1142,6 +1206,11 @@ CONFIG_SND_SUPPORT_OLD_API=y
1142CONFIG_SND_VERBOSE_PROCFS=y 1206CONFIG_SND_VERBOSE_PROCFS=y
1143# CONFIG_SND_VERBOSE_PRINTK is not set 1207# CONFIG_SND_VERBOSE_PRINTK is not set
1144# CONFIG_SND_DEBUG is not set 1208# CONFIG_SND_DEBUG is not set
1209# CONFIG_SND_RAWMIDI_SEQ is not set
1210# CONFIG_SND_OPL3_LIB_SEQ is not set
1211# CONFIG_SND_OPL4_LIB_SEQ is not set
1212# CONFIG_SND_SBAWE_SEQ is not set
1213# CONFIG_SND_EMU10K1_SEQ is not set
1145CONFIG_SND_DRIVERS=y 1214CONFIG_SND_DRIVERS=y
1146# CONFIG_SND_DUMMY is not set 1215# CONFIG_SND_DUMMY is not set
1147# CONFIG_SND_MTPAV is not set 1216# CONFIG_SND_MTPAV is not set
@@ -1152,7 +1221,6 @@ CONFIG_SND_SPI=y
1152# 1221#
1153# ALSA Blackfin devices 1222# ALSA Blackfin devices
1154# 1223#
1155# CONFIG_SND_BLACKFIN_AD1836 is not set
1156# CONFIG_SND_BFIN_AD73322 is not set 1224# CONFIG_SND_BFIN_AD73322 is not set
1157CONFIG_SND_USB=y 1225CONFIG_SND_USB=y
1158# CONFIG_SND_USB_AUDIO is not set 1226# CONFIG_SND_USB_AUDIO is not set
@@ -1160,15 +1228,17 @@ CONFIG_SND_USB=y
1160CONFIG_SND_SOC=y 1228CONFIG_SND_SOC=y
1161CONFIG_SND_SOC_AC97_BUS=y 1229CONFIG_SND_SOC_AC97_BUS=y
1162# CONFIG_SND_BF5XX_I2S is not set 1230# CONFIG_SND_BF5XX_I2S is not set
1231# CONFIG_SND_BF5XX_TDM is not set
1163CONFIG_SND_BF5XX_AC97=y 1232CONFIG_SND_BF5XX_AC97=y
1164CONFIG_SND_BF5XX_MMAP_SUPPORT=y 1233CONFIG_SND_BF5XX_MMAP_SUPPORT=y
1165# CONFIG_SND_BF5XX_MULTICHAN_SUPPORT is not set 1234# CONFIG_SND_BF5XX_MULTICHAN_SUPPORT is not set
1235CONFIG_SND_BF5XX_HAVE_COLD_RESET=y
1236CONFIG_SND_BF5XX_RESET_GPIO_NUM=19
1237CONFIG_SND_BF5XX_SOC_AD1980=y
1166CONFIG_SND_BF5XX_SOC_SPORT=y 1238CONFIG_SND_BF5XX_SOC_SPORT=y
1167CONFIG_SND_BF5XX_SOC_AC97=y 1239CONFIG_SND_BF5XX_SOC_AC97=y
1168CONFIG_SND_BF5XX_SOC_AD1980=y
1169CONFIG_SND_BF5XX_SPORT_NUM=0 1240CONFIG_SND_BF5XX_SPORT_NUM=0
1170CONFIG_SND_BF5XX_HAVE_COLD_RESET=y 1241CONFIG_SND_SOC_I2C_AND_SPI=y
1171CONFIG_SND_BF5XX_RESET_GPIO_NUM=19
1172# CONFIG_SND_SOC_ALL_CODECS is not set 1242# CONFIG_SND_SOC_ALL_CODECS is not set
1173CONFIG_SND_SOC_AD1980=y 1243CONFIG_SND_SOC_AD1980=y
1174# CONFIG_SOUND_PRIME is not set 1244# CONFIG_SOUND_PRIME is not set
@@ -1188,30 +1258,34 @@ CONFIG_USB_HID=y
1188# 1258#
1189# Special HID drivers 1259# Special HID drivers
1190# 1260#
1191CONFIG_HID_COMPAT=y
1192CONFIG_HID_A4TECH=y 1261CONFIG_HID_A4TECH=y
1193CONFIG_HID_APPLE=y 1262CONFIG_HID_APPLE=y
1194CONFIG_HID_BELKIN=y 1263CONFIG_HID_BELKIN=y
1195CONFIG_HID_BRIGHT=y
1196CONFIG_HID_CHERRY=y 1264CONFIG_HID_CHERRY=y
1197CONFIG_HID_CHICONY=y 1265CONFIG_HID_CHICONY=y
1198CONFIG_HID_CYPRESS=y 1266CONFIG_HID_CYPRESS=y
1199CONFIG_HID_DELL=y 1267# CONFIG_HID_DRAGONRISE is not set
1200CONFIG_HID_EZKEY=y 1268CONFIG_HID_EZKEY=y
1269# CONFIG_HID_KYE is not set
1201CONFIG_HID_GYRATION=y 1270CONFIG_HID_GYRATION=y
1271# CONFIG_HID_KENSINGTON is not set
1202CONFIG_HID_LOGITECH=y 1272CONFIG_HID_LOGITECH=y
1203# CONFIG_LOGITECH_FF is not set 1273# CONFIG_LOGITECH_FF is not set
1204# CONFIG_LOGIRUMBLEPAD2_FF is not set 1274# CONFIG_LOGIRUMBLEPAD2_FF is not set
1205CONFIG_HID_MICROSOFT=y 1275CONFIG_HID_MICROSOFT=y
1206CONFIG_HID_MONTEREY=y 1276CONFIG_HID_MONTEREY=y
1277# CONFIG_HID_NTRIG is not set
1207CONFIG_HID_PANTHERLORD=y 1278CONFIG_HID_PANTHERLORD=y
1208# CONFIG_PANTHERLORD_FF is not set 1279# CONFIG_PANTHERLORD_FF is not set
1209CONFIG_HID_PETALYNX=y 1280CONFIG_HID_PETALYNX=y
1210CONFIG_HID_SAMSUNG=y 1281CONFIG_HID_SAMSUNG=y
1211CONFIG_HID_SONY=y 1282CONFIG_HID_SONY=y
1212CONFIG_HID_SUNPLUS=y 1283CONFIG_HID_SUNPLUS=y
1213CONFIG_THRUSTMASTER_FF=m 1284# CONFIG_HID_GREENASIA is not set
1214CONFIG_ZEROPLUS_FF=m 1285# CONFIG_HID_SMARTJOYPLUS is not set
1286# CONFIG_HID_TOPSEED is not set
1287# CONFIG_HID_THRUSTMASTER is not set
1288# CONFIG_HID_ZEROPLUS is not set
1215CONFIG_USB_SUPPORT=y 1289CONFIG_USB_SUPPORT=y
1216CONFIG_USB_ARCH_HAS_HCD=y 1290CONFIG_USB_ARCH_HAS_HCD=y
1217# CONFIG_USB_ARCH_HAS_OHCI is not set 1291# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -1237,6 +1311,7 @@ CONFIG_USB_MON=y
1237# USB Host Controller Drivers 1311# USB Host Controller Drivers
1238# 1312#
1239# CONFIG_USB_C67X00_HCD is not set 1313# CONFIG_USB_C67X00_HCD is not set
1314# CONFIG_USB_OXU210HP_HCD is not set
1240# CONFIG_USB_ISP116X_HCD is not set 1315# CONFIG_USB_ISP116X_HCD is not set
1241# CONFIG_USB_ISP1760_HCD is not set 1316# CONFIG_USB_ISP1760_HCD is not set
1242# CONFIG_USB_ISP1362_HCD is not set 1317# CONFIG_USB_ISP1362_HCD is not set
@@ -1267,18 +1342,17 @@ CONFIG_USB_INVENTRA_DMA=y
1267# CONFIG_USB_TMC is not set 1342# CONFIG_USB_TMC is not set
1268 1343
1269# 1344#
1270# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1345# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1271# 1346#
1272 1347
1273# 1348#
1274# see USB_STORAGE Help for more information 1349# also be needed; see USB_STORAGE Help for more info
1275# 1350#
1276CONFIG_USB_STORAGE=y 1351CONFIG_USB_STORAGE=y
1277# CONFIG_USB_STORAGE_DEBUG is not set 1352# CONFIG_USB_STORAGE_DEBUG is not set
1278# CONFIG_USB_STORAGE_DATAFAB is not set 1353# CONFIG_USB_STORAGE_DATAFAB is not set
1279# CONFIG_USB_STORAGE_FREECOM is not set 1354# CONFIG_USB_STORAGE_FREECOM is not set
1280# CONFIG_USB_STORAGE_ISD200 is not set 1355# CONFIG_USB_STORAGE_ISD200 is not set
1281# CONFIG_USB_STORAGE_DPCM is not set
1282# CONFIG_USB_STORAGE_USBAT is not set 1356# CONFIG_USB_STORAGE_USBAT is not set
1283# CONFIG_USB_STORAGE_SDDR09 is not set 1357# CONFIG_USB_STORAGE_SDDR09 is not set
1284# CONFIG_USB_STORAGE_SDDR55 is not set 1358# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1314,7 +1388,6 @@ CONFIG_USB_STORAGE=y
1314# CONFIG_USB_LED is not set 1388# CONFIG_USB_LED is not set
1315# CONFIG_USB_CYPRESS_CY7C63 is not set 1389# CONFIG_USB_CYPRESS_CY7C63 is not set
1316# CONFIG_USB_CYTHERM is not set 1390# CONFIG_USB_CYTHERM is not set
1317# CONFIG_USB_PHIDGET is not set
1318# CONFIG_USB_IDMOUSE is not set 1391# CONFIG_USB_IDMOUSE is not set
1319# CONFIG_USB_FTDI_ELAN is not set 1392# CONFIG_USB_FTDI_ELAN is not set
1320# CONFIG_USB_APPLEDISPLAY is not set 1393# CONFIG_USB_APPLEDISPLAY is not set
@@ -1326,6 +1399,13 @@ CONFIG_USB_STORAGE=y
1326# CONFIG_USB_ISIGHTFW is not set 1399# CONFIG_USB_ISIGHTFW is not set
1327# CONFIG_USB_VST is not set 1400# CONFIG_USB_VST is not set
1328# CONFIG_USB_GADGET is not set 1401# CONFIG_USB_GADGET is not set
1402
1403#
1404# OTG and related infrastructure
1405#
1406CONFIG_USB_OTG_UTILS=y
1407# CONFIG_USB_GPIO_VBUS is not set
1408CONFIG_NOP_USB_XCEIV=y
1329CONFIG_MMC=y 1409CONFIG_MMC=y
1330# CONFIG_MMC_DEBUG is not set 1410# CONFIG_MMC_DEBUG is not set
1331# CONFIG_MMC_UNSAFE_RESUME is not set 1411# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -1380,6 +1460,7 @@ CONFIG_RTC_INTF_DEV=y
1380# CONFIG_RTC_DRV_S35390A is not set 1460# CONFIG_RTC_DRV_S35390A is not set
1381# CONFIG_RTC_DRV_FM3130 is not set 1461# CONFIG_RTC_DRV_FM3130 is not set
1382# CONFIG_RTC_DRV_RX8581 is not set 1462# CONFIG_RTC_DRV_RX8581 is not set
1463# CONFIG_RTC_DRV_RX8025 is not set
1383 1464
1384# 1465#
1385# SPI RTC drivers 1466# SPI RTC drivers
@@ -1411,10 +1492,21 @@ CONFIG_RTC_INTF_DEV=y
1411# 1492#
1412CONFIG_RTC_DRV_BFIN=y 1493CONFIG_RTC_DRV_BFIN=y
1413# CONFIG_DMADEVICES is not set 1494# CONFIG_DMADEVICES is not set
1495# CONFIG_AUXDISPLAY is not set
1414# CONFIG_UIO is not set 1496# CONFIG_UIO is not set
1497
1498#
1499# TI VLYNQ
1500#
1415# CONFIG_STAGING is not set 1501# CONFIG_STAGING is not set
1416 1502
1417# 1503#
1504# Firmware Drivers
1505#
1506# CONFIG_FIRMWARE_MEMMAP is not set
1507# CONFIG_SIGMA is not set
1508
1509#
1418# File systems 1510# File systems
1419# 1511#
1420CONFIG_EXT2_FS=y 1512CONFIG_EXT2_FS=y
@@ -1427,9 +1519,11 @@ CONFIG_FS_MBCACHE=y
1427# CONFIG_REISERFS_FS is not set 1519# CONFIG_REISERFS_FS is not set
1428# CONFIG_JFS_FS is not set 1520# CONFIG_JFS_FS is not set
1429# CONFIG_FS_POSIX_ACL is not set 1521# CONFIG_FS_POSIX_ACL is not set
1430CONFIG_FILE_LOCKING=y
1431# CONFIG_XFS_FS is not set 1522# CONFIG_XFS_FS is not set
1432# CONFIG_OCFS2_FS is not set 1523# CONFIG_OCFS2_FS is not set
1524# CONFIG_BTRFS_FS is not set
1525CONFIG_FILE_LOCKING=y
1526CONFIG_FSNOTIFY=y
1433# CONFIG_DNOTIFY is not set 1527# CONFIG_DNOTIFY is not set
1434CONFIG_INOTIFY=y 1528CONFIG_INOTIFY=y
1435CONFIG_INOTIFY_USER=y 1529CONFIG_INOTIFY_USER=y
@@ -1439,6 +1533,11 @@ CONFIG_INOTIFY_USER=y
1439# CONFIG_FUSE_FS is not set 1533# CONFIG_FUSE_FS is not set
1440 1534
1441# 1535#
1536# Caches
1537#
1538# CONFIG_FSCACHE is not set
1539
1540#
1442# CD-ROM/DVD Filesystems 1541# CD-ROM/DVD Filesystems
1443# 1542#
1444CONFIG_ISO9660_FS=m 1543CONFIG_ISO9660_FS=m
@@ -1467,10 +1566,7 @@ CONFIG_SYSFS=y
1467# CONFIG_TMPFS is not set 1566# CONFIG_TMPFS is not set
1468# CONFIG_HUGETLB_PAGE is not set 1567# CONFIG_HUGETLB_PAGE is not set
1469# CONFIG_CONFIGFS_FS is not set 1568# CONFIG_CONFIGFS_FS is not set
1470 1569CONFIG_MISC_FILESYSTEMS=y
1471#
1472# Miscellaneous filesystems
1473#
1474# CONFIG_ADFS_FS is not set 1570# CONFIG_ADFS_FS is not set
1475# CONFIG_AFFS_FS is not set 1571# CONFIG_AFFS_FS is not set
1476# CONFIG_HFS_FS is not set 1572# CONFIG_HFS_FS is not set
@@ -1489,17 +1585,8 @@ CONFIG_JFFS2_ZLIB=y
1489# CONFIG_JFFS2_LZO is not set 1585# CONFIG_JFFS2_LZO is not set
1490CONFIG_JFFS2_RTIME=y 1586CONFIG_JFFS2_RTIME=y
1491# CONFIG_JFFS2_RUBIN is not set 1587# CONFIG_JFFS2_RUBIN is not set
1492CONFIG_YAFFS_FS=m
1493CONFIG_YAFFS_YAFFS1=y
1494# CONFIG_YAFFS_9BYTE_TAGS is not set
1495# CONFIG_YAFFS_DOES_ECC is not set
1496CONFIG_YAFFS_YAFFS2=y
1497CONFIG_YAFFS_AUTO_YAFFS2=y
1498# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
1499# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1500# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1501CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1502# CONFIG_CRAMFS is not set 1588# CONFIG_CRAMFS is not set
1589# CONFIG_SQUASHFS is not set
1503# CONFIG_VXFS_FS is not set 1590# CONFIG_VXFS_FS is not set
1504# CONFIG_MINIX_FS is not set 1591# CONFIG_MINIX_FS is not set
1505# CONFIG_OMFS_FS is not set 1592# CONFIG_OMFS_FS is not set
@@ -1508,6 +1595,7 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1508# CONFIG_ROMFS_FS is not set 1595# CONFIG_ROMFS_FS is not set
1509# CONFIG_SYSV_FS is not set 1596# CONFIG_SYSV_FS is not set
1510# CONFIG_UFS_FS is not set 1597# CONFIG_UFS_FS is not set
1598# CONFIG_NILFS2_FS is not set
1511CONFIG_NETWORK_FILESYSTEMS=y 1599CONFIG_NETWORK_FILESYSTEMS=y
1512CONFIG_NFS_FS=m 1600CONFIG_NFS_FS=m
1513CONFIG_NFS_V3=y 1601CONFIG_NFS_V3=y
@@ -1522,7 +1610,6 @@ CONFIG_LOCKD_V4=y
1522CONFIG_EXPORTFS=m 1610CONFIG_EXPORTFS=m
1523CONFIG_NFS_COMMON=y 1611CONFIG_NFS_COMMON=y
1524CONFIG_SUNRPC=m 1612CONFIG_SUNRPC=m
1525# CONFIG_SUNRPC_REGISTER_V4 is not set
1526# CONFIG_RPCSEC_GSS_KRB5 is not set 1613# CONFIG_RPCSEC_GSS_KRB5 is not set
1527# CONFIG_RPCSEC_GSS_SPKM3 is not set 1614# CONFIG_RPCSEC_GSS_SPKM3 is not set
1528CONFIG_SMB_FS=m 1615CONFIG_SMB_FS=m
@@ -1596,11 +1683,15 @@ CONFIG_FRAME_WARN=1024
1596# CONFIG_UNUSED_SYMBOLS is not set 1683# CONFIG_UNUSED_SYMBOLS is not set
1597CONFIG_DEBUG_FS=y 1684CONFIG_DEBUG_FS=y
1598# CONFIG_HEADERS_CHECK is not set 1685# CONFIG_HEADERS_CHECK is not set
1686CONFIG_DEBUG_SECTION_MISMATCH=y
1599CONFIG_DEBUG_KERNEL=y 1687CONFIG_DEBUG_KERNEL=y
1600CONFIG_DEBUG_SHIRQ=y 1688CONFIG_DEBUG_SHIRQ=y
1601CONFIG_DETECT_SOFTLOCKUP=y 1689CONFIG_DETECT_SOFTLOCKUP=y
1602# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1690# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1603CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1691CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1692CONFIG_DETECT_HUNG_TASK=y
1693# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1694CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1604CONFIG_SCHED_DEBUG=y 1695CONFIG_SCHED_DEBUG=y
1605# CONFIG_SCHEDSTATS is not set 1696# CONFIG_SCHEDSTATS is not set
1606# CONFIG_TIMER_STATS is not set 1697# CONFIG_TIMER_STATS is not set
@@ -1608,16 +1699,21 @@ CONFIG_SCHED_DEBUG=y
1608# CONFIG_DEBUG_SLAB is not set 1699# CONFIG_DEBUG_SLAB is not set
1609# CONFIG_DEBUG_SPINLOCK is not set 1700# CONFIG_DEBUG_SPINLOCK is not set
1610# CONFIG_DEBUG_MUTEXES is not set 1701# CONFIG_DEBUG_MUTEXES is not set
1702# CONFIG_DEBUG_LOCK_ALLOC is not set
1703# CONFIG_PROVE_LOCKING is not set
1704# CONFIG_LOCK_STAT is not set
1611# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1705# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1612# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1706# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1613# CONFIG_DEBUG_KOBJECT is not set 1707# CONFIG_DEBUG_KOBJECT is not set
1614CONFIG_DEBUG_BUGVERBOSE=y 1708CONFIG_DEBUG_BUGVERBOSE=y
1615CONFIG_DEBUG_INFO=y 1709CONFIG_DEBUG_INFO=y
1616# CONFIG_DEBUG_VM is not set 1710# CONFIG_DEBUG_VM is not set
1711# CONFIG_DEBUG_NOMMU_REGIONS is not set
1617# CONFIG_DEBUG_WRITECOUNT is not set 1712# CONFIG_DEBUG_WRITECOUNT is not set
1618# CONFIG_DEBUG_MEMORY_INIT is not set 1713# CONFIG_DEBUG_MEMORY_INIT is not set
1619# CONFIG_DEBUG_LIST is not set 1714# CONFIG_DEBUG_LIST is not set
1620# CONFIG_DEBUG_SG is not set 1715# CONFIG_DEBUG_SG is not set
1716# CONFIG_DEBUG_NOTIFIERS is not set
1621# CONFIG_FRAME_POINTER is not set 1717# CONFIG_FRAME_POINTER is not set
1622# CONFIG_BOOT_PRINTK_DELAY is not set 1718# CONFIG_BOOT_PRINTK_DELAY is not set
1623# CONFIG_RCU_TORTURE_TEST is not set 1719# CONFIG_RCU_TORTURE_TEST is not set
@@ -1625,17 +1721,16 @@ CONFIG_DEBUG_INFO=y
1625# CONFIG_BACKTRACE_SELF_TEST is not set 1721# CONFIG_BACKTRACE_SELF_TEST is not set
1626# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1722# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1627# CONFIG_FAULT_INJECTION is not set 1723# CONFIG_FAULT_INJECTION is not set
1628 1724# CONFIG_PAGE_POISONING is not set
1629# 1725CONFIG_HAVE_FUNCTION_TRACER=y
1630# Tracers 1726CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1631# 1727CONFIG_TRACING_SUPPORT=y
1632# CONFIG_SCHED_TRACER is not set 1728# CONFIG_FTRACE is not set
1633# CONFIG_CONTEXT_SWITCH_TRACER is not set 1729# CONFIG_DYNAMIC_DEBUG is not set
1634# CONFIG_BOOT_TRACER is not set
1635# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1636# CONFIG_SAMPLES is not set 1730# CONFIG_SAMPLES is not set
1637CONFIG_HAVE_ARCH_KGDB=y 1731CONFIG_HAVE_ARCH_KGDB=y
1638# CONFIG_KGDB is not set 1732# CONFIG_KGDB is not set
1733# CONFIG_KMEMCHECK is not set
1639# CONFIG_DEBUG_STACKOVERFLOW is not set 1734# CONFIG_DEBUG_STACKOVERFLOW is not set
1640# CONFIG_DEBUG_STACK_USAGE is not set 1735# CONFIG_DEBUG_STACK_USAGE is not set
1641CONFIG_DEBUG_VERBOSE=y 1736CONFIG_DEBUG_VERBOSE=y
@@ -1657,17 +1752,15 @@ CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE=y
1657CONFIG_EARLY_PRINTK=y 1752CONFIG_EARLY_PRINTK=y
1658CONFIG_CPLB_INFO=y 1753CONFIG_CPLB_INFO=y
1659CONFIG_ACCESS_CHECK=y 1754CONFIG_ACCESS_CHECK=y
1755# CONFIG_BFIN_ISRAM_SELF_TEST is not set
1660 1756
1661# 1757#
1662# Security options 1758# Security options
1663# 1759#
1664# CONFIG_KEYS is not set 1760# CONFIG_KEYS is not set
1665CONFIG_SECURITY=y 1761# CONFIG_SECURITY is not set
1666# CONFIG_SECURITYFS is not set 1762# CONFIG_SECURITYFS is not set
1667# CONFIG_SECURITY_NETWORK is not set
1668# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1763# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1669# CONFIG_SECURITY_ROOTPLUG is not set
1670CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1671CONFIG_CRYPTO=y 1764CONFIG_CRYPTO=y
1672 1765
1673# 1766#
@@ -1746,6 +1839,7 @@ CONFIG_CRYPTO=y
1746# Compression 1839# Compression
1747# 1840#
1748# CONFIG_CRYPTO_DEFLATE is not set 1841# CONFIG_CRYPTO_DEFLATE is not set
1842# CONFIG_CRYPTO_ZLIB is not set
1749# CONFIG_CRYPTO_LZO is not set 1843# CONFIG_CRYPTO_LZO is not set
1750 1844
1751# 1845#
@@ -1753,11 +1847,13 @@ CONFIG_CRYPTO=y
1753# 1847#
1754# CONFIG_CRYPTO_ANSI_CPRNG is not set 1848# CONFIG_CRYPTO_ANSI_CPRNG is not set
1755CONFIG_CRYPTO_HW=y 1849CONFIG_CRYPTO_HW=y
1850# CONFIG_BINARY_PRINTF is not set
1756 1851
1757# 1852#
1758# Library routines 1853# Library routines
1759# 1854#
1760CONFIG_BITREVERSE=y 1855CONFIG_BITREVERSE=y
1856CONFIG_GENERIC_FIND_LAST_BIT=y
1761CONFIG_CRC_CCITT=m 1857CONFIG_CRC_CCITT=m
1762# CONFIG_CRC16 is not set 1858# CONFIG_CRC16 is not set
1763# CONFIG_CRC_T10DIF is not set 1859# CONFIG_CRC_T10DIF is not set
@@ -1767,6 +1863,8 @@ CONFIG_CRC32=y
1767# CONFIG_LIBCRC32C is not set 1863# CONFIG_LIBCRC32C is not set
1768CONFIG_ZLIB_INFLATE=y 1864CONFIG_ZLIB_INFLATE=y
1769CONFIG_ZLIB_DEFLATE=m 1865CONFIG_ZLIB_DEFLATE=m
1866CONFIG_DECOMPRESS_GZIP=y
1770CONFIG_HAS_IOMEM=y 1867CONFIG_HAS_IOMEM=y
1771CONFIG_HAS_IOPORT=y 1868CONFIG_HAS_IOPORT=y
1772CONFIG_HAS_DMA=y 1869CONFIG_HAS_DMA=y
1870CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig
new file mode 100644
index 000000000000..b9b0f93d0bd3
--- /dev/null
+++ b/arch/blackfin/configs/BF561-ACVILON_defconfig
@@ -0,0 +1,1643 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31.4
4# Sat Oct 24 12:15:32 2009
5#
6# CONFIG_MMU is not set
7# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y
11CONFIG_GENERIC_CSUM=y
12CONFIG_GENERIC_BUG=y
13CONFIG_ZONE_DMA=y
14CONFIG_GENERIC_FIND_NEXT_BIT=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_HARDIRQS=y
17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
19CONFIG_GENERIC_GPIO=y
20CONFIG_FORCE_MAX_ZONEORDER=14
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
27
28#
29# General setup
30#
31CONFIG_EXPERIMENTAL=y
32CONFIG_BROKEN_ON_SMP=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_HAVE_KERNEL_GZIP=y
37CONFIG_HAVE_KERNEL_BZIP2=y
38CONFIG_HAVE_KERNEL_LZMA=y
39CONFIG_KERNEL_GZIP=y
40# CONFIG_KERNEL_BZIP2 is not set
41# CONFIG_KERNEL_LZMA is not set
42CONFIG_SYSVIPC=y
43CONFIG_SYSVIPC_SYSCTL=y
44# CONFIG_POSIX_MQUEUE is not set
45# CONFIG_BSD_PROCESS_ACCT is not set
46# CONFIG_TASKSTATS is not set
47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
57CONFIG_IKCONFIG=y
58CONFIG_IKCONFIG_PROC=y
59CONFIG_LOG_BUF_SHIFT=14
60# CONFIG_GROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
62CONFIG_SYSFS_DEPRECATED=y
63CONFIG_SYSFS_DEPRECATED_V2=y
64# CONFIG_RELAY is not set
65# CONFIG_NAMESPACES is not set
66# CONFIG_BLK_DEV_INITRD is not set
67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
68CONFIG_SYSCTL=y
69CONFIG_ANON_INODES=y
70CONFIG_EMBEDDED=y
71CONFIG_UID16=y
72# CONFIG_SYSCTL_SYSCALL is not set
73CONFIG_KALLSYMS=y
74# CONFIG_KALLSYMS_ALL is not set
75# CONFIG_KALLSYMS_EXTRA_PASS is not set
76CONFIG_HOTPLUG=y
77CONFIG_PRINTK=y
78CONFIG_BUG=y
79# CONFIG_ELF_CORE is not set
80CONFIG_BASE_FULL=y
81# CONFIG_FUTEX is not set
82CONFIG_EPOLL=y
83# CONFIG_SIGNALFD is not set
84# CONFIG_TIMERFD is not set
85# CONFIG_EVENTFD is not set
86# CONFIG_AIO is not set
87
88#
89# Performance Counters
90#
91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y
95# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set
97# CONFIG_MMAP_ALLOW_UNINITIALIZED is not set
98# CONFIG_PROFILING is not set
99# CONFIG_MARKERS is not set
100CONFIG_HAVE_OPROFILE=y
101
102#
103# GCOV-based kernel profiling
104#
105# CONFIG_GCOV_KERNEL is not set
106# CONFIG_SLOW_WORK is not set
107# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
108CONFIG_SLABINFO=y
109CONFIG_BASE_SMALL=0
110CONFIG_MODULES=y
111# CONFIG_MODULE_FORCE_LOAD is not set
112CONFIG_MODULE_UNLOAD=y
113# CONFIG_MODULE_FORCE_UNLOAD is not set
114# CONFIG_MODVERSIONS is not set
115# CONFIG_MODULE_SRCVERSION_ALL is not set
116CONFIG_BLOCK=y
117CONFIG_LBDAF=y
118# CONFIG_BLK_DEV_BSG is not set
119# CONFIG_BLK_DEV_INTEGRITY is not set
120
121#
122# IO Schedulers
123#
124CONFIG_IOSCHED_NOOP=y
125CONFIG_IOSCHED_AS=y
126# CONFIG_IOSCHED_DEADLINE is not set
127CONFIG_IOSCHED_CFQ=y
128CONFIG_DEFAULT_AS=y
129# CONFIG_DEFAULT_DEADLINE is not set
130# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory"
133# CONFIG_PREEMPT_NONE is not set
134CONFIG_PREEMPT_VOLUNTARY=y
135# CONFIG_PREEMPT is not set
136# CONFIG_FREEZER is not set
137
138#
139# Blackfin Processor Options
140#
141
142#
143# Processor and Board Settings
144#
145# CONFIG_BF512 is not set
146# CONFIG_BF514 is not set
147# CONFIG_BF516 is not set
148# CONFIG_BF518 is not set
149# CONFIG_BF522 is not set
150# CONFIG_BF523 is not set
151# CONFIG_BF524 is not set
152# CONFIG_BF525 is not set
153# CONFIG_BF526 is not set
154# CONFIG_BF527 is not set
155# CONFIG_BF531 is not set
156# CONFIG_BF532 is not set
157# CONFIG_BF533 is not set
158# CONFIG_BF534 is not set
159# CONFIG_BF536 is not set
160# CONFIG_BF537 is not set
161# CONFIG_BF538 is not set
162# CONFIG_BF539 is not set
163# CONFIG_BF542 is not set
164# CONFIG_BF542M is not set
165# CONFIG_BF544 is not set
166# CONFIG_BF544M is not set
167# CONFIG_BF547 is not set
168# CONFIG_BF547M is not set
169# CONFIG_BF548 is not set
170# CONFIG_BF548M is not set
171# CONFIG_BF549 is not set
172# CONFIG_BF549M is not set
173CONFIG_BF561=y
174# CONFIG_SMP is not set
175CONFIG_BF_REV_MIN=3
176CONFIG_BF_REV_MAX=5
177# CONFIG_BF_REV_0_0 is not set
178# CONFIG_BF_REV_0_1 is not set
179# CONFIG_BF_REV_0_2 is not set
180# CONFIG_BF_REV_0_3 is not set
181# CONFIG_BF_REV_0_4 is not set
182CONFIG_BF_REV_0_5=y
183# CONFIG_BF_REV_0_6 is not set
184# CONFIG_BF_REV_ANY is not set
185# CONFIG_BF_REV_NONE is not set
186CONFIG_IRQ_PLL_WAKEUP=7
187CONFIG_IRQ_SPORT0_ERROR=7
188CONFIG_IRQ_SPORT1_ERROR=7
189CONFIG_IRQ_TIMER0=10
190CONFIG_IRQ_TIMER1=10
191CONFIG_IRQ_TIMER2=10
192CONFIG_IRQ_TIMER3=10
193CONFIG_IRQ_TIMER4=10
194CONFIG_IRQ_TIMER5=10
195CONFIG_IRQ_TIMER6=10
196CONFIG_IRQ_TIMER7=10
197CONFIG_IRQ_SPI_ERROR=7
198# CONFIG_BFIN561_EZKIT is not set
199# CONFIG_BFIN561_TEPLA is not set
200# CONFIG_BFIN561_BLUETECHNIX_CM is not set
201CONFIG_BFIN561_ACVILON=y
202
203#
204# BF561 Specific Configuration
205#
206
207#
208# Core B Support
209#
210# CONFIG_BF561_COREB is not set
211
212#
213# Interrupt Priority Assignment
214#
215
216#
217# Priority
218#
219CONFIG_IRQ_DMA1_ERROR=7
220CONFIG_IRQ_DMA2_ERROR=7
221CONFIG_IRQ_IMDMA_ERROR=7
222CONFIG_IRQ_PPI0_ERROR=7
223CONFIG_IRQ_PPI1_ERROR=7
224CONFIG_IRQ_UART_ERROR=7
225CONFIG_IRQ_RESERVED_ERROR=7
226CONFIG_IRQ_DMA1_0=8
227CONFIG_IRQ_DMA1_1=8
228CONFIG_IRQ_DMA1_2=8
229CONFIG_IRQ_DMA1_3=8
230CONFIG_IRQ_DMA1_4=8
231CONFIG_IRQ_DMA1_5=8
232CONFIG_IRQ_DMA1_6=8
233CONFIG_IRQ_DMA1_7=8
234CONFIG_IRQ_DMA1_8=8
235CONFIG_IRQ_DMA1_9=8
236CONFIG_IRQ_DMA1_10=8
237CONFIG_IRQ_DMA1_11=8
238CONFIG_IRQ_DMA2_0=9
239CONFIG_IRQ_DMA2_1=9
240CONFIG_IRQ_DMA2_2=9
241CONFIG_IRQ_DMA2_3=9
242CONFIG_IRQ_DMA2_4=9
243CONFIG_IRQ_DMA2_5=9
244CONFIG_IRQ_DMA2_6=9
245CONFIG_IRQ_DMA2_7=9
246CONFIG_IRQ_DMA2_8=9
247CONFIG_IRQ_DMA2_9=9
248CONFIG_IRQ_DMA2_10=9
249CONFIG_IRQ_DMA2_11=9
250CONFIG_IRQ_TIMER8=10
251CONFIG_IRQ_TIMER9=10
252CONFIG_IRQ_TIMER10=10
253CONFIG_IRQ_TIMER11=10
254CONFIG_IRQ_PROG0_INTA=11
255CONFIG_IRQ_PROG0_INTB=11
256CONFIG_IRQ_PROG1_INTA=11
257CONFIG_IRQ_PROG1_INTB=11
258CONFIG_IRQ_PROG2_INTA=11
259CONFIG_IRQ_PROG2_INTB=11
260CONFIG_IRQ_DMA1_WRRD0=8
261CONFIG_IRQ_DMA1_WRRD1=8
262CONFIG_IRQ_DMA2_WRRD0=9
263CONFIG_IRQ_DMA2_WRRD1=9
264CONFIG_IRQ_IMDMA_WRRD0=12
265CONFIG_IRQ_IMDMA_WRRD1=12
266CONFIG_IRQ_WDTIMER=13
267
268#
269# Board customizations
270#
271# CONFIG_CMDLINE_BOOL is not set
272CONFIG_BOOT_LOAD=0x1000
273
274#
275# Clock/PLL Setup
276#
277CONFIG_CLKIN_HZ=12000000
278# CONFIG_BFIN_KERNEL_CLOCK is not set
279CONFIG_MAX_VCO_HZ=600000000
280CONFIG_MIN_VCO_HZ=50000000
281CONFIG_MAX_SCLK_HZ=133333333
282CONFIG_MIN_SCLK_HZ=27000000
283
284#
285# Kernel Timer/Scheduler
286#
287# CONFIG_HZ_100 is not set
288CONFIG_HZ_250=y
289# CONFIG_HZ_300 is not set
290# CONFIG_HZ_1000 is not set
291CONFIG_HZ=250
292CONFIG_SCHED_HRTICK=y
293CONFIG_GENERIC_TIME=y
294CONFIG_GENERIC_CLOCKEVENTS=y
295# CONFIG_TICKSOURCE_GPTMR0 is not set
296CONFIG_TICKSOURCE_CORETMR=y
297CONFIG_CYCLES_CLOCKSOURCE=y
298# CONFIG_GPTMR0_CLOCKSOURCE is not set
299CONFIG_TICK_ONESHOT=y
300# CONFIG_NO_HZ is not set
301CONFIG_HIGH_RES_TIMERS=y
302CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
303
304#
305# Misc
306#
307CONFIG_BFIN_SCRATCH_REG_RETN=y
308# CONFIG_BFIN_SCRATCH_REG_RETE is not set
309# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
310
311#
312# Blackfin Kernel Optimizations
313#
314
315#
316# Memory Optimizations
317#
318CONFIG_I_ENTRY_L1=y
319CONFIG_EXCPT_IRQ_SYSC_L1=y
320CONFIG_DO_IRQ_L1=y
321CONFIG_CORE_TIMER_IRQ_L1=y
322CONFIG_IDLE_L1=y
323CONFIG_SCHEDULE_L1=y
324CONFIG_ARITHMETIC_OPS_L1=y
325CONFIG_ACCESS_OK_L1=y
326CONFIG_MEMSET_L1=y
327CONFIG_MEMCPY_L1=y
328CONFIG_SYS_BFIN_SPINLOCK_L1=y
329# CONFIG_IP_CHECKSUM_L1 is not set
330CONFIG_CACHELINE_ALIGNED_L1=y
331# CONFIG_SYSCALL_TAB_L1 is not set
332# CONFIG_CPLB_SWITCH_TAB_L1 is not set
333CONFIG_APP_STACK_L1=y
334
335#
336# Speed Optimizations
337#
338CONFIG_BFIN_INS_LOWOVERHEAD=y
339CONFIG_RAMKERNEL=y
340# CONFIG_ROMKERNEL is not set
341CONFIG_SELECT_MEMORY_MODEL=y
342CONFIG_FLATMEM_MANUAL=y
343# CONFIG_DISCONTIGMEM_MANUAL is not set
344# CONFIG_SPARSEMEM_MANUAL is not set
345CONFIG_FLATMEM=y
346CONFIG_FLAT_NODE_MEM_MAP=y
347CONFIG_PAGEFLAGS_EXTENDED=y
348CONFIG_SPLIT_PTLOCK_CPUS=4
349# CONFIG_PHYS_ADDR_T_64BIT is not set
350CONFIG_ZONE_DMA_FLAG=1
351CONFIG_VIRT_TO_BUS=y
352CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
353CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
354CONFIG_BFIN_GPTIMERS=y
355CONFIG_DMA_UNCACHED_4M=y
356# CONFIG_DMA_UNCACHED_2M is not set
357# CONFIG_DMA_UNCACHED_1M is not set
358# CONFIG_DMA_UNCACHED_NONE is not set
359
360#
361# Cache Support
362#
363CONFIG_BFIN_ICACHE=y
364CONFIG_BFIN_EXTMEM_ICACHEABLE=y
365# CONFIG_BFIN_L2_ICACHEABLE is not set
366CONFIG_BFIN_DCACHE=y
367# CONFIG_BFIN_DCACHE_BANKA is not set
368CONFIG_BFIN_EXTMEM_DCACHEABLE=y
369CONFIG_BFIN_EXTMEM_WRITEBACK=y
370# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
371# CONFIG_BFIN_L2_DCACHEABLE is not set
372
373#
374# Memory Protection Unit
375#
376# CONFIG_MPU is not set
377
378#
379# Asynchronous Memory Configuration
380#
381
382#
383# EBIU_AMGCTL Global Control
384#
385CONFIG_C_AMCKEN=y
386CONFIG_C_CDPRIO=y
387CONFIG_C_B0PEN=y
388CONFIG_C_B1PEN=y
389CONFIG_C_B2PEN=y
390# CONFIG_C_B3PEN is not set
391# CONFIG_C_AMBEN is not set
392# CONFIG_C_AMBEN_B0 is not set
393# CONFIG_C_AMBEN_B0_B1 is not set
394# CONFIG_C_AMBEN_B0_B1_B2 is not set
395CONFIG_C_AMBEN_ALL=y
396
397#
398# EBIU_AMBCTL Control
399#
400CONFIG_BANK_0=0x99b2
401CONFIG_BANK_1=0x3350
402CONFIG_BANK_2=0x7BB0
403CONFIG_BANK_3=0xAAC2
404
405#
406# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
407#
408# CONFIG_ARCH_SUPPORTS_MSI is not set
409# CONFIG_PCCARD is not set
410
411#
412# Executable file formats
413#
414CONFIG_BINFMT_ELF_FDPIC=y
415CONFIG_BINFMT_FLAT=y
416CONFIG_BINFMT_ZFLAT=y
417# CONFIG_BINFMT_SHARED_FLAT is not set
418# CONFIG_HAVE_AOUT is not set
419# CONFIG_BINFMT_MISC is not set
420
421#
422# Power management options
423#
424# CONFIG_PM is not set
425CONFIG_ARCH_SUSPEND_POSSIBLE=y
426
427#
428# CPU Frequency scaling
429#
430# CONFIG_CPU_FREQ is not set
431CONFIG_NET=y
432
433#
434# Networking options
435#
436CONFIG_PACKET=y
437# CONFIG_PACKET_MMAP is not set
438CONFIG_UNIX=y
439CONFIG_XFRM=y
440# CONFIG_XFRM_USER is not set
441# CONFIG_XFRM_SUB_POLICY is not set
442# CONFIG_XFRM_MIGRATE is not set
443# CONFIG_XFRM_STATISTICS is not set
444# CONFIG_NET_KEY is not set
445CONFIG_INET=y
446# CONFIG_IP_MULTICAST is not set
447# CONFIG_IP_ADVANCED_ROUTER is not set
448CONFIG_IP_FIB_HASH=y
449CONFIG_IP_PNP=y
450# CONFIG_IP_PNP_DHCP is not set
451# CONFIG_IP_PNP_BOOTP is not set
452# CONFIG_IP_PNP_RARP is not set
453# CONFIG_NET_IPIP is not set
454# CONFIG_NET_IPGRE is not set
455# CONFIG_ARPD is not set
456CONFIG_SYN_COOKIES=y
457# CONFIG_INET_AH is not set
458# CONFIG_INET_ESP is not set
459# CONFIG_INET_IPCOMP is not set
460# CONFIG_INET_XFRM_TUNNEL is not set
461# CONFIG_INET_TUNNEL is not set
462CONFIG_INET_XFRM_MODE_TRANSPORT=y
463CONFIG_INET_XFRM_MODE_TUNNEL=y
464CONFIG_INET_XFRM_MODE_BEET=y
465# CONFIG_INET_LRO is not set
466CONFIG_INET_DIAG=y
467CONFIG_INET_TCP_DIAG=y
468# CONFIG_TCP_CONG_ADVANCED is not set
469CONFIG_TCP_CONG_CUBIC=y
470CONFIG_DEFAULT_TCP_CONG="cubic"
471# CONFIG_TCP_MD5SIG is not set
472# CONFIG_IPV6 is not set
473# CONFIG_NETLABEL is not set
474# CONFIG_NETWORK_SECMARK is not set
475# CONFIG_NETFILTER is not set
476# CONFIG_IP_DCCP is not set
477# CONFIG_IP_SCTP is not set
478# CONFIG_TIPC is not set
479# CONFIG_ATM is not set
480# CONFIG_BRIDGE is not set
481# CONFIG_NET_DSA is not set
482# CONFIG_VLAN_8021Q is not set
483# CONFIG_DECNET is not set
484# CONFIG_LLC2 is not set
485# CONFIG_IPX is not set
486# CONFIG_ATALK is not set
487# CONFIG_X25 is not set
488# CONFIG_LAPB is not set
489# CONFIG_ECONET is not set
490# CONFIG_WAN_ROUTER is not set
491# CONFIG_PHONET is not set
492# CONFIG_IEEE802154 is not set
493# CONFIG_NET_SCHED is not set
494# CONFIG_DCB is not set
495
496#
497# Network testing
498#
499# CONFIG_NET_PKTGEN is not set
500# CONFIG_HAMRADIO is not set
501# CONFIG_CAN is not set
502# CONFIG_IRDA is not set
503# CONFIG_BT is not set
504# CONFIG_AF_RXRPC is not set
505# CONFIG_WIRELESS is not set
506# CONFIG_WIMAX is not set
507# CONFIG_RFKILL is not set
508# CONFIG_NET_9P is not set
509
510#
511# Device Drivers
512#
513
514#
515# Generic Driver Options
516#
517CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
518CONFIG_STANDALONE=y
519CONFIG_PREVENT_FIRMWARE_BUILD=y
520# CONFIG_FW_LOADER is not set
521# CONFIG_DEBUG_DRIVER is not set
522# CONFIG_DEBUG_DEVRES is not set
523# CONFIG_SYS_HYPERVISOR is not set
524# CONFIG_CONNECTOR is not set
525CONFIG_MTD=y
526# CONFIG_MTD_DEBUG is not set
527# CONFIG_MTD_TESTS is not set
528# CONFIG_MTD_CONCAT is not set
529CONFIG_MTD_PARTITIONS=y
530# CONFIG_MTD_REDBOOT_PARTS is not set
531CONFIG_MTD_CMDLINE_PARTS=y
532# CONFIG_MTD_AR7_PARTS is not set
533
534#
535# User Modules And Translation Layers
536#
537CONFIG_MTD_CHAR=y
538CONFIG_MTD_BLKDEVS=y
539CONFIG_MTD_BLOCK=y
540# CONFIG_FTL is not set
541# CONFIG_NFTL is not set
542# CONFIG_INFTL is not set
543# CONFIG_RFD_FTL is not set
544# CONFIG_SSFDC is not set
545# CONFIG_MTD_OOPS is not set
546
547#
548# RAM/ROM/Flash chip drivers
549#
550# CONFIG_MTD_CFI is not set
551# CONFIG_MTD_JEDECPROBE is not set
552CONFIG_MTD_MAP_BANK_WIDTH_1=y
553CONFIG_MTD_MAP_BANK_WIDTH_2=y
554CONFIG_MTD_MAP_BANK_WIDTH_4=y
555# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
556# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
557# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
558CONFIG_MTD_CFI_I1=y
559CONFIG_MTD_CFI_I2=y
560# CONFIG_MTD_CFI_I4 is not set
561# CONFIG_MTD_CFI_I8 is not set
562CONFIG_MTD_RAM=y
563# CONFIG_MTD_ROM is not set
564# CONFIG_MTD_ABSENT is not set
565
566#
567# Mapping drivers for chip access
568#
569# CONFIG_MTD_COMPLEX_MAPPINGS is not set
570# CONFIG_MTD_UCLINUX is not set
571CONFIG_MTD_PLATRAM=y
572
573#
574# Self-contained MTD device drivers
575#
576# CONFIG_MTD_DATAFLASH is not set
577# CONFIG_MTD_M25P80 is not set
578# CONFIG_MTD_SLRAM is not set
579CONFIG_MTD_PHRAM=y
580# CONFIG_MTD_MTDRAM is not set
581CONFIG_MTD_BLOCK2MTD=y
582
583#
584# Disk-On-Chip Device Drivers
585#
586# CONFIG_MTD_DOC2000 is not set
587# CONFIG_MTD_DOC2001 is not set
588# CONFIG_MTD_DOC2001PLUS is not set
589CONFIG_MTD_NAND=y
590CONFIG_MTD_NAND_VERIFY_WRITE=y
591# CONFIG_MTD_NAND_ECC_SMC is not set
592# CONFIG_MTD_NAND_MUSEUM_IDS is not set
593CONFIG_MTD_NAND_IDS=y
594# CONFIG_MTD_NAND_DISKONCHIP is not set
595# CONFIG_MTD_NAND_NANDSIM is not set
596CONFIG_MTD_NAND_PLATFORM=y
597# CONFIG_MTD_ALAUDA is not set
598# CONFIG_MTD_ONENAND is not set
599
600#
601# LPDDR flash memory drivers
602#
603# CONFIG_MTD_LPDDR is not set
604
605#
606# UBI - Unsorted block images
607#
608# CONFIG_MTD_UBI is not set
609# CONFIG_PARPORT is not set
610CONFIG_BLK_DEV=y
611# CONFIG_BLK_DEV_COW_COMMON is not set
612CONFIG_BLK_DEV_LOOP=y
613# CONFIG_BLK_DEV_CRYPTOLOOP is not set
614# CONFIG_BLK_DEV_NBD is not set
615# CONFIG_BLK_DEV_UB is not set
616CONFIG_BLK_DEV_RAM=y
617CONFIG_BLK_DEV_RAM_COUNT=2
618CONFIG_BLK_DEV_RAM_SIZE=16384
619# CONFIG_BLK_DEV_XIP is not set
620# CONFIG_CDROM_PKTCDVD is not set
621# CONFIG_ATA_OVER_ETH is not set
622# CONFIG_BLK_DEV_HD is not set
623# CONFIG_MISC_DEVICES is not set
624CONFIG_HAVE_IDE=y
625# CONFIG_IDE is not set
626
627#
628# SCSI device support
629#
630# CONFIG_RAID_ATTRS is not set
631CONFIG_SCSI=y
632CONFIG_SCSI_DMA=y
633# CONFIG_SCSI_TGT is not set
634# CONFIG_SCSI_NETLINK is not set
635# CONFIG_SCSI_PROC_FS is not set
636
637#
638# SCSI support type (disk, tape, CD-ROM)
639#
640CONFIG_BLK_DEV_SD=y
641# CONFIG_CHR_DEV_ST is not set
642# CONFIG_CHR_DEV_OSST is not set
643# CONFIG_BLK_DEV_SR is not set
644# CONFIG_CHR_DEV_SG is not set
645# CONFIG_CHR_DEV_SCH is not set
646# CONFIG_SCSI_MULTI_LUN is not set
647# CONFIG_SCSI_CONSTANTS is not set
648# CONFIG_SCSI_LOGGING is not set
649# CONFIG_SCSI_SCAN_ASYNC is not set
650CONFIG_SCSI_WAIT_SCAN=y
651
652#
653# SCSI Transports
654#
655# CONFIG_SCSI_SPI_ATTRS is not set
656# CONFIG_SCSI_FC_ATTRS is not set
657# CONFIG_SCSI_ISCSI_ATTRS is not set
658# CONFIG_SCSI_SAS_LIBSAS is not set
659# CONFIG_SCSI_SRP_ATTRS is not set
660# CONFIG_SCSI_LOWLEVEL is not set
661# CONFIG_SCSI_DH is not set
662# CONFIG_SCSI_OSD_INITIATOR is not set
663# CONFIG_ATA is not set
664# CONFIG_MD is not set
665CONFIG_NETDEVICES=y
666# CONFIG_DUMMY is not set
667# CONFIG_BONDING is not set
668# CONFIG_MACVLAN is not set
669# CONFIG_EQUALIZER is not set
670# CONFIG_TUN is not set
671# CONFIG_VETH is not set
672CONFIG_PHYLIB=y
673
674#
675# MII PHY device drivers
676#
677# CONFIG_MARVELL_PHY is not set
678# CONFIG_DAVICOM_PHY is not set
679# CONFIG_QSEMI_PHY is not set
680# CONFIG_LXT_PHY is not set
681# CONFIG_CICADA_PHY is not set
682# CONFIG_VITESSE_PHY is not set
683# CONFIG_SMSC_PHY is not set
684# CONFIG_BROADCOM_PHY is not set
685# CONFIG_ICPLUS_PHY is not set
686# CONFIG_REALTEK_PHY is not set
687# CONFIG_NATIONAL_PHY is not set
688# CONFIG_STE10XP is not set
689# CONFIG_LSI_ET1011C_PHY is not set
690# CONFIG_FIXED_PHY is not set
691# CONFIG_MDIO_BITBANG is not set
692CONFIG_NET_ETHERNET=y
693CONFIG_MII=y
694# CONFIG_SMC91X is not set
695# CONFIG_DM9000 is not set
696# CONFIG_ENC28J60 is not set
697# CONFIG_ETHOC is not set
698CONFIG_SMSC911X=y
699# CONFIG_DNET is not set
700# CONFIG_IBM_NEW_EMAC_ZMII is not set
701# CONFIG_IBM_NEW_EMAC_RGMII is not set
702# CONFIG_IBM_NEW_EMAC_TAH is not set
703# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
704# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
705# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
706# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
707# CONFIG_B44 is not set
708# CONFIG_KS8842 is not set
709# CONFIG_KS8851 is not set
710# CONFIG_NETDEV_1000 is not set
711# CONFIG_NETDEV_10000 is not set
712
713#
714# Wireless LAN
715#
716# CONFIG_WLAN_PRE80211 is not set
717# CONFIG_WLAN_80211 is not set
718
719#
720# Enable WiMAX (Networking options) to see the WiMAX drivers
721#
722
723#
724# USB Network Adapters
725#
726# CONFIG_USB_CATC is not set
727# CONFIG_USB_KAWETH is not set
728# CONFIG_USB_PEGASUS is not set
729# CONFIG_USB_RTL8150 is not set
730# CONFIG_USB_USBNET is not set
731# CONFIG_WAN is not set
732# CONFIG_PPP is not set
733# CONFIG_SLIP is not set
734# CONFIG_NETCONSOLE is not set
735# CONFIG_NETPOLL is not set
736# CONFIG_NET_POLL_CONTROLLER is not set
737# CONFIG_ISDN is not set
738# CONFIG_PHONE is not set
739
740#
741# Input device support
742#
743# CONFIG_INPUT is not set
744
745#
746# Hardware I/O ports
747#
748# CONFIG_SERIO is not set
749# CONFIG_GAMEPORT is not set
750
751#
752# Character devices
753#
754# CONFIG_BFIN_DMA_INTERFACE is not set
755# CONFIG_BFIN_PPI is not set
756# CONFIG_BFIN_PPIFCD is not set
757CONFIG_BFIN_SIMPLE_TIMER=y
758# CONFIG_BFIN_SPI_ADC is not set
759# CONFIG_BFIN_SPORT is not set
760# CONFIG_BFIN_TWI_LCD is not set
761# CONFIG_VT is not set
762# CONFIG_DEVKMEM is not set
763# CONFIG_BFIN_JTAG_COMM is not set
764# CONFIG_SERIAL_NONSTANDARD is not set
765
766#
767# Serial drivers
768#
769# CONFIG_SERIAL_8250 is not set
770
771#
772# Non-8250 serial port support
773#
774# CONFIG_SERIAL_MAX3100 is not set
775CONFIG_SERIAL_BFIN=y
776CONFIG_SERIAL_BFIN_CONSOLE=y
777# CONFIG_SERIAL_BFIN_DMA is not set
778CONFIG_SERIAL_BFIN_PIO=y
779CONFIG_SERIAL_BFIN_UART0=y
780# CONFIG_BFIN_UART0_CTSRTS is not set
781CONFIG_SERIAL_CORE=y
782CONFIG_SERIAL_CORE_CONSOLE=y
783# CONFIG_SERIAL_BFIN_SPORT is not set
784CONFIG_UNIX98_PTYS=y
785# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
786CONFIG_LEGACY_PTYS=y
787CONFIG_LEGACY_PTY_COUNT=256
788
789#
790# CAN, the car bus and industrial fieldbus
791#
792# CONFIG_CAN4LINUX is not set
793# CONFIG_IPMI_HANDLER is not set
794# CONFIG_HW_RANDOM is not set
795# CONFIG_R3964 is not set
796# CONFIG_RAW_DRIVER is not set
797# CONFIG_TCG_TPM is not set
798CONFIG_I2C=y
799CONFIG_I2C_BOARDINFO=y
800CONFIG_I2C_CHARDEV=y
801CONFIG_I2C_HELPER_AUTO=y
802CONFIG_I2C_ALGOPCA=y
803
804#
805# I2C Hardware Bus support
806#
807
808#
809# I2C system bus drivers (mostly embedded / system-on-chip)
810#
811# CONFIG_I2C_GPIO is not set
812# CONFIG_I2C_OCORES is not set
813# CONFIG_I2C_SIMTEC is not set
814
815#
816# External I2C/SMBus adapter drivers
817#
818# CONFIG_I2C_PARPORT_LIGHT is not set
819# CONFIG_I2C_TAOS_EVM is not set
820# CONFIG_I2C_TINY_USB is not set
821
822#
823# Other I2C/SMBus bus drivers
824#
825CONFIG_I2C_PCA_PLATFORM=y
826# CONFIG_I2C_STUB is not set
827
828#
829# Miscellaneous I2C Chip support
830#
831# CONFIG_DS1682 is not set
832# CONFIG_SENSORS_PCA9539 is not set
833# CONFIG_SENSORS_TSL2550 is not set
834# CONFIG_I2C_DEBUG_CORE is not set
835# CONFIG_I2C_DEBUG_ALGO is not set
836# CONFIG_I2C_DEBUG_BUS is not set
837# CONFIG_I2C_DEBUG_CHIP is not set
838CONFIG_SPI=y
839# CONFIG_SPI_DEBUG is not set
840CONFIG_SPI_MASTER=y
841
842#
843# SPI Master Controller Drivers
844#
845CONFIG_SPI_BFIN=y
846# CONFIG_SPI_BFIN_LOCK is not set
847# CONFIG_SPI_BFIN_SPORT is not set
848# CONFIG_SPI_BITBANG is not set
849# CONFIG_SPI_GPIO is not set
850
851#
852# SPI Protocol Masters
853#
854CONFIG_SPI_SPIDEV=y
855# CONFIG_SPI_TLE62X0 is not set
856
857#
858# PPS support
859#
860# CONFIG_PPS is not set
861CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
862CONFIG_GPIOLIB=y
863# CONFIG_DEBUG_GPIO is not set
864CONFIG_GPIO_SYSFS=y
865
866#
867# Memory mapped GPIO expanders:
868#
869
870#
871# I2C GPIO expanders:
872#
873# CONFIG_GPIO_MAX732X is not set
874# CONFIG_GPIO_PCA953X is not set
875CONFIG_GPIO_PCF857X=y
876# CONFIG_GPIO_ADP5588 is not set
877
878#
879# PCI GPIO expanders:
880#
881
882#
883# SPI GPIO expanders:
884#
885# CONFIG_GPIO_MAX7301 is not set
886# CONFIG_GPIO_MCP23S08 is not set
887# CONFIG_W1 is not set
888# CONFIG_POWER_SUPPLY is not set
889CONFIG_HWMON=y
890# CONFIG_HWMON_VID is not set
891# CONFIG_SENSORS_AD7414 is not set
892# CONFIG_SENSORS_AD7418 is not set
893# CONFIG_SENSORS_ADCXX is not set
894# CONFIG_SENSORS_ADM1021 is not set
895# CONFIG_SENSORS_ADM1025 is not set
896# CONFIG_SENSORS_ADM1026 is not set
897# CONFIG_SENSORS_ADM1029 is not set
898# CONFIG_SENSORS_ADM1031 is not set
899# CONFIG_SENSORS_ADM9240 is not set
900# CONFIG_SENSORS_ADT7462 is not set
901# CONFIG_SENSORS_ADT7470 is not set
902# CONFIG_SENSORS_ADT7473 is not set
903# CONFIG_SENSORS_ADT7475 is not set
904# CONFIG_SENSORS_ATXP1 is not set
905# CONFIG_SENSORS_DS1621 is not set
906# CONFIG_SENSORS_F71805F is not set
907# CONFIG_SENSORS_F71882FG is not set
908# CONFIG_SENSORS_F75375S is not set
909# CONFIG_SENSORS_G760A is not set
910# CONFIG_SENSORS_GL518SM is not set
911# CONFIG_SENSORS_GL520SM is not set
912# CONFIG_SENSORS_IT87 is not set
913# CONFIG_SENSORS_LM63 is not set
914# CONFIG_SENSORS_LM70 is not set
915CONFIG_SENSORS_LM75=y
916# CONFIG_SENSORS_LM77 is not set
917# CONFIG_SENSORS_LM78 is not set
918# CONFIG_SENSORS_LM80 is not set
919# CONFIG_SENSORS_LM83 is not set
920# CONFIG_SENSORS_LM85 is not set
921# CONFIG_SENSORS_LM87 is not set
922# CONFIG_SENSORS_LM90 is not set
923# CONFIG_SENSORS_LM92 is not set
924# CONFIG_SENSORS_LM93 is not set
925# CONFIG_SENSORS_LTC4215 is not set
926# CONFIG_SENSORS_LTC4245 is not set
927# CONFIG_SENSORS_LM95241 is not set
928# CONFIG_SENSORS_MAX1111 is not set
929# CONFIG_SENSORS_MAX1619 is not set
930# CONFIG_SENSORS_MAX6650 is not set
931# CONFIG_SENSORS_PC87360 is not set
932# CONFIG_SENSORS_PC87427 is not set
933# CONFIG_SENSORS_PCF8591 is not set
934# CONFIG_SENSORS_SHT15 is not set
935# CONFIG_SENSORS_DME1737 is not set
936# CONFIG_SENSORS_SMSC47M1 is not set
937# CONFIG_SENSORS_SMSC47M192 is not set
938# CONFIG_SENSORS_SMSC47B397 is not set
939# CONFIG_SENSORS_ADS7828 is not set
940# CONFIG_SENSORS_THMC50 is not set
941# CONFIG_SENSORS_TMP401 is not set
942# CONFIG_SENSORS_VT1211 is not set
943# CONFIG_SENSORS_W83781D is not set
944# CONFIG_SENSORS_W83791D is not set
945# CONFIG_SENSORS_W83792D is not set
946# CONFIG_SENSORS_W83793 is not set
947# CONFIG_SENSORS_W83L785TS is not set
948# CONFIG_SENSORS_W83L786NG is not set
949# CONFIG_SENSORS_W83627HF is not set
950# CONFIG_SENSORS_W83627EHF is not set
951# CONFIG_HWMON_DEBUG_CHIP is not set
952# CONFIG_THERMAL is not set
953# CONFIG_THERMAL_HWMON is not set
954CONFIG_WATCHDOG=y
955# CONFIG_WATCHDOG_NOWAYOUT is not set
956
957#
958# Watchdog Device Drivers
959#
960# CONFIG_SOFT_WATCHDOG is not set
961CONFIG_BFIN_WDT=y
962
963#
964# USB-based Watchdog Cards
965#
966# CONFIG_USBPCWATCHDOG is not set
967CONFIG_SSB_POSSIBLE=y
968
969#
970# Sonics Silicon Backplane
971#
972# CONFIG_SSB is not set
973
974#
975# Multifunction device drivers
976#
977# CONFIG_MFD_CORE is not set
978# CONFIG_MFD_SM501 is not set
979# CONFIG_HTC_PASIC3 is not set
980# CONFIG_TPS65010 is not set
981# CONFIG_TWL4030_CORE is not set
982# CONFIG_MFD_TMIO is not set
983# CONFIG_PMIC_DA903X is not set
984# CONFIG_PMIC_ADP5520 is not set
985# CONFIG_MFD_WM8400 is not set
986# CONFIG_MFD_WM8350_I2C is not set
987# CONFIG_MFD_PCF50633 is not set
988# CONFIG_AB3100_CORE is not set
989# CONFIG_EZX_PCAP is not set
990# CONFIG_REGULATOR is not set
991# CONFIG_MEDIA_SUPPORT is not set
992
993#
994# Graphics support
995#
996# CONFIG_VGASTATE is not set
997# CONFIG_VIDEO_OUTPUT_CONTROL is not set
998# CONFIG_FB is not set
999# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1000
1001#
1002# Display device support
1003#
1004# CONFIG_DISPLAY_SUPPORT is not set
1005CONFIG_SOUND=y
1006CONFIG_SOUND_OSS_CORE=y
1007CONFIG_SND=y
1008CONFIG_SND_TIMER=y
1009CONFIG_SND_PCM=y
1010# CONFIG_SND_SEQUENCER is not set
1011CONFIG_SND_OSSEMUL=y
1012CONFIG_SND_MIXER_OSS=y
1013CONFIG_SND_PCM_OSS=y
1014CONFIG_SND_PCM_OSS_PLUGINS=y
1015# CONFIG_SND_HRTIMER is not set
1016# CONFIG_SND_DYNAMIC_MINORS is not set
1017CONFIG_SND_SUPPORT_OLD_API=y
1018CONFIG_SND_VERBOSE_PROCFS=y
1019# CONFIG_SND_VERBOSE_PRINTK is not set
1020# CONFIG_SND_DEBUG is not set
1021# CONFIG_SND_RAWMIDI_SEQ is not set
1022# CONFIG_SND_OPL3_LIB_SEQ is not set
1023# CONFIG_SND_OPL4_LIB_SEQ is not set
1024# CONFIG_SND_SBAWE_SEQ is not set
1025# CONFIG_SND_EMU10K1_SEQ is not set
1026# CONFIG_SND_DRIVERS is not set
1027CONFIG_SND_SPI=y
1028
1029#
1030# ALSA Blackfin devices
1031#
1032# CONFIG_SND_BFIN_AD73322 is not set
1033# CONFIG_SND_USB is not set
1034CONFIG_SND_SOC=y
1035CONFIG_SND_BF5XX_I2S=y
1036# CONFIG_SND_BF5XX_SOC_SSM2602 is not set
1037# CONFIG_SND_BF5XX_SOC_AD73311 is not set
1038# CONFIG_SND_BF5XX_SOC_ADAU1371 is not set
1039# CONFIG_SND_BF5XX_SOC_ADAU1761 is not set
1040# CONFIG_SND_BF5XX_TDM is not set
1041# CONFIG_SND_BF5XX_AC97 is not set
1042CONFIG_SND_BF5XX_SOC_SPORT=y
1043CONFIG_SND_BF5XX_SPORT_NUM=1
1044CONFIG_SND_SOC_I2C_AND_SPI=y
1045# CONFIG_SND_SOC_ALL_CODECS is not set
1046# CONFIG_SOUND_PRIME is not set
1047CONFIG_USB_SUPPORT=y
1048CONFIG_USB_ARCH_HAS_HCD=y
1049# CONFIG_USB_ARCH_HAS_OHCI is not set
1050# CONFIG_USB_ARCH_HAS_EHCI is not set
1051CONFIG_USB=y
1052# CONFIG_USB_DEBUG is not set
1053CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
1054
1055#
1056# Miscellaneous USB options
1057#
1058# CONFIG_USB_DEVICEFS is not set
1059# CONFIG_USB_DEVICE_CLASS is not set
1060# CONFIG_USB_DYNAMIC_MINORS is not set
1061# CONFIG_USB_OTG is not set
1062# CONFIG_USB_OTG_WHITELIST is not set
1063# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1064CONFIG_USB_MON=y
1065# CONFIG_USB_WUSB is not set
1066# CONFIG_USB_WUSB_CBAF is not set
1067
1068#
1069# USB Host Controller Drivers
1070#
1071# CONFIG_USB_C67X00_HCD is not set
1072# CONFIG_USB_OXU210HP_HCD is not set
1073# CONFIG_USB_ISP116X_HCD is not set
1074# CONFIG_USB_ISP1760_HCD is not set
1075# CONFIG_USB_ISP1362_HCD is not set
1076# CONFIG_USB_SL811_HCD is not set
1077# CONFIG_USB_R8A66597_HCD is not set
1078# CONFIG_USB_HWA_HCD is not set
1079
1080#
1081# USB Device Class drivers
1082#
1083# CONFIG_USB_ACM is not set
1084# CONFIG_USB_PRINTER is not set
1085# CONFIG_USB_WDM is not set
1086# CONFIG_USB_TMC is not set
1087
1088#
1089# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1090#
1091
1092#
1093# also be needed; see USB_STORAGE Help for more info
1094#
1095CONFIG_USB_STORAGE=y
1096# CONFIG_USB_STORAGE_DEBUG is not set
1097# CONFIG_USB_STORAGE_DATAFAB is not set
1098# CONFIG_USB_STORAGE_FREECOM is not set
1099# CONFIG_USB_STORAGE_ISD200 is not set
1100# CONFIG_USB_STORAGE_USBAT is not set
1101# CONFIG_USB_STORAGE_SDDR09 is not set
1102# CONFIG_USB_STORAGE_SDDR55 is not set
1103# CONFIG_USB_STORAGE_JUMPSHOT is not set
1104# CONFIG_USB_STORAGE_ALAUDA is not set
1105# CONFIG_USB_STORAGE_KARMA is not set
1106# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1107# CONFIG_USB_LIBUSUAL is not set
1108
1109#
1110# USB Imaging devices
1111#
1112# CONFIG_USB_MDC800 is not set
1113# CONFIG_USB_MICROTEK is not set
1114
1115#
1116# USB port drivers
1117#
1118CONFIG_USB_SERIAL=y
1119# CONFIG_USB_SERIAL_CONSOLE is not set
1120# CONFIG_USB_EZUSB is not set
1121# CONFIG_USB_SERIAL_GENERIC is not set
1122# CONFIG_USB_SERIAL_AIRCABLE is not set
1123# CONFIG_USB_SERIAL_ARK3116 is not set
1124# CONFIG_USB_SERIAL_BELKIN is not set
1125# CONFIG_USB_SERIAL_CH341 is not set
1126# CONFIG_USB_SERIAL_WHITEHEAT is not set
1127# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1128# CONFIG_USB_SERIAL_CP210X is not set
1129# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1130# CONFIG_USB_SERIAL_EMPEG is not set
1131CONFIG_USB_SERIAL_FTDI_SIO=y
1132# CONFIG_USB_SERIAL_FUNSOFT is not set
1133# CONFIG_USB_SERIAL_VISOR is not set
1134# CONFIG_USB_SERIAL_IPAQ is not set
1135# CONFIG_USB_SERIAL_IR is not set
1136# CONFIG_USB_SERIAL_EDGEPORT is not set
1137# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
1138# CONFIG_USB_SERIAL_GARMIN is not set
1139# CONFIG_USB_SERIAL_IPW is not set
1140# CONFIG_USB_SERIAL_IUU is not set
1141# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
1142# CONFIG_USB_SERIAL_KEYSPAN is not set
1143# CONFIG_USB_SERIAL_KLSI is not set
1144# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1145# CONFIG_USB_SERIAL_MCT_U232 is not set
1146# CONFIG_USB_SERIAL_MOS7720 is not set
1147# CONFIG_USB_SERIAL_MOS7840 is not set
1148# CONFIG_USB_SERIAL_MOTOROLA is not set
1149# CONFIG_USB_SERIAL_NAVMAN is not set
1150CONFIG_USB_SERIAL_PL2303=y
1151# CONFIG_USB_SERIAL_OTI6858 is not set
1152# CONFIG_USB_SERIAL_QUALCOMM is not set
1153# CONFIG_USB_SERIAL_SPCP8X5 is not set
1154# CONFIG_USB_SERIAL_HP4X is not set
1155# CONFIG_USB_SERIAL_SAFE is not set
1156# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1157# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1158# CONFIG_USB_SERIAL_SYMBOL is not set
1159# CONFIG_USB_SERIAL_TI is not set
1160# CONFIG_USB_SERIAL_CYBERJACK is not set
1161# CONFIG_USB_SERIAL_XIRCOM is not set
1162# CONFIG_USB_SERIAL_OPTION is not set
1163# CONFIG_USB_SERIAL_OMNINET is not set
1164# CONFIG_USB_SERIAL_OPTICON is not set
1165# CONFIG_USB_SERIAL_DEBUG is not set
1166
1167#
1168# USB Miscellaneous drivers
1169#
1170# CONFIG_USB_EMI62 is not set
1171# CONFIG_USB_EMI26 is not set
1172# CONFIG_USB_ADUTUX is not set
1173# CONFIG_USB_SEVSEG is not set
1174# CONFIG_USB_RIO500 is not set
1175# CONFIG_USB_LEGOTOWER is not set
1176# CONFIG_USB_LCD is not set
1177# CONFIG_USB_BERRY_CHARGE is not set
1178# CONFIG_USB_LED is not set
1179# CONFIG_USB_CYPRESS_CY7C63 is not set
1180# CONFIG_USB_CYTHERM is not set
1181# CONFIG_USB_IDMOUSE is not set
1182# CONFIG_USB_FTDI_ELAN is not set
1183# CONFIG_USB_APPLEDISPLAY is not set
1184# CONFIG_USB_LD is not set
1185# CONFIG_USB_TRANCEVIBRATOR is not set
1186# CONFIG_USB_IOWARRIOR is not set
1187# CONFIG_USB_TEST is not set
1188# CONFIG_USB_ISIGHTFW is not set
1189# CONFIG_USB_VST is not set
1190# CONFIG_USB_GADGET is not set
1191
1192#
1193# OTG and related infrastructure
1194#
1195# CONFIG_USB_GPIO_VBUS is not set
1196# CONFIG_NOP_USB_XCEIV is not set
1197# CONFIG_MMC is not set
1198# CONFIG_MEMSTICK is not set
1199# CONFIG_NEW_LEDS is not set
1200# CONFIG_ACCESSIBILITY is not set
1201CONFIG_RTC_LIB=y
1202CONFIG_RTC_CLASS=y
1203CONFIG_RTC_HCTOSYS=y
1204CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1205# CONFIG_RTC_DEBUG is not set
1206
1207#
1208# RTC interfaces
1209#
1210CONFIG_RTC_INTF_SYSFS=y
1211CONFIG_RTC_INTF_PROC=y
1212CONFIG_RTC_INTF_DEV=y
1213# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1214# CONFIG_RTC_DRV_TEST is not set
1215
1216#
1217# I2C RTC drivers
1218#
1219CONFIG_RTC_DRV_DS1307=y
1220# CONFIG_RTC_DRV_DS1374 is not set
1221# CONFIG_RTC_DRV_DS1672 is not set
1222# CONFIG_RTC_DRV_MAX6900 is not set
1223# CONFIG_RTC_DRV_RS5C372 is not set
1224# CONFIG_RTC_DRV_ISL1208 is not set
1225# CONFIG_RTC_DRV_X1205 is not set
1226# CONFIG_RTC_DRV_PCF8563 is not set
1227# CONFIG_RTC_DRV_PCF8583 is not set
1228# CONFIG_RTC_DRV_M41T80 is not set
1229# CONFIG_RTC_DRV_S35390A is not set
1230# CONFIG_RTC_DRV_FM3130 is not set
1231# CONFIG_RTC_DRV_RX8581 is not set
1232# CONFIG_RTC_DRV_RX8025 is not set
1233
1234#
1235# SPI RTC drivers
1236#
1237# CONFIG_RTC_DRV_M41T94 is not set
1238# CONFIG_RTC_DRV_DS1305 is not set
1239# CONFIG_RTC_DRV_DS1390 is not set
1240# CONFIG_RTC_DRV_MAX6902 is not set
1241# CONFIG_RTC_DRV_R9701 is not set
1242# CONFIG_RTC_DRV_RS5C348 is not set
1243# CONFIG_RTC_DRV_DS3234 is not set
1244
1245#
1246# Platform RTC drivers
1247#
1248# CONFIG_RTC_DRV_DS1286 is not set
1249# CONFIG_RTC_DRV_DS1511 is not set
1250# CONFIG_RTC_DRV_DS1553 is not set
1251# CONFIG_RTC_DRV_DS1742 is not set
1252# CONFIG_RTC_DRV_STK17TA8 is not set
1253# CONFIG_RTC_DRV_M48T86 is not set
1254# CONFIG_RTC_DRV_M48T35 is not set
1255# CONFIG_RTC_DRV_M48T59 is not set
1256# CONFIG_RTC_DRV_BQ4802 is not set
1257# CONFIG_RTC_DRV_V3020 is not set
1258
1259#
1260# on-CPU RTC drivers
1261#
1262# CONFIG_DMADEVICES is not set
1263# CONFIG_AUXDISPLAY is not set
1264# CONFIG_UIO is not set
1265
1266#
1267# TI VLYNQ
1268#
1269# CONFIG_STAGING is not set
1270
1271#
1272# Firmware Drivers
1273#
1274# CONFIG_FIRMWARE_MEMMAP is not set
1275# CONFIG_SIGMA is not set
1276
1277#
1278# File systems
1279#
1280CONFIG_EXT2_FS=y
1281CONFIG_EXT2_FS_XATTR=y
1282CONFIG_EXT2_FS_POSIX_ACL=y
1283CONFIG_EXT2_FS_SECURITY=y
1284# CONFIG_EXT3_FS is not set
1285# CONFIG_EXT4_FS is not set
1286CONFIG_FS_MBCACHE=y
1287# CONFIG_REISERFS_FS is not set
1288# CONFIG_JFS_FS is not set
1289CONFIG_FS_POSIX_ACL=y
1290# CONFIG_XFS_FS is not set
1291# CONFIG_GFS2_FS is not set
1292# CONFIG_OCFS2_FS is not set
1293# CONFIG_BTRFS_FS is not set
1294CONFIG_FILE_LOCKING=y
1295CONFIG_FSNOTIFY=y
1296# CONFIG_DNOTIFY is not set
1297CONFIG_INOTIFY=y
1298CONFIG_INOTIFY_USER=y
1299# CONFIG_QUOTA is not set
1300# CONFIG_AUTOFS_FS is not set
1301# CONFIG_AUTOFS4_FS is not set
1302# CONFIG_FUSE_FS is not set
1303
1304#
1305# Caches
1306#
1307# CONFIG_FSCACHE is not set
1308
1309#
1310# CD-ROM/DVD Filesystems
1311#
1312# CONFIG_ISO9660_FS is not set
1313# CONFIG_UDF_FS is not set
1314
1315#
1316# DOS/FAT/NT Filesystems
1317#
1318CONFIG_FAT_FS=y
1319CONFIG_MSDOS_FS=y
1320CONFIG_VFAT_FS=y
1321CONFIG_FAT_DEFAULT_CODEPAGE=866
1322CONFIG_FAT_DEFAULT_IOCHARSET="cp1251"
1323CONFIG_NTFS_FS=y
1324# CONFIG_NTFS_DEBUG is not set
1325# CONFIG_NTFS_RW is not set
1326
1327#
1328# Pseudo filesystems
1329#
1330CONFIG_PROC_FS=y
1331CONFIG_PROC_SYSCTL=y
1332CONFIG_SYSFS=y
1333# CONFIG_TMPFS is not set
1334# CONFIG_HUGETLB_PAGE is not set
1335CONFIG_CONFIGFS_FS=y
1336CONFIG_MISC_FILESYSTEMS=y
1337# CONFIG_ADFS_FS is not set
1338# CONFIG_AFFS_FS is not set
1339# CONFIG_HFS_FS is not set
1340# CONFIG_HFSPLUS_FS is not set
1341# CONFIG_BEFS_FS is not set
1342# CONFIG_BFS_FS is not set
1343# CONFIG_EFS_FS is not set
1344CONFIG_JFFS2_FS=y
1345CONFIG_JFFS2_FS_DEBUG=0
1346CONFIG_JFFS2_FS_WRITEBUFFER=y
1347# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1348# CONFIG_JFFS2_SUMMARY is not set
1349# CONFIG_JFFS2_FS_XATTR is not set
1350CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1351# CONFIG_JFFS2_ZLIB is not set
1352CONFIG_JFFS2_LZO=y
1353# CONFIG_JFFS2_RTIME is not set
1354# CONFIG_JFFS2_RUBIN is not set
1355# CONFIG_JFFS2_CMODE_NONE is not set
1356# CONFIG_JFFS2_CMODE_PRIORITY is not set
1357# CONFIG_JFFS2_CMODE_SIZE is not set
1358CONFIG_JFFS2_CMODE_FAVOURLZO=y
1359CONFIG_CRAMFS=y
1360# CONFIG_SQUASHFS is not set
1361# CONFIG_VXFS_FS is not set
1362CONFIG_MINIX_FS=y
1363# CONFIG_OMFS_FS is not set
1364# CONFIG_HPFS_FS is not set
1365# CONFIG_QNX4FS_FS is not set
1366# CONFIG_ROMFS_FS is not set
1367# CONFIG_SYSV_FS is not set
1368# CONFIG_UFS_FS is not set
1369# CONFIG_NILFS2_FS is not set
1370CONFIG_NETWORK_FILESYSTEMS=y
1371CONFIG_NFS_FS=y
1372CONFIG_NFS_V3=y
1373# CONFIG_NFS_V3_ACL is not set
1374# CONFIG_NFS_V4 is not set
1375CONFIG_ROOT_NFS=y
1376# CONFIG_NFSD is not set
1377CONFIG_LOCKD=y
1378CONFIG_LOCKD_V4=y
1379CONFIG_NFS_COMMON=y
1380CONFIG_SUNRPC=y
1381# CONFIG_RPCSEC_GSS_KRB5 is not set
1382# CONFIG_RPCSEC_GSS_SPKM3 is not set
1383# CONFIG_SMB_FS is not set
1384# CONFIG_CIFS is not set
1385# CONFIG_NCP_FS is not set
1386# CONFIG_CODA_FS is not set
1387# CONFIG_AFS_FS is not set
1388
1389#
1390# Partition Types
1391#
1392# CONFIG_PARTITION_ADVANCED is not set
1393CONFIG_MSDOS_PARTITION=y
1394CONFIG_NLS=y
1395CONFIG_NLS_DEFAULT="cp1251"
1396# CONFIG_NLS_CODEPAGE_437 is not set
1397# CONFIG_NLS_CODEPAGE_737 is not set
1398# CONFIG_NLS_CODEPAGE_775 is not set
1399# CONFIG_NLS_CODEPAGE_850 is not set
1400# CONFIG_NLS_CODEPAGE_852 is not set
1401# CONFIG_NLS_CODEPAGE_855 is not set
1402# CONFIG_NLS_CODEPAGE_857 is not set
1403# CONFIG_NLS_CODEPAGE_860 is not set
1404# CONFIG_NLS_CODEPAGE_861 is not set
1405# CONFIG_NLS_CODEPAGE_862 is not set
1406# CONFIG_NLS_CODEPAGE_863 is not set
1407# CONFIG_NLS_CODEPAGE_864 is not set
1408# CONFIG_NLS_CODEPAGE_865 is not set
1409CONFIG_NLS_CODEPAGE_866=y
1410# CONFIG_NLS_CODEPAGE_869 is not set
1411# CONFIG_NLS_CODEPAGE_936 is not set
1412# CONFIG_NLS_CODEPAGE_950 is not set
1413# CONFIG_NLS_CODEPAGE_932 is not set
1414# CONFIG_NLS_CODEPAGE_949 is not set
1415# CONFIG_NLS_CODEPAGE_874 is not set
1416# CONFIG_NLS_ISO8859_8 is not set
1417# CONFIG_NLS_CODEPAGE_1250 is not set
1418CONFIG_NLS_CODEPAGE_1251=y
1419# CONFIG_NLS_ASCII is not set
1420# CONFIG_NLS_ISO8859_1 is not set
1421# CONFIG_NLS_ISO8859_2 is not set
1422# CONFIG_NLS_ISO8859_3 is not set
1423# CONFIG_NLS_ISO8859_4 is not set
1424# CONFIG_NLS_ISO8859_5 is not set
1425# CONFIG_NLS_ISO8859_6 is not set
1426# CONFIG_NLS_ISO8859_7 is not set
1427# CONFIG_NLS_ISO8859_9 is not set
1428# CONFIG_NLS_ISO8859_13 is not set
1429# CONFIG_NLS_ISO8859_14 is not set
1430# CONFIG_NLS_ISO8859_15 is not set
1431CONFIG_NLS_KOI8_R=y
1432# CONFIG_NLS_KOI8_U is not set
1433CONFIG_NLS_UTF8=y
1434# CONFIG_DLM is not set
1435
1436#
1437# Kernel hacking
1438#
1439# CONFIG_PRINTK_TIME is not set
1440CONFIG_ENABLE_WARN_DEPRECATED=y
1441CONFIG_ENABLE_MUST_CHECK=y
1442CONFIG_FRAME_WARN=1024
1443# CONFIG_MAGIC_SYSRQ is not set
1444# CONFIG_UNUSED_SYMBOLS is not set
1445CONFIG_DEBUG_FS=y
1446# CONFIG_HEADERS_CHECK is not set
1447CONFIG_DEBUG_SECTION_MISMATCH=y
1448CONFIG_DEBUG_KERNEL=y
1449CONFIG_DEBUG_SHIRQ=y
1450CONFIG_DETECT_SOFTLOCKUP=y
1451# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1452CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1453CONFIG_DETECT_HUNG_TASK=y
1454# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1455CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1456CONFIG_SCHED_DEBUG=y
1457# CONFIG_SCHEDSTATS is not set
1458# CONFIG_TIMER_STATS is not set
1459# CONFIG_DEBUG_OBJECTS is not set
1460# CONFIG_DEBUG_SLAB is not set
1461# CONFIG_DEBUG_SPINLOCK is not set
1462# CONFIG_DEBUG_MUTEXES is not set
1463# CONFIG_DEBUG_LOCK_ALLOC is not set
1464# CONFIG_PROVE_LOCKING is not set
1465# CONFIG_LOCK_STAT is not set
1466# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1467# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1468# CONFIG_DEBUG_KOBJECT is not set
1469# CONFIG_DEBUG_BUGVERBOSE is not set
1470CONFIG_DEBUG_INFO=y
1471# CONFIG_DEBUG_VM is not set
1472# CONFIG_DEBUG_NOMMU_REGIONS is not set
1473# CONFIG_DEBUG_WRITECOUNT is not set
1474# CONFIG_DEBUG_MEMORY_INIT is not set
1475# CONFIG_DEBUG_LIST is not set
1476# CONFIG_DEBUG_SG is not set
1477# CONFIG_DEBUG_NOTIFIERS is not set
1478# CONFIG_FRAME_POINTER is not set
1479# CONFIG_BOOT_PRINTK_DELAY is not set
1480# CONFIG_RCU_TORTURE_TEST is not set
1481# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1482# CONFIG_BACKTRACE_SELF_TEST is not set
1483# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1484# CONFIG_FAULT_INJECTION is not set
1485# CONFIG_PAGE_POISONING is not set
1486CONFIG_HAVE_FUNCTION_TRACER=y
1487CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1488CONFIG_TRACING_SUPPORT=y
1489CONFIG_FTRACE=y
1490# CONFIG_FUNCTION_TRACER is not set
1491# CONFIG_IRQSOFF_TRACER is not set
1492# CONFIG_SCHED_TRACER is not set
1493# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1494# CONFIG_BOOT_TRACER is not set
1495CONFIG_BRANCH_PROFILE_NONE=y
1496# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1497# CONFIG_PROFILE_ALL_BRANCHES is not set
1498# CONFIG_STACK_TRACER is not set
1499# CONFIG_KMEMTRACE is not set
1500# CONFIG_WORKQUEUE_TRACER is not set
1501# CONFIG_BLK_DEV_IO_TRACE is not set
1502# CONFIG_DYNAMIC_DEBUG is not set
1503# CONFIG_SAMPLES is not set
1504CONFIG_HAVE_ARCH_KGDB=y
1505# CONFIG_KGDB is not set
1506# CONFIG_KMEMCHECK is not set
1507# CONFIG_DEBUG_STACKOVERFLOW is not set
1508# CONFIG_DEBUG_STACK_USAGE is not set
1509CONFIG_DEBUG_VERBOSE=y
1510CONFIG_DEBUG_MMRS=y
1511# CONFIG_DEBUG_HWERR is not set
1512# CONFIG_DEBUG_DOUBLEFAULT is not set
1513CONFIG_DEBUG_HUNT_FOR_ZERO=y
1514CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1515CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1516# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
1517# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
1518CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1519# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1520# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1521# CONFIG_EARLY_PRINTK is not set
1522CONFIG_CPLB_INFO=y
1523CONFIG_ACCESS_CHECK=y
1524# CONFIG_BFIN_ISRAM_SELF_TEST is not set
1525
1526#
1527# Security options
1528#
1529# CONFIG_KEYS is not set
1530CONFIG_SECURITY=y
1531# CONFIG_SECURITYFS is not set
1532# CONFIG_SECURITY_NETWORK is not set
1533# CONFIG_SECURITY_PATH is not set
1534# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1535# CONFIG_SECURITY_ROOTPLUG is not set
1536# CONFIG_SECURITY_TOMOYO is not set
1537CONFIG_CRYPTO=y
1538
1539#
1540# Crypto core or helper
1541#
1542# CONFIG_CRYPTO_FIPS is not set
1543# CONFIG_CRYPTO_MANAGER is not set
1544# CONFIG_CRYPTO_MANAGER2 is not set
1545# CONFIG_CRYPTO_GF128MUL is not set
1546# CONFIG_CRYPTO_NULL is not set
1547# CONFIG_CRYPTO_CRYPTD is not set
1548# CONFIG_CRYPTO_AUTHENC is not set
1549# CONFIG_CRYPTO_TEST is not set
1550
1551#
1552# Authenticated Encryption with Associated Data
1553#
1554# CONFIG_CRYPTO_CCM is not set
1555# CONFIG_CRYPTO_GCM is not set
1556# CONFIG_CRYPTO_SEQIV is not set
1557
1558#
1559# Block modes
1560#
1561# CONFIG_CRYPTO_CBC is not set
1562# CONFIG_CRYPTO_CTR is not set
1563# CONFIG_CRYPTO_CTS is not set
1564# CONFIG_CRYPTO_ECB is not set
1565# CONFIG_CRYPTO_LRW is not set
1566# CONFIG_CRYPTO_PCBC is not set
1567# CONFIG_CRYPTO_XTS is not set
1568
1569#
1570# Hash modes
1571#
1572# CONFIG_CRYPTO_HMAC is not set
1573# CONFIG_CRYPTO_XCBC is not set
1574
1575#
1576# Digest
1577#
1578# CONFIG_CRYPTO_CRC32C is not set
1579# CONFIG_CRYPTO_MD4 is not set
1580# CONFIG_CRYPTO_MD5 is not set
1581# CONFIG_CRYPTO_MICHAEL_MIC is not set
1582# CONFIG_CRYPTO_RMD128 is not set
1583# CONFIG_CRYPTO_RMD160 is not set
1584# CONFIG_CRYPTO_RMD256 is not set
1585# CONFIG_CRYPTO_RMD320 is not set
1586# CONFIG_CRYPTO_SHA1 is not set
1587# CONFIG_CRYPTO_SHA256 is not set
1588# CONFIG_CRYPTO_SHA512 is not set
1589# CONFIG_CRYPTO_TGR192 is not set
1590# CONFIG_CRYPTO_WP512 is not set
1591
1592#
1593# Ciphers
1594#
1595# CONFIG_CRYPTO_AES is not set
1596# CONFIG_CRYPTO_ANUBIS is not set
1597# CONFIG_CRYPTO_ARC4 is not set
1598# CONFIG_CRYPTO_BLOWFISH is not set
1599# CONFIG_CRYPTO_CAMELLIA is not set
1600# CONFIG_CRYPTO_CAST5 is not set
1601# CONFIG_CRYPTO_CAST6 is not set
1602# CONFIG_CRYPTO_DES is not set
1603# CONFIG_CRYPTO_FCRYPT is not set
1604# CONFIG_CRYPTO_KHAZAD is not set
1605# CONFIG_CRYPTO_SALSA20 is not set
1606# CONFIG_CRYPTO_SEED is not set
1607# CONFIG_CRYPTO_SERPENT is not set
1608# CONFIG_CRYPTO_TEA is not set
1609# CONFIG_CRYPTO_TWOFISH is not set
1610
1611#
1612# Compression
1613#
1614# CONFIG_CRYPTO_DEFLATE is not set
1615# CONFIG_CRYPTO_ZLIB is not set
1616# CONFIG_CRYPTO_LZO is not set
1617
1618#
1619# Random Number Generation
1620#
1621# CONFIG_CRYPTO_ANSI_CPRNG is not set
1622CONFIG_CRYPTO_HW=y
1623# CONFIG_BINARY_PRINTF is not set
1624
1625#
1626# Library routines
1627#
1628CONFIG_BITREVERSE=y
1629CONFIG_GENERIC_FIND_LAST_BIT=y
1630# CONFIG_CRC_CCITT is not set
1631# CONFIG_CRC16 is not set
1632# CONFIG_CRC_T10DIF is not set
1633# CONFIG_CRC_ITU_T is not set
1634CONFIG_CRC32=y
1635# CONFIG_CRC7 is not set
1636# CONFIG_LIBCRC32C is not set
1637CONFIG_ZLIB_INFLATE=y
1638CONFIG_LZO_COMPRESS=y
1639CONFIG_LZO_DECOMPRESS=y
1640CONFIG_HAS_IOMEM=y
1641CONFIG_HAS_IOPORT=y
1642CONFIG_HAS_DMA=y
1643CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index 0313cd1d9824..e3ecdcc3e76b 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -1,22 +1,29 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28.10 3# Linux kernel version: 2.6.31.5
4# Thu May 21 05:50:01 2009 4# Mon Nov 2 21:59:31 2009
5# 5#
6# CONFIG_MMU is not set 6# CONFIG_MMU is not set
7# CONFIG_FPU is not set 7# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y 10CONFIG_BLACKFIN=y
11CONFIG_GENERIC_CSUM=y
12CONFIG_GENERIC_BUG=y
11CONFIG_ZONE_DMA=y 13CONFIG_ZONE_DMA=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 14CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 16CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 17CONFIG_GENERIC_IRQ_PROBE=y
18CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
16CONFIG_GENERIC_GPIO=y 19CONFIG_GENERIC_GPIO=y
17CONFIG_FORCE_MAX_ZONEORDER=14 20CONFIG_FORCE_MAX_ZONEORDER=14
18CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_LOCKDEP_SUPPORT=y
23CONFIG_STACKTRACE_SUPPORT=y
24CONFIG_TRACE_IRQFLAGS_SUPPORT=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 25CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
26CONFIG_CONSTRUCTORS=y
20 27
21# 28#
22# General setup 29# General setup
@@ -26,22 +33,40 @@ CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 33CONFIG_INIT_ENV_ARG_LIMIT=32
27CONFIG_LOCALVERSION="" 34CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 35CONFIG_LOCALVERSION_AUTO=y
36CONFIG_HAVE_KERNEL_GZIP=y
37CONFIG_HAVE_KERNEL_BZIP2=y
38CONFIG_HAVE_KERNEL_LZMA=y
39CONFIG_KERNEL_GZIP=y
40# CONFIG_KERNEL_BZIP2 is not set
41# CONFIG_KERNEL_LZMA is not set
29CONFIG_SYSVIPC=y 42CONFIG_SYSVIPC=y
30CONFIG_SYSVIPC_SYSCTL=y 43CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 44# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 45# CONFIG_BSD_PROCESS_ACCT is not set
33# CONFIG_TASKSTATS is not set 46# CONFIG_TASKSTATS is not set
34# CONFIG_AUDIT is not set 47# CONFIG_AUDIT is not set
48
49#
50# RCU Subsystem
51#
52CONFIG_CLASSIC_RCU=y
53# CONFIG_TREE_RCU is not set
54# CONFIG_PREEMPT_RCU is not set
55# CONFIG_TREE_RCU_TRACE is not set
56# CONFIG_PREEMPT_RCU_TRACE is not set
35CONFIG_IKCONFIG=y 57CONFIG_IKCONFIG=y
36CONFIG_IKCONFIG_PROC=y 58CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=14 59CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set 60# CONFIG_GROUP_SCHED is not set
61# CONFIG_CGROUPS is not set
40# CONFIG_SYSFS_DEPRECATED_V2 is not set 62# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set 63# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set 64# CONFIG_NAMESPACES is not set
43CONFIG_BLK_DEV_INITRD=y 65CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 66CONFIG_INITRAMFS_SOURCE=""
67CONFIG_RD_GZIP=y
68# CONFIG_RD_BZIP2 is not set
69# CONFIG_RD_LZMA is not set
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 70# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y 71CONFIG_SYSCTL=y
47CONFIG_ANON_INODES=y 72CONFIG_ANON_INODES=y
@@ -62,17 +87,28 @@ CONFIG_EPOLL=y
62# CONFIG_TIMERFD is not set 87# CONFIG_TIMERFD is not set
63# CONFIG_EVENTFD is not set 88# CONFIG_EVENTFD is not set
64# CONFIG_AIO is not set 89# CONFIG_AIO is not set
90
91#
92# Performance Counters
93#
65CONFIG_VM_EVENT_COUNTERS=y 94CONFIG_VM_EVENT_COUNTERS=y
95# CONFIG_STRIP_ASM_SYMS is not set
66CONFIG_COMPAT_BRK=y 96CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 97CONFIG_SLAB=y
68# CONFIG_SLUB is not set 98# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 99# CONFIG_SLOB is not set
100CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 101# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 102# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 103CONFIG_HAVE_OPROFILE=y
104
105#
106# GCOV-based kernel profiling
107#
108# CONFIG_GCOV_KERNEL is not set
109# CONFIG_SLOW_WORK is not set
73# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 110# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
74CONFIG_SLABINFO=y 111CONFIG_SLABINFO=y
75CONFIG_TINY_SHMEM=y
76CONFIG_BASE_SMALL=0 112CONFIG_BASE_SMALL=0
77CONFIG_MODULES=y 113CONFIG_MODULES=y
78# CONFIG_MODULE_FORCE_LOAD is not set 114# CONFIG_MODULE_FORCE_LOAD is not set
@@ -80,11 +116,8 @@ CONFIG_MODULE_UNLOAD=y
80# CONFIG_MODULE_FORCE_UNLOAD is not set 116# CONFIG_MODULE_FORCE_UNLOAD is not set
81# CONFIG_MODVERSIONS is not set 117# CONFIG_MODVERSIONS is not set
82# CONFIG_MODULE_SRCVERSION_ALL is not set 118# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y
84CONFIG_BLOCK=y 119CONFIG_BLOCK=y
85# CONFIG_LBD is not set 120# CONFIG_LBDAF is not set
86# CONFIG_BLK_DEV_IO_TRACE is not set
87# CONFIG_LSF is not set
88# CONFIG_BLK_DEV_BSG is not set 121# CONFIG_BLK_DEV_BSG is not set
89# CONFIG_BLK_DEV_INTEGRITY is not set 122# CONFIG_BLK_DEV_INTEGRITY is not set
90 123
@@ -94,13 +127,12 @@ CONFIG_BLOCK=y
94CONFIG_IOSCHED_NOOP=y 127CONFIG_IOSCHED_NOOP=y
95CONFIG_IOSCHED_AS=y 128CONFIG_IOSCHED_AS=y
96# CONFIG_IOSCHED_DEADLINE is not set 129# CONFIG_IOSCHED_DEADLINE is not set
97CONFIG_IOSCHED_CFQ=y 130# CONFIG_IOSCHED_CFQ is not set
98CONFIG_DEFAULT_AS=y 131CONFIG_DEFAULT_AS=y
99# CONFIG_DEFAULT_DEADLINE is not set 132# CONFIG_DEFAULT_DEADLINE is not set
100# CONFIG_DEFAULT_CFQ is not set 133# CONFIG_DEFAULT_CFQ is not set
101# CONFIG_DEFAULT_NOOP is not set 134# CONFIG_DEFAULT_NOOP is not set
102CONFIG_DEFAULT_IOSCHED="anticipatory" 135CONFIG_DEFAULT_IOSCHED="anticipatory"
103CONFIG_CLASSIC_RCU=y
104# CONFIG_PREEMPT_NONE is not set 136# CONFIG_PREEMPT_NONE is not set
105CONFIG_PREEMPT_VOLUNTARY=y 137CONFIG_PREEMPT_VOLUNTARY=y
106# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
@@ -170,6 +202,7 @@ CONFIG_IRQ_SPI_ERROR=7
170CONFIG_BFIN561_EZKIT=y 202CONFIG_BFIN561_EZKIT=y
171# CONFIG_BFIN561_TEPLA is not set 203# CONFIG_BFIN561_TEPLA is not set
172# CONFIG_BFIN561_BLUETECHNIX_CM is not set 204# CONFIG_BFIN561_BLUETECHNIX_CM is not set
205# CONFIG_BFIN561_ACVILON is not set
173 206
174# 207#
175# BF561 Specific Configuration 208# BF561 Specific Configuration
@@ -317,10 +350,11 @@ CONFIG_FLATMEM=y
317CONFIG_FLAT_NODE_MEM_MAP=y 350CONFIG_FLAT_NODE_MEM_MAP=y
318CONFIG_PAGEFLAGS_EXTENDED=y 351CONFIG_PAGEFLAGS_EXTENDED=y
319CONFIG_SPLIT_PTLOCK_CPUS=4 352CONFIG_SPLIT_PTLOCK_CPUS=4
320# CONFIG_RESOURCES_64BIT is not set
321# CONFIG_PHYS_ADDR_T_64BIT is not set 353# CONFIG_PHYS_ADDR_T_64BIT is not set
322CONFIG_ZONE_DMA_FLAG=1 354CONFIG_ZONE_DMA_FLAG=1
323CONFIG_VIRT_TO_BUS=y 355CONFIG_VIRT_TO_BUS=y
356CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
357CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
324CONFIG_BFIN_GPTIMERS=m 358CONFIG_BFIN_GPTIMERS=m
325# CONFIG_DMA_UNCACHED_4M is not set 359# CONFIG_DMA_UNCACHED_4M is not set
326# CONFIG_DMA_UNCACHED_2M is not set 360# CONFIG_DMA_UNCACHED_2M is not set
@@ -331,14 +365,13 @@ CONFIG_DMA_UNCACHED_1M=y
331# Cache Support 365# Cache Support
332# 366#
333CONFIG_BFIN_ICACHE=y 367CONFIG_BFIN_ICACHE=y
334# CONFIG_BFIN_ICACHE_LOCK is not set 368CONFIG_BFIN_EXTMEM_ICACHEABLE=y
369# CONFIG_BFIN_L2_ICACHEABLE is not set
335CONFIG_BFIN_DCACHE=y 370CONFIG_BFIN_DCACHE=y
336# CONFIG_BFIN_DCACHE_BANKA is not set 371# CONFIG_BFIN_DCACHE_BANKA is not set
337CONFIG_BFIN_EXTMEM_ICACHEABLE=y
338CONFIG_BFIN_EXTMEM_DCACHEABLE=y 372CONFIG_BFIN_EXTMEM_DCACHEABLE=y
339CONFIG_BFIN_EXTMEM_WRITEBACK=y 373CONFIG_BFIN_EXTMEM_WRITEBACK=y
340# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 374# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
341# CONFIG_BFIN_L2_ICACHEABLE is not set
342# CONFIG_BFIN_L2_DCACHEABLE is not set 375# CONFIG_BFIN_L2_DCACHEABLE is not set
343 376
344# 377#
@@ -347,7 +380,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
347# CONFIG_MPU is not set 380# CONFIG_MPU is not set
348 381
349# 382#
350# Asynchonous Memory Configuration 383# Asynchronous Memory Configuration
351# 384#
352 385
353# 386#
@@ -407,11 +440,6 @@ CONFIG_NET=y
407CONFIG_PACKET=y 440CONFIG_PACKET=y
408# CONFIG_PACKET_MMAP is not set 441# CONFIG_PACKET_MMAP is not set
409CONFIG_UNIX=y 442CONFIG_UNIX=y
410CONFIG_XFRM=y
411# CONFIG_XFRM_USER is not set
412# CONFIG_XFRM_SUB_POLICY is not set
413# CONFIG_XFRM_MIGRATE is not set
414# CONFIG_XFRM_STATISTICS is not set
415# CONFIG_NET_KEY is not set 443# CONFIG_NET_KEY is not set
416CONFIG_INET=y 444CONFIG_INET=y
417# CONFIG_IP_MULTICAST is not set 445# CONFIG_IP_MULTICAST is not set
@@ -435,13 +463,11 @@ CONFIG_IP_PNP=y
435# CONFIG_INET_XFRM_MODE_BEET is not set 463# CONFIG_INET_XFRM_MODE_BEET is not set
436# CONFIG_INET_LRO is not set 464# CONFIG_INET_LRO is not set
437# CONFIG_INET_DIAG is not set 465# CONFIG_INET_DIAG is not set
438CONFIG_INET_TCP_DIAG=y
439# CONFIG_TCP_CONG_ADVANCED is not set 466# CONFIG_TCP_CONG_ADVANCED is not set
440CONFIG_TCP_CONG_CUBIC=y 467CONFIG_TCP_CONG_CUBIC=y
441CONFIG_DEFAULT_TCP_CONG="cubic" 468CONFIG_DEFAULT_TCP_CONG="cubic"
442# CONFIG_TCP_MD5SIG is not set 469# CONFIG_TCP_MD5SIG is not set
443# CONFIG_IPV6 is not set 470# CONFIG_IPV6 is not set
444# CONFIG_NETLABEL is not set
445# CONFIG_NETWORK_SECMARK is not set 471# CONFIG_NETWORK_SECMARK is not set
446# CONFIG_NETFILTER is not set 472# CONFIG_NETFILTER is not set
447# CONFIG_IP_DCCP is not set 473# CONFIG_IP_DCCP is not set
@@ -459,7 +485,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
459# CONFIG_LAPB is not set 485# CONFIG_LAPB is not set
460# CONFIG_ECONET is not set 486# CONFIG_ECONET is not set
461# CONFIG_WAN_ROUTER is not set 487# CONFIG_WAN_ROUTER is not set
488# CONFIG_PHONET is not set
489# CONFIG_IEEE802154 is not set
462# CONFIG_NET_SCHED is not set 490# CONFIG_NET_SCHED is not set
491# CONFIG_DCB is not set
463 492
464# 493#
465# Network testing 494# Network testing
@@ -503,13 +532,8 @@ CONFIG_IRTTY_SIR=m
503# 532#
504# CONFIG_BT is not set 533# CONFIG_BT is not set
505# CONFIG_AF_RXRPC is not set 534# CONFIG_AF_RXRPC is not set
506# CONFIG_PHONET is not set 535# CONFIG_WIRELESS is not set
507CONFIG_WIRELESS=y 536# CONFIG_WIMAX is not set
508# CONFIG_CFG80211 is not set
509CONFIG_WIRELESS_OLD_REGULATORY=y
510# CONFIG_WIRELESS_EXT is not set
511# CONFIG_MAC80211 is not set
512# CONFIG_IEEE80211 is not set
513# CONFIG_RFKILL is not set 537# CONFIG_RFKILL is not set
514# CONFIG_NET_9P is not set 538# CONFIG_NET_9P is not set
515 539
@@ -530,6 +554,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
530# CONFIG_CONNECTOR is not set 554# CONFIG_CONNECTOR is not set
531CONFIG_MTD=y 555CONFIG_MTD=y
532# CONFIG_MTD_DEBUG is not set 556# CONFIG_MTD_DEBUG is not set
557# CONFIG_MTD_TESTS is not set
533# CONFIG_MTD_CONCAT is not set 558# CONFIG_MTD_CONCAT is not set
534CONFIG_MTD_PARTITIONS=y 559CONFIG_MTD_PARTITIONS=y
535# CONFIG_MTD_REDBOOT_PARTS is not set 560# CONFIG_MTD_REDBOOT_PARTS is not set
@@ -603,6 +628,11 @@ CONFIG_MTD_PHYSMAP=m
603# CONFIG_MTD_ONENAND is not set 628# CONFIG_MTD_ONENAND is not set
604 629
605# 630#
631# LPDDR flash memory drivers
632#
633# CONFIG_MTD_LPDDR is not set
634
635#
606# UBI - Unsorted block images 636# UBI - Unsorted block images
607# 637#
608# CONFIG_MTD_UBI is not set 638# CONFIG_MTD_UBI is not set
@@ -619,9 +649,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
619# CONFIG_ATA_OVER_ETH is not set 649# CONFIG_ATA_OVER_ETH is not set
620# CONFIG_BLK_DEV_HD is not set 650# CONFIG_BLK_DEV_HD is not set
621CONFIG_MISC_DEVICES=y 651CONFIG_MISC_DEVICES=y
622# CONFIG_EEPROM_93CX6 is not set
623# CONFIG_ENCLOSURE_SERVICES is not set 652# CONFIG_ENCLOSURE_SERVICES is not set
624# CONFIG_C2PORT is not set 653# CONFIG_C2PORT is not set
654
655#
656# EEPROM support
657#
658# CONFIG_EEPROM_AT25 is not set
659# CONFIG_EEPROM_93CX6 is not set
625CONFIG_HAVE_IDE=y 660CONFIG_HAVE_IDE=y
626# CONFIG_IDE is not set 661# CONFIG_IDE is not set
627 662
@@ -645,9 +680,11 @@ CONFIG_NETDEVICES=y
645CONFIG_NET_ETHERNET=y 680CONFIG_NET_ETHERNET=y
646CONFIG_MII=y 681CONFIG_MII=y
647CONFIG_SMC91X=y 682CONFIG_SMC91X=y
648# CONFIG_SMSC911X is not set
649# CONFIG_DM9000 is not set 683# CONFIG_DM9000 is not set
650# CONFIG_ENC28J60 is not set 684# CONFIG_ENC28J60 is not set
685# CONFIG_ETHOC is not set
686# CONFIG_SMSC911X is not set
687# CONFIG_DNET is not set
651# CONFIG_IBM_NEW_EMAC_ZMII is not set 688# CONFIG_IBM_NEW_EMAC_ZMII is not set
652# CONFIG_IBM_NEW_EMAC_RGMII is not set 689# CONFIG_IBM_NEW_EMAC_RGMII is not set
653# CONFIG_IBM_NEW_EMAC_TAH is not set 690# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -656,6 +693,8 @@ CONFIG_SMC91X=y
656# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 693# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
657# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 694# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
658# CONFIG_B44 is not set 695# CONFIG_B44 is not set
696# CONFIG_KS8842 is not set
697# CONFIG_KS8851 is not set
659# CONFIG_NETDEV_1000 is not set 698# CONFIG_NETDEV_1000 is not set
660# CONFIG_NETDEV_10000 is not set 699# CONFIG_NETDEV_10000 is not set
661 700
@@ -664,7 +703,10 @@ CONFIG_SMC91X=y
664# 703#
665# CONFIG_WLAN_PRE80211 is not set 704# CONFIG_WLAN_PRE80211 is not set
666# CONFIG_WLAN_80211 is not set 705# CONFIG_WLAN_80211 is not set
667# CONFIG_IWLWIFI_LEDS is not set 706
707#
708# Enable WiMAX (Networking options) to see the WiMAX drivers
709#
668# CONFIG_WAN is not set 710# CONFIG_WAN is not set
669# CONFIG_PPP is not set 711# CONFIG_PPP is not set
670# CONFIG_SLIP is not set 712# CONFIG_SLIP is not set
@@ -708,15 +750,12 @@ CONFIG_INPUT_EVDEV=m
708# 750#
709# Character devices 751# Character devices
710# 752#
711# CONFIG_AD9960 is not set
712CONFIG_BFIN_DMA_INTERFACE=m 753CONFIG_BFIN_DMA_INTERFACE=m
713# CONFIG_BFIN_PPI is not set 754# CONFIG_BFIN_PPI is not set
714# CONFIG_BFIN_PPIFCD is not set 755# CONFIG_BFIN_PPIFCD is not set
715# CONFIG_BFIN_SIMPLE_TIMER is not set 756# CONFIG_BFIN_SIMPLE_TIMER is not set
716# CONFIG_BFIN_SPI_ADC is not set 757# CONFIG_BFIN_SPI_ADC is not set
717# CONFIG_BFIN_SPORT is not set 758# CONFIG_BFIN_SPORT is not set
718# CONFIG_BFIN_TIMER_LATENCY is not set
719CONFIG_SIMPLE_GPIO=m
720# CONFIG_VT is not set 759# CONFIG_VT is not set
721# CONFIG_DEVKMEM is not set 760# CONFIG_DEVKMEM is not set
722CONFIG_BFIN_JTAG_COMM=m 761CONFIG_BFIN_JTAG_COMM=m
@@ -730,6 +769,7 @@ CONFIG_BFIN_JTAG_COMM=m
730# 769#
731# Non-8250 serial port support 770# Non-8250 serial port support
732# 771#
772# CONFIG_SERIAL_MAX3100 is not set
733CONFIG_SERIAL_BFIN=y 773CONFIG_SERIAL_BFIN=y
734CONFIG_SERIAL_BFIN_CONSOLE=y 774CONFIG_SERIAL_BFIN_CONSOLE=y
735CONFIG_SERIAL_BFIN_DMA=y 775CONFIG_SERIAL_BFIN_DMA=y
@@ -740,6 +780,7 @@ CONFIG_SERIAL_CORE=y
740CONFIG_SERIAL_CORE_CONSOLE=y 780CONFIG_SERIAL_CORE_CONSOLE=y
741# CONFIG_SERIAL_BFIN_SPORT is not set 781# CONFIG_SERIAL_BFIN_SPORT is not set
742CONFIG_UNIX98_PTYS=y 782CONFIG_UNIX98_PTYS=y
783# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
743# CONFIG_LEGACY_PTYS is not set 784# CONFIG_LEGACY_PTYS is not set
744 785
745# 786#
@@ -763,13 +804,18 @@ CONFIG_SPI_BFIN=y
763# CONFIG_SPI_BFIN_LOCK is not set 804# CONFIG_SPI_BFIN_LOCK is not set
764# CONFIG_SPI_BFIN_SPORT is not set 805# CONFIG_SPI_BFIN_SPORT is not set
765# CONFIG_SPI_BITBANG is not set 806# CONFIG_SPI_BITBANG is not set
807# CONFIG_SPI_GPIO is not set
766 808
767# 809#
768# SPI Protocol Masters 810# SPI Protocol Masters
769# 811#
770# CONFIG_EEPROM_AT25 is not set
771# CONFIG_SPI_SPIDEV is not set 812# CONFIG_SPI_SPIDEV is not set
772# CONFIG_SPI_TLE62X0 is not set 813# CONFIG_SPI_TLE62X0 is not set
814
815#
816# PPS support
817#
818# CONFIG_PPS is not set
773CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 819CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
774CONFIG_GPIOLIB=y 820CONFIG_GPIOLIB=y
775# CONFIG_DEBUG_GPIO is not set 821# CONFIG_DEBUG_GPIO is not set
@@ -782,9 +828,6 @@ CONFIG_GPIO_SYSFS=y
782# 828#
783# I2C GPIO expanders: 829# I2C GPIO expanders:
784# 830#
785# CONFIG_GPIO_MAX732X is not set
786# CONFIG_GPIO_PCA953X is not set
787# CONFIG_GPIO_PCF857X is not set
788 831
789# 832#
790# PCI GPIO expanders: 833# PCI GPIO expanders:
@@ -822,23 +865,9 @@ CONFIG_SSB_POSSIBLE=y
822# CONFIG_MFD_SM501 is not set 865# CONFIG_MFD_SM501 is not set
823# CONFIG_HTC_PASIC3 is not set 866# CONFIG_HTC_PASIC3 is not set
824# CONFIG_MFD_TMIO is not set 867# CONFIG_MFD_TMIO is not set
868# CONFIG_EZX_PCAP is not set
825# CONFIG_REGULATOR is not set 869# CONFIG_REGULATOR is not set
826 870# CONFIG_MEDIA_SUPPORT is not set
827#
828# Multimedia devices
829#
830
831#
832# Multimedia core support
833#
834# CONFIG_VIDEO_DEV is not set
835# CONFIG_DVB_CORE is not set
836# CONFIG_VIDEO_MEDIA is not set
837
838#
839# Multimedia drivers
840#
841# CONFIG_DAB is not set
842 871
843# 872#
844# Graphics support 873# Graphics support
@@ -862,7 +891,6 @@ CONFIG_HID=m
862# 891#
863# Special HID drivers 892# Special HID drivers
864# 893#
865CONFIG_HID_COMPAT=y
866# CONFIG_USB_SUPPORT is not set 894# CONFIG_USB_SUPPORT is not set
867# CONFIG_MMC is not set 895# CONFIG_MMC is not set
868# CONFIG_MEMSTICK is not set 896# CONFIG_MEMSTICK is not set
@@ -870,10 +898,20 @@ CONFIG_HID_COMPAT=y
870# CONFIG_ACCESSIBILITY is not set 898# CONFIG_ACCESSIBILITY is not set
871# CONFIG_RTC_CLASS is not set 899# CONFIG_RTC_CLASS is not set
872# CONFIG_DMADEVICES is not set 900# CONFIG_DMADEVICES is not set
901# CONFIG_AUXDISPLAY is not set
873# CONFIG_UIO is not set 902# CONFIG_UIO is not set
903
904#
905# TI VLYNQ
906#
874# CONFIG_STAGING is not set 907# CONFIG_STAGING is not set
875 908
876# 909#
910# Firmware Drivers
911#
912# CONFIG_FIRMWARE_MEMMAP is not set
913
914#
877# File systems 915# File systems
878# 916#
879# CONFIG_EXT2_FS is not set 917# CONFIG_EXT2_FS is not set
@@ -882,9 +920,11 @@ CONFIG_HID_COMPAT=y
882# CONFIG_REISERFS_FS is not set 920# CONFIG_REISERFS_FS is not set
883# CONFIG_JFS_FS is not set 921# CONFIG_JFS_FS is not set
884# CONFIG_FS_POSIX_ACL is not set 922# CONFIG_FS_POSIX_ACL is not set
885CONFIG_FILE_LOCKING=y
886# CONFIG_XFS_FS is not set 923# CONFIG_XFS_FS is not set
887# CONFIG_OCFS2_FS is not set 924# CONFIG_OCFS2_FS is not set
925# CONFIG_BTRFS_FS is not set
926CONFIG_FILE_LOCKING=y
927CONFIG_FSNOTIFY=y
888# CONFIG_DNOTIFY is not set 928# CONFIG_DNOTIFY is not set
889CONFIG_INOTIFY=y 929CONFIG_INOTIFY=y
890CONFIG_INOTIFY_USER=y 930CONFIG_INOTIFY_USER=y
@@ -894,6 +934,11 @@ CONFIG_INOTIFY_USER=y
894# CONFIG_FUSE_FS is not set 934# CONFIG_FUSE_FS is not set
895 935
896# 936#
937# Caches
938#
939# CONFIG_FSCACHE is not set
940
941#
897# CD-ROM/DVD Filesystems 942# CD-ROM/DVD Filesystems
898# 943#
899# CONFIG_ISO9660_FS is not set 944# CONFIG_ISO9660_FS is not set
@@ -915,10 +960,7 @@ CONFIG_SYSFS=y
915# CONFIG_TMPFS is not set 960# CONFIG_TMPFS is not set
916# CONFIG_HUGETLB_PAGE is not set 961# CONFIG_HUGETLB_PAGE is not set
917# CONFIG_CONFIGFS_FS is not set 962# CONFIG_CONFIGFS_FS is not set
918 963CONFIG_MISC_FILESYSTEMS=y
919#
920# Miscellaneous filesystems
921#
922# CONFIG_ADFS_FS is not set 964# CONFIG_ADFS_FS is not set
923# CONFIG_AFFS_FS is not set 965# CONFIG_AFFS_FS is not set
924# CONFIG_HFS_FS is not set 966# CONFIG_HFS_FS is not set
@@ -937,17 +979,8 @@ CONFIG_JFFS2_ZLIB=y
937# CONFIG_JFFS2_LZO is not set 979# CONFIG_JFFS2_LZO is not set
938CONFIG_JFFS2_RTIME=y 980CONFIG_JFFS2_RTIME=y
939# CONFIG_JFFS2_RUBIN is not set 981# CONFIG_JFFS2_RUBIN is not set
940CONFIG_YAFFS_FS=m
941CONFIG_YAFFS_YAFFS1=y
942# CONFIG_YAFFS_9BYTE_TAGS is not set
943# CONFIG_YAFFS_DOES_ECC is not set
944CONFIG_YAFFS_YAFFS2=y
945CONFIG_YAFFS_AUTO_YAFFS2=y
946# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
947# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
948# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
949CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
950# CONFIG_CRAMFS is not set 982# CONFIG_CRAMFS is not set
983# CONFIG_SQUASHFS is not set
951# CONFIG_VXFS_FS is not set 984# CONFIG_VXFS_FS is not set
952# CONFIG_MINIX_FS is not set 985# CONFIG_MINIX_FS is not set
953# CONFIG_OMFS_FS is not set 986# CONFIG_OMFS_FS is not set
@@ -956,6 +989,7 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
956# CONFIG_ROMFS_FS is not set 989# CONFIG_ROMFS_FS is not set
957# CONFIG_SYSV_FS is not set 990# CONFIG_SYSV_FS is not set
958# CONFIG_UFS_FS is not set 991# CONFIG_UFS_FS is not set
992# CONFIG_NILFS2_FS is not set
959CONFIG_NETWORK_FILESYSTEMS=y 993CONFIG_NETWORK_FILESYSTEMS=y
960CONFIG_NFS_FS=m 994CONFIG_NFS_FS=m
961CONFIG_NFS_V3=y 995CONFIG_NFS_V3=y
@@ -966,7 +1000,6 @@ CONFIG_LOCKD=m
966CONFIG_LOCKD_V4=y 1000CONFIG_LOCKD_V4=y
967CONFIG_NFS_COMMON=y 1001CONFIG_NFS_COMMON=y
968CONFIG_SUNRPC=m 1002CONFIG_SUNRPC=m
969# CONFIG_SUNRPC_REGISTER_V4 is not set
970# CONFIG_RPCSEC_GSS_KRB5 is not set 1003# CONFIG_RPCSEC_GSS_KRB5 is not set
971# CONFIG_RPCSEC_GSS_SPKM3 is not set 1004# CONFIG_RPCSEC_GSS_SPKM3 is not set
972CONFIG_SMB_FS=m 1005CONFIG_SMB_FS=m
@@ -1034,11 +1067,15 @@ CONFIG_FRAME_WARN=1024
1034# CONFIG_UNUSED_SYMBOLS is not set 1067# CONFIG_UNUSED_SYMBOLS is not set
1035CONFIG_DEBUG_FS=y 1068CONFIG_DEBUG_FS=y
1036# CONFIG_HEADERS_CHECK is not set 1069# CONFIG_HEADERS_CHECK is not set
1070CONFIG_DEBUG_SECTION_MISMATCH=y
1037CONFIG_DEBUG_KERNEL=y 1071CONFIG_DEBUG_KERNEL=y
1038CONFIG_DEBUG_SHIRQ=y 1072CONFIG_DEBUG_SHIRQ=y
1039CONFIG_DETECT_SOFTLOCKUP=y 1073CONFIG_DETECT_SOFTLOCKUP=y
1040# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set 1074# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1041CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 1075CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1076CONFIG_DETECT_HUNG_TASK=y
1077# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1078CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1042CONFIG_SCHED_DEBUG=y 1079CONFIG_SCHED_DEBUG=y
1043# CONFIG_SCHEDSTATS is not set 1080# CONFIG_SCHEDSTATS is not set
1044# CONFIG_TIMER_STATS is not set 1081# CONFIG_TIMER_STATS is not set
@@ -1046,16 +1083,21 @@ CONFIG_SCHED_DEBUG=y
1046# CONFIG_DEBUG_SLAB is not set 1083# CONFIG_DEBUG_SLAB is not set
1047# CONFIG_DEBUG_SPINLOCK is not set 1084# CONFIG_DEBUG_SPINLOCK is not set
1048# CONFIG_DEBUG_MUTEXES is not set 1085# CONFIG_DEBUG_MUTEXES is not set
1086# CONFIG_DEBUG_LOCK_ALLOC is not set
1087# CONFIG_PROVE_LOCKING is not set
1088# CONFIG_LOCK_STAT is not set
1049# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1089# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1050# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1090# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1051# CONFIG_DEBUG_KOBJECT is not set 1091# CONFIG_DEBUG_KOBJECT is not set
1052CONFIG_DEBUG_BUGVERBOSE=y 1092CONFIG_DEBUG_BUGVERBOSE=y
1053CONFIG_DEBUG_INFO=y 1093CONFIG_DEBUG_INFO=y
1054# CONFIG_DEBUG_VM is not set 1094# CONFIG_DEBUG_VM is not set
1095# CONFIG_DEBUG_NOMMU_REGIONS is not set
1055# CONFIG_DEBUG_WRITECOUNT is not set 1096# CONFIG_DEBUG_WRITECOUNT is not set
1056# CONFIG_DEBUG_MEMORY_INIT is not set 1097# CONFIG_DEBUG_MEMORY_INIT is not set
1057# CONFIG_DEBUG_LIST is not set 1098# CONFIG_DEBUG_LIST is not set
1058# CONFIG_DEBUG_SG is not set 1099# CONFIG_DEBUG_SG is not set
1100# CONFIG_DEBUG_NOTIFIERS is not set
1059# CONFIG_FRAME_POINTER is not set 1101# CONFIG_FRAME_POINTER is not set
1060# CONFIG_BOOT_PRINTK_DELAY is not set 1102# CONFIG_BOOT_PRINTK_DELAY is not set
1061# CONFIG_RCU_TORTURE_TEST is not set 1103# CONFIG_RCU_TORTURE_TEST is not set
@@ -1063,17 +1105,19 @@ CONFIG_DEBUG_INFO=y
1063# CONFIG_BACKTRACE_SELF_TEST is not set 1105# CONFIG_BACKTRACE_SELF_TEST is not set
1064# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1106# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1065# CONFIG_FAULT_INJECTION is not set 1107# CONFIG_FAULT_INJECTION is not set
1066 1108# CONFIG_PAGE_POISONING is not set
1067# 1109CONFIG_HAVE_FUNCTION_TRACER=y
1068# Tracers 1110CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1069# 1111CONFIG_TRACING_SUPPORT=y
1070# CONFIG_SCHED_TRACER is not set 1112# CONFIG_FTRACE is not set
1071# CONFIG_CONTEXT_SWITCH_TRACER is not set 1113# CONFIG_BRANCH_PROFILE_NONE is not set
1072# CONFIG_BOOT_TRACER is not set 1114# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1073# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1115# CONFIG_PROFILE_ALL_BRANCHES is not set
1116# CONFIG_DYNAMIC_DEBUG is not set
1074# CONFIG_SAMPLES is not set 1117# CONFIG_SAMPLES is not set
1075CONFIG_HAVE_ARCH_KGDB=y 1118CONFIG_HAVE_ARCH_KGDB=y
1076# CONFIG_KGDB is not set 1119# CONFIG_KGDB is not set
1120# CONFIG_KMEMCHECK is not set
1077# CONFIG_DEBUG_STACKOVERFLOW is not set 1121# CONFIG_DEBUG_STACKOVERFLOW is not set
1078# CONFIG_DEBUG_STACK_USAGE is not set 1122# CONFIG_DEBUG_STACK_USAGE is not set
1079CONFIG_DEBUG_VERBOSE=y 1123CONFIG_DEBUG_VERBOSE=y
@@ -1095,16 +1139,15 @@ CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE=y
1095CONFIG_EARLY_PRINTK=y 1139CONFIG_EARLY_PRINTK=y
1096CONFIG_CPLB_INFO=y 1140CONFIG_CPLB_INFO=y
1097CONFIG_ACCESS_CHECK=y 1141CONFIG_ACCESS_CHECK=y
1142# CONFIG_BFIN_ISRAM_SELF_TEST is not set
1098 1143
1099# 1144#
1100# Security options 1145# Security options
1101# 1146#
1102# CONFIG_KEYS is not set 1147# CONFIG_KEYS is not set
1103CONFIG_SECURITY=y 1148# CONFIG_SECURITY is not set
1104# CONFIG_SECURITYFS is not set 1149# CONFIG_SECURITYFS is not set
1105# CONFIG_SECURITY_NETWORK is not set
1106# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1150# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1107CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1108CONFIG_CRYPTO=y 1151CONFIG_CRYPTO=y
1109 1152
1110# 1153#
@@ -1183,6 +1226,7 @@ CONFIG_CRYPTO=y
1183# Compression 1226# Compression
1184# 1227#
1185# CONFIG_CRYPTO_DEFLATE is not set 1228# CONFIG_CRYPTO_DEFLATE is not set
1229# CONFIG_CRYPTO_ZLIB is not set
1186# CONFIG_CRYPTO_LZO is not set 1230# CONFIG_CRYPTO_LZO is not set
1187 1231
1188# 1232#
@@ -1190,11 +1234,13 @@ CONFIG_CRYPTO=y
1190# 1234#
1191# CONFIG_CRYPTO_ANSI_CPRNG is not set 1235# CONFIG_CRYPTO_ANSI_CPRNG is not set
1192CONFIG_CRYPTO_HW=y 1236CONFIG_CRYPTO_HW=y
1237# CONFIG_BINARY_PRINTF is not set
1193 1238
1194# 1239#
1195# Library routines 1240# Library routines
1196# 1241#
1197CONFIG_BITREVERSE=y 1242CONFIG_BITREVERSE=y
1243CONFIG_GENERIC_FIND_LAST_BIT=y
1198CONFIG_CRC_CCITT=m 1244CONFIG_CRC_CCITT=m
1199# CONFIG_CRC16 is not set 1245# CONFIG_CRC16 is not set
1200# CONFIG_CRC_T10DIF is not set 1246# CONFIG_CRC_T10DIF is not set
@@ -1204,6 +1250,8 @@ CONFIG_CRC32=y
1204# CONFIG_LIBCRC32C is not set 1250# CONFIG_LIBCRC32C is not set
1205CONFIG_ZLIB_INFLATE=y 1251CONFIG_ZLIB_INFLATE=y
1206CONFIG_ZLIB_DEFLATE=m 1252CONFIG_ZLIB_DEFLATE=m
1253CONFIG_DECOMPRESS_GZIP=y
1207CONFIG_HAS_IOMEM=y 1254CONFIG_HAS_IOMEM=y
1208CONFIG_HAS_IOPORT=y 1255CONFIG_HAS_IOPORT=y
1209CONFIG_HAS_DMA=y 1256CONFIG_HAS_DMA=y
1257CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig
index 5d944ffd4ab0..9e65d885ec0b 100644
--- a/arch/blackfin/configs/BlackStamp_defconfig
+++ b/arch/blackfin/configs/BlackStamp_defconfig
@@ -66,6 +66,7 @@ CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_SLAB=y 66CONFIG_SLAB=y
67# CONFIG_SLUB is not set 67# CONFIG_SLUB is not set
68# CONFIG_SLOB is not set 68# CONFIG_SLOB is not set
69CONFIG_MMAP_ALLOW_UNINITIALIZED=y
69# CONFIG_PROFILING is not set 70# CONFIG_PROFILING is not set
70# CONFIG_MARKERS is not set 71# CONFIG_MARKERS is not set
71CONFIG_HAVE_OPROFILE=y 72CONFIG_HAVE_OPROFILE=y
@@ -275,6 +276,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
275# CONFIG_RESOURCES_64BIT is not set 276# CONFIG_RESOURCES_64BIT is not set
276CONFIG_ZONE_DMA_FLAG=1 277CONFIG_ZONE_DMA_FLAG=1
277CONFIG_VIRT_TO_BUS=y 278CONFIG_VIRT_TO_BUS=y
279CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
278CONFIG_BFIN_GPTIMERS=y 280CONFIG_BFIN_GPTIMERS=y
279# CONFIG_DMA_UNCACHED_4M is not set 281# CONFIG_DMA_UNCACHED_4M is not set
280# CONFIG_DMA_UNCACHED_2M is not set 282# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig
index 648a31d01bf4..4432150d89e3 100644
--- a/arch/blackfin/configs/CM-BF527_defconfig
+++ b/arch/blackfin/configs/CM-BF527_defconfig
@@ -1,12 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28 3# Linux kernel version: 2.6.30.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
10CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
11CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
12CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
@@ -15,6 +16,9 @@ CONFIG_GENERIC_IRQ_PROBE=y
15CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
16CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
17CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
19 23
20# 24#
@@ -25,55 +29,72 @@ CONFIG_BROKEN_ON_SMP=y
25CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
26CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
27CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
28CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
29CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
30# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
32# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
33# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
34CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
36CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
37# CONFIG_CGROUPS is not set
38# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
39CONFIG_SYSFS_DEPRECATED=y 57# CONFIG_CGROUPS is not set
40CONFIG_SYSFS_DEPRECATED_V2=y 58# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
43CONFIG_BLK_DEV_INITRD=y 61CONFIG_BLK_DEV_INITRD=y
44CONFIG_INITRAMFS_SOURCE="" 62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46# CONFIG_SYSCTL is not set 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
47CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
48CONFIG_UID16=y 70CONFIG_UID16=y
49# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
50CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
51# CONFIG_KALLSYMS_ALL is not set
52# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
53CONFIG_HOTPLUG=y 75CONFIG_HOTPLUG=y
54CONFIG_PRINTK=y 76CONFIG_PRINTK=y
55CONFIG_BUG=y 77CONFIG_BUG=y
56# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
57CONFIG_COMPAT_BRK=y
58CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
59# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
60CONFIG_ANON_INODES=y
61CONFIG_EPOLL=y 81CONFIG_EPOLL=y
62CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
63CONFIG_TIMERFD=y 83CONFIG_TIMERFD=y
64CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
65# CONFIG_AIO is not set 85# CONFIG_AIO is not set
66CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
87CONFIG_COMPAT_BRK=y
67CONFIG_SLAB=y 88CONFIG_SLAB=y
68# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70# CONFIG_PROFILING is not set 92# CONFIG_PROFILING is not set
71# CONFIG_MARKERS is not set 93# CONFIG_MARKERS is not set
72CONFIG_HAVE_OPROFILE=y 94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
73# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
74CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
75CONFIG_RT_MUTEXES=y
76CONFIG_TINY_SHMEM=y
77CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
78CONFIG_MODULES=y 99CONFIG_MODULES=y
79# CONFIG_MODULE_FORCE_LOAD is not set 100# CONFIG_MODULE_FORCE_LOAD is not set
@@ -81,11 +102,8 @@ CONFIG_MODULE_UNLOAD=y
81# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
82# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
83# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
84CONFIG_KMOD=y
85CONFIG_BLOCK=y 105CONFIG_BLOCK=y
86# CONFIG_LBD is not set 106# CONFIG_LBD is not set
87# CONFIG_BLK_DEV_IO_TRACE is not set
88# CONFIG_LSF is not set
89# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
90# CONFIG_BLK_DEV_INTEGRITY is not set 108# CONFIG_BLK_DEV_INTEGRITY is not set
91 109
@@ -101,7 +119,6 @@ CONFIG_IOSCHED_CFQ=y
101CONFIG_DEFAULT_CFQ=y 119CONFIG_DEFAULT_CFQ=y
102# CONFIG_DEFAULT_NOOP is not set 120# CONFIG_DEFAULT_NOOP is not set
103CONFIG_DEFAULT_IOSCHED="cfq" 121CONFIG_DEFAULT_IOSCHED="cfq"
104CONFIG_CLASSIC_RCU=y
105# CONFIG_PREEMPT_NONE is not set 122# CONFIG_PREEMPT_NONE is not set
106CONFIG_PREEMPT_VOLUNTARY=y 123CONFIG_PREEMPT_VOLUNTARY=y
107# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
@@ -265,7 +282,10 @@ CONFIG_HZ=250
265# CONFIG_SCHED_HRTICK is not set 282# CONFIG_SCHED_HRTICK is not set
266CONFIG_GENERIC_TIME=y 283CONFIG_GENERIC_TIME=y
267CONFIG_GENERIC_CLOCKEVENTS=y 284CONFIG_GENERIC_CLOCKEVENTS=y
285# CONFIG_TICKSOURCE_GPTMR0 is not set
286CONFIG_TICKSOURCE_CORETMR=y
268# CONFIG_CYCLES_CLOCKSOURCE is not set 287# CONFIG_CYCLES_CLOCKSOURCE is not set
288# CONFIG_GPTMR0_CLOCKSOURCE is not set
269# CONFIG_NO_HZ is not set 289# CONFIG_NO_HZ is not set
270# CONFIG_HIGH_RES_TIMERS is not set 290# CONFIG_HIGH_RES_TIMERS is not set
271CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 291CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -315,10 +335,12 @@ CONFIG_FLATMEM=y
315CONFIG_FLAT_NODE_MEM_MAP=y 335CONFIG_FLAT_NODE_MEM_MAP=y
316CONFIG_PAGEFLAGS_EXTENDED=y 336CONFIG_PAGEFLAGS_EXTENDED=y
317CONFIG_SPLIT_PTLOCK_CPUS=4 337CONFIG_SPLIT_PTLOCK_CPUS=4
318# CONFIG_RESOURCES_64BIT is not set
319# CONFIG_PHYS_ADDR_T_64BIT is not set 338# CONFIG_PHYS_ADDR_T_64BIT is not set
320CONFIG_ZONE_DMA_FLAG=1 339CONFIG_ZONE_DMA_FLAG=1
321CONFIG_VIRT_TO_BUS=y 340CONFIG_VIRT_TO_BUS=y
341CONFIG_UNEVICTABLE_LRU=y
342CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
343CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
322CONFIG_BFIN_GPTIMERS=y 344CONFIG_BFIN_GPTIMERS=y
323# CONFIG_DMA_UNCACHED_4M is not set 345# CONFIG_DMA_UNCACHED_4M is not set
324# CONFIG_DMA_UNCACHED_2M is not set 346# CONFIG_DMA_UNCACHED_2M is not set
@@ -329,10 +351,9 @@ CONFIG_DMA_UNCACHED_1M=y
329# Cache Support 351# Cache Support
330# 352#
331CONFIG_BFIN_ICACHE=y 353CONFIG_BFIN_ICACHE=y
332# CONFIG_BFIN_ICACHE_LOCK is not set 354CONFIG_BFIN_EXTMEM_ICACHEABLE=y
333CONFIG_BFIN_DCACHE=y 355CONFIG_BFIN_DCACHE=y
334# CONFIG_BFIN_DCACHE_BANKA is not set 356# CONFIG_BFIN_DCACHE_BANKA is not set
335CONFIG_BFIN_EXTMEM_ICACHEABLE=y
336CONFIG_BFIN_EXTMEM_DCACHEABLE=y 357CONFIG_BFIN_EXTMEM_DCACHEABLE=y
337CONFIG_BFIN_EXTMEM_WRITEBACK=y 358CONFIG_BFIN_EXTMEM_WRITEBACK=y
338# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 359# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
@@ -343,7 +364,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
343# CONFIG_MPU is not set 364# CONFIG_MPU is not set
344 365
345# 366#
346# Asynchonous Memory Configuration 367# Asynchronous Memory Configuration
347# 368#
348 369
349# 370#
@@ -361,7 +382,7 @@ CONFIG_C_AMBEN_ALL=y
361# EBIU_AMBCTL Control 382# EBIU_AMBCTL Control
362# 383#
363CONFIG_BANK_0=0x7BB0 384CONFIG_BANK_0=0x7BB0
364CONFIG_BANK_1=0x5554 385CONFIG_BANK_1=0x7BB0
365CONFIG_BANK_2=0x7BB0 386CONFIG_BANK_2=0x7BB0
366CONFIG_BANK_3=0xFFC0 387CONFIG_BANK_3=0xFFC0
367 388
@@ -386,7 +407,6 @@ CONFIG_BINFMT_ZFLAT=y
386# 407#
387# CONFIG_PM is not set 408# CONFIG_PM is not set
388CONFIG_ARCH_SUSPEND_POSSIBLE=y 409CONFIG_ARCH_SUSPEND_POSSIBLE=y
389# CONFIG_PM_WAKEUP_BY_GPIO is not set
390 410
391# 411#
392# CPU Frequency scaling 412# CPU Frequency scaling
@@ -400,11 +420,6 @@ CONFIG_NET=y
400CONFIG_PACKET=y 420CONFIG_PACKET=y
401# CONFIG_PACKET_MMAP is not set 421# CONFIG_PACKET_MMAP is not set
402CONFIG_UNIX=y 422CONFIG_UNIX=y
403CONFIG_XFRM=y
404# CONFIG_XFRM_USER is not set
405# CONFIG_XFRM_SUB_POLICY is not set
406# CONFIG_XFRM_MIGRATE is not set
407# CONFIG_XFRM_STATISTICS is not set
408# CONFIG_NET_KEY is not set 423# CONFIG_NET_KEY is not set
409CONFIG_INET=y 424CONFIG_INET=y
410# CONFIG_IP_MULTICAST is not set 425# CONFIG_IP_MULTICAST is not set
@@ -428,7 +443,6 @@ CONFIG_IP_PNP=y
428# CONFIG_INET_XFRM_MODE_BEET is not set 443# CONFIG_INET_XFRM_MODE_BEET is not set
429# CONFIG_INET_LRO is not set 444# CONFIG_INET_LRO is not set
430# CONFIG_INET_DIAG is not set 445# CONFIG_INET_DIAG is not set
431CONFIG_INET_TCP_DIAG=y
432# CONFIG_TCP_CONG_ADVANCED is not set 446# CONFIG_TCP_CONG_ADVANCED is not set
433CONFIG_TCP_CONG_CUBIC=y 447CONFIG_TCP_CONG_CUBIC=y
434CONFIG_DEFAULT_TCP_CONG="cubic" 448CONFIG_DEFAULT_TCP_CONG="cubic"
@@ -452,7 +466,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
452# CONFIG_LAPB is not set 466# CONFIG_LAPB is not set
453# CONFIG_ECONET is not set 467# CONFIG_ECONET is not set
454# CONFIG_WAN_ROUTER is not set 468# CONFIG_WAN_ROUTER is not set
469# CONFIG_PHONET is not set
455# CONFIG_NET_SCHED is not set 470# CONFIG_NET_SCHED is not set
471# CONFIG_DCB is not set
456 472
457# 473#
458# Network testing 474# Network testing
@@ -463,13 +479,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
463# CONFIG_IRDA is not set 479# CONFIG_IRDA is not set
464# CONFIG_BT is not set 480# CONFIG_BT is not set
465# CONFIG_AF_RXRPC is not set 481# CONFIG_AF_RXRPC is not set
466# CONFIG_PHONET is not set 482# CONFIG_WIRELESS is not set
467CONFIG_WIRELESS=y 483# CONFIG_WIMAX is not set
468# CONFIG_CFG80211 is not set
469CONFIG_WIRELESS_OLD_REGULATORY=y
470# CONFIG_WIRELESS_EXT is not set
471# CONFIG_MAC80211 is not set
472# CONFIG_IEEE80211 is not set
473# CONFIG_RFKILL is not set 484# CONFIG_RFKILL is not set
474# CONFIG_NET_9P is not set 485# CONFIG_NET_9P is not set
475 486
@@ -484,22 +495,21 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
484CONFIG_STANDALONE=y 495CONFIG_STANDALONE=y
485CONFIG_PREVENT_FIRMWARE_BUILD=y 496CONFIG_PREVENT_FIRMWARE_BUILD=y
486# CONFIG_FW_LOADER is not set 497# CONFIG_FW_LOADER is not set
487# CONFIG_DEBUG_DRIVER is not set
488# CONFIG_DEBUG_DEVRES is not set
489# CONFIG_SYS_HYPERVISOR is not set 498# CONFIG_SYS_HYPERVISOR is not set
490# CONFIG_CONNECTOR is not set 499# CONFIG_CONNECTOR is not set
491CONFIG_MTD=y 500CONFIG_MTD=y
492# CONFIG_MTD_DEBUG is not set 501# CONFIG_MTD_DEBUG is not set
502# CONFIG_MTD_TESTS is not set
493# CONFIG_MTD_CONCAT is not set 503# CONFIG_MTD_CONCAT is not set
494CONFIG_MTD_PARTITIONS=y 504CONFIG_MTD_PARTITIONS=y
495# CONFIG_MTD_REDBOOT_PARTS is not set 505# CONFIG_MTD_REDBOOT_PARTS is not set
496# CONFIG_MTD_CMDLINE_PARTS is not set 506CONFIG_MTD_CMDLINE_PARTS=y
497# CONFIG_MTD_AR7_PARTS is not set 507# CONFIG_MTD_AR7_PARTS is not set
498 508
499# 509#
500# User Modules And Translation Layers 510# User Modules And Translation Layers
501# 511#
502CONFIG_MTD_CHAR=m 512CONFIG_MTD_CHAR=y
503CONFIG_MTD_BLKDEVS=y 513CONFIG_MTD_BLKDEVS=y
504CONFIG_MTD_BLOCK=y 514CONFIG_MTD_BLOCK=y
505# CONFIG_FTL is not set 515# CONFIG_FTL is not set
@@ -512,9 +522,9 @@ CONFIG_MTD_BLOCK=y
512# 522#
513# RAM/ROM/Flash chip drivers 523# RAM/ROM/Flash chip drivers
514# 524#
515# CONFIG_MTD_CFI is not set 525CONFIG_MTD_CFI=y
516CONFIG_MTD_JEDECPROBE=m 526# CONFIG_MTD_JEDECPROBE is not set
517CONFIG_MTD_GEN_PROBE=m 527CONFIG_MTD_GEN_PROBE=y
518# CONFIG_MTD_CFI_ADV_OPTIONS is not set 528# CONFIG_MTD_CFI_ADV_OPTIONS is not set
519CONFIG_MTD_MAP_BANK_WIDTH_1=y 529CONFIG_MTD_MAP_BANK_WIDTH_1=y
520CONFIG_MTD_MAP_BANK_WIDTH_2=y 530CONFIG_MTD_MAP_BANK_WIDTH_2=y
@@ -526,9 +536,11 @@ CONFIG_MTD_CFI_I1=y
526CONFIG_MTD_CFI_I2=y 536CONFIG_MTD_CFI_I2=y
527# CONFIG_MTD_CFI_I4 is not set 537# CONFIG_MTD_CFI_I4 is not set
528# CONFIG_MTD_CFI_I8 is not set 538# CONFIG_MTD_CFI_I8 is not set
529# CONFIG_MTD_CFI_INTELEXT is not set 539CONFIG_MTD_CFI_INTELEXT=y
530# CONFIG_MTD_CFI_AMDSTD is not set 540# CONFIG_MTD_CFI_AMDSTD is not set
531# CONFIG_MTD_CFI_STAA is not set 541# CONFIG_MTD_CFI_STAA is not set
542# CONFIG_MTD_PSD4256G is not set
543CONFIG_MTD_CFI_UTIL=y
532CONFIG_MTD_RAM=y 544CONFIG_MTD_RAM=y
533CONFIG_MTD_ROM=m 545CONFIG_MTD_ROM=m
534# CONFIG_MTD_ABSENT is not set 546# CONFIG_MTD_ABSENT is not set
@@ -538,7 +550,7 @@ CONFIG_MTD_ROM=m
538# 550#
539CONFIG_MTD_COMPLEX_MAPPINGS=y 551CONFIG_MTD_COMPLEX_MAPPINGS=y
540# CONFIG_MTD_PHYSMAP is not set 552# CONFIG_MTD_PHYSMAP is not set
541# CONFIG_MTD_GPIO_ADDR is not set 553CONFIG_MTD_GPIO_ADDR=y
542# CONFIG_MTD_UCLINUX is not set 554# CONFIG_MTD_UCLINUX is not set
543# CONFIG_MTD_PLATRAM is not set 555# CONFIG_MTD_PLATRAM is not set
544 556
@@ -562,6 +574,11 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
562# CONFIG_MTD_ONENAND is not set 574# CONFIG_MTD_ONENAND is not set
563 575
564# 576#
577# LPDDR flash memory drivers
578#
579# CONFIG_MTD_LPDDR is not set
580
581#
565# UBI - Unsorted block images 582# UBI - Unsorted block images
566# 583#
567# CONFIG_MTD_UBI is not set 584# CONFIG_MTD_UBI is not set
@@ -586,12 +603,46 @@ CONFIG_HAVE_IDE=y
586# SCSI device support 603# SCSI device support
587# 604#
588# CONFIG_RAID_ATTRS is not set 605# CONFIG_RAID_ATTRS is not set
589# CONFIG_SCSI is not set 606CONFIG_SCSI=y
590# CONFIG_SCSI_DMA is not set 607CONFIG_SCSI_DMA=y
608# CONFIG_SCSI_TGT is not set
591# CONFIG_SCSI_NETLINK is not set 609# CONFIG_SCSI_NETLINK is not set
610CONFIG_SCSI_PROC_FS=y
611
612#
613# SCSI support type (disk, tape, CD-ROM)
614#
615CONFIG_BLK_DEV_SD=y
616# CONFIG_CHR_DEV_ST is not set
617# CONFIG_CHR_DEV_OSST is not set
618# CONFIG_BLK_DEV_SR is not set
619# CONFIG_CHR_DEV_SG is not set
620# CONFIG_CHR_DEV_SCH is not set
621
622#
623# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
624#
625# CONFIG_SCSI_MULTI_LUN is not set
626# CONFIG_SCSI_CONSTANTS is not set
627# CONFIG_SCSI_LOGGING is not set
628# CONFIG_SCSI_SCAN_ASYNC is not set
629CONFIG_SCSI_WAIT_SCAN=m
630
631#
632# SCSI Transports
633#
634# CONFIG_SCSI_SPI_ATTRS is not set
635# CONFIG_SCSI_FC_ATTRS is not set
636# CONFIG_SCSI_ISCSI_ATTRS is not set
637# CONFIG_SCSI_SAS_LIBSAS is not set
638# CONFIG_SCSI_SRP_ATTRS is not set
639# CONFIG_SCSI_LOWLEVEL is not set
640# CONFIG_SCSI_DH is not set
641# CONFIG_SCSI_OSD_INITIATOR is not set
592# CONFIG_ATA is not set 642# CONFIG_ATA is not set
593# CONFIG_MD is not set 643# CONFIG_MD is not set
594CONFIG_NETDEVICES=y 644CONFIG_NETDEVICES=y
645CONFIG_COMPAT_NET_DEV_OPS=y
595# CONFIG_DUMMY is not set 646# CONFIG_DUMMY is not set
596# CONFIG_BONDING is not set 647# CONFIG_BONDING is not set
597# CONFIG_MACVLAN is not set 648# CONFIG_MACVLAN is not set
@@ -613,6 +664,9 @@ CONFIG_PHYLIB=y
613# CONFIG_BROADCOM_PHY is not set 664# CONFIG_BROADCOM_PHY is not set
614# CONFIG_ICPLUS_PHY is not set 665# CONFIG_ICPLUS_PHY is not set
615# CONFIG_REALTEK_PHY is not set 666# CONFIG_REALTEK_PHY is not set
667# CONFIG_NATIONAL_PHY is not set
668# CONFIG_STE10XP is not set
669# CONFIG_LSI_ET1011C_PHY is not set
616# CONFIG_FIXED_PHY is not set 670# CONFIG_FIXED_PHY is not set
617# CONFIG_MDIO_BITBANG is not set 671# CONFIG_MDIO_BITBANG is not set
618CONFIG_NET_ETHERNET=y 672CONFIG_NET_ETHERNET=y
@@ -623,9 +677,11 @@ CONFIG_BFIN_TX_DESC_NUM=10
623CONFIG_BFIN_RX_DESC_NUM=20 677CONFIG_BFIN_RX_DESC_NUM=20
624CONFIG_BFIN_MAC_RMII=y 678CONFIG_BFIN_MAC_RMII=y
625# CONFIG_SMC91X is not set 679# CONFIG_SMC91X is not set
626# CONFIG_SMSC911X is not set
627# CONFIG_DM9000 is not set 680# CONFIG_DM9000 is not set
628# CONFIG_ENC28J60 is not set 681# CONFIG_ENC28J60 is not set
682# CONFIG_ETHOC is not set
683# CONFIG_SMSC911X is not set
684# CONFIG_DNET is not set
629# CONFIG_IBM_NEW_EMAC_ZMII is not set 685# CONFIG_IBM_NEW_EMAC_ZMII is not set
630# CONFIG_IBM_NEW_EMAC_RGMII is not set 686# CONFIG_IBM_NEW_EMAC_RGMII is not set
631# CONFIG_IBM_NEW_EMAC_TAH is not set 687# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -633,6 +689,7 @@ CONFIG_BFIN_MAC_RMII=y
633# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set 689# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
634# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set 690# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
635# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set 691# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
692# CONFIG_B44 is not set
636# CONFIG_NETDEV_1000 is not set 693# CONFIG_NETDEV_1000 is not set
637# CONFIG_NETDEV_10000 is not set 694# CONFIG_NETDEV_10000 is not set
638 695
@@ -641,7 +698,10 @@ CONFIG_BFIN_MAC_RMII=y
641# 698#
642# CONFIG_WLAN_PRE80211 is not set 699# CONFIG_WLAN_PRE80211 is not set
643# CONFIG_WLAN_80211 is not set 700# CONFIG_WLAN_80211 is not set
644# CONFIG_IWLWIFI_LEDS is not set 701
702#
703# Enable WiMAX (Networking options) to see the WiMAX drivers
704#
645 705
646# 706#
647# USB Network Adapters 707# USB Network Adapters
@@ -674,17 +734,13 @@ CONFIG_BFIN_MAC_RMII=y
674# 734#
675# Character devices 735# Character devices
676# 736#
677# CONFIG_AD9960 is not set 737CONFIG_BFIN_DMA_INTERFACE=m
678# CONFIG_SPI_ADC_BF533 is not set 738# CONFIG_BFIN_PPI is not set
679# CONFIG_BF5xx_PPIFCD is not set 739# CONFIG_BFIN_PPIFCD is not set
680# CONFIG_BFIN_SIMPLE_TIMER is not set 740# CONFIG_BFIN_SIMPLE_TIMER is not set
681# CONFIG_BF5xx_PPI is not set 741# CONFIG_BFIN_SPI_ADC is not set
682# CONFIG_BF5xx_EPPI is not set
683# CONFIG_BFIN_SPORT is not set 742# CONFIG_BFIN_SPORT is not set
684# CONFIG_BFIN_TIMER_LATENCY is not set 743# CONFIG_BFIN_TWI_LCD is not set
685# CONFIG_TWI_LCD is not set
686CONFIG_BFIN_DMA_INTERFACE=m
687CONFIG_SIMPLE_GPIO=m
688# CONFIG_VT is not set 744# CONFIG_VT is not set
689# CONFIG_DEVKMEM is not set 745# CONFIG_DEVKMEM is not set
690# CONFIG_BFIN_JTAG_COMM is not set 746# CONFIG_BFIN_JTAG_COMM is not set
@@ -698,6 +754,7 @@ CONFIG_SIMPLE_GPIO=m
698# 754#
699# Non-8250 serial port support 755# Non-8250 serial port support
700# 756#
757# CONFIG_SERIAL_MAX3100 is not set
701CONFIG_SERIAL_BFIN=y 758CONFIG_SERIAL_BFIN=y
702CONFIG_SERIAL_BFIN_CONSOLE=y 759CONFIG_SERIAL_BFIN_CONSOLE=y
703CONFIG_SERIAL_BFIN_DMA=y 760CONFIG_SERIAL_BFIN_DMA=y
@@ -710,6 +767,7 @@ CONFIG_SERIAL_CORE=y
710CONFIG_SERIAL_CORE_CONSOLE=y 767CONFIG_SERIAL_CORE_CONSOLE=y
711# CONFIG_SERIAL_BFIN_SPORT is not set 768# CONFIG_SERIAL_BFIN_SPORT is not set
712CONFIG_UNIX98_PTYS=y 769CONFIG_UNIX98_PTYS=y
770# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
713# CONFIG_LEGACY_PTYS is not set 771# CONFIG_LEGACY_PTYS is not set
714CONFIG_BFIN_OTP=y 772CONFIG_BFIN_OTP=y
715# CONFIG_BFIN_OTP_WRITE_ENABLE is not set 773# CONFIG_BFIN_OTP_WRITE_ENABLE is not set
@@ -758,13 +816,9 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
758# Miscellaneous I2C Chip support 816# Miscellaneous I2C Chip support
759# 817#
760# CONFIG_DS1682 is not set 818# CONFIG_DS1682 is not set
761# CONFIG_AT24 is not set
762# CONFIG_SENSORS_AD5252 is not set
763# CONFIG_SENSORS_EEPROM is not set
764# CONFIG_SENSORS_PCF8574 is not set 819# CONFIG_SENSORS_PCF8574 is not set
765# CONFIG_PCF8575 is not set 820# CONFIG_PCF8575 is not set
766# CONFIG_SENSORS_PCA9539 is not set 821# CONFIG_SENSORS_PCA9539 is not set
767# CONFIG_SENSORS_PCF8591 is not set
768# CONFIG_SENSORS_MAX6875 is not set 822# CONFIG_SENSORS_MAX6875 is not set
769# CONFIG_SENSORS_TSL2550 is not set 823# CONFIG_SENSORS_TSL2550 is not set
770# CONFIG_I2C_DEBUG_CORE is not set 824# CONFIG_I2C_DEBUG_CORE is not set
@@ -772,7 +826,6 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
772# CONFIG_I2C_DEBUG_BUS is not set 826# CONFIG_I2C_DEBUG_BUS is not set
773# CONFIG_I2C_DEBUG_CHIP is not set 827# CONFIG_I2C_DEBUG_CHIP is not set
774CONFIG_SPI=y 828CONFIG_SPI=y
775# CONFIG_SPI_DEBUG is not set
776CONFIG_SPI_MASTER=y 829CONFIG_SPI_MASTER=y
777 830
778# 831#
@@ -780,17 +833,17 @@ CONFIG_SPI_MASTER=y
780# 833#
781CONFIG_SPI_BFIN=y 834CONFIG_SPI_BFIN=y
782# CONFIG_SPI_BFIN_LOCK is not set 835# CONFIG_SPI_BFIN_LOCK is not set
836# CONFIG_SPI_BFIN_SPORT is not set
783# CONFIG_SPI_BITBANG is not set 837# CONFIG_SPI_BITBANG is not set
838# CONFIG_SPI_GPIO is not set
784 839
785# 840#
786# SPI Protocol Masters 841# SPI Protocol Masters
787# 842#
788# CONFIG_SPI_AT25 is not set
789# CONFIG_SPI_SPIDEV is not set 843# CONFIG_SPI_SPIDEV is not set
790# CONFIG_SPI_TLE62X0 is not set 844# CONFIG_SPI_TLE62X0 is not set
791CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 845CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
792CONFIG_GPIOLIB=y 846CONFIG_GPIOLIB=y
793# CONFIG_DEBUG_GPIO is not set
794CONFIG_GPIO_SYSFS=y 847CONFIG_GPIO_SYSFS=y
795 848
796# 849#
@@ -803,6 +856,7 @@ CONFIG_GPIO_SYSFS=y
803# CONFIG_GPIO_MAX732X is not set 856# CONFIG_GPIO_MAX732X is not set
804# CONFIG_GPIO_PCA953X is not set 857# CONFIG_GPIO_PCA953X is not set
805# CONFIG_GPIO_PCF857X is not set 858# CONFIG_GPIO_PCF857X is not set
859# CONFIG_GPIO_ADP5588 is not set
806 860
807# 861#
808# PCI GPIO expanders: 862# PCI GPIO expanders:
@@ -829,11 +883,13 @@ CONFIG_HWMON=y
829# CONFIG_SENSORS_ADT7462 is not set 883# CONFIG_SENSORS_ADT7462 is not set
830# CONFIG_SENSORS_ADT7470 is not set 884# CONFIG_SENSORS_ADT7470 is not set
831# CONFIG_SENSORS_ADT7473 is not set 885# CONFIG_SENSORS_ADT7473 is not set
886# CONFIG_SENSORS_ADT7475 is not set
832# CONFIG_SENSORS_ATXP1 is not set 887# CONFIG_SENSORS_ATXP1 is not set
833# CONFIG_SENSORS_DS1621 is not set 888# CONFIG_SENSORS_DS1621 is not set
834# CONFIG_SENSORS_F71805F is not set 889# CONFIG_SENSORS_F71805F is not set
835# CONFIG_SENSORS_F71882FG is not set 890# CONFIG_SENSORS_F71882FG is not set
836# CONFIG_SENSORS_F75375S is not set 891# CONFIG_SENSORS_F75375S is not set
892# CONFIG_SENSORS_G760A is not set
837# CONFIG_SENSORS_GL518SM is not set 893# CONFIG_SENSORS_GL518SM is not set
838# CONFIG_SENSORS_GL520SM is not set 894# CONFIG_SENSORS_GL520SM is not set
839# CONFIG_SENSORS_IT87 is not set 895# CONFIG_SENSORS_IT87 is not set
@@ -849,11 +905,16 @@ CONFIG_HWMON=y
849# CONFIG_SENSORS_LM90 is not set 905# CONFIG_SENSORS_LM90 is not set
850# CONFIG_SENSORS_LM92 is not set 906# CONFIG_SENSORS_LM92 is not set
851# CONFIG_SENSORS_LM93 is not set 907# CONFIG_SENSORS_LM93 is not set
908# CONFIG_SENSORS_LTC4215 is not set
909# CONFIG_SENSORS_LTC4245 is not set
910# CONFIG_SENSORS_LM95241 is not set
852# CONFIG_SENSORS_MAX1111 is not set 911# CONFIG_SENSORS_MAX1111 is not set
853# CONFIG_SENSORS_MAX1619 is not set 912# CONFIG_SENSORS_MAX1619 is not set
854# CONFIG_SENSORS_MAX6650 is not set 913# CONFIG_SENSORS_MAX6650 is not set
855# CONFIG_SENSORS_PC87360 is not set 914# CONFIG_SENSORS_PC87360 is not set
856# CONFIG_SENSORS_PC87427 is not set 915# CONFIG_SENSORS_PC87427 is not set
916# CONFIG_SENSORS_PCF8591 is not set
917# CONFIG_SENSORS_SHT15 is not set
857# CONFIG_SENSORS_DME1737 is not set 918# CONFIG_SENSORS_DME1737 is not set
858# CONFIG_SENSORS_SMSC47M1 is not set 919# CONFIG_SENSORS_SMSC47M1 is not set
859# CONFIG_SENSORS_SMSC47M192 is not set 920# CONFIG_SENSORS_SMSC47M192 is not set
@@ -885,6 +946,12 @@ CONFIG_BFIN_WDT=y
885# USB-based Watchdog Cards 946# USB-based Watchdog Cards
886# 947#
887# CONFIG_USBPCWATCHDOG is not set 948# CONFIG_USBPCWATCHDOG is not set
949CONFIG_SSB_POSSIBLE=y
950
951#
952# Sonics Silicon Backplane
953#
954# CONFIG_SSB is not set
888 955
889# 956#
890# Multifunction device drivers 957# Multifunction device drivers
@@ -892,10 +959,14 @@ CONFIG_BFIN_WDT=y
892# CONFIG_MFD_CORE is not set 959# CONFIG_MFD_CORE is not set
893# CONFIG_MFD_SM501 is not set 960# CONFIG_MFD_SM501 is not set
894# CONFIG_HTC_PASIC3 is not set 961# CONFIG_HTC_PASIC3 is not set
962# CONFIG_TPS65010 is not set
963# CONFIG_TWL4030_CORE is not set
895# CONFIG_MFD_TMIO is not set 964# CONFIG_MFD_TMIO is not set
896# CONFIG_PMIC_DA903X is not set 965# CONFIG_PMIC_DA903X is not set
966# CONFIG_PMIC_ADP5520 is not set
897# CONFIG_MFD_WM8400 is not set 967# CONFIG_MFD_WM8400 is not set
898# CONFIG_MFD_WM8350_I2C is not set 968# CONFIG_MFD_WM8350_I2C is not set
969# CONFIG_MFD_PCF50633 is not set
899# CONFIG_REGULATOR is not set 970# CONFIG_REGULATOR is not set
900 971
901# 972#
@@ -931,20 +1002,20 @@ CONFIG_USB_SUPPORT=y
931CONFIG_USB_ARCH_HAS_HCD=y 1002CONFIG_USB_ARCH_HAS_HCD=y
932# CONFIG_USB_ARCH_HAS_OHCI is not set 1003# CONFIG_USB_ARCH_HAS_OHCI is not set
933# CONFIG_USB_ARCH_HAS_EHCI is not set 1004# CONFIG_USB_ARCH_HAS_EHCI is not set
934CONFIG_USB=y 1005CONFIG_USB=m
935# CONFIG_USB_DEBUG is not set 1006# CONFIG_USB_DEBUG is not set
936# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set 1007CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
937 1008
938# 1009#
939# Miscellaneous USB options 1010# Miscellaneous USB options
940# 1011#
941# CONFIG_USB_DEVICEFS is not set 1012CONFIG_USB_DEVICEFS=y
942CONFIG_USB_DEVICE_CLASS=y 1013# CONFIG_USB_DEVICE_CLASS is not set
943# CONFIG_USB_DYNAMIC_MINORS is not set 1014# CONFIG_USB_DYNAMIC_MINORS is not set
944# CONFIG_USB_OTG is not set 1015# CONFIG_USB_OTG is not set
945# CONFIG_USB_OTG_WHITELIST is not set 1016# CONFIG_USB_OTG_WHITELIST is not set
946CONFIG_USB_OTG_BLACKLIST_HUB=y 1017CONFIG_USB_OTG_BLACKLIST_HUB=y
947CONFIG_USB_MON=y 1018CONFIG_USB_MON=m
948# CONFIG_USB_WUSB is not set 1019# CONFIG_USB_WUSB is not set
949# CONFIG_USB_WUSB_CBAF is not set 1020# CONFIG_USB_WUSB_CBAF is not set
950 1021
@@ -952,24 +1023,24 @@ CONFIG_USB_MON=y
952# USB Host Controller Drivers 1023# USB Host Controller Drivers
953# 1024#
954# CONFIG_USB_C67X00_HCD is not set 1025# CONFIG_USB_C67X00_HCD is not set
1026# CONFIG_USB_OXU210HP_HCD is not set
955# CONFIG_USB_ISP116X_HCD is not set 1027# CONFIG_USB_ISP116X_HCD is not set
956# CONFIG_USB_ISP1760_HCD is not set 1028# CONFIG_USB_ISP1760_HCD is not set
957# CONFIG_USB_ISP1362_HCD is not set 1029# CONFIG_USB_ISP1362_HCD is not set
958# CONFIG_USB_SL811_HCD is not set 1030# CONFIG_USB_SL811_HCD is not set
959# CONFIG_USB_R8A66597_HCD is not set 1031# CONFIG_USB_R8A66597_HCD is not set
960# CONFIG_USB_HWA_HCD is not set 1032# CONFIG_USB_HWA_HCD is not set
961CONFIG_USB_MUSB_HDRC=y 1033CONFIG_USB_MUSB_HDRC=m
962CONFIG_USB_MUSB_SOC=y 1034CONFIG_USB_MUSB_SOC=y
963 1035
964# 1036#
965# Blackfin high speed USB Support 1037# Blackfin high speed USB Support
966# 1038#
967CONFIG_USB_MUSB_HOST=y 1039# CONFIG_USB_MUSB_HOST is not set
968# CONFIG_USB_MUSB_PERIPHERAL is not set 1040CONFIG_USB_MUSB_PERIPHERAL=y
969# CONFIG_USB_MUSB_OTG is not set 1041# CONFIG_USB_MUSB_OTG is not set
970CONFIG_USB_MUSB_HDRC_HCD=y 1042CONFIG_USB_GADGET_MUSB_HDRC=y
971CONFIG_MUSB_PIO_ONLY=y 1043CONFIG_MUSB_PIO_ONLY=y
972CONFIG_MUSB_DMA_POLL=y
973# CONFIG_USB_MUSB_DEBUG is not set 1044# CONFIG_USB_MUSB_DEBUG is not set
974 1045
975# 1046#
@@ -981,18 +1052,31 @@ CONFIG_MUSB_DMA_POLL=y
981# CONFIG_USB_TMC is not set 1052# CONFIG_USB_TMC is not set
982 1053
983# 1054#
984# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 1055# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
985# 1056#
986 1057
987# 1058#
988# see USB_STORAGE Help for more information 1059# also be needed; see USB_STORAGE Help for more info
989# 1060#
1061CONFIG_USB_STORAGE=m
1062# CONFIG_USB_STORAGE_DEBUG is not set
1063# CONFIG_USB_STORAGE_DATAFAB is not set
1064# CONFIG_USB_STORAGE_FREECOM is not set
1065# CONFIG_USB_STORAGE_ISD200 is not set
1066# CONFIG_USB_STORAGE_USBAT is not set
1067# CONFIG_USB_STORAGE_SDDR09 is not set
1068# CONFIG_USB_STORAGE_SDDR55 is not set
1069# CONFIG_USB_STORAGE_JUMPSHOT is not set
1070# CONFIG_USB_STORAGE_ALAUDA is not set
1071# CONFIG_USB_STORAGE_KARMA is not set
1072# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
990# CONFIG_USB_LIBUSUAL is not set 1073# CONFIG_USB_LIBUSUAL is not set
991 1074
992# 1075#
993# USB Imaging devices 1076# USB Imaging devices
994# 1077#
995# CONFIG_USB_MDC800 is not set 1078# CONFIG_USB_MDC800 is not set
1079# CONFIG_USB_MICROTEK is not set
996 1080
997# 1081#
998# USB port drivers 1082# USB port drivers
@@ -1013,7 +1097,6 @@ CONFIG_MUSB_DMA_POLL=y
1013# CONFIG_USB_LED is not set 1097# CONFIG_USB_LED is not set
1014# CONFIG_USB_CYPRESS_CY7C63 is not set 1098# CONFIG_USB_CYPRESS_CY7C63 is not set
1015# CONFIG_USB_CYTHERM is not set 1099# CONFIG_USB_CYTHERM is not set
1016# CONFIG_USB_PHIDGET is not set
1017# CONFIG_USB_IDMOUSE is not set 1100# CONFIG_USB_IDMOUSE is not set
1018# CONFIG_USB_FTDI_ELAN is not set 1101# CONFIG_USB_FTDI_ELAN is not set
1019# CONFIG_USB_APPLEDISPLAY is not set 1102# CONFIG_USB_APPLEDISPLAY is not set
@@ -1021,9 +1104,50 @@ CONFIG_MUSB_DMA_POLL=y
1021# CONFIG_USB_LD is not set 1104# CONFIG_USB_LD is not set
1022# CONFIG_USB_TRANCEVIBRATOR is not set 1105# CONFIG_USB_TRANCEVIBRATOR is not set
1023# CONFIG_USB_IOWARRIOR is not set 1106# CONFIG_USB_IOWARRIOR is not set
1107# CONFIG_USB_TEST is not set
1024# CONFIG_USB_ISIGHTFW is not set 1108# CONFIG_USB_ISIGHTFW is not set
1025# CONFIG_USB_VST is not set 1109# CONFIG_USB_VST is not set
1026# CONFIG_USB_GADGET is not set 1110CONFIG_USB_GADGET=m
1111# CONFIG_USB_GADGET_DEBUG_FILES is not set
1112# CONFIG_USB_GADGET_DEBUG_FS is not set
1113CONFIG_USB_GADGET_VBUS_DRAW=2
1114CONFIG_USB_GADGET_SELECTED=y
1115# CONFIG_USB_GADGET_AT91 is not set
1116# CONFIG_USB_GADGET_ATMEL_USBA is not set
1117# CONFIG_USB_GADGET_FSL_USB2 is not set
1118# CONFIG_USB_GADGET_LH7A40X is not set
1119# CONFIG_USB_GADGET_OMAP is not set
1120# CONFIG_USB_GADGET_PXA25X is not set
1121# CONFIG_USB_GADGET_PXA27X is not set
1122# CONFIG_USB_GADGET_S3C2410 is not set
1123# CONFIG_USB_GADGET_IMX is not set
1124# CONFIG_USB_GADGET_M66592 is not set
1125# CONFIG_USB_GADGET_AMD5536UDC is not set
1126# CONFIG_USB_GADGET_FSL_QE is not set
1127# CONFIG_USB_GADGET_CI13XXX is not set
1128# CONFIG_USB_GADGET_NET2272 is not set
1129# CONFIG_USB_GADGET_NET2280 is not set
1130# CONFIG_USB_GADGET_GOKU is not set
1131# CONFIG_USB_GADGET_DUMMY_HCD is not set
1132CONFIG_USB_GADGET_DUALSPEED=y
1133# CONFIG_USB_ZERO is not set
1134# CONFIG_USB_AUDIO is not set
1135CONFIG_USB_ETH=m
1136CONFIG_USB_ETH_RNDIS=y
1137# CONFIG_USB_GADGETFS is not set
1138CONFIG_USB_FILE_STORAGE=m
1139# CONFIG_USB_FILE_STORAGE_TEST is not set
1140CONFIG_USB_G_SERIAL=m
1141# CONFIG_USB_MIDI_GADGET is not set
1142CONFIG_USB_G_PRINTER=m
1143# CONFIG_USB_CDC_COMPOSITE is not set
1144
1145#
1146# OTG and related infrastructure
1147#
1148CONFIG_USB_OTG_UTILS=y
1149# CONFIG_USB_GPIO_VBUS is not set
1150# CONFIG_NOP_USB_XCEIV is not set
1027# CONFIG_MMC is not set 1151# CONFIG_MMC is not set
1028# CONFIG_MEMSTICK is not set 1152# CONFIG_MEMSTICK is not set
1029# CONFIG_NEW_LEDS is not set 1153# CONFIG_NEW_LEDS is not set
@@ -1090,6 +1214,7 @@ CONFIG_RTC_INTF_DEV=y
1090# 1214#
1091CONFIG_RTC_DRV_BFIN=y 1215CONFIG_RTC_DRV_BFIN=y
1092# CONFIG_DMADEVICES is not set 1216# CONFIG_DMADEVICES is not set
1217# CONFIG_AUXDISPLAY is not set
1093# CONFIG_UIO is not set 1218# CONFIG_UIO is not set
1094# CONFIG_STAGING is not set 1219# CONFIG_STAGING is not set
1095 1220
@@ -1102,9 +1227,10 @@ CONFIG_RTC_DRV_BFIN=y
1102# CONFIG_REISERFS_FS is not set 1227# CONFIG_REISERFS_FS is not set
1103# CONFIG_JFS_FS is not set 1228# CONFIG_JFS_FS is not set
1104# CONFIG_FS_POSIX_ACL is not set 1229# CONFIG_FS_POSIX_ACL is not set
1105CONFIG_FILE_LOCKING=y
1106# CONFIG_XFS_FS is not set 1230# CONFIG_XFS_FS is not set
1107# CONFIG_OCFS2_FS is not set 1231# CONFIG_OCFS2_FS is not set
1232# CONFIG_BTRFS_FS is not set
1233CONFIG_FILE_LOCKING=y
1108# CONFIG_DNOTIFY is not set 1234# CONFIG_DNOTIFY is not set
1109CONFIG_INOTIFY=y 1235CONFIG_INOTIFY=y
1110CONFIG_INOTIFY_USER=y 1236CONFIG_INOTIFY_USER=y
@@ -1114,6 +1240,11 @@ CONFIG_INOTIFY_USER=y
1114# CONFIG_FUSE_FS is not set 1240# CONFIG_FUSE_FS is not set
1115 1241
1116# 1242#
1243# Caches
1244#
1245# CONFIG_FSCACHE is not set
1246
1247#
1117# CD-ROM/DVD Filesystems 1248# CD-ROM/DVD Filesystems
1118# 1249#
1119# CONFIG_ISO9660_FS is not set 1250# CONFIG_ISO9660_FS is not set
@@ -1122,8 +1253,11 @@ CONFIG_INOTIFY_USER=y
1122# 1253#
1123# DOS/FAT/NT Filesystems 1254# DOS/FAT/NT Filesystems
1124# 1255#
1125# CONFIG_MSDOS_FS is not set 1256CONFIG_FAT_FS=y
1126# CONFIG_VFAT_FS is not set 1257CONFIG_MSDOS_FS=y
1258CONFIG_VFAT_FS=y
1259CONFIG_FAT_DEFAULT_CODEPAGE=437
1260CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1127# CONFIG_NTFS_FS is not set 1261# CONFIG_NTFS_FS is not set
1128 1262
1129# 1263#
@@ -1135,10 +1269,7 @@ CONFIG_SYSFS=y
1135# CONFIG_TMPFS is not set 1269# CONFIG_TMPFS is not set
1136# CONFIG_HUGETLB_PAGE is not set 1270# CONFIG_HUGETLB_PAGE is not set
1137# CONFIG_CONFIGFS_FS is not set 1271# CONFIG_CONFIGFS_FS is not set
1138 1272CONFIG_MISC_FILESYSTEMS=y
1139#
1140# Miscellaneous filesystems
1141#
1142# CONFIG_ADFS_FS is not set 1273# CONFIG_ADFS_FS is not set
1143# CONFIG_AFFS_FS is not set 1274# CONFIG_AFFS_FS is not set
1144# CONFIG_HFS_FS is not set 1275# CONFIG_HFS_FS is not set
@@ -1146,9 +1277,19 @@ CONFIG_SYSFS=y
1146# CONFIG_BEFS_FS is not set 1277# CONFIG_BEFS_FS is not set
1147# CONFIG_BFS_FS is not set 1278# CONFIG_BFS_FS is not set
1148# CONFIG_EFS_FS is not set 1279# CONFIG_EFS_FS is not set
1149# CONFIG_YAFFS_FS is not set 1280CONFIG_JFFS2_FS=y
1150# CONFIG_JFFS2_FS is not set 1281CONFIG_JFFS2_FS_DEBUG=0
1282CONFIG_JFFS2_FS_WRITEBUFFER=y
1283# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1284# CONFIG_JFFS2_SUMMARY is not set
1285# CONFIG_JFFS2_FS_XATTR is not set
1286# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1287CONFIG_JFFS2_ZLIB=y
1288# CONFIG_JFFS2_LZO is not set
1289CONFIG_JFFS2_RTIME=y
1290# CONFIG_JFFS2_RUBIN is not set
1151# CONFIG_CRAMFS is not set 1291# CONFIG_CRAMFS is not set
1292# CONFIG_SQUASHFS is not set
1152# CONFIG_VXFS_FS is not set 1293# CONFIG_VXFS_FS is not set
1153# CONFIG_MINIX_FS is not set 1294# CONFIG_MINIX_FS is not set
1154# CONFIG_OMFS_FS is not set 1295# CONFIG_OMFS_FS is not set
@@ -1157,6 +1298,7 @@ CONFIG_SYSFS=y
1157# CONFIG_ROMFS_FS is not set 1298# CONFIG_ROMFS_FS is not set
1158# CONFIG_SYSV_FS is not set 1299# CONFIG_SYSV_FS is not set
1159# CONFIG_UFS_FS is not set 1300# CONFIG_UFS_FS is not set
1301# CONFIG_NILFS2_FS is not set
1160CONFIG_NETWORK_FILESYSTEMS=y 1302CONFIG_NETWORK_FILESYSTEMS=y
1161CONFIG_NFS_FS=m 1303CONFIG_NFS_FS=m
1162CONFIG_NFS_V3=y 1304CONFIG_NFS_V3=y
@@ -1167,7 +1309,6 @@ CONFIG_LOCKD=m
1167CONFIG_LOCKD_V4=y 1309CONFIG_LOCKD_V4=y
1168CONFIG_NFS_COMMON=y 1310CONFIG_NFS_COMMON=y
1169CONFIG_SUNRPC=m 1311CONFIG_SUNRPC=m
1170# CONFIG_SUNRPC_REGISTER_V4 is not set
1171# CONFIG_RPCSEC_GSS_KRB5 is not set 1312# CONFIG_RPCSEC_GSS_KRB5 is not set
1172# CONFIG_RPCSEC_GSS_SPKM3 is not set 1313# CONFIG_RPCSEC_GSS_SPKM3 is not set
1173CONFIG_SMB_FS=m 1314CONFIG_SMB_FS=m
@@ -1182,9 +1323,9 @@ CONFIG_SMB_FS=m
1182# 1323#
1183# CONFIG_PARTITION_ADVANCED is not set 1324# CONFIG_PARTITION_ADVANCED is not set
1184CONFIG_MSDOS_PARTITION=y 1325CONFIG_MSDOS_PARTITION=y
1185CONFIG_NLS=m 1326CONFIG_NLS=y
1186CONFIG_NLS_DEFAULT="iso8859-1" 1327CONFIG_NLS_DEFAULT="iso8859-1"
1187# CONFIG_NLS_CODEPAGE_437 is not set 1328CONFIG_NLS_CODEPAGE_437=y
1188# CONFIG_NLS_CODEPAGE_737 is not set 1329# CONFIG_NLS_CODEPAGE_737 is not set
1189# CONFIG_NLS_CODEPAGE_775 is not set 1330# CONFIG_NLS_CODEPAGE_775 is not set
1190# CONFIG_NLS_CODEPAGE_850 is not set 1331# CONFIG_NLS_CODEPAGE_850 is not set
@@ -1208,7 +1349,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1208# CONFIG_NLS_CODEPAGE_1250 is not set 1349# CONFIG_NLS_CODEPAGE_1250 is not set
1209# CONFIG_NLS_CODEPAGE_1251 is not set 1350# CONFIG_NLS_CODEPAGE_1251 is not set
1210# CONFIG_NLS_ASCII is not set 1351# CONFIG_NLS_ASCII is not set
1211# CONFIG_NLS_ISO8859_1 is not set 1352CONFIG_NLS_ISO8859_1=y
1212# CONFIG_NLS_ISO8859_2 is not set 1353# CONFIG_NLS_ISO8859_2 is not set
1213# CONFIG_NLS_ISO8859_3 is not set 1354# CONFIG_NLS_ISO8859_3 is not set
1214# CONFIG_NLS_ISO8859_4 is not set 1355# CONFIG_NLS_ISO8859_4 is not set
@@ -1235,55 +1376,34 @@ CONFIG_FRAME_WARN=1024
1235# CONFIG_UNUSED_SYMBOLS is not set 1376# CONFIG_UNUSED_SYMBOLS is not set
1236CONFIG_DEBUG_FS=y 1377CONFIG_DEBUG_FS=y
1237# CONFIG_HEADERS_CHECK is not set 1378# CONFIG_HEADERS_CHECK is not set
1238CONFIG_DEBUG_KERNEL=y 1379CONFIG_DEBUG_SECTION_MISMATCH=y
1239# CONFIG_DEBUG_SHIRQ is not set 1380# CONFIG_DEBUG_KERNEL is not set
1240CONFIG_DETECT_SOFTLOCKUP=y 1381# CONFIG_DEBUG_BUGVERBOSE is not set
1241# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1242CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1243# CONFIG_SCHED_DEBUG is not set
1244# CONFIG_SCHEDSTATS is not set
1245# CONFIG_TIMER_STATS is not set
1246# CONFIG_DEBUG_OBJECTS is not set
1247# CONFIG_DEBUG_SLAB is not set
1248# CONFIG_DEBUG_RT_MUTEXES is not set
1249# CONFIG_RT_MUTEX_TESTER is not set
1250# CONFIG_DEBUG_SPINLOCK is not set
1251# CONFIG_DEBUG_MUTEXES is not set
1252# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1253# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1254# CONFIG_DEBUG_KOBJECT is not set
1255CONFIG_DEBUG_BUGVERBOSE=y
1256# CONFIG_DEBUG_INFO is not set
1257# CONFIG_DEBUG_VM is not set
1258# CONFIG_DEBUG_WRITECOUNT is not set
1259# CONFIG_DEBUG_MEMORY_INIT is not set 1382# CONFIG_DEBUG_MEMORY_INIT is not set
1260# CONFIG_DEBUG_LIST is not set
1261# CONFIG_DEBUG_SG is not set
1262# CONFIG_FRAME_POINTER is not set
1263# CONFIG_BOOT_PRINTK_DELAY is not set
1264# CONFIG_RCU_TORTURE_TEST is not set
1265# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1383# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1266# CONFIG_BACKTRACE_SELF_TEST is not set 1384CONFIG_HAVE_FUNCTION_TRACER=y
1267# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set 1385CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1268# CONFIG_FAULT_INJECTION is not set 1386CONFIG_TRACING_SUPPORT=y
1269# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1270 1387
1271# 1388#
1272# Tracers 1389# Tracers
1273# 1390#
1391# CONFIG_FUNCTION_TRACER is not set
1392# CONFIG_IRQSOFF_TRACER is not set
1274# CONFIG_SCHED_TRACER is not set 1393# CONFIG_SCHED_TRACER is not set
1275# CONFIG_CONTEXT_SWITCH_TRACER is not set 1394# CONFIG_CONTEXT_SWITCH_TRACER is not set
1395# CONFIG_EVENT_TRACER is not set
1276# CONFIG_BOOT_TRACER is not set 1396# CONFIG_BOOT_TRACER is not set
1277# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1397# CONFIG_TRACE_BRANCH_PROFILING is not set
1398# CONFIG_STACK_TRACER is not set
1399# CONFIG_KMEMTRACE is not set
1400# CONFIG_WORKQUEUE_TRACER is not set
1401# CONFIG_BLK_DEV_IO_TRACE is not set
1402# CONFIG_DYNAMIC_DEBUG is not set
1278# CONFIG_SAMPLES is not set 1403# CONFIG_SAMPLES is not set
1279CONFIG_HAVE_ARCH_KGDB=y 1404CONFIG_HAVE_ARCH_KGDB=y
1280# CONFIG_KGDB is not set
1281# CONFIG_DEBUG_STACKOVERFLOW is not set
1282# CONFIG_DEBUG_STACK_USAGE is not set
1283# CONFIG_KGDB_TESTCASE is not set
1284CONFIG_DEBUG_VERBOSE=y 1405CONFIG_DEBUG_VERBOSE=y
1285CONFIG_DEBUG_MMRS=y 1406# CONFIG_DEBUG_MMRS is not set
1286# CONFIG_DEBUG_HWERR is not set
1287# CONFIG_DEBUG_DOUBLEFAULT is not set 1407# CONFIG_DEBUG_DOUBLEFAULT is not set
1288CONFIG_DEBUG_HUNT_FOR_ZERO=y 1408CONFIG_DEBUG_HUNT_FOR_ZERO=y
1289CONFIG_DEBUG_BFIN_HWTRACE_ON=y 1409CONFIG_DEBUG_BFIN_HWTRACE_ON=y
@@ -1293,9 +1413,10 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1293CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1413CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1294# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1414# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1295# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1415# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1296# CONFIG_EARLY_PRINTK is not set 1416CONFIG_EARLY_PRINTK=y
1297# CONFIG_CPLB_INFO is not set 1417# CONFIG_CPLB_INFO is not set
1298CONFIG_ACCESS_CHECK=y 1418CONFIG_ACCESS_CHECK=y
1419# CONFIG_BFIN_ISRAM_SELF_TEST is not set
1299 1420
1300# 1421#
1301# Security options 1422# Security options
@@ -1304,9 +1425,9 @@ CONFIG_ACCESS_CHECK=y
1304CONFIG_SECURITY=y 1425CONFIG_SECURITY=y
1305# CONFIG_SECURITYFS is not set 1426# CONFIG_SECURITYFS is not set
1306# CONFIG_SECURITY_NETWORK is not set 1427# CONFIG_SECURITY_NETWORK is not set
1428# CONFIG_SECURITY_PATH is not set
1307# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1429# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1308# CONFIG_SECURITY_ROOTPLUG is not set 1430# CONFIG_SECURITY_TOMOYO is not set
1309CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1310CONFIG_CRYPTO=y 1431CONFIG_CRYPTO=y
1311 1432
1312# 1433#
@@ -1385,6 +1506,7 @@ CONFIG_CRYPTO=y
1385# Compression 1506# Compression
1386# 1507#
1387# CONFIG_CRYPTO_DEFLATE is not set 1508# CONFIG_CRYPTO_DEFLATE is not set
1509# CONFIG_CRYPTO_ZLIB is not set
1388# CONFIG_CRYPTO_LZO is not set 1510# CONFIG_CRYPTO_LZO is not set
1389 1511
1390# 1512#
@@ -1392,20 +1514,24 @@ CONFIG_CRYPTO=y
1392# 1514#
1393# CONFIG_CRYPTO_ANSI_CPRNG is not set 1515# CONFIG_CRYPTO_ANSI_CPRNG is not set
1394CONFIG_CRYPTO_HW=y 1516CONFIG_CRYPTO_HW=y
1517# CONFIG_BINARY_PRINTF is not set
1395 1518
1396# 1519#
1397# Library routines 1520# Library routines
1398# 1521#
1399CONFIG_BITREVERSE=y 1522CONFIG_BITREVERSE=y
1523CONFIG_GENERIC_FIND_LAST_BIT=y
1400CONFIG_CRC_CCITT=m 1524CONFIG_CRC_CCITT=m
1401# CONFIG_CRC16 is not set 1525# CONFIG_CRC16 is not set
1402# CONFIG_CRC_T10DIF is not set 1526# CONFIG_CRC_T10DIF is not set
1403# CONFIG_CRC_ITU_T is not set 1527CONFIG_CRC_ITU_T=y
1404CONFIG_CRC32=y 1528CONFIG_CRC32=y
1405# CONFIG_CRC7 is not set 1529CONFIG_CRC7=y
1406# CONFIG_LIBCRC32C is not set 1530# CONFIG_LIBCRC32C is not set
1407CONFIG_ZLIB_INFLATE=y 1531CONFIG_ZLIB_INFLATE=y
1408CONFIG_PLIST=y 1532CONFIG_ZLIB_DEFLATE=y
1533CONFIG_DECOMPRESS_LZMA=y
1409CONFIG_HAS_IOMEM=y 1534CONFIG_HAS_IOMEM=y
1410CONFIG_HAS_IOPORT=y 1535CONFIG_HAS_IOPORT=y
1411CONFIG_HAS_DMA=y 1536CONFIG_HAS_DMA=y
1537CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig
index ae665b93b875..df56639ab2f2 100644
--- a/arch/blackfin/configs/CM-BF533_defconfig
+++ b/arch/blackfin/configs/CM-BF533_defconfig
@@ -1,94 +1,110 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22.16 3# Linux kernel version: 2.6.30.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
10CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
11CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
18CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21 23
22# 24#
23# Code maturity level options 25# General setup
24# 26#
25CONFIG_EXPERIMENTAL=y 27CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y 28CONFIG_BROKEN_ON_SMP=y
27CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
28
29#
30# General setup
31#
32CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
34CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
37# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
38# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
42CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_SYSFS_DEPRECATED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
58# CONFIG_SYSFS_DEPRECATED_V2 is not set
46# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
47# CONFIG_BLK_DEV_INITRD is not set 60# CONFIG_NAMESPACES is not set
48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 61CONFIG_BLK_DEV_INITRD=y
49# CONFIG_SYSCTL is not set 62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
50CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
51# CONFIG_UID16 is not set 70# CONFIG_UID16 is not set
52# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
53CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
55# CONFIG_HOTPLUG is not set 74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y
56CONFIG_PRINTK=y 76CONFIG_PRINTK=y
57CONFIG_BUG=y 77CONFIG_BUG=y
58# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
59CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
60# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
61CONFIG_ANON_INODES=y
62CONFIG_EPOLL=y 81CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
83CONFIG_TIMERFD=y
64CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_AIO=y
65CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 87CONFIG_COMPAT_BRK=y
67# CONFIG_NP2 is not set
68CONFIG_SLAB=y 88CONFIG_SLAB=y
69# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
71CONFIG_RT_MUTEXES=y 91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
72CONFIG_TINY_SHMEM=y 92# CONFIG_PROFILING is not set
93# CONFIG_MARKERS is not set
94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
97CONFIG_SLABINFO=y
73CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
74
75#
76# Loadable module support
77#
78CONFIG_MODULES=y 99CONFIG_MODULES=y
79CONFIG_MODULE_UNLOAD=y 100# CONFIG_MODULE_FORCE_LOAD is not set
80# CONFIG_MODULE_FORCE_UNLOAD is not set 101# CONFIG_MODULE_UNLOAD is not set
81# CONFIG_MODVERSIONS is not set 102# CONFIG_MODVERSIONS is not set
82# CONFIG_MODULE_SRCVERSION_ALL is not set 103# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y
84
85#
86# Block layer
87#
88CONFIG_BLOCK=y 104CONFIG_BLOCK=y
89# CONFIG_LBD is not set 105# CONFIG_LBD is not set
90# CONFIG_BLK_DEV_IO_TRACE is not set 106# CONFIG_BLK_DEV_BSG is not set
91# CONFIG_LSF is not set 107# CONFIG_BLK_DEV_INTEGRITY is not set
92 108
93# 109#
94# IO Schedulers 110# IO Schedulers
@@ -96,7 +112,7 @@ CONFIG_BLOCK=y
96CONFIG_IOSCHED_NOOP=y 112CONFIG_IOSCHED_NOOP=y
97# CONFIG_IOSCHED_AS is not set 113# CONFIG_IOSCHED_AS is not set
98# CONFIG_IOSCHED_DEADLINE is not set 114# CONFIG_IOSCHED_DEADLINE is not set
99CONFIG_IOSCHED_CFQ=y 115# CONFIG_IOSCHED_CFQ is not set
100# CONFIG_DEFAULT_AS is not set 116# CONFIG_DEFAULT_AS is not set
101# CONFIG_DEFAULT_DEADLINE is not set 117# CONFIG_DEFAULT_DEADLINE is not set
102# CONFIG_DEFAULT_CFQ is not set 118# CONFIG_DEFAULT_CFQ is not set
@@ -105,6 +121,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
105CONFIG_PREEMPT_NONE=y 121CONFIG_PREEMPT_NONE=y
106# CONFIG_PREEMPT_VOLUNTARY is not set 122# CONFIG_PREEMPT_VOLUNTARY is not set
107# CONFIG_PREEMPT is not set 123# CONFIG_PREEMPT is not set
124# CONFIG_FREEZER is not set
108 125
109# 126#
110# Blackfin Processor Options 127# Blackfin Processor Options
@@ -113,6 +130,10 @@ CONFIG_PREEMPT_NONE=y
113# 130#
114# Processor and Board Settings 131# Processor and Board Settings
115# 132#
133# CONFIG_BF512 is not set
134# CONFIG_BF514 is not set
135# CONFIG_BF516 is not set
136# CONFIG_BF518 is not set
116# CONFIG_BF522 is not set 137# CONFIG_BF522 is not set
117# CONFIG_BF523 is not set 138# CONFIG_BF523 is not set
118# CONFIG_BF524 is not set 139# CONFIG_BF524 is not set
@@ -125,28 +146,38 @@ CONFIG_BF533=y
125# CONFIG_BF534 is not set 146# CONFIG_BF534 is not set
126# CONFIG_BF536 is not set 147# CONFIG_BF536 is not set
127# CONFIG_BF537 is not set 148# CONFIG_BF537 is not set
149# CONFIG_BF538 is not set
150# CONFIG_BF539 is not set
128# CONFIG_BF542 is not set 151# CONFIG_BF542 is not set
152# CONFIG_BF542M is not set
129# CONFIG_BF544 is not set 153# CONFIG_BF544 is not set
154# CONFIG_BF544M is not set
130# CONFIG_BF547 is not set 155# CONFIG_BF547 is not set
156# CONFIG_BF547M is not set
131# CONFIG_BF548 is not set 157# CONFIG_BF548 is not set
158# CONFIG_BF548M is not set
132# CONFIG_BF549 is not set 159# CONFIG_BF549 is not set
160# CONFIG_BF549M is not set
133# CONFIG_BF561 is not set 161# CONFIG_BF561 is not set
162CONFIG_BF_REV_MIN=3
163CONFIG_BF_REV_MAX=6
134# CONFIG_BF_REV_0_0 is not set 164# CONFIG_BF_REV_0_0 is not set
135# CONFIG_BF_REV_0_1 is not set 165# CONFIG_BF_REV_0_1 is not set
136# CONFIG_BF_REV_0_2 is not set 166# CONFIG_BF_REV_0_2 is not set
137CONFIG_BF_REV_0_3=y 167CONFIG_BF_REV_0_3=y
138# CONFIG_BF_REV_0_4 is not set 168# CONFIG_BF_REV_0_4 is not set
139# CONFIG_BF_REV_0_5 is not set 169# CONFIG_BF_REV_0_5 is not set
170# CONFIG_BF_REV_0_6 is not set
140# CONFIG_BF_REV_ANY is not set 171# CONFIG_BF_REV_ANY is not set
141# CONFIG_BF_REV_NONE is not set 172# CONFIG_BF_REV_NONE is not set
142CONFIG_BF53x=y 173CONFIG_BF53x=y
143CONFIG_BFIN_SINGLE_CORE=y
144CONFIG_MEM_MT48LC16M16A2TG_75=y 174CONFIG_MEM_MT48LC16M16A2TG_75=y
145# CONFIG_BFIN533_EZKIT is not set 175# CONFIG_BFIN533_EZKIT is not set
146# CONFIG_BFIN533_STAMP is not set 176# CONFIG_BFIN533_STAMP is not set
177# CONFIG_BLACKSTAMP is not set
147CONFIG_BFIN533_BLUETECHNIX_CM=y 178CONFIG_BFIN533_BLUETECHNIX_CM=y
148# CONFIG_H8606_HVSISTEMAS is not set 179# CONFIG_H8606_HVSISTEMAS is not set
149# CONFIG_GENERIC_BF533_BOARD is not set 180# CONFIG_BFIN532_IP0X is not set
150 181
151# 182#
152# BF533/2/1 Specific Configuration 183# BF533/2/1 Specific Configuration
@@ -188,6 +219,7 @@ CONFIG_WDTIMER=13
188# Board customizations 219# Board customizations
189# 220#
190# CONFIG_CMDLINE_BOOL is not set 221# CONFIG_CMDLINE_BOOL is not set
222CONFIG_BOOT_LOAD=0x1000
191 223
192# 224#
193# Clock/PLL Setup 225# Clock/PLL Setup
@@ -207,13 +239,20 @@ CONFIG_HZ_250=y
207# CONFIG_HZ_300 is not set 239# CONFIG_HZ_300 is not set
208# CONFIG_HZ_1000 is not set 240# CONFIG_HZ_1000 is not set
209CONFIG_HZ=250 241CONFIG_HZ=250
242# CONFIG_SCHED_HRTICK is not set
243CONFIG_GENERIC_TIME=y
244CONFIG_GENERIC_CLOCKEVENTS=y
245# CONFIG_TICKSOURCE_GPTMR0 is not set
246CONFIG_TICKSOURCE_CORETMR=y
247# CONFIG_CYCLES_CLOCKSOURCE is not set
248# CONFIG_GPTMR0_CLOCKSOURCE is not set
249# CONFIG_NO_HZ is not set
250# CONFIG_HIGH_RES_TIMERS is not set
251CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
210 252
211# 253#
212# Memory Setup 254# Misc
213# 255#
214CONFIG_MAX_MEM_SIZE=32
215CONFIG_MEM_ADD_WIDTH=9
216CONFIG_BOOT_LOAD=0x1000
217CONFIG_BFIN_SCRATCH_REG_RETN=y 256CONFIG_BFIN_SCRATCH_REG_RETN=y
218# CONFIG_BFIN_SCRATCH_REG_RETE is not set 257# CONFIG_BFIN_SCRATCH_REG_RETE is not set
219# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set 258# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
@@ -240,6 +279,12 @@ CONFIG_IP_CHECKSUM_L1=y
240CONFIG_CACHELINE_ALIGNED_L1=y 279CONFIG_CACHELINE_ALIGNED_L1=y
241CONFIG_SYSCALL_TAB_L1=y 280CONFIG_SYSCALL_TAB_L1=y
242CONFIG_CPLB_SWITCH_TAB_L1=y 281CONFIG_CPLB_SWITCH_TAB_L1=y
282CONFIG_APP_STACK_L1=y
283
284#
285# Speed Optimizations
286#
287CONFIG_BFIN_INS_LOWOVERHEAD=y
243CONFIG_RAMKERNEL=y 288CONFIG_RAMKERNEL=y
244# CONFIG_ROMKERNEL is not set 289# CONFIG_ROMKERNEL is not set
245CONFIG_SELECT_MEMORY_MODEL=y 290CONFIG_SELECT_MEMORY_MODEL=y
@@ -248,12 +293,16 @@ CONFIG_FLATMEM_MANUAL=y
248# CONFIG_SPARSEMEM_MANUAL is not set 293# CONFIG_SPARSEMEM_MANUAL is not set
249CONFIG_FLATMEM=y 294CONFIG_FLATMEM=y
250CONFIG_FLAT_NODE_MEM_MAP=y 295CONFIG_FLAT_NODE_MEM_MAP=y
251# CONFIG_SPARSEMEM_STATIC is not set 296CONFIG_PAGEFLAGS_EXTENDED=y
252CONFIG_SPLIT_PTLOCK_CPUS=4 297CONFIG_SPLIT_PTLOCK_CPUS=4
253# CONFIG_RESOURCES_64BIT is not set 298# CONFIG_PHYS_ADDR_T_64BIT is not set
254CONFIG_ZONE_DMA_FLAG=1 299CONFIG_ZONE_DMA_FLAG=1
255CONFIG_LARGE_ALLOCS=y 300CONFIG_VIRT_TO_BUS=y
301CONFIG_UNEVICTABLE_LRU=y
302CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
303CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
256# CONFIG_BFIN_GPTIMERS is not set 304# CONFIG_BFIN_GPTIMERS is not set
305# CONFIG_DMA_UNCACHED_4M is not set
257# CONFIG_DMA_UNCACHED_2M is not set 306# CONFIG_DMA_UNCACHED_2M is not set
258CONFIG_DMA_UNCACHED_1M=y 307CONFIG_DMA_UNCACHED_1M=y
259# CONFIG_DMA_UNCACHED_NONE is not set 308# CONFIG_DMA_UNCACHED_NONE is not set
@@ -262,10 +311,9 @@ CONFIG_DMA_UNCACHED_1M=y
262# Cache Support 311# Cache Support
263# 312#
264CONFIG_BFIN_ICACHE=y 313CONFIG_BFIN_ICACHE=y
265# CONFIG_BFIN_ICACHE_LOCK is not set 314CONFIG_BFIN_EXTMEM_ICACHEABLE=y
266CONFIG_BFIN_DCACHE=y 315CONFIG_BFIN_DCACHE=y
267# CONFIG_BFIN_DCACHE_BANKA is not set 316# CONFIG_BFIN_DCACHE_BANKA is not set
268CONFIG_BFIN_EXTMEM_ICACHEABLE=y
269CONFIG_BFIN_EXTMEM_DCACHEABLE=y 317CONFIG_BFIN_EXTMEM_DCACHEABLE=y
270CONFIG_BFIN_EXTMEM_WRITEBACK=y 318CONFIG_BFIN_EXTMEM_WRITEBACK=y
271# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 319# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
@@ -276,7 +324,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
276# CONFIG_MPU is not set 324# CONFIG_MPU is not set
277 325
278# 326#
279# Asynchonous Memory Configuration 327# Asynchronous Memory Configuration
280# 328#
281 329
282# 330#
@@ -301,12 +349,8 @@ CONFIG_BANK_3=0xFFC2
301# 349#
302# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 350# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
303# 351#
304# CONFIG_PCI is not set
305# CONFIG_ARCH_SUPPORTS_MSI is not set 352# CONFIG_ARCH_SUPPORTS_MSI is not set
306 353# CONFIG_PCCARD is not set
307#
308# PCCARD (PCMCIA/CardBus) support
309#
310 354
311# 355#
312# Executable file formats 356# Executable file formats
@@ -315,22 +359,19 @@ CONFIG_BINFMT_ELF_FDPIC=y
315CONFIG_BINFMT_FLAT=y 359CONFIG_BINFMT_FLAT=y
316CONFIG_BINFMT_ZFLAT=y 360CONFIG_BINFMT_ZFLAT=y
317CONFIG_BINFMT_SHARED_FLAT=y 361CONFIG_BINFMT_SHARED_FLAT=y
362# CONFIG_HAVE_AOUT is not set
318# CONFIG_BINFMT_MISC is not set 363# CONFIG_BINFMT_MISC is not set
319 364
320# 365#
321# Power management options 366# Power management options
322# 367#
323# CONFIG_PM is not set 368# CONFIG_PM is not set
324# CONFIG_PM_WAKEUP_BY_GPIO is not set 369CONFIG_ARCH_SUSPEND_POSSIBLE=y
325 370
326# 371#
327# CPU Frequency scaling 372# CPU Frequency scaling
328# 373#
329# CONFIG_CPU_FREQ is not set 374# CONFIG_CPU_FREQ is not set
330
331#
332# Networking
333#
334CONFIG_NET=y 375CONFIG_NET=y
335 376
336# 377#
@@ -339,45 +380,13 @@ CONFIG_NET=y
339CONFIG_PACKET=y 380CONFIG_PACKET=y
340# CONFIG_PACKET_MMAP is not set 381# CONFIG_PACKET_MMAP is not set
341CONFIG_UNIX=y 382CONFIG_UNIX=y
342CONFIG_XFRM=y
343# CONFIG_XFRM_USER is not set
344# CONFIG_XFRM_SUB_POLICY is not set
345# CONFIG_XFRM_MIGRATE is not set
346# CONFIG_NET_KEY is not set 383# CONFIG_NET_KEY is not set
347CONFIG_INET=y 384# CONFIG_INET is not set
348# CONFIG_IP_MULTICAST is not set
349# CONFIG_IP_ADVANCED_ROUTER is not set
350CONFIG_IP_FIB_HASH=y
351# CONFIG_IP_PNP is not set
352# CONFIG_NET_IPIP is not set
353# CONFIG_NET_IPGRE is not set
354# CONFIG_ARPD is not set
355# CONFIG_SYN_COOKIES is not set
356# CONFIG_INET_AH is not set
357# CONFIG_INET_ESP is not set
358# CONFIG_INET_IPCOMP is not set
359# CONFIG_INET_XFRM_TUNNEL is not set
360# CONFIG_INET_TUNNEL is not set
361# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
362# CONFIG_INET_XFRM_MODE_TUNNEL is not set
363# CONFIG_INET_XFRM_MODE_BEET is not set
364# CONFIG_INET_DIAG is not set
365CONFIG_INET_TCP_DIAG=y
366# CONFIG_TCP_CONG_ADVANCED is not set
367CONFIG_TCP_CONG_CUBIC=y
368CONFIG_DEFAULT_TCP_CONG="cubic"
369# CONFIG_TCP_MD5SIG is not set
370# CONFIG_IPV6 is not set
371# CONFIG_INET6_XFRM_TUNNEL is not set
372# CONFIG_INET6_TUNNEL is not set
373# CONFIG_NETLABEL is not set
374# CONFIG_NETWORK_SECMARK is not set 385# CONFIG_NETWORK_SECMARK is not set
375# CONFIG_NETFILTER is not set 386# CONFIG_NETFILTER is not set
376# CONFIG_IP_DCCP is not set
377# CONFIG_IP_SCTP is not set
378# CONFIG_TIPC is not set
379# CONFIG_ATM is not set 387# CONFIG_ATM is not set
380# CONFIG_BRIDGE is not set 388# CONFIG_BRIDGE is not set
389# CONFIG_NET_DSA is not set
381# CONFIG_VLAN_8021Q is not set 390# CONFIG_VLAN_8021Q is not set
382# CONFIG_DECNET is not set 391# CONFIG_DECNET is not set
383# CONFIG_LLC2 is not set 392# CONFIG_LLC2 is not set
@@ -385,31 +394,23 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
385# CONFIG_ATALK is not set 394# CONFIG_ATALK is not set
386# CONFIG_X25 is not set 395# CONFIG_X25 is not set
387# CONFIG_LAPB is not set 396# CONFIG_LAPB is not set
388# CONFIG_ECONET is not set
389# CONFIG_WAN_ROUTER is not set 397# CONFIG_WAN_ROUTER is not set
390 398# CONFIG_PHONET is not set
391#
392# QoS and/or fair queueing
393#
394# CONFIG_NET_SCHED is not set 399# CONFIG_NET_SCHED is not set
400# CONFIG_DCB is not set
395 401
396# 402#
397# Network testing 403# Network testing
398# 404#
399# CONFIG_NET_PKTGEN is not set 405# CONFIG_NET_PKTGEN is not set
400# CONFIG_HAMRADIO is not set 406# CONFIG_HAMRADIO is not set
407# CONFIG_CAN is not set
401# CONFIG_IRDA is not set 408# CONFIG_IRDA is not set
402# CONFIG_BT is not set 409# CONFIG_BT is not set
403# CONFIG_AF_RXRPC is not set 410# CONFIG_WIRELESS is not set
404 411# CONFIG_WIMAX is not set
405#
406# Wireless
407#
408# CONFIG_CFG80211 is not set
409# CONFIG_WIRELESS_EXT is not set
410# CONFIG_MAC80211 is not set
411# CONFIG_IEEE80211 is not set
412# CONFIG_RFKILL is not set 412# CONFIG_RFKILL is not set
413# CONFIG_NET_9P is not set
413 414
414# 415#
415# Device Drivers 416# Device Drivers
@@ -418,20 +419,22 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
418# 419#
419# Generic Driver Options 420# Generic Driver Options
420# 421#
422CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
421CONFIG_STANDALONE=y 423CONFIG_STANDALONE=y
422CONFIG_PREVENT_FIRMWARE_BUILD=y 424CONFIG_PREVENT_FIRMWARE_BUILD=y
425CONFIG_FW_LOADER=y
426CONFIG_FIRMWARE_IN_KERNEL=y
427CONFIG_EXTRA_FIRMWARE=""
423# CONFIG_SYS_HYPERVISOR is not set 428# CONFIG_SYS_HYPERVISOR is not set
424
425#
426# Connector - unified userspace <-> kernelspace linker
427#
428# CONFIG_CONNECTOR is not set 429# CONFIG_CONNECTOR is not set
429CONFIG_MTD=y 430CONFIG_MTD=y
430# CONFIG_MTD_DEBUG is not set 431# CONFIG_MTD_DEBUG is not set
432# CONFIG_MTD_TESTS is not set
431# CONFIG_MTD_CONCAT is not set 433# CONFIG_MTD_CONCAT is not set
432CONFIG_MTD_PARTITIONS=y 434CONFIG_MTD_PARTITIONS=y
433# CONFIG_MTD_REDBOOT_PARTS is not set 435# CONFIG_MTD_REDBOOT_PARTS is not set
434# CONFIG_MTD_CMDLINE_PARTS is not set 436CONFIG_MTD_CMDLINE_PARTS=y
437# CONFIG_MTD_AR7_PARTS is not set
435 438
436# 439#
437# User Modules And Translation Layers 440# User Modules And Translation Layers
@@ -444,12 +447,15 @@ CONFIG_MTD_BLOCK=y
444# CONFIG_INFTL is not set 447# CONFIG_INFTL is not set
445# CONFIG_RFD_FTL is not set 448# CONFIG_RFD_FTL is not set
446# CONFIG_SSFDC is not set 449# CONFIG_SSFDC is not set
450# CONFIG_MTD_OOPS is not set
447 451
448# 452#
449# RAM/ROM/Flash chip drivers 453# RAM/ROM/Flash chip drivers
450# 454#
451# CONFIG_MTD_CFI is not set 455CONFIG_MTD_CFI=y
452# CONFIG_MTD_JEDECPROBE is not set 456# CONFIG_MTD_JEDECPROBE is not set
457CONFIG_MTD_GEN_PROBE=y
458# CONFIG_MTD_CFI_ADV_OPTIONS is not set
453CONFIG_MTD_MAP_BANK_WIDTH_1=y 459CONFIG_MTD_MAP_BANK_WIDTH_1=y
454CONFIG_MTD_MAP_BANK_WIDTH_2=y 460CONFIG_MTD_MAP_BANK_WIDTH_2=y
455CONFIG_MTD_MAP_BANK_WIDTH_4=y 461CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -460,6 +466,11 @@ CONFIG_MTD_CFI_I1=y
460CONFIG_MTD_CFI_I2=y 466CONFIG_MTD_CFI_I2=y
461# CONFIG_MTD_CFI_I4 is not set 467# CONFIG_MTD_CFI_I4 is not set
462# CONFIG_MTD_CFI_I8 is not set 468# CONFIG_MTD_CFI_I8 is not set
469CONFIG_MTD_CFI_INTELEXT=y
470# CONFIG_MTD_CFI_AMDSTD is not set
471# CONFIG_MTD_CFI_STAA is not set
472# CONFIG_MTD_PSD4256G is not set
473CONFIG_MTD_CFI_UTIL=y
463CONFIG_MTD_RAM=y 474CONFIG_MTD_RAM=y
464# CONFIG_MTD_ROM is not set 475# CONFIG_MTD_ROM is not set
465# CONFIG_MTD_ABSENT is not set 476# CONFIG_MTD_ABSENT is not set
@@ -468,12 +479,16 @@ CONFIG_MTD_RAM=y
468# Mapping drivers for chip access 479# Mapping drivers for chip access
469# 480#
470# CONFIG_MTD_COMPLEX_MAPPINGS is not set 481# CONFIG_MTD_COMPLEX_MAPPINGS is not set
471CONFIG_MTD_UCLINUX=y 482CONFIG_MTD_PHYSMAP=y
483# CONFIG_MTD_PHYSMAP_COMPAT is not set
484# CONFIG_MTD_UCLINUX is not set
472# CONFIG_MTD_PLATRAM is not set 485# CONFIG_MTD_PLATRAM is not set
473 486
474# 487#
475# Self-contained MTD device drivers 488# Self-contained MTD device drivers
476# 489#
490# CONFIG_MTD_DATAFLASH is not set
491# CONFIG_MTD_M25P80 is not set
477# CONFIG_MTD_SLRAM is not set 492# CONFIG_MTD_SLRAM is not set
478# CONFIG_MTD_PHRAM is not set 493# CONFIG_MTD_PHRAM is not set
479# CONFIG_MTD_MTDRAM is not set 494# CONFIG_MTD_MTDRAM is not set
@@ -489,36 +504,25 @@ CONFIG_MTD_UCLINUX=y
489# CONFIG_MTD_ONENAND is not set 504# CONFIG_MTD_ONENAND is not set
490 505
491# 506#
492# UBI - Unsorted block images 507# LPDDR flash memory drivers
493# 508#
494# CONFIG_MTD_UBI is not set 509# CONFIG_MTD_LPDDR is not set
495 510
496# 511#
497# Parallel port support 512# UBI - Unsorted block images
498# 513#
514# CONFIG_MTD_UBI is not set
499# CONFIG_PARPORT is not set 515# CONFIG_PARPORT is not set
500 516CONFIG_BLK_DEV=y
501#
502# Plug and Play support
503#
504# CONFIG_PNPACPI is not set
505
506#
507# Block devices
508#
509# CONFIG_BLK_DEV_COW_COMMON is not set 517# CONFIG_BLK_DEV_COW_COMMON is not set
510# CONFIG_BLK_DEV_LOOP is not set 518# CONFIG_BLK_DEV_LOOP is not set
511# CONFIG_BLK_DEV_NBD is not set 519# CONFIG_BLK_DEV_NBD is not set
512CONFIG_BLK_DEV_RAM=y 520# CONFIG_BLK_DEV_RAM is not set
513CONFIG_BLK_DEV_RAM_COUNT=16
514CONFIG_BLK_DEV_RAM_SIZE=4096
515CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
516# CONFIG_CDROM_PKTCDVD is not set 521# CONFIG_CDROM_PKTCDVD is not set
517# CONFIG_ATA_OVER_ETH is not set 522# CONFIG_ATA_OVER_ETH is not set
518 523# CONFIG_BLK_DEV_HD is not set
519# 524# CONFIG_MISC_DEVICES is not set
520# Misc devices 525CONFIG_HAVE_IDE=y
521#
522# CONFIG_IDE is not set 526# CONFIG_IDE is not set
523 527
524# 528#
@@ -526,34 +530,19 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
526# 530#
527# CONFIG_RAID_ATTRS is not set 531# CONFIG_RAID_ATTRS is not set
528# CONFIG_SCSI is not set 532# CONFIG_SCSI is not set
533# CONFIG_SCSI_DMA is not set
529# CONFIG_SCSI_NETLINK is not set 534# CONFIG_SCSI_NETLINK is not set
530# CONFIG_ATA is not set 535# CONFIG_ATA is not set
531
532#
533# Multi-device support (RAID and LVM)
534#
535# CONFIG_MD is not set 536# CONFIG_MD is not set
536
537#
538# Network device support
539#
540CONFIG_NETDEVICES=y 537CONFIG_NETDEVICES=y
538CONFIG_COMPAT_NET_DEV_OPS=y
541# CONFIG_DUMMY is not set 539# CONFIG_DUMMY is not set
542# CONFIG_BONDING is not set 540# CONFIG_MACVLAN is not set
543# CONFIG_EQUALIZER is not set 541# CONFIG_EQUALIZER is not set
544# CONFIG_TUN is not set 542# CONFIG_TUN is not set
545# CONFIG_PHYLIB is not set 543# CONFIG_VETH is not set
546 544# CONFIG_NET_ETHERNET is not set
547#
548# Ethernet (10 or 100Mbit)
549#
550CONFIG_NET_ETHERNET=y
551CONFIG_MII=y
552CONFIG_SMC91X=y
553# CONFIG_SMSC911X is not set
554# CONFIG_DM9000 is not set
555# CONFIG_NETDEV_1000 is not set 545# CONFIG_NETDEV_1000 is not set
556# CONFIG_AX88180 is not set
557# CONFIG_NETDEV_10000 is not set 546# CONFIG_NETDEV_10000 is not set
558 547
559# 548#
@@ -561,22 +550,17 @@ CONFIG_SMC91X=y
561# 550#
562# CONFIG_WLAN_PRE80211 is not set 551# CONFIG_WLAN_PRE80211 is not set
563# CONFIG_WLAN_80211 is not set 552# CONFIG_WLAN_80211 is not set
553
554#
555# Enable WiMAX (Networking options) to see the WiMAX drivers
556#
564# CONFIG_WAN is not set 557# CONFIG_WAN is not set
565# CONFIG_PPP is not set 558# CONFIG_PPP is not set
566# CONFIG_SLIP is not set 559# CONFIG_SLIP is not set
567# CONFIG_SHAPER is not set
568# CONFIG_NETCONSOLE is not set 560# CONFIG_NETCONSOLE is not set
569# CONFIG_NETPOLL is not set 561# CONFIG_NETPOLL is not set
570# CONFIG_NET_POLL_CONTROLLER is not set 562# CONFIG_NET_POLL_CONTROLLER is not set
571
572#
573# ISDN subsystem
574#
575# CONFIG_ISDN is not set 563# CONFIG_ISDN is not set
576
577#
578# Telephony Support
579#
580# CONFIG_PHONE is not set 564# CONFIG_PHONE is not set
581 565
582# 566#
@@ -593,16 +577,15 @@ CONFIG_SMC91X=y
593# 577#
594# Character devices 578# Character devices
595# 579#
596# CONFIG_AD9960 is not set 580# CONFIG_BFIN_DMA_INTERFACE is not set
597# CONFIG_SPI_ADC_BF533 is not set 581# CONFIG_BFIN_PPI is not set
598# CONFIG_BF5xx_PFLAGS is not set 582# CONFIG_BFIN_PPIFCD is not set
599# CONFIG_BF5xx_PPIFCD is not set
600# CONFIG_BFIN_SIMPLE_TIMER is not set 583# CONFIG_BFIN_SIMPLE_TIMER is not set
601# CONFIG_BF5xx_PPI is not set 584# CONFIG_BFIN_SPI_ADC is not set
602CONFIG_BFIN_SPORT=y 585# CONFIG_BFIN_SPORT is not set
603# CONFIG_BFIN_TIMER_LATENCY is not set
604# CONFIG_VT is not set 586# CONFIG_VT is not set
605# CONFIG_DEVKMEM is not set 587# CONFIG_DEVKMEM is not set
588# CONFIG_BFIN_JTAG_COMM is not set
606# CONFIG_SERIAL_NONSTANDARD is not set 589# CONFIG_SERIAL_NONSTANDARD is not set
607 590
608# 591#
@@ -613,6 +596,7 @@ CONFIG_BFIN_SPORT=y
613# 596#
614# Non-8250 serial port support 597# Non-8250 serial port support
615# 598#
599# CONFIG_SERIAL_MAX3100 is not set
616CONFIG_SERIAL_BFIN=y 600CONFIG_SERIAL_BFIN=y
617CONFIG_SERIAL_BFIN_CONSOLE=y 601CONFIG_SERIAL_BFIN_CONSOLE=y
618CONFIG_SERIAL_BFIN_DMA=y 602CONFIG_SERIAL_BFIN_DMA=y
@@ -623,176 +607,141 @@ CONFIG_SERIAL_CORE=y
623CONFIG_SERIAL_CORE_CONSOLE=y 607CONFIG_SERIAL_CORE_CONSOLE=y
624# CONFIG_SERIAL_BFIN_SPORT is not set 608# CONFIG_SERIAL_BFIN_SPORT is not set
625CONFIG_UNIX98_PTYS=y 609CONFIG_UNIX98_PTYS=y
610# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
626# CONFIG_LEGACY_PTYS is not set 611# CONFIG_LEGACY_PTYS is not set
627 612
628# 613#
629# CAN, the car bus and industrial fieldbus 614# CAN, the car bus and industrial fieldbus
630# 615#
631# CONFIG_CAN4LINUX is not set 616# CONFIG_CAN4LINUX is not set
632
633#
634# IPMI
635#
636# CONFIG_IPMI_HANDLER is not set 617# CONFIG_IPMI_HANDLER is not set
637# CONFIG_WATCHDOG is not set
638# CONFIG_HW_RANDOM is not set 618# CONFIG_HW_RANDOM is not set
639# CONFIG_GEN_RTC is not set
640# CONFIG_R3964 is not set 619# CONFIG_R3964 is not set
641# CONFIG_RAW_DRIVER is not set 620# CONFIG_RAW_DRIVER is not set
642
643#
644# TPM devices
645#
646# CONFIG_TCG_TPM is not set 621# CONFIG_TCG_TPM is not set
647# CONFIG_I2C is not set 622# CONFIG_I2C is not set
648 623CONFIG_SPI=y
649CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 624CONFIG_SPI_MASTER=y
650CONFIG_GPIOLIB=y
651CONFIG_GPIO_SYSFS=y
652 625
653# 626#
654# SPI support 627# SPI Master Controller Drivers
655# 628#
656# CONFIG_SPI is not set 629CONFIG_SPI_BFIN=y
657# CONFIG_SPI_MASTER is not set 630# CONFIG_SPI_BFIN_LOCK is not set
631# CONFIG_SPI_BFIN_SPORT is not set
632# CONFIG_SPI_BITBANG is not set
633# CONFIG_SPI_GPIO is not set
658 634
659# 635#
660# Dallas's 1-wire bus 636# SPI Protocol Masters
661# 637#
638# CONFIG_SPI_SPIDEV is not set
639# CONFIG_SPI_TLE62X0 is not set
640CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
641# CONFIG_GPIOLIB is not set
662# CONFIG_W1 is not set 642# CONFIG_W1 is not set
663CONFIG_HWMON=y 643# CONFIG_POWER_SUPPLY is not set
664# CONFIG_HWMON_VID is not set 644# CONFIG_HWMON is not set
665# CONFIG_SENSORS_ABITUGURU is not set 645# CONFIG_THERMAL is not set
666# CONFIG_SENSORS_F71805F is not set 646# CONFIG_THERMAL_HWMON is not set
667# CONFIG_SENSORS_PC87427 is not set 647# CONFIG_WATCHDOG is not set
668# CONFIG_SENSORS_SMSC47M1 is not set 648CONFIG_SSB_POSSIBLE=y
669# CONFIG_SENSORS_SMSC47B397 is not set 649
670# CONFIG_SENSORS_VT1211 is not set 650#
671# CONFIG_SENSORS_W83627HF is not set 651# Sonics Silicon Backplane
672# CONFIG_HWMON_DEBUG_CHIP is not set 652#
653# CONFIG_SSB is not set
673 654
674# 655#
675# Multifunction device drivers 656# Multifunction device drivers
676# 657#
658# CONFIG_MFD_CORE is not set
677# CONFIG_MFD_SM501 is not set 659# CONFIG_MFD_SM501 is not set
660# CONFIG_HTC_PASIC3 is not set
661# CONFIG_MFD_TMIO is not set
662# CONFIG_REGULATOR is not set
678 663
679# 664#
680# Multimedia devices 665# Multimedia devices
681# 666#
667
668#
669# Multimedia core support
670#
682# CONFIG_VIDEO_DEV is not set 671# CONFIG_VIDEO_DEV is not set
683# CONFIG_DVB_CORE is not set 672# CONFIG_VIDEO_MEDIA is not set
684# CONFIG_DAB is not set
685 673
686# 674#
687# Graphics support 675# Multimedia drivers
688# 676#
689# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 677# CONFIG_DAB is not set
690 678
691# 679#
692# Display device support 680# Graphics support
693# 681#
694# CONFIG_DISPLAY_SUPPORT is not set
695# CONFIG_VGASTATE is not set 682# CONFIG_VGASTATE is not set
683# CONFIG_VIDEO_OUTPUT_CONTROL is not set
696# CONFIG_FB is not set 684# CONFIG_FB is not set
685# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
697 686
698# 687#
699# Sound 688# Display device support
700# 689#
690# CONFIG_DISPLAY_SUPPORT is not set
701# CONFIG_SOUND is not set 691# CONFIG_SOUND is not set
692# CONFIG_USB_SUPPORT is not set
693CONFIG_MMC=y
694# CONFIG_MMC_DEBUG is not set
695# CONFIG_MMC_UNSAFE_RESUME is not set
702 696
703# 697#
704# USB support 698# MMC/SD/SDIO Card Drivers
705# 699#
706CONFIG_USB_ARCH_HAS_HCD=y 700CONFIG_MMC_BLOCK=y
707# CONFIG_USB_ARCH_HAS_OHCI is not set 701# CONFIG_MMC_BLOCK_BOUNCE is not set
708# CONFIG_USB_ARCH_HAS_EHCI is not set 702# CONFIG_SDIO_UART is not set
709# CONFIG_USB is not set 703# CONFIG_MMC_TEST is not set
710 704
711# 705#
712# Enable Host or Gadget support to see Inventra options 706# MMC/SD/SDIO Host Controller Drivers
713#
714
715#
716# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
717#
718
719#
720# USB Gadget Support
721#
722# CONFIG_USB_GADGET is not set
723# CONFIG_MMC is not set
724
725#
726# LED devices
727# 707#
708# CONFIG_MMC_SDHCI is not set
709CONFIG_MMC_SPI=m
710# CONFIG_MEMSTICK is not set
728# CONFIG_NEW_LEDS is not set 711# CONFIG_NEW_LEDS is not set
729 712# CONFIG_ACCESSIBILITY is not set
730#
731# LED drivers
732#
733
734#
735# LED Triggers
736#
737
738#
739# InfiniBand support
740#
741
742#
743# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
744#
745
746#
747# Real Time Clock
748#
749# CONFIG_RTC_CLASS is not set 713# CONFIG_RTC_CLASS is not set
750 714# CONFIG_DMADEVICES is not set
751# 715# CONFIG_AUXDISPLAY is not set
752# DMA Engine support 716# CONFIG_UIO is not set
753# 717# CONFIG_STAGING is not set
754# CONFIG_DMA_ENGINE is not set
755
756#
757# DMA Clients
758#
759
760#
761# DMA Devices
762#
763
764#
765# PBX support
766#
767# CONFIG_PBX is not set
768 718
769# 719#
770# File systems 720# File systems
771# 721#
772CONFIG_EXT2_FS=y 722# CONFIG_EXT2_FS is not set
773CONFIG_EXT2_FS_XATTR=y
774# CONFIG_EXT2_FS_POSIX_ACL is not set
775# CONFIG_EXT2_FS_SECURITY is not set
776# CONFIG_EXT3_FS is not set 723# CONFIG_EXT3_FS is not set
777# CONFIG_EXT4DEV_FS is not set 724# CONFIG_EXT4_FS is not set
778CONFIG_FS_MBCACHE=y
779# CONFIG_REISERFS_FS is not set 725# CONFIG_REISERFS_FS is not set
780# CONFIG_JFS_FS is not set 726# CONFIG_JFS_FS is not set
781# CONFIG_FS_POSIX_ACL is not set 727# CONFIG_FS_POSIX_ACL is not set
782# CONFIG_XFS_FS is not set 728# CONFIG_XFS_FS is not set
783# CONFIG_GFS2_FS is not set
784# CONFIG_OCFS2_FS is not set 729# CONFIG_OCFS2_FS is not set
785# CONFIG_MINIX_FS is not set 730# CONFIG_BTRFS_FS is not set
786# CONFIG_ROMFS_FS is not set 731CONFIG_FILE_LOCKING=y
787CONFIG_INOTIFY=y
788CONFIG_INOTIFY_USER=y
789# CONFIG_QUOTA is not set
790# CONFIG_DNOTIFY is not set 732# CONFIG_DNOTIFY is not set
733# CONFIG_INOTIFY is not set
734# CONFIG_QUOTA is not set
791# CONFIG_AUTOFS_FS is not set 735# CONFIG_AUTOFS_FS is not set
792# CONFIG_AUTOFS4_FS is not set 736# CONFIG_AUTOFS4_FS is not set
793# CONFIG_FUSE_FS is not set 737# CONFIG_FUSE_FS is not set
794 738
795# 739#
740# Caches
741#
742# CONFIG_FSCACHE is not set
743
744#
796# CD-ROM/DVD Filesystems 745# CD-ROM/DVD Filesystems
797# 746#
798# CONFIG_ISO9660_FS is not set 747# CONFIG_ISO9660_FS is not set
@@ -801,8 +750,11 @@ CONFIG_INOTIFY_USER=y
801# 750#
802# DOS/FAT/NT Filesystems 751# DOS/FAT/NT Filesystems
803# 752#
753CONFIG_FAT_FS=y
804# CONFIG_MSDOS_FS is not set 754# CONFIG_MSDOS_FS is not set
805# CONFIG_VFAT_FS is not set 755CONFIG_VFAT_FS=y
756CONFIG_FAT_DEFAULT_CODEPAGE=437
757CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
806# CONFIG_NTFS_FS is not set 758# CONFIG_NTFS_FS is not set
807 759
808# 760#
@@ -813,12 +765,8 @@ CONFIG_PROC_SYSCTL=y
813CONFIG_SYSFS=y 765CONFIG_SYSFS=y
814# CONFIG_TMPFS is not set 766# CONFIG_TMPFS is not set
815# CONFIG_HUGETLB_PAGE is not set 767# CONFIG_HUGETLB_PAGE is not set
816CONFIG_RAMFS=y
817# CONFIG_CONFIGFS_FS is not set 768# CONFIG_CONFIGFS_FS is not set
818 769CONFIG_MISC_FILESYSTEMS=y
819#
820# Miscellaneous filesystems
821#
822# CONFIG_ADFS_FS is not set 770# CONFIG_ADFS_FS is not set
823# CONFIG_AFFS_FS is not set 771# CONFIG_AFFS_FS is not set
824# CONFIG_HFS_FS is not set 772# CONFIG_HFS_FS is not set
@@ -826,60 +774,106 @@ CONFIG_RAMFS=y
826# CONFIG_BEFS_FS is not set 774# CONFIG_BEFS_FS is not set
827# CONFIG_BFS_FS is not set 775# CONFIG_BFS_FS is not set
828# CONFIG_EFS_FS is not set 776# CONFIG_EFS_FS is not set
829# CONFIG_YAFFS_FS is not set
830# CONFIG_JFFS2_FS is not set 777# CONFIG_JFFS2_FS is not set
831# CONFIG_CRAMFS is not set 778# CONFIG_CRAMFS is not set
779# CONFIG_SQUASHFS is not set
832# CONFIG_VXFS_FS is not set 780# CONFIG_VXFS_FS is not set
781# CONFIG_MINIX_FS is not set
782# CONFIG_OMFS_FS is not set
833# CONFIG_HPFS_FS is not set 783# CONFIG_HPFS_FS is not set
834# CONFIG_QNX4FS_FS is not set 784# CONFIG_QNX4FS_FS is not set
785# CONFIG_ROMFS_FS is not set
835# CONFIG_SYSV_FS is not set 786# CONFIG_SYSV_FS is not set
836# CONFIG_UFS_FS is not set 787# CONFIG_UFS_FS is not set
837 788# CONFIG_NILFS2_FS is not set
838# 789# CONFIG_NETWORK_FILESYSTEMS is not set
839# Network File Systems
840#
841# CONFIG_NFS_FS is not set
842# CONFIG_NFSD is not set
843# CONFIG_SMB_FS is not set
844# CONFIG_CIFS is not set
845# CONFIG_NCP_FS is not set
846# CONFIG_CODA_FS is not set
847# CONFIG_AFS_FS is not set
848# CONFIG_9P_FS is not set
849 790
850# 791#
851# Partition Types 792# Partition Types
852# 793#
853# CONFIG_PARTITION_ADVANCED is not set 794# CONFIG_PARTITION_ADVANCED is not set
854CONFIG_MSDOS_PARTITION=y 795CONFIG_MSDOS_PARTITION=y
855 796CONFIG_NLS=y
856# 797CONFIG_NLS_DEFAULT="iso8859-1"
857# Native Language Support 798CONFIG_NLS_CODEPAGE_437=y
858# 799# CONFIG_NLS_CODEPAGE_737 is not set
859# CONFIG_NLS is not set 800# CONFIG_NLS_CODEPAGE_775 is not set
860 801# CONFIG_NLS_CODEPAGE_850 is not set
861# 802# CONFIG_NLS_CODEPAGE_852 is not set
862# Distributed Lock Manager 803# CONFIG_NLS_CODEPAGE_855 is not set
863# 804# CONFIG_NLS_CODEPAGE_857 is not set
864# CONFIG_DLM is not set 805# CONFIG_NLS_CODEPAGE_860 is not set
865 806# CONFIG_NLS_CODEPAGE_861 is not set
866# 807# CONFIG_NLS_CODEPAGE_862 is not set
867# Profiling support 808# CONFIG_NLS_CODEPAGE_863 is not set
868# 809# CONFIG_NLS_CODEPAGE_864 is not set
869# CONFIG_PROFILING is not set 810# CONFIG_NLS_CODEPAGE_865 is not set
811# CONFIG_NLS_CODEPAGE_866 is not set
812# CONFIG_NLS_CODEPAGE_869 is not set
813# CONFIG_NLS_CODEPAGE_936 is not set
814# CONFIG_NLS_CODEPAGE_950 is not set
815# CONFIG_NLS_CODEPAGE_932 is not set
816# CONFIG_NLS_CODEPAGE_949 is not set
817# CONFIG_NLS_CODEPAGE_874 is not set
818# CONFIG_NLS_ISO8859_8 is not set
819# CONFIG_NLS_CODEPAGE_1250 is not set
820# CONFIG_NLS_CODEPAGE_1251 is not set
821# CONFIG_NLS_ASCII is not set
822CONFIG_NLS_ISO8859_1=y
823# CONFIG_NLS_ISO8859_2 is not set
824# CONFIG_NLS_ISO8859_3 is not set
825# CONFIG_NLS_ISO8859_4 is not set
826# CONFIG_NLS_ISO8859_5 is not set
827# CONFIG_NLS_ISO8859_6 is not set
828# CONFIG_NLS_ISO8859_7 is not set
829# CONFIG_NLS_ISO8859_9 is not set
830# CONFIG_NLS_ISO8859_13 is not set
831# CONFIG_NLS_ISO8859_14 is not set
832# CONFIG_NLS_ISO8859_15 is not set
833# CONFIG_NLS_KOI8_R is not set
834# CONFIG_NLS_KOI8_U is not set
835# CONFIG_NLS_UTF8 is not set
870 836
871# 837#
872# Kernel hacking 838# Kernel hacking
873# 839#
874# CONFIG_PRINTK_TIME is not set 840# CONFIG_PRINTK_TIME is not set
841CONFIG_ENABLE_WARN_DEPRECATED=y
875CONFIG_ENABLE_MUST_CHECK=y 842CONFIG_ENABLE_MUST_CHECK=y
843CONFIG_FRAME_WARN=1024
876# CONFIG_MAGIC_SYSRQ is not set 844# CONFIG_MAGIC_SYSRQ is not set
877# CONFIG_UNUSED_SYMBOLS is not set 845# CONFIG_UNUSED_SYMBOLS is not set
878CONFIG_DEBUG_FS=y 846CONFIG_DEBUG_FS=y
879# CONFIG_HEADERS_CHECK is not set 847# CONFIG_HEADERS_CHECK is not set
848CONFIG_DEBUG_SECTION_MISMATCH=y
880# CONFIG_DEBUG_KERNEL is not set 849# CONFIG_DEBUG_KERNEL is not set
881CONFIG_DEBUG_BUGVERBOSE=y 850# CONFIG_DEBUG_BUGVERBOSE is not set
851# CONFIG_DEBUG_MEMORY_INIT is not set
852# CONFIG_RCU_CPU_STALL_DETECTOR is not set
853CONFIG_HAVE_FUNCTION_TRACER=y
854CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
855CONFIG_TRACING_SUPPORT=y
856
857#
858# Tracers
859#
860# CONFIG_FUNCTION_TRACER is not set
861# CONFIG_IRQSOFF_TRACER is not set
862# CONFIG_SCHED_TRACER is not set
863# CONFIG_CONTEXT_SWITCH_TRACER is not set
864# CONFIG_EVENT_TRACER is not set
865# CONFIG_BOOT_TRACER is not set
866# CONFIG_TRACE_BRANCH_PROFILING is not set
867# CONFIG_STACK_TRACER is not set
868# CONFIG_KMEMTRACE is not set
869# CONFIG_WORKQUEUE_TRACER is not set
870# CONFIG_BLK_DEV_IO_TRACE is not set
871# CONFIG_DYNAMIC_DEBUG is not set
872# CONFIG_SAMPLES is not set
873CONFIG_HAVE_ARCH_KGDB=y
874CONFIG_DEBUG_VERBOSE=y
882CONFIG_DEBUG_MMRS=y 875CONFIG_DEBUG_MMRS=y
876# CONFIG_DEBUG_DOUBLEFAULT is not set
883CONFIG_DEBUG_HUNT_FOR_ZERO=y 877CONFIG_DEBUG_HUNT_FOR_ZERO=y
884CONFIG_DEBUG_BFIN_HWTRACE_ON=y 878CONFIG_DEBUG_BFIN_HWTRACE_ON=y
885CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y 879CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
@@ -888,34 +882,39 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
888CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 882CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
889# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 883# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
890# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 884# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
891# CONFIG_EARLY_PRINTK is not set 885CONFIG_EARLY_PRINTK=y
892CONFIG_CPLB_INFO=y 886CONFIG_CPLB_INFO=y
893CONFIG_ACCESS_CHECK=y 887CONFIG_ACCESS_CHECK=y
888# CONFIG_BFIN_ISRAM_SELF_TEST is not set
894 889
895# 890#
896# Security options 891# Security options
897# 892#
898# CONFIG_KEYS is not set 893# CONFIG_KEYS is not set
899CONFIG_SECURITY=y 894CONFIG_SECURITY=y
895# CONFIG_SECURITYFS is not set
900# CONFIG_SECURITY_NETWORK is not set 896# CONFIG_SECURITY_NETWORK is not set
901CONFIG_SECURITY_CAPABILITIES=y 897# CONFIG_SECURITY_PATH is not set
902 898# CONFIG_SECURITY_FILE_CAPABILITIES is not set
903# 899# CONFIG_SECURITY_TOMOYO is not set
904# Cryptographic options
905#
906# CONFIG_CRYPTO is not set 900# CONFIG_CRYPTO is not set
901# CONFIG_BINARY_PRINTF is not set
907 902
908# 903#
909# Library routines 904# Library routines
910# 905#
911CONFIG_BITREVERSE=y 906CONFIG_BITREVERSE=y
912CONFIG_CRC_CCITT=m 907CONFIG_GENERIC_FIND_LAST_BIT=y
908CONFIG_CRC_CCITT=y
913# CONFIG_CRC16 is not set 909# CONFIG_CRC16 is not set
914# CONFIG_CRC_ITU_T is not set 910# CONFIG_CRC_T10DIF is not set
911CONFIG_CRC_ITU_T=y
915CONFIG_CRC32=y 912CONFIG_CRC32=y
913CONFIG_CRC7=y
916# CONFIG_LIBCRC32C is not set 914# CONFIG_LIBCRC32C is not set
917CONFIG_ZLIB_INFLATE=y 915CONFIG_ZLIB_INFLATE=y
918CONFIG_PLIST=y 916CONFIG_DECOMPRESS_LZMA=y
919CONFIG_HAS_IOMEM=y 917CONFIG_HAS_IOMEM=y
920CONFIG_HAS_IOPORT=y 918CONFIG_HAS_IOPORT=y
921CONFIG_HAS_DMA=y 919CONFIG_HAS_DMA=y
920CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/CM-BF537E_defconfig b/arch/blackfin/configs/CM-BF537E_defconfig
index d74b6f4db35d..22e565c51d66 100644
--- a/arch/blackfin/configs/CM-BF537E_defconfig
+++ b/arch/blackfin/configs/CM-BF537E_defconfig
@@ -1,13 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28.10 3# Linux kernel version: 2.6.30.5
4# Wed Jun 3 06:27:41 2009
5# 4#
6# CONFIG_MMU is not set 5# CONFIG_MMU is not set
7# CONFIG_FPU is not set 6# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
@@ -16,6 +16,9 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
17CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20 23
21# 24#
@@ -26,21 +29,40 @@ CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
27CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
29CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
30CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
33# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
34# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
35CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
36CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
37CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
40# CONFIG_SYSFS_DEPRECATED_V2 is not set 58# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
43# CONFIG_BLK_DEV_INITRD is not set 61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y 67CONFIG_SYSCTL=y
46CONFIG_ANON_INODES=y 68CONFIG_ANON_INODES=y
@@ -49,7 +71,8 @@ CONFIG_EMBEDDED=y
49# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
50CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
51# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
52# CONFIG_HOTPLUG is not set 74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y
53CONFIG_PRINTK=y 76CONFIG_PRINTK=y
54CONFIG_BUG=y 77CONFIG_BUG=y
55# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
@@ -65,12 +88,13 @@ CONFIG_COMPAT_BRK=y
65CONFIG_SLAB=y 88CONFIG_SLAB=y
66# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
67# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
68# CONFIG_PROFILING is not set 92# CONFIG_PROFILING is not set
69# CONFIG_MARKERS is not set 93# CONFIG_MARKERS is not set
70CONFIG_HAVE_OPROFILE=y 94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
71# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
72CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
73CONFIG_TINY_SHMEM=y
74CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
75CONFIG_MODULES=y 99CONFIG_MODULES=y
76# CONFIG_MODULE_FORCE_LOAD is not set 100# CONFIG_MODULE_FORCE_LOAD is not set
@@ -78,11 +102,8 @@ CONFIG_MODULE_UNLOAD=y
78# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
79# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
80# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
81CONFIG_KMOD=y
82CONFIG_BLOCK=y 105CONFIG_BLOCK=y
83# CONFIG_LBD is not set 106# CONFIG_LBD is not set
84# CONFIG_BLK_DEV_IO_TRACE is not set
85# CONFIG_LSF is not set
86# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
87# CONFIG_BLK_DEV_INTEGRITY is not set 108# CONFIG_BLK_DEV_INTEGRITY is not set
88 109
@@ -98,7 +119,6 @@ CONFIG_IOSCHED_CFQ=y
98# CONFIG_DEFAULT_CFQ is not set 119# CONFIG_DEFAULT_CFQ is not set
99CONFIG_DEFAULT_NOOP=y 120CONFIG_DEFAULT_NOOP=y
100CONFIG_DEFAULT_IOSCHED="noop" 121CONFIG_DEFAULT_IOSCHED="noop"
101CONFIG_CLASSIC_RCU=y
102CONFIG_PREEMPT_NONE=y 122CONFIG_PREEMPT_NONE=y
103# CONFIG_PREEMPT_VOLUNTARY is not set 123# CONFIG_PREEMPT_VOLUNTARY is not set
104# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
@@ -181,7 +201,8 @@ CONFIG_IRQ_MEM_DMA1=13
181CONFIG_IRQ_WATCH=13 201CONFIG_IRQ_WATCH=13
182CONFIG_IRQ_SPI=10 202CONFIG_IRQ_SPI=10
183# CONFIG_BFIN537_STAMP is not set 203# CONFIG_BFIN537_STAMP is not set
184CONFIG_BFIN537_BLUETECHNIX_CM=y 204CONFIG_BFIN537_BLUETECHNIX_CM_E=y
205# CONFIG_BFIN537_BLUETECHNIX_CM_U is not set
185# CONFIG_BFIN537_BLUETECHNIX_TCM is not set 206# CONFIG_BFIN537_BLUETECHNIX_TCM is not set
186# CONFIG_PNAV10 is not set 207# CONFIG_PNAV10 is not set
187# CONFIG_CAMSIG_MINOTAUR is not set 208# CONFIG_CAMSIG_MINOTAUR is not set
@@ -283,10 +304,12 @@ CONFIG_FLATMEM=y
283CONFIG_FLAT_NODE_MEM_MAP=y 304CONFIG_FLAT_NODE_MEM_MAP=y
284CONFIG_PAGEFLAGS_EXTENDED=y 305CONFIG_PAGEFLAGS_EXTENDED=y
285CONFIG_SPLIT_PTLOCK_CPUS=4 306CONFIG_SPLIT_PTLOCK_CPUS=4
286# CONFIG_RESOURCES_64BIT is not set
287# CONFIG_PHYS_ADDR_T_64BIT is not set 307# CONFIG_PHYS_ADDR_T_64BIT is not set
288CONFIG_ZONE_DMA_FLAG=1 308CONFIG_ZONE_DMA_FLAG=1
289CONFIG_VIRT_TO_BUS=y 309CONFIG_VIRT_TO_BUS=y
310CONFIG_UNEVICTABLE_LRU=y
311CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
312CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
290# CONFIG_BFIN_GPTIMERS is not set 313# CONFIG_BFIN_GPTIMERS is not set
291# CONFIG_DMA_UNCACHED_4M is not set 314# CONFIG_DMA_UNCACHED_4M is not set
292# CONFIG_DMA_UNCACHED_2M is not set 315# CONFIG_DMA_UNCACHED_2M is not set
@@ -297,10 +320,9 @@ CONFIG_DMA_UNCACHED_1M=y
297# Cache Support 320# Cache Support
298# 321#
299CONFIG_BFIN_ICACHE=y 322CONFIG_BFIN_ICACHE=y
300# CONFIG_BFIN_ICACHE_LOCK is not set 323CONFIG_BFIN_EXTMEM_ICACHEABLE=y
301CONFIG_BFIN_DCACHE=y 324CONFIG_BFIN_DCACHE=y
302# CONFIG_BFIN_DCACHE_BANKA is not set 325# CONFIG_BFIN_DCACHE_BANKA is not set
303CONFIG_BFIN_EXTMEM_ICACHEABLE=y
304CONFIG_BFIN_EXTMEM_DCACHEABLE=y 326CONFIG_BFIN_EXTMEM_DCACHEABLE=y
305CONFIG_BFIN_EXTMEM_WRITEBACK=y 327CONFIG_BFIN_EXTMEM_WRITEBACK=y
306# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 328# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
@@ -311,7 +333,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
311# CONFIG_MPU is not set 333# CONFIG_MPU is not set
312 334
313# 335#
314# Asynchonous Memory Configuration 336# Asynchronous Memory Configuration
315# 337#
316 338
317# 339#
@@ -337,6 +359,7 @@ CONFIG_BANK_3=0xFFC2
337# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 359# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
338# 360#
339# CONFIG_ARCH_SUPPORTS_MSI is not set 361# CONFIG_ARCH_SUPPORTS_MSI is not set
362# CONFIG_PCCARD is not set
340 363
341# 364#
342# Executable file formats 365# Executable file formats
@@ -366,11 +389,6 @@ CONFIG_NET=y
366CONFIG_PACKET=y 389CONFIG_PACKET=y
367# CONFIG_PACKET_MMAP is not set 390# CONFIG_PACKET_MMAP is not set
368CONFIG_UNIX=y 391CONFIG_UNIX=y
369CONFIG_XFRM=y
370# CONFIG_XFRM_USER is not set
371# CONFIG_XFRM_SUB_POLICY is not set
372# CONFIG_XFRM_MIGRATE is not set
373# CONFIG_XFRM_STATISTICS is not set
374# CONFIG_NET_KEY is not set 392# CONFIG_NET_KEY is not set
375CONFIG_INET=y 393CONFIG_INET=y
376# CONFIG_IP_MULTICAST is not set 394# CONFIG_IP_MULTICAST is not set
@@ -394,7 +412,6 @@ CONFIG_IP_PNP=y
394# CONFIG_INET_XFRM_MODE_BEET is not set 412# CONFIG_INET_XFRM_MODE_BEET is not set
395# CONFIG_INET_LRO is not set 413# CONFIG_INET_LRO is not set
396# CONFIG_INET_DIAG is not set 414# CONFIG_INET_DIAG is not set
397CONFIG_INET_TCP_DIAG=y
398# CONFIG_TCP_CONG_ADVANCED is not set 415# CONFIG_TCP_CONG_ADVANCED is not set
399CONFIG_TCP_CONG_CUBIC=y 416CONFIG_TCP_CONG_CUBIC=y
400CONFIG_DEFAULT_TCP_CONG="cubic" 417CONFIG_DEFAULT_TCP_CONG="cubic"
@@ -418,7 +435,9 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
418# CONFIG_LAPB is not set 435# CONFIG_LAPB is not set
419# CONFIG_ECONET is not set 436# CONFIG_ECONET is not set
420# CONFIG_WAN_ROUTER is not set 437# CONFIG_WAN_ROUTER is not set
438# CONFIG_PHONET is not set
421# CONFIG_NET_SCHED is not set 439# CONFIG_NET_SCHED is not set
440# CONFIG_DCB is not set
422 441
423# 442#
424# Network testing 443# Network testing
@@ -429,8 +448,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
429# CONFIG_IRDA is not set 448# CONFIG_IRDA is not set
430# CONFIG_BT is not set 449# CONFIG_BT is not set
431# CONFIG_AF_RXRPC is not set 450# CONFIG_AF_RXRPC is not set
432# CONFIG_PHONET is not set
433# CONFIG_WIRELESS is not set 451# CONFIG_WIRELESS is not set
452# CONFIG_WIMAX is not set
434# CONFIG_RFKILL is not set 453# CONFIG_RFKILL is not set
435# CONFIG_NET_9P is not set 454# CONFIG_NET_9P is not set
436 455
@@ -441,16 +460,21 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
441# 460#
442# Generic Driver Options 461# Generic Driver Options
443# 462#
463CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
444CONFIG_STANDALONE=y 464CONFIG_STANDALONE=y
445CONFIG_PREVENT_FIRMWARE_BUILD=y 465CONFIG_PREVENT_FIRMWARE_BUILD=y
466CONFIG_FW_LOADER=y
467CONFIG_FIRMWARE_IN_KERNEL=y
468CONFIG_EXTRA_FIRMWARE=""
446# CONFIG_SYS_HYPERVISOR is not set 469# CONFIG_SYS_HYPERVISOR is not set
447# CONFIG_CONNECTOR is not set 470# CONFIG_CONNECTOR is not set
448CONFIG_MTD=y 471CONFIG_MTD=y
449# CONFIG_MTD_DEBUG is not set 472# CONFIG_MTD_DEBUG is not set
473# CONFIG_MTD_TESTS is not set
450# CONFIG_MTD_CONCAT is not set 474# CONFIG_MTD_CONCAT is not set
451CONFIG_MTD_PARTITIONS=y 475CONFIG_MTD_PARTITIONS=y
452# CONFIG_MTD_REDBOOT_PARTS is not set 476# CONFIG_MTD_REDBOOT_PARTS is not set
453# CONFIG_MTD_CMDLINE_PARTS is not set 477CONFIG_MTD_CMDLINE_PARTS=y
454# CONFIG_MTD_AR7_PARTS is not set 478# CONFIG_MTD_AR7_PARTS is not set
455 479
456# 480#
@@ -486,22 +510,26 @@ CONFIG_MTD_CFI_I2=y
486CONFIG_MTD_CFI_INTELEXT=y 510CONFIG_MTD_CFI_INTELEXT=y
487# CONFIG_MTD_CFI_AMDSTD is not set 511# CONFIG_MTD_CFI_AMDSTD is not set
488# CONFIG_MTD_CFI_STAA is not set 512# CONFIG_MTD_CFI_STAA is not set
513# CONFIG_MTD_PSD4256G is not set
489CONFIG_MTD_CFI_UTIL=y 514CONFIG_MTD_CFI_UTIL=y
490CONFIG_MTD_RAM=y 515CONFIG_MTD_RAM=y
491# CONFIG_MTD_ROM is not set 516CONFIG_MTD_ROM=m
492# CONFIG_MTD_ABSENT is not set 517# CONFIG_MTD_ABSENT is not set
493 518
494# 519#
495# Mapping drivers for chip access 520# Mapping drivers for chip access
496# 521#
497CONFIG_MTD_COMPLEX_MAPPINGS=y 522CONFIG_MTD_COMPLEX_MAPPINGS=y
523# CONFIG_MTD_PHYSMAP is not set
498CONFIG_MTD_GPIO_ADDR=y 524CONFIG_MTD_GPIO_ADDR=y
499CONFIG_MTD_UCLINUX=y 525# CONFIG_MTD_UCLINUX is not set
500# CONFIG_MTD_PLATRAM is not set 526# CONFIG_MTD_PLATRAM is not set
501 527
502# 528#
503# Self-contained MTD device drivers 529# Self-contained MTD device drivers
504# 530#
531# CONFIG_MTD_DATAFLASH is not set
532# CONFIG_MTD_M25P80 is not set
505# CONFIG_MTD_SLRAM is not set 533# CONFIG_MTD_SLRAM is not set
506# CONFIG_MTD_PHRAM is not set 534# CONFIG_MTD_PHRAM is not set
507# CONFIG_MTD_MTDRAM is not set 535# CONFIG_MTD_MTDRAM is not set
@@ -517,6 +545,11 @@ CONFIG_MTD_UCLINUX=y
517# CONFIG_MTD_ONENAND is not set 545# CONFIG_MTD_ONENAND is not set
518 546
519# 547#
548# LPDDR flash memory drivers
549#
550# CONFIG_MTD_LPDDR is not set
551
552#
520# UBI - Unsorted block images 553# UBI - Unsorted block images
521# 554#
522# CONFIG_MTD_UBI is not set 555# CONFIG_MTD_UBI is not set
@@ -533,9 +566,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
533# CONFIG_ATA_OVER_ETH is not set 566# CONFIG_ATA_OVER_ETH is not set
534# CONFIG_BLK_DEV_HD is not set 567# CONFIG_BLK_DEV_HD is not set
535CONFIG_MISC_DEVICES=y 568CONFIG_MISC_DEVICES=y
536# CONFIG_EEPROM_93CX6 is not set
537# CONFIG_ENCLOSURE_SERVICES is not set 569# CONFIG_ENCLOSURE_SERVICES is not set
538# CONFIG_C2PORT is not set 570# CONFIG_C2PORT is not set
571
572#
573# EEPROM support
574#
575# CONFIG_EEPROM_AT25 is not set
576# CONFIG_EEPROM_93CX6 is not set
539CONFIG_HAVE_IDE=y 577CONFIG_HAVE_IDE=y
540# CONFIG_IDE is not set 578# CONFIG_IDE is not set
541 579
@@ -549,6 +587,7 @@ CONFIG_HAVE_IDE=y
549# CONFIG_ATA is not set 587# CONFIG_ATA is not set
550# CONFIG_MD is not set 588# CONFIG_MD is not set
551CONFIG_NETDEVICES=y 589CONFIG_NETDEVICES=y
590CONFIG_COMPAT_NET_DEV_OPS=y
552# CONFIG_DUMMY is not set 591# CONFIG_DUMMY is not set
553# CONFIG_BONDING is not set 592# CONFIG_BONDING is not set
554# CONFIG_MACVLAN is not set 593# CONFIG_MACVLAN is not set
@@ -570,6 +609,9 @@ CONFIG_PHYLIB=y
570# CONFIG_BROADCOM_PHY is not set 609# CONFIG_BROADCOM_PHY is not set
571# CONFIG_ICPLUS_PHY is not set 610# CONFIG_ICPLUS_PHY is not set
572# CONFIG_REALTEK_PHY is not set 611# CONFIG_REALTEK_PHY is not set
612# CONFIG_NATIONAL_PHY is not set
613# CONFIG_STE10XP is not set
614# CONFIG_LSI_ET1011C_PHY is not set
573# CONFIG_FIXED_PHY is not set 615# CONFIG_FIXED_PHY is not set
574# CONFIG_MDIO_BITBANG is not set 616# CONFIG_MDIO_BITBANG is not set
575CONFIG_NET_ETHERNET=y 617CONFIG_NET_ETHERNET=y
@@ -580,8 +622,11 @@ CONFIG_BFIN_TX_DESC_NUM=10
580CONFIG_BFIN_RX_DESC_NUM=20 622CONFIG_BFIN_RX_DESC_NUM=20
581# CONFIG_BFIN_MAC_RMII is not set 623# CONFIG_BFIN_MAC_RMII is not set
582# CONFIG_SMC91X is not set 624# CONFIG_SMC91X is not set
583# CONFIG_SMSC911X is not set
584# CONFIG_DM9000 is not set 625# CONFIG_DM9000 is not set
626# CONFIG_ENC28J60 is not set
627# CONFIG_ETHOC is not set
628# CONFIG_SMSC911X is not set
629# CONFIG_DNET is not set
585# CONFIG_IBM_NEW_EMAC_ZMII is not set 630# CONFIG_IBM_NEW_EMAC_ZMII is not set
586# CONFIG_IBM_NEW_EMAC_RGMII is not set 631# CONFIG_IBM_NEW_EMAC_RGMII is not set
587# CONFIG_IBM_NEW_EMAC_TAH is not set 632# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -598,7 +643,10 @@ CONFIG_BFIN_RX_DESC_NUM=20
598# 643#
599# CONFIG_WLAN_PRE80211 is not set 644# CONFIG_WLAN_PRE80211 is not set
600# CONFIG_WLAN_80211 is not set 645# CONFIG_WLAN_80211 is not set
601# CONFIG_IWLWIFI_LEDS is not set 646
647#
648# Enable WiMAX (Networking options) to see the WiMAX drivers
649#
602# CONFIG_WAN is not set 650# CONFIG_WAN is not set
603# CONFIG_PPP is not set 651# CONFIG_PPP is not set
604# CONFIG_SLIP is not set 652# CONFIG_SLIP is not set
@@ -622,15 +670,12 @@ CONFIG_BFIN_RX_DESC_NUM=20
622# 670#
623# Character devices 671# Character devices
624# 672#
625# CONFIG_AD9960 is not set
626CONFIG_BFIN_DMA_INTERFACE=m 673CONFIG_BFIN_DMA_INTERFACE=m
627# CONFIG_BFIN_PPI is not set 674# CONFIG_BFIN_PPI is not set
628# CONFIG_BFIN_PPIFCD is not set 675# CONFIG_BFIN_PPIFCD is not set
629# CONFIG_BFIN_SIMPLE_TIMER is not set 676# CONFIG_BFIN_SIMPLE_TIMER is not set
630# CONFIG_BFIN_SPI_ADC is not set 677# CONFIG_BFIN_SPI_ADC is not set
631CONFIG_BFIN_SPORT=y 678CONFIG_BFIN_SPORT=y
632# CONFIG_BFIN_TIMER_LATENCY is not set
633# CONFIG_SIMPLE_GPIO is not set
634# CONFIG_VT is not set 679# CONFIG_VT is not set
635# CONFIG_DEVKMEM is not set 680# CONFIG_DEVKMEM is not set
636# CONFIG_BFIN_JTAG_COMM is not set 681# CONFIG_BFIN_JTAG_COMM is not set
@@ -644,6 +689,7 @@ CONFIG_BFIN_SPORT=y
644# 689#
645# Non-8250 serial port support 690# Non-8250 serial port support
646# 691#
692# CONFIG_SERIAL_MAX3100 is not set
647CONFIG_SERIAL_BFIN=y 693CONFIG_SERIAL_BFIN=y
648CONFIG_SERIAL_BFIN_CONSOLE=y 694CONFIG_SERIAL_BFIN_CONSOLE=y
649CONFIG_SERIAL_BFIN_DMA=y 695CONFIG_SERIAL_BFIN_DMA=y
@@ -656,6 +702,7 @@ CONFIG_SERIAL_CORE=y
656CONFIG_SERIAL_CORE_CONSOLE=y 702CONFIG_SERIAL_CORE_CONSOLE=y
657# CONFIG_SERIAL_BFIN_SPORT is not set 703# CONFIG_SERIAL_BFIN_SPORT is not set
658CONFIG_UNIX98_PTYS=y 704CONFIG_UNIX98_PTYS=y
705# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
659# CONFIG_LEGACY_PTYS is not set 706# CONFIG_LEGACY_PTYS is not set
660 707
661# 708#
@@ -668,7 +715,23 @@ CONFIG_UNIX98_PTYS=y
668# CONFIG_RAW_DRIVER is not set 715# CONFIG_RAW_DRIVER is not set
669# CONFIG_TCG_TPM is not set 716# CONFIG_TCG_TPM is not set
670# CONFIG_I2C is not set 717# CONFIG_I2C is not set
671# CONFIG_SPI is not set 718CONFIG_SPI=y
719CONFIG_SPI_MASTER=y
720
721#
722# SPI Master Controller Drivers
723#
724CONFIG_SPI_BFIN=y
725# CONFIG_SPI_BFIN_LOCK is not set
726# CONFIG_SPI_BFIN_SPORT is not set
727# CONFIG_SPI_BITBANG is not set
728# CONFIG_SPI_GPIO is not set
729
730#
731# SPI Protocol Masters
732#
733# CONFIG_SPI_SPIDEV is not set
734# CONFIG_SPI_TLE62X0 is not set
672CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 735CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
673CONFIG_GPIOLIB=y 736CONFIG_GPIOLIB=y
674CONFIG_GPIO_SYSFS=y 737CONFIG_GPIO_SYSFS=y
@@ -688,15 +751,21 @@ CONFIG_GPIO_SYSFS=y
688# 751#
689# SPI GPIO expanders: 752# SPI GPIO expanders:
690# 753#
754# CONFIG_GPIO_MAX7301 is not set
755# CONFIG_GPIO_MCP23S08 is not set
691# CONFIG_W1 is not set 756# CONFIG_W1 is not set
692# CONFIG_POWER_SUPPLY is not set 757# CONFIG_POWER_SUPPLY is not set
693CONFIG_HWMON=y 758CONFIG_HWMON=y
694# CONFIG_HWMON_VID is not set 759# CONFIG_HWMON_VID is not set
760# CONFIG_SENSORS_ADCXX is not set
695# CONFIG_SENSORS_F71805F is not set 761# CONFIG_SENSORS_F71805F is not set
696# CONFIG_SENSORS_F71882FG is not set 762# CONFIG_SENSORS_F71882FG is not set
697# CONFIG_SENSORS_IT87 is not set 763# CONFIG_SENSORS_IT87 is not set
764# CONFIG_SENSORS_LM70 is not set
765# CONFIG_SENSORS_MAX1111 is not set
698# CONFIG_SENSORS_PC87360 is not set 766# CONFIG_SENSORS_PC87360 is not set
699# CONFIG_SENSORS_PC87427 is not set 767# CONFIG_SENSORS_PC87427 is not set
768# CONFIG_SENSORS_SHT15 is not set
700# CONFIG_SENSORS_SMSC47M1 is not set 769# CONFIG_SENSORS_SMSC47M1 is not set
701# CONFIG_SENSORS_SMSC47B397 is not set 770# CONFIG_SENSORS_SMSC47B397 is not set
702# CONFIG_SENSORS_VT1211 is not set 771# CONFIG_SENSORS_VT1211 is not set
@@ -758,21 +827,74 @@ CONFIG_USB_ARCH_HAS_HCD=y
758# CONFIG_USB is not set 827# CONFIG_USB is not set
759# CONFIG_USB_OTG_WHITELIST is not set 828# CONFIG_USB_OTG_WHITELIST is not set
760# CONFIG_USB_OTG_BLACKLIST_HUB is not set 829# CONFIG_USB_OTG_BLACKLIST_HUB is not set
761 830# CONFIG_USB_GADGET_MUSB_HDRC is not set
762# 831
763# Enable Host or Gadget support to see Inventra options 832#
764# 833# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
765 834#
766# 835CONFIG_USB_GADGET=m
767# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; 836# CONFIG_USB_GADGET_DEBUG_FILES is not set
768# 837# CONFIG_USB_GADGET_DEBUG_FS is not set
769# CONFIG_USB_GADGET is not set 838CONFIG_USB_GADGET_VBUS_DRAW=2
770# CONFIG_MMC is not set 839CONFIG_USB_GADGET_SELECTED=y
840# CONFIG_USB_GADGET_AT91 is not set
841# CONFIG_USB_GADGET_ATMEL_USBA is not set
842# CONFIG_USB_GADGET_FSL_USB2 is not set
843# CONFIG_USB_GADGET_LH7A40X is not set
844# CONFIG_USB_GADGET_OMAP is not set
845# CONFIG_USB_GADGET_PXA25X is not set
846# CONFIG_USB_GADGET_PXA27X is not set
847# CONFIG_USB_GADGET_S3C2410 is not set
848# CONFIG_USB_GADGET_IMX is not set
849# CONFIG_USB_GADGET_M66592 is not set
850# CONFIG_USB_GADGET_AMD5536UDC is not set
851# CONFIG_USB_GADGET_FSL_QE is not set
852# CONFIG_USB_GADGET_CI13XXX is not set
853CONFIG_USB_GADGET_NET2272=y
854CONFIG_USB_NET2272=m
855# CONFIG_USB_GADGET_NET2280 is not set
856# CONFIG_USB_GADGET_GOKU is not set
857# CONFIG_USB_GADGET_DUMMY_HCD is not set
858CONFIG_USB_GADGET_DUALSPEED=y
859# CONFIG_USB_ZERO is not set
860# CONFIG_USB_AUDIO is not set
861CONFIG_USB_ETH=m
862CONFIG_USB_ETH_RNDIS=y
863# CONFIG_USB_GADGETFS is not set
864# CONFIG_USB_FILE_STORAGE is not set
865# CONFIG_USB_G_SERIAL is not set
866# CONFIG_USB_MIDI_GADGET is not set
867# CONFIG_USB_G_PRINTER is not set
868# CONFIG_USB_CDC_COMPOSITE is not set
869
870#
871# OTG and related infrastructure
872#
873# CONFIG_USB_GPIO_VBUS is not set
874# CONFIG_NOP_USB_XCEIV is not set
875CONFIG_MMC=y
876# CONFIG_MMC_DEBUG is not set
877# CONFIG_MMC_UNSAFE_RESUME is not set
878
879#
880# MMC/SD/SDIO Card Drivers
881#
882CONFIG_MMC_BLOCK=y
883# CONFIG_MMC_BLOCK_BOUNCE is not set
884# CONFIG_SDIO_UART is not set
885# CONFIG_MMC_TEST is not set
886
887#
888# MMC/SD/SDIO Host Controller Drivers
889#
890# CONFIG_MMC_SDHCI is not set
891CONFIG_MMC_SPI=m
771# CONFIG_MEMSTICK is not set 892# CONFIG_MEMSTICK is not set
772# CONFIG_NEW_LEDS is not set 893# CONFIG_NEW_LEDS is not set
773# CONFIG_ACCESSIBILITY is not set 894# CONFIG_ACCESSIBILITY is not set
774# CONFIG_RTC_CLASS is not set 895# CONFIG_RTC_CLASS is not set
775# CONFIG_DMADEVICES is not set 896# CONFIG_DMADEVICES is not set
897# CONFIG_AUXDISPLAY is not set
776# CONFIG_UIO is not set 898# CONFIG_UIO is not set
777# CONFIG_STAGING is not set 899# CONFIG_STAGING is not set
778 900
@@ -789,9 +911,10 @@ CONFIG_FS_MBCACHE=y
789# CONFIG_REISERFS_FS is not set 911# CONFIG_REISERFS_FS is not set
790# CONFIG_JFS_FS is not set 912# CONFIG_JFS_FS is not set
791# CONFIG_FS_POSIX_ACL is not set 913# CONFIG_FS_POSIX_ACL is not set
792CONFIG_FILE_LOCKING=y
793# CONFIG_XFS_FS is not set 914# CONFIG_XFS_FS is not set
794# CONFIG_OCFS2_FS is not set 915# CONFIG_OCFS2_FS is not set
916# CONFIG_BTRFS_FS is not set
917CONFIG_FILE_LOCKING=y
795# CONFIG_DNOTIFY is not set 918# CONFIG_DNOTIFY is not set
796CONFIG_INOTIFY=y 919CONFIG_INOTIFY=y
797CONFIG_INOTIFY_USER=y 920CONFIG_INOTIFY_USER=y
@@ -801,6 +924,11 @@ CONFIG_INOTIFY_USER=y
801# CONFIG_FUSE_FS is not set 924# CONFIG_FUSE_FS is not set
802 925
803# 926#
927# Caches
928#
929# CONFIG_FSCACHE is not set
930
931#
804# CD-ROM/DVD Filesystems 932# CD-ROM/DVD Filesystems
805# 933#
806# CONFIG_ISO9660_FS is not set 934# CONFIG_ISO9660_FS is not set
@@ -809,8 +937,11 @@ CONFIG_INOTIFY_USER=y
809# 937#
810# DOS/FAT/NT Filesystems 938# DOS/FAT/NT Filesystems
811# 939#
812# CONFIG_MSDOS_FS is not set 940CONFIG_FAT_FS=y
813# CONFIG_VFAT_FS is not set 941CONFIG_MSDOS_FS=y
942CONFIG_VFAT_FS=y
943CONFIG_FAT_DEFAULT_CODEPAGE=437
944CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
814# CONFIG_NTFS_FS is not set 945# CONFIG_NTFS_FS is not set
815 946
816# 947#
@@ -822,10 +953,7 @@ CONFIG_SYSFS=y
822# CONFIG_TMPFS is not set 953# CONFIG_TMPFS is not set
823# CONFIG_HUGETLB_PAGE is not set 954# CONFIG_HUGETLB_PAGE is not set
824# CONFIG_CONFIGFS_FS is not set 955# CONFIG_CONFIGFS_FS is not set
825 956CONFIG_MISC_FILESYSTEMS=y
826#
827# Miscellaneous filesystems
828#
829# CONFIG_ADFS_FS is not set 957# CONFIG_ADFS_FS is not set
830# CONFIG_AFFS_FS is not set 958# CONFIG_AFFS_FS is not set
831# CONFIG_HFS_FS is not set 959# CONFIG_HFS_FS is not set
@@ -833,9 +961,19 @@ CONFIG_SYSFS=y
833# CONFIG_BEFS_FS is not set 961# CONFIG_BEFS_FS is not set
834# CONFIG_BFS_FS is not set 962# CONFIG_BFS_FS is not set
835# CONFIG_EFS_FS is not set 963# CONFIG_EFS_FS is not set
836# CONFIG_JFFS2_FS is not set 964CONFIG_JFFS2_FS=y
837# CONFIG_YAFFS_FS is not set 965CONFIG_JFFS2_FS_DEBUG=0
966CONFIG_JFFS2_FS_WRITEBUFFER=y
967# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
968# CONFIG_JFFS2_SUMMARY is not set
969# CONFIG_JFFS2_FS_XATTR is not set
970# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
971CONFIG_JFFS2_ZLIB=y
972# CONFIG_JFFS2_LZO is not set
973CONFIG_JFFS2_RTIME=y
974# CONFIG_JFFS2_RUBIN is not set
838# CONFIG_CRAMFS is not set 975# CONFIG_CRAMFS is not set
976# CONFIG_SQUASHFS is not set
839# CONFIG_VXFS_FS is not set 977# CONFIG_VXFS_FS is not set
840# CONFIG_MINIX_FS is not set 978# CONFIG_MINIX_FS is not set
841# CONFIG_OMFS_FS is not set 979# CONFIG_OMFS_FS is not set
@@ -844,14 +982,70 @@ CONFIG_SYSFS=y
844# CONFIG_ROMFS_FS is not set 982# CONFIG_ROMFS_FS is not set
845# CONFIG_SYSV_FS is not set 983# CONFIG_SYSV_FS is not set
846# CONFIG_UFS_FS is not set 984# CONFIG_UFS_FS is not set
847# CONFIG_NETWORK_FILESYSTEMS is not set 985# CONFIG_NILFS2_FS is not set
986CONFIG_NETWORK_FILESYSTEMS=y
987CONFIG_NFS_FS=m
988CONFIG_NFS_V3=y
989# CONFIG_NFS_V3_ACL is not set
990# CONFIG_NFS_V4 is not set
991# CONFIG_NFSD is not set
992CONFIG_LOCKD=m
993CONFIG_LOCKD_V4=y
994CONFIG_NFS_COMMON=y
995CONFIG_SUNRPC=m
996# CONFIG_RPCSEC_GSS_KRB5 is not set
997# CONFIG_RPCSEC_GSS_SPKM3 is not set
998# CONFIG_SMB_FS is not set
999# CONFIG_CIFS is not set
1000# CONFIG_NCP_FS is not set
1001# CONFIG_CODA_FS is not set
1002# CONFIG_AFS_FS is not set
848 1003
849# 1004#
850# Partition Types 1005# Partition Types
851# 1006#
852# CONFIG_PARTITION_ADVANCED is not set 1007# CONFIG_PARTITION_ADVANCED is not set
853CONFIG_MSDOS_PARTITION=y 1008CONFIG_MSDOS_PARTITION=y
854# CONFIG_NLS is not set 1009CONFIG_NLS=y
1010CONFIG_NLS_DEFAULT="iso8859-1"
1011CONFIG_NLS_CODEPAGE_437=y
1012# CONFIG_NLS_CODEPAGE_737 is not set
1013# CONFIG_NLS_CODEPAGE_775 is not set
1014# CONFIG_NLS_CODEPAGE_850 is not set
1015# CONFIG_NLS_CODEPAGE_852 is not set
1016# CONFIG_NLS_CODEPAGE_855 is not set
1017# CONFIG_NLS_CODEPAGE_857 is not set
1018# CONFIG_NLS_CODEPAGE_860 is not set
1019# CONFIG_NLS_CODEPAGE_861 is not set
1020# CONFIG_NLS_CODEPAGE_862 is not set
1021# CONFIG_NLS_CODEPAGE_863 is not set
1022# CONFIG_NLS_CODEPAGE_864 is not set
1023# CONFIG_NLS_CODEPAGE_865 is not set
1024# CONFIG_NLS_CODEPAGE_866 is not set
1025# CONFIG_NLS_CODEPAGE_869 is not set
1026# CONFIG_NLS_CODEPAGE_936 is not set
1027# CONFIG_NLS_CODEPAGE_950 is not set
1028# CONFIG_NLS_CODEPAGE_932 is not set
1029# CONFIG_NLS_CODEPAGE_949 is not set
1030# CONFIG_NLS_CODEPAGE_874 is not set
1031# CONFIG_NLS_ISO8859_8 is not set
1032# CONFIG_NLS_CODEPAGE_1250 is not set
1033# CONFIG_NLS_CODEPAGE_1251 is not set
1034# CONFIG_NLS_ASCII is not set
1035CONFIG_NLS_ISO8859_1=y
1036# CONFIG_NLS_ISO8859_2 is not set
1037# CONFIG_NLS_ISO8859_3 is not set
1038# CONFIG_NLS_ISO8859_4 is not set
1039# CONFIG_NLS_ISO8859_5 is not set
1040# CONFIG_NLS_ISO8859_6 is not set
1041# CONFIG_NLS_ISO8859_7 is not set
1042# CONFIG_NLS_ISO8859_9 is not set
1043# CONFIG_NLS_ISO8859_13 is not set
1044# CONFIG_NLS_ISO8859_14 is not set
1045# CONFIG_NLS_ISO8859_15 is not set
1046# CONFIG_NLS_KOI8_R is not set
1047# CONFIG_NLS_KOI8_U is not set
1048# CONFIG_NLS_UTF8 is not set
855# CONFIG_DLM is not set 1049# CONFIG_DLM is not set
856 1050
857# 1051#
@@ -867,14 +1061,28 @@ CONFIG_DEBUG_FS=y
867# CONFIG_HEADERS_CHECK is not set 1061# CONFIG_HEADERS_CHECK is not set
868CONFIG_DEBUG_SECTION_MISMATCH=y 1062CONFIG_DEBUG_SECTION_MISMATCH=y
869# CONFIG_DEBUG_KERNEL is not set 1063# CONFIG_DEBUG_KERNEL is not set
870CONFIG_DEBUG_BUGVERBOSE=y 1064# CONFIG_DEBUG_BUGVERBOSE is not set
871# CONFIG_DEBUG_MEMORY_INIT is not set 1065# CONFIG_DEBUG_MEMORY_INIT is not set
872# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1066# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1067CONFIG_HAVE_FUNCTION_TRACER=y
1068CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1069CONFIG_TRACING_SUPPORT=y
873 1070
874# 1071#
875# Tracers 1072# Tracers
876# 1073#
877# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1074# CONFIG_FUNCTION_TRACER is not set
1075# CONFIG_IRQSOFF_TRACER is not set
1076# CONFIG_SCHED_TRACER is not set
1077# CONFIG_CONTEXT_SWITCH_TRACER is not set
1078# CONFIG_EVENT_TRACER is not set
1079# CONFIG_BOOT_TRACER is not set
1080# CONFIG_TRACE_BRANCH_PROFILING is not set
1081# CONFIG_STACK_TRACER is not set
1082# CONFIG_KMEMTRACE is not set
1083# CONFIG_WORKQUEUE_TRACER is not set
1084# CONFIG_BLK_DEV_IO_TRACE is not set
1085# CONFIG_DYNAMIC_DEBUG is not set
878# CONFIG_SAMPLES is not set 1086# CONFIG_SAMPLES is not set
879CONFIG_HAVE_ARCH_KGDB=y 1087CONFIG_HAVE_ARCH_KGDB=y
880CONFIG_DEBUG_VERBOSE=y 1088CONFIG_DEBUG_VERBOSE=y
@@ -888,9 +1096,10 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
888CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1096CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
889# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1097# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
890# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1098# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
891# CONFIG_EARLY_PRINTK is not set 1099CONFIG_EARLY_PRINTK=y
892CONFIG_CPLB_INFO=y 1100CONFIG_CPLB_INFO=y
893CONFIG_ACCESS_CHECK=y 1101CONFIG_ACCESS_CHECK=y
1102# CONFIG_BFIN_ISRAM_SELF_TEST is not set
894 1103
895# 1104#
896# Security options 1105# Security options
@@ -899,8 +1108,9 @@ CONFIG_ACCESS_CHECK=y
899CONFIG_SECURITY=y 1108CONFIG_SECURITY=y
900# CONFIG_SECURITYFS is not set 1109# CONFIG_SECURITYFS is not set
901# CONFIG_SECURITY_NETWORK is not set 1110# CONFIG_SECURITY_NETWORK is not set
1111# CONFIG_SECURITY_PATH is not set
902# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1112# CONFIG_SECURITY_FILE_CAPABILITIES is not set
903CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 1113# CONFIG_SECURITY_TOMOYO is not set
904CONFIG_CRYPTO=y 1114CONFIG_CRYPTO=y
905 1115
906# 1116#
@@ -979,6 +1189,7 @@ CONFIG_CRYPTO=y
979# Compression 1189# Compression
980# 1190#
981# CONFIG_CRYPTO_DEFLATE is not set 1191# CONFIG_CRYPTO_DEFLATE is not set
1192# CONFIG_CRYPTO_ZLIB is not set
982# CONFIG_CRYPTO_LZO is not set 1193# CONFIG_CRYPTO_LZO is not set
983 1194
984# 1195#
@@ -986,19 +1197,24 @@ CONFIG_CRYPTO=y
986# 1197#
987# CONFIG_CRYPTO_ANSI_CPRNG is not set 1198# CONFIG_CRYPTO_ANSI_CPRNG is not set
988CONFIG_CRYPTO_HW=y 1199CONFIG_CRYPTO_HW=y
1200# CONFIG_BINARY_PRINTF is not set
989 1201
990# 1202#
991# Library routines 1203# Library routines
992# 1204#
993CONFIG_BITREVERSE=y 1205CONFIG_BITREVERSE=y
1206CONFIG_GENERIC_FIND_LAST_BIT=y
994CONFIG_CRC_CCITT=m 1207CONFIG_CRC_CCITT=m
995# CONFIG_CRC16 is not set 1208# CONFIG_CRC16 is not set
996# CONFIG_CRC_T10DIF is not set 1209# CONFIG_CRC_T10DIF is not set
997# CONFIG_CRC_ITU_T is not set 1210CONFIG_CRC_ITU_T=y
998CONFIG_CRC32=y 1211CONFIG_CRC32=y
999# CONFIG_CRC7 is not set 1212CONFIG_CRC7=y
1000# CONFIG_LIBCRC32C is not set 1213# CONFIG_LIBCRC32C is not set
1001CONFIG_ZLIB_INFLATE=y 1214CONFIG_ZLIB_INFLATE=y
1215CONFIG_ZLIB_DEFLATE=y
1216CONFIG_DECOMPRESS_LZMA=y
1002CONFIG_HAS_IOMEM=y 1217CONFIG_HAS_IOMEM=y
1003CONFIG_HAS_IOPORT=y 1218CONFIG_HAS_IOPORT=y
1004CONFIG_HAS_DMA=y 1219CONFIG_HAS_DMA=y
1220CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/CM-BF537U_defconfig b/arch/blackfin/configs/CM-BF537U_defconfig
index 7fc8dfa1719f..efcc90d2f345 100644
--- a/arch/blackfin/configs/CM-BF537U_defconfig
+++ b/arch/blackfin/configs/CM-BF537U_defconfig
@@ -1,94 +1,111 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.22.16 3# Linux kernel version: 2.6.30.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
10CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
11CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_GENERIC_IRQ_PROBE=y 15CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
18CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21 23
22# 24#
23# Code maturity level options 25# General setup
24# 26#
25CONFIG_EXPERIMENTAL=y 27CONFIG_EXPERIMENTAL=y
26CONFIG_BROKEN_ON_SMP=y 28CONFIG_BROKEN_ON_SMP=y
27CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
28
29#
30# General setup
31#
32CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
33CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
34CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
35# CONFIG_IPC_NS is not set
36CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
37# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
38# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
39# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
40# CONFIG_UTS_NS is not set
41# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
42CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_SYSFS_DEPRECATED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
58# CONFIG_SYSFS_DEPRECATED_V2 is not set
46# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
47# CONFIG_BLK_DEV_INITRD is not set 60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
49# CONFIG_SYSCTL is not set 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
50CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
51# CONFIG_UID16 is not set 70# CONFIG_UID16 is not set
52# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
53CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
55# CONFIG_HOTPLUG is not set 74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y
56CONFIG_PRINTK=y 76CONFIG_PRINTK=y
57CONFIG_BUG=y 77CONFIG_BUG=y
58# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
59CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
60# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
61CONFIG_ANON_INODES=y
62CONFIG_EPOLL=y 81CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
83CONFIG_TIMERFD=y
64CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_AIO=y
65CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 87CONFIG_COMPAT_BRK=y
67# CONFIG_NP2 is not set
68CONFIG_SLAB=y 88CONFIG_SLAB=y
69# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
71CONFIG_RT_MUTEXES=y 91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
72CONFIG_TINY_SHMEM=y 92# CONFIG_PROFILING is not set
93# CONFIG_MARKERS is not set
94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
97CONFIG_SLABINFO=y
73CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
74
75#
76# Loadable module support
77#
78CONFIG_MODULES=y 99CONFIG_MODULES=y
100# CONFIG_MODULE_FORCE_LOAD is not set
79CONFIG_MODULE_UNLOAD=y 101CONFIG_MODULE_UNLOAD=y
80# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
81# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
82# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
83CONFIG_KMOD=y
84
85#
86# Block layer
87#
88CONFIG_BLOCK=y 105CONFIG_BLOCK=y
89# CONFIG_LBD is not set 106# CONFIG_LBD is not set
90# CONFIG_BLK_DEV_IO_TRACE is not set 107# CONFIG_BLK_DEV_BSG is not set
91# CONFIG_LSF is not set 108# CONFIG_BLK_DEV_INTEGRITY is not set
92 109
93# 110#
94# IO Schedulers 111# IO Schedulers
@@ -105,6 +122,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
105CONFIG_PREEMPT_NONE=y 122CONFIG_PREEMPT_NONE=y
106# CONFIG_PREEMPT_VOLUNTARY is not set 123# CONFIG_PREEMPT_VOLUNTARY is not set
107# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
125# CONFIG_FREEZER is not set
108 126
109# 127#
110# Blackfin Processor Options 128# Blackfin Processor Options
@@ -113,6 +131,10 @@ CONFIG_PREEMPT_NONE=y
113# 131#
114# Processor and Board Settings 132# Processor and Board Settings
115# 133#
134# CONFIG_BF512 is not set
135# CONFIG_BF514 is not set
136# CONFIG_BF516 is not set
137# CONFIG_BF518 is not set
116# CONFIG_BF522 is not set 138# CONFIG_BF522 is not set
117# CONFIG_BF523 is not set 139# CONFIG_BF523 is not set
118# CONFIG_BF524 is not set 140# CONFIG_BF524 is not set
@@ -125,22 +147,31 @@ CONFIG_PREEMPT_NONE=y
125# CONFIG_BF534 is not set 147# CONFIG_BF534 is not set
126# CONFIG_BF536 is not set 148# CONFIG_BF536 is not set
127CONFIG_BF537=y 149CONFIG_BF537=y
150# CONFIG_BF538 is not set
151# CONFIG_BF539 is not set
128# CONFIG_BF542 is not set 152# CONFIG_BF542 is not set
153# CONFIG_BF542M is not set
129# CONFIG_BF544 is not set 154# CONFIG_BF544 is not set
155# CONFIG_BF544M is not set
130# CONFIG_BF547 is not set 156# CONFIG_BF547 is not set
157# CONFIG_BF547M is not set
131# CONFIG_BF548 is not set 158# CONFIG_BF548 is not set
159# CONFIG_BF548M is not set
132# CONFIG_BF549 is not set 160# CONFIG_BF549 is not set
161# CONFIG_BF549M is not set
133# CONFIG_BF561 is not set 162# CONFIG_BF561 is not set
163CONFIG_BF_REV_MIN=2
164CONFIG_BF_REV_MAX=3
134# CONFIG_BF_REV_0_0 is not set 165# CONFIG_BF_REV_0_0 is not set
135# CONFIG_BF_REV_0_1 is not set 166# CONFIG_BF_REV_0_1 is not set
136CONFIG_BF_REV_0_2=y 167CONFIG_BF_REV_0_2=y
137# CONFIG_BF_REV_0_3 is not set 168# CONFIG_BF_REV_0_3 is not set
138# CONFIG_BF_REV_0_4 is not set 169# CONFIG_BF_REV_0_4 is not set
139# CONFIG_BF_REV_0_5 is not set 170# CONFIG_BF_REV_0_5 is not set
171# CONFIG_BF_REV_0_6 is not set
140# CONFIG_BF_REV_ANY is not set 172# CONFIG_BF_REV_ANY is not set
141# CONFIG_BF_REV_NONE is not set 173# CONFIG_BF_REV_NONE is not set
142CONFIG_BF53x=y 174CONFIG_BF53x=y
143CONFIG_BFIN_SINGLE_CORE=y
144CONFIG_MEM_MT48LC16M16A2TG_75=y 175CONFIG_MEM_MT48LC16M16A2TG_75=y
145CONFIG_IRQ_PLL_WAKEUP=7 176CONFIG_IRQ_PLL_WAKEUP=7
146CONFIG_IRQ_RTC=8 177CONFIG_IRQ_RTC=8
@@ -150,7 +181,6 @@ CONFIG_IRQ_SPORT0_TX=9
150CONFIG_IRQ_SPORT1_RX=9 181CONFIG_IRQ_SPORT1_RX=9
151CONFIG_IRQ_SPORT1_TX=9 182CONFIG_IRQ_SPORT1_TX=9
152CONFIG_IRQ_TWI=10 183CONFIG_IRQ_TWI=10
153CONFIG_IRQ_SPI=10
154CONFIG_IRQ_UART0_RX=10 184CONFIG_IRQ_UART0_RX=10
155CONFIG_IRQ_UART0_TX=10 185CONFIG_IRQ_UART0_TX=10
156CONFIG_IRQ_UART1_RX=10 186CONFIG_IRQ_UART1_RX=10
@@ -169,11 +199,13 @@ CONFIG_IRQ_PORTG_INTB=12
169CONFIG_IRQ_MEM_DMA0=13 199CONFIG_IRQ_MEM_DMA0=13
170CONFIG_IRQ_MEM_DMA1=13 200CONFIG_IRQ_MEM_DMA1=13
171CONFIG_IRQ_WATCH=13 201CONFIG_IRQ_WATCH=13
202CONFIG_IRQ_SPI=10
172# CONFIG_BFIN537_STAMP is not set 203# CONFIG_BFIN537_STAMP is not set
173CONFIG_BFIN537_BLUETECHNIX_CM=y 204# CONFIG_BFIN537_BLUETECHNIX_CM_E is not set
205CONFIG_BFIN537_BLUETECHNIX_CM_U=y
206# CONFIG_BFIN537_BLUETECHNIX_TCM is not set
174# CONFIG_PNAV10 is not set 207# CONFIG_PNAV10 is not set
175# CONFIG_CAMSIG_MINOTAUR is not set 208# CONFIG_CAMSIG_MINOTAUR is not set
176# CONFIG_GENERIC_BF537_BOARD is not set
177 209
178# 210#
179# BF537 Specific Configuration 211# BF537 Specific Configuration
@@ -196,6 +228,7 @@ CONFIG_IRQ_PROG_INTA=12
196# Board customizations 228# Board customizations
197# 229#
198# CONFIG_CMDLINE_BOOL is not set 230# CONFIG_CMDLINE_BOOL is not set
231CONFIG_BOOT_LOAD=0x1000
199 232
200# 233#
201# Clock/PLL Setup 234# Clock/PLL Setup
@@ -215,13 +248,20 @@ CONFIG_HZ_250=y
215# CONFIG_HZ_300 is not set 248# CONFIG_HZ_300 is not set
216# CONFIG_HZ_1000 is not set 249# CONFIG_HZ_1000 is not set
217CONFIG_HZ=250 250CONFIG_HZ=250
251# CONFIG_SCHED_HRTICK is not set
252CONFIG_GENERIC_TIME=y
253CONFIG_GENERIC_CLOCKEVENTS=y
254# CONFIG_TICKSOURCE_GPTMR0 is not set
255CONFIG_TICKSOURCE_CORETMR=y
256# CONFIG_CYCLES_CLOCKSOURCE is not set
257# CONFIG_GPTMR0_CLOCKSOURCE is not set
258# CONFIG_NO_HZ is not set
259# CONFIG_HIGH_RES_TIMERS is not set
260CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
218 261
219# 262#
220# Memory Setup 263# Misc
221# 264#
222CONFIG_MAX_MEM_SIZE=32
223CONFIG_MEM_ADD_WIDTH=9
224CONFIG_BOOT_LOAD=0x1000
225CONFIG_BFIN_SCRATCH_REG_RETN=y 265CONFIG_BFIN_SCRATCH_REG_RETN=y
226# CONFIG_BFIN_SCRATCH_REG_RETE is not set 266# CONFIG_BFIN_SCRATCH_REG_RETE is not set
227# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set 267# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
@@ -248,6 +288,12 @@ CONFIG_IP_CHECKSUM_L1=y
248CONFIG_CACHELINE_ALIGNED_L1=y 288CONFIG_CACHELINE_ALIGNED_L1=y
249CONFIG_SYSCALL_TAB_L1=y 289CONFIG_SYSCALL_TAB_L1=y
250CONFIG_CPLB_SWITCH_TAB_L1=y 290CONFIG_CPLB_SWITCH_TAB_L1=y
291CONFIG_APP_STACK_L1=y
292
293#
294# Speed Optimizations
295#
296CONFIG_BFIN_INS_LOWOVERHEAD=y
251CONFIG_RAMKERNEL=y 297CONFIG_RAMKERNEL=y
252# CONFIG_ROMKERNEL is not set 298# CONFIG_ROMKERNEL is not set
253CONFIG_SELECT_MEMORY_MODEL=y 299CONFIG_SELECT_MEMORY_MODEL=y
@@ -256,12 +302,16 @@ CONFIG_FLATMEM_MANUAL=y
256# CONFIG_SPARSEMEM_MANUAL is not set 302# CONFIG_SPARSEMEM_MANUAL is not set
257CONFIG_FLATMEM=y 303CONFIG_FLATMEM=y
258CONFIG_FLAT_NODE_MEM_MAP=y 304CONFIG_FLAT_NODE_MEM_MAP=y
259# CONFIG_SPARSEMEM_STATIC is not set 305CONFIG_PAGEFLAGS_EXTENDED=y
260CONFIG_SPLIT_PTLOCK_CPUS=4 306CONFIG_SPLIT_PTLOCK_CPUS=4
261# CONFIG_RESOURCES_64BIT is not set 307# CONFIG_PHYS_ADDR_T_64BIT is not set
262CONFIG_ZONE_DMA_FLAG=1 308CONFIG_ZONE_DMA_FLAG=1
263CONFIG_LARGE_ALLOCS=y 309CONFIG_VIRT_TO_BUS=y
310CONFIG_UNEVICTABLE_LRU=y
311CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
312CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
264# CONFIG_BFIN_GPTIMERS is not set 313# CONFIG_BFIN_GPTIMERS is not set
314# CONFIG_DMA_UNCACHED_4M is not set
265# CONFIG_DMA_UNCACHED_2M is not set 315# CONFIG_DMA_UNCACHED_2M is not set
266CONFIG_DMA_UNCACHED_1M=y 316CONFIG_DMA_UNCACHED_1M=y
267# CONFIG_DMA_UNCACHED_NONE is not set 317# CONFIG_DMA_UNCACHED_NONE is not set
@@ -270,10 +320,9 @@ CONFIG_DMA_UNCACHED_1M=y
270# Cache Support 320# Cache Support
271# 321#
272CONFIG_BFIN_ICACHE=y 322CONFIG_BFIN_ICACHE=y
273# CONFIG_BFIN_ICACHE_LOCK is not set 323CONFIG_BFIN_EXTMEM_ICACHEABLE=y
274CONFIG_BFIN_DCACHE=y 324CONFIG_BFIN_DCACHE=y
275# CONFIG_BFIN_DCACHE_BANKA is not set 325# CONFIG_BFIN_DCACHE_BANKA is not set
276CONFIG_BFIN_EXTMEM_ICACHEABLE=y
277CONFIG_BFIN_EXTMEM_DCACHEABLE=y 326CONFIG_BFIN_EXTMEM_DCACHEABLE=y
278CONFIG_BFIN_EXTMEM_WRITEBACK=y 327CONFIG_BFIN_EXTMEM_WRITEBACK=y
279# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 328# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
@@ -284,7 +333,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
284# CONFIG_MPU is not set 333# CONFIG_MPU is not set
285 334
286# 335#
287# Asynchonous Memory Configuration 336# Asynchronous Memory Configuration
288# 337#
289 338
290# 339#
@@ -309,12 +358,8 @@ CONFIG_BANK_3=0xFFC2
309# 358#
310# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 359# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
311# 360#
312# CONFIG_PCI is not set
313# CONFIG_ARCH_SUPPORTS_MSI is not set 361# CONFIG_ARCH_SUPPORTS_MSI is not set
314 362# CONFIG_PCCARD is not set
315#
316# PCCARD (PCMCIA/CardBus) support
317#
318 363
319# 364#
320# Executable file formats 365# Executable file formats
@@ -323,22 +368,19 @@ CONFIG_BINFMT_ELF_FDPIC=y
323CONFIG_BINFMT_FLAT=y 368CONFIG_BINFMT_FLAT=y
324CONFIG_BINFMT_ZFLAT=y 369CONFIG_BINFMT_ZFLAT=y
325CONFIG_BINFMT_SHARED_FLAT=y 370CONFIG_BINFMT_SHARED_FLAT=y
371# CONFIG_HAVE_AOUT is not set
326# CONFIG_BINFMT_MISC is not set 372# CONFIG_BINFMT_MISC is not set
327 373
328# 374#
329# Power management options 375# Power management options
330# 376#
331# CONFIG_PM is not set 377# CONFIG_PM is not set
332# CONFIG_PM_WAKEUP_BY_GPIO is not set 378CONFIG_ARCH_SUSPEND_POSSIBLE=y
333 379
334# 380#
335# CPU Frequency scaling 381# CPU Frequency scaling
336# 382#
337# CONFIG_CPU_FREQ is not set 383# CONFIG_CPU_FREQ is not set
338
339#
340# Networking
341#
342CONFIG_NET=y 384CONFIG_NET=y
343 385
344# 386#
@@ -347,10 +389,6 @@ CONFIG_NET=y
347CONFIG_PACKET=y 389CONFIG_PACKET=y
348# CONFIG_PACKET_MMAP is not set 390# CONFIG_PACKET_MMAP is not set
349CONFIG_UNIX=y 391CONFIG_UNIX=y
350CONFIG_XFRM=y
351# CONFIG_XFRM_USER is not set
352# CONFIG_XFRM_SUB_POLICY is not set
353# CONFIG_XFRM_MIGRATE is not set
354# CONFIG_NET_KEY is not set 392# CONFIG_NET_KEY is not set
355CONFIG_INET=y 393CONFIG_INET=y
356# CONFIG_IP_MULTICAST is not set 394# CONFIG_IP_MULTICAST is not set
@@ -369,15 +407,13 @@ CONFIG_IP_FIB_HASH=y
369# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 407# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
370# CONFIG_INET_XFRM_MODE_TUNNEL is not set 408# CONFIG_INET_XFRM_MODE_TUNNEL is not set
371# CONFIG_INET_XFRM_MODE_BEET is not set 409# CONFIG_INET_XFRM_MODE_BEET is not set
410CONFIG_INET_LRO=y
372# CONFIG_INET_DIAG is not set 411# CONFIG_INET_DIAG is not set
373CONFIG_INET_TCP_DIAG=y
374# CONFIG_TCP_CONG_ADVANCED is not set 412# CONFIG_TCP_CONG_ADVANCED is not set
375CONFIG_TCP_CONG_CUBIC=y 413CONFIG_TCP_CONG_CUBIC=y
376CONFIG_DEFAULT_TCP_CONG="cubic" 414CONFIG_DEFAULT_TCP_CONG="cubic"
377# CONFIG_TCP_MD5SIG is not set 415# CONFIG_TCP_MD5SIG is not set
378# CONFIG_IPV6 is not set 416# CONFIG_IPV6 is not set
379# CONFIG_INET6_XFRM_TUNNEL is not set
380# CONFIG_INET6_TUNNEL is not set
381# CONFIG_NETLABEL is not set 417# CONFIG_NETLABEL is not set
382# CONFIG_NETWORK_SECMARK is not set 418# CONFIG_NETWORK_SECMARK is not set
383# CONFIG_NETFILTER is not set 419# CONFIG_NETFILTER is not set
@@ -386,6 +422,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
386# CONFIG_TIPC is not set 422# CONFIG_TIPC is not set
387# CONFIG_ATM is not set 423# CONFIG_ATM is not set
388# CONFIG_BRIDGE is not set 424# CONFIG_BRIDGE is not set
425# CONFIG_NET_DSA is not set
389# CONFIG_VLAN_8021Q is not set 426# CONFIG_VLAN_8021Q is not set
390# CONFIG_DECNET is not set 427# CONFIG_DECNET is not set
391# CONFIG_LLC2 is not set 428# CONFIG_LLC2 is not set
@@ -395,29 +432,23 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
395# CONFIG_LAPB is not set 432# CONFIG_LAPB is not set
396# CONFIG_ECONET is not set 433# CONFIG_ECONET is not set
397# CONFIG_WAN_ROUTER is not set 434# CONFIG_WAN_ROUTER is not set
398 435# CONFIG_PHONET is not set
399#
400# QoS and/or fair queueing
401#
402# CONFIG_NET_SCHED is not set 436# CONFIG_NET_SCHED is not set
437# CONFIG_DCB is not set
403 438
404# 439#
405# Network testing 440# Network testing
406# 441#
407# CONFIG_NET_PKTGEN is not set 442# CONFIG_NET_PKTGEN is not set
408# CONFIG_HAMRADIO is not set 443# CONFIG_HAMRADIO is not set
444# CONFIG_CAN is not set
409# CONFIG_IRDA is not set 445# CONFIG_IRDA is not set
410# CONFIG_BT is not set 446# CONFIG_BT is not set
411# CONFIG_AF_RXRPC is not set 447# CONFIG_AF_RXRPC is not set
412 448# CONFIG_WIRELESS is not set
413# 449# CONFIG_WIMAX is not set
414# Wireless
415#
416# CONFIG_CFG80211 is not set
417# CONFIG_WIRELESS_EXT is not set
418# CONFIG_MAC80211 is not set
419# CONFIG_IEEE80211 is not set
420# CONFIG_RFKILL is not set 450# CONFIG_RFKILL is not set
451# CONFIG_NET_9P is not set
421 452
422# 453#
423# Device Drivers 454# Device Drivers
@@ -426,20 +457,22 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
426# 457#
427# Generic Driver Options 458# Generic Driver Options
428# 459#
460CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
429CONFIG_STANDALONE=y 461CONFIG_STANDALONE=y
430CONFIG_PREVENT_FIRMWARE_BUILD=y 462CONFIG_PREVENT_FIRMWARE_BUILD=y
463CONFIG_FW_LOADER=y
464CONFIG_FIRMWARE_IN_KERNEL=y
465CONFIG_EXTRA_FIRMWARE=""
431# CONFIG_SYS_HYPERVISOR is not set 466# CONFIG_SYS_HYPERVISOR is not set
432
433#
434# Connector - unified userspace <-> kernelspace linker
435#
436# CONFIG_CONNECTOR is not set 467# CONFIG_CONNECTOR is not set
437CONFIG_MTD=y 468CONFIG_MTD=y
438# CONFIG_MTD_DEBUG is not set 469# CONFIG_MTD_DEBUG is not set
470# CONFIG_MTD_TESTS is not set
439# CONFIG_MTD_CONCAT is not set 471# CONFIG_MTD_CONCAT is not set
440CONFIG_MTD_PARTITIONS=y 472CONFIG_MTD_PARTITIONS=y
441# CONFIG_MTD_REDBOOT_PARTS is not set 473# CONFIG_MTD_REDBOOT_PARTS is not set
442# CONFIG_MTD_CMDLINE_PARTS is not set 474CONFIG_MTD_CMDLINE_PARTS=y
475# CONFIG_MTD_AR7_PARTS is not set
443 476
444# 477#
445# User Modules And Translation Layers 478# User Modules And Translation Layers
@@ -452,12 +485,15 @@ CONFIG_MTD_BLOCK=y
452# CONFIG_INFTL is not set 485# CONFIG_INFTL is not set
453# CONFIG_RFD_FTL is not set 486# CONFIG_RFD_FTL is not set
454# CONFIG_SSFDC is not set 487# CONFIG_SSFDC is not set
488# CONFIG_MTD_OOPS is not set
455 489
456# 490#
457# RAM/ROM/Flash chip drivers 491# RAM/ROM/Flash chip drivers
458# 492#
459# CONFIG_MTD_CFI is not set 493CONFIG_MTD_CFI=y
460# CONFIG_MTD_JEDECPROBE is not set 494# CONFIG_MTD_JEDECPROBE is not set
495CONFIG_MTD_GEN_PROBE=y
496# CONFIG_MTD_CFI_ADV_OPTIONS is not set
461CONFIG_MTD_MAP_BANK_WIDTH_1=y 497CONFIG_MTD_MAP_BANK_WIDTH_1=y
462CONFIG_MTD_MAP_BANK_WIDTH_2=y 498CONFIG_MTD_MAP_BANK_WIDTH_2=y
463CONFIG_MTD_MAP_BANK_WIDTH_4=y 499CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -468,20 +504,29 @@ CONFIG_MTD_CFI_I1=y
468CONFIG_MTD_CFI_I2=y 504CONFIG_MTD_CFI_I2=y
469# CONFIG_MTD_CFI_I4 is not set 505# CONFIG_MTD_CFI_I4 is not set
470# CONFIG_MTD_CFI_I8 is not set 506# CONFIG_MTD_CFI_I8 is not set
507CONFIG_MTD_CFI_INTELEXT=y
508# CONFIG_MTD_CFI_AMDSTD is not set
509# CONFIG_MTD_CFI_STAA is not set
510# CONFIG_MTD_PSD4256G is not set
511CONFIG_MTD_CFI_UTIL=y
471CONFIG_MTD_RAM=y 512CONFIG_MTD_RAM=y
472# CONFIG_MTD_ROM is not set 513CONFIG_MTD_ROM=m
473# CONFIG_MTD_ABSENT is not set 514# CONFIG_MTD_ABSENT is not set
474 515
475# 516#
476# Mapping drivers for chip access 517# Mapping drivers for chip access
477# 518#
478# CONFIG_MTD_COMPLEX_MAPPINGS is not set 519CONFIG_MTD_COMPLEX_MAPPINGS=y
479CONFIG_MTD_UCLINUX=y 520# CONFIG_MTD_PHYSMAP is not set
521CONFIG_MTD_GPIO_ADDR=y
522# CONFIG_MTD_UCLINUX is not set
480# CONFIG_MTD_PLATRAM is not set 523# CONFIG_MTD_PLATRAM is not set
481 524
482# 525#
483# Self-contained MTD device drivers 526# Self-contained MTD device drivers
484# 527#
528# CONFIG_MTD_DATAFLASH is not set
529# CONFIG_MTD_M25P80 is not set
485# CONFIG_MTD_SLRAM is not set 530# CONFIG_MTD_SLRAM is not set
486# CONFIG_MTD_PHRAM is not set 531# CONFIG_MTD_PHRAM is not set
487# CONFIG_MTD_MTDRAM is not set 532# CONFIG_MTD_MTDRAM is not set
@@ -497,36 +542,36 @@ CONFIG_MTD_UCLINUX=y
497# CONFIG_MTD_ONENAND is not set 542# CONFIG_MTD_ONENAND is not set
498 543
499# 544#
500# UBI - Unsorted block images 545# LPDDR flash memory drivers
501# 546#
502# CONFIG_MTD_UBI is not set 547# CONFIG_MTD_LPDDR is not set
503 548
504# 549#
505# Parallel port support 550# UBI - Unsorted block images
506# 551#
552# CONFIG_MTD_UBI is not set
507# CONFIG_PARPORT is not set 553# CONFIG_PARPORT is not set
508 554CONFIG_BLK_DEV=y
509#
510# Plug and Play support
511#
512# CONFIG_PNPACPI is not set
513
514#
515# Block devices
516#
517# CONFIG_BLK_DEV_COW_COMMON is not set 555# CONFIG_BLK_DEV_COW_COMMON is not set
518# CONFIG_BLK_DEV_LOOP is not set 556# CONFIG_BLK_DEV_LOOP is not set
519# CONFIG_BLK_DEV_NBD is not set 557# CONFIG_BLK_DEV_NBD is not set
520CONFIG_BLK_DEV_RAM=y 558CONFIG_BLK_DEV_RAM=y
521CONFIG_BLK_DEV_RAM_COUNT=16 559CONFIG_BLK_DEV_RAM_COUNT=16
522CONFIG_BLK_DEV_RAM_SIZE=4096 560CONFIG_BLK_DEV_RAM_SIZE=4096
523CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 561# CONFIG_BLK_DEV_XIP is not set
524# CONFIG_CDROM_PKTCDVD is not set 562# CONFIG_CDROM_PKTCDVD is not set
525# CONFIG_ATA_OVER_ETH is not set 563# CONFIG_ATA_OVER_ETH is not set
564# CONFIG_BLK_DEV_HD is not set
565CONFIG_MISC_DEVICES=y
566# CONFIG_ENCLOSURE_SERVICES is not set
567# CONFIG_C2PORT is not set
526 568
527# 569#
528# Misc devices 570# EEPROM support
529# 571#
572# CONFIG_EEPROM_AT25 is not set
573# CONFIG_EEPROM_93CX6 is not set
574CONFIG_HAVE_IDE=y
530# CONFIG_IDE is not set 575# CONFIG_IDE is not set
531 576
532# 577#
@@ -534,35 +579,20 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
534# 579#
535# CONFIG_RAID_ATTRS is not set 580# CONFIG_RAID_ATTRS is not set
536# CONFIG_SCSI is not set 581# CONFIG_SCSI is not set
582# CONFIG_SCSI_DMA is not set
537# CONFIG_SCSI_NETLINK is not set 583# CONFIG_SCSI_NETLINK is not set
538# CONFIG_ATA is not set 584# CONFIG_ATA is not set
539
540#
541# Multi-device support (RAID and LVM)
542#
543# CONFIG_MD is not set 585# CONFIG_MD is not set
544
545#
546# Network device support
547#
548CONFIG_NETDEVICES=y 586CONFIG_NETDEVICES=y
587CONFIG_COMPAT_NET_DEV_OPS=y
549# CONFIG_DUMMY is not set 588# CONFIG_DUMMY is not set
550# CONFIG_BONDING is not set 589# CONFIG_BONDING is not set
590# CONFIG_MACVLAN is not set
551# CONFIG_EQUALIZER is not set 591# CONFIG_EQUALIZER is not set
552# CONFIG_TUN is not set 592# CONFIG_TUN is not set
553# CONFIG_PHYLIB is not set 593# CONFIG_VETH is not set
554 594# CONFIG_NET_ETHERNET is not set
555#
556# Ethernet (10 or 100Mbit)
557#
558CONFIG_NET_ETHERNET=y
559CONFIG_MII=y
560CONFIG_SMC91X=y
561# CONFIG_BFIN_MAC is not set
562# CONFIG_SMSC911X is not set
563# CONFIG_DM9000 is not set
564# CONFIG_NETDEV_1000 is not set 595# CONFIG_NETDEV_1000 is not set
565# CONFIG_AX88180 is not set
566# CONFIG_NETDEV_10000 is not set 596# CONFIG_NETDEV_10000 is not set
567 597
568# 598#
@@ -570,22 +600,17 @@ CONFIG_SMC91X=y
570# 600#
571# CONFIG_WLAN_PRE80211 is not set 601# CONFIG_WLAN_PRE80211 is not set
572# CONFIG_WLAN_80211 is not set 602# CONFIG_WLAN_80211 is not set
603
604#
605# Enable WiMAX (Networking options) to see the WiMAX drivers
606#
573# CONFIG_WAN is not set 607# CONFIG_WAN is not set
574# CONFIG_PPP is not set 608# CONFIG_PPP is not set
575# CONFIG_SLIP is not set 609# CONFIG_SLIP is not set
576# CONFIG_SHAPER is not set
577# CONFIG_NETCONSOLE is not set 610# CONFIG_NETCONSOLE is not set
578# CONFIG_NETPOLL is not set 611# CONFIG_NETPOLL is not set
579# CONFIG_NET_POLL_CONTROLLER is not set 612# CONFIG_NET_POLL_CONTROLLER is not set
580
581#
582# ISDN subsystem
583#
584# CONFIG_ISDN is not set 613# CONFIG_ISDN is not set
585
586#
587# Telephony Support
588#
589# CONFIG_PHONE is not set 614# CONFIG_PHONE is not set
590 615
591# 616#
@@ -602,16 +627,15 @@ CONFIG_SMC91X=y
602# 627#
603# Character devices 628# Character devices
604# 629#
605# CONFIG_AD9960 is not set 630CONFIG_BFIN_DMA_INTERFACE=m
606# CONFIG_SPI_ADC_BF533 is not set 631# CONFIG_BFIN_PPI is not set
607# CONFIG_BF5xx_PFLAGS is not set 632# CONFIG_BFIN_PPIFCD is not set
608# CONFIG_BF5xx_PPIFCD is not set
609# CONFIG_BFIN_SIMPLE_TIMER is not set 633# CONFIG_BFIN_SIMPLE_TIMER is not set
610# CONFIG_BF5xx_PPI is not set 634# CONFIG_BFIN_SPI_ADC is not set
611CONFIG_BFIN_SPORT=y 635CONFIG_BFIN_SPORT=y
612# CONFIG_BFIN_TIMER_LATENCY is not set
613# CONFIG_VT is not set 636# CONFIG_VT is not set
614# CONFIG_DEVKMEM is not set 637# CONFIG_DEVKMEM is not set
638# CONFIG_BFIN_JTAG_COMM is not set
615# CONFIG_SERIAL_NONSTANDARD is not set 639# CONFIG_SERIAL_NONSTANDARD is not set
616 640
617# 641#
@@ -622,6 +646,7 @@ CONFIG_BFIN_SPORT=y
622# 646#
623# Non-8250 serial port support 647# Non-8250 serial port support
624# 648#
649# CONFIG_SERIAL_MAX3100 is not set
625CONFIG_SERIAL_BFIN=y 650CONFIG_SERIAL_BFIN=y
626CONFIG_SERIAL_BFIN_CONSOLE=y 651CONFIG_SERIAL_BFIN_CONSOLE=y
627CONFIG_SERIAL_BFIN_DMA=y 652CONFIG_SERIAL_BFIN_DMA=y
@@ -634,165 +659,201 @@ CONFIG_SERIAL_CORE=y
634CONFIG_SERIAL_CORE_CONSOLE=y 659CONFIG_SERIAL_CORE_CONSOLE=y
635# CONFIG_SERIAL_BFIN_SPORT is not set 660# CONFIG_SERIAL_BFIN_SPORT is not set
636CONFIG_UNIX98_PTYS=y 661CONFIG_UNIX98_PTYS=y
662# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
637# CONFIG_LEGACY_PTYS is not set 663# CONFIG_LEGACY_PTYS is not set
638 664
639# 665#
640# CAN, the car bus and industrial fieldbus 666# CAN, the car bus and industrial fieldbus
641# 667#
642# CONFIG_CAN4LINUX is not set 668# CONFIG_CAN4LINUX is not set
643
644#
645# IPMI
646#
647# CONFIG_IPMI_HANDLER is not set 669# CONFIG_IPMI_HANDLER is not set
648# CONFIG_WATCHDOG is not set
649# CONFIG_HW_RANDOM is not set 670# CONFIG_HW_RANDOM is not set
650# CONFIG_GEN_RTC is not set
651# CONFIG_R3964 is not set 671# CONFIG_R3964 is not set
652# CONFIG_RAW_DRIVER is not set 672# CONFIG_RAW_DRIVER is not set
673# CONFIG_TCG_TPM is not set
674# CONFIG_I2C is not set
675CONFIG_SPI=y
676CONFIG_SPI_MASTER=y
653 677
654# 678#
655# TPM devices 679# SPI Master Controller Drivers
656# 680#
657# CONFIG_TCG_TPM is not set 681CONFIG_SPI_BFIN=y
658# CONFIG_I2C is not set 682# CONFIG_SPI_BFIN_LOCK is not set
683# CONFIG_SPI_BFIN_SPORT is not set
684# CONFIG_SPI_BITBANG is not set
685# CONFIG_SPI_GPIO is not set
659 686
687#
688# SPI Protocol Masters
689#
690# CONFIG_SPI_SPIDEV is not set
691# CONFIG_SPI_TLE62X0 is not set
660CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 692CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
661CONFIG_GPIOLIB=y 693CONFIG_GPIOLIB=y
662CONFIG_GPIO_SYSFS=y 694CONFIG_GPIO_SYSFS=y
663 695
664# 696#
665# SPI support 697# Memory mapped GPIO expanders:
698#
699
700#
701# I2C GPIO expanders:
666# 702#
667# CONFIG_SPI is not set
668# CONFIG_SPI_MASTER is not set
669 703
670# 704#
671# Dallas's 1-wire bus 705# PCI GPIO expanders:
672# 706#
707
708#
709# SPI GPIO expanders:
710#
711# CONFIG_GPIO_MAX7301 is not set
712# CONFIG_GPIO_MCP23S08 is not set
673# CONFIG_W1 is not set 713# CONFIG_W1 is not set
714# CONFIG_POWER_SUPPLY is not set
674CONFIG_HWMON=y 715CONFIG_HWMON=y
675# CONFIG_HWMON_VID is not set 716# CONFIG_HWMON_VID is not set
676# CONFIG_SENSORS_ABITUGURU is not set 717# CONFIG_SENSORS_ADCXX is not set
677# CONFIG_SENSORS_F71805F is not set 718# CONFIG_SENSORS_F71805F is not set
719# CONFIG_SENSORS_F71882FG is not set
720# CONFIG_SENSORS_IT87 is not set
721# CONFIG_SENSORS_LM70 is not set
722# CONFIG_SENSORS_MAX1111 is not set
723# CONFIG_SENSORS_PC87360 is not set
678# CONFIG_SENSORS_PC87427 is not set 724# CONFIG_SENSORS_PC87427 is not set
725# CONFIG_SENSORS_SHT15 is not set
679# CONFIG_SENSORS_SMSC47M1 is not set 726# CONFIG_SENSORS_SMSC47M1 is not set
680# CONFIG_SENSORS_SMSC47B397 is not set 727# CONFIG_SENSORS_SMSC47B397 is not set
681# CONFIG_SENSORS_VT1211 is not set 728# CONFIG_SENSORS_VT1211 is not set
682# CONFIG_SENSORS_W83627HF is not set 729# CONFIG_SENSORS_W83627HF is not set
730# CONFIG_SENSORS_W83627EHF is not set
683# CONFIG_HWMON_DEBUG_CHIP is not set 731# CONFIG_HWMON_DEBUG_CHIP is not set
732# CONFIG_THERMAL is not set
733# CONFIG_THERMAL_HWMON is not set
734# CONFIG_WATCHDOG is not set
735CONFIG_SSB_POSSIBLE=y
736
737#
738# Sonics Silicon Backplane
739#
740# CONFIG_SSB is not set
684 741
685# 742#
686# Multifunction device drivers 743# Multifunction device drivers
687# 744#
745# CONFIG_MFD_CORE is not set
688# CONFIG_MFD_SM501 is not set 746# CONFIG_MFD_SM501 is not set
747# CONFIG_HTC_PASIC3 is not set
748# CONFIG_MFD_TMIO is not set
749# CONFIG_REGULATOR is not set
689 750
690# 751#
691# Multimedia devices 752# Multimedia devices
692# 753#
754
755#
756# Multimedia core support
757#
693# CONFIG_VIDEO_DEV is not set 758# CONFIG_VIDEO_DEV is not set
694# CONFIG_DVB_CORE is not set 759# CONFIG_DVB_CORE is not set
695# CONFIG_DAB is not set 760# CONFIG_VIDEO_MEDIA is not set
696 761
697# 762#
698# Graphics support 763# Multimedia drivers
699# 764#
700# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 765# CONFIG_DAB is not set
701 766
702# 767#
703# Display device support 768# Graphics support
704# 769#
705# CONFIG_DISPLAY_SUPPORT is not set
706# CONFIG_VGASTATE is not set 770# CONFIG_VGASTATE is not set
771# CONFIG_VIDEO_OUTPUT_CONTROL is not set
707# CONFIG_FB is not set 772# CONFIG_FB is not set
773# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
708 774
709# 775#
710# Sound 776# Display device support
711# 777#
778# CONFIG_DISPLAY_SUPPORT is not set
712# CONFIG_SOUND is not set 779# CONFIG_SOUND is not set
713 780CONFIG_USB_SUPPORT=y
714#
715# USB support
716#
717CONFIG_USB_ARCH_HAS_HCD=y 781CONFIG_USB_ARCH_HAS_HCD=y
718# CONFIG_USB_ARCH_HAS_OHCI is not set 782# CONFIG_USB_ARCH_HAS_OHCI is not set
719# CONFIG_USB_ARCH_HAS_EHCI is not set 783# CONFIG_USB_ARCH_HAS_EHCI is not set
720# CONFIG_USB is not set 784# CONFIG_USB is not set
721# CONFIG_USB_MUSB_HDRC is not set 785# CONFIG_USB_OTG_WHITELIST is not set
786# CONFIG_USB_OTG_BLACKLIST_HUB is not set
722# CONFIG_USB_GADGET_MUSB_HDRC is not set 787# CONFIG_USB_GADGET_MUSB_HDRC is not set
723 788
724# 789#
725# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 790# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
726#
727
728#
729# USB Gadget Support
730# 791#
731CONFIG_USB_GADGET=y 792CONFIG_USB_GADGET=y
732# CONFIG_USB_GADGET_DEBUG_FILES is not set 793# CONFIG_USB_GADGET_DEBUG_FILES is not set
794# CONFIG_USB_GADGET_DEBUG_FS is not set
795CONFIG_USB_GADGET_VBUS_DRAW=2
733CONFIG_USB_GADGET_SELECTED=y 796CONFIG_USB_GADGET_SELECTED=y
797# CONFIG_USB_GADGET_AT91 is not set
798# CONFIG_USB_GADGET_ATMEL_USBA is not set
734# CONFIG_USB_GADGET_FSL_USB2 is not set 799# CONFIG_USB_GADGET_FSL_USB2 is not set
800# CONFIG_USB_GADGET_LH7A40X is not set
801# CONFIG_USB_GADGET_OMAP is not set
802# CONFIG_USB_GADGET_PXA25X is not set
803# CONFIG_USB_GADGET_PXA27X is not set
804# CONFIG_USB_GADGET_S3C2410 is not set
805# CONFIG_USB_GADGET_IMX is not set
806# CONFIG_USB_GADGET_M66592 is not set
807# CONFIG_USB_GADGET_AMD5536UDC is not set
808# CONFIG_USB_GADGET_FSL_QE is not set
809# CONFIG_USB_GADGET_CI13XXX is not set
735CONFIG_USB_GADGET_NET2272=y 810CONFIG_USB_GADGET_NET2272=y
736CONFIG_USB_NET2272=y 811CONFIG_USB_NET2272=y
737# CONFIG_USB_GADGET_NET2280 is not set 812# CONFIG_USB_GADGET_NET2280 is not set
738# CONFIG_USB_GADGET_PXA2XX is not set
739# CONFIG_USB_GADGET_GOKU is not set 813# CONFIG_USB_GADGET_GOKU is not set
740# CONFIG_USB_GADGET_LH7A40X is not set
741# CONFIG_USB_GADGET_OMAP is not set
742# CONFIG_USB_GADGET_AT91 is not set
743# CONFIG_USB_GADGET_DUMMY_HCD is not set 814# CONFIG_USB_GADGET_DUMMY_HCD is not set
744CONFIG_USB_GADGET_DUALSPEED=y 815CONFIG_USB_GADGET_DUALSPEED=y
745# CONFIG_USB_ZERO is not set 816# CONFIG_USB_ZERO is not set
746# CONFIG_USB_ETH is not set 817# CONFIG_USB_AUDIO is not set
818CONFIG_USB_ETH=y
819CONFIG_USB_ETH_RNDIS=y
747# CONFIG_USB_GADGETFS is not set 820# CONFIG_USB_GADGETFS is not set
748# CONFIG_USB_FILE_STORAGE is not set 821# CONFIG_USB_FILE_STORAGE is not set
749# CONFIG_USB_G_SERIAL is not set 822# CONFIG_USB_G_SERIAL is not set
750# CONFIG_USB_MIDI_GADGET is not set 823# CONFIG_USB_MIDI_GADGET is not set
751# CONFIG_MMC is not set 824# CONFIG_USB_G_PRINTER is not set
752 825# CONFIG_USB_CDC_COMPOSITE is not set
753#
754# LED devices
755#
756# CONFIG_NEW_LEDS is not set
757
758#
759# LED drivers
760#
761
762#
763# LED Triggers
764#
765 826
766# 827#
767# InfiniBand support 828# OTG and related infrastructure
768# 829#
830# CONFIG_USB_GPIO_VBUS is not set
831# CONFIG_NOP_USB_XCEIV is not set
832CONFIG_MMC=y
833# CONFIG_MMC_DEBUG is not set
834# CONFIG_MMC_UNSAFE_RESUME is not set
769 835
770# 836#
771# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 837# MMC/SD/SDIO Card Drivers
772# 838#
839CONFIG_MMC_BLOCK=y
840CONFIG_MMC_BLOCK_BOUNCE=y
841# CONFIG_SDIO_UART is not set
842# CONFIG_MMC_TEST is not set
773 843
774# 844#
775# Real Time Clock 845# MMC/SD/SDIO Host Controller Drivers
776# 846#
847# CONFIG_MMC_SDHCI is not set
848CONFIG_MMC_SPI=m
849# CONFIG_MEMSTICK is not set
850# CONFIG_NEW_LEDS is not set
851# CONFIG_ACCESSIBILITY is not set
777# CONFIG_RTC_CLASS is not set 852# CONFIG_RTC_CLASS is not set
778 853# CONFIG_DMADEVICES is not set
779# 854# CONFIG_AUXDISPLAY is not set
780# DMA Engine support 855# CONFIG_UIO is not set
781# 856# CONFIG_STAGING is not set
782# CONFIG_DMA_ENGINE is not set
783
784#
785# DMA Clients
786#
787
788#
789# DMA Devices
790#
791
792#
793# PBX support
794#
795# CONFIG_PBX is not set
796 857
797# 858#
798# File systems 859# File systems
@@ -802,25 +863,29 @@ CONFIG_EXT2_FS_XATTR=y
802# CONFIG_EXT2_FS_POSIX_ACL is not set 863# CONFIG_EXT2_FS_POSIX_ACL is not set
803# CONFIG_EXT2_FS_SECURITY is not set 864# CONFIG_EXT2_FS_SECURITY is not set
804# CONFIG_EXT3_FS is not set 865# CONFIG_EXT3_FS is not set
805# CONFIG_EXT4DEV_FS is not set 866# CONFIG_EXT4_FS is not set
806CONFIG_FS_MBCACHE=y 867CONFIG_FS_MBCACHE=y
807# CONFIG_REISERFS_FS is not set 868# CONFIG_REISERFS_FS is not set
808# CONFIG_JFS_FS is not set 869# CONFIG_JFS_FS is not set
809# CONFIG_FS_POSIX_ACL is not set 870# CONFIG_FS_POSIX_ACL is not set
810# CONFIG_XFS_FS is not set 871# CONFIG_XFS_FS is not set
811# CONFIG_GFS2_FS is not set
812# CONFIG_OCFS2_FS is not set 872# CONFIG_OCFS2_FS is not set
813# CONFIG_MINIX_FS is not set 873# CONFIG_BTRFS_FS is not set
814# CONFIG_ROMFS_FS is not set 874CONFIG_FILE_LOCKING=y
875# CONFIG_DNOTIFY is not set
815CONFIG_INOTIFY=y 876CONFIG_INOTIFY=y
816CONFIG_INOTIFY_USER=y 877CONFIG_INOTIFY_USER=y
817# CONFIG_QUOTA is not set 878# CONFIG_QUOTA is not set
818# CONFIG_DNOTIFY is not set
819# CONFIG_AUTOFS_FS is not set 879# CONFIG_AUTOFS_FS is not set
820# CONFIG_AUTOFS4_FS is not set 880# CONFIG_AUTOFS4_FS is not set
821# CONFIG_FUSE_FS is not set 881# CONFIG_FUSE_FS is not set
822 882
823# 883#
884# Caches
885#
886# CONFIG_FSCACHE is not set
887
888#
824# CD-ROM/DVD Filesystems 889# CD-ROM/DVD Filesystems
825# 890#
826# CONFIG_ISO9660_FS is not set 891# CONFIG_ISO9660_FS is not set
@@ -829,8 +894,11 @@ CONFIG_INOTIFY_USER=y
829# 894#
830# DOS/FAT/NT Filesystems 895# DOS/FAT/NT Filesystems
831# 896#
832# CONFIG_MSDOS_FS is not set 897CONFIG_FAT_FS=y
833# CONFIG_VFAT_FS is not set 898CONFIG_MSDOS_FS=y
899CONFIG_VFAT_FS=y
900CONFIG_FAT_DEFAULT_CODEPAGE=437
901CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
834# CONFIG_NTFS_FS is not set 902# CONFIG_NTFS_FS is not set
835 903
836# 904#
@@ -841,12 +909,8 @@ CONFIG_PROC_SYSCTL=y
841CONFIG_SYSFS=y 909CONFIG_SYSFS=y
842# CONFIG_TMPFS is not set 910# CONFIG_TMPFS is not set
843# CONFIG_HUGETLB_PAGE is not set 911# CONFIG_HUGETLB_PAGE is not set
844CONFIG_RAMFS=y
845# CONFIG_CONFIGFS_FS is not set 912# CONFIG_CONFIGFS_FS is not set
846 913CONFIG_MISC_FILESYSTEMS=y
847#
848# Miscellaneous filesystems
849#
850# CONFIG_ADFS_FS is not set 914# CONFIG_ADFS_FS is not set
851# CONFIG_AFFS_FS is not set 915# CONFIG_AFFS_FS is not set
852# CONFIG_HFS_FS is not set 916# CONFIG_HFS_FS is not set
@@ -854,18 +918,29 @@ CONFIG_RAMFS=y
854# CONFIG_BEFS_FS is not set 918# CONFIG_BEFS_FS is not set
855# CONFIG_BFS_FS is not set 919# CONFIG_BFS_FS is not set
856# CONFIG_EFS_FS is not set 920# CONFIG_EFS_FS is not set
857# CONFIG_YAFFS_FS is not set 921CONFIG_JFFS2_FS=y
858# CONFIG_JFFS2_FS is not set 922CONFIG_JFFS2_FS_DEBUG=0
923CONFIG_JFFS2_FS_WRITEBUFFER=y
924# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
925# CONFIG_JFFS2_SUMMARY is not set
926# CONFIG_JFFS2_FS_XATTR is not set
927# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
928CONFIG_JFFS2_ZLIB=y
929# CONFIG_JFFS2_LZO is not set
930CONFIG_JFFS2_RTIME=y
931# CONFIG_JFFS2_RUBIN is not set
859# CONFIG_CRAMFS is not set 932# CONFIG_CRAMFS is not set
933# CONFIG_SQUASHFS is not set
860# CONFIG_VXFS_FS is not set 934# CONFIG_VXFS_FS is not set
935# CONFIG_MINIX_FS is not set
936# CONFIG_OMFS_FS is not set
861# CONFIG_HPFS_FS is not set 937# CONFIG_HPFS_FS is not set
862# CONFIG_QNX4FS_FS is not set 938# CONFIG_QNX4FS_FS is not set
939# CONFIG_ROMFS_FS is not set
863# CONFIG_SYSV_FS is not set 940# CONFIG_SYSV_FS is not set
864# CONFIG_UFS_FS is not set 941# CONFIG_UFS_FS is not set
865 942# CONFIG_NILFS2_FS is not set
866# 943CONFIG_NETWORK_FILESYSTEMS=y
867# Network File Systems
868#
869# CONFIG_NFS_FS is not set 944# CONFIG_NFS_FS is not set
870# CONFIG_NFSD is not set 945# CONFIG_NFSD is not set
871# CONFIG_SMB_FS is not set 946# CONFIG_SMB_FS is not set
@@ -873,41 +948,94 @@ CONFIG_RAMFS=y
873# CONFIG_NCP_FS is not set 948# CONFIG_NCP_FS is not set
874# CONFIG_CODA_FS is not set 949# CONFIG_CODA_FS is not set
875# CONFIG_AFS_FS is not set 950# CONFIG_AFS_FS is not set
876# CONFIG_9P_FS is not set
877 951
878# 952#
879# Partition Types 953# Partition Types
880# 954#
881# CONFIG_PARTITION_ADVANCED is not set 955# CONFIG_PARTITION_ADVANCED is not set
882CONFIG_MSDOS_PARTITION=y 956CONFIG_MSDOS_PARTITION=y
883 957CONFIG_NLS=y
884# 958CONFIG_NLS_DEFAULT="iso8859-1"
885# Native Language Support 959CONFIG_NLS_CODEPAGE_437=y
886# 960# CONFIG_NLS_CODEPAGE_737 is not set
887# CONFIG_NLS is not set 961# CONFIG_NLS_CODEPAGE_775 is not set
888 962# CONFIG_NLS_CODEPAGE_850 is not set
889# 963# CONFIG_NLS_CODEPAGE_852 is not set
890# Distributed Lock Manager 964# CONFIG_NLS_CODEPAGE_855 is not set
891# 965# CONFIG_NLS_CODEPAGE_857 is not set
966# CONFIG_NLS_CODEPAGE_860 is not set
967# CONFIG_NLS_CODEPAGE_861 is not set
968# CONFIG_NLS_CODEPAGE_862 is not set
969# CONFIG_NLS_CODEPAGE_863 is not set
970# CONFIG_NLS_CODEPAGE_864 is not set
971# CONFIG_NLS_CODEPAGE_865 is not set
972# CONFIG_NLS_CODEPAGE_866 is not set
973# CONFIG_NLS_CODEPAGE_869 is not set
974# CONFIG_NLS_CODEPAGE_936 is not set
975# CONFIG_NLS_CODEPAGE_950 is not set
976# CONFIG_NLS_CODEPAGE_932 is not set
977# CONFIG_NLS_CODEPAGE_949 is not set
978# CONFIG_NLS_CODEPAGE_874 is not set
979# CONFIG_NLS_ISO8859_8 is not set
980# CONFIG_NLS_CODEPAGE_1250 is not set
981# CONFIG_NLS_CODEPAGE_1251 is not set
982# CONFIG_NLS_ASCII is not set
983CONFIG_NLS_ISO8859_1=y
984# CONFIG_NLS_ISO8859_2 is not set
985# CONFIG_NLS_ISO8859_3 is not set
986# CONFIG_NLS_ISO8859_4 is not set
987# CONFIG_NLS_ISO8859_5 is not set
988# CONFIG_NLS_ISO8859_6 is not set
989# CONFIG_NLS_ISO8859_7 is not set
990# CONFIG_NLS_ISO8859_9 is not set
991# CONFIG_NLS_ISO8859_13 is not set
992# CONFIG_NLS_ISO8859_14 is not set
993# CONFIG_NLS_ISO8859_15 is not set
994# CONFIG_NLS_KOI8_R is not set
995# CONFIG_NLS_KOI8_U is not set
996# CONFIG_NLS_UTF8 is not set
892# CONFIG_DLM is not set 997# CONFIG_DLM is not set
893 998
894# 999#
895# Profiling support
896#
897# CONFIG_PROFILING is not set
898
899#
900# Kernel hacking 1000# Kernel hacking
901# 1001#
902# CONFIG_PRINTK_TIME is not set 1002# CONFIG_PRINTK_TIME is not set
1003CONFIG_ENABLE_WARN_DEPRECATED=y
903CONFIG_ENABLE_MUST_CHECK=y 1004CONFIG_ENABLE_MUST_CHECK=y
1005CONFIG_FRAME_WARN=1024
904# CONFIG_MAGIC_SYSRQ is not set 1006# CONFIG_MAGIC_SYSRQ is not set
905# CONFIG_UNUSED_SYMBOLS is not set 1007# CONFIG_UNUSED_SYMBOLS is not set
906CONFIG_DEBUG_FS=y 1008CONFIG_DEBUG_FS=y
907# CONFIG_HEADERS_CHECK is not set 1009# CONFIG_HEADERS_CHECK is not set
1010CONFIG_DEBUG_SECTION_MISMATCH=y
908# CONFIG_DEBUG_KERNEL is not set 1011# CONFIG_DEBUG_KERNEL is not set
909CONFIG_DEBUG_BUGVERBOSE=y 1012# CONFIG_DEBUG_BUGVERBOSE is not set
1013# CONFIG_DEBUG_MEMORY_INIT is not set
1014# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1015CONFIG_HAVE_FUNCTION_TRACER=y
1016CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1017CONFIG_TRACING_SUPPORT=y
1018
1019#
1020# Tracers
1021#
1022# CONFIG_FUNCTION_TRACER is not set
1023# CONFIG_IRQSOFF_TRACER is not set
1024# CONFIG_SCHED_TRACER is not set
1025# CONFIG_CONTEXT_SWITCH_TRACER is not set
1026# CONFIG_EVENT_TRACER is not set
1027# CONFIG_BOOT_TRACER is not set
1028# CONFIG_TRACE_BRANCH_PROFILING is not set
1029# CONFIG_STACK_TRACER is not set
1030# CONFIG_KMEMTRACE is not set
1031# CONFIG_WORKQUEUE_TRACER is not set
1032# CONFIG_BLK_DEV_IO_TRACE is not set
1033# CONFIG_DYNAMIC_DEBUG is not set
1034# CONFIG_SAMPLES is not set
1035CONFIG_HAVE_ARCH_KGDB=y
1036CONFIG_DEBUG_VERBOSE=y
910CONFIG_DEBUG_MMRS=y 1037CONFIG_DEBUG_MMRS=y
1038# CONFIG_DEBUG_DOUBLEFAULT is not set
911CONFIG_DEBUG_HUNT_FOR_ZERO=y 1039CONFIG_DEBUG_HUNT_FOR_ZERO=y
912CONFIG_DEBUG_BFIN_HWTRACE_ON=y 1040CONFIG_DEBUG_BFIN_HWTRACE_ON=y
913CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y 1041CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
@@ -916,34 +1044,40 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
916CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1044CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
917# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1045# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
918# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1046# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
919# CONFIG_EARLY_PRINTK is not set 1047CONFIG_EARLY_PRINTK=y
920CONFIG_CPLB_INFO=y 1048CONFIG_CPLB_INFO=y
921CONFIG_ACCESS_CHECK=y 1049CONFIG_ACCESS_CHECK=y
1050# CONFIG_BFIN_ISRAM_SELF_TEST is not set
922 1051
923# 1052#
924# Security options 1053# Security options
925# 1054#
926# CONFIG_KEYS is not set 1055# CONFIG_KEYS is not set
927CONFIG_SECURITY=y 1056CONFIG_SECURITY=y
1057# CONFIG_SECURITYFS is not set
928# CONFIG_SECURITY_NETWORK is not set 1058# CONFIG_SECURITY_NETWORK is not set
929CONFIG_SECURITY_CAPABILITIES=y 1059# CONFIG_SECURITY_PATH is not set
930 1060# CONFIG_SECURITY_FILE_CAPABILITIES is not set
931# 1061# CONFIG_SECURITY_TOMOYO is not set
932# Cryptographic options
933#
934# CONFIG_CRYPTO is not set 1062# CONFIG_CRYPTO is not set
1063# CONFIG_BINARY_PRINTF is not set
935 1064
936# 1065#
937# Library routines 1066# Library routines
938# 1067#
939CONFIG_BITREVERSE=y 1068CONFIG_BITREVERSE=y
1069CONFIG_GENERIC_FIND_LAST_BIT=y
940CONFIG_CRC_CCITT=m 1070CONFIG_CRC_CCITT=m
941# CONFIG_CRC16 is not set 1071# CONFIG_CRC16 is not set
942# CONFIG_CRC_ITU_T is not set 1072# CONFIG_CRC_T10DIF is not set
1073CONFIG_CRC_ITU_T=y
943CONFIG_CRC32=y 1074CONFIG_CRC32=y
1075CONFIG_CRC7=y
944# CONFIG_LIBCRC32C is not set 1076# CONFIG_LIBCRC32C is not set
945CONFIG_ZLIB_INFLATE=y 1077CONFIG_ZLIB_INFLATE=y
946CONFIG_PLIST=y 1078CONFIG_ZLIB_DEFLATE=y
1079CONFIG_DECOMPRESS_LZMA=y
947CONFIG_HAS_IOMEM=y 1080CONFIG_HAS_IOMEM=y
948CONFIG_HAS_IOPORT=y 1081CONFIG_HAS_IOPORT=y
949CONFIG_HAS_DMA=y 1082CONFIG_HAS_DMA=y
1083CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig
index acca4e51a45a..7f579cf51127 100644
--- a/arch/blackfin/configs/CM-BF548_defconfig
+++ b/arch/blackfin/configs/CM-BF548_defconfig
@@ -1,14 +1,14 @@
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.4 3# Linux kernel version: 2.6.30.5
4# 4#
5# CONFIG_MMU is not set 5# CONFIG_MMU is not set
6# CONFIG_FPU is not set 6# CONFIG_FPU is not set
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
9CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
10CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
11CONFIG_SEMAPHORE_SLEEPERS=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
@@ -16,6 +16,9 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
17CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20 23
21# 24#
@@ -26,79 +29,100 @@ CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
27CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
29CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
30CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
33# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
34# CONFIG_USER_NS is not set
35# CONFIG_PID_NS is not set
36# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
37CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
39CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
56# CONFIG_GROUP_SCHED is not set
40# CONFIG_CGROUPS is not set 57# CONFIG_CGROUPS is not set
41CONFIG_FAIR_GROUP_SCHED=y 58# CONFIG_SYSFS_DEPRECATED_V2 is not set
42CONFIG_FAIR_USER_SCHED=y
43# CONFIG_FAIR_CGROUP_SCHED is not set
44# CONFIG_SYSFS_DEPRECATED is not set
45# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
60# CONFIG_NAMESPACES is not set
46CONFIG_BLK_DEV_INITRD=y 61CONFIG_BLK_DEV_INITRD=y
47CONFIG_INITRAMFS_SOURCE="" 62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
49# CONFIG_SYSCTL is not set 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
50CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
51CONFIG_UID16=y 70# CONFIG_UID16 is not set
52# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
53CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
74# CONFIG_STRIP_ASM_SYMS is not set
55CONFIG_HOTPLUG=y 75CONFIG_HOTPLUG=y
56CONFIG_PRINTK=y 76CONFIG_PRINTK=y
57CONFIG_BUG=y 77CONFIG_BUG=y
58# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
59CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
60# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
61CONFIG_ANON_INODES=y
62CONFIG_EPOLL=y 81CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
83CONFIG_TIMERFD=y
64CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
85CONFIG_AIO=y
65CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 87CONFIG_COMPAT_BRK=y
67# CONFIG_NP2 is not set
68CONFIG_SLAB=y 88CONFIG_SLAB=y
69# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
92# CONFIG_PROFILING is not set
93# CONFIG_MARKERS is not set
94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
71CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
72CONFIG_RT_MUTEXES=y
73CONFIG_TINY_SHMEM=y
74CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
75CONFIG_MODULES=y 99CONFIG_MODULES=y
100# CONFIG_MODULE_FORCE_LOAD is not set
76CONFIG_MODULE_UNLOAD=y 101CONFIG_MODULE_UNLOAD=y
77# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
78# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
79# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
80CONFIG_KMOD=y
81CONFIG_BLOCK=y 105CONFIG_BLOCK=y
82# CONFIG_LBD is not set 106# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
108# CONFIG_BLK_DEV_INTEGRITY is not set
86 109
87# 110#
88# IO Schedulers 111# IO Schedulers
89# 112#
90CONFIG_IOSCHED_NOOP=y 113CONFIG_IOSCHED_NOOP=y
91CONFIG_IOSCHED_AS=y 114# CONFIG_IOSCHED_AS is not set
92# CONFIG_IOSCHED_DEADLINE is not set 115# CONFIG_IOSCHED_DEADLINE is not set
93CONFIG_IOSCHED_CFQ=y 116CONFIG_IOSCHED_CFQ=y
94CONFIG_DEFAULT_AS=y 117# CONFIG_DEFAULT_AS is not set
95# CONFIG_DEFAULT_DEADLINE is not set 118# CONFIG_DEFAULT_DEADLINE is not set
96# CONFIG_DEFAULT_CFQ is not set 119# CONFIG_DEFAULT_CFQ is not set
97# CONFIG_DEFAULT_NOOP is not set 120CONFIG_DEFAULT_NOOP=y
98CONFIG_DEFAULT_IOSCHED="anticipatory" 121CONFIG_DEFAULT_IOSCHED="noop"
99# CONFIG_PREEMPT_NONE is not set 122CONFIG_PREEMPT_NONE=y
100CONFIG_PREEMPT_VOLUNTARY=y 123# CONFIG_PREEMPT_VOLUNTARY is not set
101# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
125# CONFIG_FREEZER is not set
102 126
103# 127#
104# Blackfin Processor Options 128# Blackfin Processor Options
@@ -107,6 +131,10 @@ CONFIG_PREEMPT_VOLUNTARY=y
107# 131#
108# Processor and Board Settings 132# Processor and Board Settings
109# 133#
134# CONFIG_BF512 is not set
135# CONFIG_BF514 is not set
136# CONFIG_BF516 is not set
137# CONFIG_BF518 is not set
110# CONFIG_BF522 is not set 138# CONFIG_BF522 is not set
111# CONFIG_BF523 is not set 139# CONFIG_BF523 is not set
112# CONFIG_BF524 is not set 140# CONFIG_BF524 is not set
@@ -119,19 +147,29 @@ CONFIG_PREEMPT_VOLUNTARY=y
119# CONFIG_BF534 is not set 147# CONFIG_BF534 is not set
120# CONFIG_BF536 is not set 148# CONFIG_BF536 is not set
121# CONFIG_BF537 is not set 149# CONFIG_BF537 is not set
150# CONFIG_BF538 is not set
151# CONFIG_BF539 is not set
122# CONFIG_BF542 is not set 152# CONFIG_BF542 is not set
153# CONFIG_BF542M is not set
123# CONFIG_BF544 is not set 154# CONFIG_BF544 is not set
155# CONFIG_BF544M is not set
124# CONFIG_BF547 is not set 156# CONFIG_BF547 is not set
125CONFIG_BF548=y 157# CONFIG_BF547M is not set
158CONFIG_BF548_std=y
159# CONFIG_BF548M is not set
126# CONFIG_BF549 is not set 160# CONFIG_BF549 is not set
161# CONFIG_BF549M is not set
127# CONFIG_BF561 is not set 162# CONFIG_BF561 is not set
163CONFIG_BF_REV_MIN=0
164CONFIG_BF_REV_MAX=2
128# CONFIG_BF_REV_0_0 is not set 165# CONFIG_BF_REV_0_0 is not set
129# CONFIG_BF_REV_0_1 is not set 166# CONFIG_BF_REV_0_1 is not set
130CONFIG_BF_REV_0_2=y 167# CONFIG_BF_REV_0_2 is not set
131# CONFIG_BF_REV_0_3 is not set 168# CONFIG_BF_REV_0_3 is not set
132# CONFIG_BF_REV_0_4 is not set 169# CONFIG_BF_REV_0_4 is not set
133# CONFIG_BF_REV_0_5 is not set 170# CONFIG_BF_REV_0_5 is not set
134# CONFIG_BF_REV_ANY is not set 171# CONFIG_BF_REV_0_6 is not set
172CONFIG_BF_REV_ANY=y
135# CONFIG_BF_REV_NONE is not set 173# CONFIG_BF_REV_NONE is not set
136CONFIG_BF54x=y 174CONFIG_BF54x=y
137CONFIG_IRQ_PLL_WAKEUP=7 175CONFIG_IRQ_PLL_WAKEUP=7
@@ -140,15 +178,12 @@ CONFIG_IRQ_SPORT0_RX=9
140CONFIG_IRQ_SPORT0_TX=9 178CONFIG_IRQ_SPORT0_TX=9
141CONFIG_IRQ_SPORT1_RX=9 179CONFIG_IRQ_SPORT1_RX=9
142CONFIG_IRQ_SPORT1_TX=9 180CONFIG_IRQ_SPORT1_TX=9
181CONFIG_IRQ_SPI0=10
143CONFIG_IRQ_UART0_RX=10 182CONFIG_IRQ_UART0_RX=10
144CONFIG_IRQ_UART0_TX=10 183CONFIG_IRQ_UART0_TX=10
145CONFIG_IRQ_UART1_RX=10 184CONFIG_IRQ_UART1_RX=10
146CONFIG_IRQ_UART1_TX=10 185CONFIG_IRQ_UART1_TX=10
147CONFIG_IRQ_CNT=8 186CONFIG_IRQ_CNT=8
148CONFIG_IRQ_USB_INT0=11
149CONFIG_IRQ_USB_INT1=11
150CONFIG_IRQ_USB_INT2=11
151CONFIG_IRQ_USB_DMA=11
152CONFIG_IRQ_TIMER0=11 187CONFIG_IRQ_TIMER0=11
153CONFIG_IRQ_TIMER1=11 188CONFIG_IRQ_TIMER1=11
154CONFIG_IRQ_TIMER2=11 189CONFIG_IRQ_TIMER2=11
@@ -157,9 +192,21 @@ CONFIG_IRQ_TIMER4=11
157CONFIG_IRQ_TIMER5=11 192CONFIG_IRQ_TIMER5=11
158CONFIG_IRQ_TIMER6=11 193CONFIG_IRQ_TIMER6=11
159CONFIG_IRQ_TIMER7=11 194CONFIG_IRQ_TIMER7=11
195CONFIG_IRQ_USB_INT0=11
196CONFIG_IRQ_USB_INT1=11
197CONFIG_IRQ_USB_INT2=11
198CONFIG_IRQ_USB_DMA=11
160CONFIG_IRQ_TIMER8=11 199CONFIG_IRQ_TIMER8=11
161CONFIG_IRQ_TIMER9=11 200CONFIG_IRQ_TIMER9=11
162CONFIG_IRQ_TIMER10=11 201CONFIG_IRQ_TIMER10=11
202CONFIG_IRQ_SPORT2_RX=9
203CONFIG_IRQ_SPORT2_TX=9
204CONFIG_IRQ_SPORT3_RX=9
205CONFIG_IRQ_SPORT3_TX=9
206CONFIG_IRQ_SPI1=10
207CONFIG_IRQ_SPI2=10
208CONFIG_IRQ_TWI0=11
209CONFIG_IRQ_TWI1=11
163# CONFIG_BFIN548_EZKIT is not set 210# CONFIG_BFIN548_EZKIT is not set
164CONFIG_BFIN548_BLUETECHNIX_CM=y 211CONFIG_BFIN548_BLUETECHNIX_CM=y
165 212
@@ -167,6 +214,7 @@ CONFIG_BFIN548_BLUETECHNIX_CM=y
167# BF548 Specific Configuration 214# BF548 Specific Configuration
168# 215#
169# CONFIG_DEB_DMA_URGENT is not set 216# CONFIG_DEB_DMA_URGENT is not set
217# CONFIG_BF548_ATAPI_ALTERNATIVE_PORT is not set
170 218
171# 219#
172# Interrupt Priority Assignment 220# Interrupt Priority Assignment
@@ -182,7 +230,6 @@ CONFIG_IRQ_SPORT1_ERR=7
182CONFIG_IRQ_SPI0_ERR=7 230CONFIG_IRQ_SPI0_ERR=7
183CONFIG_IRQ_UART0_ERR=7 231CONFIG_IRQ_UART0_ERR=7
184CONFIG_IRQ_EPPI0=8 232CONFIG_IRQ_EPPI0=8
185CONFIG_IRQ_SPI0=10
186CONFIG_IRQ_PINT0=12 233CONFIG_IRQ_PINT0=12
187CONFIG_IRQ_PINT1=12 234CONFIG_IRQ_PINT1=12
188CONFIG_IRQ_MDMAS0=13 235CONFIG_IRQ_MDMAS0=13
@@ -197,18 +244,10 @@ CONFIG_IRQ_SPI2_ERR=7
197CONFIG_IRQ_UART1_ERR=7 244CONFIG_IRQ_UART1_ERR=7
198CONFIG_IRQ_UART2_ERR=7 245CONFIG_IRQ_UART2_ERR=7
199CONFIG_IRQ_CAN0_ERR=7 246CONFIG_IRQ_CAN0_ERR=7
200CONFIG_IRQ_SPORT2_RX=9
201CONFIG_IRQ_SPORT2_TX=9
202CONFIG_IRQ_SPORT3_RX=9
203CONFIG_IRQ_SPORT3_TX=9
204CONFIG_IRQ_EPPI1=9 247CONFIG_IRQ_EPPI1=9
205CONFIG_IRQ_EPPI2=9 248CONFIG_IRQ_EPPI2=9
206CONFIG_IRQ_SPI1=10
207CONFIG_IRQ_SPI2=10
208CONFIG_IRQ_ATAPI_RX=10 249CONFIG_IRQ_ATAPI_RX=10
209CONFIG_IRQ_ATAPI_TX=10 250CONFIG_IRQ_ATAPI_TX=10
210CONFIG_IRQ_TWI0=11
211CONFIG_IRQ_TWI1=11
212CONFIG_IRQ_CAN0_RX=11 251CONFIG_IRQ_CAN0_RX=11
213CONFIG_IRQ_CAN0_TX=11 252CONFIG_IRQ_CAN0_TX=11
214CONFIG_IRQ_MDMAS2=13 253CONFIG_IRQ_MDMAS2=13
@@ -255,6 +294,7 @@ CONFIG_PINT3_ASSIGN=0x02020303
255# Board customizations 294# Board customizations
256# 295#
257# CONFIG_CMDLINE_BOOL is not set 296# CONFIG_CMDLINE_BOOL is not set
297CONFIG_BOOT_LOAD=0x1000
258 298
259# 299#
260# Clock/PLL Setup 300# Clock/PLL Setup
@@ -274,16 +314,12 @@ CONFIG_HZ_250=y
274# CONFIG_HZ_300 is not set 314# CONFIG_HZ_300 is not set
275# CONFIG_HZ_1000 is not set 315# CONFIG_HZ_1000 is not set
276CONFIG_HZ=250 316CONFIG_HZ=250
317# CONFIG_SCHED_HRTICK is not set
277# CONFIG_GENERIC_TIME is not set 318# CONFIG_GENERIC_TIME is not set
278# CONFIG_TICK_ONESHOT is not set
279 319
280# 320#
281# Memory Setup 321# Misc
282# 322#
283CONFIG_MAX_MEM_SIZE=64
284# CONFIG_MEM_MT46V32M16_6T is not set
285CONFIG_MEM_MT46V32M16_5B=y
286CONFIG_BOOT_LOAD=0x1000
287CONFIG_BFIN_SCRATCH_REG_RETN=y 323CONFIG_BFIN_SCRATCH_REG_RETN=y
288# CONFIG_BFIN_SCRATCH_REG_RETE is not set 324# CONFIG_BFIN_SCRATCH_REG_RETE is not set
289# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set 325# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
@@ -310,6 +346,12 @@ CONFIG_ACCESS_OK_L1=y
310CONFIG_CACHELINE_ALIGNED_L1=y 346CONFIG_CACHELINE_ALIGNED_L1=y
311# CONFIG_SYSCALL_TAB_L1 is not set 347# CONFIG_SYSCALL_TAB_L1 is not set
312# CONFIG_CPLB_SWITCH_TAB_L1 is not set 348# CONFIG_CPLB_SWITCH_TAB_L1 is not set
349CONFIG_APP_STACK_L1=y
350
351#
352# Speed Optimizations
353#
354CONFIG_BFIN_INS_LOWOVERHEAD=y
313CONFIG_RAMKERNEL=y 355CONFIG_RAMKERNEL=y
314# CONFIG_ROMKERNEL is not set 356# CONFIG_ROMKERNEL is not set
315CONFIG_SELECT_MEMORY_MODEL=y 357CONFIG_SELECT_MEMORY_MODEL=y
@@ -318,13 +360,16 @@ CONFIG_FLATMEM_MANUAL=y
318# CONFIG_SPARSEMEM_MANUAL is not set 360# CONFIG_SPARSEMEM_MANUAL is not set
319CONFIG_FLATMEM=y 361CONFIG_FLATMEM=y
320CONFIG_FLAT_NODE_MEM_MAP=y 362CONFIG_FLAT_NODE_MEM_MAP=y
321# CONFIG_SPARSEMEM_STATIC is not set 363CONFIG_PAGEFLAGS_EXTENDED=y
322# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
323CONFIG_SPLIT_PTLOCK_CPUS=4 364CONFIG_SPLIT_PTLOCK_CPUS=4
324# CONFIG_RESOURCES_64BIT is not set 365# CONFIG_PHYS_ADDR_T_64BIT is not set
325CONFIG_ZONE_DMA_FLAG=1 366CONFIG_ZONE_DMA_FLAG=1
326CONFIG_VIRT_TO_BUS=y 367CONFIG_VIRT_TO_BUS=y
368CONFIG_UNEVICTABLE_LRU=y
369CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
370CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
327# CONFIG_BFIN_GPTIMERS is not set 371# CONFIG_BFIN_GPTIMERS is not set
372# CONFIG_DMA_UNCACHED_4M is not set
328# CONFIG_DMA_UNCACHED_2M is not set 373# CONFIG_DMA_UNCACHED_2M is not set
329CONFIG_DMA_UNCACHED_1M=y 374CONFIG_DMA_UNCACHED_1M=y
330# CONFIG_DMA_UNCACHED_NONE is not set 375# CONFIG_DMA_UNCACHED_NONE is not set
@@ -333,14 +378,13 @@ CONFIG_DMA_UNCACHED_1M=y
333# Cache Support 378# Cache Support
334# 379#
335CONFIG_BFIN_ICACHE=y 380CONFIG_BFIN_ICACHE=y
336# CONFIG_BFIN_ICACHE_LOCK is not set 381CONFIG_BFIN_EXTMEM_ICACHEABLE=y
382# CONFIG_BFIN_L2_ICACHEABLE is not set
337CONFIG_BFIN_DCACHE=y 383CONFIG_BFIN_DCACHE=y
338# CONFIG_BFIN_DCACHE_BANKA is not set 384# CONFIG_BFIN_DCACHE_BANKA is not set
339CONFIG_BFIN_EXTMEM_ICACHEABLE=y
340CONFIG_BFIN_EXTMEM_DCACHEABLE=y 385CONFIG_BFIN_EXTMEM_DCACHEABLE=y
341CONFIG_BFIN_EXTMEM_WRITEBACK=y 386# CONFIG_BFIN_EXTMEM_WRITEBACK
342# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 387CONFIG_BFIN_EXTMEM_WRITETHROUGH=y
343# CONFIG_BFIN_L2_ICACHEABLE is not set
344# CONFIG_BFIN_L2_DCACHEABLE is not set 388# CONFIG_BFIN_L2_DCACHEABLE is not set
345 389
346# 390#
@@ -349,7 +393,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
349# CONFIG_MPU is not set 393# CONFIG_MPU is not set
350 394
351# 395#
352# Asynchonous Memory Configuration 396# Asynchronous Memory Configuration
353# 397#
354 398
355# 399#
@@ -369,7 +413,7 @@ CONFIG_C_AMBEN_ALL=y
369CONFIG_BANK_0=0x7BB0 413CONFIG_BANK_0=0x7BB0
370CONFIG_BANK_1=0x5554 414CONFIG_BANK_1=0x5554
371CONFIG_BANK_2=0x7BB0 415CONFIG_BANK_2=0x7BB0
372CONFIG_BANK_3=0x99B2 416CONFIG_BANK_3=0x99B3
373CONFIG_EBIU_MBSCTLVAL=0x0 417CONFIG_EBIU_MBSCTLVAL=0x0
374CONFIG_EBIU_MODEVAL=0x1 418CONFIG_EBIU_MODEVAL=0x1
375CONFIG_EBIU_FCTLVAL=0x6 419CONFIG_EBIU_FCTLVAL=0x6
@@ -377,7 +421,6 @@ CONFIG_EBIU_FCTLVAL=0x6
377# 421#
378# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 422# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
379# 423#
380# CONFIG_PCI is not set
381# CONFIG_ARCH_SUPPORTS_MSI is not set 424# CONFIG_ARCH_SUPPORTS_MSI is not set
382# CONFIG_PCCARD is not set 425# CONFIG_PCCARD is not set
383 426
@@ -388,23 +431,19 @@ CONFIG_BINFMT_ELF_FDPIC=y
388CONFIG_BINFMT_FLAT=y 431CONFIG_BINFMT_FLAT=y
389CONFIG_BINFMT_ZFLAT=y 432CONFIG_BINFMT_ZFLAT=y
390# CONFIG_BINFMT_SHARED_FLAT is not set 433# CONFIG_BINFMT_SHARED_FLAT is not set
434# CONFIG_HAVE_AOUT is not set
391# CONFIG_BINFMT_MISC is not set 435# CONFIG_BINFMT_MISC is not set
392 436
393# 437#
394# Power management options 438# Power management options
395# 439#
396# CONFIG_PM is not set 440# CONFIG_PM is not set
397CONFIG_SUSPEND_UP_POSSIBLE=y 441CONFIG_ARCH_SUSPEND_POSSIBLE=y
398# CONFIG_PM_WAKEUP_BY_GPIO is not set
399 442
400# 443#
401# CPU Frequency scaling 444# CPU Frequency scaling
402# 445#
403# CONFIG_CPU_FREQ is not set 446# CONFIG_CPU_FREQ is not set
404
405#
406# Networking
407#
408CONFIG_NET=y 447CONFIG_NET=y
409 448
410# 449#
@@ -417,6 +456,7 @@ CONFIG_XFRM=y
417# CONFIG_XFRM_USER is not set 456# CONFIG_XFRM_USER is not set
418# CONFIG_XFRM_SUB_POLICY is not set 457# CONFIG_XFRM_SUB_POLICY is not set
419# CONFIG_XFRM_MIGRATE is not set 458# CONFIG_XFRM_MIGRATE is not set
459# CONFIG_XFRM_STATISTICS is not set
420# CONFIG_NET_KEY is not set 460# CONFIG_NET_KEY is not set
421CONFIG_INET=y 461CONFIG_INET=y
422# CONFIG_IP_MULTICAST is not set 462# CONFIG_IP_MULTICAST is not set
@@ -435,19 +475,16 @@ CONFIG_IP_PNP=y
435# CONFIG_INET_IPCOMP is not set 475# CONFIG_INET_IPCOMP is not set
436# CONFIG_INET_XFRM_TUNNEL is not set 476# CONFIG_INET_XFRM_TUNNEL is not set
437# CONFIG_INET_TUNNEL is not set 477# CONFIG_INET_TUNNEL is not set
438# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 478CONFIG_INET_XFRM_MODE_TRANSPORT=m
439# CONFIG_INET_XFRM_MODE_TUNNEL is not set 479CONFIG_INET_XFRM_MODE_TUNNEL=m
440# CONFIG_INET_XFRM_MODE_BEET is not set 480CONFIG_INET_XFRM_MODE_BEET=m
441# CONFIG_INET_LRO is not set 481# CONFIG_INET_LRO is not set
442# CONFIG_INET_DIAG is not set 482# CONFIG_INET_DIAG is not set
443CONFIG_INET_TCP_DIAG=y
444# CONFIG_TCP_CONG_ADVANCED is not set 483# CONFIG_TCP_CONG_ADVANCED is not set
445CONFIG_TCP_CONG_CUBIC=y 484CONFIG_TCP_CONG_CUBIC=y
446CONFIG_DEFAULT_TCP_CONG="cubic" 485CONFIG_DEFAULT_TCP_CONG="cubic"
447# CONFIG_TCP_MD5SIG is not set 486# CONFIG_TCP_MD5SIG is not set
448# CONFIG_IPV6 is not set 487# CONFIG_IPV6 is not set
449# CONFIG_INET6_XFRM_TUNNEL is not set
450# CONFIG_INET6_TUNNEL is not set
451# CONFIG_NETLABEL is not set 488# CONFIG_NETLABEL is not set
452# CONFIG_NETWORK_SECMARK is not set 489# CONFIG_NETWORK_SECMARK is not set
453# CONFIG_NETFILTER is not set 490# CONFIG_NETFILTER is not set
@@ -456,6 +493,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
456# CONFIG_TIPC is not set 493# CONFIG_TIPC is not set
457# CONFIG_ATM is not set 494# CONFIG_ATM is not set
458# CONFIG_BRIDGE is not set 495# CONFIG_BRIDGE is not set
496# CONFIG_NET_DSA is not set
459# CONFIG_VLAN_8021Q is not set 497# CONFIG_VLAN_8021Q is not set
460# CONFIG_DECNET is not set 498# CONFIG_DECNET is not set
461# CONFIG_LLC2 is not set 499# CONFIG_LLC2 is not set
@@ -465,24 +503,21 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
465# CONFIG_LAPB is not set 503# CONFIG_LAPB is not set
466# CONFIG_ECONET is not set 504# CONFIG_ECONET is not set
467# CONFIG_WAN_ROUTER is not set 505# CONFIG_WAN_ROUTER is not set
506# CONFIG_PHONET is not set
468# CONFIG_NET_SCHED is not set 507# CONFIG_NET_SCHED is not set
508# CONFIG_DCB is not set
469 509
470# 510#
471# Network testing 511# Network testing
472# 512#
473# CONFIG_NET_PKTGEN is not set 513# CONFIG_NET_PKTGEN is not set
474# CONFIG_HAMRADIO is not set 514# CONFIG_HAMRADIO is not set
515# CONFIG_CAN is not set
475# CONFIG_IRDA is not set 516# CONFIG_IRDA is not set
476# CONFIG_BT is not set 517# CONFIG_BT is not set
477# CONFIG_AF_RXRPC is not set 518# CONFIG_AF_RXRPC is not set
478 519# CONFIG_WIRELESS is not set
479# 520# CONFIG_WIMAX is not set
480# Wireless
481#
482# CONFIG_CFG80211 is not set
483# CONFIG_WIRELESS_EXT is not set
484# CONFIG_MAC80211 is not set
485# CONFIG_IEEE80211 is not set
486# CONFIG_RFKILL is not set 521# CONFIG_RFKILL is not set
487# CONFIG_NET_9P is not set 522# CONFIG_NET_9P is not set
488 523
@@ -501,10 +536,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
501# CONFIG_CONNECTOR is not set 536# CONFIG_CONNECTOR is not set
502CONFIG_MTD=y 537CONFIG_MTD=y
503# CONFIG_MTD_DEBUG is not set 538# CONFIG_MTD_DEBUG is not set
539# CONFIG_MTD_TESTS is not set
504# CONFIG_MTD_CONCAT is not set 540# CONFIG_MTD_CONCAT is not set
505CONFIG_MTD_PARTITIONS=y 541CONFIG_MTD_PARTITIONS=y
506# CONFIG_MTD_REDBOOT_PARTS is not set 542# CONFIG_MTD_REDBOOT_PARTS is not set
507CONFIG_MTD_CMDLINE_PARTS=y 543CONFIG_MTD_CMDLINE_PARTS=y
544# CONFIG_MTD_AR7_PARTS is not set
508 545
509# 546#
510# User Modules And Translation Layers 547# User Modules And Translation Layers
@@ -539,6 +576,7 @@ CONFIG_MTD_CFI_I2=y
539CONFIG_MTD_CFI_INTELEXT=y 576CONFIG_MTD_CFI_INTELEXT=y
540# CONFIG_MTD_CFI_AMDSTD is not set 577# CONFIG_MTD_CFI_AMDSTD is not set
541# CONFIG_MTD_CFI_STAA is not set 578# CONFIG_MTD_CFI_STAA is not set
579# CONFIG_MTD_PSD4256G is not set
542CONFIG_MTD_CFI_UTIL=y 580CONFIG_MTD_CFI_UTIL=y
543CONFIG_MTD_RAM=y 581CONFIG_MTD_RAM=y
544# CONFIG_MTD_ROM is not set 582# CONFIG_MTD_ROM is not set
@@ -549,9 +587,8 @@ CONFIG_MTD_RAM=y
549# 587#
550CONFIG_MTD_COMPLEX_MAPPINGS=y 588CONFIG_MTD_COMPLEX_MAPPINGS=y
551CONFIG_MTD_PHYSMAP=y 589CONFIG_MTD_PHYSMAP=y
552CONFIG_MTD_PHYSMAP_START=0x20000000 590# CONFIG_MTD_PHYSMAP_COMPAT is not set
553CONFIG_MTD_PHYSMAP_LEN=0 591# CONFIG_MTD_GPIO_ADDR is not set
554CONFIG_MTD_PHYSMAP_BANKWIDTH=2
555# CONFIG_MTD_UCLINUX is not set 592# CONFIG_MTD_UCLINUX is not set
556# CONFIG_MTD_PLATRAM is not set 593# CONFIG_MTD_PLATRAM is not set
557 594
@@ -575,6 +612,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
575# CONFIG_MTD_ONENAND is not set 612# CONFIG_MTD_ONENAND is not set
576 613
577# 614#
615# LPDDR flash memory drivers
616#
617# CONFIG_MTD_LPDDR is not set
618
619#
578# UBI - Unsorted block images 620# UBI - Unsorted block images
579# 621#
580# CONFIG_MTD_UBI is not set 622# CONFIG_MTD_UBI is not set
@@ -587,31 +629,31 @@ CONFIG_BLK_DEV=y
587CONFIG_BLK_DEV_RAM=y 629CONFIG_BLK_DEV_RAM=y
588CONFIG_BLK_DEV_RAM_COUNT=16 630CONFIG_BLK_DEV_RAM_COUNT=16
589CONFIG_BLK_DEV_RAM_SIZE=4096 631CONFIG_BLK_DEV_RAM_SIZE=4096
590CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 632# CONFIG_BLK_DEV_XIP is not set
591# CONFIG_CDROM_PKTCDVD is not set 633# CONFIG_CDROM_PKTCDVD is not set
592# CONFIG_ATA_OVER_ETH is not set 634# CONFIG_ATA_OVER_ETH is not set
593CONFIG_MISC_DEVICES=y 635# CONFIG_BLK_DEV_HD is not set
594# CONFIG_EEPROM_93CX6 is not set 636# CONFIG_MISC_DEVICES is not set
637CONFIG_HAVE_IDE=y
595# CONFIG_IDE is not set 638# CONFIG_IDE is not set
596 639
597# 640#
598# SCSI device support 641# SCSI device support
599# 642#
600# CONFIG_RAID_ATTRS is not set 643# CONFIG_RAID_ATTRS is not set
601CONFIG_SCSI=y 644CONFIG_SCSI=m
602CONFIG_SCSI_DMA=y 645CONFIG_SCSI_DMA=y
603# CONFIG_SCSI_TGT is not set 646# CONFIG_SCSI_TGT is not set
604# CONFIG_SCSI_NETLINK is not set 647# CONFIG_SCSI_NETLINK is not set
605# CONFIG_SCSI_PROC_FS is not set 648CONFIG_SCSI_PROC_FS=y
606 649
607# 650#
608# SCSI support type (disk, tape, CD-ROM) 651# SCSI support type (disk, tape, CD-ROM)
609# 652#
610CONFIG_BLK_DEV_SD=y 653CONFIG_BLK_DEV_SD=m
611# CONFIG_CHR_DEV_ST is not set 654# CONFIG_CHR_DEV_ST is not set
612# CONFIG_CHR_DEV_OSST is not set 655# CONFIG_CHR_DEV_OSST is not set
613CONFIG_BLK_DEV_SR=y 656# CONFIG_BLK_DEV_SR is not set
614# CONFIG_BLK_DEV_SR_VENDOR is not set
615# CONFIG_CHR_DEV_SG is not set 657# CONFIG_CHR_DEV_SG is not set
616# CONFIG_CHR_DEV_SCH is not set 658# CONFIG_CHR_DEV_SCH is not set
617 659
@@ -632,29 +674,54 @@ CONFIG_SCSI_WAIT_SCAN=m
632# CONFIG_SCSI_ISCSI_ATTRS is not set 674# CONFIG_SCSI_ISCSI_ATTRS is not set
633# CONFIG_SCSI_SAS_LIBSAS is not set 675# CONFIG_SCSI_SAS_LIBSAS is not set
634# CONFIG_SCSI_SRP_ATTRS is not set 676# CONFIG_SCSI_SRP_ATTRS is not set
635CONFIG_SCSI_LOWLEVEL=y 677# CONFIG_SCSI_LOWLEVEL is not set
636# CONFIG_ISCSI_TCP is not set 678# CONFIG_SCSI_DH is not set
637# CONFIG_SCSI_DEBUG is not set 679# CONFIG_SCSI_OSD_INITIATOR is not set
638# CONFIG_ATA is not set 680# CONFIG_ATA is not set
639# CONFIG_MD is not set 681# CONFIG_MD is not set
640CONFIG_NETDEVICES=y 682CONFIG_NETDEVICES=y
641# CONFIG_NETDEVICES_MULTIQUEUE is not set 683CONFIG_COMPAT_NET_DEV_OPS=y
642# CONFIG_DUMMY is not set 684# CONFIG_DUMMY is not set
643# CONFIG_BONDING is not set 685# CONFIG_BONDING is not set
644# CONFIG_MACVLAN is not set 686# CONFIG_MACVLAN is not set
645# CONFIG_EQUALIZER is not set 687# CONFIG_EQUALIZER is not set
646# CONFIG_TUN is not set 688# CONFIG_TUN is not set
647# CONFIG_VETH is not set 689# CONFIG_VETH is not set
648# CONFIG_PHYLIB is not set 690CONFIG_PHYLIB=y
691
692#
693# MII PHY device drivers
694#
695# CONFIG_MARVELL_PHY is not set
696# CONFIG_DAVICOM_PHY is not set
697# CONFIG_QSEMI_PHY is not set
698# CONFIG_LXT_PHY is not set
699# CONFIG_CICADA_PHY is not set
700# CONFIG_VITESSE_PHY is not set
701# CONFIG_SMSC_PHY is not set
702# CONFIG_BROADCOM_PHY is not set
703# CONFIG_ICPLUS_PHY is not set
704# CONFIG_REALTEK_PHY is not set
705# CONFIG_NATIONAL_PHY is not set
706# CONFIG_STE10XP is not set
707# CONFIG_LSI_ET1011C_PHY is not set
708# CONFIG_FIXED_PHY is not set
709# CONFIG_MDIO_BITBANG is not set
649CONFIG_NET_ETHERNET=y 710CONFIG_NET_ETHERNET=y
650CONFIG_MII=y 711CONFIG_MII=y
651# CONFIG_SMC91X is not set 712# CONFIG_SMC91X is not set
652CONFIG_SMSC911X=y
653# CONFIG_DM9000 is not set 713# CONFIG_DM9000 is not set
714# CONFIG_ENC28J60 is not set
715# CONFIG_ETHOC is not set
716CONFIG_SMSC911X=y
717# CONFIG_DNET is not set
654# CONFIG_IBM_NEW_EMAC_ZMII is not set 718# CONFIG_IBM_NEW_EMAC_ZMII is not set
655# CONFIG_IBM_NEW_EMAC_RGMII is not set 719# CONFIG_IBM_NEW_EMAC_RGMII is not set
656# CONFIG_IBM_NEW_EMAC_TAH is not set 720# CONFIG_IBM_NEW_EMAC_TAH is not set
657# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 721# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
722# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
723# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
724# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
658# CONFIG_B44 is not set 725# CONFIG_B44 is not set
659# CONFIG_NETDEV_1000 is not set 726# CONFIG_NETDEV_1000 is not set
660# CONFIG_NETDEV_10000 is not set 727# CONFIG_NETDEV_10000 is not set
@@ -666,6 +733,10 @@ CONFIG_SMSC911X=y
666# CONFIG_WLAN_80211 is not set 733# CONFIG_WLAN_80211 is not set
667 734
668# 735#
736# Enable WiMAX (Networking options) to see the WiMAX drivers
737#
738
739#
669# USB Network Adapters 740# USB Network Adapters
670# 741#
671# CONFIG_USB_CATC is not set 742# CONFIG_USB_CATC is not set
@@ -676,7 +747,6 @@ CONFIG_SMSC911X=y
676# CONFIG_WAN is not set 747# CONFIG_WAN is not set
677# CONFIG_PPP is not set 748# CONFIG_PPP is not set
678# CONFIG_SLIP is not set 749# CONFIG_SLIP is not set
679# CONFIG_SHAPER is not set
680# CONFIG_NETCONSOLE is not set 750# CONFIG_NETCONSOLE is not set
681# CONFIG_NETPOLL is not set 751# CONFIG_NETPOLL is not set
682# CONFIG_NET_POLL_CONTROLLER is not set 752# CONFIG_NET_POLL_CONTROLLER is not set
@@ -711,6 +781,7 @@ CONFIG_INPUT_KEYBOARD=y
711# CONFIG_KEYBOARD_GPIO is not set 781# CONFIG_KEYBOARD_GPIO is not set
712# CONFIG_KEYBOARD_BFIN is not set 782# CONFIG_KEYBOARD_BFIN is not set
713# CONFIG_KEYBOARD_OPENCORES is not set 783# CONFIG_KEYBOARD_OPENCORES is not set
784# CONFIG_KEYBOARD_ADP5588 is not set
714# CONFIG_INPUT_MOUSE is not set 785# CONFIG_INPUT_MOUSE is not set
715# CONFIG_INPUT_JOYSTICK is not set 786# CONFIG_INPUT_JOYSTICK is not set
716# CONFIG_INPUT_TABLET is not set 787# CONFIG_INPUT_TABLET is not set
@@ -726,19 +797,16 @@ CONFIG_INPUT_KEYBOARD=y
726# 797#
727# Character devices 798# Character devices
728# 799#
729# CONFIG_AD9960 is not set 800CONFIG_BFIN_DMA_INTERFACE=m
730# CONFIG_SPI_ADC_BF533 is not set 801# CONFIG_BFIN_PPI is not set
731# CONFIG_BF5xx_PPIFCD is not set 802# CONFIG_BFIN_PPIFCD is not set
732# CONFIG_BFIN_SIMPLE_TIMER is not set 803# CONFIG_BFIN_SIMPLE_TIMER is not set
733# CONFIG_BF5xx_PPI is not set 804# CONFIG_BFIN_SPI_ADC is not set
734CONFIG_BFIN_OTP=y
735# CONFIG_BFIN_OTP_WRITE_ENABLE is not set
736# CONFIG_BFIN_SPORT is not set 805# CONFIG_BFIN_SPORT is not set
737# CONFIG_BFIN_TIMER_LATENCY is not set 806# CONFIG_BFIN_TWI_LCD is not set
738# CONFIG_TWI_LCD is not set
739# CONFIG_SIMPLE_GPIO is not set
740# CONFIG_VT is not set 807# CONFIG_VT is not set
741# CONFIG_DEVKMEM is not set 808CONFIG_DEVKMEM=y
809# CONFIG_BFIN_JTAG_COMM is not set
742# CONFIG_SERIAL_NONSTANDARD is not set 810# CONFIG_SERIAL_NONSTANDARD is not set
743 811
744# 812#
@@ -749,10 +817,11 @@ CONFIG_BFIN_OTP=y
749# 817#
750# Non-8250 serial port support 818# Non-8250 serial port support
751# 819#
820# CONFIG_SERIAL_MAX3100 is not set
752CONFIG_SERIAL_BFIN=y 821CONFIG_SERIAL_BFIN=y
753CONFIG_SERIAL_BFIN_CONSOLE=y 822CONFIG_SERIAL_BFIN_CONSOLE=y
754CONFIG_SERIAL_BFIN_DMA=y 823# CONFIG_SERIAL_BFIN_DMA is not set
755# CONFIG_SERIAL_BFIN_PIO is not set 824CONFIG_SERIAL_BFIN_PIO=y
756# CONFIG_SERIAL_BFIN_UART0 is not set 825# CONFIG_SERIAL_BFIN_UART0 is not set
757CONFIG_SERIAL_BFIN_UART1=y 826CONFIG_SERIAL_BFIN_UART1=y
758# CONFIG_BFIN_UART1_CTSRTS is not set 827# CONFIG_BFIN_UART1_CTSRTS is not set
@@ -762,7 +831,10 @@ CONFIG_SERIAL_CORE=y
762CONFIG_SERIAL_CORE_CONSOLE=y 831CONFIG_SERIAL_CORE_CONSOLE=y
763# CONFIG_SERIAL_BFIN_SPORT is not set 832# CONFIG_SERIAL_BFIN_SPORT is not set
764CONFIG_UNIX98_PTYS=y 833CONFIG_UNIX98_PTYS=y
834# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
765# CONFIG_LEGACY_PTYS is not set 835# CONFIG_LEGACY_PTYS is not set
836CONFIG_BFIN_OTP=y
837# CONFIG_BFIN_OTP_WRITE_ENABLE is not set
766 838
767# 839#
768# CAN, the car bus and industrial fieldbus 840# CAN, the car bus and industrial fieldbus
@@ -770,61 +842,53 @@ CONFIG_UNIX98_PTYS=y
770# CONFIG_CAN4LINUX is not set 842# CONFIG_CAN4LINUX is not set
771# CONFIG_IPMI_HANDLER is not set 843# CONFIG_IPMI_HANDLER is not set
772# CONFIG_HW_RANDOM is not set 844# CONFIG_HW_RANDOM is not set
773# CONFIG_GEN_RTC is not set
774# CONFIG_R3964 is not set 845# CONFIG_R3964 is not set
775# CONFIG_RAW_DRIVER is not set 846# CONFIG_RAW_DRIVER is not set
776# CONFIG_TCG_TPM is not set 847# CONFIG_TCG_TPM is not set
777CONFIG_I2C=y 848CONFIG_I2C=y
778CONFIG_I2C_BOARDINFO=y 849CONFIG_I2C_BOARDINFO=y
779CONFIG_I2C_CHARDEV=y 850CONFIG_I2C_CHARDEV=y
851CONFIG_I2C_HELPER_AUTO=y
780 852
781# 853#
782# I2C Algorithms 854# I2C Hardware Bus support
783# 855#
784# CONFIG_I2C_ALGOBIT is not set
785# CONFIG_I2C_ALGOPCF is not set
786# CONFIG_I2C_ALGOPCA is not set
787 856
788# 857#
789# I2C Hardware Bus support 858# I2C system bus drivers (mostly embedded / system-on-chip)
790# 859#
791CONFIG_I2C_BLACKFIN_TWI=y 860CONFIG_I2C_BLACKFIN_TWI=y
792CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 861CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
793# CONFIG_I2C_GPIO is not set 862# CONFIG_I2C_GPIO is not set
794# CONFIG_I2C_OCORES is not set 863# CONFIG_I2C_OCORES is not set
795# CONFIG_I2C_PARPORT_LIGHT is not set
796# CONFIG_I2C_SIMTEC is not set 864# CONFIG_I2C_SIMTEC is not set
865
866#
867# External I2C/SMBus adapter drivers
868#
869# CONFIG_I2C_PARPORT_LIGHT is not set
797# CONFIG_I2C_TAOS_EVM is not set 870# CONFIG_I2C_TAOS_EVM is not set
798# CONFIG_I2C_STUB is not set
799# CONFIG_I2C_TINY_USB is not set 871# CONFIG_I2C_TINY_USB is not set
800 872
801# 873#
874# Other I2C/SMBus bus drivers
875#
876# CONFIG_I2C_PCA_PLATFORM is not set
877# CONFIG_I2C_STUB is not set
878
879#
802# Miscellaneous I2C Chip support 880# Miscellaneous I2C Chip support
803# 881#
804# CONFIG_SENSORS_DS1337 is not set
805# CONFIG_SENSORS_DS1374 is not set
806# CONFIG_DS1682 is not set 882# CONFIG_DS1682 is not set
807# CONFIG_SENSORS_AD5252 is not set
808# CONFIG_EEPROM_LEGACY is not set
809# CONFIG_SENSORS_PCF8574 is not set 883# CONFIG_SENSORS_PCF8574 is not set
810# CONFIG_SENSORS_PCF8575 is not set 884# CONFIG_PCF8575 is not set
811# CONFIG_SENSORS_PCA9543 is not set
812# CONFIG_SENSORS_PCA9539 is not set 885# CONFIG_SENSORS_PCA9539 is not set
813# CONFIG_SENSORS_PCF8591 is not set
814# CONFIG_SENSORS_MAX6875 is not set 886# CONFIG_SENSORS_MAX6875 is not set
815# CONFIG_SENSORS_TSL2550 is not set 887# CONFIG_SENSORS_TSL2550 is not set
816# CONFIG_I2C_DEBUG_CORE is not set 888# CONFIG_I2C_DEBUG_CORE is not set
817# CONFIG_I2C_DEBUG_ALGO is not set 889# CONFIG_I2C_DEBUG_ALGO is not set
818# CONFIG_I2C_DEBUG_BUS is not set 890# CONFIG_I2C_DEBUG_BUS is not set
819# CONFIG_I2C_DEBUG_CHIP is not set 891# CONFIG_I2C_DEBUG_CHIP is not set
820
821CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
822CONFIG_GPIOLIB=y
823CONFIG_GPIO_SYSFS=y
824
825#
826# SPI support
827#
828CONFIG_SPI=y 892CONFIG_SPI=y
829CONFIG_SPI_MASTER=y 893CONFIG_SPI_MASTER=y
830 894
@@ -832,64 +896,23 @@ CONFIG_SPI_MASTER=y
832# SPI Master Controller Drivers 896# SPI Master Controller Drivers
833# 897#
834CONFIG_SPI_BFIN=y 898CONFIG_SPI_BFIN=y
899# CONFIG_SPI_BFIN_LOCK is not set
900# CONFIG_SPI_BFIN_SPORT is not set
835# CONFIG_SPI_BITBANG is not set 901# CONFIG_SPI_BITBANG is not set
902# CONFIG_SPI_GPIO is not set
836 903
837# 904#
838# SPI Protocol Masters 905# SPI Protocol Masters
839# 906#
840# CONFIG_EEPROM_AT25 is not set
841# CONFIG_SPI_SPIDEV is not set 907# CONFIG_SPI_SPIDEV is not set
842# CONFIG_SPI_TLE62X0 is not set 908# CONFIG_SPI_TLE62X0 is not set
909CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
910# CONFIG_GPIOLIB is not set
843# CONFIG_W1 is not set 911# CONFIG_W1 is not set
844# CONFIG_POWER_SUPPLY is not set 912# CONFIG_POWER_SUPPLY is not set
845CONFIG_HWMON=y 913# CONFIG_HWMON is not set
846# CONFIG_HWMON_VID is not set 914# CONFIG_THERMAL is not set
847# CONFIG_SENSORS_AD7418 is not set 915# CONFIG_THERMAL_HWMON is not set
848# CONFIG_SENSORS_ADM1021 is not set
849# CONFIG_SENSORS_ADM1025 is not set
850# CONFIG_SENSORS_ADM1026 is not set
851# CONFIG_SENSORS_ADM1029 is not set
852# CONFIG_SENSORS_ADM1031 is not set
853# CONFIG_SENSORS_ADM9240 is not set
854# CONFIG_SENSORS_ADT7470 is not set
855# CONFIG_SENSORS_ATXP1 is not set
856# CONFIG_SENSORS_DS1621 is not set
857# CONFIG_SENSORS_F71805F is not set
858# CONFIG_SENSORS_F71882FG is not set
859# CONFIG_SENSORS_F75375S is not set
860# CONFIG_SENSORS_GL518SM is not set
861# CONFIG_SENSORS_GL520SM is not set
862# CONFIG_SENSORS_IT87 is not set
863# CONFIG_SENSORS_LM63 is not set
864# CONFIG_SENSORS_LM70 is not set
865# CONFIG_SENSORS_LM75 is not set
866# CONFIG_SENSORS_LM77 is not set
867# CONFIG_SENSORS_LM78 is not set
868# CONFIG_SENSORS_LM80 is not set
869# CONFIG_SENSORS_LM83 is not set
870# CONFIG_SENSORS_LM85 is not set
871# CONFIG_SENSORS_LM87 is not set
872# CONFIG_SENSORS_LM90 is not set
873# CONFIG_SENSORS_LM92 is not set
874# CONFIG_SENSORS_LM93 is not set
875# CONFIG_SENSORS_MAX1619 is not set
876# CONFIG_SENSORS_MAX6650 is not set
877# CONFIG_SENSORS_PC87360 is not set
878# CONFIG_SENSORS_PC87427 is not set
879# CONFIG_SENSORS_DME1737 is not set
880# CONFIG_SENSORS_SMSC47M1 is not set
881# CONFIG_SENSORS_SMSC47M192 is not set
882# CONFIG_SENSORS_SMSC47B397 is not set
883# CONFIG_SENSORS_THMC50 is not set
884# CONFIG_SENSORS_VT1211 is not set
885# CONFIG_SENSORS_W83781D is not set
886# CONFIG_SENSORS_W83791D is not set
887# CONFIG_SENSORS_W83792D is not set
888# CONFIG_SENSORS_W83793 is not set
889# CONFIG_SENSORS_W83L785TS is not set
890# CONFIG_SENSORS_W83627HF is not set
891# CONFIG_SENSORS_W83627EHF is not set
892# CONFIG_HWMON_DEBUG_CHIP is not set
893CONFIG_WATCHDOG=y 916CONFIG_WATCHDOG=y
894# CONFIG_WATCHDOG_NOWAYOUT is not set 917# CONFIG_WATCHDOG_NOWAYOUT is not set
895 918
@@ -903,25 +926,43 @@ CONFIG_BFIN_WDT=y
903# USB-based Watchdog Cards 926# USB-based Watchdog Cards
904# 927#
905# CONFIG_USBPCWATCHDOG is not set 928# CONFIG_USBPCWATCHDOG is not set
929CONFIG_SSB_POSSIBLE=y
906 930
907# 931#
908# Sonics Silicon Backplane 932# Sonics Silicon Backplane
909# 933#
910CONFIG_SSB_POSSIBLE=y
911# CONFIG_SSB is not set 934# CONFIG_SSB is not set
912 935
913# 936#
914# Multifunction device drivers 937# Multifunction device drivers
915# 938#
939# CONFIG_MFD_CORE is not set
916# CONFIG_MFD_SM501 is not set 940# CONFIG_MFD_SM501 is not set
941# CONFIG_HTC_PASIC3 is not set
942# CONFIG_TWL4030_CORE is not set
943# CONFIG_MFD_TMIO is not set
944# CONFIG_PMIC_DA903X is not set
945# CONFIG_PMIC_ADP5520 is not set
946# CONFIG_MFD_WM8400 is not set
947# CONFIG_MFD_WM8350_I2C is not set
948# CONFIG_MFD_PCF50633 is not set
949# CONFIG_REGULATOR is not set
917 950
918# 951#
919# Multimedia devices 952# Multimedia devices
920# 953#
954
955#
956# Multimedia core support
957#
921# CONFIG_VIDEO_DEV is not set 958# CONFIG_VIDEO_DEV is not set
922# CONFIG_DVB_CORE is not set 959# CONFIG_DVB_CORE is not set
960# CONFIG_VIDEO_MEDIA is not set
961
962#
963# Multimedia drivers
964#
923# CONFIG_DAB is not set 965# CONFIG_DAB is not set
924# CONFIG_USB_DABUSB is not set
925 966
926# 967#
927# Graphics support 968# Graphics support
@@ -935,80 +976,75 @@ CONFIG_SSB_POSSIBLE=y
935# Display device support 976# Display device support
936# 977#
937# CONFIG_DISPLAY_SUPPORT is not set 978# CONFIG_DISPLAY_SUPPORT is not set
938
939#
940# Sound
941#
942# CONFIG_SOUND is not set 979# CONFIG_SOUND is not set
943CONFIG_HID_SUPPORT=y 980# CONFIG_HID_SUPPORT is not set
944CONFIG_HID=y
945# CONFIG_HID_DEBUG is not set
946# CONFIG_HIDRAW is not set
947
948#
949# USB Input Devices
950#
951CONFIG_USB_HID=y
952# CONFIG_USB_HIDINPUT_POWERBOOK is not set
953# CONFIG_HID_FF is not set
954# CONFIG_USB_HIDDEV is not set
955CONFIG_USB_SUPPORT=y 981CONFIG_USB_SUPPORT=y
956CONFIG_USB_ARCH_HAS_HCD=y 982CONFIG_USB_ARCH_HAS_HCD=y
957# CONFIG_USB_ARCH_HAS_OHCI is not set 983# CONFIG_USB_ARCH_HAS_OHCI is not set
958# CONFIG_USB_ARCH_HAS_EHCI is not set 984# CONFIG_USB_ARCH_HAS_EHCI is not set
959CONFIG_USB=y 985CONFIG_USB=m
960# CONFIG_USB_DEBUG is not set 986# CONFIG_USB_DEBUG is not set
987# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
961 988
962# 989#
963# Miscellaneous USB options 990# Miscellaneous USB options
964# 991#
965# CONFIG_USB_DEVICEFS is not set 992CONFIG_USB_DEVICEFS=y
966CONFIG_USB_DEVICE_CLASS=y 993# CONFIG_USB_DEVICE_CLASS is not set
967# CONFIG_USB_DYNAMIC_MINORS is not set 994# CONFIG_USB_DYNAMIC_MINORS is not set
968# CONFIG_USB_OTG is not set 995# CONFIG_USB_OTG is not set
996# CONFIG_USB_OTG_WHITELIST is not set
997# CONFIG_USB_OTG_BLACKLIST_HUB is not set
998CONFIG_USB_MON=m
999# CONFIG_USB_WUSB is not set
1000# CONFIG_USB_WUSB_CBAF is not set
969 1001
970# 1002#
971# USB Host Controller Drivers 1003# USB Host Controller Drivers
972# 1004#
1005# CONFIG_USB_C67X00_HCD is not set
1006# CONFIG_USB_OXU210HP_HCD is not set
973# CONFIG_USB_ISP116X_HCD is not set 1007# CONFIG_USB_ISP116X_HCD is not set
974# CONFIG_USB_ISP1362_HCD is not set
975# CONFIG_USB_ISP1760_HCD is not set 1008# CONFIG_USB_ISP1760_HCD is not set
1009# CONFIG_USB_ISP1362_HCD is not set
976# CONFIG_USB_SL811_HCD is not set 1010# CONFIG_USB_SL811_HCD is not set
977# CONFIG_USB_R8A66597_HCD is not set 1011# CONFIG_USB_R8A66597_HCD is not set
978CONFIG_USB_MUSB_HDRC=y 1012# CONFIG_USB_HWA_HCD is not set
1013CONFIG_USB_MUSB_HDRC=m
979CONFIG_USB_MUSB_SOC=y 1014CONFIG_USB_MUSB_SOC=y
980 1015
981# 1016#
982# Blackfin BF54x, BF525 and BF527 high speed USB support 1017# Blackfin high speed USB Support
983# 1018#
984CONFIG_USB_MUSB_HOST=y 1019# CONFIG_USB_MUSB_HOST is not set
985# CONFIG_USB_MUSB_PERIPHERAL is not set 1020CONFIG_USB_MUSB_PERIPHERAL=y
986# CONFIG_USB_MUSB_OTG is not set 1021# CONFIG_USB_MUSB_OTG is not set
987CONFIG_USB_MUSB_HDRC_HCD=y 1022CONFIG_USB_GADGET_MUSB_HDRC=y
988# CONFIG_MUSB_PIO_ONLY is not set 1023# CONFIG_MUSB_PIO_ONLY is not set
989# CONFIG_USB_INVENTRA_DMA is not set 1024CONFIG_USB_INVENTRA_DMA=y
990# CONFIG_USB_TI_CPPI_DMA is not set 1025# CONFIG_USB_TI_CPPI_DMA is not set
991CONFIG_USB_MUSB_LOGLEVEL=0 1026# CONFIG_USB_MUSB_DEBUG is not set
992 1027
993# 1028#
994# USB Device Class drivers 1029# USB Device Class drivers
995# 1030#
996# CONFIG_USB_ACM is not set 1031# CONFIG_USB_ACM is not set
997# CONFIG_USB_PRINTER is not set 1032# CONFIG_USB_PRINTER is not set
1033# CONFIG_USB_WDM is not set
1034# CONFIG_USB_TMC is not set
998 1035
999# 1036#
1000# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1037# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1001# 1038#
1002 1039
1003# 1040#
1004# may also be needed; see USB_STORAGE Help for more information 1041# also be needed; see USB_STORAGE Help for more info
1005# 1042#
1006CONFIG_USB_STORAGE=y 1043CONFIG_USB_STORAGE=m
1007# CONFIG_USB_STORAGE_DEBUG is not set 1044# CONFIG_USB_STORAGE_DEBUG is not set
1008# CONFIG_USB_STORAGE_DATAFAB is not set 1045# CONFIG_USB_STORAGE_DATAFAB is not set
1009# CONFIG_USB_STORAGE_FREECOM is not set 1046# CONFIG_USB_STORAGE_FREECOM is not set
1010# CONFIG_USB_STORAGE_ISD200 is not set 1047# CONFIG_USB_STORAGE_ISD200 is not set
1011# CONFIG_USB_STORAGE_DPCM is not set
1012# CONFIG_USB_STORAGE_USBAT is not set 1048# CONFIG_USB_STORAGE_USBAT is not set
1013# CONFIG_USB_STORAGE_SDDR09 is not set 1049# CONFIG_USB_STORAGE_SDDR09 is not set
1014# CONFIG_USB_STORAGE_SDDR55 is not set 1050# CONFIG_USB_STORAGE_SDDR55 is not set
@@ -1016,6 +1052,7 @@ CONFIG_USB_STORAGE=y
1016# CONFIG_USB_STORAGE_ALAUDA is not set 1052# CONFIG_USB_STORAGE_ALAUDA is not set
1017# CONFIG_USB_STORAGE_ONETOUCH is not set 1053# CONFIG_USB_STORAGE_ONETOUCH is not set
1018# CONFIG_USB_STORAGE_KARMA is not set 1054# CONFIG_USB_STORAGE_KARMA is not set
1055# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1019# CONFIG_USB_LIBUSUAL is not set 1056# CONFIG_USB_LIBUSUAL is not set
1020 1057
1021# 1058#
@@ -1023,15 +1060,10 @@ CONFIG_USB_STORAGE=y
1023# 1060#
1024# CONFIG_USB_MDC800 is not set 1061# CONFIG_USB_MDC800 is not set
1025# CONFIG_USB_MICROTEK is not set 1062# CONFIG_USB_MICROTEK is not set
1026CONFIG_USB_MON=y
1027 1063
1028# 1064#
1029# USB port drivers 1065# USB port drivers
1030# 1066#
1031
1032#
1033# USB Serial Converter support
1034#
1035# CONFIG_USB_SERIAL is not set 1067# CONFIG_USB_SERIAL is not set
1036 1068
1037# 1069#
@@ -1040,7 +1072,7 @@ CONFIG_USB_MON=y
1040# CONFIG_USB_EMI62 is not set 1072# CONFIG_USB_EMI62 is not set
1041# CONFIG_USB_EMI26 is not set 1073# CONFIG_USB_EMI26 is not set
1042# CONFIG_USB_ADUTUX is not set 1074# CONFIG_USB_ADUTUX is not set
1043# CONFIG_USB_AUERSWALD is not set 1075# CONFIG_USB_SEVSEG is not set
1044# CONFIG_USB_RIO500 is not set 1076# CONFIG_USB_RIO500 is not set
1045# CONFIG_USB_LEGOTOWER is not set 1077# CONFIG_USB_LEGOTOWER is not set
1046# CONFIG_USB_LCD is not set 1078# CONFIG_USB_LCD is not set
@@ -1048,7 +1080,6 @@ CONFIG_USB_MON=y
1048# CONFIG_USB_LED is not set 1080# CONFIG_USB_LED is not set
1049# CONFIG_USB_CYPRESS_CY7C63 is not set 1081# CONFIG_USB_CYPRESS_CY7C63 is not set
1050# CONFIG_USB_CYTHERM is not set 1082# CONFIG_USB_CYTHERM is not set
1051# CONFIG_USB_PHIDGET is not set
1052# CONFIG_USB_IDMOUSE is not set 1083# CONFIG_USB_IDMOUSE is not set
1053# CONFIG_USB_FTDI_ELAN is not set 1084# CONFIG_USB_FTDI_ELAN is not set
1054# CONFIG_USB_APPLEDISPLAY is not set 1085# CONFIG_USB_APPLEDISPLAY is not set
@@ -1056,38 +1087,75 @@ CONFIG_USB_MON=y
1056# CONFIG_USB_LD is not set 1087# CONFIG_USB_LD is not set
1057# CONFIG_USB_TRANCEVIBRATOR is not set 1088# CONFIG_USB_TRANCEVIBRATOR is not set
1058# CONFIG_USB_IOWARRIOR is not set 1089# CONFIG_USB_IOWARRIOR is not set
1059 1090# CONFIG_USB_TEST is not set
1060# 1091# CONFIG_USB_ISIGHTFW is not set
1061# USB DSL modem support 1092# CONFIG_USB_VST is not set
1062# 1093CONFIG_USB_GADGET=m
1063 1094# CONFIG_USB_GADGET_DEBUG_FILES is not set
1064# 1095# CONFIG_USB_GADGET_DEBUG_FS is not set
1065# USB Gadget Support 1096CONFIG_USB_GADGET_VBUS_DRAW=2
1066# 1097CONFIG_USB_GADGET_SELECTED=y
1067# CONFIG_USB_GADGET is not set 1098# CONFIG_USB_GADGET_AT91 is not set
1068CONFIG_MMC=y 1099# CONFIG_USB_GADGET_ATMEL_USBA is not set
1100# CONFIG_USB_GADGET_FSL_USB2 is not set
1101# CONFIG_USB_GADGET_LH7A40X is not set
1102# CONFIG_USB_GADGET_OMAP is not set
1103# CONFIG_USB_GADGET_PXA25X is not set
1104# CONFIG_USB_GADGET_PXA27X is not set
1105# CONFIG_USB_GADGET_S3C2410 is not set
1106# CONFIG_USB_GADGET_IMX is not set
1107# CONFIG_USB_GADGET_M66592 is not set
1108# CONFIG_USB_GADGET_AMD5536UDC is not set
1109# CONFIG_USB_GADGET_FSL_QE is not set
1110# CONFIG_USB_GADGET_CI13XXX is not set
1111# CONFIG_USB_GADGET_NET2272 is not set
1112# CONFIG_USB_GADGET_NET2280 is not set
1113# CONFIG_USB_GADGET_GOKU is not set
1114# CONFIG_USB_GADGET_DUMMY_HCD is not set
1115CONFIG_USB_GADGET_DUALSPEED=y
1116CONFIG_USB_ZERO=m
1117# CONFIG_USB_AUDIO is not set
1118CONFIG_USB_ETH=m
1119# CONFIG_USB_ETH_RNDIS is not set
1120CONFIG_USB_GADGETFS=m
1121CONFIG_USB_FILE_STORAGE=m
1122# CONFIG_USB_FILE_STORAGE_TEST is not set
1123CONFIG_USB_G_SERIAL=m
1124# CONFIG_USB_MIDI_GADGET is not set
1125CONFIG_USB_G_PRINTER=m
1126# CONFIG_USB_CDC_COMPOSITE is not set
1127
1128#
1129# OTG and related infrastructure
1130#
1131CONFIG_USB_OTG_UTILS=y
1132# CONFIG_USB_GPIO_VBUS is not set
1133# CONFIG_NOP_USB_XCEIV is not set
1134CONFIG_MMC=m
1069# CONFIG_MMC_DEBUG is not set 1135# CONFIG_MMC_DEBUG is not set
1070# CONFIG_MMC_UNSAFE_RESUME is not set 1136# CONFIG_MMC_UNSAFE_RESUME is not set
1071 1137
1072# 1138#
1073# MMC/SD Card Drivers 1139# MMC/SD/SDIO Card Drivers
1074# 1140#
1075CONFIG_MMC_BLOCK=y 1141CONFIG_MMC_BLOCK=m
1076CONFIG_MMC_BLOCK_BOUNCE=y 1142CONFIG_MMC_BLOCK_BOUNCE=y
1077# CONFIG_SDIO_UART is not set 1143# CONFIG_SDIO_UART is not set
1144# CONFIG_MMC_TEST is not set
1078 1145
1079# 1146#
1080# MMC/SD Host Controller Drivers 1147# MMC/SD/SDIO Host Controller Drivers
1081# 1148#
1082CONFIG_SDH_BFIN=y 1149# CONFIG_MMC_SDHCI is not set
1150CONFIG_SDH_BFIN=m
1151# CONFIG_SDH_BFIN_MISSING_CMD_PULLUP_WORKAROUND is not set
1152# CONFIG_SDH_BFIN_ENABLE_SDIO_IRQ is not set
1083# CONFIG_MMC_SPI is not set 1153# CONFIG_MMC_SPI is not set
1084# CONFIG_SPI_MMC is not set 1154# CONFIG_MEMSTICK is not set
1085# CONFIG_NEW_LEDS is not set 1155# CONFIG_NEW_LEDS is not set
1086CONFIG_RTC_LIB=y 1156# CONFIG_ACCESSIBILITY is not set
1087CONFIG_RTC_CLASS=y 1157CONFIG_RTC_LIB=m
1088CONFIG_RTC_HCTOSYS=y 1158CONFIG_RTC_CLASS=m
1089CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1090# CONFIG_RTC_DEBUG is not set
1091 1159
1092# 1160#
1093# RTC interfaces 1161# RTC interfaces
@@ -1111,66 +1179,74 @@ CONFIG_RTC_INTF_DEV=y
1111# CONFIG_RTC_DRV_PCF8563 is not set 1179# CONFIG_RTC_DRV_PCF8563 is not set
1112# CONFIG_RTC_DRV_PCF8583 is not set 1180# CONFIG_RTC_DRV_PCF8583 is not set
1113# CONFIG_RTC_DRV_M41T80 is not set 1181# CONFIG_RTC_DRV_M41T80 is not set
1182# CONFIG_RTC_DRV_S35390A is not set
1183# CONFIG_RTC_DRV_FM3130 is not set
1184# CONFIG_RTC_DRV_RX8581 is not set
1114 1185
1115# 1186#
1116# SPI RTC drivers 1187# SPI RTC drivers
1117# 1188#
1118# CONFIG_RTC_DRV_RS5C348 is not set 1189# CONFIG_RTC_DRV_M41T94 is not set
1190# CONFIG_RTC_DRV_DS1305 is not set
1191# CONFIG_RTC_DRV_DS1390 is not set
1119# CONFIG_RTC_DRV_MAX6902 is not set 1192# CONFIG_RTC_DRV_MAX6902 is not set
1193# CONFIG_RTC_DRV_R9701 is not set
1194# CONFIG_RTC_DRV_RS5C348 is not set
1195# CONFIG_RTC_DRV_DS3234 is not set
1120 1196
1121# 1197#
1122# Platform RTC drivers 1198# Platform RTC drivers
1123# 1199#
1200# CONFIG_RTC_DRV_DS1286 is not set
1201# CONFIG_RTC_DRV_DS1511 is not set
1124# CONFIG_RTC_DRV_DS1553 is not set 1202# CONFIG_RTC_DRV_DS1553 is not set
1125# CONFIG_RTC_DRV_STK17TA8 is not set
1126# CONFIG_RTC_DRV_DS1742 is not set 1203# CONFIG_RTC_DRV_DS1742 is not set
1204# CONFIG_RTC_DRV_STK17TA8 is not set
1127# CONFIG_RTC_DRV_M48T86 is not set 1205# CONFIG_RTC_DRV_M48T86 is not set
1206# CONFIG_RTC_DRV_M48T35 is not set
1128# CONFIG_RTC_DRV_M48T59 is not set 1207# CONFIG_RTC_DRV_M48T59 is not set
1208# CONFIG_RTC_DRV_BQ4802 is not set
1129# CONFIG_RTC_DRV_V3020 is not set 1209# CONFIG_RTC_DRV_V3020 is not set
1130 1210
1131# 1211#
1132# on-CPU RTC drivers 1212# on-CPU RTC drivers
1133# 1213#
1134CONFIG_RTC_DRV_BFIN=y 1214CONFIG_RTC_DRV_BFIN=m
1135 1215# CONFIG_DMADEVICES is not set
1136# 1216# CONFIG_AUXDISPLAY is not set
1137# Userspace I/O
1138#
1139# CONFIG_UIO is not set 1217# CONFIG_UIO is not set
1140 1218# CONFIG_STAGING is not set
1141#
1142# PBX support
1143#
1144# CONFIG_PBX is not set
1145 1219
1146# 1220#
1147# File systems 1221# File systems
1148# 1222#
1149# CONFIG_EXT2_FS is not set 1223CONFIG_EXT2_FS=m
1224# CONFIG_EXT2_FS_XATTR is not set
1150# CONFIG_EXT3_FS is not set 1225# CONFIG_EXT3_FS is not set
1151# CONFIG_EXT4DEV_FS is not set 1226# CONFIG_EXT4_FS is not set
1152# CONFIG_REISERFS_FS is not set 1227# CONFIG_REISERFS_FS is not set
1153# CONFIG_JFS_FS is not set 1228# CONFIG_JFS_FS is not set
1154# CONFIG_FS_POSIX_ACL is not set 1229# CONFIG_FS_POSIX_ACL is not set
1155# CONFIG_XFS_FS is not set 1230# CONFIG_XFS_FS is not set
1156# CONFIG_GFS2_FS is not set
1157# CONFIG_OCFS2_FS is not set 1231# CONFIG_OCFS2_FS is not set
1158# CONFIG_MINIX_FS is not set 1232# CONFIG_BTRFS_FS is not set
1159# CONFIG_ROMFS_FS is not set 1233CONFIG_FILE_LOCKING=y
1160CONFIG_INOTIFY=y
1161CONFIG_INOTIFY_USER=y
1162# CONFIG_QUOTA is not set
1163# CONFIG_DNOTIFY is not set 1234# CONFIG_DNOTIFY is not set
1235# CONFIG_INOTIFY is not set
1236# CONFIG_QUOTA is not set
1164# CONFIG_AUTOFS_FS is not set 1237# CONFIG_AUTOFS_FS is not set
1165# CONFIG_AUTOFS4_FS is not set 1238# CONFIG_AUTOFS4_FS is not set
1166# CONFIG_FUSE_FS is not set 1239# CONFIG_FUSE_FS is not set
1167 1240
1168# 1241#
1242# Caches
1243#
1244# CONFIG_FSCACHE is not set
1245
1246#
1169# CD-ROM/DVD Filesystems 1247# CD-ROM/DVD Filesystems
1170# 1248#
1171CONFIG_ISO9660_FS=m 1249# CONFIG_ISO9660_FS is not set
1172CONFIG_JOLIET=y
1173CONFIG_ZISOFS=y
1174# CONFIG_UDF_FS is not set 1250# CONFIG_UDF_FS is not set
1175 1251
1176# 1252#
@@ -1194,10 +1270,7 @@ CONFIG_SYSFS=y
1194# CONFIG_TMPFS is not set 1270# CONFIG_TMPFS is not set
1195# CONFIG_HUGETLB_PAGE is not set 1271# CONFIG_HUGETLB_PAGE is not set
1196# CONFIG_CONFIGFS_FS is not set 1272# CONFIG_CONFIGFS_FS is not set
1197 1273CONFIG_MISC_FILESYSTEMS=y
1198#
1199# Miscellaneous filesystems
1200#
1201# CONFIG_ADFS_FS is not set 1274# CONFIG_ADFS_FS is not set
1202# CONFIG_AFFS_FS is not set 1275# CONFIG_AFFS_FS is not set
1203# CONFIG_HFS_FS is not set 1276# CONFIG_HFS_FS is not set
@@ -1205,17 +1278,7 @@ CONFIG_SYSFS=y
1205# CONFIG_BEFS_FS is not set 1278# CONFIG_BEFS_FS is not set
1206# CONFIG_BFS_FS is not set 1279# CONFIG_BFS_FS is not set
1207# CONFIG_EFS_FS is not set 1280# CONFIG_EFS_FS is not set
1208CONFIG_YAFFS_FS=m 1281CONFIG_JFFS2_FS=y
1209CONFIG_YAFFS_YAFFS1=y
1210# CONFIG_YAFFS_DOES_ECC is not set
1211CONFIG_YAFFS_YAFFS2=y
1212CONFIG_YAFFS_AUTO_YAFFS2=y
1213# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
1214CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10
1215# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
1216# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
1217CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
1218CONFIG_JFFS2_FS=m
1219CONFIG_JFFS2_FS_DEBUG=0 1282CONFIG_JFFS2_FS_DEBUG=0
1220CONFIG_JFFS2_FS_WRITEBUFFER=y 1283CONFIG_JFFS2_FS_WRITEBUFFER=y
1221# CONFIG_JFFS2_FS_WBUF_VERIFY is not set 1284# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
@@ -1227,34 +1290,30 @@ CONFIG_JFFS2_ZLIB=y
1227CONFIG_JFFS2_RTIME=y 1290CONFIG_JFFS2_RTIME=y
1228# CONFIG_JFFS2_RUBIN is not set 1291# CONFIG_JFFS2_RUBIN is not set
1229# CONFIG_CRAMFS is not set 1292# CONFIG_CRAMFS is not set
1293# CONFIG_SQUASHFS is not set
1230# CONFIG_VXFS_FS is not set 1294# CONFIG_VXFS_FS is not set
1295# CONFIG_MINIX_FS is not set
1296# CONFIG_OMFS_FS is not set
1231# CONFIG_HPFS_FS is not set 1297# CONFIG_HPFS_FS is not set
1232# CONFIG_QNX4FS_FS is not set 1298# CONFIG_QNX4FS_FS is not set
1299# CONFIG_ROMFS_FS is not set
1233# CONFIG_SYSV_FS is not set 1300# CONFIG_SYSV_FS is not set
1234# CONFIG_UFS_FS is not set 1301# CONFIG_UFS_FS is not set
1302# CONFIG_NILFS2_FS is not set
1235CONFIG_NETWORK_FILESYSTEMS=y 1303CONFIG_NETWORK_FILESYSTEMS=y
1236CONFIG_NFS_FS=m 1304CONFIG_NFS_FS=m
1237CONFIG_NFS_V3=y 1305CONFIG_NFS_V3=y
1238# CONFIG_NFS_V3_ACL is not set 1306# CONFIG_NFS_V3_ACL is not set
1239# CONFIG_NFS_V4 is not set 1307# CONFIG_NFS_V4 is not set
1240# CONFIG_NFS_DIRECTIO is not set 1308# CONFIG_NFSD is not set
1241CONFIG_NFSD=m
1242CONFIG_NFSD_V3=y
1243# CONFIG_NFSD_V3_ACL is not set
1244# CONFIG_NFSD_V4 is not set
1245CONFIG_NFSD_TCP=y
1246CONFIG_LOCKD=m 1309CONFIG_LOCKD=m
1247CONFIG_LOCKD_V4=y 1310CONFIG_LOCKD_V4=y
1248CONFIG_EXPORTFS=m
1249CONFIG_NFS_COMMON=y 1311CONFIG_NFS_COMMON=y
1250CONFIG_SUNRPC=m 1312CONFIG_SUNRPC=m
1251# CONFIG_SUNRPC_BIND34 is not set
1252# CONFIG_RPCSEC_GSS_KRB5 is not set 1313# CONFIG_RPCSEC_GSS_KRB5 is not set
1253# CONFIG_RPCSEC_GSS_SPKM3 is not set 1314# CONFIG_RPCSEC_GSS_SPKM3 is not set
1254CONFIG_SMB_FS=m 1315# CONFIG_SMB_FS is not set
1255CONFIG_SMB_NLS_DEFAULT=y 1316CONFIG_CIFS=m
1256CONFIG_SMB_NLS_REMOTE="cp437"
1257CONFIG_CIFS=y
1258# CONFIG_CIFS_STATS is not set 1317# CONFIG_CIFS_STATS is not set
1259# CONFIG_CIFS_WEAK_PW_HASH is not set 1318# CONFIG_CIFS_WEAK_PW_HASH is not set
1260# CONFIG_CIFS_XATTR is not set 1319# CONFIG_CIFS_XATTR is not set
@@ -1267,24 +1326,8 @@ CONFIG_CIFS=y
1267# 1326#
1268# Partition Types 1327# Partition Types
1269# 1328#
1270CONFIG_PARTITION_ADVANCED=y 1329# CONFIG_PARTITION_ADVANCED is not set
1271# CONFIG_ACORN_PARTITION is not set
1272# CONFIG_OSF_PARTITION is not set
1273# CONFIG_AMIGA_PARTITION is not set
1274# CONFIG_ATARI_PARTITION is not set
1275# CONFIG_MAC_PARTITION is not set
1276CONFIG_MSDOS_PARTITION=y 1330CONFIG_MSDOS_PARTITION=y
1277# CONFIG_BSD_DISKLABEL is not set
1278# CONFIG_MINIX_SUBPARTITION is not set
1279# CONFIG_SOLARIS_X86_PARTITION is not set
1280# CONFIG_UNIXWARE_DISKLABEL is not set
1281# CONFIG_LDM_PARTITION is not set
1282# CONFIG_SGI_PARTITION is not set
1283# CONFIG_ULTRIX_PARTITION is not set
1284# CONFIG_SUN_PARTITION is not set
1285# CONFIG_KARMA_PARTITION is not set
1286# CONFIG_EFI_PARTITION is not set
1287# CONFIG_SYSV68_PARTITION is not set
1288CONFIG_NLS=y 1331CONFIG_NLS=y
1289CONFIG_NLS_DEFAULT="iso8859-1" 1332CONFIG_NLS_DEFAULT="iso8859-1"
1290CONFIG_NLS_CODEPAGE_437=m 1333CONFIG_NLS_CODEPAGE_437=m
@@ -1326,9 +1369,6 @@ CONFIG_NLS_KOI8_R=m
1326CONFIG_NLS_KOI8_U=m 1369CONFIG_NLS_KOI8_U=m
1327CONFIG_NLS_UTF8=m 1370CONFIG_NLS_UTF8=m
1328# CONFIG_DLM is not set 1371# CONFIG_DLM is not set
1329CONFIG_INSTRUMENTATION=y
1330# CONFIG_PROFILING is not set
1331# CONFIG_MARKERS is not set
1332 1372
1333# 1373#
1334# Kernel hacking 1374# Kernel hacking
@@ -1336,14 +1376,39 @@ CONFIG_INSTRUMENTATION=y
1336# CONFIG_PRINTK_TIME is not set 1376# CONFIG_PRINTK_TIME is not set
1337CONFIG_ENABLE_WARN_DEPRECATED=y 1377CONFIG_ENABLE_WARN_DEPRECATED=y
1338CONFIG_ENABLE_MUST_CHECK=y 1378CONFIG_ENABLE_MUST_CHECK=y
1379CONFIG_FRAME_WARN=1024
1339# CONFIG_MAGIC_SYSRQ is not set 1380# CONFIG_MAGIC_SYSRQ is not set
1340# CONFIG_UNUSED_SYMBOLS is not set 1381# CONFIG_UNUSED_SYMBOLS is not set
1341CONFIG_DEBUG_FS=y 1382CONFIG_DEBUG_FS=y
1342# CONFIG_HEADERS_CHECK is not set 1383# CONFIG_HEADERS_CHECK is not set
1384CONFIG_DEBUG_SECTION_MISMATCH=y
1343# CONFIG_DEBUG_KERNEL is not set 1385# CONFIG_DEBUG_KERNEL is not set
1344CONFIG_DEBUG_BUGVERBOSE=y 1386# CONFIG_DEBUG_BUGVERBOSE is not set
1387# CONFIG_DEBUG_MEMORY_INIT is not set
1388# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1389CONFIG_HAVE_FUNCTION_TRACER=y
1390CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1391CONFIG_TRACING_SUPPORT=y
1392
1393#
1394# Tracers
1395#
1396# CONFIG_FUNCTION_TRACER is not set
1397# CONFIG_SCHED_TRACER is not set
1398# CONFIG_CONTEXT_SWITCH_TRACER is not set
1399# CONFIG_EVENT_TRACER is not set
1400# CONFIG_BOOT_TRACER is not set
1401# CONFIG_TRACE_BRANCH_PROFILING is not set
1402# CONFIG_STACK_TRACER is not set
1403# CONFIG_KMEMTRACE is not set
1404# CONFIG_WORKQUEUE_TRACER is not set
1405# CONFIG_BLK_DEV_IO_TRACE is not set
1406# CONFIG_DYNAMIC_DEBUG is not set
1345# CONFIG_SAMPLES is not set 1407# CONFIG_SAMPLES is not set
1346CONFIG_DEBUG_MMRS=y 1408CONFIG_HAVE_ARCH_KGDB=y
1409CONFIG_DEBUG_VERBOSE=y
1410# CONFIG_DEBUG_MMRS is not set
1411# CONFIG_DEBUG_DOUBLEFAULT is not set
1347CONFIG_DEBUG_HUNT_FOR_ZERO=y 1412CONFIG_DEBUG_HUNT_FOR_ZERO=y
1348CONFIG_DEBUG_BFIN_HWTRACE_ON=y 1413CONFIG_DEBUG_BFIN_HWTRACE_ON=y
1349CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y 1414CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
@@ -1352,33 +1417,125 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
1352CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1417CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
1353# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1418# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
1354# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1419# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
1355# CONFIG_EARLY_PRINTK is not set 1420CONFIG_EARLY_PRINTK=y
1356CONFIG_CPLB_INFO=y 1421CONFIG_CPLB_INFO=y
1357CONFIG_ACCESS_CHECK=y 1422CONFIG_ACCESS_CHECK=y
1423# CONFIG_BFIN_ISRAM_SELF_TEST is not set
1358 1424
1359# 1425#
1360# Security options 1426# Security options
1361# 1427#
1362# CONFIG_KEYS is not set 1428# CONFIG_KEYS is not set
1363CONFIG_SECURITY=y 1429CONFIG_SECURITY=y
1430# CONFIG_SECURITYFS is not set
1364# CONFIG_SECURITY_NETWORK is not set 1431# CONFIG_SECURITY_NETWORK is not set
1365# CONFIG_SECURITY_CAPABILITIES is not set 1432# CONFIG_SECURITY_PATH is not set
1366# CONFIG_SECURITY_ROOTPLUG is not set 1433# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1367# CONFIG_CRYPTO is not set 1434# CONFIG_SECURITY_TOMOYO is not set
1435CONFIG_CRYPTO=y
1436
1437#
1438# Crypto core or helper
1439#
1440# CONFIG_CRYPTO_FIPS is not set
1441# CONFIG_CRYPTO_MANAGER is not set
1442# CONFIG_CRYPTO_MANAGER2 is not set
1443# CONFIG_CRYPTO_GF128MUL is not set
1444# CONFIG_CRYPTO_NULL is not set
1445# CONFIG_CRYPTO_CRYPTD is not set
1446# CONFIG_CRYPTO_AUTHENC is not set
1447# CONFIG_CRYPTO_TEST is not set
1448
1449#
1450# Authenticated Encryption with Associated Data
1451#
1452# CONFIG_CRYPTO_CCM is not set
1453# CONFIG_CRYPTO_GCM is not set
1454# CONFIG_CRYPTO_SEQIV is not set
1455
1456#
1457# Block modes
1458#
1459# CONFIG_CRYPTO_CBC is not set
1460# CONFIG_CRYPTO_CTR is not set
1461# CONFIG_CRYPTO_CTS is not set
1462# CONFIG_CRYPTO_ECB is not set
1463# CONFIG_CRYPTO_LRW is not set
1464# CONFIG_CRYPTO_PCBC is not set
1465# CONFIG_CRYPTO_XTS is not set
1466
1467#
1468# Hash modes
1469#
1470# CONFIG_CRYPTO_HMAC is not set
1471# CONFIG_CRYPTO_XCBC is not set
1472
1473#
1474# Digest
1475#
1476# CONFIG_CRYPTO_CRC32C is not set
1477# CONFIG_CRYPTO_MD4 is not set
1478# CONFIG_CRYPTO_MD5 is not set
1479# CONFIG_CRYPTO_MICHAEL_MIC is not set
1480# CONFIG_CRYPTO_RMD128 is not set
1481# CONFIG_CRYPTO_RMD160 is not set
1482# CONFIG_CRYPTO_RMD256 is not set
1483# CONFIG_CRYPTO_RMD320 is not set
1484# CONFIG_CRYPTO_SHA1 is not set
1485# CONFIG_CRYPTO_SHA256 is not set
1486# CONFIG_CRYPTO_SHA512 is not set
1487# CONFIG_CRYPTO_TGR192 is not set
1488# CONFIG_CRYPTO_WP512 is not set
1489
1490#
1491# Ciphers
1492#
1493# CONFIG_CRYPTO_AES is not set
1494# CONFIG_CRYPTO_ANUBIS is not set
1495# CONFIG_CRYPTO_ARC4 is not set
1496# CONFIG_CRYPTO_BLOWFISH is not set
1497# CONFIG_CRYPTO_CAMELLIA is not set
1498# CONFIG_CRYPTO_CAST5 is not set
1499# CONFIG_CRYPTO_CAST6 is not set
1500# CONFIG_CRYPTO_DES is not set
1501# CONFIG_CRYPTO_FCRYPT is not set
1502# CONFIG_CRYPTO_KHAZAD is not set
1503# CONFIG_CRYPTO_SALSA20 is not set
1504# CONFIG_CRYPTO_SEED is not set
1505# CONFIG_CRYPTO_SERPENT is not set
1506# CONFIG_CRYPTO_TEA is not set
1507# CONFIG_CRYPTO_TWOFISH is not set
1508
1509#
1510# Compression
1511#
1512# CONFIG_CRYPTO_DEFLATE is not set
1513# CONFIG_CRYPTO_ZLIB is not set
1514# CONFIG_CRYPTO_LZO is not set
1515
1516#
1517# Random Number Generation
1518#
1519# CONFIG_CRYPTO_ANSI_CPRNG is not set
1520# CONFIG_CRYPTO_HW is not set
1521# CONFIG_BINARY_PRINTF is not set
1368 1522
1369# 1523#
1370# Library routines 1524# Library routines
1371# 1525#
1372CONFIG_BITREVERSE=y 1526CONFIG_BITREVERSE=y
1527CONFIG_GENERIC_FIND_LAST_BIT=y
1373CONFIG_CRC_CCITT=m 1528CONFIG_CRC_CCITT=m
1374# CONFIG_CRC16 is not set 1529# CONFIG_CRC16 is not set
1530# CONFIG_CRC_T10DIF is not set
1375# CONFIG_CRC_ITU_T is not set 1531# CONFIG_CRC_ITU_T is not set
1376CONFIG_CRC32=y 1532CONFIG_CRC32=y
1377# CONFIG_CRC7 is not set 1533# CONFIG_CRC7 is not set
1378# CONFIG_LIBCRC32C is not set 1534# CONFIG_LIBCRC32C is not set
1379CONFIG_ZLIB_INFLATE=y 1535CONFIG_ZLIB_INFLATE=y
1380CONFIG_ZLIB_DEFLATE=m 1536CONFIG_ZLIB_DEFLATE=y
1381CONFIG_PLIST=y 1537CONFIG_DECOMPRESS_LZMA=y
1382CONFIG_HAS_IOMEM=y 1538CONFIG_HAS_IOMEM=y
1383CONFIG_HAS_IOPORT=y 1539CONFIG_HAS_IOPORT=y
1384CONFIG_HAS_DMA=y 1540CONFIG_HAS_DMA=y
1541CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig
index bae4ee6e68bb..a6df01dac98a 100644
--- a/arch/blackfin/configs/CM-BF561_defconfig
+++ b/arch/blackfin/configs/CM-BF561_defconfig
@@ -1,15 +1,14 @@
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.4 3# Linux kernel version: 2.6.30.5
4# Tue Apr 1 10:50:11 2008
5# 4#
6# CONFIG_MMU is not set 5# CONFIG_MMU is not set
7# CONFIG_FPU is not set 6# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12CONFIG_SEMAPHORE_SLEEPERS=y
13CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y 14CONFIG_GENERIC_HARDIRQS=y
@@ -17,6 +16,9 @@ CONFIG_GENERIC_IRQ_PROBE=y
17CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
18CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
19CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
21 23
22# 24#
@@ -27,62 +29,83 @@ CONFIG_BROKEN_ON_SMP=y
27CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
28CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
30CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
31CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
32# CONFIG_POSIX_MQUEUE is not set 40# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set 42# CONFIG_TASKSTATS is not set
35# CONFIG_USER_NS is not set
36# CONFIG_PID_NS is not set
37# CONFIG_AUDIT is not set 43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
38CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
40CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
56# CONFIG_GROUP_SCHED is not set
41# CONFIG_CGROUPS is not set 57# CONFIG_CGROUPS is not set
42CONFIG_FAIR_GROUP_SCHED=y 58# CONFIG_SYSFS_DEPRECATED_V2 is not set
43CONFIG_FAIR_USER_SCHED=y
44# CONFIG_FAIR_CGROUP_SCHED is not set
45# CONFIG_SYSFS_DEPRECATED is not set
46# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
47# CONFIG_BLK_DEV_INITRD is not set 60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
48# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
49# CONFIG_SYSCTL is not set 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
50CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
51# CONFIG_UID16 is not set 70# CONFIG_UID16 is not set
52# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
53CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
54# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
55# CONFIG_HOTPLUG is not set 74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y
56CONFIG_PRINTK=y 76CONFIG_PRINTK=y
57CONFIG_BUG=y 77CONFIG_BUG=y
58# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
59CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
60# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
61CONFIG_ANON_INODES=y
62CONFIG_EPOLL=y 81CONFIG_EPOLL=y
63CONFIG_SIGNALFD=y 82# CONFIG_SIGNALFD is not set
64CONFIG_EVENTFD=y 83# CONFIG_TIMERFD is not set
84# CONFIG_EVENTFD is not set
85# CONFIG_AIO is not set
65CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
66CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 87CONFIG_COMPAT_BRK=y
67# CONFIG_NP2 is not set
68CONFIG_SLAB=y 88CONFIG_SLAB=y
69# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
92# CONFIG_PROFILING is not set
93# CONFIG_MARKERS is not set
94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
71CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
72CONFIG_RT_MUTEXES=y
73CONFIG_TINY_SHMEM=y
74CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
75CONFIG_MODULES=y 99CONFIG_MODULES=y
100# CONFIG_MODULE_FORCE_LOAD is not set
76CONFIG_MODULE_UNLOAD=y 101CONFIG_MODULE_UNLOAD=y
77# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
78# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
79# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
80CONFIG_KMOD=y
81CONFIG_BLOCK=y 105CONFIG_BLOCK=y
82# CONFIG_LBD is not set 106# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
108# CONFIG_BLK_DEV_INTEGRITY is not set
86 109
87# 110#
88# IO Schedulers 111# IO Schedulers
@@ -99,6 +122,7 @@ CONFIG_DEFAULT_IOSCHED="noop"
99CONFIG_PREEMPT_NONE=y 122CONFIG_PREEMPT_NONE=y
100# CONFIG_PREEMPT_VOLUNTARY is not set 123# CONFIG_PREEMPT_VOLUNTARY is not set
101# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
125# CONFIG_FREEZER is not set
102 126
103# 127#
104# Blackfin Processor Options 128# Blackfin Processor Options
@@ -107,6 +131,10 @@ CONFIG_PREEMPT_NONE=y
107# 131#
108# Processor and Board Settings 132# Processor and Board Settings
109# 133#
134# CONFIG_BF512 is not set
135# CONFIG_BF514 is not set
136# CONFIG_BF516 is not set
137# CONFIG_BF518 is not set
110# CONFIG_BF522 is not set 138# CONFIG_BF522 is not set
111# CONFIG_BF523 is not set 139# CONFIG_BF523 is not set
112# CONFIG_BF524 is not set 140# CONFIG_BF524 is not set
@@ -119,30 +147,47 @@ CONFIG_PREEMPT_NONE=y
119# CONFIG_BF534 is not set 147# CONFIG_BF534 is not set
120# CONFIG_BF536 is not set 148# CONFIG_BF536 is not set
121# CONFIG_BF537 is not set 149# CONFIG_BF537 is not set
150# CONFIG_BF538 is not set
151# CONFIG_BF539 is not set
122# CONFIG_BF542 is not set 152# CONFIG_BF542 is not set
153# CONFIG_BF542M is not set
123# CONFIG_BF544 is not set 154# CONFIG_BF544 is not set
155# CONFIG_BF544M is not set
124# CONFIG_BF547 is not set 156# CONFIG_BF547 is not set
157# CONFIG_BF547M is not set
125# CONFIG_BF548 is not set 158# CONFIG_BF548 is not set
159# CONFIG_BF548M is not set
126# CONFIG_BF549 is not set 160# CONFIG_BF549 is not set
161# CONFIG_BF549M is not set
127CONFIG_BF561=y 162CONFIG_BF561=y
163# CONFIG_SMP is not set
164CONFIG_BF_REV_MIN=3
165CONFIG_BF_REV_MAX=5
128# CONFIG_BF_REV_0_0 is not set 166# CONFIG_BF_REV_0_0 is not set
129# CONFIG_BF_REV_0_1 is not set 167# CONFIG_BF_REV_0_1 is not set
130# CONFIG_BF_REV_0_2 is not set 168# CONFIG_BF_REV_0_2 is not set
131CONFIG_BF_REV_0_3=y 169CONFIG_BF_REV_0_3=y
132# CONFIG_BF_REV_0_4 is not set 170# CONFIG_BF_REV_0_4 is not set
133# CONFIG_BF_REV_0_5 is not set 171# CONFIG_BF_REV_0_5 is not set
172# CONFIG_BF_REV_0_6 is not set
134# CONFIG_BF_REV_ANY is not set 173# CONFIG_BF_REV_ANY is not set
135# CONFIG_BF_REV_NONE is not set 174# CONFIG_BF_REV_NONE is not set
136CONFIG_BFIN_DUAL_CORE=y
137CONFIG_MEM_MT48LC8M32B2B5_7=y 175CONFIG_MEM_MT48LC8M32B2B5_7=y
138CONFIG_IRQ_PLL_WAKEUP=7 176CONFIG_IRQ_PLL_WAKEUP=7
139CONFIG_IRQ_SPORT0_ERROR=7 177CONFIG_IRQ_SPORT0_ERROR=7
140CONFIG_IRQ_SPORT1_ERROR=7 178CONFIG_IRQ_SPORT1_ERROR=7
179CONFIG_IRQ_TIMER0=10
180CONFIG_IRQ_TIMER1=10
181CONFIG_IRQ_TIMER2=10
182CONFIG_IRQ_TIMER3=10
183CONFIG_IRQ_TIMER4=10
184CONFIG_IRQ_TIMER5=10
185CONFIG_IRQ_TIMER6=10
186CONFIG_IRQ_TIMER7=10
141CONFIG_IRQ_SPI_ERROR=7 187CONFIG_IRQ_SPI_ERROR=7
142# CONFIG_BFIN561_EZKIT is not set 188# CONFIG_BFIN561_EZKIT is not set
143# CONFIG_BFIN561_TEPLA is not set 189# CONFIG_BFIN561_TEPLA is not set
144CONFIG_BFIN561_BLUETECHNIX_CM=y 190CONFIG_BFIN561_BLUETECHNIX_CM=y
145# CONFIG_GENERIC_BF561_BOARD is not set
146 191
147# 192#
148# BF561 Specific Configuration 193# BF561 Specific Configuration
@@ -151,12 +196,7 @@ CONFIG_BFIN561_BLUETECHNIX_CM=y
151# 196#
152# Core B Support 197# Core B Support
153# 198#
154
155#
156# Core B Support
157#
158CONFIG_BF561_COREB=y 199CONFIG_BF561_COREB=y
159# CONFIG_BF561_COREB_RESET is not set
160 200
161# 201#
162# Interrupt Priority Assignment 202# Interrupt Priority Assignment
@@ -196,14 +236,6 @@ CONFIG_IRQ_DMA2_8=9
196CONFIG_IRQ_DMA2_9=9 236CONFIG_IRQ_DMA2_9=9
197CONFIG_IRQ_DMA2_10=9 237CONFIG_IRQ_DMA2_10=9
198CONFIG_IRQ_DMA2_11=9 238CONFIG_IRQ_DMA2_11=9
199CONFIG_IRQ_TIMER0=10
200CONFIG_IRQ_TIMER1=10
201CONFIG_IRQ_TIMER2=10
202CONFIG_IRQ_TIMER3=10
203CONFIG_IRQ_TIMER4=10
204CONFIG_IRQ_TIMER5=10
205CONFIG_IRQ_TIMER6=10
206CONFIG_IRQ_TIMER7=10
207CONFIG_IRQ_TIMER8=10 239CONFIG_IRQ_TIMER8=10
208CONFIG_IRQ_TIMER9=10 240CONFIG_IRQ_TIMER9=10
209CONFIG_IRQ_TIMER10=10 241CONFIG_IRQ_TIMER10=10
@@ -226,6 +258,7 @@ CONFIG_IRQ_WDTIMER=13
226# Board customizations 258# Board customizations
227# 259#
228# CONFIG_CMDLINE_BOOL is not set 260# CONFIG_CMDLINE_BOOL is not set
261CONFIG_BOOT_LOAD=0x1000
229 262
230# 263#
231# Clock/PLL Setup 264# Clock/PLL Setup
@@ -245,19 +278,20 @@ CONFIG_HZ_250=y
245# CONFIG_HZ_300 is not set 278# CONFIG_HZ_300 is not set
246# CONFIG_HZ_1000 is not set 279# CONFIG_HZ_1000 is not set
247CONFIG_HZ=250 280CONFIG_HZ=250
281# CONFIG_SCHED_HRTICK is not set
248CONFIG_GENERIC_TIME=y 282CONFIG_GENERIC_TIME=y
249CONFIG_GENERIC_CLOCKEVENTS=y 283CONFIG_GENERIC_CLOCKEVENTS=y
284# CONFIG_TICKSOURCE_GPTMR0 is not set
285CONFIG_TICKSOURCE_CORETMR=y
250# CONFIG_CYCLES_CLOCKSOURCE is not set 286# CONFIG_CYCLES_CLOCKSOURCE is not set
251# CONFIG_TICK_ONESHOT is not set 287# CONFIG_GPTMR0_CLOCKSOURCE is not set
252# CONFIG_NO_HZ is not set 288# CONFIG_NO_HZ is not set
253# CONFIG_HIGH_RES_TIMERS is not set 289# CONFIG_HIGH_RES_TIMERS is not set
254CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 290CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
255 291
256# 292#
257# Memory Setup 293# Misc
258# 294#
259CONFIG_MAX_MEM_SIZE=32
260CONFIG_BOOT_LOAD=0x1000
261CONFIG_BFIN_SCRATCH_REG_RETN=y 295CONFIG_BFIN_SCRATCH_REG_RETN=y
262# CONFIG_BFIN_SCRATCH_REG_RETE is not set 296# CONFIG_BFIN_SCRATCH_REG_RETE is not set
263# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set 297# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
@@ -284,6 +318,12 @@ CONFIG_IP_CHECKSUM_L1=y
284CONFIG_CACHELINE_ALIGNED_L1=y 318CONFIG_CACHELINE_ALIGNED_L1=y
285CONFIG_SYSCALL_TAB_L1=y 319CONFIG_SYSCALL_TAB_L1=y
286CONFIG_CPLB_SWITCH_TAB_L1=y 320CONFIG_CPLB_SWITCH_TAB_L1=y
321CONFIG_APP_STACK_L1=y
322
323#
324# Speed Optimizations
325#
326CONFIG_BFIN_INS_LOWOVERHEAD=y
287CONFIG_RAMKERNEL=y 327CONFIG_RAMKERNEL=y
288# CONFIG_ROMKERNEL is not set 328# CONFIG_ROMKERNEL is not set
289CONFIG_SELECT_MEMORY_MODEL=y 329CONFIG_SELECT_MEMORY_MODEL=y
@@ -292,14 +332,16 @@ CONFIG_FLATMEM_MANUAL=y
292# CONFIG_SPARSEMEM_MANUAL is not set 332# CONFIG_SPARSEMEM_MANUAL is not set
293CONFIG_FLATMEM=y 333CONFIG_FLATMEM=y
294CONFIG_FLAT_NODE_MEM_MAP=y 334CONFIG_FLAT_NODE_MEM_MAP=y
295# CONFIG_SPARSEMEM_STATIC is not set 335CONFIG_PAGEFLAGS_EXTENDED=y
296# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
297CONFIG_SPLIT_PTLOCK_CPUS=4 336CONFIG_SPLIT_PTLOCK_CPUS=4
298# CONFIG_RESOURCES_64BIT is not set 337# CONFIG_PHYS_ADDR_T_64BIT is not set
299CONFIG_ZONE_DMA_FLAG=1 338CONFIG_ZONE_DMA_FLAG=1
300CONFIG_VIRT_TO_BUS=y 339CONFIG_VIRT_TO_BUS=y
301CONFIG_LARGE_ALLOCS=y 340CONFIG_UNEVICTABLE_LRU=y
341CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
342CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
302# CONFIG_BFIN_GPTIMERS is not set 343# CONFIG_BFIN_GPTIMERS is not set
344# CONFIG_DMA_UNCACHED_4M is not set
303# CONFIG_DMA_UNCACHED_2M is not set 345# CONFIG_DMA_UNCACHED_2M is not set
304CONFIG_DMA_UNCACHED_1M=y 346CONFIG_DMA_UNCACHED_1M=y
305# CONFIG_DMA_UNCACHED_NONE is not set 347# CONFIG_DMA_UNCACHED_NONE is not set
@@ -308,15 +350,16 @@ CONFIG_DMA_UNCACHED_1M=y
308# Cache Support 350# Cache Support
309# 351#
310CONFIG_BFIN_ICACHE=y 352CONFIG_BFIN_ICACHE=y
311# CONFIG_BFIN_ICACHE_LOCK is not set 353CONFIG_BFIN_EXTMEM_ICACHEABLE=y
354# CONFIG_BFIN_L2_ICACHEABLE is not set
312CONFIG_BFIN_DCACHE=y 355CONFIG_BFIN_DCACHE=y
313# CONFIG_BFIN_DCACHE_BANKA is not set 356# CONFIG_BFIN_DCACHE_BANKA is not set
314CONFIG_BFIN_EXTMEM_ICACHEABLE=y
315CONFIG_BFIN_EXTMEM_DCACHEABLE=y 357CONFIG_BFIN_EXTMEM_DCACHEABLE=y
316CONFIG_BFIN_EXTMEM_WRITEBACK=y 358# CONFIG_BFIN_EXTMEM_WRITEBACK is not set
317# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 359CONFIG_BFIN_EXTMEM_WRITETHROUGH=y
318# CONFIG_BFIN_L2_ICACHEABLE is not set
319# CONFIG_BFIN_L2_DCACHEABLE is not set 360# CONFIG_BFIN_L2_DCACHEABLE is not set
361# CONFIG_BFIN_L2_WRITEBACK is not set
362# CONFIG_BFIN_L2_WRITETHROUGH is not set
320 363
321# 364#
322# Memory Protection Unit 365# Memory Protection Unit
@@ -324,7 +367,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
324# CONFIG_MPU is not set 367# CONFIG_MPU is not set
325 368
326# 369#
327# Asynchonous Memory Configuration 370# Asynchronous Memory Configuration
328# 371#
329 372
330# 373#
@@ -353,8 +396,8 @@ CONFIG_BANK_3=0xFFC2
353# 396#
354# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 397# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
355# 398#
356# CONFIG_PCI is not set
357# CONFIG_ARCH_SUPPORTS_MSI is not set 399# CONFIG_ARCH_SUPPORTS_MSI is not set
400# CONFIG_PCCARD is not set
358 401
359# 402#
360# Executable file formats 403# Executable file formats
@@ -363,18 +406,19 @@ CONFIG_BINFMT_ELF_FDPIC=y
363CONFIG_BINFMT_FLAT=y 406CONFIG_BINFMT_FLAT=y
364CONFIG_BINFMT_ZFLAT=y 407CONFIG_BINFMT_ZFLAT=y
365CONFIG_BINFMT_SHARED_FLAT=y 408CONFIG_BINFMT_SHARED_FLAT=y
409# CONFIG_HAVE_AOUT is not set
366# CONFIG_BINFMT_MISC is not set 410# CONFIG_BINFMT_MISC is not set
367 411
368# 412#
369# Power management options 413# Power management options
370# 414#
371# CONFIG_PM is not set 415# CONFIG_PM is not set
372CONFIG_SUSPEND_UP_POSSIBLE=y 416CONFIG_ARCH_SUSPEND_POSSIBLE=y
373# CONFIG_PM_WAKEUP_BY_GPIO is not set
374 417
375# 418#
376# Networking 419# CPU Frequency scaling
377# 420#
421# CONFIG_CPU_FREQ is not set
378CONFIG_NET=y 422CONFIG_NET=y
379 423
380# 424#
@@ -383,10 +427,6 @@ CONFIG_NET=y
383CONFIG_PACKET=y 427CONFIG_PACKET=y
384# CONFIG_PACKET_MMAP is not set 428# CONFIG_PACKET_MMAP is not set
385CONFIG_UNIX=y 429CONFIG_UNIX=y
386CONFIG_XFRM=y
387# CONFIG_XFRM_USER is not set
388# CONFIG_XFRM_SUB_POLICY is not set
389# CONFIG_XFRM_MIGRATE is not set
390# CONFIG_NET_KEY is not set 430# CONFIG_NET_KEY is not set
391CONFIG_INET=y 431CONFIG_INET=y
392# CONFIG_IP_MULTICAST is not set 432# CONFIG_IP_MULTICAST is not set
@@ -407,14 +447,11 @@ CONFIG_IP_FIB_HASH=y
407# CONFIG_INET_XFRM_MODE_BEET is not set 447# CONFIG_INET_XFRM_MODE_BEET is not set
408# CONFIG_INET_LRO is not set 448# CONFIG_INET_LRO is not set
409# CONFIG_INET_DIAG is not set 449# CONFIG_INET_DIAG is not set
410CONFIG_INET_TCP_DIAG=y
411# CONFIG_TCP_CONG_ADVANCED is not set 450# CONFIG_TCP_CONG_ADVANCED is not set
412CONFIG_TCP_CONG_CUBIC=y 451CONFIG_TCP_CONG_CUBIC=y
413CONFIG_DEFAULT_TCP_CONG="cubic" 452CONFIG_DEFAULT_TCP_CONG="cubic"
414# CONFIG_TCP_MD5SIG is not set 453# CONFIG_TCP_MD5SIG is not set
415# CONFIG_IPV6 is not set 454# CONFIG_IPV6 is not set
416# CONFIG_INET6_XFRM_TUNNEL is not set
417# CONFIG_INET6_TUNNEL is not set
418# CONFIG_NETLABEL is not set 455# CONFIG_NETLABEL is not set
419# CONFIG_NETWORK_SECMARK is not set 456# CONFIG_NETWORK_SECMARK is not set
420# CONFIG_NETFILTER is not set 457# CONFIG_NETFILTER is not set
@@ -423,6 +460,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
423# CONFIG_TIPC is not set 460# CONFIG_TIPC is not set
424# CONFIG_ATM is not set 461# CONFIG_ATM is not set
425# CONFIG_BRIDGE is not set 462# CONFIG_BRIDGE is not set
463# CONFIG_NET_DSA is not set
426# CONFIG_VLAN_8021Q is not set 464# CONFIG_VLAN_8021Q is not set
427# CONFIG_DECNET is not set 465# CONFIG_DECNET is not set
428# CONFIG_LLC2 is not set 466# CONFIG_LLC2 is not set
@@ -432,24 +470,21 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
432# CONFIG_LAPB is not set 470# CONFIG_LAPB is not set
433# CONFIG_ECONET is not set 471# CONFIG_ECONET is not set
434# CONFIG_WAN_ROUTER is not set 472# CONFIG_WAN_ROUTER is not set
473# CONFIG_PHONET is not set
435# CONFIG_NET_SCHED is not set 474# CONFIG_NET_SCHED is not set
475# CONFIG_DCB is not set
436 476
437# 477#
438# Network testing 478# Network testing
439# 479#
440# CONFIG_NET_PKTGEN is not set 480# CONFIG_NET_PKTGEN is not set
441# CONFIG_HAMRADIO is not set 481# CONFIG_HAMRADIO is not set
482# CONFIG_CAN is not set
442# CONFIG_IRDA is not set 483# CONFIG_IRDA is not set
443# CONFIG_BT is not set 484# CONFIG_BT is not set
444# CONFIG_AF_RXRPC is not set 485# CONFIG_AF_RXRPC is not set
445 486# CONFIG_WIRELESS is not set
446# 487# CONFIG_WIMAX is not set
447# Wireless
448#
449# CONFIG_CFG80211 is not set
450# CONFIG_WIRELESS_EXT is not set
451# CONFIG_MAC80211 is not set
452# CONFIG_IEEE80211 is not set
453# CONFIG_RFKILL is not set 488# CONFIG_RFKILL is not set
454# CONFIG_NET_9P is not set 489# CONFIG_NET_9P is not set
455 490
@@ -460,16 +495,22 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
460# 495#
461# Generic Driver Options 496# Generic Driver Options
462# 497#
498CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
463CONFIG_STANDALONE=y 499CONFIG_STANDALONE=y
464CONFIG_PREVENT_FIRMWARE_BUILD=y 500CONFIG_PREVENT_FIRMWARE_BUILD=y
501CONFIG_FW_LOADER=y
502CONFIG_FIRMWARE_IN_KERNEL=y
503CONFIG_EXTRA_FIRMWARE=""
465# CONFIG_SYS_HYPERVISOR is not set 504# CONFIG_SYS_HYPERVISOR is not set
466# CONFIG_CONNECTOR is not set 505# CONFIG_CONNECTOR is not set
467CONFIG_MTD=y 506CONFIG_MTD=y
468# CONFIG_MTD_DEBUG is not set 507# CONFIG_MTD_DEBUG is not set
508# CONFIG_MTD_TESTS is not set
469# CONFIG_MTD_CONCAT is not set 509# CONFIG_MTD_CONCAT is not set
470CONFIG_MTD_PARTITIONS=y 510CONFIG_MTD_PARTITIONS=y
471# CONFIG_MTD_REDBOOT_PARTS is not set 511# CONFIG_MTD_REDBOOT_PARTS is not set
472# CONFIG_MTD_CMDLINE_PARTS is not set 512CONFIG_MTD_CMDLINE_PARTS=y
513# CONFIG_MTD_AR7_PARTS is not set
473 514
474# 515#
475# User Modules And Translation Layers 516# User Modules And Translation Layers
@@ -487,8 +528,10 @@ CONFIG_MTD_BLOCK=y
487# 528#
488# RAM/ROM/Flash chip drivers 529# RAM/ROM/Flash chip drivers
489# 530#
490# CONFIG_MTD_CFI is not set 531CONFIG_MTD_CFI=y
491# CONFIG_MTD_JEDECPROBE is not set 532# CONFIG_MTD_JEDECPROBE is not set
533CONFIG_MTD_GEN_PROBE=y
534# CONFIG_MTD_CFI_ADV_OPTIONS is not set
492CONFIG_MTD_MAP_BANK_WIDTH_1=y 535CONFIG_MTD_MAP_BANK_WIDTH_1=y
493CONFIG_MTD_MAP_BANK_WIDTH_2=y 536CONFIG_MTD_MAP_BANK_WIDTH_2=y
494CONFIG_MTD_MAP_BANK_WIDTH_4=y 537CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -499,20 +542,29 @@ CONFIG_MTD_CFI_I1=y
499CONFIG_MTD_CFI_I2=y 542CONFIG_MTD_CFI_I2=y
500# CONFIG_MTD_CFI_I4 is not set 543# CONFIG_MTD_CFI_I4 is not set
501# CONFIG_MTD_CFI_I8 is not set 544# CONFIG_MTD_CFI_I8 is not set
545CONFIG_MTD_CFI_INTELEXT=y
546# CONFIG_MTD_CFI_AMDSTD is not set
547# CONFIG_MTD_CFI_STAA is not set
548# CONFIG_MTD_PSD4256G is not set
549CONFIG_MTD_CFI_UTIL=y
502CONFIG_MTD_RAM=y 550CONFIG_MTD_RAM=y
503# CONFIG_MTD_ROM is not set 551CONFIG_MTD_ROM=m
504# CONFIG_MTD_ABSENT is not set 552# CONFIG_MTD_ABSENT is not set
505 553
506# 554#
507# Mapping drivers for chip access 555# Mapping drivers for chip access
508# 556#
509# CONFIG_MTD_COMPLEX_MAPPINGS is not set 557# CONFIG_MTD_COMPLEX_MAPPINGS is not set
510CONFIG_MTD_UCLINUX=y 558CONFIG_MTD_PHYSMAP=y
559# CONFIG_MTD_PHYSMAP_COMPAT is not set
560# CONFIG_MTD_UCLINUX is not set
511# CONFIG_MTD_PLATRAM is not set 561# CONFIG_MTD_PLATRAM is not set
512 562
513# 563#
514# Self-contained MTD device drivers 564# Self-contained MTD device drivers
515# 565#
566# CONFIG_MTD_DATAFLASH is not set
567# CONFIG_MTD_M25P80 is not set
516# CONFIG_MTD_SLRAM is not set 568# CONFIG_MTD_SLRAM is not set
517# CONFIG_MTD_PHRAM is not set 569# CONFIG_MTD_PHRAM is not set
518# CONFIG_MTD_MTDRAM is not set 570# CONFIG_MTD_MTDRAM is not set
@@ -528,6 +580,11 @@ CONFIG_MTD_UCLINUX=y
528# CONFIG_MTD_ONENAND is not set 580# CONFIG_MTD_ONENAND is not set
529 581
530# 582#
583# LPDDR flash memory drivers
584#
585# CONFIG_MTD_LPDDR is not set
586
587#
531# UBI - Unsorted block images 588# UBI - Unsorted block images
532# 589#
533# CONFIG_MTD_UBI is not set 590# CONFIG_MTD_UBI is not set
@@ -539,14 +596,21 @@ CONFIG_BLK_DEV=y
539CONFIG_BLK_DEV_RAM=y 596CONFIG_BLK_DEV_RAM=y
540CONFIG_BLK_DEV_RAM_COUNT=16 597CONFIG_BLK_DEV_RAM_COUNT=16
541CONFIG_BLK_DEV_RAM_SIZE=4096 598CONFIG_BLK_DEV_RAM_SIZE=4096
542CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 599# CONFIG_BLK_DEV_XIP is not set
543# CONFIG_CDROM_PKTCDVD is not set 600# CONFIG_CDROM_PKTCDVD is not set
544# CONFIG_ATA_OVER_ETH is not set 601# CONFIG_ATA_OVER_ETH is not set
602# CONFIG_BLK_DEV_HD is not set
545CONFIG_MISC_DEVICES=y 603CONFIG_MISC_DEVICES=y
604# CONFIG_ENCLOSURE_SERVICES is not set
605# CONFIG_C2PORT is not set
606
607#
608# EEPROM support
609#
610# CONFIG_EEPROM_AT25 is not set
546# CONFIG_EEPROM_93CX6 is not set 611# CONFIG_EEPROM_93CX6 is not set
612CONFIG_HAVE_IDE=y
547# CONFIG_IDE is not set 613# CONFIG_IDE is not set
548# CONFIG_BFIN_IDE_ADDRESS_MAPPING_MODE0 is not set
549# CONFIG_BFIN_IDE_ADDRESS_MAPPING_MODE1 is not set
550 614
551# 615#
552# SCSI device support 616# SCSI device support
@@ -558,26 +622,50 @@ CONFIG_MISC_DEVICES=y
558# CONFIG_ATA is not set 622# CONFIG_ATA is not set
559# CONFIG_MD is not set 623# CONFIG_MD is not set
560CONFIG_NETDEVICES=y 624CONFIG_NETDEVICES=y
561# CONFIG_NETDEVICES_MULTIQUEUE is not set 625CONFIG_COMPAT_NET_DEV_OPS=y
562# CONFIG_DUMMY is not set 626# CONFIG_DUMMY is not set
563# CONFIG_BONDING is not set 627# CONFIG_BONDING is not set
564# CONFIG_MACVLAN is not set 628# CONFIG_MACVLAN is not set
565# CONFIG_EQUALIZER is not set 629# CONFIG_EQUALIZER is not set
566# CONFIG_TUN is not set 630# CONFIG_TUN is not set
567# CONFIG_VETH is not set 631# CONFIG_VETH is not set
568# CONFIG_PHYLIB is not set 632CONFIG_PHYLIB=y
633
634#
635# MII PHY device drivers
636#
637# CONFIG_MARVELL_PHY is not set
638# CONFIG_DAVICOM_PHY is not set
639# CONFIG_QSEMI_PHY is not set
640# CONFIG_LXT_PHY is not set
641# CONFIG_CICADA_PHY is not set
642# CONFIG_VITESSE_PHY is not set
643# CONFIG_SMSC_PHY is not set
644# CONFIG_BROADCOM_PHY is not set
645# CONFIG_ICPLUS_PHY is not set
646# CONFIG_REALTEK_PHY is not set
647# CONFIG_NATIONAL_PHY is not set
648# CONFIG_STE10XP is not set
649# CONFIG_LSI_ET1011C_PHY is not set
650# CONFIG_FIXED_PHY is not set
651# CONFIG_MDIO_BITBANG is not set
569CONFIG_NET_ETHERNET=y 652CONFIG_NET_ETHERNET=y
570CONFIG_MII=y 653CONFIG_MII=y
571CONFIG_SMC91X=y 654# CONFIG_SMC91X is not set
572# CONFIG_SMSC911X is not set
573# CONFIG_DM9000 is not set 655# CONFIG_DM9000 is not set
656# CONFIG_ENC28J60 is not set
657# CONFIG_ETHOC is not set
658CONFIG_SMSC911X=m
659# CONFIG_DNET is not set
574# CONFIG_IBM_NEW_EMAC_ZMII is not set 660# CONFIG_IBM_NEW_EMAC_ZMII is not set
575# CONFIG_IBM_NEW_EMAC_RGMII is not set 661# CONFIG_IBM_NEW_EMAC_RGMII is not set
576# CONFIG_IBM_NEW_EMAC_TAH is not set 662# CONFIG_IBM_NEW_EMAC_TAH is not set
577# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 663# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
664# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
665# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
666# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
578# CONFIG_B44 is not set 667# CONFIG_B44 is not set
579# CONFIG_NETDEV_1000 is not set 668# CONFIG_NETDEV_1000 is not set
580# CONFIG_AX88180 is not set
581# CONFIG_NETDEV_10000 is not set 669# CONFIG_NETDEV_10000 is not set
582 670
583# 671#
@@ -585,10 +673,13 @@ CONFIG_SMC91X=y
585# 673#
586# CONFIG_WLAN_PRE80211 is not set 674# CONFIG_WLAN_PRE80211 is not set
587# CONFIG_WLAN_80211 is not set 675# CONFIG_WLAN_80211 is not set
676
677#
678# Enable WiMAX (Networking options) to see the WiMAX drivers
679#
588# CONFIG_WAN is not set 680# CONFIG_WAN is not set
589# CONFIG_PPP is not set 681# CONFIG_PPP is not set
590# CONFIG_SLIP is not set 682# CONFIG_SLIP is not set
591# CONFIG_SHAPER is not set
592# CONFIG_NETCONSOLE is not set 683# CONFIG_NETCONSOLE is not set
593# CONFIG_NETPOLL is not set 684# CONFIG_NETPOLL is not set
594# CONFIG_NET_POLL_CONTROLLER is not set 685# CONFIG_NET_POLL_CONTROLLER is not set
@@ -609,16 +700,15 @@ CONFIG_SMC91X=y
609# 700#
610# Character devices 701# Character devices
611# 702#
612# CONFIG_AD9960 is not set 703CONFIG_BFIN_DMA_INTERFACE=m
613# CONFIG_SPI_ADC_BF533 is not set 704# CONFIG_BFIN_PPI is not set
614# CONFIG_BF5xx_PPIFCD is not set 705# CONFIG_BFIN_PPIFCD is not set
615# CONFIG_BFIN_SIMPLE_TIMER is not set 706# CONFIG_BFIN_SIMPLE_TIMER is not set
616# CONFIG_BF5xx_PPI is not set 707# CONFIG_BFIN_SPI_ADC is not set
617# CONFIG_BFIN_SPORT is not set 708# CONFIG_BFIN_SPORT is not set
618# CONFIG_BFIN_TIMER_LATENCY is not set
619# CONFIG_SIMPLE_GPIO is not set
620# CONFIG_VT is not set 709# CONFIG_VT is not set
621# CONFIG_DEVKMEM is not set 710# CONFIG_DEVKMEM is not set
711# CONFIG_BFIN_JTAG_COMM is not set
622# CONFIG_SERIAL_NONSTANDARD is not set 712# CONFIG_SERIAL_NONSTANDARD is not set
623 713
624# 714#
@@ -629,6 +719,7 @@ CONFIG_SMC91X=y
629# 719#
630# Non-8250 serial port support 720# Non-8250 serial port support
631# 721#
722# CONFIG_SERIAL_MAX3100 is not set
632CONFIG_SERIAL_BFIN=y 723CONFIG_SERIAL_BFIN=y
633CONFIG_SERIAL_BFIN_CONSOLE=y 724CONFIG_SERIAL_BFIN_CONSOLE=y
634CONFIG_SERIAL_BFIN_DMA=y 725CONFIG_SERIAL_BFIN_DMA=y
@@ -639,6 +730,7 @@ CONFIG_SERIAL_CORE=y
639CONFIG_SERIAL_CORE_CONSOLE=y 730CONFIG_SERIAL_CORE_CONSOLE=y
640# CONFIG_SERIAL_BFIN_SPORT is not set 731# CONFIG_SERIAL_BFIN_SPORT is not set
641CONFIG_UNIX98_PTYS=y 732CONFIG_UNIX98_PTYS=y
733# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
642# CONFIG_LEGACY_PTYS is not set 734# CONFIG_LEGACY_PTYS is not set
643 735
644# 736#
@@ -647,54 +739,100 @@ CONFIG_UNIX98_PTYS=y
647# CONFIG_CAN4LINUX is not set 739# CONFIG_CAN4LINUX is not set
648# CONFIG_IPMI_HANDLER is not set 740# CONFIG_IPMI_HANDLER is not set
649# CONFIG_HW_RANDOM is not set 741# CONFIG_HW_RANDOM is not set
650# CONFIG_GEN_RTC is not set
651# CONFIG_R3964 is not set 742# CONFIG_R3964 is not set
652# CONFIG_RAW_DRIVER is not set 743# CONFIG_RAW_DRIVER is not set
653# CONFIG_TCG_TPM is not set 744# CONFIG_TCG_TPM is not set
654# CONFIG_I2C is not set 745# CONFIG_I2C is not set
746CONFIG_SPI=y
747CONFIG_SPI_MASTER=y
748
749#
750# SPI Master Controller Drivers
751#
752CONFIG_SPI_BFIN=y
753# CONFIG_SPI_BFIN_LOCK is not set
754# CONFIG_SPI_BFIN_SPORT is not set
755# CONFIG_SPI_BITBANG is not set
756# CONFIG_SPI_GPIO is not set
655 757
758#
759# SPI Protocol Masters
760#
761# CONFIG_SPI_SPIDEV is not set
762# CONFIG_SPI_TLE62X0 is not set
656CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 763CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
657CONFIG_GPIOLIB=y 764CONFIG_GPIOLIB=y
658CONFIG_GPIO_SYSFS=y 765CONFIG_GPIO_SYSFS=y
659 766
660# 767#
661# SPI support 768# Memory mapped GPIO expanders:
769#
770
771#
772# I2C GPIO expanders:
773#
774
662# 775#
663# CONFIG_SPI is not set 776# PCI GPIO expanders:
664# CONFIG_SPI_MASTER is not set 777#
778
779#
780# SPI GPIO expanders:
781#
782# CONFIG_GPIO_MAX7301 is not set
783# CONFIG_GPIO_MCP23S08 is not set
665# CONFIG_W1 is not set 784# CONFIG_W1 is not set
666# CONFIG_POWER_SUPPLY is not set 785# CONFIG_POWER_SUPPLY is not set
667CONFIG_HWMON=y 786CONFIG_HWMON=y
668# CONFIG_HWMON_VID is not set 787# CONFIG_HWMON_VID is not set
788# CONFIG_SENSORS_ADCXX is not set
669# CONFIG_SENSORS_F71805F is not set 789# CONFIG_SENSORS_F71805F is not set
670# CONFIG_SENSORS_F71882FG is not set 790# CONFIG_SENSORS_F71882FG is not set
671# CONFIG_SENSORS_IT87 is not set 791# CONFIG_SENSORS_IT87 is not set
792# CONFIG_SENSORS_LM70 is not set
793# CONFIG_SENSORS_MAX1111 is not set
672# CONFIG_SENSORS_PC87360 is not set 794# CONFIG_SENSORS_PC87360 is not set
673# CONFIG_SENSORS_PC87427 is not set 795# CONFIG_SENSORS_PC87427 is not set
796# CONFIG_SENSORS_SHT15 is not set
674# CONFIG_SENSORS_SMSC47M1 is not set 797# CONFIG_SENSORS_SMSC47M1 is not set
675# CONFIG_SENSORS_SMSC47B397 is not set 798# CONFIG_SENSORS_SMSC47B397 is not set
676# CONFIG_SENSORS_VT1211 is not set 799# CONFIG_SENSORS_VT1211 is not set
677# CONFIG_SENSORS_W83627HF is not set 800# CONFIG_SENSORS_W83627HF is not set
678# CONFIG_SENSORS_W83627EHF is not set 801# CONFIG_SENSORS_W83627EHF is not set
679# CONFIG_HWMON_DEBUG_CHIP is not set 802# CONFIG_HWMON_DEBUG_CHIP is not set
803# CONFIG_THERMAL is not set
804# CONFIG_THERMAL_HWMON is not set
680# CONFIG_WATCHDOG is not set 805# CONFIG_WATCHDOG is not set
806CONFIG_SSB_POSSIBLE=y
681 807
682# 808#
683# Sonics Silicon Backplane 809# Sonics Silicon Backplane
684# 810#
685CONFIG_SSB_POSSIBLE=y
686# CONFIG_SSB is not set 811# CONFIG_SSB is not set
687 812
688# 813#
689# Multifunction device drivers 814# Multifunction device drivers
690# 815#
816# CONFIG_MFD_CORE is not set
691# CONFIG_MFD_SM501 is not set 817# CONFIG_MFD_SM501 is not set
818# CONFIG_HTC_PASIC3 is not set
819# CONFIG_MFD_TMIO is not set
820# CONFIG_REGULATOR is not set
692 821
693# 822#
694# Multimedia devices 823# Multimedia devices
695# 824#
825
826#
827# Multimedia core support
828#
696# CONFIG_VIDEO_DEV is not set 829# CONFIG_VIDEO_DEV is not set
697# CONFIG_DVB_CORE is not set 830# CONFIG_DVB_CORE is not set
831# CONFIG_VIDEO_MEDIA is not set
832
833#
834# Multimedia drivers
835#
698# CONFIG_DAB is not set 836# CONFIG_DAB is not set
699 837
700# 838#
@@ -709,42 +847,85 @@ CONFIG_SSB_POSSIBLE=y
709# Display device support 847# Display device support
710# 848#
711# CONFIG_DISPLAY_SUPPORT is not set 849# CONFIG_DISPLAY_SUPPORT is not set
712
713#
714# Sound
715#
716# CONFIG_SOUND is not set 850# CONFIG_SOUND is not set
717CONFIG_USB_SUPPORT=y 851CONFIG_USB_SUPPORT=y
718CONFIG_USB_ARCH_HAS_HCD=y 852CONFIG_USB_ARCH_HAS_HCD=y
719# CONFIG_USB_ARCH_HAS_OHCI is not set 853# CONFIG_USB_ARCH_HAS_OHCI is not set
720# CONFIG_USB_ARCH_HAS_EHCI is not set 854# CONFIG_USB_ARCH_HAS_EHCI is not set
721# CONFIG_USB is not set 855# CONFIG_USB is not set
722 856# CONFIG_USB_OTG_WHITELIST is not set
723# 857# CONFIG_USB_OTG_BLACKLIST_HUB is not set
724# Enable Host or Gadget support to see Inventra options 858# CONFIG_USB_GADGET_MUSB_HDRC is not set
725# 859
726 860#
727# 861# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
728# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 862#
729# 863CONFIG_USB_GADGET=m
730 864# CONFIG_USB_GADGET_DEBUG_FILES is not set
731# 865# CONFIG_USB_GADGET_DEBUG_FS is not set
732# USB Gadget Support 866CONFIG_USB_GADGET_VBUS_DRAW=2
733# 867CONFIG_USB_GADGET_SELECTED=y
734# CONFIG_USB_GADGET is not set 868# CONFIG_USB_GADGET_AT91 is not set
735# CONFIG_MMC is not set 869# CONFIG_USB_GADGET_ATMEL_USBA is not set
870# CONFIG_USB_GADGET_FSL_USB2 is not set
871# CONFIG_USB_GADGET_LH7A40X is not set
872# CONFIG_USB_GADGET_OMAP is not set
873# CONFIG_USB_GADGET_PXA25X is not set
874# CONFIG_USB_GADGET_PXA27X is not set
875# CONFIG_USB_GADGET_S3C2410 is not set
876# CONFIG_USB_GADGET_IMX is not set
877# CONFIG_USB_GADGET_M66592 is not set
878# CONFIG_USB_GADGET_AMD5536UDC is not set
879# CONFIG_USB_GADGET_FSL_QE is not set
880# CONFIG_USB_GADGET_CI13XXX is not set
881CONFIG_USB_GADGET_NET2272=y
882CONFIG_USB_NET2272=m
883# CONFIG_USB_GADGET_NET2280 is not set
884# CONFIG_USB_GADGET_GOKU is not set
885# CONFIG_USB_GADGET_DUMMY_HCD is not set
886CONFIG_USB_GADGET_DUALSPEED=y
887# CONFIG_USB_ZERO is not set
888# CONFIG_USB_AUDIO is not set
889CONFIG_USB_ETH=m
890CONFIG_USB_ETH_RNDIS=y
891# CONFIG_USB_GADGETFS is not set
892CONFIG_USB_FILE_STORAGE=m
893# CONFIG_USB_FILE_STORAGE_TEST is not set
894CONFIG_USB_G_SERIAL=m
895# CONFIG_USB_MIDI_GADGET is not set
896CONFIG_USB_G_PRINTER=m
897# CONFIG_USB_CDC_COMPOSITE is not set
898
899#
900# OTG and related infrastructure
901#
902# CONFIG_USB_GPIO_VBUS is not set
903# CONFIG_NOP_USB_XCEIV is not set
904CONFIG_MMC=y
905# CONFIG_MMC_DEBUG is not set
906# CONFIG_MMC_UNSAFE_RESUME is not set
907
908#
909# MMC/SD/SDIO Card Drivers
910#
911CONFIG_MMC_BLOCK=y
912CONFIG_MMC_BLOCK_BOUNCE=y
913# CONFIG_SDIO_UART is not set
914# CONFIG_MMC_TEST is not set
915
916#
917# MMC/SD/SDIO Host Controller Drivers
918#
919# CONFIG_MMC_SDHCI is not set
920CONFIG_MMC_SPI=m
921# CONFIG_MEMSTICK is not set
736# CONFIG_NEW_LEDS is not set 922# CONFIG_NEW_LEDS is not set
923# CONFIG_ACCESSIBILITY is not set
737# CONFIG_RTC_CLASS is not set 924# CONFIG_RTC_CLASS is not set
738 925# CONFIG_DMADEVICES is not set
739# 926# CONFIG_AUXDISPLAY is not set
740# Userspace I/O
741#
742# CONFIG_UIO is not set 927# CONFIG_UIO is not set
743 928# CONFIG_STAGING is not set
744#
745# PBX support
746#
747# CONFIG_PBX is not set
748 929
749# 930#
750# File systems 931# File systems
@@ -754,25 +935,29 @@ CONFIG_EXT2_FS_XATTR=y
754# CONFIG_EXT2_FS_POSIX_ACL is not set 935# CONFIG_EXT2_FS_POSIX_ACL is not set
755# CONFIG_EXT2_FS_SECURITY is not set 936# CONFIG_EXT2_FS_SECURITY is not set
756# CONFIG_EXT3_FS is not set 937# CONFIG_EXT3_FS is not set
757# CONFIG_EXT4DEV_FS is not set 938# CONFIG_EXT4_FS is not set
758CONFIG_FS_MBCACHE=y 939CONFIG_FS_MBCACHE=y
759# CONFIG_REISERFS_FS is not set 940# CONFIG_REISERFS_FS is not set
760# CONFIG_JFS_FS is not set 941# CONFIG_JFS_FS is not set
761# CONFIG_FS_POSIX_ACL is not set 942# CONFIG_FS_POSIX_ACL is not set
762# CONFIG_XFS_FS is not set 943# CONFIG_XFS_FS is not set
763# CONFIG_GFS2_FS is not set
764# CONFIG_OCFS2_FS is not set 944# CONFIG_OCFS2_FS is not set
765# CONFIG_MINIX_FS is not set 945# CONFIG_BTRFS_FS is not set
766# CONFIG_ROMFS_FS is not set 946CONFIG_FILE_LOCKING=y
947# CONFIG_DNOTIFY is not set
767CONFIG_INOTIFY=y 948CONFIG_INOTIFY=y
768CONFIG_INOTIFY_USER=y 949CONFIG_INOTIFY_USER=y
769# CONFIG_QUOTA is not set 950# CONFIG_QUOTA is not set
770# CONFIG_DNOTIFY is not set
771# CONFIG_AUTOFS_FS is not set 951# CONFIG_AUTOFS_FS is not set
772# CONFIG_AUTOFS4_FS is not set 952# CONFIG_AUTOFS4_FS is not set
773# CONFIG_FUSE_FS is not set 953# CONFIG_FUSE_FS is not set
774 954
775# 955#
956# Caches
957#
958# CONFIG_FSCACHE is not set
959
960#
776# CD-ROM/DVD Filesystems 961# CD-ROM/DVD Filesystems
777# 962#
778# CONFIG_ISO9660_FS is not set 963# CONFIG_ISO9660_FS is not set
@@ -781,8 +966,11 @@ CONFIG_INOTIFY_USER=y
781# 966#
782# DOS/FAT/NT Filesystems 967# DOS/FAT/NT Filesystems
783# 968#
784# CONFIG_MSDOS_FS is not set 969CONFIG_FAT_FS=y
785# CONFIG_VFAT_FS is not set 970CONFIG_MSDOS_FS=y
971CONFIG_VFAT_FS=y
972CONFIG_FAT_DEFAULT_CODEPAGE=437
973CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
786# CONFIG_NTFS_FS is not set 974# CONFIG_NTFS_FS is not set
787 975
788# 976#
@@ -794,10 +982,7 @@ CONFIG_SYSFS=y
794# CONFIG_TMPFS is not set 982# CONFIG_TMPFS is not set
795# CONFIG_HUGETLB_PAGE is not set 983# CONFIG_HUGETLB_PAGE is not set
796# CONFIG_CONFIGFS_FS is not set 984# CONFIG_CONFIGFS_FS is not set
797 985CONFIG_MISC_FILESYSTEMS=y
798#
799# Miscellaneous filesystems
800#
801# CONFIG_ADFS_FS is not set 986# CONFIG_ADFS_FS is not set
802# CONFIG_AFFS_FS is not set 987# CONFIG_AFFS_FS is not set
803# CONFIG_HFS_FS is not set 988# CONFIG_HFS_FS is not set
@@ -805,14 +990,28 @@ CONFIG_SYSFS=y
805# CONFIG_BEFS_FS is not set 990# CONFIG_BEFS_FS is not set
806# CONFIG_BFS_FS is not set 991# CONFIG_BFS_FS is not set
807# CONFIG_EFS_FS is not set 992# CONFIG_EFS_FS is not set
808# CONFIG_YAFFS_FS is not set 993CONFIG_JFFS2_FS=y
809# CONFIG_JFFS2_FS is not set 994CONFIG_JFFS2_FS_DEBUG=0
995CONFIG_JFFS2_FS_WRITEBUFFER=y
996# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
997# CONFIG_JFFS2_SUMMARY is not set
998# CONFIG_JFFS2_FS_XATTR is not set
999# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1000CONFIG_JFFS2_ZLIB=y
1001# CONFIG_JFFS2_LZO is not set
1002CONFIG_JFFS2_RTIME=y
1003# CONFIG_JFFS2_RUBIN is not set
810# CONFIG_CRAMFS is not set 1004# CONFIG_CRAMFS is not set
1005# CONFIG_SQUASHFS is not set
811# CONFIG_VXFS_FS is not set 1006# CONFIG_VXFS_FS is not set
1007# CONFIG_MINIX_FS is not set
1008# CONFIG_OMFS_FS is not set
812# CONFIG_HPFS_FS is not set 1009# CONFIG_HPFS_FS is not set
813# CONFIG_QNX4FS_FS is not set 1010# CONFIG_QNX4FS_FS is not set
1011# CONFIG_ROMFS_FS is not set
814# CONFIG_SYSV_FS is not set 1012# CONFIG_SYSV_FS is not set
815# CONFIG_UFS_FS is not set 1013# CONFIG_UFS_FS is not set
1014# CONFIG_NILFS2_FS is not set
816CONFIG_NETWORK_FILESYSTEMS=y 1015CONFIG_NETWORK_FILESYSTEMS=y
817# CONFIG_NFS_FS is not set 1016# CONFIG_NFS_FS is not set
818# CONFIG_NFSD is not set 1017# CONFIG_NFSD is not set
@@ -827,11 +1026,47 @@ CONFIG_NETWORK_FILESYSTEMS=y
827# 1026#
828# CONFIG_PARTITION_ADVANCED is not set 1027# CONFIG_PARTITION_ADVANCED is not set
829CONFIG_MSDOS_PARTITION=y 1028CONFIG_MSDOS_PARTITION=y
830# CONFIG_NLS is not set 1029CONFIG_NLS=y
1030CONFIG_NLS_DEFAULT="iso8859-1"
1031CONFIG_NLS_CODEPAGE_437=y
1032# CONFIG_NLS_CODEPAGE_737 is not set
1033# CONFIG_NLS_CODEPAGE_775 is not set
1034# CONFIG_NLS_CODEPAGE_850 is not set
1035# CONFIG_NLS_CODEPAGE_852 is not set
1036# CONFIG_NLS_CODEPAGE_855 is not set
1037# CONFIG_NLS_CODEPAGE_857 is not set
1038# CONFIG_NLS_CODEPAGE_860 is not set
1039# CONFIG_NLS_CODEPAGE_861 is not set
1040# CONFIG_NLS_CODEPAGE_862 is not set
1041# CONFIG_NLS_CODEPAGE_863 is not set
1042# CONFIG_NLS_CODEPAGE_864 is not set
1043# CONFIG_NLS_CODEPAGE_865 is not set
1044# CONFIG_NLS_CODEPAGE_866 is not set
1045# CONFIG_NLS_CODEPAGE_869 is not set
1046# CONFIG_NLS_CODEPAGE_936 is not set
1047# CONFIG_NLS_CODEPAGE_950 is not set
1048# CONFIG_NLS_CODEPAGE_932 is not set
1049# CONFIG_NLS_CODEPAGE_949 is not set
1050# CONFIG_NLS_CODEPAGE_874 is not set
1051# CONFIG_NLS_ISO8859_8 is not set
1052# CONFIG_NLS_CODEPAGE_1250 is not set
1053# CONFIG_NLS_CODEPAGE_1251 is not set
1054# CONFIG_NLS_ASCII is not set
1055CONFIG_NLS_ISO8859_1=y
1056# CONFIG_NLS_ISO8859_2 is not set
1057# CONFIG_NLS_ISO8859_3 is not set
1058# CONFIG_NLS_ISO8859_4 is not set
1059# CONFIG_NLS_ISO8859_5 is not set
1060# CONFIG_NLS_ISO8859_6 is not set
1061# CONFIG_NLS_ISO8859_7 is not set
1062# CONFIG_NLS_ISO8859_9 is not set
1063# CONFIG_NLS_ISO8859_13 is not set
1064# CONFIG_NLS_ISO8859_14 is not set
1065# CONFIG_NLS_ISO8859_15 is not set
1066# CONFIG_NLS_KOI8_R is not set
1067# CONFIG_NLS_KOI8_U is not set
1068# CONFIG_NLS_UTF8 is not set
831# CONFIG_DLM is not set 1069# CONFIG_DLM is not set
832CONFIG_INSTRUMENTATION=y
833# CONFIG_PROFILING is not set
834# CONFIG_MARKERS is not set
835 1070
836# 1071#
837# Kernel hacking 1072# Kernel hacking
@@ -839,14 +1074,40 @@ CONFIG_INSTRUMENTATION=y
839# CONFIG_PRINTK_TIME is not set 1074# CONFIG_PRINTK_TIME is not set
840CONFIG_ENABLE_WARN_DEPRECATED=y 1075CONFIG_ENABLE_WARN_DEPRECATED=y
841CONFIG_ENABLE_MUST_CHECK=y 1076CONFIG_ENABLE_MUST_CHECK=y
1077CONFIG_FRAME_WARN=1024
842# CONFIG_MAGIC_SYSRQ is not set 1078# CONFIG_MAGIC_SYSRQ is not set
843# CONFIG_UNUSED_SYMBOLS is not set 1079# CONFIG_UNUSED_SYMBOLS is not set
844CONFIG_DEBUG_FS=y 1080CONFIG_DEBUG_FS=y
845# CONFIG_HEADERS_CHECK is not set 1081# CONFIG_HEADERS_CHECK is not set
1082CONFIG_DEBUG_SECTION_MISMATCH=y
846# CONFIG_DEBUG_KERNEL is not set 1083# CONFIG_DEBUG_KERNEL is not set
847CONFIG_DEBUG_BUGVERBOSE=y 1084# CONFIG_DEBUG_BUGVERBOSE is not set
1085# CONFIG_DEBUG_MEMORY_INIT is not set
1086# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1087CONFIG_HAVE_FUNCTION_TRACER=y
1088CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1089CONFIG_TRACING_SUPPORT=y
1090
1091#
1092# Tracers
1093#
1094# CONFIG_FUNCTION_TRACER is not set
1095# CONFIG_IRQSOFF_TRACER is not set
1096# CONFIG_SCHED_TRACER is not set
1097# CONFIG_CONTEXT_SWITCH_TRACER is not set
1098# CONFIG_EVENT_TRACER is not set
1099# CONFIG_BOOT_TRACER is not set
1100# CONFIG_TRACE_BRANCH_PROFILING is not set
1101# CONFIG_STACK_TRACER is not set
1102# CONFIG_KMEMTRACE is not set
1103# CONFIG_WORKQUEUE_TRACER is not set
1104# CONFIG_BLK_DEV_IO_TRACE is not set
1105# CONFIG_DYNAMIC_DEBUG is not set
848# CONFIG_SAMPLES is not set 1106# CONFIG_SAMPLES is not set
1107CONFIG_HAVE_ARCH_KGDB=y
1108CONFIG_DEBUG_VERBOSE=y
849CONFIG_DEBUG_MMRS=y 1109CONFIG_DEBUG_MMRS=y
1110# CONFIG_DEBUG_DOUBLEFAULT is not set
850CONFIG_DEBUG_HUNT_FOR_ZERO=y 1111CONFIG_DEBUG_HUNT_FOR_ZERO=y
851CONFIG_DEBUG_BFIN_HWTRACE_ON=y 1112CONFIG_DEBUG_BFIN_HWTRACE_ON=y
852CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y 1113CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
@@ -855,33 +1116,40 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
855CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1116CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
856# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1117# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
857# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1118# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
858# CONFIG_EARLY_PRINTK is not set 1119CONFIG_EARLY_PRINTK=y
859# CONFIG_DUAL_CORE_TEST_MODULE is not set
860CONFIG_CPLB_INFO=y 1120CONFIG_CPLB_INFO=y
861CONFIG_ACCESS_CHECK=y 1121CONFIG_ACCESS_CHECK=y
1122# CONFIG_BFIN_ISRAM_SELF_TEST is not set
862 1123
863# 1124#
864# Security options 1125# Security options
865# 1126#
866# CONFIG_KEYS is not set 1127# CONFIG_KEYS is not set
867CONFIG_SECURITY=y 1128CONFIG_SECURITY=y
1129# CONFIG_SECURITYFS is not set
868# CONFIG_SECURITY_NETWORK is not set 1130# CONFIG_SECURITY_NETWORK is not set
869CONFIG_SECURITY_CAPABILITIES=y 1131# CONFIG_SECURITY_PATH is not set
870# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1132# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1133# CONFIG_SECURITY_TOMOYO is not set
871# CONFIG_CRYPTO is not set 1134# CONFIG_CRYPTO is not set
1135# CONFIG_BINARY_PRINTF is not set
872 1136
873# 1137#
874# Library routines 1138# Library routines
875# 1139#
876CONFIG_BITREVERSE=y 1140CONFIG_BITREVERSE=y
1141CONFIG_GENERIC_FIND_LAST_BIT=y
877CONFIG_CRC_CCITT=m 1142CONFIG_CRC_CCITT=m
878# CONFIG_CRC16 is not set 1143# CONFIG_CRC16 is not set
879# CONFIG_CRC_ITU_T is not set 1144# CONFIG_CRC_T10DIF is not set
1145CONFIG_CRC_ITU_T=y
880CONFIG_CRC32=y 1146CONFIG_CRC32=y
881# CONFIG_CRC7 is not set 1147CONFIG_CRC7=y
882# CONFIG_LIBCRC32C is not set 1148# CONFIG_LIBCRC32C is not set
883CONFIG_ZLIB_INFLATE=y 1149CONFIG_ZLIB_INFLATE=y
884CONFIG_PLIST=y 1150CONFIG_ZLIB_DEFLATE=y
1151CONFIG_DECOMPRESS_LZMA=y
885CONFIG_HAS_IOMEM=y 1152CONFIG_HAS_IOMEM=y
886CONFIG_HAS_IOPORT=y 1153CONFIG_HAS_IOPORT=y
887CONFIG_HAS_DMA=y 1154CONFIG_HAS_DMA=y
1155CONFIG_NLATTR=y
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig
index a6a7c8ede705..bc7fae3d8b83 100644
--- a/arch/blackfin/configs/H8606_defconfig
+++ b/arch/blackfin/configs/H8606_defconfig
@@ -67,6 +67,7 @@ CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
67CONFIG_SLAB=y 67CONFIG_SLAB=y
68# CONFIG_SLUB is not set 68# CONFIG_SLUB is not set
69# CONFIG_SLOB is not set 69# CONFIG_SLOB is not set
70CONFIG_MMAP_ALLOW_UNINITIALIZED=y
70CONFIG_RT_MUTEXES=y 71CONFIG_RT_MUTEXES=y
71CONFIG_TINY_SHMEM=y 72CONFIG_TINY_SHMEM=y
72CONFIG_BASE_SMALL=0 73CONFIG_BASE_SMALL=0
@@ -249,6 +250,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
249# CONFIG_RESOURCES_64BIT is not set 250# CONFIG_RESOURCES_64BIT is not set
250CONFIG_ZONE_DMA_FLAG=1 251CONFIG_ZONE_DMA_FLAG=1
251CONFIG_LARGE_ALLOCS=y 252CONFIG_LARGE_ALLOCS=y
253CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
252CONFIG_BFIN_GPTIMERS=y 254CONFIG_BFIN_GPTIMERS=y
253# CONFIG_DMA_UNCACHED_2M is not set 255# CONFIG_DMA_UNCACHED_2M is not set
254CONFIG_DMA_UNCACHED_1M=y 256CONFIG_DMA_UNCACHED_1M=y
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig
index 1ec9ae2e964b..a7e49d631229 100644
--- a/arch/blackfin/configs/IP0X_defconfig
+++ b/arch/blackfin/configs/IP0X_defconfig
@@ -68,6 +68,7 @@ CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
68CONFIG_SLAB=y 68CONFIG_SLAB=y
69# CONFIG_SLUB is not set 69# CONFIG_SLUB is not set
70# CONFIG_SLOB is not set 70# CONFIG_SLOB is not set
71CONFIG_MMAP_ALLOW_UNINITIALIZED=y
71CONFIG_RT_MUTEXES=y 72CONFIG_RT_MUTEXES=y
72CONFIG_TINY_SHMEM=y 73CONFIG_TINY_SHMEM=y
73CONFIG_BASE_SMALL=0 74CONFIG_BASE_SMALL=0
@@ -261,6 +262,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
261# CONFIG_RESOURCES_64BIT is not set 262# CONFIG_RESOURCES_64BIT is not set
262CONFIG_ZONE_DMA_FLAG=1 263CONFIG_ZONE_DMA_FLAG=1
263CONFIG_LARGE_ALLOCS=y 264CONFIG_LARGE_ALLOCS=y
265CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
264# CONFIG_BFIN_GPTIMERS is not set 266# CONFIG_BFIN_GPTIMERS is not set
265# CONFIG_DMA_UNCACHED_2M is not set 267# CONFIG_DMA_UNCACHED_2M is not set
266CONFIG_DMA_UNCACHED_1M=y 268CONFIG_DMA_UNCACHED_1M=y
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index ff377fae061b..67d12768602a 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -63,6 +63,7 @@ CONFIG_COMPAT_BRK=y
63CONFIG_SLAB=y 63CONFIG_SLAB=y
64# CONFIG_SLUB is not set 64# CONFIG_SLUB is not set
65# CONFIG_SLOB is not set 65# CONFIG_SLOB is not set
66CONFIG_MMAP_ALLOW_UNINITIALIZED=y
66# CONFIG_PROFILING is not set 67# CONFIG_PROFILING is not set
67# CONFIG_MARKERS is not set 68# CONFIG_MARKERS is not set
68CONFIG_HAVE_OPROFILE=y 69CONFIG_HAVE_OPROFILE=y
@@ -285,6 +286,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
285# CONFIG_PHYS_ADDR_T_64BIT is not set 286# CONFIG_PHYS_ADDR_T_64BIT is not set
286CONFIG_ZONE_DMA_FLAG=1 287CONFIG_ZONE_DMA_FLAG=1
287CONFIG_VIRT_TO_BUS=y 288CONFIG_VIRT_TO_BUS=y
289CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
288CONFIG_BFIN_GPTIMERS=y 290CONFIG_BFIN_GPTIMERS=y
289# CONFIG_DMA_UNCACHED_4M is not set 291# CONFIG_DMA_UNCACHED_4M is not set
290# CONFIG_DMA_UNCACHED_2M is not set 292# CONFIG_DMA_UNCACHED_2M is not set
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig
index 814f9cacf407..52bfa6bf18da 100644
--- a/arch/blackfin/configs/SRV1_defconfig
+++ b/arch/blackfin/configs/SRV1_defconfig
@@ -72,6 +72,7 @@ CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
72CONFIG_SLAB=y 72CONFIG_SLAB=y
73# CONFIG_SLUB is not set 73# CONFIG_SLUB is not set
74# CONFIG_SLOB is not set 74# CONFIG_SLOB is not set
75CONFIG_MMAP_ALLOW_UNINITIALIZED=y
75CONFIG_RT_MUTEXES=y 76CONFIG_RT_MUTEXES=y
76CONFIG_TINY_SHMEM=y 77CONFIG_TINY_SHMEM=y
77CONFIG_BASE_SMALL=0 78CONFIG_BASE_SMALL=0
@@ -271,6 +272,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
271# CONFIG_RESOURCES_64BIT is not set 272# CONFIG_RESOURCES_64BIT is not set
272CONFIG_ZONE_DMA_FLAG=1 273CONFIG_ZONE_DMA_FLAG=1
273CONFIG_LARGE_ALLOCS=y 274CONFIG_LARGE_ALLOCS=y
275CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
274CONFIG_DMA_UNCACHED_2M=y 276CONFIG_DMA_UNCACHED_2M=y
275# CONFIG_DMA_UNCACHED_1M is not set 277# CONFIG_DMA_UNCACHED_1M is not set
276# CONFIG_DMA_UNCACHED_NONE is not set 278# CONFIG_DMA_UNCACHED_NONE is not set
@@ -700,7 +702,7 @@ CONFIG_INPUT_MISC=y
700# CONFIG_INPUT_YEALINK is not set 702# CONFIG_INPUT_YEALINK is not set
701CONFIG_INPUT_UINPUT=y 703CONFIG_INPUT_UINPUT=y
702# CONFIG_BF53X_PFBUTTONS is not set 704# CONFIG_BF53X_PFBUTTONS is not set
703# CONFIG_TWI_KEYPAD is not set 705# CONFIG_INPUT_PCF8574 is not set
704 706
705# 707#
706# Hardware I/O ports 708# Hardware I/O ports
diff --git a/arch/blackfin/configs/TCM-BF537_defconfig b/arch/blackfin/configs/TCM-BF537_defconfig
index 375e75a27abc..60adfad54db9 100644
--- a/arch/blackfin/configs/TCM-BF537_defconfig
+++ b/arch/blackfin/configs/TCM-BF537_defconfig
@@ -1,13 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.28-rc2 3# Linux kernel version: 2.6.30.5
4# Tue Jan 6 09:22:17 2009
5# 4#
6# CONFIG_MMU is not set 5# CONFIG_MMU is not set
7# CONFIG_FPU is not set 6# CONFIG_FPU is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 7CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 8# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_BLACKFIN=y 9CONFIG_BLACKFIN=y
10CONFIG_GENERIC_BUG=y
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12CONFIG_GENERIC_FIND_NEXT_BIT=y 12CONFIG_GENERIC_FIND_NEXT_BIT=y
13CONFIG_GENERIC_HWEIGHT=y 13CONFIG_GENERIC_HWEIGHT=y
@@ -16,6 +16,9 @@ CONFIG_GENERIC_IRQ_PROBE=y
16CONFIG_GENERIC_GPIO=y 16CONFIG_GENERIC_GPIO=y
17CONFIG_FORCE_MAX_ZONEORDER=14 17CONFIG_FORCE_MAX_ZONEORDER=14
18CONFIG_GENERIC_CALIBRATE_DELAY=y 18CONFIG_GENERIC_CALIBRATE_DELAY=y
19CONFIG_LOCKDEP_SUPPORT=y
20CONFIG_STACKTRACE_SUPPORT=y
21CONFIG_TRACE_IRQFLAGS_SUPPORT=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20 23
21# 24#
@@ -26,49 +29,72 @@ CONFIG_BROKEN_ON_SMP=y
26CONFIG_INIT_ENV_ARG_LIMIT=32 29CONFIG_INIT_ENV_ARG_LIMIT=32
27CONFIG_LOCALVERSION="" 30CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 31CONFIG_LOCALVERSION_AUTO=y
32CONFIG_HAVE_KERNEL_GZIP=y
33CONFIG_HAVE_KERNEL_BZIP2=y
34CONFIG_HAVE_KERNEL_LZMA=y
35# CONFIG_KERNEL_GZIP is not set
36# CONFIG_KERNEL_BZIP2 is not set
37CONFIG_KERNEL_LZMA=y
29CONFIG_SYSVIPC=y 38CONFIG_SYSVIPC=y
30CONFIG_SYSVIPC_SYSCTL=y 39CONFIG_SYSVIPC_SYSCTL=y
40# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set 41# CONFIG_BSD_PROCESS_ACCT is not set
42# CONFIG_TASKSTATS is not set
43# CONFIG_AUDIT is not set
44
45#
46# RCU Subsystem
47#
48CONFIG_CLASSIC_RCU=y
49# CONFIG_TREE_RCU is not set
50# CONFIG_PREEMPT_RCU is not set
51# CONFIG_TREE_RCU_TRACE is not set
52# CONFIG_PREEMPT_RCU_TRACE is not set
32CONFIG_IKCONFIG=y 53CONFIG_IKCONFIG=y
33CONFIG_IKCONFIG_PROC=y 54CONFIG_IKCONFIG_PROC=y
34CONFIG_LOG_BUF_SHIFT=14 55CONFIG_LOG_BUF_SHIFT=14
35# CONFIG_CGROUPS is not set
36# CONFIG_GROUP_SCHED is not set 56# CONFIG_GROUP_SCHED is not set
57# CONFIG_CGROUPS is not set
37# CONFIG_SYSFS_DEPRECATED_V2 is not set 58# CONFIG_SYSFS_DEPRECATED_V2 is not set
38# CONFIG_RELAY is not set 59# CONFIG_RELAY is not set
39# CONFIG_NAMESPACES is not set 60# CONFIG_NAMESPACES is not set
40# CONFIG_BLK_DEV_INITRD is not set 61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63# CONFIG_RD_GZIP is not set
64# CONFIG_RD_BZIP2 is not set
65CONFIG_RD_LZMA=y
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 66# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42# CONFIG_SYSCTL is not set 67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
43CONFIG_EMBEDDED=y 69CONFIG_EMBEDDED=y
44# CONFIG_UID16 is not set 70# CONFIG_UID16 is not set
45# CONFIG_SYSCTL_SYSCALL is not set 71# CONFIG_SYSCTL_SYSCALL is not set
46CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
47# CONFIG_KALLSYMS_EXTRA_PASS is not set 73# CONFIG_KALLSYMS_EXTRA_PASS is not set
48# CONFIG_HOTPLUG is not set 74# CONFIG_STRIP_ASM_SYMS is not set
75CONFIG_HOTPLUG=y
49CONFIG_PRINTK=y 76CONFIG_PRINTK=y
50CONFIG_BUG=y 77CONFIG_BUG=y
51# CONFIG_ELF_CORE is not set 78# CONFIG_ELF_CORE is not set
52CONFIG_COMPAT_BRK=y
53CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
54# CONFIG_FUTEX is not set 80# CONFIG_FUTEX is not set
55CONFIG_ANON_INODES=y
56CONFIG_EPOLL=y 81CONFIG_EPOLL=y
57CONFIG_SIGNALFD=y 82CONFIG_SIGNALFD=y
58CONFIG_TIMERFD=y 83CONFIG_TIMERFD=y
59CONFIG_EVENTFD=y 84CONFIG_EVENTFD=y
60# CONFIG_AIO is not set 85# CONFIG_AIO is not set
61CONFIG_VM_EVENT_COUNTERS=y 86CONFIG_VM_EVENT_COUNTERS=y
87CONFIG_COMPAT_BRK=y
62CONFIG_SLAB=y 88CONFIG_SLAB=y
63# CONFIG_SLUB is not set 89# CONFIG_SLUB is not set
64# CONFIG_SLOB is not set 90# CONFIG_SLOB is not set
91CONFIG_MMAP_ALLOW_UNINITIALIZED=y
65# CONFIG_PROFILING is not set 92# CONFIG_PROFILING is not set
66# CONFIG_MARKERS is not set 93# CONFIG_MARKERS is not set
67CONFIG_HAVE_OPROFILE=y 94CONFIG_HAVE_OPROFILE=y
95# CONFIG_SLOW_WORK is not set
68# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 96# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
69CONFIG_SLABINFO=y 97CONFIG_SLABINFO=y
70CONFIG_RT_MUTEXES=y
71CONFIG_TINY_SHMEM=y
72CONFIG_BASE_SMALL=0 98CONFIG_BASE_SMALL=0
73CONFIG_MODULES=y 99CONFIG_MODULES=y
74# CONFIG_MODULE_FORCE_LOAD is not set 100# CONFIG_MODULE_FORCE_LOAD is not set
@@ -76,11 +102,8 @@ CONFIG_MODULE_UNLOAD=y
76# CONFIG_MODULE_FORCE_UNLOAD is not set 102# CONFIG_MODULE_FORCE_UNLOAD is not set
77# CONFIG_MODVERSIONS is not set 103# CONFIG_MODVERSIONS is not set
78# CONFIG_MODULE_SRCVERSION_ALL is not set 104# CONFIG_MODULE_SRCVERSION_ALL is not set
79CONFIG_KMOD=y
80CONFIG_BLOCK=y 105CONFIG_BLOCK=y
81# CONFIG_LBD is not set 106# CONFIG_LBD is not set
82# CONFIG_BLK_DEV_IO_TRACE is not set
83# CONFIG_LSF is not set
84# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
85# CONFIG_BLK_DEV_INTEGRITY is not set 108# CONFIG_BLK_DEV_INTEGRITY is not set
86 109
@@ -96,7 +119,6 @@ CONFIG_IOSCHED_CFQ=y
96# CONFIG_DEFAULT_CFQ is not set 119# CONFIG_DEFAULT_CFQ is not set
97CONFIG_DEFAULT_NOOP=y 120CONFIG_DEFAULT_NOOP=y
98CONFIG_DEFAULT_IOSCHED="noop" 121CONFIG_DEFAULT_IOSCHED="noop"
99CONFIG_CLASSIC_RCU=y
100CONFIG_PREEMPT_NONE=y 122CONFIG_PREEMPT_NONE=y
101# CONFIG_PREEMPT_VOLUNTARY is not set 123# CONFIG_PREEMPT_VOLUNTARY is not set
102# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
@@ -128,10 +150,15 @@ CONFIG_BF537=y
128# CONFIG_BF538 is not set 150# CONFIG_BF538 is not set
129# CONFIG_BF539 is not set 151# CONFIG_BF539 is not set
130# CONFIG_BF542 is not set 152# CONFIG_BF542 is not set
153# CONFIG_BF542M is not set
131# CONFIG_BF544 is not set 154# CONFIG_BF544 is not set
155# CONFIG_BF544M is not set
132# CONFIG_BF547 is not set 156# CONFIG_BF547 is not set
157# CONFIG_BF547M is not set
133# CONFIG_BF548 is not set 158# CONFIG_BF548 is not set
159# CONFIG_BF548M is not set
134# CONFIG_BF549 is not set 160# CONFIG_BF549 is not set
161# CONFIG_BF549M is not set
135# CONFIG_BF561 is not set 162# CONFIG_BF561 is not set
136CONFIG_BF_REV_MIN=2 163CONFIG_BF_REV_MIN=2
137CONFIG_BF_REV_MAX=3 164CONFIG_BF_REV_MAX=3
@@ -173,11 +200,11 @@ CONFIG_IRQ_MEM_DMA1=13
173CONFIG_IRQ_WATCH=13 200CONFIG_IRQ_WATCH=13
174CONFIG_IRQ_SPI=10 201CONFIG_IRQ_SPI=10
175# CONFIG_BFIN537_STAMP is not set 202# CONFIG_BFIN537_STAMP is not set
176# CONFIG_BFIN537_BLUETECHNIX_CM is not set 203# CONFIG_BFIN537_BLUETECHNIX_CM_E is not set
204# CONFIG_BFIN537_BLUETECHNIX_CM_U is not set
177CONFIG_BFIN537_BLUETECHNIX_TCM=y 205CONFIG_BFIN537_BLUETECHNIX_TCM=y
178# CONFIG_PNAV10 is not set 206# CONFIG_PNAV10 is not set
179# CONFIG_CAMSIG_MINOTAUR is not set 207# CONFIG_CAMSIG_MINOTAUR is not set
180# CONFIG_GENERIC_BF537_BOARD is not set
181 208
182# 209#
183# BF537 Specific Configuration 210# BF537 Specific Configuration
@@ -223,7 +250,10 @@ CONFIG_HZ=250
223# CONFIG_SCHED_HRTICK is not set 250# CONFIG_SCHED_HRTICK is not set
224CONFIG_GENERIC_TIME=y 251CONFIG_GENERIC_TIME=y
225CONFIG_GENERIC_CLOCKEVENTS=y 252CONFIG_GENERIC_CLOCKEVENTS=y
253# CONFIG_TICKSOURCE_GPTMR0 is not set
254CONFIG_TICKSOURCE_CORETMR=y
226# CONFIG_CYCLES_CLOCKSOURCE is not set 255# CONFIG_CYCLES_CLOCKSOURCE is not set
256# CONFIG_GPTMR0_CLOCKSOURCE is not set
227# CONFIG_NO_HZ is not set 257# CONFIG_NO_HZ is not set
228# CONFIG_HIGH_RES_TIMERS is not set 258# CONFIG_HIGH_RES_TIMERS is not set
229CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 259CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -273,10 +303,12 @@ CONFIG_FLATMEM=y
273CONFIG_FLAT_NODE_MEM_MAP=y 303CONFIG_FLAT_NODE_MEM_MAP=y
274CONFIG_PAGEFLAGS_EXTENDED=y 304CONFIG_PAGEFLAGS_EXTENDED=y
275CONFIG_SPLIT_PTLOCK_CPUS=4 305CONFIG_SPLIT_PTLOCK_CPUS=4
276# CONFIG_RESOURCES_64BIT is not set
277# CONFIG_PHYS_ADDR_T_64BIT is not set 306# CONFIG_PHYS_ADDR_T_64BIT is not set
278CONFIG_ZONE_DMA_FLAG=1 307CONFIG_ZONE_DMA_FLAG=1
279CONFIG_VIRT_TO_BUS=y 308CONFIG_VIRT_TO_BUS=y
309CONFIG_UNEVICTABLE_LRU=y
310CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
311CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
280# CONFIG_BFIN_GPTIMERS is not set 312# CONFIG_BFIN_GPTIMERS is not set
281# CONFIG_DMA_UNCACHED_4M is not set 313# CONFIG_DMA_UNCACHED_4M is not set
282# CONFIG_DMA_UNCACHED_2M is not set 314# CONFIG_DMA_UNCACHED_2M is not set
@@ -287,10 +319,9 @@ CONFIG_DMA_UNCACHED_1M=y
287# Cache Support 319# Cache Support
288# 320#
289CONFIG_BFIN_ICACHE=y 321CONFIG_BFIN_ICACHE=y
290# CONFIG_BFIN_ICACHE_LOCK is not set 322CONFIG_BFIN_EXTMEM_ICACHEABLE=y
291CONFIG_BFIN_DCACHE=y 323CONFIG_BFIN_DCACHE=y
292# CONFIG_BFIN_DCACHE_BANKA is not set 324# CONFIG_BFIN_DCACHE_BANKA is not set
293CONFIG_BFIN_EXTMEM_ICACHEABLE=y
294CONFIG_BFIN_EXTMEM_DCACHEABLE=y 325CONFIG_BFIN_EXTMEM_DCACHEABLE=y
295CONFIG_BFIN_EXTMEM_WRITEBACK=y 326CONFIG_BFIN_EXTMEM_WRITEBACK=y
296# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set 327# CONFIG_BFIN_EXTMEM_WRITETHROUGH is not set
@@ -301,7 +332,7 @@ CONFIG_BFIN_EXTMEM_WRITEBACK=y
301# CONFIG_MPU is not set 332# CONFIG_MPU is not set
302 333
303# 334#
304# Asynchonous Memory Configuration 335# Asynchronous Memory Configuration
305# 336#
306 337
307# 338#
@@ -327,6 +358,7 @@ CONFIG_BANK_3=0xFFC2
327# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 358# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
328# 359#
329# CONFIG_ARCH_SUPPORTS_MSI is not set 360# CONFIG_ARCH_SUPPORTS_MSI is not set
361# CONFIG_PCCARD is not set
330 362
331# 363#
332# Executable file formats 364# Executable file formats
@@ -343,13 +375,83 @@ CONFIG_BINFMT_SHARED_FLAT=y
343# 375#
344# CONFIG_PM is not set 376# CONFIG_PM is not set
345CONFIG_ARCH_SUSPEND_POSSIBLE=y 377CONFIG_ARCH_SUSPEND_POSSIBLE=y
346# CONFIG_PM_WAKEUP_BY_GPIO is not set
347 378
348# 379#
349# CPU Frequency scaling 380# CPU Frequency scaling
350# 381#
351# CONFIG_CPU_FREQ is not set 382# CONFIG_CPU_FREQ is not set
352# CONFIG_NET is not set 383CONFIG_NET=y
384
385#
386# Networking options
387#
388CONFIG_PACKET=y
389# CONFIG_PACKET_MMAP is not set
390CONFIG_UNIX=y
391CONFIG_XFRM=y
392# CONFIG_XFRM_USER is not set
393# CONFIG_XFRM_SUB_POLICY is not set
394# CONFIG_XFRM_MIGRATE is not set
395# CONFIG_XFRM_STATISTICS is not set
396# CONFIG_NET_KEY is not set
397CONFIG_INET=y
398# CONFIG_IP_MULTICAST is not set
399# CONFIG_IP_ADVANCED_ROUTER is not set
400CONFIG_IP_FIB_HASH=y
401# CONFIG_IP_PNP is not set
402# CONFIG_NET_IPIP is not set
403# CONFIG_NET_IPGRE is not set
404# CONFIG_ARPD is not set
405# CONFIG_SYN_COOKIES is not set
406# CONFIG_INET_AH is not set
407# CONFIG_INET_ESP is not set
408# CONFIG_INET_IPCOMP is not set
409# CONFIG_INET_XFRM_TUNNEL is not set
410# CONFIG_INET_TUNNEL is not set
411CONFIG_INET_XFRM_MODE_TRANSPORT=y
412CONFIG_INET_XFRM_MODE_TUNNEL=y
413CONFIG_INET_XFRM_MODE_BEET=y
414CONFIG_INET_LRO=y
415# CONFIG_INET_DIAG is not set
416# CONFIG_TCP_CONG_ADVANCED is not set
417CONFIG_TCP_CONG_CUBIC=y
418CONFIG_DEFAULT_TCP_CONG="cubic"
419# CONFIG_TCP_MD5SIG is not set
420# CONFIG_IPV6 is not set
421# CONFIG_NETWORK_SECMARK is not set
422# CONFIG_NETFILTER is not set
423# CONFIG_IP_DCCP is not set
424# CONFIG_IP_SCTP is not set
425# CONFIG_TIPC is not set
426# CONFIG_ATM is not set
427# CONFIG_BRIDGE is not set
428# CONFIG_NET_DSA is not set
429# CONFIG_VLAN_8021Q is not set
430# CONFIG_DECNET is not set
431# CONFIG_LLC2 is not set
432# CONFIG_IPX is not set
433# CONFIG_ATALK is not set
434# CONFIG_X25 is not set
435# CONFIG_LAPB is not set
436# CONFIG_ECONET is not set
437# CONFIG_WAN_ROUTER is not set
438# CONFIG_PHONET is not set
439# CONFIG_NET_SCHED is not set
440# CONFIG_DCB is not set
441
442#
443# Network testing
444#
445# CONFIG_NET_PKTGEN is not set
446# CONFIG_HAMRADIO is not set
447# CONFIG_CAN is not set
448# CONFIG_IRDA is not set
449# CONFIG_BT is not set
450# CONFIG_AF_RXRPC is not set
451# CONFIG_WIRELESS is not set
452# CONFIG_WIMAX is not set
453# CONFIG_RFKILL is not set
454# CONFIG_NET_9P is not set
353 455
354# 456#
355# Device Drivers 457# Device Drivers
@@ -358,15 +460,21 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
358# 460#
359# Generic Driver Options 461# Generic Driver Options
360# 462#
463CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
361CONFIG_STANDALONE=y 464CONFIG_STANDALONE=y
362CONFIG_PREVENT_FIRMWARE_BUILD=y 465CONFIG_PREVENT_FIRMWARE_BUILD=y
466CONFIG_FW_LOADER=y
467CONFIG_FIRMWARE_IN_KERNEL=y
468CONFIG_EXTRA_FIRMWARE=""
363# CONFIG_SYS_HYPERVISOR is not set 469# CONFIG_SYS_HYPERVISOR is not set
470# CONFIG_CONNECTOR is not set
364CONFIG_MTD=y 471CONFIG_MTD=y
365# CONFIG_MTD_DEBUG is not set 472# CONFIG_MTD_DEBUG is not set
473# CONFIG_MTD_TESTS is not set
366# CONFIG_MTD_CONCAT is not set 474# CONFIG_MTD_CONCAT is not set
367CONFIG_MTD_PARTITIONS=y 475CONFIG_MTD_PARTITIONS=y
368# CONFIG_MTD_REDBOOT_PARTS is not set 476# CONFIG_MTD_REDBOOT_PARTS is not set
369# CONFIG_MTD_CMDLINE_PARTS is not set 477CONFIG_MTD_CMDLINE_PARTS=y
370# CONFIG_MTD_AR7_PARTS is not set 478# CONFIG_MTD_AR7_PARTS is not set
371 479
372# 480#
@@ -402,9 +510,10 @@ CONFIG_MTD_CFI_I2=y
402CONFIG_MTD_CFI_INTELEXT=y 510CONFIG_MTD_CFI_INTELEXT=y
403# CONFIG_MTD_CFI_AMDSTD is not set 511# CONFIG_MTD_CFI_AMDSTD is not set
404# CONFIG_MTD_CFI_STAA is not set 512# CONFIG_MTD_CFI_STAA is not set
513# CONFIG_MTD_PSD4256G is not set
405CONFIG_MTD_CFI_UTIL=y 514CONFIG_MTD_CFI_UTIL=y
406CONFIG_MTD_RAM=y 515CONFIG_MTD_RAM=y
407# CONFIG_MTD_ROM is not set 516CONFIG_MTD_ROM=m
408# CONFIG_MTD_ABSENT is not set 517# CONFIG_MTD_ABSENT is not set
409 518
410# 519#
@@ -413,7 +522,7 @@ CONFIG_MTD_RAM=y
413CONFIG_MTD_COMPLEX_MAPPINGS=y 522CONFIG_MTD_COMPLEX_MAPPINGS=y
414# CONFIG_MTD_PHYSMAP is not set 523# CONFIG_MTD_PHYSMAP is not set
415CONFIG_MTD_GPIO_ADDR=y 524CONFIG_MTD_GPIO_ADDR=y
416CONFIG_MTD_UCLINUX=y 525# CONFIG_MTD_UCLINUX is not set
417# CONFIG_MTD_PLATRAM is not set 526# CONFIG_MTD_PLATRAM is not set
418 527
419# 528#
@@ -436,6 +545,11 @@ CONFIG_MTD_UCLINUX=y
436# CONFIG_MTD_ONENAND is not set 545# CONFIG_MTD_ONENAND is not set
437 546
438# 547#
548# LPDDR flash memory drivers
549#
550# CONFIG_MTD_LPDDR is not set
551
552#
439# UBI - Unsorted block images 553# UBI - Unsorted block images
440# 554#
441# CONFIG_MTD_UBI is not set 555# CONFIG_MTD_UBI is not set
@@ -443,15 +557,23 @@ CONFIG_MTD_UCLINUX=y
443CONFIG_BLK_DEV=y 557CONFIG_BLK_DEV=y
444# CONFIG_BLK_DEV_COW_COMMON is not set 558# CONFIG_BLK_DEV_COW_COMMON is not set
445# CONFIG_BLK_DEV_LOOP is not set 559# CONFIG_BLK_DEV_LOOP is not set
560# CONFIG_BLK_DEV_NBD is not set
446CONFIG_BLK_DEV_RAM=y 561CONFIG_BLK_DEV_RAM=y
447CONFIG_BLK_DEV_RAM_COUNT=16 562CONFIG_BLK_DEV_RAM_COUNT=16
448CONFIG_BLK_DEV_RAM_SIZE=4096 563CONFIG_BLK_DEV_RAM_SIZE=4096
449# CONFIG_BLK_DEV_XIP is not set 564# CONFIG_BLK_DEV_XIP is not set
450# CONFIG_CDROM_PKTCDVD is not set 565# CONFIG_CDROM_PKTCDVD is not set
566# CONFIG_ATA_OVER_ETH is not set
451# CONFIG_BLK_DEV_HD is not set 567# CONFIG_BLK_DEV_HD is not set
452CONFIG_MISC_DEVICES=y 568CONFIG_MISC_DEVICES=y
453# CONFIG_EEPROM_93CX6 is not set
454# CONFIG_ENCLOSURE_SERVICES is not set 569# CONFIG_ENCLOSURE_SERVICES is not set
570# CONFIG_C2PORT is not set
571
572#
573# EEPROM support
574#
575# CONFIG_EEPROM_AT25 is not set
576# CONFIG_EEPROM_93CX6 is not set
455CONFIG_HAVE_IDE=y 577CONFIG_HAVE_IDE=y
456# CONFIG_IDE is not set 578# CONFIG_IDE is not set
457 579
@@ -464,6 +586,74 @@ CONFIG_HAVE_IDE=y
464# CONFIG_SCSI_NETLINK is not set 586# CONFIG_SCSI_NETLINK is not set
465# CONFIG_ATA is not set 587# CONFIG_ATA is not set
466# CONFIG_MD is not set 588# CONFIG_MD is not set
589CONFIG_NETDEVICES=y
590CONFIG_COMPAT_NET_DEV_OPS=y
591# CONFIG_DUMMY is not set
592# CONFIG_BONDING is not set
593# CONFIG_MACVLAN is not set
594# CONFIG_EQUALIZER is not set
595# CONFIG_TUN is not set
596# CONFIG_VETH is not set
597CONFIG_PHYLIB=y
598
599#
600# MII PHY device drivers
601#
602# CONFIG_MARVELL_PHY is not set
603# CONFIG_DAVICOM_PHY is not set
604# CONFIG_QSEMI_PHY is not set
605# CONFIG_LXT_PHY is not set
606# CONFIG_CICADA_PHY is not set
607# CONFIG_VITESSE_PHY is not set
608# CONFIG_SMSC_PHY is not set
609# CONFIG_BROADCOM_PHY is not set
610# CONFIG_ICPLUS_PHY is not set
611# CONFIG_REALTEK_PHY is not set
612# CONFIG_NATIONAL_PHY is not set
613# CONFIG_STE10XP is not set
614# CONFIG_LSI_ET1011C_PHY is not set
615# CONFIG_FIXED_PHY is not set
616# CONFIG_MDIO_BITBANG is not set
617CONFIG_NET_ETHERNET=y
618CONFIG_MII=y
619CONFIG_BFIN_MAC=y
620CONFIG_BFIN_MAC_USE_L1=y
621CONFIG_BFIN_TX_DESC_NUM=10
622CONFIG_BFIN_RX_DESC_NUM=20
623# CONFIG_BFIN_MAC_RMII is not set
624# CONFIG_SMC91X is not set
625# CONFIG_DM9000 is not set
626# CONFIG_ENC28J60 is not set
627# CONFIG_ETHOC is not set
628# CONFIG_SMSC911X is not set
629# CONFIG_DNET is not set
630# CONFIG_IBM_NEW_EMAC_ZMII is not set
631# CONFIG_IBM_NEW_EMAC_RGMII is not set
632# CONFIG_IBM_NEW_EMAC_TAH is not set
633# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
634# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
635# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
636# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
637# CONFIG_B44 is not set
638# CONFIG_NETDEV_1000 is not set
639# CONFIG_NETDEV_10000 is not set
640
641#
642# Wireless LAN
643#
644# CONFIG_WLAN_PRE80211 is not set
645# CONFIG_WLAN_80211 is not set
646
647#
648# Enable WiMAX (Networking options) to see the WiMAX drivers
649#
650# CONFIG_WAN is not set
651# CONFIG_PPP is not set
652# CONFIG_SLIP is not set
653# CONFIG_NETCONSOLE is not set
654# CONFIG_NETPOLL is not set
655# CONFIG_NET_POLL_CONTROLLER is not set
656# CONFIG_ISDN is not set
467# CONFIG_PHONE is not set 657# CONFIG_PHONE is not set
468 658
469# 659#
@@ -480,15 +670,12 @@ CONFIG_HAVE_IDE=y
480# 670#
481# Character devices 671# Character devices
482# 672#
483# CONFIG_AD9960 is not set 673CONFIG_BFIN_DMA_INTERFACE=m
484# CONFIG_SPI_ADC_BF533 is not set 674# CONFIG_BFIN_PPI is not set
485# CONFIG_BF5xx_PPIFCD is not set 675# CONFIG_BFIN_PPIFCD is not set
486# CONFIG_BFIN_SIMPLE_TIMER is not set 676# CONFIG_BFIN_SIMPLE_TIMER is not set
487# CONFIG_BF5xx_PPI is not set 677# CONFIG_BFIN_SPI_ADC is not set
488CONFIG_BFIN_SPORT=y 678CONFIG_BFIN_SPORT=y
489# CONFIG_BFIN_TIMER_LATENCY is not set
490CONFIG_BFIN_DMA_INTERFACE=m
491# CONFIG_SIMPLE_GPIO is not set
492# CONFIG_VT is not set 679# CONFIG_VT is not set
493# CONFIG_DEVKMEM is not set 680# CONFIG_DEVKMEM is not set
494# CONFIG_BFIN_JTAG_COMM is not set 681# CONFIG_BFIN_JTAG_COMM is not set
@@ -502,6 +689,7 @@ CONFIG_BFIN_DMA_INTERFACE=m
502# 689#
503# Non-8250 serial port support 690# Non-8250 serial port support
504# 691#
692# CONFIG_SERIAL_MAX3100 is not set
505CONFIG_SERIAL_BFIN=y 693CONFIG_SERIAL_BFIN=y
506CONFIG_SERIAL_BFIN_CONSOLE=y 694CONFIG_SERIAL_BFIN_CONSOLE=y
507CONFIG_SERIAL_BFIN_DMA=y 695CONFIG_SERIAL_BFIN_DMA=y
@@ -514,6 +702,7 @@ CONFIG_SERIAL_CORE=y
514CONFIG_SERIAL_CORE_CONSOLE=y 702CONFIG_SERIAL_CORE_CONSOLE=y
515# CONFIG_SERIAL_BFIN_SPORT is not set 703# CONFIG_SERIAL_BFIN_SPORT is not set
516CONFIG_UNIX98_PTYS=y 704CONFIG_UNIX98_PTYS=y
705# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
517# CONFIG_LEGACY_PTYS is not set 706# CONFIG_LEGACY_PTYS is not set
518 707
519# 708#
@@ -534,39 +723,17 @@ CONFIG_SPI_MASTER=y
534# 723#
535CONFIG_SPI_BFIN=y 724CONFIG_SPI_BFIN=y
536# CONFIG_SPI_BFIN_LOCK is not set 725# CONFIG_SPI_BFIN_LOCK is not set
726# CONFIG_SPI_BFIN_SPORT is not set
537# CONFIG_SPI_BITBANG is not set 727# CONFIG_SPI_BITBANG is not set
728# CONFIG_SPI_GPIO is not set
538 729
539# 730#
540# SPI Protocol Masters 731# SPI Protocol Masters
541# 732#
542# CONFIG_EEPROM_AT25 is not set
543# CONFIG_SPI_SPIDEV is not set 733# CONFIG_SPI_SPIDEV is not set
544# CONFIG_SPI_TLE62X0 is not set 734# CONFIG_SPI_TLE62X0 is not set
545CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y 735CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
546CONFIG_GPIOLIB=y 736# CONFIG_GPIOLIB is not set
547# CONFIG_DEBUG_GPIO is not set
548CONFIG_GPIO_SYSFS=y
549
550#
551# Memory mapped GPIO expanders:
552#
553
554#
555# I2C GPIO expanders:
556#
557# CONFIG_GPIO_MAX732X is not set
558# CONFIG_GPIO_PCA953X is not set
559# CONFIG_GPIO_PCF857X is not set
560
561#
562# PCI GPIO expanders:
563#
564
565#
566# SPI GPIO expanders:
567#
568# CONFIG_GPIO_MAX7301 is not set
569# CONFIG_GPIO_MCP23S08 is not set
570# CONFIG_W1 is not set 737# CONFIG_W1 is not set
571# CONFIG_POWER_SUPPLY is not set 738# CONFIG_POWER_SUPPLY is not set
572# CONFIG_HWMON is not set 739# CONFIG_HWMON is not set
@@ -580,6 +747,12 @@ CONFIG_WATCHDOG=y
580# 747#
581# CONFIG_SOFT_WATCHDOG is not set 748# CONFIG_SOFT_WATCHDOG is not set
582CONFIG_BFIN_WDT=y 749CONFIG_BFIN_WDT=y
750CONFIG_SSB_POSSIBLE=y
751
752#
753# Sonics Silicon Backplane
754#
755# CONFIG_SSB is not set
583 756
584# 757#
585# Multifunction device drivers 758# Multifunction device drivers
@@ -588,7 +761,7 @@ CONFIG_BFIN_WDT=y
588# CONFIG_MFD_SM501 is not set 761# CONFIG_MFD_SM501 is not set
589# CONFIG_HTC_PASIC3 is not set 762# CONFIG_HTC_PASIC3 is not set
590# CONFIG_MFD_TMIO is not set 763# CONFIG_MFD_TMIO is not set
591# CONFIG_MFD_WM8400 is not set 764# CONFIG_REGULATOR is not set
592 765
593# 766#
594# Multimedia devices 767# Multimedia devices
@@ -598,6 +771,7 @@ CONFIG_BFIN_WDT=y
598# Multimedia core support 771# Multimedia core support
599# 772#
600# CONFIG_VIDEO_DEV is not set 773# CONFIG_VIDEO_DEV is not set
774# CONFIG_DVB_CORE is not set
601# CONFIG_VIDEO_MEDIA is not set 775# CONFIG_VIDEO_MEDIA is not set
602 776
603# 777#
@@ -618,13 +792,81 @@ CONFIG_BFIN_WDT=y
618# 792#
619# CONFIG_DISPLAY_SUPPORT is not set 793# CONFIG_DISPLAY_SUPPORT is not set
620# CONFIG_SOUND is not set 794# CONFIG_SOUND is not set
621# CONFIG_USB_SUPPORT is not set 795CONFIG_USB_SUPPORT=y
622# CONFIG_MMC is not set 796CONFIG_USB_ARCH_HAS_HCD=y
797# CONFIG_USB_ARCH_HAS_OHCI is not set
798# CONFIG_USB_ARCH_HAS_EHCI is not set
799# CONFIG_USB is not set
800# CONFIG_USB_OTG_WHITELIST is not set
801# CONFIG_USB_OTG_BLACKLIST_HUB is not set
802# CONFIG_USB_GADGET_MUSB_HDRC is not set
803
804#
805# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
806#
807CONFIG_USB_GADGET=y
808# CONFIG_USB_GADGET_DEBUG_FILES is not set
809# CONFIG_USB_GADGET_DEBUG_FS is not set
810CONFIG_USB_GADGET_VBUS_DRAW=2
811CONFIG_USB_GADGET_SELECTED=y
812# CONFIG_USB_GADGET_AT91 is not set
813# CONFIG_USB_GADGET_ATMEL_USBA is not set
814# CONFIG_USB_GADGET_FSL_USB2 is not set
815# CONFIG_USB_GADGET_LH7A40X is not set
816# CONFIG_USB_GADGET_OMAP is not set
817# CONFIG_USB_GADGET_PXA25X is not set
818# CONFIG_USB_GADGET_PXA27X is not set
819# CONFIG_USB_GADGET_S3C2410 is not set
820# CONFIG_USB_GADGET_IMX is not set
821# CONFIG_USB_GADGET_M66592 is not set
822# CONFIG_USB_GADGET_AMD5536UDC is not set
823# CONFIG_USB_GADGET_FSL_QE is not set
824# CONFIG_USB_GADGET_CI13XXX is not set
825CONFIG_USB_GADGET_NET2272=y
826CONFIG_USB_NET2272=y
827# CONFIG_USB_GADGET_NET2280 is not set
828# CONFIG_USB_GADGET_GOKU is not set
829# CONFIG_USB_GADGET_DUMMY_HCD is not set
830CONFIG_USB_GADGET_DUALSPEED=y
831# CONFIG_USB_ZERO is not set
832# CONFIG_USB_AUDIO is not set
833CONFIG_USB_ETH=y
834CONFIG_USB_ETH_RNDIS=y
835# CONFIG_USB_GADGETFS is not set
836# CONFIG_USB_FILE_STORAGE is not set
837# CONFIG_USB_G_SERIAL is not set
838# CONFIG_USB_MIDI_GADGET is not set
839# CONFIG_USB_G_PRINTER is not set
840# CONFIG_USB_CDC_COMPOSITE is not set
841
842#
843# OTG and related infrastructure
844#
845# CONFIG_USB_GPIO_VBUS is not set
846# CONFIG_NOP_USB_XCEIV is not set
847CONFIG_MMC=y
848# CONFIG_MMC_DEBUG is not set
849# CONFIG_MMC_UNSAFE_RESUME is not set
850
851#
852# MMC/SD/SDIO Card Drivers
853#
854CONFIG_MMC_BLOCK=y
855CONFIG_MMC_BLOCK_BOUNCE=y
856# CONFIG_SDIO_UART is not set
857# CONFIG_MMC_TEST is not set
858
859#
860# MMC/SD/SDIO Host Controller Drivers
861#
862# CONFIG_MMC_SDHCI is not set
863CONFIG_MMC_SPI=m
623# CONFIG_MEMSTICK is not set 864# CONFIG_MEMSTICK is not set
624# CONFIG_NEW_LEDS is not set 865# CONFIG_NEW_LEDS is not set
625# CONFIG_ACCESSIBILITY is not set 866# CONFIG_ACCESSIBILITY is not set
626# CONFIG_RTC_CLASS is not set 867# CONFIG_RTC_CLASS is not set
627# CONFIG_DMADEVICES is not set 868# CONFIG_DMADEVICES is not set
869# CONFIG_AUXDISPLAY is not set
628# CONFIG_UIO is not set 870# CONFIG_UIO is not set
629# CONFIG_STAGING is not set 871# CONFIG_STAGING is not set
630 872
@@ -641,8 +883,10 @@ CONFIG_FS_MBCACHE=y
641# CONFIG_REISERFS_FS is not set 883# CONFIG_REISERFS_FS is not set
642# CONFIG_JFS_FS is not set 884# CONFIG_JFS_FS is not set
643# CONFIG_FS_POSIX_ACL is not set 885# CONFIG_FS_POSIX_ACL is not set
644CONFIG_FILE_LOCKING=y
645# CONFIG_XFS_FS is not set 886# CONFIG_XFS_FS is not set
887# CONFIG_OCFS2_FS is not set
888# CONFIG_BTRFS_FS is not set
889CONFIG_FILE_LOCKING=y
646# CONFIG_DNOTIFY is not set 890# CONFIG_DNOTIFY is not set
647CONFIG_INOTIFY=y 891CONFIG_INOTIFY=y
648CONFIG_INOTIFY_USER=y 892CONFIG_INOTIFY_USER=y
@@ -652,6 +896,11 @@ CONFIG_INOTIFY_USER=y
652# CONFIG_FUSE_FS is not set 896# CONFIG_FUSE_FS is not set
653 897
654# 898#
899# Caches
900#
901# CONFIG_FSCACHE is not set
902
903#
655# CD-ROM/DVD Filesystems 904# CD-ROM/DVD Filesystems
656# 905#
657# CONFIG_ISO9660_FS is not set 906# CONFIG_ISO9660_FS is not set
@@ -660,8 +909,11 @@ CONFIG_INOTIFY_USER=y
660# 909#
661# DOS/FAT/NT Filesystems 910# DOS/FAT/NT Filesystems
662# 911#
663# CONFIG_MSDOS_FS is not set 912CONFIG_FAT_FS=y
664# CONFIG_VFAT_FS is not set 913CONFIG_MSDOS_FS=y
914CONFIG_VFAT_FS=y
915CONFIG_FAT_DEFAULT_CODEPAGE=437
916CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
665# CONFIG_NTFS_FS is not set 917# CONFIG_NTFS_FS is not set
666 918
667# 919#
@@ -673,10 +925,7 @@ CONFIG_SYSFS=y
673# CONFIG_TMPFS is not set 925# CONFIG_TMPFS is not set
674# CONFIG_HUGETLB_PAGE is not set 926# CONFIG_HUGETLB_PAGE is not set
675# CONFIG_CONFIGFS_FS is not set 927# CONFIG_CONFIGFS_FS is not set
676 928CONFIG_MISC_FILESYSTEMS=y
677#
678# Miscellaneous filesystems
679#
680# CONFIG_ADFS_FS is not set 929# CONFIG_ADFS_FS is not set
681# CONFIG_AFFS_FS is not set 930# CONFIG_AFFS_FS is not set
682# CONFIG_HFS_FS is not set 931# CONFIG_HFS_FS is not set
@@ -684,9 +933,19 @@ CONFIG_SYSFS=y
684# CONFIG_BEFS_FS is not set 933# CONFIG_BEFS_FS is not set
685# CONFIG_BFS_FS is not set 934# CONFIG_BFS_FS is not set
686# CONFIG_EFS_FS is not set 935# CONFIG_EFS_FS is not set
687# CONFIG_YAFFS_FS is not set 936CONFIG_JFFS2_FS=y
688# CONFIG_JFFS2_FS is not set 937CONFIG_JFFS2_FS_DEBUG=0
938CONFIG_JFFS2_FS_WRITEBUFFER=y
939# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
940# CONFIG_JFFS2_SUMMARY is not set
941# CONFIG_JFFS2_FS_XATTR is not set
942# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
943CONFIG_JFFS2_ZLIB=y
944# CONFIG_JFFS2_LZO is not set
945CONFIG_JFFS2_RTIME=y
946# CONFIG_JFFS2_RUBIN is not set
689# CONFIG_CRAMFS is not set 947# CONFIG_CRAMFS is not set
948# CONFIG_SQUASHFS is not set
690# CONFIG_VXFS_FS is not set 949# CONFIG_VXFS_FS is not set
691# CONFIG_MINIX_FS is not set 950# CONFIG_MINIX_FS is not set
692# CONFIG_OMFS_FS is not set 951# CONFIG_OMFS_FS is not set
@@ -695,13 +954,62 @@ CONFIG_SYSFS=y
695# CONFIG_ROMFS_FS is not set 954# CONFIG_ROMFS_FS is not set
696# CONFIG_SYSV_FS is not set 955# CONFIG_SYSV_FS is not set
697# CONFIG_UFS_FS is not set 956# CONFIG_UFS_FS is not set
957# CONFIG_NILFS2_FS is not set
958CONFIG_NETWORK_FILESYSTEMS=y
959# CONFIG_NFS_FS is not set
960# CONFIG_NFSD is not set
961# CONFIG_SMB_FS is not set
962# CONFIG_CIFS is not set
963# CONFIG_NCP_FS is not set
964# CONFIG_CODA_FS is not set
965# CONFIG_AFS_FS is not set
698 966
699# 967#
700# Partition Types 968# Partition Types
701# 969#
702# CONFIG_PARTITION_ADVANCED is not set 970# CONFIG_PARTITION_ADVANCED is not set
703CONFIG_MSDOS_PARTITION=y 971CONFIG_MSDOS_PARTITION=y
704# CONFIG_NLS is not set 972CONFIG_NLS=y
973CONFIG_NLS_DEFAULT="iso8859-1"
974CONFIG_NLS_CODEPAGE_437=y
975# CONFIG_NLS_CODEPAGE_737 is not set
976# CONFIG_NLS_CODEPAGE_775 is not set
977# CONFIG_NLS_CODEPAGE_850 is not set
978# CONFIG_NLS_CODEPAGE_852 is not set
979# CONFIG_NLS_CODEPAGE_855 is not set
980# CONFIG_NLS_CODEPAGE_857 is not set
981# CONFIG_NLS_CODEPAGE_860 is not set
982# CONFIG_NLS_CODEPAGE_861 is not set
983# CONFIG_NLS_CODEPAGE_862 is not set
984# CONFIG_NLS_CODEPAGE_863 is not set
985# CONFIG_NLS_CODEPAGE_864 is not set
986# CONFIG_NLS_CODEPAGE_865 is not set
987# CONFIG_NLS_CODEPAGE_866 is not set
988# CONFIG_NLS_CODEPAGE_869 is not set
989# CONFIG_NLS_CODEPAGE_936 is not set
990# CONFIG_NLS_CODEPAGE_950 is not set
991# CONFIG_NLS_CODEPAGE_932 is not set
992# CONFIG_NLS_CODEPAGE_949 is not set
993# CONFIG_NLS_CODEPAGE_874 is not set
994# CONFIG_NLS_ISO8859_8 is not set
995# CONFIG_NLS_CODEPAGE_1250 is not set
996# CONFIG_NLS_CODEPAGE_1251 is not set
997# CONFIG_NLS_ASCII is not set
998CONFIG_NLS_ISO8859_1=y
999# CONFIG_NLS_ISO8859_2 is not set
1000# CONFIG_NLS_ISO8859_3 is not set
1001# CONFIG_NLS_ISO8859_4 is not set
1002# CONFIG_NLS_ISO8859_5 is not set
1003# CONFIG_NLS_ISO8859_6 is not set
1004# CONFIG_NLS_ISO8859_7 is not set
1005# CONFIG_NLS_ISO8859_9 is not set
1006# CONFIG_NLS_ISO8859_13 is not set
1007# CONFIG_NLS_ISO8859_14 is not set
1008# CONFIG_NLS_ISO8859_15 is not set
1009# CONFIG_NLS_KOI8_R is not set
1010# CONFIG_NLS_KOI8_U is not set
1011# CONFIG_NLS_UTF8 is not set
1012# CONFIG_DLM is not set
705 1013
706# 1014#
707# Kernel hacking 1015# Kernel hacking
@@ -714,12 +1022,30 @@ CONFIG_FRAME_WARN=1024
714# CONFIG_UNUSED_SYMBOLS is not set 1022# CONFIG_UNUSED_SYMBOLS is not set
715CONFIG_DEBUG_FS=y 1023CONFIG_DEBUG_FS=y
716# CONFIG_HEADERS_CHECK is not set 1024# CONFIG_HEADERS_CHECK is not set
1025CONFIG_DEBUG_SECTION_MISMATCH=y
717# CONFIG_DEBUG_KERNEL is not set 1026# CONFIG_DEBUG_KERNEL is not set
718CONFIG_DEBUG_BUGVERBOSE=y 1027# CONFIG_DEBUG_BUGVERBOSE is not set
719# CONFIG_DEBUG_MEMORY_INIT is not set 1028# CONFIG_DEBUG_MEMORY_INIT is not set
720# CONFIG_RCU_CPU_STALL_DETECTOR is not set 1029# CONFIG_RCU_CPU_STALL_DETECTOR is not set
721# CONFIG_SYSCTL_SYSCALL_CHECK is not set 1030CONFIG_HAVE_FUNCTION_TRACER=y
722# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1031CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1032CONFIG_TRACING_SUPPORT=y
1033
1034#
1035# Tracers
1036#
1037# CONFIG_FUNCTION_TRACER is not set
1038# CONFIG_IRQSOFF_TRACER is not set
1039# CONFIG_SCHED_TRACER is not set
1040# CONFIG_CONTEXT_SWITCH_TRACER is not set
1041# CONFIG_EVENT_TRACER is not set
1042# CONFIG_BOOT_TRACER is not set
1043# CONFIG_TRACE_BRANCH_PROFILING is not set
1044# CONFIG_STACK_TRACER is not set
1045# CONFIG_KMEMTRACE is not set
1046# CONFIG_WORKQUEUE_TRACER is not set
1047# CONFIG_BLK_DEV_IO_TRACE is not set
1048# CONFIG_DYNAMIC_DEBUG is not set
723# CONFIG_SAMPLES is not set 1049# CONFIG_SAMPLES is not set
724CONFIG_HAVE_ARCH_KGDB=y 1050CONFIG_HAVE_ARCH_KGDB=y
725CONFIG_DEBUG_VERBOSE=y 1051CONFIG_DEBUG_VERBOSE=y
@@ -733,9 +1059,10 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
733CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 1059CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
734# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set 1060# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
735# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 1061# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
736# CONFIG_EARLY_PRINTK is not set 1062CONFIG_EARLY_PRINTK=y
737CONFIG_CPLB_INFO=y 1063CONFIG_CPLB_INFO=y
738CONFIG_ACCESS_CHECK=y 1064CONFIG_ACCESS_CHECK=y
1065# CONFIG_BFIN_ISRAM_SELF_TEST is not set
739 1066
740# 1067#
741# Security options 1068# Security options
@@ -744,20 +1071,110 @@ CONFIG_ACCESS_CHECK=y
744# CONFIG_SECURITY is not set 1071# CONFIG_SECURITY is not set
745# CONFIG_SECURITYFS is not set 1072# CONFIG_SECURITYFS is not set
746# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1073# CONFIG_SECURITY_FILE_CAPABILITIES is not set
747# CONFIG_CRYPTO is not set 1074CONFIG_CRYPTO=y
1075
1076#
1077# Crypto core or helper
1078#
1079# CONFIG_CRYPTO_FIPS is not set
1080# CONFIG_CRYPTO_MANAGER is not set
1081# CONFIG_CRYPTO_MANAGER2 is not set
1082# CONFIG_CRYPTO_GF128MUL is not set
1083# CONFIG_CRYPTO_NULL is not set
1084# CONFIG_CRYPTO_CRYPTD is not set
1085# CONFIG_CRYPTO_AUTHENC is not set
1086# CONFIG_CRYPTO_TEST is not set
1087
1088#
1089# Authenticated Encryption with Associated Data
1090#
1091# CONFIG_CRYPTO_CCM is not set
1092# CONFIG_CRYPTO_GCM is not set
1093# CONFIG_CRYPTO_SEQIV is not set
1094
1095#
1096# Block modes
1097#
1098# CONFIG_CRYPTO_CBC is not set
1099# CONFIG_CRYPTO_CTR is not set
1100# CONFIG_CRYPTO_CTS is not set
1101# CONFIG_CRYPTO_ECB is not set
1102# CONFIG_CRYPTO_LRW is not set
1103# CONFIG_CRYPTO_PCBC is not set
1104# CONFIG_CRYPTO_XTS is not set
1105
1106#
1107# Hash modes
1108#
1109# CONFIG_CRYPTO_HMAC is not set
1110# CONFIG_CRYPTO_XCBC is not set
1111
1112#
1113# Digest
1114#
1115# CONFIG_CRYPTO_CRC32C is not set
1116# CONFIG_CRYPTO_MD4 is not set
1117# CONFIG_CRYPTO_MD5 is not set
1118# CONFIG_CRYPTO_MICHAEL_MIC is not set
1119# CONFIG_CRYPTO_RMD128 is not set
1120# CONFIG_CRYPTO_RMD160 is not set
1121# CONFIG_CRYPTO_RMD256 is not set
1122# CONFIG_CRYPTO_RMD320 is not set
1123# CONFIG_CRYPTO_SHA1 is not set
1124# CONFIG_CRYPTO_SHA256 is not set
1125# CONFIG_CRYPTO_SHA512 is not set
1126# CONFIG_CRYPTO_TGR192 is not set
1127# CONFIG_CRYPTO_WP512 is not set
1128
1129#
1130# Ciphers
1131#
1132# CONFIG_CRYPTO_AES is not set
1133# CONFIG_CRYPTO_ANUBIS is not set
1134# CONFIG_CRYPTO_ARC4 is not set
1135# CONFIG_CRYPTO_BLOWFISH is not set
1136# CONFIG_CRYPTO_CAMELLIA is not set
1137# CONFIG_CRYPTO_CAST5 is not set
1138# CONFIG_CRYPTO_CAST6 is not set
1139# CONFIG_CRYPTO_DES is not set
1140# CONFIG_CRYPTO_FCRYPT is not set
1141# CONFIG_CRYPTO_KHAZAD is not set
1142# CONFIG_CRYPTO_SALSA20 is not set
1143# CONFIG_CRYPTO_SEED is not set
1144# CONFIG_CRYPTO_SERPENT is not set
1145# CONFIG_CRYPTO_TEA is not set
1146# CONFIG_CRYPTO_TWOFISH is not set
1147
1148#
1149# Compression
1150#
1151# CONFIG_CRYPTO_DEFLATE is not set
1152# CONFIG_CRYPTO_ZLIB is not set
1153# CONFIG_CRYPTO_LZO is not set
1154
1155#
1156# Random Number Generation
1157#
1158# CONFIG_CRYPTO_ANSI_CPRNG is not set
1159CONFIG_CRYPTO_HW=y
1160# CONFIG_BINARY_PRINTF is not set
748 1161
749# 1162#
750# Library routines 1163# Library routines
751# 1164#
1165CONFIG_BITREVERSE=y
1166CONFIG_GENERIC_FIND_LAST_BIT=y
752# CONFIG_CRC_CCITT is not set 1167# CONFIG_CRC_CCITT is not set
753# CONFIG_CRC16 is not set 1168# CONFIG_CRC16 is not set
754# CONFIG_CRC_T10DIF is not set 1169# CONFIG_CRC_T10DIF is not set
755# CONFIG_CRC_ITU_T is not set 1170CONFIG_CRC_ITU_T=y
756# CONFIG_CRC32 is not set 1171CONFIG_CRC32=y
757# CONFIG_CRC7 is not set 1172CONFIG_CRC7=y
758# CONFIG_LIBCRC32C is not set 1173# CONFIG_LIBCRC32C is not set
759CONFIG_ZLIB_INFLATE=y 1174CONFIG_ZLIB_INFLATE=y
760CONFIG_PLIST=y 1175CONFIG_ZLIB_DEFLATE=y
1176CONFIG_DECOMPRESS_LZMA=y
761CONFIG_HAS_IOMEM=y 1177CONFIG_HAS_IOMEM=y
762CONFIG_HAS_IOPORT=y 1178CONFIG_HAS_IOPORT=y
763CONFIG_HAS_DMA=y 1179CONFIG_HAS_DMA=y
1180CONFIG_NLATTR=y
diff --git a/arch/blackfin/include/asm/asm-offsets.h b/arch/blackfin/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/blackfin/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/blackfin/include/asm/bfin-global.h b/arch/blackfin/include/asm/bfin-global.h
index 10064f902d20..e6485c305ea6 100644
--- a/arch/blackfin/include/asm/bfin-global.h
+++ b/arch/blackfin/include/asm/bfin-global.h
@@ -11,9 +11,6 @@
11 11
12#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
13 13
14#include <asm/sections.h>
15#include <asm/ptrace.h>
16#include <asm/user.h>
17#include <linux/linkage.h> 14#include <linux/linkage.h>
18#include <linux/types.h> 15#include <linux/types.h>
19 16
@@ -23,6 +20,12 @@
23# define DMA_UNCACHED_REGION (2 * 1024 * 1024) 20# define DMA_UNCACHED_REGION (2 * 1024 * 1024)
24#elif defined(CONFIG_DMA_UNCACHED_1M) 21#elif defined(CONFIG_DMA_UNCACHED_1M)
25# define DMA_UNCACHED_REGION (1024 * 1024) 22# define DMA_UNCACHED_REGION (1024 * 1024)
23#elif defined(CONFIG_DMA_UNCACHED_512K)
24# define DMA_UNCACHED_REGION (512 * 1024)
25#elif defined(CONFIG_DMA_UNCACHED_256K)
26# define DMA_UNCACHED_REGION (256 * 1024)
27#elif defined(CONFIG_DMA_UNCACHED_128K)
28# define DMA_UNCACHED_REGION (128 * 1024)
26#else 29#else
27# define DMA_UNCACHED_REGION (0) 30# define DMA_UNCACHED_REGION (0)
28#endif 31#endif
@@ -35,6 +38,7 @@ extern unsigned long get_sclk(void);
35extern unsigned long sclk_to_usecs(unsigned long sclk); 38extern unsigned long sclk_to_usecs(unsigned long sclk);
36extern unsigned long usecs_to_sclk(unsigned long usecs); 39extern unsigned long usecs_to_sclk(unsigned long usecs);
37 40
41struct pt_regs;
38extern void dump_bfin_process(struct pt_regs *regs); 42extern void dump_bfin_process(struct pt_regs *regs);
39extern void dump_bfin_mem(struct pt_regs *regs); 43extern void dump_bfin_mem(struct pt_regs *regs);
40extern void dump_bfin_trace_buffer(void); 44extern void dump_bfin_trace_buffer(void);
diff --git a/arch/blackfin/include/asm/bfin-lq035q1.h b/arch/blackfin/include/asm/bfin-lq035q1.h
new file mode 100644
index 000000000000..57bc21ac2296
--- /dev/null
+++ b/arch/blackfin/include/asm/bfin-lq035q1.h
@@ -0,0 +1,28 @@
1/*
2 * Blackfin LCD Framebuffer driver SHARP LQ035Q1DH02
3 *
4 * Copyright 2008-2009 Analog Devices Inc.
5 * Licensed under the GPL-2 or later.
6 */
7
8#ifndef BFIN_LQ035Q1_H
9#define BFIN_LQ035Q1_H
10
11#define LQ035_RL (0 << 8) /* Right -> Left Scan */
12#define LQ035_LR (1 << 8) /* Left -> Right Scan */
13#define LQ035_TB (1 << 9) /* Top -> Botton Scan */
14#define LQ035_BT (0 << 9) /* Botton -> Top Scan */
15#define LQ035_BGR (1 << 11) /* Use BGR format */
16#define LQ035_RGB (0 << 11) /* Use RGB format */
17#define LQ035_NORM (1 << 13) /* Reversal */
18#define LQ035_REV (0 << 13) /* Reversal */
19
20struct bfin_lq035q1fb_disp_info {
21
22 unsigned mode;
23 /* GPIOs */
24 int use_bl;
25 unsigned gpio_bl;
26};
27
28#endif /* BFIN_LQ035Q1_H */
diff --git a/arch/blackfin/include/asm/bug.h b/arch/blackfin/include/asm/bug.h
index 6f4548a13555..75f6dc336d46 100644
--- a/arch/blackfin/include/asm/bug.h
+++ b/arch/blackfin/include/asm/bug.h
@@ -47,7 +47,7 @@
47#define BUG() \ 47#define BUG() \
48 do { \ 48 do { \
49 _BUG_OR_WARN(0); \ 49 _BUG_OR_WARN(0); \
50 for (;;); \ 50 unreachable(); \
51 } while (0) 51 } while (0)
52 52
53#define WARN_ON(condition) \ 53#define WARN_ON(condition) \
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h
index 417eaac7fe99..2666ff8ea952 100644
--- a/arch/blackfin/include/asm/cacheflush.h
+++ b/arch/blackfin/include/asm/cacheflush.h
@@ -10,6 +10,7 @@
10#define _BLACKFIN_CACHEFLUSH_H 10#define _BLACKFIN_CACHEFLUSH_H
11 11
12#include <asm/blackfin.h> /* for SSYNC() */ 12#include <asm/blackfin.h> /* for SSYNC() */
13#include <asm/sections.h> /* for _ramend */
13 14
14extern void blackfin_icache_flush_range(unsigned long start_address, unsigned long end_address); 15extern void blackfin_icache_flush_range(unsigned long start_address, unsigned long end_address);
15extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address); 16extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address);
diff --git a/arch/blackfin/include/asm/checksum.h b/arch/blackfin/include/asm/checksum.h
index a23415be0de1..623cc7fb00bc 100644
--- a/arch/blackfin/include/asm/checksum.h
+++ b/arch/blackfin/include/asm/checksum.h
@@ -9,63 +9,12 @@
9#define _BFIN_CHECKSUM_H 9#define _BFIN_CHECKSUM_H
10 10
11/* 11/*
12 * computes the checksum of a memory block at buff, length len,
13 * and adds in "sum" (32-bit)
14 *
15 * returns a 32-bit number suitable for feeding into itself
16 * or csum_tcpudp_magic
17 *
18 * this function must be called with even lengths, except
19 * for the last fragment, which may be odd
20 *
21 * it's best to have buff aligned on a 32-bit boundary
22 */
23__wsum csum_partial(const void *buff, int len, __wsum sum);
24
25/*
26 * the same as csum_partial, but copies from src while it
27 * checksums
28 *
29 * here even more important to align src and dst on a 32-bit (or even
30 * better 64-bit) boundary
31 */
32
33__wsum csum_partial_copy(const void *src, void *dst,
34 int len, __wsum sum);
35
36/*
37 * the same as csum_partial_copy, but copies from user space.
38 *
39 * here even more important to align src and dst on a 32-bit (or even
40 * better 64-bit) boundary
41 */
42
43extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
44 int len, __wsum sum, int *csum_err);
45
46#define csum_partial_copy_nocheck(src, dst, len, sum) \
47 csum_partial_copy((src), (dst), (len), (sum))
48
49__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl);
50
51/*
52 * Fold a partial checksum
53 */
54
55static inline __sum16 csum_fold(__wsum sum)
56{
57 while (sum >> 16)
58 sum = (sum & 0xffff) + (sum >> 16);
59 return ((~(sum << 16)) >> 16);
60}
61
62/*
63 * computes the checksum of the TCP/UDP pseudo-header 12 * computes the checksum of the TCP/UDP pseudo-header
64 * returns a 16-bit checksum, already complemented 13 * returns a 16-bit checksum, already complemented
65 */ 14 */
66 15
67static inline __wsum 16static inline __wsum
68csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, 17__csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
69 unsigned short proto, __wsum sum) 18 unsigned short proto, __wsum sum)
70{ 19{
71 unsigned int carry; 20 unsigned int carry;
@@ -88,19 +37,8 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
88 37
89 return (sum); 38 return (sum);
90} 39}
40#define csum_tcpudp_nofold __csum_tcpudp_nofold
91 41
92static inline __sum16 42#include <asm-generic/checksum.h>
93csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
94 unsigned short proto, __wsum sum)
95{
96 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
97}
98
99/*
100 * this routine is used for miscellaneous IP-like checksums, mainly
101 * in icmp.c
102 */
103
104extern __sum16 ip_compute_csum(const void *buff, int len);
105 43
106#endif /* _BFIN_CHECKSUM_H */ 44#endif
diff --git a/arch/blackfin/include/asm/clocks.h b/arch/blackfin/include/asm/clocks.h
index f80dad5ff257..6f0b61852f58 100644
--- a/arch/blackfin/include/asm/clocks.h
+++ b/arch/blackfin/include/asm/clocks.h
@@ -9,6 +9,8 @@
9#ifndef _BFIN_CLOCKS_H 9#ifndef _BFIN_CLOCKS_H
10#define _BFIN_CLOCKS_H 10#define _BFIN_CLOCKS_H
11 11
12#include <asm/dpmc.h>
13
12#ifdef CONFIG_CCLK_DIV_1 14#ifdef CONFIG_CCLK_DIV_1
13# define CONFIG_CCLK_ACT_DIV CCLK_DIV1 15# define CONFIG_CCLK_ACT_DIV CCLK_DIV1
14# define CONFIG_CCLK_DIV 1 16# define CONFIG_CCLK_DIV 1
diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h
index 7a23d824ac96..f9172ff30e5c 100644
--- a/arch/blackfin/include/asm/dma-mapping.h
+++ b/arch/blackfin/include/asm/dma-mapping.h
@@ -7,9 +7,9 @@
7#ifndef _BLACKFIN_DMA_MAPPING_H 7#ifndef _BLACKFIN_DMA_MAPPING_H
8#define _BLACKFIN_DMA_MAPPING_H 8#define _BLACKFIN_DMA_MAPPING_H
9 9
10#include <asm/scatterlist.h> 10#include <asm/cacheflush.h>
11struct scatterlist;
11 12
12void dma_alloc_init(unsigned long start, unsigned long end);
13void *dma_alloc_coherent(struct device *dev, size_t size, 13void *dma_alloc_coherent(struct device *dev, size_t size,
14 dma_addr_t *dma_handle, gfp_t gfp); 14 dma_addr_t *dma_handle, gfp_t gfp);
15void dma_free_coherent(struct device *dev, size_t size, void *vaddr, 15void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
@@ -20,13 +20,51 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
20 */ 20 */
21#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 21#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
22#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 22#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
23#define dma_supported(d, m) (1)
24#define dma_get_cache_alignment() (32)
25#define dma_is_consistent(d, h) (1)
23 26
24static inline 27static inline int
25int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 28dma_set_mask(struct device *dev, u64 dma_mask)
26{ 29{
30 if (!dev->dma_mask || !dma_supported(dev, dma_mask))
31 return -EIO;
32
33 *dev->dma_mask = dma_mask;
34
27 return 0; 35 return 0;
28} 36}
29 37
38static inline int
39dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
40{
41 return 0;
42}
43
44extern void
45__dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir);
46static inline void
47_dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
48{
49 if (!__builtin_constant_p(dir)) {
50 __dma_sync(addr, size, dir);
51 return;
52 }
53
54 switch (dir) {
55 case DMA_NONE:
56 BUG();
57 case DMA_TO_DEVICE: /* writeback only */
58 flush_dcache_range(addr, addr + size);
59 break;
60 case DMA_FROM_DEVICE: /* invalidate only */
61 case DMA_BIDIRECTIONAL: /* flush and invalidate */
62 /* Blackfin has no dedicated invalidate (it includes a flush) */
63 invalidate_dcache_range(addr, addr + size);
64 break;
65 }
66}
67
30/* 68/*
31 * Map a single buffer of the indicated size for DMA in streaming mode. 69 * Map a single buffer of the indicated size for DMA in streaming mode.
32 * The 32-bit bus address to use is returned. 70 * The 32-bit bus address to use is returned.
@@ -34,8 +72,13 @@ int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
34 * Once the device is given the dma address, the device owns this memory 72 * Once the device is given the dma address, the device owns this memory
35 * until either pci_unmap_single or pci_dma_sync_single is performed. 73 * until either pci_unmap_single or pci_dma_sync_single is performed.
36 */ 74 */
37extern dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, 75static inline dma_addr_t
38 enum dma_data_direction direction); 76dma_map_single(struct device *dev, void *ptr, size_t size,
77 enum dma_data_direction dir)
78{
79 _dma_sync((dma_addr_t)ptr, size, dir);
80 return (dma_addr_t) ptr;
81}
39 82
40static inline dma_addr_t 83static inline dma_addr_t
41dma_map_page(struct device *dev, struct page *page, 84dma_map_page(struct device *dev, struct page *page,
@@ -53,8 +96,12 @@ dma_map_page(struct device *dev, struct page *page,
53 * After this call, reads by the cpu to the buffer are guarenteed to see 96 * After this call, reads by the cpu to the buffer are guarenteed to see
54 * whatever the device wrote there. 97 * whatever the device wrote there.
55 */ 98 */
56extern void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 99static inline void
57 enum dma_data_direction direction); 100dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
101 enum dma_data_direction dir)
102{
103 BUG_ON(!valid_dma_direction(dir));
104}
58 105
59static inline void 106static inline void
60dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, 107dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size,
@@ -80,38 +127,66 @@ dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size,
80 * the same here. 127 * the same here.
81 */ 128 */
82extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, 129extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
83 enum dma_data_direction direction); 130 enum dma_data_direction dir);
84 131
85/* 132/*
86 * Unmap a set of streaming mode DMA translations. 133 * Unmap a set of streaming mode DMA translations.
87 * Again, cpu read rules concerning calls here are the same as for 134 * Again, cpu read rules concerning calls here are the same as for
88 * pci_unmap_single() above. 135 * pci_unmap_single() above.
89 */ 136 */
90extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg, 137static inline void
91 int nhwentries, enum dma_data_direction direction); 138dma_unmap_sg(struct device *dev, struct scatterlist *sg,
139 int nhwentries, enum dma_data_direction dir)
140{
141 BUG_ON(!valid_dma_direction(dir));
142}
92 143
93static inline void dma_sync_single_for_cpu(struct device *dev, 144static inline void
94 dma_addr_t handle, size_t size, 145dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t handle,
95 enum dma_data_direction dir) 146 unsigned long offset, size_t size,
147 enum dma_data_direction dir)
96{ 148{
149 BUG_ON(!valid_dma_direction(dir));
97} 150}
98 151
99static inline void dma_sync_single_for_device(struct device *dev, 152static inline void
100 dma_addr_t handle, size_t size, 153dma_sync_single_range_for_device(struct device *dev, dma_addr_t handle,
101 enum dma_data_direction dir) 154 unsigned long offset, size_t size,
155 enum dma_data_direction dir)
102{ 156{
157 _dma_sync(handle + offset, size, dir);
103} 158}
104 159
105static inline void dma_sync_sg_for_cpu(struct device *dev, 160static inline void
106 struct scatterlist *sg, 161dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
107 int nents, enum dma_data_direction dir) 162 enum dma_data_direction dir)
108{ 163{
164 dma_sync_single_range_for_cpu(dev, handle, 0, size, dir);
109} 165}
110 166
111static inline void dma_sync_sg_for_device(struct device *dev, 167static inline void
112 struct scatterlist *sg, 168dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
113 int nents, enum dma_data_direction dir) 169 enum dma_data_direction dir)
170{
171 dma_sync_single_range_for_device(dev, handle, 0, size, dir);
172}
173
174static inline void
175dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
176 enum dma_data_direction dir)
177{
178 BUG_ON(!valid_dma_direction(dir));
179}
180
181extern void
182dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
183 int nents, enum dma_data_direction dir);
184
185static inline void
186dma_cache_sync(struct device *dev, void *vaddr, size_t size,
187 enum dma_data_direction dir)
114{ 188{
189 _dma_sync((dma_addr_t)vaddr, size, dir);
115} 190}
116 191
117#endif /* _BLACKFIN_DMA_MAPPING_H */ 192#endif /* _BLACKFIN_DMA_MAPPING_H */
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h
index c9a59622e23f..bd2e62243abe 100644
--- a/arch/blackfin/include/asm/dma.h
+++ b/arch/blackfin/include/asm/dma.h
@@ -10,46 +10,70 @@
10 10
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <mach/dma.h> 12#include <mach/dma.h>
13#include <asm/atomic.h>
13#include <asm/blackfin.h> 14#include <asm/blackfin.h>
14#include <asm/page.h> 15#include <asm/page.h>
15 16#include <asm-generic/dma.h>
16#define MAX_DMA_ADDRESS PAGE_OFFSET 17
17 18/* DMA_CONFIG Masks */
18/***************************************************************************** 19#define DMAEN 0x0001 /* DMA Channel Enable */
19* Generic DMA Declarations 20#define WNR 0x0002 /* Channel Direction (W/R*) */
20* 21#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
21****************************************************************************/ 22#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
22enum dma_chan_status { 23#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
23 DMA_CHANNEL_FREE, 24#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
24 DMA_CHANNEL_REQUESTED, 25#define RESTART 0x0020 /* DMA Buffer Clear */
25 DMA_CHANNEL_ENABLED, 26#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
26}; 27#define DI_EN 0x0080 /* Data Interrupt Enable */
28#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
29#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
30#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
31#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
32#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
33#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
34#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
35#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
36#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
37#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
38#define NDSIZE 0x0f00 /* Next Descriptor Size */
39#define DMAFLOW 0x7000 /* Flow Control */
40#define DMAFLOW_STOP 0x0000 /* Stop Mode */
41#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
42#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
43#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
44#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
45
46/* DMA_IRQ_STATUS Masks */
47#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
48#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
49#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
50#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
27 51
28/*------------------------- 52/*-------------------------
29 * config reg bits value 53 * config reg bits value
30 *-------------------------*/ 54 *-------------------------*/
31#define DATA_SIZE_8 0 55#define DATA_SIZE_8 0
32#define DATA_SIZE_16 1 56#define DATA_SIZE_16 1
33#define DATA_SIZE_32 2 57#define DATA_SIZE_32 2
34 58
35#define DMA_FLOW_STOP 0 59#define DMA_FLOW_STOP 0
36#define DMA_FLOW_AUTO 1 60#define DMA_FLOW_AUTO 1
37#define DMA_FLOW_ARRAY 4 61#define DMA_FLOW_ARRAY 4
38#define DMA_FLOW_SMALL 6 62#define DMA_FLOW_SMALL 6
39#define DMA_FLOW_LARGE 7 63#define DMA_FLOW_LARGE 7
40 64
41#define DIMENSION_LINEAR 0 65#define DIMENSION_LINEAR 0
42#define DIMENSION_2D 1 66#define DIMENSION_2D 1
43 67
44#define DIR_READ 0 68#define DIR_READ 0
45#define DIR_WRITE 1 69#define DIR_WRITE 1
46 70
47#define INTR_DISABLE 0 71#define INTR_DISABLE 0
48#define INTR_ON_BUF 2 72#define INTR_ON_BUF 2
49#define INTR_ON_ROW 3 73#define INTR_ON_ROW 3
50 74
51#define DMA_NOSYNC_KEEP_DMA_BUF 0 75#define DMA_NOSYNC_KEEP_DMA_BUF 0
52#define DMA_SYNC_RESTART 1 76#define DMA_SYNC_RESTART 1
53 77
54struct dmasg { 78struct dmasg {
55 void *next_desc_addr; 79 void *next_desc_addr;
@@ -104,11 +128,9 @@ struct dma_register {
104 128
105}; 129};
106 130
107struct mutex;
108struct dma_channel { 131struct dma_channel {
109 struct mutex dmalock;
110 const char *device_id; 132 const char *device_id;
111 enum dma_chan_status chan_status; 133 atomic_t chan_status;
112 volatile struct dma_register *regs; 134 volatile struct dma_register *regs;
113 struct dmasg *sg; /* large mode descriptor */ 135 struct dmasg *sg; /* large mode descriptor */
114 unsigned int irq; 136 unsigned int irq;
@@ -220,27 +242,20 @@ static inline void set_dma_sg(unsigned int channel, struct dmasg *sg, int ndsize
220 242
221static inline int dma_channel_active(unsigned int channel) 243static inline int dma_channel_active(unsigned int channel)
222{ 244{
223 if (dma_ch[channel].chan_status == DMA_CHANNEL_FREE) 245 return atomic_read(&dma_ch[channel].chan_status);
224 return 0;
225 else
226 return 1;
227} 246}
228 247
229static inline void disable_dma(unsigned int channel) 248static inline void disable_dma(unsigned int channel)
230{ 249{
231 dma_ch[channel].regs->cfg &= ~DMAEN; 250 dma_ch[channel].regs->cfg &= ~DMAEN;
232 SSYNC(); 251 SSYNC();
233 dma_ch[channel].chan_status = DMA_CHANNEL_REQUESTED;
234} 252}
235static inline void enable_dma(unsigned int channel) 253static inline void enable_dma(unsigned int channel)
236{ 254{
237 dma_ch[channel].regs->curr_x_count = 0; 255 dma_ch[channel].regs->curr_x_count = 0;
238 dma_ch[channel].regs->curr_y_count = 0; 256 dma_ch[channel].regs->curr_y_count = 0;
239 dma_ch[channel].regs->cfg |= DMAEN; 257 dma_ch[channel].regs->cfg |= DMAEN;
240 dma_ch[channel].chan_status = DMA_CHANNEL_ENABLED;
241} 258}
242void free_dma(unsigned int channel);
243int request_dma(unsigned int channel, const char *device_id);
244int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data); 259int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data);
245 260
246static inline void dma_disable_irq(unsigned int channel) 261static inline void dma_disable_irq(unsigned int channel)
diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h
index 925e66cb2d49..1597ae5041ee 100644
--- a/arch/blackfin/include/asm/dpmc.h
+++ b/arch/blackfin/include/asm/dpmc.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Miscellaneous IOCTL commands for Dynamic Power Management Controller Driver 2 * Miscellaneous IOCTL commands for Dynamic Power Management Controller Driver
3 * 3 *
4 * Copyright (C) 2004-2008 Analog Device Inc. 4 * Copyright (C) 2004-2009 Analog Device Inc.
5 * 5 *
6 * Licensed under the GPL-2 6 * Licensed under the GPL-2
7 */ 7 */
@@ -9,7 +9,109 @@
9#ifndef _BLACKFIN_DPMC_H_ 9#ifndef _BLACKFIN_DPMC_H_
10#define _BLACKFIN_DPMC_H_ 10#define _BLACKFIN_DPMC_H_
11 11
12#ifdef __KERNEL__ 12/* PLL_CTL Masks */
13#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
14#define PLL_OFF 0x0002 /* PLL Not Powered */
15#define STOPCK 0x0008 /* Core Clock Off */
16#define PDWN 0x0020 /* Enter Deep Sleep Mode */
17#ifdef __ADSPBF539__
18# define IN_DELAY 0x0014 /* Add 200ps Delay To EBIU Input Latches */
19# define OUT_DELAY 0x00C0 /* Add 200ps Delay To EBIU Output Signals */
20#else
21# define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
22# define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
23#endif
24#define BYPASS 0x0100 /* Bypass the PLL */
25#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
26#define SPORT_HYST 0x8000 /* Enable Additional Hysteresis on SPORT Input Pins */
27#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
28
29/* PLL_DIV Masks */
30#define SSEL 0x000F /* System Select */
31#define CSEL 0x0030 /* Core Select */
32#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
33#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
34#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
35#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
36
37#define CCLK_DIV1 CSEL_DIV1
38#define CCLK_DIV2 CSEL_DIV2
39#define CCLK_DIV4 CSEL_DIV4
40#define CCLK_DIV8 CSEL_DIV8
41
42#define SET_SSEL(x) ((x) & 0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
43#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
44
45/* PLL_STAT Masks */
46#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
47#define FULL_ON 0x0002 /* Processor In Full On Mode */
48#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
49#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
50
51#define RTCWS 0x0400 /* RTC/Reset Wake-Up Status */
52#define CANWS 0x0800 /* CAN Wake-Up Status */
53#define USBWS 0x2000 /* USB Wake-Up Status */
54#define KPADWS 0x4000 /* Keypad Wake-Up Status */
55#define ROTWS 0x8000 /* Rotary Wake-Up Status */
56#define GPWS 0x1000 /* General-Purpose Wake-Up Status */
57
58/* VR_CTL Masks */
59#if defined(__ADSPBF52x__) || defined(__ADSPBF51x__)
60#define FREQ 0x3000 /* Switching Oscillator Frequency For Regulator */
61#define FREQ_1000 0x3000 /* Switching Frequency Is 1 MHz */
62#else
63#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
64#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
65#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
66#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
67#endif
68#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
69
70#define GAIN 0x000C /* Voltage Level Gain */
71#define GAIN_5 0x0000 /* GAIN = 5 */
72#define GAIN_10 0x0004 /* GAIN = 1 */
73#define GAIN_20 0x0008 /* GAIN = 2 */
74#define GAIN_50 0x000C /* GAIN = 5 */
75
76#define VLEV 0x00F0 /* Internal Voltage Level */
77#ifdef __ADSPBF52x__
78#define VLEV_085 0x0040 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
79#define VLEV_090 0x0050 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
80#define VLEV_095 0x0060 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
81#define VLEV_100 0x0070 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
82#define VLEV_105 0x0080 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
83#define VLEV_110 0x0090 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
84#define VLEV_115 0x00A0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
85#define VLEV_120 0x00B0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
86#else
87#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
88#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
89#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
90#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
91#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
92#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
93#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
94#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
95#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
96#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
97#endif
98
99#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
100#define CANWE 0x0200 /* Enable CAN Wakeup From Hibernate */
101#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
102#define GPWE 0x0400 /* General-Purpose Wake-Up Enable */
103#define MXVRWE 0x0400 /* Enable MXVR Wakeup From Hibernate */
104#define KPADWE 0x1000 /* Keypad Wake-Up Enable */
105#define ROTWE 0x2000 /* Rotary Wake-Up Enable */
106#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
107#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
108
109#if defined(__ADSPBF52x__) || defined(__ADSPBF51x__)
110#define USBWE 0x0200 /* Enable USB Wakeup From Hibernate */
111#else
112#define USBWE 0x0800 /* Enable USB Wakeup From Hibernate */
113#endif
114
13#ifndef __ASSEMBLY__ 115#ifndef __ASSEMBLY__
14 116
15void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); 117void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
@@ -54,6 +156,5 @@ struct bfin_dpmc_platform_data {
54 w[P0 + (x - PLL_CTL)] = R0;\ 156 w[P0 + (x - PLL_CTL)] = R0;\
55 157
56#endif 158#endif
57#endif /* __KERNEL__ */
58 159
59#endif /*_BLACKFIN_DPMC_H_*/ 160#endif /*_BLACKFIN_DPMC_H_*/
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h
index 8e0764c81eaf..5b50f0ecacf8 100644
--- a/arch/blackfin/include/asm/elf.h
+++ b/arch/blackfin/include/asm/elf.h
@@ -55,7 +55,6 @@ do { \
55 _regs->p2 = _dynamic_addr; \ 55 _regs->p2 = _dynamic_addr; \
56} while(0) 56} while(0)
57 57
58#define USE_ELF_CORE_DUMP
59#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC 58#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC
60#define ELF_EXEC_PAGESIZE 4096 59#define ELF_EXEC_PAGESIZE 4096
61 60
diff --git a/arch/blackfin/include/asm/fcntl.h b/arch/blackfin/include/asm/fcntl.h
index 8727b2b382f1..251c911d59c1 100644
--- a/arch/blackfin/include/asm/fcntl.h
+++ b/arch/blackfin/include/asm/fcntl.h
@@ -7,8 +7,6 @@
7#ifndef _BFIN_FCNTL_H 7#ifndef _BFIN_FCNTL_H
8#define _BFIN_FCNTL_H 8#define _BFIN_FCNTL_H
9 9
10/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
11 located on an ext2 file system */
12#define O_DIRECTORY 040000 /* must be a directory */ 10#define O_DIRECTORY 040000 /* must be a directory */
13#define O_NOFOLLOW 0100000 /* don't follow links */ 11#define O_NOFOLLOW 0100000 /* don't follow links */
14#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 12#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h
index 5b44d05ca53e..539468a05057 100644
--- a/arch/blackfin/include/asm/gpio.h
+++ b/arch/blackfin/include/asm/gpio.h
@@ -159,6 +159,11 @@ struct gpio_port_t {
159}; 159};
160#endif 160#endif
161 161
162#ifdef BFIN_SPECIAL_GPIO_BANKS
163void bfin_special_gpio_free(unsigned gpio);
164int bfin_special_gpio_request(unsigned gpio, const char *label);
165#endif
166
162#ifdef CONFIG_PM 167#ifdef CONFIG_PM
163 168
164unsigned int bfin_pm_standby_setup(void); 169unsigned int bfin_pm_standby_setup(void);
diff --git a/arch/blackfin/include/asm/gptimers.h b/arch/blackfin/include/asm/gptimers.h
index 89f08decb8e0..c722acdda0d3 100644
--- a/arch/blackfin/include/asm/gptimers.h
+++ b/arch/blackfin/include/asm/gptimers.h
@@ -172,25 +172,25 @@
172 172
173/* The actual gptimer API */ 173/* The actual gptimer API */
174 174
175void set_gptimer_pwidth(int timer_id, uint32_t width); 175void set_gptimer_pwidth(unsigned int timer_id, uint32_t width);
176uint32_t get_gptimer_pwidth(int timer_id); 176uint32_t get_gptimer_pwidth(unsigned int timer_id);
177void set_gptimer_period(int timer_id, uint32_t period); 177void set_gptimer_period(unsigned int timer_id, uint32_t period);
178uint32_t get_gptimer_period(int timer_id); 178uint32_t get_gptimer_period(unsigned int timer_id);
179uint32_t get_gptimer_count(int timer_id); 179uint32_t get_gptimer_count(unsigned int timer_id);
180int get_gptimer_intr(int timer_id); 180int get_gptimer_intr(unsigned int timer_id);
181void clear_gptimer_intr(int timer_id); 181void clear_gptimer_intr(unsigned int timer_id);
182int get_gptimer_over(int timer_id); 182int get_gptimer_over(unsigned int timer_id);
183void clear_gptimer_over(int timer_id); 183void clear_gptimer_over(unsigned int timer_id);
184void set_gptimer_config(int timer_id, uint16_t config); 184void set_gptimer_config(unsigned int timer_id, uint16_t config);
185uint16_t get_gptimer_config(int timer_id); 185uint16_t get_gptimer_config(unsigned int timer_id);
186int get_gptimer_run(int timer_id); 186int get_gptimer_run(unsigned int timer_id);
187void set_gptimer_pulse_hi(int timer_id); 187void set_gptimer_pulse_hi(unsigned int timer_id);
188void clear_gptimer_pulse_hi(int timer_id); 188void clear_gptimer_pulse_hi(unsigned int timer_id);
189void enable_gptimers(uint16_t mask); 189void enable_gptimers(uint16_t mask);
190void disable_gptimers(uint16_t mask); 190void disable_gptimers(uint16_t mask);
191void disable_gptimers_sync(uint16_t mask); 191void disable_gptimers_sync(uint16_t mask);
192uint16_t get_enabled_gptimers(void); 192uint16_t get_enabled_gptimers(void);
193uint32_t get_gptimer_status(int group); 193uint32_t get_gptimer_status(unsigned int group);
194void set_gptimer_status(int group, uint32_t value); 194void set_gptimer_status(unsigned int group, uint32_t value);
195 195
196#endif 196#endif
diff --git a/arch/blackfin/include/asm/io.h b/arch/blackfin/include/asm/io.h
index d1f5029189a7..29e55b9d88bc 100644
--- a/arch/blackfin/include/asm/io.h
+++ b/arch/blackfin/include/asm/io.h
@@ -31,12 +31,14 @@ static inline unsigned char readb(const volatile void __iomem *addr)
31 unsigned int val; 31 unsigned int val;
32 int tmp; 32 int tmp;
33 33
34 __asm__ __volatile__ ("cli %1;\n\t" 34 __asm__ __volatile__ (
35 "NOP; NOP; SSYNC;\n\t" 35 "cli %1;"
36 "%0 = b [%2] (z);\n\t" 36 "NOP; NOP; SSYNC;"
37 "sti %1;\n\t" 37 "%0 = b [%2] (z);"
38 : "=d"(val), "=d"(tmp): "a"(addr) 38 "sti %1;"
39 ); 39 : "=d"(val), "=d"(tmp)
40 : "a"(addr)
41 );
40 42
41 return (unsigned char) val; 43 return (unsigned char) val;
42} 44}
@@ -46,12 +48,14 @@ static inline unsigned short readw(const volatile void __iomem *addr)
46 unsigned int val; 48 unsigned int val;
47 int tmp; 49 int tmp;
48 50
49 __asm__ __volatile__ ("cli %1;\n\t" 51 __asm__ __volatile__ (
50 "NOP; NOP; SSYNC;\n\t" 52 "cli %1;"
51 "%0 = w [%2] (z);\n\t" 53 "NOP; NOP; SSYNC;"
52 "sti %1;\n\t" 54 "%0 = w [%2] (z);"
53 : "=d"(val), "=d"(tmp): "a"(addr) 55 "sti %1;"
54 ); 56 : "=d"(val), "=d"(tmp)
57 : "a"(addr)
58 );
55 59
56 return (unsigned short) val; 60 return (unsigned short) val;
57} 61}
@@ -61,20 +65,23 @@ static inline unsigned int readl(const volatile void __iomem *addr)
61 unsigned int val; 65 unsigned int val;
62 int tmp; 66 int tmp;
63 67
64 __asm__ __volatile__ ("cli %1;\n\t" 68 __asm__ __volatile__ (
65 "NOP; NOP; SSYNC;\n\t" 69 "cli %1;"
66 "%0 = [%2];\n\t" 70 "NOP; NOP; SSYNC;"
67 "sti %1;\n\t" 71 "%0 = [%2];"
68 : "=d"(val), "=d"(tmp): "a"(addr) 72 "sti %1;"
69 ); 73 : "=d"(val), "=d"(tmp)
74 : "a"(addr)
75 );
76
70 return val; 77 return val;
71} 78}
72 79
73#endif /* __ASSEMBLY__ */ 80#endif /* __ASSEMBLY__ */
74 81
75#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b)) 82#define writeb(b, addr) (void)((*(volatile unsigned char *) (addr)) = (b))
76#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b)) 83#define writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = (b))
77#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b)) 84#define writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b))
78 85
79#define __raw_readb readb 86#define __raw_readb readb
80#define __raw_readw readw 87#define __raw_readw readw
@@ -82,9 +89,9 @@ static inline unsigned int readl(const volatile void __iomem *addr)
82#define __raw_writeb writeb 89#define __raw_writeb writeb
83#define __raw_writew writew 90#define __raw_writew writew
84#define __raw_writel writel 91#define __raw_writel writel
85#define memset_io(a,b,c) memset((void *)(a),(b),(c)) 92#define memset_io(a, b, c) memset((void *)(a), (b), (c))
86#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) 93#define memcpy_fromio(a, b, c) memcpy((a), (void *)(b), (c))
87#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) 94#define memcpy_toio(a, b, c) memcpy((void *)(a), (b), (c))
88 95
89/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */ 96/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */
90#define __io(port) ((void *)(unsigned long)(port)) 97#define __io(port) ((void *)(unsigned long)(port))
@@ -92,30 +99,30 @@ static inline unsigned int readl(const volatile void __iomem *addr)
92#define inb(port) readb(__io(port)) 99#define inb(port) readb(__io(port))
93#define inw(port) readw(__io(port)) 100#define inw(port) readw(__io(port))
94#define inl(port) readl(__io(port)) 101#define inl(port) readl(__io(port))
95#define outb(x,port) writeb(x,__io(port)) 102#define outb(x, port) writeb(x, __io(port))
96#define outw(x,port) writew(x,__io(port)) 103#define outw(x, port) writew(x, __io(port))
97#define outl(x,port) writel(x,__io(port)) 104#define outl(x, port) writel(x, __io(port))
98 105
99#define inb_p(port) inb(__io(port)) 106#define inb_p(port) inb(__io(port))
100#define inw_p(port) inw(__io(port)) 107#define inw_p(port) inw(__io(port))
101#define inl_p(port) inl(__io(port)) 108#define inl_p(port) inl(__io(port))
102#define outb_p(x,port) outb(x,__io(port)) 109#define outb_p(x, port) outb(x, __io(port))
103#define outw_p(x,port) outw(x,__io(port)) 110#define outw_p(x, port) outw(x, __io(port))
104#define outl_p(x,port) outl(x,__io(port)) 111#define outl_p(x, port) outl(x, __io(port))
105 112
106#define ioread8_rep(a,d,c) readsb(a,d,c) 113#define ioread8_rep(a, d, c) readsb(a, d, c)
107#define ioread16_rep(a,d,c) readsw(a,d,c) 114#define ioread16_rep(a, d, c) readsw(a, d, c)
108#define ioread32_rep(a,d,c) readsl(a,d,c) 115#define ioread32_rep(a, d, c) readsl(a, d, c)
109#define iowrite8_rep(a,s,c) writesb(a,s,c) 116#define iowrite8_rep(a, s, c) writesb(a, s, c)
110#define iowrite16_rep(a,s,c) writesw(a,s,c) 117#define iowrite16_rep(a, s, c) writesw(a, s, c)
111#define iowrite32_rep(a,s,c) writesl(a,s,c) 118#define iowrite32_rep(a, s, c) writesl(a, s, c)
112 119
113#define ioread8(X) readb(X) 120#define ioread8(x) readb(x)
114#define ioread16(X) readw(X) 121#define ioread16(x) readw(x)
115#define ioread32(X) readl(X) 122#define ioread32(x) readl(x)
116#define iowrite8(val,X) writeb(val,X) 123#define iowrite8(val, x) writeb(val, x)
117#define iowrite16(val,X) writew(val,X) 124#define iowrite16(val, x) writew(val, x)
118#define iowrite32(val,X) writel(val,X) 125#define iowrite32(val, x) writel(val, x)
119 126
120#define mmiowb() wmb() 127#define mmiowb() wmb()
121 128
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h
index 4617ba66278f..d3b40449ca0e 100644
--- a/arch/blackfin/include/asm/ipipe.h
+++ b/arch/blackfin/include/asm/ipipe.h
@@ -35,9 +35,9 @@
35#include <asm/atomic.h> 35#include <asm/atomic.h>
36#include <asm/traps.h> 36#include <asm/traps.h>
37 37
38#define IPIPE_ARCH_STRING "1.11-00" 38#define IPIPE_ARCH_STRING "1.12-00"
39#define IPIPE_MAJOR_NUMBER 1 39#define IPIPE_MAJOR_NUMBER 1
40#define IPIPE_MINOR_NUMBER 11 40#define IPIPE_MINOR_NUMBER 12
41#define IPIPE_PATCH_NUMBER 0 41#define IPIPE_PATCH_NUMBER 0
42 42
43#ifdef CONFIG_SMP 43#ifdef CONFIG_SMP
@@ -124,16 +124,6 @@ static inline int __ipipe_check_tickdev(const char *devname)
124 return 1; 124 return 1;
125} 125}
126 126
127static inline void __ipipe_lock_root(void)
128{
129 set_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status));
130}
131
132static inline void __ipipe_unlock_root(void)
133{
134 clear_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status));
135}
136
137void __ipipe_enable_pipeline(void); 127void __ipipe_enable_pipeline(void);
138 128
139#define __ipipe_hook_critical_ipi(ipd) do { } while (0) 129#define __ipipe_hook_critical_ipi(ipd) do { } while (0)
diff --git a/arch/blackfin/include/asm/ipipe_base.h b/arch/blackfin/include/asm/ipipe_base.h
index 490098f532a7..00409201d9ed 100644
--- a/arch/blackfin/include/asm/ipipe_base.h
+++ b/arch/blackfin/include/asm/ipipe_base.h
@@ -51,23 +51,15 @@
51 51
52extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ 52extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */
53 53
54#define __ipipe_stall_root() \ 54void __ipipe_stall_root(void);
55 do { \ 55
56 volatile unsigned long *p = &__ipipe_root_status; \ 56unsigned long __ipipe_test_and_stall_root(void);
57 set_bit(0, p); \ 57
58 } while (0) 58unsigned long __ipipe_test_root(void);
59 59
60#define __ipipe_test_and_stall_root() \ 60void __ipipe_lock_root(void);
61 ({ \ 61
62 volatile unsigned long *p = &__ipipe_root_status; \ 62void __ipipe_unlock_root(void);
63 test_and_set_bit(0, p); \
64 })
65
66#define __ipipe_test_root() \
67 ({ \
68 const unsigned long *p = &__ipipe_root_status; \
69 test_bit(0, p); \
70 })
71 63
72#endif /* !__ASSEMBLY__ */ 64#endif /* !__ASSEMBLY__ */
73 65
diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h
index 9b19a19d9ae9..813a1af3e865 100644
--- a/arch/blackfin/include/asm/irqflags.h
+++ b/arch/blackfin/include/asm/irqflags.h
@@ -33,6 +33,7 @@ static inline unsigned long bfin_cli(void)
33 33
34#ifdef CONFIG_IPIPE 34#ifdef CONFIG_IPIPE
35 35
36#include <linux/compiler.h>
36#include <linux/ipipe_base.h> 37#include <linux/ipipe_base.h>
37#include <linux/ipipe_trace.h> 38#include <linux/ipipe_trace.h>
38 39
@@ -49,12 +50,12 @@ static inline unsigned long bfin_cli(void)
49 barrier(); \ 50 barrier(); \
50 } while (0) 51 } while (0)
51 52
52static inline void raw_local_irq_enable(void) 53#define raw_local_irq_enable() \
53{ 54 do { \
54 barrier(); 55 barrier(); \
55 ipipe_check_context(ipipe_root_domain); 56 ipipe_check_context(ipipe_root_domain); \
56 __ipipe_unstall_root(); 57 __ipipe_unstall_root(); \
57} 58 } while (0)
58 59
59#define raw_local_save_flags_ptr(x) \ 60#define raw_local_save_flags_ptr(x) \
60 do { \ 61 do { \
diff --git a/arch/blackfin/include/asm/kgdb.h b/arch/blackfin/include/asm/kgdb.h
index c8b256d2ea30..8651afe12990 100644
--- a/arch/blackfin/include/asm/kgdb.h
+++ b/arch/blackfin/include/asm/kgdb.h
@@ -10,9 +10,6 @@
10 10
11#include <linux/ptrace.h> 11#include <linux/ptrace.h>
12 12
13/* gdb locks */
14#define KGDB_MAX_NO_CPUS 8
15
16/* 13/*
17 * BUFMAX defines the maximum number of characters in inbound/outbound buffers. 14 * BUFMAX defines the maximum number of characters in inbound/outbound buffers.
18 * At least NUMREGBYTES*2 are needed for register packets. 15 * At least NUMREGBYTES*2 are needed for register packets.
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h
index 4179e329b9c9..7c8fe834ff22 100644
--- a/arch/blackfin/include/asm/mem_init.h
+++ b/arch/blackfin/include/asm/mem_init.h
@@ -295,156 +295,3 @@
295#else 295#else
296#define PLL_BYPASS 0 296#define PLL_BYPASS 0
297#endif 297#endif
298
299/***************************************Currently Not Being Used *********************************/
300
301#if defined(CONFIG_FLASH_SPEED_BWAT) && \
302defined(CONFIG_FLASH_SPEED_BRAT) && \
303defined(CONFIG_FLASH_SPEED_BHT) && \
304defined(CONFIG_FLASH_SPEED_BST) && \
305defined(CONFIG_FLASH_SPEED_BTT)
306
307#define flash_EBIU_AMBCTL_WAT ((CONFIG_FLASH_SPEED_BWAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
308#define flash_EBIU_AMBCTL_RAT ((CONFIG_FLASH_SPEED_BRAT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
309#define flash_EBIU_AMBCTL_HT ((CONFIG_FLASH_SPEED_BHT * 4) / (4000000000 / CONFIG_SCLK_HZ))
310#define flash_EBIU_AMBCTL_ST ((CONFIG_FLASH_SPEED_BST * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
311#define flash_EBIU_AMBCTL_TT ((CONFIG_FLASH_SPEED_BTT * 4) / (4000000000 / CONFIG_SCLK_HZ)) + 1
312
313#if (flash_EBIU_AMBCTL_TT > 3)
314#define flash_EBIU_AMBCTL0_TT B0TT_4
315#endif
316#if (flash_EBIU_AMBCTL_TT == 3)
317#define flash_EBIU_AMBCTL0_TT B0TT_3
318#endif
319#if (flash_EBIU_AMBCTL_TT == 2)
320#define flash_EBIU_AMBCTL0_TT B0TT_2
321#endif
322#if (flash_EBIU_AMBCTL_TT < 2)
323#define flash_EBIU_AMBCTL0_TT B0TT_1
324#endif
325
326#if (flash_EBIU_AMBCTL_ST > 3)
327#define flash_EBIU_AMBCTL0_ST B0ST_4
328#endif
329#if (flash_EBIU_AMBCTL_ST == 3)
330#define flash_EBIU_AMBCTL0_ST B0ST_3
331#endif
332#if (flash_EBIU_AMBCTL_ST == 2)
333#define flash_EBIU_AMBCTL0_ST B0ST_2
334#endif
335#if (flash_EBIU_AMBCTL_ST < 2)
336#define flash_EBIU_AMBCTL0_ST B0ST_1
337#endif
338
339#if (flash_EBIU_AMBCTL_HT > 2)
340#define flash_EBIU_AMBCTL0_HT B0HT_3
341#endif
342#if (flash_EBIU_AMBCTL_HT == 2)
343#define flash_EBIU_AMBCTL0_HT B0HT_2
344#endif
345#if (flash_EBIU_AMBCTL_HT == 1)
346#define flash_EBIU_AMBCTL0_HT B0HT_1
347#endif
348#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT == 0)
349#define flash_EBIU_AMBCTL0_HT B0HT_0
350#endif
351#if (flash_EBIU_AMBCTL_HT == 0 && CONFIG_FLASH_SPEED_BHT != 0)
352#define flash_EBIU_AMBCTL0_HT B0HT_1
353#endif
354
355#if (flash_EBIU_AMBCTL_WAT > 14)
356#define flash_EBIU_AMBCTL0_WAT B0WAT_15
357#endif
358#if (flash_EBIU_AMBCTL_WAT == 14)
359#define flash_EBIU_AMBCTL0_WAT B0WAT_14
360#endif
361#if (flash_EBIU_AMBCTL_WAT == 13)
362#define flash_EBIU_AMBCTL0_WAT B0WAT_13
363#endif
364#if (flash_EBIU_AMBCTL_WAT == 12)
365#define flash_EBIU_AMBCTL0_WAT B0WAT_12
366#endif
367#if (flash_EBIU_AMBCTL_WAT == 11)
368#define flash_EBIU_AMBCTL0_WAT B0WAT_11
369#endif
370#if (flash_EBIU_AMBCTL_WAT == 10)
371#define flash_EBIU_AMBCTL0_WAT B0WAT_10
372#endif
373#if (flash_EBIU_AMBCTL_WAT == 9)
374#define flash_EBIU_AMBCTL0_WAT B0WAT_9
375#endif
376#if (flash_EBIU_AMBCTL_WAT == 8)
377#define flash_EBIU_AMBCTL0_WAT B0WAT_8
378#endif
379#if (flash_EBIU_AMBCTL_WAT == 7)
380#define flash_EBIU_AMBCTL0_WAT B0WAT_7
381#endif
382#if (flash_EBIU_AMBCTL_WAT == 6)
383#define flash_EBIU_AMBCTL0_WAT B0WAT_6
384#endif
385#if (flash_EBIU_AMBCTL_WAT == 5)
386#define flash_EBIU_AMBCTL0_WAT B0WAT_5
387#endif
388#if (flash_EBIU_AMBCTL_WAT == 4)
389#define flash_EBIU_AMBCTL0_WAT B0WAT_4
390#endif
391#if (flash_EBIU_AMBCTL_WAT == 3)
392#define flash_EBIU_AMBCTL0_WAT B0WAT_3
393#endif
394#if (flash_EBIU_AMBCTL_WAT == 2)
395#define flash_EBIU_AMBCTL0_WAT B0WAT_2
396#endif
397#if (flash_EBIU_AMBCTL_WAT == 1)
398#define flash_EBIU_AMBCTL0_WAT B0WAT_1
399#endif
400
401#if (flash_EBIU_AMBCTL_RAT > 14)
402#define flash_EBIU_AMBCTL0_RAT B0RAT_15
403#endif
404#if (flash_EBIU_AMBCTL_RAT == 14)
405#define flash_EBIU_AMBCTL0_RAT B0RAT_14
406#endif
407#if (flash_EBIU_AMBCTL_RAT == 13)
408#define flash_EBIU_AMBCTL0_RAT B0RAT_13
409#endif
410#if (flash_EBIU_AMBCTL_RAT == 12)
411#define flash_EBIU_AMBCTL0_RAT B0RAT_12
412#endif
413#if (flash_EBIU_AMBCTL_RAT == 11)
414#define flash_EBIU_AMBCTL0_RAT B0RAT_11
415#endif
416#if (flash_EBIU_AMBCTL_RAT == 10)
417#define flash_EBIU_AMBCTL0_RAT B0RAT_10
418#endif
419#if (flash_EBIU_AMBCTL_RAT == 9)
420#define flash_EBIU_AMBCTL0_RAT B0RAT_9
421#endif
422#if (flash_EBIU_AMBCTL_RAT == 8)
423#define flash_EBIU_AMBCTL0_RAT B0RAT_8
424#endif
425#if (flash_EBIU_AMBCTL_RAT == 7)
426#define flash_EBIU_AMBCTL0_RAT B0RAT_7
427#endif
428#if (flash_EBIU_AMBCTL_RAT == 6)
429#define flash_EBIU_AMBCTL0_RAT B0RAT_6
430#endif
431#if (flash_EBIU_AMBCTL_RAT == 5)
432#define flash_EBIU_AMBCTL0_RAT B0RAT_5
433#endif
434#if (flash_EBIU_AMBCTL_RAT == 4)
435#define flash_EBIU_AMBCTL0_RAT B0RAT_4
436#endif
437#if (flash_EBIU_AMBCTL_RAT == 3)
438#define flash_EBIU_AMBCTL0_RAT B0RAT_3
439#endif
440#if (flash_EBIU_AMBCTL_RAT == 2)
441#define flash_EBIU_AMBCTL0_RAT B0RAT_2
442#endif
443#if (flash_EBIU_AMBCTL_RAT == 1)
444#define flash_EBIU_AMBCTL0_RAT B0RAT_1
445#endif
446
447#define flash_EBIU_AMBCTL0 \
448 (flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | \
449 flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN)
450#endif
diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h
index 4a3be376ad5b..ae8ef4ffd806 100644
--- a/arch/blackfin/include/asm/mmu_context.h
+++ b/arch/blackfin/include/asm/mmu_context.h
@@ -66,8 +66,8 @@ activate_l1stack(struct mm_struct *mm, unsigned long sp_base)
66 66
67#define activate_mm(prev, next) switch_mm(prev, next, NULL) 67#define activate_mm(prev, next) switch_mm(prev, next, NULL)
68 68
69static inline void switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm, 69static inline void __switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
70 struct task_struct *tsk) 70 struct task_struct *tsk)
71{ 71{
72#ifdef CONFIG_MPU 72#ifdef CONFIG_MPU
73 unsigned int cpu = smp_processor_id(); 73 unsigned int cpu = smp_processor_id();
@@ -95,7 +95,24 @@ static inline void switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_m
95#endif 95#endif
96} 96}
97 97
98#ifdef CONFIG_IPIPE
99#define lock_mm_switch(flags) local_irq_save_hw_cond(flags)
100#define unlock_mm_switch(flags) local_irq_restore_hw_cond(flags)
101#else
102#define lock_mm_switch(flags) do { (void)(flags); } while (0)
103#define unlock_mm_switch(flags) do { (void)(flags); } while (0)
104#endif /* CONFIG_IPIPE */
105
98#ifdef CONFIG_MPU 106#ifdef CONFIG_MPU
107static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
108 struct task_struct *tsk)
109{
110 unsigned long flags;
111 lock_mm_switch(flags);
112 __switch_mm(prev, next, tsk);
113 unlock_mm_switch(flags);
114}
115
99static inline void protect_page(struct mm_struct *mm, unsigned long addr, 116static inline void protect_page(struct mm_struct *mm, unsigned long addr,
100 unsigned long flags) 117 unsigned long flags)
101{ 118{
@@ -128,6 +145,12 @@ static inline void update_protections(struct mm_struct *mm)
128 set_mask_dcplbs(mm->context.page_rwx_mask, cpu); 145 set_mask_dcplbs(mm->context.page_rwx_mask, cpu);
129 } 146 }
130} 147}
148#else /* !CONFIG_MPU */
149static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
150 struct task_struct *tsk)
151{
152 __switch_mm(prev, next, tsk);
153}
131#endif 154#endif
132 155
133static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 156static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
@@ -173,4 +196,10 @@ static inline void destroy_context(struct mm_struct *mm)
173#endif 196#endif
174} 197}
175 198
199#define ipipe_mm_switch_protect(flags) \
200 local_irq_save_hw_cond(flags)
201
202#define ipipe_mm_switch_unprotect(flags) \
203 local_irq_restore_hw_cond(flags)
204
176#endif 205#endif
diff --git a/arch/blackfin/include/asm/module.h b/arch/blackfin/include/asm/module.h
index 9c1cfffddd9b..4282b169ead9 100644
--- a/arch/blackfin/include/asm/module.h
+++ b/arch/blackfin/include/asm/module.h
@@ -7,8 +7,6 @@
7#ifndef _ASM_BFIN_MODULE_H 7#ifndef _ASM_BFIN_MODULE_H
8#define _ASM_BFIN_MODULE_H 8#define _ASM_BFIN_MODULE_H
9 9
10#define MODULE_SYMBOL_PREFIX "_"
11
12#define Elf_Shdr Elf32_Shdr 10#define Elf_Shdr Elf32_Shdr
13#define Elf_Sym Elf32_Sym 11#define Elf_Sym Elf32_Sym
14#define Elf_Ehdr Elf32_Ehdr 12#define Elf_Ehdr Elf32_Ehdr
diff --git a/arch/blackfin/include/asm/pci.h b/arch/blackfin/include/asm/pci.h
index 61277358c865..99cae2e3bac7 100644
--- a/arch/blackfin/include/asm/pci.h
+++ b/arch/blackfin/include/asm/pci.h
@@ -4,145 +4,19 @@
4#define _ASM_BFIN_PCI_H 4#define _ASM_BFIN_PCI_H
5 5
6#include <asm/scatterlist.h> 6#include <asm/scatterlist.h>
7#include <asm-generic/pci-dma-compat.h>
8#include <asm-generic/pci.h>
7 9
8/*
9 *
10 * Written by Wout Klaren.
11 */
12
13/* Added by Chang Junxiao */
14#define PCIBIOS_MIN_IO 0x00001000 10#define PCIBIOS_MIN_IO 0x00001000
15#define PCIBIOS_MIN_MEM 0x10000000 11#define PCIBIOS_MIN_MEM 0x10000000
16 12
17#define PCI_DMA_BUS_IS_PHYS (1)
18struct pci_ops;
19
20/*
21 * Structure with hardware dependent information and functions of the
22 * PCI bus.
23 */
24struct pci_bus_info {
25
26 /*
27 * Resources of the PCI bus.
28 */
29 struct resource mem_space;
30 struct resource io_space;
31
32 /*
33 * System dependent functions.
34 */
35 struct pci_ops *bfin_pci_ops;
36 void (*fixup) (int pci_modify);
37 void (*conf_device) (unsigned char bus, unsigned char device_fn);
38};
39
40#define pcibios_assign_all_busses() 0
41static inline void pcibios_set_master(struct pci_dev *dev) 13static inline void pcibios_set_master(struct pci_dev *dev)
42{ 14{
43
44 /* No special bus mastering setup handling */ 15 /* No special bus mastering setup handling */
45} 16}
46static inline void pcibios_penalize_isa_irq(int irq) 17static inline void pcibios_penalize_isa_irq(int irq)
47{ 18{
48
49 /* We don't do dynamic PCI IRQ allocation */ 19 /* We don't do dynamic PCI IRQ allocation */
50} 20}
51static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
52 size_t size, int direction)
53{
54 if (direction == PCI_DMA_NONE)
55 BUG();
56
57 /* return virt_to_bus(ptr); */
58 return (dma_addr_t) ptr;
59}
60
61/* Unmap a single streaming mode DMA translation. The dma_addr and size
62 * must match what was provided for in a previous pci_map_single call. All
63 * other usages are undefined.
64 *
65 * After this call, reads by the cpu to the buffer are guarenteed to see
66 * whatever the device wrote there.
67 */
68static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
69 size_t size, int direction)
70{
71 if (direction == PCI_DMA_NONE)
72 BUG();
73
74 /* Nothing to do */
75}
76
77/* Map a set of buffers described by scatterlist in streaming
78 * mode for DMA. This is the scather-gather version of the
79 * above pci_map_single interface. Here the scatter gather list
80 * elements are each tagged with the appropriate dma address
81 * and length. They are obtained via sg_dma_{address,length}(SG).
82 *
83 * NOTE: An implementation may be able to use a smaller number of
84 * DMA address/length pairs than there are SG table elements.
85 * (for example via virtual mapping capabilities)
86 * The routine returns the number of addr/length pairs actually
87 * used, at most nents.
88 *
89 * Device ownership issues as mentioned above for pci_map_single are
90 * the same here.
91 */
92static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
93 int nents, int direction)
94{
95 if (direction == PCI_DMA_NONE)
96 BUG();
97 return nents;
98}
99
100/* Unmap a set of streaming mode DMA translations.
101 * Again, cpu read rules concerning calls here are the same as for
102 * pci_unmap_single() above.
103 */
104static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
105 int nents, int direction)
106{
107 if (direction == PCI_DMA_NONE)
108 BUG();
109
110 /* Nothing to do */
111}
112
113/* Make physical memory consistent for a single
114 * streaming mode DMA translation after a transfer.
115 *
116 * If you perform a pci_map_single() but wish to interrogate the
117 * buffer using the cpu, yet do not wish to teardown the PCI dma
118 * mapping, you must call this function before doing so. At the
119 * next point you give the PCI dma address back to the card, the
120 * device again owns the buffer.
121 */
122static inline void pci_dma_sync_single(struct pci_dev *hwdev,
123 dma_addr_t dma_handle, size_t size,
124 int direction)
125{
126 if (direction == PCI_DMA_NONE)
127 BUG();
128
129 /* Nothing to do */
130}
131
132/* Make physical memory consistent for a set of streaming
133 * mode DMA translations after a transfer.
134 *
135 * The same as pci_dma_sync_single but for a scatter-gather list,
136 * same rules and usage.
137 */
138static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
139 struct scatterlist *sg, int nelems,
140 int direction)
141{
142 if (direction == PCI_DMA_NONE)
143 BUG();
144
145 /* Nothing to do */
146}
147 21
148#endif /* _ASM_BFIN_PCI_H */ 22#endif /* _ASM_BFIN_PCI_H */
diff --git a/arch/blackfin/include/asm/ptrace.h b/arch/blackfin/include/asm/ptrace.h
index 27290c955a7a..b33a4488f498 100644
--- a/arch/blackfin/include/asm/ptrace.h
+++ b/arch/blackfin/include/asm/ptrace.h
@@ -89,9 +89,9 @@ struct pt_regs {
89#define PTRACE_GETREGS 12 89#define PTRACE_GETREGS 12
90#define PTRACE_SETREGS 13 /* ptrace signal */ 90#define PTRACE_SETREGS 13 /* ptrace signal */
91 91
92#define PTRACE_GETFDPIC 31 92#define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */
93#define PTRACE_GETFDPIC_EXEC 0 93#define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */
94#define PTRACE_GETFDPIC_INTERP 1 94#define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */
95 95
96#define PS_S (0x0002) 96#define PS_S (0x0002)
97 97
diff --git a/arch/blackfin/include/asm/sections.h b/arch/blackfin/include/asm/sections.h
index 1f5381fbb4a7..42f6c53c59c6 100644
--- a/arch/blackfin/include/asm/sections.h
+++ b/arch/blackfin/include/asm/sections.h
@@ -13,10 +13,18 @@ extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
13extern unsigned long _ramstart, _ramend, _rambase; 13extern unsigned long _ramstart, _ramend, _rambase;
14extern unsigned long memory_start, memory_end, physical_mem_end; 14extern unsigned long memory_start, memory_end, physical_mem_end;
15 15
16extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], 16/*
17 _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _sbss_b_l1[], _ebss_b_l1[], 17 * The weak markings on the lengths might seem weird, but this is required
18 _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[], 18 * in order to make gcc accept the fact that these may actually have a value
19 _ebss_l2[], _l2_lma_start[]; 19 * of 0 (since they aren't actually addresses, but sizes of sections).
20 */
21extern char _stext_l1[], _etext_l1[], _text_l1_lma[], __weak _text_l1_len[];
22extern char _sdata_l1[], _edata_l1[], _sbss_l1[], _ebss_l1[],
23 _data_l1_lma[], __weak _data_l1_len[];
24extern char _sdata_b_l1[], _edata_b_l1[], _sbss_b_l1[], _ebss_b_l1[],
25 _data_b_l1_lma[], __weak _data_b_l1_len[];
26extern char _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[],
27 _sbss_l2[], _ebss_l2[], _l2_lma[], __weak _l2_len[];
20 28
21#include <asm/mem_map.h> 29#include <asm/mem_map.h>
22 30
diff --git a/arch/blackfin/include/asm/spinlock.h b/arch/blackfin/include/asm/spinlock.h
index b0c7f0ee4b03..1942ccfedbe0 100644
--- a/arch/blackfin/include/asm/spinlock.h
+++ b/arch/blackfin/include/asm/spinlock.h
@@ -17,84 +17,84 @@ asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr);
17asmlinkage void __raw_spin_lock_asm(volatile int *ptr); 17asmlinkage void __raw_spin_lock_asm(volatile int *ptr);
18asmlinkage int __raw_spin_trylock_asm(volatile int *ptr); 18asmlinkage int __raw_spin_trylock_asm(volatile int *ptr);
19asmlinkage void __raw_spin_unlock_asm(volatile int *ptr); 19asmlinkage void __raw_spin_unlock_asm(volatile int *ptr);
20asmlinkage void __raw_read_lock_asm(volatile int *ptr); 20asmlinkage void arch_read_lock_asm(volatile int *ptr);
21asmlinkage int __raw_read_trylock_asm(volatile int *ptr); 21asmlinkage int arch_read_trylock_asm(volatile int *ptr);
22asmlinkage void __raw_read_unlock_asm(volatile int *ptr); 22asmlinkage void arch_read_unlock_asm(volatile int *ptr);
23asmlinkage void __raw_write_lock_asm(volatile int *ptr); 23asmlinkage void arch_write_lock_asm(volatile int *ptr);
24asmlinkage int __raw_write_trylock_asm(volatile int *ptr); 24asmlinkage int arch_write_trylock_asm(volatile int *ptr);
25asmlinkage void __raw_write_unlock_asm(volatile int *ptr); 25asmlinkage void arch_write_unlock_asm(volatile int *ptr);
26 26
27static inline int __raw_spin_is_locked(raw_spinlock_t *lock) 27static inline int arch_spin_is_locked(arch_spinlock_t *lock)
28{ 28{
29 return __raw_spin_is_locked_asm(&lock->lock); 29 return __raw_spin_is_locked_asm(&lock->lock);
30} 30}
31 31
32static inline void __raw_spin_lock(raw_spinlock_t *lock) 32static inline void arch_spin_lock(arch_spinlock_t *lock)
33{ 33{
34 __raw_spin_lock_asm(&lock->lock); 34 __raw_spin_lock_asm(&lock->lock);
35} 35}
36 36
37#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 37#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
38 38
39static inline int __raw_spin_trylock(raw_spinlock_t *lock) 39static inline int arch_spin_trylock(arch_spinlock_t *lock)
40{ 40{
41 return __raw_spin_trylock_asm(&lock->lock); 41 return __raw_spin_trylock_asm(&lock->lock);
42} 42}
43 43
44static inline void __raw_spin_unlock(raw_spinlock_t *lock) 44static inline void arch_spin_unlock(arch_spinlock_t *lock)
45{ 45{
46 __raw_spin_unlock_asm(&lock->lock); 46 __raw_spin_unlock_asm(&lock->lock);
47} 47}
48 48
49static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) 49static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
50{ 50{
51 while (__raw_spin_is_locked(lock)) 51 while (arch_spin_is_locked(lock))
52 cpu_relax(); 52 cpu_relax();
53} 53}
54 54
55static inline int __raw_read_can_lock(raw_rwlock_t *rw) 55static inline int arch_read_can_lock(arch_rwlock_t *rw)
56{ 56{
57 return __raw_uncached_fetch_asm(&rw->lock) > 0; 57 return __raw_uncached_fetch_asm(&rw->lock) > 0;
58} 58}
59 59
60static inline int __raw_write_can_lock(raw_rwlock_t *rw) 60static inline int arch_write_can_lock(arch_rwlock_t *rw)
61{ 61{
62 return __raw_uncached_fetch_asm(&rw->lock) == RW_LOCK_BIAS; 62 return __raw_uncached_fetch_asm(&rw->lock) == RW_LOCK_BIAS;
63} 63}
64 64
65static inline void __raw_read_lock(raw_rwlock_t *rw) 65static inline void arch_read_lock(arch_rwlock_t *rw)
66{ 66{
67 __raw_read_lock_asm(&rw->lock); 67 arch_read_lock_asm(&rw->lock);
68} 68}
69 69
70static inline int __raw_read_trylock(raw_rwlock_t *rw) 70static inline int arch_read_trylock(arch_rwlock_t *rw)
71{ 71{
72 return __raw_read_trylock_asm(&rw->lock); 72 return arch_read_trylock_asm(&rw->lock);
73} 73}
74 74
75static inline void __raw_read_unlock(raw_rwlock_t *rw) 75static inline void arch_read_unlock(arch_rwlock_t *rw)
76{ 76{
77 __raw_read_unlock_asm(&rw->lock); 77 arch_read_unlock_asm(&rw->lock);
78} 78}
79 79
80static inline void __raw_write_lock(raw_rwlock_t *rw) 80static inline void arch_write_lock(arch_rwlock_t *rw)
81{ 81{
82 __raw_write_lock_asm(&rw->lock); 82 arch_write_lock_asm(&rw->lock);
83} 83}
84 84
85static inline int __raw_write_trylock(raw_rwlock_t *rw) 85static inline int arch_write_trylock(arch_rwlock_t *rw)
86{ 86{
87 return __raw_write_trylock_asm(&rw->lock); 87 return arch_write_trylock_asm(&rw->lock);
88} 88}
89 89
90static inline void __raw_write_unlock(raw_rwlock_t *rw) 90static inline void arch_write_unlock(arch_rwlock_t *rw)
91{ 91{
92 __raw_write_unlock_asm(&rw->lock); 92 arch_write_unlock_asm(&rw->lock);
93} 93}
94 94
95#define _raw_spin_relax(lock) cpu_relax() 95#define arch_spin_relax(lock) cpu_relax()
96#define _raw_read_relax(lock) cpu_relax() 96#define arch_read_relax(lock) cpu_relax()
97#define _raw_write_relax(lock) cpu_relax() 97#define arch_write_relax(lock) cpu_relax()
98 98
99#endif 99#endif
100 100
diff --git a/arch/blackfin/include/asm/spinlock_types.h b/arch/blackfin/include/asm/spinlock_types.h
index be75762c0610..1a33608c958b 100644
--- a/arch/blackfin/include/asm/spinlock_types.h
+++ b/arch/blackfin/include/asm/spinlock_types.h
@@ -15,14 +15,14 @@
15 15
16typedef struct { 16typedef struct {
17 volatile unsigned int lock; 17 volatile unsigned int lock;
18} raw_spinlock_t; 18} arch_spinlock_t;
19 19
20#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 20#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
21 21
22typedef struct { 22typedef struct {
23 volatile unsigned int lock; 23 volatile unsigned int lock;
24} raw_rwlock_t; 24} arch_rwlock_t;
25 25
26#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 26#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
27 27
28#endif 28#endif
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h
index afb3a8626380..a40d9368c38a 100644
--- a/arch/blackfin/include/asm/thread_info.h
+++ b/arch/blackfin/include/asm/thread_info.h
@@ -103,11 +103,13 @@ static inline struct thread_info *current_thread_info(void)
103#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 103#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
104#define TIF_FREEZE 6 /* is freezing for suspend */ 104#define TIF_FREEZE 6 /* is freezing for suspend */
105#define TIF_IRQ_SYNC 7 /* sync pipeline stage */ 105#define TIF_IRQ_SYNC 7 /* sync pipeline stage */
106#define TIF_NOTIFY_RESUME 8 /* callback before returning to user */
106 107
107/* as above, but as bit values */ 108/* as above, but as bit values */
108#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 109#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
109#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 110#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
110#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 111#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
112#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
111#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 113#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
112#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 114#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
113#define _TIF_FREEZE (1<<TIF_FREEZE) 115#define _TIF_FREEZE (1<<TIF_FREEZE)
diff --git a/arch/blackfin/include/asm/trace.h b/arch/blackfin/include/asm/trace.h
index 609ad3c84189..dc0aa55ae773 100644
--- a/arch/blackfin/include/asm/trace.h
+++ b/arch/blackfin/include/asm/trace.h
@@ -28,6 +28,8 @@ extern unsigned long software_trace_buff[];
28 28
29#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON 29#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
30 30
31#define trace_buffer_init() bfin_write_TBUFCTL(BFIN_TRACE_INIT)
32
31#define trace_buffer_save(x) \ 33#define trace_buffer_save(x) \
32 do { \ 34 do { \
33 (x) = bfin_read_TBUFCTL(); \ 35 (x) = bfin_read_TBUFCTL(); \
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h
index c03b8532aad3..1c0d190adaef 100644
--- a/arch/blackfin/include/asm/uaccess.h
+++ b/arch/blackfin/include/asm/uaccess.h
@@ -17,9 +17,7 @@
17#include <linux/string.h> 17#include <linux/string.h>
18 18
19#include <asm/segment.h> 19#include <asm/segment.h>
20#ifdef CONFIG_ACCESS_CHECK 20#include <asm/sections.h>
21# include <asm/bfin-global.h>
22#endif
23 21
24#define get_ds() (KERNEL_DS) 22#define get_ds() (KERNEL_DS)
25#define get_fs() (current_thread_info()->addr_limit) 23#define get_fs() (current_thread_info()->addr_limit)
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h
index 779be02a910a..22886cbdae7a 100644
--- a/arch/blackfin/include/asm/unistd.h
+++ b/arch/blackfin/include/asm/unistd.h
@@ -388,8 +388,9 @@
388#define __NR_pwritev 367 388#define __NR_pwritev 367
389#define __NR_rt_tgsigqueueinfo 368 389#define __NR_rt_tgsigqueueinfo 368
390#define __NR_perf_event_open 369 390#define __NR_perf_event_open 369
391#define __NR_recvmmsg 370
391 392
392#define __NR_syscall 370 393#define __NR_syscall 371
393#define NR_syscalls __NR_syscall 394#define NR_syscalls __NR_syscall
394 395
395/* Old optional stuff no one actually uses */ 396/* Old optional stuff no one actually uses */
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 3946aff4f414..924c00286bab 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -37,9 +37,8 @@ static int __init blackfin_dma_init(void)
37 printk(KERN_INFO "Blackfin DMA Controller\n"); 37 printk(KERN_INFO "Blackfin DMA Controller\n");
38 38
39 for (i = 0; i < MAX_DMA_CHANNELS; i++) { 39 for (i = 0; i < MAX_DMA_CHANNELS; i++) {
40 dma_ch[i].chan_status = DMA_CHANNEL_FREE; 40 atomic_set(&dma_ch[i].chan_status, 0);
41 dma_ch[i].regs = dma_io_base_addr[i]; 41 dma_ch[i].regs = dma_io_base_addr[i];
42 mutex_init(&(dma_ch[i].dmalock));
43 } 42 }
44 /* Mark MEMDMA Channel 0 as requested since we're using it internally */ 43 /* Mark MEMDMA Channel 0 as requested since we're using it internally */
45 request_dma(CH_MEM_STREAM0_DEST, "Blackfin dma_memcpy"); 44 request_dma(CH_MEM_STREAM0_DEST, "Blackfin dma_memcpy");
@@ -60,7 +59,7 @@ static int proc_dma_show(struct seq_file *m, void *v)
60 int i; 59 int i;
61 60
62 for (i = 0; i < MAX_DMA_CHANNELS; ++i) 61 for (i = 0; i < MAX_DMA_CHANNELS; ++i)
63 if (dma_ch[i].chan_status != DMA_CHANNEL_FREE) 62 if (dma_channel_active(i))
64 seq_printf(m, "%2d: %s\n", i, dma_ch[i].device_id); 63 seq_printf(m, "%2d: %s\n", i, dma_ch[i].device_id);
65 64
66 return 0; 65 return 0;
@@ -107,20 +106,11 @@ int request_dma(unsigned int channel, const char *device_id)
107 } 106 }
108#endif 107#endif
109 108
110 mutex_lock(&(dma_ch[channel].dmalock)); 109 if (atomic_cmpxchg(&dma_ch[channel].chan_status, 0, 1)) {
111
112 if ((dma_ch[channel].chan_status == DMA_CHANNEL_REQUESTED)
113 || (dma_ch[channel].chan_status == DMA_CHANNEL_ENABLED)) {
114 mutex_unlock(&(dma_ch[channel].dmalock));
115 pr_debug("DMA CHANNEL IN USE \n"); 110 pr_debug("DMA CHANNEL IN USE \n");
116 return -EBUSY; 111 return -EBUSY;
117 } else {
118 dma_ch[channel].chan_status = DMA_CHANNEL_REQUESTED;
119 pr_debug("DMA CHANNEL IS ALLOCATED \n");
120 } 112 }
121 113
122 mutex_unlock(&(dma_ch[channel].dmalock));
123
124#ifdef CONFIG_BF54x 114#ifdef CONFIG_BF54x
125 if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) { 115 if (channel >= CH_UART2_RX && channel <= CH_UART3_TX) {
126 unsigned int per_map; 116 unsigned int per_map;
@@ -148,21 +138,20 @@ EXPORT_SYMBOL(request_dma);
148 138
149int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data) 139int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data)
150{ 140{
151 BUG_ON(channel >= MAX_DMA_CHANNELS || 141 int ret;
152 dma_ch[channel].chan_status == DMA_CHANNEL_FREE); 142 unsigned int irq;
153 143
154 if (callback != NULL) { 144 BUG_ON(channel >= MAX_DMA_CHANNELS || !callback ||
155 int ret; 145 !atomic_read(&dma_ch[channel].chan_status));
156 unsigned int irq = channel2irq(channel);
157 146
158 ret = request_irq(irq, callback, IRQF_DISABLED, 147 irq = channel2irq(channel);
159 dma_ch[channel].device_id, data); 148 ret = request_irq(irq, callback, 0, dma_ch[channel].device_id, data);
160 if (ret) 149 if (ret)
161 return ret; 150 return ret;
151
152 dma_ch[channel].irq = irq;
153 dma_ch[channel].data = data;
162 154
163 dma_ch[channel].irq = irq;
164 dma_ch[channel].data = data;
165 }
166 return 0; 155 return 0;
167} 156}
168EXPORT_SYMBOL(set_dma_callback); 157EXPORT_SYMBOL(set_dma_callback);
@@ -184,7 +173,7 @@ void free_dma(unsigned int channel)
184{ 173{
185 pr_debug("freedma() : BEGIN \n"); 174 pr_debug("freedma() : BEGIN \n");
186 BUG_ON(channel >= MAX_DMA_CHANNELS || 175 BUG_ON(channel >= MAX_DMA_CHANNELS ||
187 dma_ch[channel].chan_status == DMA_CHANNEL_FREE); 176 !atomic_read(&dma_ch[channel].chan_status));
188 177
189 /* Halt the DMA */ 178 /* Halt the DMA */
190 disable_dma(channel); 179 disable_dma(channel);
@@ -194,9 +183,7 @@ void free_dma(unsigned int channel)
194 free_irq(dma_ch[channel].irq, dma_ch[channel].data); 183 free_irq(dma_ch[channel].irq, dma_ch[channel].data);
195 184
196 /* Clear the DMA Variable in the Channel */ 185 /* Clear the DMA Variable in the Channel */
197 mutex_lock(&(dma_ch[channel].dmalock)); 186 atomic_set(&dma_ch[channel].chan_status, 0);
198 dma_ch[channel].chan_status = DMA_CHANNEL_FREE;
199 mutex_unlock(&(dma_ch[channel].dmalock));
200 187
201 pr_debug("freedma() : END \n"); 188 pr_debug("freedma() : END \n");
202} 189}
@@ -210,13 +197,14 @@ int blackfin_dma_suspend(void)
210{ 197{
211 int i; 198 int i;
212 199
213 for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i) { 200 for (i = 0; i < MAX_DMA_CHANNELS; ++i) {
214 if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) { 201 if (dma_ch[i].regs->cfg & DMAEN) {
215 printk(KERN_ERR "DMA Channel %d failed to suspend\n", i); 202 printk(KERN_ERR "DMA Channel %d failed to suspend\n", i);
216 return -EBUSY; 203 return -EBUSY;
217 } 204 }
218 205
219 dma_ch[i].saved_peripheral_map = dma_ch[i].regs->peripheral_map; 206 if (i < MAX_DMA_SUSPEND_CHANNELS)
207 dma_ch[i].saved_peripheral_map = dma_ch[i].regs->peripheral_map;
220 } 208 }
221 209
222 return 0; 210 return 0;
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 22705eeff34f..a174596cc009 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -100,6 +100,12 @@ u8 pmux_offset[][16] = {
100}; 100};
101# endif 101# endif
102 102
103#elif defined(BF538_FAMILY)
104static unsigned short * const port_fer[] = {
105 (unsigned short *) PORTCIO_FER,
106 (unsigned short *) PORTDIO_FER,
107 (unsigned short *) PORTEIO_FER,
108};
103#endif 109#endif
104 110
105static unsigned short reserved_gpio_map[GPIO_BANK_NUM]; 111static unsigned short reserved_gpio_map[GPIO_BANK_NUM];
@@ -163,6 +169,27 @@ static int cmp_label(unsigned short ident, const char *label)
163 169
164static void port_setup(unsigned gpio, unsigned short usage) 170static void port_setup(unsigned gpio, unsigned short usage)
165{ 171{
172#if defined(BF538_FAMILY)
173 /*
174 * BF538/9 Port C,D and E are special.
175 * Inverted PORT_FER polarity on CDE and no PORF_FER on F
176 * Regular PORT F GPIOs are handled here, CDE are exclusively
177 * managed by GPIOLIB
178 */
179
180 if (gpio < MAX_BLACKFIN_GPIOS || gpio >= MAX_RESOURCES)
181 return;
182
183 gpio -= MAX_BLACKFIN_GPIOS;
184
185 if (usage == GPIO_USAGE)
186 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio);
187 else
188 *port_fer[gpio_bank(gpio)] &= ~gpio_bit(gpio);
189 SSYNC();
190 return;
191#endif
192
166 if (check_gpio(gpio)) 193 if (check_gpio(gpio))
167 return; 194 return;
168 195
@@ -762,6 +789,8 @@ int peripheral_request(unsigned short per, const char *label)
762 if (!(per & P_DEFINED)) 789 if (!(per & P_DEFINED))
763 return -ENODEV; 790 return -ENODEV;
764 791
792 BUG_ON(ident >= MAX_RESOURCES);
793
765 local_irq_save_hw(flags); 794 local_irq_save_hw(flags);
766 795
767 /* If a pin can be muxed as either GPIO or peripheral, make 796 /* If a pin can be muxed as either GPIO or peripheral, make
@@ -979,6 +1008,76 @@ void bfin_gpio_free(unsigned gpio)
979} 1008}
980EXPORT_SYMBOL(bfin_gpio_free); 1009EXPORT_SYMBOL(bfin_gpio_free);
981 1010
1011#ifdef BFIN_SPECIAL_GPIO_BANKS
1012static unsigned short reserved_special_gpio_map[gpio_bank(MAX_RESOURCES)];
1013
1014int bfin_special_gpio_request(unsigned gpio, const char *label)
1015{
1016 unsigned long flags;
1017
1018 local_irq_save_hw(flags);
1019
1020 /*
1021 * Allow that the identical GPIO can
1022 * be requested from the same driver twice
1023 * Do nothing and return -
1024 */
1025
1026 if (cmp_label(gpio, label) == 0) {
1027 local_irq_restore_hw(flags);
1028 return 0;
1029 }
1030
1031 if (unlikely(reserved_special_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
1032 local_irq_restore_hw(flags);
1033 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
1034 gpio, get_label(gpio));
1035
1036 return -EBUSY;
1037 }
1038 if (unlikely(reserved_peri_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
1039 local_irq_restore_hw(flags);
1040 printk(KERN_ERR
1041 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
1042 gpio, get_label(gpio));
1043
1044 return -EBUSY;
1045 }
1046
1047 reserved_special_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
1048 reserved_peri_map[gpio_bank(gpio)] |= gpio_bit(gpio);
1049
1050 set_label(gpio, label);
1051 local_irq_restore_hw(flags);
1052 port_setup(gpio, GPIO_USAGE);
1053
1054 return 0;
1055}
1056EXPORT_SYMBOL(bfin_special_gpio_request);
1057
1058void bfin_special_gpio_free(unsigned gpio)
1059{
1060 unsigned long flags;
1061
1062 might_sleep();
1063
1064 local_irq_save_hw(flags);
1065
1066 if (unlikely(!(reserved_special_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) {
1067 gpio_error(gpio);
1068 local_irq_restore_hw(flags);
1069 return;
1070 }
1071
1072 reserved_special_gpio_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
1073 reserved_peri_map[gpio_bank(gpio)] &= ~gpio_bit(gpio);
1074 set_label(gpio, "free");
1075 local_irq_restore_hw(flags);
1076}
1077EXPORT_SYMBOL(bfin_special_gpio_free);
1078#endif
1079
1080
982int bfin_gpio_irq_request(unsigned gpio, const char *label) 1081int bfin_gpio_irq_request(unsigned gpio, const char *label)
983{ 1082{
984 unsigned long flags; 1083 unsigned long flags;
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbinit.c b/arch/blackfin/kernel/cplb-mpu/cplbinit.c
index b52c1f8c4bc0..8d42b9e50dfa 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbinit.c
@@ -92,6 +92,6 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
92 icplb_tbl[cpu][i_i++].data = 0; 92 icplb_tbl[cpu][i_i++].data = 0;
93} 93}
94 94
95void generate_cplb_tables_all(void) 95void __init generate_cplb_tables_all(void)
96{ 96{
97} 97}
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
index 69e0e530d70f..930c01c06813 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
@@ -113,11 +113,11 @@ static noinline int dcplb_miss(unsigned int cpu)
113 addr = L2_START; 113 addr = L2_START;
114 d_data = L2_DMEMORY; 114 d_data = L2_DMEMORY;
115 } else if (addr >= physical_mem_end) { 115 } else if (addr >= physical_mem_end) {
116 if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE 116 if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE) {
117 && (status & FAULT_USERSUPV)) { 117 addr &= ~(4 * 1024 * 1024 - 1);
118 addr &= ~0x3fffff;
119 d_data &= ~PAGE_SIZE_4KB; 118 d_data &= ~PAGE_SIZE_4KB;
120 d_data |= PAGE_SIZE_4MB; 119 d_data |= PAGE_SIZE_4MB;
120 d_data |= CPLB_USER_RD | CPLB_USER_WR;
121 } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH 121 } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
122 && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) { 122 && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) {
123 addr &= ~(1 * 1024 * 1024 - 1); 123 addr &= ~(1 * 1024 * 1024 - 1);
@@ -203,7 +203,12 @@ static noinline int icplb_miss(unsigned int cpu)
203 addr = L2_START; 203 addr = L2_START;
204 i_data = L2_IMEMORY; 204 i_data = L2_IMEMORY;
205 } else if (addr >= physical_mem_end) { 205 } else if (addr >= physical_mem_end) {
206 if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH 206 if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE) {
207 addr &= ~(4 * 1024 * 1024 - 1);
208 i_data &= ~PAGE_SIZE_4KB;
209 i_data |= PAGE_SIZE_4MB;
210 i_data |= CPLB_USER_RD;
211 } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
207 && (status & FAULT_USERSUPV)) { 212 && (status & FAULT_USERSUPV)) {
208 addr &= ~(1 * 1024 * 1024 - 1); 213 addr &= ~(1 * 1024 * 1024 - 1);
209 i_data &= ~PAGE_SIZE_4KB; 214 i_data &= ~PAGE_SIZE_4KB;
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index fd9a2f31e686..282a7919821b 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -89,15 +89,25 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
89 89
90void __init generate_cplb_tables_all(void) 90void __init generate_cplb_tables_all(void)
91{ 91{
92 unsigned long uncached_end;
92 int i_d, i_i; 93 int i_d, i_i;
93 94
94 i_d = 0; 95 i_d = 0;
95 /* Normal RAM, including MTD FS. */ 96 /* Normal RAM, including MTD FS. */
96#ifdef CONFIG_MTD_UCLINUX 97#ifdef CONFIG_MTD_UCLINUX
97 dcplb_bounds[i_d].eaddr = memory_mtd_start + mtd_size; 98 uncached_end = memory_mtd_start + mtd_size;
98#else 99#else
99 dcplb_bounds[i_d].eaddr = memory_end; 100 uncached_end = memory_end;
100#endif 101#endif
102 /*
103 * if DMA uncached is less than 1MB, mark the 1MB chunk as uncached
104 * so that we don't have to use 4kB pages and cause CPLB thrashing
105 */
106 if ((DMA_UNCACHED_REGION >= 1 * 1024 * 1024) || !DMA_UNCACHED_REGION ||
107 ((_ramend - uncached_end) >= 1 * 1024 * 1024))
108 dcplb_bounds[i_d].eaddr = uncached_end;
109 else
110 dcplb_bounds[i_d].eaddr = uncached_end & ~(1 * 1024 * 1024);
101 dcplb_bounds[i_d++].data = SDRAM_DGENERIC; 111 dcplb_bounds[i_d++].data = SDRAM_DGENERIC;
102 /* DMA uncached region. */ 112 /* DMA uncached region. */
103 if (DMA_UNCACHED_REGION) { 113 if (DMA_UNCACHED_REGION) {
@@ -135,18 +145,15 @@ void __init generate_cplb_tables_all(void)
135 145
136 i_i = 0; 146 i_i = 0;
137 /* Normal RAM, including MTD FS. */ 147 /* Normal RAM, including MTD FS. */
138#ifdef CONFIG_MTD_UCLINUX 148 icplb_bounds[i_i].eaddr = uncached_end;
139 icplb_bounds[i_i].eaddr = memory_mtd_start + mtd_size;
140#else
141 icplb_bounds[i_i].eaddr = memory_end;
142#endif
143 icplb_bounds[i_i++].data = SDRAM_IGENERIC; 149 icplb_bounds[i_i++].data = SDRAM_IGENERIC;
144 /* DMA uncached region. */
145 if (DMA_UNCACHED_REGION) {
146 icplb_bounds[i_i].eaddr = _ramend;
147 icplb_bounds[i_i++].data = 0;
148 }
149 if (_ramend != physical_mem_end) { 150 if (_ramend != physical_mem_end) {
151 /* DMA uncached region. */
152 if (DMA_UNCACHED_REGION) {
153 /* Normally this hole is caught by the async below. */
154 icplb_bounds[i_i].eaddr = _ramend;
155 icplb_bounds[i_i++].data = 0;
156 }
150 /* Reserved memory. */ 157 /* Reserved memory. */
151 icplb_bounds[i_i].eaddr = physical_mem_end; 158 icplb_bounds[i_i].eaddr = physical_mem_end;
152 icplb_bounds[i_i++].data = (reserved_mem_icache_on ? 159 icplb_bounds[i_i++].data = (reserved_mem_icache_on ?
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index e74e74d7733f..e937f323d82c 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -7,30 +7,25 @@
7 */ 7 */
8 8
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/mm.h> 10#include <linux/gfp.h>
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/bootmem.h>
13#include <linux/spinlock.h> 12#include <linux/spinlock.h>
14#include <linux/device.h>
15#include <linux/dma-mapping.h> 13#include <linux/dma-mapping.h>
16#include <linux/io.h>
17#include <linux/scatterlist.h> 14#include <linux/scatterlist.h>
18#include <asm/cacheflush.h>
19#include <asm/bfin-global.h>
20 15
21static spinlock_t dma_page_lock; 16static spinlock_t dma_page_lock;
22static unsigned int *dma_page; 17static unsigned long *dma_page;
23static unsigned int dma_pages; 18static unsigned int dma_pages;
24static unsigned long dma_base; 19static unsigned long dma_base;
25static unsigned long dma_size; 20static unsigned long dma_size;
26static unsigned int dma_initialized; 21static unsigned int dma_initialized;
27 22
28void dma_alloc_init(unsigned long start, unsigned long end) 23static void dma_alloc_init(unsigned long start, unsigned long end)
29{ 24{
30 spin_lock_init(&dma_page_lock); 25 spin_lock_init(&dma_page_lock);
31 dma_initialized = 0; 26 dma_initialized = 0;
32 27
33 dma_page = (unsigned int *)__get_free_page(GFP_KERNEL); 28 dma_page = (unsigned long *)__get_free_page(GFP_KERNEL);
34 memset(dma_page, 0, PAGE_SIZE); 29 memset(dma_page, 0, PAGE_SIZE);
35 dma_base = PAGE_ALIGN(start); 30 dma_base = PAGE_ALIGN(start);
36 dma_size = PAGE_ALIGN(end) - PAGE_ALIGN(start); 31 dma_size = PAGE_ALIGN(end) - PAGE_ALIGN(start);
@@ -58,10 +53,11 @@ static unsigned long __alloc_dma_pages(unsigned int pages)
58 spin_lock_irqsave(&dma_page_lock, flags); 53 spin_lock_irqsave(&dma_page_lock, flags);
59 54
60 for (i = 0; i < dma_pages;) { 55 for (i = 0; i < dma_pages;) {
61 if (dma_page[i++] == 0) { 56 if (test_bit(i++, dma_page) == 0) {
62 if (++count == pages) { 57 if (++count == pages) {
63 while (count--) 58 while (count--)
64 dma_page[--i] = 1; 59 __set_bit(--i, dma_page);
60
65 ret = dma_base + (i << PAGE_SHIFT); 61 ret = dma_base + (i << PAGE_SHIFT);
66 break; 62 break;
67 } 63 }
@@ -84,14 +80,14 @@ static void __free_dma_pages(unsigned long addr, unsigned int pages)
84 } 80 }
85 81
86 spin_lock_irqsave(&dma_page_lock, flags); 82 spin_lock_irqsave(&dma_page_lock, flags);
87 for (i = page; i < page + pages; i++) { 83 for (i = page; i < page + pages; i++)
88 dma_page[i] = 0; 84 __clear_bit(i, dma_page);
89 } 85
90 spin_unlock_irqrestore(&dma_page_lock, flags); 86 spin_unlock_irqrestore(&dma_page_lock, flags);
91} 87}
92 88
93void *dma_alloc_coherent(struct device *dev, size_t size, 89void *dma_alloc_coherent(struct device *dev, size_t size,
94 dma_addr_t * dma_handle, gfp_t gfp) 90 dma_addr_t *dma_handle, gfp_t gfp)
95{ 91{
96 void *ret; 92 void *ret;
97 93
@@ -115,21 +111,14 @@ dma_free_coherent(struct device *dev, size_t size, void *vaddr,
115EXPORT_SYMBOL(dma_free_coherent); 111EXPORT_SYMBOL(dma_free_coherent);
116 112
117/* 113/*
118 * Dummy functions defined for some existing drivers 114 * Streaming DMA mappings
119 */ 115 */
120 116void __dma_sync(dma_addr_t addr, size_t size,
121dma_addr_t 117 enum dma_data_direction dir)
122dma_map_single(struct device *dev, void *ptr, size_t size,
123 enum dma_data_direction direction)
124{ 118{
125 BUG_ON(direction == DMA_NONE); 119 _dma_sync(addr, size, dir);
126
127 invalidate_dcache_range((unsigned long)ptr,
128 (unsigned long)ptr + size);
129
130 return (dma_addr_t) ptr;
131} 120}
132EXPORT_SYMBOL(dma_map_single); 121EXPORT_SYMBOL(__dma_sync);
133 122
134int 123int
135dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, 124dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
@@ -137,30 +126,23 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
137{ 126{
138 int i; 127 int i;
139 128
140 BUG_ON(direction == DMA_NONE);
141
142 for (i = 0; i < nents; i++, sg++) { 129 for (i = 0; i < nents; i++, sg++) {
143 sg->dma_address = (dma_addr_t) sg_virt(sg); 130 sg->dma_address = (dma_addr_t) sg_virt(sg);
144 131 __dma_sync(sg_dma_address(sg), sg_dma_len(sg), direction);
145 invalidate_dcache_range(sg_dma_address(sg),
146 sg_dma_address(sg) +
147 sg_dma_len(sg));
148 } 132 }
149 133
150 return nents; 134 return nents;
151} 135}
152EXPORT_SYMBOL(dma_map_sg); 136EXPORT_SYMBOL(dma_map_sg);
153 137
154void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 138void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
155 enum dma_data_direction direction) 139 int nelems, enum dma_data_direction direction)
156{ 140{
157 BUG_ON(direction == DMA_NONE); 141 int i;
158}
159EXPORT_SYMBOL(dma_unmap_single);
160 142
161void dma_unmap_sg(struct device *dev, struct scatterlist *sg, 143 for (i = 0; i < nelems; i++, sg++) {
162 int nhwentries, enum dma_data_direction direction) 144 sg->dma_address = (dma_addr_t) sg_virt(sg);
163{ 145 __dma_sync(sg_dma_address(sg), sg_dma_len(sg), direction);
164 BUG_ON(direction == DMA_NONE); 146 }
165} 147}
166EXPORT_SYMBOL(dma_unmap_sg); 148EXPORT_SYMBOL(dma_sync_sg_for_device);
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c
index 7281a91d26b5..cdbe075de1dc 100644
--- a/arch/blackfin/kernel/gptimers.c
+++ b/arch/blackfin/kernel/gptimers.c
@@ -137,7 +137,7 @@ static uint32_t const timil_mask[MAX_BLACKFIN_GPTIMERS] =
137#endif 137#endif
138}; 138};
139 139
140void set_gptimer_pwidth(int timer_id, uint32_t value) 140void set_gptimer_pwidth(unsigned int timer_id, uint32_t value)
141{ 141{
142 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 142 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
143 timer_regs[timer_id]->width = value; 143 timer_regs[timer_id]->width = value;
@@ -145,14 +145,14 @@ void set_gptimer_pwidth(int timer_id, uint32_t value)
145} 145}
146EXPORT_SYMBOL(set_gptimer_pwidth); 146EXPORT_SYMBOL(set_gptimer_pwidth);
147 147
148uint32_t get_gptimer_pwidth(int timer_id) 148uint32_t get_gptimer_pwidth(unsigned int timer_id)
149{ 149{
150 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 150 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
151 return timer_regs[timer_id]->width; 151 return timer_regs[timer_id]->width;
152} 152}
153EXPORT_SYMBOL(get_gptimer_pwidth); 153EXPORT_SYMBOL(get_gptimer_pwidth);
154 154
155void set_gptimer_period(int timer_id, uint32_t period) 155void set_gptimer_period(unsigned int timer_id, uint32_t period)
156{ 156{
157 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 157 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
158 timer_regs[timer_id]->period = period; 158 timer_regs[timer_id]->period = period;
@@ -160,28 +160,28 @@ void set_gptimer_period(int timer_id, uint32_t period)
160} 160}
161EXPORT_SYMBOL(set_gptimer_period); 161EXPORT_SYMBOL(set_gptimer_period);
162 162
163uint32_t get_gptimer_period(int timer_id) 163uint32_t get_gptimer_period(unsigned int timer_id)
164{ 164{
165 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 165 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
166 return timer_regs[timer_id]->period; 166 return timer_regs[timer_id]->period;
167} 167}
168EXPORT_SYMBOL(get_gptimer_period); 168EXPORT_SYMBOL(get_gptimer_period);
169 169
170uint32_t get_gptimer_count(int timer_id) 170uint32_t get_gptimer_count(unsigned int timer_id)
171{ 171{
172 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 172 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
173 return timer_regs[timer_id]->counter; 173 return timer_regs[timer_id]->counter;
174} 174}
175EXPORT_SYMBOL(get_gptimer_count); 175EXPORT_SYMBOL(get_gptimer_count);
176 176
177uint32_t get_gptimer_status(int group) 177uint32_t get_gptimer_status(unsigned int group)
178{ 178{
179 tassert(group < BFIN_TIMER_NUM_GROUP); 179 tassert(group < BFIN_TIMER_NUM_GROUP);
180 return group_regs[group]->status; 180 return group_regs[group]->status;
181} 181}
182EXPORT_SYMBOL(get_gptimer_status); 182EXPORT_SYMBOL(get_gptimer_status);
183 183
184void set_gptimer_status(int group, uint32_t value) 184void set_gptimer_status(unsigned int group, uint32_t value)
185{ 185{
186 tassert(group < BFIN_TIMER_NUM_GROUP); 186 tassert(group < BFIN_TIMER_NUM_GROUP);
187 group_regs[group]->status = value; 187 group_regs[group]->status = value;
@@ -189,42 +189,42 @@ void set_gptimer_status(int group, uint32_t value)
189} 189}
190EXPORT_SYMBOL(set_gptimer_status); 190EXPORT_SYMBOL(set_gptimer_status);
191 191
192int get_gptimer_intr(int timer_id) 192int get_gptimer_intr(unsigned int timer_id)
193{ 193{
194 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 194 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
195 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]); 195 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]);
196} 196}
197EXPORT_SYMBOL(get_gptimer_intr); 197EXPORT_SYMBOL(get_gptimer_intr);
198 198
199void clear_gptimer_intr(int timer_id) 199void clear_gptimer_intr(unsigned int timer_id)
200{ 200{
201 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 201 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
202 group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id]; 202 group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id];
203} 203}
204EXPORT_SYMBOL(clear_gptimer_intr); 204EXPORT_SYMBOL(clear_gptimer_intr);
205 205
206int get_gptimer_over(int timer_id) 206int get_gptimer_over(unsigned int timer_id)
207{ 207{
208 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 208 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
209 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]); 209 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]);
210} 210}
211EXPORT_SYMBOL(get_gptimer_over); 211EXPORT_SYMBOL(get_gptimer_over);
212 212
213void clear_gptimer_over(int timer_id) 213void clear_gptimer_over(unsigned int timer_id)
214{ 214{
215 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 215 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
216 group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id]; 216 group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id];
217} 217}
218EXPORT_SYMBOL(clear_gptimer_over); 218EXPORT_SYMBOL(clear_gptimer_over);
219 219
220int get_gptimer_run(int timer_id) 220int get_gptimer_run(unsigned int timer_id)
221{ 221{
222 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 222 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
223 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & trun_mask[timer_id]); 223 return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & trun_mask[timer_id]);
224} 224}
225EXPORT_SYMBOL(get_gptimer_run); 225EXPORT_SYMBOL(get_gptimer_run);
226 226
227void set_gptimer_config(int timer_id, uint16_t config) 227void set_gptimer_config(unsigned int timer_id, uint16_t config)
228{ 228{
229 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 229 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
230 timer_regs[timer_id]->config = config; 230 timer_regs[timer_id]->config = config;
@@ -232,7 +232,7 @@ void set_gptimer_config(int timer_id, uint16_t config)
232} 232}
233EXPORT_SYMBOL(set_gptimer_config); 233EXPORT_SYMBOL(set_gptimer_config);
234 234
235uint16_t get_gptimer_config(int timer_id) 235uint16_t get_gptimer_config(unsigned int timer_id)
236{ 236{
237 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 237 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
238 return timer_regs[timer_id]->config; 238 return timer_regs[timer_id]->config;
@@ -280,7 +280,7 @@ void disable_gptimers_sync(uint16_t mask)
280} 280}
281EXPORT_SYMBOL(disable_gptimers_sync); 281EXPORT_SYMBOL(disable_gptimers_sync);
282 282
283void set_gptimer_pulse_hi(int timer_id) 283void set_gptimer_pulse_hi(unsigned int timer_id)
284{ 284{
285 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 285 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
286 timer_regs[timer_id]->config |= TIMER_PULSE_HI; 286 timer_regs[timer_id]->config |= TIMER_PULSE_HI;
@@ -288,7 +288,7 @@ void set_gptimer_pulse_hi(int timer_id)
288} 288}
289EXPORT_SYMBOL(set_gptimer_pulse_hi); 289EXPORT_SYMBOL(set_gptimer_pulse_hi);
290 290
291void clear_gptimer_pulse_hi(int timer_id) 291void clear_gptimer_pulse_hi(unsigned int timer_id)
292{ 292{
293 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 293 tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
294 timer_regs[timer_id]->config &= ~TIMER_PULSE_HI; 294 timer_regs[timer_id]->config &= ~TIMER_PULSE_HI;
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index 5d7382396dc0..a77307a4473b 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -335,3 +335,70 @@ void __ipipe_enable_root_irqs_hw(void)
335 __clear_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status)); 335 __clear_bit(IPIPE_STALL_FLAG, &ipipe_root_cpudom_var(status));
336 bfin_sti(bfin_irq_flags); 336 bfin_sti(bfin_irq_flags);
337} 337}
338
339/*
340 * We could use standard atomic bitops in the following root status
341 * manipulation routines, but let's prepare for SMP support in the
342 * same move, preventing CPU migration as required.
343 */
344void __ipipe_stall_root(void)
345{
346 unsigned long *p, flags;
347
348 local_irq_save_hw(flags);
349 p = &__ipipe_root_status;
350 __set_bit(IPIPE_STALL_FLAG, p);
351 local_irq_restore_hw(flags);
352}
353EXPORT_SYMBOL(__ipipe_stall_root);
354
355unsigned long __ipipe_test_and_stall_root(void)
356{
357 unsigned long *p, flags;
358 int x;
359
360 local_irq_save_hw(flags);
361 p = &__ipipe_root_status;
362 x = __test_and_set_bit(IPIPE_STALL_FLAG, p);
363 local_irq_restore_hw(flags);
364
365 return x;
366}
367EXPORT_SYMBOL(__ipipe_test_and_stall_root);
368
369unsigned long __ipipe_test_root(void)
370{
371 const unsigned long *p;
372 unsigned long flags;
373 int x;
374
375 local_irq_save_hw_smp(flags);
376 p = &__ipipe_root_status;
377 x = test_bit(IPIPE_STALL_FLAG, p);
378 local_irq_restore_hw_smp(flags);
379
380 return x;
381}
382EXPORT_SYMBOL(__ipipe_test_root);
383
384void __ipipe_lock_root(void)
385{
386 unsigned long *p, flags;
387
388 local_irq_save_hw(flags);
389 p = &__ipipe_root_status;
390 __set_bit(IPIPE_SYNCDEFER_FLAG, p);
391 local_irq_restore_hw(flags);
392}
393EXPORT_SYMBOL(__ipipe_lock_root);
394
395void __ipipe_unlock_root(void)
396{
397 unsigned long *p, flags;
398
399 local_irq_save_hw(flags);
400 p = &__ipipe_root_status;
401 __clear_bit(IPIPE_SYNCDEFER_FLAG, p);
402 local_irq_restore_hw(flags);
403}
404EXPORT_SYMBOL(__ipipe_unlock_root);
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index db9f9c91f11f..64cff54a8a58 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -23,7 +23,7 @@ void ack_bad_irq(unsigned int irq)
23 23
24static struct irq_desc bad_irq_desc = { 24static struct irq_desc bad_irq_desc = {
25 .handle_irq = handle_bad_irq, 25 .handle_irq = handle_bad_irq,
26 .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock), 26 .lock = __RAW_SPIN_LOCK_UNLOCKED(bad_irq_desc.lock),
27}; 27};
28 28
29#ifdef CONFIG_CPUMASK_OFFSTACK 29#ifdef CONFIG_CPUMASK_OFFSTACK
@@ -39,7 +39,7 @@ int show_interrupts(struct seq_file *p, void *v)
39 unsigned long flags; 39 unsigned long flags;
40 40
41 if (i < NR_IRQS) { 41 if (i < NR_IRQS) {
42 spin_lock_irqsave(&irq_desc[i].lock, flags); 42 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
43 action = irq_desc[i].action; 43 action = irq_desc[i].action;
44 if (!action) 44 if (!action)
45 goto skip; 45 goto skip;
@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
53 53
54 seq_putc(p, '\n'); 54 seq_putc(p, '\n');
55 skip: 55 skip:
56 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 56 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
57 } else if (i == NR_IRQS) { 57 } else if (i == NR_IRQS) {
58 seq_printf(p, "NMI: "); 58 seq_printf(p, "NMI: ");
59 for_each_online_cpu(j) 59 for_each_online_cpu(j)
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
index cce79d05b90b..f1036b6b9293 100644
--- a/arch/blackfin/kernel/kgdb.c
+++ b/arch/blackfin/kernel/kgdb.c
@@ -24,16 +24,6 @@
24#include <asm/blackfin.h> 24#include <asm/blackfin.h>
25#include <asm/dma.h> 25#include <asm/dma.h>
26 26
27/* Put the error code here just in case the user cares. */
28int gdb_bfin_errcode;
29/* Likewise, the vector number here (since GDB only gets the signal
30 number through the usual means, and that's not very specific). */
31int gdb_bfin_vector = -1;
32
33#if KGDB_MAX_NO_CPUS != 8
34#error change the definition of slavecpulocks
35#endif
36
37void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) 27void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
38{ 28{
39 gdb_regs[BFIN_R0] = regs->r0; 29 gdb_regs[BFIN_R0] = regs->r0;
@@ -369,13 +359,6 @@ void kgdb_roundup_cpu(int cpu, unsigned long flags)
369} 359}
370#endif 360#endif
371 361
372void kgdb_post_primary_code(struct pt_regs *regs, int eVector, int err_code)
373{
374 /* Master processor is completely in the debugger */
375 gdb_bfin_vector = eVector;
376 gdb_bfin_errcode = err_code;
377}
378
379int kgdb_arch_handle_exception(int vector, int signo, 362int kgdb_arch_handle_exception(int vector, int signo,
380 int err_code, char *remcom_in_buffer, 363 int err_code, char *remcom_in_buffer,
381 char *remcom_out_buffer, 364 char *remcom_out_buffer,
diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c
index 59fc42dc5d6a..9a4b07594389 100644
--- a/arch/blackfin/kernel/kgdb_test.c
+++ b/arch/blackfin/kernel/kgdb_test.c
@@ -17,8 +17,9 @@
17 17
18#include <asm/blackfin.h> 18#include <asm/blackfin.h>
19 19
20/* Symbols are here for kgdb test to poke directly */
20static char cmdline[256]; 21static char cmdline[256];
21static unsigned long len; 22static size_t len;
22 23
23#ifndef CONFIG_SMP 24#ifndef CONFIG_SMP
24static int num1 __attribute__((l1_data)); 25static int num1 __attribute__((l1_data));
@@ -27,11 +28,10 @@ void kgdb_l1_test(void) __attribute__((l1_text));
27 28
28void kgdb_l1_test(void) 29void kgdb_l1_test(void)
29{ 30{
30 printk(KERN_ALERT "L1(before change) : data variable addr = 0x%p, data value is %d\n", &num1, num1); 31 pr_alert("L1(before change) : data variable addr = 0x%p, data value is %d\n", &num1, num1);
31 printk(KERN_ALERT "L1 : code function addr = 0x%p\n", kgdb_l1_test); 32 pr_alert("L1 : code function addr = 0x%p\n", kgdb_l1_test);
32 num1 = num1 + 10 ; 33 num1 = num1 + 10;
33 printk(KERN_ALERT "L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1); 34 pr_alert("L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1);
34 return ;
35} 35}
36#endif 36#endif
37 37
@@ -42,11 +42,10 @@ void kgdb_l2_test(void) __attribute__((l2));
42 42
43void kgdb_l2_test(void) 43void kgdb_l2_test(void)
44{ 44{
45 printk(KERN_ALERT "L2(before change) : data variable addr = 0x%p, data value is %d\n", &num2, num2); 45 pr_alert("L2(before change) : data variable addr = 0x%p, data value is %d\n", &num2, num2);
46 printk(KERN_ALERT "L2 : code function addr = 0x%p\n", kgdb_l2_test); 46 pr_alert("L2 : code function addr = 0x%p\n", kgdb_l2_test);
47 num2 = num2 + 20 ; 47 num2 = num2 + 20;
48 printk(KERN_ALERT "L2(after change) : data variable addr = 0x%p, data value is %d\n", &num2, num2); 48 pr_alert("L2(after change) : data variable addr = 0x%p, data value is %d\n", &num2, num2);
49 return ;
50} 49}
51 50
52#endif 51#endif
@@ -54,12 +53,14 @@ void kgdb_l2_test(void)
54 53
55int kgdb_test(char *name, int len, int count, int z) 54int kgdb_test(char *name, int len, int count, int z)
56{ 55{
57 printk(KERN_ALERT "kgdb name(%d): %s, %d, %d\n", len, name, count, z); 56 pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);
58 count = z; 57 count = z;
59 return count; 58 return count;
60} 59}
61 60
62static int test_proc_output(char *buf) 61static ssize_t
62kgdb_test_proc_read(struct file *file, char __user *buf,
63 size_t count, loff_t *ppos)
63{ 64{
64 kgdb_test("hello world!", 12, 0x55, 0x10); 65 kgdb_test("hello world!", 12, 0x55, 0x10);
65#ifndef CONFIG_SMP 66#ifndef CONFIG_SMP
@@ -72,49 +73,31 @@ static int test_proc_output(char *buf)
72 return 0; 73 return 0;
73} 74}
74 75
75static int test_read_proc(char *page, char **start, off_t off, 76static ssize_t
76 int count, int *eof, void *data) 77kgdb_test_proc_write(struct file *file, const char __user *buffer,
78 size_t count, loff_t *pos)
77{ 79{
78 int len; 80 len = min_t(size_t, 255, count);
79
80 len = test_proc_output(page);
81 if (len <= off+count)
82 *eof = 1;
83 *start = page + off;
84 len -= off;
85 if (len > count)
86 len = count;
87 if (len < 0)
88 len = 0;
89 return len;
90}
91
92static int test_write_proc(struct file *file, const char *buffer,
93 unsigned long count, void *data)
94{
95 if (count >= 256)
96 len = 255;
97 else
98 len = count;
99
100 memcpy(cmdline, buffer, count); 81 memcpy(cmdline, buffer, count);
101 cmdline[len] = 0; 82 cmdline[len] = 0;
102 83
103 return len; 84 return len;
104} 85}
105 86
87static const struct file_operations kgdb_test_proc_fops = {
88 .owner = THIS_MODULE,
89 .read = kgdb_test_proc_read,
90 .write = kgdb_test_proc_write,
91};
92
106static int __init kgdbtest_init(void) 93static int __init kgdbtest_init(void)
107{ 94{
108 struct proc_dir_entry *entry; 95 struct proc_dir_entry *entry;
109 96
110 entry = create_proc_entry("kgdbtest", 0, NULL); 97 entry = proc_create("kgdbtest", 0, NULL, &kgdb_test_proc_fops);
111 if (entry == NULL) 98 if (entry == NULL)
112 return -ENOMEM; 99 return -ENOMEM;
113 100
114 entry->read_proc = test_read_proc;
115 entry->write_proc = test_write_proc;
116 entry->data = NULL;
117
118 return 0; 101 return 0;
119} 102}
120 103
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 5cc7e2e9e415..b56b0e485e0b 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
215/* 215/*
216 * sys_execve() executes a new program. 216 * sys_execve() executes a new program.
217 */ 217 */
218
219asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) 218asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
220{ 219{
221 int error; 220 int error;
222 char *filename; 221 char *filename;
223 struct pt_regs *regs = (struct pt_regs *)((&name) + 6); 222 struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
224 223
225 lock_kernel();
226 filename = getname(name); 224 filename = getname(name);
227 error = PTR_ERR(filename); 225 error = PTR_ERR(filename);
228 if (IS_ERR(filename)) 226 if (IS_ERR(filename))
229 goto out; 227 return error;
230 error = do_execve(filename, argv, envp, regs); 228 error = do_execve(filename, argv, envp, regs);
231 putname(filename); 229 putname(filename);
232 out:
233 unlock_kernel();
234 return error; 230 return error;
235} 231}
236 232
@@ -262,9 +258,12 @@ void finish_atomic_sections (struct pt_regs *regs)
262 int __user *up0 = (int __user *)regs->p0; 258 int __user *up0 = (int __user *)regs->p0;
263 259
264 switch (regs->pc) { 260 switch (regs->pc) {
261 default:
262 /* not in middle of an atomic step, so resume like normal */
263 return;
264
265 case ATOMIC_XCHG32 + 2: 265 case ATOMIC_XCHG32 + 2:
266 put_user(regs->r1, up0); 266 put_user(regs->r1, up0);
267 regs->pc = ATOMIC_XCHG32 + 4;
268 break; 267 break;
269 268
270 case ATOMIC_CAS32 + 2: 269 case ATOMIC_CAS32 + 2:
@@ -272,7 +271,6 @@ void finish_atomic_sections (struct pt_regs *regs)
272 if (regs->r0 == regs->r1) 271 if (regs->r0 == regs->r1)
273 case ATOMIC_CAS32 + 6: 272 case ATOMIC_CAS32 + 6:
274 put_user(regs->r2, up0); 273 put_user(regs->r2, up0);
275 regs->pc = ATOMIC_CAS32 + 8;
276 break; 274 break;
277 275
278 case ATOMIC_ADD32 + 2: 276 case ATOMIC_ADD32 + 2:
@@ -280,7 +278,6 @@ void finish_atomic_sections (struct pt_regs *regs)
280 /* fall through */ 278 /* fall through */
281 case ATOMIC_ADD32 + 4: 279 case ATOMIC_ADD32 + 4:
282 put_user(regs->r0, up0); 280 put_user(regs->r0, up0);
283 regs->pc = ATOMIC_ADD32 + 6;
284 break; 281 break;
285 282
286 case ATOMIC_SUB32 + 2: 283 case ATOMIC_SUB32 + 2:
@@ -288,7 +285,6 @@ void finish_atomic_sections (struct pt_regs *regs)
288 /* fall through */ 285 /* fall through */
289 case ATOMIC_SUB32 + 4: 286 case ATOMIC_SUB32 + 4:
290 put_user(regs->r0, up0); 287 put_user(regs->r0, up0);
291 regs->pc = ATOMIC_SUB32 + 6;
292 break; 288 break;
293 289
294 case ATOMIC_IOR32 + 2: 290 case ATOMIC_IOR32 + 2:
@@ -296,7 +292,6 @@ void finish_atomic_sections (struct pt_regs *regs)
296 /* fall through */ 292 /* fall through */
297 case ATOMIC_IOR32 + 4: 293 case ATOMIC_IOR32 + 4:
298 put_user(regs->r0, up0); 294 put_user(regs->r0, up0);
299 regs->pc = ATOMIC_IOR32 + 6;
300 break; 295 break;
301 296
302 case ATOMIC_AND32 + 2: 297 case ATOMIC_AND32 + 2:
@@ -304,7 +299,6 @@ void finish_atomic_sections (struct pt_regs *regs)
304 /* fall through */ 299 /* fall through */
305 case ATOMIC_AND32 + 4: 300 case ATOMIC_AND32 + 4:
306 put_user(regs->r0, up0); 301 put_user(regs->r0, up0);
307 regs->pc = ATOMIC_AND32 + 6;
308 break; 302 break;
309 303
310 case ATOMIC_XOR32 + 2: 304 case ATOMIC_XOR32 + 2:
@@ -312,9 +306,15 @@ void finish_atomic_sections (struct pt_regs *regs)
312 /* fall through */ 306 /* fall through */
313 case ATOMIC_XOR32 + 4: 307 case ATOMIC_XOR32 + 4:
314 put_user(regs->r0, up0); 308 put_user(regs->r0, up0);
315 regs->pc = ATOMIC_XOR32 + 6;
316 break; 309 break;
317 } 310 }
311
312 /*
313 * We've finished the atomic section, and the only thing left for
314 * userspace is to do a RTS, so we might as well handle that too
315 * since we need to update the PC anyways.
316 */
317 regs->pc = regs->rets;
318} 318}
319 319
320static inline 320static inline
@@ -336,12 +336,58 @@ int in_mem_const(unsigned long addr, unsigned long size,
336{ 336{
337 return in_mem_const_off(addr, size, 0, const_addr, const_size); 337 return in_mem_const_off(addr, size, 0, const_addr, const_size);
338} 338}
339#define IN_ASYNC(bnum, bctlnum) \ 339#define ASYNC_ENABLED(bnum, bctlnum) \
340({ \ 340({ \
341 (bfin_read_EBIU_AMGCTL() & 0xe) < ((bnum + 1) << 1) ? -EFAULT : \ 341 (bfin_read_EBIU_AMGCTL() & 0xe) < ((bnum + 1) << 1) ? 0 : \
342 bfin_read_EBIU_AMBCTL##bctlnum() & B##bnum##RDYEN ? -EFAULT : \ 342 bfin_read_EBIU_AMBCTL##bctlnum() & B##bnum##RDYEN ? 0 : \
343 BFIN_MEM_ACCESS_CORE; \ 343 1; \
344}) 344})
345/*
346 * We can't read EBIU banks that aren't enabled or we end up hanging
347 * on the access to the async space. Make sure we validate accesses
348 * that cross async banks too.
349 * 0 - found, but unusable
350 * 1 - found & usable
351 * 2 - not found
352 */
353static
354int in_async(unsigned long addr, unsigned long size)
355{
356 if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK0_BASE + ASYNC_BANK0_SIZE) {
357 if (!ASYNC_ENABLED(0, 0))
358 return 0;
359 if (addr + size <= ASYNC_BANK0_BASE + ASYNC_BANK0_SIZE)
360 return 1;
361 size -= ASYNC_BANK0_BASE + ASYNC_BANK0_SIZE - addr;
362 addr = ASYNC_BANK0_BASE + ASYNC_BANK0_SIZE;
363 }
364 if (addr >= ASYNC_BANK1_BASE && addr < ASYNC_BANK1_BASE + ASYNC_BANK1_SIZE) {
365 if (!ASYNC_ENABLED(1, 0))
366 return 0;
367 if (addr + size <= ASYNC_BANK1_BASE + ASYNC_BANK1_SIZE)
368 return 1;
369 size -= ASYNC_BANK1_BASE + ASYNC_BANK1_SIZE - addr;
370 addr = ASYNC_BANK1_BASE + ASYNC_BANK1_SIZE;
371 }
372 if (addr >= ASYNC_BANK2_BASE && addr < ASYNC_BANK2_BASE + ASYNC_BANK2_SIZE) {
373 if (!ASYNC_ENABLED(2, 1))
374 return 0;
375 if (addr + size <= ASYNC_BANK2_BASE + ASYNC_BANK2_SIZE)
376 return 1;
377 size -= ASYNC_BANK2_BASE + ASYNC_BANK2_SIZE - addr;
378 addr = ASYNC_BANK2_BASE + ASYNC_BANK2_SIZE;
379 }
380 if (addr >= ASYNC_BANK3_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE) {
381 if (ASYNC_ENABLED(3, 1))
382 return 0;
383 if (addr + size <= ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE)
384 return 1;
385 return 0;
386 }
387
388 /* not within async bounds */
389 return 2;
390}
345 391
346int bfin_mem_access_type(unsigned long addr, unsigned long size) 392int bfin_mem_access_type(unsigned long addr, unsigned long size)
347{ 393{
@@ -378,17 +424,11 @@ int bfin_mem_access_type(unsigned long addr, unsigned long size)
378 if (addr >= SYSMMR_BASE) 424 if (addr >= SYSMMR_BASE)
379 return BFIN_MEM_ACCESS_CORE_ONLY; 425 return BFIN_MEM_ACCESS_CORE_ONLY;
380 426
381 /* We can't read EBIU banks that aren't enabled or we end up hanging 427 switch (in_async(addr, size)) {
382 * on the access to the async space. 428 case 0: return -EFAULT;
383 */ 429 case 1: return BFIN_MEM_ACCESS_CORE;
384 if (in_mem_const(addr, size, ASYNC_BANK0_BASE, ASYNC_BANK0_SIZE)) 430 case 2: /* fall through */;
385 return IN_ASYNC(0, 0); 431 }
386 if (in_mem_const(addr, size, ASYNC_BANK1_BASE, ASYNC_BANK1_SIZE))
387 return IN_ASYNC(1, 0);
388 if (in_mem_const(addr, size, ASYNC_BANK2_BASE, ASYNC_BANK2_SIZE))
389 return IN_ASYNC(2, 1);
390 if (in_mem_const(addr, size, ASYNC_BANK3_BASE, ASYNC_BANK3_SIZE))
391 return IN_ASYNC(3, 1);
392 432
393 if (in_mem_const(addr, size, BOOT_ROM_START, BOOT_ROM_LENGTH)) 433 if (in_mem_const(addr, size, BOOT_ROM_START, BOOT_ROM_LENGTH))
394 return BFIN_MEM_ACCESS_CORE; 434 return BFIN_MEM_ACCESS_CORE;
@@ -405,6 +445,8 @@ __attribute__((l1_text))
405/* Return 1 if access to memory range is OK, 0 otherwise */ 445/* Return 1 if access to memory range is OK, 0 otherwise */
406int _access_ok(unsigned long addr, unsigned long size) 446int _access_ok(unsigned long addr, unsigned long size)
407{ 447{
448 int aret;
449
408 if (size == 0) 450 if (size == 0)
409 return 1; 451 return 1;
410 /* Check that things do not wrap around */ 452 /* Check that things do not wrap around */
@@ -454,6 +496,11 @@ int _access_ok(unsigned long addr, unsigned long size)
454 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH)) 496 if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
455 return 1; 497 return 1;
456#endif 498#endif
499
500 aret = in_async(addr, size);
501 if (aret < 2)
502 return aret;
503
457 if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH)) 504 if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH))
458 return 1; 505 return 1;
459 506
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 56b0ba12175f..65567dc4b9f5 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -316,19 +316,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
316 case BFIN_MEM_ACCESS_CORE_ONLY: 316 case BFIN_MEM_ACCESS_CORE_ONLY:
317 copied = access_process_vm(child, addr, &data, 317 copied = access_process_vm(child, addr, &data,
318 to_copy, 1); 318 to_copy, 1);
319 if (copied)
320 break;
321
322 /* hrm, why didn't that work ... maybe no mapping */
323 if (addr >= FIXED_CODE_START &&
324 addr + to_copy <= FIXED_CODE_END) {
325 copy_to_user_page(0, 0, 0, paddr, &data, to_copy);
326 copied = to_copy;
327 } else if (addr >= BOOT_ROM_START) {
328 memcpy(paddr, &data, to_copy);
329 copied = to_copy;
330 }
331
332 break; 319 break;
333 case BFIN_MEM_ACCESS_DMA: 320 case BFIN_MEM_ACCESS_DMA:
334 if (safe_dma_memcpy(paddr, &data, to_copy)) 321 if (safe_dma_memcpy(paddr, &data, to_copy))
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index c202a44d1416..95448ae9c43a 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -178,10 +178,10 @@ void __init bfin_cache_init(void)
178 178
179void __init bfin_relocate_l1_mem(void) 179void __init bfin_relocate_l1_mem(void)
180{ 180{
181 unsigned long l1_code_length; 181 unsigned long text_l1_len = (unsigned long)_text_l1_len;
182 unsigned long l1_data_a_length; 182 unsigned long data_l1_len = (unsigned long)_data_l1_len;
183 unsigned long l1_data_b_length; 183 unsigned long data_b_l1_len = (unsigned long)_data_b_l1_len;
184 unsigned long l2_length; 184 unsigned long l2_len = (unsigned long)_l2_len;
185 185
186 early_shadow_stamp(); 186 early_shadow_stamp();
187 187
@@ -201,30 +201,23 @@ void __init bfin_relocate_l1_mem(void)
201 201
202 blackfin_dma_early_init(); 202 blackfin_dma_early_init();
203 203
204 /* if necessary, copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ 204 /* if necessary, copy L1 text to L1 instruction SRAM */
205 l1_code_length = _etext_l1 - _stext_l1; 205 if (L1_CODE_LENGTH && text_l1_len)
206 if (l1_code_length) 206 early_dma_memcpy(_stext_l1, _text_l1_lma, text_l1_len);
207 early_dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length);
208 207
209 /* if necessary, copy _sdata_l1 to _sbss_l1 to L1 data bank A SRAM */ 208 /* if necessary, copy L1 data to L1 data bank A SRAM */
210 l1_data_a_length = _sbss_l1 - _sdata_l1; 209 if (L1_DATA_A_LENGTH && data_l1_len)
211 if (l1_data_a_length) 210 early_dma_memcpy(_sdata_l1, _data_l1_lma, data_l1_len);
212 early_dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length);
213 211
214 /* if necessary, copy _sdata_b_l1 to _sbss_b_l1 to L1 data bank B SRAM */ 212 /* if necessary, copy L1 data B to L1 data bank B SRAM */
215 l1_data_b_length = _sbss_b_l1 - _sdata_b_l1; 213 if (L1_DATA_B_LENGTH && data_b_l1_len)
216 if (l1_data_b_length) 214 early_dma_memcpy(_sdata_b_l1, _data_b_l1_lma, data_b_l1_len);
217 early_dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length +
218 l1_data_a_length, l1_data_b_length);
219 215
220 early_dma_memcpy_done(); 216 early_dma_memcpy_done();
221 217
222 /* if necessary, copy _stext_l2 to _edata_l2 to L2 SRAM */ 218 /* if necessary, copy L2 text/data to L2 SRAM */
223 if (L2_LENGTH != 0) { 219 if (L2_LENGTH && l2_len)
224 l2_length = _sbss_l2 - _stext_l2; 220 memcpy(_stext_l2, _l2_lma, l2_len);
225 if (l2_length)
226 memcpy(_stext_l2, _l2_lma_start, l2_length);
227 }
228} 221}
229 222
230/* add_memory_region to memmap */ 223/* add_memory_region to memmap */
@@ -608,11 +601,6 @@ static __init void memory_setup(void)
608 page_mask_order = get_order(3 * page_mask_nelts * sizeof(long)); 601 page_mask_order = get_order(3 * page_mask_nelts * sizeof(long));
609#endif 602#endif
610 603
611#if !defined(CONFIG_MTD_UCLINUX)
612 /*In case there is no valid CPLB behind memory_end make sure we don't get to close*/
613 memory_end -= SIZE_4K;
614#endif
615
616 init_mm.start_code = (unsigned long)_stext; 604 init_mm.start_code = (unsigned long)_stext;
617 init_mm.end_code = (unsigned long)_etext; 605 init_mm.end_code = (unsigned long)_etext;
618 init_mm.end_data = (unsigned long)_edata; 606 init_mm.end_data = (unsigned long)_edata;
@@ -917,7 +905,7 @@ void __init setup_arch(char **cmdline_p)
917 905
918 printk(KERN_INFO "Blackfin support (C) 2004-2009 Analog Devices, Inc.\n"); 906 printk(KERN_INFO "Blackfin support (C) 2004-2009 Analog Devices, Inc.\n");
919 if (bfin_compiled_revid() == 0xffff) 907 if (bfin_compiled_revid() == 0xffff)
920 printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU); 908 printk(KERN_INFO "Compiled for ADSP-%s Rev any, running on 0.%d\n", CPU, bfin_revid());
921 else if (bfin_compiled_revid() == -1) 909 else if (bfin_compiled_revid() == -1)
922 printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU); 910 printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU);
923 else 911 else
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c
index 9d90c18fab23..e0fd63e9e38a 100644
--- a/arch/blackfin/kernel/signal.c
+++ b/arch/blackfin/kernel/signal.c
@@ -12,6 +12,7 @@
12#include <linux/binfmts.h> 12#include <linux/binfmts.h>
13#include <linux/freezer.h> 13#include <linux/freezer.h>
14#include <linux/uaccess.h> 14#include <linux/uaccess.h>
15#include <linux/tracehook.h>
15 16
16#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
17#include <asm/ucontext.h> 18#include <asm/ucontext.h>
@@ -332,3 +333,20 @@ asmlinkage void do_signal(struct pt_regs *regs)
332 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 333 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
333 } 334 }
334} 335}
336
337/*
338 * notification of userspace execution resumption
339 */
340asmlinkage void do_notify_resume(struct pt_regs *regs)
341{
342 if (test_thread_flag(TIF_SIGPENDING) || test_thread_flag(TIF_RESTORE_SIGMASK))
343 do_signal(regs);
344
345 if (test_thread_flag(TIF_NOTIFY_RESUME)) {
346 clear_thread_flag(TIF_NOTIFY_RESUME);
347 tracehook_notify_resume(regs);
348 if (current->replacement_session_keyring)
349 key_replace_session_keyring();
350 }
351}
352
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index afcef129d4e8..2e7f8e10bf87 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -22,39 +22,6 @@
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <asm/dma.h> 23#include <asm/dma.h>
24 24
25/* common code for old and new mmaps */
26static inline long
27do_mmap2(unsigned long addr, unsigned long len,
28 unsigned long prot, unsigned long flags,
29 unsigned long fd, unsigned long pgoff)
30{
31 int error = -EBADF;
32 struct file *file = NULL;
33
34 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
35 if (!(flags & MAP_ANONYMOUS)) {
36 file = fget(fd);
37 if (!file)
38 goto out;
39 }
40
41 down_write(&current->mm->mmap_sem);
42 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
43 up_write(&current->mm->mmap_sem);
44
45 if (file)
46 fput(file);
47 out:
48 return error;
49}
50
51asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
52 unsigned long prot, unsigned long flags,
53 unsigned long fd, unsigned long pgoff)
54{
55 return do_mmap2(addr, len, prot, flags, fd, pgoff);
56}
57
58asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags) 25asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags)
59{ 26{
60 return sram_alloc_with_lsl(size, flags); 27 return sram_alloc_with_lsl(size, flags);
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c
index 359cfb1815ca..17c38c5b5b22 100644
--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -22,8 +22,6 @@
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/gptimers.h> 23#include <asm/gptimers.h>
24 24
25#if defined(CONFIG_CYCLES_CLOCKSOURCE)
26
27/* Accelerators for sched_clock() 25/* Accelerators for sched_clock()
28 * convert from cycles(64bits) => nanoseconds (64bits) 26 * convert from cycles(64bits) => nanoseconds (64bits)
29 * basic equation: 27 * basic equation:
@@ -46,20 +44,11 @@
46 * -johnstul@us.ibm.com "math is hard, lets go shopping!" 44 * -johnstul@us.ibm.com "math is hard, lets go shopping!"
47 */ 45 */
48 46
49static unsigned long cyc2ns_scale;
50#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ 47#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
51 48
52static inline void set_cyc2ns_scale(unsigned long cpu_khz) 49#if defined(CONFIG_CYCLES_CLOCKSOURCE)
53{
54 cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR) / cpu_khz;
55}
56
57static inline unsigned long long cycles_2_ns(cycle_t cyc)
58{
59 return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
60}
61 50
62static cycle_t bfin_read_cycles(struct clocksource *cs) 51static notrace cycle_t bfin_read_cycles(struct clocksource *cs)
63{ 52{
64 return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod); 53 return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
65} 54}
@@ -69,19 +58,18 @@ static struct clocksource bfin_cs_cycles = {
69 .rating = 400, 58 .rating = 400,
70 .read = bfin_read_cycles, 59 .read = bfin_read_cycles,
71 .mask = CLOCKSOURCE_MASK(64), 60 .mask = CLOCKSOURCE_MASK(64),
72 .shift = 22, 61 .shift = CYC2NS_SCALE_FACTOR,
73 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 62 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
74}; 63};
75 64
76unsigned long long sched_clock(void) 65static inline unsigned long long bfin_cs_cycles_sched_clock(void)
77{ 66{
78 return cycles_2_ns(bfin_read_cycles(&bfin_cs_cycles)); 67 return clocksource_cyc2ns(bfin_read_cycles(&bfin_cs_cycles),
68 bfin_cs_cycles.mult, bfin_cs_cycles.shift);
79} 69}
80 70
81static int __init bfin_cs_cycles_init(void) 71static int __init bfin_cs_cycles_init(void)
82{ 72{
83 set_cyc2ns_scale(get_cclk() / 1000);
84
85 bfin_cs_cycles.mult = \ 73 bfin_cs_cycles.mult = \
86 clocksource_hz2mult(get_cclk(), bfin_cs_cycles.shift); 74 clocksource_hz2mult(get_cclk(), bfin_cs_cycles.shift);
87 75
@@ -108,7 +96,7 @@ void __init setup_gptimer0(void)
108 enable_gptimers(TIMER0bit); 96 enable_gptimers(TIMER0bit);
109} 97}
110 98
111static cycle_t bfin_read_gptimer0(void) 99static cycle_t bfin_read_gptimer0(struct clocksource *cs)
112{ 100{
113 return bfin_read_TIMER0_COUNTER(); 101 return bfin_read_TIMER0_COUNTER();
114} 102}
@@ -118,10 +106,16 @@ static struct clocksource bfin_cs_gptimer0 = {
118 .rating = 350, 106 .rating = 350,
119 .read = bfin_read_gptimer0, 107 .read = bfin_read_gptimer0,
120 .mask = CLOCKSOURCE_MASK(32), 108 .mask = CLOCKSOURCE_MASK(32),
121 .shift = 22, 109 .shift = CYC2NS_SCALE_FACTOR,
122 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 110 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
123}; 111};
124 112
113static inline unsigned long long bfin_cs_gptimer0_sched_clock(void)
114{
115 return clocksource_cyc2ns(bfin_read_TIMER0_COUNTER(),
116 bfin_cs_gptimer0.mult, bfin_cs_gptimer0.shift);
117}
118
125static int __init bfin_cs_gptimer0_init(void) 119static int __init bfin_cs_gptimer0_init(void)
126{ 120{
127 setup_gptimer0(); 121 setup_gptimer0();
@@ -138,6 +132,19 @@ static int __init bfin_cs_gptimer0_init(void)
138# define bfin_cs_gptimer0_init() 132# define bfin_cs_gptimer0_init()
139#endif 133#endif
140 134
135
136#if defined(CONFIG_GPTMR0_CLOCKSOURCE) || defined(CONFIG_CYCLES_CLOCKSOURCE)
137/* prefer to use cycles since it has higher rating */
138notrace unsigned long long sched_clock(void)
139{
140#if defined(CONFIG_CYCLES_CLOCKSOURCE)
141 return bfin_cs_cycles_sched_clock();
142#else
143 return bfin_cs_gptimer0_sched_clock();
144#endif
145}
146#endif
147
141#ifdef CONFIG_CORE_TIMER_IRQ_L1 148#ifdef CONFIG_CORE_TIMER_IRQ_L1
142__attribute__((l1_text)) 149__attribute__((l1_text))
143#endif 150#endif
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index bd3b53da295e..13c1ee3e6408 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -184,11 +184,3 @@ void __init time_init(void)
184 184
185 time_sched_init(timer_interrupt); 185 time_sched_init(timer_interrupt);
186} 186}
187
188/*
189 * Scheduler clock - returns current time in nanosec units.
190 */
191unsigned long long sched_clock(void)
192{
193 return (unsigned long long)jiffies *(NSEC_PER_SEC / HZ);
194}
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 6b7325d634af..d3cbcd6bd985 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -119,6 +119,15 @@ static void decode_address(char *buf, unsigned long address)
119 return; 119 return;
120 } 120 }
121 121
122 /*
123 * Don't walk any of the vmas if we are oopsing, it has been known
124 * to cause problems - corrupt vmas (kernel crashes) cause double faults
125 */
126 if (oops_in_progress) {
127 strcat(buf, "/* kernel dynamic memory (maybe user-space) */");
128 return;
129 }
130
122 /* looks like we're off in user-land, so let's walk all the 131 /* looks like we're off in user-land, so let's walk all the
123 * mappings of all our processes and see if we can't be a whee 132 * mappings of all our processes and see if we can't be a whee
124 * bit more specific 133 * bit more specific
@@ -515,6 +524,36 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
515 break; 524 break;
516 /* External Memory Addressing Error */ 525 /* External Memory Addressing Error */
517 case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): 526 case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR):
527 if (ANOMALY_05000310) {
528 static unsigned long anomaly_rets;
529
530 if ((fp->pc >= (L1_CODE_START + L1_CODE_LENGTH - 512)) &&
531 (fp->pc < (L1_CODE_START + L1_CODE_LENGTH))) {
532 /*
533 * A false hardware error will happen while fetching at
534 * the L1 instruction SRAM boundary. Ignore it.
535 */
536 anomaly_rets = fp->rets;
537 goto traps_done;
538 } else if (fp->rets == anomaly_rets) {
539 /*
540 * While boundary code returns to a function, at the ret
541 * point, a new false hardware error might occur too based
542 * on tests. Ignore it too.
543 */
544 goto traps_done;
545 } else if ((fp->rets >= (L1_CODE_START + L1_CODE_LENGTH - 512)) &&
546 (fp->rets < (L1_CODE_START + L1_CODE_LENGTH))) {
547 /*
548 * If boundary code calls a function, at the entry point,
549 * a new false hardware error maybe happen based on tests.
550 * Ignore it too.
551 */
552 goto traps_done;
553 } else
554 anomaly_rets = 0;
555 }
556
518 info.si_code = BUS_ADRERR; 557 info.si_code = BUS_ADRERR;
519 sig = SIGBUS; 558 sig = SIGBUS;
520 strerror = KERN_NOTICE HWC_x3(KERN_NOTICE); 559 strerror = KERN_NOTICE HWC_x3(KERN_NOTICE);
@@ -619,7 +658,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp)
619 658
620/* 659/*
621 * Similar to get_user, do some address checking, then dereference 660 * Similar to get_user, do some address checking, then dereference
622 * Return true on sucess, false on bad address 661 * Return true on success, false on bad address
623 */ 662 */
624static bool get_instruction(unsigned short *val, unsigned short *address) 663static bool get_instruction(unsigned short *val, unsigned short *address)
625{ 664{
@@ -976,12 +1015,12 @@ void dump_bfin_process(struct pt_regs *fp)
976 !((unsigned long)current & 0x3) && current->pid) { 1015 !((unsigned long)current & 0x3) && current->pid) {
977 verbose_printk(KERN_NOTICE "CURRENT PROCESS:\n"); 1016 verbose_printk(KERN_NOTICE "CURRENT PROCESS:\n");
978 if (current->comm >= (char *)FIXED_CODE_START) 1017 if (current->comm >= (char *)FIXED_CODE_START)
979 verbose_printk(KERN_NOTICE "COMM=%s PID=%d\n", 1018 verbose_printk(KERN_NOTICE "COMM=%s PID=%d",
980 current->comm, current->pid); 1019 current->comm, current->pid);
981 else 1020 else
982 verbose_printk(KERN_NOTICE "COMM= invalid\n"); 1021 verbose_printk(KERN_NOTICE "COMM= invalid");
983 1022
984 printk(KERN_NOTICE "CPU = %d\n", current_thread_info()->cpu); 1023 printk(KERN_CONT " CPU=%d\n", current_thread_info()->cpu);
985 if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START) 1024 if (!((unsigned long)current->mm & 0x3) && (unsigned long)current->mm >= FIXED_CODE_START)
986 verbose_printk(KERN_NOTICE 1025 verbose_printk(KERN_NOTICE
987 "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" 1026 "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n"
@@ -1140,7 +1179,7 @@ void show_regs(struct pt_regs *fp)
1140 if (fp->ipend & ~0x3F) { 1179 if (fp->ipend & ~0x3F) {
1141 for (i = 0; i < (NR_IRQS - 1); i++) { 1180 for (i = 0; i < (NR_IRQS - 1); i++) {
1142 if (!in_atomic) 1181 if (!in_atomic)
1143 spin_lock_irqsave(&irq_desc[i].lock, flags); 1182 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
1144 1183
1145 action = irq_desc[i].action; 1184 action = irq_desc[i].action;
1146 if (!action) 1185 if (!action)
@@ -1155,7 +1194,7 @@ void show_regs(struct pt_regs *fp)
1155 verbose_printk("\n"); 1194 verbose_printk("\n");
1156unlock: 1195unlock:
1157 if (!in_atomic) 1196 if (!in_atomic)
1158 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 1197 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
1159 } 1198 }
1160 } 1199 }
1161 1200
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 10e12539000e..66799e763dc9 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -4,8 +4,6 @@
4 * Licensed under the GPL-2 or later 4 * Licensed under the GPL-2 or later
5 */ 5 */
6 6
7#define VMLINUX_SYMBOL(_sym_) _##_sym_
8
9#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
10#include <asm/mem_map.h> 8#include <asm/mem_map.h>
11#include <asm/page.h> 9#include <asm/page.h>
@@ -123,8 +121,6 @@ SECTIONS
123 EXIT_DATA 121 EXIT_DATA
124 } 122 }
125 123
126 __l1_lma_start = .;
127
128 .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data)) 124 .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
129 { 125 {
130 . = ALIGN(4); 126 . = ALIGN(4);
@@ -136,9 +132,11 @@ SECTIONS
136 . = ALIGN(4); 132 . = ALIGN(4);
137 __etext_l1 = .; 133 __etext_l1 = .;
138 } 134 }
139 ASSERT (SIZEOF(.text_l1) <= L1_CODE_LENGTH, "L1 text overflow!") 135 __text_l1_lma = LOADADDR(.text_l1);
136 __text_l1_len = SIZEOF(.text_l1);
137 ASSERT (__text_l1_len <= L1_CODE_LENGTH, "L1 text overflow!")
140 138
141 .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1)) 139 .data_l1 L1_DATA_A_START : AT(__text_l1_lma + __text_l1_len)
142 { 140 {
143 . = ALIGN(4); 141 . = ALIGN(4);
144 __sdata_l1 = .; 142 __sdata_l1 = .;
@@ -154,9 +152,11 @@ SECTIONS
154 . = ALIGN(4); 152 . = ALIGN(4);
155 __ebss_l1 = .; 153 __ebss_l1 = .;
156 } 154 }
157 ASSERT (SIZEOF(.data_l1) <= L1_DATA_A_LENGTH, "L1 data A overflow!") 155 __data_l1_lma = LOADADDR(.data_l1);
156 __data_l1_len = SIZEOF(.data_l1);
157 ASSERT (__data_l1_len <= L1_DATA_A_LENGTH, "L1 data A overflow!")
158 158
159 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1)) 159 .data_b_l1 L1_DATA_B_START : AT(__data_l1_lma + __data_l1_len)
160 { 160 {
161 . = ALIGN(4); 161 . = ALIGN(4);
162 __sdata_b_l1 = .; 162 __sdata_b_l1 = .;
@@ -169,11 +169,11 @@ SECTIONS
169 . = ALIGN(4); 169 . = ALIGN(4);
170 __ebss_b_l1 = .; 170 __ebss_b_l1 = .;
171 } 171 }
172 ASSERT (SIZEOF(.data_b_l1) <= L1_DATA_B_LENGTH, "L1 data B overflow!") 172 __data_b_l1_lma = LOADADDR(.data_b_l1);
173 173 __data_b_l1_len = SIZEOF(.data_b_l1);
174 __l2_lma_start = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); 174 ASSERT (__data_b_l1_len <= L1_DATA_B_LENGTH, "L1 data B overflow!")
175 175
176 .text_data_l2 L2_START : AT(LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1)) 176 .text_data_l2 L2_START : AT(__data_b_l1_lma + __data_b_l1_len)
177 { 177 {
178 . = ALIGN(4); 178 . = ALIGN(4);
179 __stext_l2 = .; 179 __stext_l2 = .;
@@ -195,12 +195,14 @@ SECTIONS
195 . = ALIGN(4); 195 . = ALIGN(4);
196 __ebss_l2 = .; 196 __ebss_l2 = .;
197 } 197 }
198 ASSERT (SIZEOF(.text_data_l2) <= L2_LENGTH, "L2 overflow!") 198 __l2_lma = LOADADDR(.text_data_l2);
199 __l2_len = SIZEOF(.text_data_l2);
200 ASSERT (__l2_len <= L2_LENGTH, "L2 overflow!")
199 201
200 /* Force trailing alignment of our init section so that when we 202 /* Force trailing alignment of our init section so that when we
201 * free our init memory, we don't leave behind a partial page. 203 * free our init memory, we don't leave behind a partial page.
202 */ 204 */
203 . = LOADADDR(.text_data_l2) + SIZEOF(.text_data_l2); 205 . = __l2_lma + __l2_len;
204 . = ALIGN(PAGE_SIZE); 206 . = ALIGN(PAGE_SIZE);
205 ___init_end = .; 207 ___init_end = .;
206 208
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile
index 635288fc5f54..42c47dc9e12f 100644
--- a/arch/blackfin/lib/Makefile
+++ b/arch/blackfin/lib/Makefile
@@ -5,7 +5,7 @@
5lib-y := \ 5lib-y := \
6 ashldi3.o ashrdi3.o lshrdi3.o \ 6 ashldi3.o ashrdi3.o lshrdi3.o \
7 muldi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ 7 muldi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \
8 checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ 8 memcpy.o memset.o memcmp.o memchr.o memmove.o \
9 strcmp.o strcpy.o strncmp.o strncpy.o \ 9 strcmp.o strcpy.o strncmp.o strncpy.o \
10 umulsi3_highpart.o smulsi3_highpart.o \ 10 umulsi3_highpart.o smulsi3_highpart.o \
11 ins.o outs.o 11 ins.o outs.o
diff --git a/arch/blackfin/lib/checksum.c b/arch/blackfin/lib/checksum.c
deleted file mode 100644
index c62969dc1bbb..000000000000
--- a/arch/blackfin/lib/checksum.c
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * Copyright 2004-2009 Analog Devices Inc.
3 *
4 * Licensed under the GPL-2 or later.
5 *
6 * An implementation of the TCP/IP protocol suite for the LINUX operating
7 * system. INET is implemented using the BSD Socket interface as the
8 * means of communication with the user level.
9 *
10 */
11
12#include <linux/module.h>
13#include <net/checksum.h>
14#include <asm/checksum.h>
15
16#ifdef CONFIG_IP_CHECKSUM_L1
17static unsigned short do_csum(const unsigned char *buff, int len)__attribute__((l1_text));
18#endif
19
20static unsigned short do_csum(const unsigned char *buff, int len)
21{
22 register unsigned long sum = 0;
23 int swappem = 0;
24
25 if (1 & (unsigned long)buff) {
26 sum = *buff << 8;
27 buff++;
28 len--;
29 ++swappem;
30 }
31
32 while (len > 1) {
33 sum += *(unsigned short *)buff;
34 buff += 2;
35 len -= 2;
36 }
37
38 if (len > 0)
39 sum += *buff;
40
41 /* Fold 32-bit sum to 16 bits */
42 while (sum >> 16)
43 sum = (sum & 0xffff) + (sum >> 16);
44
45 if (swappem)
46 sum = ((sum & 0xff00) >> 8) + ((sum & 0x00ff) << 8);
47
48 return sum;
49
50}
51
52/*
53 * This is a version of ip_compute_csum() optimized for IP headers,
54 * which always checksum on 4 octet boundaries.
55 */
56__sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl)
57{
58 return (__force __sum16)~do_csum(iph, ihl * 4);
59}
60EXPORT_SYMBOL(ip_fast_csum);
61
62/*
63 * computes the checksum of a memory block at buff, length len,
64 * and adds in "sum" (32-bit)
65 *
66 * returns a 32-bit number suitable for feeding into itself
67 * or csum_tcpudp_magic
68 *
69 * this function must be called with even lengths, except
70 * for the last fragment, which may be odd
71 *
72 * it's best to have buff aligned on a 32-bit boundary
73 */
74__wsum csum_partial(const void *buff, int len, __wsum sum)
75{
76 /*
77 * Just in case we get nasty checksum data...
78 * Like 0xffff6ec3 in the case of our IPv6 multicast header.
79 * We fold to begin with, as well as at the end.
80 */
81 sum = (sum & 0xffff) + (sum >> 16);
82
83 sum += do_csum(buff, len);
84
85 sum = (sum & 0xffff) + (sum >> 16);
86
87 return sum;
88}
89EXPORT_SYMBOL(csum_partial);
90
91/*
92 * this routine is used for miscellaneous IP-like checksums, mainly
93 * in icmp.c
94 */
95__sum16 ip_compute_csum(const void *buff, int len)
96{
97 return (__force __sum16)~do_csum(buff, len);
98}
99EXPORT_SYMBOL(ip_compute_csum);
100
101/*
102 * copy from fs while checksumming, otherwise like csum_partial
103 */
104
105__wsum
106csum_partial_copy_from_user(const void __user *src, void *dst,
107 int len, __wsum sum, int *csum_err)
108{
109 if (csum_err)
110 *csum_err = 0;
111 memcpy(dst, (__force void *)src, len);
112 return csum_partial(dst, len, sum);
113}
114EXPORT_SYMBOL(csum_partial_copy_from_user);
115
116/*
117 * copy from ds while checksumming, otherwise like csum_partial
118 */
119
120__wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum)
121{
122 memcpy(dst, src, len);
123 return csum_partial(dst, len, sum);
124}
125EXPORT_SYMBOL(csum_partial_copy);
diff --git a/arch/blackfin/mach-bf518/Kconfig b/arch/blackfin/mach-bf518/Kconfig
index 4c76fefb7a3b..4ab2d166c832 100644
--- a/arch/blackfin/mach-bf518/Kconfig
+++ b/arch/blackfin/mach-bf518/Kconfig
@@ -1,3 +1,7 @@
1config BF51x
2 def_bool y
3 depends on (BF512 || BF514 || BF516 || BF518)
4
1if (BF51x) 5if (BF51x)
2 6
3source "arch/blackfin/mach-bf518/boards/Kconfig" 7source "arch/blackfin/mach-bf518/boards/Kconfig"
diff --git a/arch/blackfin/mach-bf518/include/mach/blackfin.h b/arch/blackfin/mach-bf518/include/mach/blackfin.h
index 6cfb246aebec..9053462be4b1 100644
--- a/arch/blackfin/mach-bf518/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf518/include/mach/blackfin.h
@@ -58,10 +58,4 @@
58#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 58#define OFFSET_SCR 0x1C /* SCR Scratch Register */
59#define OFFSET_GCTL 0x24 /* Global Control Register */ 59#define OFFSET_GCTL 0x24 /* Global Control Register */
60 60
61/* PLL_DIV Masks */
62#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
63#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
64#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
65#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
66
67#endif 61#endif
diff --git a/arch/blackfin/mach-bf518/include/mach/cdefBF514.h b/arch/blackfin/mach-bf518/include/mach/cdefBF514.h
index e1d99911025d..108fa4bde277 100644
--- a/arch/blackfin/mach-bf518/include/mach/cdefBF514.h
+++ b/arch/blackfin/mach-bf518/include/mach/cdefBF514.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright 2008-2009 Analog Devices Inc. 2 * Copyright 2008-2009 Analog Devices Inc.
3 * 3 *
4 * Licensed under the GPL-2 or later 4 * Licensed under the ADI BSD license or the GPL-2 (or later)
5 */ 5 */
6 6
7#ifndef _CDEF_BF514_H 7#ifndef _CDEF_BF514_H
@@ -10,15 +10,8 @@
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF514.h" 11#include "defBF514.h"
12 12
13/* include core specific register pointer definitions */ 13/* BF514 is BF512 + RSI */
14#include <asm/cdef_LPBlackfin.h> 14#include "cdefBF512.h"
15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF514 */
17
18/* include cdefBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
19#include "cdefBF51x_base.h"
20
21/* The following are the #defines needed by ADSP-BF514 that are not in the common header */
22 15
23/* Removable Storage Interface Registers */ 16/* Removable Storage Interface Registers */
24 17
diff --git a/arch/blackfin/mach-bf518/include/mach/cdefBF516.h b/arch/blackfin/mach-bf518/include/mach/cdefBF516.h
index 6b364eda4947..2751592ef1c1 100644
--- a/arch/blackfin/mach-bf518/include/mach/cdefBF516.h
+++ b/arch/blackfin/mach-bf518/include/mach/cdefBF516.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright 2008-2009 Analog Devices Inc. 2 * Copyright 2008-2009 Analog Devices Inc.
3 * 3 *
4 * Licensed under the GPL-2 or later 4 * Licensed under the ADI BSD license or the GPL-2 (or later)
5 */ 5 */
6 6
7#ifndef _CDEF_BF516_H 7#ifndef _CDEF_BF516_H
@@ -10,15 +10,8 @@
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF516.h" 11#include "defBF516.h"
12 12
13/* include core specific register pointer definitions */ 13/* BF516 is BF514 + EMAC */
14#include <asm/cdef_LPBlackfin.h> 14#include "cdefBF514.h"
15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF516 */
17
18/* include cdefBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
19#include "cdefBF51x_base.h"
20
21/* The following are the #defines needed by ADSP-BF516 that are not in the common header */
22 15
23/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ 16/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
24 17
@@ -185,71 +178,4 @@
185#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT) 178#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT)
186#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val) 179#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val)
187 180
188/* Removable Storage Interface Registers */
189
190#define bfin_read_RSI_PWR_CTL() bfin_read16(RSI_PWR_CONTROL)
191#define bfin_write_RSI_PWR_CTL(val) bfin_write16(RSI_PWR_CONTROL, val)
192#define bfin_read_RSI_CLK_CTL() bfin_read16(RSI_CLK_CONTROL)
193#define bfin_write_RSI_CLK_CTL(val) bfin_write16(RSI_CLK_CONTROL, val)
194#define bfin_read_RSI_ARGUMENT() bfin_read32(RSI_ARGUMENT)
195#define bfin_write_RSI_ARGUMENT(val) bfin_write32(RSI_ARGUMENT, val)
196#define bfin_read_RSI_COMMAND() bfin_read16(RSI_COMMAND)
197#define bfin_write_RSI_COMMAND(val) bfin_write16(RSI_COMMAND, val)
198#define bfin_read_RSI_RESP_CMD() bfin_read16(RSI_RESP_CMD)
199#define bfin_write_RSI_RESP_CMD(val) bfin_write16(RSI_RESP_CMD, val)
200#define bfin_read_RSI_RESPONSE0() bfin_read32(RSI_RESPONSE0)
201#define bfin_write_RSI_RESPONSE0(val) bfin_write32(RSI_RESPONSE0, val)
202#define bfin_read_RSI_RESPONSE1() bfin_read32(RSI_RESPONSE1)
203#define bfin_write_RSI_RESPONSE1(val) bfin_write32(RSI_RESPONSE1, val)
204#define bfin_read_RSI_RESPONSE2() bfin_read32(RSI_RESPONSE2)
205#define bfin_write_RSI_RESPONSE2(val) bfin_write32(RSI_RESPONSE2, val)
206#define bfin_read_RSI_RESPONSE3() bfin_read32(RSI_RESPONSE3)
207#define bfin_write_RSI_RESPONSE3(val) bfin_write32(RSI_RESPONSE3, val)
208#define bfin_read_RSI_DATA_TIMER() bfin_read32(RSI_DATA_TIMER)
209#define bfin_write_RSI_DATA_TIMER(val) bfin_write32(RSI_DATA_TIMER, val)
210#define bfin_read_RSI_DATA_LGTH() bfin_read16(RSI_DATA_LGTH)
211#define bfin_write_RSI_DATA_LGTH(val) bfin_write16(RSI_DATA_LGTH, val)
212#define bfin_read_RSI_DATA_CTL() bfin_read16(RSI_DATA_CONTROL)
213#define bfin_write_RSI_DATA_CTL(val) bfin_write16(RSI_DATA_CONTROL, val)
214#define bfin_read_RSI_DATA_CNT() bfin_read16(RSI_DATA_CNT)
215#define bfin_write_RSI_DATA_CNT(val) bfin_write16(RSI_DATA_CNT, val)
216#define bfin_read_RSI_STATUS() bfin_read32(RSI_STATUS)
217#define bfin_write_RSI_STATUS(val) bfin_write32(RSI_STATUS, val)
218#define bfin_read_RSI_STATUS_CLR() bfin_read16(RSI_STATUSCL)
219#define bfin_write_RSI_STATUS_CLR(val) bfin_write16(RSI_STATUSCL, val)
220#define bfin_read_RSI_MASK0() bfin_read32(RSI_MASK0)
221#define bfin_write_RSI_MASK0(val) bfin_write32(RSI_MASK0, val)
222#define bfin_read_RSI_MASK1() bfin_read32(RSI_MASK1)
223#define bfin_write_RSI_MASK1(val) bfin_write32(RSI_MASK1, val)
224#define bfin_read_RSI_FIFO_CNT() bfin_read16(RSI_FIFO_CNT)
225#define bfin_write_RSI_FIFO_CNT(val) bfin_write16(RSI_FIFO_CNT, val)
226#define bfin_read_RSI_CEATA_CTL() bfin_read16(RSI_CEATA_CONTROL)
227#define bfin_write_RSI_CEATA_CTL(val) bfin_write16(RSI_CEATA_CONTROL, val)
228#define bfin_read_RSI_FIFO() bfin_read32(RSI_FIFO)
229#define bfin_write_RSI_FIFO(val) bfin_write32(RSI_FIFO, val)
230#define bfin_read_RSI_E_STATUS() bfin_read16(RSI_ESTAT)
231#define bfin_write_RSI_E_STATUS(val) bfin_write16(RSI_ESTAT, val)
232#define bfin_read_RSI_E_MASK() bfin_read16(RSI_EMASK)
233#define bfin_write_RSI_E_MASK(val) bfin_write16(RSI_EMASK, val)
234#define bfin_read_RSI_CFG() bfin_read16(RSI_CONFIG)
235#define bfin_write_RSI_CFG(val) bfin_write16(RSI_CONFIG, val)
236#define bfin_read_RSI_RD_WAIT_EN() bfin_read16(RSI_RD_WAIT_EN)
237#define bfin_write_RSI_RD_WAIT_EN(val) bfin_write16(RSI_RD_WAIT_EN, val)
238#define bfin_read_RSI_PID0() bfin_read16(RSI_PID0)
239#define bfin_write_RSI_PID0(val) bfin_write16(RSI_PID0, val)
240#define bfin_read_RSI_PID1() bfin_read16(RSI_PID1)
241#define bfin_write_RSI_PID1(val) bfin_write16(RSI_PID1, val)
242#define bfin_read_RSI_PID2() bfin_read16(RSI_PID2)
243#define bfin_write_RSI_PID2(val) bfin_write16(RSI_PID2, val)
244#define bfin_read_RSI_PID3() bfin_read16(RSI_PID3)
245#define bfin_write_RSI_PID3(val) bfin_write16(RSI_PID3, val)
246#define bfin_read_RSI_PID4() bfin_read16(RSI_PID4)
247#define bfin_write_RSI_PID4(val) bfin_write16(RSI_PID4, val)
248#define bfin_read_RSI_PID5() bfin_read16(RSI_PID5)
249#define bfin_write_RSI_PID5(val) bfin_write16(RSI_PID5, val)
250#define bfin_read_RSI_PID6() bfin_read16(RSI_PID6)
251#define bfin_write_RSI_PID6(val) bfin_write16(RSI_PID6, val)
252#define bfin_read_RSI_PID7() bfin_read16(RSI_PID7)
253#define bfin_write_RSI_PID7(val) bfin_write16(RSI_PID7, val)
254
255#endif /* _CDEF_BF516_H */ 181#endif /* _CDEF_BF516_H */
diff --git a/arch/blackfin/mach-bf518/include/mach/cdefBF518.h b/arch/blackfin/mach-bf518/include/mach/cdefBF518.h
index 929b90650bd4..7fb7f0eab990 100644
--- a/arch/blackfin/mach-bf518/include/mach/cdefBF518.h
+++ b/arch/blackfin/mach-bf518/include/mach/cdefBF518.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright 2008-2009 Analog Devices Inc. 2 * Copyright 2008-2009 Analog Devices Inc.
3 * 3 *
4 * Licensed under the GPL-2 or later 4 * Licensed under the ADI BSD license or the GPL-2 (or later)
5 */ 5 */
6 6
7#ifndef _CDEF_BF518_H 7#ifndef _CDEF_BF518_H
@@ -10,181 +10,10 @@
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF518.h" 11#include "defBF518.h"
12 12
13/* include core specific register pointer definitions */ 13/* BF518 is BF516 + IEEE-1588 */
14#include <asm/cdef_LPBlackfin.h> 14#include "cdefBF516.h"
15 15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF518 */ 16/* PTP TSYNC Registers */
17
18/* include cdefBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
19#include "cdefBF51x_base.h"
20
21/* The following are the #defines needed by ADSP-BF518 that are not in the common header */
22
23
24/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
25
26#define bfin_read_EMAC_OPMODE() bfin_read32(EMAC_OPMODE)
27#define bfin_write_EMAC_OPMODE(val) bfin_write32(EMAC_OPMODE, val)
28#define bfin_read_EMAC_ADDRLO() bfin_read32(EMAC_ADDRLO)
29#define bfin_write_EMAC_ADDRLO(val) bfin_write32(EMAC_ADDRLO, val)
30#define bfin_read_EMAC_ADDRHI() bfin_read32(EMAC_ADDRHI)
31#define bfin_write_EMAC_ADDRHI(val) bfin_write32(EMAC_ADDRHI, val)
32#define bfin_read_EMAC_HASHLO() bfin_read32(EMAC_HASHLO)
33#define bfin_write_EMAC_HASHLO(val) bfin_write32(EMAC_HASHLO, val)
34#define bfin_read_EMAC_HASHHI() bfin_read32(EMAC_HASHHI)
35#define bfin_write_EMAC_HASHHI(val) bfin_write32(EMAC_HASHHI, val)
36#define bfin_read_EMAC_STAADD() bfin_read32(EMAC_STAADD)
37#define bfin_write_EMAC_STAADD(val) bfin_write32(EMAC_STAADD, val)
38#define bfin_read_EMAC_STADAT() bfin_read32(EMAC_STADAT)
39#define bfin_write_EMAC_STADAT(val) bfin_write32(EMAC_STADAT, val)
40#define bfin_read_EMAC_FLC() bfin_read32(EMAC_FLC)
41#define bfin_write_EMAC_FLC(val) bfin_write32(EMAC_FLC, val)
42#define bfin_read_EMAC_VLAN1() bfin_read32(EMAC_VLAN1)
43#define bfin_write_EMAC_VLAN1(val) bfin_write32(EMAC_VLAN1, val)
44#define bfin_read_EMAC_VLAN2() bfin_read32(EMAC_VLAN2)
45#define bfin_write_EMAC_VLAN2(val) bfin_write32(EMAC_VLAN2, val)
46#define bfin_read_EMAC_WKUP_CTL() bfin_read32(EMAC_WKUP_CTL)
47#define bfin_write_EMAC_WKUP_CTL(val) bfin_write32(EMAC_WKUP_CTL, val)
48#define bfin_read_EMAC_WKUP_FFMSK0() bfin_read32(EMAC_WKUP_FFMSK0)
49#define bfin_write_EMAC_WKUP_FFMSK0(val) bfin_write32(EMAC_WKUP_FFMSK0, val)
50#define bfin_read_EMAC_WKUP_FFMSK1() bfin_read32(EMAC_WKUP_FFMSK1)
51#define bfin_write_EMAC_WKUP_FFMSK1(val) bfin_write32(EMAC_WKUP_FFMSK1, val)
52#define bfin_read_EMAC_WKUP_FFMSK2() bfin_read32(EMAC_WKUP_FFMSK2)
53#define bfin_write_EMAC_WKUP_FFMSK2(val) bfin_write32(EMAC_WKUP_FFMSK2, val)
54#define bfin_read_EMAC_WKUP_FFMSK3() bfin_read32(EMAC_WKUP_FFMSK3)
55#define bfin_write_EMAC_WKUP_FFMSK3(val) bfin_write32(EMAC_WKUP_FFMSK3, val)
56#define bfin_read_EMAC_WKUP_FFCMD() bfin_read32(EMAC_WKUP_FFCMD)
57#define bfin_write_EMAC_WKUP_FFCMD(val) bfin_write32(EMAC_WKUP_FFCMD, val)
58#define bfin_read_EMAC_WKUP_FFOFF() bfin_read32(EMAC_WKUP_FFOFF)
59#define bfin_write_EMAC_WKUP_FFOFF(val) bfin_write32(EMAC_WKUP_FFOFF, val)
60#define bfin_read_EMAC_WKUP_FFCRC0() bfin_read32(EMAC_WKUP_FFCRC0)
61#define bfin_write_EMAC_WKUP_FFCRC0(val) bfin_write32(EMAC_WKUP_FFCRC0, val)
62#define bfin_read_EMAC_WKUP_FFCRC1() bfin_read32(EMAC_WKUP_FFCRC1)
63#define bfin_write_EMAC_WKUP_FFCRC1(val) bfin_write32(EMAC_WKUP_FFCRC1, val)
64
65#define bfin_read_EMAC_SYSCTL() bfin_read32(EMAC_SYSCTL)
66#define bfin_write_EMAC_SYSCTL(val) bfin_write32(EMAC_SYSCTL, val)
67#define bfin_read_EMAC_SYSTAT() bfin_read32(EMAC_SYSTAT)
68#define bfin_write_EMAC_SYSTAT(val) bfin_write32(EMAC_SYSTAT, val)
69#define bfin_read_EMAC_RX_STAT() bfin_read32(EMAC_RX_STAT)
70#define bfin_write_EMAC_RX_STAT(val) bfin_write32(EMAC_RX_STAT, val)
71#define bfin_read_EMAC_RX_STKY() bfin_read32(EMAC_RX_STKY)
72#define bfin_write_EMAC_RX_STKY(val) bfin_write32(EMAC_RX_STKY, val)
73#define bfin_read_EMAC_RX_IRQE() bfin_read32(EMAC_RX_IRQE)
74#define bfin_write_EMAC_RX_IRQE(val) bfin_write32(EMAC_RX_IRQE, val)
75#define bfin_read_EMAC_TX_STAT() bfin_read32(EMAC_TX_STAT)
76#define bfin_write_EMAC_TX_STAT(val) bfin_write32(EMAC_TX_STAT, val)
77#define bfin_read_EMAC_TX_STKY() bfin_read32(EMAC_TX_STKY)
78#define bfin_write_EMAC_TX_STKY(val) bfin_write32(EMAC_TX_STKY, val)
79#define bfin_read_EMAC_TX_IRQE() bfin_read32(EMAC_TX_IRQE)
80#define bfin_write_EMAC_TX_IRQE(val) bfin_write32(EMAC_TX_IRQE, val)
81
82#define bfin_read_EMAC_MMC_CTL() bfin_read32(EMAC_MMC_CTL)
83#define bfin_write_EMAC_MMC_CTL(val) bfin_write32(EMAC_MMC_CTL, val)
84#define bfin_read_EMAC_MMC_RIRQS() bfin_read32(EMAC_MMC_RIRQS)
85#define bfin_write_EMAC_MMC_RIRQS(val) bfin_write32(EMAC_MMC_RIRQS, val)
86#define bfin_read_EMAC_MMC_RIRQE() bfin_read32(EMAC_MMC_RIRQE)
87#define bfin_write_EMAC_MMC_RIRQE(val) bfin_write32(EMAC_MMC_RIRQE, val)
88#define bfin_read_EMAC_MMC_TIRQS() bfin_read32(EMAC_MMC_TIRQS)
89#define bfin_write_EMAC_MMC_TIRQS(val) bfin_write32(EMAC_MMC_TIRQS, val)
90#define bfin_read_EMAC_MMC_TIRQE() bfin_read32(EMAC_MMC_TIRQE)
91#define bfin_write_EMAC_MMC_TIRQE(val) bfin_write32(EMAC_MMC_TIRQE, val)
92
93#define bfin_read_EMAC_RXC_OK() bfin_read32(EMAC_RXC_OK)
94#define bfin_write_EMAC_RXC_OK(val) bfin_write32(EMAC_RXC_OK, val)
95#define bfin_read_EMAC_RXC_FCS() bfin_read32(EMAC_RXC_FCS)
96#define bfin_write_EMAC_RXC_FCS(val) bfin_write32(EMAC_RXC_FCS, val)
97#define bfin_read_EMAC_RXC_ALIGN() bfin_read32(EMAC_RXC_ALIGN)
98#define bfin_write_EMAC_RXC_ALIGN(val) bfin_write32(EMAC_RXC_ALIGN, val)
99#define bfin_read_EMAC_RXC_OCTET() bfin_read32(EMAC_RXC_OCTET)
100#define bfin_write_EMAC_RXC_OCTET(val) bfin_write32(EMAC_RXC_OCTET, val)
101#define bfin_read_EMAC_RXC_DMAOVF() bfin_read32(EMAC_RXC_DMAOVF)
102#define bfin_write_EMAC_RXC_DMAOVF(val) bfin_write32(EMAC_RXC_DMAOVF, val)
103#define bfin_read_EMAC_RXC_UNICST() bfin_read32(EMAC_RXC_UNICST)
104#define bfin_write_EMAC_RXC_UNICST(val) bfin_write32(EMAC_RXC_UNICST, val)
105#define bfin_read_EMAC_RXC_MULTI() bfin_read32(EMAC_RXC_MULTI)
106#define bfin_write_EMAC_RXC_MULTI(val) bfin_write32(EMAC_RXC_MULTI, val)
107#define bfin_read_EMAC_RXC_BROAD() bfin_read32(EMAC_RXC_BROAD)
108#define bfin_write_EMAC_RXC_BROAD(val) bfin_write32(EMAC_RXC_BROAD, val)
109#define bfin_read_EMAC_RXC_LNERRI() bfin_read32(EMAC_RXC_LNERRI)
110#define bfin_write_EMAC_RXC_LNERRI(val) bfin_write32(EMAC_RXC_LNERRI, val)
111#define bfin_read_EMAC_RXC_LNERRO() bfin_read32(EMAC_RXC_LNERRO)
112#define bfin_write_EMAC_RXC_LNERRO(val) bfin_write32(EMAC_RXC_LNERRO, val)
113#define bfin_read_EMAC_RXC_LONG() bfin_read32(EMAC_RXC_LONG)
114#define bfin_write_EMAC_RXC_LONG(val) bfin_write32(EMAC_RXC_LONG, val)
115#define bfin_read_EMAC_RXC_MACCTL() bfin_read32(EMAC_RXC_MACCTL)
116#define bfin_write_EMAC_RXC_MACCTL(val) bfin_write32(EMAC_RXC_MACCTL, val)
117#define bfin_read_EMAC_RXC_OPCODE() bfin_read32(EMAC_RXC_OPCODE)
118#define bfin_write_EMAC_RXC_OPCODE(val) bfin_write32(EMAC_RXC_OPCODE, val)
119#define bfin_read_EMAC_RXC_PAUSE() bfin_read32(EMAC_RXC_PAUSE)
120#define bfin_write_EMAC_RXC_PAUSE(val) bfin_write32(EMAC_RXC_PAUSE, val)
121#define bfin_read_EMAC_RXC_ALLFRM() bfin_read32(EMAC_RXC_ALLFRM)
122#define bfin_write_EMAC_RXC_ALLFRM(val) bfin_write32(EMAC_RXC_ALLFRM, val)
123#define bfin_read_EMAC_RXC_ALLOCT() bfin_read32(EMAC_RXC_ALLOCT)
124#define bfin_write_EMAC_RXC_ALLOCT(val) bfin_write32(EMAC_RXC_ALLOCT, val)
125#define bfin_read_EMAC_RXC_TYPED() bfin_read32(EMAC_RXC_TYPED)
126#define bfin_write_EMAC_RXC_TYPED(val) bfin_write32(EMAC_RXC_TYPED, val)
127#define bfin_read_EMAC_RXC_SHORT() bfin_read32(EMAC_RXC_SHORT)
128#define bfin_write_EMAC_RXC_SHORT(val) bfin_write32(EMAC_RXC_SHORT, val)
129#define bfin_read_EMAC_RXC_EQ64() bfin_read32(EMAC_RXC_EQ64)
130#define bfin_write_EMAC_RXC_EQ64(val) bfin_write32(EMAC_RXC_EQ64, val)
131#define bfin_read_EMAC_RXC_LT128() bfin_read32(EMAC_RXC_LT128)
132#define bfin_write_EMAC_RXC_LT128(val) bfin_write32(EMAC_RXC_LT128, val)
133#define bfin_read_EMAC_RXC_LT256() bfin_read32(EMAC_RXC_LT256)
134#define bfin_write_EMAC_RXC_LT256(val) bfin_write32(EMAC_RXC_LT256, val)
135#define bfin_read_EMAC_RXC_LT512() bfin_read32(EMAC_RXC_LT512)
136#define bfin_write_EMAC_RXC_LT512(val) bfin_write32(EMAC_RXC_LT512, val)
137#define bfin_read_EMAC_RXC_LT1024() bfin_read32(EMAC_RXC_LT1024)
138#define bfin_write_EMAC_RXC_LT1024(val) bfin_write32(EMAC_RXC_LT1024, val)
139#define bfin_read_EMAC_RXC_GE1024() bfin_read32(EMAC_RXC_GE1024)
140#define bfin_write_EMAC_RXC_GE1024(val) bfin_write32(EMAC_RXC_GE1024, val)
141
142#define bfin_read_EMAC_TXC_OK() bfin_read32(EMAC_TXC_OK)
143#define bfin_write_EMAC_TXC_OK(val) bfin_write32(EMAC_TXC_OK, val)
144#define bfin_read_EMAC_TXC_1COL() bfin_read32(EMAC_TXC_1COL)
145#define bfin_write_EMAC_TXC_1COL(val) bfin_write32(EMAC_TXC_1COL, val)
146#define bfin_read_EMAC_TXC_GT1COL() bfin_read32(EMAC_TXC_GT1COL)
147#define bfin_write_EMAC_TXC_GT1COL(val) bfin_write32(EMAC_TXC_GT1COL, val)
148#define bfin_read_EMAC_TXC_OCTET() bfin_read32(EMAC_TXC_OCTET)
149#define bfin_write_EMAC_TXC_OCTET(val) bfin_write32(EMAC_TXC_OCTET, val)
150#define bfin_read_EMAC_TXC_DEFER() bfin_read32(EMAC_TXC_DEFER)
151#define bfin_write_EMAC_TXC_DEFER(val) bfin_write32(EMAC_TXC_DEFER, val)
152#define bfin_read_EMAC_TXC_LATECL() bfin_read32(EMAC_TXC_LATECL)
153#define bfin_write_EMAC_TXC_LATECL(val) bfin_write32(EMAC_TXC_LATECL, val)
154#define bfin_read_EMAC_TXC_XS_COL() bfin_read32(EMAC_TXC_XS_COL)
155#define bfin_write_EMAC_TXC_XS_COL(val) bfin_write32(EMAC_TXC_XS_COL, val)
156#define bfin_read_EMAC_TXC_DMAUND() bfin_read32(EMAC_TXC_DMAUND)
157#define bfin_write_EMAC_TXC_DMAUND(val) bfin_write32(EMAC_TXC_DMAUND, val)
158#define bfin_read_EMAC_TXC_CRSERR() bfin_read32(EMAC_TXC_CRSERR)
159#define bfin_write_EMAC_TXC_CRSERR(val) bfin_write32(EMAC_TXC_CRSERR, val)
160#define bfin_read_EMAC_TXC_UNICST() bfin_read32(EMAC_TXC_UNICST)
161#define bfin_write_EMAC_TXC_UNICST(val) bfin_write32(EMAC_TXC_UNICST, val)
162#define bfin_read_EMAC_TXC_MULTI() bfin_read32(EMAC_TXC_MULTI)
163#define bfin_write_EMAC_TXC_MULTI(val) bfin_write32(EMAC_TXC_MULTI, val)
164#define bfin_read_EMAC_TXC_BROAD() bfin_read32(EMAC_TXC_BROAD)
165#define bfin_write_EMAC_TXC_BROAD(val) bfin_write32(EMAC_TXC_BROAD, val)
166#define bfin_read_EMAC_TXC_XS_DFR() bfin_read32(EMAC_TXC_XS_DFR)
167#define bfin_write_EMAC_TXC_XS_DFR(val) bfin_write32(EMAC_TXC_XS_DFR, val)
168#define bfin_read_EMAC_TXC_MACCTL() bfin_read32(EMAC_TXC_MACCTL)
169#define bfin_write_EMAC_TXC_MACCTL(val) bfin_write32(EMAC_TXC_MACCTL, val)
170#define bfin_read_EMAC_TXC_ALLFRM() bfin_read32(EMAC_TXC_ALLFRM)
171#define bfin_write_EMAC_TXC_ALLFRM(val) bfin_write32(EMAC_TXC_ALLFRM, val)
172#define bfin_read_EMAC_TXC_ALLOCT() bfin_read32(EMAC_TXC_ALLOCT)
173#define bfin_write_EMAC_TXC_ALLOCT(val) bfin_write32(EMAC_TXC_ALLOCT, val)
174#define bfin_read_EMAC_TXC_EQ64() bfin_read32(EMAC_TXC_EQ64)
175#define bfin_write_EMAC_TXC_EQ64(val) bfin_write32(EMAC_TXC_EQ64, val)
176#define bfin_read_EMAC_TXC_LT128() bfin_read32(EMAC_TXC_LT128)
177#define bfin_write_EMAC_TXC_LT128(val) bfin_write32(EMAC_TXC_LT128, val)
178#define bfin_read_EMAC_TXC_LT256() bfin_read32(EMAC_TXC_LT256)
179#define bfin_write_EMAC_TXC_LT256(val) bfin_write32(EMAC_TXC_LT256, val)
180#define bfin_read_EMAC_TXC_LT512() bfin_read32(EMAC_TXC_LT512)
181#define bfin_write_EMAC_TXC_LT512(val) bfin_write32(EMAC_TXC_LT512, val)
182#define bfin_read_EMAC_TXC_LT1024() bfin_read32(EMAC_TXC_LT1024)
183#define bfin_write_EMAC_TXC_LT1024(val) bfin_write32(EMAC_TXC_LT1024, val)
184#define bfin_read_EMAC_TXC_GE1024() bfin_read32(EMAC_TXC_GE1024)
185#define bfin_write_EMAC_TXC_GE1024(val) bfin_write32(EMAC_TXC_GE1024, val)
186#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT)
187#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val)
188 17
189#define bfin_read_EMAC_PTP_CTL() bfin_read16(EMAC_PTP_CTL) 18#define bfin_read_EMAC_PTP_CTL() bfin_read16(EMAC_PTP_CTL)
190#define bfin_write_EMAC_PTP_CTL(val) bfin_write16(EMAC_PTP_CTL, val) 19#define bfin_write_EMAC_PTP_CTL(val) bfin_write16(EMAC_PTP_CTL, val)
@@ -227,72 +56,4 @@
227#define bfin_read_EMAC_PTP_PPS_PERIOD() bfin_read32(EMAC_PTP_PPS_PERIOD) 56#define bfin_read_EMAC_PTP_PPS_PERIOD() bfin_read32(EMAC_PTP_PPS_PERIOD)
228#define bfin_write_EMAC_PTP_PPS_PERIOD(val) bfin_write32(EMAC_PTP_PPS_PERIOD, val) 57#define bfin_write_EMAC_PTP_PPS_PERIOD(val) bfin_write32(EMAC_PTP_PPS_PERIOD, val)
229 58
230/* Removable Storage Interface Registers */
231
232#define bfin_read_RSI_PWR_CTL() bfin_read16(RSI_PWR_CONTROL)
233#define bfin_write_RSI_PWR_CTL(val) bfin_write16(RSI_PWR_CONTROL, val)
234#define bfin_read_RSI_CLK_CTL() bfin_read16(RSI_CLK_CONTROL)
235#define bfin_write_RSI_CLK_CTL(val) bfin_write16(RSI_CLK_CONTROL, val)
236#define bfin_read_RSI_ARGUMENT() bfin_read32(RSI_ARGUMENT)
237#define bfin_write_RSI_ARGUMENT(val) bfin_write32(RSI_ARGUMENT, val)
238#define bfin_read_RSI_COMMAND() bfin_read16(RSI_COMMAND)
239#define bfin_write_RSI_COMMAND(val) bfin_write16(RSI_COMMAND, val)
240#define bfin_read_RSI_RESP_CMD() bfin_read16(RSI_RESP_CMD)
241#define bfin_write_RSI_RESP_CMD(val) bfin_write16(RSI_RESP_CMD, val)
242#define bfin_read_RSI_RESPONSE0() bfin_read32(RSI_RESPONSE0)
243#define bfin_write_RSI_RESPONSE0(val) bfin_write32(RSI_RESPONSE0, val)
244#define bfin_read_RSI_RESPONSE1() bfin_read32(RSI_RESPONSE1)
245#define bfin_write_RSI_RESPONSE1(val) bfin_write32(RSI_RESPONSE1, val)
246#define bfin_read_RSI_RESPONSE2() bfin_read32(RSI_RESPONSE2)
247#define bfin_write_RSI_RESPONSE2(val) bfin_write32(RSI_RESPONSE2, val)
248#define bfin_read_RSI_RESPONSE3() bfin_read32(RSI_RESPONSE3)
249#define bfin_write_RSI_RESPONSE3(val) bfin_write32(RSI_RESPONSE3, val)
250#define bfin_read_RSI_DATA_TIMER() bfin_read32(RSI_DATA_TIMER)
251#define bfin_write_RSI_DATA_TIMER(val) bfin_write32(RSI_DATA_TIMER, val)
252#define bfin_read_RSI_DATA_LGTH() bfin_read16(RSI_DATA_LGTH)
253#define bfin_write_RSI_DATA_LGTH(val) bfin_write16(RSI_DATA_LGTH, val)
254#define bfin_read_RSI_DATA_CTL() bfin_read16(RSI_DATA_CONTROL)
255#define bfin_write_RSI_DATA_CTL(val) bfin_write16(RSI_DATA_CONTROL, val)
256#define bfin_read_RSI_DATA_CNT() bfin_read16(RSI_DATA_CNT)
257#define bfin_write_RSI_DATA_CNT(val) bfin_write16(RSI_DATA_CNT, val)
258#define bfin_read_RSI_STATUS() bfin_read32(RSI_STATUS)
259#define bfin_write_RSI_STATUS(val) bfin_write32(RSI_STATUS, val)
260#define bfin_read_RSI_STATUS_CLR() bfin_read16(RSI_STATUSCL)
261#define bfin_write_RSI_STATUS_CLR(val) bfin_write16(RSI_STATUSCL, val)
262#define bfin_read_RSI_MASK0() bfin_read32(RSI_MASK0)
263#define bfin_write_RSI_MASK0(val) bfin_write32(RSI_MASK0, val)
264#define bfin_read_RSI_MASK1() bfin_read32(RSI_MASK1)
265#define bfin_write_RSI_MASK1(val) bfin_write32(RSI_MASK1, val)
266#define bfin_read_RSI_FIFO_CNT() bfin_read16(RSI_FIFO_CNT)
267#define bfin_write_RSI_FIFO_CNT(val) bfin_write16(RSI_FIFO_CNT, val)
268#define bfin_read_RSI_CEATA_CTL() bfin_read16(RSI_CEATA_CONTROL)
269#define bfin_write_RSI_CEATA_CTL(val) bfin_write16(RSI_CEATA_CONTROL, val)
270#define bfin_read_RSI_FIFO() bfin_read32(RSI_FIFO)
271#define bfin_write_RSI_FIFO(val) bfin_write32(RSI_FIFO, val)
272#define bfin_read_RSI_E_STATUS() bfin_read16(RSI_ESTAT)
273#define bfin_write_RSI_E_STATUS(val) bfin_write16(RSI_ESTAT, val)
274#define bfin_read_RSI_E_MASK() bfin_read16(RSI_EMASK)
275#define bfin_write_RSI_E_MASK(val) bfin_write16(RSI_EMASK, val)
276#define bfin_read_RSI_CFG() bfin_read16(RSI_CONFIG)
277#define bfin_write_RSI_CFG(val) bfin_write16(RSI_CONFIG, val)
278#define bfin_read_RSI_RD_WAIT_EN() bfin_read16(RSI_RD_WAIT_EN)
279#define bfin_write_RSI_RD_WAIT_EN(val) bfin_write16(RSI_RD_WAIT_EN, val)
280#define bfin_read_RSI_PID0() bfin_read16(RSI_PID0)
281#define bfin_write_RSI_PID0(val) bfin_write16(RSI_PID0, val)
282#define bfin_read_RSI_PID1() bfin_read16(RSI_PID1)
283#define bfin_write_RSI_PID1(val) bfin_write16(RSI_PID1, val)
284#define bfin_read_RSI_PID2() bfin_read16(RSI_PID2)
285#define bfin_write_RSI_PID2(val) bfin_write16(RSI_PID2, val)
286#define bfin_read_RSI_PID3() bfin_read16(RSI_PID3)
287#define bfin_write_RSI_PID3(val) bfin_write16(RSI_PID3, val)
288#define bfin_read_RSI_PID4() bfin_read16(RSI_PID4)
289#define bfin_write_RSI_PID4(val) bfin_write16(RSI_PID4, val)
290#define bfin_read_RSI_PID5() bfin_read16(RSI_PID5)
291#define bfin_write_RSI_PID5(val) bfin_write16(RSI_PID5, val)
292#define bfin_read_RSI_PID6() bfin_read16(RSI_PID6)
293#define bfin_write_RSI_PID6(val) bfin_write16(RSI_PID6, val)
294#define bfin_read_RSI_PID7() bfin_read16(RSI_PID7)
295#define bfin_write_RSI_PID7(val) bfin_write16(RSI_PID7, val)
296
297
298#endif /* _CDEF_BF518_H */ 59#endif /* _CDEF_BF518_H */
diff --git a/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h b/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
index 1d970df7aee9..e548e9d1d6fa 100644
--- a/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
+++ b/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
@@ -131,23 +131,6 @@
131#define bfin_write_UART0_GCTL(val) bfin_write16(UART0_GCTL, val) 131#define bfin_write_UART0_GCTL(val) bfin_write16(UART0_GCTL, val)
132 132
133 133
134/* SPI Controller (0xFFC00500 - 0xFFC005FF) */
135#define bfin_read_SPI_CTL() bfin_read16(SPI_CTL)
136#define bfin_write_SPI_CTL(val) bfin_write16(SPI_CTL, val)
137#define bfin_read_SPI_FLG() bfin_read16(SPI_FLG)
138#define bfin_write_SPI_FLG(val) bfin_write16(SPI_FLG, val)
139#define bfin_read_SPI_STAT() bfin_read16(SPI_STAT)
140#define bfin_write_SPI_STAT(val) bfin_write16(SPI_STAT, val)
141#define bfin_read_SPI_TDBR() bfin_read16(SPI_TDBR)
142#define bfin_write_SPI_TDBR(val) bfin_write16(SPI_TDBR, val)
143#define bfin_read_SPI_RDBR() bfin_read16(SPI_RDBR)
144#define bfin_write_SPI_RDBR(val) bfin_write16(SPI_RDBR, val)
145#define bfin_read_SPI_BAUD() bfin_read16(SPI_BAUD)
146#define bfin_write_SPI_BAUD(val) bfin_write16(SPI_BAUD, val)
147#define bfin_read_SPI_SHADOW() bfin_read16(SPI_SHADOW)
148#define bfin_write_SPI_SHADOW(val) bfin_write16(SPI_SHADOW, val)
149
150
151/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */ 134/* TIMER0-7 Registers (0xFFC00600 - 0xFFC006FF) */
152#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG) 135#define bfin_read_TIMER0_CONFIG() bfin_read16(TIMER0_CONFIG)
153#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG, val) 136#define bfin_write_TIMER0_CONFIG(val) bfin_write16(TIMER0_CONFIG, val)
@@ -844,6 +827,7 @@
844#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val) 827#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val)
845#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS) 828#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
846#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val) 829#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val)
830#define bfin_clear_PPI_STATUS() bfin_write_PPI_STATUS(0xFFFF)
847#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY) 831#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
848#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val) 832#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val)
849#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT) 833#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
@@ -1062,17 +1046,6 @@
1062#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN) 1046#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN)
1063#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val) 1047#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val)
1064 1048
1065/* OTP/FUSE Registers */
1066
1067#define bfin_read_OTP_CONTROL() bfin_read16(OTP_CONTROL)
1068#define bfin_write_OTP_CONTROL(val) bfin_write16(OTP_CONTROL, val)
1069#define bfin_read_OTP_BEN() bfin_read16(OTP_BEN)
1070#define bfin_write_OTP_BEN(val) bfin_write16(OTP_BEN, val)
1071#define bfin_read_OTP_STATUS() bfin_read16(OTP_STATUS)
1072#define bfin_write_OTP_STATUS(val) bfin_write16(OTP_STATUS, val)
1073#define bfin_read_OTP_TIMING() bfin_read32(OTP_TIMING)
1074#define bfin_write_OTP_TIMING(val) bfin_write32(OTP_TIMING, val)
1075
1076/* Security Registers */ 1049/* Security Registers */
1077 1050
1078#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT) 1051#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT)
@@ -1082,52 +1055,6 @@
1082#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS) 1055#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS)
1083#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val) 1056#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val)
1084 1057
1085/* OTP Read/Write Data Buffer Registers */
1086
1087#define bfin_read_OTP_DATA0() bfin_read32(OTP_DATA0)
1088#define bfin_write_OTP_DATA0(val) bfin_write32(OTP_DATA0, val)
1089#define bfin_read_OTP_DATA1() bfin_read32(OTP_DATA1)
1090#define bfin_write_OTP_DATA1(val) bfin_write32(OTP_DATA1, val)
1091#define bfin_read_OTP_DATA2() bfin_read32(OTP_DATA2)
1092#define bfin_write_OTP_DATA2(val) bfin_write32(OTP_DATA2, val)
1093#define bfin_read_OTP_DATA3() bfin_read32(OTP_DATA3)
1094#define bfin_write_OTP_DATA3(val) bfin_write32(OTP_DATA3, val)
1095
1096/* NFC Registers */
1097
1098#define bfin_read_NFC_CTL() bfin_read16(NFC_CTL)
1099#define bfin_write_NFC_CTL(val) bfin_write16(NFC_CTL, val)
1100#define bfin_read_NFC_STAT() bfin_read16(NFC_STAT)
1101#define bfin_write_NFC_STAT(val) bfin_write16(NFC_STAT, val)
1102#define bfin_read_NFC_IRQSTAT() bfin_read16(NFC_IRQSTAT)
1103#define bfin_write_NFC_IRQSTAT(val) bfin_write16(NFC_IRQSTAT, val)
1104#define bfin_read_NFC_IRQMASK() bfin_read16(NFC_IRQMASK)
1105#define bfin_write_NFC_IRQMASK(val) bfin_write16(NFC_IRQMASK, val)
1106#define bfin_read_NFC_ECC0() bfin_read16(NFC_ECC0)
1107#define bfin_write_NFC_ECC0(val) bfin_write16(NFC_ECC0, val)
1108#define bfin_read_NFC_ECC1() bfin_read16(NFC_ECC1)
1109#define bfin_write_NFC_ECC1(val) bfin_write16(NFC_ECC1, val)
1110#define bfin_read_NFC_ECC2() bfin_read16(NFC_ECC2)
1111#define bfin_write_NFC_ECC2(val) bfin_write16(NFC_ECC2, val)
1112#define bfin_read_NFC_ECC3() bfin_read16(NFC_ECC3)
1113#define bfin_write_NFC_ECC3(val) bfin_write16(NFC_ECC3, val)
1114#define bfin_read_NFC_COUNT() bfin_read16(NFC_COUNT)
1115#define bfin_write_NFC_COUNT(val) bfin_write16(NFC_COUNT, val)
1116#define bfin_read_NFC_RST() bfin_read16(NFC_RST)
1117#define bfin_write_NFC_RST(val) bfin_write16(NFC_RST, val)
1118#define bfin_read_NFC_PGCTL() bfin_read16(NFC_PGCTL)
1119#define bfin_write_NFC_PGCTL(val) bfin_write16(NFC_PGCTL, val)
1120#define bfin_read_NFC_READ() bfin_read16(NFC_READ)
1121#define bfin_write_NFC_READ(val) bfin_write16(NFC_READ, val)
1122#define bfin_read_NFC_ADDR() bfin_read16(NFC_ADDR)
1123#define bfin_write_NFC_ADDR(val) bfin_write16(NFC_ADDR, val)
1124#define bfin_read_NFC_CMD() bfin_read16(NFC_CMD)
1125#define bfin_write_NFC_CMD(val) bfin_write16(NFC_CMD, val)
1126#define bfin_read_NFC_DATA_WR() bfin_read16(NFC_DATA_WR)
1127#define bfin_write_NFC_DATA_WR(val) bfin_write16(NFC_DATA_WR, val)
1128#define bfin_read_NFC_DATA_RD() bfin_read16(NFC_DATA_RD)
1129#define bfin_write_NFC_DATA_RD(val) bfin_write16(NFC_DATA_RD, val)
1130
1131/* These need to be last due to the cdef/linux inter-dependencies */ 1058/* These need to be last due to the cdef/linux inter-dependencies */
1132#include <asm/irq.h> 1059#include <asm/irq.h>
1133 1060
diff --git a/arch/blackfin/mach-bf518/include/mach/defBF514.h b/arch/blackfin/mach-bf518/include/mach/defBF514.h
index b5adca23a788..92e950d6e996 100644
--- a/arch/blackfin/mach-bf518/include/mach/defBF514.h
+++ b/arch/blackfin/mach-bf518/include/mach/defBF514.h
@@ -7,49 +7,8 @@
7#ifndef _DEF_BF514_H 7#ifndef _DEF_BF514_H
8#define _DEF_BF514_H 8#define _DEF_BF514_H
9 9
10/* Include all Core registers and bit definitions */ 10/* BF514 is BF512 + RSI */
11#include <asm/def_LPBlackfin.h> 11#include "defBF512.h"
12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF514 */
14
15/* Include defBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
16#include "defBF51x_base.h"
17
18/* The following are the #defines needed by ADSP-BF514 that are not in the common header */
19
20/* SDH Registers */
21
22#define SDH_PWR_CTL 0xFFC03900 /* SDH Power Control */
23#define SDH_CLK_CTL 0xFFC03904 /* SDH Clock Control */
24#define SDH_ARGUMENT 0xFFC03908 /* SDH Argument */
25#define SDH_COMMAND 0xFFC0390C /* SDH Command */
26#define SDH_RESP_CMD 0xFFC03910 /* SDH Response Command */
27#define SDH_RESPONSE0 0xFFC03914 /* SDH Response0 */
28#define SDH_RESPONSE1 0xFFC03918 /* SDH Response1 */
29#define SDH_RESPONSE2 0xFFC0391C /* SDH Response2 */
30#define SDH_RESPONSE3 0xFFC03920 /* SDH Response3 */
31#define SDH_DATA_TIMER 0xFFC03924 /* SDH Data Timer */
32#define SDH_DATA_LGTH 0xFFC03928 /* SDH Data Length */
33#define SDH_DATA_CTL 0xFFC0392C /* SDH Data Control */
34#define SDH_DATA_CNT 0xFFC03930 /* SDH Data Counter */
35#define SDH_STATUS 0xFFC03934 /* SDH Status */
36#define SDH_STATUS_CLR 0xFFC03938 /* SDH Status Clear */
37#define SDH_MASK0 0xFFC0393C /* SDH Interrupt0 Mask */
38#define SDH_MASK1 0xFFC03940 /* SDH Interrupt1 Mask */
39#define SDH_FIFO_CNT 0xFFC03948 /* SDH FIFO Counter */
40#define SDH_FIFO 0xFFC03980 /* SDH Data FIFO */
41#define SDH_E_STATUS 0xFFC039C0 /* SDH Exception Status */
42#define SDH_E_MASK 0xFFC039C4 /* SDH Exception Mask */
43#define SDH_CFG 0xFFC039C8 /* SDH Configuration */
44#define SDH_RD_WAIT_EN 0xFFC039CC /* SDH Read Wait Enable */
45#define SDH_PID0 0xFFC039D0 /* SDH Peripheral Identification0 */
46#define SDH_PID1 0xFFC039D4 /* SDH Peripheral Identification1 */
47#define SDH_PID2 0xFFC039D8 /* SDH Peripheral Identification2 */
48#define SDH_PID3 0xFFC039DC /* SDH Peripheral Identification3 */
49#define SDH_PID4 0xFFC039E0 /* SDH Peripheral Identification4 */
50#define SDH_PID5 0xFFC039E4 /* SDH Peripheral Identification5 */
51#define SDH_PID6 0xFFC039E8 /* SDH Peripheral Identification6 */
52#define SDH_PID7 0xFFC039EC /* SDH Peripheral Identification7 */
53 12
54/* Removable Storage Interface Registers */ 13/* Removable Storage Interface Registers */
55 14
diff --git a/arch/blackfin/mach-bf518/include/mach/defBF516.h b/arch/blackfin/mach-bf518/include/mach/defBF516.h
index 7eb18774d727..22a3aa0d2629 100644
--- a/arch/blackfin/mach-bf518/include/mach/defBF516.h
+++ b/arch/blackfin/mach-bf518/include/mach/defBF516.h
@@ -7,13 +7,8 @@
7#ifndef _DEF_BF516_H 7#ifndef _DEF_BF516_H
8#define _DEF_BF516_H 8#define _DEF_BF516_H
9 9
10/* Include all Core registers and bit definitions */ 10/* BF516 is BF514 + EMAC */
11#include <asm/def_LPBlackfin.h> 11#include "defBF514.h"
12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF516 */
14
15/* Include defBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
16#include "defBF51x_base.h"
17 12
18/* The following are the #defines needed by ADSP-BF516 that are not in the common header */ 13/* The following are the #defines needed by ADSP-BF516 that are not in the common header */
19/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ 14/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
@@ -394,208 +389,4 @@
394#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */ 389#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */
395#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */ 390#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */
396 391
397/* SDH Registers */
398
399#define SDH_PWR_CTL 0xFFC03900 /* SDH Power Control */
400#define SDH_CLK_CTL 0xFFC03904 /* SDH Clock Control */
401#define SDH_ARGUMENT 0xFFC03908 /* SDH Argument */
402#define SDH_COMMAND 0xFFC0390C /* SDH Command */
403#define SDH_RESP_CMD 0xFFC03910 /* SDH Response Command */
404#define SDH_RESPONSE0 0xFFC03914 /* SDH Response0 */
405#define SDH_RESPONSE1 0xFFC03918 /* SDH Response1 */
406#define SDH_RESPONSE2 0xFFC0391C /* SDH Response2 */
407#define SDH_RESPONSE3 0xFFC03920 /* SDH Response3 */
408#define SDH_DATA_TIMER 0xFFC03924 /* SDH Data Timer */
409#define SDH_DATA_LGTH 0xFFC03928 /* SDH Data Length */
410#define SDH_DATA_CTL 0xFFC0392C /* SDH Data Control */
411#define SDH_DATA_CNT 0xFFC03930 /* SDH Data Counter */
412#define SDH_STATUS 0xFFC03934 /* SDH Status */
413#define SDH_STATUS_CLR 0xFFC03938 /* SDH Status Clear */
414#define SDH_MASK0 0xFFC0393C /* SDH Interrupt0 Mask */
415#define SDH_MASK1 0xFFC03940 /* SDH Interrupt1 Mask */
416#define SDH_FIFO_CNT 0xFFC03948 /* SDH FIFO Counter */
417#define SDH_FIFO 0xFFC03980 /* SDH Data FIFO */
418#define SDH_E_STATUS 0xFFC039C0 /* SDH Exception Status */
419#define SDH_E_MASK 0xFFC039C4 /* SDH Exception Mask */
420#define SDH_CFG 0xFFC039C8 /* SDH Configuration */
421#define SDH_RD_WAIT_EN 0xFFC039CC /* SDH Read Wait Enable */
422#define SDH_PID0 0xFFC039D0 /* SDH Peripheral Identification0 */
423#define SDH_PID1 0xFFC039D4 /* SDH Peripheral Identification1 */
424#define SDH_PID2 0xFFC039D8 /* SDH Peripheral Identification2 */
425#define SDH_PID3 0xFFC039DC /* SDH Peripheral Identification3 */
426#define SDH_PID4 0xFFC039E0 /* SDH Peripheral Identification4 */
427#define SDH_PID5 0xFFC039E4 /* SDH Peripheral Identification5 */
428#define SDH_PID6 0xFFC039E8 /* SDH Peripheral Identification6 */
429#define SDH_PID7 0xFFC039EC /* SDH Peripheral Identification7 */
430
431/* Removable Storage Interface Registers */
432
433#define RSI_PWR_CONTROL 0xFFC03800 /* RSI Power Control Register */
434#define RSI_CLK_CONTROL 0xFFC03804 /* RSI Clock Control Register */
435#define RSI_ARGUMENT 0xFFC03808 /* RSI Argument Register */
436#define RSI_COMMAND 0xFFC0380C /* RSI Command Register */
437#define RSI_RESP_CMD 0xFFC03810 /* RSI Response Command Register */
438#define RSI_RESPONSE0 0xFFC03814 /* RSI Response Register */
439#define RSI_RESPONSE1 0xFFC03818 /* RSI Response Register */
440#define RSI_RESPONSE2 0xFFC0381C /* RSI Response Register */
441#define RSI_RESPONSE3 0xFFC03820 /* RSI Response Register */
442#define RSI_DATA_TIMER 0xFFC03824 /* RSI Data Timer Register */
443#define RSI_DATA_LGTH 0xFFC03828 /* RSI Data Length Register */
444#define RSI_DATA_CONTROL 0xFFC0382C /* RSI Data Control Register */
445#define RSI_DATA_CNT 0xFFC03830 /* RSI Data Counter Register */
446#define RSI_STATUS 0xFFC03834 /* RSI Status Register */
447#define RSI_STATUSCL 0xFFC03838 /* RSI Status Clear Register */
448#define RSI_MASK0 0xFFC0383C /* RSI Interrupt 0 Mask Register */
449#define RSI_MASK1 0xFFC03840 /* RSI Interrupt 1 Mask Register */
450#define RSI_FIFO_CNT 0xFFC03848 /* RSI FIFO Counter Register */
451#define RSI_CEATA_CONTROL 0xFFC0384C /* RSI CEATA Register */
452#define RSI_FIFO 0xFFC03880 /* RSI Data FIFO Register */
453#define RSI_ESTAT 0xFFC038C0 /* RSI Exception Status Register */
454#define RSI_EMASK 0xFFC038C4 /* RSI Exception Mask Register */
455#define RSI_CONFIG 0xFFC038C8 /* RSI Configuration Register */
456#define RSI_RD_WAIT_EN 0xFFC038CC /* RSI Read Wait Enable Register */
457#define RSI_PID0 0xFFC03FE0 /* RSI Peripheral ID Register 0 */
458#define RSI_PID1 0xFFC03FE4 /* RSI Peripheral ID Register 1 */
459#define RSI_PID2 0xFFC03FE8 /* RSI Peripheral ID Register 2 */
460#define RSI_PID3 0xFFC03FEC /* RSI Peripheral ID Register 3 */
461#define RSI_PID4 0xFFC03FF0 /* RSI Peripheral ID Register 4 */
462#define RSI_PID5 0xFFC03FF4 /* RSI Peripheral ID Register 5 */
463#define RSI_PID6 0xFFC03FF8 /* RSI Peripheral ID Register 6 */
464#define RSI_PID7 0xFFC03FFC /* RSI Peripheral ID Register 7 */
465
466/* ********************************************************** */
467/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
468/* and MULTI BIT READ MACROS */
469/* ********************************************************** */
470
471/* Bit masks for SDH_COMMAND */
472
473#define CMD_IDX 0x3f /* Command Index */
474#define CMD_RSP 0x40 /* Response */
475#define CMD_L_RSP 0x80 /* Long Response */
476#define CMD_INT_E 0x100 /* Command Interrupt */
477#define CMD_PEND_E 0x200 /* Command Pending */
478#define CMD_E 0x400 /* Command Enable */
479
480/* Bit masks for SDH_PWR_CTL */
481
482#define PWR_ON 0x3 /* Power On */
483#if 0
484#define TBD 0x3c /* TBD */
485#endif
486#define SD_CMD_OD 0x40 /* Open Drain Output */
487#define ROD_CTL 0x80 /* Rod Control */
488
489/* Bit masks for SDH_CLK_CTL */
490
491#define CLKDIV 0xff /* MC_CLK Divisor */
492#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
493#define PWR_SV_E 0x200 /* Power Save Enable */
494#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
495#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
496
497/* Bit masks for SDH_RESP_CMD */
498
499#define RESP_CMD 0x3f /* Response Command */
500
501/* Bit masks for SDH_DATA_CTL */
502
503#define DTX_E 0x1 /* Data Transfer Enable */
504#define DTX_DIR 0x2 /* Data Transfer Direction */
505#define DTX_MODE 0x4 /* Data Transfer Mode */
506#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
507#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
508
509/* Bit masks for SDH_STATUS */
510
511#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
512#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
513#define CMD_TIME_OUT 0x4 /* CMD Time Out */
514#define DAT_TIME_OUT 0x8 /* Data Time Out */
515#define TX_UNDERRUN 0x10 /* Transmit Underrun */
516#define RX_OVERRUN 0x20 /* Receive Overrun */
517#define CMD_RESP_END 0x40 /* CMD Response End */
518#define CMD_SENT 0x80 /* CMD Sent */
519#define DAT_END 0x100 /* Data End */
520#define START_BIT_ERR 0x200 /* Start Bit Error */
521#define DAT_BLK_END 0x400 /* Data Block End */
522#define CMD_ACT 0x800 /* CMD Active */
523#define TX_ACT 0x1000 /* Transmit Active */
524#define RX_ACT 0x2000 /* Receive Active */
525#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
526#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
527#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
528#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
529#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
530#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
531#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
532#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
533
534/* Bit masks for SDH_STATUS_CLR */
535
536#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
537#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
538#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
539#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
540#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
541#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
542#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
543#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
544#define DAT_END_STAT 0x100 /* Data End Status */
545#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
546#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
547
548/* Bit masks for SDH_MASK0 */
549
550#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
551#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
552#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
553#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
554#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
555#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
556#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
557#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
558#define DAT_END_MASK 0x100 /* Data End Mask */
559#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
560#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
561#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
562#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
563#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
564#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
565#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
566#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
567#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
568#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
569#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
570#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
571#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
572
573/* Bit masks for SDH_FIFO_CNT */
574
575#define FIFO_COUNT 0x7fff /* FIFO Count */
576
577/* Bit masks for SDH_E_STATUS */
578
579#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
580#define SD_CARD_DET 0x10 /* SD Card Detect */
581
582/* Bit masks for SDH_E_MASK */
583
584#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
585#define SCD_MSK 0x40 /* Mask Card Detect */
586
587/* Bit masks for SDH_CFG */
588
589#define CLKS_EN 0x1 /* Clocks Enable */
590#define SD4E 0x4 /* SDIO 4-Bit Enable */
591#define MWE 0x8 /* Moving Window Enable */
592#define SD_RST 0x10 /* SDMMC Reset */
593#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
594#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
595#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
596
597/* Bit masks for SDH_RD_WAIT_EN */
598
599#define RWR 0x1 /* Read Wait Request */
600
601#endif /* _DEF_BF516_H */ 392#endif /* _DEF_BF516_H */
diff --git a/arch/blackfin/mach-bf518/include/mach/defBF518.h b/arch/blackfin/mach-bf518/include/mach/defBF518.h
index 794cf06eb5ba..cb18270e55c2 100644
--- a/arch/blackfin/mach-bf518/include/mach/defBF518.h
+++ b/arch/blackfin/mach-bf518/include/mach/defBF518.h
@@ -7,461 +7,8 @@
7#ifndef _DEF_BF518_H 7#ifndef _DEF_BF518_H
8#define _DEF_BF518_H 8#define _DEF_BF518_H
9 9
10/* Include all Core registers and bit definitions */ 10/* BF518 is BF516 + IEEE-1588 */
11#include <asm/def_LPBlackfin.h> 11#include "defBF516.h"
12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF518 */
14
15/* Include defBF51x_base.h for the set of #defines that are common to all ADSP-BF51x processors */
16#include "defBF51x_base.h"
17
18/* The following are the #defines needed by ADSP-BF518 that are not in the common header */
19/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
20
21#define EMAC_OPMODE 0xFFC03000 /* Operating Mode Register */
22#define EMAC_ADDRLO 0xFFC03004 /* Address Low (32 LSBs) Register */
23#define EMAC_ADDRHI 0xFFC03008 /* Address High (16 MSBs) Register */
24#define EMAC_HASHLO 0xFFC0300C /* Multicast Hash Table Low (Bins 31-0) Register */
25#define EMAC_HASHHI 0xFFC03010 /* Multicast Hash Table High (Bins 63-32) Register */
26#define EMAC_STAADD 0xFFC03014 /* Station Management Address Register */
27#define EMAC_STADAT 0xFFC03018 /* Station Management Data Register */
28#define EMAC_FLC 0xFFC0301C /* Flow Control Register */
29#define EMAC_VLAN1 0xFFC03020 /* VLAN1 Tag Register */
30#define EMAC_VLAN2 0xFFC03024 /* VLAN2 Tag Register */
31#define EMAC_WKUP_CTL 0xFFC0302C /* Wake-Up Control/Status Register */
32#define EMAC_WKUP_FFMSK0 0xFFC03030 /* Wake-Up Frame Filter 0 Byte Mask Register */
33#define EMAC_WKUP_FFMSK1 0xFFC03034 /* Wake-Up Frame Filter 1 Byte Mask Register */
34#define EMAC_WKUP_FFMSK2 0xFFC03038 /* Wake-Up Frame Filter 2 Byte Mask Register */
35#define EMAC_WKUP_FFMSK3 0xFFC0303C /* Wake-Up Frame Filter 3 Byte Mask Register */
36#define EMAC_WKUP_FFCMD 0xFFC03040 /* Wake-Up Frame Filter Commands Register */
37#define EMAC_WKUP_FFOFF 0xFFC03044 /* Wake-Up Frame Filter Offsets Register */
38#define EMAC_WKUP_FFCRC0 0xFFC03048 /* Wake-Up Frame Filter 0,1 CRC-16 Register */
39#define EMAC_WKUP_FFCRC1 0xFFC0304C /* Wake-Up Frame Filter 2,3 CRC-16 Register */
40
41#define EMAC_SYSCTL 0xFFC03060 /* EMAC System Control Register */
42#define EMAC_SYSTAT 0xFFC03064 /* EMAC System Status Register */
43#define EMAC_RX_STAT 0xFFC03068 /* RX Current Frame Status Register */
44#define EMAC_RX_STKY 0xFFC0306C /* RX Sticky Frame Status Register */
45#define EMAC_RX_IRQE 0xFFC03070 /* RX Frame Status Interrupt Enables Register */
46#define EMAC_TX_STAT 0xFFC03074 /* TX Current Frame Status Register */
47#define EMAC_TX_STKY 0xFFC03078 /* TX Sticky Frame Status Register */
48#define EMAC_TX_IRQE 0xFFC0307C /* TX Frame Status Interrupt Enables Register */
49
50#define EMAC_MMC_CTL 0xFFC03080 /* MMC Counter Control Register */
51#define EMAC_MMC_RIRQS 0xFFC03084 /* MMC RX Interrupt Status Register */
52#define EMAC_MMC_RIRQE 0xFFC03088 /* MMC RX Interrupt Enables Register */
53#define EMAC_MMC_TIRQS 0xFFC0308C /* MMC TX Interrupt Status Register */
54#define EMAC_MMC_TIRQE 0xFFC03090 /* MMC TX Interrupt Enables Register */
55
56#define EMAC_RXC_OK 0xFFC03100 /* RX Frame Successful Count */
57#define EMAC_RXC_FCS 0xFFC03104 /* RX Frame FCS Failure Count */
58#define EMAC_RXC_ALIGN 0xFFC03108 /* RX Alignment Error Count */
59#define EMAC_RXC_OCTET 0xFFC0310C /* RX Octets Successfully Received Count */
60#define EMAC_RXC_DMAOVF 0xFFC03110 /* Internal MAC Sublayer Error RX Frame Count */
61#define EMAC_RXC_UNICST 0xFFC03114 /* Unicast RX Frame Count */
62#define EMAC_RXC_MULTI 0xFFC03118 /* Multicast RX Frame Count */
63#define EMAC_RXC_BROAD 0xFFC0311C /* Broadcast RX Frame Count */
64#define EMAC_RXC_LNERRI 0xFFC03120 /* RX Frame In Range Error Count */
65#define EMAC_RXC_LNERRO 0xFFC03124 /* RX Frame Out Of Range Error Count */
66#define EMAC_RXC_LONG 0xFFC03128 /* RX Frame Too Long Count */
67#define EMAC_RXC_MACCTL 0xFFC0312C /* MAC Control RX Frame Count */
68#define EMAC_RXC_OPCODE 0xFFC03130 /* Unsupported Op-Code RX Frame Count */
69#define EMAC_RXC_PAUSE 0xFFC03134 /* MAC Control Pause RX Frame Count */
70#define EMAC_RXC_ALLFRM 0xFFC03138 /* Overall RX Frame Count */
71#define EMAC_RXC_ALLOCT 0xFFC0313C /* Overall RX Octet Count */
72#define EMAC_RXC_TYPED 0xFFC03140 /* Type/Length Consistent RX Frame Count */
73#define EMAC_RXC_SHORT 0xFFC03144 /* RX Frame Fragment Count - Byte Count x < 64 */
74#define EMAC_RXC_EQ64 0xFFC03148 /* Good RX Frame Count - Byte Count x = 64 */
75#define EMAC_RXC_LT128 0xFFC0314C /* Good RX Frame Count - Byte Count 64 < x < 128 */
76#define EMAC_RXC_LT256 0xFFC03150 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
77#define EMAC_RXC_LT512 0xFFC03154 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
78#define EMAC_RXC_LT1024 0xFFC03158 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
79#define EMAC_RXC_GE1024 0xFFC0315C /* Good RX Frame Count - Byte Count x >= 1024 */
80
81#define EMAC_TXC_OK 0xFFC03180 /* TX Frame Successful Count */
82#define EMAC_TXC_1COL 0xFFC03184 /* TX Frames Successful After Single Collision Count */
83#define EMAC_TXC_GT1COL 0xFFC03188 /* TX Frames Successful After Multiple Collisions Count */
84#define EMAC_TXC_OCTET 0xFFC0318C /* TX Octets Successfully Received Count */
85#define EMAC_TXC_DEFER 0xFFC03190 /* TX Frame Delayed Due To Busy Count */
86#define EMAC_TXC_LATECL 0xFFC03194 /* Late TX Collisions Count */
87#define EMAC_TXC_XS_COL 0xFFC03198 /* TX Frame Failed Due To Excessive Collisions Count */
88#define EMAC_TXC_DMAUND 0xFFC0319C /* Internal MAC Sublayer Error TX Frame Count */
89#define EMAC_TXC_CRSERR 0xFFC031A0 /* Carrier Sense Deasserted During TX Frame Count */
90#define EMAC_TXC_UNICST 0xFFC031A4 /* Unicast TX Frame Count */
91#define EMAC_TXC_MULTI 0xFFC031A8 /* Multicast TX Frame Count */
92#define EMAC_TXC_BROAD 0xFFC031AC /* Broadcast TX Frame Count */
93#define EMAC_TXC_XS_DFR 0xFFC031B0 /* TX Frames With Excessive Deferral Count */
94#define EMAC_TXC_MACCTL 0xFFC031B4 /* MAC Control TX Frame Count */
95#define EMAC_TXC_ALLFRM 0xFFC031B8 /* Overall TX Frame Count */
96#define EMAC_TXC_ALLOCT 0xFFC031BC /* Overall TX Octet Count */
97#define EMAC_TXC_EQ64 0xFFC031C0 /* Good TX Frame Count - Byte Count x = 64 */
98#define EMAC_TXC_LT128 0xFFC031C4 /* Good TX Frame Count - Byte Count 64 < x < 128 */
99#define EMAC_TXC_LT256 0xFFC031C8 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
100#define EMAC_TXC_LT512 0xFFC031CC /* Good TX Frame Count - Byte Count 256 <= x < 512 */
101#define EMAC_TXC_LT1024 0xFFC031D0 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
102#define EMAC_TXC_GE1024 0xFFC031D4 /* Good TX Frame Count - Byte Count x >= 1024 */
103#define EMAC_TXC_ABORT 0xFFC031D8 /* Total TX Frames Aborted Count */
104
105/* Listing for IEEE-Supported Count Registers */
106
107#define FramesReceivedOK EMAC_RXC_OK /* RX Frame Successful Count */
108#define FrameCheckSequenceErrors EMAC_RXC_FCS /* RX Frame FCS Failure Count */
109#define AlignmentErrors EMAC_RXC_ALIGN /* RX Alignment Error Count */
110#define OctetsReceivedOK EMAC_RXC_OCTET /* RX Octets Successfully Received Count */
111#define FramesLostDueToIntMACRcvError EMAC_RXC_DMAOVF /* Internal MAC Sublayer Error RX Frame Count */
112#define UnicastFramesReceivedOK EMAC_RXC_UNICST /* Unicast RX Frame Count */
113#define MulticastFramesReceivedOK EMAC_RXC_MULTI /* Multicast RX Frame Count */
114#define BroadcastFramesReceivedOK EMAC_RXC_BROAD /* Broadcast RX Frame Count */
115#define InRangeLengthErrors EMAC_RXC_LNERRI /* RX Frame In Range Error Count */
116#define OutOfRangeLengthField EMAC_RXC_LNERRO /* RX Frame Out Of Range Error Count */
117#define FrameTooLongErrors EMAC_RXC_LONG /* RX Frame Too Long Count */
118#define MACControlFramesReceived EMAC_RXC_MACCTL /* MAC Control RX Frame Count */
119#define UnsupportedOpcodesReceived EMAC_RXC_OPCODE /* Unsupported Op-Code RX Frame Count */
120#define PAUSEMACCtrlFramesReceived EMAC_RXC_PAUSE /* MAC Control Pause RX Frame Count */
121#define FramesReceivedAll EMAC_RXC_ALLFRM /* Overall RX Frame Count */
122#define OctetsReceivedAll EMAC_RXC_ALLOCT /* Overall RX Octet Count */
123#define TypedFramesReceived EMAC_RXC_TYPED /* Type/Length Consistent RX Frame Count */
124#define FramesLenLt64Received EMAC_RXC_SHORT /* RX Frame Fragment Count - Byte Count x < 64 */
125#define FramesLenEq64Received EMAC_RXC_EQ64 /* Good RX Frame Count - Byte Count x = 64 */
126#define FramesLen65_127Received EMAC_RXC_LT128 /* Good RX Frame Count - Byte Count 64 < x < 128 */
127#define FramesLen128_255Received EMAC_RXC_LT256 /* Good RX Frame Count - Byte Count 128 <= x < 256 */
128#define FramesLen256_511Received EMAC_RXC_LT512 /* Good RX Frame Count - Byte Count 256 <= x < 512 */
129#define FramesLen512_1023Received EMAC_RXC_LT1024 /* Good RX Frame Count - Byte Count 512 <= x < 1024 */
130#define FramesLen1024_MaxReceived EMAC_RXC_GE1024 /* Good RX Frame Count - Byte Count x >= 1024 */
131
132#define FramesTransmittedOK EMAC_TXC_OK /* TX Frame Successful Count */
133#define SingleCollisionFrames EMAC_TXC_1COL /* TX Frames Successful After Single Collision Count */
134#define MultipleCollisionFrames EMAC_TXC_GT1COL /* TX Frames Successful After Multiple Collisions Count */
135#define OctetsTransmittedOK EMAC_TXC_OCTET /* TX Octets Successfully Received Count */
136#define FramesWithDeferredXmissions EMAC_TXC_DEFER /* TX Frame Delayed Due To Busy Count */
137#define LateCollisions EMAC_TXC_LATECL /* Late TX Collisions Count */
138#define FramesAbortedDueToXSColls EMAC_TXC_XS_COL /* TX Frame Failed Due To Excessive Collisions Count */
139#define FramesLostDueToIntMacXmitError EMAC_TXC_DMAUND /* Internal MAC Sublayer Error TX Frame Count */
140#define CarrierSenseErrors EMAC_TXC_CRSERR /* Carrier Sense Deasserted During TX Frame Count */
141#define UnicastFramesXmittedOK EMAC_TXC_UNICST /* Unicast TX Frame Count */
142#define MulticastFramesXmittedOK EMAC_TXC_MULTI /* Multicast TX Frame Count */
143#define BroadcastFramesXmittedOK EMAC_TXC_BROAD /* Broadcast TX Frame Count */
144#define FramesWithExcessiveDeferral EMAC_TXC_XS_DFR /* TX Frames With Excessive Deferral Count */
145#define MACControlFramesTransmitted EMAC_TXC_MACCTL /* MAC Control TX Frame Count */
146#define FramesTransmittedAll EMAC_TXC_ALLFRM /* Overall TX Frame Count */
147#define OctetsTransmittedAll EMAC_TXC_ALLOCT /* Overall TX Octet Count */
148#define FramesLenEq64Transmitted EMAC_TXC_EQ64 /* Good TX Frame Count - Byte Count x = 64 */
149#define FramesLen65_127Transmitted EMAC_TXC_LT128 /* Good TX Frame Count - Byte Count 64 < x < 128 */
150#define FramesLen128_255Transmitted EMAC_TXC_LT256 /* Good TX Frame Count - Byte Count 128 <= x < 256 */
151#define FramesLen256_511Transmitted EMAC_TXC_LT512 /* Good TX Frame Count - Byte Count 256 <= x < 512 */
152#define FramesLen512_1023Transmitted EMAC_TXC_LT1024 /* Good TX Frame Count - Byte Count 512 <= x < 1024 */
153#define FramesLen1024_MaxTransmitted EMAC_TXC_GE1024 /* Good TX Frame Count - Byte Count x >= 1024 */
154#define TxAbortedFrames EMAC_TXC_ABORT /* Total TX Frames Aborted Count */
155
156/***********************************************************************************
157** System MMR Register Bits And Macros
158**
159** Disclaimer: All macros are intended to make C and Assembly code more readable.
160** Use these macros carefully, as any that do left shifts for field
161** depositing will result in the lower order bits being destroyed. Any
162** macro that shifts left to properly position the bit-field should be
163** used as part of an OR to initialize a register and NOT as a dynamic
164** modifier UNLESS the lower order bits are saved and ORed back in when
165** the macro is used.
166*************************************************************************************/
167
168/************************ ETHERNET 10/100 CONTROLLER MASKS ************************/
169
170/* EMAC_OPMODE Masks */
171
172#define RE 0x00000001 /* Receiver Enable */
173#define ASTP 0x00000002 /* Enable Automatic Pad Stripping On RX Frames */
174#define HU 0x00000010 /* Hash Filter Unicast Address */
175#define HM 0x00000020 /* Hash Filter Multicast Address */
176#define PAM 0x00000040 /* Pass-All-Multicast Mode Enable */
177#define PR 0x00000080 /* Promiscuous Mode Enable */
178#define IFE 0x00000100 /* Inverse Filtering Enable */
179#define DBF 0x00000200 /* Disable Broadcast Frame Reception */
180#define PBF 0x00000400 /* Pass Bad Frames Enable */
181#define PSF 0x00000800 /* Pass Short Frames Enable */
182#define RAF 0x00001000 /* Receive-All Mode */
183#define TE 0x00010000 /* Transmitter Enable */
184#define DTXPAD 0x00020000 /* Disable Automatic TX Padding */
185#define DTXCRC 0x00040000 /* Disable Automatic TX CRC Generation */
186#define DC 0x00080000 /* Deferral Check */
187#define BOLMT 0x00300000 /* Back-Off Limit */
188#define BOLMT_10 0x00000000 /* 10-bit range */
189#define BOLMT_8 0x00100000 /* 8-bit range */
190#define BOLMT_4 0x00200000 /* 4-bit range */
191#define BOLMT_1 0x00300000 /* 1-bit range */
192#define DRTY 0x00400000 /* Disable TX Retry On Collision */
193#define LCTRE 0x00800000 /* Enable TX Retry On Late Collision */
194#define RMII 0x01000000 /* RMII/MII* Mode */
195#define RMII_10 0x02000000 /* Speed Select for RMII Port (10MBit/100MBit*) */
196#define FDMODE 0x04000000 /* Duplex Mode Enable (Full/Half*) */
197#define LB 0x08000000 /* Internal Loopback Enable */
198#define DRO 0x10000000 /* Disable Receive Own Frames (Half-Duplex Mode) */
199
200/* EMAC_STAADD Masks */
201
202#define STABUSY 0x00000001 /* Initiate Station Mgt Reg Access / STA Busy Stat */
203#define STAOP 0x00000002 /* Station Management Operation Code (Write/Read*) */
204#define STADISPRE 0x00000004 /* Disable Preamble Generation */
205#define STAIE 0x00000008 /* Station Mgt. Transfer Done Interrupt Enable */
206#define REGAD 0x000007C0 /* STA Register Address */
207#define PHYAD 0x0000F800 /* PHY Device Address */
208
209#define SET_REGAD(x) (((x)&0x1F)<< 6 ) /* Set STA Register Address */
210#define SET_PHYAD(x) (((x)&0x1F)<< 11 ) /* Set PHY Device Address */
211
212/* EMAC_STADAT Mask */
213
214#define STADATA 0x0000FFFF /* Station Management Data */
215
216/* EMAC_FLC Masks */
217
218#define FLCBUSY 0x00000001 /* Send Flow Ctrl Frame / Flow Ctrl Busy Status */
219#define FLCE 0x00000002 /* Flow Control Enable */
220#define PCF 0x00000004 /* Pass Control Frames */
221#define BKPRSEN 0x00000008 /* Enable Backpressure */
222#define FLCPAUSE 0xFFFF0000 /* Pause Time */
223
224#define SET_FLCPAUSE(x) (((x)&0xFFFF)<< 16) /* Set Pause Time */
225
226/* EMAC_WKUP_CTL Masks */
227
228#define CAPWKFRM 0x00000001 /* Capture Wake-Up Frames */
229#define MPKE 0x00000002 /* Magic Packet Enable */
230#define RWKE 0x00000004 /* Remote Wake-Up Frame Enable */
231#define GUWKE 0x00000008 /* Global Unicast Wake Enable */
232#define MPKS 0x00000020 /* Magic Packet Received Status */
233#define RWKS 0x00000F00 /* Wake-Up Frame Received Status, Filters 3:0 */
234
235/* EMAC_WKUP_FFCMD Masks */
236
237#define WF0_E 0x00000001 /* Enable Wake-Up Filter 0 */
238#define WF0_T 0x00000008 /* Wake-Up Filter 0 Addr Type (Multicast/Unicast*) */
239#define WF1_E 0x00000100 /* Enable Wake-Up Filter 1 */
240#define WF1_T 0x00000800 /* Wake-Up Filter 1 Addr Type (Multicast/Unicast*) */
241#define WF2_E 0x00010000 /* Enable Wake-Up Filter 2 */
242#define WF2_T 0x00080000 /* Wake-Up Filter 2 Addr Type (Multicast/Unicast*) */
243#define WF3_E 0x01000000 /* Enable Wake-Up Filter 3 */
244#define WF3_T 0x08000000 /* Wake-Up Filter 3 Addr Type (Multicast/Unicast*) */
245
246/* EMAC_WKUP_FFOFF Masks */
247
248#define WF0_OFF 0x000000FF /* Wake-Up Filter 0 Pattern Offset */
249#define WF1_OFF 0x0000FF00 /* Wake-Up Filter 1 Pattern Offset */
250#define WF2_OFF 0x00FF0000 /* Wake-Up Filter 2 Pattern Offset */
251#define WF3_OFF 0xFF000000 /* Wake-Up Filter 3 Pattern Offset */
252
253#define SET_WF0_OFF(x) (((x)&0xFF)<< 0 ) /* Set Wake-Up Filter 0 Byte Offset */
254#define SET_WF1_OFF(x) (((x)&0xFF)<< 8 ) /* Set Wake-Up Filter 1 Byte Offset */
255#define SET_WF2_OFF(x) (((x)&0xFF)<< 16 ) /* Set Wake-Up Filter 2 Byte Offset */
256#define SET_WF3_OFF(x) (((x)&0xFF)<< 24 ) /* Set Wake-Up Filter 3 Byte Offset */
257/* Set ALL Offsets */
258#define SET_WF_OFFS(x0,x1,x2,x3) (SET_WF0_OFF((x0))|SET_WF1_OFF((x1))|SET_WF2_OFF((x2))|SET_WF3_OFF((x3)))
259
260/* EMAC_WKUP_FFCRC0 Masks */
261
262#define WF0_CRC 0x0000FFFF /* Wake-Up Filter 0 Pattern CRC */
263#define WF1_CRC 0xFFFF0000 /* Wake-Up Filter 1 Pattern CRC */
264
265#define SET_WF0_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 0 Target CRC */
266#define SET_WF1_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 1 Target CRC */
267
268/* EMAC_WKUP_FFCRC1 Masks */
269
270#define WF2_CRC 0x0000FFFF /* Wake-Up Filter 2 Pattern CRC */
271#define WF3_CRC 0xFFFF0000 /* Wake-Up Filter 3 Pattern CRC */
272
273#define SET_WF2_CRC(x) (((x)&0xFFFF)<< 0 ) /* Set Wake-Up Filter 2 Target CRC */
274#define SET_WF3_CRC(x) (((x)&0xFFFF)<< 16 ) /* Set Wake-Up Filter 3 Target CRC */
275
276/* EMAC_SYSCTL Masks */
277
278#define PHYIE 0x00000001 /* PHY_INT Interrupt Enable */
279#define RXDWA 0x00000002 /* Receive Frame DMA Word Alignment (Odd/Even*) */
280#define RXCKS 0x00000004 /* Enable RX Frame TCP/UDP Checksum Computation */
281#define TXDWA 0x00000010 /* Transmit Frame DMA Word Alignment (Odd/Even*) */
282#define MDCDIV 0x00003F00 /* SCLK:MDC Clock Divisor [MDC=SCLK/(2*(N+1))] */
283
284#define SET_MDCDIV(x) (((x)&0x3F)<< 8) /* Set MDC Clock Divisor */
285
286/* EMAC_SYSTAT Masks */
287
288#define PHYINT 0x00000001 /* PHY_INT Interrupt Status */
289#define MMCINT 0x00000002 /* MMC Counter Interrupt Status */
290#define RXFSINT 0x00000004 /* RX Frame-Status Interrupt Status */
291#define TXFSINT 0x00000008 /* TX Frame-Status Interrupt Status */
292#define WAKEDET 0x00000010 /* Wake-Up Detected Status */
293#define RXDMAERR 0x00000020 /* RX DMA Direction Error Status */
294#define TXDMAERR 0x00000040 /* TX DMA Direction Error Status */
295#define STMDONE 0x00000080 /* Station Mgt. Transfer Done Interrupt Status */
296
297/* EMAC_RX_STAT, EMAC_RX_STKY, and EMAC_RX_IRQE Masks */
298
299#define RX_FRLEN 0x000007FF /* Frame Length In Bytes */
300#define RX_COMP 0x00001000 /* RX Frame Complete */
301#define RX_OK 0x00002000 /* RX Frame Received With No Errors */
302#define RX_LONG 0x00004000 /* RX Frame Too Long Error */
303#define RX_ALIGN 0x00008000 /* RX Frame Alignment Error */
304#define RX_CRC 0x00010000 /* RX Frame CRC Error */
305#define RX_LEN 0x00020000 /* RX Frame Length Error */
306#define RX_FRAG 0x00040000 /* RX Frame Fragment Error */
307#define RX_ADDR 0x00080000 /* RX Frame Address Filter Failed Error */
308#define RX_DMAO 0x00100000 /* RX Frame DMA Overrun Error */
309#define RX_PHY 0x00200000 /* RX Frame PHY Error */
310#define RX_LATE 0x00400000 /* RX Frame Late Collision Error */
311#define RX_RANGE 0x00800000 /* RX Frame Length Field Out of Range Error */
312#define RX_MULTI 0x01000000 /* RX Multicast Frame Indicator */
313#define RX_BROAD 0x02000000 /* RX Broadcast Frame Indicator */
314#define RX_CTL 0x04000000 /* RX Control Frame Indicator */
315#define RX_UCTL 0x08000000 /* Unsupported RX Control Frame Indicator */
316#define RX_TYPE 0x10000000 /* RX Typed Frame Indicator */
317#define RX_VLAN1 0x20000000 /* RX VLAN1 Frame Indicator */
318#define RX_VLAN2 0x40000000 /* RX VLAN2 Frame Indicator */
319#define RX_ACCEPT 0x80000000 /* RX Frame Accepted Indicator */
320
321/* EMAC_TX_STAT, EMAC_TX_STKY, and EMAC_TX_IRQE Masks */
322
323#define TX_COMP 0x00000001 /* TX Frame Complete */
324#define TX_OK 0x00000002 /* TX Frame Sent With No Errors */
325#define TX_ECOLL 0x00000004 /* TX Frame Excessive Collision Error */
326#define TX_LATE 0x00000008 /* TX Frame Late Collision Error */
327#define TX_DMAU 0x00000010 /* TX Frame DMA Underrun Error (STAT) */
328#define TX_MACE 0x00000010 /* Internal MAC Error Detected (STKY and IRQE) */
329#define TX_EDEFER 0x00000020 /* TX Frame Excessive Deferral Error */
330#define TX_BROAD 0x00000040 /* TX Broadcast Frame Indicator */
331#define TX_MULTI 0x00000080 /* TX Multicast Frame Indicator */
332#define TX_CCNT 0x00000F00 /* TX Frame Collision Count */
333#define TX_DEFER 0x00001000 /* TX Frame Deferred Indicator */
334#define TX_CRS 0x00002000 /* TX Frame Carrier Sense Not Asserted Error */
335#define TX_LOSS 0x00004000 /* TX Frame Carrier Lost During TX Error */
336#define TX_RETRY 0x00008000 /* TX Frame Successful After Retry */
337#define TX_FRLEN 0x07FF0000 /* TX Frame Length (Bytes) */
338
339/* EMAC_MMC_CTL Masks */
340#define RSTC 0x00000001 /* Reset All Counters */
341#define CROLL 0x00000002 /* Counter Roll-Over Enable */
342#define CCOR 0x00000004 /* Counter Clear-On-Read Mode Enable */
343#define MMCE 0x00000008 /* Enable MMC Counter Operation */
344
345/* EMAC_MMC_RIRQS and EMAC_MMC_RIRQE Masks */
346#define RX_OK_CNT 0x00000001 /* RX Frames Received With No Errors */
347#define RX_FCS_CNT 0x00000002 /* RX Frames W/Frame Check Sequence Errors */
348#define RX_ALIGN_CNT 0x00000004 /* RX Frames With Alignment Errors */
349#define RX_OCTET_CNT 0x00000008 /* RX Octets Received OK */
350#define RX_LOST_CNT 0x00000010 /* RX Frames Lost Due To Internal MAC RX Error */
351#define RX_UNI_CNT 0x00000020 /* Unicast RX Frames Received OK */
352#define RX_MULTI_CNT 0x00000040 /* Multicast RX Frames Received OK */
353#define RX_BROAD_CNT 0x00000080 /* Broadcast RX Frames Received OK */
354#define RX_IRL_CNT 0x00000100 /* RX Frames With In-Range Length Errors */
355#define RX_ORL_CNT 0x00000200 /* RX Frames With Out-Of-Range Length Errors */
356#define RX_LONG_CNT 0x00000400 /* RX Frames With Frame Too Long Errors */
357#define RX_MACCTL_CNT 0x00000800 /* MAC Control RX Frames Received */
358#define RX_OPCODE_CTL 0x00001000 /* Unsupported Op-Code RX Frames Received */
359#define RX_PAUSE_CNT 0x00002000 /* PAUSEMAC Control RX Frames Received */
360#define RX_ALLF_CNT 0x00004000 /* All RX Frames Received */
361#define RX_ALLO_CNT 0x00008000 /* All RX Octets Received */
362#define RX_TYPED_CNT 0x00010000 /* Typed RX Frames Received */
363#define RX_SHORT_CNT 0x00020000 /* RX Frame Fragments (< 64 Bytes) Received */
364#define RX_EQ64_CNT 0x00040000 /* 64-Byte RX Frames Received */
365#define RX_LT128_CNT 0x00080000 /* 65-127-Byte RX Frames Received */
366#define RX_LT256_CNT 0x00100000 /* 128-255-Byte RX Frames Received */
367#define RX_LT512_CNT 0x00200000 /* 256-511-Byte RX Frames Received */
368#define RX_LT1024_CNT 0x00400000 /* 512-1023-Byte RX Frames Received */
369#define RX_GE1024_CNT 0x00800000 /* 1024-Max-Byte RX Frames Received */
370
371/* EMAC_MMC_TIRQS and EMAC_MMC_TIRQE Masks */
372
373#define TX_OK_CNT 0x00000001 /* TX Frames Sent OK */
374#define TX_SCOLL_CNT 0x00000002 /* TX Frames With Single Collisions */
375#define TX_MCOLL_CNT 0x00000004 /* TX Frames With Multiple Collisions */
376#define TX_OCTET_CNT 0x00000008 /* TX Octets Sent OK */
377#define TX_DEFER_CNT 0x00000010 /* TX Frames With Deferred Transmission */
378#define TX_LATE_CNT 0x00000020 /* TX Frames With Late Collisions */
379#define TX_ABORTC_CNT 0x00000040 /* TX Frames Aborted Due To Excess Collisions */
380#define TX_LOST_CNT 0x00000080 /* TX Frames Lost Due To Internal MAC TX Error */
381#define TX_CRS_CNT 0x00000100 /* TX Frames With Carrier Sense Errors */
382#define TX_UNI_CNT 0x00000200 /* Unicast TX Frames Sent */
383#define TX_MULTI_CNT 0x00000400 /* Multicast TX Frames Sent */
384#define TX_BROAD_CNT 0x00000800 /* Broadcast TX Frames Sent */
385#define TX_EXDEF_CTL 0x00001000 /* TX Frames With Excessive Deferral */
386#define TX_MACCTL_CNT 0x00002000 /* MAC Control TX Frames Sent */
387#define TX_ALLF_CNT 0x00004000 /* All TX Frames Sent */
388#define TX_ALLO_CNT 0x00008000 /* All TX Octets Sent */
389#define TX_EQ64_CNT 0x00010000 /* 64-Byte TX Frames Sent */
390#define TX_LT128_CNT 0x00020000 /* 65-127-Byte TX Frames Sent */
391#define TX_LT256_CNT 0x00040000 /* 128-255-Byte TX Frames Sent */
392#define TX_LT512_CNT 0x00080000 /* 256-511-Byte TX Frames Sent */
393#define TX_LT1024_CNT 0x00100000 /* 512-1023-Byte TX Frames Sent */
394#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */
395#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */
396
397/* SDH Registers */
398
399#define SDH_PWR_CTL 0xFFC03900 /* SDH Power Control */
400#define SDH_CLK_CTL 0xFFC03904 /* SDH Clock Control */
401#define SDH_ARGUMENT 0xFFC03908 /* SDH Argument */
402#define SDH_COMMAND 0xFFC0390C /* SDH Command */
403#define SDH_RESP_CMD 0xFFC03910 /* SDH Response Command */
404#define SDH_RESPONSE0 0xFFC03914 /* SDH Response0 */
405#define SDH_RESPONSE1 0xFFC03918 /* SDH Response1 */
406#define SDH_RESPONSE2 0xFFC0391C /* SDH Response2 */
407#define SDH_RESPONSE3 0xFFC03920 /* SDH Response3 */
408#define SDH_DATA_TIMER 0xFFC03924 /* SDH Data Timer */
409#define SDH_DATA_LGTH 0xFFC03928 /* SDH Data Length */
410#define SDH_DATA_CTL 0xFFC0392C /* SDH Data Control */
411#define SDH_DATA_CNT 0xFFC03930 /* SDH Data Counter */
412#define SDH_STATUS 0xFFC03934 /* SDH Status */
413#define SDH_STATUS_CLR 0xFFC03938 /* SDH Status Clear */
414#define SDH_MASK0 0xFFC0393C /* SDH Interrupt0 Mask */
415#define SDH_MASK1 0xFFC03940 /* SDH Interrupt1 Mask */
416#define SDH_FIFO_CNT 0xFFC03948 /* SDH FIFO Counter */
417#define SDH_FIFO 0xFFC03980 /* SDH Data FIFO */
418#define SDH_E_STATUS 0xFFC039C0 /* SDH Exception Status */
419#define SDH_E_MASK 0xFFC039C4 /* SDH Exception Mask */
420#define SDH_CFG 0xFFC039C8 /* SDH Configuration */
421#define SDH_RD_WAIT_EN 0xFFC039CC /* SDH Read Wait Enable */
422#define SDH_PID0 0xFFC039D0 /* SDH Peripheral Identification0 */
423#define SDH_PID1 0xFFC039D4 /* SDH Peripheral Identification1 */
424#define SDH_PID2 0xFFC039D8 /* SDH Peripheral Identification2 */
425#define SDH_PID3 0xFFC039DC /* SDH Peripheral Identification3 */
426#define SDH_PID4 0xFFC039E0 /* SDH Peripheral Identification4 */
427#define SDH_PID5 0xFFC039E4 /* SDH Peripheral Identification5 */
428#define SDH_PID6 0xFFC039E8 /* SDH Peripheral Identification6 */
429#define SDH_PID7 0xFFC039EC /* SDH Peripheral Identification7 */
430
431/* Removable Storage Interface Registers */
432
433#define RSI_PWR_CONTROL 0xFFC03800 /* RSI Power Control Register */
434#define RSI_CLK_CONTROL 0xFFC03804 /* RSI Clock Control Register */
435#define RSI_ARGUMENT 0xFFC03808 /* RSI Argument Register */
436#define RSI_COMMAND 0xFFC0380C /* RSI Command Register */
437#define RSI_RESP_CMD 0xFFC03810 /* RSI Response Command Register */
438#define RSI_RESPONSE0 0xFFC03814 /* RSI Response Register */
439#define RSI_RESPONSE1 0xFFC03818 /* RSI Response Register */
440#define RSI_RESPONSE2 0xFFC0381C /* RSI Response Register */
441#define RSI_RESPONSE3 0xFFC03820 /* RSI Response Register */
442#define RSI_DATA_TIMER 0xFFC03824 /* RSI Data Timer Register */
443#define RSI_DATA_LGTH 0xFFC03828 /* RSI Data Length Register */
444#define RSI_DATA_CONTROL 0xFFC0382C /* RSI Data Control Register */
445#define RSI_DATA_CNT 0xFFC03830 /* RSI Data Counter Register */
446#define RSI_STATUS 0xFFC03834 /* RSI Status Register */
447#define RSI_STATUSCL 0xFFC03838 /* RSI Status Clear Register */
448#define RSI_MASK0 0xFFC0383C /* RSI Interrupt 0 Mask Register */
449#define RSI_MASK1 0xFFC03840 /* RSI Interrupt 1 Mask Register */
450#define RSI_FIFO_CNT 0xFFC03848 /* RSI FIFO Counter Register */
451#define RSI_CEATA_CONTROL 0xFFC0384C /* RSI CEATA Register */
452#define RSI_FIFO 0xFFC03880 /* RSI Data FIFO Register */
453#define RSI_ESTAT 0xFFC038C0 /* RSI Exception Status Register */
454#define RSI_EMASK 0xFFC038C4 /* RSI Exception Mask Register */
455#define RSI_CONFIG 0xFFC038C8 /* RSI Configuration Register */
456#define RSI_RD_WAIT_EN 0xFFC038CC /* RSI Read Wait Enable Register */
457#define RSI_PID0 0xFFC03FE0 /* RSI Peripheral ID Register 0 */
458#define RSI_PID1 0xFFC03FE4 /* RSI Peripheral ID Register 1 */
459#define RSI_PID2 0xFFC03FE8 /* RSI Peripheral ID Register 2 */
460#define RSI_PID3 0xFFC03FEC /* RSI Peripheral ID Register 3 */
461#define RSI_PID4 0xFFC03FF0 /* RSI Peripheral ID Register 4 */
462#define RSI_PID5 0xFFC03FF4 /* RSI Peripheral ID Register 5 */
463#define RSI_PID6 0xFFC03FF8 /* RSI Peripheral ID Register 6 */
464#define RSI_PID7 0xFFC03FFC /* RSI Peripheral ID Register 7 */
465 12
466/* PTP TSYNC Registers */ 13/* PTP TSYNC Registers */
467 14
@@ -489,141 +36,6 @@
489#define EMAC_PTP_PPS_STARTHI 0xFFC030F4 /* PPS Start Time High */ 36#define EMAC_PTP_PPS_STARTHI 0xFFC030F4 /* PPS Start Time High */
490#define EMAC_PTP_PPS_PERIOD 0xFFC030F8 /* PPS Count Register */ 37#define EMAC_PTP_PPS_PERIOD 0xFFC030F8 /* PPS Count Register */
491 38
492/* ********************************************************** */
493/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
494/* and MULTI BIT READ MACROS */
495/* ********************************************************** */
496
497/* Bit masks for SDH_COMMAND */
498
499#define CMD_IDX 0x3f /* Command Index */
500#define CMD_RSP 0x40 /* Response */
501#define CMD_L_RSP 0x80 /* Long Response */
502#define CMD_INT_E 0x100 /* Command Interrupt */
503#define CMD_PEND_E 0x200 /* Command Pending */
504#define CMD_E 0x400 /* Command Enable */
505
506/* Bit masks for SDH_PWR_CTL */
507
508#define PWR_ON 0x3 /* Power On */
509#if 0
510#define TBD 0x3c /* TBD */
511#endif
512#define SD_CMD_OD 0x40 /* Open Drain Output */
513#define ROD_CTL 0x80 /* Rod Control */
514
515/* Bit masks for SDH_CLK_CTL */
516
517#define CLKDIV 0xff /* MC_CLK Divisor */
518#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
519#define PWR_SV_E 0x200 /* Power Save Enable */
520#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
521#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
522
523/* Bit masks for SDH_RESP_CMD */
524
525#define RESP_CMD 0x3f /* Response Command */
526
527/* Bit masks for SDH_DATA_CTL */
528
529#define DTX_E 0x1 /* Data Transfer Enable */
530#define DTX_DIR 0x2 /* Data Transfer Direction */
531#define DTX_MODE 0x4 /* Data Transfer Mode */
532#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
533#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
534
535/* Bit masks for SDH_STATUS */
536
537#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
538#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
539#define CMD_TIME_OUT 0x4 /* CMD Time Out */
540#define DAT_TIME_OUT 0x8 /* Data Time Out */
541#define TX_UNDERRUN 0x10 /* Transmit Underrun */
542#define RX_OVERRUN 0x20 /* Receive Overrun */
543#define CMD_RESP_END 0x40 /* CMD Response End */
544#define CMD_SENT 0x80 /* CMD Sent */
545#define DAT_END 0x100 /* Data End */
546#define START_BIT_ERR 0x200 /* Start Bit Error */
547#define DAT_BLK_END 0x400 /* Data Block End */
548#define CMD_ACT 0x800 /* CMD Active */
549#define TX_ACT 0x1000 /* Transmit Active */
550#define RX_ACT 0x2000 /* Receive Active */
551#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
552#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
553#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
554#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
555#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
556#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
557#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
558#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
559
560/* Bit masks for SDH_STATUS_CLR */
561
562#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
563#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
564#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
565#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
566#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
567#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
568#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
569#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
570#define DAT_END_STAT 0x100 /* Data End Status */
571#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
572#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
573
574/* Bit masks for SDH_MASK0 */
575
576#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
577#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
578#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
579#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
580#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
581#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
582#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
583#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
584#define DAT_END_MASK 0x100 /* Data End Mask */
585#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
586#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
587#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
588#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
589#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
590#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
591#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
592#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
593#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
594#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
595#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
596#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
597#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
598
599/* Bit masks for SDH_FIFO_CNT */
600
601#define FIFO_COUNT 0x7fff /* FIFO Count */
602
603/* Bit masks for SDH_E_STATUS */
604
605#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
606#define SD_CARD_DET 0x10 /* SD Card Detect */
607
608/* Bit masks for SDH_E_MASK */
609
610#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
611#define SCD_MSK 0x40 /* Mask Card Detect */
612
613/* Bit masks for SDH_CFG */
614
615#define CLKS_EN 0x1 /* Clocks Enable */
616#define SD4E 0x4 /* SDIO 4-Bit Enable */
617#define MWE 0x8 /* Moving Window Enable */
618#define SD_RST 0x10 /* SDMMC Reset */
619#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
620#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
621#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
622
623/* Bit masks for SDH_RD_WAIT_EN */
624
625#define RWR 0x1 /* Read Wait Request */
626
627/* Bit masks for EMAC_PTP_CTL */ 39/* Bit masks for EMAC_PTP_CTL */
628 40
629#define PTP_EN 0x1 /* Enable the PTP_TSYNC module */ 41#define PTP_EN 0x1 /* Enable the PTP_TSYNC module */
diff --git a/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h b/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
index e06f4112c695..9241205fb992 100644
--- a/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
+++ b/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
@@ -542,7 +542,7 @@
542#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */ 542#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */
543#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */ 543#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */
544#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */ 544#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */
545#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshhold Register */ 545#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshold Register */
546#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */ 546#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */
547#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */ 547#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */
548#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */ 548#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */
@@ -550,7 +550,7 @@
550#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */ 550#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */
551#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */ 551#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */
552#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */ 552#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */
553#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshhold Register */ 553#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshold Register */
554#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */ 554#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */
555#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */ 555#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */
556#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */ 556#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */
@@ -585,58 +585,6 @@
585** modifier UNLESS the lower order bits are saved and ORed back in when 585** modifier UNLESS the lower order bits are saved and ORed back in when
586** the macro is used. 586** the macro is used.
587*************************************************************************************/ 587*************************************************************************************/
588/*
589** ********************* PLL AND RESET MASKS ****************************************/
590/* PLL_CTL Masks */
591#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
592#define PLL_OFF 0x0002 /* PLL Not Powered */
593#define STOPCK 0x0008 /* Core Clock Off */
594#define PDWN 0x0020 /* Enter Deep Sleep Mode */
595#define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
596#define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
597#define BYPASS 0x0100 /* Bypass the PLL */
598#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
599/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
600#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
601
602/* PLL_DIV Masks */
603#define SSEL 0x000F /* System Select */
604#define CSEL 0x0030 /* Core Select */
605#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
606#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
607#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
608#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
609/* PLL_DIV Macros */
610#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
611
612/* VR_CTL Masks */
613#define FREQ 0x3000 /* Switching Oscillator Frequency For Regulator */
614#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
615
616#define VLEV 0x00F0 /* Internal Voltage Level */
617#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
618#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
619#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
620#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
621#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
622#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
623#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
624#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
625#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
626#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
627
628#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
629#define USBWE 0x0200 /* Enable USB Wakeup From Hibernate */
630#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
631#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
632#define PHYCLKOE CLKBUFOE /* Alternative legacy name for the above */
633#define SCKELOW 0x8000 /* Enable Drive CKE Low During Reset */
634
635/* PLL_STAT Masks */
636#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
637#define FULL_ON 0x0002 /* Processor In Full On Mode */
638#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
639#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
640 588
641/* CHIPID Masks */ 589/* CHIPID Masks */
642#define CHIPID_VERSION 0xF0000000 590#define CHIPID_VERSION 0xF0000000
@@ -756,66 +704,6 @@
756#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */ 704#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */
757 705
758 706
759/* ********* WATCHDOG TIMER MASKS ******************** */
760
761/* Watchdog Timer WDOG_CTL Register Masks */
762
763#define WDEV(x) (((x)<<1) & 0x0006) /* event generated on roll over */
764#define WDEV_RESET 0x0000 /* generate reset event on roll over */
765#define WDEV_NMI 0x0002 /* generate NMI event on roll over */
766#define WDEV_GPI 0x0004 /* generate GP IRQ on roll over */
767#define WDEV_NONE 0x0006 /* no event on roll over */
768#define WDEN 0x0FF0 /* enable watchdog */
769#define WDDIS 0x0AD0 /* disable watchdog */
770#define WDRO 0x8000 /* watchdog rolled over latch */
771
772/* depreciated WDOG_CTL Register Masks for legacy code */
773
774
775#define ICTL WDEV
776#define ENABLE_RESET WDEV_RESET
777#define WDOG_RESET WDEV_RESET
778#define ENABLE_NMI WDEV_NMI
779#define WDOG_NMI WDEV_NMI
780#define ENABLE_GPI WDEV_GPI
781#define WDOG_GPI WDEV_GPI
782#define DISABLE_EVT WDEV_NONE
783#define WDOG_NONE WDEV_NONE
784
785#define TMR_EN WDEN
786#define TMR_DIS WDDIS
787#define TRO WDRO
788#define ICTL_P0 0x01
789 #define ICTL_P1 0x02
790#define TRO_P 0x0F
791
792
793
794/* *************** REAL TIME CLOCK MASKS **************************/
795/* RTC_STAT and RTC_ALARM Masks */
796#define RTC_SEC 0x0000003F /* Real-Time Clock Seconds */
797#define RTC_MIN 0x00000FC0 /* Real-Time Clock Minutes */
798#define RTC_HR 0x0001F000 /* Real-Time Clock Hours */
799#define RTC_DAY 0xFFFE0000 /* Real-Time Clock Days */
800
801/* RTC_ALARM Macro z=day y=hr x=min w=sec */
802#define SET_ALARM(z,y,x,w) ((((z)&0x7FFF)<<0x11)|(((y)&0x1F)<<0xC)|(((x)&0x3F)<<0x6)|((w)&0x3F))
803
804/* RTC_ICTL and RTC_ISTAT Masks */
805#define STOPWATCH 0x0001 /* Stopwatch Interrupt Enable */
806#define ALARM 0x0002 /* Alarm Interrupt Enable */
807#define SECOND 0x0004 /* Seconds (1 Hz) Interrupt Enable */
808#define MINUTE 0x0008 /* Minutes Interrupt Enable */
809#define HOUR 0x0010 /* Hours Interrupt Enable */
810#define DAY 0x0020 /* 24 Hours (Days) Interrupt Enable */
811#define DAY_ALARM 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */
812#define WRITE_PENDING 0x4000 /* Write Pending Status */
813#define WRITE_COMPLETE 0x8000 /* Write Complete Interrupt Enable */
814
815/* RTC_FAST / RTC_PREN Mask */
816#define PREN 0x0001 /* Enable Prescaler, RTC Runs @1 Hz */
817
818
819/* ************** UART CONTROLLER MASKS *************************/ 707/* ************** UART CONTROLLER MASKS *************************/
820/* UARTx_LCR Masks */ 708/* UARTx_LCR Masks */
821#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */ 709#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */
@@ -1372,33 +1260,6 @@
1372 1260
1373 1261
1374/* ************************** DMA CONTROLLER MASKS ********************************/ 1262/* ************************** DMA CONTROLLER MASKS ********************************/
1375/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1376#define DMAEN 0x0001 /* DMA Channel Enable */
1377#define WNR 0x0002 /* Channel Direction (W/R*) */
1378#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
1379#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
1380#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
1381#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
1382#define RESTART 0x0020 /* DMA Buffer Clear */
1383#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
1384#define DI_EN 0x0080 /* Data Interrupt Enable */
1385#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1386#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1387#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1388#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1389#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1390#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1391#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1392#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1393#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1394#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1395#define NDSIZE 0x0900 /* Next Descriptor Size */
1396#define DMAFLOW 0x7000 /* Flow Control */
1397#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1398#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1399#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1400#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1401#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1402 1263
1403/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */ 1264/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1404#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */ 1265#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */
@@ -1416,13 +1277,6 @@
1416#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */ 1277#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */
1417#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */ 1278#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */
1418 1279
1419/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1420#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
1421#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
1422#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
1423#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
1424
1425
1426/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/ 1280/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/
1427/* PPI_CONTROL Masks */ 1281/* PPI_CONTROL Masks */
1428#define PORT_EN 0x0001 /* PPI Port Enable */ 1282#define PORT_EN 0x0001 /* PPI Port Enable */
@@ -1830,46 +1684,6 @@
1830#define BNDMODE_CAPT 0x2000 /* boundary capture mode */ 1684#define BNDMODE_CAPT 0x2000 /* boundary capture mode */
1831#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */ 1685#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */
1832 1686
1833/* Bit masks for OTP_CONTROL */
1834
1835#define FUSE_FADDR 0x1ff /* OTP/Fuse Address */
1836#define FIEN 0x800 /* OTP/Fuse Interrupt Enable */
1837#define nFIEN 0x0
1838#define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */
1839#define nFTESTDEC 0x0
1840#define FWRTEST 0x2000 /* OTP/Fuse Write Test */
1841#define nFWRTEST 0x0
1842#define FRDEN 0x4000 /* OTP/Fuse Read Enable */
1843#define nFRDEN 0x0
1844#define FWREN 0x8000 /* OTP/Fuse Write Enable */
1845#define nFWREN 0x0
1846
1847/* Bit masks for OTP_BEN */
1848
1849#define FBEN 0xffff /* OTP/Fuse Byte Enable */
1850
1851/* Bit masks for OTP_STATUS */
1852
1853#define FCOMP 0x1 /* OTP/Fuse Access Complete */
1854#define nFCOMP 0x0
1855#define FERROR 0x2 /* OTP/Fuse Access Error */
1856#define nFERROR 0x0
1857#define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */
1858#define nMMRGLOAD 0x0
1859#define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */
1860#define nMMRGLOCK 0x0
1861#define FPGMEN 0x40 /* OTP/Fuse Program Enable */
1862#define nFPGMEN 0x0
1863
1864/* Bit masks for OTP_TIMING */
1865
1866#define USECDIV 0xff /* Micro Second Divider */
1867#define READACC 0x7f00 /* Read Access Time */
1868#define CPUMPRL 0x38000 /* Charge Pump Release Time */
1869#define CPUMPSU 0xc0000 /* Charge Pump Setup Time */
1870#define CPUMPHD 0xf00000 /* Charge Pump Hold Time */
1871#define PGMTIME 0xff000000 /* Program Time */
1872
1873/* Bit masks for SECURE_SYSSWT */ 1687/* Bit masks for SECURE_SYSSWT */
1874 1688
1875#define EMUDABL 0x1 /* Emulation Disable. */ 1689#define EMUDABL 0x1 /* Emulation Disable. */
diff --git a/arch/blackfin/mach-bf527/Kconfig b/arch/blackfin/mach-bf527/Kconfig
index 848ac6f86823..1f8cbe9d6b9a 100644
--- a/arch/blackfin/mach-bf527/Kconfig
+++ b/arch/blackfin/mach-bf527/Kconfig
@@ -1,3 +1,7 @@
1config BF52x
2 def_bool y
3 depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527)
4
1if (BF52x) 5if (BF52x)
2 6
3source "arch/blackfin/mach-bf527/boards/Kconfig" 7source "arch/blackfin/mach-bf527/boards/Kconfig"
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index f1996b13a3da..7ab0800e2914 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -15,9 +15,6 @@
15#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 16#include <linux/spi/flash.h>
17#include <linux/etherdevice.h> 17#include <linux/etherdevice.h>
18#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
19#include <linux/usb/isp1362.h>
20#endif
21#include <linux/i2c.h> 18#include <linux/i2c.h>
22#include <linux/irq.h> 19#include <linux/irq.h>
23#include <linux/interrupt.h> 20#include <linux/interrupt.h>
@@ -65,7 +62,7 @@ static struct isp1760_platform_data isp1760_priv = {
65}; 62};
66 63
67static struct platform_device bfin_isp1760_device = { 64static struct platform_device bfin_isp1760_device = {
68 .name = "isp1760-hcd", 65 .name = "isp1760",
69 .id = 0, 66 .id = 0,
70 .dev = { 67 .dev = {
71 .platform_data = &isp1760_priv, 68 .platform_data = &isp1760_priv,
@@ -317,45 +314,6 @@ static struct platform_device sl811_hcd_device = {
317}; 314};
318#endif 315#endif
319 316
320#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
321static struct resource isp1362_hcd_resources[] = {
322 {
323 .start = 0x20360000,
324 .end = 0x20360000,
325 .flags = IORESOURCE_MEM,
326 }, {
327 .start = 0x20360004,
328 .end = 0x20360004,
329 .flags = IORESOURCE_MEM,
330 }, {
331 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
332 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
333 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
334 },
335};
336
337static struct isp1362_platform_data isp1362_priv = {
338 .sel15Kres = 1,
339 .clknotstop = 0,
340 .oc_enable = 0,
341 .int_act_high = 0,
342 .int_edge_triggered = 0,
343 .remote_wakeup_connected = 0,
344 .no_power_switching = 1,
345 .power_switching_mode = 0,
346};
347
348static struct platform_device isp1362_hcd_device = {
349 .name = "isp1362-hcd",
350 .id = 0,
351 .dev = {
352 .platform_data = &isp1362_priv,
353 },
354 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
355 .resource = isp1362_hcd_resources,
356};
357#endif
358
359#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 317#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
360static struct platform_device bfin_mii_bus = { 318static struct platform_device bfin_mii_bus = {
361 .name = "bfin_mii_bus", 319 .name = "bfin_mii_bus",
@@ -841,10 +799,6 @@ static struct platform_device *cmbf527_devices[] __initdata = {
841 &sl811_hcd_device, 799 &sl811_hcd_device,
842#endif 800#endif
843 801
844#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
845 &isp1362_hcd_device,
846#endif
847
848#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 802#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
849 &bfin_isp1760_device, 803 &bfin_isp1760_device,
850#endif 804#endif
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index f09665f74ba0..5294fdd20732 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -13,9 +13,6 @@
13#include <linux/mtd/physmap.h> 13#include <linux/mtd/physmap.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
17#include <linux/usb/isp1362.h>
18#endif
19#include <linux/i2c.h> 16#include <linux/i2c.h>
20#include <linux/irq.h> 17#include <linux/irq.h>
21#include <linux/interrupt.h> 18#include <linux/interrupt.h>
@@ -63,7 +60,7 @@ static struct isp1760_platform_data isp1760_priv = {
63}; 60};
64 61
65static struct platform_device bfin_isp1760_device = { 62static struct platform_device bfin_isp1760_device = {
66 .name = "isp1760-hcd", 63 .name = "isp1760",
67 .id = 0, 64 .id = 0,
68 .dev = { 65 .dev = {
69 .platform_data = &isp1760_priv, 66 .platform_data = &isp1760_priv,
@@ -373,45 +370,6 @@ static struct platform_device sl811_hcd_device = {
373}; 370};
374#endif 371#endif
375 372
376#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
377static struct resource isp1362_hcd_resources[] = {
378 {
379 .start = 0x20360000,
380 .end = 0x20360000,
381 .flags = IORESOURCE_MEM,
382 }, {
383 .start = 0x20360004,
384 .end = 0x20360004,
385 .flags = IORESOURCE_MEM,
386 }, {
387 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
388 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
389 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
390 },
391};
392
393static struct isp1362_platform_data isp1362_priv = {
394 .sel15Kres = 1,
395 .clknotstop = 0,
396 .oc_enable = 0,
397 .int_act_high = 0,
398 .int_edge_triggered = 0,
399 .remote_wakeup_connected = 0,
400 .no_power_switching = 1,
401 .power_switching_mode = 0,
402};
403
404static struct platform_device isp1362_hcd_device = {
405 .name = "isp1362-hcd",
406 .id = 0,
407 .dev = {
408 .platform_data = &isp1362_priv,
409 },
410 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
411 .resource = isp1362_hcd_resources,
412};
413#endif
414
415#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 373#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
416static struct platform_device bfin_mii_bus = { 374static struct platform_device bfin_mii_bus = {
417 .name = "bfin_mii_bus", 375 .name = "bfin_mii_bus",
@@ -688,12 +646,6 @@ static struct platform_device bfin_spi0_device = {
688}; 646};
689#endif /* spi master and devices */ 647#endif /* spi master and devices */
690 648
691#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
692static struct platform_device bfin_fb_device = {
693 .name = "bf537-lq035",
694};
695#endif
696
697#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 649#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
698static struct resource bfin_uart_resources[] = { 650static struct resource bfin_uart_resources[] = {
699#ifdef CONFIG_SERIAL_BFIN_UART0 651#ifdef CONFIG_SERIAL_BFIN_UART0
@@ -850,7 +802,7 @@ static struct platform_device bfin_device_gpiokeys = {
850}; 802};
851#endif 803#endif
852 804
853#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) 805#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
854#include <linux/input.h> 806#include <linux/input.h>
855#include <asm/bfin_rotary.h> 807#include <asm/bfin_rotary.h>
856 808
@@ -924,10 +876,6 @@ static struct platform_device *stamp_devices[] __initdata = {
924 &sl811_hcd_device, 876 &sl811_hcd_device,
925#endif 877#endif
926 878
927#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
928 &isp1362_hcd_device,
929#endif
930
931#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 879#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
932 &bfin_isp1760_device, 880 &bfin_isp1760_device,
933#endif 881#endif
@@ -957,10 +905,6 @@ static struct platform_device *stamp_devices[] __initdata = {
957 &bfin_spi0_device, 905 &bfin_spi0_device,
958#endif 906#endif
959 907
960#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
961 &bfin_fb_device,
962#endif
963
964#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 908#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
965 &bf52x_t350mcqb_device, 909 &bf52x_t350mcqb_device,
966#endif 910#endif
@@ -991,7 +935,7 @@ static struct platform_device *stamp_devices[] __initdata = {
991 &bfin_device_gpiokeys, 935 &bfin_device_gpiokeys,
992#endif 936#endif
993 937
994#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) 938#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
995 &bfin_rotary_device, 939 &bfin_rotary_device,
996#endif 940#endif
997 941
diff --git a/arch/blackfin/mach-bf527/include/mach/blackfin.h b/arch/blackfin/mach-bf527/include/mach/blackfin.h
index e7d6034f268f..f714c5de3073 100644
--- a/arch/blackfin/mach-bf527/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf527/include/mach/blackfin.h
@@ -46,10 +46,4 @@
46#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 46#define OFFSET_SCR 0x1C /* SCR Scratch Register */
47#define OFFSET_GCTL 0x24 /* Global Control Register */ 47#define OFFSET_GCTL 0x24 /* Global Control Register */
48 48
49/* PLL_DIV Masks */
50#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
51#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
52#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
53#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
54
55#endif 49#endif
diff --git a/arch/blackfin/mach-bf527/include/mach/cdefBF525.h b/arch/blackfin/mach-bf527/include/mach/cdefBF525.h
index dc3119e9f663..d7e2751c6bcc 100644
--- a/arch/blackfin/mach-bf527/include/mach/cdefBF525.h
+++ b/arch/blackfin/mach-bf527/include/mach/cdefBF525.h
@@ -10,15 +10,8 @@
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF525.h" 11#include "defBF525.h"
12 12
13/* include core specific register pointer definitions */ 13/* BF525 is BF522 + USB */
14#include <asm/cdef_LPBlackfin.h> 14#include "cdefBF522.h"
15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF525 */
17
18/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
19#include "cdefBF52x_base.h"
20
21/* The following are the #defines needed by ADSP-BF525 that are not in the common header */
22 15
23/* USB Control Registers */ 16/* USB Control Registers */
24 17
diff --git a/arch/blackfin/mach-bf527/include/mach/cdefBF527.h b/arch/blackfin/mach-bf527/include/mach/cdefBF527.h
index d6579449ee46..c7ba544d50b6 100644
--- a/arch/blackfin/mach-bf527/include/mach/cdefBF527.h
+++ b/arch/blackfin/mach-bf527/include/mach/cdefBF527.h
@@ -10,15 +10,8 @@
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF527.h" 11#include "defBF527.h"
12 12
13/* include core specific register pointer definitions */ 13/* BF527 is BF525 + EMAC */
14#include <asm/cdef_LPBlackfin.h> 14#include "cdefBF525.h"
15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */
17
18/* include cdefBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
19#include "cdefBF52x_base.h"
20
21/* The following are the #defines needed by ADSP-BF527 that are not in the common header */
22 15
23/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ 16/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
24 17
@@ -185,417 +178,4 @@
185#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT) 178#define bfin_read_EMAC_TXC_ABORT() bfin_read32(EMAC_TXC_ABORT)
186#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val) 179#define bfin_write_EMAC_TXC_ABORT(val) bfin_write32(EMAC_TXC_ABORT, val)
187 180
188/* USB Control Registers */
189
190#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
191#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
192#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
193#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
194#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
195#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
196#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
197#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
198#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
199#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
200#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
201#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
202#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
203#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
204#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
205#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
206#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
207#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
208#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
209#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
210#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
211#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
212#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
213#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
214#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
215#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
216
217/* USB Packet Control Registers */
218
219#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
220#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
221#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
222#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
223#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
224#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
225#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
226#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
227#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
228#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
229#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
230#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
231#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
232#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
233#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
234#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
235#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
236#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
237#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
238#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
239#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
240#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
241#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
242#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
243#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
244#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
245
246/* USB Endpoint FIFO Registers */
247
248#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
249#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
250#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
251#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
252#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
253#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
254#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
255#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
256#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
257#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
258#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
259#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
260#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
261#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
262#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
263#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
264
265/* USB OTG Control Registers */
266
267#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
268#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
269#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
270#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
271#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
272#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
273
274/* USB Phy Control Registers */
275
276#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
277#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
278#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
279#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
280#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
281#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
282#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
283#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
284#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
285#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
286
287/* (APHY_CNTRL is for ADI usage only) */
288
289#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
290#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
291
292/* (APHY_CALIB is for ADI usage only) */
293
294#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
295#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
296
297#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
298#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
299
300/* (PHY_TEST is for ADI usage only) */
301
302#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
303#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
304
305#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
306#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
307#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
308#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
309
310/* USB Endpoint 0 Control Registers */
311
312#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
313#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
314#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
315#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
316#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
317#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
318#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
319#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
320#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
321#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
322#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
323#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
324#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
325#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
326#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
327#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
328#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
329#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
330#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
331#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
332
333/* USB Endpoint 1 Control Registers */
334
335#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
336#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
337#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
338#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
339#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
340#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
341#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
342#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
343#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
344#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
345#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
346#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
347#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
348#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
349#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
350#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
351#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
352#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
353#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
354#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
355
356/* USB Endpoint 2 Control Registers */
357
358#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
359#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
360#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
361#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
362#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
363#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
364#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
365#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
366#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
367#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
368#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
369#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
370#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
371#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
372#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
373#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
374#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
375#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
376#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
377#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
378
379/* USB Endpoint 3 Control Registers */
380
381#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
382#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
383#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
384#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
385#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
386#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
387#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
388#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
389#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
390#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
391#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
392#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
393#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
394#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
395#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
396#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
397#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
398#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
399#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
400#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
401
402/* USB Endpoint 4 Control Registers */
403
404#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
405#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
406#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
407#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
408#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
409#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
410#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
411#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
412#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
413#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
414#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
415#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
416#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
417#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
418#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
419#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
420#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
421#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
422#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
423#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
424
425/* USB Endpoint 5 Control Registers */
426
427#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
428#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
429#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
430#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
431#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
432#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
433#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
434#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
435#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
436#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
437#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
438#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
439#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
440#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
441#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
442#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
443#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
444#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
445#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
446#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
447
448/* USB Endpoint 6 Control Registers */
449
450#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
451#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
452#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
453#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
454#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
455#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
456#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
457#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
458#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
459#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
460#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
461#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
462#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
463#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
464#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
465#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
466#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
467#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
468#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
469#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
470
471/* USB Endpoint 7 Control Registers */
472
473#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
474#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
475#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
476#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
477#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
478#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
479#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
480#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
481#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
482#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
483#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
484#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
485#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
486#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
487#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
488#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
489#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
490#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
491#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
492#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
493
494#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
495#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
496
497/* USB Channel 0 Config Registers */
498
499#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
500#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
501#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
502#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
503#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
504#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
505#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
506#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
507#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
508#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
509
510/* USB Channel 1 Config Registers */
511
512#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
513#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
514#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
515#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
516#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
517#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
518#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
519#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
520#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
521#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
522
523/* USB Channel 2 Config Registers */
524
525#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
526#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
527#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
528#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
529#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
530#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
531#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
532#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
533#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
534#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
535
536/* USB Channel 3 Config Registers */
537
538#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
539#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
540#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
541#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
542#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
543#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
544#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
545#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
546#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
547#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
548
549/* USB Channel 4 Config Registers */
550
551#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
552#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
553#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
554#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
555#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
556#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
557#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
558#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
559#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
560#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
561
562/* USB Channel 5 Config Registers */
563
564#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
565#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
566#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
567#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
568#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
569#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
570#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
571#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
572#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
573#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
574
575/* USB Channel 6 Config Registers */
576
577#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
578#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
579#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
580#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
581#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
582#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
583#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
584#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
585#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
586#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
587
588/* USB Channel 7 Config Registers */
589
590#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
591#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
592#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
593#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
594#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
595#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
596#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
597#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
598#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
599#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
600
601#endif /* _CDEF_BF527_H */ 181#endif /* _CDEF_BF527_H */
diff --git a/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
index 7014dde10dd6..12f2ad45314e 100644
--- a/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
+++ b/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
@@ -844,6 +844,7 @@
844#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val) 844#define bfin_write_PPI_CONTROL(val) bfin_write16(PPI_CONTROL, val)
845#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS) 845#define bfin_read_PPI_STATUS() bfin_read16(PPI_STATUS)
846#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val) 846#define bfin_write_PPI_STATUS(val) bfin_write16(PPI_STATUS, val)
847#define bfin_clear_PPI_STATUS() bfin_write_PPI_STATUS(0xFFFF)
847#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY) 848#define bfin_read_PPI_DELAY() bfin_read16(PPI_DELAY)
848#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val) 849#define bfin_write_PPI_DELAY(val) bfin_write16(PPI_DELAY, val)
849#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT) 850#define bfin_read_PPI_COUNT() bfin_read16(PPI_COUNT)
@@ -1062,17 +1063,6 @@
1062#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN) 1063#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN)
1063#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val) 1064#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val)
1064 1065
1065/* OTP/FUSE Registers */
1066
1067#define bfin_read_OTP_CONTROL() bfin_read16(OTP_CONTROL)
1068#define bfin_write_OTP_CONTROL(val) bfin_write16(OTP_CONTROL, val)
1069#define bfin_read_OTP_BEN() bfin_read16(OTP_BEN)
1070#define bfin_write_OTP_BEN(val) bfin_write16(OTP_BEN, val)
1071#define bfin_read_OTP_STATUS() bfin_read16(OTP_STATUS)
1072#define bfin_write_OTP_STATUS(val) bfin_write16(OTP_STATUS, val)
1073#define bfin_read_OTP_TIMING() bfin_read32(OTP_TIMING)
1074#define bfin_write_OTP_TIMING(val) bfin_write32(OTP_TIMING, val)
1075
1076/* Security Registers */ 1066/* Security Registers */
1077 1067
1078#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT) 1068#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT)
@@ -1082,17 +1072,6 @@
1082#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS) 1072#define bfin_read_SECURE_STATUS() bfin_read16(SECURE_STATUS)
1083#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val) 1073#define bfin_write_SECURE_STATUS(val) bfin_write16(SECURE_STATUS, val)
1084 1074
1085/* OTP Read/Write Data Buffer Registers */
1086
1087#define bfin_read_OTP_DATA0() bfin_read32(OTP_DATA0)
1088#define bfin_write_OTP_DATA0(val) bfin_write32(OTP_DATA0, val)
1089#define bfin_read_OTP_DATA1() bfin_read32(OTP_DATA1)
1090#define bfin_write_OTP_DATA1(val) bfin_write32(OTP_DATA1, val)
1091#define bfin_read_OTP_DATA2() bfin_read32(OTP_DATA2)
1092#define bfin_write_OTP_DATA2(val) bfin_write32(OTP_DATA2, val)
1093#define bfin_read_OTP_DATA3() bfin_read32(OTP_DATA3)
1094#define bfin_write_OTP_DATA3(val) bfin_write32(OTP_DATA3, val)
1095
1096/* NFC Registers */ 1075/* NFC Registers */
1097 1076
1098#define bfin_read_NFC_CTL() bfin_read16(NFC_CTL) 1077#define bfin_read_NFC_CTL() bfin_read16(NFC_CTL)
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF525.h b/arch/blackfin/mach-bf527/include/mach/defBF525.h
index 82abefc1ef6c..c136f7032962 100644
--- a/arch/blackfin/mach-bf527/include/mach/defBF525.h
+++ b/arch/blackfin/mach-bf527/include/mach/defBF525.h
@@ -7,15 +7,8 @@
7#ifndef _DEF_BF525_H 7#ifndef _DEF_BF525_H
8#define _DEF_BF525_H 8#define _DEF_BF525_H
9 9
10/* Include all Core registers and bit definitions */ 10/* BF525 is BF522 + USB */
11#include <asm/def_LPBlackfin.h> 11#include "defBF522.h"
12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF525 */
14
15/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
16#include "defBF52x_base.h"
17
18/* The following are the #defines needed by ADSP-BF525 that are not in the common header */
19 12
20/* USB Control Registers */ 13/* USB Control Registers */
21 14
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF527.h b/arch/blackfin/mach-bf527/include/mach/defBF527.h
index 570a125df025..4dd58fb33156 100644
--- a/arch/blackfin/mach-bf527/include/mach/defBF527.h
+++ b/arch/blackfin/mach-bf527/include/mach/defBF527.h
@@ -7,15 +7,9 @@
7#ifndef _DEF_BF527_H 7#ifndef _DEF_BF527_H
8#define _DEF_BF527_H 8#define _DEF_BF527_H
9 9
10/* Include all Core registers and bit definitions */ 10/* BF527 is BF525 + EMAC */
11#include <asm/def_LPBlackfin.h> 11#include "defBF525.h"
12 12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF527 */
14
15/* Include defBF52x_base.h for the set of #defines that are common to all ADSP-BF52x processors */
16#include "defBF52x_base.h"
17
18/* The following are the #defines needed by ADSP-BF527 that are not in the common header */
19/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */ 13/* 10/100 Ethernet Controller (0xFFC03000 - 0xFFC031FF) */
20 14
21#define EMAC_OPMODE 0xFFC03000 /* Operating Mode Register */ 15#define EMAC_OPMODE 0xFFC03000 /* Operating Mode Register */
@@ -394,673 +388,4 @@
394#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */ 388#define TX_GE1024_CNT 0x00200000 /* 1024-Max-Byte TX Frames Sent */
395#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */ 389#define TX_ABORT_CNT 0x00400000 /* TX Frames Aborted */
396 390
397/* USB Control Registers */
398
399#define USB_FADDR 0xffc03800 /* Function address register */
400#define USB_POWER 0xffc03804 /* Power management register */
401#define USB_INTRTX 0xffc03808 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
402#define USB_INTRRX 0xffc0380c /* Interrupt register for Rx endpoints 1 to 7 */
403#define USB_INTRTXE 0xffc03810 /* Interrupt enable register for IntrTx */
404#define USB_INTRRXE 0xffc03814 /* Interrupt enable register for IntrRx */
405#define USB_INTRUSB 0xffc03818 /* Interrupt register for common USB interrupts */
406#define USB_INTRUSBE 0xffc0381c /* Interrupt enable register for IntrUSB */
407#define USB_FRAME 0xffc03820 /* USB frame number */
408#define USB_INDEX 0xffc03824 /* Index register for selecting the indexed endpoint registers */
409#define USB_TESTMODE 0xffc03828 /* Enabled USB 20 test modes */
410#define USB_GLOBINTR 0xffc0382c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
411#define USB_GLOBAL_CTL 0xffc03830 /* Global Clock Control for the core */
412
413/* USB Packet Control Registers */
414
415#define USB_TX_MAX_PACKET 0xffc03840 /* Maximum packet size for Host Tx endpoint */
416#define USB_CSR0 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
417#define USB_TXCSR 0xffc03844 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
418#define USB_RX_MAX_PACKET 0xffc03848 /* Maximum packet size for Host Rx endpoint */
419#define USB_RXCSR 0xffc0384c /* Control Status register for Host Rx endpoint */
420#define USB_COUNT0 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
421#define USB_RXCOUNT 0xffc03850 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
422#define USB_TXTYPE 0xffc03854 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
423#define USB_NAKLIMIT0 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
424#define USB_TXINTERVAL 0xffc03858 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
425#define USB_RXTYPE 0xffc0385c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
426#define USB_RXINTERVAL 0xffc03860 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
427#define USB_TXCOUNT 0xffc03868 /* Number of bytes to be written to the selected endpoint Tx FIFO */
428
429/* USB Endpoint FIFO Registers */
430
431#define USB_EP0_FIFO 0xffc03880 /* Endpoint 0 FIFO */
432#define USB_EP1_FIFO 0xffc03888 /* Endpoint 1 FIFO */
433#define USB_EP2_FIFO 0xffc03890 /* Endpoint 2 FIFO */
434#define USB_EP3_FIFO 0xffc03898 /* Endpoint 3 FIFO */
435#define USB_EP4_FIFO 0xffc038a0 /* Endpoint 4 FIFO */
436#define USB_EP5_FIFO 0xffc038a8 /* Endpoint 5 FIFO */
437#define USB_EP6_FIFO 0xffc038b0 /* Endpoint 6 FIFO */
438#define USB_EP7_FIFO 0xffc038b8 /* Endpoint 7 FIFO */
439
440/* USB OTG Control Registers */
441
442#define USB_OTG_DEV_CTL 0xffc03900 /* OTG Device Control Register */
443#define USB_OTG_VBUS_IRQ 0xffc03904 /* OTG VBUS Control Interrupts */
444#define USB_OTG_VBUS_MASK 0xffc03908 /* VBUS Control Interrupt Enable */
445
446/* USB Phy Control Registers */
447
448#define USB_LINKINFO 0xffc03948 /* Enables programming of some PHY-side delays */
449#define USB_VPLEN 0xffc0394c /* Determines duration of VBUS pulse for VBUS charging */
450#define USB_HS_EOF1 0xffc03950 /* Time buffer for High-Speed transactions */
451#define USB_FS_EOF1 0xffc03954 /* Time buffer for Full-Speed transactions */
452#define USB_LS_EOF1 0xffc03958 /* Time buffer for Low-Speed transactions */
453
454/* (APHY_CNTRL is for ADI usage only) */
455
456#define USB_APHY_CNTRL 0xffc039e0 /* Register that increases visibility of Analog PHY */
457
458/* (APHY_CALIB is for ADI usage only) */
459
460#define USB_APHY_CALIB 0xffc039e4 /* Register used to set some calibration values */
461
462#define USB_APHY_CNTRL2 0xffc039e8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
463
464/* (PHY_TEST is for ADI usage only) */
465
466#define USB_PHY_TEST 0xffc039ec /* Used for reducing simulation time and simplifies FIFO testability */
467
468#define USB_PLLOSC_CTRL 0xffc039f0 /* Used to program different parameters for USB PLL and Oscillator */
469#define USB_SRP_CLKDIV 0xffc039f4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
470
471/* USB Endpoint 0 Control Registers */
472
473#define USB_EP_NI0_TXMAXP 0xffc03a00 /* Maximum packet size for Host Tx endpoint0 */
474#define USB_EP_NI0_TXCSR 0xffc03a04 /* Control Status register for endpoint 0 */
475#define USB_EP_NI0_RXMAXP 0xffc03a08 /* Maximum packet size for Host Rx endpoint0 */
476#define USB_EP_NI0_RXCSR 0xffc03a0c /* Control Status register for Host Rx endpoint0 */
477#define USB_EP_NI0_RXCOUNT 0xffc03a10 /* Number of bytes received in endpoint 0 FIFO */
478#define USB_EP_NI0_TXTYPE 0xffc03a14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
479#define USB_EP_NI0_TXINTERVAL 0xffc03a18 /* Sets the NAK response timeout on Endpoint 0 */
480#define USB_EP_NI0_RXTYPE 0xffc03a1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
481#define USB_EP_NI0_RXINTERVAL 0xffc03a20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
482#define USB_EP_NI0_TXCOUNT 0xffc03a28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
483
484/* USB Endpoint 1 Control Registers */
485
486#define USB_EP_NI1_TXMAXP 0xffc03a40 /* Maximum packet size for Host Tx endpoint1 */
487#define USB_EP_NI1_TXCSR 0xffc03a44 /* Control Status register for endpoint1 */
488#define USB_EP_NI1_RXMAXP 0xffc03a48 /* Maximum packet size for Host Rx endpoint1 */
489#define USB_EP_NI1_RXCSR 0xffc03a4c /* Control Status register for Host Rx endpoint1 */
490#define USB_EP_NI1_RXCOUNT 0xffc03a50 /* Number of bytes received in endpoint1 FIFO */
491#define USB_EP_NI1_TXTYPE 0xffc03a54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
492#define USB_EP_NI1_TXINTERVAL 0xffc03a58 /* Sets the NAK response timeout on Endpoint1 */
493#define USB_EP_NI1_RXTYPE 0xffc03a5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
494#define USB_EP_NI1_RXINTERVAL 0xffc03a60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
495#define USB_EP_NI1_TXCOUNT 0xffc03a68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
496
497/* USB Endpoint 2 Control Registers */
498
499#define USB_EP_NI2_TXMAXP 0xffc03a80 /* Maximum packet size for Host Tx endpoint2 */
500#define USB_EP_NI2_TXCSR 0xffc03a84 /* Control Status register for endpoint2 */
501#define USB_EP_NI2_RXMAXP 0xffc03a88 /* Maximum packet size for Host Rx endpoint2 */
502#define USB_EP_NI2_RXCSR 0xffc03a8c /* Control Status register for Host Rx endpoint2 */
503#define USB_EP_NI2_RXCOUNT 0xffc03a90 /* Number of bytes received in endpoint2 FIFO */
504#define USB_EP_NI2_TXTYPE 0xffc03a94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
505#define USB_EP_NI2_TXINTERVAL 0xffc03a98 /* Sets the NAK response timeout on Endpoint2 */
506#define USB_EP_NI2_RXTYPE 0xffc03a9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
507#define USB_EP_NI2_RXINTERVAL 0xffc03aa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
508#define USB_EP_NI2_TXCOUNT 0xffc03aa8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
509
510/* USB Endpoint 3 Control Registers */
511
512#define USB_EP_NI3_TXMAXP 0xffc03ac0 /* Maximum packet size for Host Tx endpoint3 */
513#define USB_EP_NI3_TXCSR 0xffc03ac4 /* Control Status register for endpoint3 */
514#define USB_EP_NI3_RXMAXP 0xffc03ac8 /* Maximum packet size for Host Rx endpoint3 */
515#define USB_EP_NI3_RXCSR 0xffc03acc /* Control Status register for Host Rx endpoint3 */
516#define USB_EP_NI3_RXCOUNT 0xffc03ad0 /* Number of bytes received in endpoint3 FIFO */
517#define USB_EP_NI3_TXTYPE 0xffc03ad4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
518#define USB_EP_NI3_TXINTERVAL 0xffc03ad8 /* Sets the NAK response timeout on Endpoint3 */
519#define USB_EP_NI3_RXTYPE 0xffc03adc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
520#define USB_EP_NI3_RXINTERVAL 0xffc03ae0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
521#define USB_EP_NI3_TXCOUNT 0xffc03ae8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
522
523/* USB Endpoint 4 Control Registers */
524
525#define USB_EP_NI4_TXMAXP 0xffc03b00 /* Maximum packet size for Host Tx endpoint4 */
526#define USB_EP_NI4_TXCSR 0xffc03b04 /* Control Status register for endpoint4 */
527#define USB_EP_NI4_RXMAXP 0xffc03b08 /* Maximum packet size for Host Rx endpoint4 */
528#define USB_EP_NI4_RXCSR 0xffc03b0c /* Control Status register for Host Rx endpoint4 */
529#define USB_EP_NI4_RXCOUNT 0xffc03b10 /* Number of bytes received in endpoint4 FIFO */
530#define USB_EP_NI4_TXTYPE 0xffc03b14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
531#define USB_EP_NI4_TXINTERVAL 0xffc03b18 /* Sets the NAK response timeout on Endpoint4 */
532#define USB_EP_NI4_RXTYPE 0xffc03b1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
533#define USB_EP_NI4_RXINTERVAL 0xffc03b20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
534#define USB_EP_NI4_TXCOUNT 0xffc03b28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
535
536/* USB Endpoint 5 Control Registers */
537
538#define USB_EP_NI5_TXMAXP 0xffc03b40 /* Maximum packet size for Host Tx endpoint5 */
539#define USB_EP_NI5_TXCSR 0xffc03b44 /* Control Status register for endpoint5 */
540#define USB_EP_NI5_RXMAXP 0xffc03b48 /* Maximum packet size for Host Rx endpoint5 */
541#define USB_EP_NI5_RXCSR 0xffc03b4c /* Control Status register for Host Rx endpoint5 */
542#define USB_EP_NI5_RXCOUNT 0xffc03b50 /* Number of bytes received in endpoint5 FIFO */
543#define USB_EP_NI5_TXTYPE 0xffc03b54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
544#define USB_EP_NI5_TXINTERVAL 0xffc03b58 /* Sets the NAK response timeout on Endpoint5 */
545#define USB_EP_NI5_RXTYPE 0xffc03b5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
546#define USB_EP_NI5_RXINTERVAL 0xffc03b60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
547#define USB_EP_NI5_TXCOUNT 0xffc03b68 /* Number of bytes to be written to the endpoint5 Tx FIFO */
548
549/* USB Endpoint 6 Control Registers */
550
551#define USB_EP_NI6_TXMAXP 0xffc03b80 /* Maximum packet size for Host Tx endpoint6 */
552#define USB_EP_NI6_TXCSR 0xffc03b84 /* Control Status register for endpoint6 */
553#define USB_EP_NI6_RXMAXP 0xffc03b88 /* Maximum packet size for Host Rx endpoint6 */
554#define USB_EP_NI6_RXCSR 0xffc03b8c /* Control Status register for Host Rx endpoint6 */
555#define USB_EP_NI6_RXCOUNT 0xffc03b90 /* Number of bytes received in endpoint6 FIFO */
556#define USB_EP_NI6_TXTYPE 0xffc03b94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
557#define USB_EP_NI6_TXINTERVAL 0xffc03b98 /* Sets the NAK response timeout on Endpoint6 */
558#define USB_EP_NI6_RXTYPE 0xffc03b9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
559#define USB_EP_NI6_RXINTERVAL 0xffc03ba0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
560#define USB_EP_NI6_TXCOUNT 0xffc03ba8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
561
562/* USB Endpoint 7 Control Registers */
563
564#define USB_EP_NI7_TXMAXP 0xffc03bc0 /* Maximum packet size for Host Tx endpoint7 */
565#define USB_EP_NI7_TXCSR 0xffc03bc4 /* Control Status register for endpoint7 */
566#define USB_EP_NI7_RXMAXP 0xffc03bc8 /* Maximum packet size for Host Rx endpoint7 */
567#define USB_EP_NI7_RXCSR 0xffc03bcc /* Control Status register for Host Rx endpoint7 */
568#define USB_EP_NI7_RXCOUNT 0xffc03bd0 /* Number of bytes received in endpoint7 FIFO */
569#define USB_EP_NI7_TXTYPE 0xffc03bd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
570#define USB_EP_NI7_TXINTERVAL 0xffc03bd8 /* Sets the NAK response timeout on Endpoint7 */
571#define USB_EP_NI7_RXTYPE 0xffc03bdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
572#define USB_EP_NI7_RXINTERVAL 0xffc03bf0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
573#define USB_EP_NI7_TXCOUNT 0xffc03bf8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
574
575#define USB_DMA_INTERRUPT 0xffc03c00 /* Indicates pending interrupts for the DMA channels */
576
577/* USB Channel 0 Config Registers */
578
579#define USB_DMA0CONTROL 0xffc03c04 /* DMA master channel 0 configuration */
580#define USB_DMA0ADDRLOW 0xffc03c08 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
581#define USB_DMA0ADDRHIGH 0xffc03c0c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
582#define USB_DMA0COUNTLOW 0xffc03c10 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
583#define USB_DMA0COUNTHIGH 0xffc03c14 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
584
585/* USB Channel 1 Config Registers */
586
587#define USB_DMA1CONTROL 0xffc03c24 /* DMA master channel 1 configuration */
588#define USB_DMA1ADDRLOW 0xffc03c28 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
589#define USB_DMA1ADDRHIGH 0xffc03c2c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
590#define USB_DMA1COUNTLOW 0xffc03c30 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
591#define USB_DMA1COUNTHIGH 0xffc03c34 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
592
593/* USB Channel 2 Config Registers */
594
595#define USB_DMA2CONTROL 0xffc03c44 /* DMA master channel 2 configuration */
596#define USB_DMA2ADDRLOW 0xffc03c48 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
597#define USB_DMA2ADDRHIGH 0xffc03c4c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
598#define USB_DMA2COUNTLOW 0xffc03c50 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
599#define USB_DMA2COUNTHIGH 0xffc03c54 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
600
601/* USB Channel 3 Config Registers */
602
603#define USB_DMA3CONTROL 0xffc03c64 /* DMA master channel 3 configuration */
604#define USB_DMA3ADDRLOW 0xffc03c68 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
605#define USB_DMA3ADDRHIGH 0xffc03c6c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
606#define USB_DMA3COUNTLOW 0xffc03c70 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
607#define USB_DMA3COUNTHIGH 0xffc03c74 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
608
609/* USB Channel 4 Config Registers */
610
611#define USB_DMA4CONTROL 0xffc03c84 /* DMA master channel 4 configuration */
612#define USB_DMA4ADDRLOW 0xffc03c88 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
613#define USB_DMA4ADDRHIGH 0xffc03c8c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
614#define USB_DMA4COUNTLOW 0xffc03c90 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
615#define USB_DMA4COUNTHIGH 0xffc03c94 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
616
617/* USB Channel 5 Config Registers */
618
619#define USB_DMA5CONTROL 0xffc03ca4 /* DMA master channel 5 configuration */
620#define USB_DMA5ADDRLOW 0xffc03ca8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
621#define USB_DMA5ADDRHIGH 0xffc03cac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
622#define USB_DMA5COUNTLOW 0xffc03cb0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
623#define USB_DMA5COUNTHIGH 0xffc03cb4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
624
625/* USB Channel 6 Config Registers */
626
627#define USB_DMA6CONTROL 0xffc03cc4 /* DMA master channel 6 configuration */
628#define USB_DMA6ADDRLOW 0xffc03cc8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
629#define USB_DMA6ADDRHIGH 0xffc03ccc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
630#define USB_DMA6COUNTLOW 0xffc03cd0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
631#define USB_DMA6COUNTHIGH 0xffc03cd4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
632
633/* USB Channel 7 Config Registers */
634
635#define USB_DMA7CONTROL 0xffc03ce4 /* DMA master channel 7 configuration */
636#define USB_DMA7ADDRLOW 0xffc03ce8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
637#define USB_DMA7ADDRHIGH 0xffc03cec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
638#define USB_DMA7COUNTLOW 0xffc03cf0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
639#define USB_DMA7COUNTHIGH 0xffc03cf4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
640
641/* Bit masks for USB_FADDR */
642
643#define FUNCTION_ADDRESS 0x7f /* Function address */
644
645/* Bit masks for USB_POWER */
646
647#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
648#define nENABLE_SUSPENDM 0x0
649#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
650#define nSUSPEND_MODE 0x0
651#define RESUME_MODE 0x4 /* DMA Mode */
652#define nRESUME_MODE 0x0
653#define RESET 0x8 /* Reset indicator */
654#define nRESET 0x0
655#define HS_MODE 0x10 /* High Speed mode indicator */
656#define nHS_MODE 0x0
657#define HS_ENABLE 0x20 /* high Speed Enable */
658#define nHS_ENABLE 0x0
659#define SOFT_CONN 0x40 /* Soft connect */
660#define nSOFT_CONN 0x0
661#define ISO_UPDATE 0x80 /* Isochronous update */
662#define nISO_UPDATE 0x0
663
664/* Bit masks for USB_INTRTX */
665
666#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
667#define nEP0_TX 0x0
668#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
669#define nEP1_TX 0x0
670#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
671#define nEP2_TX 0x0
672#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
673#define nEP3_TX 0x0
674#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
675#define nEP4_TX 0x0
676#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
677#define nEP5_TX 0x0
678#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
679#define nEP6_TX 0x0
680#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
681#define nEP7_TX 0x0
682
683/* Bit masks for USB_INTRRX */
684
685#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
686#define nEP1_RX 0x0
687#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
688#define nEP2_RX 0x0
689#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
690#define nEP3_RX 0x0
691#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
692#define nEP4_RX 0x0
693#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
694#define nEP5_RX 0x0
695#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
696#define nEP6_RX 0x0
697#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
698#define nEP7_RX 0x0
699
700/* Bit masks for USB_INTRTXE */
701
702#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
703#define nEP0_TX_E 0x0
704#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
705#define nEP1_TX_E 0x0
706#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
707#define nEP2_TX_E 0x0
708#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
709#define nEP3_TX_E 0x0
710#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
711#define nEP4_TX_E 0x0
712#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
713#define nEP5_TX_E 0x0
714#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
715#define nEP6_TX_E 0x0
716#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
717#define nEP7_TX_E 0x0
718
719/* Bit masks for USB_INTRRXE */
720
721#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
722#define nEP1_RX_E 0x0
723#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
724#define nEP2_RX_E 0x0
725#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
726#define nEP3_RX_E 0x0
727#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
728#define nEP4_RX_E 0x0
729#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
730#define nEP5_RX_E 0x0
731#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
732#define nEP6_RX_E 0x0
733#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
734#define nEP7_RX_E 0x0
735
736/* Bit masks for USB_INTRUSB */
737
738#define SUSPEND_B 0x1 /* Suspend indicator */
739#define nSUSPEND_B 0x0
740#define RESUME_B 0x2 /* Resume indicator */
741#define nRESUME_B 0x0
742#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
743#define nRESET_OR_BABLE_B 0x0
744#define SOF_B 0x8 /* Start of frame */
745#define nSOF_B 0x0
746#define CONN_B 0x10 /* Connection indicator */
747#define nCONN_B 0x0
748#define DISCON_B 0x20 /* Disconnect indicator */
749#define nDISCON_B 0x0
750#define SESSION_REQ_B 0x40 /* Session Request */
751#define nSESSION_REQ_B 0x0
752#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
753#define nVBUS_ERROR_B 0x0
754
755/* Bit masks for USB_INTRUSBE */
756
757#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
758#define nSUSPEND_BE 0x0
759#define RESUME_BE 0x2 /* Resume indicator int enable */
760#define nRESUME_BE 0x0
761#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
762#define nRESET_OR_BABLE_BE 0x0
763#define SOF_BE 0x8 /* Start of frame int enable */
764#define nSOF_BE 0x0
765#define CONN_BE 0x10 /* Connection indicator int enable */
766#define nCONN_BE 0x0
767#define DISCON_BE 0x20 /* Disconnect indicator int enable */
768#define nDISCON_BE 0x0
769#define SESSION_REQ_BE 0x40 /* Session Request int enable */
770#define nSESSION_REQ_BE 0x0
771#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
772#define nVBUS_ERROR_BE 0x0
773
774/* Bit masks for USB_FRAME */
775
776#define FRAME_NUMBER 0x7ff /* Frame number */
777
778/* Bit masks for USB_INDEX */
779
780#define SELECTED_ENDPOINT 0xf /* selected endpoint */
781
782/* Bit masks for USB_GLOBAL_CTL */
783
784#define GLOBAL_ENA 0x1 /* enables USB module */
785#define nGLOBAL_ENA 0x0
786#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
787#define nEP1_TX_ENA 0x0
788#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
789#define nEP2_TX_ENA 0x0
790#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
791#define nEP3_TX_ENA 0x0
792#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
793#define nEP4_TX_ENA 0x0
794#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
795#define nEP5_TX_ENA 0x0
796#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
797#define nEP6_TX_ENA 0x0
798#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
799#define nEP7_TX_ENA 0x0
800#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
801#define nEP1_RX_ENA 0x0
802#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
803#define nEP2_RX_ENA 0x0
804#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
805#define nEP3_RX_ENA 0x0
806#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
807#define nEP4_RX_ENA 0x0
808#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
809#define nEP5_RX_ENA 0x0
810#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
811#define nEP6_RX_ENA 0x0
812#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
813#define nEP7_RX_ENA 0x0
814
815/* Bit masks for USB_OTG_DEV_CTL */
816
817#define SESSION 0x1 /* session indicator */
818#define nSESSION 0x0
819#define HOST_REQ 0x2 /* Host negotiation request */
820#define nHOST_REQ 0x0
821#define HOST_MODE 0x4 /* indicates USBDRC is a host */
822#define nHOST_MODE 0x0
823#define VBUS0 0x8 /* Vbus level indicator[0] */
824#define nVBUS0 0x0
825#define VBUS1 0x10 /* Vbus level indicator[1] */
826#define nVBUS1 0x0
827#define LSDEV 0x20 /* Low-speed indicator */
828#define nLSDEV 0x0
829#define FSDEV 0x40 /* Full or High-speed indicator */
830#define nFSDEV 0x0
831#define B_DEVICE 0x80 /* A' or 'B' device indicator */
832#define nB_DEVICE 0x0
833
834/* Bit masks for USB_OTG_VBUS_IRQ */
835
836#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
837#define nDRIVE_VBUS_ON 0x0
838#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
839#define nDRIVE_VBUS_OFF 0x0
840#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
841#define nCHRG_VBUS_START 0x0
842#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
843#define nCHRG_VBUS_END 0x0
844#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
845#define nDISCHRG_VBUS_START 0x0
846#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
847#define nDISCHRG_VBUS_END 0x0
848
849/* Bit masks for USB_OTG_VBUS_MASK */
850
851#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
852#define nDRIVE_VBUS_ON_ENA 0x0
853#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
854#define nDRIVE_VBUS_OFF_ENA 0x0
855#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
856#define nCHRG_VBUS_START_ENA 0x0
857#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
858#define nCHRG_VBUS_END_ENA 0x0
859#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
860#define nDISCHRG_VBUS_START_ENA 0x0
861#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
862#define nDISCHRG_VBUS_END_ENA 0x0
863
864/* Bit masks for USB_CSR0 */
865
866#define RXPKTRDY 0x1 /* data packet receive indicator */
867#define nRXPKTRDY 0x0
868#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
869#define nTXPKTRDY 0x0
870#define STALL_SENT 0x4 /* STALL handshake sent */
871#define nSTALL_SENT 0x0
872#define DATAEND 0x8 /* Data end indicator */
873#define nDATAEND 0x0
874#define SETUPEND 0x10 /* Setup end */
875#define nSETUPEND 0x0
876#define SENDSTALL 0x20 /* Send STALL handshake */
877#define nSENDSTALL 0x0
878#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
879#define nSERVICED_RXPKTRDY 0x0
880#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
881#define nSERVICED_SETUPEND 0x0
882#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
883#define nFLUSHFIFO 0x0
884#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
885#define nSTALL_RECEIVED_H 0x0
886#define SETUPPKT_H 0x8 /* send Setup token host mode */
887#define nSETUPPKT_H 0x0
888#define ERROR_H 0x10 /* timeout error indicator host mode */
889#define nERROR_H 0x0
890#define REQPKT_H 0x20 /* Request an IN transaction host mode */
891#define nREQPKT_H 0x0
892#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
893#define nSTATUSPKT_H 0x0
894#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
895#define nNAK_TIMEOUT_H 0x0
896
897/* Bit masks for USB_COUNT0 */
898
899#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
900
901/* Bit masks for USB_NAKLIMIT0 */
902
903#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
904
905/* Bit masks for USB_TX_MAX_PACKET */
906
907#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
908
909/* Bit masks for USB_RX_MAX_PACKET */
910
911#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
912
913/* Bit masks for USB_TXCSR */
914
915#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
916#define nTXPKTRDY_T 0x0
917#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
918#define nFIFO_NOT_EMPTY_T 0x0
919#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
920#define nUNDERRUN_T 0x0
921#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
922#define nFLUSHFIFO_T 0x0
923#define STALL_SEND_T 0x10 /* issue a Stall handshake */
924#define nSTALL_SEND_T 0x0
925#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
926#define nSTALL_SENT_T 0x0
927#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
928#define nCLEAR_DATATOGGLE_T 0x0
929#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
930#define nINCOMPTX_T 0x0
931#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
932#define nDMAREQMODE_T 0x0
933#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
934#define nFORCE_DATATOGGLE_T 0x0
935#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
936#define nDMAREQ_ENA_T 0x0
937#define ISO_T 0x4000 /* enable Isochronous transfers */
938#define nISO_T 0x0
939#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
940#define nAUTOSET_T 0x0
941#define ERROR_TH 0x4 /* error condition host mode */
942#define nERROR_TH 0x0
943#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
944#define nSTALL_RECEIVED_TH 0x0
945#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
946#define nNAK_TIMEOUT_TH 0x0
947
948/* Bit masks for USB_TXCOUNT */
949
950#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
951
952/* Bit masks for USB_RXCSR */
953
954#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
955#define nRXPKTRDY_R 0x0
956#define FIFO_FULL_R 0x2 /* FIFO not empty */
957#define nFIFO_FULL_R 0x0
958#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
959#define nOVERRUN_R 0x0
960#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
961#define nDATAERROR_R 0x0
962#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
963#define nFLUSHFIFO_R 0x0
964#define STALL_SEND_R 0x20 /* issue a Stall handshake */
965#define nSTALL_SEND_R 0x0
966#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
967#define nSTALL_SENT_R 0x0
968#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
969#define nCLEAR_DATATOGGLE_R 0x0
970#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
971#define nINCOMPRX_R 0x0
972#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
973#define nDMAREQMODE_R 0x0
974#define DISNYET_R 0x1000 /* disable Nyet handshakes */
975#define nDISNYET_R 0x0
976#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
977#define nDMAREQ_ENA_R 0x0
978#define ISO_R 0x4000 /* enable Isochronous transfers */
979#define nISO_R 0x0
980#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
981#define nAUTOCLEAR_R 0x0
982#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
983#define nERROR_RH 0x0
984#define REQPKT_RH 0x20 /* request an IN transaction host mode */
985#define nREQPKT_RH 0x0
986#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
987#define nSTALL_RECEIVED_RH 0x0
988#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
989#define nINCOMPRX_RH 0x0
990#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
991#define nDMAREQMODE_RH 0x0
992#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
993#define nAUTOREQ_RH 0x0
994
995/* Bit masks for USB_RXCOUNT */
996
997#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
998
999/* Bit masks for USB_TXTYPE */
1000
1001#define TARGET_EP_NO_T 0xf /* EP number */
1002#define PROTOCOL_T 0xc /* transfer type */
1003
1004/* Bit masks for USB_TXINTERVAL */
1005
1006#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
1007
1008/* Bit masks for USB_RXTYPE */
1009
1010#define TARGET_EP_NO_R 0xf /* EP number */
1011#define PROTOCOL_R 0xc /* transfer type */
1012
1013/* Bit masks for USB_RXINTERVAL */
1014
1015#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
1016
1017/* Bit masks for USB_DMA_INTERRUPT */
1018
1019#define DMA0_INT 0x1 /* DMA0 pending interrupt */
1020#define nDMA0_INT 0x0
1021#define DMA1_INT 0x2 /* DMA1 pending interrupt */
1022#define nDMA1_INT 0x0
1023#define DMA2_INT 0x4 /* DMA2 pending interrupt */
1024#define nDMA2_INT 0x0
1025#define DMA3_INT 0x8 /* DMA3 pending interrupt */
1026#define nDMA3_INT 0x0
1027#define DMA4_INT 0x10 /* DMA4 pending interrupt */
1028#define nDMA4_INT 0x0
1029#define DMA5_INT 0x20 /* DMA5 pending interrupt */
1030#define nDMA5_INT 0x0
1031#define DMA6_INT 0x40 /* DMA6 pending interrupt */
1032#define nDMA6_INT 0x0
1033#define DMA7_INT 0x80 /* DMA7 pending interrupt */
1034#define nDMA7_INT 0x0
1035
1036/* Bit masks for USB_DMAxCONTROL */
1037
1038#define DMA_ENA 0x1 /* DMA enable */
1039#define nDMA_ENA 0x0
1040#define DIRECTION 0x2 /* direction of DMA transfer */
1041#define nDIRECTION 0x0
1042#define MODE 0x4 /* DMA Bus error */
1043#define nMODE 0x0
1044#define INT_ENA 0x8 /* Interrupt enable */
1045#define nINT_ENA 0x0
1046#define EPNUM 0xf0 /* EP number */
1047#define BUSERROR 0x100 /* DMA Bus error */
1048#define nBUSERROR 0x0
1049
1050/* Bit masks for USB_DMAxADDRHIGH */
1051
1052#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
1053
1054/* Bit masks for USB_DMAxADDRLOW */
1055
1056#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
1057
1058/* Bit masks for USB_DMAxCOUNTHIGH */
1059
1060#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
1061
1062/* Bit masks for USB_DMAxCOUNTLOW */
1063
1064#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
1065
1066#endif /* _DEF_BF527_H */ 391#endif /* _DEF_BF527_H */
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
index f821700716ee..8b18b5359210 100644
--- a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
+++ b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
@@ -544,7 +544,7 @@
544#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */ 544#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */
545#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */ 545#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */
546#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */ 546#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */
547#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshhold Register */ 547#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshold Register */
548#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */ 548#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */
549#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */ 549#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */
550#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */ 550#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */
@@ -552,7 +552,7 @@
552#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */ 552#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */
553#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */ 553#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */
554#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */ 554#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */
555#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshhold Register */ 555#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshold Register */
556#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */ 556#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */
557#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */ 557#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */
558#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */ 558#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */
@@ -586,58 +586,6 @@
586** modifier UNLESS the lower order bits are saved and ORed back in when 586** modifier UNLESS the lower order bits are saved and ORed back in when
587** the macro is used. 587** the macro is used.
588*************************************************************************************/ 588*************************************************************************************/
589/*
590** ********************* PLL AND RESET MASKS ****************************************/
591/* PLL_CTL Masks */
592#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
593#define PLL_OFF 0x0002 /* PLL Not Powered */
594#define STOPCK 0x0008 /* Core Clock Off */
595#define PDWN 0x0020 /* Enter Deep Sleep Mode */
596#define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
597#define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
598#define BYPASS 0x0100 /* Bypass the PLL */
599#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
600/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
601#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
602
603/* PLL_DIV Masks */
604#define SSEL 0x000F /* System Select */
605#define CSEL 0x0030 /* Core Select */
606#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
607#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
608#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
609#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
610/* PLL_DIV Macros */
611#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
612
613/* VR_CTL Masks */
614#define FREQ 0x3000 /* Switching Oscillator Frequency For Regulator */
615#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
616
617#define VLEV 0x00F0 /* Internal Voltage Level */
618#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
619#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
620#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
621#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
622#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
623#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
624#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
625#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
626#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
627#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
628
629#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
630#define USBWE 0x0200 /* Enable USB Wakeup From Hibernate */
631#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
632#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
633#define PHYCLKOE CLKBUFOE /* Alternative legacy name for the above */
634#define SCKELOW 0x8000 /* Enable Drive CKE Low During Reset */
635
636/* PLL_STAT Masks */
637#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
638#define FULL_ON 0x0002 /* Processor In Full On Mode */
639#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
640#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
641 589
642/* CHIPID Masks */ 590/* CHIPID Masks */
643#define CHIPID_VERSION 0xF0000000 591#define CHIPID_VERSION 0xF0000000
@@ -757,66 +705,6 @@
757#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */ 705#define IWR_DISABLE(x) (0xFFFFFFFF ^ (1 << ((x)&0x1F))) /* Wakeup Disable Peripheral #x */
758 706
759 707
760/* ********* WATCHDOG TIMER MASKS ******************** */
761
762/* Watchdog Timer WDOG_CTL Register Masks */
763
764#define WDEV(x) (((x)<<1) & 0x0006) /* event generated on roll over */
765#define WDEV_RESET 0x0000 /* generate reset event on roll over */
766#define WDEV_NMI 0x0002 /* generate NMI event on roll over */
767#define WDEV_GPI 0x0004 /* generate GP IRQ on roll over */
768#define WDEV_NONE 0x0006 /* no event on roll over */
769#define WDEN 0x0FF0 /* enable watchdog */
770#define WDDIS 0x0AD0 /* disable watchdog */
771#define WDRO 0x8000 /* watchdog rolled over latch */
772
773/* depreciated WDOG_CTL Register Masks for legacy code */
774
775
776#define ICTL WDEV
777#define ENABLE_RESET WDEV_RESET
778#define WDOG_RESET WDEV_RESET
779#define ENABLE_NMI WDEV_NMI
780#define WDOG_NMI WDEV_NMI
781#define ENABLE_GPI WDEV_GPI
782#define WDOG_GPI WDEV_GPI
783#define DISABLE_EVT WDEV_NONE
784#define WDOG_NONE WDEV_NONE
785
786#define TMR_EN WDEN
787#define TMR_DIS WDDIS
788#define TRO WDRO
789#define ICTL_P0 0x01
790 #define ICTL_P1 0x02
791#define TRO_P 0x0F
792
793
794
795/* *************** REAL TIME CLOCK MASKS **************************/
796/* RTC_STAT and RTC_ALARM Masks */
797#define RTC_SEC 0x0000003F /* Real-Time Clock Seconds */
798#define RTC_MIN 0x00000FC0 /* Real-Time Clock Minutes */
799#define RTC_HR 0x0001F000 /* Real-Time Clock Hours */
800#define RTC_DAY 0xFFFE0000 /* Real-Time Clock Days */
801
802/* RTC_ALARM Macro z=day y=hr x=min w=sec */
803#define SET_ALARM(z,y,x,w) ((((z)&0x7FFF)<<0x11)|(((y)&0x1F)<<0xC)|(((x)&0x3F)<<0x6)|((w)&0x3F))
804
805/* RTC_ICTL and RTC_ISTAT Masks */
806#define STOPWATCH 0x0001 /* Stopwatch Interrupt Enable */
807#define ALARM 0x0002 /* Alarm Interrupt Enable */
808#define SECOND 0x0004 /* Seconds (1 Hz) Interrupt Enable */
809#define MINUTE 0x0008 /* Minutes Interrupt Enable */
810#define HOUR 0x0010 /* Hours Interrupt Enable */
811#define DAY 0x0020 /* 24 Hours (Days) Interrupt Enable */
812#define DAY_ALARM 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */
813#define WRITE_PENDING 0x4000 /* Write Pending Status */
814#define WRITE_COMPLETE 0x8000 /* Write Complete Interrupt Enable */
815
816/* RTC_FAST / RTC_PREN Mask */
817#define PREN 0x0001 /* Enable Prescaler, RTC Runs @1 Hz */
818
819
820/* ************** UART CONTROLLER MASKS *************************/ 708/* ************** UART CONTROLLER MASKS *************************/
821/* UARTx_LCR Masks */ 709/* UARTx_LCR Masks */
822#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */ 710#define WLS(x) (((x)-5) & 0x03) /* Word Length Select */
@@ -1381,33 +1269,6 @@
1381 1269
1382 1270
1383/* ************************** DMA CONTROLLER MASKS ********************************/ 1271/* ************************** DMA CONTROLLER MASKS ********************************/
1384/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1385#define DMAEN 0x0001 /* DMA Channel Enable */
1386#define WNR 0x0002 /* Channel Direction (W/R*) */
1387#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
1388#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
1389#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
1390#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
1391#define RESTART 0x0020 /* DMA Buffer Clear */
1392#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
1393#define DI_EN 0x0080 /* Data Interrupt Enable */
1394#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1395#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1396#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1397#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1398#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1399#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1400#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1401#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1402#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1403#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1404#define NDSIZE 0x0900 /* Next Descriptor Size */
1405#define DMAFLOW 0x7000 /* Flow Control */
1406#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1407#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1408#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1409#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1410#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1411 1272
1412/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */ 1273/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1413#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */ 1274#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */
@@ -1425,13 +1286,6 @@
1425#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */ 1286#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */
1426#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */ 1287#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */
1427 1288
1428/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1429#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
1430#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
1431#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
1432#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
1433
1434
1435/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/ 1289/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/
1436/* PPI_CONTROL Masks */ 1290/* PPI_CONTROL Masks */
1437#define PORT_EN 0x0001 /* PPI Port Enable */ 1291#define PORT_EN 0x0001 /* PPI Port Enable */
@@ -1843,46 +1697,6 @@
1843#define BNDMODE_CAPT 0x2000 /* boundary capture mode */ 1697#define BNDMODE_CAPT 0x2000 /* boundary capture mode */
1844#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */ 1698#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */
1845 1699
1846/* Bit masks for OTP_CONTROL */
1847
1848#define FUSE_FADDR 0x1ff /* OTP/Fuse Address */
1849#define FIEN 0x800 /* OTP/Fuse Interrupt Enable */
1850#define nFIEN 0x0
1851#define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */
1852#define nFTESTDEC 0x0
1853#define FWRTEST 0x2000 /* OTP/Fuse Write Test */
1854#define nFWRTEST 0x0
1855#define FRDEN 0x4000 /* OTP/Fuse Read Enable */
1856#define nFRDEN 0x0
1857#define FWREN 0x8000 /* OTP/Fuse Write Enable */
1858#define nFWREN 0x0
1859
1860/* Bit masks for OTP_BEN */
1861
1862#define FBEN 0xffff /* OTP/Fuse Byte Enable */
1863
1864/* Bit masks for OTP_STATUS */
1865
1866#define FCOMP 0x1 /* OTP/Fuse Access Complete */
1867#define nFCOMP 0x0
1868#define FERROR 0x2 /* OTP/Fuse Access Error */
1869#define nFERROR 0x0
1870#define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */
1871#define nMMRGLOAD 0x0
1872#define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */
1873#define nMMRGLOCK 0x0
1874#define FPGMEN 0x40 /* OTP/Fuse Program Enable */
1875#define nFPGMEN 0x0
1876
1877/* Bit masks for OTP_TIMING */
1878
1879#define USECDIV 0xff /* Micro Second Divider */
1880#define READACC 0x7f00 /* Read Access Time */
1881#define CPUMPRL 0x38000 /* Charge Pump Release Time */
1882#define CPUMPSU 0xc0000 /* Charge Pump Setup Time */
1883#define CPUMPHD 0xf00000 /* Charge Pump Hold Time */
1884#define PGMTIME 0xff000000 /* Program Time */
1885
1886/* Bit masks for SECURE_SYSSWT */ 1700/* Bit masks for SECURE_SYSSWT */
1887 1701
1888#define EMUDABL 0x1 /* Emulation Disable. */ 1702#define EMUDABL 0x1 /* Emulation Disable. */
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 43f43a095a99..4adceb0bdb6d 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -166,7 +166,6 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
166#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 166#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
167/* SPI ADC chip */ 167/* SPI ADC chip */
168static struct bfin5xx_spi_chip spi_adc_chip_info = { 168static struct bfin5xx_spi_chip spi_adc_chip_info = {
169 .ctl_reg = 0x1000,
170 .enable_dma = 1, /* use dma transfer with this chip*/ 169 .enable_dma = 1, /* use dma transfer with this chip*/
171 .bits_per_word = 16, 170 .bits_per_word = 16,
172}; 171};
@@ -174,7 +173,6 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
174 173
175#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 174#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
176static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 175static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
177 .ctl_reg = 0x1000,
178 .enable_dma = 0, 176 .enable_dma = 0,
179 .bits_per_word = 16, 177 .bits_per_word = 16,
180}; 178};
@@ -258,12 +256,6 @@ static struct platform_device bfin_spi0_device = {
258}; 256};
259#endif /* spi master and devices */ 257#endif /* spi master and devices */
260 258
261#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
262static struct platform_device bfin_fb_device = {
263 .name = "bf537-fb",
264};
265#endif
266
267#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 259#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
268static struct resource bfin_uart_resources[] = { 260static struct resource bfin_uart_resources[] = {
269 { 261 {
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index 644be5e5ab6f..8ec42ba35b9e 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -20,6 +20,7 @@
20#endif 20#endif
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/bfin5xx_spi.h> 22#include <asm/bfin5xx_spi.h>
23#include <asm/portmux.h>
23 24
24/* 25/*
25 * Name the Board for the /proc/cpuinfo 26 * Name the Board for the /proc/cpuinfo
@@ -107,20 +108,6 @@ static struct platform_device dm9000_device2 = {
107 108
108#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 109#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
109static struct bfin5xx_spi_chip mmc_spi_chip_info = { 110static struct bfin5xx_spi_chip mmc_spi_chip_info = {
110/*
111 * CPOL (Clock Polarity)
112 * 0 - Active high SCK
113 * 1 - Active low SCK
114 * CPHA (Clock Phase) Selects transfer format and operation mode
115 * 0 - SCLK toggles from middle of the first data bit, slave select
116 * pins controlled by hardware.
117 * 1 - SCLK toggles from beginning of first data bit, slave select
118 * pins controller by user software.
119 * .ctl_reg = 0x1c00, * CPOL=1,CPHA=1,Sandisk 1G work
120 * NO NO .ctl_reg = 0x1800, * CPOL=1,CPHA=0
121 * NO NO .ctl_reg = 0x1400, * CPOL=0,CPHA=1
122 */
123 .ctl_reg = 0x1000, /* CPOL=0,CPHA=0,Sandisk 1G work */
124 .enable_dma = 0, /* if 1 - block!!! */ 111 .enable_dma = 0, /* if 1 - block!!! */
125 .bits_per_word = 8, 112 .bits_per_word = 8,
126}; 113};
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 82f70efd66e7..6d68dcfa2da2 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -321,12 +321,6 @@ static struct platform_device bfin_spi0_device = {
321}; 321};
322#endif /* spi master and devices */ 322#endif /* spi master and devices */
323 323
324#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
325static struct platform_device bfin_fb_device = {
326 .name = "bf537-fb",
327};
328#endif
329
330#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 324#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
331static struct resource bfin_uart_resources[] = { 325static struct resource bfin_uart_resources[] = {
332 { 326 {
diff --git a/arch/blackfin/mach-bf533/include/mach/defBF532.h b/arch/blackfin/mach-bf533/include/mach/defBF532.h
index 02b328eb0e07..e9ff491c0953 100644
--- a/arch/blackfin/mach-bf533/include/mach/defBF532.h
+++ b/arch/blackfin/mach-bf533/include/mach/defBF532.h
@@ -370,72 +370,6 @@
370/* System MMR Register Bits */ 370/* System MMR Register Bits */
371/******************************************************************************* */ 371/******************************************************************************* */
372 372
373/* ********************* PLL AND RESET MASKS ************************ */
374
375/* PLL_CTL Masks */
376#define PLL_CLKIN 0x0000 /* Pass CLKIN to PLL */
377#define PLL_CLKIN_DIV2 0x0001 /* Pass CLKIN/2 to PLL */
378#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
379#define PLL_OFF 0x0002 /* Shut off PLL clocks */
380#define STOPCK_OFF 0x0008 /* Core clock off */
381#define STOPCK 0x0008 /* Core Clock Off */
382#define PDWN 0x0020 /* Put the PLL in a Deep Sleep state */
383#if !defined(__ADSPBF538__)
384/* this file is included in defBF538.h but IN_DELAY/OUT_DELAY are different */
385# define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
386# define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
387#endif
388#define BYPASS 0x0100 /* Bypass the PLL */
389/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
390#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
391
392/* PLL_DIV Masks */
393#define SSEL 0x000F /* System Select */
394#define CSEL 0x0030 /* Core Select */
395
396#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
397
398#define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */
399#define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */
400#define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */
401#define CCLK_DIV8 0x00000030 /* CCLK = VCO / 8 */
402/* PLL_DIV Macros */
403#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
404
405/* PLL_STAT Masks */
406#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
407#define FULL_ON 0x0002 /* Processor In Full On Mode */
408#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
409#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
410
411/* VR_CTL Masks */
412#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
413#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
414#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
415#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
416#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
417
418#define GAIN 0x000C /* Voltage Level Gain */
419#define GAIN_5 0x0000 /* GAIN = 5 */
420#define GAIN_10 0x0004 /* GAIN = 10 */
421#define GAIN_20 0x0008 /* GAIN = 20 */
422#define GAIN_50 0x000C /* GAIN = 50 */
423
424#define VLEV 0x00F0 /* Internal Voltage Level */
425#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
426#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
427#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
428#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
429#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
430#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
431#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
432#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
433#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
434#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
435
436#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
437#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
438
439/* CHIPID Masks */ 373/* CHIPID Masks */
440#define CHIPID_VERSION 0xF0000000 374#define CHIPID_VERSION 0xF0000000
441#define CHIPID_FAMILY 0x0FFFF000 375#define CHIPID_FAMILY 0x0FFFF000
@@ -703,54 +637,7 @@
703 637
704/* ********** DMA CONTROLLER MASKS *********************8 */ 638/* ********** DMA CONTROLLER MASKS *********************8 */
705 639
706/*DMAx_CONFIG, MDMA_yy_CONFIG Masks */ 640/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
707#define DMAEN 0x00000001 /* Channel Enable */
708#define WNR 0x00000002 /* Channel Direction (W/R*) */
709#define WDSIZE_8 0x00000000 /* Word Size 8 bits */
710#define WDSIZE_16 0x00000004 /* Word Size 16 bits */
711#define WDSIZE_32 0x00000008 /* Word Size 32 bits */
712#define DMA2D 0x00000010 /* 2D/1D* Mode */
713#define RESTART 0x00000020 /* Restart */
714#define DI_SEL 0x00000040 /* Data Interrupt Select */
715#define DI_EN 0x00000080 /* Data Interrupt Enable */
716#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
717#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
718#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
719#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
720#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
721#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
722#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
723#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
724#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
725#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
726#define NDSIZE 0x00000900 /* Next Descriptor Size */
727#define DMAFLOW 0x00007000 /* Flow Control */
728#define DMAFLOW_STOP 0x0000 /* Stop Mode */
729#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
730#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
731#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
732#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
733
734#define DMAEN_P 0 /* Channel Enable */
735#define WNR_P 1 /* Channel Direction (W/R*) */
736#define DMA2D_P 4 /* 2D/1D* Mode */
737#define RESTART_P 5 /* Restart */
738#define DI_SEL_P 6 /* Data Interrupt Select */
739#define DI_EN_P 7 /* Data Interrupt Enable */
740
741/*DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
742
743#define DMA_DONE 0x00000001 /* DMA Done Indicator */
744#define DMA_ERR 0x00000002 /* DMA Error Indicator */
745#define DFETCH 0x00000004 /* Descriptor Fetch Indicator */
746#define DMA_RUN 0x00000008 /* DMA Running Indicator */
747
748#define DMA_DONE_P 0 /* DMA Done Indicator */
749#define DMA_ERR_P 1 /* DMA Error Indicator */
750#define DFETCH_P 2 /* Descriptor Fetch Indicator */
751#define DMA_RUN_P 3 /* DMA Running Indicator */
752
753/*DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
754 641
755#define CTYPE 0x00000040 /* DMA Channel Type Indicator */ 642#define CTYPE 0x00000040 /* DMA Channel Type Indicator */
756#define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */ 643#define CTYPE_P 6 /* DMA Channel Type Indicator BIT POSITION */
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 9ba290466b56..4e0afda472ab 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -13,9 +13,6 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
17#include <linux/usb/isp1362.h>
18#endif
19#include <linux/irq.h> 16#include <linux/irq.h>
20#include <asm/dma.h> 17#include <asm/dma.h>
21#include <asm/bfin5xx_spi.h> 18#include <asm/bfin5xx_spi.h>
@@ -147,45 +144,6 @@ static struct platform_device sl811_hcd_device = {
147}; 144};
148#endif 145#endif
149 146
150#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
151static struct resource isp1362_hcd_resources[] = {
152 {
153 .start = 0x20360000,
154 .end = 0x20360000,
155 .flags = IORESOURCE_MEM,
156 }, {
157 .start = 0x20360004,
158 .end = 0x20360004,
159 .flags = IORESOURCE_MEM,
160 }, {
161 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
162 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
163 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
164 },
165};
166
167static struct isp1362_platform_data isp1362_priv = {
168 .sel15Kres = 1,
169 .clknotstop = 0,
170 .oc_enable = 0,
171 .int_act_high = 0,
172 .int_edge_triggered = 0,
173 .remote_wakeup_connected = 0,
174 .no_power_switching = 1,
175 .power_switching_mode = 0,
176};
177
178static struct platform_device isp1362_hcd_device = {
179 .name = "isp1362-hcd",
180 .id = 0,
181 .dev = {
182 .platform_data = &isp1362_priv,
183 },
184 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
185 .resource = isp1362_hcd_resources,
186};
187#endif
188
189#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 147#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
190static struct platform_device bfin_mii_bus = { 148static struct platform_device bfin_mii_bus = {
191 .name = "bfin_mii_bus", 149 .name = "bfin_mii_bus",
@@ -492,10 +450,6 @@ static struct platform_device *stamp_devices[] __initdata = {
492 &sl811_hcd_device, 450 &sl811_hcd_device,
493#endif 451#endif
494 452
495#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
496 &isp1362_hcd_device,
497#endif
498
499#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 453#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
500 &smc91x_device, 454 &smc91x_device,
501#endif 455#endif
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index c46baa5e6d9b..ac9b52e0087c 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -9,6 +9,7 @@
9#include <linux/device.h> 9#include <linux/device.h>
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/io.h>
12#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
13#include <linux/mtd/nand.h> 14#include <linux/mtd/nand.h>
14#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
@@ -25,6 +26,8 @@
25#include <linux/i2c.h> 26#include <linux/i2c.h>
26#include <linux/usb/sl811.h> 27#include <linux/usb/sl811.h>
27#include <linux/spi/mmc_spi.h> 28#include <linux/spi/mmc_spi.h>
29#include <linux/leds.h>
30#include <linux/input.h>
28#include <asm/dma.h> 31#include <asm/dma.h>
29#include <asm/bfin5xx_spi.h> 32#include <asm/bfin5xx_spi.h>
30#include <asm/reboot.h> 33#include <asm/reboot.h>
@@ -65,7 +68,7 @@ static struct isp1760_platform_data isp1760_priv = {
65}; 68};
66 69
67static struct platform_device bfin_isp1760_device = { 70static struct platform_device bfin_isp1760_device = {
68 .name = "isp1760-hcd", 71 .name = "isp1760",
69 .id = 0, 72 .id = 0,
70 .dev = { 73 .dev = {
71 .platform_data = &isp1760_priv, 74 .platform_data = &isp1760_priv,
@@ -76,7 +79,6 @@ static struct platform_device bfin_isp1760_device = {
76#endif 79#endif
77 80
78#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 81#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
79#include <linux/input.h>
80#include <linux/gpio_keys.h> 82#include <linux/gpio_keys.h>
81 83
82static struct gpio_keys_button bfin_gpio_keys_table[] = { 84static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -195,28 +197,6 @@ static struct platform_device dm9000_device = {
195}; 197};
196#endif 198#endif
197 199
198#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
199static struct resource ax88180_resources[] = {
200 [0] = {
201 .start = 0x20300000,
202 .end = 0x20300000 + 0x8000,
203 .flags = IORESOURCE_MEM,
204 },
205 [1] = {
206 .start = IRQ_PF7,
207 .end = IRQ_PF7,
208 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
209 },
210};
211
212static struct platform_device ax88180_device = {
213 .name = "ax88180",
214 .id = -1,
215 .num_resources = ARRAY_SIZE(ax88180_resources),
216 .resource = ax88180_resources,
217};
218#endif
219
220#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 200#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
221static struct resource sl811_hcd_resources[] = { 201static struct resource sl811_hcd_resources[] = {
222 { 202 {
@@ -272,8 +252,8 @@ static struct resource isp1362_hcd_resources[] = {
272 .end = 0x20360004, 252 .end = 0x20360004,
273 .flags = IORESOURCE_MEM, 253 .flags = IORESOURCE_MEM,
274 }, { 254 }, {
275 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 255 .start = IRQ_PF3,
276 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, 256 .end = IRQ_PF3,
277 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 257 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
278 }, 258 },
279}; 259};
@@ -300,6 +280,44 @@ static struct platform_device isp1362_hcd_device = {
300}; 280};
301#endif 281#endif
302 282
283#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
284unsigned short bfin_can_peripherals[] = {
285 P_CAN0_RX, P_CAN0_TX, 0
286};
287
288static struct resource bfin_can_resources[] = {
289 {
290 .start = 0xFFC02A00,
291 .end = 0xFFC02FFF,
292 .flags = IORESOURCE_MEM,
293 },
294 {
295 .start = IRQ_CAN_RX,
296 .end = IRQ_CAN_RX,
297 .flags = IORESOURCE_IRQ,
298 },
299 {
300 .start = IRQ_CAN_TX,
301 .end = IRQ_CAN_TX,
302 .flags = IORESOURCE_IRQ,
303 },
304 {
305 .start = IRQ_CAN_ERROR,
306 .end = IRQ_CAN_ERROR,
307 .flags = IORESOURCE_IRQ,
308 },
309};
310
311static struct platform_device bfin_can_device = {
312 .name = "bfin_can",
313 .num_resources = ARRAY_SIZE(bfin_can_resources),
314 .resource = bfin_can_resources,
315 .dev = {
316 .platform_data = &bfin_can_peripherals, /* Passed to driver */
317 },
318};
319#endif
320
303#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 321#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
304static struct platform_device bfin_mii_bus = { 322static struct platform_device bfin_mii_bus = {
305 .name = "bfin_mii_bus", 323 .name = "bfin_mii_bus",
@@ -514,15 +532,14 @@ static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
514}; 532};
515#endif 533#endif
516 534
517#if defined(CONFIG_INPUT_EVAL_AD7147EBZ) 535#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
518#include <linux/input.h>
519#include <linux/input/ad714x.h> 536#include <linux/input/ad714x.h>
520static struct bfin5xx_spi_chip ad7147_spi_chip_info = { 537static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
521 .enable_dma = 0, 538 .enable_dma = 0,
522 .bits_per_word = 16, 539 .bits_per_word = 16,
523}; 540};
524 541
525static struct ad714x_slider_plat slider_plat[] = { 542static struct ad714x_slider_plat ad7147_spi_slider_plat[] = {
526 { 543 {
527 .start_stage = 0, 544 .start_stage = 0,
528 .end_stage = 7, 545 .end_stage = 7,
@@ -530,7 +547,7 @@ static struct ad714x_slider_plat slider_plat[] = {
530 }, 547 },
531}; 548};
532 549
533static struct ad714x_button_plat button_plat[] = { 550static struct ad714x_button_plat ad7147_spi_button_plat[] = {
534 { 551 {
535 .keycode = BTN_FORWARD, 552 .keycode = BTN_FORWARD,
536 .l_mask = 0, 553 .l_mask = 0,
@@ -557,11 +574,11 @@ static struct ad714x_button_plat button_plat[] = {
557 .h_mask = 0x400, 574 .h_mask = 0x400,
558 }, 575 },
559}; 576};
560static struct ad714x_platform_data ad7147_platfrom_data = { 577static struct ad714x_platform_data ad7147_spi_platform_data = {
561 .slider_num = 1, 578 .slider_num = 1,
562 .button_num = 5, 579 .button_num = 5,
563 .slider = slider_plat, 580 .slider = ad7147_spi_slider_plat,
564 .button = button_plat, 581 .button = ad7147_spi_button_plat,
565 .stage_cfg_reg = { 582 .stage_cfg_reg = {
566 {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600}, 583 {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
567 {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650}, 584 {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
@@ -580,10 +597,9 @@ static struct ad714x_platform_data ad7147_platfrom_data = {
580}; 597};
581#endif 598#endif
582 599
583#if defined(CONFIG_INPUT_EVAL_AD7142EB) 600#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
584#include <linux/input.h>
585#include <linux/input/ad714x.h> 601#include <linux/input/ad714x.h>
586static struct ad714x_button_plat button_plat[] = { 602static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
587 { 603 {
588 .keycode = BTN_1, 604 .keycode = BTN_1,
589 .l_mask = 0, 605 .l_mask = 0,
@@ -605,9 +621,9 @@ static struct ad714x_button_plat button_plat[] = {
605 .h_mask = 0x8, 621 .h_mask = 0x8,
606 }, 622 },
607}; 623};
608static struct ad714x_platform_data ad7142_platfrom_data = { 624static struct ad714x_platform_data ad7142_i2c_platform_data = {
609 .button_num = 4, 625 .button_num = 4,
610 .button = button_plat, 626 .button = ad7142_i2c_button_plat,
611 .stage_cfg_reg = { 627 .stage_cfg_reg = {
612 /* fixme: figure out right setting for all comoponent according 628 /* fixme: figure out right setting for all comoponent according
613 * to hardware feature of EVAL-AD7142EB board */ 629 * to hardware feature of EVAL-AD7142EB board */
@@ -696,8 +712,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
696#endif 712#endif
697 713
698#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 714#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
699#include <linux/input.h> 715#include <linux/input/adxl34x.h>
700#include <linux/spi/adxl34x.h>
701static const struct adxl34x_platform_data adxl34x_info = { 716static const struct adxl34x_platform_data adxl34x_info = {
702 .x_axis_offset = 0, 717 .x_axis_offset = 0,
703 .y_axis_offset = 0, 718 .y_axis_offset = 0,
@@ -721,9 +736,7 @@ static const struct adxl34x_platform_data adxl34x_info = {
721 .ev_code_y = ABS_Y, /* EV_REL */ 736 .ev_code_y = ABS_Y, /* EV_REL */
722 .ev_code_z = ABS_Z, /* EV_REL */ 737 .ev_code_z = ABS_Z, /* EV_REL */
723 738
724 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */ 739 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
725 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
726 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
727 740
728/* .ev_code_ff = KEY_F,*/ /* EV_KEY */ 741/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
729/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ 742/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
@@ -761,6 +774,47 @@ static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
761}; 774};
762#endif 775#endif
763 776
777#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
778static struct bfin5xx_spi_chip adf7021_spi_chip_info = {
779 .bits_per_word = 16,
780 .cs_gpio = GPIO_PF10,
781};
782
783#include <linux/spi/adf702x.h>
784#define TXREG 0x0160A470
785static const u32 adf7021_regs[] = {
786 0x09608FA0,
787 0x00575011,
788 0x00A7F092,
789 0x2B141563,
790 0x81F29E94,
791 0x00003155,
792 0x050A4F66,
793 0x00000007,
794 0x00000008,
795 0x000231E9,
796 0x3296354A,
797 0x891A2B3B,
798 0x00000D9C,
799 0x0000000D,
800 0x0000000E,
801 0x0000000F,
802};
803
804static struct adf702x_platform_data adf7021_platform_data = {
805 .regs_base = (void *)SPORT1_TCR1,
806 .dma_ch_rx = CH_SPORT1_RX,
807 .dma_ch_tx = CH_SPORT1_TX,
808 .irq_sport_err = IRQ_SPORT1_ERROR,
809 .gpio_int_rfs = GPIO_PF8,
810 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_RFS, P_SPORT1_DRPRI,
811 P_SPORT1_RSCLK, P_SPORT1_TSCLK, 0},
812 .adf702x_model = MODEL_ADF7021,
813 .adf702x_regs = adf7021_regs,
814 .tx_reg = TXREG,
815};
816#endif
817
764#if defined(CONFIG_MTD_DATAFLASH) \ 818#if defined(CONFIG_MTD_DATAFLASH) \
765 || defined(CONFIG_MTD_DATAFLASH_MODULE) 819 || defined(CONFIG_MTD_DATAFLASH_MODULE)
766 820
@@ -794,6 +848,13 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
794}; 848};
795#endif 849#endif
796 850
851#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
852static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
853 .enable_dma = 0, /* use dma transfer with this chip*/
854 .bits_per_word = 8,
855};
856#endif
857
797static struct spi_board_info bfin_spi_board_info[] __initdata = { 858static struct spi_board_info bfin_spi_board_info[] __initdata = {
798#if defined(CONFIG_MTD_M25P80) \ 859#if defined(CONFIG_MTD_M25P80) \
799 || defined(CONFIG_MTD_M25P80_MODULE) 860 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -855,7 +916,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
855 }, 916 },
856#endif 917#endif
857 918
858#if defined(CONFIG_INPUT_EVAL_AD7147EBZ) 919#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
859 { 920 {
860 .modalias = "ad714x_captouch", 921 .modalias = "ad714x_captouch",
861 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 922 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -863,7 +924,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
863 .bus_num = 0, 924 .bus_num = 0,
864 .chip_select = 5, 925 .chip_select = 5,
865 .mode = SPI_MODE_3, 926 .mode = SPI_MODE_3,
866 .platform_data = &ad7147_platfrom_data, 927 .platform_data = &ad7147_spi_platform_data,
867 .controller_data = &ad7147_spi_chip_info, 928 .controller_data = &ad7147_spi_chip_info,
868 }, 929 },
869#endif 930#endif
@@ -932,6 +993,30 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
932 .mode = SPI_MODE_0, 993 .mode = SPI_MODE_0,
933 }, 994 },
934#endif 995#endif
996#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
997 {
998 .modalias = "adxl34x",
999 .platform_data = &adxl34x_info,
1000 .irq = IRQ_PF6,
1001 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1002 .bus_num = 0,
1003 .chip_select = 2,
1004 .controller_data = &spi_adxl34x_chip_info,
1005 .mode = SPI_MODE_3,
1006 },
1007#endif
1008#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
1009 {
1010 .modalias = "adf702x",
1011 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
1012 .bus_num = 0,
1013 .chip_select = 0, /* GPIO controlled SSEL */
1014 .controller_data = &adf7021_spi_chip_info,
1015 .platform_data = &adf7021_platform_data,
1016 .mode = SPI_MODE_0,
1017 },
1018#endif
1019
935}; 1020};
936 1021
937#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1022#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
@@ -1175,7 +1260,6 @@ static struct platform_device i2c_bfin_twi_device = {
1175#endif 1260#endif
1176 1261
1177#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1262#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1178#include <linux/input.h>
1179#include <linux/i2c/adp5588.h> 1263#include <linux/i2c/adp5588.h>
1180static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1264static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1181 [0] = KEY_GRAVE, 1265 [0] = KEY_GRAVE,
@@ -1268,35 +1352,33 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = {
1268 * ADP5520/5501 Backlight Data 1352 * ADP5520/5501 Backlight Data
1269 */ 1353 */
1270 1354
1271static struct adp5520_backlight_platfrom_data adp5520_backlight_data = { 1355static struct adp5520_backlight_platform_data adp5520_backlight_data = {
1272 .fade_in = FADE_T_1200ms, 1356 .fade_in = ADP5520_FADE_T_1200ms,
1273 .fade_out = FADE_T_1200ms, 1357 .fade_out = ADP5520_FADE_T_1200ms,
1274 .fade_led_law = BL_LAW_LINEAR, 1358 .fade_led_law = ADP5520_BL_LAW_LINEAR,
1275 .en_ambl_sens = 1, 1359 .en_ambl_sens = 1,
1276 .abml_filt = BL_AMBL_FILT_640ms, 1360 .abml_filt = ADP5520_BL_AMBL_FILT_640ms,
1277 .l1_daylight_max = BL_CUR_mA(15), 1361 .l1_daylight_max = ADP5520_BL_CUR_mA(15),
1278 .l1_daylight_dim = BL_CUR_mA(0), 1362 .l1_daylight_dim = ADP5520_BL_CUR_mA(0),
1279 .l2_office_max = BL_CUR_mA(7), 1363 .l2_office_max = ADP5520_BL_CUR_mA(7),
1280 .l2_office_dim = BL_CUR_mA(0), 1364 .l2_office_dim = ADP5520_BL_CUR_mA(0),
1281 .l3_dark_max = BL_CUR_mA(3), 1365 .l3_dark_max = ADP5520_BL_CUR_mA(3),
1282 .l3_dark_dim = BL_CUR_mA(0), 1366 .l3_dark_dim = ADP5520_BL_CUR_mA(0),
1283 .l2_trip = L2_COMP_CURR_uA(700), 1367 .l2_trip = ADP5520_L2_COMP_CURR_uA(700),
1284 .l2_hyst = L2_COMP_CURR_uA(50), 1368 .l2_hyst = ADP5520_L2_COMP_CURR_uA(50),
1285 .l3_trip = L3_COMP_CURR_uA(80), 1369 .l3_trip = ADP5520_L3_COMP_CURR_uA(80),
1286 .l3_hyst = L3_COMP_CURR_uA(20), 1370 .l3_hyst = ADP5520_L3_COMP_CURR_uA(20),
1287}; 1371};
1288 1372
1289 /* 1373 /*
1290 * ADP5520/5501 LEDs Data 1374 * ADP5520/5501 LEDs Data
1291 */ 1375 */
1292 1376
1293#include <linux/leds.h>
1294
1295static struct led_info adp5520_leds[] = { 1377static struct led_info adp5520_leds[] = {
1296 { 1378 {
1297 .name = "adp5520-led1", 1379 .name = "adp5520-led1",
1298 .default_trigger = "none", 1380 .default_trigger = "none",
1299 .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | LED_OFFT_600ms, 1381 .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms,
1300 }, 1382 },
1301#ifdef ADP5520_EN_ALL_LEDS 1383#ifdef ADP5520_EN_ALL_LEDS
1302 { 1384 {
@@ -1312,51 +1394,50 @@ static struct led_info adp5520_leds[] = {
1312#endif 1394#endif
1313}; 1395};
1314 1396
1315static struct adp5520_leds_platfrom_data adp5520_leds_data = { 1397static struct adp5520_leds_platform_data adp5520_leds_data = {
1316 .num_leds = ARRAY_SIZE(adp5520_leds), 1398 .num_leds = ARRAY_SIZE(adp5520_leds),
1317 .leds = adp5520_leds, 1399 .leds = adp5520_leds,
1318 .fade_in = FADE_T_600ms, 1400 .fade_in = ADP5520_FADE_T_600ms,
1319 .fade_out = FADE_T_600ms, 1401 .fade_out = ADP5520_FADE_T_600ms,
1320 .led_on_time = LED_ONT_600ms, 1402 .led_on_time = ADP5520_LED_ONT_600ms,
1321}; 1403};
1322 1404
1323 /* 1405 /*
1324 * ADP5520 GPIO Data 1406 * ADP5520 GPIO Data
1325 */ 1407 */
1326 1408
1327static struct adp5520_gpio_platfrom_data adp5520_gpio_data = { 1409static struct adp5520_gpio_platform_data adp5520_gpio_data = {
1328 .gpio_start = 50, 1410 .gpio_start = 50,
1329 .gpio_en_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, 1411 .gpio_en_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2,
1330 .gpio_pullup_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, 1412 .gpio_pullup_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2,
1331}; 1413};
1332 1414
1333 /* 1415 /*
1334 * ADP5520 Keypad Data 1416 * ADP5520 Keypad Data
1335 */ 1417 */
1336 1418
1337#include <linux/input.h>
1338static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { 1419static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
1339 [KEY(0, 0)] = KEY_GRAVE, 1420 [ADP5520_KEY(0, 0)] = KEY_GRAVE,
1340 [KEY(0, 1)] = KEY_1, 1421 [ADP5520_KEY(0, 1)] = KEY_1,
1341 [KEY(0, 2)] = KEY_2, 1422 [ADP5520_KEY(0, 2)] = KEY_2,
1342 [KEY(0, 3)] = KEY_3, 1423 [ADP5520_KEY(0, 3)] = KEY_3,
1343 [KEY(1, 0)] = KEY_4, 1424 [ADP5520_KEY(1, 0)] = KEY_4,
1344 [KEY(1, 1)] = KEY_5, 1425 [ADP5520_KEY(1, 1)] = KEY_5,
1345 [KEY(1, 2)] = KEY_6, 1426 [ADP5520_KEY(1, 2)] = KEY_6,
1346 [KEY(1, 3)] = KEY_7, 1427 [ADP5520_KEY(1, 3)] = KEY_7,
1347 [KEY(2, 0)] = KEY_8, 1428 [ADP5520_KEY(2, 0)] = KEY_8,
1348 [KEY(2, 1)] = KEY_9, 1429 [ADP5520_KEY(2, 1)] = KEY_9,
1349 [KEY(2, 2)] = KEY_0, 1430 [ADP5520_KEY(2, 2)] = KEY_0,
1350 [KEY(2, 3)] = KEY_MINUS, 1431 [ADP5520_KEY(2, 3)] = KEY_MINUS,
1351 [KEY(3, 0)] = KEY_EQUAL, 1432 [ADP5520_KEY(3, 0)] = KEY_EQUAL,
1352 [KEY(3, 1)] = KEY_BACKSLASH, 1433 [ADP5520_KEY(3, 1)] = KEY_BACKSLASH,
1353 [KEY(3, 2)] = KEY_BACKSPACE, 1434 [ADP5520_KEY(3, 2)] = KEY_BACKSPACE,
1354 [KEY(3, 3)] = KEY_ENTER, 1435 [ADP5520_KEY(3, 3)] = KEY_ENTER,
1355}; 1436};
1356 1437
1357static struct adp5520_keys_platfrom_data adp5520_keys_data = { 1438static struct adp5520_keys_platform_data adp5520_keys_data = {
1358 .rows_en_mask = ROW_R3 | ROW_R2 | ROW_R1 | ROW_R0, 1439 .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0,
1359 .cols_en_mask = COL_C3 | COL_C2 | COL_C1 | COL_C0, 1440 .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0,
1360 .keymap = adp5520_keymap, 1441 .keymap = adp5520_keymap,
1361 .keymapsize = ARRAY_SIZE(adp5520_keymap), 1442 .keymapsize = ARRAY_SIZE(adp5520_keymap),
1362 .repeat = 0, 1443 .repeat = 0,
@@ -1366,50 +1447,81 @@ static struct adp5520_keys_platfrom_data adp5520_keys_data = {
1366 * ADP5520/5501 Multifuction Device Init Data 1447 * ADP5520/5501 Multifuction Device Init Data
1367 */ 1448 */
1368 1449
1369static struct adp5520_subdev_info adp5520_subdevs[] = {
1370 {
1371 .name = "adp5520-backlight",
1372 .id = ID_ADP5520,
1373 .platform_data = &adp5520_backlight_data,
1374 },
1375 {
1376 .name = "adp5520-led",
1377 .id = ID_ADP5520,
1378 .platform_data = &adp5520_leds_data,
1379 },
1380 {
1381 .name = "adp5520-gpio",
1382 .id = ID_ADP5520,
1383 .platform_data = &adp5520_gpio_data,
1384 },
1385 {
1386 .name = "adp5520-keys",
1387 .id = ID_ADP5520,
1388 .platform_data = &adp5520_keys_data,
1389 },
1390};
1391
1392static struct adp5520_platform_data adp5520_pdev_data = { 1450static struct adp5520_platform_data adp5520_pdev_data = {
1393 .num_subdevs = ARRAY_SIZE(adp5520_subdevs), 1451 .backlight = &adp5520_backlight_data,
1394 .subdevs = adp5520_subdevs, 1452 .leds = &adp5520_leds_data,
1453 .gpio = &adp5520_gpio_data,
1454 .keys = &adp5520_keys_data,
1395}; 1455};
1396 1456
1397#endif 1457#endif
1398 1458
1399#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) 1459#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
1400#include <linux/i2c/adp5588.h> 1460#include <linux/i2c/adp5588.h>
1401static struct adp5588_gpio_platfrom_data adp5588_gpio_data = { 1461static struct adp5588_gpio_platform_data adp5588_gpio_data = {
1402 .gpio_start = 50, 1462 .gpio_start = 50,
1403 .pullup_dis_mask = 0, 1463 .pullup_dis_mask = 0,
1404}; 1464};
1405#endif 1465#endif
1406 1466
1467#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
1468#include <linux/i2c/adp8870.h>
1469static struct led_info adp8870_leds[] = {
1470 {
1471 .name = "adp8870-led7",
1472 .default_trigger = "none",
1473 .flags = ADP8870_LED_D7 | ADP8870_LED_OFFT_600ms,
1474 },
1475};
1476
1477
1478static struct adp8870_backlight_platform_data adp8870_pdata = {
1479 .bl_led_assign = ADP8870_BL_D1 | ADP8870_BL_D2 | ADP8870_BL_D3 |
1480 ADP8870_BL_D4 | ADP8870_BL_D5 | ADP8870_BL_D6, /* 1 = Backlight 0 = Individual LED */
1481 .pwm_assign = 0, /* 1 = Enables PWM mode */
1482
1483 .bl_fade_in = ADP8870_FADE_T_1200ms, /* Backlight Fade-In Timer */
1484 .bl_fade_out = ADP8870_FADE_T_1200ms, /* Backlight Fade-Out Timer */
1485 .bl_fade_law = ADP8870_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */
1486
1487 .en_ambl_sens = 1, /* 1 = enable ambient light sensor */
1488 .abml_filt = ADP8870_BL_AMBL_FILT_320ms, /* Light sensor filter time */
1489
1490 .l1_daylight_max = ADP8870_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1491 .l1_daylight_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1492 .l2_bright_max = ADP8870_BL_CUR_mA(14), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1493 .l2_bright_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1494 .l3_office_max = ADP8870_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1495 .l3_office_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1496 .l4_indoor_max = ADP8870_BL_CUR_mA(3), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1497 .l4_indor_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1498 .l5_dark_max = ADP8870_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1499 .l5_dark_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1500
1501 .l2_trip = ADP8870_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1502 .l2_hyst = ADP8870_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1503 .l3_trip = ADP8870_L3_COMP_CURR_uA(389), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
1504 .l3_hyst = ADP8870_L3_COMP_CURR_uA(54), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
1505 .l4_trip = ADP8870_L4_COMP_CURR_uA(167), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
1506 .l4_hyst = ADP8870_L4_COMP_CURR_uA(16), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
1507 .l5_trip = ADP8870_L5_COMP_CURR_uA(43), /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1508 .l5_hyst = ADP8870_L5_COMP_CURR_uA(11), /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1509
1510 .leds = adp8870_leds,
1511 .num_leds = ARRAY_SIZE(adp8870_leds),
1512 .led_fade_law = ADP8870_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */
1513 .led_fade_in = ADP8870_FADE_T_600ms,
1514 .led_fade_out = ADP8870_FADE_T_600ms,
1515 .led_on_time = ADP8870_LED_ONT_200ms,
1516};
1517#endif
1518
1407static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 1519static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1408#if defined(CONFIG_INPUT_EVAL_AD7142EB) 1520#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
1409 { 1521 {
1410 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 1522 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
1411 .irq = IRQ_PG5, 1523 .irq = IRQ_PG5,
1412 .platform_data = (void *)&ad7142_platfrom_data, 1524 .platform_data = (void *)&ad7142_i2c_platform_data,
1413 }, 1525 },
1414#endif 1526#endif
1415#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1527#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
@@ -1462,6 +1574,32 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1462 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 1574 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
1463 }, 1575 },
1464#endif 1576#endif
1577#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1578 {
1579 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C),
1580 },
1581#endif
1582#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
1583 {
1584 I2C_BOARD_INFO("adp8870", 0x2B),
1585 .platform_data = (void *)&adp8870_pdata,
1586 },
1587#endif
1588#if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE)
1589 {
1590 I2C_BOARD_INFO("adau1371", 0x1A),
1591 },
1592#endif
1593#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
1594 {
1595 I2C_BOARD_INFO("adau1761", 0x38),
1596 },
1597#endif
1598#if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE)
1599 {
1600 I2C_BOARD_INFO("ad5258", 0x18),
1601 },
1602#endif
1465}; 1603};
1466 1604
1467#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1605#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -1602,8 +1740,8 @@ static struct platform_device *stamp_devices[] __initdata = {
1602 &dm9000_device, 1740 &dm9000_device,
1603#endif 1741#endif
1604 1742
1605#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) 1743#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1606 &ax88180_device, 1744 &bfin_can_device,
1607#endif 1745#endif
1608 1746
1609#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 1747#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
diff --git a/arch/blackfin/mach-bf537/include/mach/bf537.h b/arch/blackfin/mach-bf537/include/mach/bf537.h
index 17fab4474669..8b291418ca32 100644
--- a/arch/blackfin/mach-bf537/include/mach/bf537.h
+++ b/arch/blackfin/mach-bf537/include/mach/bf537.h
@@ -9,16 +9,6 @@
9#ifndef __MACH_BF537_H__ 9#ifndef __MACH_BF537_H__
10#define __MACH_BF537_H__ 10#define __MACH_BF537_H__
11 11
12/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
13
14#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */
15#define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF) /* SPORTx_STAT */
16#define PPI_ERR_MASK (0xFFFF & ~FLD) /* PPI_STATUS */
17#define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE) /* EMAC_SYSTAT */
18#define UART_ERR_MASK_STAT1 (0x4) /* UARTx_IIR */
19#define UART_ERR_MASK_STAT0 (0x2) /* UARTx_IIR */
20#define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF) /* CAN_GIF */
21
22#define OFFSET_(x) ((x) & 0x0000FFFF) 12#define OFFSET_(x) ((x) & 0x0000FFFF)
23 13
24/*some misc defines*/ 14/*some misc defines*/
diff --git a/arch/blackfin/mach-bf537/include/mach/blackfin.h b/arch/blackfin/mach-bf537/include/mach/blackfin.h
index eab006d260c5..a12d4b6a221d 100644
--- a/arch/blackfin/mach-bf537/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf537/include/mach/blackfin.h
@@ -40,10 +40,4 @@
40#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 40#define OFFSET_SCR 0x1C /* SCR Scratch Register */
41#define OFFSET_GCTL 0x24 /* Global Control Register */ 41#define OFFSET_GCTL 0x24 /* Global Control Register */
42 42
43/* PLL_DIV Masks */
44#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
45#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
46#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
47#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
48
49#endif 43#endif
diff --git a/arch/blackfin/mach-bf537/include/mach/defBF534.h b/arch/blackfin/mach-bf537/include/mach/defBF534.h
index cebb14feb1ba..066d5c261f47 100644
--- a/arch/blackfin/mach-bf537/include/mach/defBF534.h
+++ b/arch/blackfin/mach-bf537/include/mach/defBF534.h
@@ -934,7 +934,7 @@
934#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */ 934#define HMDMA0_CONTROL 0xFFC03300 /* Handshake MDMA0 Control Register */
935#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */ 935#define HMDMA0_ECINIT 0xFFC03304 /* HMDMA0 Initial Edge Count Register */
936#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */ 936#define HMDMA0_BCINIT 0xFFC03308 /* HMDMA0 Initial Block Count Register */
937#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshhold Register */ 937#define HMDMA0_ECURGENT 0xFFC0330C /* HMDMA0 Urgent Edge Count Threshold Register */
938#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */ 938#define HMDMA0_ECOVERFLOW 0xFFC03310 /* HMDMA0 Edge Count Overflow Interrupt Register */
939#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */ 939#define HMDMA0_ECOUNT 0xFFC03314 /* HMDMA0 Current Edge Count Register */
940#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */ 940#define HMDMA0_BCOUNT 0xFFC03318 /* HMDMA0 Current Block Count Register */
@@ -942,7 +942,7 @@
942#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */ 942#define HMDMA1_CONTROL 0xFFC03340 /* Handshake MDMA1 Control Register */
943#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */ 943#define HMDMA1_ECINIT 0xFFC03344 /* HMDMA1 Initial Edge Count Register */
944#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */ 944#define HMDMA1_BCINIT 0xFFC03348 /* HMDMA1 Initial Block Count Register */
945#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshhold Register */ 945#define HMDMA1_ECURGENT 0xFFC0334C /* HMDMA1 Urgent Edge Count Threshold Register */
946#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */ 946#define HMDMA1_ECOVERFLOW 0xFFC03350 /* HMDMA1 Edge Count Overflow Interrupt Register */
947#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */ 947#define HMDMA1_ECOUNT 0xFFC03354 /* HMDMA1 Current Edge Count Register */
948#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */ 948#define HMDMA1_BCOUNT 0xFFC03358 /* HMDMA1 Current Block Count Register */
@@ -958,67 +958,6 @@
958** modifier UNLESS the lower order bits are saved and ORed back in when 958** modifier UNLESS the lower order bits are saved and ORed back in when
959** the macro is used. 959** the macro is used.
960*************************************************************************************/ 960*************************************************************************************/
961/*
962** ********************* PLL AND RESET MASKS ****************************************/
963/* PLL_CTL Masks */
964#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
965#define PLL_OFF 0x0002 /* PLL Not Powered */
966#define STOPCK 0x0008 /* Core Clock Off */
967#define PDWN 0x0020 /* Enter Deep Sleep Mode */
968#define IN_DELAY 0x0040 /* Add 200ps Delay To EBIU Input Latches */
969#define OUT_DELAY 0x0080 /* Add 200ps Delay To EBIU Output Signals */
970#define BYPASS 0x0100 /* Bypass the PLL */
971#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
972/* PLL_CTL Macros (Only Use With Logic OR While Setting Lower Order Bits) */
973#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
974
975/* PLL_DIV Masks */
976#define SSEL 0x000F /* System Select */
977#define CSEL 0x0030 /* Core Select */
978#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
979#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
980#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
981#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
982/* PLL_DIV Macros */
983#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
984
985/* VR_CTL Masks */
986#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
987#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
988#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
989#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
990#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
991
992#define GAIN 0x000C /* Voltage Level Gain */
993#define GAIN_5 0x0000 /* GAIN = 5 */
994#define GAIN_10 0x0004 /* GAIN = 10 */
995#define GAIN_20 0x0008 /* GAIN = 20 */
996#define GAIN_50 0x000C /* GAIN = 50 */
997
998#define VLEV 0x00F0 /* Internal Voltage Level */
999#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
1000#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
1001#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
1002#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
1003#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
1004#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
1005#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
1006#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
1007#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
1008#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
1009
1010#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
1011#define CANWE 0x0200 /* Enable CAN Wakeup From Hibernate */
1012#define PHYWE 0x0400 /* Enable PHY Wakeup From Hibernate */
1013#define CLKBUFOE 0x4000 /* CLKIN Buffer Output Enable */
1014#define PHYCLKOE CLKBUFOE /* Alternative legacy name for the above */
1015#define SCKELOW 0x8000 /* Enable Drive CKE Low During Reset */
1016
1017/* PLL_STAT Masks */
1018#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
1019#define FULL_ON 0x0002 /* Processor In Full On Mode */
1020#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
1021#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
1022 961
1023/* CHIPID Masks */ 962/* CHIPID Masks */
1024#define CHIPID_VERSION 0xF0000000 963#define CHIPID_VERSION 0xF0000000
@@ -1645,34 +1584,6 @@
1645#define BGSTAT 0x0020 /* Bus Grant Status */ 1584#define BGSTAT 0x0020 /* Bus Grant Status */
1646 1585
1647/* ************************** DMA CONTROLLER MASKS ********************************/ 1586/* ************************** DMA CONTROLLER MASKS ********************************/
1648/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1649#define DMAEN 0x0001 /* DMA Channel Enable */
1650#define WNR 0x0002 /* Channel Direction (W/R*) */
1651#define WDSIZE_8 0x0000 /* Transfer Word Size = 8 */
1652#define WDSIZE_16 0x0004 /* Transfer Word Size = 16 */
1653#define WDSIZE_32 0x0008 /* Transfer Word Size = 32 */
1654#define DMA2D 0x0010 /* DMA Mode (2D/1D*) */
1655#define RESTART 0x0020 /* DMA Buffer Clear */
1656#define DI_SEL 0x0040 /* Data Interrupt Timing Select */
1657#define DI_EN 0x0080 /* Data Interrupt Enable */
1658#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1659#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1660#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1661#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1662#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1663#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1664#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1665#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1666#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1667#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1668#define NDSIZE 0x0900 /* Next Descriptor Size */
1669
1670#define DMAFLOW 0x7000 /* Flow Control */
1671#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1672#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1673#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1674#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1675#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1676 1587
1677/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */ 1588/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1678#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */ 1589#define CTYPE 0x0040 /* DMA Channel Type Indicator (Memory/Peripheral*) */
@@ -1690,12 +1601,6 @@
1690#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */ 1601#define PMAP_UART1RX 0xA000 /* UART1 Port Receive DMA */
1691#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */ 1602#define PMAP_UART1TX 0xB000 /* UART1 Port Transmit DMA */
1692 1603
1693/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1694#define DMA_DONE 0x0001 /* DMA Completion Interrupt Status */
1695#define DMA_ERR 0x0002 /* DMA Error Interrupt Status */
1696#define DFETCH 0x0004 /* DMA Descriptor Fetch Indicator */
1697#define DMA_RUN 0x0008 /* DMA Channel Running Indicator */
1698
1699/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/ 1604/* ************ PARALLEL PERIPHERAL INTERFACE (PPI) MASKS *************/
1700/* PPI_CONTROL Masks */ 1605/* PPI_CONTROL Masks */
1701#define PORT_EN 0x0001 /* PPI Port Enable */ 1606#define PORT_EN 0x0001 /* PPI Port Enable */
diff --git a/arch/blackfin/mach-bf538/Makefile b/arch/blackfin/mach-bf538/Makefile
index 8cd2719684db..c0be54f2cd2b 100644
--- a/arch/blackfin/mach-bf538/Makefile
+++ b/arch/blackfin/mach-bf538/Makefile
@@ -3,3 +3,4 @@
3# 3#
4 4
5obj-y := ints-priority.o dma.o 5obj-y := ints-priority.o dma.o
6obj-$(CONFIG_GPIOLIB) += ext-gpio.o
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 14af5c2088d4..c296bb1ed503 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -151,6 +151,44 @@ static struct platform_device bfin_sir2_device = {
151#endif 151#endif
152#endif 152#endif
153 153
154#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
155unsigned short bfin_can_peripherals[] = {
156 P_CAN0_RX, P_CAN0_TX, 0
157};
158
159static struct resource bfin_can_resources[] = {
160 {
161 .start = 0xFFC02A00,
162 .end = 0xFFC02FFF,
163 .flags = IORESOURCE_MEM,
164 },
165 {
166 .start = IRQ_CAN_RX,
167 .end = IRQ_CAN_RX,
168 .flags = IORESOURCE_IRQ,
169 },
170 {
171 .start = IRQ_CAN_TX,
172 .end = IRQ_CAN_TX,
173 .flags = IORESOURCE_IRQ,
174 },
175 {
176 .start = IRQ_CAN_ERROR,
177 .end = IRQ_CAN_ERROR,
178 .flags = IORESOURCE_IRQ,
179 },
180};
181
182static struct platform_device bfin_can_device = {
183 .name = "bfin_can",
184 .num_resources = ARRAY_SIZE(bfin_can_resources),
185 .resource = bfin_can_resources,
186 .dev = {
187 .platform_data = &bfin_can_peripherals, /* Passed to driver */
188 },
189};
190#endif
191
154/* 192/*
155 * USB-LAN EzExtender board 193 * USB-LAN EzExtender board
156 * Driver needs to know address, irq and flag pin. 194 * Driver needs to know address, irq and flag pin.
@@ -610,6 +648,10 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
610#endif 648#endif
611#endif 649#endif
612 650
651#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
652 &bfin_can_device,
653#endif
654
613#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 655#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
614 &smc91x_device, 656 &smc91x_device,
615#endif 657#endif
diff --git a/arch/blackfin/mach-bf538/ext-gpio.c b/arch/blackfin/mach-bf538/ext-gpio.c
new file mode 100644
index 000000000000..180b1252679f
--- /dev/null
+++ b/arch/blackfin/mach-bf538/ext-gpio.c
@@ -0,0 +1,123 @@
1/*
2 * GPIOLIB interface for BF538/9 PORT C, D, and E GPIOs
3 *
4 * Copyright 2009 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <linux/module.h>
10#include <linux/err.h>
11#include <asm/blackfin.h>
12#include <asm/gpio.h>
13#include <asm/portmux.h>
14
15#define DEFINE_REG(reg, off) \
16static inline u16 read_##reg(void __iomem *port) \
17 { return bfin_read16(port + off); } \
18static inline void write_##reg(void __iomem *port, u16 v) \
19 { bfin_write16(port + off, v); }
20
21DEFINE_REG(PORTIO, 0x00)
22DEFINE_REG(PORTIO_CLEAR, 0x10)
23DEFINE_REG(PORTIO_SET, 0x20)
24DEFINE_REG(PORTIO_DIR, 0x40)
25DEFINE_REG(PORTIO_INEN, 0x50)
26
27static void __iomem *gpio_chip_to_mmr(struct gpio_chip *chip)
28{
29 switch (chip->base) {
30 default: /* not really needed, but keeps gcc happy */
31 case GPIO_PC0: return (void __iomem *)PORTCIO;
32 case GPIO_PD0: return (void __iomem *)PORTDIO;
33 case GPIO_PE0: return (void __iomem *)PORTEIO;
34 }
35}
36
37static int bf538_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
38{
39 void __iomem *port = gpio_chip_to_mmr(chip);
40 return !!(read_PORTIO(port) & (1u << gpio));
41}
42
43static void bf538_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
44{
45 void __iomem *port = gpio_chip_to_mmr(chip);
46 if (value)
47 write_PORTIO_SET(port, (1u << gpio));
48 else
49 write_PORTIO_CLEAR(port, (1u << gpio));
50}
51
52static int bf538_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
53{
54 void __iomem *port = gpio_chip_to_mmr(chip);
55 write_PORTIO_DIR(port, read_PORTIO_DIR(port) & ~(1u << gpio));
56 write_PORTIO_INEN(port, read_PORTIO_INEN(port) | (1u << gpio));
57 return 0;
58}
59
60static int bf538_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value)
61{
62 void __iomem *port = gpio_chip_to_mmr(chip);
63 write_PORTIO_INEN(port, read_PORTIO_INEN(port) & ~(1u << gpio));
64 bf538_gpio_set_value(port, gpio, value);
65 write_PORTIO_DIR(port, read_PORTIO_DIR(port) | (1u << gpio));
66 return 0;
67}
68
69static int bf538_gpio_request(struct gpio_chip *chip, unsigned gpio)
70{
71 return bfin_special_gpio_request(chip->base + gpio, chip->label);
72}
73
74static void bf538_gpio_free(struct gpio_chip *chip, unsigned gpio)
75{
76 return bfin_special_gpio_free(chip->base + gpio);
77}
78
79/* We don't set the irq fields as these banks cannot generate interrupts */
80
81static struct gpio_chip bf538_portc_chip = {
82 .label = "GPIO-PC",
83 .direction_input = bf538_gpio_direction_input,
84 .get = bf538_gpio_get_value,
85 .direction_output = bf538_gpio_direction_output,
86 .set = bf538_gpio_set_value,
87 .request = bf538_gpio_request,
88 .free = bf538_gpio_free,
89 .base = GPIO_PC0,
90 .ngpio = GPIO_PC9 - GPIO_PC0 + 1,
91};
92
93static struct gpio_chip bf538_portd_chip = {
94 .label = "GPIO-PD",
95 .direction_input = bf538_gpio_direction_input,
96 .get = bf538_gpio_get_value,
97 .direction_output = bf538_gpio_direction_output,
98 .set = bf538_gpio_set_value,
99 .request = bf538_gpio_request,
100 .free = bf538_gpio_free,
101 .base = GPIO_PD0,
102 .ngpio = GPIO_PD13 - GPIO_PD0 + 1,
103};
104
105static struct gpio_chip bf538_porte_chip = {
106 .label = "GPIO-PE",
107 .direction_input = bf538_gpio_direction_input,
108 .get = bf538_gpio_get_value,
109 .direction_output = bf538_gpio_direction_output,
110 .set = bf538_gpio_set_value,
111 .request = bf538_gpio_request,
112 .free = bf538_gpio_free,
113 .base = GPIO_PE0,
114 .ngpio = GPIO_PE15 - GPIO_PE0 + 1,
115};
116
117static int __init bf538_extgpio_setup(void)
118{
119 return gpiochip_add(&bf538_portc_chip) |
120 gpiochip_add(&bf538_portd_chip) |
121 gpiochip_add(&bf538_porte_chip);
122}
123arch_initcall(bf538_extgpio_setup);
diff --git a/arch/blackfin/mach-bf538/include/mach/blackfin.h b/arch/blackfin/mach-bf538/include/mach/blackfin.h
index 278e8942eef2..08b5eabb1ed5 100644
--- a/arch/blackfin/mach-bf538/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf538/include/mach/blackfin.h
@@ -37,10 +37,4 @@
37#define OFFSET_SCR 0x1C /* SCR Scratch Register */ 37#define OFFSET_SCR 0x1C /* SCR Scratch Register */
38#define OFFSET_GCTL 0x24 /* Global Control Register */ 38#define OFFSET_GCTL 0x24 /* Global Control Register */
39 39
40/* PLL_DIV Masks */
41#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
42#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
43#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
44#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
45
46#endif 40#endif
diff --git a/arch/blackfin/mach-bf538/include/mach/defBF539.h b/arch/blackfin/mach-bf538/include/mach/defBF539.h
index 5f6c34dfd08e..fac563e6f62f 100644
--- a/arch/blackfin/mach-bf538/include/mach/defBF539.h
+++ b/arch/blackfin/mach-bf538/include/mach/defBF539.h
@@ -468,31 +468,31 @@
468/* General-Purpose Ports (0xFFC01500 - 0xFFC015FF) */ 468/* General-Purpose Ports (0xFFC01500 - 0xFFC015FF) */
469 469
470/* GPIO Port C Register Names */ 470/* GPIO Port C Register Names */
471#define GPIO_C_CNFG 0xFFC01500 /* GPIO Pin Port C Configuration Register */ 471#define PORTCIO_FER 0xFFC01500 /* GPIO Pin Port C Configuration Register */
472#define GPIO_C_D 0xFFC01510 /* GPIO Pin Port C Data Register */ 472#define PORTCIO 0xFFC01510 /* GPIO Pin Port C Data Register */
473#define GPIO_C_C 0xFFC01520 /* Clear GPIO Pin Port C Register */ 473#define PORTCIO_CLEAR 0xFFC01520 /* Clear GPIO Pin Port C Register */
474#define GPIO_C_S 0xFFC01530 /* Set GPIO Pin Port C Register */ 474#define PORTCIO_SET 0xFFC01530 /* Set GPIO Pin Port C Register */
475#define GPIO_C_T 0xFFC01540 /* Toggle GPIO Pin Port C Register */ 475#define PORTCIO_TOGGLE 0xFFC01540 /* Toggle GPIO Pin Port C Register */
476#define GPIO_C_DIR 0xFFC01550 /* GPIO Pin Port C Direction Register */ 476#define PORTCIO_DIR 0xFFC01550 /* GPIO Pin Port C Direction Register */
477#define GPIO_C_INEN 0xFFC01560 /* GPIO Pin Port C Input Enable Register */ 477#define PORTCIO_INEN 0xFFC01560 /* GPIO Pin Port C Input Enable Register */
478 478
479/* GPIO Port D Register Names */ 479/* GPIO Port D Register Names */
480#define GPIO_D_CNFG 0xFFC01504 /* GPIO Pin Port D Configuration Register */ 480#define PORTDIO_FER 0xFFC01504 /* GPIO Pin Port D Configuration Register */
481#define GPIO_D_D 0xFFC01514 /* GPIO Pin Port D Data Register */ 481#define PORTDIO 0xFFC01514 /* GPIO Pin Port D Data Register */
482#define GPIO_D_C 0xFFC01524 /* Clear GPIO Pin Port D Register */ 482#define PORTDIO_CLEAR 0xFFC01524 /* Clear GPIO Pin Port D Register */
483#define GPIO_D_S 0xFFC01534 /* Set GPIO Pin Port D Register */ 483#define PORTDIO_SET 0xFFC01534 /* Set GPIO Pin Port D Register */
484#define GPIO_D_T 0xFFC01544 /* Toggle GPIO Pin Port D Register */ 484#define PORTDIO_TOGGLE 0xFFC01544 /* Toggle GPIO Pin Port D Register */
485#define GPIO_D_DIR 0xFFC01554 /* GPIO Pin Port D Direction Register */ 485#define PORTDIO_DIR 0xFFC01554 /* GPIO Pin Port D Direction Register */
486#define GPIO_D_INEN 0xFFC01564 /* GPIO Pin Port D Input Enable Register */ 486#define PORTDIO_INEN 0xFFC01564 /* GPIO Pin Port D Input Enable Register */
487 487
488/* GPIO Port E Register Names */ 488/* GPIO Port E Register Names */
489#define GPIO_E_CNFG 0xFFC01508 /* GPIO Pin Port E Configuration Register */ 489#define PORTEIO_FER 0xFFC01508 /* GPIO Pin Port E Configuration Register */
490#define GPIO_E_D 0xFFC01518 /* GPIO Pin Port E Data Register */ 490#define PORTEIO 0xFFC01518 /* GPIO Pin Port E Data Register */
491#define GPIO_E_C 0xFFC01528 /* Clear GPIO Pin Port E Register */ 491#define PORTEIO_CLEAR 0xFFC01528 /* Clear GPIO Pin Port E Register */
492#define GPIO_E_S 0xFFC01538 /* Set GPIO Pin Port E Register */ 492#define PORTEIO_SET 0xFFC01538 /* Set GPIO Pin Port E Register */
493#define GPIO_E_T 0xFFC01548 /* Toggle GPIO Pin Port E Register */ 493#define PORTEIO_TOGGLE 0xFFC01548 /* Toggle GPIO Pin Port E Register */
494#define GPIO_E_DIR 0xFFC01558 /* GPIO Pin Port E Direction Register */ 494#define PORTEIO_DIR 0xFFC01558 /* GPIO Pin Port E Direction Register */
495#define GPIO_E_INEN 0xFFC01568 /* GPIO Pin Port E Input Enable Register */ 495#define PORTEIO_INEN 0xFFC01568 /* GPIO Pin Port E Input Enable Register */
496 496
497/* DMA Controller 1 Traffic Control Registers (0xFFC01B00 - 0xFFC01BFF) */ 497/* DMA Controller 1 Traffic Control Registers (0xFFC01B00 - 0xFFC01BFF) */
498 498
@@ -1422,81 +1422,6 @@
1422/* System MMR Register Bits and Macros */ 1422/* System MMR Register Bits and Macros */
1423/******************************************************************************* */ 1423/******************************************************************************* */
1424 1424
1425/* ********************* PLL AND RESET MASKS ************************ */
1426/* PLL_CTL Masks */
1427#define PLL_CLKIN 0x0000 /* Pass CLKIN to PLL */
1428#define PLL_CLKIN_DIV2 0x0001 /* Pass CLKIN/2 to PLL */
1429#define DF 0x0001 /* 0: PLL = CLKIN, 1: PLL = CLKIN/2 */
1430#define PLL_OFF 0x0002 /* Shut off PLL clocks */
1431
1432#define STOPCK 0x0008 /* Core Clock Off */
1433#define PDWN 0x0020 /* Put the PLL in a Deep Sleep state */
1434#define IN_DELAY 0x0014 /* EBIU Input Delay Select */
1435#define OUT_DELAY 0x00C0 /* EBIU Output Delay Select */
1436#define BYPASS 0x0100 /* Bypass the PLL */
1437#define MSEL 0x7E00 /* Multiplier Select For CCLK/VCO Factors */
1438
1439/* PLL_CTL Macros */
1440#ifdef _MISRA_RULES
1441#define SET_MSEL(x) (((x)&0x3Fu) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
1442#define SET_OUT_DELAY(x) (((x)&0x03u) << 0x6)
1443#define SET_IN_DELAY(x) ((((x)&0x02u) << 0x3) | (((x)&0x01u) << 0x2))
1444#else
1445#define SET_MSEL(x) (((x)&0x3F) << 0x9) /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */
1446#define SET_OUT_DELAY(x) (((x)&0x03) << 0x6)
1447#define SET_IN_DELAY(x) ((((x)&0x02) << 0x3) | (((x)&0x01) << 0x2))
1448#endif /* _MISRA_RULES */
1449
1450/* PLL_DIV Masks */
1451#define SSEL 0x000F /* System Select */
1452#define CSEL 0x0030 /* Core Select */
1453#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
1454#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
1455#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
1456#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
1457
1458#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
1459
1460/* PLL_DIV Macros */
1461#ifdef _MISRA_RULES
1462#define SET_SSEL(x) ((x)&0xFu) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
1463#else
1464#define SET_SSEL(x) ((x)&0xF) /* Set SSEL = 0-15 --> SCLK = VCO/SSEL */
1465#endif /* _MISRA_RULES */
1466
1467/* PLL_STAT Masks */
1468#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
1469#define FULL_ON 0x0002 /* Processor In Full On Mode */
1470#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
1471#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
1472
1473/* VR_CTL Masks */
1474#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
1475#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
1476#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
1477#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
1478#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
1479
1480#define GAIN 0x000C /* Voltage Level Gain */
1481#define GAIN_5 0x0000 /* GAIN = 5 */
1482#define GAIN_10 0x0004 /* GAIN = 10 */
1483#define GAIN_20 0x0008 /* GAIN = 20 */
1484#define GAIN_50 0x000C /* GAIN = 50 */
1485
1486#define VLEV 0x00F0 /* Internal Voltage Level - Only Program Values Within Specifications */
1487#define VLEV_100 0x0090 /* VLEV = 1.00 V (See Datasheet for Regulator Tolerance) */
1488#define VLEV_105 0x00A0 /* VLEV = 1.05 V (See Datasheet for Regulator Tolerance) */
1489#define VLEV_110 0x00B0 /* VLEV = 1.10 V (See Datasheet for Regulator Tolerance) */
1490#define VLEV_115 0x00C0 /* VLEV = 1.15 V (See Datasheet for Regulator Tolerance) */
1491#define VLEV_120 0x00D0 /* VLEV = 1.20 V (See Datasheet for Regulator Tolerance) */
1492#define VLEV_125 0x00E0 /* VLEV = 1.25 V (See Datasheet for Regulator Tolerance) */
1493#define VLEV_130 0x00F0 /* VLEV = 1.30 V (See Datasheet for Regulator Tolerance) */
1494
1495#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
1496#define CANWE 0x0200 /* Enable CAN Wakeup From Hibernate */
1497#define MXVRWE 0x0400 /* Enable MXVR Wakeup From Hibernate */
1498#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
1499
1500/* SWRST Mask */ 1425/* SWRST Mask */
1501#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */ 1426#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
1502#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */ 1427#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
@@ -1609,91 +1534,6 @@
1609#endif /* _MISRA_RULES */ 1534#endif /* _MISRA_RULES */
1610 1535
1611 1536
1612/* ********* WATCHDOG TIMER MASKS ******************** */
1613/* Watchdog Timer WDOG_CTL Register Masks */
1614#ifdef _MISRA_RULES
1615#define WDEV(x) (((x)<<1) & 0x0006u) /* event generated on roll over */
1616#else
1617#define WDEV(x) (((x)<<1) & 0x0006) /* event generated on roll over */
1618#endif /* _MISRA_RULES */
1619#define WDEV_RESET 0x0000 /* generate reset event on roll over */
1620#define WDEV_NMI 0x0002 /* generate NMI event on roll over */
1621#define WDEV_GPI 0x0004 /* generate GP IRQ on roll over */
1622#define WDEV_NONE 0x0006 /* no event on roll over */
1623#define WDEN 0x0FF0 /* enable watchdog */
1624#define WDDIS 0x0AD0 /* disable watchdog */
1625#define WDRO 0x8000 /* watchdog rolled over latch */
1626
1627/* deprecated WDOG_CTL Register Masks for legacy code */
1628#define ICTL WDEV
1629#define ENABLE_RESET WDEV_RESET
1630#define WDOG_RESET WDEV_RESET
1631#define ENABLE_NMI WDEV_NMI
1632#define WDOG_NMI WDEV_NMI
1633#define ENABLE_GPI WDEV_GPI
1634#define WDOG_GPI WDEV_GPI
1635#define DISABLE_EVT WDEV_NONE
1636#define WDOG_NONE WDEV_NONE
1637
1638#define TMR_EN WDEN
1639#define WDOG_DISABLE WDDIS
1640#define TRO WDRO
1641
1642#define ICTL_P0 0x01
1643#define ICTL_P1 0x02
1644#define TRO_P 0x0F
1645
1646
1647/* *************** REAL TIME CLOCK MASKS **************************/
1648/* RTC_STAT and RTC_ALARM register */
1649#define RTSEC 0x0000003F /* Real-Time Clock Seconds */
1650#define RTMIN 0x00000FC0 /* Real-Time Clock Minutes */
1651#define RTHR 0x0001F000 /* Real-Time Clock Hours */
1652#define RTDAY 0xFFFE0000 /* Real-Time Clock Days */
1653
1654/* RTC_ICTL register */
1655#define SWIE 0x0001 /* Stopwatch Interrupt Enable */
1656#define AIE 0x0002 /* Alarm Interrupt Enable */
1657#define SIE 0x0004 /* Seconds (1 Hz) Interrupt Enable */
1658#define MIE 0x0008 /* Minutes Interrupt Enable */
1659#define HIE 0x0010 /* Hours Interrupt Enable */
1660#define DIE 0x0020 /* 24 Hours (Days) Interrupt Enable */
1661#define DAIE 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */
1662#define WCIE 0x8000 /* Write Complete Interrupt Enable */
1663
1664/* RTC_ISTAT register */
1665#define SWEF 0x0001 /* Stopwatch Event Flag */
1666#define AEF 0x0002 /* Alarm Event Flag */
1667#define SEF 0x0004 /* Seconds (1 Hz) Event Flag */
1668#define MEF 0x0008 /* Minutes Event Flag */
1669#define HEF 0x0010 /* Hours Event Flag */
1670#define DEF 0x0020 /* 24 Hours (Days) Event Flag */
1671#define DAEF 0x0040 /* Day Alarm (Day, Hour, Minute, Second) Event Flag */
1672#define WPS 0x4000 /* Write Pending Status (RO) */
1673#define WCOM 0x8000 /* Write Complete */
1674
1675/* RTC_FAST Mask (RTC_PREN Mask) */
1676#define ENABLE_PRESCALE 0x00000001 /* Enable prescaler so RTC runs at 1 Hz */
1677#define PREN 0x00000001
1678 /* ** Must be set after power-up for proper operation of RTC */
1679
1680/* Deprecated RTC_STAT and RTC_ALARM Masks */
1681#define RTC_SEC RTSEC /* Real-Time Clock Seconds */
1682#define RTC_MIN RTMIN /* Real-Time Clock Minutes */
1683#define RTC_HR RTHR /* Real-Time Clock Hours */
1684#define RTC_DAY RTDAY /* Real-Time Clock Days */
1685
1686/* Deprecated RTC_ICTL/RTC_ISTAT Masks */
1687#define STOPWATCH SWIE /* Stopwatch Interrupt Enable */
1688#define ALARM AIE /* Alarm Interrupt Enable */
1689#define SECOND SIE /* Seconds (1 Hz) Interrupt Enable */
1690#define MINUTE MIE /* Minutes Interrupt Enable */
1691#define HOUR HIE /* Hours Interrupt Enable */
1692#define DAY DIE /* 24 Hours (Days) Interrupt Enable */
1693#define DAY_ALARM DAIE /* Day Alarm (Day, Hour, Minute, Second) Interrupt Enable */
1694#define WRITE_COMPLETE WCIE /* Write Complete Interrupt Enable */
1695
1696
1697/* ***************************** UART CONTROLLER MASKS ********************** */ 1537/* ***************************** UART CONTROLLER MASKS ********************** */
1698/* UARTx_LCR Register */ 1538/* UARTx_LCR Register */
1699#ifdef _MISRA_RULES 1539#ifdef _MISRA_RULES
@@ -1917,52 +1757,6 @@
1917 1757
1918 1758
1919/* ********** DMA CONTROLLER MASKS ***********************/ 1759/* ********** DMA CONTROLLER MASKS ***********************/
1920/* DMAx_CONFIG, MDMA_yy_CONFIG Masks */
1921#define DMAEN 0x0001 /* Channel Enable */
1922#define WNR 0x0002 /* Channel Direction (W/R*) */
1923#define WDSIZE_8 0x0000 /* Word Size 8 bits */
1924#define WDSIZE_16 0x0004 /* Word Size 16 bits */
1925#define WDSIZE_32 0x0008 /* Word Size 32 bits */
1926#define DMA2D 0x0010 /* 2D/1D* Mode */
1927#define RESTART 0x0020 /* Restart */
1928#define DI_SEL 0x0040 /* Data Interrupt Select */
1929#define DI_EN 0x0080 /* Data Interrupt Enable */
1930#define NDSIZE 0x0900 /* Next Descriptor Size */
1931#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1932#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1933#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1934#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1935#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1936#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1937#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1938#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1939#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1940#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1941
1942#define DMAFLOW 0x7000 /* Flow Control */
1943#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1944#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1945#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1946#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1947#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1948
1949#define DMAEN_P 0x0 /* Channel Enable */
1950#define WNR_P 0x1 /* Channel Direction (W/R*) */
1951#define DMA2D_P 0x4 /* 2D/1D* Mode */
1952#define RESTART_P 0x5 /* Restart */
1953#define DI_SEL_P 0x6 /* Data Interrupt Select */
1954#define DI_EN_P 0x7 /* Data Interrupt Enable */
1955
1956/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS Masks */
1957#define DMA_DONE 0x0001 /* DMA Done Indicator */
1958#define DMA_ERR 0x0002 /* DMA Error Indicator */
1959#define DFETCH 0x0004 /* Descriptor Fetch Indicator */
1960#define DMA_RUN 0x0008 /* DMA Running Indicator */
1961
1962#define DMA_DONE_P 0x0 /* DMA Done Indicator */
1963#define DMA_ERR_P 0x1 /* DMA Error Indicator */
1964#define DFETCH_P 0x2 /* Descriptor Fetch Indicator */
1965#define DMA_RUN_P 0x3 /* DMA Running Indicator */
1966 1760
1967/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */ 1761/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP Masks */
1968 1762
@@ -2625,1019 +2419,6 @@
2625#define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */ 2419#define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */
2626 2420
2627 2421
2628/********************************* MXVR MASKS ****************************************/
2629
2630/* MXVR_CONFIG Masks */
2631
2632#define MXVREN 0x00000001lu
2633#define MMSM 0x00000002lu
2634#define ACTIVE 0x00000004lu
2635#define SDELAY 0x00000008lu
2636#define NCMRXEN 0x00000010lu
2637#define RWRRXEN 0x00000020lu
2638#define MTXEN 0x00000040lu
2639#define MTXON 0x00000080lu /*legacy*/
2640#define MTXONB 0x00000080lu
2641#define EPARITY 0x00000100lu
2642#define MSB 0x00001E00lu
2643#define APRXEN 0x00002000lu
2644#define WAKEUP 0x00004000lu
2645#define LMECH 0x00008000lu
2646
2647#ifdef _MISRA_RULES
2648#define SET_MSB(x) (((x)&0xFu) << 0x9)
2649#else
2650#define SET_MSB(x) (((x)&0xF) << 0x9)
2651#endif /* _MISRA_RULES */
2652
2653
2654/* MXVR_PLL_CTL_0 Masks */
2655
2656#define MXTALCEN 0x00000001lu
2657#define MXTALFEN 0x00000002lu
2658#define MPLLMS 0x00000008lu
2659#define MXTALMUL 0x00000030lu
2660#define MPLLEN 0x00000040lu
2661#define MPLLEN0 0x00000040lu /* legacy */
2662#define MPLLEN1 0x00000080lu /* legacy */
2663#define MMCLKEN 0x00000100lu
2664#define MMCLKMUL 0x00001E00lu
2665#define MPLLRSTB 0x00002000lu
2666#define MPLLRSTB0 0x00002000lu /* legacy */
2667#define MPLLRSTB1 0x00004000lu /* legacy */
2668#define MBCLKEN 0x00010000lu
2669#define MBCLKDIV 0x001E0000lu
2670#define MPLLCDR 0x00200000lu
2671#define MPLLCDR0 0x00200000lu /* legacy */
2672#define MPLLCDR1 0x00400000lu /* legacy */
2673#define INVRX 0x00800000lu
2674#define MFSEN 0x01000000lu
2675#define MFSDIV 0x1E000000lu
2676#define MFSSEL 0x60000000lu
2677#define MFSSYNC 0x80000000lu
2678
2679#define MXTALMUL_256FS 0x00000000lu /* legacy */
2680#define MXTALMUL_384FS 0x00000010lu /* legacy */
2681#define MXTALMUL_512FS 0x00000020lu /* legacy */
2682#define MXTALMUL_1024FS 0x00000030lu
2683
2684#define MMCLKMUL_1024FS 0x00000000lu
2685#define MMCLKMUL_512FS 0x00000200lu
2686#define MMCLKMUL_256FS 0x00000400lu
2687#define MMCLKMUL_128FS 0x00000600lu
2688#define MMCLKMUL_64FS 0x00000800lu
2689#define MMCLKMUL_32FS 0x00000A00lu
2690#define MMCLKMUL_16FS 0x00000C00lu
2691#define MMCLKMUL_8FS 0x00000E00lu
2692#define MMCLKMUL_4FS 0x00001000lu
2693#define MMCLKMUL_2FS 0x00001200lu
2694#define MMCLKMUL_1FS 0x00001400lu
2695#define MMCLKMUL_1536FS 0x00001A00lu
2696#define MMCLKMUL_768FS 0x00001C00lu
2697#define MMCLKMUL_384FS 0x00001E00lu
2698
2699#define MBCLKDIV_DIV2 0x00020000lu
2700#define MBCLKDIV_DIV4 0x00040000lu
2701#define MBCLKDIV_DIV8 0x00060000lu
2702#define MBCLKDIV_DIV16 0x00080000lu
2703#define MBCLKDIV_DIV32 0x000A0000lu
2704#define MBCLKDIV_DIV64 0x000C0000lu
2705#define MBCLKDIV_DIV128 0x000E0000lu
2706#define MBCLKDIV_DIV256 0x00100000lu
2707#define MBCLKDIV_DIV512 0x00120000lu
2708#define MBCLKDIV_DIV1024 0x00140000lu
2709
2710#define MFSDIV_DIV2 0x02000000lu
2711#define MFSDIV_DIV4 0x04000000lu
2712#define MFSDIV_DIV8 0x06000000lu
2713#define MFSDIV_DIV16 0x08000000lu
2714#define MFSDIV_DIV32 0x0A000000lu
2715#define MFSDIV_DIV64 0x0C000000lu
2716#define MFSDIV_DIV128 0x0E000000lu
2717#define MFSDIV_DIV256 0x10000000lu
2718#define MFSDIV_DIV512 0x12000000lu
2719#define MFSDIV_DIV1024 0x14000000lu
2720
2721#define MFSSEL_CLOCK 0x00000000lu
2722#define MFSSEL_PULSE_HI 0x20000000lu
2723#define MFSSEL_PULSE_LO 0x40000000lu
2724
2725
2726/* MXVR_PLL_CTL_1 Masks */
2727
2728#define MSTO 0x00000001lu
2729#define MSTO0 0x00000001lu /* legacy */
2730#define MHOGGD 0x00000004lu
2731#define MHOGGD0 0x00000004lu /* legacy */
2732#define MHOGGD1 0x00000008lu /* legacy */
2733#define MSHAPEREN 0x00000010lu
2734#define MSHAPEREN0 0x00000010lu /* legacy */
2735#define MSHAPEREN1 0x00000020lu /* legacy */
2736#define MPLLCNTEN 0x00008000lu
2737#define MPLLCNT 0xFFFF0000lu
2738
2739#ifdef _MISRA_RULES
2740#define SET_MPLLCNT(x) (((x)&0xFFFFu) << 0x10)
2741#else
2742#define SET_MPLLCNT(x) (((x)&0xFFFF) << 0x10)
2743#endif /* _MISRA_RULES */
2744
2745
2746/* MXVR_PLL_CTL_2 Masks */
2747
2748#define MSHAPERSEL 0x00000007lu
2749#define MCPSEL 0x000000E0lu
2750
2751/* MXVR_INT_STAT_0 Masks */
2752
2753#define NI2A 0x00000001lu
2754#define NA2I 0x00000002lu
2755#define SBU2L 0x00000004lu
2756#define SBL2U 0x00000008lu
2757#define PRU 0x00000010lu
2758#define MPRU 0x00000020lu
2759#define DRU 0x00000040lu
2760#define MDRU 0x00000080lu
2761#define SBU 0x00000100lu
2762#define ATU 0x00000200lu
2763#define FCZ0 0x00000400lu
2764#define FCZ1 0x00000800lu
2765#define PERR 0x00001000lu
2766#define MH2L 0x00002000lu
2767#define ML2H 0x00004000lu
2768#define WUP 0x00008000lu
2769#define FU2L 0x00010000lu
2770#define FL2U 0x00020000lu
2771#define BU2L 0x00040000lu
2772#define BL2U 0x00080000lu
2773#define PCZ 0x00400000lu
2774#define FERR 0x00800000lu
2775#define CMR 0x01000000lu
2776#define CMROF 0x02000000lu
2777#define CMTS 0x04000000lu
2778#define CMTC 0x08000000lu
2779#define RWRC 0x10000000lu
2780#define BCZ 0x20000000lu
2781#define BMERR 0x40000000lu
2782#define DERR 0x80000000lu
2783
2784
2785/* MXVR_INT_EN_0 Masks */
2786
2787#define NI2AEN NI2A
2788#define NA2IEN NA2I
2789#define SBU2LEN SBU2L
2790#define SBL2UEN SBL2U
2791#define PRUEN PRU
2792#define MPRUEN MPRU
2793#define DRUEN DRU
2794#define MDRUEN MDRU
2795#define SBUEN SBU
2796#define ATUEN ATU
2797#define FCZ0EN FCZ0
2798#define FCZ1EN FCZ1
2799#define PERREN PERR
2800#define MH2LEN MH2L
2801#define ML2HEN ML2H
2802#define WUPEN WUP
2803#define FU2LEN FU2L
2804#define FL2UEN FL2U
2805#define BU2LEN BU2L
2806#define BL2UEN BL2U
2807#define PCZEN PCZ
2808#define FERREN FERR
2809#define CMREN CMR
2810#define CMROFEN CMROF
2811#define CMTSEN CMTS
2812#define CMTCEN CMTC
2813#define RWRCEN RWRC
2814#define BCZEN BCZ
2815#define BMERREN BMERR
2816#define DERREN DERR
2817
2818
2819/* MXVR_INT_STAT_1 Masks */
2820
2821#define APR 0x00000004lu
2822#define APROF 0x00000008lu
2823#define APTS 0x00000040lu
2824#define APTC 0x00000080lu
2825#define APRCE 0x00000400lu
2826#define APRPE 0x00000800lu
2827
2828#define HDONE0 0x00000001lu
2829#define DONE0 0x00000002lu
2830#define HDONE1 0x00000010lu
2831#define DONE1 0x00000020lu
2832#define HDONE2 0x00000100lu
2833#define DONE2 0x00000200lu
2834#define HDONE3 0x00001000lu
2835#define DONE3 0x00002000lu
2836#define HDONE4 0x00010000lu
2837#define DONE4 0x00020000lu
2838#define HDONE5 0x00100000lu
2839#define DONE5 0x00200000lu
2840#define HDONE6 0x01000000lu
2841#define DONE6 0x02000000lu
2842#define HDONE7 0x10000000lu
2843#define DONE7 0x20000000lu
2844
2845#define DONEX(x) (0x00000002 << (4 * (x)))
2846#define HDONEX(x) (0x00000001 << (4 * (x)))
2847
2848
2849/* MXVR_INT_EN_1 Masks */
2850
2851#define APREN APR
2852#define APROFEN APROF
2853#define APTSEN APTS
2854#define APTCEN APTC
2855#define APRCEEN APRCE
2856#define APRPEEN APRPE
2857
2858#define HDONEEN0 HDONE0
2859#define DONEEN0 DONE0
2860#define HDONEEN1 HDONE1
2861#define DONEEN1 DONE1
2862#define HDONEEN2 HDONE2
2863#define DONEEN2 DONE2
2864#define HDONEEN3 HDONE3
2865#define DONEEN3 DONE3
2866#define HDONEEN4 HDONE4
2867#define DONEEN4 DONE4
2868#define HDONEEN5 HDONE5
2869#define DONEEN5 DONE5
2870#define HDONEEN6 HDONE6
2871#define DONEEN6 DONE6
2872#define HDONEEN7 HDONE7
2873#define DONEEN7 DONE7
2874
2875#define DONEENX(x) (0x00000002 << (4 * (x)))
2876#define HDONEENX(x) (0x00000001 << (4 * (x)))
2877
2878
2879/* MXVR_STATE_0 Masks */
2880
2881#define NACT 0x00000001lu
2882#define SBLOCK 0x00000002lu
2883#define PFDLOCK 0x00000004lu
2884#define PFDLOCK0 0x00000004lu /* legacy */
2885#define PDD 0x00000008lu
2886#define PDD0 0x00000008lu /* legacy */
2887#define PVCO 0x00000010lu
2888#define PVCO0 0x00000010lu /* legacy */
2889#define PFDLOCK1 0x00000020lu /* legacy */
2890#define PDD1 0x00000040lu /* legacy */
2891#define PVCO1 0x00000080lu /* legacy */
2892#define APBSY 0x00000100lu
2893#define APARB 0x00000200lu
2894#define APTX 0x00000400lu
2895#define APRX 0x00000800lu
2896#define CMBSY 0x00001000lu
2897#define CMARB 0x00002000lu
2898#define CMTX 0x00004000lu
2899#define CMRX 0x00008000lu
2900#define MRXONB 0x00010000lu
2901#define RGSIP 0x00020000lu
2902#define DALIP 0x00040000lu
2903#define ALIP 0x00080000lu
2904#define RRDIP 0x00100000lu
2905#define RWRIP 0x00200000lu
2906#define FLOCK 0x00400000lu
2907#define BLOCK 0x00800000lu
2908#define RSB 0x0F000000lu
2909#define DERRNUM 0xF0000000lu
2910
2911
2912/* MXVR_STATE_1 Masks */
2913
2914#define STXNUMB 0x0000000Flu
2915#define SRXNUMB 0x000000F0lu
2916#define APCONT 0x00000100lu
2917#define DMAACTIVEX 0x00FF0000lu
2918#define DMAACTIVE0 0x00010000lu
2919#define DMAACTIVE1 0x00020000lu
2920#define DMAACTIVE2 0x00040000lu
2921#define DMAACTIVE3 0x00080000lu
2922#define DMAACTIVE4 0x00100000lu
2923#define DMAACTIVE5 0x00200000lu
2924#define DMAACTIVE6 0x00400000lu
2925#define DMAACTIVE7 0x00800000lu
2926#define DMAPMENX 0xFF000000lu
2927#define DMAPMEN0 0x01000000lu
2928#define DMAPMEN1 0x02000000lu
2929#define DMAPMEN2 0x04000000lu
2930#define DMAPMEN3 0x08000000lu
2931#define DMAPMEN4 0x10000000lu
2932#define DMAPMEN5 0x20000000lu
2933#define DMAPMEN6 0x40000000lu
2934#define DMAPMEN7 0x80000000lu
2935
2936
2937/* MXVR_POSITION Masks */
2938
2939#define PVALID 0x8000
2940#define POSITION 0x003F
2941
2942
2943/* MXVR_MAX_POSITION Masks */
2944
2945#define MPVALID 0x8000
2946#define MPOSITION 0x003F
2947
2948
2949/* MXVR_DELAY Masks */
2950
2951#define DVALID 0x8000
2952#define DELAY 0x003F
2953
2954
2955/* MXVR_MAX_DELAY Masks */
2956
2957#define MDVALID 0x8000
2958#define MDELAY 0x003F
2959
2960
2961/* MXVR_LADDR Masks */
2962
2963#define LVALID 0x80000000lu
2964#define LADDR 0x0000FFFFlu
2965
2966
2967/* MXVR_GADDR Masks */
2968
2969#define GVALID 0x8000
2970#define GADDRL 0x00FF
2971
2972
2973/* MXVR_AADDR Masks */
2974
2975#define AVALID 0x80000000lu
2976#define AADDR 0x0000FFFFlu
2977
2978
2979/* MXVR_ALLOC_0 Masks */
2980
2981#define CIU0 0x00000080lu
2982#define CIU1 0x00008000lu
2983#define CIU2 0x00800000lu
2984#define CIU3 0x80000000lu
2985
2986#define CL0 0x0000007Flu
2987#define CL1 0x00007F00lu
2988#define CL2 0x007F0000lu
2989#define CL3 0x7F000000lu
2990
2991
2992/* MXVR_ALLOC_1 Masks */
2993
2994#define CIU4 0x00000080lu
2995#define CIU5 0x00008000lu
2996#define CIU6 0x00800000lu
2997#define CIU7 0x80000000lu
2998
2999#define CL4 0x0000007Flu
3000#define CL5 0x00007F00lu
3001#define CL6 0x007F0000lu
3002#define CL7 0x7F000000lu
3003
3004
3005/* MXVR_ALLOC_2 Masks */
3006
3007#define CIU8 0x00000080lu
3008#define CIU9 0x00008000lu
3009#define CIU10 0x00800000lu
3010#define CIU11 0x80000000lu
3011
3012#define CL8 0x0000007Flu
3013#define CL9 0x00007F00lu
3014#define CL10 0x007F0000lu
3015#define CL11 0x7F000000lu
3016
3017
3018/* MXVR_ALLOC_3 Masks */
3019
3020#define CIU12 0x00000080lu
3021#define CIU13 0x00008000lu
3022#define CIU14 0x00800000lu
3023#define CIU15 0x80000000lu
3024
3025#define CL12 0x0000007Flu
3026#define CL13 0x00007F00lu
3027#define CL14 0x007F0000lu
3028#define CL15 0x7F000000lu
3029
3030
3031/* MXVR_ALLOC_4 Masks */
3032
3033#define CIU16 0x00000080lu
3034#define CIU17 0x00008000lu
3035#define CIU18 0x00800000lu
3036#define CIU19 0x80000000lu
3037
3038#define CL16 0x0000007Flu
3039#define CL17 0x00007F00lu
3040#define CL18 0x007F0000lu
3041#define CL19 0x7F000000lu
3042
3043
3044/* MXVR_ALLOC_5 Masks */
3045
3046#define CIU20 0x00000080lu
3047#define CIU21 0x00008000lu
3048#define CIU22 0x00800000lu
3049#define CIU23 0x80000000lu
3050
3051#define CL20 0x0000007Flu
3052#define CL21 0x00007F00lu
3053#define CL22 0x007F0000lu
3054#define CL23 0x7F000000lu
3055
3056
3057/* MXVR_ALLOC_6 Masks */
3058
3059#define CIU24 0x00000080lu
3060#define CIU25 0x00008000lu
3061#define CIU26 0x00800000lu
3062#define CIU27 0x80000000lu
3063
3064#define CL24 0x0000007Flu
3065#define CL25 0x00007F00lu
3066#define CL26 0x007F0000lu
3067#define CL27 0x7F000000lu
3068
3069
3070/* MXVR_ALLOC_7 Masks */
3071
3072#define CIU28 0x00000080lu
3073#define CIU29 0x00008000lu
3074#define CIU30 0x00800000lu
3075#define CIU31 0x80000000lu
3076
3077#define CL28 0x0000007Flu
3078#define CL29 0x00007F00lu
3079#define CL30 0x007F0000lu
3080#define CL31 0x7F000000lu
3081
3082
3083/* MXVR_ALLOC_8 Masks */
3084
3085#define CIU32 0x00000080lu
3086#define CIU33 0x00008000lu
3087#define CIU34 0x00800000lu
3088#define CIU35 0x80000000lu
3089
3090#define CL32 0x0000007Flu
3091#define CL33 0x00007F00lu
3092#define CL34 0x007F0000lu
3093#define CL35 0x7F000000lu
3094
3095
3096/* MXVR_ALLOC_9 Masks */
3097
3098#define CIU36 0x00000080lu
3099#define CIU37 0x00008000lu
3100#define CIU38 0x00800000lu
3101#define CIU39 0x80000000lu
3102
3103#define CL36 0x0000007Flu
3104#define CL37 0x00007F00lu
3105#define CL38 0x007F0000lu
3106#define CL39 0x7F000000lu
3107
3108
3109/* MXVR_ALLOC_10 Masks */
3110
3111#define CIU40 0x00000080lu
3112#define CIU41 0x00008000lu
3113#define CIU42 0x00800000lu
3114#define CIU43 0x80000000lu
3115
3116#define CL40 0x0000007Flu
3117#define CL41 0x00007F00lu
3118#define CL42 0x007F0000lu
3119#define CL43 0x7F000000lu
3120
3121
3122/* MXVR_ALLOC_11 Masks */
3123
3124#define CIU44 0x00000080lu
3125#define CIU45 0x00008000lu
3126#define CIU46 0x00800000lu
3127#define CIU47 0x80000000lu
3128
3129#define CL44 0x0000007Flu
3130#define CL45 0x00007F00lu
3131#define CL46 0x007F0000lu
3132#define CL47 0x7F000000lu
3133
3134
3135/* MXVR_ALLOC_12 Masks */
3136
3137#define CIU48 0x00000080lu
3138#define CIU49 0x00008000lu
3139#define CIU50 0x00800000lu
3140#define CIU51 0x80000000lu
3141
3142#define CL48 0x0000007Flu
3143#define CL49 0x00007F00lu
3144#define CL50 0x007F0000lu
3145#define CL51 0x7F000000lu
3146
3147
3148/* MXVR_ALLOC_13 Masks */
3149
3150#define CIU52 0x00000080lu
3151#define CIU53 0x00008000lu
3152#define CIU54 0x00800000lu
3153#define CIU55 0x80000000lu
3154
3155#define CL52 0x0000007Flu
3156#define CL53 0x00007F00lu
3157#define CL54 0x007F0000lu
3158#define CL55 0x7F000000lu
3159
3160
3161/* MXVR_ALLOC_14 Masks */
3162
3163#define CIU56 0x00000080lu
3164#define CIU57 0x00008000lu
3165#define CIU58 0x00800000lu
3166#define CIU59 0x80000000lu
3167
3168#define CL56 0x0000007Flu
3169#define CL57 0x00007F00lu
3170#define CL58 0x007F0000lu
3171#define CL59 0x7F000000lu
3172
3173
3174/* MXVR_SYNC_LCHAN_0 Masks */
3175
3176#define LCHANPC0 0x0000000Flu
3177#define LCHANPC1 0x000000F0lu
3178#define LCHANPC2 0x00000F00lu
3179#define LCHANPC3 0x0000F000lu
3180#define LCHANPC4 0x000F0000lu
3181#define LCHANPC5 0x00F00000lu
3182#define LCHANPC6 0x0F000000lu
3183#define LCHANPC7 0xF0000000lu
3184
3185
3186/* MXVR_SYNC_LCHAN_1 Masks */
3187
3188#define LCHANPC8 0x0000000Flu
3189#define LCHANPC9 0x000000F0lu
3190#define LCHANPC10 0x00000F00lu
3191#define LCHANPC11 0x0000F000lu
3192#define LCHANPC12 0x000F0000lu
3193#define LCHANPC13 0x00F00000lu
3194#define LCHANPC14 0x0F000000lu
3195#define LCHANPC15 0xF0000000lu
3196
3197
3198/* MXVR_SYNC_LCHAN_2 Masks */
3199
3200#define LCHANPC16 0x0000000Flu
3201#define LCHANPC17 0x000000F0lu
3202#define LCHANPC18 0x00000F00lu
3203#define LCHANPC19 0x0000F000lu
3204#define LCHANPC20 0x000F0000lu
3205#define LCHANPC21 0x00F00000lu
3206#define LCHANPC22 0x0F000000lu
3207#define LCHANPC23 0xF0000000lu
3208
3209
3210/* MXVR_SYNC_LCHAN_3 Masks */
3211
3212#define LCHANPC24 0x0000000Flu
3213#define LCHANPC25 0x000000F0lu
3214#define LCHANPC26 0x00000F00lu
3215#define LCHANPC27 0x0000F000lu
3216#define LCHANPC28 0x000F0000lu
3217#define LCHANPC29 0x00F00000lu
3218#define LCHANPC30 0x0F000000lu
3219#define LCHANPC31 0xF0000000lu
3220
3221
3222/* MXVR_SYNC_LCHAN_4 Masks */
3223
3224#define LCHANPC32 0x0000000Flu
3225#define LCHANPC33 0x000000F0lu
3226#define LCHANPC34 0x00000F00lu
3227#define LCHANPC35 0x0000F000lu
3228#define LCHANPC36 0x000F0000lu
3229#define LCHANPC37 0x00F00000lu
3230#define LCHANPC38 0x0F000000lu
3231#define LCHANPC39 0xF0000000lu
3232
3233
3234/* MXVR_SYNC_LCHAN_5 Masks */
3235
3236#define LCHANPC40 0x0000000Flu
3237#define LCHANPC41 0x000000F0lu
3238#define LCHANPC42 0x00000F00lu
3239#define LCHANPC43 0x0000F000lu
3240#define LCHANPC44 0x000F0000lu
3241#define LCHANPC45 0x00F00000lu
3242#define LCHANPC46 0x0F000000lu
3243#define LCHANPC47 0xF0000000lu
3244
3245
3246/* MXVR_SYNC_LCHAN_6 Masks */
3247
3248#define LCHANPC48 0x0000000Flu
3249#define LCHANPC49 0x000000F0lu
3250#define LCHANPC50 0x00000F00lu
3251#define LCHANPC51 0x0000F000lu
3252#define LCHANPC52 0x000F0000lu
3253#define LCHANPC53 0x00F00000lu
3254#define LCHANPC54 0x0F000000lu
3255#define LCHANPC55 0xF0000000lu
3256
3257
3258/* MXVR_SYNC_LCHAN_7 Masks */
3259
3260#define LCHANPC56 0x0000000Flu
3261#define LCHANPC57 0x000000F0lu
3262#define LCHANPC58 0x00000F00lu
3263#define LCHANPC59 0x0000F000lu
3264
3265
3266/* MXVR_DMAx_CONFIG Masks */
3267
3268#define MDMAEN 0x00000001lu
3269#define DD 0x00000002lu
3270#define LCHAN 0x000003C0lu
3271#define BITSWAPEN 0x00000400lu
3272#define BYSWAPEN 0x00000800lu
3273#define MFLOW 0x00007000lu
3274#define FIXEDPM 0x00080000lu
3275#define STARTPAT 0x00300000lu
3276#define STOPPAT 0x00C00000lu
3277#define COUNTPOS 0x1C000000lu
3278
3279#define DD_TX 0x00000000lu
3280#define DD_RX 0x00000002lu
3281
3282#define LCHAN_0 0x00000000lu
3283#define LCHAN_1 0x00000040lu
3284#define LCHAN_2 0x00000080lu
3285#define LCHAN_3 0x000000C0lu
3286#define LCHAN_4 0x00000100lu
3287#define LCHAN_5 0x00000140lu
3288#define LCHAN_6 0x00000180lu
3289#define LCHAN_7 0x000001C0lu
3290
3291#define MFLOW_STOP 0x00000000lu
3292#define MFLOW_AUTO 0x00001000lu
3293#define MFLOW_PVC 0x00002000lu
3294#define MFLOW_PSS 0x00003000lu
3295#define MFLOW_PFC 0x00004000lu
3296
3297#define STARTPAT_0 0x00000000lu
3298#define STARTPAT_1 0x00100000lu
3299
3300#define STOPPAT_0 0x00000000lu
3301#define STOPPAT_1 0x00400000lu
3302
3303#define COUNTPOS_0 0x00000000lu
3304#define COUNTPOS_1 0x04000000lu
3305#define COUNTPOS_2 0x08000000lu
3306#define COUNTPOS_3 0x0C000000lu
3307#define COUNTPOS_4 0x10000000lu
3308#define COUNTPOS_5 0x14000000lu
3309#define COUNTPOS_6 0x18000000lu
3310#define COUNTPOS_7 0x1C000000lu
3311
3312
3313/* MXVR_AP_CTL Masks */
3314
3315#define STARTAP 0x00000001lu
3316#define CANCELAP 0x00000002lu
3317#define RESETAP 0x00000004lu
3318#define APRBE0 0x00004000lu
3319#define APRBE1 0x00008000lu
3320#define APRBEX 0x0000C000lu
3321
3322
3323/* MXVR_CM_CTL Masks */
3324
3325#define STARTCM 0x00000001lu
3326#define CANCELCM 0x00000002lu
3327#define CMRBEX 0xFFFF0000lu
3328#define CMRBE0 0x00010000lu
3329#define CMRBE1 0x00020000lu
3330#define CMRBE2 0x00040000lu
3331#define CMRBE3 0x00080000lu
3332#define CMRBE4 0x00100000lu
3333#define CMRBE5 0x00200000lu
3334#define CMRBE6 0x00400000lu
3335#define CMRBE7 0x00800000lu
3336#define CMRBE8 0x01000000lu
3337#define CMRBE9 0x02000000lu
3338#define CMRBE10 0x04000000lu
3339#define CMRBE11 0x08000000lu
3340#define CMRBE12 0x10000000lu
3341#define CMRBE13 0x20000000lu
3342#define CMRBE14 0x40000000lu
3343#define CMRBE15 0x80000000lu
3344
3345
3346/* MXVR_PAT_DATA_x Masks */
3347
3348#define MATCH_DATA_0 0x000000FFlu
3349#define MATCH_DATA_1 0x0000FF00lu
3350#define MATCH_DATA_2 0x00FF0000lu
3351#define MATCH_DATA_3 0xFF000000lu
3352
3353
3354
3355/* MXVR_PAT_EN_x Masks */
3356
3357#define MATCH_EN_0_0 0x00000001lu
3358#define MATCH_EN_0_1 0x00000002lu
3359#define MATCH_EN_0_2 0x00000004lu
3360#define MATCH_EN_0_3 0x00000008lu
3361#define MATCH_EN_0_4 0x00000010lu
3362#define MATCH_EN_0_5 0x00000020lu
3363#define MATCH_EN_0_6 0x00000040lu
3364#define MATCH_EN_0_7 0x00000080lu
3365
3366#define MATCH_EN_1_0 0x00000100lu
3367#define MATCH_EN_1_1 0x00000200lu
3368#define MATCH_EN_1_2 0x00000400lu
3369#define MATCH_EN_1_3 0x00000800lu
3370#define MATCH_EN_1_4 0x00001000lu
3371#define MATCH_EN_1_5 0x00002000lu
3372#define MATCH_EN_1_6 0x00004000lu
3373#define MATCH_EN_1_7 0x00008000lu
3374
3375#define MATCH_EN_2_0 0x00010000lu
3376#define MATCH_EN_2_1 0x00020000lu
3377#define MATCH_EN_2_2 0x00040000lu
3378#define MATCH_EN_2_3 0x00080000lu
3379#define MATCH_EN_2_4 0x00100000lu
3380#define MATCH_EN_2_5 0x00200000lu
3381#define MATCH_EN_2_6 0x00400000lu
3382#define MATCH_EN_2_7 0x00800000lu
3383
3384#define MATCH_EN_3_0 0x01000000lu
3385#define MATCH_EN_3_1 0x02000000lu
3386#define MATCH_EN_3_2 0x04000000lu
3387#define MATCH_EN_3_3 0x08000000lu
3388#define MATCH_EN_3_4 0x10000000lu
3389#define MATCH_EN_3_5 0x20000000lu
3390#define MATCH_EN_3_6 0x40000000lu
3391#define MATCH_EN_3_7 0x80000000lu
3392
3393
3394/* MXVR_ROUTING_0 Masks */
3395
3396#define MUTE_CH0 0x00000080lu
3397#define MUTE_CH1 0x00008000lu
3398#define MUTE_CH2 0x00800000lu
3399#define MUTE_CH3 0x80000000lu
3400
3401#define TX_CH0 0x0000007Flu
3402#define TX_CH1 0x00007F00lu
3403#define TX_CH2 0x007F0000lu
3404#define TX_CH3 0x7F000000lu
3405
3406
3407/* MXVR_ROUTING_1 Masks */
3408
3409#define MUTE_CH4 0x00000080lu
3410#define MUTE_CH5 0x00008000lu
3411#define MUTE_CH6 0x00800000lu
3412#define MUTE_CH7 0x80000000lu
3413
3414#define TX_CH4 0x0000007Flu
3415#define TX_CH5 0x00007F00lu
3416#define TX_CH6 0x007F0000lu
3417#define TX_CH7 0x7F000000lu
3418
3419
3420/* MXVR_ROUTING_2 Masks */
3421
3422#define MUTE_CH8 0x00000080lu
3423#define MUTE_CH9 0x00008000lu
3424#define MUTE_CH10 0x00800000lu
3425#define MUTE_CH11 0x80000000lu
3426
3427#define TX_CH8 0x0000007Flu
3428#define TX_CH9 0x00007F00lu
3429#define TX_CH10 0x007F0000lu
3430#define TX_CH11 0x7F000000lu
3431
3432/* MXVR_ROUTING_3 Masks */
3433
3434#define MUTE_CH12 0x00000080lu
3435#define MUTE_CH13 0x00008000lu
3436#define MUTE_CH14 0x00800000lu
3437#define MUTE_CH15 0x80000000lu
3438
3439#define TX_CH12 0x0000007Flu
3440#define TX_CH13 0x00007F00lu
3441#define TX_CH14 0x007F0000lu
3442#define TX_CH15 0x7F000000lu
3443
3444
3445/* MXVR_ROUTING_4 Masks */
3446
3447#define MUTE_CH16 0x00000080lu
3448#define MUTE_CH17 0x00008000lu
3449#define MUTE_CH18 0x00800000lu
3450#define MUTE_CH19 0x80000000lu
3451
3452#define TX_CH16 0x0000007Flu
3453#define TX_CH17 0x00007F00lu
3454#define TX_CH18 0x007F0000lu
3455#define TX_CH19 0x7F000000lu
3456
3457
3458/* MXVR_ROUTING_5 Masks */
3459
3460#define MUTE_CH20 0x00000080lu
3461#define MUTE_CH21 0x00008000lu
3462#define MUTE_CH22 0x00800000lu
3463#define MUTE_CH23 0x80000000lu
3464
3465#define TX_CH20 0x0000007Flu
3466#define TX_CH21 0x00007F00lu
3467#define TX_CH22 0x007F0000lu
3468#define TX_CH23 0x7F000000lu
3469
3470
3471/* MXVR_ROUTING_6 Masks */
3472
3473#define MUTE_CH24 0x00000080lu
3474#define MUTE_CH25 0x00008000lu
3475#define MUTE_CH26 0x00800000lu
3476#define MUTE_CH27 0x80000000lu
3477
3478#define TX_CH24 0x0000007Flu
3479#define TX_CH25 0x00007F00lu
3480#define TX_CH26 0x007F0000lu
3481#define TX_CH27 0x7F000000lu
3482
3483
3484/* MXVR_ROUTING_7 Masks */
3485
3486#define MUTE_CH28 0x00000080lu
3487#define MUTE_CH29 0x00008000lu
3488#define MUTE_CH30 0x00800000lu
3489#define MUTE_CH31 0x80000000lu
3490
3491#define TX_CH28 0x0000007Flu
3492#define TX_CH29 0x00007F00lu
3493#define TX_CH30 0x007F0000lu
3494#define TX_CH31 0x7F000000lu
3495
3496
3497/* MXVR_ROUTING_8 Masks */
3498
3499#define MUTE_CH32 0x00000080lu
3500#define MUTE_CH33 0x00008000lu
3501#define MUTE_CH34 0x00800000lu
3502#define MUTE_CH35 0x80000000lu
3503
3504#define TX_CH32 0x0000007Flu
3505#define TX_CH33 0x00007F00lu
3506#define TX_CH34 0x007F0000lu
3507#define TX_CH35 0x7F000000lu
3508
3509
3510/* MXVR_ROUTING_9 Masks */
3511
3512#define MUTE_CH36 0x00000080lu
3513#define MUTE_CH37 0x00008000lu
3514#define MUTE_CH38 0x00800000lu
3515#define MUTE_CH39 0x80000000lu
3516
3517#define TX_CH36 0x0000007Flu
3518#define TX_CH37 0x00007F00lu
3519#define TX_CH38 0x007F0000lu
3520#define TX_CH39 0x7F000000lu
3521
3522
3523/* MXVR_ROUTING_10 Masks */
3524
3525#define MUTE_CH40 0x00000080lu
3526#define MUTE_CH41 0x00008000lu
3527#define MUTE_CH42 0x00800000lu
3528#define MUTE_CH43 0x80000000lu
3529
3530#define TX_CH40 0x0000007Flu
3531#define TX_CH41 0x00007F00lu
3532#define TX_CH42 0x007F0000lu
3533#define TX_CH43 0x7F000000lu
3534
3535
3536/* MXVR_ROUTING_11 Masks */
3537
3538#define MUTE_CH44 0x00000080lu
3539#define MUTE_CH45 0x00008000lu
3540#define MUTE_CH46 0x00800000lu
3541#define MUTE_CH47 0x80000000lu
3542
3543#define TX_CH44 0x0000007Flu
3544#define TX_CH45 0x00007F00lu
3545#define TX_CH46 0x007F0000lu
3546#define TX_CH47 0x7F000000lu
3547
3548
3549/* MXVR_ROUTING_12 Masks */
3550
3551#define MUTE_CH48 0x00000080lu
3552#define MUTE_CH49 0x00008000lu
3553#define MUTE_CH50 0x00800000lu
3554#define MUTE_CH51 0x80000000lu
3555
3556#define TX_CH48 0x0000007Flu
3557#define TX_CH49 0x00007F00lu
3558#define TX_CH50 0x007F0000lu
3559#define TX_CH51 0x7F000000lu
3560
3561
3562/* MXVR_ROUTING_13 Masks */
3563
3564#define MUTE_CH52 0x00000080lu
3565#define MUTE_CH53 0x00008000lu
3566#define MUTE_CH54 0x00800000lu
3567#define MUTE_CH55 0x80000000lu
3568
3569#define TX_CH52 0x0000007Flu
3570#define TX_CH53 0x00007F00lu
3571#define TX_CH54 0x007F0000lu
3572#define TX_CH55 0x7F000000lu
3573
3574
3575/* MXVR_ROUTING_14 Masks */
3576
3577#define MUTE_CH56 0x00000080lu
3578#define MUTE_CH57 0x00008000lu
3579#define MUTE_CH58 0x00800000lu
3580#define MUTE_CH59 0x80000000lu
3581
3582#define TX_CH56 0x0000007Flu
3583#define TX_CH57 0x00007F00lu
3584#define TX_CH58 0x007F0000lu
3585#define TX_CH59 0x7F000000lu
3586
3587
3588/* Control Message Receive Buffer (CMRB) Address Offsets */
3589
3590#define CMRB_STRIDE 0x00000016lu
3591
3592#define CMRB_DST_OFFSET 0x00000000lu
3593#define CMRB_SRC_OFFSET 0x00000002lu
3594#define CMRB_DATA_OFFSET 0x00000005lu
3595
3596
3597/* Control Message Transmit Buffer (CMTB) Address Offsets */
3598
3599#define CMTB_PRIO_OFFSET 0x00000000lu
3600#define CMTB_DST_OFFSET 0x00000002lu
3601#define CMTB_SRC_OFFSET 0x00000004lu
3602#define CMTB_TYPE_OFFSET 0x00000006lu
3603#define CMTB_DATA_OFFSET 0x00000007lu
3604
3605#define CMTB_ANSWER_OFFSET 0x0000000Alu
3606
3607#define CMTB_STAT_N_OFFSET 0x00000018lu
3608#define CMTB_STAT_A_OFFSET 0x00000016lu
3609#define CMTB_STAT_D_OFFSET 0x0000000Elu
3610#define CMTB_STAT_R_OFFSET 0x00000014lu
3611#define CMTB_STAT_W_OFFSET 0x00000014lu
3612#define CMTB_STAT_G_OFFSET 0x00000014lu
3613
3614
3615/* Asynchronous Packet Receive Buffer (APRB) Address Offsets */
3616
3617#define APRB_STRIDE 0x00000400lu
3618
3619#define APRB_DST_OFFSET 0x00000000lu
3620#define APRB_LEN_OFFSET 0x00000002lu
3621#define APRB_SRC_OFFSET 0x00000004lu
3622#define APRB_DATA_OFFSET 0x00000006lu
3623
3624
3625/* Asynchronous Packet Transmit Buffer (APTB) Address Offsets */
3626
3627#define APTB_PRIO_OFFSET 0x00000000lu
3628#define APTB_DST_OFFSET 0x00000002lu
3629#define APTB_LEN_OFFSET 0x00000004lu
3630#define APTB_SRC_OFFSET 0x00000006lu
3631#define APTB_DATA_OFFSET 0x00000008lu
3632
3633
3634/* Remote Read Buffer (RRDB) Address Offsets */
3635
3636#define RRDB_WADDR_OFFSET 0x00000100lu
3637#define RRDB_WLEN_OFFSET 0x00000101lu
3638
3639
3640
3641/* ************ CONTROLLER AREA NETWORK (CAN) MASKS ***************/ 2422/* ************ CONTROLLER AREA NETWORK (CAN) MASKS ***************/
3642/* CAN_CONTROL Masks */ 2423/* CAN_CONTROL Masks */
3643#define SRS 0x0001 /* Software Reset */ 2424#define SRS 0x0001 /* Software Reset */
diff --git a/arch/blackfin/mach-bf538/include/mach/gpio.h b/arch/blackfin/mach-bf538/include/mach/gpio.h
index 295c78a465c2..0c346fba9619 100644
--- a/arch/blackfin/mach-bf538/include/mach/gpio.h
+++ b/arch/blackfin/mach-bf538/include/mach/gpio.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2008 Analog Devices Inc. 2 * Copyright (C) 2008-2009 Analog Devices Inc.
3 * Licensed under the GPL-2 or later. 3 * Licensed under the GPL-2 or later.
4 */ 4 */
5 5
@@ -7,11 +7,8 @@
7#ifndef _MACH_GPIO_H_ 7#ifndef _MACH_GPIO_H_
8#define _MACH_GPIO_H_ 8#define _MACH_GPIO_H_
9 9
10 /* FIXME:
11 * For now only support PORTF GPIOs.
12 * PORT C,D and E are for peripheral usage only
13 */
14#define MAX_BLACKFIN_GPIOS 16 10#define MAX_BLACKFIN_GPIOS 16
11#define BFIN_SPECIAL_GPIO_BANKS 3
15 12
16#define GPIO_PF0 0 /* PF */ 13#define GPIO_PF0 0 /* PF */
17#define GPIO_PF1 1 14#define GPIO_PF1 1
diff --git a/arch/blackfin/mach-bf538/include/mach/portmux.h b/arch/blackfin/mach-bf538/include/mach/portmux.h
index 6121cf8b5872..0083ba13ee9e 100644
--- a/arch/blackfin/mach-bf538/include/mach/portmux.h
+++ b/arch/blackfin/mach-bf538/include/mach/portmux.h
@@ -7,7 +7,7 @@
7#ifndef _MACH_PORTMUX_H_ 7#ifndef _MACH_PORTMUX_H_
8#define _MACH_PORTMUX_H_ 8#define _MACH_PORTMUX_H_
9 9
10#define MAX_RESOURCES MAX_BLACKFIN_GPIOS 10#define MAX_RESOURCES 64
11 11
12#define P_TMR2 (P_DONTCARE) 12#define P_TMR2 (P_DONTCARE)
13#define P_TMR1 (P_DONTCARE) 13#define P_TMR1 (P_DONTCARE)
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig
index a09623dfd550..70189a0d1a19 100644
--- a/arch/blackfin/mach-bf548/Kconfig
+++ b/arch/blackfin/mach-bf548/Kconfig
@@ -1,3 +1,27 @@
1config BF542
2 def_bool y
3 depends on BF542_std || BF542M
4config BF544
5 def_bool y
6 depends on BF544_std || BF544M
7config BF547
8 def_bool y
9 depends on BF547_std || BF547M
10config BF548
11 def_bool y
12 depends on BF548_std || BF548M
13config BF549
14 def_bool y
15 depends on BF549_std || BF549M
16
17config BF54xM
18 def_bool y
19 depends on (BF542M || BF544M || BF547M || BF548M || BF549M)
20
21config BF54x
22 def_bool y
23 depends on (BF542 || BF544 || BF547 || BF548 || BF549)
24
1if (BF54x) 25if (BF54x)
2 26
3source "arch/blackfin/mach-bf548/boards/Kconfig" 27source "arch/blackfin/mach-bf548/boards/Kconfig"
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 1a5286bbb3fa..60193f72777c 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -62,7 +62,7 @@ static struct isp1760_platform_data isp1760_priv = {
62}; 62};
63 63
64static struct platform_device bfin_isp1760_device = { 64static struct platform_device bfin_isp1760_device = {
65 .name = "isp1760-hcd", 65 .name = "isp1760",
66 .id = 0, 66 .id = 0,
67 .dev = { 67 .dev = {
68 .platform_data = &isp1760_priv, 68 .platform_data = &isp1760_priv,
@@ -154,7 +154,7 @@ static struct platform_device bf54x_kpad_device = {
154}; 154};
155#endif 155#endif
156 156
157#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) 157#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
158#include <asm/bfin_rotary.h> 158#include <asm/bfin_rotary.h>
159 159
160static struct bfin_rotary_platform_data bfin_rotary_data = { 160static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -186,7 +186,7 @@ static struct platform_device bfin_rotary_device = {
186#endif 186#endif
187 187
188#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 188#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
189#include <linux/spi/adxl34x.h> 189#include <linux/input/adxl34x.h>
190static const struct adxl34x_platform_data adxl34x_info = { 190static const struct adxl34x_platform_data adxl34x_info = {
191 .x_axis_offset = 0, 191 .x_axis_offset = 0,
192 .y_axis_offset = 0, 192 .y_axis_offset = 0,
@@ -210,14 +210,17 @@ static const struct adxl34x_platform_data adxl34x_info = {
210 .ev_code_y = ABS_Y, /* EV_REL */ 210 .ev_code_y = ABS_Y, /* EV_REL */
211 .ev_code_z = ABS_Z, /* EV_REL */ 211 .ev_code_z = ABS_Z, /* EV_REL */
212 212
213 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */ 213 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
214 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
215 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
216 214
217/* .ev_code_ff = KEY_F,*/ /* EV_KEY */ 215/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
218/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ 216/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
219 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK, 217 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
220 .fifo_mode = ADXL_FIFO_STREAM, 218 .fifo_mode = ADXL_FIFO_STREAM,
219 .orientation_enable = ADXL_EN_ORIENTATION_3D,
220 .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8,
221 .divisor_length = ADXL_LP_FILTER_DIVISOR_16,
222 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
223 .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C},
221}; 224};
222#endif 225#endif
223 226
@@ -461,6 +464,44 @@ static struct platform_device musb_device = {
461}; 464};
462#endif 465#endif
463 466
467#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
468unsigned short bfin_can_peripherals[] = {
469 P_CAN0_RX, P_CAN0_TX, 0
470};
471
472static struct resource bfin_can_resources[] = {
473 {
474 .start = 0xFFC02A00,
475 .end = 0xFFC02FFF,
476 .flags = IORESOURCE_MEM,
477 },
478 {
479 .start = IRQ_CAN0_RX,
480 .end = IRQ_CAN0_RX,
481 .flags = IORESOURCE_IRQ,
482 },
483 {
484 .start = IRQ_CAN0_TX,
485 .end = IRQ_CAN0_TX,
486 .flags = IORESOURCE_IRQ,
487 },
488 {
489 .start = IRQ_CAN0_ERROR,
490 .end = IRQ_CAN0_ERROR,
491 .flags = IORESOURCE_IRQ,
492 },
493};
494
495static struct platform_device bfin_can_device = {
496 .name = "bfin_can",
497 .num_resources = ARRAY_SIZE(bfin_can_resources),
498 .resource = bfin_can_resources,
499 .dev = {
500 .platform_data = &bfin_can_peripherals, /* Passed to driver */
501 },
502};
503#endif
504
464#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 505#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
465static struct resource bfin_atapi_resources[] = { 506static struct resource bfin_atapi_resources[] = {
466 { 507 {
@@ -953,6 +994,10 @@ static struct platform_device *ezkit_devices[] __initdata = {
953 &bfin_isp1760_device, 994 &bfin_isp1760_device,
954#endif 995#endif
955 996
997#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
998 &bfin_can_device,
999#endif
1000
956#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 1001#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
957 &bfin_atapi_device, 1002 &bfin_atapi_device,
958#endif 1003#endif
@@ -974,7 +1019,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
974 &bf54x_kpad_device, 1019 &bf54x_kpad_device,
975#endif 1020#endif
976 1021
977#if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) 1022#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
978 &bfin_rotary_device, 1023 &bfin_rotary_device,
979#endif 1024#endif
980 1025
diff --git a/arch/blackfin/mach-bf548/include/mach/bf548.h b/arch/blackfin/mach-bf548/include/mach/bf548.h
index 7bead5ce0f3b..751e5e11ecf8 100644
--- a/arch/blackfin/mach-bf548/include/mach/bf548.h
+++ b/arch/blackfin/mach-bf548/include/mach/bf548.h
@@ -81,18 +81,6 @@
81 81
82#define AMGCTLVAL (V_AMBEN | V_AMCKEN) 82#define AMGCTLVAL (V_AMBEN | V_AMCKEN)
83 83
84#if defined(CONFIG_BF542M)
85# define CONFIG_BF542
86#elif defined(CONFIG_BF544M)
87# define CONFIG_BF544
88#elif defined(CONFIG_BF547M)
89# define CONFIG_BF547
90#elif defined(CONFIG_BF548M)
91# define CONFIG_BF548
92#elif defined(CONFIG_BF549M)
93# define CONFIG_BF549
94#endif
95
96#if defined(CONFIG_BF542) 84#if defined(CONFIG_BF542)
97# define CPU "BF542" 85# define CPU "BF542"
98# define CPUID 0x27de 86# define CPUID 0x27de
diff --git a/arch/blackfin/mach-bf548/include/mach/blackfin.h b/arch/blackfin/mach-bf548/include/mach/blackfin.h
index 13302b67857a..5684030ccc21 100644
--- a/arch/blackfin/mach-bf548/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf548/include/mach/blackfin.h
@@ -64,10 +64,4 @@
64#define OFFSET_THR 0x28 /* Transmit Holding register */ 64#define OFFSET_THR 0x28 /* Transmit Holding register */
65#define OFFSET_RBR 0x2C /* Receive Buffer register */ 65#define OFFSET_RBR 0x2C /* Receive Buffer register */
66 66
67/* PLL_DIV Masks */
68#define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
69#define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
70#define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
71#define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
72
73#endif 67#endif
diff --git a/arch/blackfin/mach-bf548/include/mach/cdefBF547.h b/arch/blackfin/mach-bf548/include/mach/cdefBF547.h
index 423421515134..bc650e6ea482 100644
--- a/arch/blackfin/mach-bf548/include/mach/cdefBF547.h
+++ b/arch/blackfin/mach-bf548/include/mach/cdefBF547.h
@@ -4,21 +4,21 @@
4 * Licensed under the GPL-2 or later. 4 * Licensed under the GPL-2 or later.
5 */ 5 */
6 6
7#ifndef _CDEF_BF548_H 7#ifndef _CDEF_BF547_H
8#define _CDEF_BF548_H 8#define _CDEF_BF547_H
9 9
10/* include all Core registers and bit definitions */ 10/* include all Core registers and bit definitions */
11#include "defBF548.h" 11#include "defBF547.h"
12 12
13/* include core sbfin_read_()ecific register pointer definitions */ 13/* include core sbfin_read_()ecific register pointer definitions */
14#include <asm/cdef_LPBlackfin.h> 14#include <asm/cdef_LPBlackfin.h>
15 15
16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */ 16/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF547 */
17 17
18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */ 18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
19#include "cdefBF54x_base.h" 19#include "cdefBF54x_base.h"
20 20
21/* The following are the #defines needed by ADSP-BF548 that are not in the common header */ 21/* The following are the #defines needed by ADSP-BF547 that are not in the common header */
22 22
23/* Timer Registers */ 23/* Timer Registers */
24 24
@@ -805,4 +805,4 @@
805#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT) 805#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
806#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val) 806#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
807 807
808#endif /* _CDEF_BF548_H */ 808#endif /* _CDEF_BF547_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/cdefBF548.h b/arch/blackfin/mach-bf548/include/mach/cdefBF548.h
index df84180410c4..3523e08f7968 100644
--- a/arch/blackfin/mach-bf548/include/mach/cdefBF548.h
+++ b/arch/blackfin/mach-bf548/include/mach/cdefBF548.h
@@ -18,165 +18,8 @@
18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */ 18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
19#include "cdefBF54x_base.h" 19#include "cdefBF54x_base.h"
20 20
21/* The following are the #defines needed by ADSP-BF548 that are not in the common header */ 21/* The BF548 is like the BF547, but has additional CANs */
22 22#include "cdefBF547.h"
23/* Timer Registers */
24
25#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
26#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
27#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
28#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
29#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
30#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
31#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
32#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
33#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
34#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
35#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
36#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
37#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
38#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
39#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
40#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
41#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
42#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
43#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
44#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
45#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
46#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
47#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
48#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
49
50/* Timer Groubfin_read_() of 3 */
51
52#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
53#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
54#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
55#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
56#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
57#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
58
59/* SPORT0 Registers */
60
61#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
62#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
63#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
64#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
65#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
66#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
67#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
68#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
69#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
70#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
71#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
72#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
73#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
74#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
75#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
76#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
77#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
78#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
79#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
80#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
81#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
82#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
83#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
84#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
85#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
86#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
87#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
88#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
89#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
90#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
91#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
92#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
93#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
94#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
95#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
96#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
97#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
98#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
99#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
100#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
101#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
102#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
103#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
104#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
105
106/* EPPI0 Registers */
107
108#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
109#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
110#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
111#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
112#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
113#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
114#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
115#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
116#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
117#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
118#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
119#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
120#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
121#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
122#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
123#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
124#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
125#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
126#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
127#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
128#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
129#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
130#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
131#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
132#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
133#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
134#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
135#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
136
137/* UART2 Registers */
138
139#define bfin_read_UART2_DLL() bfin_read16(UART2_DLL)
140#define bfin_write_UART2_DLL(val) bfin_write16(UART2_DLL, val)
141#define bfin_read_UART2_DLH() bfin_read16(UART2_DLH)
142#define bfin_write_UART2_DLH(val) bfin_write16(UART2_DLH, val)
143#define bfin_read_UART2_GCTL() bfin_read16(UART2_GCTL)
144#define bfin_write_UART2_GCTL(val) bfin_write16(UART2_GCTL, val)
145#define bfin_read_UART2_LCR() bfin_read16(UART2_LCR)
146#define bfin_write_UART2_LCR(val) bfin_write16(UART2_LCR, val)
147#define bfin_read_UART2_MCR() bfin_read16(UART2_MCR)
148#define bfin_write_UART2_MCR(val) bfin_write16(UART2_MCR, val)
149#define bfin_read_UART2_LSR() bfin_read16(UART2_LSR)
150#define bfin_write_UART2_LSR(val) bfin_write16(UART2_LSR, val)
151#define bfin_read_UART2_MSR() bfin_read16(UART2_MSR)
152#define bfin_write_UART2_MSR(val) bfin_write16(UART2_MSR, val)
153#define bfin_read_UART2_SCR() bfin_read16(UART2_SCR)
154#define bfin_write_UART2_SCR(val) bfin_write16(UART2_SCR, val)
155#define bfin_read_UART2_IER_SET() bfin_read16(UART2_IER_SET)
156#define bfin_write_UART2_IER_SET(val) bfin_write16(UART2_IER_SET, val)
157#define bfin_read_UART2_IER_CLEAR() bfin_read16(UART2_IER_CLEAR)
158#define bfin_write_UART2_IER_CLEAR(val) bfin_write16(UART2_IER_CLEAR, val)
159#define bfin_read_UART2_RBR() bfin_read16(UART2_RBR)
160#define bfin_write_UART2_RBR(val) bfin_write16(UART2_RBR, val)
161
162/* Two Wire Interface Registers (TWI1) */
163
164/* SPI2 Registers */
165
166#define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL)
167#define bfin_write_SPI2_CTL(val) bfin_write16(SPI2_CTL, val)
168#define bfin_read_SPI2_FLG() bfin_read16(SPI2_FLG)
169#define bfin_write_SPI2_FLG(val) bfin_write16(SPI2_FLG, val)
170#define bfin_read_SPI2_STAT() bfin_read16(SPI2_STAT)
171#define bfin_write_SPI2_STAT(val) bfin_write16(SPI2_STAT, val)
172#define bfin_read_SPI2_TDBR() bfin_read16(SPI2_TDBR)
173#define bfin_write_SPI2_TDBR(val) bfin_write16(SPI2_TDBR, val)
174#define bfin_read_SPI2_RDBR() bfin_read16(SPI2_RDBR)
175#define bfin_write_SPI2_RDBR(val) bfin_write16(SPI2_RDBR, val)
176#define bfin_read_SPI2_BAUD() bfin_read16(SPI2_BAUD)
177#define bfin_write_SPI2_BAUD(val) bfin_write16(SPI2_BAUD, val)
178#define bfin_read_SPI2_SHADOW() bfin_read16(SPI2_SHADOW)
179#define bfin_write_SPI2_SHADOW(val) bfin_write16(SPI2_SHADOW, val)
180 23
181/* CAN Controller 1 Config 1 Registers */ 24/* CAN Controller 1 Config 1 Registers */
182 25
@@ -923,631 +766,4 @@
923#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1) 766#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1)
924#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val) 767#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val)
925 768
926/* ATAPI Registers */
927
928#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
929#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
930#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
931#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
932#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
933#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
934#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
935#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
936#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
937#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
938#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
939#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
940#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
941#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
942#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
943#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
944#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
945#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
946#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
947#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
948#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
949#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
950#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
951#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
952#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
953#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
954#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
955#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
956#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
957#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
958#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
959#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
960#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
961#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
962#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
963#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
964#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
965#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
966#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
967#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
968#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
969#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
970#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
971#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
972#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
973#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
974#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
975#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
976#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
977#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
978
979/* SDH Registers */
980
981#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
982#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
983#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
984#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
985#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
986#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
987#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
988#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
989#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
990#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
991#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
992#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
993#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
994#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
995#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
996#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
997#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
998#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
999#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
1000#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
1001#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
1002#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
1003#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
1004#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
1005#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
1006#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
1007#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
1008#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
1009#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
1010#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
1011#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
1012#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
1013#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
1014#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
1015#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
1016#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
1017#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
1018#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
1019#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
1020#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
1021#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
1022#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
1023#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
1024#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
1025#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
1026#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
1027#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
1028#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
1029#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
1030#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
1031#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
1032#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
1033#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
1034#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
1035#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
1036#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
1037#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
1038#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
1039#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
1040#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
1041#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
1042#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
1043
1044/* HOST Port Registers */
1045
1046#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
1047#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
1048#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
1049#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
1050#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
1051#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
1052
1053/* USB Control Registers */
1054
1055#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
1056#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
1057#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
1058#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
1059#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
1060#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
1061#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
1062#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
1063#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
1064#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
1065#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
1066#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
1067#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
1068#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
1069#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
1070#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
1071#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
1072#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
1073#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
1074#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
1075#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
1076#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
1077#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
1078#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
1079#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
1080#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
1081
1082/* USB Packet Control Registers */
1083
1084#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
1085#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
1086#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
1087#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
1088#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
1089#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
1090#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
1091#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
1092#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
1093#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
1094#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
1095#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
1096#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
1097#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
1098#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
1099#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
1100#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
1101#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
1102#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
1103#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
1104#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
1105#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
1106#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
1107#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
1108#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
1109#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
1110
1111/* USB Endbfin_read_()oint FIFO Registers */
1112
1113#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
1114#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
1115#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
1116#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
1117#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
1118#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
1119#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
1120#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
1121#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
1122#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
1123#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
1124#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
1125#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
1126#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
1127#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
1128#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
1129
1130/* USB OTG Control Registers */
1131
1132#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
1133#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
1134#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
1135#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
1136#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
1137#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
1138
1139/* USB Phy Control Registers */
1140
1141#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
1142#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
1143#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
1144#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
1145#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
1146#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
1147#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
1148#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
1149#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
1150#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
1151
1152/* (APHY_CNTRL is for ADI usage only) */
1153
1154#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
1155#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
1156
1157/* (APHY_CALIB is for ADI usage only) */
1158
1159#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
1160#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
1161#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
1162#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
1163
1164/* (PHY_TEST is for ADI usage only) */
1165
1166#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
1167#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
1168#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
1169#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
1170#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
1171#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
1172
1173/* USB Endbfin_read_()oint 0 Control Registers */
1174
1175#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
1176#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
1177#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
1178#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
1179#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
1180#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
1181#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
1182#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
1183#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
1184#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
1185#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
1186#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
1187#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
1188#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
1189#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
1190#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
1191#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
1192#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
1193
1194/* USB Endbfin_read_()oint 1 Control Registers */
1195
1196#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
1197#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
1198#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
1199#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
1200#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
1201#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
1202#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
1203#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
1204#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
1205#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
1206#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
1207#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
1208#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
1209#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
1210#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
1211#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
1212#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
1213#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
1214#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
1215#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
1216
1217/* USB Endbfin_read_()oint 2 Control Registers */
1218
1219#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
1220#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
1221#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
1222#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
1223#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
1224#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
1225#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
1226#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
1227#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
1228#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
1229#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
1230#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
1231#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
1232#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
1233#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
1234#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
1235#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
1236#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
1237#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
1238#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
1239
1240/* USB Endbfin_read_()oint 3 Control Registers */
1241
1242#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
1243#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
1244#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
1245#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
1246#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
1247#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
1248#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
1249#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
1250#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
1251#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
1252#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
1253#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
1254#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
1255#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
1256#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
1257#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
1258#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
1259#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
1260#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
1261#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
1262
1263/* USB Endbfin_read_()oint 4 Control Registers */
1264
1265#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
1266#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
1267#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
1268#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
1269#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
1270#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
1271#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
1272#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
1273#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
1274#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
1275#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
1276#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
1277#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
1278#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
1279#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
1280#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
1281#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
1282#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
1283#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
1284#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
1285
1286/* USB Endbfin_read_()oint 5 Control Registers */
1287
1288#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
1289#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
1290#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
1291#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
1292#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
1293#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
1294#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
1295#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
1296#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
1297#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
1298#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
1299#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
1300#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
1301#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
1302#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
1303#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
1304#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
1305#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
1306#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
1307#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
1308
1309/* USB Endbfin_read_()oint 6 Control Registers */
1310
1311#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
1312#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
1313#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
1314#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
1315#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
1316#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
1317#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
1318#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
1319#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
1320#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
1321#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
1322#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
1323#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
1324#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
1325#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
1326#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
1327#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
1328#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
1329#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
1330#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
1331
1332/* USB Endbfin_read_()oint 7 Control Registers */
1333
1334#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
1335#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
1336#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
1337#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
1338#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
1339#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
1340#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
1341#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
1342#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
1343#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
1344#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
1345#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
1346#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
1347#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
1348#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
1349#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
1350#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
1351#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
1352#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
1353#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
1354#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
1355#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
1356#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
1357#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
1358
1359/* USB Channel 0 Config Registers */
1360
1361#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
1362#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
1363#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
1364#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
1365#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
1366#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
1367#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
1368#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
1369#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
1370#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
1371
1372/* USB Channel 1 Config Registers */
1373
1374#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
1375#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
1376#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
1377#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
1378#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
1379#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
1380#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
1381#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
1382#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
1383#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
1384
1385/* USB Channel 2 Config Registers */
1386
1387#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
1388#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
1389#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
1390#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
1391#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
1392#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
1393#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
1394#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
1395#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
1396#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
1397
1398/* USB Channel 3 Config Registers */
1399
1400#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
1401#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
1402#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
1403#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
1404#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
1405#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
1406#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
1407#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
1408#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
1409#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
1410
1411/* USB Channel 4 Config Registers */
1412
1413#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
1414#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
1415#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
1416#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
1417#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
1418#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
1419#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
1420#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
1421#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
1422#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
1423
1424/* USB Channel 5 Config Registers */
1425
1426#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
1427#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
1428#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
1429#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
1430#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
1431#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
1432#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
1433#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
1434#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
1435#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
1436
1437/* USB Channel 6 Config Registers */
1438
1439#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
1440#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
1441#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
1442#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
1443#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
1444#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
1445#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
1446#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
1447#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
1448#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
1449
1450/* USB Channel 7 Config Registers */
1451
1452#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
1453#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
1454#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
1455#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
1456#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
1457#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
1458#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
1459#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
1460#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
1461#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
1462
1463/* Keybfin_read_()ad Registers */
1464
1465#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
1466#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
1467#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
1468#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
1469#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
1470#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
1471#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
1472#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
1473#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
1474#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
1475#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
1476#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
1477
1478/* Pixel Combfin_read_()ositor (PIXC) Registers */
1479
1480#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
1481#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
1482#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
1483#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
1484#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
1485#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
1486#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
1487#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
1488#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
1489#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
1490#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
1491#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
1492#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
1493#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
1494#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
1495#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
1496#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
1497#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
1498#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
1499#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
1500#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
1501#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
1502#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
1503#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
1504#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
1505#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
1506#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
1507#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
1508#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
1509#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
1510#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
1511#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
1512#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
1513#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
1514#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
1515#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
1516#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
1517#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
1518
1519/* Handshake MDMA 0 Registers */
1520
1521#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1522#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
1523#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1524#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
1525#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1526#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
1527#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1528#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
1529#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1530#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
1531#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1532#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
1533#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1534#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
1535
1536/* Handshake MDMA 1 Registers */
1537
1538#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1539#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
1540#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1541#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
1542#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1543#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
1544#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1545#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
1546#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1547#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
1548#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1549#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
1550#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1551#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
1552
1553#endif /* _CDEF_BF548_H */ 769#endif /* _CDEF_BF548_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/cdefBF549.h b/arch/blackfin/mach-bf548/include/mach/cdefBF549.h
index 34c84c7fb256..80201ed41f80 100644
--- a/arch/blackfin/mach-bf548/include/mach/cdefBF549.h
+++ b/arch/blackfin/mach-bf548/include/mach/cdefBF549.h
@@ -18,165 +18,8 @@
18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */ 18/* include cdefBF54x_base.h for the set of #defines that are common to all ADSP-BF54x bfin_read_()rocessors */
19#include "cdefBF54x_base.h" 19#include "cdefBF54x_base.h"
20 20
21/* The following are the #defines needed by ADSP-BF549 that are not in the common header */ 21/* The BF549 is like the BF544, but has MXVR */
22 22#include "cdefBF547.h"
23/* Timer Registers */
24
25#define bfin_read_TIMER8_CONFIG() bfin_read16(TIMER8_CONFIG)
26#define bfin_write_TIMER8_CONFIG(val) bfin_write16(TIMER8_CONFIG, val)
27#define bfin_read_TIMER8_COUNTER() bfin_read32(TIMER8_COUNTER)
28#define bfin_write_TIMER8_COUNTER(val) bfin_write32(TIMER8_COUNTER, val)
29#define bfin_read_TIMER8_PERIOD() bfin_read32(TIMER8_PERIOD)
30#define bfin_write_TIMER8_PERIOD(val) bfin_write32(TIMER8_PERIOD, val)
31#define bfin_read_TIMER8_WIDTH() bfin_read32(TIMER8_WIDTH)
32#define bfin_write_TIMER8_WIDTH(val) bfin_write32(TIMER8_WIDTH, val)
33#define bfin_read_TIMER9_CONFIG() bfin_read16(TIMER9_CONFIG)
34#define bfin_write_TIMER9_CONFIG(val) bfin_write16(TIMER9_CONFIG, val)
35#define bfin_read_TIMER9_COUNTER() bfin_read32(TIMER9_COUNTER)
36#define bfin_write_TIMER9_COUNTER(val) bfin_write32(TIMER9_COUNTER, val)
37#define bfin_read_TIMER9_PERIOD() bfin_read32(TIMER9_PERIOD)
38#define bfin_write_TIMER9_PERIOD(val) bfin_write32(TIMER9_PERIOD, val)
39#define bfin_read_TIMER9_WIDTH() bfin_read32(TIMER9_WIDTH)
40#define bfin_write_TIMER9_WIDTH(val) bfin_write32(TIMER9_WIDTH, val)
41#define bfin_read_TIMER10_CONFIG() bfin_read16(TIMER10_CONFIG)
42#define bfin_write_TIMER10_CONFIG(val) bfin_write16(TIMER10_CONFIG, val)
43#define bfin_read_TIMER10_COUNTER() bfin_read32(TIMER10_COUNTER)
44#define bfin_write_TIMER10_COUNTER(val) bfin_write32(TIMER10_COUNTER, val)
45#define bfin_read_TIMER10_PERIOD() bfin_read32(TIMER10_PERIOD)
46#define bfin_write_TIMER10_PERIOD(val) bfin_write32(TIMER10_PERIOD, val)
47#define bfin_read_TIMER10_WIDTH() bfin_read32(TIMER10_WIDTH)
48#define bfin_write_TIMER10_WIDTH(val) bfin_write32(TIMER10_WIDTH, val)
49
50/* Timer Groubfin_read_() of 3 */
51
52#define bfin_read_TIMER_ENABLE1() bfin_read16(TIMER_ENABLE1)
53#define bfin_write_TIMER_ENABLE1(val) bfin_write16(TIMER_ENABLE1, val)
54#define bfin_read_TIMER_DISABLE1() bfin_read16(TIMER_DISABLE1)
55#define bfin_write_TIMER_DISABLE1(val) bfin_write16(TIMER_DISABLE1, val)
56#define bfin_read_TIMER_STATUS1() bfin_read32(TIMER_STATUS1)
57#define bfin_write_TIMER_STATUS1(val) bfin_write32(TIMER_STATUS1, val)
58
59/* SPORT0 Registers */
60
61#define bfin_read_SPORT0_TCR1() bfin_read16(SPORT0_TCR1)
62#define bfin_write_SPORT0_TCR1(val) bfin_write16(SPORT0_TCR1, val)
63#define bfin_read_SPORT0_TCR2() bfin_read16(SPORT0_TCR2)
64#define bfin_write_SPORT0_TCR2(val) bfin_write16(SPORT0_TCR2, val)
65#define bfin_read_SPORT0_TCLKDIV() bfin_read16(SPORT0_TCLKDIV)
66#define bfin_write_SPORT0_TCLKDIV(val) bfin_write16(SPORT0_TCLKDIV, val)
67#define bfin_read_SPORT0_TFSDIV() bfin_read16(SPORT0_TFSDIV)
68#define bfin_write_SPORT0_TFSDIV(val) bfin_write16(SPORT0_TFSDIV, val)
69#define bfin_read_SPORT0_TX() bfin_read32(SPORT0_TX)
70#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
71#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
72#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
73#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
74#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
75#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
76#define bfin_write_SPORT0_RCR2(val) bfin_write16(SPORT0_RCR2, val)
77#define bfin_read_SPORT0_RCLKDIV() bfin_read16(SPORT0_RCLKDIV)
78#define bfin_write_SPORT0_RCLKDIV(val) bfin_write16(SPORT0_RCLKDIV, val)
79#define bfin_read_SPORT0_RFSDIV() bfin_read16(SPORT0_RFSDIV)
80#define bfin_write_SPORT0_RFSDIV(val) bfin_write16(SPORT0_RFSDIV, val)
81#define bfin_read_SPORT0_STAT() bfin_read16(SPORT0_STAT)
82#define bfin_write_SPORT0_STAT(val) bfin_write16(SPORT0_STAT, val)
83#define bfin_read_SPORT0_CHNL() bfin_read16(SPORT0_CHNL)
84#define bfin_write_SPORT0_CHNL(val) bfin_write16(SPORT0_CHNL, val)
85#define bfin_read_SPORT0_MCMC1() bfin_read16(SPORT0_MCMC1)
86#define bfin_write_SPORT0_MCMC1(val) bfin_write16(SPORT0_MCMC1, val)
87#define bfin_read_SPORT0_MCMC2() bfin_read16(SPORT0_MCMC2)
88#define bfin_write_SPORT0_MCMC2(val) bfin_write16(SPORT0_MCMC2, val)
89#define bfin_read_SPORT0_MTCS0() bfin_read32(SPORT0_MTCS0)
90#define bfin_write_SPORT0_MTCS0(val) bfin_write32(SPORT0_MTCS0, val)
91#define bfin_read_SPORT0_MTCS1() bfin_read32(SPORT0_MTCS1)
92#define bfin_write_SPORT0_MTCS1(val) bfin_write32(SPORT0_MTCS1, val)
93#define bfin_read_SPORT0_MTCS2() bfin_read32(SPORT0_MTCS2)
94#define bfin_write_SPORT0_MTCS2(val) bfin_write32(SPORT0_MTCS2, val)
95#define bfin_read_SPORT0_MTCS3() bfin_read32(SPORT0_MTCS3)
96#define bfin_write_SPORT0_MTCS3(val) bfin_write32(SPORT0_MTCS3, val)
97#define bfin_read_SPORT0_MRCS0() bfin_read32(SPORT0_MRCS0)
98#define bfin_write_SPORT0_MRCS0(val) bfin_write32(SPORT0_MRCS0, val)
99#define bfin_read_SPORT0_MRCS1() bfin_read32(SPORT0_MRCS1)
100#define bfin_write_SPORT0_MRCS1(val) bfin_write32(SPORT0_MRCS1, val)
101#define bfin_read_SPORT0_MRCS2() bfin_read32(SPORT0_MRCS2)
102#define bfin_write_SPORT0_MRCS2(val) bfin_write32(SPORT0_MRCS2, val)
103#define bfin_read_SPORT0_MRCS3() bfin_read32(SPORT0_MRCS3)
104#define bfin_write_SPORT0_MRCS3(val) bfin_write32(SPORT0_MRCS3, val)
105
106/* EPPI0 Registers */
107
108#define bfin_read_EPPI0_STATUS() bfin_read16(EPPI0_STATUS)
109#define bfin_write_EPPI0_STATUS(val) bfin_write16(EPPI0_STATUS, val)
110#define bfin_read_EPPI0_HCOUNT() bfin_read16(EPPI0_HCOUNT)
111#define bfin_write_EPPI0_HCOUNT(val) bfin_write16(EPPI0_HCOUNT, val)
112#define bfin_read_EPPI0_HDELAY() bfin_read16(EPPI0_HDELAY)
113#define bfin_write_EPPI0_HDELAY(val) bfin_write16(EPPI0_HDELAY, val)
114#define bfin_read_EPPI0_VCOUNT() bfin_read16(EPPI0_VCOUNT)
115#define bfin_write_EPPI0_VCOUNT(val) bfin_write16(EPPI0_VCOUNT, val)
116#define bfin_read_EPPI0_VDELAY() bfin_read16(EPPI0_VDELAY)
117#define bfin_write_EPPI0_VDELAY(val) bfin_write16(EPPI0_VDELAY, val)
118#define bfin_read_EPPI0_FRAME() bfin_read16(EPPI0_FRAME)
119#define bfin_write_EPPI0_FRAME(val) bfin_write16(EPPI0_FRAME, val)
120#define bfin_read_EPPI0_LINE() bfin_read16(EPPI0_LINE)
121#define bfin_write_EPPI0_LINE(val) bfin_write16(EPPI0_LINE, val)
122#define bfin_read_EPPI0_CLKDIV() bfin_read16(EPPI0_CLKDIV)
123#define bfin_write_EPPI0_CLKDIV(val) bfin_write16(EPPI0_CLKDIV, val)
124#define bfin_read_EPPI0_CONTROL() bfin_read32(EPPI0_CONTROL)
125#define bfin_write_EPPI0_CONTROL(val) bfin_write32(EPPI0_CONTROL, val)
126#define bfin_read_EPPI0_FS1W_HBL() bfin_read32(EPPI0_FS1W_HBL)
127#define bfin_write_EPPI0_FS1W_HBL(val) bfin_write32(EPPI0_FS1W_HBL, val)
128#define bfin_read_EPPI0_FS1P_AVPL() bfin_read32(EPPI0_FS1P_AVPL)
129#define bfin_write_EPPI0_FS1P_AVPL(val) bfin_write32(EPPI0_FS1P_AVPL, val)
130#define bfin_read_EPPI0_FS2W_LVB() bfin_read32(EPPI0_FS2W_LVB)
131#define bfin_write_EPPI0_FS2W_LVB(val) bfin_write32(EPPI0_FS2W_LVB, val)
132#define bfin_read_EPPI0_FS2P_LAVF() bfin_read32(EPPI0_FS2P_LAVF)
133#define bfin_write_EPPI0_FS2P_LAVF(val) bfin_write32(EPPI0_FS2P_LAVF, val)
134#define bfin_read_EPPI0_CLIP() bfin_read32(EPPI0_CLIP)
135#define bfin_write_EPPI0_CLIP(val) bfin_write32(EPPI0_CLIP, val)
136
137/* UART2 Registers */
138
139#define bfin_read_UART2_DLL() bfin_read16(UART2_DLL)
140#define bfin_write_UART2_DLL(val) bfin_write16(UART2_DLL, val)
141#define bfin_read_UART2_DLH() bfin_read16(UART2_DLH)
142#define bfin_write_UART2_DLH(val) bfin_write16(UART2_DLH, val)
143#define bfin_read_UART2_GCTL() bfin_read16(UART2_GCTL)
144#define bfin_write_UART2_GCTL(val) bfin_write16(UART2_GCTL, val)
145#define bfin_read_UART2_LCR() bfin_read16(UART2_LCR)
146#define bfin_write_UART2_LCR(val) bfin_write16(UART2_LCR, val)
147#define bfin_read_UART2_MCR() bfin_read16(UART2_MCR)
148#define bfin_write_UART2_MCR(val) bfin_write16(UART2_MCR, val)
149#define bfin_read_UART2_LSR() bfin_read16(UART2_LSR)
150#define bfin_write_UART2_LSR(val) bfin_write16(UART2_LSR, val)
151#define bfin_read_UART2_MSR() bfin_read16(UART2_MSR)
152#define bfin_write_UART2_MSR(val) bfin_write16(UART2_MSR, val)
153#define bfin_read_UART2_SCR() bfin_read16(UART2_SCR)
154#define bfin_write_UART2_SCR(val) bfin_write16(UART2_SCR, val)
155#define bfin_read_UART2_IER_SET() bfin_read16(UART2_IER_SET)
156#define bfin_write_UART2_IER_SET(val) bfin_write16(UART2_IER_SET, val)
157#define bfin_read_UART2_IER_CLEAR() bfin_read16(UART2_IER_CLEAR)
158#define bfin_write_UART2_IER_CLEAR(val) bfin_write16(UART2_IER_CLEAR, val)
159#define bfin_read_UART2_RBR() bfin_read16(UART2_RBR)
160#define bfin_write_UART2_RBR(val) bfin_write16(UART2_RBR, val)
161
162/* Two Wire Interface Registers (TWI1) */
163
164/* SPI2 Registers */
165
166#define bfin_read_SPI2_CTL() bfin_read16(SPI2_CTL)
167#define bfin_write_SPI2_CTL(val) bfin_write16(SPI2_CTL, val)
168#define bfin_read_SPI2_FLG() bfin_read16(SPI2_FLG)
169#define bfin_write_SPI2_FLG(val) bfin_write16(SPI2_FLG, val)
170#define bfin_read_SPI2_STAT() bfin_read16(SPI2_STAT)
171#define bfin_write_SPI2_STAT(val) bfin_write16(SPI2_STAT, val)
172#define bfin_read_SPI2_TDBR() bfin_read16(SPI2_TDBR)
173#define bfin_write_SPI2_TDBR(val) bfin_write16(SPI2_TDBR, val)
174#define bfin_read_SPI2_RDBR() bfin_read16(SPI2_RDBR)
175#define bfin_write_SPI2_RDBR(val) bfin_write16(SPI2_RDBR, val)
176#define bfin_read_SPI2_BAUD() bfin_read16(SPI2_BAUD)
177#define bfin_write_SPI2_BAUD(val) bfin_write16(SPI2_BAUD, val)
178#define bfin_read_SPI2_SHADOW() bfin_read16(SPI2_SHADOW)
179#define bfin_write_SPI2_SHADOW(val) bfin_write16(SPI2_SHADOW, val)
180 23
181/* MXVR Registers */ 24/* MXVR Registers */
182 25
@@ -464,1376 +307,4 @@
464#define bfin_read_MXVR_SCLK_CNT() bfin_read16(MXVR_SCLK_CNT) 307#define bfin_read_MXVR_SCLK_CNT() bfin_read16(MXVR_SCLK_CNT)
465#define bfin_write_MXVR_SCLK_CNT(val) bfin_write16(MXVR_SCLK_CNT, val) 308#define bfin_write_MXVR_SCLK_CNT(val) bfin_write16(MXVR_SCLK_CNT, val)
466 309
467/* CAN Controller 1 Config 1 Registers */
468
469#define bfin_read_CAN1_MC1() bfin_read16(CAN1_MC1)
470#define bfin_write_CAN1_MC1(val) bfin_write16(CAN1_MC1, val)
471#define bfin_read_CAN1_MD1() bfin_read16(CAN1_MD1)
472#define bfin_write_CAN1_MD1(val) bfin_write16(CAN1_MD1, val)
473#define bfin_read_CAN1_TRS1() bfin_read16(CAN1_TRS1)
474#define bfin_write_CAN1_TRS1(val) bfin_write16(CAN1_TRS1, val)
475#define bfin_read_CAN1_TRR1() bfin_read16(CAN1_TRR1)
476#define bfin_write_CAN1_TRR1(val) bfin_write16(CAN1_TRR1, val)
477#define bfin_read_CAN1_TA1() bfin_read16(CAN1_TA1)
478#define bfin_write_CAN1_TA1(val) bfin_write16(CAN1_TA1, val)
479#define bfin_read_CAN1_AA1() bfin_read16(CAN1_AA1)
480#define bfin_write_CAN1_AA1(val) bfin_write16(CAN1_AA1, val)
481#define bfin_read_CAN1_RMP1() bfin_read16(CAN1_RMP1)
482#define bfin_write_CAN1_RMP1(val) bfin_write16(CAN1_RMP1, val)
483#define bfin_read_CAN1_RML1() bfin_read16(CAN1_RML1)
484#define bfin_write_CAN1_RML1(val) bfin_write16(CAN1_RML1, val)
485#define bfin_read_CAN1_MBTIF1() bfin_read16(CAN1_MBTIF1)
486#define bfin_write_CAN1_MBTIF1(val) bfin_write16(CAN1_MBTIF1, val)
487#define bfin_read_CAN1_MBRIF1() bfin_read16(CAN1_MBRIF1)
488#define bfin_write_CAN1_MBRIF1(val) bfin_write16(CAN1_MBRIF1, val)
489#define bfin_read_CAN1_MBIM1() bfin_read16(CAN1_MBIM1)
490#define bfin_write_CAN1_MBIM1(val) bfin_write16(CAN1_MBIM1, val)
491#define bfin_read_CAN1_RFH1() bfin_read16(CAN1_RFH1)
492#define bfin_write_CAN1_RFH1(val) bfin_write16(CAN1_RFH1, val)
493#define bfin_read_CAN1_OPSS1() bfin_read16(CAN1_OPSS1)
494#define bfin_write_CAN1_OPSS1(val) bfin_write16(CAN1_OPSS1, val)
495
496/* CAN Controller 1 Config 2 Registers */
497
498#define bfin_read_CAN1_MC2() bfin_read16(CAN1_MC2)
499#define bfin_write_CAN1_MC2(val) bfin_write16(CAN1_MC2, val)
500#define bfin_read_CAN1_MD2() bfin_read16(CAN1_MD2)
501#define bfin_write_CAN1_MD2(val) bfin_write16(CAN1_MD2, val)
502#define bfin_read_CAN1_TRS2() bfin_read16(CAN1_TRS2)
503#define bfin_write_CAN1_TRS2(val) bfin_write16(CAN1_TRS2, val)
504#define bfin_read_CAN1_TRR2() bfin_read16(CAN1_TRR2)
505#define bfin_write_CAN1_TRR2(val) bfin_write16(CAN1_TRR2, val)
506#define bfin_read_CAN1_TA2() bfin_read16(CAN1_TA2)
507#define bfin_write_CAN1_TA2(val) bfin_write16(CAN1_TA2, val)
508#define bfin_read_CAN1_AA2() bfin_read16(CAN1_AA2)
509#define bfin_write_CAN1_AA2(val) bfin_write16(CAN1_AA2, val)
510#define bfin_read_CAN1_RMP2() bfin_read16(CAN1_RMP2)
511#define bfin_write_CAN1_RMP2(val) bfin_write16(CAN1_RMP2, val)
512#define bfin_read_CAN1_RML2() bfin_read16(CAN1_RML2)
513#define bfin_write_CAN1_RML2(val) bfin_write16(CAN1_RML2, val)
514#define bfin_read_CAN1_MBTIF2() bfin_read16(CAN1_MBTIF2)
515#define bfin_write_CAN1_MBTIF2(val) bfin_write16(CAN1_MBTIF2, val)
516#define bfin_read_CAN1_MBRIF2() bfin_read16(CAN1_MBRIF2)
517#define bfin_write_CAN1_MBRIF2(val) bfin_write16(CAN1_MBRIF2, val)
518#define bfin_read_CAN1_MBIM2() bfin_read16(CAN1_MBIM2)
519#define bfin_write_CAN1_MBIM2(val) bfin_write16(CAN1_MBIM2, val)
520#define bfin_read_CAN1_RFH2() bfin_read16(CAN1_RFH2)
521#define bfin_write_CAN1_RFH2(val) bfin_write16(CAN1_RFH2, val)
522#define bfin_read_CAN1_OPSS2() bfin_read16(CAN1_OPSS2)
523#define bfin_write_CAN1_OPSS2(val) bfin_write16(CAN1_OPSS2, val)
524
525/* CAN Controller 1 Clock/Interrubfin_read_()t/Counter Registers */
526
527#define bfin_read_CAN1_CLOCK() bfin_read16(CAN1_CLOCK)
528#define bfin_write_CAN1_CLOCK(val) bfin_write16(CAN1_CLOCK, val)
529#define bfin_read_CAN1_TIMING() bfin_read16(CAN1_TIMING)
530#define bfin_write_CAN1_TIMING(val) bfin_write16(CAN1_TIMING, val)
531#define bfin_read_CAN1_DEBUG() bfin_read16(CAN1_DEBUG)
532#define bfin_write_CAN1_DEBUG(val) bfin_write16(CAN1_DEBUG, val)
533#define bfin_read_CAN1_STATUS() bfin_read16(CAN1_STATUS)
534#define bfin_write_CAN1_STATUS(val) bfin_write16(CAN1_STATUS, val)
535#define bfin_read_CAN1_CEC() bfin_read16(CAN1_CEC)
536#define bfin_write_CAN1_CEC(val) bfin_write16(CAN1_CEC, val)
537#define bfin_read_CAN1_GIS() bfin_read16(CAN1_GIS)
538#define bfin_write_CAN1_GIS(val) bfin_write16(CAN1_GIS, val)
539#define bfin_read_CAN1_GIM() bfin_read16(CAN1_GIM)
540#define bfin_write_CAN1_GIM(val) bfin_write16(CAN1_GIM, val)
541#define bfin_read_CAN1_GIF() bfin_read16(CAN1_GIF)
542#define bfin_write_CAN1_GIF(val) bfin_write16(CAN1_GIF, val)
543#define bfin_read_CAN1_CONTROL() bfin_read16(CAN1_CONTROL)
544#define bfin_write_CAN1_CONTROL(val) bfin_write16(CAN1_CONTROL, val)
545#define bfin_read_CAN1_INTR() bfin_read16(CAN1_INTR)
546#define bfin_write_CAN1_INTR(val) bfin_write16(CAN1_INTR, val)
547#define bfin_read_CAN1_MBTD() bfin_read16(CAN1_MBTD)
548#define bfin_write_CAN1_MBTD(val) bfin_write16(CAN1_MBTD, val)
549#define bfin_read_CAN1_EWR() bfin_read16(CAN1_EWR)
550#define bfin_write_CAN1_EWR(val) bfin_write16(CAN1_EWR, val)
551#define bfin_read_CAN1_ESR() bfin_read16(CAN1_ESR)
552#define bfin_write_CAN1_ESR(val) bfin_write16(CAN1_ESR, val)
553#define bfin_read_CAN1_UCCNT() bfin_read16(CAN1_UCCNT)
554#define bfin_write_CAN1_UCCNT(val) bfin_write16(CAN1_UCCNT, val)
555#define bfin_read_CAN1_UCRC() bfin_read16(CAN1_UCRC)
556#define bfin_write_CAN1_UCRC(val) bfin_write16(CAN1_UCRC, val)
557#define bfin_read_CAN1_UCCNF() bfin_read16(CAN1_UCCNF)
558#define bfin_write_CAN1_UCCNF(val) bfin_write16(CAN1_UCCNF, val)
559
560/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
561
562#define bfin_read_CAN1_AM00L() bfin_read16(CAN1_AM00L)
563#define bfin_write_CAN1_AM00L(val) bfin_write16(CAN1_AM00L, val)
564#define bfin_read_CAN1_AM00H() bfin_read16(CAN1_AM00H)
565#define bfin_write_CAN1_AM00H(val) bfin_write16(CAN1_AM00H, val)
566#define bfin_read_CAN1_AM01L() bfin_read16(CAN1_AM01L)
567#define bfin_write_CAN1_AM01L(val) bfin_write16(CAN1_AM01L, val)
568#define bfin_read_CAN1_AM01H() bfin_read16(CAN1_AM01H)
569#define bfin_write_CAN1_AM01H(val) bfin_write16(CAN1_AM01H, val)
570#define bfin_read_CAN1_AM02L() bfin_read16(CAN1_AM02L)
571#define bfin_write_CAN1_AM02L(val) bfin_write16(CAN1_AM02L, val)
572#define bfin_read_CAN1_AM02H() bfin_read16(CAN1_AM02H)
573#define bfin_write_CAN1_AM02H(val) bfin_write16(CAN1_AM02H, val)
574#define bfin_read_CAN1_AM03L() bfin_read16(CAN1_AM03L)
575#define bfin_write_CAN1_AM03L(val) bfin_write16(CAN1_AM03L, val)
576#define bfin_read_CAN1_AM03H() bfin_read16(CAN1_AM03H)
577#define bfin_write_CAN1_AM03H(val) bfin_write16(CAN1_AM03H, val)
578#define bfin_read_CAN1_AM04L() bfin_read16(CAN1_AM04L)
579#define bfin_write_CAN1_AM04L(val) bfin_write16(CAN1_AM04L, val)
580#define bfin_read_CAN1_AM04H() bfin_read16(CAN1_AM04H)
581#define bfin_write_CAN1_AM04H(val) bfin_write16(CAN1_AM04H, val)
582#define bfin_read_CAN1_AM05L() bfin_read16(CAN1_AM05L)
583#define bfin_write_CAN1_AM05L(val) bfin_write16(CAN1_AM05L, val)
584#define bfin_read_CAN1_AM05H() bfin_read16(CAN1_AM05H)
585#define bfin_write_CAN1_AM05H(val) bfin_write16(CAN1_AM05H, val)
586#define bfin_read_CAN1_AM06L() bfin_read16(CAN1_AM06L)
587#define bfin_write_CAN1_AM06L(val) bfin_write16(CAN1_AM06L, val)
588#define bfin_read_CAN1_AM06H() bfin_read16(CAN1_AM06H)
589#define bfin_write_CAN1_AM06H(val) bfin_write16(CAN1_AM06H, val)
590#define bfin_read_CAN1_AM07L() bfin_read16(CAN1_AM07L)
591#define bfin_write_CAN1_AM07L(val) bfin_write16(CAN1_AM07L, val)
592#define bfin_read_CAN1_AM07H() bfin_read16(CAN1_AM07H)
593#define bfin_write_CAN1_AM07H(val) bfin_write16(CAN1_AM07H, val)
594#define bfin_read_CAN1_AM08L() bfin_read16(CAN1_AM08L)
595#define bfin_write_CAN1_AM08L(val) bfin_write16(CAN1_AM08L, val)
596#define bfin_read_CAN1_AM08H() bfin_read16(CAN1_AM08H)
597#define bfin_write_CAN1_AM08H(val) bfin_write16(CAN1_AM08H, val)
598#define bfin_read_CAN1_AM09L() bfin_read16(CAN1_AM09L)
599#define bfin_write_CAN1_AM09L(val) bfin_write16(CAN1_AM09L, val)
600#define bfin_read_CAN1_AM09H() bfin_read16(CAN1_AM09H)
601#define bfin_write_CAN1_AM09H(val) bfin_write16(CAN1_AM09H, val)
602#define bfin_read_CAN1_AM10L() bfin_read16(CAN1_AM10L)
603#define bfin_write_CAN1_AM10L(val) bfin_write16(CAN1_AM10L, val)
604#define bfin_read_CAN1_AM10H() bfin_read16(CAN1_AM10H)
605#define bfin_write_CAN1_AM10H(val) bfin_write16(CAN1_AM10H, val)
606#define bfin_read_CAN1_AM11L() bfin_read16(CAN1_AM11L)
607#define bfin_write_CAN1_AM11L(val) bfin_write16(CAN1_AM11L, val)
608#define bfin_read_CAN1_AM11H() bfin_read16(CAN1_AM11H)
609#define bfin_write_CAN1_AM11H(val) bfin_write16(CAN1_AM11H, val)
610#define bfin_read_CAN1_AM12L() bfin_read16(CAN1_AM12L)
611#define bfin_write_CAN1_AM12L(val) bfin_write16(CAN1_AM12L, val)
612#define bfin_read_CAN1_AM12H() bfin_read16(CAN1_AM12H)
613#define bfin_write_CAN1_AM12H(val) bfin_write16(CAN1_AM12H, val)
614#define bfin_read_CAN1_AM13L() bfin_read16(CAN1_AM13L)
615#define bfin_write_CAN1_AM13L(val) bfin_write16(CAN1_AM13L, val)
616#define bfin_read_CAN1_AM13H() bfin_read16(CAN1_AM13H)
617#define bfin_write_CAN1_AM13H(val) bfin_write16(CAN1_AM13H, val)
618#define bfin_read_CAN1_AM14L() bfin_read16(CAN1_AM14L)
619#define bfin_write_CAN1_AM14L(val) bfin_write16(CAN1_AM14L, val)
620#define bfin_read_CAN1_AM14H() bfin_read16(CAN1_AM14H)
621#define bfin_write_CAN1_AM14H(val) bfin_write16(CAN1_AM14H, val)
622#define bfin_read_CAN1_AM15L() bfin_read16(CAN1_AM15L)
623#define bfin_write_CAN1_AM15L(val) bfin_write16(CAN1_AM15L, val)
624#define bfin_read_CAN1_AM15H() bfin_read16(CAN1_AM15H)
625#define bfin_write_CAN1_AM15H(val) bfin_write16(CAN1_AM15H, val)
626
627/* CAN Controller 1 Mailbox Accebfin_read_()tance Registers */
628
629#define bfin_read_CAN1_AM16L() bfin_read16(CAN1_AM16L)
630#define bfin_write_CAN1_AM16L(val) bfin_write16(CAN1_AM16L, val)
631#define bfin_read_CAN1_AM16H() bfin_read16(CAN1_AM16H)
632#define bfin_write_CAN1_AM16H(val) bfin_write16(CAN1_AM16H, val)
633#define bfin_read_CAN1_AM17L() bfin_read16(CAN1_AM17L)
634#define bfin_write_CAN1_AM17L(val) bfin_write16(CAN1_AM17L, val)
635#define bfin_read_CAN1_AM17H() bfin_read16(CAN1_AM17H)
636#define bfin_write_CAN1_AM17H(val) bfin_write16(CAN1_AM17H, val)
637#define bfin_read_CAN1_AM18L() bfin_read16(CAN1_AM18L)
638#define bfin_write_CAN1_AM18L(val) bfin_write16(CAN1_AM18L, val)
639#define bfin_read_CAN1_AM18H() bfin_read16(CAN1_AM18H)
640#define bfin_write_CAN1_AM18H(val) bfin_write16(CAN1_AM18H, val)
641#define bfin_read_CAN1_AM19L() bfin_read16(CAN1_AM19L)
642#define bfin_write_CAN1_AM19L(val) bfin_write16(CAN1_AM19L, val)
643#define bfin_read_CAN1_AM19H() bfin_read16(CAN1_AM19H)
644#define bfin_write_CAN1_AM19H(val) bfin_write16(CAN1_AM19H, val)
645#define bfin_read_CAN1_AM20L() bfin_read16(CAN1_AM20L)
646#define bfin_write_CAN1_AM20L(val) bfin_write16(CAN1_AM20L, val)
647#define bfin_read_CAN1_AM20H() bfin_read16(CAN1_AM20H)
648#define bfin_write_CAN1_AM20H(val) bfin_write16(CAN1_AM20H, val)
649#define bfin_read_CAN1_AM21L() bfin_read16(CAN1_AM21L)
650#define bfin_write_CAN1_AM21L(val) bfin_write16(CAN1_AM21L, val)
651#define bfin_read_CAN1_AM21H() bfin_read16(CAN1_AM21H)
652#define bfin_write_CAN1_AM21H(val) bfin_write16(CAN1_AM21H, val)
653#define bfin_read_CAN1_AM22L() bfin_read16(CAN1_AM22L)
654#define bfin_write_CAN1_AM22L(val) bfin_write16(CAN1_AM22L, val)
655#define bfin_read_CAN1_AM22H() bfin_read16(CAN1_AM22H)
656#define bfin_write_CAN1_AM22H(val) bfin_write16(CAN1_AM22H, val)
657#define bfin_read_CAN1_AM23L() bfin_read16(CAN1_AM23L)
658#define bfin_write_CAN1_AM23L(val) bfin_write16(CAN1_AM23L, val)
659#define bfin_read_CAN1_AM23H() bfin_read16(CAN1_AM23H)
660#define bfin_write_CAN1_AM23H(val) bfin_write16(CAN1_AM23H, val)
661#define bfin_read_CAN1_AM24L() bfin_read16(CAN1_AM24L)
662#define bfin_write_CAN1_AM24L(val) bfin_write16(CAN1_AM24L, val)
663#define bfin_read_CAN1_AM24H() bfin_read16(CAN1_AM24H)
664#define bfin_write_CAN1_AM24H(val) bfin_write16(CAN1_AM24H, val)
665#define bfin_read_CAN1_AM25L() bfin_read16(CAN1_AM25L)
666#define bfin_write_CAN1_AM25L(val) bfin_write16(CAN1_AM25L, val)
667#define bfin_read_CAN1_AM25H() bfin_read16(CAN1_AM25H)
668#define bfin_write_CAN1_AM25H(val) bfin_write16(CAN1_AM25H, val)
669#define bfin_read_CAN1_AM26L() bfin_read16(CAN1_AM26L)
670#define bfin_write_CAN1_AM26L(val) bfin_write16(CAN1_AM26L, val)
671#define bfin_read_CAN1_AM26H() bfin_read16(CAN1_AM26H)
672#define bfin_write_CAN1_AM26H(val) bfin_write16(CAN1_AM26H, val)
673#define bfin_read_CAN1_AM27L() bfin_read16(CAN1_AM27L)
674#define bfin_write_CAN1_AM27L(val) bfin_write16(CAN1_AM27L, val)
675#define bfin_read_CAN1_AM27H() bfin_read16(CAN1_AM27H)
676#define bfin_write_CAN1_AM27H(val) bfin_write16(CAN1_AM27H, val)
677#define bfin_read_CAN1_AM28L() bfin_read16(CAN1_AM28L)
678#define bfin_write_CAN1_AM28L(val) bfin_write16(CAN1_AM28L, val)
679#define bfin_read_CAN1_AM28H() bfin_read16(CAN1_AM28H)
680#define bfin_write_CAN1_AM28H(val) bfin_write16(CAN1_AM28H, val)
681#define bfin_read_CAN1_AM29L() bfin_read16(CAN1_AM29L)
682#define bfin_write_CAN1_AM29L(val) bfin_write16(CAN1_AM29L, val)
683#define bfin_read_CAN1_AM29H() bfin_read16(CAN1_AM29H)
684#define bfin_write_CAN1_AM29H(val) bfin_write16(CAN1_AM29H, val)
685#define bfin_read_CAN1_AM30L() bfin_read16(CAN1_AM30L)
686#define bfin_write_CAN1_AM30L(val) bfin_write16(CAN1_AM30L, val)
687#define bfin_read_CAN1_AM30H() bfin_read16(CAN1_AM30H)
688#define bfin_write_CAN1_AM30H(val) bfin_write16(CAN1_AM30H, val)
689#define bfin_read_CAN1_AM31L() bfin_read16(CAN1_AM31L)
690#define bfin_write_CAN1_AM31L(val) bfin_write16(CAN1_AM31L, val)
691#define bfin_read_CAN1_AM31H() bfin_read16(CAN1_AM31H)
692#define bfin_write_CAN1_AM31H(val) bfin_write16(CAN1_AM31H, val)
693
694/* CAN Controller 1 Mailbox Data Registers */
695
696#define bfin_read_CAN1_MB00_DATA0() bfin_read16(CAN1_MB00_DATA0)
697#define bfin_write_CAN1_MB00_DATA0(val) bfin_write16(CAN1_MB00_DATA0, val)
698#define bfin_read_CAN1_MB00_DATA1() bfin_read16(CAN1_MB00_DATA1)
699#define bfin_write_CAN1_MB00_DATA1(val) bfin_write16(CAN1_MB00_DATA1, val)
700#define bfin_read_CAN1_MB00_DATA2() bfin_read16(CAN1_MB00_DATA2)
701#define bfin_write_CAN1_MB00_DATA2(val) bfin_write16(CAN1_MB00_DATA2, val)
702#define bfin_read_CAN1_MB00_DATA3() bfin_read16(CAN1_MB00_DATA3)
703#define bfin_write_CAN1_MB00_DATA3(val) bfin_write16(CAN1_MB00_DATA3, val)
704#define bfin_read_CAN1_MB00_LENGTH() bfin_read16(CAN1_MB00_LENGTH)
705#define bfin_write_CAN1_MB00_LENGTH(val) bfin_write16(CAN1_MB00_LENGTH, val)
706#define bfin_read_CAN1_MB00_TIMESTAMP() bfin_read16(CAN1_MB00_TIMESTAMP)
707#define bfin_write_CAN1_MB00_TIMESTAMP(val) bfin_write16(CAN1_MB00_TIMESTAMP, val)
708#define bfin_read_CAN1_MB00_ID0() bfin_read16(CAN1_MB00_ID0)
709#define bfin_write_CAN1_MB00_ID0(val) bfin_write16(CAN1_MB00_ID0, val)
710#define bfin_read_CAN1_MB00_ID1() bfin_read16(CAN1_MB00_ID1)
711#define bfin_write_CAN1_MB00_ID1(val) bfin_write16(CAN1_MB00_ID1, val)
712#define bfin_read_CAN1_MB01_DATA0() bfin_read16(CAN1_MB01_DATA0)
713#define bfin_write_CAN1_MB01_DATA0(val) bfin_write16(CAN1_MB01_DATA0, val)
714#define bfin_read_CAN1_MB01_DATA1() bfin_read16(CAN1_MB01_DATA1)
715#define bfin_write_CAN1_MB01_DATA1(val) bfin_write16(CAN1_MB01_DATA1, val)
716#define bfin_read_CAN1_MB01_DATA2() bfin_read16(CAN1_MB01_DATA2)
717#define bfin_write_CAN1_MB01_DATA2(val) bfin_write16(CAN1_MB01_DATA2, val)
718#define bfin_read_CAN1_MB01_DATA3() bfin_read16(CAN1_MB01_DATA3)
719#define bfin_write_CAN1_MB01_DATA3(val) bfin_write16(CAN1_MB01_DATA3, val)
720#define bfin_read_CAN1_MB01_LENGTH() bfin_read16(CAN1_MB01_LENGTH)
721#define bfin_write_CAN1_MB01_LENGTH(val) bfin_write16(CAN1_MB01_LENGTH, val)
722#define bfin_read_CAN1_MB01_TIMESTAMP() bfin_read16(CAN1_MB01_TIMESTAMP)
723#define bfin_write_CAN1_MB01_TIMESTAMP(val) bfin_write16(CAN1_MB01_TIMESTAMP, val)
724#define bfin_read_CAN1_MB01_ID0() bfin_read16(CAN1_MB01_ID0)
725#define bfin_write_CAN1_MB01_ID0(val) bfin_write16(CAN1_MB01_ID0, val)
726#define bfin_read_CAN1_MB01_ID1() bfin_read16(CAN1_MB01_ID1)
727#define bfin_write_CAN1_MB01_ID1(val) bfin_write16(CAN1_MB01_ID1, val)
728#define bfin_read_CAN1_MB02_DATA0() bfin_read16(CAN1_MB02_DATA0)
729#define bfin_write_CAN1_MB02_DATA0(val) bfin_write16(CAN1_MB02_DATA0, val)
730#define bfin_read_CAN1_MB02_DATA1() bfin_read16(CAN1_MB02_DATA1)
731#define bfin_write_CAN1_MB02_DATA1(val) bfin_write16(CAN1_MB02_DATA1, val)
732#define bfin_read_CAN1_MB02_DATA2() bfin_read16(CAN1_MB02_DATA2)
733#define bfin_write_CAN1_MB02_DATA2(val) bfin_write16(CAN1_MB02_DATA2, val)
734#define bfin_read_CAN1_MB02_DATA3() bfin_read16(CAN1_MB02_DATA3)
735#define bfin_write_CAN1_MB02_DATA3(val) bfin_write16(CAN1_MB02_DATA3, val)
736#define bfin_read_CAN1_MB02_LENGTH() bfin_read16(CAN1_MB02_LENGTH)
737#define bfin_write_CAN1_MB02_LENGTH(val) bfin_write16(CAN1_MB02_LENGTH, val)
738#define bfin_read_CAN1_MB02_TIMESTAMP() bfin_read16(CAN1_MB02_TIMESTAMP)
739#define bfin_write_CAN1_MB02_TIMESTAMP(val) bfin_write16(CAN1_MB02_TIMESTAMP, val)
740#define bfin_read_CAN1_MB02_ID0() bfin_read16(CAN1_MB02_ID0)
741#define bfin_write_CAN1_MB02_ID0(val) bfin_write16(CAN1_MB02_ID0, val)
742#define bfin_read_CAN1_MB02_ID1() bfin_read16(CAN1_MB02_ID1)
743#define bfin_write_CAN1_MB02_ID1(val) bfin_write16(CAN1_MB02_ID1, val)
744#define bfin_read_CAN1_MB03_DATA0() bfin_read16(CAN1_MB03_DATA0)
745#define bfin_write_CAN1_MB03_DATA0(val) bfin_write16(CAN1_MB03_DATA0, val)
746#define bfin_read_CAN1_MB03_DATA1() bfin_read16(CAN1_MB03_DATA1)
747#define bfin_write_CAN1_MB03_DATA1(val) bfin_write16(CAN1_MB03_DATA1, val)
748#define bfin_read_CAN1_MB03_DATA2() bfin_read16(CAN1_MB03_DATA2)
749#define bfin_write_CAN1_MB03_DATA2(val) bfin_write16(CAN1_MB03_DATA2, val)
750#define bfin_read_CAN1_MB03_DATA3() bfin_read16(CAN1_MB03_DATA3)
751#define bfin_write_CAN1_MB03_DATA3(val) bfin_write16(CAN1_MB03_DATA3, val)
752#define bfin_read_CAN1_MB03_LENGTH() bfin_read16(CAN1_MB03_LENGTH)
753#define bfin_write_CAN1_MB03_LENGTH(val) bfin_write16(CAN1_MB03_LENGTH, val)
754#define bfin_read_CAN1_MB03_TIMESTAMP() bfin_read16(CAN1_MB03_TIMESTAMP)
755#define bfin_write_CAN1_MB03_TIMESTAMP(val) bfin_write16(CAN1_MB03_TIMESTAMP, val)
756#define bfin_read_CAN1_MB03_ID0() bfin_read16(CAN1_MB03_ID0)
757#define bfin_write_CAN1_MB03_ID0(val) bfin_write16(CAN1_MB03_ID0, val)
758#define bfin_read_CAN1_MB03_ID1() bfin_read16(CAN1_MB03_ID1)
759#define bfin_write_CAN1_MB03_ID1(val) bfin_write16(CAN1_MB03_ID1, val)
760#define bfin_read_CAN1_MB04_DATA0() bfin_read16(CAN1_MB04_DATA0)
761#define bfin_write_CAN1_MB04_DATA0(val) bfin_write16(CAN1_MB04_DATA0, val)
762#define bfin_read_CAN1_MB04_DATA1() bfin_read16(CAN1_MB04_DATA1)
763#define bfin_write_CAN1_MB04_DATA1(val) bfin_write16(CAN1_MB04_DATA1, val)
764#define bfin_read_CAN1_MB04_DATA2() bfin_read16(CAN1_MB04_DATA2)
765#define bfin_write_CAN1_MB04_DATA2(val) bfin_write16(CAN1_MB04_DATA2, val)
766#define bfin_read_CAN1_MB04_DATA3() bfin_read16(CAN1_MB04_DATA3)
767#define bfin_write_CAN1_MB04_DATA3(val) bfin_write16(CAN1_MB04_DATA3, val)
768#define bfin_read_CAN1_MB04_LENGTH() bfin_read16(CAN1_MB04_LENGTH)
769#define bfin_write_CAN1_MB04_LENGTH(val) bfin_write16(CAN1_MB04_LENGTH, val)
770#define bfin_read_CAN1_MB04_TIMESTAMP() bfin_read16(CAN1_MB04_TIMESTAMP)
771#define bfin_write_CAN1_MB04_TIMESTAMP(val) bfin_write16(CAN1_MB04_TIMESTAMP, val)
772#define bfin_read_CAN1_MB04_ID0() bfin_read16(CAN1_MB04_ID0)
773#define bfin_write_CAN1_MB04_ID0(val) bfin_write16(CAN1_MB04_ID0, val)
774#define bfin_read_CAN1_MB04_ID1() bfin_read16(CAN1_MB04_ID1)
775#define bfin_write_CAN1_MB04_ID1(val) bfin_write16(CAN1_MB04_ID1, val)
776#define bfin_read_CAN1_MB05_DATA0() bfin_read16(CAN1_MB05_DATA0)
777#define bfin_write_CAN1_MB05_DATA0(val) bfin_write16(CAN1_MB05_DATA0, val)
778#define bfin_read_CAN1_MB05_DATA1() bfin_read16(CAN1_MB05_DATA1)
779#define bfin_write_CAN1_MB05_DATA1(val) bfin_write16(CAN1_MB05_DATA1, val)
780#define bfin_read_CAN1_MB05_DATA2() bfin_read16(CAN1_MB05_DATA2)
781#define bfin_write_CAN1_MB05_DATA2(val) bfin_write16(CAN1_MB05_DATA2, val)
782#define bfin_read_CAN1_MB05_DATA3() bfin_read16(CAN1_MB05_DATA3)
783#define bfin_write_CAN1_MB05_DATA3(val) bfin_write16(CAN1_MB05_DATA3, val)
784#define bfin_read_CAN1_MB05_LENGTH() bfin_read16(CAN1_MB05_LENGTH)
785#define bfin_write_CAN1_MB05_LENGTH(val) bfin_write16(CAN1_MB05_LENGTH, val)
786#define bfin_read_CAN1_MB05_TIMESTAMP() bfin_read16(CAN1_MB05_TIMESTAMP)
787#define bfin_write_CAN1_MB05_TIMESTAMP(val) bfin_write16(CAN1_MB05_TIMESTAMP, val)
788#define bfin_read_CAN1_MB05_ID0() bfin_read16(CAN1_MB05_ID0)
789#define bfin_write_CAN1_MB05_ID0(val) bfin_write16(CAN1_MB05_ID0, val)
790#define bfin_read_CAN1_MB05_ID1() bfin_read16(CAN1_MB05_ID1)
791#define bfin_write_CAN1_MB05_ID1(val) bfin_write16(CAN1_MB05_ID1, val)
792#define bfin_read_CAN1_MB06_DATA0() bfin_read16(CAN1_MB06_DATA0)
793#define bfin_write_CAN1_MB06_DATA0(val) bfin_write16(CAN1_MB06_DATA0, val)
794#define bfin_read_CAN1_MB06_DATA1() bfin_read16(CAN1_MB06_DATA1)
795#define bfin_write_CAN1_MB06_DATA1(val) bfin_write16(CAN1_MB06_DATA1, val)
796#define bfin_read_CAN1_MB06_DATA2() bfin_read16(CAN1_MB06_DATA2)
797#define bfin_write_CAN1_MB06_DATA2(val) bfin_write16(CAN1_MB06_DATA2, val)
798#define bfin_read_CAN1_MB06_DATA3() bfin_read16(CAN1_MB06_DATA3)
799#define bfin_write_CAN1_MB06_DATA3(val) bfin_write16(CAN1_MB06_DATA3, val)
800#define bfin_read_CAN1_MB06_LENGTH() bfin_read16(CAN1_MB06_LENGTH)
801#define bfin_write_CAN1_MB06_LENGTH(val) bfin_write16(CAN1_MB06_LENGTH, val)
802#define bfin_read_CAN1_MB06_TIMESTAMP() bfin_read16(CAN1_MB06_TIMESTAMP)
803#define bfin_write_CAN1_MB06_TIMESTAMP(val) bfin_write16(CAN1_MB06_TIMESTAMP, val)
804#define bfin_read_CAN1_MB06_ID0() bfin_read16(CAN1_MB06_ID0)
805#define bfin_write_CAN1_MB06_ID0(val) bfin_write16(CAN1_MB06_ID0, val)
806#define bfin_read_CAN1_MB06_ID1() bfin_read16(CAN1_MB06_ID1)
807#define bfin_write_CAN1_MB06_ID1(val) bfin_write16(CAN1_MB06_ID1, val)
808#define bfin_read_CAN1_MB07_DATA0() bfin_read16(CAN1_MB07_DATA0)
809#define bfin_write_CAN1_MB07_DATA0(val) bfin_write16(CAN1_MB07_DATA0, val)
810#define bfin_read_CAN1_MB07_DATA1() bfin_read16(CAN1_MB07_DATA1)
811#define bfin_write_CAN1_MB07_DATA1(val) bfin_write16(CAN1_MB07_DATA1, val)
812#define bfin_read_CAN1_MB07_DATA2() bfin_read16(CAN1_MB07_DATA2)
813#define bfin_write_CAN1_MB07_DATA2(val) bfin_write16(CAN1_MB07_DATA2, val)
814#define bfin_read_CAN1_MB07_DATA3() bfin_read16(CAN1_MB07_DATA3)
815#define bfin_write_CAN1_MB07_DATA3(val) bfin_write16(CAN1_MB07_DATA3, val)
816#define bfin_read_CAN1_MB07_LENGTH() bfin_read16(CAN1_MB07_LENGTH)
817#define bfin_write_CAN1_MB07_LENGTH(val) bfin_write16(CAN1_MB07_LENGTH, val)
818#define bfin_read_CAN1_MB07_TIMESTAMP() bfin_read16(CAN1_MB07_TIMESTAMP)
819#define bfin_write_CAN1_MB07_TIMESTAMP(val) bfin_write16(CAN1_MB07_TIMESTAMP, val)
820#define bfin_read_CAN1_MB07_ID0() bfin_read16(CAN1_MB07_ID0)
821#define bfin_write_CAN1_MB07_ID0(val) bfin_write16(CAN1_MB07_ID0, val)
822#define bfin_read_CAN1_MB07_ID1() bfin_read16(CAN1_MB07_ID1)
823#define bfin_write_CAN1_MB07_ID1(val) bfin_write16(CAN1_MB07_ID1, val)
824#define bfin_read_CAN1_MB08_DATA0() bfin_read16(CAN1_MB08_DATA0)
825#define bfin_write_CAN1_MB08_DATA0(val) bfin_write16(CAN1_MB08_DATA0, val)
826#define bfin_read_CAN1_MB08_DATA1() bfin_read16(CAN1_MB08_DATA1)
827#define bfin_write_CAN1_MB08_DATA1(val) bfin_write16(CAN1_MB08_DATA1, val)
828#define bfin_read_CAN1_MB08_DATA2() bfin_read16(CAN1_MB08_DATA2)
829#define bfin_write_CAN1_MB08_DATA2(val) bfin_write16(CAN1_MB08_DATA2, val)
830#define bfin_read_CAN1_MB08_DATA3() bfin_read16(CAN1_MB08_DATA3)
831#define bfin_write_CAN1_MB08_DATA3(val) bfin_write16(CAN1_MB08_DATA3, val)
832#define bfin_read_CAN1_MB08_LENGTH() bfin_read16(CAN1_MB08_LENGTH)
833#define bfin_write_CAN1_MB08_LENGTH(val) bfin_write16(CAN1_MB08_LENGTH, val)
834#define bfin_read_CAN1_MB08_TIMESTAMP() bfin_read16(CAN1_MB08_TIMESTAMP)
835#define bfin_write_CAN1_MB08_TIMESTAMP(val) bfin_write16(CAN1_MB08_TIMESTAMP, val)
836#define bfin_read_CAN1_MB08_ID0() bfin_read16(CAN1_MB08_ID0)
837#define bfin_write_CAN1_MB08_ID0(val) bfin_write16(CAN1_MB08_ID0, val)
838#define bfin_read_CAN1_MB08_ID1() bfin_read16(CAN1_MB08_ID1)
839#define bfin_write_CAN1_MB08_ID1(val) bfin_write16(CAN1_MB08_ID1, val)
840#define bfin_read_CAN1_MB09_DATA0() bfin_read16(CAN1_MB09_DATA0)
841#define bfin_write_CAN1_MB09_DATA0(val) bfin_write16(CAN1_MB09_DATA0, val)
842#define bfin_read_CAN1_MB09_DATA1() bfin_read16(CAN1_MB09_DATA1)
843#define bfin_write_CAN1_MB09_DATA1(val) bfin_write16(CAN1_MB09_DATA1, val)
844#define bfin_read_CAN1_MB09_DATA2() bfin_read16(CAN1_MB09_DATA2)
845#define bfin_write_CAN1_MB09_DATA2(val) bfin_write16(CAN1_MB09_DATA2, val)
846#define bfin_read_CAN1_MB09_DATA3() bfin_read16(CAN1_MB09_DATA3)
847#define bfin_write_CAN1_MB09_DATA3(val) bfin_write16(CAN1_MB09_DATA3, val)
848#define bfin_read_CAN1_MB09_LENGTH() bfin_read16(CAN1_MB09_LENGTH)
849#define bfin_write_CAN1_MB09_LENGTH(val) bfin_write16(CAN1_MB09_LENGTH, val)
850#define bfin_read_CAN1_MB09_TIMESTAMP() bfin_read16(CAN1_MB09_TIMESTAMP)
851#define bfin_write_CAN1_MB09_TIMESTAMP(val) bfin_write16(CAN1_MB09_TIMESTAMP, val)
852#define bfin_read_CAN1_MB09_ID0() bfin_read16(CAN1_MB09_ID0)
853#define bfin_write_CAN1_MB09_ID0(val) bfin_write16(CAN1_MB09_ID0, val)
854#define bfin_read_CAN1_MB09_ID1() bfin_read16(CAN1_MB09_ID1)
855#define bfin_write_CAN1_MB09_ID1(val) bfin_write16(CAN1_MB09_ID1, val)
856#define bfin_read_CAN1_MB10_DATA0() bfin_read16(CAN1_MB10_DATA0)
857#define bfin_write_CAN1_MB10_DATA0(val) bfin_write16(CAN1_MB10_DATA0, val)
858#define bfin_read_CAN1_MB10_DATA1() bfin_read16(CAN1_MB10_DATA1)
859#define bfin_write_CAN1_MB10_DATA1(val) bfin_write16(CAN1_MB10_DATA1, val)
860#define bfin_read_CAN1_MB10_DATA2() bfin_read16(CAN1_MB10_DATA2)
861#define bfin_write_CAN1_MB10_DATA2(val) bfin_write16(CAN1_MB10_DATA2, val)
862#define bfin_read_CAN1_MB10_DATA3() bfin_read16(CAN1_MB10_DATA3)
863#define bfin_write_CAN1_MB10_DATA3(val) bfin_write16(CAN1_MB10_DATA3, val)
864#define bfin_read_CAN1_MB10_LENGTH() bfin_read16(CAN1_MB10_LENGTH)
865#define bfin_write_CAN1_MB10_LENGTH(val) bfin_write16(CAN1_MB10_LENGTH, val)
866#define bfin_read_CAN1_MB10_TIMESTAMP() bfin_read16(CAN1_MB10_TIMESTAMP)
867#define bfin_write_CAN1_MB10_TIMESTAMP(val) bfin_write16(CAN1_MB10_TIMESTAMP, val)
868#define bfin_read_CAN1_MB10_ID0() bfin_read16(CAN1_MB10_ID0)
869#define bfin_write_CAN1_MB10_ID0(val) bfin_write16(CAN1_MB10_ID0, val)
870#define bfin_read_CAN1_MB10_ID1() bfin_read16(CAN1_MB10_ID1)
871#define bfin_write_CAN1_MB10_ID1(val) bfin_write16(CAN1_MB10_ID1, val)
872#define bfin_read_CAN1_MB11_DATA0() bfin_read16(CAN1_MB11_DATA0)
873#define bfin_write_CAN1_MB11_DATA0(val) bfin_write16(CAN1_MB11_DATA0, val)
874#define bfin_read_CAN1_MB11_DATA1() bfin_read16(CAN1_MB11_DATA1)
875#define bfin_write_CAN1_MB11_DATA1(val) bfin_write16(CAN1_MB11_DATA1, val)
876#define bfin_read_CAN1_MB11_DATA2() bfin_read16(CAN1_MB11_DATA2)
877#define bfin_write_CAN1_MB11_DATA2(val) bfin_write16(CAN1_MB11_DATA2, val)
878#define bfin_read_CAN1_MB11_DATA3() bfin_read16(CAN1_MB11_DATA3)
879#define bfin_write_CAN1_MB11_DATA3(val) bfin_write16(CAN1_MB11_DATA3, val)
880#define bfin_read_CAN1_MB11_LENGTH() bfin_read16(CAN1_MB11_LENGTH)
881#define bfin_write_CAN1_MB11_LENGTH(val) bfin_write16(CAN1_MB11_LENGTH, val)
882#define bfin_read_CAN1_MB11_TIMESTAMP() bfin_read16(CAN1_MB11_TIMESTAMP)
883#define bfin_write_CAN1_MB11_TIMESTAMP(val) bfin_write16(CAN1_MB11_TIMESTAMP, val)
884#define bfin_read_CAN1_MB11_ID0() bfin_read16(CAN1_MB11_ID0)
885#define bfin_write_CAN1_MB11_ID0(val) bfin_write16(CAN1_MB11_ID0, val)
886#define bfin_read_CAN1_MB11_ID1() bfin_read16(CAN1_MB11_ID1)
887#define bfin_write_CAN1_MB11_ID1(val) bfin_write16(CAN1_MB11_ID1, val)
888#define bfin_read_CAN1_MB12_DATA0() bfin_read16(CAN1_MB12_DATA0)
889#define bfin_write_CAN1_MB12_DATA0(val) bfin_write16(CAN1_MB12_DATA0, val)
890#define bfin_read_CAN1_MB12_DATA1() bfin_read16(CAN1_MB12_DATA1)
891#define bfin_write_CAN1_MB12_DATA1(val) bfin_write16(CAN1_MB12_DATA1, val)
892#define bfin_read_CAN1_MB12_DATA2() bfin_read16(CAN1_MB12_DATA2)
893#define bfin_write_CAN1_MB12_DATA2(val) bfin_write16(CAN1_MB12_DATA2, val)
894#define bfin_read_CAN1_MB12_DATA3() bfin_read16(CAN1_MB12_DATA3)
895#define bfin_write_CAN1_MB12_DATA3(val) bfin_write16(CAN1_MB12_DATA3, val)
896#define bfin_read_CAN1_MB12_LENGTH() bfin_read16(CAN1_MB12_LENGTH)
897#define bfin_write_CAN1_MB12_LENGTH(val) bfin_write16(CAN1_MB12_LENGTH, val)
898#define bfin_read_CAN1_MB12_TIMESTAMP() bfin_read16(CAN1_MB12_TIMESTAMP)
899#define bfin_write_CAN1_MB12_TIMESTAMP(val) bfin_write16(CAN1_MB12_TIMESTAMP, val)
900#define bfin_read_CAN1_MB12_ID0() bfin_read16(CAN1_MB12_ID0)
901#define bfin_write_CAN1_MB12_ID0(val) bfin_write16(CAN1_MB12_ID0, val)
902#define bfin_read_CAN1_MB12_ID1() bfin_read16(CAN1_MB12_ID1)
903#define bfin_write_CAN1_MB12_ID1(val) bfin_write16(CAN1_MB12_ID1, val)
904#define bfin_read_CAN1_MB13_DATA0() bfin_read16(CAN1_MB13_DATA0)
905#define bfin_write_CAN1_MB13_DATA0(val) bfin_write16(CAN1_MB13_DATA0, val)
906#define bfin_read_CAN1_MB13_DATA1() bfin_read16(CAN1_MB13_DATA1)
907#define bfin_write_CAN1_MB13_DATA1(val) bfin_write16(CAN1_MB13_DATA1, val)
908#define bfin_read_CAN1_MB13_DATA2() bfin_read16(CAN1_MB13_DATA2)
909#define bfin_write_CAN1_MB13_DATA2(val) bfin_write16(CAN1_MB13_DATA2, val)
910#define bfin_read_CAN1_MB13_DATA3() bfin_read16(CAN1_MB13_DATA3)
911#define bfin_write_CAN1_MB13_DATA3(val) bfin_write16(CAN1_MB13_DATA3, val)
912#define bfin_read_CAN1_MB13_LENGTH() bfin_read16(CAN1_MB13_LENGTH)
913#define bfin_write_CAN1_MB13_LENGTH(val) bfin_write16(CAN1_MB13_LENGTH, val)
914#define bfin_read_CAN1_MB13_TIMESTAMP() bfin_read16(CAN1_MB13_TIMESTAMP)
915#define bfin_write_CAN1_MB13_TIMESTAMP(val) bfin_write16(CAN1_MB13_TIMESTAMP, val)
916#define bfin_read_CAN1_MB13_ID0() bfin_read16(CAN1_MB13_ID0)
917#define bfin_write_CAN1_MB13_ID0(val) bfin_write16(CAN1_MB13_ID0, val)
918#define bfin_read_CAN1_MB13_ID1() bfin_read16(CAN1_MB13_ID1)
919#define bfin_write_CAN1_MB13_ID1(val) bfin_write16(CAN1_MB13_ID1, val)
920#define bfin_read_CAN1_MB14_DATA0() bfin_read16(CAN1_MB14_DATA0)
921#define bfin_write_CAN1_MB14_DATA0(val) bfin_write16(CAN1_MB14_DATA0, val)
922#define bfin_read_CAN1_MB14_DATA1() bfin_read16(CAN1_MB14_DATA1)
923#define bfin_write_CAN1_MB14_DATA1(val) bfin_write16(CAN1_MB14_DATA1, val)
924#define bfin_read_CAN1_MB14_DATA2() bfin_read16(CAN1_MB14_DATA2)
925#define bfin_write_CAN1_MB14_DATA2(val) bfin_write16(CAN1_MB14_DATA2, val)
926#define bfin_read_CAN1_MB14_DATA3() bfin_read16(CAN1_MB14_DATA3)
927#define bfin_write_CAN1_MB14_DATA3(val) bfin_write16(CAN1_MB14_DATA3, val)
928#define bfin_read_CAN1_MB14_LENGTH() bfin_read16(CAN1_MB14_LENGTH)
929#define bfin_write_CAN1_MB14_LENGTH(val) bfin_write16(CAN1_MB14_LENGTH, val)
930#define bfin_read_CAN1_MB14_TIMESTAMP() bfin_read16(CAN1_MB14_TIMESTAMP)
931#define bfin_write_CAN1_MB14_TIMESTAMP(val) bfin_write16(CAN1_MB14_TIMESTAMP, val)
932#define bfin_read_CAN1_MB14_ID0() bfin_read16(CAN1_MB14_ID0)
933#define bfin_write_CAN1_MB14_ID0(val) bfin_write16(CAN1_MB14_ID0, val)
934#define bfin_read_CAN1_MB14_ID1() bfin_read16(CAN1_MB14_ID1)
935#define bfin_write_CAN1_MB14_ID1(val) bfin_write16(CAN1_MB14_ID1, val)
936#define bfin_read_CAN1_MB15_DATA0() bfin_read16(CAN1_MB15_DATA0)
937#define bfin_write_CAN1_MB15_DATA0(val) bfin_write16(CAN1_MB15_DATA0, val)
938#define bfin_read_CAN1_MB15_DATA1() bfin_read16(CAN1_MB15_DATA1)
939#define bfin_write_CAN1_MB15_DATA1(val) bfin_write16(CAN1_MB15_DATA1, val)
940#define bfin_read_CAN1_MB15_DATA2() bfin_read16(CAN1_MB15_DATA2)
941#define bfin_write_CAN1_MB15_DATA2(val) bfin_write16(CAN1_MB15_DATA2, val)
942#define bfin_read_CAN1_MB15_DATA3() bfin_read16(CAN1_MB15_DATA3)
943#define bfin_write_CAN1_MB15_DATA3(val) bfin_write16(CAN1_MB15_DATA3, val)
944#define bfin_read_CAN1_MB15_LENGTH() bfin_read16(CAN1_MB15_LENGTH)
945#define bfin_write_CAN1_MB15_LENGTH(val) bfin_write16(CAN1_MB15_LENGTH, val)
946#define bfin_read_CAN1_MB15_TIMESTAMP() bfin_read16(CAN1_MB15_TIMESTAMP)
947#define bfin_write_CAN1_MB15_TIMESTAMP(val) bfin_write16(CAN1_MB15_TIMESTAMP, val)
948#define bfin_read_CAN1_MB15_ID0() bfin_read16(CAN1_MB15_ID0)
949#define bfin_write_CAN1_MB15_ID0(val) bfin_write16(CAN1_MB15_ID0, val)
950#define bfin_read_CAN1_MB15_ID1() bfin_read16(CAN1_MB15_ID1)
951#define bfin_write_CAN1_MB15_ID1(val) bfin_write16(CAN1_MB15_ID1, val)
952
953/* CAN Controller 1 Mailbox Data Registers */
954
955#define bfin_read_CAN1_MB16_DATA0() bfin_read16(CAN1_MB16_DATA0)
956#define bfin_write_CAN1_MB16_DATA0(val) bfin_write16(CAN1_MB16_DATA0, val)
957#define bfin_read_CAN1_MB16_DATA1() bfin_read16(CAN1_MB16_DATA1)
958#define bfin_write_CAN1_MB16_DATA1(val) bfin_write16(CAN1_MB16_DATA1, val)
959#define bfin_read_CAN1_MB16_DATA2() bfin_read16(CAN1_MB16_DATA2)
960#define bfin_write_CAN1_MB16_DATA2(val) bfin_write16(CAN1_MB16_DATA2, val)
961#define bfin_read_CAN1_MB16_DATA3() bfin_read16(CAN1_MB16_DATA3)
962#define bfin_write_CAN1_MB16_DATA3(val) bfin_write16(CAN1_MB16_DATA3, val)
963#define bfin_read_CAN1_MB16_LENGTH() bfin_read16(CAN1_MB16_LENGTH)
964#define bfin_write_CAN1_MB16_LENGTH(val) bfin_write16(CAN1_MB16_LENGTH, val)
965#define bfin_read_CAN1_MB16_TIMESTAMP() bfin_read16(CAN1_MB16_TIMESTAMP)
966#define bfin_write_CAN1_MB16_TIMESTAMP(val) bfin_write16(CAN1_MB16_TIMESTAMP, val)
967#define bfin_read_CAN1_MB16_ID0() bfin_read16(CAN1_MB16_ID0)
968#define bfin_write_CAN1_MB16_ID0(val) bfin_write16(CAN1_MB16_ID0, val)
969#define bfin_read_CAN1_MB16_ID1() bfin_read16(CAN1_MB16_ID1)
970#define bfin_write_CAN1_MB16_ID1(val) bfin_write16(CAN1_MB16_ID1, val)
971#define bfin_read_CAN1_MB17_DATA0() bfin_read16(CAN1_MB17_DATA0)
972#define bfin_write_CAN1_MB17_DATA0(val) bfin_write16(CAN1_MB17_DATA0, val)
973#define bfin_read_CAN1_MB17_DATA1() bfin_read16(CAN1_MB17_DATA1)
974#define bfin_write_CAN1_MB17_DATA1(val) bfin_write16(CAN1_MB17_DATA1, val)
975#define bfin_read_CAN1_MB17_DATA2() bfin_read16(CAN1_MB17_DATA2)
976#define bfin_write_CAN1_MB17_DATA2(val) bfin_write16(CAN1_MB17_DATA2, val)
977#define bfin_read_CAN1_MB17_DATA3() bfin_read16(CAN1_MB17_DATA3)
978#define bfin_write_CAN1_MB17_DATA3(val) bfin_write16(CAN1_MB17_DATA3, val)
979#define bfin_read_CAN1_MB17_LENGTH() bfin_read16(CAN1_MB17_LENGTH)
980#define bfin_write_CAN1_MB17_LENGTH(val) bfin_write16(CAN1_MB17_LENGTH, val)
981#define bfin_read_CAN1_MB17_TIMESTAMP() bfin_read16(CAN1_MB17_TIMESTAMP)
982#define bfin_write_CAN1_MB17_TIMESTAMP(val) bfin_write16(CAN1_MB17_TIMESTAMP, val)
983#define bfin_read_CAN1_MB17_ID0() bfin_read16(CAN1_MB17_ID0)
984#define bfin_write_CAN1_MB17_ID0(val) bfin_write16(CAN1_MB17_ID0, val)
985#define bfin_read_CAN1_MB17_ID1() bfin_read16(CAN1_MB17_ID1)
986#define bfin_write_CAN1_MB17_ID1(val) bfin_write16(CAN1_MB17_ID1, val)
987#define bfin_read_CAN1_MB18_DATA0() bfin_read16(CAN1_MB18_DATA0)
988#define bfin_write_CAN1_MB18_DATA0(val) bfin_write16(CAN1_MB18_DATA0, val)
989#define bfin_read_CAN1_MB18_DATA1() bfin_read16(CAN1_MB18_DATA1)
990#define bfin_write_CAN1_MB18_DATA1(val) bfin_write16(CAN1_MB18_DATA1, val)
991#define bfin_read_CAN1_MB18_DATA2() bfin_read16(CAN1_MB18_DATA2)
992#define bfin_write_CAN1_MB18_DATA2(val) bfin_write16(CAN1_MB18_DATA2, val)
993#define bfin_read_CAN1_MB18_DATA3() bfin_read16(CAN1_MB18_DATA3)
994#define bfin_write_CAN1_MB18_DATA3(val) bfin_write16(CAN1_MB18_DATA3, val)
995#define bfin_read_CAN1_MB18_LENGTH() bfin_read16(CAN1_MB18_LENGTH)
996#define bfin_write_CAN1_MB18_LENGTH(val) bfin_write16(CAN1_MB18_LENGTH, val)
997#define bfin_read_CAN1_MB18_TIMESTAMP() bfin_read16(CAN1_MB18_TIMESTAMP)
998#define bfin_write_CAN1_MB18_TIMESTAMP(val) bfin_write16(CAN1_MB18_TIMESTAMP, val)
999#define bfin_read_CAN1_MB18_ID0() bfin_read16(CAN1_MB18_ID0)
1000#define bfin_write_CAN1_MB18_ID0(val) bfin_write16(CAN1_MB18_ID0, val)
1001#define bfin_read_CAN1_MB18_ID1() bfin_read16(CAN1_MB18_ID1)
1002#define bfin_write_CAN1_MB18_ID1(val) bfin_write16(CAN1_MB18_ID1, val)
1003#define bfin_read_CAN1_MB19_DATA0() bfin_read16(CAN1_MB19_DATA0)
1004#define bfin_write_CAN1_MB19_DATA0(val) bfin_write16(CAN1_MB19_DATA0, val)
1005#define bfin_read_CAN1_MB19_DATA1() bfin_read16(CAN1_MB19_DATA1)
1006#define bfin_write_CAN1_MB19_DATA1(val) bfin_write16(CAN1_MB19_DATA1, val)
1007#define bfin_read_CAN1_MB19_DATA2() bfin_read16(CAN1_MB19_DATA2)
1008#define bfin_write_CAN1_MB19_DATA2(val) bfin_write16(CAN1_MB19_DATA2, val)
1009#define bfin_read_CAN1_MB19_DATA3() bfin_read16(CAN1_MB19_DATA3)
1010#define bfin_write_CAN1_MB19_DATA3(val) bfin_write16(CAN1_MB19_DATA3, val)
1011#define bfin_read_CAN1_MB19_LENGTH() bfin_read16(CAN1_MB19_LENGTH)
1012#define bfin_write_CAN1_MB19_LENGTH(val) bfin_write16(CAN1_MB19_LENGTH, val)
1013#define bfin_read_CAN1_MB19_TIMESTAMP() bfin_read16(CAN1_MB19_TIMESTAMP)
1014#define bfin_write_CAN1_MB19_TIMESTAMP(val) bfin_write16(CAN1_MB19_TIMESTAMP, val)
1015#define bfin_read_CAN1_MB19_ID0() bfin_read16(CAN1_MB19_ID0)
1016#define bfin_write_CAN1_MB19_ID0(val) bfin_write16(CAN1_MB19_ID0, val)
1017#define bfin_read_CAN1_MB19_ID1() bfin_read16(CAN1_MB19_ID1)
1018#define bfin_write_CAN1_MB19_ID1(val) bfin_write16(CAN1_MB19_ID1, val)
1019#define bfin_read_CAN1_MB20_DATA0() bfin_read16(CAN1_MB20_DATA0)
1020#define bfin_write_CAN1_MB20_DATA0(val) bfin_write16(CAN1_MB20_DATA0, val)
1021#define bfin_read_CAN1_MB20_DATA1() bfin_read16(CAN1_MB20_DATA1)
1022#define bfin_write_CAN1_MB20_DATA1(val) bfin_write16(CAN1_MB20_DATA1, val)
1023#define bfin_read_CAN1_MB20_DATA2() bfin_read16(CAN1_MB20_DATA2)
1024#define bfin_write_CAN1_MB20_DATA2(val) bfin_write16(CAN1_MB20_DATA2, val)
1025#define bfin_read_CAN1_MB20_DATA3() bfin_read16(CAN1_MB20_DATA3)
1026#define bfin_write_CAN1_MB20_DATA3(val) bfin_write16(CAN1_MB20_DATA3, val)
1027#define bfin_read_CAN1_MB20_LENGTH() bfin_read16(CAN1_MB20_LENGTH)
1028#define bfin_write_CAN1_MB20_LENGTH(val) bfin_write16(CAN1_MB20_LENGTH, val)
1029#define bfin_read_CAN1_MB20_TIMESTAMP() bfin_read16(CAN1_MB20_TIMESTAMP)
1030#define bfin_write_CAN1_MB20_TIMESTAMP(val) bfin_write16(CAN1_MB20_TIMESTAMP, val)
1031#define bfin_read_CAN1_MB20_ID0() bfin_read16(CAN1_MB20_ID0)
1032#define bfin_write_CAN1_MB20_ID0(val) bfin_write16(CAN1_MB20_ID0, val)
1033#define bfin_read_CAN1_MB20_ID1() bfin_read16(CAN1_MB20_ID1)
1034#define bfin_write_CAN1_MB20_ID1(val) bfin_write16(CAN1_MB20_ID1, val)
1035#define bfin_read_CAN1_MB21_DATA0() bfin_read16(CAN1_MB21_DATA0)
1036#define bfin_write_CAN1_MB21_DATA0(val) bfin_write16(CAN1_MB21_DATA0, val)
1037#define bfin_read_CAN1_MB21_DATA1() bfin_read16(CAN1_MB21_DATA1)
1038#define bfin_write_CAN1_MB21_DATA1(val) bfin_write16(CAN1_MB21_DATA1, val)
1039#define bfin_read_CAN1_MB21_DATA2() bfin_read16(CAN1_MB21_DATA2)
1040#define bfin_write_CAN1_MB21_DATA2(val) bfin_write16(CAN1_MB21_DATA2, val)
1041#define bfin_read_CAN1_MB21_DATA3() bfin_read16(CAN1_MB21_DATA3)
1042#define bfin_write_CAN1_MB21_DATA3(val) bfin_write16(CAN1_MB21_DATA3, val)
1043#define bfin_read_CAN1_MB21_LENGTH() bfin_read16(CAN1_MB21_LENGTH)
1044#define bfin_write_CAN1_MB21_LENGTH(val) bfin_write16(CAN1_MB21_LENGTH, val)
1045#define bfin_read_CAN1_MB21_TIMESTAMP() bfin_read16(CAN1_MB21_TIMESTAMP)
1046#define bfin_write_CAN1_MB21_TIMESTAMP(val) bfin_write16(CAN1_MB21_TIMESTAMP, val)
1047#define bfin_read_CAN1_MB21_ID0() bfin_read16(CAN1_MB21_ID0)
1048#define bfin_write_CAN1_MB21_ID0(val) bfin_write16(CAN1_MB21_ID0, val)
1049#define bfin_read_CAN1_MB21_ID1() bfin_read16(CAN1_MB21_ID1)
1050#define bfin_write_CAN1_MB21_ID1(val) bfin_write16(CAN1_MB21_ID1, val)
1051#define bfin_read_CAN1_MB22_DATA0() bfin_read16(CAN1_MB22_DATA0)
1052#define bfin_write_CAN1_MB22_DATA0(val) bfin_write16(CAN1_MB22_DATA0, val)
1053#define bfin_read_CAN1_MB22_DATA1() bfin_read16(CAN1_MB22_DATA1)
1054#define bfin_write_CAN1_MB22_DATA1(val) bfin_write16(CAN1_MB22_DATA1, val)
1055#define bfin_read_CAN1_MB22_DATA2() bfin_read16(CAN1_MB22_DATA2)
1056#define bfin_write_CAN1_MB22_DATA2(val) bfin_write16(CAN1_MB22_DATA2, val)
1057#define bfin_read_CAN1_MB22_DATA3() bfin_read16(CAN1_MB22_DATA3)
1058#define bfin_write_CAN1_MB22_DATA3(val) bfin_write16(CAN1_MB22_DATA3, val)
1059#define bfin_read_CAN1_MB22_LENGTH() bfin_read16(CAN1_MB22_LENGTH)
1060#define bfin_write_CAN1_MB22_LENGTH(val) bfin_write16(CAN1_MB22_LENGTH, val)
1061#define bfin_read_CAN1_MB22_TIMESTAMP() bfin_read16(CAN1_MB22_TIMESTAMP)
1062#define bfin_write_CAN1_MB22_TIMESTAMP(val) bfin_write16(CAN1_MB22_TIMESTAMP, val)
1063#define bfin_read_CAN1_MB22_ID0() bfin_read16(CAN1_MB22_ID0)
1064#define bfin_write_CAN1_MB22_ID0(val) bfin_write16(CAN1_MB22_ID0, val)
1065#define bfin_read_CAN1_MB22_ID1() bfin_read16(CAN1_MB22_ID1)
1066#define bfin_write_CAN1_MB22_ID1(val) bfin_write16(CAN1_MB22_ID1, val)
1067#define bfin_read_CAN1_MB23_DATA0() bfin_read16(CAN1_MB23_DATA0)
1068#define bfin_write_CAN1_MB23_DATA0(val) bfin_write16(CAN1_MB23_DATA0, val)
1069#define bfin_read_CAN1_MB23_DATA1() bfin_read16(CAN1_MB23_DATA1)
1070#define bfin_write_CAN1_MB23_DATA1(val) bfin_write16(CAN1_MB23_DATA1, val)
1071#define bfin_read_CAN1_MB23_DATA2() bfin_read16(CAN1_MB23_DATA2)
1072#define bfin_write_CAN1_MB23_DATA2(val) bfin_write16(CAN1_MB23_DATA2, val)
1073#define bfin_read_CAN1_MB23_DATA3() bfin_read16(CAN1_MB23_DATA3)
1074#define bfin_write_CAN1_MB23_DATA3(val) bfin_write16(CAN1_MB23_DATA3, val)
1075#define bfin_read_CAN1_MB23_LENGTH() bfin_read16(CAN1_MB23_LENGTH)
1076#define bfin_write_CAN1_MB23_LENGTH(val) bfin_write16(CAN1_MB23_LENGTH, val)
1077#define bfin_read_CAN1_MB23_TIMESTAMP() bfin_read16(CAN1_MB23_TIMESTAMP)
1078#define bfin_write_CAN1_MB23_TIMESTAMP(val) bfin_write16(CAN1_MB23_TIMESTAMP, val)
1079#define bfin_read_CAN1_MB23_ID0() bfin_read16(CAN1_MB23_ID0)
1080#define bfin_write_CAN1_MB23_ID0(val) bfin_write16(CAN1_MB23_ID0, val)
1081#define bfin_read_CAN1_MB23_ID1() bfin_read16(CAN1_MB23_ID1)
1082#define bfin_write_CAN1_MB23_ID1(val) bfin_write16(CAN1_MB23_ID1, val)
1083#define bfin_read_CAN1_MB24_DATA0() bfin_read16(CAN1_MB24_DATA0)
1084#define bfin_write_CAN1_MB24_DATA0(val) bfin_write16(CAN1_MB24_DATA0, val)
1085#define bfin_read_CAN1_MB24_DATA1() bfin_read16(CAN1_MB24_DATA1)
1086#define bfin_write_CAN1_MB24_DATA1(val) bfin_write16(CAN1_MB24_DATA1, val)
1087#define bfin_read_CAN1_MB24_DATA2() bfin_read16(CAN1_MB24_DATA2)
1088#define bfin_write_CAN1_MB24_DATA2(val) bfin_write16(CAN1_MB24_DATA2, val)
1089#define bfin_read_CAN1_MB24_DATA3() bfin_read16(CAN1_MB24_DATA3)
1090#define bfin_write_CAN1_MB24_DATA3(val) bfin_write16(CAN1_MB24_DATA3, val)
1091#define bfin_read_CAN1_MB24_LENGTH() bfin_read16(CAN1_MB24_LENGTH)
1092#define bfin_write_CAN1_MB24_LENGTH(val) bfin_write16(CAN1_MB24_LENGTH, val)
1093#define bfin_read_CAN1_MB24_TIMESTAMP() bfin_read16(CAN1_MB24_TIMESTAMP)
1094#define bfin_write_CAN1_MB24_TIMESTAMP(val) bfin_write16(CAN1_MB24_TIMESTAMP, val)
1095#define bfin_read_CAN1_MB24_ID0() bfin_read16(CAN1_MB24_ID0)
1096#define bfin_write_CAN1_MB24_ID0(val) bfin_write16(CAN1_MB24_ID0, val)
1097#define bfin_read_CAN1_MB24_ID1() bfin_read16(CAN1_MB24_ID1)
1098#define bfin_write_CAN1_MB24_ID1(val) bfin_write16(CAN1_MB24_ID1, val)
1099#define bfin_read_CAN1_MB25_DATA0() bfin_read16(CAN1_MB25_DATA0)
1100#define bfin_write_CAN1_MB25_DATA0(val) bfin_write16(CAN1_MB25_DATA0, val)
1101#define bfin_read_CAN1_MB25_DATA1() bfin_read16(CAN1_MB25_DATA1)
1102#define bfin_write_CAN1_MB25_DATA1(val) bfin_write16(CAN1_MB25_DATA1, val)
1103#define bfin_read_CAN1_MB25_DATA2() bfin_read16(CAN1_MB25_DATA2)
1104#define bfin_write_CAN1_MB25_DATA2(val) bfin_write16(CAN1_MB25_DATA2, val)
1105#define bfin_read_CAN1_MB25_DATA3() bfin_read16(CAN1_MB25_DATA3)
1106#define bfin_write_CAN1_MB25_DATA3(val) bfin_write16(CAN1_MB25_DATA3, val)
1107#define bfin_read_CAN1_MB25_LENGTH() bfin_read16(CAN1_MB25_LENGTH)
1108#define bfin_write_CAN1_MB25_LENGTH(val) bfin_write16(CAN1_MB25_LENGTH, val)
1109#define bfin_read_CAN1_MB25_TIMESTAMP() bfin_read16(CAN1_MB25_TIMESTAMP)
1110#define bfin_write_CAN1_MB25_TIMESTAMP(val) bfin_write16(CAN1_MB25_TIMESTAMP, val)
1111#define bfin_read_CAN1_MB25_ID0() bfin_read16(CAN1_MB25_ID0)
1112#define bfin_write_CAN1_MB25_ID0(val) bfin_write16(CAN1_MB25_ID0, val)
1113#define bfin_read_CAN1_MB25_ID1() bfin_read16(CAN1_MB25_ID1)
1114#define bfin_write_CAN1_MB25_ID1(val) bfin_write16(CAN1_MB25_ID1, val)
1115#define bfin_read_CAN1_MB26_DATA0() bfin_read16(CAN1_MB26_DATA0)
1116#define bfin_write_CAN1_MB26_DATA0(val) bfin_write16(CAN1_MB26_DATA0, val)
1117#define bfin_read_CAN1_MB26_DATA1() bfin_read16(CAN1_MB26_DATA1)
1118#define bfin_write_CAN1_MB26_DATA1(val) bfin_write16(CAN1_MB26_DATA1, val)
1119#define bfin_read_CAN1_MB26_DATA2() bfin_read16(CAN1_MB26_DATA2)
1120#define bfin_write_CAN1_MB26_DATA2(val) bfin_write16(CAN1_MB26_DATA2, val)
1121#define bfin_read_CAN1_MB26_DATA3() bfin_read16(CAN1_MB26_DATA3)
1122#define bfin_write_CAN1_MB26_DATA3(val) bfin_write16(CAN1_MB26_DATA3, val)
1123#define bfin_read_CAN1_MB26_LENGTH() bfin_read16(CAN1_MB26_LENGTH)
1124#define bfin_write_CAN1_MB26_LENGTH(val) bfin_write16(CAN1_MB26_LENGTH, val)
1125#define bfin_read_CAN1_MB26_TIMESTAMP() bfin_read16(CAN1_MB26_TIMESTAMP)
1126#define bfin_write_CAN1_MB26_TIMESTAMP(val) bfin_write16(CAN1_MB26_TIMESTAMP, val)
1127#define bfin_read_CAN1_MB26_ID0() bfin_read16(CAN1_MB26_ID0)
1128#define bfin_write_CAN1_MB26_ID0(val) bfin_write16(CAN1_MB26_ID0, val)
1129#define bfin_read_CAN1_MB26_ID1() bfin_read16(CAN1_MB26_ID1)
1130#define bfin_write_CAN1_MB26_ID1(val) bfin_write16(CAN1_MB26_ID1, val)
1131#define bfin_read_CAN1_MB27_DATA0() bfin_read16(CAN1_MB27_DATA0)
1132#define bfin_write_CAN1_MB27_DATA0(val) bfin_write16(CAN1_MB27_DATA0, val)
1133#define bfin_read_CAN1_MB27_DATA1() bfin_read16(CAN1_MB27_DATA1)
1134#define bfin_write_CAN1_MB27_DATA1(val) bfin_write16(CAN1_MB27_DATA1, val)
1135#define bfin_read_CAN1_MB27_DATA2() bfin_read16(CAN1_MB27_DATA2)
1136#define bfin_write_CAN1_MB27_DATA2(val) bfin_write16(CAN1_MB27_DATA2, val)
1137#define bfin_read_CAN1_MB27_DATA3() bfin_read16(CAN1_MB27_DATA3)
1138#define bfin_write_CAN1_MB27_DATA3(val) bfin_write16(CAN1_MB27_DATA3, val)
1139#define bfin_read_CAN1_MB27_LENGTH() bfin_read16(CAN1_MB27_LENGTH)
1140#define bfin_write_CAN1_MB27_LENGTH(val) bfin_write16(CAN1_MB27_LENGTH, val)
1141#define bfin_read_CAN1_MB27_TIMESTAMP() bfin_read16(CAN1_MB27_TIMESTAMP)
1142#define bfin_write_CAN1_MB27_TIMESTAMP(val) bfin_write16(CAN1_MB27_TIMESTAMP, val)
1143#define bfin_read_CAN1_MB27_ID0() bfin_read16(CAN1_MB27_ID0)
1144#define bfin_write_CAN1_MB27_ID0(val) bfin_write16(CAN1_MB27_ID0, val)
1145#define bfin_read_CAN1_MB27_ID1() bfin_read16(CAN1_MB27_ID1)
1146#define bfin_write_CAN1_MB27_ID1(val) bfin_write16(CAN1_MB27_ID1, val)
1147#define bfin_read_CAN1_MB28_DATA0() bfin_read16(CAN1_MB28_DATA0)
1148#define bfin_write_CAN1_MB28_DATA0(val) bfin_write16(CAN1_MB28_DATA0, val)
1149#define bfin_read_CAN1_MB28_DATA1() bfin_read16(CAN1_MB28_DATA1)
1150#define bfin_write_CAN1_MB28_DATA1(val) bfin_write16(CAN1_MB28_DATA1, val)
1151#define bfin_read_CAN1_MB28_DATA2() bfin_read16(CAN1_MB28_DATA2)
1152#define bfin_write_CAN1_MB28_DATA2(val) bfin_write16(CAN1_MB28_DATA2, val)
1153#define bfin_read_CAN1_MB28_DATA3() bfin_read16(CAN1_MB28_DATA3)
1154#define bfin_write_CAN1_MB28_DATA3(val) bfin_write16(CAN1_MB28_DATA3, val)
1155#define bfin_read_CAN1_MB28_LENGTH() bfin_read16(CAN1_MB28_LENGTH)
1156#define bfin_write_CAN1_MB28_LENGTH(val) bfin_write16(CAN1_MB28_LENGTH, val)
1157#define bfin_read_CAN1_MB28_TIMESTAMP() bfin_read16(CAN1_MB28_TIMESTAMP)
1158#define bfin_write_CAN1_MB28_TIMESTAMP(val) bfin_write16(CAN1_MB28_TIMESTAMP, val)
1159#define bfin_read_CAN1_MB28_ID0() bfin_read16(CAN1_MB28_ID0)
1160#define bfin_write_CAN1_MB28_ID0(val) bfin_write16(CAN1_MB28_ID0, val)
1161#define bfin_read_CAN1_MB28_ID1() bfin_read16(CAN1_MB28_ID1)
1162#define bfin_write_CAN1_MB28_ID1(val) bfin_write16(CAN1_MB28_ID1, val)
1163#define bfin_read_CAN1_MB29_DATA0() bfin_read16(CAN1_MB29_DATA0)
1164#define bfin_write_CAN1_MB29_DATA0(val) bfin_write16(CAN1_MB29_DATA0, val)
1165#define bfin_read_CAN1_MB29_DATA1() bfin_read16(CAN1_MB29_DATA1)
1166#define bfin_write_CAN1_MB29_DATA1(val) bfin_write16(CAN1_MB29_DATA1, val)
1167#define bfin_read_CAN1_MB29_DATA2() bfin_read16(CAN1_MB29_DATA2)
1168#define bfin_write_CAN1_MB29_DATA2(val) bfin_write16(CAN1_MB29_DATA2, val)
1169#define bfin_read_CAN1_MB29_DATA3() bfin_read16(CAN1_MB29_DATA3)
1170#define bfin_write_CAN1_MB29_DATA3(val) bfin_write16(CAN1_MB29_DATA3, val)
1171#define bfin_read_CAN1_MB29_LENGTH() bfin_read16(CAN1_MB29_LENGTH)
1172#define bfin_write_CAN1_MB29_LENGTH(val) bfin_write16(CAN1_MB29_LENGTH, val)
1173#define bfin_read_CAN1_MB29_TIMESTAMP() bfin_read16(CAN1_MB29_TIMESTAMP)
1174#define bfin_write_CAN1_MB29_TIMESTAMP(val) bfin_write16(CAN1_MB29_TIMESTAMP, val)
1175#define bfin_read_CAN1_MB29_ID0() bfin_read16(CAN1_MB29_ID0)
1176#define bfin_write_CAN1_MB29_ID0(val) bfin_write16(CAN1_MB29_ID0, val)
1177#define bfin_read_CAN1_MB29_ID1() bfin_read16(CAN1_MB29_ID1)
1178#define bfin_write_CAN1_MB29_ID1(val) bfin_write16(CAN1_MB29_ID1, val)
1179#define bfin_read_CAN1_MB30_DATA0() bfin_read16(CAN1_MB30_DATA0)
1180#define bfin_write_CAN1_MB30_DATA0(val) bfin_write16(CAN1_MB30_DATA0, val)
1181#define bfin_read_CAN1_MB30_DATA1() bfin_read16(CAN1_MB30_DATA1)
1182#define bfin_write_CAN1_MB30_DATA1(val) bfin_write16(CAN1_MB30_DATA1, val)
1183#define bfin_read_CAN1_MB30_DATA2() bfin_read16(CAN1_MB30_DATA2)
1184#define bfin_write_CAN1_MB30_DATA2(val) bfin_write16(CAN1_MB30_DATA2, val)
1185#define bfin_read_CAN1_MB30_DATA3() bfin_read16(CAN1_MB30_DATA3)
1186#define bfin_write_CAN1_MB30_DATA3(val) bfin_write16(CAN1_MB30_DATA3, val)
1187#define bfin_read_CAN1_MB30_LENGTH() bfin_read16(CAN1_MB30_LENGTH)
1188#define bfin_write_CAN1_MB30_LENGTH(val) bfin_write16(CAN1_MB30_LENGTH, val)
1189#define bfin_read_CAN1_MB30_TIMESTAMP() bfin_read16(CAN1_MB30_TIMESTAMP)
1190#define bfin_write_CAN1_MB30_TIMESTAMP(val) bfin_write16(CAN1_MB30_TIMESTAMP, val)
1191#define bfin_read_CAN1_MB30_ID0() bfin_read16(CAN1_MB30_ID0)
1192#define bfin_write_CAN1_MB30_ID0(val) bfin_write16(CAN1_MB30_ID0, val)
1193#define bfin_read_CAN1_MB30_ID1() bfin_read16(CAN1_MB30_ID1)
1194#define bfin_write_CAN1_MB30_ID1(val) bfin_write16(CAN1_MB30_ID1, val)
1195#define bfin_read_CAN1_MB31_DATA0() bfin_read16(CAN1_MB31_DATA0)
1196#define bfin_write_CAN1_MB31_DATA0(val) bfin_write16(CAN1_MB31_DATA0, val)
1197#define bfin_read_CAN1_MB31_DATA1() bfin_read16(CAN1_MB31_DATA1)
1198#define bfin_write_CAN1_MB31_DATA1(val) bfin_write16(CAN1_MB31_DATA1, val)
1199#define bfin_read_CAN1_MB31_DATA2() bfin_read16(CAN1_MB31_DATA2)
1200#define bfin_write_CAN1_MB31_DATA2(val) bfin_write16(CAN1_MB31_DATA2, val)
1201#define bfin_read_CAN1_MB31_DATA3() bfin_read16(CAN1_MB31_DATA3)
1202#define bfin_write_CAN1_MB31_DATA3(val) bfin_write16(CAN1_MB31_DATA3, val)
1203#define bfin_read_CAN1_MB31_LENGTH() bfin_read16(CAN1_MB31_LENGTH)
1204#define bfin_write_CAN1_MB31_LENGTH(val) bfin_write16(CAN1_MB31_LENGTH, val)
1205#define bfin_read_CAN1_MB31_TIMESTAMP() bfin_read16(CAN1_MB31_TIMESTAMP)
1206#define bfin_write_CAN1_MB31_TIMESTAMP(val) bfin_write16(CAN1_MB31_TIMESTAMP, val)
1207#define bfin_read_CAN1_MB31_ID0() bfin_read16(CAN1_MB31_ID0)
1208#define bfin_write_CAN1_MB31_ID0(val) bfin_write16(CAN1_MB31_ID0, val)
1209#define bfin_read_CAN1_MB31_ID1() bfin_read16(CAN1_MB31_ID1)
1210#define bfin_write_CAN1_MB31_ID1(val) bfin_write16(CAN1_MB31_ID1, val)
1211
1212/* ATAPI Registers */
1213
1214#define bfin_read_ATAPI_CONTROL() bfin_read16(ATAPI_CONTROL)
1215#define bfin_write_ATAPI_CONTROL(val) bfin_write16(ATAPI_CONTROL, val)
1216#define bfin_read_ATAPI_STATUS() bfin_read16(ATAPI_STATUS)
1217#define bfin_write_ATAPI_STATUS(val) bfin_write16(ATAPI_STATUS, val)
1218#define bfin_read_ATAPI_DEV_ADDR() bfin_read16(ATAPI_DEV_ADDR)
1219#define bfin_write_ATAPI_DEV_ADDR(val) bfin_write16(ATAPI_DEV_ADDR, val)
1220#define bfin_read_ATAPI_DEV_TXBUF() bfin_read16(ATAPI_DEV_TXBUF)
1221#define bfin_write_ATAPI_DEV_TXBUF(val) bfin_write16(ATAPI_DEV_TXBUF, val)
1222#define bfin_read_ATAPI_DEV_RXBUF() bfin_read16(ATAPI_DEV_RXBUF)
1223#define bfin_write_ATAPI_DEV_RXBUF(val) bfin_write16(ATAPI_DEV_RXBUF, val)
1224#define bfin_read_ATAPI_INT_MASK() bfin_read16(ATAPI_INT_MASK)
1225#define bfin_write_ATAPI_INT_MASK(val) bfin_write16(ATAPI_INT_MASK, val)
1226#define bfin_read_ATAPI_INT_STATUS() bfin_read16(ATAPI_INT_STATUS)
1227#define bfin_write_ATAPI_INT_STATUS(val) bfin_write16(ATAPI_INT_STATUS, val)
1228#define bfin_read_ATAPI_XFER_LEN() bfin_read16(ATAPI_XFER_LEN)
1229#define bfin_write_ATAPI_XFER_LEN(val) bfin_write16(ATAPI_XFER_LEN, val)
1230#define bfin_read_ATAPI_LINE_STATUS() bfin_read16(ATAPI_LINE_STATUS)
1231#define bfin_write_ATAPI_LINE_STATUS(val) bfin_write16(ATAPI_LINE_STATUS, val)
1232#define bfin_read_ATAPI_SM_STATE() bfin_read16(ATAPI_SM_STATE)
1233#define bfin_write_ATAPI_SM_STATE(val) bfin_write16(ATAPI_SM_STATE, val)
1234#define bfin_read_ATAPI_TERMINATE() bfin_read16(ATAPI_TERMINATE)
1235#define bfin_write_ATAPI_TERMINATE(val) bfin_write16(ATAPI_TERMINATE, val)
1236#define bfin_read_ATAPI_PIO_TFRCNT() bfin_read16(ATAPI_PIO_TFRCNT)
1237#define bfin_write_ATAPI_PIO_TFRCNT(val) bfin_write16(ATAPI_PIO_TFRCNT, val)
1238#define bfin_read_ATAPI_DMA_TFRCNT() bfin_read16(ATAPI_DMA_TFRCNT)
1239#define bfin_write_ATAPI_DMA_TFRCNT(val) bfin_write16(ATAPI_DMA_TFRCNT, val)
1240#define bfin_read_ATAPI_UMAIN_TFRCNT() bfin_read16(ATAPI_UMAIN_TFRCNT)
1241#define bfin_write_ATAPI_UMAIN_TFRCNT(val) bfin_write16(ATAPI_UMAIN_TFRCNT, val)
1242#define bfin_read_ATAPI_UDMAOUT_TFRCNT() bfin_read16(ATAPI_UDMAOUT_TFRCNT)
1243#define bfin_write_ATAPI_UDMAOUT_TFRCNT(val) bfin_write16(ATAPI_UDMAOUT_TFRCNT, val)
1244#define bfin_read_ATAPI_REG_TIM_0() bfin_read16(ATAPI_REG_TIM_0)
1245#define bfin_write_ATAPI_REG_TIM_0(val) bfin_write16(ATAPI_REG_TIM_0, val)
1246#define bfin_read_ATAPI_PIO_TIM_0() bfin_read16(ATAPI_PIO_TIM_0)
1247#define bfin_write_ATAPI_PIO_TIM_0(val) bfin_write16(ATAPI_PIO_TIM_0, val)
1248#define bfin_read_ATAPI_PIO_TIM_1() bfin_read16(ATAPI_PIO_TIM_1)
1249#define bfin_write_ATAPI_PIO_TIM_1(val) bfin_write16(ATAPI_PIO_TIM_1, val)
1250#define bfin_read_ATAPI_MULTI_TIM_0() bfin_read16(ATAPI_MULTI_TIM_0)
1251#define bfin_write_ATAPI_MULTI_TIM_0(val) bfin_write16(ATAPI_MULTI_TIM_0, val)
1252#define bfin_read_ATAPI_MULTI_TIM_1() bfin_read16(ATAPI_MULTI_TIM_1)
1253#define bfin_write_ATAPI_MULTI_TIM_1(val) bfin_write16(ATAPI_MULTI_TIM_1, val)
1254#define bfin_read_ATAPI_MULTI_TIM_2() bfin_read16(ATAPI_MULTI_TIM_2)
1255#define bfin_write_ATAPI_MULTI_TIM_2(val) bfin_write16(ATAPI_MULTI_TIM_2, val)
1256#define bfin_read_ATAPI_ULTRA_TIM_0() bfin_read16(ATAPI_ULTRA_TIM_0)
1257#define bfin_write_ATAPI_ULTRA_TIM_0(val) bfin_write16(ATAPI_ULTRA_TIM_0, val)
1258#define bfin_read_ATAPI_ULTRA_TIM_1() bfin_read16(ATAPI_ULTRA_TIM_1)
1259#define bfin_write_ATAPI_ULTRA_TIM_1(val) bfin_write16(ATAPI_ULTRA_TIM_1, val)
1260#define bfin_read_ATAPI_ULTRA_TIM_2() bfin_read16(ATAPI_ULTRA_TIM_2)
1261#define bfin_write_ATAPI_ULTRA_TIM_2(val) bfin_write16(ATAPI_ULTRA_TIM_2, val)
1262#define bfin_read_ATAPI_ULTRA_TIM_3() bfin_read16(ATAPI_ULTRA_TIM_3)
1263#define bfin_write_ATAPI_ULTRA_TIM_3(val) bfin_write16(ATAPI_ULTRA_TIM_3, val)
1264
1265/* SDH Registers */
1266
1267#define bfin_read_SDH_PWR_CTL() bfin_read16(SDH_PWR_CTL)
1268#define bfin_write_SDH_PWR_CTL(val) bfin_write16(SDH_PWR_CTL, val)
1269#define bfin_read_SDH_CLK_CTL() bfin_read16(SDH_CLK_CTL)
1270#define bfin_write_SDH_CLK_CTL(val) bfin_write16(SDH_CLK_CTL, val)
1271#define bfin_read_SDH_ARGUMENT() bfin_read32(SDH_ARGUMENT)
1272#define bfin_write_SDH_ARGUMENT(val) bfin_write32(SDH_ARGUMENT, val)
1273#define bfin_read_SDH_COMMAND() bfin_read16(SDH_COMMAND)
1274#define bfin_write_SDH_COMMAND(val) bfin_write16(SDH_COMMAND, val)
1275#define bfin_read_SDH_RESP_CMD() bfin_read16(SDH_RESP_CMD)
1276#define bfin_write_SDH_RESP_CMD(val) bfin_write16(SDH_RESP_CMD, val)
1277#define bfin_read_SDH_RESPONSE0() bfin_read32(SDH_RESPONSE0)
1278#define bfin_write_SDH_RESPONSE0(val) bfin_write32(SDH_RESPONSE0, val)
1279#define bfin_read_SDH_RESPONSE1() bfin_read32(SDH_RESPONSE1)
1280#define bfin_write_SDH_RESPONSE1(val) bfin_write32(SDH_RESPONSE1, val)
1281#define bfin_read_SDH_RESPONSE2() bfin_read32(SDH_RESPONSE2)
1282#define bfin_write_SDH_RESPONSE2(val) bfin_write32(SDH_RESPONSE2, val)
1283#define bfin_read_SDH_RESPONSE3() bfin_read32(SDH_RESPONSE3)
1284#define bfin_write_SDH_RESPONSE3(val) bfin_write32(SDH_RESPONSE3, val)
1285#define bfin_read_SDH_DATA_TIMER() bfin_read32(SDH_DATA_TIMER)
1286#define bfin_write_SDH_DATA_TIMER(val) bfin_write32(SDH_DATA_TIMER, val)
1287#define bfin_read_SDH_DATA_LGTH() bfin_read16(SDH_DATA_LGTH)
1288#define bfin_write_SDH_DATA_LGTH(val) bfin_write16(SDH_DATA_LGTH, val)
1289#define bfin_read_SDH_DATA_CTL() bfin_read16(SDH_DATA_CTL)
1290#define bfin_write_SDH_DATA_CTL(val) bfin_write16(SDH_DATA_CTL, val)
1291#define bfin_read_SDH_DATA_CNT() bfin_read16(SDH_DATA_CNT)
1292#define bfin_write_SDH_DATA_CNT(val) bfin_write16(SDH_DATA_CNT, val)
1293#define bfin_read_SDH_STATUS() bfin_read32(SDH_STATUS)
1294#define bfin_write_SDH_STATUS(val) bfin_write32(SDH_STATUS, val)
1295#define bfin_read_SDH_STATUS_CLR() bfin_read16(SDH_STATUS_CLR)
1296#define bfin_write_SDH_STATUS_CLR(val) bfin_write16(SDH_STATUS_CLR, val)
1297#define bfin_read_SDH_MASK0() bfin_read32(SDH_MASK0)
1298#define bfin_write_SDH_MASK0(val) bfin_write32(SDH_MASK0, val)
1299#define bfin_read_SDH_MASK1() bfin_read32(SDH_MASK1)
1300#define bfin_write_SDH_MASK1(val) bfin_write32(SDH_MASK1, val)
1301#define bfin_read_SDH_FIFO_CNT() bfin_read16(SDH_FIFO_CNT)
1302#define bfin_write_SDH_FIFO_CNT(val) bfin_write16(SDH_FIFO_CNT, val)
1303#define bfin_read_SDH_FIFO() bfin_read32(SDH_FIFO)
1304#define bfin_write_SDH_FIFO(val) bfin_write32(SDH_FIFO, val)
1305#define bfin_read_SDH_E_STATUS() bfin_read16(SDH_E_STATUS)
1306#define bfin_write_SDH_E_STATUS(val) bfin_write16(SDH_E_STATUS, val)
1307#define bfin_read_SDH_E_MASK() bfin_read16(SDH_E_MASK)
1308#define bfin_write_SDH_E_MASK(val) bfin_write16(SDH_E_MASK, val)
1309#define bfin_read_SDH_CFG() bfin_read16(SDH_CFG)
1310#define bfin_write_SDH_CFG(val) bfin_write16(SDH_CFG, val)
1311#define bfin_read_SDH_RD_WAIT_EN() bfin_read16(SDH_RD_WAIT_EN)
1312#define bfin_write_SDH_RD_WAIT_EN(val) bfin_write16(SDH_RD_WAIT_EN, val)
1313#define bfin_read_SDH_PID0() bfin_read16(SDH_PID0)
1314#define bfin_write_SDH_PID0(val) bfin_write16(SDH_PID0, val)
1315#define bfin_read_SDH_PID1() bfin_read16(SDH_PID1)
1316#define bfin_write_SDH_PID1(val) bfin_write16(SDH_PID1, val)
1317#define bfin_read_SDH_PID2() bfin_read16(SDH_PID2)
1318#define bfin_write_SDH_PID2(val) bfin_write16(SDH_PID2, val)
1319#define bfin_read_SDH_PID3() bfin_read16(SDH_PID3)
1320#define bfin_write_SDH_PID3(val) bfin_write16(SDH_PID3, val)
1321#define bfin_read_SDH_PID4() bfin_read16(SDH_PID4)
1322#define bfin_write_SDH_PID4(val) bfin_write16(SDH_PID4, val)
1323#define bfin_read_SDH_PID5() bfin_read16(SDH_PID5)
1324#define bfin_write_SDH_PID5(val) bfin_write16(SDH_PID5, val)
1325#define bfin_read_SDH_PID6() bfin_read16(SDH_PID6)
1326#define bfin_write_SDH_PID6(val) bfin_write16(SDH_PID6, val)
1327#define bfin_read_SDH_PID7() bfin_read16(SDH_PID7)
1328#define bfin_write_SDH_PID7(val) bfin_write16(SDH_PID7, val)
1329
1330/* HOST Port Registers */
1331
1332#define bfin_read_HOST_CONTROL() bfin_read16(HOST_CONTROL)
1333#define bfin_write_HOST_CONTROL(val) bfin_write16(HOST_CONTROL, val)
1334#define bfin_read_HOST_STATUS() bfin_read16(HOST_STATUS)
1335#define bfin_write_HOST_STATUS(val) bfin_write16(HOST_STATUS, val)
1336#define bfin_read_HOST_TIMEOUT() bfin_read16(HOST_TIMEOUT)
1337#define bfin_write_HOST_TIMEOUT(val) bfin_write16(HOST_TIMEOUT, val)
1338
1339/* USB Control Registers */
1340
1341#define bfin_read_USB_FADDR() bfin_read16(USB_FADDR)
1342#define bfin_write_USB_FADDR(val) bfin_write16(USB_FADDR, val)
1343#define bfin_read_USB_POWER() bfin_read16(USB_POWER)
1344#define bfin_write_USB_POWER(val) bfin_write16(USB_POWER, val)
1345#define bfin_read_USB_INTRTX() bfin_read16(USB_INTRTX)
1346#define bfin_write_USB_INTRTX(val) bfin_write16(USB_INTRTX, val)
1347#define bfin_read_USB_INTRRX() bfin_read16(USB_INTRRX)
1348#define bfin_write_USB_INTRRX(val) bfin_write16(USB_INTRRX, val)
1349#define bfin_read_USB_INTRTXE() bfin_read16(USB_INTRTXE)
1350#define bfin_write_USB_INTRTXE(val) bfin_write16(USB_INTRTXE, val)
1351#define bfin_read_USB_INTRRXE() bfin_read16(USB_INTRRXE)
1352#define bfin_write_USB_INTRRXE(val) bfin_write16(USB_INTRRXE, val)
1353#define bfin_read_USB_INTRUSB() bfin_read16(USB_INTRUSB)
1354#define bfin_write_USB_INTRUSB(val) bfin_write16(USB_INTRUSB, val)
1355#define bfin_read_USB_INTRUSBE() bfin_read16(USB_INTRUSBE)
1356#define bfin_write_USB_INTRUSBE(val) bfin_write16(USB_INTRUSBE, val)
1357#define bfin_read_USB_FRAME() bfin_read16(USB_FRAME)
1358#define bfin_write_USB_FRAME(val) bfin_write16(USB_FRAME, val)
1359#define bfin_read_USB_INDEX() bfin_read16(USB_INDEX)
1360#define bfin_write_USB_INDEX(val) bfin_write16(USB_INDEX, val)
1361#define bfin_read_USB_TESTMODE() bfin_read16(USB_TESTMODE)
1362#define bfin_write_USB_TESTMODE(val) bfin_write16(USB_TESTMODE, val)
1363#define bfin_read_USB_GLOBINTR() bfin_read16(USB_GLOBINTR)
1364#define bfin_write_USB_GLOBINTR(val) bfin_write16(USB_GLOBINTR, val)
1365#define bfin_read_USB_GLOBAL_CTL() bfin_read16(USB_GLOBAL_CTL)
1366#define bfin_write_USB_GLOBAL_CTL(val) bfin_write16(USB_GLOBAL_CTL, val)
1367
1368/* USB Packet Control Registers */
1369
1370#define bfin_read_USB_TX_MAX_PACKET() bfin_read16(USB_TX_MAX_PACKET)
1371#define bfin_write_USB_TX_MAX_PACKET(val) bfin_write16(USB_TX_MAX_PACKET, val)
1372#define bfin_read_USB_CSR0() bfin_read16(USB_CSR0)
1373#define bfin_write_USB_CSR0(val) bfin_write16(USB_CSR0, val)
1374#define bfin_read_USB_TXCSR() bfin_read16(USB_TXCSR)
1375#define bfin_write_USB_TXCSR(val) bfin_write16(USB_TXCSR, val)
1376#define bfin_read_USB_RX_MAX_PACKET() bfin_read16(USB_RX_MAX_PACKET)
1377#define bfin_write_USB_RX_MAX_PACKET(val) bfin_write16(USB_RX_MAX_PACKET, val)
1378#define bfin_read_USB_RXCSR() bfin_read16(USB_RXCSR)
1379#define bfin_write_USB_RXCSR(val) bfin_write16(USB_RXCSR, val)
1380#define bfin_read_USB_COUNT0() bfin_read16(USB_COUNT0)
1381#define bfin_write_USB_COUNT0(val) bfin_write16(USB_COUNT0, val)
1382#define bfin_read_USB_RXCOUNT() bfin_read16(USB_RXCOUNT)
1383#define bfin_write_USB_RXCOUNT(val) bfin_write16(USB_RXCOUNT, val)
1384#define bfin_read_USB_TXTYPE() bfin_read16(USB_TXTYPE)
1385#define bfin_write_USB_TXTYPE(val) bfin_write16(USB_TXTYPE, val)
1386#define bfin_read_USB_NAKLIMIT0() bfin_read16(USB_NAKLIMIT0)
1387#define bfin_write_USB_NAKLIMIT0(val) bfin_write16(USB_NAKLIMIT0, val)
1388#define bfin_read_USB_TXINTERVAL() bfin_read16(USB_TXINTERVAL)
1389#define bfin_write_USB_TXINTERVAL(val) bfin_write16(USB_TXINTERVAL, val)
1390#define bfin_read_USB_RXTYPE() bfin_read16(USB_RXTYPE)
1391#define bfin_write_USB_RXTYPE(val) bfin_write16(USB_RXTYPE, val)
1392#define bfin_read_USB_RXINTERVAL() bfin_read16(USB_RXINTERVAL)
1393#define bfin_write_USB_RXINTERVAL(val) bfin_write16(USB_RXINTERVAL, val)
1394#define bfin_read_USB_TXCOUNT() bfin_read16(USB_TXCOUNT)
1395#define bfin_write_USB_TXCOUNT(val) bfin_write16(USB_TXCOUNT, val)
1396
1397/* USB Endbfin_read_()oint FIFO Registers */
1398
1399#define bfin_read_USB_EP0_FIFO() bfin_read16(USB_EP0_FIFO)
1400#define bfin_write_USB_EP0_FIFO(val) bfin_write16(USB_EP0_FIFO, val)
1401#define bfin_read_USB_EP1_FIFO() bfin_read16(USB_EP1_FIFO)
1402#define bfin_write_USB_EP1_FIFO(val) bfin_write16(USB_EP1_FIFO, val)
1403#define bfin_read_USB_EP2_FIFO() bfin_read16(USB_EP2_FIFO)
1404#define bfin_write_USB_EP2_FIFO(val) bfin_write16(USB_EP2_FIFO, val)
1405#define bfin_read_USB_EP3_FIFO() bfin_read16(USB_EP3_FIFO)
1406#define bfin_write_USB_EP3_FIFO(val) bfin_write16(USB_EP3_FIFO, val)
1407#define bfin_read_USB_EP4_FIFO() bfin_read16(USB_EP4_FIFO)
1408#define bfin_write_USB_EP4_FIFO(val) bfin_write16(USB_EP4_FIFO, val)
1409#define bfin_read_USB_EP5_FIFO() bfin_read16(USB_EP5_FIFO)
1410#define bfin_write_USB_EP5_FIFO(val) bfin_write16(USB_EP5_FIFO, val)
1411#define bfin_read_USB_EP6_FIFO() bfin_read16(USB_EP6_FIFO)
1412#define bfin_write_USB_EP6_FIFO(val) bfin_write16(USB_EP6_FIFO, val)
1413#define bfin_read_USB_EP7_FIFO() bfin_read16(USB_EP7_FIFO)
1414#define bfin_write_USB_EP7_FIFO(val) bfin_write16(USB_EP7_FIFO, val)
1415
1416/* USB OTG Control Registers */
1417
1418#define bfin_read_USB_OTG_DEV_CTL() bfin_read16(USB_OTG_DEV_CTL)
1419#define bfin_write_USB_OTG_DEV_CTL(val) bfin_write16(USB_OTG_DEV_CTL, val)
1420#define bfin_read_USB_OTG_VBUS_IRQ() bfin_read16(USB_OTG_VBUS_IRQ)
1421#define bfin_write_USB_OTG_VBUS_IRQ(val) bfin_write16(USB_OTG_VBUS_IRQ, val)
1422#define bfin_read_USB_OTG_VBUS_MASK() bfin_read16(USB_OTG_VBUS_MASK)
1423#define bfin_write_USB_OTG_VBUS_MASK(val) bfin_write16(USB_OTG_VBUS_MASK, val)
1424
1425/* USB Phy Control Registers */
1426
1427#define bfin_read_USB_LINKINFO() bfin_read16(USB_LINKINFO)
1428#define bfin_write_USB_LINKINFO(val) bfin_write16(USB_LINKINFO, val)
1429#define bfin_read_USB_VPLEN() bfin_read16(USB_VPLEN)
1430#define bfin_write_USB_VPLEN(val) bfin_write16(USB_VPLEN, val)
1431#define bfin_read_USB_HS_EOF1() bfin_read16(USB_HS_EOF1)
1432#define bfin_write_USB_HS_EOF1(val) bfin_write16(USB_HS_EOF1, val)
1433#define bfin_read_USB_FS_EOF1() bfin_read16(USB_FS_EOF1)
1434#define bfin_write_USB_FS_EOF1(val) bfin_write16(USB_FS_EOF1, val)
1435#define bfin_read_USB_LS_EOF1() bfin_read16(USB_LS_EOF1)
1436#define bfin_write_USB_LS_EOF1(val) bfin_write16(USB_LS_EOF1, val)
1437
1438/* (APHY_CNTRL is for ADI usage only) */
1439
1440#define bfin_read_USB_APHY_CNTRL() bfin_read16(USB_APHY_CNTRL)
1441#define bfin_write_USB_APHY_CNTRL(val) bfin_write16(USB_APHY_CNTRL, val)
1442
1443/* (APHY_CALIB is for ADI usage only) */
1444
1445#define bfin_read_USB_APHY_CALIB() bfin_read16(USB_APHY_CALIB)
1446#define bfin_write_USB_APHY_CALIB(val) bfin_write16(USB_APHY_CALIB, val)
1447#define bfin_read_USB_APHY_CNTRL2() bfin_read16(USB_APHY_CNTRL2)
1448#define bfin_write_USB_APHY_CNTRL2(val) bfin_write16(USB_APHY_CNTRL2, val)
1449
1450/* (PHY_TEST is for ADI usage only) */
1451
1452#define bfin_read_USB_PHY_TEST() bfin_read16(USB_PHY_TEST)
1453#define bfin_write_USB_PHY_TEST(val) bfin_write16(USB_PHY_TEST, val)
1454#define bfin_read_USB_PLLOSC_CTRL() bfin_read16(USB_PLLOSC_CTRL)
1455#define bfin_write_USB_PLLOSC_CTRL(val) bfin_write16(USB_PLLOSC_CTRL, val)
1456#define bfin_read_USB_SRP_CLKDIV() bfin_read16(USB_SRP_CLKDIV)
1457#define bfin_write_USB_SRP_CLKDIV(val) bfin_write16(USB_SRP_CLKDIV, val)
1458
1459/* USB Endbfin_read_()oint 0 Control Registers */
1460
1461#define bfin_read_USB_EP_NI0_TXMAXP() bfin_read16(USB_EP_NI0_TXMAXP)
1462#define bfin_write_USB_EP_NI0_TXMAXP(val) bfin_write16(USB_EP_NI0_TXMAXP, val)
1463#define bfin_read_USB_EP_NI0_TXCSR() bfin_read16(USB_EP_NI0_TXCSR)
1464#define bfin_write_USB_EP_NI0_TXCSR(val) bfin_write16(USB_EP_NI0_TXCSR, val)
1465#define bfin_read_USB_EP_NI0_RXMAXP() bfin_read16(USB_EP_NI0_RXMAXP)
1466#define bfin_write_USB_EP_NI0_RXMAXP(val) bfin_write16(USB_EP_NI0_RXMAXP, val)
1467#define bfin_read_USB_EP_NI0_RXCSR() bfin_read16(USB_EP_NI0_RXCSR)
1468#define bfin_write_USB_EP_NI0_RXCSR(val) bfin_write16(USB_EP_NI0_RXCSR, val)
1469#define bfin_read_USB_EP_NI0_RXCOUNT() bfin_read16(USB_EP_NI0_RXCOUNT)
1470#define bfin_write_USB_EP_NI0_RXCOUNT(val) bfin_write16(USB_EP_NI0_RXCOUNT, val)
1471#define bfin_read_USB_EP_NI0_TXTYPE() bfin_read16(USB_EP_NI0_TXTYPE)
1472#define bfin_write_USB_EP_NI0_TXTYPE(val) bfin_write16(USB_EP_NI0_TXTYPE, val)
1473#define bfin_read_USB_EP_NI0_TXINTERVAL() bfin_read16(USB_EP_NI0_TXINTERVAL)
1474#define bfin_write_USB_EP_NI0_TXINTERVAL(val) bfin_write16(USB_EP_NI0_TXINTERVAL, val)
1475#define bfin_read_USB_EP_NI0_RXTYPE() bfin_read16(USB_EP_NI0_RXTYPE)
1476#define bfin_write_USB_EP_NI0_RXTYPE(val) bfin_write16(USB_EP_NI0_RXTYPE, val)
1477#define bfin_read_USB_EP_NI0_RXINTERVAL() bfin_read16(USB_EP_NI0_RXINTERVAL)
1478#define bfin_write_USB_EP_NI0_RXINTERVAL(val) bfin_write16(USB_EP_NI0_RXINTERVAL, val)
1479
1480/* USB Endbfin_read_()oint 1 Control Registers */
1481
1482#define bfin_read_USB_EP_NI0_TXCOUNT() bfin_read16(USB_EP_NI0_TXCOUNT)
1483#define bfin_write_USB_EP_NI0_TXCOUNT(val) bfin_write16(USB_EP_NI0_TXCOUNT, val)
1484#define bfin_read_USB_EP_NI1_TXMAXP() bfin_read16(USB_EP_NI1_TXMAXP)
1485#define bfin_write_USB_EP_NI1_TXMAXP(val) bfin_write16(USB_EP_NI1_TXMAXP, val)
1486#define bfin_read_USB_EP_NI1_TXCSR() bfin_read16(USB_EP_NI1_TXCSR)
1487#define bfin_write_USB_EP_NI1_TXCSR(val) bfin_write16(USB_EP_NI1_TXCSR, val)
1488#define bfin_read_USB_EP_NI1_RXMAXP() bfin_read16(USB_EP_NI1_RXMAXP)
1489#define bfin_write_USB_EP_NI1_RXMAXP(val) bfin_write16(USB_EP_NI1_RXMAXP, val)
1490#define bfin_read_USB_EP_NI1_RXCSR() bfin_read16(USB_EP_NI1_RXCSR)
1491#define bfin_write_USB_EP_NI1_RXCSR(val) bfin_write16(USB_EP_NI1_RXCSR, val)
1492#define bfin_read_USB_EP_NI1_RXCOUNT() bfin_read16(USB_EP_NI1_RXCOUNT)
1493#define bfin_write_USB_EP_NI1_RXCOUNT(val) bfin_write16(USB_EP_NI1_RXCOUNT, val)
1494#define bfin_read_USB_EP_NI1_TXTYPE() bfin_read16(USB_EP_NI1_TXTYPE)
1495#define bfin_write_USB_EP_NI1_TXTYPE(val) bfin_write16(USB_EP_NI1_TXTYPE, val)
1496#define bfin_read_USB_EP_NI1_TXINTERVAL() bfin_read16(USB_EP_NI1_TXINTERVAL)
1497#define bfin_write_USB_EP_NI1_TXINTERVAL(val) bfin_write16(USB_EP_NI1_TXINTERVAL, val)
1498#define bfin_read_USB_EP_NI1_RXTYPE() bfin_read16(USB_EP_NI1_RXTYPE)
1499#define bfin_write_USB_EP_NI1_RXTYPE(val) bfin_write16(USB_EP_NI1_RXTYPE, val)
1500#define bfin_read_USB_EP_NI1_RXINTERVAL() bfin_read16(USB_EP_NI1_RXINTERVAL)
1501#define bfin_write_USB_EP_NI1_RXINTERVAL(val) bfin_write16(USB_EP_NI1_RXINTERVAL, val)
1502
1503/* USB Endbfin_read_()oint 2 Control Registers */
1504
1505#define bfin_read_USB_EP_NI1_TXCOUNT() bfin_read16(USB_EP_NI1_TXCOUNT)
1506#define bfin_write_USB_EP_NI1_TXCOUNT(val) bfin_write16(USB_EP_NI1_TXCOUNT, val)
1507#define bfin_read_USB_EP_NI2_TXMAXP() bfin_read16(USB_EP_NI2_TXMAXP)
1508#define bfin_write_USB_EP_NI2_TXMAXP(val) bfin_write16(USB_EP_NI2_TXMAXP, val)
1509#define bfin_read_USB_EP_NI2_TXCSR() bfin_read16(USB_EP_NI2_TXCSR)
1510#define bfin_write_USB_EP_NI2_TXCSR(val) bfin_write16(USB_EP_NI2_TXCSR, val)
1511#define bfin_read_USB_EP_NI2_RXMAXP() bfin_read16(USB_EP_NI2_RXMAXP)
1512#define bfin_write_USB_EP_NI2_RXMAXP(val) bfin_write16(USB_EP_NI2_RXMAXP, val)
1513#define bfin_read_USB_EP_NI2_RXCSR() bfin_read16(USB_EP_NI2_RXCSR)
1514#define bfin_write_USB_EP_NI2_RXCSR(val) bfin_write16(USB_EP_NI2_RXCSR, val)
1515#define bfin_read_USB_EP_NI2_RXCOUNT() bfin_read16(USB_EP_NI2_RXCOUNT)
1516#define bfin_write_USB_EP_NI2_RXCOUNT(val) bfin_write16(USB_EP_NI2_RXCOUNT, val)
1517#define bfin_read_USB_EP_NI2_TXTYPE() bfin_read16(USB_EP_NI2_TXTYPE)
1518#define bfin_write_USB_EP_NI2_TXTYPE(val) bfin_write16(USB_EP_NI2_TXTYPE, val)
1519#define bfin_read_USB_EP_NI2_TXINTERVAL() bfin_read16(USB_EP_NI2_TXINTERVAL)
1520#define bfin_write_USB_EP_NI2_TXINTERVAL(val) bfin_write16(USB_EP_NI2_TXINTERVAL, val)
1521#define bfin_read_USB_EP_NI2_RXTYPE() bfin_read16(USB_EP_NI2_RXTYPE)
1522#define bfin_write_USB_EP_NI2_RXTYPE(val) bfin_write16(USB_EP_NI2_RXTYPE, val)
1523#define bfin_read_USB_EP_NI2_RXINTERVAL() bfin_read16(USB_EP_NI2_RXINTERVAL)
1524#define bfin_write_USB_EP_NI2_RXINTERVAL(val) bfin_write16(USB_EP_NI2_RXINTERVAL, val)
1525
1526/* USB Endbfin_read_()oint 3 Control Registers */
1527
1528#define bfin_read_USB_EP_NI2_TXCOUNT() bfin_read16(USB_EP_NI2_TXCOUNT)
1529#define bfin_write_USB_EP_NI2_TXCOUNT(val) bfin_write16(USB_EP_NI2_TXCOUNT, val)
1530#define bfin_read_USB_EP_NI3_TXMAXP() bfin_read16(USB_EP_NI3_TXMAXP)
1531#define bfin_write_USB_EP_NI3_TXMAXP(val) bfin_write16(USB_EP_NI3_TXMAXP, val)
1532#define bfin_read_USB_EP_NI3_TXCSR() bfin_read16(USB_EP_NI3_TXCSR)
1533#define bfin_write_USB_EP_NI3_TXCSR(val) bfin_write16(USB_EP_NI3_TXCSR, val)
1534#define bfin_read_USB_EP_NI3_RXMAXP() bfin_read16(USB_EP_NI3_RXMAXP)
1535#define bfin_write_USB_EP_NI3_RXMAXP(val) bfin_write16(USB_EP_NI3_RXMAXP, val)
1536#define bfin_read_USB_EP_NI3_RXCSR() bfin_read16(USB_EP_NI3_RXCSR)
1537#define bfin_write_USB_EP_NI3_RXCSR(val) bfin_write16(USB_EP_NI3_RXCSR, val)
1538#define bfin_read_USB_EP_NI3_RXCOUNT() bfin_read16(USB_EP_NI3_RXCOUNT)
1539#define bfin_write_USB_EP_NI3_RXCOUNT(val) bfin_write16(USB_EP_NI3_RXCOUNT, val)
1540#define bfin_read_USB_EP_NI3_TXTYPE() bfin_read16(USB_EP_NI3_TXTYPE)
1541#define bfin_write_USB_EP_NI3_TXTYPE(val) bfin_write16(USB_EP_NI3_TXTYPE, val)
1542#define bfin_read_USB_EP_NI3_TXINTERVAL() bfin_read16(USB_EP_NI3_TXINTERVAL)
1543#define bfin_write_USB_EP_NI3_TXINTERVAL(val) bfin_write16(USB_EP_NI3_TXINTERVAL, val)
1544#define bfin_read_USB_EP_NI3_RXTYPE() bfin_read16(USB_EP_NI3_RXTYPE)
1545#define bfin_write_USB_EP_NI3_RXTYPE(val) bfin_write16(USB_EP_NI3_RXTYPE, val)
1546#define bfin_read_USB_EP_NI3_RXINTERVAL() bfin_read16(USB_EP_NI3_RXINTERVAL)
1547#define bfin_write_USB_EP_NI3_RXINTERVAL(val) bfin_write16(USB_EP_NI3_RXINTERVAL, val)
1548
1549/* USB Endbfin_read_()oint 4 Control Registers */
1550
1551#define bfin_read_USB_EP_NI3_TXCOUNT() bfin_read16(USB_EP_NI3_TXCOUNT)
1552#define bfin_write_USB_EP_NI3_TXCOUNT(val) bfin_write16(USB_EP_NI3_TXCOUNT, val)
1553#define bfin_read_USB_EP_NI4_TXMAXP() bfin_read16(USB_EP_NI4_TXMAXP)
1554#define bfin_write_USB_EP_NI4_TXMAXP(val) bfin_write16(USB_EP_NI4_TXMAXP, val)
1555#define bfin_read_USB_EP_NI4_TXCSR() bfin_read16(USB_EP_NI4_TXCSR)
1556#define bfin_write_USB_EP_NI4_TXCSR(val) bfin_write16(USB_EP_NI4_TXCSR, val)
1557#define bfin_read_USB_EP_NI4_RXMAXP() bfin_read16(USB_EP_NI4_RXMAXP)
1558#define bfin_write_USB_EP_NI4_RXMAXP(val) bfin_write16(USB_EP_NI4_RXMAXP, val)
1559#define bfin_read_USB_EP_NI4_RXCSR() bfin_read16(USB_EP_NI4_RXCSR)
1560#define bfin_write_USB_EP_NI4_RXCSR(val) bfin_write16(USB_EP_NI4_RXCSR, val)
1561#define bfin_read_USB_EP_NI4_RXCOUNT() bfin_read16(USB_EP_NI4_RXCOUNT)
1562#define bfin_write_USB_EP_NI4_RXCOUNT(val) bfin_write16(USB_EP_NI4_RXCOUNT, val)
1563#define bfin_read_USB_EP_NI4_TXTYPE() bfin_read16(USB_EP_NI4_TXTYPE)
1564#define bfin_write_USB_EP_NI4_TXTYPE(val) bfin_write16(USB_EP_NI4_TXTYPE, val)
1565#define bfin_read_USB_EP_NI4_TXINTERVAL() bfin_read16(USB_EP_NI4_TXINTERVAL)
1566#define bfin_write_USB_EP_NI4_TXINTERVAL(val) bfin_write16(USB_EP_NI4_TXINTERVAL, val)
1567#define bfin_read_USB_EP_NI4_RXTYPE() bfin_read16(USB_EP_NI4_RXTYPE)
1568#define bfin_write_USB_EP_NI4_RXTYPE(val) bfin_write16(USB_EP_NI4_RXTYPE, val)
1569#define bfin_read_USB_EP_NI4_RXINTERVAL() bfin_read16(USB_EP_NI4_RXINTERVAL)
1570#define bfin_write_USB_EP_NI4_RXINTERVAL(val) bfin_write16(USB_EP_NI4_RXINTERVAL, val)
1571
1572/* USB Endbfin_read_()oint 5 Control Registers */
1573
1574#define bfin_read_USB_EP_NI4_TXCOUNT() bfin_read16(USB_EP_NI4_TXCOUNT)
1575#define bfin_write_USB_EP_NI4_TXCOUNT(val) bfin_write16(USB_EP_NI4_TXCOUNT, val)
1576#define bfin_read_USB_EP_NI5_TXMAXP() bfin_read16(USB_EP_NI5_TXMAXP)
1577#define bfin_write_USB_EP_NI5_TXMAXP(val) bfin_write16(USB_EP_NI5_TXMAXP, val)
1578#define bfin_read_USB_EP_NI5_TXCSR() bfin_read16(USB_EP_NI5_TXCSR)
1579#define bfin_write_USB_EP_NI5_TXCSR(val) bfin_write16(USB_EP_NI5_TXCSR, val)
1580#define bfin_read_USB_EP_NI5_RXMAXP() bfin_read16(USB_EP_NI5_RXMAXP)
1581#define bfin_write_USB_EP_NI5_RXMAXP(val) bfin_write16(USB_EP_NI5_RXMAXP, val)
1582#define bfin_read_USB_EP_NI5_RXCSR() bfin_read16(USB_EP_NI5_RXCSR)
1583#define bfin_write_USB_EP_NI5_RXCSR(val) bfin_write16(USB_EP_NI5_RXCSR, val)
1584#define bfin_read_USB_EP_NI5_RXCOUNT() bfin_read16(USB_EP_NI5_RXCOUNT)
1585#define bfin_write_USB_EP_NI5_RXCOUNT(val) bfin_write16(USB_EP_NI5_RXCOUNT, val)
1586#define bfin_read_USB_EP_NI5_TXTYPE() bfin_read16(USB_EP_NI5_TXTYPE)
1587#define bfin_write_USB_EP_NI5_TXTYPE(val) bfin_write16(USB_EP_NI5_TXTYPE, val)
1588#define bfin_read_USB_EP_NI5_TXINTERVAL() bfin_read16(USB_EP_NI5_TXINTERVAL)
1589#define bfin_write_USB_EP_NI5_TXINTERVAL(val) bfin_write16(USB_EP_NI5_TXINTERVAL, val)
1590#define bfin_read_USB_EP_NI5_RXTYPE() bfin_read16(USB_EP_NI5_RXTYPE)
1591#define bfin_write_USB_EP_NI5_RXTYPE(val) bfin_write16(USB_EP_NI5_RXTYPE, val)
1592#define bfin_read_USB_EP_NI5_RXINTERVAL() bfin_read16(USB_EP_NI5_RXINTERVAL)
1593#define bfin_write_USB_EP_NI5_RXINTERVAL(val) bfin_write16(USB_EP_NI5_RXINTERVAL, val)
1594
1595/* USB Endbfin_read_()oint 6 Control Registers */
1596
1597#define bfin_read_USB_EP_NI5_TXCOUNT() bfin_read16(USB_EP_NI5_TXCOUNT)
1598#define bfin_write_USB_EP_NI5_TXCOUNT(val) bfin_write16(USB_EP_NI5_TXCOUNT, val)
1599#define bfin_read_USB_EP_NI6_TXMAXP() bfin_read16(USB_EP_NI6_TXMAXP)
1600#define bfin_write_USB_EP_NI6_TXMAXP(val) bfin_write16(USB_EP_NI6_TXMAXP, val)
1601#define bfin_read_USB_EP_NI6_TXCSR() bfin_read16(USB_EP_NI6_TXCSR)
1602#define bfin_write_USB_EP_NI6_TXCSR(val) bfin_write16(USB_EP_NI6_TXCSR, val)
1603#define bfin_read_USB_EP_NI6_RXMAXP() bfin_read16(USB_EP_NI6_RXMAXP)
1604#define bfin_write_USB_EP_NI6_RXMAXP(val) bfin_write16(USB_EP_NI6_RXMAXP, val)
1605#define bfin_read_USB_EP_NI6_RXCSR() bfin_read16(USB_EP_NI6_RXCSR)
1606#define bfin_write_USB_EP_NI6_RXCSR(val) bfin_write16(USB_EP_NI6_RXCSR, val)
1607#define bfin_read_USB_EP_NI6_RXCOUNT() bfin_read16(USB_EP_NI6_RXCOUNT)
1608#define bfin_write_USB_EP_NI6_RXCOUNT(val) bfin_write16(USB_EP_NI6_RXCOUNT, val)
1609#define bfin_read_USB_EP_NI6_TXTYPE() bfin_read16(USB_EP_NI6_TXTYPE)
1610#define bfin_write_USB_EP_NI6_TXTYPE(val) bfin_write16(USB_EP_NI6_TXTYPE, val)
1611#define bfin_read_USB_EP_NI6_TXINTERVAL() bfin_read16(USB_EP_NI6_TXINTERVAL)
1612#define bfin_write_USB_EP_NI6_TXINTERVAL(val) bfin_write16(USB_EP_NI6_TXINTERVAL, val)
1613#define bfin_read_USB_EP_NI6_RXTYPE() bfin_read16(USB_EP_NI6_RXTYPE)
1614#define bfin_write_USB_EP_NI6_RXTYPE(val) bfin_write16(USB_EP_NI6_RXTYPE, val)
1615#define bfin_read_USB_EP_NI6_RXINTERVAL() bfin_read16(USB_EP_NI6_RXINTERVAL)
1616#define bfin_write_USB_EP_NI6_RXINTERVAL(val) bfin_write16(USB_EP_NI6_RXINTERVAL, val)
1617
1618/* USB Endbfin_read_()oint 7 Control Registers */
1619
1620#define bfin_read_USB_EP_NI6_TXCOUNT() bfin_read16(USB_EP_NI6_TXCOUNT)
1621#define bfin_write_USB_EP_NI6_TXCOUNT(val) bfin_write16(USB_EP_NI6_TXCOUNT, val)
1622#define bfin_read_USB_EP_NI7_TXMAXP() bfin_read16(USB_EP_NI7_TXMAXP)
1623#define bfin_write_USB_EP_NI7_TXMAXP(val) bfin_write16(USB_EP_NI7_TXMAXP, val)
1624#define bfin_read_USB_EP_NI7_TXCSR() bfin_read16(USB_EP_NI7_TXCSR)
1625#define bfin_write_USB_EP_NI7_TXCSR(val) bfin_write16(USB_EP_NI7_TXCSR, val)
1626#define bfin_read_USB_EP_NI7_RXMAXP() bfin_read16(USB_EP_NI7_RXMAXP)
1627#define bfin_write_USB_EP_NI7_RXMAXP(val) bfin_write16(USB_EP_NI7_RXMAXP, val)
1628#define bfin_read_USB_EP_NI7_RXCSR() bfin_read16(USB_EP_NI7_RXCSR)
1629#define bfin_write_USB_EP_NI7_RXCSR(val) bfin_write16(USB_EP_NI7_RXCSR, val)
1630#define bfin_read_USB_EP_NI7_RXCOUNT() bfin_read16(USB_EP_NI7_RXCOUNT)
1631#define bfin_write_USB_EP_NI7_RXCOUNT(val) bfin_write16(USB_EP_NI7_RXCOUNT, val)
1632#define bfin_read_USB_EP_NI7_TXTYPE() bfin_read16(USB_EP_NI7_TXTYPE)
1633#define bfin_write_USB_EP_NI7_TXTYPE(val) bfin_write16(USB_EP_NI7_TXTYPE, val)
1634#define bfin_read_USB_EP_NI7_TXINTERVAL() bfin_read16(USB_EP_NI7_TXINTERVAL)
1635#define bfin_write_USB_EP_NI7_TXINTERVAL(val) bfin_write16(USB_EP_NI7_TXINTERVAL, val)
1636#define bfin_read_USB_EP_NI7_RXTYPE() bfin_read16(USB_EP_NI7_RXTYPE)
1637#define bfin_write_USB_EP_NI7_RXTYPE(val) bfin_write16(USB_EP_NI7_RXTYPE, val)
1638#define bfin_read_USB_EP_NI7_RXINTERVAL() bfin_read16(USB_EP_NI7_RXINTERVAL)
1639#define bfin_write_USB_EP_NI7_RXINTERVAL(val) bfin_write16(USB_EP_NI7_RXINTERVAL, val)
1640#define bfin_read_USB_EP_NI7_TXCOUNT() bfin_read16(USB_EP_NI7_TXCOUNT)
1641#define bfin_write_USB_EP_NI7_TXCOUNT(val) bfin_write16(USB_EP_NI7_TXCOUNT, val)
1642#define bfin_read_USB_DMA_INTERRUPT() bfin_read16(USB_DMA_INTERRUPT)
1643#define bfin_write_USB_DMA_INTERRUPT(val) bfin_write16(USB_DMA_INTERRUPT, val)
1644
1645/* USB Channel 0 Config Registers */
1646
1647#define bfin_read_USB_DMA0CONTROL() bfin_read16(USB_DMA0CONTROL)
1648#define bfin_write_USB_DMA0CONTROL(val) bfin_write16(USB_DMA0CONTROL, val)
1649#define bfin_read_USB_DMA0ADDRLOW() bfin_read16(USB_DMA0ADDRLOW)
1650#define bfin_write_USB_DMA0ADDRLOW(val) bfin_write16(USB_DMA0ADDRLOW, val)
1651#define bfin_read_USB_DMA0ADDRHIGH() bfin_read16(USB_DMA0ADDRHIGH)
1652#define bfin_write_USB_DMA0ADDRHIGH(val) bfin_write16(USB_DMA0ADDRHIGH, val)
1653#define bfin_read_USB_DMA0COUNTLOW() bfin_read16(USB_DMA0COUNTLOW)
1654#define bfin_write_USB_DMA0COUNTLOW(val) bfin_write16(USB_DMA0COUNTLOW, val)
1655#define bfin_read_USB_DMA0COUNTHIGH() bfin_read16(USB_DMA0COUNTHIGH)
1656#define bfin_write_USB_DMA0COUNTHIGH(val) bfin_write16(USB_DMA0COUNTHIGH, val)
1657
1658/* USB Channel 1 Config Registers */
1659
1660#define bfin_read_USB_DMA1CONTROL() bfin_read16(USB_DMA1CONTROL)
1661#define bfin_write_USB_DMA1CONTROL(val) bfin_write16(USB_DMA1CONTROL, val)
1662#define bfin_read_USB_DMA1ADDRLOW() bfin_read16(USB_DMA1ADDRLOW)
1663#define bfin_write_USB_DMA1ADDRLOW(val) bfin_write16(USB_DMA1ADDRLOW, val)
1664#define bfin_read_USB_DMA1ADDRHIGH() bfin_read16(USB_DMA1ADDRHIGH)
1665#define bfin_write_USB_DMA1ADDRHIGH(val) bfin_write16(USB_DMA1ADDRHIGH, val)
1666#define bfin_read_USB_DMA1COUNTLOW() bfin_read16(USB_DMA1COUNTLOW)
1667#define bfin_write_USB_DMA1COUNTLOW(val) bfin_write16(USB_DMA1COUNTLOW, val)
1668#define bfin_read_USB_DMA1COUNTHIGH() bfin_read16(USB_DMA1COUNTHIGH)
1669#define bfin_write_USB_DMA1COUNTHIGH(val) bfin_write16(USB_DMA1COUNTHIGH, val)
1670
1671/* USB Channel 2 Config Registers */
1672
1673#define bfin_read_USB_DMA2CONTROL() bfin_read16(USB_DMA2CONTROL)
1674#define bfin_write_USB_DMA2CONTROL(val) bfin_write16(USB_DMA2CONTROL, val)
1675#define bfin_read_USB_DMA2ADDRLOW() bfin_read16(USB_DMA2ADDRLOW)
1676#define bfin_write_USB_DMA2ADDRLOW(val) bfin_write16(USB_DMA2ADDRLOW, val)
1677#define bfin_read_USB_DMA2ADDRHIGH() bfin_read16(USB_DMA2ADDRHIGH)
1678#define bfin_write_USB_DMA2ADDRHIGH(val) bfin_write16(USB_DMA2ADDRHIGH, val)
1679#define bfin_read_USB_DMA2COUNTLOW() bfin_read16(USB_DMA2COUNTLOW)
1680#define bfin_write_USB_DMA2COUNTLOW(val) bfin_write16(USB_DMA2COUNTLOW, val)
1681#define bfin_read_USB_DMA2COUNTHIGH() bfin_read16(USB_DMA2COUNTHIGH)
1682#define bfin_write_USB_DMA2COUNTHIGH(val) bfin_write16(USB_DMA2COUNTHIGH, val)
1683
1684/* USB Channel 3 Config Registers */
1685
1686#define bfin_read_USB_DMA3CONTROL() bfin_read16(USB_DMA3CONTROL)
1687#define bfin_write_USB_DMA3CONTROL(val) bfin_write16(USB_DMA3CONTROL, val)
1688#define bfin_read_USB_DMA3ADDRLOW() bfin_read16(USB_DMA3ADDRLOW)
1689#define bfin_write_USB_DMA3ADDRLOW(val) bfin_write16(USB_DMA3ADDRLOW, val)
1690#define bfin_read_USB_DMA3ADDRHIGH() bfin_read16(USB_DMA3ADDRHIGH)
1691#define bfin_write_USB_DMA3ADDRHIGH(val) bfin_write16(USB_DMA3ADDRHIGH, val)
1692#define bfin_read_USB_DMA3COUNTLOW() bfin_read16(USB_DMA3COUNTLOW)
1693#define bfin_write_USB_DMA3COUNTLOW(val) bfin_write16(USB_DMA3COUNTLOW, val)
1694#define bfin_read_USB_DMA3COUNTHIGH() bfin_read16(USB_DMA3COUNTHIGH)
1695#define bfin_write_USB_DMA3COUNTHIGH(val) bfin_write16(USB_DMA3COUNTHIGH, val)
1696
1697/* USB Channel 4 Config Registers */
1698
1699#define bfin_read_USB_DMA4CONTROL() bfin_read16(USB_DMA4CONTROL)
1700#define bfin_write_USB_DMA4CONTROL(val) bfin_write16(USB_DMA4CONTROL, val)
1701#define bfin_read_USB_DMA4ADDRLOW() bfin_read16(USB_DMA4ADDRLOW)
1702#define bfin_write_USB_DMA4ADDRLOW(val) bfin_write16(USB_DMA4ADDRLOW, val)
1703#define bfin_read_USB_DMA4ADDRHIGH() bfin_read16(USB_DMA4ADDRHIGH)
1704#define bfin_write_USB_DMA4ADDRHIGH(val) bfin_write16(USB_DMA4ADDRHIGH, val)
1705#define bfin_read_USB_DMA4COUNTLOW() bfin_read16(USB_DMA4COUNTLOW)
1706#define bfin_write_USB_DMA4COUNTLOW(val) bfin_write16(USB_DMA4COUNTLOW, val)
1707#define bfin_read_USB_DMA4COUNTHIGH() bfin_read16(USB_DMA4COUNTHIGH)
1708#define bfin_write_USB_DMA4COUNTHIGH(val) bfin_write16(USB_DMA4COUNTHIGH, val)
1709
1710/* USB Channel 5 Config Registers */
1711
1712#define bfin_read_USB_DMA5CONTROL() bfin_read16(USB_DMA5CONTROL)
1713#define bfin_write_USB_DMA5CONTROL(val) bfin_write16(USB_DMA5CONTROL, val)
1714#define bfin_read_USB_DMA5ADDRLOW() bfin_read16(USB_DMA5ADDRLOW)
1715#define bfin_write_USB_DMA5ADDRLOW(val) bfin_write16(USB_DMA5ADDRLOW, val)
1716#define bfin_read_USB_DMA5ADDRHIGH() bfin_read16(USB_DMA5ADDRHIGH)
1717#define bfin_write_USB_DMA5ADDRHIGH(val) bfin_write16(USB_DMA5ADDRHIGH, val)
1718#define bfin_read_USB_DMA5COUNTLOW() bfin_read16(USB_DMA5COUNTLOW)
1719#define bfin_write_USB_DMA5COUNTLOW(val) bfin_write16(USB_DMA5COUNTLOW, val)
1720#define bfin_read_USB_DMA5COUNTHIGH() bfin_read16(USB_DMA5COUNTHIGH)
1721#define bfin_write_USB_DMA5COUNTHIGH(val) bfin_write16(USB_DMA5COUNTHIGH, val)
1722
1723/* USB Channel 6 Config Registers */
1724
1725#define bfin_read_USB_DMA6CONTROL() bfin_read16(USB_DMA6CONTROL)
1726#define bfin_write_USB_DMA6CONTROL(val) bfin_write16(USB_DMA6CONTROL, val)
1727#define bfin_read_USB_DMA6ADDRLOW() bfin_read16(USB_DMA6ADDRLOW)
1728#define bfin_write_USB_DMA6ADDRLOW(val) bfin_write16(USB_DMA6ADDRLOW, val)
1729#define bfin_read_USB_DMA6ADDRHIGH() bfin_read16(USB_DMA6ADDRHIGH)
1730#define bfin_write_USB_DMA6ADDRHIGH(val) bfin_write16(USB_DMA6ADDRHIGH, val)
1731#define bfin_read_USB_DMA6COUNTLOW() bfin_read16(USB_DMA6COUNTLOW)
1732#define bfin_write_USB_DMA6COUNTLOW(val) bfin_write16(USB_DMA6COUNTLOW, val)
1733#define bfin_read_USB_DMA6COUNTHIGH() bfin_read16(USB_DMA6COUNTHIGH)
1734#define bfin_write_USB_DMA6COUNTHIGH(val) bfin_write16(USB_DMA6COUNTHIGH, val)
1735
1736/* USB Channel 7 Config Registers */
1737
1738#define bfin_read_USB_DMA7CONTROL() bfin_read16(USB_DMA7CONTROL)
1739#define bfin_write_USB_DMA7CONTROL(val) bfin_write16(USB_DMA7CONTROL, val)
1740#define bfin_read_USB_DMA7ADDRLOW() bfin_read16(USB_DMA7ADDRLOW)
1741#define bfin_write_USB_DMA7ADDRLOW(val) bfin_write16(USB_DMA7ADDRLOW, val)
1742#define bfin_read_USB_DMA7ADDRHIGH() bfin_read16(USB_DMA7ADDRHIGH)
1743#define bfin_write_USB_DMA7ADDRHIGH(val) bfin_write16(USB_DMA7ADDRHIGH, val)
1744#define bfin_read_USB_DMA7COUNTLOW() bfin_read16(USB_DMA7COUNTLOW)
1745#define bfin_write_USB_DMA7COUNTLOW(val) bfin_write16(USB_DMA7COUNTLOW, val)
1746#define bfin_read_USB_DMA7COUNTHIGH() bfin_read16(USB_DMA7COUNTHIGH)
1747#define bfin_write_USB_DMA7COUNTHIGH(val) bfin_write16(USB_DMA7COUNTHIGH, val)
1748
1749/* Keybfin_read_()ad Registers */
1750
1751#define bfin_read_KPAD_CTL() bfin_read16(KPAD_CTL)
1752#define bfin_write_KPAD_CTL(val) bfin_write16(KPAD_CTL, val)
1753#define bfin_read_KPAD_PRESCALE() bfin_read16(KPAD_PRESCALE)
1754#define bfin_write_KPAD_PRESCALE(val) bfin_write16(KPAD_PRESCALE, val)
1755#define bfin_read_KPAD_MSEL() bfin_read16(KPAD_MSEL)
1756#define bfin_write_KPAD_MSEL(val) bfin_write16(KPAD_MSEL, val)
1757#define bfin_read_KPAD_ROWCOL() bfin_read16(KPAD_ROWCOL)
1758#define bfin_write_KPAD_ROWCOL(val) bfin_write16(KPAD_ROWCOL, val)
1759#define bfin_read_KPAD_STAT() bfin_read16(KPAD_STAT)
1760#define bfin_write_KPAD_STAT(val) bfin_write16(KPAD_STAT, val)
1761#define bfin_read_KPAD_SOFTEVAL() bfin_read16(KPAD_SOFTEVAL)
1762#define bfin_write_KPAD_SOFTEVAL(val) bfin_write16(KPAD_SOFTEVAL, val)
1763
1764/* Pixel Combfin_read_()ositor (PIXC) Registers */
1765
1766#define bfin_read_PIXC_CTL() bfin_read16(PIXC_CTL)
1767#define bfin_write_PIXC_CTL(val) bfin_write16(PIXC_CTL, val)
1768#define bfin_read_PIXC_PPL() bfin_read16(PIXC_PPL)
1769#define bfin_write_PIXC_PPL(val) bfin_write16(PIXC_PPL, val)
1770#define bfin_read_PIXC_LPF() bfin_read16(PIXC_LPF)
1771#define bfin_write_PIXC_LPF(val) bfin_write16(PIXC_LPF, val)
1772#define bfin_read_PIXC_AHSTART() bfin_read16(PIXC_AHSTART)
1773#define bfin_write_PIXC_AHSTART(val) bfin_write16(PIXC_AHSTART, val)
1774#define bfin_read_PIXC_AHEND() bfin_read16(PIXC_AHEND)
1775#define bfin_write_PIXC_AHEND(val) bfin_write16(PIXC_AHEND, val)
1776#define bfin_read_PIXC_AVSTART() bfin_read16(PIXC_AVSTART)
1777#define bfin_write_PIXC_AVSTART(val) bfin_write16(PIXC_AVSTART, val)
1778#define bfin_read_PIXC_AVEND() bfin_read16(PIXC_AVEND)
1779#define bfin_write_PIXC_AVEND(val) bfin_write16(PIXC_AVEND, val)
1780#define bfin_read_PIXC_ATRANSP() bfin_read16(PIXC_ATRANSP)
1781#define bfin_write_PIXC_ATRANSP(val) bfin_write16(PIXC_ATRANSP, val)
1782#define bfin_read_PIXC_BHSTART() bfin_read16(PIXC_BHSTART)
1783#define bfin_write_PIXC_BHSTART(val) bfin_write16(PIXC_BHSTART, val)
1784#define bfin_read_PIXC_BHEND() bfin_read16(PIXC_BHEND)
1785#define bfin_write_PIXC_BHEND(val) bfin_write16(PIXC_BHEND, val)
1786#define bfin_read_PIXC_BVSTART() bfin_read16(PIXC_BVSTART)
1787#define bfin_write_PIXC_BVSTART(val) bfin_write16(PIXC_BVSTART, val)
1788#define bfin_read_PIXC_BVEND() bfin_read16(PIXC_BVEND)
1789#define bfin_write_PIXC_BVEND(val) bfin_write16(PIXC_BVEND, val)
1790#define bfin_read_PIXC_BTRANSP() bfin_read16(PIXC_BTRANSP)
1791#define bfin_write_PIXC_BTRANSP(val) bfin_write16(PIXC_BTRANSP, val)
1792#define bfin_read_PIXC_INTRSTAT() bfin_read16(PIXC_INTRSTAT)
1793#define bfin_write_PIXC_INTRSTAT(val) bfin_write16(PIXC_INTRSTAT, val)
1794#define bfin_read_PIXC_RYCON() bfin_read32(PIXC_RYCON)
1795#define bfin_write_PIXC_RYCON(val) bfin_write32(PIXC_RYCON, val)
1796#define bfin_read_PIXC_GUCON() bfin_read32(PIXC_GUCON)
1797#define bfin_write_PIXC_GUCON(val) bfin_write32(PIXC_GUCON, val)
1798#define bfin_read_PIXC_BVCON() bfin_read32(PIXC_BVCON)
1799#define bfin_write_PIXC_BVCON(val) bfin_write32(PIXC_BVCON, val)
1800#define bfin_read_PIXC_CCBIAS() bfin_read32(PIXC_CCBIAS)
1801#define bfin_write_PIXC_CCBIAS(val) bfin_write32(PIXC_CCBIAS, val)
1802#define bfin_read_PIXC_TC() bfin_read32(PIXC_TC)
1803#define bfin_write_PIXC_TC(val) bfin_write32(PIXC_TC, val)
1804
1805/* Handshake MDMA 0 Registers */
1806
1807#define bfin_read_HMDMA0_CONTROL() bfin_read16(HMDMA0_CONTROL)
1808#define bfin_write_HMDMA0_CONTROL(val) bfin_write16(HMDMA0_CONTROL, val)
1809#define bfin_read_HMDMA0_ECINIT() bfin_read16(HMDMA0_ECINIT)
1810#define bfin_write_HMDMA0_ECINIT(val) bfin_write16(HMDMA0_ECINIT, val)
1811#define bfin_read_HMDMA0_BCINIT() bfin_read16(HMDMA0_BCINIT)
1812#define bfin_write_HMDMA0_BCINIT(val) bfin_write16(HMDMA0_BCINIT, val)
1813#define bfin_read_HMDMA0_ECURGENT() bfin_read16(HMDMA0_ECURGENT)
1814#define bfin_write_HMDMA0_ECURGENT(val) bfin_write16(HMDMA0_ECURGENT, val)
1815#define bfin_read_HMDMA0_ECOVERFLOW() bfin_read16(HMDMA0_ECOVERFLOW)
1816#define bfin_write_HMDMA0_ECOVERFLOW(val) bfin_write16(HMDMA0_ECOVERFLOW, val)
1817#define bfin_read_HMDMA0_ECOUNT() bfin_read16(HMDMA0_ECOUNT)
1818#define bfin_write_HMDMA0_ECOUNT(val) bfin_write16(HMDMA0_ECOUNT, val)
1819#define bfin_read_HMDMA0_BCOUNT() bfin_read16(HMDMA0_BCOUNT)
1820#define bfin_write_HMDMA0_BCOUNT(val) bfin_write16(HMDMA0_BCOUNT, val)
1821
1822/* Handshake MDMA 1 Registers */
1823
1824#define bfin_read_HMDMA1_CONTROL() bfin_read16(HMDMA1_CONTROL)
1825#define bfin_write_HMDMA1_CONTROL(val) bfin_write16(HMDMA1_CONTROL, val)
1826#define bfin_read_HMDMA1_ECINIT() bfin_read16(HMDMA1_ECINIT)
1827#define bfin_write_HMDMA1_ECINIT(val) bfin_write16(HMDMA1_ECINIT, val)
1828#define bfin_read_HMDMA1_BCINIT() bfin_read16(HMDMA1_BCINIT)
1829#define bfin_write_HMDMA1_BCINIT(val) bfin_write16(HMDMA1_BCINIT, val)
1830#define bfin_read_HMDMA1_ECURGENT() bfin_read16(HMDMA1_ECURGENT)
1831#define bfin_write_HMDMA1_ECURGENT(val) bfin_write16(HMDMA1_ECURGENT, val)
1832#define bfin_read_HMDMA1_ECOVERFLOW() bfin_read16(HMDMA1_ECOVERFLOW)
1833#define bfin_write_HMDMA1_ECOVERFLOW(val) bfin_write16(HMDMA1_ECOVERFLOW, val)
1834#define bfin_read_HMDMA1_ECOUNT() bfin_read16(HMDMA1_ECOUNT)
1835#define bfin_write_HMDMA1_ECOUNT(val) bfin_write16(HMDMA1_ECOUNT, val)
1836#define bfin_read_HMDMA1_BCOUNT() bfin_read16(HMDMA1_BCOUNT)
1837#define bfin_write_HMDMA1_BCOUNT(val) bfin_write16(HMDMA1_BCOUNT, val)
1838
1839#endif /* _CDEF_BF549_H */ 310#endif /* _CDEF_BF549_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h b/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
index a2e9d9849eba..32f71e6a7c15 100644
--- a/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
+++ b/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
@@ -2615,17 +2615,6 @@
2615#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN) 2615#define bfin_read_CNT_MIN() bfin_read32(CNT_MIN)
2616#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val) 2616#define bfin_write_CNT_MIN(val) bfin_write32(CNT_MIN, val)
2617 2617
2618/* OTP/FUSE Registers */
2619
2620#define bfin_read_OTP_CONTROL() bfin_read16(OTP_CONTROL)
2621#define bfin_write_OTP_CONTROL(val) bfin_write16(OTP_CONTROL, val)
2622#define bfin_read_OTP_BEN() bfin_read16(OTP_BEN)
2623#define bfin_write_OTP_BEN(val) bfin_write16(OTP_BEN, val)
2624#define bfin_read_OTP_STATUS() bfin_read16(OTP_STATUS)
2625#define bfin_write_OTP_STATUS(val) bfin_write16(OTP_STATUS, val)
2626#define bfin_read_OTP_TIMING() bfin_read32(OTP_TIMING)
2627#define bfin_write_OTP_TIMING(val) bfin_write32(OTP_TIMING, val)
2628
2629/* Security Registers */ 2618/* Security Registers */
2630 2619
2631#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT) 2620#define bfin_read_SECURE_SYSSWT() bfin_read32(SECURE_SYSSWT)
@@ -2640,17 +2629,6 @@
2640#define bfin_read_DMAC1_PERIMUX() bfin_read16(DMAC1_PERIMUX) 2629#define bfin_read_DMAC1_PERIMUX() bfin_read16(DMAC1_PERIMUX)
2641#define bfin_write_DMAC1_PERIMUX(val) bfin_write16(DMAC1_PERIMUX, val) 2630#define bfin_write_DMAC1_PERIMUX(val) bfin_write16(DMAC1_PERIMUX, val)
2642 2631
2643/* OTP Read/Write Data Buffer Registers */
2644
2645#define bfin_read_OTP_DATA0() bfin_read32(OTP_DATA0)
2646#define bfin_write_OTP_DATA0(val) bfin_write32(OTP_DATA0, val)
2647#define bfin_read_OTP_DATA1() bfin_read32(OTP_DATA1)
2648#define bfin_write_OTP_DATA1(val) bfin_write32(OTP_DATA1, val)
2649#define bfin_read_OTP_DATA2() bfin_read32(OTP_DATA2)
2650#define bfin_write_OTP_DATA2(val) bfin_write32(OTP_DATA2, val)
2651#define bfin_read_OTP_DATA3() bfin_read32(OTP_DATA3)
2652#define bfin_write_OTP_DATA3(val) bfin_write32(OTP_DATA3, val)
2653
2654/* Handshake MDMA is not defined in the shared file because it is not available on the ADSP-BF542 bfin_read_()rocessor */ 2632/* Handshake MDMA is not defined in the shared file because it is not available on the ADSP-BF542 bfin_read_()rocessor */
2655 2633
2656/* legacy definitions */ 2634/* legacy definitions */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF544.h b/arch/blackfin/mach-bf548/include/mach/defBF544.h
index dd414ae4ba4c..f916c52a148a 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF544.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF544.h
@@ -491,7 +491,7 @@
491#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */ 491#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
492#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */ 492#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
493#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */ 493#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
494#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */ 494#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshold Register */
495#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */ 495#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
496#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */ 496#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
497#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */ 497#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
@@ -501,7 +501,7 @@
501#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */ 501#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
502#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */ 502#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
503#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */ 503#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
504#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */ 504#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshold Register */
505#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */ 505#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
506#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */ 506#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
507#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */ 507#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
@@ -624,9 +624,9 @@
624#define DMA_READY 0x1 /* DMA Ready */ 624#define DMA_READY 0x1 /* DMA Ready */
625#define FIFOFULL 0x2 /* FIFO Full */ 625#define FIFOFULL 0x2 /* FIFO Full */
626#define FIFOEMPTY 0x4 /* FIFO Empty */ 626#define FIFOEMPTY 0x4 /* FIFO Empty */
627#define COMPLETE 0x8 /* DMA Complete */ 627#define DMA_COMPLETE 0x8 /* DMA Complete */
628#define HSHK 0x10 /* Host Handshake */ 628#define HSHK 0x10 /* Host Handshake */
629#define TIMEOUT 0x20 /* Host Timeout */ 629#define HSTIMEOUT 0x20 /* Host Timeout */
630#define HIRQ 0x40 /* Host Interrupt Request */ 630#define HIRQ 0x40 /* Host Interrupt Request */
631#define ALLOW_CNFG 0x80 /* Allow New Configuration */ 631#define ALLOW_CNFG 0x80 /* Allow New Configuration */
632#define DMA_DIR 0x100 /* DMA Direction */ 632#define DMA_DIR 0x100 /* DMA Direction */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF547.h b/arch/blackfin/mach-bf548/include/mach/defBF547.h
index 5a9dbabe0a68..72c343646b2a 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF547.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF547.h
@@ -4,18 +4,18 @@
4 * Licensed under the ADI BSD license or the GPL-2 (or later) 4 * Licensed under the ADI BSD license or the GPL-2 (or later)
5 */ 5 */
6 6
7#ifndef _DEF_BF548_H 7#ifndef _DEF_BF547_H
8#define _DEF_BF548_H 8#define _DEF_BF547_H
9 9
10/* Include all Core registers and bit definitions */ 10/* Include all Core registers and bit definitions */
11#include <asm/def_LPBlackfin.h> 11#include <asm/def_LPBlackfin.h>
12 12
13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF548 */ 13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF547 */
14 14
15/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */ 15/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
16#include "defBF54x_base.h" 16#include "defBF54x_base.h"
17 17
18/* The following are the #defines needed by ADSP-BF548 that are not in the common header */ 18/* The following are the #defines needed by ADSP-BF547 that are not in the common header */
19 19
20/* Timer Registers */ 20/* Timer Registers */
21 21
@@ -470,7 +470,7 @@
470#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */ 470#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
471#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */ 471#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
472#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */ 472#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
473#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */ 473#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshold Register */
474#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */ 474#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
475#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */ 475#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
476#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */ 476#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
@@ -480,7 +480,7 @@
480#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */ 480#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
481#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */ 481#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
482#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */ 482#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
483#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */ 483#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshold Register */
484#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */ 484#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
485#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */ 485#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
486#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */ 486#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
@@ -1217,4 +1217,4 @@
1217/* ******************************************* */ 1217/* ******************************************* */
1218 1218
1219 1219
1220#endif /* _DEF_BF548_H */ 1220#endif /* _DEF_BF547_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF548.h b/arch/blackfin/mach-bf548/include/mach/defBF548.h
index 82cd593f7391..3fb33b040ab7 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF548.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF548.h
@@ -15,115 +15,8 @@
15/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */ 15/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
16#include "defBF54x_base.h" 16#include "defBF54x_base.h"
17 17
18/* The following are the #defines needed by ADSP-BF548 that are not in the common header */ 18/* The BF548 is like the BF547, but has additional CANs */
19 19#include "defBF547.h"
20/* Timer Registers */
21
22#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
23#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
24#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
25#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
26#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
27#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
28#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
29#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
30#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
31#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
32#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
33#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
34
35/* Timer Group of 3 Registers */
36
37#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
38#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
39#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
40
41/* SPORT0 Registers */
42
43#define SPORT0_TCR1 0xffc00800 /* SPORT0 Transmit Configuration 1 Register */
44#define SPORT0_TCR2 0xffc00804 /* SPORT0 Transmit Configuration 2 Register */
45#define SPORT0_TCLKDIV 0xffc00808 /* SPORT0 Transmit Serial Clock Divider Register */
46#define SPORT0_TFSDIV 0xffc0080c /* SPORT0 Transmit Frame Sync Divider Register */
47#define SPORT0_TX 0xffc00810 /* SPORT0 Transmit Data Register */
48#define SPORT0_RX 0xffc00818 /* SPORT0 Receive Data Register */
49#define SPORT0_RCR1 0xffc00820 /* SPORT0 Receive Configuration 1 Register */
50#define SPORT0_RCR2 0xffc00824 /* SPORT0 Receive Configuration 2 Register */
51#define SPORT0_RCLKDIV 0xffc00828 /* SPORT0 Receive Serial Clock Divider Register */
52#define SPORT0_RFSDIV 0xffc0082c /* SPORT0 Receive Frame Sync Divider Register */
53#define SPORT0_STAT 0xffc00830 /* SPORT0 Status Register */
54#define SPORT0_CHNL 0xffc00834 /* SPORT0 Current Channel Register */
55#define SPORT0_MCMC1 0xffc00838 /* SPORT0 Multi channel Configuration Register 1 */
56#define SPORT0_MCMC2 0xffc0083c /* SPORT0 Multi channel Configuration Register 2 */
57#define SPORT0_MTCS0 0xffc00840 /* SPORT0 Multi channel Transmit Select Register 0 */
58#define SPORT0_MTCS1 0xffc00844 /* SPORT0 Multi channel Transmit Select Register 1 */
59#define SPORT0_MTCS2 0xffc00848 /* SPORT0 Multi channel Transmit Select Register 2 */
60#define SPORT0_MTCS3 0xffc0084c /* SPORT0 Multi channel Transmit Select Register 3 */
61#define SPORT0_MRCS0 0xffc00850 /* SPORT0 Multi channel Receive Select Register 0 */
62#define SPORT0_MRCS1 0xffc00854 /* SPORT0 Multi channel Receive Select Register 1 */
63#define SPORT0_MRCS2 0xffc00858 /* SPORT0 Multi channel Receive Select Register 2 */
64#define SPORT0_MRCS3 0xffc0085c /* SPORT0 Multi channel Receive Select Register 3 */
65
66/* EPPI0 Registers */
67
68#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
69#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
70#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
71#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
72#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
73#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
74#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
75#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
76#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
77#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
78#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
79#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
80#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
81#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
82
83/* UART2 Registers */
84
85#define UART2_DLL 0xffc02100 /* Divisor Latch Low Byte */
86#define UART2_DLH 0xffc02104 /* Divisor Latch High Byte */
87#define UART2_GCTL 0xffc02108 /* Global Control Register */
88#define UART2_LCR 0xffc0210c /* Line Control Register */
89#define UART2_MCR 0xffc02110 /* Modem Control Register */
90#define UART2_LSR 0xffc02114 /* Line Status Register */
91#define UART2_MSR 0xffc02118 /* Modem Status Register */
92#define UART2_SCR 0xffc0211c /* Scratch Register */
93#define UART2_IER_SET 0xffc02120 /* Interrupt Enable Register Set */
94#define UART2_IER_CLEAR 0xffc02124 /* Interrupt Enable Register Clear */
95#define UART2_RBR 0xffc0212c /* Receive Buffer Register */
96
97/* Two Wire Interface Registers (TWI1) */
98
99#define TWI1_REGBASE 0xffc02200
100#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
101#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
102#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
103#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
104#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
105#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
106#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
107#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
108#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
109#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
110#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
111#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
112#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
113#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
114#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
115#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
116
117/* SPI2 Registers */
118
119#define SPI2_REGBASE 0xffc02400
120#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
121#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
122#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
123#define SPI2_TDBR 0xffc0240c /* SPI2 Transmit Data Buffer Register */
124#define SPI2_RDBR 0xffc02410 /* SPI2 Receive Data Buffer Register */
125#define SPI2_BAUD 0xffc02414 /* SPI2 Baud Rate Register */
126#define SPI2_SHADOW 0xffc02418 /* SPI2 Receive Data Buffer Shadow Register */
127 20
128/* CAN Controller 1 Config 1 Registers */ 21/* CAN Controller 1 Config 1 Registers */
129 22
@@ -508,1096 +401,4 @@
508#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */ 401#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */
509#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */ 402#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */
510 403
511/* ATAPI Registers */
512
513#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
514#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
515#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
516#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
517#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
518#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
519#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
520#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
521#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
522#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
523#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
524#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
525#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
526#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
527#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
528#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
529#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
530#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
531#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
532#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
533#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
534#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
535#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
536#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
537#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
538
539/* SDH Registers */
540
541#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
542#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
543#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
544#define SDH_COMMAND 0xffc0390c /* SDH Command */
545#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
546#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
547#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
548#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
549#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
550#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
551#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
552#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
553#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
554#define SDH_STATUS 0xffc03934 /* SDH Status */
555#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
556#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
557#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
558#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
559#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
560#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
561#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
562#define SDH_CFG 0xffc039c8 /* SDH Configuration */
563#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
564#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
565#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
566#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
567#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
568#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
569#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
570#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
571#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
572
573/* HOST Port Registers */
574
575#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
576#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
577#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
578
579/* USB Control Registers */
580
581#define USB_FADDR 0xffc03c00 /* Function address register */
582#define USB_POWER 0xffc03c04 /* Power management register */
583#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
584#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
585#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
586#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
587#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
588#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
589#define USB_FRAME 0xffc03c20 /* USB frame number */
590#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
591#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
592#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
593#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
594
595/* USB Packet Control Registers */
596
597#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
598#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
599#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
600#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
601#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
602#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
603#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
604#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
605#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
606#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
607#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
608#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
609#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
610
611/* USB Endpoint FIFO Registers */
612
613#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
614#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
615#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
616#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
617#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
618#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
619#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
620#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
621
622/* USB OTG Control Registers */
623
624#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
625#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
626#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
627
628/* USB Phy Control Registers */
629
630#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
631#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
632#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
633#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
634#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
635
636/* (APHY_CNTRL is for ADI usage only) */
637
638#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
639
640/* (APHY_CALIB is for ADI usage only) */
641
642#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
643#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
644
645/* (PHY_TEST is for ADI usage only) */
646
647#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
648#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
649#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
650
651/* USB Endpoint 0 Control Registers */
652
653#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
654#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
655#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
656#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
657#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
658#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
659#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
660#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
661#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
662
663/* USB Endpoint 1 Control Registers */
664
665#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
666#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
667#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
668#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
669#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
670#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
671#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
672#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
673#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
674#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
675
676/* USB Endpoint 2 Control Registers */
677
678#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
679#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
680#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
681#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
682#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
683#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
684#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
685#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
686#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
687#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
688
689/* USB Endpoint 3 Control Registers */
690
691#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
692#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
693#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
694#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
695#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
696#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
697#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
698#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
699#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
700#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
701
702/* USB Endpoint 4 Control Registers */
703
704#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
705#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
706#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
707#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
708#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
709#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
710#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
711#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
712#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
713#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
714
715/* USB Endpoint 5 Control Registers */
716
717#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
718#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
719#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
720#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
721#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
722#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
723#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
724#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
725#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
726#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
727
728/* USB Endpoint 6 Control Registers */
729
730#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
731#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
732#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
733#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
734#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
735#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
736#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
737#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
738#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
739#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
740
741/* USB Endpoint 7 Control Registers */
742
743#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
744#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
745#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
746#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
747#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
748#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
749#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
750#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
751#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
752#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
753#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
754#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
755
756/* USB Channel 0 Config Registers */
757
758#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
759#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
760#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
761#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
762#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
763
764/* USB Channel 1 Config Registers */
765
766#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
767#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
768#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
769#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
770#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
771
772/* USB Channel 2 Config Registers */
773
774#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
775#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
776#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
777#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
778#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
779
780/* USB Channel 3 Config Registers */
781
782#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
783#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
784#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
785#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
786#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
787
788/* USB Channel 4 Config Registers */
789
790#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
791#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
792#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
793#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
794#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
795
796/* USB Channel 5 Config Registers */
797
798#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
799#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
800#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
801#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
802#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
803
804/* USB Channel 6 Config Registers */
805
806#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
807#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
808#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
809#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
810#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
811
812/* USB Channel 7 Config Registers */
813
814#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
815#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
816#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
817#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
818#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
819
820/* Keypad Registers */
821
822#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
823#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
824#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
825#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
826#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
827#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
828
829/* Pixel Compositor (PIXC) Registers */
830
831#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
832#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
833#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
834#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
835#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
836#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
837#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
838#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
839#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
840#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
841#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
842#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
843#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
844#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
845#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
846#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
847#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
848#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
849#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
850
851/* Handshake MDMA 0 Registers */
852
853#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
854#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
855#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
856#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
857#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
858#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
859#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
860
861/* Handshake MDMA 1 Registers */
862
863#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
864#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
865#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
866#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
867#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
868#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
869#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
870
871
872/* ********************************************************** */
873/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
874/* and MULTI BIT READ MACROS */
875/* ********************************************************** */
876
877/* Bit masks for PIXC_CTL */
878
879#define PIXC_EN 0x1 /* Pixel Compositor Enable */
880#define OVR_A_EN 0x2 /* Overlay A Enable */
881#define OVR_B_EN 0x4 /* Overlay B Enable */
882#define IMG_FORM 0x8 /* Image Data Format */
883#define OVR_FORM 0x10 /* Overlay Data Format */
884#define OUT_FORM 0x20 /* Output Data Format */
885#define UDS_MOD 0x40 /* Resampling Mode */
886#define TC_EN 0x80 /* Transparent Color Enable */
887#define IMG_STAT 0x300 /* Image FIFO Status */
888#define OVR_STAT 0xc00 /* Overlay FIFO Status */
889#define WM_LVL 0x3000 /* FIFO Watermark Level */
890
891/* Bit masks for PIXC_AHSTART */
892
893#define A_HSTART 0xfff /* Horizontal Start Coordinates */
894
895/* Bit masks for PIXC_AHEND */
896
897#define A_HEND 0xfff /* Horizontal End Coordinates */
898
899/* Bit masks for PIXC_AVSTART */
900
901#define A_VSTART 0x3ff /* Vertical Start Coordinates */
902
903/* Bit masks for PIXC_AVEND */
904
905#define A_VEND 0x3ff /* Vertical End Coordinates */
906
907/* Bit masks for PIXC_ATRANSP */
908
909#define A_TRANSP 0xf /* Transparency Value */
910
911/* Bit masks for PIXC_BHSTART */
912
913#define B_HSTART 0xfff /* Horizontal Start Coordinates */
914
915/* Bit masks for PIXC_BHEND */
916
917#define B_HEND 0xfff /* Horizontal End Coordinates */
918
919/* Bit masks for PIXC_BVSTART */
920
921#define B_VSTART 0x3ff /* Vertical Start Coordinates */
922
923/* Bit masks for PIXC_BVEND */
924
925#define B_VEND 0x3ff /* Vertical End Coordinates */
926
927/* Bit masks for PIXC_BTRANSP */
928
929#define B_TRANSP 0xf /* Transparency Value */
930
931/* Bit masks for PIXC_INTRSTAT */
932
933#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
934#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
935#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
936#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
937
938/* Bit masks for PIXC_RYCON */
939
940#define A11 0x3ff /* A11 in the Coefficient Matrix */
941#define A12 0xffc00 /* A12 in the Coefficient Matrix */
942#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
943#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
944
945/* Bit masks for PIXC_GUCON */
946
947#define A21 0x3ff /* A21 in the Coefficient Matrix */
948#define A22 0xffc00 /* A22 in the Coefficient Matrix */
949#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
950#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
951
952/* Bit masks for PIXC_BVCON */
953
954#define A31 0x3ff /* A31 in the Coefficient Matrix */
955#define A32 0xffc00 /* A32 in the Coefficient Matrix */
956#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
957#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
958
959/* Bit masks for PIXC_CCBIAS */
960
961#define A14 0x3ff /* A14 in the Bias Vector */
962#define A24 0xffc00 /* A24 in the Bias Vector */
963#define A34 0x3ff00000 /* A34 in the Bias Vector */
964
965/* Bit masks for PIXC_TC */
966
967#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
968#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
969#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
970
971/* Bit masks for HOST_CONTROL */
972
973#define HOST_EN 0x1 /* Host Enable */
974#define HOST_END 0x2 /* Host Endianess */
975#define DATA_SIZE 0x4 /* Data Size */
976#define HOST_RST 0x8 /* Host Reset */
977#define HRDY_OVR 0x20 /* Host Ready Override */
978#define INT_MODE 0x40 /* Interrupt Mode */
979#define BT_EN 0x80 /* Bus Timeout Enable */
980#define EHW 0x100 /* Enable Host Write */
981#define EHR 0x200 /* Enable Host Read */
982#define BDR 0x400 /* Burst DMA Requests */
983
984/* Bit masks for HOST_STATUS */
985
986#define DMA_READY 0x1 /* DMA Ready */
987#define FIFOFULL 0x2 /* FIFO Full */
988#define FIFOEMPTY 0x4 /* FIFO Empty */
989#define DMA_COMPLETE 0x8 /* DMA Complete */
990#define HSHK 0x10 /* Host Handshake */
991#define HSTIMEOUT 0x20 /* Host Timeout */
992#define HIRQ 0x40 /* Host Interrupt Request */
993#define ALLOW_CNFG 0x80 /* Allow New Configuration */
994#define DMA_DIR 0x100 /* DMA Direction */
995#define BTE 0x200 /* Bus Timeout Enabled */
996
997/* Bit masks for HOST_TIMEOUT */
998
999#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1000
1001/* Bit masks for KPAD_CTL */
1002
1003#define KPAD_EN 0x1 /* Keypad Enable */
1004#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
1005#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
1006#define KPAD_COLEN 0xe000 /* Column Enable Width */
1007
1008/* Bit masks for KPAD_PRESCALE */
1009
1010#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
1011
1012/* Bit masks for KPAD_MSEL */
1013
1014#define DBON_SCALE 0xff /* Debounce Scale Value */
1015#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
1016
1017/* Bit masks for KPAD_ROWCOL */
1018
1019#define KPAD_ROW 0xff /* Rows Pressed */
1020#define KPAD_COL 0xff00 /* Columns Pressed */
1021
1022/* Bit masks for KPAD_STAT */
1023
1024#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
1025#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
1026#define KPAD_PRESSED 0x8 /* Key press current status */
1027
1028/* Bit masks for KPAD_SOFTEVAL */
1029
1030#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
1031
1032/* Bit masks for SDH_COMMAND */
1033
1034#define CMD_IDX 0x3f /* Command Index */
1035#define CMD_RSP 0x40 /* Response */
1036#define CMD_L_RSP 0x80 /* Long Response */
1037#define CMD_INT_E 0x100 /* Command Interrupt */
1038#define CMD_PEND_E 0x200 /* Command Pending */
1039#define CMD_E 0x400 /* Command Enable */
1040
1041/* Bit masks for SDH_PWR_CTL */
1042
1043#define PWR_ON 0x3 /* Power On */
1044#if 0
1045#define TBD 0x3c /* TBD */
1046#endif
1047#define SD_CMD_OD 0x40 /* Open Drain Output */
1048#define ROD_CTL 0x80 /* Rod Control */
1049
1050/* Bit masks for SDH_CLK_CTL */
1051
1052#define CLKDIV 0xff /* MC_CLK Divisor */
1053#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
1054#define PWR_SV_E 0x200 /* Power Save Enable */
1055#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
1056#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
1057
1058/* Bit masks for SDH_RESP_CMD */
1059
1060#define RESP_CMD 0x3f /* Response Command */
1061
1062/* Bit masks for SDH_DATA_CTL */
1063
1064#define DTX_E 0x1 /* Data Transfer Enable */
1065#define DTX_DIR 0x2 /* Data Transfer Direction */
1066#define DTX_MODE 0x4 /* Data Transfer Mode */
1067#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
1068#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
1069
1070/* Bit masks for SDH_STATUS */
1071
1072#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
1073#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
1074#define CMD_TIME_OUT 0x4 /* CMD Time Out */
1075#define DAT_TIME_OUT 0x8 /* Data Time Out */
1076#define TX_UNDERRUN 0x10 /* Transmit Underrun */
1077#define RX_OVERRUN 0x20 /* Receive Overrun */
1078#define CMD_RESP_END 0x40 /* CMD Response End */
1079#define CMD_SENT 0x80 /* CMD Sent */
1080#define DAT_END 0x100 /* Data End */
1081#define START_BIT_ERR 0x200 /* Start Bit Error */
1082#define DAT_BLK_END 0x400 /* Data Block End */
1083#define CMD_ACT 0x800 /* CMD Active */
1084#define TX_ACT 0x1000 /* Transmit Active */
1085#define RX_ACT 0x2000 /* Receive Active */
1086#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
1087#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
1088#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
1089#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
1090#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
1091#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
1092#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
1093#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
1094
1095/* Bit masks for SDH_STATUS_CLR */
1096
1097#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
1098#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
1099#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
1100#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
1101#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
1102#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
1103#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
1104#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
1105#define DAT_END_STAT 0x100 /* Data End Status */
1106#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
1107#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
1108
1109/* Bit masks for SDH_MASK0 */
1110
1111#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
1112#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
1113#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
1114#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
1115#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
1116#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
1117#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
1118#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
1119#define DAT_END_MASK 0x100 /* Data End Mask */
1120#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
1121#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
1122#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
1123#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
1124#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
1125#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
1126#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
1127#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
1128#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
1129#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
1130#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
1131#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
1132#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
1133
1134/* Bit masks for SDH_FIFO_CNT */
1135
1136#define FIFO_COUNT 0x7fff /* FIFO Count */
1137
1138/* Bit masks for SDH_E_STATUS */
1139
1140#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
1141#define SD_CARD_DET 0x10 /* SD Card Detect */
1142
1143/* Bit masks for SDH_E_MASK */
1144
1145#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
1146#define SCD_MSK 0x40 /* Mask Card Detect */
1147
1148/* Bit masks for SDH_CFG */
1149
1150#define CLKS_EN 0x1 /* Clocks Enable */
1151#define SD4E 0x4 /* SDIO 4-Bit Enable */
1152#define MWE 0x8 /* Moving Window Enable */
1153#define SD_RST 0x10 /* SDMMC Reset */
1154#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
1155#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
1156#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
1157
1158/* Bit masks for SDH_RD_WAIT_EN */
1159
1160#define RWR 0x1 /* Read Wait Request */
1161
1162/* Bit masks for ATAPI_CONTROL */
1163
1164#define PIO_START 0x1 /* Start PIO/Reg Op */
1165#define MULTI_START 0x2 /* Start Multi-DMA Op */
1166#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
1167#define XFER_DIR 0x8 /* Transfer Direction */
1168#define IORDY_EN 0x10 /* IORDY Enable */
1169#define FIFO_FLUSH 0x20 /* Flush FIFOs */
1170#define SOFT_RST 0x40 /* Soft Reset */
1171#define DEV_RST 0x80 /* Device Reset */
1172#define TFRCNT_RST 0x100 /* Trans Count Reset */
1173#define END_ON_TERM 0x200 /* End/Terminate Select */
1174#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
1175#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
1176
1177/* Bit masks for ATAPI_STATUS */
1178
1179#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
1180#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
1181#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
1182#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
1183
1184/* Bit masks for ATAPI_DEV_ADDR */
1185
1186#define DEV_ADDR 0x1f /* Device Address */
1187
1188/* Bit masks for ATAPI_INT_MASK */
1189
1190#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
1191#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
1192#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
1193#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
1194#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
1195#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
1196#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
1197#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
1198#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
1199
1200/* Bit masks for ATAPI_INT_STATUS */
1201
1202#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
1203#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
1204#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
1205#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
1206#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
1207#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
1208#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
1209#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
1210#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
1211
1212/* Bit masks for ATAPI_LINE_STATUS */
1213
1214#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
1215#define ATAPI_DASP 0x2 /* Device dasp to host line status */
1216#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
1217#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
1218#define ATAPI_ADDR 0x70 /* ATAPI address line status */
1219#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
1220#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
1221#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
1222#define ATAPI_DIORN 0x400 /* ATAPI read line status */
1223#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
1224
1225/* Bit masks for ATAPI_SM_STATE */
1226
1227#define PIO_CSTATE 0xf /* PIO mode state machine current state */
1228#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
1229#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
1230#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
1231
1232/* Bit masks for ATAPI_TERMINATE */
1233
1234#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
1235
1236/* Bit masks for ATAPI_REG_TIM_0 */
1237
1238#define T2_REG 0xff /* End of cycle time for register access transfers */
1239#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
1240
1241/* Bit masks for ATAPI_PIO_TIM_0 */
1242
1243#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
1244#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
1245#define T4_REG 0xf000 /* DIOW data hold */
1246
1247/* Bit masks for ATAPI_PIO_TIM_1 */
1248
1249#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
1250
1251/* Bit masks for ATAPI_MULTI_TIM_0 */
1252
1253#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
1254#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
1255
1256/* Bit masks for ATAPI_MULTI_TIM_1 */
1257
1258#define TKW 0xff /* Selects DIOW negated pulsewidth */
1259#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
1260
1261/* Bit masks for ATAPI_MULTI_TIM_2 */
1262
1263#define TH 0xff /* Selects DIOW data hold */
1264#define TEOC 0xff00 /* Selects end of cycle for DMA */
1265
1266/* Bit masks for ATAPI_ULTRA_TIM_0 */
1267
1268#define TACK 0xff /* Selects setup and hold times for TACK */
1269#define TENV 0xff00 /* Selects envelope time */
1270
1271/* Bit masks for ATAPI_ULTRA_TIM_1 */
1272
1273#define TDVS 0xff /* Selects data valid setup time */
1274#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
1275
1276/* Bit masks for ATAPI_ULTRA_TIM_2 */
1277
1278#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
1279#define TMLI 0xff00 /* Selects interlock time */
1280
1281/* Bit masks for ATAPI_ULTRA_TIM_3 */
1282
1283#define TZAH 0xff /* Selects minimum delay required for output */
1284#define READY_PAUSE 0xff00 /* Selects ready to pause */
1285
1286/* Bit masks for TIMER_ENABLE1 */
1287
1288#define TIMEN8 0x1 /* Timer 8 Enable */
1289#define TIMEN9 0x2 /* Timer 9 Enable */
1290#define TIMEN10 0x4 /* Timer 10 Enable */
1291
1292/* Bit masks for TIMER_DISABLE1 */
1293
1294#define TIMDIS8 0x1 /* Timer 8 Disable */
1295#define TIMDIS9 0x2 /* Timer 9 Disable */
1296#define TIMDIS10 0x4 /* Timer 10 Disable */
1297
1298/* Bit masks for TIMER_STATUS1 */
1299
1300#define TIMIL8 0x1 /* Timer 8 Interrupt */
1301#define TIMIL9 0x2 /* Timer 9 Interrupt */
1302#define TIMIL10 0x4 /* Timer 10 Interrupt */
1303#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
1304#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
1305#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
1306#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
1307#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
1308#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
1309
1310/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
1311
1312/* Bit masks for USB_FADDR */
1313
1314#define FUNCTION_ADDRESS 0x7f /* Function address */
1315
1316/* Bit masks for USB_POWER */
1317
1318#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
1319#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
1320#define RESUME_MODE 0x4 /* DMA Mode */
1321#define RESET 0x8 /* Reset indicator */
1322#define HS_MODE 0x10 /* High Speed mode indicator */
1323#define HS_ENABLE 0x20 /* high Speed Enable */
1324#define SOFT_CONN 0x40 /* Soft connect */
1325#define ISO_UPDATE 0x80 /* Isochronous update */
1326
1327/* Bit masks for USB_INTRTX */
1328
1329#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
1330#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
1331#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
1332#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
1333#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
1334#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
1335#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
1336#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
1337
1338/* Bit masks for USB_INTRRX */
1339
1340#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
1341#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
1342#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
1343#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
1344#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
1345#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
1346#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
1347
1348/* Bit masks for USB_INTRTXE */
1349
1350#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
1351#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
1352#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
1353#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
1354#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
1355#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
1356#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
1357#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
1358
1359/* Bit masks for USB_INTRRXE */
1360
1361#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
1362#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
1363#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
1364#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
1365#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
1366#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
1367#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
1368
1369/* Bit masks for USB_INTRUSB */
1370
1371#define SUSPEND_B 0x1 /* Suspend indicator */
1372#define RESUME_B 0x2 /* Resume indicator */
1373#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
1374#define SOF_B 0x8 /* Start of frame */
1375#define CONN_B 0x10 /* Connection indicator */
1376#define DISCON_B 0x20 /* Disconnect indicator */
1377#define SESSION_REQ_B 0x40 /* Session Request */
1378#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
1379
1380/* Bit masks for USB_INTRUSBE */
1381
1382#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
1383#define RESUME_BE 0x2 /* Resume indicator int enable */
1384#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
1385#define SOF_BE 0x8 /* Start of frame int enable */
1386#define CONN_BE 0x10 /* Connection indicator int enable */
1387#define DISCON_BE 0x20 /* Disconnect indicator int enable */
1388#define SESSION_REQ_BE 0x40 /* Session Request int enable */
1389#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
1390
1391/* Bit masks for USB_FRAME */
1392
1393#define FRAME_NUMBER 0x7ff /* Frame number */
1394
1395/* Bit masks for USB_INDEX */
1396
1397#define SELECTED_ENDPOINT 0xf /* selected endpoint */
1398
1399/* Bit masks for USB_GLOBAL_CTL */
1400
1401#define GLOBAL_ENA 0x1 /* enables USB module */
1402#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
1403#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
1404#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
1405#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
1406#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
1407#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
1408#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
1409#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
1410#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
1411#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
1412#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
1413#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
1414#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
1415#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
1416
1417/* Bit masks for USB_OTG_DEV_CTL */
1418
1419#define SESSION 0x1 /* session indicator */
1420#define HOST_REQ 0x2 /* Host negotiation request */
1421#define HOST_MODE 0x4 /* indicates USBDRC is a host */
1422#define VBUS0 0x8 /* Vbus level indicator[0] */
1423#define VBUS1 0x10 /* Vbus level indicator[1] */
1424#define LSDEV 0x20 /* Low-speed indicator */
1425#define FSDEV 0x40 /* Full or High-speed indicator */
1426#define B_DEVICE 0x80 /* A' or 'B' device indicator */
1427
1428/* Bit masks for USB_OTG_VBUS_IRQ */
1429
1430#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
1431#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
1432#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
1433#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
1434#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
1435#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
1436
1437/* Bit masks for USB_OTG_VBUS_MASK */
1438
1439#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
1440#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
1441#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
1442#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
1443#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
1444#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
1445
1446/* Bit masks for USB_CSR0 */
1447
1448#define RXPKTRDY 0x1 /* data packet receive indicator */
1449#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
1450#define STALL_SENT 0x4 /* STALL handshake sent */
1451#define DATAEND 0x8 /* Data end indicator */
1452#define SETUPEND 0x10 /* Setup end */
1453#define SENDSTALL 0x20 /* Send STALL handshake */
1454#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
1455#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
1456#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
1457#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
1458#define SETUPPKT_H 0x8 /* send Setup token host mode */
1459#define ERROR_H 0x10 /* timeout error indicator host mode */
1460#define REQPKT_H 0x20 /* Request an IN transaction host mode */
1461#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
1462#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
1463
1464/* Bit masks for USB_COUNT0 */
1465
1466#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
1467
1468/* Bit masks for USB_NAKLIMIT0 */
1469
1470#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
1471
1472/* Bit masks for USB_TX_MAX_PACKET */
1473
1474#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
1475
1476/* Bit masks for USB_RX_MAX_PACKET */
1477
1478#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
1479
1480/* Bit masks for USB_TXCSR */
1481
1482#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
1483#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
1484#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
1485#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
1486#define STALL_SEND_T 0x10 /* issue a Stall handshake */
1487#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
1488#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
1489#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
1490#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
1491#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
1492#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
1493#define ISO_T 0x4000 /* enable Isochronous transfers */
1494#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
1495#define ERROR_TH 0x4 /* error condition host mode */
1496#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
1497#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
1498
1499/* Bit masks for USB_TXCOUNT */
1500
1501#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
1502
1503/* Bit masks for USB_RXCSR */
1504
1505#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
1506#define FIFO_FULL_R 0x2 /* FIFO not empty */
1507#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
1508#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
1509#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
1510#define STALL_SEND_R 0x20 /* issue a Stall handshake */
1511#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
1512#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
1513#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
1514#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
1515#define DISNYET_R 0x1000 /* disable Nyet handshakes */
1516#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
1517#define ISO_R 0x4000 /* enable Isochronous transfers */
1518#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
1519#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
1520#define REQPKT_RH 0x20 /* request an IN transaction host mode */
1521#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
1522#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
1523#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
1524#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
1525
1526/* Bit masks for USB_RXCOUNT */
1527
1528#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
1529
1530/* Bit masks for USB_TXTYPE */
1531
1532#define TARGET_EP_NO_T 0xf /* EP number */
1533#define PROTOCOL_T 0xc /* transfer type */
1534
1535/* Bit masks for USB_TXINTERVAL */
1536
1537#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
1538
1539/* Bit masks for USB_RXTYPE */
1540
1541#define TARGET_EP_NO_R 0xf /* EP number */
1542#define PROTOCOL_R 0xc /* transfer type */
1543
1544/* Bit masks for USB_RXINTERVAL */
1545
1546#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
1547
1548/* Bit masks for USB_DMA_INTERRUPT */
1549
1550#define DMA0_INT 0x1 /* DMA0 pending interrupt */
1551#define DMA1_INT 0x2 /* DMA1 pending interrupt */
1552#define DMA2_INT 0x4 /* DMA2 pending interrupt */
1553#define DMA3_INT 0x8 /* DMA3 pending interrupt */
1554#define DMA4_INT 0x10 /* DMA4 pending interrupt */
1555#define DMA5_INT 0x20 /* DMA5 pending interrupt */
1556#define DMA6_INT 0x40 /* DMA6 pending interrupt */
1557#define DMA7_INT 0x80 /* DMA7 pending interrupt */
1558
1559/* Bit masks for USB_DMAxCONTROL */
1560
1561#define DMA_ENA 0x1 /* DMA enable */
1562#define DIRECTION 0x2 /* direction of DMA transfer */
1563#define MODE 0x4 /* DMA Bus error */
1564#define INT_ENA 0x8 /* Interrupt enable */
1565#define EPNUM 0xf0 /* EP number */
1566#define BUSERROR 0x100 /* DMA Bus error */
1567
1568/* Bit masks for USB_DMAxADDRHIGH */
1569
1570#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
1571
1572/* Bit masks for USB_DMAxADDRLOW */
1573
1574#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
1575
1576/* Bit masks for USB_DMAxCOUNTHIGH */
1577
1578#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
1579
1580/* Bit masks for USB_DMAxCOUNTLOW */
1581
1582#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
1583
1584/* Bit masks for HMDMAx_CONTROL */
1585
1586#define HMDMAEN 0x1 /* Handshake MDMA Enable */
1587#define REP 0x2 /* Handshake MDMA Request Polarity */
1588#define UTE 0x8 /* Urgency Threshold Enable */
1589#define OIE 0x10 /* Overflow Interrupt Enable */
1590#define BDIE 0x20 /* Block Done Interrupt Enable */
1591#define MBDI 0x40 /* Mask Block Done Interrupt */
1592#define DRQ 0x300 /* Handshake MDMA Request Type */
1593#define RBC 0x1000 /* Force Reload of BCOUNT */
1594#define PS 0x2000 /* Pin Status */
1595#define OI 0x4000 /* Overflow Interrupt Generated */
1596#define BDI 0x8000 /* Block Done Interrupt Generated */
1597
1598/* ******************************************* */
1599/* MULTI BIT MACRO ENUMERATIONS */
1600/* ******************************************* */
1601
1602
1603#endif /* _DEF_BF548_H */ 404#endif /* _DEF_BF548_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF549.h b/arch/blackfin/mach-bf548/include/mach/defBF549.h
index 6fc6e39ab61b..5a04e6d4017e 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF549.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF549.h
@@ -10,121 +10,13 @@
10/* Include all Core registers and bit definitions */ 10/* Include all Core registers and bit definitions */
11#include <asm/def_LPBlackfin.h> 11#include <asm/def_LPBlackfin.h>
12 12
13
14/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF549 */ 13/* SYSTEM & MMR ADDRESS DEFINITIONS FOR ADSP-BF549 */
15 14
16/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */ 15/* Include defBF54x_base.h for the set of #defines that are common to all ADSP-BF54x processors */
17#include "defBF54x_base.h" 16#include "defBF54x_base.h"
18 17
19/* The following are the #defines needed by ADSP-BF549 that are not in the common header */ 18/* The BF549 is like the BF544, but has MXVR */
20 19#include "defBF547.h"
21/* Timer Registers */
22
23#define TIMER8_CONFIG 0xffc00600 /* Timer 8 Configuration Register */
24#define TIMER8_COUNTER 0xffc00604 /* Timer 8 Counter Register */
25#define TIMER8_PERIOD 0xffc00608 /* Timer 8 Period Register */
26#define TIMER8_WIDTH 0xffc0060c /* Timer 8 Width Register */
27#define TIMER9_CONFIG 0xffc00610 /* Timer 9 Configuration Register */
28#define TIMER9_COUNTER 0xffc00614 /* Timer 9 Counter Register */
29#define TIMER9_PERIOD 0xffc00618 /* Timer 9 Period Register */
30#define TIMER9_WIDTH 0xffc0061c /* Timer 9 Width Register */
31#define TIMER10_CONFIG 0xffc00620 /* Timer 10 Configuration Register */
32#define TIMER10_COUNTER 0xffc00624 /* Timer 10 Counter Register */
33#define TIMER10_PERIOD 0xffc00628 /* Timer 10 Period Register */
34#define TIMER10_WIDTH 0xffc0062c /* Timer 10 Width Register */
35
36/* Timer Group of 3 Registers */
37
38#define TIMER_ENABLE1 0xffc00640 /* Timer Group of 3 Enable Register */
39#define TIMER_DISABLE1 0xffc00644 /* Timer Group of 3 Disable Register */
40#define TIMER_STATUS1 0xffc00648 /* Timer Group of 3 Status Register */
41
42/* SPORT0 Registers */
43
44#define SPORT0_TCR1 0xffc00800 /* SPORT0 Transmit Configuration 1 Register */
45#define SPORT0_TCR2 0xffc00804 /* SPORT0 Transmit Configuration 2 Register */
46#define SPORT0_TCLKDIV 0xffc00808 /* SPORT0 Transmit Serial Clock Divider Register */
47#define SPORT0_TFSDIV 0xffc0080c /* SPORT0 Transmit Frame Sync Divider Register */
48#define SPORT0_TX 0xffc00810 /* SPORT0 Transmit Data Register */
49#define SPORT0_RX 0xffc00818 /* SPORT0 Receive Data Register */
50#define SPORT0_RCR1 0xffc00820 /* SPORT0 Receive Configuration 1 Register */
51#define SPORT0_RCR2 0xffc00824 /* SPORT0 Receive Configuration 2 Register */
52#define SPORT0_RCLKDIV 0xffc00828 /* SPORT0 Receive Serial Clock Divider Register */
53#define SPORT0_RFSDIV 0xffc0082c /* SPORT0 Receive Frame Sync Divider Register */
54#define SPORT0_STAT 0xffc00830 /* SPORT0 Status Register */
55#define SPORT0_CHNL 0xffc00834 /* SPORT0 Current Channel Register */
56#define SPORT0_MCMC1 0xffc00838 /* SPORT0 Multi channel Configuration Register 1 */
57#define SPORT0_MCMC2 0xffc0083c /* SPORT0 Multi channel Configuration Register 2 */
58#define SPORT0_MTCS0 0xffc00840 /* SPORT0 Multi channel Transmit Select Register 0 */
59#define SPORT0_MTCS1 0xffc00844 /* SPORT0 Multi channel Transmit Select Register 1 */
60#define SPORT0_MTCS2 0xffc00848 /* SPORT0 Multi channel Transmit Select Register 2 */
61#define SPORT0_MTCS3 0xffc0084c /* SPORT0 Multi channel Transmit Select Register 3 */
62#define SPORT0_MRCS0 0xffc00850 /* SPORT0 Multi channel Receive Select Register 0 */
63#define SPORT0_MRCS1 0xffc00854 /* SPORT0 Multi channel Receive Select Register 1 */
64#define SPORT0_MRCS2 0xffc00858 /* SPORT0 Multi channel Receive Select Register 2 */
65#define SPORT0_MRCS3 0xffc0085c /* SPORT0 Multi channel Receive Select Register 3 */
66
67/* EPPI0 Registers */
68
69#define EPPI0_STATUS 0xffc01000 /* EPPI0 Status Register */
70#define EPPI0_HCOUNT 0xffc01004 /* EPPI0 Horizontal Transfer Count Register */
71#define EPPI0_HDELAY 0xffc01008 /* EPPI0 Horizontal Delay Count Register */
72#define EPPI0_VCOUNT 0xffc0100c /* EPPI0 Vertical Transfer Count Register */
73#define EPPI0_VDELAY 0xffc01010 /* EPPI0 Vertical Delay Count Register */
74#define EPPI0_FRAME 0xffc01014 /* EPPI0 Lines per Frame Register */
75#define EPPI0_LINE 0xffc01018 /* EPPI0 Samples per Line Register */
76#define EPPI0_CLKDIV 0xffc0101c /* EPPI0 Clock Divide Register */
77#define EPPI0_CONTROL 0xffc01020 /* EPPI0 Control Register */
78#define EPPI0_FS1W_HBL 0xffc01024 /* EPPI0 FS1 Width Register / EPPI0 Horizontal Blanking Samples Per Line Register */
79#define EPPI0_FS1P_AVPL 0xffc01028 /* EPPI0 FS1 Period Register / EPPI0 Active Video Samples Per Line Register */
80#define EPPI0_FS2W_LVB 0xffc0102c /* EPPI0 FS2 Width Register / EPPI0 Lines of Vertical Blanking Register */
81#define EPPI0_FS2P_LAVF 0xffc01030 /* EPPI0 FS2 Period Register/ EPPI0 Lines of Active Video Per Field Register */
82#define EPPI0_CLIP 0xffc01034 /* EPPI0 Clipping Register */
83
84/* UART2 Registers */
85
86#define UART2_DLL 0xffc02100 /* Divisor Latch Low Byte */
87#define UART2_DLH 0xffc02104 /* Divisor Latch High Byte */
88#define UART2_GCTL 0xffc02108 /* Global Control Register */
89#define UART2_LCR 0xffc0210c /* Line Control Register */
90#define UART2_MCR 0xffc02110 /* Modem Control Register */
91#define UART2_LSR 0xffc02114 /* Line Status Register */
92#define UART2_MSR 0xffc02118 /* Modem Status Register */
93#define UART2_SCR 0xffc0211c /* Scratch Register */
94#define UART2_IER_SET 0xffc02120 /* Interrupt Enable Register Set */
95#define UART2_IER_CLEAR 0xffc02124 /* Interrupt Enable Register Clear */
96#define UART2_RBR 0xffc0212c /* Receive Buffer Register */
97
98/* Two Wire Interface Registers (TWI1) */
99
100#define TWI1_REGBASE 0xffc02200
101#define TWI1_CLKDIV 0xffc02200 /* Clock Divider Register */
102#define TWI1_CONTROL 0xffc02204 /* TWI Control Register */
103#define TWI1_SLAVE_CTRL 0xffc02208 /* TWI Slave Mode Control Register */
104#define TWI1_SLAVE_STAT 0xffc0220c /* TWI Slave Mode Status Register */
105#define TWI1_SLAVE_ADDR 0xffc02210 /* TWI Slave Mode Address Register */
106#define TWI1_MASTER_CTRL 0xffc02214 /* TWI Master Mode Control Register */
107#define TWI1_MASTER_STAT 0xffc02218 /* TWI Master Mode Status Register */
108#define TWI1_MASTER_ADDR 0xffc0221c /* TWI Master Mode Address Register */
109#define TWI1_INT_STAT 0xffc02220 /* TWI Interrupt Status Register */
110#define TWI1_INT_MASK 0xffc02224 /* TWI Interrupt Mask Register */
111#define TWI1_FIFO_CTRL 0xffc02228 /* TWI FIFO Control Register */
112#define TWI1_FIFO_STAT 0xffc0222c /* TWI FIFO Status Register */
113#define TWI1_XMT_DATA8 0xffc02280 /* TWI FIFO Transmit Data Single Byte Register */
114#define TWI1_XMT_DATA16 0xffc02284 /* TWI FIFO Transmit Data Double Byte Register */
115#define TWI1_RCV_DATA8 0xffc02288 /* TWI FIFO Receive Data Single Byte Register */
116#define TWI1_RCV_DATA16 0xffc0228c /* TWI FIFO Receive Data Double Byte Register */
117
118/* SPI2 Registers */
119
120#define SPI2_REGBASE 0xffc02400
121#define SPI2_CTL 0xffc02400 /* SPI2 Control Register */
122#define SPI2_FLG 0xffc02404 /* SPI2 Flag Register */
123#define SPI2_STAT 0xffc02408 /* SPI2 Status Register */
124#define SPI2_TDBR 0xffc0240c /* SPI2 Transmit Data Buffer Register */
125#define SPI2_RDBR 0xffc02410 /* SPI2 Receive Data Buffer Register */
126#define SPI2_BAUD 0xffc02414 /* SPI2 Baud Rate Register */
127#define SPI2_SHADOW 0xffc02418 /* SPI2 Receive Data Buffer Shadow Register */
128 20
129/* MXVR Registers */ 21/* MXVR Registers */
130 22
@@ -296,2418 +188,4 @@
296#define MXVR_PIN_CTL 0xffc028dc /* MXVR Pin Control Register */ 188#define MXVR_PIN_CTL 0xffc028dc /* MXVR Pin Control Register */
297#define MXVR_SCLK_CNT 0xffc028e0 /* MXVR System Clock Counter Register */ 189#define MXVR_SCLK_CNT 0xffc028e0 /* MXVR System Clock Counter Register */
298 190
299/* CAN Controller 1 Config 1 Registers */
300
301#define CAN1_MC1 0xffc03200 /* CAN Controller 1 Mailbox Configuration Register 1 */
302#define CAN1_MD1 0xffc03204 /* CAN Controller 1 Mailbox Direction Register 1 */
303#define CAN1_TRS1 0xffc03208 /* CAN Controller 1 Transmit Request Set Register 1 */
304#define CAN1_TRR1 0xffc0320c /* CAN Controller 1 Transmit Request Reset Register 1 */
305#define CAN1_TA1 0xffc03210 /* CAN Controller 1 Transmit Acknowledge Register 1 */
306#define CAN1_AA1 0xffc03214 /* CAN Controller 1 Abort Acknowledge Register 1 */
307#define CAN1_RMP1 0xffc03218 /* CAN Controller 1 Receive Message Pending Register 1 */
308#define CAN1_RML1 0xffc0321c /* CAN Controller 1 Receive Message Lost Register 1 */
309#define CAN1_MBTIF1 0xffc03220 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 1 */
310#define CAN1_MBRIF1 0xffc03224 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 1 */
311#define CAN1_MBIM1 0xffc03228 /* CAN Controller 1 Mailbox Interrupt Mask Register 1 */
312#define CAN1_RFH1 0xffc0322c /* CAN Controller 1 Remote Frame Handling Enable Register 1 */
313#define CAN1_OPSS1 0xffc03230 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 1 */
314
315/* CAN Controller 1 Config 2 Registers */
316
317#define CAN1_MC2 0xffc03240 /* CAN Controller 1 Mailbox Configuration Register 2 */
318#define CAN1_MD2 0xffc03244 /* CAN Controller 1 Mailbox Direction Register 2 */
319#define CAN1_TRS2 0xffc03248 /* CAN Controller 1 Transmit Request Set Register 2 */
320#define CAN1_TRR2 0xffc0324c /* CAN Controller 1 Transmit Request Reset Register 2 */
321#define CAN1_TA2 0xffc03250 /* CAN Controller 1 Transmit Acknowledge Register 2 */
322#define CAN1_AA2 0xffc03254 /* CAN Controller 1 Abort Acknowledge Register 2 */
323#define CAN1_RMP2 0xffc03258 /* CAN Controller 1 Receive Message Pending Register 2 */
324#define CAN1_RML2 0xffc0325c /* CAN Controller 1 Receive Message Lost Register 2 */
325#define CAN1_MBTIF2 0xffc03260 /* CAN Controller 1 Mailbox Transmit Interrupt Flag Register 2 */
326#define CAN1_MBRIF2 0xffc03264 /* CAN Controller 1 Mailbox Receive Interrupt Flag Register 2 */
327#define CAN1_MBIM2 0xffc03268 /* CAN Controller 1 Mailbox Interrupt Mask Register 2 */
328#define CAN1_RFH2 0xffc0326c /* CAN Controller 1 Remote Frame Handling Enable Register 2 */
329#define CAN1_OPSS2 0xffc03270 /* CAN Controller 1 Overwrite Protection Single Shot Transmit Register 2 */
330
331/* CAN Controller 1 Clock/Interrupt/Counter Registers */
332
333#define CAN1_CLOCK 0xffc03280 /* CAN Controller 1 Clock Register */
334#define CAN1_TIMING 0xffc03284 /* CAN Controller 1 Timing Register */
335#define CAN1_DEBUG 0xffc03288 /* CAN Controller 1 Debug Register */
336#define CAN1_STATUS 0xffc0328c /* CAN Controller 1 Global Status Register */
337#define CAN1_CEC 0xffc03290 /* CAN Controller 1 Error Counter Register */
338#define CAN1_GIS 0xffc03294 /* CAN Controller 1 Global Interrupt Status Register */
339#define CAN1_GIM 0xffc03298 /* CAN Controller 1 Global Interrupt Mask Register */
340#define CAN1_GIF 0xffc0329c /* CAN Controller 1 Global Interrupt Flag Register */
341#define CAN1_CONTROL 0xffc032a0 /* CAN Controller 1 Master Control Register */
342#define CAN1_INTR 0xffc032a4 /* CAN Controller 1 Interrupt Pending Register */
343#define CAN1_MBTD 0xffc032ac /* CAN Controller 1 Mailbox Temporary Disable Register */
344#define CAN1_EWR 0xffc032b0 /* CAN Controller 1 Programmable Warning Level Register */
345#define CAN1_ESR 0xffc032b4 /* CAN Controller 1 Error Status Register */
346#define CAN1_UCCNT 0xffc032c4 /* CAN Controller 1 Universal Counter Register */
347#define CAN1_UCRC 0xffc032c8 /* CAN Controller 1 Universal Counter Force Reload Register */
348#define CAN1_UCCNF 0xffc032cc /* CAN Controller 1 Universal Counter Configuration Register */
349
350/* CAN Controller 1 Mailbox Acceptance Registers */
351
352#define CAN1_AM00L 0xffc03300 /* CAN Controller 1 Mailbox 0 Acceptance Mask High Register */
353#define CAN1_AM00H 0xffc03304 /* CAN Controller 1 Mailbox 0 Acceptance Mask Low Register */
354#define CAN1_AM01L 0xffc03308 /* CAN Controller 1 Mailbox 1 Acceptance Mask High Register */
355#define CAN1_AM01H 0xffc0330c /* CAN Controller 1 Mailbox 1 Acceptance Mask Low Register */
356#define CAN1_AM02L 0xffc03310 /* CAN Controller 1 Mailbox 2 Acceptance Mask High Register */
357#define CAN1_AM02H 0xffc03314 /* CAN Controller 1 Mailbox 2 Acceptance Mask Low Register */
358#define CAN1_AM03L 0xffc03318 /* CAN Controller 1 Mailbox 3 Acceptance Mask High Register */
359#define CAN1_AM03H 0xffc0331c /* CAN Controller 1 Mailbox 3 Acceptance Mask Low Register */
360#define CAN1_AM04L 0xffc03320 /* CAN Controller 1 Mailbox 4 Acceptance Mask High Register */
361#define CAN1_AM04H 0xffc03324 /* CAN Controller 1 Mailbox 4 Acceptance Mask Low Register */
362#define CAN1_AM05L 0xffc03328 /* CAN Controller 1 Mailbox 5 Acceptance Mask High Register */
363#define CAN1_AM05H 0xffc0332c /* CAN Controller 1 Mailbox 5 Acceptance Mask Low Register */
364#define CAN1_AM06L 0xffc03330 /* CAN Controller 1 Mailbox 6 Acceptance Mask High Register */
365#define CAN1_AM06H 0xffc03334 /* CAN Controller 1 Mailbox 6 Acceptance Mask Low Register */
366#define CAN1_AM07L 0xffc03338 /* CAN Controller 1 Mailbox 7 Acceptance Mask High Register */
367#define CAN1_AM07H 0xffc0333c /* CAN Controller 1 Mailbox 7 Acceptance Mask Low Register */
368#define CAN1_AM08L 0xffc03340 /* CAN Controller 1 Mailbox 8 Acceptance Mask High Register */
369#define CAN1_AM08H 0xffc03344 /* CAN Controller 1 Mailbox 8 Acceptance Mask Low Register */
370#define CAN1_AM09L 0xffc03348 /* CAN Controller 1 Mailbox 9 Acceptance Mask High Register */
371#define CAN1_AM09H 0xffc0334c /* CAN Controller 1 Mailbox 9 Acceptance Mask Low Register */
372#define CAN1_AM10L 0xffc03350 /* CAN Controller 1 Mailbox 10 Acceptance Mask High Register */
373#define CAN1_AM10H 0xffc03354 /* CAN Controller 1 Mailbox 10 Acceptance Mask Low Register */
374#define CAN1_AM11L 0xffc03358 /* CAN Controller 1 Mailbox 11 Acceptance Mask High Register */
375#define CAN1_AM11H 0xffc0335c /* CAN Controller 1 Mailbox 11 Acceptance Mask Low Register */
376#define CAN1_AM12L 0xffc03360 /* CAN Controller 1 Mailbox 12 Acceptance Mask High Register */
377#define CAN1_AM12H 0xffc03364 /* CAN Controller 1 Mailbox 12 Acceptance Mask Low Register */
378#define CAN1_AM13L 0xffc03368 /* CAN Controller 1 Mailbox 13 Acceptance Mask High Register */
379#define CAN1_AM13H 0xffc0336c /* CAN Controller 1 Mailbox 13 Acceptance Mask Low Register */
380#define CAN1_AM14L 0xffc03370 /* CAN Controller 1 Mailbox 14 Acceptance Mask High Register */
381#define CAN1_AM14H 0xffc03374 /* CAN Controller 1 Mailbox 14 Acceptance Mask Low Register */
382#define CAN1_AM15L 0xffc03378 /* CAN Controller 1 Mailbox 15 Acceptance Mask High Register */
383#define CAN1_AM15H 0xffc0337c /* CAN Controller 1 Mailbox 15 Acceptance Mask Low Register */
384
385/* CAN Controller 1 Mailbox Acceptance Registers */
386
387#define CAN1_AM16L 0xffc03380 /* CAN Controller 1 Mailbox 16 Acceptance Mask High Register */
388#define CAN1_AM16H 0xffc03384 /* CAN Controller 1 Mailbox 16 Acceptance Mask Low Register */
389#define CAN1_AM17L 0xffc03388 /* CAN Controller 1 Mailbox 17 Acceptance Mask High Register */
390#define CAN1_AM17H 0xffc0338c /* CAN Controller 1 Mailbox 17 Acceptance Mask Low Register */
391#define CAN1_AM18L 0xffc03390 /* CAN Controller 1 Mailbox 18 Acceptance Mask High Register */
392#define CAN1_AM18H 0xffc03394 /* CAN Controller 1 Mailbox 18 Acceptance Mask Low Register */
393#define CAN1_AM19L 0xffc03398 /* CAN Controller 1 Mailbox 19 Acceptance Mask High Register */
394#define CAN1_AM19H 0xffc0339c /* CAN Controller 1 Mailbox 19 Acceptance Mask Low Register */
395#define CAN1_AM20L 0xffc033a0 /* CAN Controller 1 Mailbox 20 Acceptance Mask High Register */
396#define CAN1_AM20H 0xffc033a4 /* CAN Controller 1 Mailbox 20 Acceptance Mask Low Register */
397#define CAN1_AM21L 0xffc033a8 /* CAN Controller 1 Mailbox 21 Acceptance Mask High Register */
398#define CAN1_AM21H 0xffc033ac /* CAN Controller 1 Mailbox 21 Acceptance Mask Low Register */
399#define CAN1_AM22L 0xffc033b0 /* CAN Controller 1 Mailbox 22 Acceptance Mask High Register */
400#define CAN1_AM22H 0xffc033b4 /* CAN Controller 1 Mailbox 22 Acceptance Mask Low Register */
401#define CAN1_AM23L 0xffc033b8 /* CAN Controller 1 Mailbox 23 Acceptance Mask High Register */
402#define CAN1_AM23H 0xffc033bc /* CAN Controller 1 Mailbox 23 Acceptance Mask Low Register */
403#define CAN1_AM24L 0xffc033c0 /* CAN Controller 1 Mailbox 24 Acceptance Mask High Register */
404#define CAN1_AM24H 0xffc033c4 /* CAN Controller 1 Mailbox 24 Acceptance Mask Low Register */
405#define CAN1_AM25L 0xffc033c8 /* CAN Controller 1 Mailbox 25 Acceptance Mask High Register */
406#define CAN1_AM25H 0xffc033cc /* CAN Controller 1 Mailbox 25 Acceptance Mask Low Register */
407#define CAN1_AM26L 0xffc033d0 /* CAN Controller 1 Mailbox 26 Acceptance Mask High Register */
408#define CAN1_AM26H 0xffc033d4 /* CAN Controller 1 Mailbox 26 Acceptance Mask Low Register */
409#define CAN1_AM27L 0xffc033d8 /* CAN Controller 1 Mailbox 27 Acceptance Mask High Register */
410#define CAN1_AM27H 0xffc033dc /* CAN Controller 1 Mailbox 27 Acceptance Mask Low Register */
411#define CAN1_AM28L 0xffc033e0 /* CAN Controller 1 Mailbox 28 Acceptance Mask High Register */
412#define CAN1_AM28H 0xffc033e4 /* CAN Controller 1 Mailbox 28 Acceptance Mask Low Register */
413#define CAN1_AM29L 0xffc033e8 /* CAN Controller 1 Mailbox 29 Acceptance Mask High Register */
414#define CAN1_AM29H 0xffc033ec /* CAN Controller 1 Mailbox 29 Acceptance Mask Low Register */
415#define CAN1_AM30L 0xffc033f0 /* CAN Controller 1 Mailbox 30 Acceptance Mask High Register */
416#define CAN1_AM30H 0xffc033f4 /* CAN Controller 1 Mailbox 30 Acceptance Mask Low Register */
417#define CAN1_AM31L 0xffc033f8 /* CAN Controller 1 Mailbox 31 Acceptance Mask High Register */
418#define CAN1_AM31H 0xffc033fc /* CAN Controller 1 Mailbox 31 Acceptance Mask Low Register */
419
420/* CAN Controller 1 Mailbox Data Registers */
421
422#define CAN1_MB00_DATA0 0xffc03400 /* CAN Controller 1 Mailbox 0 Data 0 Register */
423#define CAN1_MB00_DATA1 0xffc03404 /* CAN Controller 1 Mailbox 0 Data 1 Register */
424#define CAN1_MB00_DATA2 0xffc03408 /* CAN Controller 1 Mailbox 0 Data 2 Register */
425#define CAN1_MB00_DATA3 0xffc0340c /* CAN Controller 1 Mailbox 0 Data 3 Register */
426#define CAN1_MB00_LENGTH 0xffc03410 /* CAN Controller 1 Mailbox 0 Length Register */
427#define CAN1_MB00_TIMESTAMP 0xffc03414 /* CAN Controller 1 Mailbox 0 Timestamp Register */
428#define CAN1_MB00_ID0 0xffc03418 /* CAN Controller 1 Mailbox 0 ID0 Register */
429#define CAN1_MB00_ID1 0xffc0341c /* CAN Controller 1 Mailbox 0 ID1 Register */
430#define CAN1_MB01_DATA0 0xffc03420 /* CAN Controller 1 Mailbox 1 Data 0 Register */
431#define CAN1_MB01_DATA1 0xffc03424 /* CAN Controller 1 Mailbox 1 Data 1 Register */
432#define CAN1_MB01_DATA2 0xffc03428 /* CAN Controller 1 Mailbox 1 Data 2 Register */
433#define CAN1_MB01_DATA3 0xffc0342c /* CAN Controller 1 Mailbox 1 Data 3 Register */
434#define CAN1_MB01_LENGTH 0xffc03430 /* CAN Controller 1 Mailbox 1 Length Register */
435#define CAN1_MB01_TIMESTAMP 0xffc03434 /* CAN Controller 1 Mailbox 1 Timestamp Register */
436#define CAN1_MB01_ID0 0xffc03438 /* CAN Controller 1 Mailbox 1 ID0 Register */
437#define CAN1_MB01_ID1 0xffc0343c /* CAN Controller 1 Mailbox 1 ID1 Register */
438#define CAN1_MB02_DATA0 0xffc03440 /* CAN Controller 1 Mailbox 2 Data 0 Register */
439#define CAN1_MB02_DATA1 0xffc03444 /* CAN Controller 1 Mailbox 2 Data 1 Register */
440#define CAN1_MB02_DATA2 0xffc03448 /* CAN Controller 1 Mailbox 2 Data 2 Register */
441#define CAN1_MB02_DATA3 0xffc0344c /* CAN Controller 1 Mailbox 2 Data 3 Register */
442#define CAN1_MB02_LENGTH 0xffc03450 /* CAN Controller 1 Mailbox 2 Length Register */
443#define CAN1_MB02_TIMESTAMP 0xffc03454 /* CAN Controller 1 Mailbox 2 Timestamp Register */
444#define CAN1_MB02_ID0 0xffc03458 /* CAN Controller 1 Mailbox 2 ID0 Register */
445#define CAN1_MB02_ID1 0xffc0345c /* CAN Controller 1 Mailbox 2 ID1 Register */
446#define CAN1_MB03_DATA0 0xffc03460 /* CAN Controller 1 Mailbox 3 Data 0 Register */
447#define CAN1_MB03_DATA1 0xffc03464 /* CAN Controller 1 Mailbox 3 Data 1 Register */
448#define CAN1_MB03_DATA2 0xffc03468 /* CAN Controller 1 Mailbox 3 Data 2 Register */
449#define CAN1_MB03_DATA3 0xffc0346c /* CAN Controller 1 Mailbox 3 Data 3 Register */
450#define CAN1_MB03_LENGTH 0xffc03470 /* CAN Controller 1 Mailbox 3 Length Register */
451#define CAN1_MB03_TIMESTAMP 0xffc03474 /* CAN Controller 1 Mailbox 3 Timestamp Register */
452#define CAN1_MB03_ID0 0xffc03478 /* CAN Controller 1 Mailbox 3 ID0 Register */
453#define CAN1_MB03_ID1 0xffc0347c /* CAN Controller 1 Mailbox 3 ID1 Register */
454#define CAN1_MB04_DATA0 0xffc03480 /* CAN Controller 1 Mailbox 4 Data 0 Register */
455#define CAN1_MB04_DATA1 0xffc03484 /* CAN Controller 1 Mailbox 4 Data 1 Register */
456#define CAN1_MB04_DATA2 0xffc03488 /* CAN Controller 1 Mailbox 4 Data 2 Register */
457#define CAN1_MB04_DATA3 0xffc0348c /* CAN Controller 1 Mailbox 4 Data 3 Register */
458#define CAN1_MB04_LENGTH 0xffc03490 /* CAN Controller 1 Mailbox 4 Length Register */
459#define CAN1_MB04_TIMESTAMP 0xffc03494 /* CAN Controller 1 Mailbox 4 Timestamp Register */
460#define CAN1_MB04_ID0 0xffc03498 /* CAN Controller 1 Mailbox 4 ID0 Register */
461#define CAN1_MB04_ID1 0xffc0349c /* CAN Controller 1 Mailbox 4 ID1 Register */
462#define CAN1_MB05_DATA0 0xffc034a0 /* CAN Controller 1 Mailbox 5 Data 0 Register */
463#define CAN1_MB05_DATA1 0xffc034a4 /* CAN Controller 1 Mailbox 5 Data 1 Register */
464#define CAN1_MB05_DATA2 0xffc034a8 /* CAN Controller 1 Mailbox 5 Data 2 Register */
465#define CAN1_MB05_DATA3 0xffc034ac /* CAN Controller 1 Mailbox 5 Data 3 Register */
466#define CAN1_MB05_LENGTH 0xffc034b0 /* CAN Controller 1 Mailbox 5 Length Register */
467#define CAN1_MB05_TIMESTAMP 0xffc034b4 /* CAN Controller 1 Mailbox 5 Timestamp Register */
468#define CAN1_MB05_ID0 0xffc034b8 /* CAN Controller 1 Mailbox 5 ID0 Register */
469#define CAN1_MB05_ID1 0xffc034bc /* CAN Controller 1 Mailbox 5 ID1 Register */
470#define CAN1_MB06_DATA0 0xffc034c0 /* CAN Controller 1 Mailbox 6 Data 0 Register */
471#define CAN1_MB06_DATA1 0xffc034c4 /* CAN Controller 1 Mailbox 6 Data 1 Register */
472#define CAN1_MB06_DATA2 0xffc034c8 /* CAN Controller 1 Mailbox 6 Data 2 Register */
473#define CAN1_MB06_DATA3 0xffc034cc /* CAN Controller 1 Mailbox 6 Data 3 Register */
474#define CAN1_MB06_LENGTH 0xffc034d0 /* CAN Controller 1 Mailbox 6 Length Register */
475#define CAN1_MB06_TIMESTAMP 0xffc034d4 /* CAN Controller 1 Mailbox 6 Timestamp Register */
476#define CAN1_MB06_ID0 0xffc034d8 /* CAN Controller 1 Mailbox 6 ID0 Register */
477#define CAN1_MB06_ID1 0xffc034dc /* CAN Controller 1 Mailbox 6 ID1 Register */
478#define CAN1_MB07_DATA0 0xffc034e0 /* CAN Controller 1 Mailbox 7 Data 0 Register */
479#define CAN1_MB07_DATA1 0xffc034e4 /* CAN Controller 1 Mailbox 7 Data 1 Register */
480#define CAN1_MB07_DATA2 0xffc034e8 /* CAN Controller 1 Mailbox 7 Data 2 Register */
481#define CAN1_MB07_DATA3 0xffc034ec /* CAN Controller 1 Mailbox 7 Data 3 Register */
482#define CAN1_MB07_LENGTH 0xffc034f0 /* CAN Controller 1 Mailbox 7 Length Register */
483#define CAN1_MB07_TIMESTAMP 0xffc034f4 /* CAN Controller 1 Mailbox 7 Timestamp Register */
484#define CAN1_MB07_ID0 0xffc034f8 /* CAN Controller 1 Mailbox 7 ID0 Register */
485#define CAN1_MB07_ID1 0xffc034fc /* CAN Controller 1 Mailbox 7 ID1 Register */
486#define CAN1_MB08_DATA0 0xffc03500 /* CAN Controller 1 Mailbox 8 Data 0 Register */
487#define CAN1_MB08_DATA1 0xffc03504 /* CAN Controller 1 Mailbox 8 Data 1 Register */
488#define CAN1_MB08_DATA2 0xffc03508 /* CAN Controller 1 Mailbox 8 Data 2 Register */
489#define CAN1_MB08_DATA3 0xffc0350c /* CAN Controller 1 Mailbox 8 Data 3 Register */
490#define CAN1_MB08_LENGTH 0xffc03510 /* CAN Controller 1 Mailbox 8 Length Register */
491#define CAN1_MB08_TIMESTAMP 0xffc03514 /* CAN Controller 1 Mailbox 8 Timestamp Register */
492#define CAN1_MB08_ID0 0xffc03518 /* CAN Controller 1 Mailbox 8 ID0 Register */
493#define CAN1_MB08_ID1 0xffc0351c /* CAN Controller 1 Mailbox 8 ID1 Register */
494#define CAN1_MB09_DATA0 0xffc03520 /* CAN Controller 1 Mailbox 9 Data 0 Register */
495#define CAN1_MB09_DATA1 0xffc03524 /* CAN Controller 1 Mailbox 9 Data 1 Register */
496#define CAN1_MB09_DATA2 0xffc03528 /* CAN Controller 1 Mailbox 9 Data 2 Register */
497#define CAN1_MB09_DATA3 0xffc0352c /* CAN Controller 1 Mailbox 9 Data 3 Register */
498#define CAN1_MB09_LENGTH 0xffc03530 /* CAN Controller 1 Mailbox 9 Length Register */
499#define CAN1_MB09_TIMESTAMP 0xffc03534 /* CAN Controller 1 Mailbox 9 Timestamp Register */
500#define CAN1_MB09_ID0 0xffc03538 /* CAN Controller 1 Mailbox 9 ID0 Register */
501#define CAN1_MB09_ID1 0xffc0353c /* CAN Controller 1 Mailbox 9 ID1 Register */
502#define CAN1_MB10_DATA0 0xffc03540 /* CAN Controller 1 Mailbox 10 Data 0 Register */
503#define CAN1_MB10_DATA1 0xffc03544 /* CAN Controller 1 Mailbox 10 Data 1 Register */
504#define CAN1_MB10_DATA2 0xffc03548 /* CAN Controller 1 Mailbox 10 Data 2 Register */
505#define CAN1_MB10_DATA3 0xffc0354c /* CAN Controller 1 Mailbox 10 Data 3 Register */
506#define CAN1_MB10_LENGTH 0xffc03550 /* CAN Controller 1 Mailbox 10 Length Register */
507#define CAN1_MB10_TIMESTAMP 0xffc03554 /* CAN Controller 1 Mailbox 10 Timestamp Register */
508#define CAN1_MB10_ID0 0xffc03558 /* CAN Controller 1 Mailbox 10 ID0 Register */
509#define CAN1_MB10_ID1 0xffc0355c /* CAN Controller 1 Mailbox 10 ID1 Register */
510#define CAN1_MB11_DATA0 0xffc03560 /* CAN Controller 1 Mailbox 11 Data 0 Register */
511#define CAN1_MB11_DATA1 0xffc03564 /* CAN Controller 1 Mailbox 11 Data 1 Register */
512#define CAN1_MB11_DATA2 0xffc03568 /* CAN Controller 1 Mailbox 11 Data 2 Register */
513#define CAN1_MB11_DATA3 0xffc0356c /* CAN Controller 1 Mailbox 11 Data 3 Register */
514#define CAN1_MB11_LENGTH 0xffc03570 /* CAN Controller 1 Mailbox 11 Length Register */
515#define CAN1_MB11_TIMESTAMP 0xffc03574 /* CAN Controller 1 Mailbox 11 Timestamp Register */
516#define CAN1_MB11_ID0 0xffc03578 /* CAN Controller 1 Mailbox 11 ID0 Register */
517#define CAN1_MB11_ID1 0xffc0357c /* CAN Controller 1 Mailbox 11 ID1 Register */
518#define CAN1_MB12_DATA0 0xffc03580 /* CAN Controller 1 Mailbox 12 Data 0 Register */
519#define CAN1_MB12_DATA1 0xffc03584 /* CAN Controller 1 Mailbox 12 Data 1 Register */
520#define CAN1_MB12_DATA2 0xffc03588 /* CAN Controller 1 Mailbox 12 Data 2 Register */
521#define CAN1_MB12_DATA3 0xffc0358c /* CAN Controller 1 Mailbox 12 Data 3 Register */
522#define CAN1_MB12_LENGTH 0xffc03590 /* CAN Controller 1 Mailbox 12 Length Register */
523#define CAN1_MB12_TIMESTAMP 0xffc03594 /* CAN Controller 1 Mailbox 12 Timestamp Register */
524#define CAN1_MB12_ID0 0xffc03598 /* CAN Controller 1 Mailbox 12 ID0 Register */
525#define CAN1_MB12_ID1 0xffc0359c /* CAN Controller 1 Mailbox 12 ID1 Register */
526#define CAN1_MB13_DATA0 0xffc035a0 /* CAN Controller 1 Mailbox 13 Data 0 Register */
527#define CAN1_MB13_DATA1 0xffc035a4 /* CAN Controller 1 Mailbox 13 Data 1 Register */
528#define CAN1_MB13_DATA2 0xffc035a8 /* CAN Controller 1 Mailbox 13 Data 2 Register */
529#define CAN1_MB13_DATA3 0xffc035ac /* CAN Controller 1 Mailbox 13 Data 3 Register */
530#define CAN1_MB13_LENGTH 0xffc035b0 /* CAN Controller 1 Mailbox 13 Length Register */
531#define CAN1_MB13_TIMESTAMP 0xffc035b4 /* CAN Controller 1 Mailbox 13 Timestamp Register */
532#define CAN1_MB13_ID0 0xffc035b8 /* CAN Controller 1 Mailbox 13 ID0 Register */
533#define CAN1_MB13_ID1 0xffc035bc /* CAN Controller 1 Mailbox 13 ID1 Register */
534#define CAN1_MB14_DATA0 0xffc035c0 /* CAN Controller 1 Mailbox 14 Data 0 Register */
535#define CAN1_MB14_DATA1 0xffc035c4 /* CAN Controller 1 Mailbox 14 Data 1 Register */
536#define CAN1_MB14_DATA2 0xffc035c8 /* CAN Controller 1 Mailbox 14 Data 2 Register */
537#define CAN1_MB14_DATA3 0xffc035cc /* CAN Controller 1 Mailbox 14 Data 3 Register */
538#define CAN1_MB14_LENGTH 0xffc035d0 /* CAN Controller 1 Mailbox 14 Length Register */
539#define CAN1_MB14_TIMESTAMP 0xffc035d4 /* CAN Controller 1 Mailbox 14 Timestamp Register */
540#define CAN1_MB14_ID0 0xffc035d8 /* CAN Controller 1 Mailbox 14 ID0 Register */
541#define CAN1_MB14_ID1 0xffc035dc /* CAN Controller 1 Mailbox 14 ID1 Register */
542#define CAN1_MB15_DATA0 0xffc035e0 /* CAN Controller 1 Mailbox 15 Data 0 Register */
543#define CAN1_MB15_DATA1 0xffc035e4 /* CAN Controller 1 Mailbox 15 Data 1 Register */
544#define CAN1_MB15_DATA2 0xffc035e8 /* CAN Controller 1 Mailbox 15 Data 2 Register */
545#define CAN1_MB15_DATA3 0xffc035ec /* CAN Controller 1 Mailbox 15 Data 3 Register */
546#define CAN1_MB15_LENGTH 0xffc035f0 /* CAN Controller 1 Mailbox 15 Length Register */
547#define CAN1_MB15_TIMESTAMP 0xffc035f4 /* CAN Controller 1 Mailbox 15 Timestamp Register */
548#define CAN1_MB15_ID0 0xffc035f8 /* CAN Controller 1 Mailbox 15 ID0 Register */
549#define CAN1_MB15_ID1 0xffc035fc /* CAN Controller 1 Mailbox 15 ID1 Register */
550
551/* CAN Controller 1 Mailbox Data Registers */
552
553#define CAN1_MB16_DATA0 0xffc03600 /* CAN Controller 1 Mailbox 16 Data 0 Register */
554#define CAN1_MB16_DATA1 0xffc03604 /* CAN Controller 1 Mailbox 16 Data 1 Register */
555#define CAN1_MB16_DATA2 0xffc03608 /* CAN Controller 1 Mailbox 16 Data 2 Register */
556#define CAN1_MB16_DATA3 0xffc0360c /* CAN Controller 1 Mailbox 16 Data 3 Register */
557#define CAN1_MB16_LENGTH 0xffc03610 /* CAN Controller 1 Mailbox 16 Length Register */
558#define CAN1_MB16_TIMESTAMP 0xffc03614 /* CAN Controller 1 Mailbox 16 Timestamp Register */
559#define CAN1_MB16_ID0 0xffc03618 /* CAN Controller 1 Mailbox 16 ID0 Register */
560#define CAN1_MB16_ID1 0xffc0361c /* CAN Controller 1 Mailbox 16 ID1 Register */
561#define CAN1_MB17_DATA0 0xffc03620 /* CAN Controller 1 Mailbox 17 Data 0 Register */
562#define CAN1_MB17_DATA1 0xffc03624 /* CAN Controller 1 Mailbox 17 Data 1 Register */
563#define CAN1_MB17_DATA2 0xffc03628 /* CAN Controller 1 Mailbox 17 Data 2 Register */
564#define CAN1_MB17_DATA3 0xffc0362c /* CAN Controller 1 Mailbox 17 Data 3 Register */
565#define CAN1_MB17_LENGTH 0xffc03630 /* CAN Controller 1 Mailbox 17 Length Register */
566#define CAN1_MB17_TIMESTAMP 0xffc03634 /* CAN Controller 1 Mailbox 17 Timestamp Register */
567#define CAN1_MB17_ID0 0xffc03638 /* CAN Controller 1 Mailbox 17 ID0 Register */
568#define CAN1_MB17_ID1 0xffc0363c /* CAN Controller 1 Mailbox 17 ID1 Register */
569#define CAN1_MB18_DATA0 0xffc03640 /* CAN Controller 1 Mailbox 18 Data 0 Register */
570#define CAN1_MB18_DATA1 0xffc03644 /* CAN Controller 1 Mailbox 18 Data 1 Register */
571#define CAN1_MB18_DATA2 0xffc03648 /* CAN Controller 1 Mailbox 18 Data 2 Register */
572#define CAN1_MB18_DATA3 0xffc0364c /* CAN Controller 1 Mailbox 18 Data 3 Register */
573#define CAN1_MB18_LENGTH 0xffc03650 /* CAN Controller 1 Mailbox 18 Length Register */
574#define CAN1_MB18_TIMESTAMP 0xffc03654 /* CAN Controller 1 Mailbox 18 Timestamp Register */
575#define CAN1_MB18_ID0 0xffc03658 /* CAN Controller 1 Mailbox 18 ID0 Register */
576#define CAN1_MB18_ID1 0xffc0365c /* CAN Controller 1 Mailbox 18 ID1 Register */
577#define CAN1_MB19_DATA0 0xffc03660 /* CAN Controller 1 Mailbox 19 Data 0 Register */
578#define CAN1_MB19_DATA1 0xffc03664 /* CAN Controller 1 Mailbox 19 Data 1 Register */
579#define CAN1_MB19_DATA2 0xffc03668 /* CAN Controller 1 Mailbox 19 Data 2 Register */
580#define CAN1_MB19_DATA3 0xffc0366c /* CAN Controller 1 Mailbox 19 Data 3 Register */
581#define CAN1_MB19_LENGTH 0xffc03670 /* CAN Controller 1 Mailbox 19 Length Register */
582#define CAN1_MB19_TIMESTAMP 0xffc03674 /* CAN Controller 1 Mailbox 19 Timestamp Register */
583#define CAN1_MB19_ID0 0xffc03678 /* CAN Controller 1 Mailbox 19 ID0 Register */
584#define CAN1_MB19_ID1 0xffc0367c /* CAN Controller 1 Mailbox 19 ID1 Register */
585#define CAN1_MB20_DATA0 0xffc03680 /* CAN Controller 1 Mailbox 20 Data 0 Register */
586#define CAN1_MB20_DATA1 0xffc03684 /* CAN Controller 1 Mailbox 20 Data 1 Register */
587#define CAN1_MB20_DATA2 0xffc03688 /* CAN Controller 1 Mailbox 20 Data 2 Register */
588#define CAN1_MB20_DATA3 0xffc0368c /* CAN Controller 1 Mailbox 20 Data 3 Register */
589#define CAN1_MB20_LENGTH 0xffc03690 /* CAN Controller 1 Mailbox 20 Length Register */
590#define CAN1_MB20_TIMESTAMP 0xffc03694 /* CAN Controller 1 Mailbox 20 Timestamp Register */
591#define CAN1_MB20_ID0 0xffc03698 /* CAN Controller 1 Mailbox 20 ID0 Register */
592#define CAN1_MB20_ID1 0xffc0369c /* CAN Controller 1 Mailbox 20 ID1 Register */
593#define CAN1_MB21_DATA0 0xffc036a0 /* CAN Controller 1 Mailbox 21 Data 0 Register */
594#define CAN1_MB21_DATA1 0xffc036a4 /* CAN Controller 1 Mailbox 21 Data 1 Register */
595#define CAN1_MB21_DATA2 0xffc036a8 /* CAN Controller 1 Mailbox 21 Data 2 Register */
596#define CAN1_MB21_DATA3 0xffc036ac /* CAN Controller 1 Mailbox 21 Data 3 Register */
597#define CAN1_MB21_LENGTH 0xffc036b0 /* CAN Controller 1 Mailbox 21 Length Register */
598#define CAN1_MB21_TIMESTAMP 0xffc036b4 /* CAN Controller 1 Mailbox 21 Timestamp Register */
599#define CAN1_MB21_ID0 0xffc036b8 /* CAN Controller 1 Mailbox 21 ID0 Register */
600#define CAN1_MB21_ID1 0xffc036bc /* CAN Controller 1 Mailbox 21 ID1 Register */
601#define CAN1_MB22_DATA0 0xffc036c0 /* CAN Controller 1 Mailbox 22 Data 0 Register */
602#define CAN1_MB22_DATA1 0xffc036c4 /* CAN Controller 1 Mailbox 22 Data 1 Register */
603#define CAN1_MB22_DATA2 0xffc036c8 /* CAN Controller 1 Mailbox 22 Data 2 Register */
604#define CAN1_MB22_DATA3 0xffc036cc /* CAN Controller 1 Mailbox 22 Data 3 Register */
605#define CAN1_MB22_LENGTH 0xffc036d0 /* CAN Controller 1 Mailbox 22 Length Register */
606#define CAN1_MB22_TIMESTAMP 0xffc036d4 /* CAN Controller 1 Mailbox 22 Timestamp Register */
607#define CAN1_MB22_ID0 0xffc036d8 /* CAN Controller 1 Mailbox 22 ID0 Register */
608#define CAN1_MB22_ID1 0xffc036dc /* CAN Controller 1 Mailbox 22 ID1 Register */
609#define CAN1_MB23_DATA0 0xffc036e0 /* CAN Controller 1 Mailbox 23 Data 0 Register */
610#define CAN1_MB23_DATA1 0xffc036e4 /* CAN Controller 1 Mailbox 23 Data 1 Register */
611#define CAN1_MB23_DATA2 0xffc036e8 /* CAN Controller 1 Mailbox 23 Data 2 Register */
612#define CAN1_MB23_DATA3 0xffc036ec /* CAN Controller 1 Mailbox 23 Data 3 Register */
613#define CAN1_MB23_LENGTH 0xffc036f0 /* CAN Controller 1 Mailbox 23 Length Register */
614#define CAN1_MB23_TIMESTAMP 0xffc036f4 /* CAN Controller 1 Mailbox 23 Timestamp Register */
615#define CAN1_MB23_ID0 0xffc036f8 /* CAN Controller 1 Mailbox 23 ID0 Register */
616#define CAN1_MB23_ID1 0xffc036fc /* CAN Controller 1 Mailbox 23 ID1 Register */
617#define CAN1_MB24_DATA0 0xffc03700 /* CAN Controller 1 Mailbox 24 Data 0 Register */
618#define CAN1_MB24_DATA1 0xffc03704 /* CAN Controller 1 Mailbox 24 Data 1 Register */
619#define CAN1_MB24_DATA2 0xffc03708 /* CAN Controller 1 Mailbox 24 Data 2 Register */
620#define CAN1_MB24_DATA3 0xffc0370c /* CAN Controller 1 Mailbox 24 Data 3 Register */
621#define CAN1_MB24_LENGTH 0xffc03710 /* CAN Controller 1 Mailbox 24 Length Register */
622#define CAN1_MB24_TIMESTAMP 0xffc03714 /* CAN Controller 1 Mailbox 24 Timestamp Register */
623#define CAN1_MB24_ID0 0xffc03718 /* CAN Controller 1 Mailbox 24 ID0 Register */
624#define CAN1_MB24_ID1 0xffc0371c /* CAN Controller 1 Mailbox 24 ID1 Register */
625#define CAN1_MB25_DATA0 0xffc03720 /* CAN Controller 1 Mailbox 25 Data 0 Register */
626#define CAN1_MB25_DATA1 0xffc03724 /* CAN Controller 1 Mailbox 25 Data 1 Register */
627#define CAN1_MB25_DATA2 0xffc03728 /* CAN Controller 1 Mailbox 25 Data 2 Register */
628#define CAN1_MB25_DATA3 0xffc0372c /* CAN Controller 1 Mailbox 25 Data 3 Register */
629#define CAN1_MB25_LENGTH 0xffc03730 /* CAN Controller 1 Mailbox 25 Length Register */
630#define CAN1_MB25_TIMESTAMP 0xffc03734 /* CAN Controller 1 Mailbox 25 Timestamp Register */
631#define CAN1_MB25_ID0 0xffc03738 /* CAN Controller 1 Mailbox 25 ID0 Register */
632#define CAN1_MB25_ID1 0xffc0373c /* CAN Controller 1 Mailbox 25 ID1 Register */
633#define CAN1_MB26_DATA0 0xffc03740 /* CAN Controller 1 Mailbox 26 Data 0 Register */
634#define CAN1_MB26_DATA1 0xffc03744 /* CAN Controller 1 Mailbox 26 Data 1 Register */
635#define CAN1_MB26_DATA2 0xffc03748 /* CAN Controller 1 Mailbox 26 Data 2 Register */
636#define CAN1_MB26_DATA3 0xffc0374c /* CAN Controller 1 Mailbox 26 Data 3 Register */
637#define CAN1_MB26_LENGTH 0xffc03750 /* CAN Controller 1 Mailbox 26 Length Register */
638#define CAN1_MB26_TIMESTAMP 0xffc03754 /* CAN Controller 1 Mailbox 26 Timestamp Register */
639#define CAN1_MB26_ID0 0xffc03758 /* CAN Controller 1 Mailbox 26 ID0 Register */
640#define CAN1_MB26_ID1 0xffc0375c /* CAN Controller 1 Mailbox 26 ID1 Register */
641#define CAN1_MB27_DATA0 0xffc03760 /* CAN Controller 1 Mailbox 27 Data 0 Register */
642#define CAN1_MB27_DATA1 0xffc03764 /* CAN Controller 1 Mailbox 27 Data 1 Register */
643#define CAN1_MB27_DATA2 0xffc03768 /* CAN Controller 1 Mailbox 27 Data 2 Register */
644#define CAN1_MB27_DATA3 0xffc0376c /* CAN Controller 1 Mailbox 27 Data 3 Register */
645#define CAN1_MB27_LENGTH 0xffc03770 /* CAN Controller 1 Mailbox 27 Length Register */
646#define CAN1_MB27_TIMESTAMP 0xffc03774 /* CAN Controller 1 Mailbox 27 Timestamp Register */
647#define CAN1_MB27_ID0 0xffc03778 /* CAN Controller 1 Mailbox 27 ID0 Register */
648#define CAN1_MB27_ID1 0xffc0377c /* CAN Controller 1 Mailbox 27 ID1 Register */
649#define CAN1_MB28_DATA0 0xffc03780 /* CAN Controller 1 Mailbox 28 Data 0 Register */
650#define CAN1_MB28_DATA1 0xffc03784 /* CAN Controller 1 Mailbox 28 Data 1 Register */
651#define CAN1_MB28_DATA2 0xffc03788 /* CAN Controller 1 Mailbox 28 Data 2 Register */
652#define CAN1_MB28_DATA3 0xffc0378c /* CAN Controller 1 Mailbox 28 Data 3 Register */
653#define CAN1_MB28_LENGTH 0xffc03790 /* CAN Controller 1 Mailbox 28 Length Register */
654#define CAN1_MB28_TIMESTAMP 0xffc03794 /* CAN Controller 1 Mailbox 28 Timestamp Register */
655#define CAN1_MB28_ID0 0xffc03798 /* CAN Controller 1 Mailbox 28 ID0 Register */
656#define CAN1_MB28_ID1 0xffc0379c /* CAN Controller 1 Mailbox 28 ID1 Register */
657#define CAN1_MB29_DATA0 0xffc037a0 /* CAN Controller 1 Mailbox 29 Data 0 Register */
658#define CAN1_MB29_DATA1 0xffc037a4 /* CAN Controller 1 Mailbox 29 Data 1 Register */
659#define CAN1_MB29_DATA2 0xffc037a8 /* CAN Controller 1 Mailbox 29 Data 2 Register */
660#define CAN1_MB29_DATA3 0xffc037ac /* CAN Controller 1 Mailbox 29 Data 3 Register */
661#define CAN1_MB29_LENGTH 0xffc037b0 /* CAN Controller 1 Mailbox 29 Length Register */
662#define CAN1_MB29_TIMESTAMP 0xffc037b4 /* CAN Controller 1 Mailbox 29 Timestamp Register */
663#define CAN1_MB29_ID0 0xffc037b8 /* CAN Controller 1 Mailbox 29 ID0 Register */
664#define CAN1_MB29_ID1 0xffc037bc /* CAN Controller 1 Mailbox 29 ID1 Register */
665#define CAN1_MB30_DATA0 0xffc037c0 /* CAN Controller 1 Mailbox 30 Data 0 Register */
666#define CAN1_MB30_DATA1 0xffc037c4 /* CAN Controller 1 Mailbox 30 Data 1 Register */
667#define CAN1_MB30_DATA2 0xffc037c8 /* CAN Controller 1 Mailbox 30 Data 2 Register */
668#define CAN1_MB30_DATA3 0xffc037cc /* CAN Controller 1 Mailbox 30 Data 3 Register */
669#define CAN1_MB30_LENGTH 0xffc037d0 /* CAN Controller 1 Mailbox 30 Length Register */
670#define CAN1_MB30_TIMESTAMP 0xffc037d4 /* CAN Controller 1 Mailbox 30 Timestamp Register */
671#define CAN1_MB30_ID0 0xffc037d8 /* CAN Controller 1 Mailbox 30 ID0 Register */
672#define CAN1_MB30_ID1 0xffc037dc /* CAN Controller 1 Mailbox 30 ID1 Register */
673#define CAN1_MB31_DATA0 0xffc037e0 /* CAN Controller 1 Mailbox 31 Data 0 Register */
674#define CAN1_MB31_DATA1 0xffc037e4 /* CAN Controller 1 Mailbox 31 Data 1 Register */
675#define CAN1_MB31_DATA2 0xffc037e8 /* CAN Controller 1 Mailbox 31 Data 2 Register */
676#define CAN1_MB31_DATA3 0xffc037ec /* CAN Controller 1 Mailbox 31 Data 3 Register */
677#define CAN1_MB31_LENGTH 0xffc037f0 /* CAN Controller 1 Mailbox 31 Length Register */
678#define CAN1_MB31_TIMESTAMP 0xffc037f4 /* CAN Controller 1 Mailbox 31 Timestamp Register */
679#define CAN1_MB31_ID0 0xffc037f8 /* CAN Controller 1 Mailbox 31 ID0 Register */
680#define CAN1_MB31_ID1 0xffc037fc /* CAN Controller 1 Mailbox 31 ID1 Register */
681
682/* ATAPI Registers */
683
684#define ATAPI_CONTROL 0xffc03800 /* ATAPI Control Register */
685#define ATAPI_STATUS 0xffc03804 /* ATAPI Status Register */
686#define ATAPI_DEV_ADDR 0xffc03808 /* ATAPI Device Register Address */
687#define ATAPI_DEV_TXBUF 0xffc0380c /* ATAPI Device Register Write Data */
688#define ATAPI_DEV_RXBUF 0xffc03810 /* ATAPI Device Register Read Data */
689#define ATAPI_INT_MASK 0xffc03814 /* ATAPI Interrupt Mask Register */
690#define ATAPI_INT_STATUS 0xffc03818 /* ATAPI Interrupt Status Register */
691#define ATAPI_XFER_LEN 0xffc0381c /* ATAPI Length of Transfer */
692#define ATAPI_LINE_STATUS 0xffc03820 /* ATAPI Line Status */
693#define ATAPI_SM_STATE 0xffc03824 /* ATAPI State Machine Status */
694#define ATAPI_TERMINATE 0xffc03828 /* ATAPI Host Terminate */
695#define ATAPI_PIO_TFRCNT 0xffc0382c /* ATAPI PIO mode transfer count */
696#define ATAPI_DMA_TFRCNT 0xffc03830 /* ATAPI DMA mode transfer count */
697#define ATAPI_UMAIN_TFRCNT 0xffc03834 /* ATAPI UDMAIN transfer count */
698#define ATAPI_UDMAOUT_TFRCNT 0xffc03838 /* ATAPI UDMAOUT transfer count */
699#define ATAPI_REG_TIM_0 0xffc03840 /* ATAPI Register Transfer Timing 0 */
700#define ATAPI_PIO_TIM_0 0xffc03844 /* ATAPI PIO Timing 0 Register */
701#define ATAPI_PIO_TIM_1 0xffc03848 /* ATAPI PIO Timing 1 Register */
702#define ATAPI_MULTI_TIM_0 0xffc03850 /* ATAPI Multi-DMA Timing 0 Register */
703#define ATAPI_MULTI_TIM_1 0xffc03854 /* ATAPI Multi-DMA Timing 1 Register */
704#define ATAPI_MULTI_TIM_2 0xffc03858 /* ATAPI Multi-DMA Timing 2 Register */
705#define ATAPI_ULTRA_TIM_0 0xffc03860 /* ATAPI Ultra-DMA Timing 0 Register */
706#define ATAPI_ULTRA_TIM_1 0xffc03864 /* ATAPI Ultra-DMA Timing 1 Register */
707#define ATAPI_ULTRA_TIM_2 0xffc03868 /* ATAPI Ultra-DMA Timing 2 Register */
708#define ATAPI_ULTRA_TIM_3 0xffc0386c /* ATAPI Ultra-DMA Timing 3 Register */
709
710/* SDH Registers */
711
712#define SDH_PWR_CTL 0xffc03900 /* SDH Power Control */
713#define SDH_CLK_CTL 0xffc03904 /* SDH Clock Control */
714#define SDH_ARGUMENT 0xffc03908 /* SDH Argument */
715#define SDH_COMMAND 0xffc0390c /* SDH Command */
716#define SDH_RESP_CMD 0xffc03910 /* SDH Response Command */
717#define SDH_RESPONSE0 0xffc03914 /* SDH Response0 */
718#define SDH_RESPONSE1 0xffc03918 /* SDH Response1 */
719#define SDH_RESPONSE2 0xffc0391c /* SDH Response2 */
720#define SDH_RESPONSE3 0xffc03920 /* SDH Response3 */
721#define SDH_DATA_TIMER 0xffc03924 /* SDH Data Timer */
722#define SDH_DATA_LGTH 0xffc03928 /* SDH Data Length */
723#define SDH_DATA_CTL 0xffc0392c /* SDH Data Control */
724#define SDH_DATA_CNT 0xffc03930 /* SDH Data Counter */
725#define SDH_STATUS 0xffc03934 /* SDH Status */
726#define SDH_STATUS_CLR 0xffc03938 /* SDH Status Clear */
727#define SDH_MASK0 0xffc0393c /* SDH Interrupt0 Mask */
728#define SDH_MASK1 0xffc03940 /* SDH Interrupt1 Mask */
729#define SDH_FIFO_CNT 0xffc03948 /* SDH FIFO Counter */
730#define SDH_FIFO 0xffc03980 /* SDH Data FIFO */
731#define SDH_E_STATUS 0xffc039c0 /* SDH Exception Status */
732#define SDH_E_MASK 0xffc039c4 /* SDH Exception Mask */
733#define SDH_CFG 0xffc039c8 /* SDH Configuration */
734#define SDH_RD_WAIT_EN 0xffc039cc /* SDH Read Wait Enable */
735#define SDH_PID0 0xffc039d0 /* SDH Peripheral Identification0 */
736#define SDH_PID1 0xffc039d4 /* SDH Peripheral Identification1 */
737#define SDH_PID2 0xffc039d8 /* SDH Peripheral Identification2 */
738#define SDH_PID3 0xffc039dc /* SDH Peripheral Identification3 */
739#define SDH_PID4 0xffc039e0 /* SDH Peripheral Identification4 */
740#define SDH_PID5 0xffc039e4 /* SDH Peripheral Identification5 */
741#define SDH_PID6 0xffc039e8 /* SDH Peripheral Identification6 */
742#define SDH_PID7 0xffc039ec /* SDH Peripheral Identification7 */
743
744/* HOST Port Registers */
745
746#define HOST_CONTROL 0xffc03a00 /* HOST Control Register */
747#define HOST_STATUS 0xffc03a04 /* HOST Status Register */
748#define HOST_TIMEOUT 0xffc03a08 /* HOST Acknowledge Mode Timeout Register */
749
750/* USB Control Registers */
751
752#define USB_FADDR 0xffc03c00 /* Function address register */
753#define USB_POWER 0xffc03c04 /* Power management register */
754#define USB_INTRTX 0xffc03c08 /* Interrupt register for endpoint 0 and Tx endpoint 1 to 7 */
755#define USB_INTRRX 0xffc03c0c /* Interrupt register for Rx endpoints 1 to 7 */
756#define USB_INTRTXE 0xffc03c10 /* Interrupt enable register for IntrTx */
757#define USB_INTRRXE 0xffc03c14 /* Interrupt enable register for IntrRx */
758#define USB_INTRUSB 0xffc03c18 /* Interrupt register for common USB interrupts */
759#define USB_INTRUSBE 0xffc03c1c /* Interrupt enable register for IntrUSB */
760#define USB_FRAME 0xffc03c20 /* USB frame number */
761#define USB_INDEX 0xffc03c24 /* Index register for selecting the indexed endpoint registers */
762#define USB_TESTMODE 0xffc03c28 /* Enabled USB 20 test modes */
763#define USB_GLOBINTR 0xffc03c2c /* Global Interrupt Mask register and Wakeup Exception Interrupt */
764#define USB_GLOBAL_CTL 0xffc03c30 /* Global Clock Control for the core */
765
766/* USB Packet Control Registers */
767
768#define USB_TX_MAX_PACKET 0xffc03c40 /* Maximum packet size for Host Tx endpoint */
769#define USB_CSR0 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
770#define USB_TXCSR 0xffc03c44 /* Control Status register for endpoint 0 and Control Status register for Host Tx endpoint */
771#define USB_RX_MAX_PACKET 0xffc03c48 /* Maximum packet size for Host Rx endpoint */
772#define USB_RXCSR 0xffc03c4c /* Control Status register for Host Rx endpoint */
773#define USB_COUNT0 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
774#define USB_RXCOUNT 0xffc03c50 /* Number of bytes received in endpoint 0 FIFO and Number of bytes received in Host Tx endpoint */
775#define USB_TXTYPE 0xffc03c54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint */
776#define USB_NAKLIMIT0 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
777#define USB_TXINTERVAL 0xffc03c58 /* Sets the NAK response timeout on Endpoint 0 and on Bulk transfers for Host Tx endpoint */
778#define USB_RXTYPE 0xffc03c5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint */
779#define USB_RXINTERVAL 0xffc03c60 /* Sets the polling interval for Interrupt and Isochronous transfers or the NAK response timeout on Bulk transfers */
780#define USB_TXCOUNT 0xffc03c68 /* Number of bytes to be written to the selected endpoint Tx FIFO */
781
782/* USB Endpoint FIFO Registers */
783
784#define USB_EP0_FIFO 0xffc03c80 /* Endpoint 0 FIFO */
785#define USB_EP1_FIFO 0xffc03c88 /* Endpoint 1 FIFO */
786#define USB_EP2_FIFO 0xffc03c90 /* Endpoint 2 FIFO */
787#define USB_EP3_FIFO 0xffc03c98 /* Endpoint 3 FIFO */
788#define USB_EP4_FIFO 0xffc03ca0 /* Endpoint 4 FIFO */
789#define USB_EP5_FIFO 0xffc03ca8 /* Endpoint 5 FIFO */
790#define USB_EP6_FIFO 0xffc03cb0 /* Endpoint 6 FIFO */
791#define USB_EP7_FIFO 0xffc03cb8 /* Endpoint 7 FIFO */
792
793/* USB OTG Control Registers */
794
795#define USB_OTG_DEV_CTL 0xffc03d00 /* OTG Device Control Register */
796#define USB_OTG_VBUS_IRQ 0xffc03d04 /* OTG VBUS Control Interrupts */
797#define USB_OTG_VBUS_MASK 0xffc03d08 /* VBUS Control Interrupt Enable */
798
799/* USB Phy Control Registers */
800
801#define USB_LINKINFO 0xffc03d48 /* Enables programming of some PHY-side delays */
802#define USB_VPLEN 0xffc03d4c /* Determines duration of VBUS pulse for VBUS charging */
803#define USB_HS_EOF1 0xffc03d50 /* Time buffer for High-Speed transactions */
804#define USB_FS_EOF1 0xffc03d54 /* Time buffer for Full-Speed transactions */
805#define USB_LS_EOF1 0xffc03d58 /* Time buffer for Low-Speed transactions */
806
807/* (APHY_CNTRL is for ADI usage only) */
808
809#define USB_APHY_CNTRL 0xffc03de0 /* Register that increases visibility of Analog PHY */
810
811/* (APHY_CALIB is for ADI usage only) */
812
813#define USB_APHY_CALIB 0xffc03de4 /* Register used to set some calibration values */
814#define USB_APHY_CNTRL2 0xffc03de8 /* Register used to prevent re-enumeration once Moab goes into hibernate mode */
815
816/* (PHY_TEST is for ADI usage only) */
817
818#define USB_PHY_TEST 0xffc03dec /* Used for reducing simulation time and simplifies FIFO testability */
819#define USB_PLLOSC_CTRL 0xffc03df0 /* Used to program different parameters for USB PLL and Oscillator */
820#define USB_SRP_CLKDIV 0xffc03df4 /* Used to program clock divide value for the clock fed to the SRP detection logic */
821
822/* USB Endpoint 0 Control Registers */
823
824#define USB_EP_NI0_TXMAXP 0xffc03e00 /* Maximum packet size for Host Tx endpoint0 */
825#define USB_EP_NI0_TXCSR 0xffc03e04 /* Control Status register for endpoint 0 */
826#define USB_EP_NI0_RXMAXP 0xffc03e08 /* Maximum packet size for Host Rx endpoint0 */
827#define USB_EP_NI0_RXCSR 0xffc03e0c /* Control Status register for Host Rx endpoint0 */
828#define USB_EP_NI0_RXCOUNT 0xffc03e10 /* Number of bytes received in endpoint 0 FIFO */
829#define USB_EP_NI0_TXTYPE 0xffc03e14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint0 */
830#define USB_EP_NI0_TXINTERVAL 0xffc03e18 /* Sets the NAK response timeout on Endpoint 0 */
831#define USB_EP_NI0_RXTYPE 0xffc03e1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint0 */
832#define USB_EP_NI0_RXINTERVAL 0xffc03e20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint0 */
833
834/* USB Endpoint 1 Control Registers */
835
836#define USB_EP_NI0_TXCOUNT 0xffc03e28 /* Number of bytes to be written to the endpoint0 Tx FIFO */
837#define USB_EP_NI1_TXMAXP 0xffc03e40 /* Maximum packet size for Host Tx endpoint1 */
838#define USB_EP_NI1_TXCSR 0xffc03e44 /* Control Status register for endpoint1 */
839#define USB_EP_NI1_RXMAXP 0xffc03e48 /* Maximum packet size for Host Rx endpoint1 */
840#define USB_EP_NI1_RXCSR 0xffc03e4c /* Control Status register for Host Rx endpoint1 */
841#define USB_EP_NI1_RXCOUNT 0xffc03e50 /* Number of bytes received in endpoint1 FIFO */
842#define USB_EP_NI1_TXTYPE 0xffc03e54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint1 */
843#define USB_EP_NI1_TXINTERVAL 0xffc03e58 /* Sets the NAK response timeout on Endpoint1 */
844#define USB_EP_NI1_RXTYPE 0xffc03e5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint1 */
845#define USB_EP_NI1_RXINTERVAL 0xffc03e60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint1 */
846
847/* USB Endpoint 2 Control Registers */
848
849#define USB_EP_NI1_TXCOUNT 0xffc03e68 /* Number of bytes to be written to the+H102 endpoint1 Tx FIFO */
850#define USB_EP_NI2_TXMAXP 0xffc03e80 /* Maximum packet size for Host Tx endpoint2 */
851#define USB_EP_NI2_TXCSR 0xffc03e84 /* Control Status register for endpoint2 */
852#define USB_EP_NI2_RXMAXP 0xffc03e88 /* Maximum packet size for Host Rx endpoint2 */
853#define USB_EP_NI2_RXCSR 0xffc03e8c /* Control Status register for Host Rx endpoint2 */
854#define USB_EP_NI2_RXCOUNT 0xffc03e90 /* Number of bytes received in endpoint2 FIFO */
855#define USB_EP_NI2_TXTYPE 0xffc03e94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint2 */
856#define USB_EP_NI2_TXINTERVAL 0xffc03e98 /* Sets the NAK response timeout on Endpoint2 */
857#define USB_EP_NI2_RXTYPE 0xffc03e9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint2 */
858#define USB_EP_NI2_RXINTERVAL 0xffc03ea0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint2 */
859
860/* USB Endpoint 3 Control Registers */
861
862#define USB_EP_NI2_TXCOUNT 0xffc03ea8 /* Number of bytes to be written to the endpoint2 Tx FIFO */
863#define USB_EP_NI3_TXMAXP 0xffc03ec0 /* Maximum packet size for Host Tx endpoint3 */
864#define USB_EP_NI3_TXCSR 0xffc03ec4 /* Control Status register for endpoint3 */
865#define USB_EP_NI3_RXMAXP 0xffc03ec8 /* Maximum packet size for Host Rx endpoint3 */
866#define USB_EP_NI3_RXCSR 0xffc03ecc /* Control Status register for Host Rx endpoint3 */
867#define USB_EP_NI3_RXCOUNT 0xffc03ed0 /* Number of bytes received in endpoint3 FIFO */
868#define USB_EP_NI3_TXTYPE 0xffc03ed4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint3 */
869#define USB_EP_NI3_TXINTERVAL 0xffc03ed8 /* Sets the NAK response timeout on Endpoint3 */
870#define USB_EP_NI3_RXTYPE 0xffc03edc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint3 */
871#define USB_EP_NI3_RXINTERVAL 0xffc03ee0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint3 */
872
873/* USB Endpoint 4 Control Registers */
874
875#define USB_EP_NI3_TXCOUNT 0xffc03ee8 /* Number of bytes to be written to the H124endpoint3 Tx FIFO */
876#define USB_EP_NI4_TXMAXP 0xffc03f00 /* Maximum packet size for Host Tx endpoint4 */
877#define USB_EP_NI4_TXCSR 0xffc03f04 /* Control Status register for endpoint4 */
878#define USB_EP_NI4_RXMAXP 0xffc03f08 /* Maximum packet size for Host Rx endpoint4 */
879#define USB_EP_NI4_RXCSR 0xffc03f0c /* Control Status register for Host Rx endpoint4 */
880#define USB_EP_NI4_RXCOUNT 0xffc03f10 /* Number of bytes received in endpoint4 FIFO */
881#define USB_EP_NI4_TXTYPE 0xffc03f14 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint4 */
882#define USB_EP_NI4_TXINTERVAL 0xffc03f18 /* Sets the NAK response timeout on Endpoint4 */
883#define USB_EP_NI4_RXTYPE 0xffc03f1c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint4 */
884#define USB_EP_NI4_RXINTERVAL 0xffc03f20 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint4 */
885
886/* USB Endpoint 5 Control Registers */
887
888#define USB_EP_NI4_TXCOUNT 0xffc03f28 /* Number of bytes to be written to the endpoint4 Tx FIFO */
889#define USB_EP_NI5_TXMAXP 0xffc03f40 /* Maximum packet size for Host Tx endpoint5 */
890#define USB_EP_NI5_TXCSR 0xffc03f44 /* Control Status register for endpoint5 */
891#define USB_EP_NI5_RXMAXP 0xffc03f48 /* Maximum packet size for Host Rx endpoint5 */
892#define USB_EP_NI5_RXCSR 0xffc03f4c /* Control Status register for Host Rx endpoint5 */
893#define USB_EP_NI5_RXCOUNT 0xffc03f50 /* Number of bytes received in endpoint5 FIFO */
894#define USB_EP_NI5_TXTYPE 0xffc03f54 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint5 */
895#define USB_EP_NI5_TXINTERVAL 0xffc03f58 /* Sets the NAK response timeout on Endpoint5 */
896#define USB_EP_NI5_RXTYPE 0xffc03f5c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint5 */
897#define USB_EP_NI5_RXINTERVAL 0xffc03f60 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint5 */
898
899/* USB Endpoint 6 Control Registers */
900
901#define USB_EP_NI5_TXCOUNT 0xffc03f68 /* Number of bytes to be written to the H145endpoint5 Tx FIFO */
902#define USB_EP_NI6_TXMAXP 0xffc03f80 /* Maximum packet size for Host Tx endpoint6 */
903#define USB_EP_NI6_TXCSR 0xffc03f84 /* Control Status register for endpoint6 */
904#define USB_EP_NI6_RXMAXP 0xffc03f88 /* Maximum packet size for Host Rx endpoint6 */
905#define USB_EP_NI6_RXCSR 0xffc03f8c /* Control Status register for Host Rx endpoint6 */
906#define USB_EP_NI6_RXCOUNT 0xffc03f90 /* Number of bytes received in endpoint6 FIFO */
907#define USB_EP_NI6_TXTYPE 0xffc03f94 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint6 */
908#define USB_EP_NI6_TXINTERVAL 0xffc03f98 /* Sets the NAK response timeout on Endpoint6 */
909#define USB_EP_NI6_RXTYPE 0xffc03f9c /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint6 */
910#define USB_EP_NI6_RXINTERVAL 0xffc03fa0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint6 */
911
912/* USB Endpoint 7 Control Registers */
913
914#define USB_EP_NI6_TXCOUNT 0xffc03fa8 /* Number of bytes to be written to the endpoint6 Tx FIFO */
915#define USB_EP_NI7_TXMAXP 0xffc03fc0 /* Maximum packet size for Host Tx endpoint7 */
916#define USB_EP_NI7_TXCSR 0xffc03fc4 /* Control Status register for endpoint7 */
917#define USB_EP_NI7_RXMAXP 0xffc03fc8 /* Maximum packet size for Host Rx endpoint7 */
918#define USB_EP_NI7_RXCSR 0xffc03fcc /* Control Status register for Host Rx endpoint7 */
919#define USB_EP_NI7_RXCOUNT 0xffc03fd0 /* Number of bytes received in endpoint7 FIFO */
920#define USB_EP_NI7_TXTYPE 0xffc03fd4 /* Sets the transaction protocol and peripheral endpoint number for the Host Tx endpoint7 */
921#define USB_EP_NI7_TXINTERVAL 0xffc03fd8 /* Sets the NAK response timeout on Endpoint7 */
922#define USB_EP_NI7_RXTYPE 0xffc03fdc /* Sets the transaction protocol and peripheral endpoint number for the Host Rx endpoint7 */
923#define USB_EP_NI7_RXINTERVAL 0xffc03ff0 /* Sets the polling interval for Interrupt/Isochronous transfers or the NAK response timeout on Bulk transfers for Host Rx endpoint7 */
924#define USB_EP_NI7_TXCOUNT 0xffc03ff8 /* Number of bytes to be written to the endpoint7 Tx FIFO */
925#define USB_DMA_INTERRUPT 0xffc04000 /* Indicates pending interrupts for the DMA channels */
926
927/* USB Channel 0 Config Registers */
928
929#define USB_DMA0CONTROL 0xffc04004 /* DMA master channel 0 configuration */
930#define USB_DMA0ADDRLOW 0xffc04008 /* Lower 16-bits of memory source/destination address for DMA master channel 0 */
931#define USB_DMA0ADDRHIGH 0xffc0400c /* Upper 16-bits of memory source/destination address for DMA master channel 0 */
932#define USB_DMA0COUNTLOW 0xffc04010 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 0 */
933#define USB_DMA0COUNTHIGH 0xffc04014 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 0 */
934
935/* USB Channel 1 Config Registers */
936
937#define USB_DMA1CONTROL 0xffc04024 /* DMA master channel 1 configuration */
938#define USB_DMA1ADDRLOW 0xffc04028 /* Lower 16-bits of memory source/destination address for DMA master channel 1 */
939#define USB_DMA1ADDRHIGH 0xffc0402c /* Upper 16-bits of memory source/destination address for DMA master channel 1 */
940#define USB_DMA1COUNTLOW 0xffc04030 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 1 */
941#define USB_DMA1COUNTHIGH 0xffc04034 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 1 */
942
943/* USB Channel 2 Config Registers */
944
945#define USB_DMA2CONTROL 0xffc04044 /* DMA master channel 2 configuration */
946#define USB_DMA2ADDRLOW 0xffc04048 /* Lower 16-bits of memory source/destination address for DMA master channel 2 */
947#define USB_DMA2ADDRHIGH 0xffc0404c /* Upper 16-bits of memory source/destination address for DMA master channel 2 */
948#define USB_DMA2COUNTLOW 0xffc04050 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 2 */
949#define USB_DMA2COUNTHIGH 0xffc04054 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 2 */
950
951/* USB Channel 3 Config Registers */
952
953#define USB_DMA3CONTROL 0xffc04064 /* DMA master channel 3 configuration */
954#define USB_DMA3ADDRLOW 0xffc04068 /* Lower 16-bits of memory source/destination address for DMA master channel 3 */
955#define USB_DMA3ADDRHIGH 0xffc0406c /* Upper 16-bits of memory source/destination address for DMA master channel 3 */
956#define USB_DMA3COUNTLOW 0xffc04070 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 3 */
957#define USB_DMA3COUNTHIGH 0xffc04074 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 3 */
958
959/* USB Channel 4 Config Registers */
960
961#define USB_DMA4CONTROL 0xffc04084 /* DMA master channel 4 configuration */
962#define USB_DMA4ADDRLOW 0xffc04088 /* Lower 16-bits of memory source/destination address for DMA master channel 4 */
963#define USB_DMA4ADDRHIGH 0xffc0408c /* Upper 16-bits of memory source/destination address for DMA master channel 4 */
964#define USB_DMA4COUNTLOW 0xffc04090 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 4 */
965#define USB_DMA4COUNTHIGH 0xffc04094 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 4 */
966
967/* USB Channel 5 Config Registers */
968
969#define USB_DMA5CONTROL 0xffc040a4 /* DMA master channel 5 configuration */
970#define USB_DMA5ADDRLOW 0xffc040a8 /* Lower 16-bits of memory source/destination address for DMA master channel 5 */
971#define USB_DMA5ADDRHIGH 0xffc040ac /* Upper 16-bits of memory source/destination address for DMA master channel 5 */
972#define USB_DMA5COUNTLOW 0xffc040b0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 5 */
973#define USB_DMA5COUNTHIGH 0xffc040b4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 5 */
974
975/* USB Channel 6 Config Registers */
976
977#define USB_DMA6CONTROL 0xffc040c4 /* DMA master channel 6 configuration */
978#define USB_DMA6ADDRLOW 0xffc040c8 /* Lower 16-bits of memory source/destination address for DMA master channel 6 */
979#define USB_DMA6ADDRHIGH 0xffc040cc /* Upper 16-bits of memory source/destination address for DMA master channel 6 */
980#define USB_DMA6COUNTLOW 0xffc040d0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 6 */
981#define USB_DMA6COUNTHIGH 0xffc040d4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 6 */
982
983/* USB Channel 7 Config Registers */
984
985#define USB_DMA7CONTROL 0xffc040e4 /* DMA master channel 7 configuration */
986#define USB_DMA7ADDRLOW 0xffc040e8 /* Lower 16-bits of memory source/destination address for DMA master channel 7 */
987#define USB_DMA7ADDRHIGH 0xffc040ec /* Upper 16-bits of memory source/destination address for DMA master channel 7 */
988#define USB_DMA7COUNTLOW 0xffc040f0 /* Lower 16-bits of byte count of DMA transfer for DMA master channel 7 */
989#define USB_DMA7COUNTHIGH 0xffc040f4 /* Upper 16-bits of byte count of DMA transfer for DMA master channel 7 */
990
991/* Keypad Registers */
992
993#define KPAD_CTL 0xffc04100 /* Controls keypad module enable and disable */
994#define KPAD_PRESCALE 0xffc04104 /* Establish a time base for programing the KPAD_MSEL register */
995#define KPAD_MSEL 0xffc04108 /* Selects delay parameters for keypad interface sensitivity */
996#define KPAD_ROWCOL 0xffc0410c /* Captures the row and column output values of the keys pressed */
997#define KPAD_STAT 0xffc04110 /* Holds and clears the status of the keypad interface interrupt */
998#define KPAD_SOFTEVAL 0xffc04114 /* Lets software force keypad interface to check for keys being pressed */
999
1000/* Pixel Compositor (PIXC) Registers */
1001
1002#define PIXC_CTL 0xffc04400 /* Overlay enable, resampling mode, I/O data format, transparency enable, watermark level, FIFO status */
1003#define PIXC_PPL 0xffc04404 /* Holds the number of pixels per line of the display */
1004#define PIXC_LPF 0xffc04408 /* Holds the number of lines per frame of the display */
1005#define PIXC_AHSTART 0xffc0440c /* Contains horizontal start pixel information of the overlay data (set A) */
1006#define PIXC_AHEND 0xffc04410 /* Contains horizontal end pixel information of the overlay data (set A) */
1007#define PIXC_AVSTART 0xffc04414 /* Contains vertical start pixel information of the overlay data (set A) */
1008#define PIXC_AVEND 0xffc04418 /* Contains vertical end pixel information of the overlay data (set A) */
1009#define PIXC_ATRANSP 0xffc0441c /* Contains the transparency ratio (set A) */
1010#define PIXC_BHSTART 0xffc04420 /* Contains horizontal start pixel information of the overlay data (set B) */
1011#define PIXC_BHEND 0xffc04424 /* Contains horizontal end pixel information of the overlay data (set B) */
1012#define PIXC_BVSTART 0xffc04428 /* Contains vertical start pixel information of the overlay data (set B) */
1013#define PIXC_BVEND 0xffc0442c /* Contains vertical end pixel information of the overlay data (set B) */
1014#define PIXC_BTRANSP 0xffc04430 /* Contains the transparency ratio (set B) */
1015#define PIXC_INTRSTAT 0xffc0443c /* Overlay interrupt configuration/status */
1016#define PIXC_RYCON 0xffc04440 /* Color space conversion matrix register. Contains the R/Y conversion coefficients */
1017#define PIXC_GUCON 0xffc04444 /* Color space conversion matrix register. Contains the G/U conversion coefficients */
1018#define PIXC_BVCON 0xffc04448 /* Color space conversion matrix register. Contains the B/V conversion coefficients */
1019#define PIXC_CCBIAS 0xffc0444c /* Bias values for the color space conversion matrix */
1020#define PIXC_TC 0xffc04450 /* Holds the transparent color value */
1021
1022/* Handshake MDMA 0 Registers */
1023
1024#define HMDMA0_CONTROL 0xffc04500 /* Handshake MDMA0 Control Register */
1025#define HMDMA0_ECINIT 0xffc04504 /* Handshake MDMA0 Initial Edge Count Register */
1026#define HMDMA0_BCINIT 0xffc04508 /* Handshake MDMA0 Initial Block Count Register */
1027#define HMDMA0_ECURGENT 0xffc0450c /* Handshake MDMA0 Urgent Edge Count Threshhold Register */
1028#define HMDMA0_ECOVERFLOW 0xffc04510 /* Handshake MDMA0 Edge Count Overflow Interrupt Register */
1029#define HMDMA0_ECOUNT 0xffc04514 /* Handshake MDMA0 Current Edge Count Register */
1030#define HMDMA0_BCOUNT 0xffc04518 /* Handshake MDMA0 Current Block Count Register */
1031
1032/* Handshake MDMA 1 Registers */
1033
1034#define HMDMA1_CONTROL 0xffc04540 /* Handshake MDMA1 Control Register */
1035#define HMDMA1_ECINIT 0xffc04544 /* Handshake MDMA1 Initial Edge Count Register */
1036#define HMDMA1_BCINIT 0xffc04548 /* Handshake MDMA1 Initial Block Count Register */
1037#define HMDMA1_ECURGENT 0xffc0454c /* Handshake MDMA1 Urgent Edge Count Threshhold Register */
1038#define HMDMA1_ECOVERFLOW 0xffc04550 /* Handshake MDMA1 Edge Count Overflow Interrupt Register */
1039#define HMDMA1_ECOUNT 0xffc04554 /* Handshake MDMA1 Current Edge Count Register */
1040#define HMDMA1_BCOUNT 0xffc04558 /* Handshake MDMA1 Current Block Count Register */
1041
1042
1043/* ********************************************************** */
1044/* SINGLE BIT MACRO PAIRS (bit mask and negated one) */
1045/* and MULTI BIT READ MACROS */
1046/* ********************************************************** */
1047
1048/* Bit masks for PIXC_CTL */
1049
1050#define PIXC_EN 0x1 /* Pixel Compositor Enable */
1051#define OVR_A_EN 0x2 /* Overlay A Enable */
1052#define OVR_B_EN 0x4 /* Overlay B Enable */
1053#define IMG_FORM 0x8 /* Image Data Format */
1054#define OVR_FORM 0x10 /* Overlay Data Format */
1055#define OUT_FORM 0x20 /* Output Data Format */
1056#define UDS_MOD 0x40 /* Resampling Mode */
1057#define TC_EN 0x80 /* Transparent Color Enable */
1058#define IMG_STAT 0x300 /* Image FIFO Status */
1059#define OVR_STAT 0xc00 /* Overlay FIFO Status */
1060#define WM_LVL 0x3000 /* FIFO Watermark Level */
1061
1062/* Bit masks for PIXC_AHSTART */
1063
1064#define A_HSTART 0xfff /* Horizontal Start Coordinates */
1065
1066/* Bit masks for PIXC_AHEND */
1067
1068#define A_HEND 0xfff /* Horizontal End Coordinates */
1069
1070/* Bit masks for PIXC_AVSTART */
1071
1072#define A_VSTART 0x3ff /* Vertical Start Coordinates */
1073
1074/* Bit masks for PIXC_AVEND */
1075
1076#define A_VEND 0x3ff /* Vertical End Coordinates */
1077
1078/* Bit masks for PIXC_ATRANSP */
1079
1080#define A_TRANSP 0xf /* Transparency Value */
1081
1082/* Bit masks for PIXC_BHSTART */
1083
1084#define B_HSTART 0xfff /* Horizontal Start Coordinates */
1085
1086/* Bit masks for PIXC_BHEND */
1087
1088#define B_HEND 0xfff /* Horizontal End Coordinates */
1089
1090/* Bit masks for PIXC_BVSTART */
1091
1092#define B_VSTART 0x3ff /* Vertical Start Coordinates */
1093
1094/* Bit masks for PIXC_BVEND */
1095
1096#define B_VEND 0x3ff /* Vertical End Coordinates */
1097
1098/* Bit masks for PIXC_BTRANSP */
1099
1100#define B_TRANSP 0xf /* Transparency Value */
1101
1102/* Bit masks for PIXC_INTRSTAT */
1103
1104#define OVR_INT_EN 0x1 /* Interrupt at End of Last Valid Overlay */
1105#define FRM_INT_EN 0x2 /* Interrupt at End of Frame */
1106#define OVR_INT_STAT 0x4 /* Overlay Interrupt Status */
1107#define FRM_INT_STAT 0x8 /* Frame Interrupt Status */
1108
1109/* Bit masks for PIXC_RYCON */
1110
1111#define A11 0x3ff /* A11 in the Coefficient Matrix */
1112#define A12 0xffc00 /* A12 in the Coefficient Matrix */
1113#define A13 0x3ff00000 /* A13 in the Coefficient Matrix */
1114#define RY_MULT4 0x40000000 /* Multiply Row by 4 */
1115
1116/* Bit masks for PIXC_GUCON */
1117
1118#define A21 0x3ff /* A21 in the Coefficient Matrix */
1119#define A22 0xffc00 /* A22 in the Coefficient Matrix */
1120#define A23 0x3ff00000 /* A23 in the Coefficient Matrix */
1121#define GU_MULT4 0x40000000 /* Multiply Row by 4 */
1122
1123/* Bit masks for PIXC_BVCON */
1124
1125#define A31 0x3ff /* A31 in the Coefficient Matrix */
1126#define A32 0xffc00 /* A32 in the Coefficient Matrix */
1127#define A33 0x3ff00000 /* A33 in the Coefficient Matrix */
1128#define BV_MULT4 0x40000000 /* Multiply Row by 4 */
1129
1130/* Bit masks for PIXC_CCBIAS */
1131
1132#define A14 0x3ff /* A14 in the Bias Vector */
1133#define A24 0xffc00 /* A24 in the Bias Vector */
1134#define A34 0x3ff00000 /* A34 in the Bias Vector */
1135
1136/* Bit masks for PIXC_TC */
1137
1138#define RY_TRANS 0xff /* Transparent Color - R/Y Component */
1139#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
1140#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
1141
1142/* Bit masks for HOST_CONTROL */
1143
1144#define HOST_EN 0x1 /* Host Enable */
1145#define HOST_END 0x2 /* Host Endianess */
1146#define DATA_SIZE 0x4 /* Data Size */
1147#define HOST_RST 0x8 /* Host Reset */
1148#define HRDY_OVR 0x20 /* Host Ready Override */
1149#define INT_MODE 0x40 /* Interrupt Mode */
1150#define BT_EN 0x80 /* Bus Timeout Enable */
1151#define EHW 0x100 /* Enable Host Write */
1152#define EHR 0x200 /* Enable Host Read */
1153#define BDR 0x400 /* Burst DMA Requests */
1154
1155/* Bit masks for HOST_STATUS */
1156
1157#define DMA_READY 0x1 /* DMA Ready */
1158#define FIFOFULL 0x2 /* FIFO Full */
1159#define FIFOEMPTY 0x4 /* FIFO Empty */
1160#define DMA_COMPLETE 0x8 /* DMA Complete */
1161#define HSHK 0x10 /* Host Handshake */
1162#define TIMEOUT 0x20 /* Host Timeout */
1163#define HIRQ 0x40 /* Host Interrupt Request */
1164#define ALLOW_CNFG 0x80 /* Allow New Configuration */
1165#define DMA_DIR 0x100 /* DMA Direction */
1166#define BTE 0x200 /* Bus Timeout Enabled */
1167
1168/* Bit masks for HOST_TIMEOUT */
1169
1170#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1171
1172/* Bit masks for MXVR_CONFIG */
1173
1174#define MXVREN 0x1 /* MXVR Enable */
1175#define MMSM 0x2 /* MXVR Master/Slave Mode Select */
1176#define ACTIVE 0x4 /* Active Mode */
1177#define SDELAY 0x8 /* Synchronous Data Delay */
1178#define NCMRXEN 0x10 /* Normal Control Message Receive Enable */
1179#define RWRRXEN 0x20 /* Remote Write Receive Enable */
1180#define MTXEN 0x40 /* MXVR Transmit Data Enable */
1181#define MTXONB 0x80 /* MXVR Phy Transmitter On */
1182#define EPARITY 0x100 /* Even Parity Select */
1183#define MSB 0x1e00 /* Master Synchronous Boundary */
1184#define APRXEN 0x2000 /* Asynchronous Packet Receive Enable */
1185#define WAKEUP 0x4000 /* Wake-Up */
1186#define LMECH 0x8000 /* Lock Mechanism Select */
1187
1188/* Bit masks for MXVR_STATE_0 */
1189
1190#define NACT 0x1 /* Network Activity */
1191#define SBLOCK 0x2 /* Super Block Lock */
1192#define FMPLLST 0xc /* Frequency Multiply PLL SM State */
1193#define CDRPLLST 0xe0 /* Clock/Data Recovery PLL SM State */
1194#define APBSY 0x100 /* Asynchronous Packet Transmit Buffer Busy */
1195#define APARB 0x200 /* Asynchronous Packet Arbitrating */
1196#define APTX 0x400 /* Asynchronous Packet Transmitting */
1197#define APRX 0x800 /* Receiving Asynchronous Packet */
1198#define CMBSY 0x1000 /* Control Message Transmit Buffer Busy */
1199#define CMARB 0x2000 /* Control Message Arbitrating */
1200#define CMTX 0x4000 /* Control Message Transmitting */
1201#define CMRX 0x8000 /* Receiving Control Message */
1202#define MRXONB 0x10000 /* MRXONB Pin State */
1203#define RGSIP 0x20000 /* Remote Get Source In Progress */
1204#define DALIP 0x40000 /* Resource Deallocate In Progress */
1205#define ALIP 0x80000 /* Resource Allocate In Progress */
1206#define RRDIP 0x100000 /* Remote Read In Progress */
1207#define RWRIP 0x200000 /* Remote Write In Progress */
1208#define FLOCK 0x400000 /* Frame Lock */
1209#define BLOCK 0x800000 /* Block Lock */
1210#define RSB 0xf000000 /* Received Synchronous Boundary */
1211#define DERRNUM 0xf0000000 /* DMA Error Channel Number */
1212
1213/* Bit masks for MXVR_STATE_1 */
1214
1215#define SRXNUMB 0xf /* Synchronous Receive FIFO Number of Bytes */
1216#define STXNUMB 0xf0 /* Synchronous Transmit FIFO Number of Bytes */
1217#define APCONT 0x100 /* Asynchronous Packet Continuation */
1218#define OBERRNUM 0xe00 /* DMA Out of Bounds Error Channel Number */
1219#define DMAACTIVE0 0x10000 /* DMA0 Active */
1220#define DMAACTIVE1 0x20000 /* DMA1 Active */
1221#define DMAACTIVE2 0x40000 /* DMA2 Active */
1222#define DMAACTIVE3 0x80000 /* DMA3 Active */
1223#define DMAACTIVE4 0x100000 /* DMA4 Active */
1224#define DMAACTIVE5 0x200000 /* DMA5 Active */
1225#define DMAACTIVE6 0x400000 /* DMA6 Active */
1226#define DMAACTIVE7 0x800000 /* DMA7 Active */
1227#define DMAPMEN0 0x1000000 /* DMA0 Pattern Matching Enabled */
1228#define DMAPMEN1 0x2000000 /* DMA1 Pattern Matching Enabled */
1229#define DMAPMEN2 0x4000000 /* DMA2 Pattern Matching Enabled */
1230#define DMAPMEN3 0x8000000 /* DMA3 Pattern Matching Enabled */
1231#define DMAPMEN4 0x10000000 /* DMA4 Pattern Matching Enabled */
1232#define DMAPMEN5 0x20000000 /* DMA5 Pattern Matching Enabled */
1233#define DMAPMEN6 0x40000000 /* DMA6 Pattern Matching Enabled */
1234#define DMAPMEN7 0x80000000 /* DMA7 Pattern Matching Enabled */
1235
1236/* Bit masks for MXVR_INT_STAT_0 */
1237
1238#define NI2A 0x1 /* Network Inactive to Active */
1239#define NA2I 0x2 /* Network Active to Inactive */
1240#define SBU2L 0x4 /* Super Block Unlock to Lock */
1241#define SBL2U 0x8 /* Super Block Lock to Unlock */
1242#define PRU 0x10 /* Position Register Updated */
1243#define MPRU 0x20 /* Maximum Position Register Updated */
1244#define DRU 0x40 /* Delay Register Updated */
1245#define MDRU 0x80 /* Maximum Delay Register Updated */
1246#define SBU 0x100 /* Synchronous Boundary Updated */
1247#define ATU 0x200 /* Allocation Table Updated */
1248#define FCZ0 0x400 /* Frame Counter 0 Zero */
1249#define FCZ1 0x800 /* Frame Counter 1 Zero */
1250#define PERR 0x1000 /* Parity Error */
1251#define MH2L 0x2000 /* MRXONB High to Low */
1252#define ML2H 0x4000 /* MRXONB Low to High */
1253#define WUP 0x8000 /* Wake-Up Preamble Received */
1254#define FU2L 0x10000 /* Frame Unlock to Lock */
1255#define FL2U 0x20000 /* Frame Lock to Unlock */
1256#define BU2L 0x40000 /* Block Unlock to Lock */
1257#define BL2U 0x80000 /* Block Lock to Unlock */
1258#define OBERR 0x100000 /* DMA Out of Bounds Error */
1259#define PFL 0x200000 /* PLL Frequency Locked */
1260#define SCZ 0x400000 /* System Clock Counter Zero */
1261#define FERR 0x800000 /* FIFO Error */
1262#define CMR 0x1000000 /* Control Message Received */
1263#define CMROF 0x2000000 /* Control Message Receive Buffer Overflow */
1264#define CMTS 0x4000000 /* Control Message Transmit Buffer Successfully Sent */
1265#define CMTC 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled */
1266#define RWRC 0x10000000 /* Remote Write Control Message Completed */
1267#define BCZ 0x20000000 /* Block Counter Zero */
1268#define BMERR 0x40000000 /* Biphase Mark Coding Error */
1269#define DERR 0x80000000 /* DMA Error */
1270
1271/* Bit masks for MXVR_INT_STAT_1 */
1272
1273#define HDONE0 0x1 /* DMA0 Half Done */
1274#define DONE0 0x2 /* DMA0 Done */
1275#define APR 0x4 /* Asynchronous Packet Received */
1276#define APROF 0x8 /* Asynchronous Packet Receive Buffer Overflow */
1277#define HDONE1 0x10 /* DMA1 Half Done */
1278#define DONE1 0x20 /* DMA1 Done */
1279#define APTS 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent */
1280#define APTC 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled */
1281#define HDONE2 0x100 /* DMA2 Half Done */
1282#define DONE2 0x200 /* DMA2 Done */
1283#define APRCE 0x400 /* Asynchronous Packet Receive CRC Error */
1284#define APRPE 0x800 /* Asynchronous Packet Receive Packet Error */
1285#define HDONE3 0x1000 /* DMA3 Half Done */
1286#define DONE3 0x2000 /* DMA3 Done */
1287#define HDONE4 0x10000 /* DMA4 Half Done */
1288#define DONE4 0x20000 /* DMA4 Done */
1289#define HDONE5 0x100000 /* DMA5 Half Done */
1290#define DONE5 0x200000 /* DMA5 Done */
1291#define HDONE6 0x1000000 /* DMA6 Half Done */
1292#define DONE6 0x2000000 /* DMA6 Done */
1293#define HDONE7 0x10000000 /* DMA7 Half Done */
1294#define DONE7 0x20000000 /* DMA7 Done */
1295
1296/* Bit masks for MXVR_INT_EN_0 */
1297
1298#define NI2AEN 0x1 /* Network Inactive to Active Interrupt Enable */
1299#define NA2IEN 0x2 /* Network Active to Inactive Interrupt Enable */
1300#define SBU2LEN 0x4 /* Super Block Unlock to Lock Interrupt Enable */
1301#define SBL2UEN 0x8 /* Super Block Lock to Unlock Interrupt Enable */
1302#define PRUEN 0x10 /* Position Register Updated Interrupt Enable */
1303#define MPRUEN 0x20 /* Maximum Position Register Updated Interrupt Enable */
1304#define DRUEN 0x40 /* Delay Register Updated Interrupt Enable */
1305#define MDRUEN 0x80 /* Maximum Delay Register Updated Interrupt Enable */
1306#define SBUEN 0x100 /* Synchronous Boundary Updated Interrupt Enable */
1307#define ATUEN 0x200 /* Allocation Table Updated Interrupt Enable */
1308#define FCZ0EN 0x400 /* Frame Counter 0 Zero Interrupt Enable */
1309#define FCZ1EN 0x800 /* Frame Counter 1 Zero Interrupt Enable */
1310#define PERREN 0x1000 /* Parity Error Interrupt Enable */
1311#define MH2LEN 0x2000 /* MRXONB High to Low Interrupt Enable */
1312#define ML2HEN 0x4000 /* MRXONB Low to High Interrupt Enable */
1313#define WUPEN 0x8000 /* Wake-Up Preamble Received Interrupt Enable */
1314#define FU2LEN 0x10000 /* Frame Unlock to Lock Interrupt Enable */
1315#define FL2UEN 0x20000 /* Frame Lock to Unlock Interrupt Enable */
1316#define BU2LEN 0x40000 /* Block Unlock to Lock Interrupt Enable */
1317#define BL2UEN 0x80000 /* Block Lock to Unlock Interrupt Enable */
1318#define OBERREN 0x100000 /* DMA Out of Bounds Error Interrupt Enable */
1319#define PFLEN 0x200000 /* PLL Frequency Locked Interrupt Enable */
1320#define SCZEN 0x400000 /* System Clock Counter Zero Interrupt Enable */
1321#define FERREN 0x800000 /* FIFO Error Interrupt Enable */
1322#define CMREN 0x1000000 /* Control Message Received Interrupt Enable */
1323#define CMROFEN 0x2000000 /* Control Message Receive Buffer Overflow Interrupt Enable */
1324#define CMTSEN 0x4000000 /* Control Message Transmit Buffer Successfully Sent Interrupt Enable */
1325#define CMTCEN 0x8000000 /* Control Message Transmit Buffer Successfully Cancelled Interrupt Enable */
1326#define RWRCEN 0x10000000 /* Remote Write Control Message Completed Interrupt Enable */
1327#define BCZEN 0x20000000 /* Block Counter Zero Interrupt Enable */
1328#define BMERREN 0x40000000 /* Biphase Mark Coding Error Interrupt Enable */
1329#define DERREN 0x80000000 /* DMA Error Interrupt Enable */
1330
1331/* Bit masks for MXVR_INT_EN_1 */
1332
1333#define HDONEEN0 0x1 /* DMA0 Half Done Interrupt Enable */
1334#define DONEEN0 0x2 /* DMA0 Done Interrupt Enable */
1335#define APREN 0x4 /* Asynchronous Packet Received Interrupt Enable */
1336#define APROFEN 0x8 /* Asynchronous Packet Receive Buffer Overflow Interrupt Enable */
1337#define HDONEEN1 0x10 /* DMA1 Half Done Interrupt Enable */
1338#define DONEEN1 0x20 /* DMA1 Done Interrupt Enable */
1339#define APTSEN 0x40 /* Asynchronous Packet Transmit Buffer Successfully Sent Interrupt Enable */
1340#define APTCEN 0x80 /* Asynchronous Packet Transmit Buffer Successfully Cancelled Interrupt Enable */
1341#define HDONEEN2 0x100 /* DMA2 Half Done Interrupt Enable */
1342#define DONEEN2 0x200 /* DMA2 Done Interrupt Enable */
1343#define APRCEEN 0x400 /* Asynchronous Packet Receive CRC Error Interrupt Enable */
1344#define APRPEEN 0x800 /* Asynchronous Packet Receive Packet Error Interrupt Enable */
1345#define HDONEEN3 0x1000 /* DMA3 Half Done Interrupt Enable */
1346#define DONEEN3 0x2000 /* DMA3 Done Interrupt Enable */
1347#define HDONEEN4 0x10000 /* DMA4 Half Done Interrupt Enable */
1348#define DONEEN4 0x20000 /* DMA4 Done Interrupt Enable */
1349#define HDONEEN5 0x100000 /* DMA5 Half Done Interrupt Enable */
1350#define DONEEN5 0x200000 /* DMA5 Done Interrupt Enable */
1351#define HDONEEN6 0x1000000 /* DMA6 Half Done Interrupt Enable */
1352#define DONEEN6 0x2000000 /* DMA6 Done Interrupt Enable */
1353#define HDONEEN7 0x10000000 /* DMA7 Half Done Interrupt Enable */
1354#define DONEEN7 0x20000000 /* DMA7 Done Interrupt Enable */
1355
1356/* Bit masks for MXVR_POSITION */
1357
1358#define POSITION 0x3f /* Node Position */
1359#define PVALID 0x8000 /* Node Position Valid */
1360
1361/* Bit masks for MXVR_MAX_POSITION */
1362
1363#define MPOSITION 0x3f /* Maximum Node Position */
1364#define MPVALID 0x8000 /* Maximum Node Position Valid */
1365
1366/* Bit masks for MXVR_DELAY */
1367
1368#define DELAY 0x3f /* Node Frame Delay */
1369#define DVALID 0x8000 /* Node Frame Delay Valid */
1370
1371/* Bit masks for MXVR_MAX_DELAY */
1372
1373#define MDELAY 0x3f /* Maximum Node Frame Delay */
1374#define MDVALID 0x8000 /* Maximum Node Frame Delay Valid */
1375
1376/* Bit masks for MXVR_LADDR */
1377
1378#define LADDR 0xffff /* Logical Address */
1379#define LVALID 0x80000000 /* Logical Address Valid */
1380
1381/* Bit masks for MXVR_GADDR */
1382
1383#define GADDRL 0xff /* Group Address Lower Byte */
1384#define GVALID 0x8000 /* Group Address Valid */
1385
1386/* Bit masks for MXVR_AADDR */
1387
1388#define AADDR 0xffff /* Alternate Address */
1389#define AVALID 0x80000000 /* Alternate Address Valid */
1390
1391/* Bit masks for MXVR_ALLOC_0 */
1392
1393#define CL0 0x7f /* Channel 0 Connection Label */
1394#define CIU0 0x80 /* Channel 0 In Use */
1395#define CL1 0x7f00 /* Channel 0 Connection Label */
1396#define CIU1 0x8000 /* Channel 0 In Use */
1397#define CL2 0x7f0000 /* Channel 0 Connection Label */
1398#define CIU2 0x800000 /* Channel 0 In Use */
1399#define CL3 0x7f000000 /* Channel 0 Connection Label */
1400#define CIU3 0x80000000 /* Channel 0 In Use */
1401
1402/* Bit masks for MXVR_ALLOC_1 */
1403
1404#define CL4 0x7f /* Channel 4 Connection Label */
1405#define CIU4 0x80 /* Channel 4 In Use */
1406#define CL5 0x7f00 /* Channel 5 Connection Label */
1407#define CIU5 0x8000 /* Channel 5 In Use */
1408#define CL6 0x7f0000 /* Channel 6 Connection Label */
1409#define CIU6 0x800000 /* Channel 6 In Use */
1410#define CL7 0x7f000000 /* Channel 7 Connection Label */
1411#define CIU7 0x80000000 /* Channel 7 In Use */
1412
1413/* Bit masks for MXVR_ALLOC_2 */
1414
1415#define CL8 0x7f /* Channel 8 Connection Label */
1416#define CIU8 0x80 /* Channel 8 In Use */
1417#define CL9 0x7f00 /* Channel 9 Connection Label */
1418#define CIU9 0x8000 /* Channel 9 In Use */
1419#define CL10 0x7f0000 /* Channel 10 Connection Label */
1420#define CIU10 0x800000 /* Channel 10 In Use */
1421#define CL11 0x7f000000 /* Channel 11 Connection Label */
1422#define CIU11 0x80000000 /* Channel 11 In Use */
1423
1424/* Bit masks for MXVR_ALLOC_3 */
1425
1426#define CL12 0x7f /* Channel 12 Connection Label */
1427#define CIU12 0x80 /* Channel 12 In Use */
1428#define CL13 0x7f00 /* Channel 13 Connection Label */
1429#define CIU13 0x8000 /* Channel 13 In Use */
1430#define CL14 0x7f0000 /* Channel 14 Connection Label */
1431#define CIU14 0x800000 /* Channel 14 In Use */
1432#define CL15 0x7f000000 /* Channel 15 Connection Label */
1433#define CIU15 0x80000000 /* Channel 15 In Use */
1434
1435/* Bit masks for MXVR_ALLOC_4 */
1436
1437#define CL16 0x7f /* Channel 16 Connection Label */
1438#define CIU16 0x80 /* Channel 16 In Use */
1439#define CL17 0x7f00 /* Channel 17 Connection Label */
1440#define CIU17 0x8000 /* Channel 17 In Use */
1441#define CL18 0x7f0000 /* Channel 18 Connection Label */
1442#define CIU18 0x800000 /* Channel 18 In Use */
1443#define CL19 0x7f000000 /* Channel 19 Connection Label */
1444#define CIU19 0x80000000 /* Channel 19 In Use */
1445
1446/* Bit masks for MXVR_ALLOC_5 */
1447
1448#define CL20 0x7f /* Channel 20 Connection Label */
1449#define CIU20 0x80 /* Channel 20 In Use */
1450#define CL21 0x7f00 /* Channel 21 Connection Label */
1451#define CIU21 0x8000 /* Channel 21 In Use */
1452#define CL22 0x7f0000 /* Channel 22 Connection Label */
1453#define CIU22 0x800000 /* Channel 22 In Use */
1454#define CL23 0x7f000000 /* Channel 23 Connection Label */
1455#define CIU23 0x80000000 /* Channel 23 In Use */
1456
1457/* Bit masks for MXVR_ALLOC_6 */
1458
1459#define CL24 0x7f /* Channel 24 Connection Label */
1460#define CIU24 0x80 /* Channel 24 In Use */
1461#define CL25 0x7f00 /* Channel 25 Connection Label */
1462#define CIU25 0x8000 /* Channel 25 In Use */
1463#define CL26 0x7f0000 /* Channel 26 Connection Label */
1464#define CIU26 0x800000 /* Channel 26 In Use */
1465#define CL27 0x7f000000 /* Channel 27 Connection Label */
1466#define CIU27 0x80000000 /* Channel 27 In Use */
1467
1468/* Bit masks for MXVR_ALLOC_7 */
1469
1470#define CL28 0x7f /* Channel 28 Connection Label */
1471#define CIU28 0x80 /* Channel 28 In Use */
1472#define CL29 0x7f00 /* Channel 29 Connection Label */
1473#define CIU29 0x8000 /* Channel 29 In Use */
1474#define CL30 0x7f0000 /* Channel 30 Connection Label */
1475#define CIU30 0x800000 /* Channel 30 In Use */
1476#define CL31 0x7f000000 /* Channel 31 Connection Label */
1477#define CIU31 0x80000000 /* Channel 31 In Use */
1478
1479/* Bit masks for MXVR_ALLOC_8 */
1480
1481#define CL32 0x7f /* Channel 32 Connection Label */
1482#define CIU32 0x80 /* Channel 32 In Use */
1483#define CL33 0x7f00 /* Channel 33 Connection Label */
1484#define CIU33 0x8000 /* Channel 33 In Use */
1485#define CL34 0x7f0000 /* Channel 34 Connection Label */
1486#define CIU34 0x800000 /* Channel 34 In Use */
1487#define CL35 0x7f000000 /* Channel 35 Connection Label */
1488#define CIU35 0x80000000 /* Channel 35 In Use */
1489
1490/* Bit masks for MXVR_ALLOC_9 */
1491
1492#define CL36 0x7f /* Channel 36 Connection Label */
1493#define CIU36 0x80 /* Channel 36 In Use */
1494#define CL37 0x7f00 /* Channel 37 Connection Label */
1495#define CIU37 0x8000 /* Channel 37 In Use */
1496#define CL38 0x7f0000 /* Channel 38 Connection Label */
1497#define CIU38 0x800000 /* Channel 38 In Use */
1498#define CL39 0x7f000000 /* Channel 39 Connection Label */
1499#define CIU39 0x80000000 /* Channel 39 In Use */
1500
1501/* Bit masks for MXVR_ALLOC_10 */
1502
1503#define CL40 0x7f /* Channel 40 Connection Label */
1504#define CIU40 0x80 /* Channel 40 In Use */
1505#define CL41 0x7f00 /* Channel 41 Connection Label */
1506#define CIU41 0x8000 /* Channel 41 In Use */
1507#define CL42 0x7f0000 /* Channel 42 Connection Label */
1508#define CIU42 0x800000 /* Channel 42 In Use */
1509#define CL43 0x7f000000 /* Channel 43 Connection Label */
1510#define CIU43 0x80000000 /* Channel 43 In Use */
1511
1512/* Bit masks for MXVR_ALLOC_11 */
1513
1514#define CL44 0x7f /* Channel 44 Connection Label */
1515#define CIU44 0x80 /* Channel 44 In Use */
1516#define CL45 0x7f00 /* Channel 45 Connection Label */
1517#define CIU45 0x8000 /* Channel 45 In Use */
1518#define CL46 0x7f0000 /* Channel 46 Connection Label */
1519#define CIU46 0x800000 /* Channel 46 In Use */
1520#define CL47 0x7f000000 /* Channel 47 Connection Label */
1521#define CIU47 0x80000000 /* Channel 47 In Use */
1522
1523/* Bit masks for MXVR_ALLOC_12 */
1524
1525#define CL48 0x7f /* Channel 48 Connection Label */
1526#define CIU48 0x80 /* Channel 48 In Use */
1527#define CL49 0x7f00 /* Channel 49 Connection Label */
1528#define CIU49 0x8000 /* Channel 49 In Use */
1529#define CL50 0x7f0000 /* Channel 50 Connection Label */
1530#define CIU50 0x800000 /* Channel 50 In Use */
1531#define CL51 0x7f000000 /* Channel 51 Connection Label */
1532#define CIU51 0x80000000 /* Channel 51 In Use */
1533
1534/* Bit masks for MXVR_ALLOC_13 */
1535
1536#define CL52 0x7f /* Channel 52 Connection Label */
1537#define CIU52 0x80 /* Channel 52 In Use */
1538#define CL53 0x7f00 /* Channel 53 Connection Label */
1539#define CIU53 0x8000 /* Channel 53 In Use */
1540#define CL54 0x7f0000 /* Channel 54 Connection Label */
1541#define CIU54 0x800000 /* Channel 54 In Use */
1542#define CL55 0x7f000000 /* Channel 55 Connection Label */
1543#define CIU55 0x80000000 /* Channel 55 In Use */
1544
1545/* Bit masks for MXVR_ALLOC_14 */
1546
1547#define CL56 0x7f /* Channel 56 Connection Label */
1548#define CIU56 0x80 /* Channel 56 In Use */
1549#define CL57 0x7f00 /* Channel 57 Connection Label */
1550#define CIU57 0x8000 /* Channel 57 In Use */
1551#define CL58 0x7f0000 /* Channel 58 Connection Label */
1552#define CIU58 0x800000 /* Channel 58 In Use */
1553#define CL59 0x7f000000 /* Channel 59 Connection Label */
1554#define CIU59 0x80000000 /* Channel 59 In Use */
1555
1556/* MXVR_SYNC_LCHAN_0 Masks */
1557
1558#define LCHANPC0 0x0000000Flu
1559#define LCHANPC1 0x000000F0lu
1560#define LCHANPC2 0x00000F00lu
1561#define LCHANPC3 0x0000F000lu
1562#define LCHANPC4 0x000F0000lu
1563#define LCHANPC5 0x00F00000lu
1564#define LCHANPC6 0x0F000000lu
1565#define LCHANPC7 0xF0000000lu
1566
1567
1568/* MXVR_SYNC_LCHAN_1 Masks */
1569
1570#define LCHANPC8 0x0000000Flu
1571#define LCHANPC9 0x000000F0lu
1572#define LCHANPC10 0x00000F00lu
1573#define LCHANPC11 0x0000F000lu
1574#define LCHANPC12 0x000F0000lu
1575#define LCHANPC13 0x00F00000lu
1576#define LCHANPC14 0x0F000000lu
1577#define LCHANPC15 0xF0000000lu
1578
1579
1580/* MXVR_SYNC_LCHAN_2 Masks */
1581
1582#define LCHANPC16 0x0000000Flu
1583#define LCHANPC17 0x000000F0lu
1584#define LCHANPC18 0x00000F00lu
1585#define LCHANPC19 0x0000F000lu
1586#define LCHANPC20 0x000F0000lu
1587#define LCHANPC21 0x00F00000lu
1588#define LCHANPC22 0x0F000000lu
1589#define LCHANPC23 0xF0000000lu
1590
1591
1592/* MXVR_SYNC_LCHAN_3 Masks */
1593
1594#define LCHANPC24 0x0000000Flu
1595#define LCHANPC25 0x000000F0lu
1596#define LCHANPC26 0x00000F00lu
1597#define LCHANPC27 0x0000F000lu
1598#define LCHANPC28 0x000F0000lu
1599#define LCHANPC29 0x00F00000lu
1600#define LCHANPC30 0x0F000000lu
1601#define LCHANPC31 0xF0000000lu
1602
1603
1604/* MXVR_SYNC_LCHAN_4 Masks */
1605
1606#define LCHANPC32 0x0000000Flu
1607#define LCHANPC33 0x000000F0lu
1608#define LCHANPC34 0x00000F00lu
1609#define LCHANPC35 0x0000F000lu
1610#define LCHANPC36 0x000F0000lu
1611#define LCHANPC37 0x00F00000lu
1612#define LCHANPC38 0x0F000000lu
1613#define LCHANPC39 0xF0000000lu
1614
1615
1616/* MXVR_SYNC_LCHAN_5 Masks */
1617
1618#define LCHANPC40 0x0000000Flu
1619#define LCHANPC41 0x000000F0lu
1620#define LCHANPC42 0x00000F00lu
1621#define LCHANPC43 0x0000F000lu
1622#define LCHANPC44 0x000F0000lu
1623#define LCHANPC45 0x00F00000lu
1624#define LCHANPC46 0x0F000000lu
1625#define LCHANPC47 0xF0000000lu
1626
1627
1628/* MXVR_SYNC_LCHAN_6 Masks */
1629
1630#define LCHANPC48 0x0000000Flu
1631#define LCHANPC49 0x000000F0lu
1632#define LCHANPC50 0x00000F00lu
1633#define LCHANPC51 0x0000F000lu
1634#define LCHANPC52 0x000F0000lu
1635#define LCHANPC53 0x00F00000lu
1636#define LCHANPC54 0x0F000000lu
1637#define LCHANPC55 0xF0000000lu
1638
1639
1640/* MXVR_SYNC_LCHAN_7 Masks */
1641
1642#define LCHANPC56 0x0000000Flu
1643#define LCHANPC57 0x000000F0lu
1644#define LCHANPC58 0x00000F00lu
1645#define LCHANPC59 0x0000F000lu
1646
1647/* Bit masks for MXVR_DMAx_CONFIG */
1648
1649#define MDMAEN 0x1 /* DMA Channel Enable */
1650#define DMADD 0x2 /* DMA Channel Direction */
1651#define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */
1652#define LCHAN 0x3c0 /* DMA Channel Logical Channel */
1653#define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */
1654#define BY2SWAPEN 0x800 /* DMA Channel Two Byte Swap Enable */
1655#define MFLOW 0x7000 /* DMA Channel Operation Flow */
1656#define FIXEDPM 0x80000 /* DMA Channel Fixed Pattern Matching Select */
1657#define STARTPAT 0x300000 /* DMA Channel Start Pattern Select */
1658#define STOPPAT 0xc00000 /* DMA Channel Stop Pattern Select */
1659#define COUNTPOS 0x1c000000 /* DMA Channel Count Position */
1660
1661/* Bit masks for MXVR_AP_CTL */
1662
1663#define STARTAP 0x1 /* Start Asynchronous Packet Transmission */
1664#define CANCELAP 0x2 /* Cancel Asynchronous Packet Transmission */
1665#define RESETAP 0x4 /* Reset Asynchronous Packet Arbitration */
1666#define APRBE0 0x4000 /* Asynchronous Packet Receive Buffer Entry 0 */
1667#define APRBE1 0x8000 /* Asynchronous Packet Receive Buffer Entry 1 */
1668
1669/* Bit masks for MXVR_APRB_START_ADDR */
1670
1671#define MXVR_APRB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Receive Buffer Start Address */
1672
1673/* Bit masks for MXVR_APRB_CURR_ADDR */
1674
1675#define MXVR_APRB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Receive Buffer Current Address */
1676
1677/* Bit masks for MXVR_APTB_START_ADDR */
1678
1679#define MXVR_APTB_START_ADDR_MASK 0x1fffffe /* Asynchronous Packet Transmit Buffer Start Address */
1680
1681/* Bit masks for MXVR_APTB_CURR_ADDR */
1682
1683#define MXVR_APTB_CURR_ADDR_MASK 0xffffffff /* Asynchronous Packet Transmit Buffer Current Address */
1684
1685/* Bit masks for MXVR_CM_CTL */
1686
1687#define STARTCM 0x1 /* Start Control Message Transmission */
1688#define CANCELCM 0x2 /* Cancel Control Message Transmission */
1689#define CMRBE0 0x10000 /* Control Message Receive Buffer Entry 0 */
1690#define CMRBE1 0x20000 /* Control Message Receive Buffer Entry 1 */
1691#define CMRBE2 0x40000 /* Control Message Receive Buffer Entry 2 */
1692#define CMRBE3 0x80000 /* Control Message Receive Buffer Entry 3 */
1693#define CMRBE4 0x100000 /* Control Message Receive Buffer Entry 4 */
1694#define CMRBE5 0x200000 /* Control Message Receive Buffer Entry 5 */
1695#define CMRBE6 0x400000 /* Control Message Receive Buffer Entry 6 */
1696#define CMRBE7 0x800000 /* Control Message Receive Buffer Entry 7 */
1697#define CMRBE8 0x1000000 /* Control Message Receive Buffer Entry 8 */
1698#define CMRBE9 0x2000000 /* Control Message Receive Buffer Entry 9 */
1699#define CMRBE10 0x4000000 /* Control Message Receive Buffer Entry 10 */
1700#define CMRBE11 0x8000000 /* Control Message Receive Buffer Entry 11 */
1701#define CMRBE12 0x10000000 /* Control Message Receive Buffer Entry 12 */
1702#define CMRBE13 0x20000000 /* Control Message Receive Buffer Entry 13 */
1703#define CMRBE14 0x40000000 /* Control Message Receive Buffer Entry 14 */
1704#define CMRBE15 0x80000000 /* Control Message Receive Buffer Entry 15 */
1705
1706/* Bit masks for MXVR_CMRB_START_ADDR */
1707
1708#define MXVR_CMRB_START_ADDR_MASK 0x1fffffe /* Control Message Receive Buffer Start Address */
1709
1710/* Bit masks for MXVR_CMRB_CURR_ADDR */
1711
1712#define MXVR_CMRB_CURR_ADDR_MASK 0xffffffff /* Control Message Receive Buffer Current Address */
1713
1714/* Bit masks for MXVR_CMTB_START_ADDR */
1715
1716#define MXVR_CMTB_START_ADDR_MASK 0x1fffffe /* Control Message Transmit Buffer Start Address */
1717
1718/* Bit masks for MXVR_CMTB_CURR_ADDR */
1719
1720#define MXVR_CMTB_CURR_ADDR_MASK 0xffffffff /* Control Message Transmit Buffer Current Address */
1721
1722/* Bit masks for MXVR_RRDB_START_ADDR */
1723
1724#define MXVR_RRDB_START_ADDR_MASK 0x1fffffe /* Remote Read Buffer Start Address */
1725
1726/* Bit masks for MXVR_RRDB_CURR_ADDR */
1727
1728#define MXVR_RRDB_CURR_ADDR_MASK 0xffffffff /* Remote Read Buffer Current Address */
1729
1730/* Bit masks for MXVR_PAT_DATAx */
1731
1732#define MATCH_DATA_0 0xff /* Pattern Match Data Byte 0 */
1733#define MATCH_DATA_1 0xff00 /* Pattern Match Data Byte 1 */
1734#define MATCH_DATA_2 0xff0000 /* Pattern Match Data Byte 2 */
1735#define MATCH_DATA_3 0xff000000 /* Pattern Match Data Byte 3 */
1736
1737/* Bit masks for MXVR_PAT_EN_0 */
1738
1739#define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */
1740#define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */
1741#define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */
1742#define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */
1743#define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */
1744#define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */
1745#define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */
1746#define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */
1747#define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */
1748#define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */
1749#define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */
1750#define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */
1751#define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */
1752#define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */
1753#define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */
1754#define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */
1755#define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */
1756#define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */
1757#define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */
1758#define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */
1759#define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */
1760#define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */
1761#define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */
1762#define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */
1763#define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */
1764#define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */
1765#define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */
1766#define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */
1767#define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */
1768#define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */
1769#define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */
1770#define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */
1771
1772/* Bit masks for MXVR_PAT_EN_1 */
1773
1774#define MATCH_EN_0_0 0x1 /* Pattern Match Enable Byte 0 Bit 0 */
1775#define MATCH_EN_0_1 0x2 /* Pattern Match Enable Byte 0 Bit 1 */
1776#define MATCH_EN_0_2 0x4 /* Pattern Match Enable Byte 0 Bit 2 */
1777#define MATCH_EN_0_3 0x8 /* Pattern Match Enable Byte 0 Bit 3 */
1778#define MATCH_EN_0_4 0x10 /* Pattern Match Enable Byte 0 Bit 4 */
1779#define MATCH_EN_0_5 0x20 /* Pattern Match Enable Byte 0 Bit 5 */
1780#define MATCH_EN_0_6 0x40 /* Pattern Match Enable Byte 0 Bit 6 */
1781#define MATCH_EN_0_7 0x80 /* Pattern Match Enable Byte 0 Bit 7 */
1782#define MATCH_EN_1_0 0x100 /* Pattern Match Enable Byte 1 Bit 0 */
1783#define MATCH_EN_1_1 0x200 /* Pattern Match Enable Byte 1 Bit 1 */
1784#define MATCH_EN_1_2 0x400 /* Pattern Match Enable Byte 1 Bit 2 */
1785#define MATCH_EN_1_3 0x800 /* Pattern Match Enable Byte 1 Bit 3 */
1786#define MATCH_EN_1_4 0x1000 /* Pattern Match Enable Byte 1 Bit 4 */
1787#define MATCH_EN_1_5 0x2000 /* Pattern Match Enable Byte 1 Bit 5 */
1788#define MATCH_EN_1_6 0x4000 /* Pattern Match Enable Byte 1 Bit 6 */
1789#define MATCH_EN_1_7 0x8000 /* Pattern Match Enable Byte 1 Bit 7 */
1790#define MATCH_EN_2_0 0x10000 /* Pattern Match Enable Byte 2 Bit 0 */
1791#define MATCH_EN_2_1 0x20000 /* Pattern Match Enable Byte 2 Bit 1 */
1792#define MATCH_EN_2_2 0x40000 /* Pattern Match Enable Byte 2 Bit 2 */
1793#define MATCH_EN_2_3 0x80000 /* Pattern Match Enable Byte 2 Bit 3 */
1794#define MATCH_EN_2_4 0x100000 /* Pattern Match Enable Byte 2 Bit 4 */
1795#define MATCH_EN_2_5 0x200000 /* Pattern Match Enable Byte 2 Bit 5 */
1796#define MATCH_EN_2_6 0x400000 /* Pattern Match Enable Byte 2 Bit 6 */
1797#define MATCH_EN_2_7 0x800000 /* Pattern Match Enable Byte 2 Bit 7 */
1798#define MATCH_EN_3_0 0x1000000 /* Pattern Match Enable Byte 3 Bit 0 */
1799#define MATCH_EN_3_1 0x2000000 /* Pattern Match Enable Byte 3 Bit 1 */
1800#define MATCH_EN_3_2 0x4000000 /* Pattern Match Enable Byte 3 Bit 2 */
1801#define MATCH_EN_3_3 0x8000000 /* Pattern Match Enable Byte 3 Bit 3 */
1802#define MATCH_EN_3_4 0x10000000 /* Pattern Match Enable Byte 3 Bit 4 */
1803#define MATCH_EN_3_5 0x20000000 /* Pattern Match Enable Byte 3 Bit 5 */
1804#define MATCH_EN_3_6 0x40000000 /* Pattern Match Enable Byte 3 Bit 6 */
1805#define MATCH_EN_3_7 0x80000000 /* Pattern Match Enable Byte 3 Bit 7 */
1806
1807/* Bit masks for MXVR_FRAME_CNT_0 */
1808
1809#define FCNT 0xffff /* Frame Count */
1810
1811/* Bit masks for MXVR_FRAME_CNT_1 */
1812
1813#define FCNT 0xffff /* Frame Count */
1814
1815/* Bit masks for MXVR_ROUTING_0 */
1816
1817#define TX_CH0 0x3f /* Transmit Channel 0 */
1818#define MUTE_CH0 0x80 /* Mute Channel 0 */
1819#define TX_CH1 0x3f00 /* Transmit Channel 0 */
1820#define MUTE_CH1 0x8000 /* Mute Channel 0 */
1821#define TX_CH2 0x3f0000 /* Transmit Channel 0 */
1822#define MUTE_CH2 0x800000 /* Mute Channel 0 */
1823#define TX_CH3 0x3f000000 /* Transmit Channel 0 */
1824#define MUTE_CH3 0x80000000 /* Mute Channel 0 */
1825
1826/* Bit masks for MXVR_ROUTING_1 */
1827
1828#define TX_CH4 0x3f /* Transmit Channel 4 */
1829#define MUTE_CH4 0x80 /* Mute Channel 4 */
1830#define TX_CH5 0x3f00 /* Transmit Channel 5 */
1831#define MUTE_CH5 0x8000 /* Mute Channel 5 */
1832#define TX_CH6 0x3f0000 /* Transmit Channel 6 */
1833#define MUTE_CH6 0x800000 /* Mute Channel 6 */
1834#define TX_CH7 0x3f000000 /* Transmit Channel 7 */
1835#define MUTE_CH7 0x80000000 /* Mute Channel 7 */
1836
1837/* Bit masks for MXVR_ROUTING_2 */
1838
1839#define TX_CH8 0x3f /* Transmit Channel 8 */
1840#define MUTE_CH8 0x80 /* Mute Channel 8 */
1841#define TX_CH9 0x3f00 /* Transmit Channel 9 */
1842#define MUTE_CH9 0x8000 /* Mute Channel 9 */
1843#define TX_CH10 0x3f0000 /* Transmit Channel 10 */
1844#define MUTE_CH10 0x800000 /* Mute Channel 10 */
1845#define TX_CH11 0x3f000000 /* Transmit Channel 11 */
1846#define MUTE_CH11 0x80000000 /* Mute Channel 11 */
1847
1848/* Bit masks for MXVR_ROUTING_3 */
1849
1850#define TX_CH12 0x3f /* Transmit Channel 12 */
1851#define MUTE_CH12 0x80 /* Mute Channel 12 */
1852#define TX_CH13 0x3f00 /* Transmit Channel 13 */
1853#define MUTE_CH13 0x8000 /* Mute Channel 13 */
1854#define TX_CH14 0x3f0000 /* Transmit Channel 14 */
1855#define MUTE_CH14 0x800000 /* Mute Channel 14 */
1856#define TX_CH15 0x3f000000 /* Transmit Channel 15 */
1857#define MUTE_CH15 0x80000000 /* Mute Channel 15 */
1858
1859/* Bit masks for MXVR_ROUTING_4 */
1860
1861#define TX_CH16 0x3f /* Transmit Channel 16 */
1862#define MUTE_CH16 0x80 /* Mute Channel 16 */
1863#define TX_CH17 0x3f00 /* Transmit Channel 17 */
1864#define MUTE_CH17 0x8000 /* Mute Channel 17 */
1865#define TX_CH18 0x3f0000 /* Transmit Channel 18 */
1866#define MUTE_CH18 0x800000 /* Mute Channel 18 */
1867#define TX_CH19 0x3f000000 /* Transmit Channel 19 */
1868#define MUTE_CH19 0x80000000 /* Mute Channel 19 */
1869
1870/* Bit masks for MXVR_ROUTING_5 */
1871
1872#define TX_CH20 0x3f /* Transmit Channel 20 */
1873#define MUTE_CH20 0x80 /* Mute Channel 20 */
1874#define TX_CH21 0x3f00 /* Transmit Channel 21 */
1875#define MUTE_CH21 0x8000 /* Mute Channel 21 */
1876#define TX_CH22 0x3f0000 /* Transmit Channel 22 */
1877#define MUTE_CH22 0x800000 /* Mute Channel 22 */
1878#define TX_CH23 0x3f000000 /* Transmit Channel 23 */
1879#define MUTE_CH23 0x80000000 /* Mute Channel 23 */
1880
1881/* Bit masks for MXVR_ROUTING_6 */
1882
1883#define TX_CH24 0x3f /* Transmit Channel 24 */
1884#define MUTE_CH24 0x80 /* Mute Channel 24 */
1885#define TX_CH25 0x3f00 /* Transmit Channel 25 */
1886#define MUTE_CH25 0x8000 /* Mute Channel 25 */
1887#define TX_CH26 0x3f0000 /* Transmit Channel 26 */
1888#define MUTE_CH26 0x800000 /* Mute Channel 26 */
1889#define TX_CH27 0x3f000000 /* Transmit Channel 27 */
1890#define MUTE_CH27 0x80000000 /* Mute Channel 27 */
1891
1892/* Bit masks for MXVR_ROUTING_7 */
1893
1894#define TX_CH28 0x3f /* Transmit Channel 28 */
1895#define MUTE_CH28 0x80 /* Mute Channel 28 */
1896#define TX_CH29 0x3f00 /* Transmit Channel 29 */
1897#define MUTE_CH29 0x8000 /* Mute Channel 29 */
1898#define TX_CH30 0x3f0000 /* Transmit Channel 30 */
1899#define MUTE_CH30 0x800000 /* Mute Channel 30 */
1900#define TX_CH31 0x3f000000 /* Transmit Channel 31 */
1901#define MUTE_CH31 0x80000000 /* Mute Channel 31 */
1902
1903/* Bit masks for MXVR_ROUTING_8 */
1904
1905#define TX_CH32 0x3f /* Transmit Channel 32 */
1906#define MUTE_CH32 0x80 /* Mute Channel 32 */
1907#define TX_CH33 0x3f00 /* Transmit Channel 33 */
1908#define MUTE_CH33 0x8000 /* Mute Channel 33 */
1909#define TX_CH34 0x3f0000 /* Transmit Channel 34 */
1910#define MUTE_CH34 0x800000 /* Mute Channel 34 */
1911#define TX_CH35 0x3f000000 /* Transmit Channel 35 */
1912#define MUTE_CH35 0x80000000 /* Mute Channel 35 */
1913
1914/* Bit masks for MXVR_ROUTING_9 */
1915
1916#define TX_CH36 0x3f /* Transmit Channel 36 */
1917#define MUTE_CH36 0x80 /* Mute Channel 36 */
1918#define TX_CH37 0x3f00 /* Transmit Channel 37 */
1919#define MUTE_CH37 0x8000 /* Mute Channel 37 */
1920#define TX_CH38 0x3f0000 /* Transmit Channel 38 */
1921#define MUTE_CH38 0x800000 /* Mute Channel 38 */
1922#define TX_CH39 0x3f000000 /* Transmit Channel 39 */
1923#define MUTE_CH39 0x80000000 /* Mute Channel 39 */
1924
1925/* Bit masks for MXVR_ROUTING_10 */
1926
1927#define TX_CH40 0x3f /* Transmit Channel 40 */
1928#define MUTE_CH40 0x80 /* Mute Channel 40 */
1929#define TX_CH41 0x3f00 /* Transmit Channel 41 */
1930#define MUTE_CH41 0x8000 /* Mute Channel 41 */
1931#define TX_CH42 0x3f0000 /* Transmit Channel 42 */
1932#define MUTE_CH42 0x800000 /* Mute Channel 42 */
1933#define TX_CH43 0x3f000000 /* Transmit Channel 43 */
1934#define MUTE_CH43 0x80000000 /* Mute Channel 43 */
1935
1936/* Bit masks for MXVR_ROUTING_11 */
1937
1938#define TX_CH44 0x3f /* Transmit Channel 44 */
1939#define MUTE_CH44 0x80 /* Mute Channel 44 */
1940#define TX_CH45 0x3f00 /* Transmit Channel 45 */
1941#define MUTE_CH45 0x8000 /* Mute Channel 45 */
1942#define TX_CH46 0x3f0000 /* Transmit Channel 46 */
1943#define MUTE_CH46 0x800000 /* Mute Channel 46 */
1944#define TX_CH47 0x3f000000 /* Transmit Channel 47 */
1945#define MUTE_CH47 0x80000000 /* Mute Channel 47 */
1946
1947/* Bit masks for MXVR_ROUTING_12 */
1948
1949#define TX_CH48 0x3f /* Transmit Channel 48 */
1950#define MUTE_CH48 0x80 /* Mute Channel 48 */
1951#define TX_CH49 0x3f00 /* Transmit Channel 49 */
1952#define MUTE_CH49 0x8000 /* Mute Channel 49 */
1953#define TX_CH50 0x3f0000 /* Transmit Channel 50 */
1954#define MUTE_CH50 0x800000 /* Mute Channel 50 */
1955#define TX_CH51 0x3f000000 /* Transmit Channel 51 */
1956#define MUTE_CH51 0x80000000 /* Mute Channel 51 */
1957
1958/* Bit masks for MXVR_ROUTING_13 */
1959
1960#define TX_CH52 0x3f /* Transmit Channel 52 */
1961#define MUTE_CH52 0x80 /* Mute Channel 52 */
1962#define TX_CH53 0x3f00 /* Transmit Channel 53 */
1963#define MUTE_CH53 0x8000 /* Mute Channel 53 */
1964#define TX_CH54 0x3f0000 /* Transmit Channel 54 */
1965#define MUTE_CH54 0x800000 /* Mute Channel 54 */
1966#define TX_CH55 0x3f000000 /* Transmit Channel 55 */
1967#define MUTE_CH55 0x80000000 /* Mute Channel 55 */
1968
1969/* Bit masks for MXVR_ROUTING_14 */
1970
1971#define TX_CH56 0x3f /* Transmit Channel 56 */
1972#define MUTE_CH56 0x80 /* Mute Channel 56 */
1973#define TX_CH57 0x3f00 /* Transmit Channel 57 */
1974#define MUTE_CH57 0x8000 /* Mute Channel 57 */
1975#define TX_CH58 0x3f0000 /* Transmit Channel 58 */
1976#define MUTE_CH58 0x800000 /* Mute Channel 58 */
1977#define TX_CH59 0x3f000000 /* Transmit Channel 59 */
1978#define MUTE_CH59 0x80000000 /* Mute Channel 59 */
1979
1980/* Bit masks for MXVR_BLOCK_CNT */
1981
1982#define BCNT 0xffff /* Block Count */
1983
1984/* Bit masks for MXVR_CLK_CTL */
1985
1986#define MXTALCEN 0x1 /* MXVR Crystal Oscillator Clock Enable */
1987#define MXTALFEN 0x2 /* MXVR Crystal Oscillator Feedback Enable */
1988#define MXTALMUL 0x30 /* MXVR Crystal Multiplier */
1989#define CLKX3SEL 0x80 /* Clock Generation Source Select */
1990#define MMCLKEN 0x100 /* Master Clock Enable */
1991#define MMCLKMUL 0x1e00 /* Master Clock Multiplication Factor */
1992#define PLLSMPS 0xe000 /* MXVR PLL State Machine Prescaler */
1993#define MBCLKEN 0x10000 /* Bit Clock Enable */
1994#define MBCLKDIV 0x1e0000 /* Bit Clock Divide Factor */
1995#define INVRX 0x800000 /* Invert Receive Data */
1996#define MFSEN 0x1000000 /* Frame Sync Enable */
1997#define MFSDIV 0x1e000000 /* Frame Sync Divide Factor */
1998#define MFSSEL 0x60000000 /* Frame Sync Select */
1999#define MFSSYNC 0x80000000 /* Frame Sync Synchronization Select */
2000
2001/* Bit masks for MXVR_CDRPLL_CTL */
2002
2003#define CDRSMEN 0x1 /* MXVR CDRPLL State Machine Enable */
2004#define CDRRSTB 0x2 /* MXVR CDRPLL Reset */
2005#define CDRSVCO 0x4 /* MXVR CDRPLL Start VCO */
2006#define CDRMODE 0x8 /* MXVR CDRPLL CDR Mode Select */
2007#define CDRSCNT 0x3f0 /* MXVR CDRPLL Start Counter */
2008#define CDRLCNT 0xfc00 /* MXVR CDRPLL Lock Counter */
2009#define CDRSHPSEL 0x3f0000 /* MXVR CDRPLL Shaper Select */
2010#define CDRSHPEN 0x800000 /* MXVR CDRPLL Shaper Enable */
2011#define CDRCPSEL 0xff000000 /* MXVR CDRPLL Charge Pump Current Select */
2012
2013/* Bit masks for MXVR_FMPLL_CTL */
2014
2015#define FMSMEN 0x1 /* MXVR FMPLL State Machine Enable */
2016#define FMRSTB 0x2 /* MXVR FMPLL Reset */
2017#define FMSVCO 0x4 /* MXVR FMPLL Start VCO */
2018#define FMSCNT 0x3f0 /* MXVR FMPLL Start Counter */
2019#define FMLCNT 0xfc00 /* MXVR FMPLL Lock Counter */
2020#define FMCPSEL 0xff000000 /* MXVR FMPLL Charge Pump Current Select */
2021
2022/* Bit masks for MXVR_PIN_CTL */
2023
2024#define MTXONBOD 0x1 /* MTXONB Open Drain Select */
2025#define MTXONBG 0x2 /* MTXONB Gates MTX Select */
2026#define MFSOE 0x10 /* MFS Output Enable */
2027#define MFSGPSEL 0x20 /* MFS General Purpose Output Select */
2028#define MFSGPDAT 0x40 /* MFS General Purpose Output Data */
2029
2030/* Bit masks for MXVR_SCLK_CNT */
2031
2032#define SCNT 0xffff /* System Clock Count */
2033
2034/* Bit masks for KPAD_CTL */
2035
2036#define KPAD_EN 0x1 /* Keypad Enable */
2037#define KPAD_IRQMODE 0x6 /* Key Press Interrupt Enable */
2038#define KPAD_ROWEN 0x1c00 /* Row Enable Width */
2039#define KPAD_COLEN 0xe000 /* Column Enable Width */
2040
2041/* Bit masks for KPAD_PRESCALE */
2042
2043#define KPAD_PRESCALE_VAL 0x3f /* Key Prescale Value */
2044
2045/* Bit masks for KPAD_MSEL */
2046
2047#define DBON_SCALE 0xff /* Debounce Scale Value */
2048#define COLDRV_SCALE 0xff00 /* Column Driver Scale Value */
2049
2050/* Bit masks for KPAD_ROWCOL */
2051
2052#define KPAD_ROW 0xff /* Rows Pressed */
2053#define KPAD_COL 0xff00 /* Columns Pressed */
2054
2055/* Bit masks for KPAD_STAT */
2056
2057#define KPAD_IRQ 0x1 /* Keypad Interrupt Status */
2058#define KPAD_MROWCOL 0x6 /* Multiple Row/Column Keypress Status */
2059#define KPAD_PRESSED 0x8 /* Key press current status */
2060
2061/* Bit masks for KPAD_SOFTEVAL */
2062
2063#define KPAD_SOFTEVAL_E 0x2 /* Software Programmable Force Evaluate */
2064
2065/* Bit masks for SDH_COMMAND */
2066
2067#define CMD_IDX 0x3f /* Command Index */
2068#define CMD_RSP 0x40 /* Response */
2069#define CMD_L_RSP 0x80 /* Long Response */
2070#define CMD_INT_E 0x100 /* Command Interrupt */
2071#define CMD_PEND_E 0x200 /* Command Pending */
2072#define CMD_E 0x400 /* Command Enable */
2073
2074/* Bit masks for SDH_PWR_CTL */
2075
2076#define PWR_ON 0x3 /* Power On */
2077#if 0
2078#define TBD 0x3c /* TBD */
2079#endif
2080#define SD_CMD_OD 0x40 /* Open Drain Output */
2081#define ROD_CTL 0x80 /* Rod Control */
2082
2083/* Bit masks for SDH_CLK_CTL */
2084
2085#define CLKDIV 0xff /* MC_CLK Divisor */
2086#define CLK_E 0x100 /* MC_CLK Bus Clock Enable */
2087#define PWR_SV_E 0x200 /* Power Save Enable */
2088#define CLKDIV_BYPASS 0x400 /* Bypass Divisor */
2089#define WIDE_BUS 0x800 /* Wide Bus Mode Enable */
2090
2091/* Bit masks for SDH_RESP_CMD */
2092
2093#define RESP_CMD 0x3f /* Response Command */
2094
2095/* Bit masks for SDH_DATA_CTL */
2096
2097#define DTX_E 0x1 /* Data Transfer Enable */
2098#define DTX_DIR 0x2 /* Data Transfer Direction */
2099#define DTX_MODE 0x4 /* Data Transfer Mode */
2100#define DTX_DMA_E 0x8 /* Data Transfer DMA Enable */
2101#define DTX_BLK_LGTH 0xf0 /* Data Transfer Block Length */
2102
2103/* Bit masks for SDH_STATUS */
2104
2105#define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */
2106#define DAT_CRC_FAIL 0x2 /* Data CRC Fail */
2107#define CMD_TIME_OUT 0x4 /* CMD Time Out */
2108#define DAT_TIME_OUT 0x8 /* Data Time Out */
2109#define TX_UNDERRUN 0x10 /* Transmit Underrun */
2110#define RX_OVERRUN 0x20 /* Receive Overrun */
2111#define CMD_RESP_END 0x40 /* CMD Response End */
2112#define CMD_SENT 0x80 /* CMD Sent */
2113#define DAT_END 0x100 /* Data End */
2114#define START_BIT_ERR 0x200 /* Start Bit Error */
2115#define DAT_BLK_END 0x400 /* Data Block End */
2116#define CMD_ACT 0x800 /* CMD Active */
2117#define TX_ACT 0x1000 /* Transmit Active */
2118#define RX_ACT 0x2000 /* Receive Active */
2119#define TX_FIFO_STAT 0x4000 /* Transmit FIFO Status */
2120#define RX_FIFO_STAT 0x8000 /* Receive FIFO Status */
2121#define TX_FIFO_FULL 0x10000 /* Transmit FIFO Full */
2122#define RX_FIFO_FULL 0x20000 /* Receive FIFO Full */
2123#define TX_FIFO_ZERO 0x40000 /* Transmit FIFO Empty */
2124#define RX_DAT_ZERO 0x80000 /* Receive FIFO Empty */
2125#define TX_DAT_RDY 0x100000 /* Transmit Data Available */
2126#define RX_FIFO_RDY 0x200000 /* Receive Data Available */
2127
2128/* Bit masks for SDH_STATUS_CLR */
2129
2130#define CMD_CRC_FAIL_STAT 0x1 /* CMD CRC Fail Status */
2131#define DAT_CRC_FAIL_STAT 0x2 /* Data CRC Fail Status */
2132#define CMD_TIMEOUT_STAT 0x4 /* CMD Time Out Status */
2133#define DAT_TIMEOUT_STAT 0x8 /* Data Time Out status */
2134#define TX_UNDERRUN_STAT 0x10 /* Transmit Underrun Status */
2135#define RX_OVERRUN_STAT 0x20 /* Receive Overrun Status */
2136#define CMD_RESP_END_STAT 0x40 /* CMD Response End Status */
2137#define CMD_SENT_STAT 0x80 /* CMD Sent Status */
2138#define DAT_END_STAT 0x100 /* Data End Status */
2139#define START_BIT_ERR_STAT 0x200 /* Start Bit Error Status */
2140#define DAT_BLK_END_STAT 0x400 /* Data Block End Status */
2141
2142/* Bit masks for SDH_MASK0 */
2143
2144#define CMD_CRC_FAIL_MASK 0x1 /* CMD CRC Fail Mask */
2145#define DAT_CRC_FAIL_MASK 0x2 /* Data CRC Fail Mask */
2146#define CMD_TIMEOUT_MASK 0x4 /* CMD Time Out Mask */
2147#define DAT_TIMEOUT_MASK 0x8 /* Data Time Out Mask */
2148#define TX_UNDERRUN_MASK 0x10 /* Transmit Underrun Mask */
2149#define RX_OVERRUN_MASK 0x20 /* Receive Overrun Mask */
2150#define CMD_RESP_END_MASK 0x40 /* CMD Response End Mask */
2151#define CMD_SENT_MASK 0x80 /* CMD Sent Mask */
2152#define DAT_END_MASK 0x100 /* Data End Mask */
2153#define START_BIT_ERR_MASK 0x200 /* Start Bit Error Mask */
2154#define DAT_BLK_END_MASK 0x400 /* Data Block End Mask */
2155#define CMD_ACT_MASK 0x800 /* CMD Active Mask */
2156#define TX_ACT_MASK 0x1000 /* Transmit Active Mask */
2157#define RX_ACT_MASK 0x2000 /* Receive Active Mask */
2158#define TX_FIFO_STAT_MASK 0x4000 /* Transmit FIFO Status Mask */
2159#define RX_FIFO_STAT_MASK 0x8000 /* Receive FIFO Status Mask */
2160#define TX_FIFO_FULL_MASK 0x10000 /* Transmit FIFO Full Mask */
2161#define RX_FIFO_FULL_MASK 0x20000 /* Receive FIFO Full Mask */
2162#define TX_FIFO_ZERO_MASK 0x40000 /* Transmit FIFO Empty Mask */
2163#define RX_DAT_ZERO_MASK 0x80000 /* Receive FIFO Empty Mask */
2164#define TX_DAT_RDY_MASK 0x100000 /* Transmit Data Available Mask */
2165#define RX_FIFO_RDY_MASK 0x200000 /* Receive Data Available Mask */
2166
2167/* Bit masks for SDH_FIFO_CNT */
2168
2169#define FIFO_COUNT 0x7fff /* FIFO Count */
2170
2171/* Bit masks for SDH_E_STATUS */
2172
2173#define SDIO_INT_DET 0x2 /* SDIO Int Detected */
2174#define SD_CARD_DET 0x10 /* SD Card Detect */
2175
2176/* Bit masks for SDH_E_MASK */
2177
2178#define SDIO_MSK 0x2 /* Mask SDIO Int Detected */
2179#define SCD_MSK 0x40 /* Mask Card Detect */
2180
2181/* Bit masks for SDH_CFG */
2182
2183#define CLKS_EN 0x1 /* Clocks Enable */
2184#define SD4E 0x4 /* SDIO 4-Bit Enable */
2185#define MWE 0x8 /* Moving Window Enable */
2186#define SD_RST 0x10 /* SDMMC Reset */
2187#define PUP_SDDAT 0x20 /* Pull-up SD_DAT */
2188#define PUP_SDDAT3 0x40 /* Pull-up SD_DAT3 */
2189#define PD_SDDAT3 0x80 /* Pull-down SD_DAT3 */
2190
2191/* Bit masks for SDH_RD_WAIT_EN */
2192
2193#define RWR 0x1 /* Read Wait Request */
2194
2195/* Bit masks for ATAPI_CONTROL */
2196
2197#define PIO_START 0x1 /* Start PIO/Reg Op */
2198#define MULTI_START 0x2 /* Start Multi-DMA Op */
2199#define ULTRA_START 0x4 /* Start Ultra-DMA Op */
2200#define XFER_DIR 0x8 /* Transfer Direction */
2201#define IORDY_EN 0x10 /* IORDY Enable */
2202#define FIFO_FLUSH 0x20 /* Flush FIFOs */
2203#define SOFT_RST 0x40 /* Soft Reset */
2204#define DEV_RST 0x80 /* Device Reset */
2205#define TFRCNT_RST 0x100 /* Trans Count Reset */
2206#define END_ON_TERM 0x200 /* End/Terminate Select */
2207#define PIO_USE_DMA 0x400 /* PIO-DMA Enable */
2208#define UDMAIN_FIFO_THRS 0xf000 /* Ultra DMA-IN FIFO Threshold */
2209
2210/* Bit masks for ATAPI_STATUS */
2211
2212#define PIO_XFER_ON 0x1 /* PIO transfer in progress */
2213#define MULTI_XFER_ON 0x2 /* Multi-word DMA transfer in progress */
2214#define ULTRA_XFER_ON 0x4 /* Ultra DMA transfer in progress */
2215#define ULTRA_IN_FL 0xf0 /* Ultra DMA Input FIFO Level */
2216
2217/* Bit masks for ATAPI_DEV_ADDR */
2218
2219#define DEV_ADDR 0x1f /* Device Address */
2220
2221/* Bit masks for ATAPI_INT_MASK */
2222
2223#define ATAPI_DEV_INT_MASK 0x1 /* Device interrupt mask */
2224#define PIO_DONE_MASK 0x2 /* PIO transfer done interrupt mask */
2225#define MULTI_DONE_MASK 0x4 /* Multi-DMA transfer done interrupt mask */
2226#define UDMAIN_DONE_MASK 0x8 /* Ultra-DMA in transfer done interrupt mask */
2227#define UDMAOUT_DONE_MASK 0x10 /* Ultra-DMA out transfer done interrupt mask */
2228#define HOST_TERM_XFER_MASK 0x20 /* Host terminate current transfer interrupt mask */
2229#define MULTI_TERM_MASK 0x40 /* Device terminate Multi-DMA transfer interrupt mask */
2230#define UDMAIN_TERM_MASK 0x80 /* Device terminate Ultra-DMA-in transfer interrupt mask */
2231#define UDMAOUT_TERM_MASK 0x100 /* Device terminate Ultra-DMA-out transfer interrupt mask */
2232
2233/* Bit masks for ATAPI_INT_STATUS */
2234
2235#define ATAPI_DEV_INT 0x1 /* Device interrupt status */
2236#define PIO_DONE_INT 0x2 /* PIO transfer done interrupt status */
2237#define MULTI_DONE_INT 0x4 /* Multi-DMA transfer done interrupt status */
2238#define UDMAIN_DONE_INT 0x8 /* Ultra-DMA in transfer done interrupt status */
2239#define UDMAOUT_DONE_INT 0x10 /* Ultra-DMA out transfer done interrupt status */
2240#define HOST_TERM_XFER_INT 0x20 /* Host terminate current transfer interrupt status */
2241#define MULTI_TERM_INT 0x40 /* Device terminate Multi-DMA transfer interrupt status */
2242#define UDMAIN_TERM_INT 0x80 /* Device terminate Ultra-DMA-in transfer interrupt status */
2243#define UDMAOUT_TERM_INT 0x100 /* Device terminate Ultra-DMA-out transfer interrupt status */
2244
2245/* Bit masks for ATAPI_LINE_STATUS */
2246
2247#define ATAPI_INTR 0x1 /* Device interrupt to host line status */
2248#define ATAPI_DASP 0x2 /* Device dasp to host line status */
2249#define ATAPI_CS0N 0x4 /* ATAPI chip select 0 line status */
2250#define ATAPI_CS1N 0x8 /* ATAPI chip select 1 line status */
2251#define ATAPI_ADDR 0x70 /* ATAPI address line status */
2252#define ATAPI_DMAREQ 0x80 /* ATAPI DMA request line status */
2253#define ATAPI_DMAACKN 0x100 /* ATAPI DMA acknowledge line status */
2254#define ATAPI_DIOWN 0x200 /* ATAPI write line status */
2255#define ATAPI_DIORN 0x400 /* ATAPI read line status */
2256#define ATAPI_IORDY 0x800 /* ATAPI IORDY line status */
2257
2258/* Bit masks for ATAPI_SM_STATE */
2259
2260#define PIO_CSTATE 0xf /* PIO mode state machine current state */
2261#define DMA_CSTATE 0xf0 /* DMA mode state machine current state */
2262#define UDMAIN_CSTATE 0xf00 /* Ultra DMA-In mode state machine current state */
2263#define UDMAOUT_CSTATE 0xf000 /* ATAPI IORDY line status */
2264
2265/* Bit masks for ATAPI_TERMINATE */
2266
2267#define ATAPI_HOST_TERM 0x1 /* Host terminationation */
2268
2269/* Bit masks for ATAPI_REG_TIM_0 */
2270
2271#define T2_REG 0xff /* End of cycle time for register access transfers */
2272#define TEOC_REG 0xff00 /* Selects DIOR/DIOW pulsewidth */
2273
2274/* Bit masks for ATAPI_PIO_TIM_0 */
2275
2276#define T1_REG 0xf /* Time from address valid to DIOR/DIOW */
2277#define T2_REG_PIO 0xff0 /* DIOR/DIOW pulsewidth */
2278#define T4_REG 0xf000 /* DIOW data hold */
2279
2280/* Bit masks for ATAPI_PIO_TIM_1 */
2281
2282#define TEOC_REG_PIO 0xff /* End of cycle time for PIO access transfers. */
2283
2284/* Bit masks for ATAPI_MULTI_TIM_0 */
2285
2286#define TD 0xff /* DIOR/DIOW asserted pulsewidth */
2287#define TM 0xff00 /* Time from address valid to DIOR/DIOW */
2288
2289/* Bit masks for ATAPI_MULTI_TIM_1 */
2290
2291#define TKW 0xff /* Selects DIOW negated pulsewidth */
2292#define TKR 0xff00 /* Selects DIOR negated pulsewidth */
2293
2294/* Bit masks for ATAPI_MULTI_TIM_2 */
2295
2296#define TH 0xff /* Selects DIOW data hold */
2297#define TEOC 0xff00 /* Selects end of cycle for DMA */
2298
2299/* Bit masks for ATAPI_ULTRA_TIM_0 */
2300
2301#define TACK 0xff /* Selects setup and hold times for TACK */
2302#define TENV 0xff00 /* Selects envelope time */
2303
2304/* Bit masks for ATAPI_ULTRA_TIM_1 */
2305
2306#define TDVS 0xff /* Selects data valid setup time */
2307#define TCYC_TDVS 0xff00 /* Selects cycle time - TDVS time */
2308
2309/* Bit masks for ATAPI_ULTRA_TIM_2 */
2310
2311#define TSS 0xff /* Selects time from STROBE edge to negation of DMARQ or assertion of STOP */
2312#define TMLI 0xff00 /* Selects interlock time */
2313
2314/* Bit masks for ATAPI_ULTRA_TIM_3 */
2315
2316#define TZAH 0xff /* Selects minimum delay required for output */
2317#define READY_PAUSE 0xff00 /* Selects ready to pause */
2318
2319/* Bit masks for TIMER_ENABLE1 */
2320
2321#define TIMEN8 0x1 /* Timer 8 Enable */
2322#define TIMEN9 0x2 /* Timer 9 Enable */
2323#define TIMEN10 0x4 /* Timer 10 Enable */
2324
2325/* Bit masks for TIMER_DISABLE1 */
2326
2327#define TIMDIS8 0x1 /* Timer 8 Disable */
2328#define TIMDIS9 0x2 /* Timer 9 Disable */
2329#define TIMDIS10 0x4 /* Timer 10 Disable */
2330
2331/* Bit masks for TIMER_STATUS1 */
2332
2333#define TIMIL8 0x1 /* Timer 8 Interrupt */
2334#define TIMIL9 0x2 /* Timer 9 Interrupt */
2335#define TIMIL10 0x4 /* Timer 10 Interrupt */
2336#define TOVF_ERR8 0x10 /* Timer 8 Counter Overflow */
2337#define TOVF_ERR9 0x20 /* Timer 9 Counter Overflow */
2338#define TOVF_ERR10 0x40 /* Timer 10 Counter Overflow */
2339#define TRUN8 0x1000 /* Timer 8 Slave Enable Status */
2340#define TRUN9 0x2000 /* Timer 9 Slave Enable Status */
2341#define TRUN10 0x4000 /* Timer 10 Slave Enable Status */
2342
2343/* Bit masks for EPPI0 are obtained from common base header for EPPIx (EPPI1 and EPPI2) */
2344
2345/* Bit masks for USB_FADDR */
2346
2347#define FUNCTION_ADDRESS 0x7f /* Function address */
2348
2349/* Bit masks for USB_POWER */
2350
2351#define ENABLE_SUSPENDM 0x1 /* enable SuspendM output */
2352#define SUSPEND_MODE 0x2 /* Suspend Mode indicator */
2353#define RESUME_MODE 0x4 /* DMA Mode */
2354#define RESET 0x8 /* Reset indicator */
2355#define HS_MODE 0x10 /* High Speed mode indicator */
2356#define HS_ENABLE 0x20 /* high Speed Enable */
2357#define SOFT_CONN 0x40 /* Soft connect */
2358#define ISO_UPDATE 0x80 /* Isochronous update */
2359
2360/* Bit masks for USB_INTRTX */
2361
2362#define EP0_TX 0x1 /* Tx Endpoint 0 interrupt */
2363#define EP1_TX 0x2 /* Tx Endpoint 1 interrupt */
2364#define EP2_TX 0x4 /* Tx Endpoint 2 interrupt */
2365#define EP3_TX 0x8 /* Tx Endpoint 3 interrupt */
2366#define EP4_TX 0x10 /* Tx Endpoint 4 interrupt */
2367#define EP5_TX 0x20 /* Tx Endpoint 5 interrupt */
2368#define EP6_TX 0x40 /* Tx Endpoint 6 interrupt */
2369#define EP7_TX 0x80 /* Tx Endpoint 7 interrupt */
2370
2371/* Bit masks for USB_INTRRX */
2372
2373#define EP1_RX 0x2 /* Rx Endpoint 1 interrupt */
2374#define EP2_RX 0x4 /* Rx Endpoint 2 interrupt */
2375#define EP3_RX 0x8 /* Rx Endpoint 3 interrupt */
2376#define EP4_RX 0x10 /* Rx Endpoint 4 interrupt */
2377#define EP5_RX 0x20 /* Rx Endpoint 5 interrupt */
2378#define EP6_RX 0x40 /* Rx Endpoint 6 interrupt */
2379#define EP7_RX 0x80 /* Rx Endpoint 7 interrupt */
2380
2381/* Bit masks for USB_INTRTXE */
2382
2383#define EP0_TX_E 0x1 /* Endpoint 0 interrupt Enable */
2384#define EP1_TX_E 0x2 /* Tx Endpoint 1 interrupt Enable */
2385#define EP2_TX_E 0x4 /* Tx Endpoint 2 interrupt Enable */
2386#define EP3_TX_E 0x8 /* Tx Endpoint 3 interrupt Enable */
2387#define EP4_TX_E 0x10 /* Tx Endpoint 4 interrupt Enable */
2388#define EP5_TX_E 0x20 /* Tx Endpoint 5 interrupt Enable */
2389#define EP6_TX_E 0x40 /* Tx Endpoint 6 interrupt Enable */
2390#define EP7_TX_E 0x80 /* Tx Endpoint 7 interrupt Enable */
2391
2392/* Bit masks for USB_INTRRXE */
2393
2394#define EP1_RX_E 0x2 /* Rx Endpoint 1 interrupt Enable */
2395#define EP2_RX_E 0x4 /* Rx Endpoint 2 interrupt Enable */
2396#define EP3_RX_E 0x8 /* Rx Endpoint 3 interrupt Enable */
2397#define EP4_RX_E 0x10 /* Rx Endpoint 4 interrupt Enable */
2398#define EP5_RX_E 0x20 /* Rx Endpoint 5 interrupt Enable */
2399#define EP6_RX_E 0x40 /* Rx Endpoint 6 interrupt Enable */
2400#define EP7_RX_E 0x80 /* Rx Endpoint 7 interrupt Enable */
2401
2402/* Bit masks for USB_INTRUSB */
2403
2404#define SUSPEND_B 0x1 /* Suspend indicator */
2405#define RESUME_B 0x2 /* Resume indicator */
2406#define RESET_OR_BABLE_B 0x4 /* Reset/babble indicator */
2407#define SOF_B 0x8 /* Start of frame */
2408#define CONN_B 0x10 /* Connection indicator */
2409#define DISCON_B 0x20 /* Disconnect indicator */
2410#define SESSION_REQ_B 0x40 /* Session Request */
2411#define VBUS_ERROR_B 0x80 /* Vbus threshold indicator */
2412
2413/* Bit masks for USB_INTRUSBE */
2414
2415#define SUSPEND_BE 0x1 /* Suspend indicator int enable */
2416#define RESUME_BE 0x2 /* Resume indicator int enable */
2417#define RESET_OR_BABLE_BE 0x4 /* Reset/babble indicator int enable */
2418#define SOF_BE 0x8 /* Start of frame int enable */
2419#define CONN_BE 0x10 /* Connection indicator int enable */
2420#define DISCON_BE 0x20 /* Disconnect indicator int enable */
2421#define SESSION_REQ_BE 0x40 /* Session Request int enable */
2422#define VBUS_ERROR_BE 0x80 /* Vbus threshold indicator int enable */
2423
2424/* Bit masks for USB_FRAME */
2425
2426#define FRAME_NUMBER 0x7ff /* Frame number */
2427
2428/* Bit masks for USB_INDEX */
2429
2430#define SELECTED_ENDPOINT 0xf /* selected endpoint */
2431
2432/* Bit masks for USB_GLOBAL_CTL */
2433
2434#define GLOBAL_ENA 0x1 /* enables USB module */
2435#define EP1_TX_ENA 0x2 /* Transmit endpoint 1 enable */
2436#define EP2_TX_ENA 0x4 /* Transmit endpoint 2 enable */
2437#define EP3_TX_ENA 0x8 /* Transmit endpoint 3 enable */
2438#define EP4_TX_ENA 0x10 /* Transmit endpoint 4 enable */
2439#define EP5_TX_ENA 0x20 /* Transmit endpoint 5 enable */
2440#define EP6_TX_ENA 0x40 /* Transmit endpoint 6 enable */
2441#define EP7_TX_ENA 0x80 /* Transmit endpoint 7 enable */
2442#define EP1_RX_ENA 0x100 /* Receive endpoint 1 enable */
2443#define EP2_RX_ENA 0x200 /* Receive endpoint 2 enable */
2444#define EP3_RX_ENA 0x400 /* Receive endpoint 3 enable */
2445#define EP4_RX_ENA 0x800 /* Receive endpoint 4 enable */
2446#define EP5_RX_ENA 0x1000 /* Receive endpoint 5 enable */
2447#define EP6_RX_ENA 0x2000 /* Receive endpoint 6 enable */
2448#define EP7_RX_ENA 0x4000 /* Receive endpoint 7 enable */
2449
2450/* Bit masks for USB_OTG_DEV_CTL */
2451
2452#define SESSION 0x1 /* session indicator */
2453#define HOST_REQ 0x2 /* Host negotiation request */
2454#define HOST_MODE 0x4 /* indicates USBDRC is a host */
2455#define VBUS0 0x8 /* Vbus level indicator[0] */
2456#define VBUS1 0x10 /* Vbus level indicator[1] */
2457#define LSDEV 0x20 /* Low-speed indicator */
2458#define FSDEV 0x40 /* Full or High-speed indicator */
2459#define B_DEVICE 0x80 /* A' or 'B' device indicator */
2460
2461/* Bit masks for USB_OTG_VBUS_IRQ */
2462
2463#define DRIVE_VBUS_ON 0x1 /* indicator to drive VBUS control circuit */
2464#define DRIVE_VBUS_OFF 0x2 /* indicator to shut off charge pump */
2465#define CHRG_VBUS_START 0x4 /* indicator for external circuit to start charging VBUS */
2466#define CHRG_VBUS_END 0x8 /* indicator for external circuit to end charging VBUS */
2467#define DISCHRG_VBUS_START 0x10 /* indicator to start discharging VBUS */
2468#define DISCHRG_VBUS_END 0x20 /* indicator to stop discharging VBUS */
2469
2470/* Bit masks for USB_OTG_VBUS_MASK */
2471
2472#define DRIVE_VBUS_ON_ENA 0x1 /* enable DRIVE_VBUS_ON interrupt */
2473#define DRIVE_VBUS_OFF_ENA 0x2 /* enable DRIVE_VBUS_OFF interrupt */
2474#define CHRG_VBUS_START_ENA 0x4 /* enable CHRG_VBUS_START interrupt */
2475#define CHRG_VBUS_END_ENA 0x8 /* enable CHRG_VBUS_END interrupt */
2476#define DISCHRG_VBUS_START_ENA 0x10 /* enable DISCHRG_VBUS_START interrupt */
2477#define DISCHRG_VBUS_END_ENA 0x20 /* enable DISCHRG_VBUS_END interrupt */
2478
2479/* Bit masks for USB_CSR0 */
2480
2481#define RXPKTRDY 0x1 /* data packet receive indicator */
2482#define TXPKTRDY 0x2 /* data packet in FIFO indicator */
2483#define STALL_SENT 0x4 /* STALL handshake sent */
2484#define DATAEND 0x8 /* Data end indicator */
2485#define SETUPEND 0x10 /* Setup end */
2486#define SENDSTALL 0x20 /* Send STALL handshake */
2487#define SERVICED_RXPKTRDY 0x40 /* used to clear the RxPktRdy bit */
2488#define SERVICED_SETUPEND 0x80 /* used to clear the SetupEnd bit */
2489#define FLUSHFIFO 0x100 /* flush endpoint FIFO */
2490#define STALL_RECEIVED_H 0x4 /* STALL handshake received host mode */
2491#define SETUPPKT_H 0x8 /* send Setup token host mode */
2492#define ERROR_H 0x10 /* timeout error indicator host mode */
2493#define REQPKT_H 0x20 /* Request an IN transaction host mode */
2494#define STATUSPKT_H 0x40 /* Status stage transaction host mode */
2495#define NAK_TIMEOUT_H 0x80 /* EP0 halted after a NAK host mode */
2496
2497/* Bit masks for USB_COUNT0 */
2498
2499#define EP0_RX_COUNT 0x7f /* number of received bytes in EP0 FIFO */
2500
2501/* Bit masks for USB_NAKLIMIT0 */
2502
2503#define EP0_NAK_LIMIT 0x1f /* number of frames/micro frames after which EP0 timeouts */
2504
2505/* Bit masks for USB_TX_MAX_PACKET */
2506
2507#define MAX_PACKET_SIZE_T 0x7ff /* maximum data pay load in a frame */
2508
2509/* Bit masks for USB_RX_MAX_PACKET */
2510
2511#define MAX_PACKET_SIZE_R 0x7ff /* maximum data pay load in a frame */
2512
2513/* Bit masks for USB_TXCSR */
2514
2515#define TXPKTRDY_T 0x1 /* data packet in FIFO indicator */
2516#define FIFO_NOT_EMPTY_T 0x2 /* FIFO not empty */
2517#define UNDERRUN_T 0x4 /* TxPktRdy not set for an IN token */
2518#define FLUSHFIFO_T 0x8 /* flush endpoint FIFO */
2519#define STALL_SEND_T 0x10 /* issue a Stall handshake */
2520#define STALL_SENT_T 0x20 /* Stall handshake transmitted */
2521#define CLEAR_DATATOGGLE_T 0x40 /* clear endpoint data toggle */
2522#define INCOMPTX_T 0x80 /* indicates that a large packet is split */
2523#define DMAREQMODE_T 0x400 /* DMA mode (0 or 1) selection */
2524#define FORCE_DATATOGGLE_T 0x800 /* Force data toggle */
2525#define DMAREQ_ENA_T 0x1000 /* Enable DMA request for Tx EP */
2526#define ISO_T 0x4000 /* enable Isochronous transfers */
2527#define AUTOSET_T 0x8000 /* allows TxPktRdy to be set automatically */
2528#define ERROR_TH 0x4 /* error condition host mode */
2529#define STALL_RECEIVED_TH 0x20 /* Stall handshake received host mode */
2530#define NAK_TIMEOUT_TH 0x80 /* NAK timeout host mode */
2531
2532/* Bit masks for USB_TXCOUNT */
2533
2534#define TX_COUNT 0x1fff /* Number of bytes to be written to the selected endpoint Tx FIFO */
2535
2536/* Bit masks for USB_RXCSR */
2537
2538#define RXPKTRDY_R 0x1 /* data packet in FIFO indicator */
2539#define FIFO_FULL_R 0x2 /* FIFO not empty */
2540#define OVERRUN_R 0x4 /* TxPktRdy not set for an IN token */
2541#define DATAERROR_R 0x8 /* Out packet cannot be loaded into Rx FIFO */
2542#define FLUSHFIFO_R 0x10 /* flush endpoint FIFO */
2543#define STALL_SEND_R 0x20 /* issue a Stall handshake */
2544#define STALL_SENT_R 0x40 /* Stall handshake transmitted */
2545#define CLEAR_DATATOGGLE_R 0x80 /* clear endpoint data toggle */
2546#define INCOMPRX_R 0x100 /* indicates that a large packet is split */
2547#define DMAREQMODE_R 0x800 /* DMA mode (0 or 1) selection */
2548#define DISNYET_R 0x1000 /* disable Nyet handshakes */
2549#define DMAREQ_ENA_R 0x2000 /* Enable DMA request for Tx EP */
2550#define ISO_R 0x4000 /* enable Isochronous transfers */
2551#define AUTOCLEAR_R 0x8000 /* allows TxPktRdy to be set automatically */
2552#define ERROR_RH 0x4 /* TxPktRdy not set for an IN token host mode */
2553#define REQPKT_RH 0x20 /* request an IN transaction host mode */
2554#define STALL_RECEIVED_RH 0x40 /* Stall handshake received host mode */
2555#define INCOMPRX_RH 0x100 /* indicates that a large packet is split host mode */
2556#define DMAREQMODE_RH 0x800 /* DMA mode (0 or 1) selection host mode */
2557#define AUTOREQ_RH 0x4000 /* sets ReqPkt automatically host mode */
2558
2559/* Bit masks for USB_RXCOUNT */
2560
2561#define RX_COUNT 0x1fff /* Number of received bytes in the packet in the Rx FIFO */
2562
2563/* Bit masks for USB_TXTYPE */
2564
2565#define TARGET_EP_NO_T 0xf /* EP number */
2566#define PROTOCOL_T 0xc /* transfer type */
2567
2568/* Bit masks for USB_TXINTERVAL */
2569
2570#define TX_POLL_INTERVAL 0xff /* polling interval for selected Tx EP */
2571
2572/* Bit masks for USB_RXTYPE */
2573
2574#define TARGET_EP_NO_R 0xf /* EP number */
2575#define PROTOCOL_R 0xc /* transfer type */
2576
2577/* Bit masks for USB_RXINTERVAL */
2578
2579#define RX_POLL_INTERVAL 0xff /* polling interval for selected Rx EP */
2580
2581/* Bit masks for USB_DMA_INTERRUPT */
2582
2583#define DMA0_INT 0x1 /* DMA0 pending interrupt */
2584#define DMA1_INT 0x2 /* DMA1 pending interrupt */
2585#define DMA2_INT 0x4 /* DMA2 pending interrupt */
2586#define DMA3_INT 0x8 /* DMA3 pending interrupt */
2587#define DMA4_INT 0x10 /* DMA4 pending interrupt */
2588#define DMA5_INT 0x20 /* DMA5 pending interrupt */
2589#define DMA6_INT 0x40 /* DMA6 pending interrupt */
2590#define DMA7_INT 0x80 /* DMA7 pending interrupt */
2591
2592/* Bit masks for USB_DMAxCONTROL */
2593
2594#define DMA_ENA 0x1 /* DMA enable */
2595#define DIRECTION 0x2 /* direction of DMA transfer */
2596#define MODE 0x4 /* DMA Bus error */
2597#define INT_ENA 0x8 /* Interrupt enable */
2598#define EPNUM 0xf0 /* EP number */
2599#define BUSERROR 0x100 /* DMA Bus error */
2600
2601/* Bit masks for USB_DMAxADDRHIGH */
2602
2603#define DMA_ADDR_HIGH 0xffff /* Upper 16-bits of memory source/destination address for the DMA master channel */
2604
2605/* Bit masks for USB_DMAxADDRLOW */
2606
2607#define DMA_ADDR_LOW 0xffff /* Lower 16-bits of memory source/destination address for the DMA master channel */
2608
2609/* Bit masks for USB_DMAxCOUNTHIGH */
2610
2611#define DMA_COUNT_HIGH 0xffff /* Upper 16-bits of byte count of DMA transfer for DMA master channel */
2612
2613/* Bit masks for USB_DMAxCOUNTLOW */
2614
2615#define DMA_COUNT_LOW 0xffff /* Lower 16-bits of byte count of DMA transfer for DMA master channel */
2616
2617/* Bit masks for HMDMAx_CONTROL */
2618
2619#define HMDMAEN 0x1 /* Handshake MDMA Enable */
2620#define REP 0x2 /* Handshake MDMA Request Polarity */
2621#define UTE 0x8 /* Urgency Threshold Enable */
2622#define OIE 0x10 /* Overflow Interrupt Enable */
2623#define BDIE 0x20 /* Block Done Interrupt Enable */
2624#define MBDI 0x40 /* Mask Block Done Interrupt */
2625#define DRQ 0x300 /* Handshake MDMA Request Type */
2626#define RBC 0x1000 /* Force Reload of BCOUNT */
2627#define PS 0x2000 /* Pin Status */
2628#define OI 0x4000 /* Overflow Interrupt Generated */
2629#define BDI 0x8000 /* Block Done Interrupt Generated */
2630
2631/* ******************************************* */
2632/* MULTI BIT MACRO ENUMERATIONS */
2633/* ******************************************* */
2634
2635/* ************************ */
2636/* MXVR Address Offsets */
2637/* ************************ */
2638
2639/* Control Message Receive Buffer (CMRB) Address Offsets */
2640
2641#define CMRB_STRIDE 0x00000016lu
2642
2643#define CMRB_DST_OFFSET 0x00000000lu
2644#define CMRB_SRC_OFFSET 0x00000002lu
2645#define CMRB_DATA_OFFSET 0x00000005lu
2646
2647/* Control Message Transmit Buffer (CMTB) Address Offsets */
2648
2649#define CMTB_PRIO_OFFSET 0x00000000lu
2650#define CMTB_DST_OFFSET 0x00000002lu
2651#define CMTB_SRC_OFFSET 0x00000004lu
2652#define CMTB_TYPE_OFFSET 0x00000006lu
2653#define CMTB_DATA_OFFSET 0x00000007lu
2654
2655#define CMTB_ANSWER_OFFSET 0x0000000Alu
2656
2657#define CMTB_STAT_N_OFFSET 0x00000018lu
2658#define CMTB_STAT_A_OFFSET 0x00000016lu
2659#define CMTB_STAT_D_OFFSET 0x0000000Elu
2660#define CMTB_STAT_R_OFFSET 0x00000014lu
2661#define CMTB_STAT_W_OFFSET 0x00000014lu
2662#define CMTB_STAT_G_OFFSET 0x00000014lu
2663
2664/* Asynchronous Packet Receive Buffer (APRB) Address Offsets */
2665
2666#define APRB_STRIDE 0x00000400lu
2667
2668#define APRB_DST_OFFSET 0x00000000lu
2669#define APRB_LEN_OFFSET 0x00000002lu
2670#define APRB_SRC_OFFSET 0x00000004lu
2671#define APRB_DATA_OFFSET 0x00000006lu
2672
2673/* Asynchronous Packet Transmit Buffer (APTB) Address Offsets */
2674
2675#define APTB_PRIO_OFFSET 0x00000000lu
2676#define APTB_DST_OFFSET 0x00000002lu
2677#define APTB_LEN_OFFSET 0x00000004lu
2678#define APTB_SRC_OFFSET 0x00000006lu
2679#define APTB_DATA_OFFSET 0x00000008lu
2680
2681/* Remote Read Buffer (RRDB) Address Offsets */
2682
2683#define RRDB_WADDR_OFFSET 0x00000100lu
2684#define RRDB_WLEN_OFFSET 0x00000101lu
2685
2686/* **************** */
2687/* MXVR Macros */
2688/* **************** */
2689
2690/* MXVR_CONFIG Macros */
2691
2692#define SET_MSB(x) ( ( (x) & 0xF ) << 9)
2693
2694/* MXVR_INT_STAT_1 Macros */
2695
2696#define DONEX(x) (0x00000002 << (4 * (x)))
2697#define HDONEX(x) (0x00000001 << (4 * (x)))
2698
2699/* MXVR_INT_EN_1 Macros */
2700
2701#define DONEENX(x) (0x00000002 << (4 * (x)))
2702#define HDONEENX(x) (0x00000001 << (4 * (x)))
2703
2704/* MXVR_CDRPLL_CTL Macros */
2705
2706#define SET_CDRSHPSEL(x) ( ( (x) & 0x3F ) << 16)
2707
2708/* MXVR_FMPLL_CTL Macros */
2709
2710#define SET_CDRCPSEL(x) ( ( (x) & 0xFF ) << 24)
2711#define SET_FMCPSEL(x) ( ( (x) & 0xFF ) << 24)
2712
2713#endif /* _DEF_BF549_H */ 191#endif /* _DEF_BF549_H */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h b/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
index 8590c8c78336..ab04d137fd8b 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
@@ -1609,44 +1609,6 @@
1609#define PINT2 0x40000000 /* Pin Interrupt 2 */ 1609#define PINT2 0x40000000 /* Pin Interrupt 2 */
1610#define PINT3 0x80000000 /* Pin Interrupt 3 */ 1610#define PINT3 0x80000000 /* Pin Interrupt 3 */
1611 1611
1612/* Bit masks for DMAx_CONFIG, MDMA_Sx_CONFIG, MDMA_Dx_CONFIG */
1613
1614#define DMAEN 0x1 /* DMA Channel Enable */
1615#define WNR 0x2 /* DMA Direction */
1616#define WDSIZE_8 0x0 /* Transfer Word Size = 8 */
1617#define WDSIZE_16 0x4 /* Transfer Word Size = 16 */
1618#define WDSIZE_32 0x8 /* Transfer Word Size = 32 */
1619#define DMA2D 0x10 /* DMA Mode */
1620#define RESTART 0x20 /* Work Unit Transitions */
1621#define DI_SEL 0x40 /* Data Interrupt Timing Select */
1622#define DI_EN 0x80 /* Data Interrupt Enable */
1623
1624#define NDSIZE 0xf00 /* Flex Descriptor Size */
1625#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1626#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1627#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1628#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1629#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1630#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1631#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1632#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1633#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1634#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1635
1636#define DMAFLOW 0xf000 /* Next Operation */
1637#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1638#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1639#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1640#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1641#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1642
1643/* Bit masks for DMAx_IRQ_STATUS, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */
1644
1645#define DMA_DONE 0x1 /* DMA Completion Interrupt Status */
1646#define DMA_ERR 0x2 /* DMA Error Interrupt Status */
1647#define DFETCH 0x4 /* DMA Descriptor Fetch */
1648#define DMA_RUN 0x8 /* DMA Channel Running */
1649
1650/* Bit masks for DMAx_PERIPHERAL_MAP, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */ 1612/* Bit masks for DMAx_PERIPHERAL_MAP, MDMA_Sx_IRQ_STATUS, MDMA_Dx_IRQ_STATUS */
1651 1613
1652#define CTYPE 0x40 /* DMA Channel Type */ 1614#define CTYPE 0x40 /* DMA Channel Type */
@@ -1815,10 +1777,6 @@
1815#define DEB3_MERROR 0x40 /* DEB3 Error (2nd) */ 1777#define DEB3_MERROR 0x40 /* DEB3 Error (2nd) */
1816#define CORE_MERROR 0x80 /* Core Error (2nd) */ 1778#define CORE_MERROR 0x80 /* Core Error (2nd) */
1817 1779
1818/* Bit masks for EBIU_ERRADD */
1819
1820#define ERROR_ADDRESS 0xffffffff /* Error Address */
1821
1822/* Bit masks for EBIU_RSTCTL */ 1780/* Bit masks for EBIU_RSTCTL */
1823 1781
1824#define DDRSRESET 0x1 /* DDR soft reset */ 1782#define DDRSRESET 0x1 /* DDR soft reset */
@@ -1827,98 +1785,6 @@
1827#define SRACK 0x10 /* Self-refresh acknowledge */ 1785#define SRACK 0x10 /* Self-refresh acknowledge */
1828#define MDDRENABLE 0x20 /* Mobile DDR enable */ 1786#define MDDRENABLE 0x20 /* Mobile DDR enable */
1829 1787
1830/* Bit masks for EBIU_DDRBRC0 */
1831
1832#define BRC0 0xffffffff /* Count */
1833
1834/* Bit masks for EBIU_DDRBRC1 */
1835
1836#define BRC1 0xffffffff /* Count */
1837
1838/* Bit masks for EBIU_DDRBRC2 */
1839
1840#define BRC2 0xffffffff /* Count */
1841
1842/* Bit masks for EBIU_DDRBRC3 */
1843
1844#define BRC3 0xffffffff /* Count */
1845
1846/* Bit masks for EBIU_DDRBRC4 */
1847
1848#define BRC4 0xffffffff /* Count */
1849
1850/* Bit masks for EBIU_DDRBRC5 */
1851
1852#define BRC5 0xffffffff /* Count */
1853
1854/* Bit masks for EBIU_DDRBRC6 */
1855
1856#define BRC6 0xffffffff /* Count */
1857
1858/* Bit masks for EBIU_DDRBRC7 */
1859
1860#define BRC7 0xffffffff /* Count */
1861
1862/* Bit masks for EBIU_DDRBWC0 */
1863
1864#define BWC0 0xffffffff /* Count */
1865
1866/* Bit masks for EBIU_DDRBWC1 */
1867
1868#define BWC1 0xffffffff /* Count */
1869
1870/* Bit masks for EBIU_DDRBWC2 */
1871
1872#define BWC2 0xffffffff /* Count */
1873
1874/* Bit masks for EBIU_DDRBWC3 */
1875
1876#define BWC3 0xffffffff /* Count */
1877
1878/* Bit masks for EBIU_DDRBWC4 */
1879
1880#define BWC4 0xffffffff /* Count */
1881
1882/* Bit masks for EBIU_DDRBWC5 */
1883
1884#define BWC5 0xffffffff /* Count */
1885
1886/* Bit masks for EBIU_DDRBWC6 */
1887
1888#define BWC6 0xffffffff /* Count */
1889
1890/* Bit masks for EBIU_DDRBWC7 */
1891
1892#define BWC7 0xffffffff /* Count */
1893
1894/* Bit masks for EBIU_DDRACCT */
1895
1896#define ACCT 0xffffffff /* Count */
1897
1898/* Bit masks for EBIU_DDRTACT */
1899
1900#define TECT 0xffffffff /* Count */
1901
1902/* Bit masks for EBIU_DDRARCT */
1903
1904#define ARCT 0xffffffff /* Count */
1905
1906/* Bit masks for EBIU_DDRGC0 */
1907
1908#define GC0 0xffffffff /* Count */
1909
1910/* Bit masks for EBIU_DDRGC1 */
1911
1912#define GC1 0xffffffff /* Count */
1913
1914/* Bit masks for EBIU_DDRGC2 */
1915
1916#define GC2 0xffffffff /* Count */
1917
1918/* Bit masks for EBIU_DDRGC3 */
1919
1920#define GC3 0xffffffff /* Count */
1921
1922/* Bit masks for EBIU_DDRMCEN */ 1788/* Bit masks for EBIU_DDRMCEN */
1923 1789
1924#define B0WCENABLE 0x1 /* Bank 0 write count enable */ 1790#define B0WCENABLE 0x1 /* Bank 0 write count enable */
@@ -2092,12 +1958,6 @@
2092#define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */ 1958#define TRUN6 0x40000000 /* Timer 6 Slave Enable Status */
2093#define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */ 1959#define TRUN7 0x80000000 /* Timer 7 Slave Enable Status */
2094 1960
2095/* Bit masks for WDOG_CTL */
2096
2097#define WDEV 0x6 /* Watchdog Event */
2098#define WDEN 0xff0 /* Watchdog Enable */
2099#define WDRO 0x8000 /* Watchdog Rolled Over */
2100
2101/* Bit masks for CNT_CONFIG */ 1961/* Bit masks for CNT_CONFIG */
2102 1962
2103#define CNTE 0x1 /* Counter Enable */ 1963#define CNTE 0x1 /* Counter Enable */
@@ -2149,81 +2009,6 @@
2149 2009
2150#define DPRESCALE 0xf /* Load Counter Register */ 2010#define DPRESCALE 0xf /* Load Counter Register */
2151 2011
2152/* Bit masks for RTC_STAT */
2153
2154#define SECONDS 0x3f /* Seconds */
2155#define MINUTES 0xfc0 /* Minutes */
2156#define HOURS 0x1f000 /* Hours */
2157#define DAY_COUNTER 0xfffe0000 /* Day Counter */
2158
2159/* Bit masks for RTC_ICTL */
2160
2161#define STOPWATCH_INTERRUPT_ENABLE 0x1 /* Stopwatch Interrupt Enable */
2162#define ALARM_INTERRUPT_ENABLE 0x2 /* Alarm Interrupt Enable */
2163#define SECONDS_INTERRUPT_ENABLE 0x4 /* Seconds Interrupt Enable */
2164#define MINUTES_INTERRUPT_ENABLE 0x8 /* Minutes Interrupt Enable */
2165#define HOURS_INTERRUPT_ENABLE 0x10 /* Hours Interrupt Enable */
2166#define TWENTY_FOUR_HOURS_INTERRUPT_ENABLE 0x20 /* 24 Hours Interrupt Enable */
2167#define DAY_ALARM_INTERRUPT_ENABLE 0x40 /* Day Alarm Interrupt Enable */
2168#define WRITE_COMPLETE_INTERRUPT_ENABLE 0x8000 /* Write Complete Interrupt Enable */
2169
2170/* Bit masks for RTC_ISTAT */
2171
2172#define STOPWATCH_EVENT_FLAG 0x1 /* Stopwatch Event Flag */
2173#define ALARM_EVENT_FLAG 0x2 /* Alarm Event Flag */
2174#define SECONDS_EVENT_FLAG 0x4 /* Seconds Event Flag */
2175#define MINUTES_EVENT_FLAG 0x8 /* Minutes Event Flag */
2176#define HOURS_EVENT_FLAG 0x10 /* Hours Event Flag */
2177#define TWENTY_FOUR_HOURS_EVENT_FLAG 0x20 /* 24 Hours Event Flag */
2178#define DAY_ALARM_EVENT_FLAG 0x40 /* Day Alarm Event Flag */
2179#define WRITE_PENDING__STATUS 0x4000 /* Write Pending Status */
2180#define WRITE_COMPLETE 0x8000 /* Write Complete */
2181
2182/* Bit masks for RTC_SWCNT */
2183
2184#define STOPWATCH_COUNT 0xffff /* Stopwatch Count */
2185
2186/* Bit masks for RTC_ALARM */
2187
2188#define SECONDS 0x3f /* Seconds */
2189#define MINUTES 0xfc0 /* Minutes */
2190#define HOURS 0x1f000 /* Hours */
2191#define DAY 0xfffe0000 /* Day */
2192
2193/* Bit masks for RTC_PREN */
2194
2195#define PREN 0x1 /* Prescaler Enable */
2196
2197/* Bit masks for OTP_CONTROL */
2198
2199#define FUSE_FADDR 0x1ff /* OTP/Fuse Address */
2200#define FIEN 0x800 /* OTP/Fuse Interrupt Enable */
2201#define FTESTDEC 0x1000 /* OTP/Fuse Test Decoder */
2202#define FWRTEST 0x2000 /* OTP/Fuse Write Test */
2203#define FRDEN 0x4000 /* OTP/Fuse Read Enable */
2204#define FWREN 0x8000 /* OTP/Fuse Write Enable */
2205
2206/* Bit masks for OTP_BEN */
2207
2208#define FBEN 0xffff /* OTP/Fuse Byte Enable */
2209
2210/* Bit masks for OTP_STATUS */
2211
2212#define FCOMP 0x1 /* OTP/Fuse Access Complete */
2213#define FERROR 0x2 /* OTP/Fuse Access Error */
2214#define MMRGLOAD 0x10 /* Memory Mapped Register Gasket Load */
2215#define MMRGLOCK 0x20 /* Memory Mapped Register Gasket Lock */
2216#define FPGMEN 0x40 /* OTP/Fuse Program Enable */
2217
2218/* Bit masks for OTP_TIMING */
2219
2220#define USECDIV 0xff /* Micro Second Divider */
2221#define READACC 0x7f00 /* Read Access Time */
2222#define CPUMPRL 0x38000 /* Charge Pump Release Time */
2223#define CPUMPSU 0xc0000 /* Charge Pump Setup Time */
2224#define CPUMPHD 0xf00000 /* Charge Pump Hold Time */
2225#define PGMTIME 0xff000000 /* Program Time */
2226
2227/* Bit masks for SECURE_SYSSWT */ 2012/* Bit masks for SECURE_SYSSWT */
2228 2013
2229#define EMUDABL 0x1 /* Emulation Disable. */ 2014#define EMUDABL 0x1 /* Emulation Disable. */
@@ -2252,26 +2037,6 @@
2252#define AFEXIT 0x10 /* Authentication Firmware Exit */ 2037#define AFEXIT 0x10 /* Authentication Firmware Exit */
2253#define SECSTAT 0xe0 /* Secure Status */ 2038#define SECSTAT 0xe0 /* Secure Status */
2254 2039
2255/* Bit masks for PLL_DIV */
2256
2257#define CSEL 0x30 /* Core Select */
2258#define SSEL 0xf /* System Select */
2259#define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */
2260#define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */
2261#define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */
2262#define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */
2263
2264/* Bit masks for PLL_CTL */
2265
2266#define MSEL 0x7e00 /* Multiplier Select */
2267#define BYPASS 0x100 /* PLL Bypass Enable */
2268#define OUTPUT_DELAY 0x80 /* External Memory Output Delay Enable */
2269#define INPUT_DELAY 0x40 /* External Memory Input Delay Enable */
2270#define PDWN 0x20 /* Power Down */
2271#define STOPCK 0x8 /* Stop Clock */
2272#define PLL_OFF 0x2 /* Disable PLL */
2273#define DF 0x1 /* Divide Frequency */
2274
2275/* SWRST Masks */ 2040/* SWRST Masks */
2276#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */ 2041#define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */
2277#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */ 2042#define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */
@@ -2279,52 +2044,6 @@
2279#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */ 2044#define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */
2280#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */ 2045#define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */
2281 2046
2282/* Bit masks for PLL_STAT */
2283
2284#define PLL_LOCKED 0x20 /* PLL Locked Status */
2285#define ACTIVE_PLLDISABLED 0x4 /* Active Mode With PLL Disabled */
2286#define FULL_ON 0x2 /* Full-On Mode */
2287#define ACTIVE_PLLENABLED 0x1 /* Active Mode With PLL Enabled */
2288#define RTCWS 0x400 /* RTC/Reset Wake-Up Status */
2289#define CANWS 0x800 /* CAN Wake-Up Status */
2290#define USBWS 0x2000 /* USB Wake-Up Status */
2291#define KPADWS 0x4000 /* Keypad Wake-Up Status */
2292#define ROTWS 0x8000 /* Rotary Wake-Up Status */
2293#define GPWS 0x1000 /* General-Purpose Wake-Up Status */
2294
2295/* Bit masks for VR_CTL */
2296
2297#define FREQ 0x3 /* Regulator Switching Frequency */
2298#define GAIN 0xc /* Voltage Output Level Gain */
2299#define VLEV 0xf0 /* Internal Voltage Level */
2300#define SCKELOW 0x8000 /* Drive SCKE Low During Reset Enable */
2301#define WAKE 0x100 /* RTC/Reset Wake-Up Enable */
2302#define CANWE 0x200 /* CAN0/1 Wake-Up Enable */
2303#define GPWE 0x400 /* General-Purpose Wake-Up Enable */
2304#define USBWE 0x800 /* USB Wake-Up Enable */
2305#define KPADWE 0x1000 /* Keypad Wake-Up Enable */
2306#define ROTWE 0x2000 /* Rotary Wake-Up Enable */
2307
2308#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
2309#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
2310#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
2311
2312#define GAIN_5 0x0000 /* GAIN = 5*/
2313#define GAIN_10 0x0004 /* GAIN = 1*/
2314#define GAIN_20 0x0008 /* GAIN = 2*/
2315#define GAIN_50 0x000C /* GAIN = 5*/
2316
2317#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
2318#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
2319#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
2320#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
2321#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
2322#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
2323#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
2324#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
2325#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
2326#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
2327
2328/* Bit masks for NFC_CTL */ 2047/* Bit masks for NFC_CTL */
2329 2048
2330#define WR_DLY 0xf /* Write Strobe Delay */ 2049#define WR_DLY 0xf /* Write Strobe Delay */
@@ -2489,14 +2208,6 @@
2489#define UCCT 0x40 /* Universal Counter CAN Trigger */ 2208#define UCCT 0x40 /* Universal Counter CAN Trigger */
2490#define UCE 0x80 /* Universal Counter Enable */ 2209#define UCE 0x80 /* Universal Counter Enable */
2491 2210
2492/* Bit masks for CAN0_UCCNT */
2493
2494#define UCCNT 0xffff /* Universal Counter Count Value */
2495
2496/* Bit masks for CAN0_UCRC */
2497
2498#define UCVAL 0xffff /* Universal Counter Reload/Capture Value */
2499
2500/* Bit masks for CAN0_CEC */ 2211/* Bit masks for CAN0_CEC */
2501 2212
2502#define RXECNT 0xff /* Receive Error Counter */ 2213#define RXECNT 0xff /* Receive Error Counter */
diff --git a/arch/blackfin/mach-bf561/boards/Kconfig b/arch/blackfin/mach-bf561/boards/Kconfig
index e4bc6d7c5a6a..1aa529b9f8bb 100644
--- a/arch/blackfin/mach-bf561/boards/Kconfig
+++ b/arch/blackfin/mach-bf561/boards/Kconfig
@@ -19,4 +19,11 @@ config BFIN561_BLUETECHNIX_CM
19 help 19 help
20 CM-BF561 support for EVAL- and DEV-Board. 20 CM-BF561 support for EVAL- and DEV-Board.
21 21
22config BFIN561_ACVILON
23 bool "BF561-ACVILON"
24 help
25 BF561-ACVILON System On Module support (SO-DIMM 144).
26 For more information about Acvilon BF561 SoM
27 please go to http://www.niistt.ru/
28
22endchoice 29endchoice
diff --git a/arch/blackfin/mach-bf561/boards/Makefile b/arch/blackfin/mach-bf561/boards/Makefile
index 3a152559e957..a5879f7857ad 100644
--- a/arch/blackfin/mach-bf561/boards/Makefile
+++ b/arch/blackfin/mach-bf561/boards/Makefile
@@ -2,6 +2,7 @@
2# arch/blackfin/mach-bf561/boards/Makefile 2# arch/blackfin/mach-bf561/boards/Makefile
3# 3#
4 4
5obj-$(CONFIG_BFIN561_ACVILON) += acvilon.o
5obj-$(CONFIG_BFIN561_BLUETECHNIX_CM) += cm_bf561.o 6obj-$(CONFIG_BFIN561_BLUETECHNIX_CM) += cm_bf561.o
6obj-$(CONFIG_BFIN561_EZKIT) += ezkit.o 7obj-$(CONFIG_BFIN561_EZKIT) += ezkit.o
7obj-$(CONFIG_BFIN561_TEPLA) += tepla.o 8obj-$(CONFIG_BFIN561_TEPLA) += tepla.o
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
new file mode 100644
index 000000000000..07e8dc8770da
--- /dev/null
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -0,0 +1,551 @@
1/*
2 * File: arch/blackfin/mach-bf561/acvilon.c
3 * Based on: arch/blackfin/mach-bf561/ezkit.c
4 * Author:
5 *
6 * Created:
7 * Description:
8 *
9 * Modified:
10 * Copyright 2004-2006 Analog Devices Inc.
11 * Copyright 2009 CJSC "NII STT"
12 *
13 * Bugs:
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 *
30 *
31 * For more information about Acvilon BF561 SoM please
32 * go to http://www.niistt.ru/
33 *
34 */
35
36#include <linux/device.h>
37#include <linux/platform_device.h>
38#include <linux/mtd/mtd.h>
39#include <linux/mtd/partitions.h>
40#include <linux/mtd/physmap.h>
41#include <linux/mtd/nand.h>
42#include <linux/mtd/plat-ram.h>
43#include <linux/spi/spi.h>
44#include <linux/spi/flash.h>
45#include <linux/irq.h>
46#include <linux/interrupt.h>
47#include <linux/i2c-pca-platform.h>
48#include <linux/delay.h>
49#include <linux/io.h>
50#include <asm/dma.h>
51#include <asm/bfin5xx_spi.h>
52#include <asm/portmux.h>
53#include <asm/dpmc.h>
54#include <asm/cacheflush.h>
55#include <linux/i2c.h>
56
57/*
58 * Name the Board for the /proc/cpuinfo
59 */
60const char bfin_board_name[] = "Acvilon board";
61
62#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
63#include <linux/usb/isp1760.h>
64static struct resource bfin_isp1760_resources[] = {
65 [0] = {
66 .start = 0x20000000,
67 .end = 0x20000000 + 0x000fffff,
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = IRQ_PF15,
72 .end = IRQ_PF15,
73 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
74 },
75};
76
77static struct isp1760_platform_data isp1760_priv = {
78 .is_isp1761 = 0,
79 .port1_disable = 0,
80 .bus_width_16 = 1,
81 .port1_otg = 0,
82 .analog_oc = 0,
83 .dack_polarity_high = 0,
84 .dreq_polarity_high = 0,
85};
86
87static struct platform_device bfin_isp1760_device = {
88 .name = "isp1760-hcd",
89 .id = 0,
90 .dev = {
91 .platform_data = &isp1760_priv,
92 },
93 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
94 .resource = bfin_isp1760_resources,
95};
96#endif
97
98static struct resource bfin_i2c_pca_resources[] = {
99 {
100 .name = "pca9564-regs",
101 .start = 0x2C000000,
102 .end = 0x2C000000 + 16,
103 .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT,
104 }, {
105
106 .start = IRQ_PF8,
107 .end = IRQ_PF8,
108 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
109 },
110};
111
112struct i2c_pca9564_pf_platform_data pca9564_platform_data = {
113 .gpio = -1,
114 .i2c_clock_speed = 330000,
115 .timeout = 10000
116};
117
118/* PCA9564 I2C Bus driver */
119static struct platform_device bfin_i2c_pca_device = {
120 .name = "i2c-pca-platform",
121 .id = 0,
122 .num_resources = ARRAY_SIZE(bfin_i2c_pca_resources),
123 .resource = bfin_i2c_pca_resources,
124 .dev = {
125 .platform_data = &pca9564_platform_data,
126 }
127};
128
129/* I2C devices fitted. */
130static struct i2c_board_info acvilon_i2c_devs[] __initdata = {
131 {
132 I2C_BOARD_INFO("ds1339", 0x68),
133 },
134 {
135 I2C_BOARD_INFO("tcn75", 0x49),
136 },
137};
138
139#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
140static struct platdata_mtd_ram mtd_ram_data = {
141 .mapname = "rootfs(RAM)",
142 .bankwidth = 4,
143};
144
145static struct resource mtd_ram_resource = {
146 .start = 0x4000000,
147 .end = 0x5ffffff,
148 .flags = IORESOURCE_MEM,
149};
150
151static struct platform_device mtd_ram_device = {
152 .name = "mtd-ram",
153 .id = 0,
154 .dev = {
155 .platform_data = &mtd_ram_data,
156 },
157 .num_resources = 1,
158 .resource = &mtd_ram_resource,
159};
160#endif
161
162#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
163#include <linux/smsc911x.h>
164static struct resource smsc911x_resources[] = {
165 {
166 .name = "smsc911x-memory",
167 .start = 0x28000000,
168 .end = 0x28000000 + 0xFF,
169 .flags = IORESOURCE_MEM,
170 },
171 {
172 .start = IRQ_PF7,
173 .end = IRQ_PF7,
174 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
175 },
176};
177
178static struct smsc911x_platform_config smsc911x_config = {
179 .flags = SMSC911X_USE_32BIT,
180 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
181 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
182 .phy_interface = PHY_INTERFACE_MODE_MII,
183};
184
185static struct platform_device smsc911x_device = {
186 .name = "smsc911x",
187 .id = 0,
188 .num_resources = ARRAY_SIZE(smsc911x_resources),
189 .resource = smsc911x_resources,
190 .dev = {
191 .platform_data = &smsc911x_config,
192 },
193};
194#endif
195
196#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
197#ifdef CONFIG_SERIAL_BFIN_UART0
198static struct resource bfin_uart0_resources[] = {
199 {
200 .start = BFIN_UART_THR,
201 .end = BFIN_UART_GCTL + 2,
202 .flags = IORESOURCE_MEM,
203 },
204 {
205 .start = IRQ_UART_RX,
206 .end = IRQ_UART_RX + 1,
207 .flags = IORESOURCE_IRQ,
208 },
209 {
210 .start = IRQ_UART_ERROR,
211 .end = IRQ_UART_ERROR,
212 .flags = IORESOURCE_IRQ,
213 },
214 {
215 .start = CH_UART_TX,
216 .end = CH_UART_TX,
217 .flags = IORESOURCE_DMA,
218 },
219 {
220 .start = CH_UART_RX,
221 .end = CH_UART_RX,
222 .flags = IORESOURCE_DMA,
223 },
224};
225
226unsigned short bfin_uart0_peripherals[] = {
227 P_UART0_TX, P_UART0_RX, 0
228};
229
230static struct platform_device bfin_uart0_device = {
231 .name = "bfin-uart",
232 .id = 0,
233 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
234 .resource = bfin_uart0_resources,
235 .dev = {
236 /* Passed to driver */
237 .platform_data = &bfin_uart0_peripherals,
238 },
239};
240#endif
241#endif
242
243#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
244
245#ifdef CONFIG_MTD_PARTITIONS
246const char *part_probes[] = { "cmdlinepart", NULL };
247
248static struct mtd_partition bfin_plat_nand_partitions[] = {
249 {
250 .name = "params(nand)",
251 .size = 32 * 1024 * 1024,
252 .offset = 0,
253 }, {
254 .name = "userfs(nand)",
255 .size = MTDPART_SIZ_FULL,
256 .offset = MTDPART_OFS_APPEND,
257 },
258};
259#endif
260
261#define BFIN_NAND_PLAT_CLE 2
262#define BFIN_NAND_PLAT_ALE 3
263
264static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
265 unsigned int ctrl)
266{
267 struct nand_chip *this = mtd->priv;
268
269 if (cmd == NAND_CMD_NONE)
270 return;
271
272 if (ctrl & NAND_CLE)
273 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
274 else
275 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
276}
277
278#define BFIN_NAND_PLAT_READY GPIO_PF10
279static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
280{
281 return gpio_get_value(BFIN_NAND_PLAT_READY);
282}
283
284static struct platform_nand_data bfin_plat_nand_data = {
285 .chip = {
286 .chip_delay = 30,
287#ifdef CONFIG_MTD_PARTITIONS
288 .part_probe_types = part_probes,
289 .partitions = bfin_plat_nand_partitions,
290 .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
291#endif
292 },
293 .ctrl = {
294 .cmd_ctrl = bfin_plat_nand_cmd_ctrl,
295 .dev_ready = bfin_plat_nand_dev_ready,
296 },
297};
298
299#define MAX(x, y) (x > y ? x : y)
300static struct resource bfin_plat_nand_resources = {
301 .start = 0x24000000,
302 .end = 0x24000000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
303 .flags = IORESOURCE_IO,
304};
305
306static struct platform_device bfin_async_nand_device = {
307 .name = "gen_nand",
308 .id = -1,
309 .num_resources = 1,
310 .resource = &bfin_plat_nand_resources,
311 .dev = {
312 .platform_data = &bfin_plat_nand_data,
313 },
314};
315
316static void bfin_plat_nand_init(void)
317{
318 gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");
319}
320#else
321static void bfin_plat_nand_init(void)
322{
323}
324#endif
325
326#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE)
327static struct mtd_partition bfin_spi_dataflash_partitions[] = {
328 {
329 .name = "bootloader",
330 .size = 0x4200,
331 .offset = 0,
332 .mask_flags = MTD_CAP_ROM},
333 {
334 .name = "u-boot",
335 .size = 0x42000,
336 .offset = MTDPART_OFS_APPEND,
337 },
338 {
339 .name = "u-boot(params)",
340 .size = 0x4200,
341 .offset = MTDPART_OFS_APPEND,
342 },
343 {
344 .name = "kernel",
345 .size = 0x294000,
346 .offset = MTDPART_OFS_APPEND,
347 },
348 {
349 .name = "params",
350 .size = 0x42000,
351 .offset = MTDPART_OFS_APPEND,
352 },
353 {
354 .name = "rootfs",
355 .size = MTDPART_SIZ_FULL,
356 .offset = MTDPART_OFS_APPEND,
357 }
358};
359
360static struct flash_platform_data bfin_spi_dataflash_data = {
361 .name = "SPI Dataflash",
362 .parts = bfin_spi_dataflash_partitions,
363 .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
364};
365
366/* DataFlash chip */
367static struct bfin5xx_spi_chip data_flash_chip_info = {
368 .enable_dma = 0, /* use dma transfer with this chip */
369 .bits_per_word = 8,
370};
371#endif
372
373#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
374static struct bfin5xx_spi_chip spidev_chip_info = {
375 .enable_dma = 0,
376 .bits_per_word = 8,
377};
378#endif
379
380#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
381/* SPI (0) */
382static struct resource bfin_spi0_resource[] = {
383 [0] = {
384 .start = SPI0_REGBASE,
385 .end = SPI0_REGBASE + 0xFF,
386 .flags = IORESOURCE_MEM,
387 },
388 [1] = {
389 .start = CH_SPI,
390 .end = CH_SPI,
391 .flags = IORESOURCE_DMA,
392 },
393 [2] = {
394 .start = IRQ_SPI,
395 .end = IRQ_SPI,
396 .flags = IORESOURCE_IRQ,
397 },
398};
399
400/* SPI controller data */
401static struct bfin5xx_spi_master bfin_spi0_info = {
402 .num_chipselect = 8,
403 .enable_dma = 1, /* master has the ability to do dma transfer */
404 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
405};
406
407static struct platform_device bfin_spi0_device = {
408 .name = "bfin-spi",
409 .id = 0, /* Bus number */
410 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
411 .resource = bfin_spi0_resource,
412 .dev = {
413 .platform_data = &bfin_spi0_info, /* Passed to driver */
414 },
415};
416#endif
417
418static struct spi_board_info bfin_spi_board_info[] __initdata = {
419#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
420 {
421 .modalias = "spidev",
422 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
423 .bus_num = 0,
424 .chip_select = 3,
425 .controller_data = &spidev_chip_info,
426 },
427#endif
428#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE)
429 { /* DataFlash chip */
430 .modalias = "mtd_dataflash",
431 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
432 .bus_num = 0, /* Framework bus number */
433 .chip_select = 2, /* Framework chip select */
434 .platform_data = &bfin_spi_dataflash_data,
435 .controller_data = &data_flash_chip_info,
436 .mode = SPI_MODE_3,
437 },
438#endif
439};
440
441static struct resource bfin_gpios_resources = {
442 .start = 31,
443/* .end = MAX_BLACKFIN_GPIOS - 1, */
444 .end = 32,
445 .flags = IORESOURCE_IRQ,
446};
447
448static struct platform_device bfin_gpios_device = {
449 .name = "simple-gpio",
450 .id = -1,
451 .num_resources = 1,
452 .resource = &bfin_gpios_resources,
453};
454
455static const unsigned int cclk_vlev_datasheet[] = {
456 VRPAIR(VLEV_085, 250000000),
457 VRPAIR(VLEV_090, 300000000),
458 VRPAIR(VLEV_095, 313000000),
459 VRPAIR(VLEV_100, 350000000),
460 VRPAIR(VLEV_105, 400000000),
461 VRPAIR(VLEV_110, 444000000),
462 VRPAIR(VLEV_115, 450000000),
463 VRPAIR(VLEV_120, 475000000),
464 VRPAIR(VLEV_125, 500000000),
465 VRPAIR(VLEV_130, 600000000),
466};
467
468static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
469 .tuple_tab = cclk_vlev_datasheet,
470 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
471 .vr_settling_time = 25 /* us */ ,
472};
473
474static struct platform_device bfin_dpmc = {
475 .name = "bfin dpmc",
476 .dev = {
477 .platform_data = &bfin_dmpc_vreg_data,
478 },
479};
480
481static struct platform_device *acvilon_devices[] __initdata = {
482 &bfin_dpmc,
483
484#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
485 &bfin_spi0_device,
486#endif
487
488#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
489#ifdef CONFIG_SERIAL_BFIN_UART0
490 &bfin_uart0_device,
491#endif
492#endif
493
494 &bfin_gpios_device,
495
496#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
497 &smsc911x_device,
498#endif
499
500 &bfin_i2c_pca_device,
501
502#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
503 &bfin_async_nand_device,
504#endif
505
506#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
507 &mtd_ram_device,
508#endif
509
510};
511
512static int __init acvilon_init(void)
513{
514 int ret;
515
516 printk(KERN_INFO "%s(): registering device resources\n", __func__);
517
518 bfin_plat_nand_init();
519 ret =
520 platform_add_devices(acvilon_devices, ARRAY_SIZE(acvilon_devices));
521 if (ret < 0)
522 return ret;
523
524 i2c_register_board_info(0, acvilon_i2c_devs,
525 ARRAY_SIZE(acvilon_i2c_devs));
526
527 bfin_write_FIO0_FLAG_C(1 << 14);
528 msleep(5);
529 bfin_write_FIO0_FLAG_S(1 << 14);
530
531 spi_register_board_info(bfin_spi_board_info,
532 ARRAY_SIZE(bfin_spi_board_info));
533 return 0;
534}
535
536arch_initcall(acvilon_init);
537
538static struct platform_device *acvilon_early_devices[] __initdata = {
539#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
540#ifdef CONFIG_SERIAL_BFIN_UART0
541 &bfin_uart0_device,
542#endif
543#endif
544};
545
546void __init native_machine_early_platform_add_devices(void)
547{
548 printk(KERN_INFO "register early platform devices\n");
549 early_platform_add_devices(acvilon_early_devices,
550 ARRAY_SIZE(acvilon_early_devices));
551}
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9e2d8cfba546..ffd3e6a80d1a 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -49,7 +49,7 @@ static struct isp1760_platform_data isp1760_priv = {
49}; 49};
50 50
51static struct platform_device bfin_isp1760_device = { 51static struct platform_device bfin_isp1760_device = {
52 .name = "isp1760-hcd", 52 .name = "isp1760",
53 .id = 0, 53 .id = 0,
54 .dev = { 54 .dev = {
55 .platform_data = &isp1760_priv, 55 .platform_data = &isp1760_priv,
@@ -159,28 +159,6 @@ static struct platform_device smc91x_device = {
159}; 159};
160#endif 160#endif
161 161
162#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
163static struct resource ax88180_resources[] = {
164 [0] = {
165 .start = 0x2c000000,
166 .end = 0x2c000000 + 0x8000,
167 .flags = IORESOURCE_MEM,
168 },
169 [1] = {
170 .start = IRQ_PF10,
171 .end = IRQ_PF10,
172 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
173 },
174};
175
176static struct platform_device ax88180_device = {
177 .name = "ax88180",
178 .id = -1,
179 .num_resources = ARRAY_SIZE(ax88180_resources),
180 .resource = ax88180_resources,
181};
182#endif
183
184#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 162#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
185static struct resource bfin_uart_resources[] = { 163static struct resource bfin_uart_resources[] = {
186 { 164 {
@@ -421,10 +399,6 @@ static struct platform_device *ezkit_devices[] __initdata = {
421 &smc91x_device, 399 &smc91x_device,
422#endif 400#endif
423 401
424#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
425 &ax88180_device,
426#endif
427
428#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 402#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
429 &net2272_bfin_device, 403 &net2272_bfin_device,
430#endif 404#endif
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index 1e60a92dd602..deb2271d09a3 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -22,8 +22,8 @@
22#define CMD_COREB_STOP 3 22#define CMD_COREB_STOP 3
23#define CMD_COREB_RESET 4 23#define CMD_COREB_RESET 4
24 24
25static int 25static long
26coreb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) 26coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
27{ 27{
28 int ret = 0; 28 int ret = 0;
29 29
@@ -49,8 +49,8 @@ coreb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned l
49} 49}
50 50
51static const struct file_operations coreb_fops = { 51static const struct file_operations coreb_fops = {
52 .owner = THIS_MODULE, 52 .owner = THIS_MODULE,
53 .ioctl = coreb_ioctl, 53 .unlocked_ioctl = coreb_ioctl,
54}; 54};
55 55
56static struct miscdevice coreb_dev = { 56static struct miscdevice coreb_dev = {
diff --git a/arch/blackfin/mach-bf561/include/mach/defBF561.h b/arch/blackfin/mach-bf561/include/mach/defBF561.h
index a31e509553fb..4c8e36b7fb33 100644
--- a/arch/blackfin/mach-bf561/include/mach/defBF561.h
+++ b/arch/blackfin/mach-bf561/include/mach/defBF561.h
@@ -884,65 +884,11 @@
884/* System MMR Register Bits */ 884/* System MMR Register Bits */
885/******************************************************************************* */ 885/******************************************************************************* */
886 886
887/* ********************* PLL AND RESET MASKS ************************ */
888
889/* PLL_CTL Masks */
890#define PLL_CLKIN 0x00000000 /* Pass CLKIN to PLL */
891#define PLL_CLKIN_DIV2 0x00000001 /* Pass CLKIN/2 to PLL */
892#define PLL_OFF 0x00000002 /* Shut off PLL clocks */
893#define STOPCK_OFF 0x00000008 /* Core clock off */
894#define PDWN 0x00000020 /* Put the PLL in a Deep Sleep state */
895#define BYPASS 0x00000100 /* Bypass the PLL */
896
897/* CHIPID Masks */ 887/* CHIPID Masks */
898#define CHIPID_VERSION 0xF0000000 888#define CHIPID_VERSION 0xF0000000
899#define CHIPID_FAMILY 0x0FFFF000 889#define CHIPID_FAMILY 0x0FFFF000
900#define CHIPID_MANUFACTURE 0x00000FFE 890#define CHIPID_MANUFACTURE 0x00000FFE
901 891
902/* VR_CTL Masks */
903#define FREQ 0x0003 /* Switching Oscillator Frequency For Regulator */
904#define HIBERNATE 0x0000 /* Powerdown/Bypass On-Board Regulation */
905#define FREQ_333 0x0001 /* Switching Frequency Is 333 kHz */
906#define FREQ_667 0x0002 /* Switching Frequency Is 667 kHz */
907#define FREQ_1000 0x0003 /* Switching Frequency Is 1 MHz */
908
909#define GAIN 0x000C /* Voltage Level Gain */
910#define GAIN_5 0x0000 /* GAIN = 5*/
911#define GAIN_10 0x0004 /* GAIN = 1*/
912#define GAIN_20 0x0008 /* GAIN = 2*/
913#define GAIN_50 0x000C /* GAIN = 5*/
914
915#define VLEV 0x00F0 /* Internal Voltage Level */
916#define VLEV_085 0x0060 /* VLEV = 0.85 V (-5% - +10% Accuracy) */
917#define VLEV_090 0x0070 /* VLEV = 0.90 V (-5% - +10% Accuracy) */
918#define VLEV_095 0x0080 /* VLEV = 0.95 V (-5% - +10% Accuracy) */
919#define VLEV_100 0x0090 /* VLEV = 1.00 V (-5% - +10% Accuracy) */
920#define VLEV_105 0x00A0 /* VLEV = 1.05 V (-5% - +10% Accuracy) */
921#define VLEV_110 0x00B0 /* VLEV = 1.10 V (-5% - +10% Accuracy) */
922#define VLEV_115 0x00C0 /* VLEV = 1.15 V (-5% - +10% Accuracy) */
923#define VLEV_120 0x00D0 /* VLEV = 1.20 V (-5% - +10% Accuracy) */
924#define VLEV_125 0x00E0 /* VLEV = 1.25 V (-5% - +10% Accuracy) */
925#define VLEV_130 0x00F0 /* VLEV = 1.30 V (-5% - +10% Accuracy) */
926
927#define WAKE 0x0100 /* Enable RTC/Reset Wakeup From Hibernate */
928#define SCKELOW 0x8000 /* Do Not Drive SCKE High During Reset After Hibernate */
929
930/* PLL_DIV Masks */
931#define SCLK_DIV(x) (x) /* SCLK = VCO / x */
932
933#define CSEL 0x30 /* Core Select */
934#define SSEL 0xf /* System Select */
935#define CCLK_DIV1 0x00000000 /* CCLK = VCO / 1 */
936#define CCLK_DIV2 0x00000010 /* CCLK = VCO / 2 */
937#define CCLK_DIV4 0x00000020 /* CCLK = VCO / 4 */
938#define CCLK_DIV8 0x00000030 /* CCLK = VCO / 8 */
939
940/* PLL_STAT Masks */
941#define ACTIVE_PLLENABLED 0x0001 /* Processor In Active Mode With PLL Enabled */
942#define FULL_ON 0x0002 /* Processor In Full On Mode */
943#define ACTIVE_PLLDISABLED 0x0004 /* Processor In Active Mode With PLL Disabled */
944#define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */
945
946/* SICA_SYSCR Masks */ 892/* SICA_SYSCR Masks */
947#define COREB_SRAM_INIT 0x0020 893#define COREB_SRAM_INIT 0x0020
948 894
@@ -1150,53 +1096,6 @@
1150 1096
1151/* ********** DMA CONTROLLER MASKS *********************8 */ 1097/* ********** DMA CONTROLLER MASKS *********************8 */
1152 1098
1153/* DMAx_CONFIG, MDMA_yy_CONFIG, IMDMA_yy_CONFIG Masks */
1154#define DMAEN 0x00000001 /* Channel Enable */
1155#define WNR 0x00000002 /* Channel Direction (W/R*) */
1156#define WDSIZE_8 0x00000000 /* Word Size 8 bits */
1157#define WDSIZE_16 0x00000004 /* Word Size 16 bits */
1158#define WDSIZE_32 0x00000008 /* Word Size 32 bits */
1159#define DMA2D 0x00000010 /* 2D/1D* Mode */
1160#define RESTART 0x00000020 /* Restart */
1161#define DI_SEL 0x00000040 /* Data Interrupt Select */
1162#define DI_EN 0x00000080 /* Data Interrupt Enable */
1163#define NDSIZE_0 0x0000 /* Next Descriptor Size = 0 (Stop/Autobuffer) */
1164#define NDSIZE_1 0x0100 /* Next Descriptor Size = 1 */
1165#define NDSIZE_2 0x0200 /* Next Descriptor Size = 2 */
1166#define NDSIZE_3 0x0300 /* Next Descriptor Size = 3 */
1167#define NDSIZE_4 0x0400 /* Next Descriptor Size = 4 */
1168#define NDSIZE_5 0x0500 /* Next Descriptor Size = 5 */
1169#define NDSIZE_6 0x0600 /* Next Descriptor Size = 6 */
1170#define NDSIZE_7 0x0700 /* Next Descriptor Size = 7 */
1171#define NDSIZE_8 0x0800 /* Next Descriptor Size = 8 */
1172#define NDSIZE_9 0x0900 /* Next Descriptor Size = 9 */
1173#define NDSIZE 0x00000900 /* Next Descriptor Size */
1174#define DMAFLOW 0x00007000 /* Flow Control */
1175#define DMAFLOW_STOP 0x0000 /* Stop Mode */
1176#define DMAFLOW_AUTO 0x1000 /* Autobuffer Mode */
1177#define DMAFLOW_ARRAY 0x4000 /* Descriptor Array Mode */
1178#define DMAFLOW_SMALL 0x6000 /* Small Model Descriptor List Mode */
1179#define DMAFLOW_LARGE 0x7000 /* Large Model Descriptor List Mode */
1180
1181#define DMAEN_P 0 /* Channel Enable */
1182#define WNR_P 1 /* Channel Direction (W/R*) */
1183#define DMA2D_P 4 /* 2D/1D* Mode */
1184#define RESTART_P 5 /* Restart */
1185#define DI_SEL_P 6 /* Data Interrupt Select */
1186#define DI_EN_P 7 /* Data Interrupt Enable */
1187
1188/* DMAx_IRQ_STATUS, MDMA_yy_IRQ_STATUS, IMDMA_yy_IRQ_STATUS Masks */
1189
1190#define DMA_DONE 0x00000001 /* DMA Done Indicator */
1191#define DMA_ERR 0x00000002 /* DMA Error Indicator */
1192#define DFETCH 0x00000004 /* Descriptor Fetch Indicator */
1193#define DMA_RUN 0x00000008 /* DMA Running Indicator */
1194
1195#define DMA_DONE_P 0 /* DMA Done Indicator */
1196#define DMA_ERR_P 1 /* DMA Error Indicator */
1197#define DFETCH_P 2 /* Descriptor Fetch Indicator */
1198#define DMA_RUN_P 3 /* DMA Running Indicator */
1199
1200/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP, IMDMA_yy_PERIPHERAL_MAP Masks */ 1099/* DMAx_PERIPHERAL_MAP, MDMA_yy_PERIPHERAL_MAP, IMDMA_yy_PERIPHERAL_MAP Masks */
1201 1100
1202#define CTYPE 0x00000040 /* DMA Channel Type Indicator */ 1101#define CTYPE 0x00000040 /* DMA Channel Type Indicator */
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index 510f57641495..0192532e96a2 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -52,8 +52,6 @@ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */
52 52
53void __cpuinit platform_secondary_init(unsigned int cpu) 53void __cpuinit platform_secondary_init(unsigned int cpu)
54{ 54{
55 local_irq_disable();
56
57 /* Clone setup for peripheral interrupt sources from CoreA. */ 55 /* Clone setup for peripheral interrupt sources from CoreA. */
58 bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0()); 56 bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0());
59 bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1()); 57 bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1());
@@ -70,11 +68,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
70 bfin_write_SICB_IAR7(bfin_read_SICA_IAR7()); 68 bfin_write_SICB_IAR7(bfin_read_SICA_IAR7());
71 SSYNC(); 69 SSYNC();
72 70
73 local_irq_enable();
74
75 /* Calibrate loops per jiffy value. */
76 calibrate_delay();
77
78 /* Store CPU-private information to the cpu_data array. */ 71 /* Store CPU-private information to the cpu_data array. */
79 bfin_setup_cpudata(cpu); 72 bfin_setup_cpudata(cpu);
80 73
@@ -108,9 +101,13 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle
108 barrier(); 101 barrier();
109 } 102 }
110 103
111 spin_unlock(&boot_lock); 104 if (cpu_isset(cpu, cpu_callin_map)) {
112 105 cpu_set(cpu, cpu_online_map);
113 return cpu_isset(cpu, cpu_callin_map) ? 0 : -ENOSYS; 106 /* release the lock and let coreb run */
107 spin_unlock(&boot_lock);
108 return 0;
109 } else
110 panic("CPU%u: processor failed to boot\n", cpu);
114} 111}
115 112
116void __init platform_request_ipi(irq_handler_t handler) 113void __init platform_request_ipi(irq_handler_t handler)
diff --git a/arch/blackfin/mach-common/clocks-init.c b/arch/blackfin/mach-common/clocks-init.c
index ef6870e9eea6..d5cfe611b778 100644
--- a/arch/blackfin/mach-common/clocks-init.c
+++ b/arch/blackfin/mach-common/clocks-init.c
@@ -13,6 +13,7 @@
13#include <asm/dma.h> 13#include <asm/dma.h>
14#include <asm/clocks.h> 14#include <asm/clocks.h>
15#include <asm/mem_init.h> 15#include <asm/mem_init.h>
16#include <asm/dpmc.h>
16 17
17#define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */ 18#define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */
18#define PLL_CTL_VAL \ 19#define PLL_CTL_VAL \
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c
index 01506504e6d0..777582897253 100644
--- a/arch/blackfin/mach-common/cpufreq.c
+++ b/arch/blackfin/mach-common/cpufreq.c
@@ -13,7 +13,7 @@
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <asm/blackfin.h> 14#include <asm/blackfin.h>
15#include <asm/time.h> 15#include <asm/time.h>
16 16#include <asm/dpmc.h>
17 17
18/* this is the table of CCLK frequencies, in Hz */ 18/* this is the table of CCLK frequencies, in Hz */
19/* .index is the entry in the auxillary dpm_state_table[] */ 19/* .index is the entry in the auxillary dpm_state_table[] */
@@ -138,7 +138,8 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
138 dpm_state_table[index].tscale); 138 dpm_state_table[index].tscale);
139 } 139 }
140 140
141 policy->cpuinfo.transition_latency = (bfin_read_PLL_LOCKCNT() / (sclk / 1000000)) * 1000; 141 policy->cpuinfo.transition_latency = 50000; /* 50us assumed */
142
142 /*Now ,only support one cpu */ 143 /*Now ,only support one cpu */
143 policy->cur = cclk; 144 policy->cur = cclk;
144 cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu); 145 cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu);
diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S
index 8009a512fb11..b03716896051 100644
--- a/arch/blackfin/mach-common/dpmc_modes.S
+++ b/arch/blackfin/mach-common/dpmc_modes.S
@@ -404,6 +404,21 @@ ENTRY(_do_hibernate)
404 PM_SYS_PUSH(EBIU_FCTL) 404 PM_SYS_PUSH(EBIU_FCTL)
405#endif 405#endif
406 406
407#ifdef PORTCIO_FER
408 PM_SYS_PUSH16(PORTCIO_DIR)
409 PM_SYS_PUSH16(PORTCIO_INEN)
410 PM_SYS_PUSH16(PORTCIO)
411 PM_SYS_PUSH16(PORTCIO_FER)
412 PM_SYS_PUSH16(PORTDIO_DIR)
413 PM_SYS_PUSH16(PORTDIO_INEN)
414 PM_SYS_PUSH16(PORTDIO)
415 PM_SYS_PUSH16(PORTDIO_FER)
416 PM_SYS_PUSH16(PORTEIO_DIR)
417 PM_SYS_PUSH16(PORTEIO_INEN)
418 PM_SYS_PUSH16(PORTEIO)
419 PM_SYS_PUSH16(PORTEIO_FER)
420#endif
421
407 PM_SYS_PUSH16(SYSCR) 422 PM_SYS_PUSH16(SYSCR)
408 423
409 /* Save Core MMRs */ 424 /* Save Core MMRs */
@@ -716,6 +731,21 @@ ENTRY(_do_hibernate)
716 P0.L = lo(PLL_CTL); 731 P0.L = lo(PLL_CTL);
717 PM_SYS_POP16(SYSCR) 732 PM_SYS_POP16(SYSCR)
718 733
734#ifdef PORTCIO_FER
735 PM_SYS_POP16(PORTEIO_FER)
736 PM_SYS_POP16(PORTEIO)
737 PM_SYS_POP16(PORTEIO_INEN)
738 PM_SYS_POP16(PORTEIO_DIR)
739 PM_SYS_POP16(PORTDIO_FER)
740 PM_SYS_POP16(PORTDIO)
741 PM_SYS_POP16(PORTDIO_INEN)
742 PM_SYS_POP16(PORTDIO_DIR)
743 PM_SYS_POP16(PORTCIO_FER)
744 PM_SYS_POP16(PORTCIO)
745 PM_SYS_POP16(PORTCIO_INEN)
746 PM_SYS_POP16(PORTCIO_DIR)
747#endif
748
719#ifdef EBIU_FCTL 749#ifdef EBIU_FCTL
720 PM_SYS_POP(EBIU_FCTL) 750 PM_SYS_POP(EBIU_FCTL)
721 PM_SYS_POP(EBIU_MODE) 751 PM_SYS_POP(EBIU_MODE)
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index a50637a8b9bd..b0ed0b487ff2 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -713,6 +713,8 @@ ENTRY(_system_call)
713 cc = BITTST(r7, TIF_RESTORE_SIGMASK); 713 cc = BITTST(r7, TIF_RESTORE_SIGMASK);
714 if cc jump .Lsyscall_do_signals; 714 if cc jump .Lsyscall_do_signals;
715 cc = BITTST(r7, TIF_SIGPENDING); 715 cc = BITTST(r7, TIF_SIGPENDING);
716 if cc jump .Lsyscall_do_signals;
717 cc = BITTST(r7, TIF_NOTIFY_RESUME);
716 if !cc jump .Lsyscall_really_exit; 718 if !cc jump .Lsyscall_really_exit;
717.Lsyscall_do_signals: 719.Lsyscall_do_signals:
718 /* Reenable interrupts. */ 720 /* Reenable interrupts. */
@@ -721,7 +723,7 @@ ENTRY(_system_call)
721 723
722 r0 = sp; 724 r0 = sp;
723 SP += -12; 725 SP += -12;
724 call _do_signal; 726 call _do_notify_resume;
725 SP += 12; 727 SP += 12;
726 728
727.Lsyscall_really_exit: 729.Lsyscall_really_exit:
@@ -1422,7 +1424,7 @@ ENTRY(_sys_call_table)
1422 .long _sys_ni_syscall /* streams2 */ 1424 .long _sys_ni_syscall /* streams2 */
1423 .long _sys_vfork /* 190 */ 1425 .long _sys_vfork /* 190 */
1424 .long _sys_getrlimit 1426 .long _sys_getrlimit
1425 .long _sys_mmap2 1427 .long _sys_mmap_pgoff
1426 .long _sys_truncate64 1428 .long _sys_truncate64
1427 .long _sys_ftruncate64 1429 .long _sys_ftruncate64
1428 .long _sys_stat64 /* 195 */ 1430 .long _sys_stat64 /* 195 */
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 660ea1bec54c..1873b2c1fede 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -25,11 +25,20 @@
25#include <asm/blackfin.h> 25#include <asm/blackfin.h>
26#include <asm/gpio.h> 26#include <asm/gpio.h>
27#include <asm/irq_handler.h> 27#include <asm/irq_handler.h>
28#include <asm/dpmc.h>
29#include <asm/bfin5xx_spi.h>
30#include <asm/bfin_sport.h>
28 31
29#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1)) 32#define SIC_SYSIRQ(irq) (irq - (IRQ_CORETMR + 1))
30 33
31#ifdef BF537_FAMILY 34#ifdef BF537_FAMILY
32# define BF537_GENERIC_ERROR_INT_DEMUX 35# define BF537_GENERIC_ERROR_INT_DEMUX
36# define SPI_ERR_MASK (BIT_STAT_TXCOL | BIT_STAT_RBSY | BIT_STAT_MODF | BIT_STAT_TXE) /* SPI_STAT */
37# define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF) /* SPORT_STAT */
38# define PPI_ERR_MASK (0xFFFF & ~FLD) /* PPI_STATUS */
39# define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE) /* EMAC_SYSTAT */
40# define UART_ERR_MASK (0x6) /* UART_IIR */
41# define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF) /* CAN_GIF */
33#else 42#else
34# undef BF537_GENERIC_ERROR_INT_DEMUX 43# undef BF537_GENERIC_ERROR_INT_DEMUX
35#endif 44#endif
@@ -324,11 +333,9 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
324 irq = IRQ_CAN_ERROR; 333 irq = IRQ_CAN_ERROR;
325 else if (bfin_read_SPI_STAT() & SPI_ERR_MASK) 334 else if (bfin_read_SPI_STAT() & SPI_ERR_MASK)
326 irq = IRQ_SPI_ERROR; 335 irq = IRQ_SPI_ERROR;
327 else if ((bfin_read_UART0_IIR() & UART_ERR_MASK_STAT1) && 336 else if ((bfin_read_UART0_IIR() & UART_ERR_MASK) == UART_ERR_MASK)
328 (bfin_read_UART0_IIR() & UART_ERR_MASK_STAT0))
329 irq = IRQ_UART0_ERROR; 337 irq = IRQ_UART0_ERROR;
330 else if ((bfin_read_UART1_IIR() & UART_ERR_MASK_STAT1) && 338 else if ((bfin_read_UART1_IIR() & UART_ERR_MASK) == UART_ERR_MASK)
331 (bfin_read_UART1_IIR() & UART_ERR_MASK_STAT0))
332 irq = IRQ_UART1_ERROR; 339 irq = IRQ_UART1_ERROR;
333 340
334 if (irq) { 341 if (irq) {
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index d92b168c8328..369e687582b7 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -336,13 +336,6 @@ int __cpuinit __cpu_up(unsigned int cpu)
336 336
337 ret = platform_boot_secondary(cpu, idle); 337 ret = platform_boot_secondary(cpu, idle);
338 338
339 if (ret) {
340 cpu_clear(cpu, cpu_present_map);
341 printk(KERN_CRIT "CPU%u: processor failed to boot (%d)\n", cpu, ret);
342 free_task(idle);
343 } else
344 cpu_set(cpu, cpu_online_map);
345
346 secondary_stack = NULL; 339 secondary_stack = NULL;
347 340
348 return ret; 341 return ret;
@@ -418,9 +411,16 @@ void __cpuinit secondary_start_kernel(void)
418 411
419 setup_secondary(cpu); 412 setup_secondary(cpu);
420 413
414 platform_secondary_init(cpu);
415
421 local_irq_enable(); 416 local_irq_enable();
422 417
423 platform_secondary_init(cpu); 418 /*
419 * Calibrate loops per jiffy value.
420 * IRQs need to be enabled here - D-cache can be invalidated
421 * in timer irq handler, so core B can read correct jiffies.
422 */
423 calibrate_delay();
424 424
425 cpu_idle(); 425 cpu_idle();
426} 426}
diff --git a/arch/cris/arch-v10/mm/fault.c b/arch/cris/arch-v10/mm/fault.c
index 087a2096f221..ed60588f8467 100644
--- a/arch/cris/arch-v10/mm/fault.c
+++ b/arch/cris/arch-v10/mm/fault.c
@@ -80,8 +80,7 @@ handle_mmu_bus_fault(struct pt_regs *regs)
80 * do_page_fault may have flushed the TLB so we have to restore 80 * do_page_fault may have flushed the TLB so we have to restore
81 * the MMU registers. 81 * the MMU registers.
82 */ 82 */
83 local_save_flags(flags); 83 local_irq_save(flags);
84 local_irq_disable();
85 pmd = (pmd_t *)(pgd + pgd_index(address)); 84 pmd = (pmd_t *)(pgd + pgd_index(address));
86 if (pmd_none(*pmd)) 85 if (pmd_none(*pmd))
87 goto exit; 86 goto exit;
diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c
index 4a496e4ffacc..21d78c599bab 100644
--- a/arch/cris/arch-v10/mm/tlb.c
+++ b/arch/cris/arch-v10/mm/tlb.c
@@ -134,28 +134,6 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
134 local_irq_restore(flags); 134 local_irq_restore(flags);
135} 135}
136 136
137/* dump the entire TLB for debug purposes */
138
139#if 0
140void
141dump_tlb_all(void)
142{
143 int i;
144 unsigned long flags;
145
146 printk("TLB dump. LO is: pfn | reserved | global | valid | kernel | we |\n");
147
148 local_save_flags(flags);
149 local_irq_disable();
150 for(i = 0; i < NUM_TLB_ENTRIES; i++) {
151 *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) );
152 printk("Entry %d: HI 0x%08lx, LO 0x%08lx\n",
153 i, *R_TLB_HI, *R_TLB_LO);
154 }
155 local_irq_restore(flags);
156}
157#endif
158
159/* 137/*
160 * Initialize the context related info for a new mm_struct 138 * Initialize the context related info for a new mm_struct
161 * instance. 139 * instance.
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index 3db478eb5155..76266f80a5f1 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -10,7 +10,6 @@
10 * The macros found in mmu_defs_asm.h uses the ## concatenation operator, so 10 * The macros found in mmu_defs_asm.h uses the ## concatenation operator, so
11 * -traditional must not be used when assembling this file. 11 * -traditional must not be used when assembling this file.
12 */ 12 */
13#include <linux/autoconf.h>
14#include <arch/memmap.h> 13#include <arch/memmap.h>
15#include <hwregs/reg_rdwr.h> 14#include <hwregs/reg_rdwr.h>
16#include <hwregs/intr_vect.h> 15#include <hwregs/intr_vect.h>
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h
index 367a53ea10c5..f171a6600fbc 100644
--- a/arch/cris/include/arch-v32/arch/spinlock.h
+++ b/arch/cris/include/arch-v32/arch/spinlock.h
@@ -9,12 +9,12 @@ extern void cris_spin_unlock(void *l, int val);
9extern void cris_spin_lock(void *l); 9extern void cris_spin_lock(void *l);
10extern int cris_spin_trylock(void *l); 10extern int cris_spin_trylock(void *l);
11 11
12static inline int __raw_spin_is_locked(raw_spinlock_t *x) 12static inline int arch_spin_is_locked(arch_spinlock_t *x)
13{ 13{
14 return *(volatile signed char *)(&(x)->slock) <= 0; 14 return *(volatile signed char *)(&(x)->slock) <= 0;
15} 15}
16 16
17static inline void __raw_spin_unlock(raw_spinlock_t *lock) 17static inline void arch_spin_unlock(arch_spinlock_t *lock)
18{ 18{
19 __asm__ volatile ("move.d %1,%0" \ 19 __asm__ volatile ("move.d %1,%0" \
20 : "=m" (lock->slock) \ 20 : "=m" (lock->slock) \
@@ -22,26 +22,26 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
22 : "memory"); 22 : "memory");
23} 23}
24 24
25static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) 25static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
26{ 26{
27 while (__raw_spin_is_locked(lock)) 27 while (arch_spin_is_locked(lock))
28 cpu_relax(); 28 cpu_relax();
29} 29}
30 30
31static inline int __raw_spin_trylock(raw_spinlock_t *lock) 31static inline int arch_spin_trylock(arch_spinlock_t *lock)
32{ 32{
33 return cris_spin_trylock((void *)&lock->slock); 33 return cris_spin_trylock((void *)&lock->slock);
34} 34}
35 35
36static inline void __raw_spin_lock(raw_spinlock_t *lock) 36static inline void arch_spin_lock(arch_spinlock_t *lock)
37{ 37{
38 cris_spin_lock((void *)&lock->slock); 38 cris_spin_lock((void *)&lock->slock);
39} 39}
40 40
41static inline void 41static inline void
42__raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 42arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
43{ 43{
44 __raw_spin_lock(lock); 44 arch_spin_lock(lock);
45} 45}
46 46
47/* 47/*
@@ -56,76 +56,76 @@ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
56 * 56 *
57 */ 57 */
58 58
59static inline int __raw_read_can_lock(raw_rwlock_t *x) 59static inline int arch_read_can_lock(arch_rwlock_t *x)
60{ 60{
61 return (int)(x)->lock > 0; 61 return (int)(x)->lock > 0;
62} 62}
63 63
64static inline int __raw_write_can_lock(raw_rwlock_t *x) 64static inline int arch_write_can_lock(arch_rwlock_t *x)
65{ 65{
66 return (x)->lock == RW_LOCK_BIAS; 66 return (x)->lock == RW_LOCK_BIAS;
67} 67}
68 68
69static inline void __raw_read_lock(raw_rwlock_t *rw) 69static inline void arch_read_lock(arch_rwlock_t *rw)
70{ 70{
71 __raw_spin_lock(&rw->slock); 71 arch_spin_lock(&rw->slock);
72 while (rw->lock == 0); 72 while (rw->lock == 0);
73 rw->lock--; 73 rw->lock--;
74 __raw_spin_unlock(&rw->slock); 74 arch_spin_unlock(&rw->slock);
75} 75}
76 76
77static inline void __raw_write_lock(raw_rwlock_t *rw) 77static inline void arch_write_lock(arch_rwlock_t *rw)
78{ 78{
79 __raw_spin_lock(&rw->slock); 79 arch_spin_lock(&rw->slock);
80 while (rw->lock != RW_LOCK_BIAS); 80 while (rw->lock != RW_LOCK_BIAS);
81 rw->lock = 0; 81 rw->lock = 0;
82 __raw_spin_unlock(&rw->slock); 82 arch_spin_unlock(&rw->slock);
83} 83}
84 84
85static inline void __raw_read_unlock(raw_rwlock_t *rw) 85static inline void arch_read_unlock(arch_rwlock_t *rw)
86{ 86{
87 __raw_spin_lock(&rw->slock); 87 arch_spin_lock(&rw->slock);
88 rw->lock++; 88 rw->lock++;
89 __raw_spin_unlock(&rw->slock); 89 arch_spin_unlock(&rw->slock);
90} 90}
91 91
92static inline void __raw_write_unlock(raw_rwlock_t *rw) 92static inline void arch_write_unlock(arch_rwlock_t *rw)
93{ 93{
94 __raw_spin_lock(&rw->slock); 94 arch_spin_lock(&rw->slock);
95 while (rw->lock != RW_LOCK_BIAS); 95 while (rw->lock != RW_LOCK_BIAS);
96 rw->lock = RW_LOCK_BIAS; 96 rw->lock = RW_LOCK_BIAS;
97 __raw_spin_unlock(&rw->slock); 97 arch_spin_unlock(&rw->slock);
98} 98}
99 99
100static inline int __raw_read_trylock(raw_rwlock_t *rw) 100static inline int arch_read_trylock(arch_rwlock_t *rw)
101{ 101{
102 int ret = 0; 102 int ret = 0;
103 __raw_spin_lock(&rw->slock); 103 arch_spin_lock(&rw->slock);
104 if (rw->lock != 0) { 104 if (rw->lock != 0) {
105 rw->lock--; 105 rw->lock--;
106 ret = 1; 106 ret = 1;
107 } 107 }
108 __raw_spin_unlock(&rw->slock); 108 arch_spin_unlock(&rw->slock);
109 return ret; 109 return ret;
110} 110}
111 111
112static inline int __raw_write_trylock(raw_rwlock_t *rw) 112static inline int arch_write_trylock(arch_rwlock_t *rw)
113{ 113{
114 int ret = 0; 114 int ret = 0;
115 __raw_spin_lock(&rw->slock); 115 arch_spin_lock(&rw->slock);
116 if (rw->lock == RW_LOCK_BIAS) { 116 if (rw->lock == RW_LOCK_BIAS) {
117 rw->lock = 0; 117 rw->lock = 0;
118 ret = 1; 118 ret = 1;
119 } 119 }
120 __raw_spin_unlock(&rw->slock); 120 arch_spin_unlock(&rw->slock);
121 return 1; 121 return 1;
122} 122}
123 123
124#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) 124#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)
125#define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock) 125#define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock)
126 126
127#define _raw_spin_relax(lock) cpu_relax() 127#define arch_spin_relax(lock) cpu_relax()
128#define _raw_read_relax(lock) cpu_relax() 128#define arch_read_relax(lock) cpu_relax()
129#define _raw_write_relax(lock) cpu_relax() 129#define arch_write_relax(lock) cpu_relax()
130 130
131#endif /* __ASM_ARCH_SPINLOCK_H */ 131#endif /* __ASM_ARCH_SPINLOCK_H */
diff --git a/arch/cris/include/asm/asm-offsets.h b/arch/cris/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/cris/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h
index 0f51b10b9f4f..8a3d8e2b33c1 100644
--- a/arch/cris/include/asm/elf.h
+++ b/arch/cris/include/asm/elf.h
@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t;
64#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 64#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
65/* End of excerpt from {binutils}/include/elf/cris.h. */ 65/* End of excerpt from {binutils}/include/elf/cris.h. */
66 66
67#define USE_ELF_CORE_DUMP
68
69#define ELF_EXEC_PAGESIZE 8192 67#define ELF_EXEC_PAGESIZE 8192
70 68
71/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 69/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/cris/kernel/asm-offsets.c b/arch/cris/kernel/asm-offsets.c
index ddd6fbbe75de..dd7b8e983221 100644
--- a/arch/cris/kernel/asm-offsets.c
+++ b/arch/cris/kernel/asm-offsets.c
@@ -1,6 +1,5 @@
1#include <linux/sched.h> 1#include <linux/sched.h>
2#include <asm/thread_info.h> 2#include <asm/thread_info.h>
3#include <linux/autoconf.h>
4 3
5/* 4/*
6 * Generate definitions needed by assembly language modules. 5 * Generate definitions needed by assembly language modules.
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 0ca7d9892cc6..b5ce0724a88f 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -52,7 +52,7 @@ int show_interrupts(struct seq_file *p, void *v)
52 } 52 }
53 53
54 if (i < NR_IRQS) { 54 if (i < NR_IRQS) {
55 spin_lock_irqsave(&irq_desc[i].lock, flags); 55 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
56 action = irq_desc[i].action; 56 action = irq_desc[i].action;
57 if (!action) 57 if (!action)
58 goto skip; 58 goto skip;
@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v)
71 71
72 seq_putc(p, '\n'); 72 seq_putc(p, '\n');
73skip: 73skip:
74 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 74 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
75 } 75 }
76 return 0; 76 return 0;
77} 77}
diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c
index 2ad962c7e88e..c2bbb1ac98a9 100644
--- a/arch/cris/kernel/sys_cris.c
+++ b/arch/cris/kernel/sys_cris.c
@@ -26,31 +26,6 @@
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <asm/segment.h> 27#include <asm/segment.h>
28 28
29/* common code for old and new mmaps */
30static inline long
31do_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
32 unsigned long flags, unsigned long fd, unsigned long pgoff)
33{
34 int error = -EBADF;
35 struct file * file = NULL;
36
37 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
38 if (!(flags & MAP_ANONYMOUS)) {
39 file = fget(fd);
40 if (!file)
41 goto out;
42 }
43
44 down_write(&current->mm->mmap_sem);
45 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
46 up_write(&current->mm->mmap_sem);
47
48 if (file)
49 fput(file);
50out:
51 return error;
52}
53
54asmlinkage unsigned long old_mmap(unsigned long __user *args) 29asmlinkage unsigned long old_mmap(unsigned long __user *args)
55{ 30{
56 unsigned long buffer[6]; 31 unsigned long buffer[6];
@@ -63,7 +38,7 @@ asmlinkage unsigned long old_mmap(unsigned long __user *args)
63 if (buffer[5] & ~PAGE_MASK) /* verify that offset is on page boundary */ 38 if (buffer[5] & ~PAGE_MASK) /* verify that offset is on page boundary */
64 goto out; 39 goto out;
65 40
66 err = do_mmap2(buffer[0], buffer[1], buffer[2], buffer[3], 41 err = sys_mmap_pgoff(buffer[0], buffer[1], buffer[2], buffer[3],
67 buffer[4], buffer[5] >> PAGE_SHIFT); 42 buffer[4], buffer[5] >> PAGE_SHIFT);
68out: 43out:
69 return err; 44 return err;
@@ -73,7 +48,8 @@ asmlinkage long
73sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 48sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
74 unsigned long flags, unsigned long fd, unsigned long pgoff) 49 unsigned long flags, unsigned long fd, unsigned long pgoff)
75{ 50{
76 return do_mmap2(addr, len, prot, flags, fd, pgoff); 51 /* bug(?): 8Kb pages here */
52 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
77} 53}
78 54
79/* 55/*
diff --git a/arch/cris/kernel/vmlinux.lds.S b/arch/cris/kernel/vmlinux.lds.S
index bbfda67d2907..d49d17d2a14f 100644
--- a/arch/cris/kernel/vmlinux.lds.S
+++ b/arch/cris/kernel/vmlinux.lds.S
@@ -8,7 +8,6 @@
8 * the kernel has booted. 8 * the kernel has booted.
9 */ 9 */
10 10
11#include <linux/autoconf.h>
12#include <asm-generic/vmlinux.lds.h> 11#include <asm-generic/vmlinux.lds.h>
13#include <asm/page.h> 12#include <asm/page.h>
14 13
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c
index 4a7cdd9ea1ee..380df1a73a6e 100644
--- a/arch/cris/mm/fault.c
+++ b/arch/cris/mm/fault.c
@@ -209,7 +209,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs,
209 /* Are we prepared to handle this kernel fault? 209 /* Are we prepared to handle this kernel fault?
210 * 210 *
211 * (The kernel has valid exception-points in the source 211 * (The kernel has valid exception-points in the source
212 * when it acesses user-memory. When it fails in one 212 * when it accesses user-memory. When it fails in one
213 * of those points, we find it in a table and do a jump 213 * of those points, we find it in a table and do a jump
214 * to some fixup code that loads an appropriate error 214 * to some fixup code that loads an appropriate error
215 * code) 215 * code)
diff --git a/arch/frv/include/asm/asm-offsets.h b/arch/frv/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/frv/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/frv/include/asm/elf.h b/arch/frv/include/asm/elf.h
index 7bbf6e47f8c8..c3819804a74b 100644
--- a/arch/frv/include/asm/elf.h
+++ b/arch/frv/include/asm/elf.h
@@ -115,7 +115,6 @@ do { \
115 __kernel_frame0_ptr->gr29 = 0; \ 115 __kernel_frame0_ptr->gr29 = 0; \
116} while(0) 116} while(0)
117 117
118#define USE_ELF_CORE_DUMP
119#define CORE_DUMP_USE_REGSET 118#define CORE_DUMP_USE_REGSET
120#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC 119#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
121#define ELF_EXEC_PAGESIZE 16384 120#define ELF_EXEC_PAGESIZE 16384
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
index af3e824b91b3..62d1aba615dc 100644
--- a/arch/frv/kernel/irq.c
+++ b/arch/frv/kernel/irq.c
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
69 } 69 }
70 70
71 if (i < NR_IRQS) { 71 if (i < NR_IRQS) {
72 spin_lock_irqsave(&irq_desc[i].lock, flags); 72 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
73 action = irq_desc[i].action; 73 action = irq_desc[i].action;
74 if (action) { 74 if (action) {
75 seq_printf(p, "%3d: ", i); 75 seq_printf(p, "%3d: ", i);
@@ -85,7 +85,7 @@ int show_interrupts(struct seq_file *p, void *v)
85 seq_putc(p, '\n'); 85 seq_putc(p, '\n');
86 } 86 }
87 87
88 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 88 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
89 } else if (i == NR_IRQS) { 89 } else if (i == NR_IRQS) {
90 seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); 90 seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
91 } 91 }
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 904255938216..21d0fd19276d 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -255,15 +255,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __
255 int error; 255 int error;
256 char * filename; 256 char * filename;
257 257
258 lock_kernel();
259 filename = getname(name); 258 filename = getname(name);
260 error = PTR_ERR(filename); 259 error = PTR_ERR(filename);
261 if (IS_ERR(filename)) 260 if (IS_ERR(filename))
262 goto out; 261 return error;
263 error = do_execve(filename, argv, envp, __frame); 262 error = do_execve(filename, argv, envp, __frame);
264 putname(filename); 263 putname(filename);
265 out:
266 unlock_kernel();
267 return error; 264 return error;
268} 265}
269 266
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 55e4fab7c0bc..75cf7f4b2fa8 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -10,7 +10,7 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/utsrelease.h> 13#include <generated/utsrelease.h>
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c
index 2b6b5289cdcc..1d3d4c9e2521 100644
--- a/arch/frv/kernel/sys_frv.c
+++ b/arch/frv/kernel/sys_frv.c
@@ -31,9 +31,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
31 unsigned long prot, unsigned long flags, 31 unsigned long prot, unsigned long flags,
32 unsigned long fd, unsigned long pgoff) 32 unsigned long fd, unsigned long pgoff)
33{ 33{
34 int error = -EBADF;
35 struct file * file = NULL;
36
37 /* As with sparc32, make sure the shift for mmap2 is constant 34 /* As with sparc32, make sure the shift for mmap2 is constant
38 (12), no matter what PAGE_SIZE we have.... */ 35 (12), no matter what PAGE_SIZE we have.... */
39 36
@@ -41,69 +38,10 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
41 trying to map something we can't */ 38 trying to map something we can't */
42 if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1)) 39 if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1))
43 return -EINVAL; 40 return -EINVAL;
44 pgoff >>= PAGE_SHIFT - 12;
45
46 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
47 if (!(flags & MAP_ANONYMOUS)) {
48 file = fget(fd);
49 if (!file)
50 goto out;
51 }
52
53 down_write(&current->mm->mmap_sem);
54 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
55 up_write(&current->mm->mmap_sem);
56
57 if (file)
58 fput(file);
59out:
60 return error;
61}
62
63#if 0 /* DAVIDM - do we want this */
64struct mmap_arg_struct64 {
65 __u32 addr;
66 __u32 len;
67 __u32 prot;
68 __u32 flags;
69 __u64 offset; /* 64 bits */
70 __u32 fd;
71};
72
73asmlinkage long sys_mmap64(struct mmap_arg_struct64 *arg)
74{
75 int error = -EFAULT;
76 struct file * file = NULL;
77 struct mmap_arg_struct64 a;
78 unsigned long pgoff;
79
80 if (copy_from_user(&a, arg, sizeof(a)))
81 return -EFAULT;
82
83 if ((long)a.offset & ~PAGE_MASK)
84 return -EINVAL;
85
86 pgoff = a.offset >> PAGE_SHIFT;
87 if ((a.offset >> PAGE_SHIFT) != pgoff)
88 return -EINVAL;
89
90 if (!(a.flags & MAP_ANONYMOUS)) {
91 error = -EBADF;
92 file = fget(a.fd);
93 if (!file)
94 goto out;
95 }
96 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
97 41
98 down_write(&current->mm->mmap_sem); 42 return sys_mmap_pgoff(addr, len, prot, flags, fd,
99 error = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, pgoff); 43 pgoff >> (PAGE_SHIFT - 12));
100 up_write(&current->mm->mmap_sem);
101 if (file)
102 fput(file);
103out:
104 return error;
105} 44}
106#endif
107 45
108/* 46/*
109 * sys_ipc() is the de-multiplexer for the SysV IPC calls.. 47 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 9420648352b8..53cc669e6d59 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -10,6 +10,10 @@ config H8300
10 default y 10 default y
11 select HAVE_IDE 11 select HAVE_IDE
12 12
13config SYMBOL_PREFIX
14 string
15 default "_"
16
13config MMU 17config MMU
14 bool 18 bool
15 default n 19 default n
diff --git a/arch/h8300/include/asm/asm-offsets.h b/arch/h8300/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/h8300/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h
index 94e2284c8816..c24fa250d653 100644
--- a/arch/h8300/include/asm/elf.h
+++ b/arch/h8300/include/asm/elf.h
@@ -34,7 +34,6 @@ typedef unsigned long elf_fpregset_t;
34 34
35#define ELF_PLAT_INIT(_r) _r->er1 = 0 35#define ELF_PLAT_INIT(_r) _r->er1 = 0
36 36
37#define USE_ELF_CORE_DUMP
38#define ELF_EXEC_PAGESIZE 4096 37#define ELF_EXEC_PAGESIZE 4096
39 38
40/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 39/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/h8300/include/asm/module.h b/arch/h8300/include/asm/module.h
index de23231f3196..8e46724b7c09 100644
--- a/arch/h8300/include/asm/module.h
+++ b/arch/h8300/include/asm/module.h
@@ -8,6 +8,4 @@ struct mod_arch_specific { };
8#define Elf_Sym Elf32_Sym 8#define Elf_Sym Elf32_Sym
9#define Elf_Ehdr Elf32_Ehdr 9#define Elf_Ehdr Elf32_Ehdr
10 10
11#define MODULE_SYMBOL_PREFIX "_"
12
13#endif /* _ASM_H8/300_MODULE_H */ 11#endif /* _ASM_H8/300_MODULE_H */
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index 5c913d472119..c25dc2c2b1da 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -186,7 +186,7 @@ int show_interrupts(struct seq_file *p, void *v)
186 seq_puts(p, " CPU0"); 186 seq_puts(p, " CPU0");
187 187
188 if (i < NR_IRQS) { 188 if (i < NR_IRQS) {
189 spin_lock_irqsave(&irq_desc[i].lock, flags); 189 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
190 action = irq_desc[i].action; 190 action = irq_desc[i].action;
191 if (!action) 191 if (!action)
192 goto unlock; 192 goto unlock;
@@ -200,7 +200,7 @@ int show_interrupts(struct seq_file *p, void *v)
200 seq_printf(p, ", %s", action->name); 200 seq_printf(p, ", %s", action->name);
201 seq_putc(p, '\n'); 201 seq_putc(p, '\n');
202unlock: 202unlock:
203 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 203 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
204 } 204 }
205 return 0; 205 return 0;
206} 206}
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index e2f33d0f9969..bd883faa983d 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -218,15 +218,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...)
218 char * filename; 218 char * filename;
219 struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); 219 struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4);
220 220
221 lock_kernel();
222 filename = getname(name); 221 filename = getname(name);
223 error = PTR_ERR(filename); 222 error = PTR_ERR(filename);
224 if (IS_ERR(filename)) 223 if (IS_ERR(filename))
225 goto out; 224 return error;
226 error = do_execve(filename, argv, envp, regs); 225 error = do_execve(filename, argv, envp, regs);
227 putname(filename); 226 putname(filename);
228out:
229 unlock_kernel();
230 return error; 227 return error;
231} 228}
232 229
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c
index 8cb5d73a0e35..b5969db0ca10 100644
--- a/arch/h8300/kernel/sys_h8300.c
+++ b/arch/h8300/kernel/sys_h8300.c
@@ -26,39 +26,6 @@
26#include <asm/traps.h> 26#include <asm/traps.h>
27#include <asm/unistd.h> 27#include <asm/unistd.h>
28 28
29/* common code for old and new mmaps */
30static inline long do_mmap2(
31 unsigned long addr, unsigned long len,
32 unsigned long prot, unsigned long flags,
33 unsigned long fd, unsigned long pgoff)
34{
35 int error = -EBADF;
36 struct file * file = NULL;
37
38 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
39 if (!(flags & MAP_ANONYMOUS)) {
40 file = fget(fd);
41 if (!file)
42 goto out;
43 }
44
45 down_write(&current->mm->mmap_sem);
46 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
47 up_write(&current->mm->mmap_sem);
48
49 if (file)
50 fput(file);
51out:
52 return error;
53}
54
55asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
56 unsigned long prot, unsigned long flags,
57 unsigned long fd, unsigned long pgoff)
58{
59 return do_mmap2(addr, len, prot, flags, fd, pgoff);
60}
61
62/* 29/*
63 * Perform the select(nd, in, out, ex, tv) and mmap() system 30 * Perform the select(nd, in, out, ex, tv) and mmap() system
64 * calls. Linux/m68k cloned Linux/i386, which didn't use to be able to 31 * calls. Linux/m68k cloned Linux/i386, which didn't use to be able to
@@ -87,57 +54,11 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
87 if (a.offset & ~PAGE_MASK) 54 if (a.offset & ~PAGE_MASK)
88 goto out; 55 goto out;
89 56
90 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 57 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
91 58 a.offset >> PAGE_SHIFT);
92 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
93out:
94 return error;
95}
96
97#if 0 /* DAVIDM - do we want this */
98struct mmap_arg_struct64 {
99 __u32 addr;
100 __u32 len;
101 __u32 prot;
102 __u32 flags;
103 __u64 offset; /* 64 bits */
104 __u32 fd;
105};
106
107asmlinkage long sys_mmap64(struct mmap_arg_struct64 *arg)
108{
109 int error = -EFAULT;
110 struct file * file = NULL;
111 struct mmap_arg_struct64 a;
112 unsigned long pgoff;
113
114 if (copy_from_user(&a, arg, sizeof(a)))
115 return -EFAULT;
116
117 if ((long)a.offset & ~PAGE_MASK)
118 return -EINVAL;
119
120 pgoff = a.offset >> PAGE_SHIFT;
121 if ((a.offset >> PAGE_SHIFT) != pgoff)
122 return -EINVAL;
123
124 if (!(a.flags & MAP_ANONYMOUS)) {
125 error = -EBADF;
126 file = fget(a.fd);
127 if (!file)
128 goto out;
129 }
130 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
131
132 down_write(&current->mm->mmap_sem);
133 error = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, pgoff);
134 up_write(&current->mm->mmap_sem);
135 if (file)
136 fput(file);
137out: 59out:
138 return error; 60 return error;
139} 61}
140#endif
141 62
142struct sel_arg_struct { 63struct sel_arg_struct {
143 unsigned long n; 64 unsigned long n;
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S
index 4eb67faac633..2d69881eda6a 100644
--- a/arch/h8300/kernel/syscalls.S
+++ b/arch/h8300/kernel/syscalls.S
@@ -206,7 +206,7 @@ SYMBOL_NAME_LABEL(sys_call_table)
206 .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */ 206 .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
207 .long SYMBOL_NAME(sys_vfork) /* 190 */ 207 .long SYMBOL_NAME(sys_vfork) /* 190 */
208 .long SYMBOL_NAME(sys_getrlimit) 208 .long SYMBOL_NAME(sys_getrlimit)
209 .long SYMBOL_NAME(sys_mmap2) 209 .long SYMBOL_NAME(sys_mmap_pgoff)
210 .long SYMBOL_NAME(sys_truncate64) 210 .long SYMBOL_NAME(sys_truncate64)
211 .long SYMBOL_NAME(sys_ftruncate64) 211 .long SYMBOL_NAME(sys_ftruncate64)
212 .long SYMBOL_NAME(sys_stat64) /* 195 */ 212 .long SYMBOL_NAME(sys_stat64) /* 195 */
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index b9e24907e6ea..03d356d96e5d 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#define VMLINUX_SYMBOL(_sym_) _##_sym_
2#include <asm-generic/vmlinux.lds.h> 1#include <asm-generic/vmlinux.lds.h>
3#include <asm/page.h> 2#include <asm/page.h>
4 3
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 1ee596cd942f..2d7f56a98e0f 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -87,9 +87,6 @@ config GENERIC_TIME_VSYSCALL
87 bool 87 bool
88 default y 88 default y
89 89
90config HAVE_LEGACY_PER_CPU_AREA
91 def_bool y
92
93config HAVE_SETUP_PER_CPU_AREA 90config HAVE_SETUP_PER_CPU_AREA
94 def_bool y 91 def_bool y
95 92
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index e7cbaa02cd0b..475e2725fbde 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -103,4 +103,4 @@ archprepare: make_nr_irqs_h FORCE
103PHONY += make_nr_irqs_h FORCE 103PHONY += make_nr_irqs_h FORCE
104 104
105make_nr_irqs_h: FORCE 105make_nr_irqs_h: FORCE
106 $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h 106 $(Q)$(MAKE) $(build)=arch/ia64/kernel include/generated/nr-irqs.h
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 674a8374c6d9..e14c492a8a93 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -677,12 +677,19 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
677 spin_unlock_irqrestore(&ioc->saved_lock, flags); 677 spin_unlock_irqrestore(&ioc->saved_lock, flags);
678 678
679 pide = sba_search_bitmap(ioc, dev, pages_needed, 0); 679 pide = sba_search_bitmap(ioc, dev, pages_needed, 0);
680 if (unlikely(pide >= (ioc->res_size << 3))) 680 if (unlikely(pide >= (ioc->res_size << 3))) {
681 panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", 681 printk(KERN_WARNING "%s: I/O MMU @ %p is"
682 ioc->ioc_hpa); 682 "out of mapping resources, %u %u %lx\n",
683 __func__, ioc->ioc_hpa, ioc->res_size,
684 pages_needed, dma_get_seg_boundary(dev));
685 return -1;
686 }
683#else 687#else
684 panic(__FILE__ ": I/O MMU @ %p is out of mapping resources\n", 688 printk(KERN_WARNING "%s: I/O MMU @ %p is"
685 ioc->ioc_hpa); 689 "out of mapping resources, %u %u %lx\n",
690 __func__, ioc->ioc_hpa, ioc->res_size,
691 pages_needed, dma_get_seg_boundary(dev));
692 return -1;
686#endif 693#endif
687 } 694 }
688 } 695 }
@@ -965,6 +972,8 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page,
965#endif 972#endif
966 973
967 pide = sba_alloc_range(ioc, dev, size); 974 pide = sba_alloc_range(ioc, dev, size);
975 if (pide < 0)
976 return 0;
968 977
969 iovp = (dma_addr_t) pide << iovp_shift; 978 iovp = (dma_addr_t) pide << iovp_shift;
970 979
@@ -1320,6 +1329,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
1320 unsigned long dma_offset, dma_len; /* start/len of DMA stream */ 1329 unsigned long dma_offset, dma_len; /* start/len of DMA stream */
1321 int n_mappings = 0; 1330 int n_mappings = 0;
1322 unsigned int max_seg_size = dma_get_max_seg_size(dev); 1331 unsigned int max_seg_size = dma_get_max_seg_size(dev);
1332 int idx;
1323 1333
1324 while (nents > 0) { 1334 while (nents > 0) {
1325 unsigned long vaddr = (unsigned long) sba_sg_address(startsg); 1335 unsigned long vaddr = (unsigned long) sba_sg_address(startsg);
@@ -1381,7 +1391,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
1381#endif 1391#endif
1382 1392
1383 /* 1393 /*
1384 ** Not virtually contigous. 1394 ** Not virtually contiguous.
1385 ** Terminate prev chunk. 1395 ** Terminate prev chunk.
1386 ** Start a new chunk. 1396 ** Start a new chunk.
1387 ** 1397 **
@@ -1418,16 +1428,22 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
1418 vcontig_sg->dma_length = vcontig_len; 1428 vcontig_sg->dma_length = vcontig_len;
1419 dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask; 1429 dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask;
1420 ASSERT(dma_len <= DMA_CHUNK_SIZE); 1430 ASSERT(dma_len <= DMA_CHUNK_SIZE);
1421 dma_sg->dma_address = (dma_addr_t) (PIDE_FLAG 1431 idx = sba_alloc_range(ioc, dev, dma_len);
1422 | (sba_alloc_range(ioc, dev, dma_len) << iovp_shift) 1432 if (idx < 0) {
1423 | dma_offset); 1433 dma_sg->dma_length = 0;
1434 return -1;
1435 }
1436 dma_sg->dma_address = (dma_addr_t)(PIDE_FLAG | (idx << iovp_shift)
1437 | dma_offset);
1424 n_mappings++; 1438 n_mappings++;
1425 } 1439 }
1426 1440
1427 return n_mappings; 1441 return n_mappings;
1428} 1442}
1429 1443
1430 1444static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
1445 int nents, enum dma_data_direction dir,
1446 struct dma_attrs *attrs);
1431/** 1447/**
1432 * sba_map_sg - map Scatter/Gather list 1448 * sba_map_sg - map Scatter/Gather list
1433 * @dev: instance of PCI owned by the driver that's asking. 1449 * @dev: instance of PCI owned by the driver that's asking.
@@ -1493,6 +1509,10 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
1493 ** Access to the virtual address is what forces a two pass algorithm. 1509 ** Access to the virtual address is what forces a two pass algorithm.
1494 */ 1510 */
1495 coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents); 1511 coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents);
1512 if (coalesced < 0) {
1513 sba_unmap_sg_attrs(dev, sglist, nents, dir, attrs);
1514 return 0;
1515 }
1496 1516
1497 /* 1517 /*
1498 ** Program the I/O Pdir 1518 ** Program the I/O Pdir
diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h
index 9a3abf58cea3..657725742617 100644
--- a/arch/ia64/ia32/elfcore32.h
+++ b/arch/ia64/ia32/elfcore32.h
@@ -11,8 +11,6 @@
11#include <asm/intrinsics.h> 11#include <asm/intrinsics.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13 13
14#define USE_ELF_CORE_DUMP 1
15
16/* Override elfcore.h */ 14/* Override elfcore.h */
17#define _LINUX_ELFCORE_H 1 15#define _LINUX_ELFCORE_H 1
18typedef unsigned int elf_greg_t; 16typedef unsigned int elf_greg_t;
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index 10c37510f4b4..2fd7479aa216 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -79,7 +79,7 @@ GLOBAL_ENTRY(ia32_ret_from_clone)
79(p6) br.cond.spnt .ia32_strace_check_retval 79(p6) br.cond.spnt .ia32_strace_check_retval
80 ;; // prevent RAW on r8 80 ;; // prevent RAW on r8
81END(ia32_ret_from_clone) 81END(ia32_ret_from_clone)
82 // fall thrugh 82 // fall through
83GLOBAL_ENTRY(ia32_ret_from_syscall) 83GLOBAL_ENTRY(ia32_ret_from_syscall)
84 PT_REGS_UNWIND_INFO(0) 84 PT_REGS_UNWIND_INFO(0)
85 85
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 429ec968c9ee..045b746b9808 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -858,6 +858,9 @@ ia32_do_mmap (struct file *file, unsigned long addr, unsigned long len, int prot
858 858
859 prot = get_prot32(prot); 859 prot = get_prot32(prot);
860 860
861 if (flags & MAP_HUGETLB)
862 return -ENOMEM;
863
861#if PAGE_SHIFT > IA32_PAGE_SHIFT 864#if PAGE_SHIFT > IA32_PAGE_SHIFT
862 mutex_lock(&ia32_mmap_mutex); 865 mutex_lock(&ia32_mmap_mutex);
863 { 866 {
diff --git a/arch/ia64/include/asm/asm-offsets.h b/arch/ia64/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/ia64/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index 57a2787bc9fb..6ebc229a1c51 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -127,7 +127,7 @@ clear_bit_unlock (int nr, volatile void *addr)
127 * @addr: Address to start counting from 127 * @addr: Address to start counting from
128 * 128 *
129 * Similarly to clear_bit_unlock, the implementation uses a store 129 * Similarly to clear_bit_unlock, the implementation uses a store
130 * with release semantics. See also __raw_spin_unlock(). 130 * with release semantics. See also arch_spin_unlock().
131 */ 131 */
132static __inline__ void 132static __inline__ void
133__clear_bit_unlock(int nr, void *addr) 133__clear_bit_unlock(int nr, void *addr)
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 8d3c79cd81e7..7d09a09cdaad 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -73,7 +73,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
73 if (!dev->dma_mask) 73 if (!dev->dma_mask)
74 return 0; 74 return 0;
75 75
76 return addr + size <= *dev->dma_mask; 76 return addr + size - 1 <= *dev->dma_mask;
77} 77}
78 78
79static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 79static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
index 86eddee029cb..e14108b19c09 100644
--- a/arch/ia64/include/asm/elf.h
+++ b/arch/ia64/include/asm/elf.h
@@ -25,7 +25,6 @@
25#define ELF_DATA ELFDATA2LSB 25#define ELF_DATA ELFDATA2LSB
26#define ELF_ARCH EM_IA_64 26#define ELF_ARCH EM_IA_64
27 27
28#define USE_ELF_CORE_DUMP
29#define CORE_DUMP_USE_REGSET 28#define CORE_DUMP_USE_REGSET
30 29
31/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are 30/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are
diff --git a/arch/ia64/include/asm/hw_irq.h b/arch/ia64/include/asm/hw_irq.h
index 91619b31dbf5..bf2e37493e04 100644
--- a/arch/ia64/include/asm/hw_irq.h
+++ b/arch/ia64/include/asm/hw_irq.h
@@ -59,7 +59,13 @@ typedef u16 ia64_vector;
59extern int ia64_first_device_vector; 59extern int ia64_first_device_vector;
60extern int ia64_last_device_vector; 60extern int ia64_last_device_vector;
61 61
62#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG))
63/* Reserve the lower priority vector than device vectors for "move IRQ" IPI */
64#define IA64_IRQ_MOVE_VECTOR 0x30 /* "move IRQ" IPI */
65#define IA64_DEF_FIRST_DEVICE_VECTOR 0x31
66#else
62#define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 67#define IA64_DEF_FIRST_DEVICE_VECTOR 0x30
68#endif
63#define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 69#define IA64_DEF_LAST_DEVICE_VECTOR 0xe7
64#define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector 70#define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector
65#define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector 71#define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 0d9d16e2d949..cc8335eb3110 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -424,6 +424,8 @@ __writeq (unsigned long val, volatile void __iomem *addr)
424extern void __iomem * ioremap(unsigned long offset, unsigned long size); 424extern void __iomem * ioremap(unsigned long offset, unsigned long size);
425extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); 425extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
426extern void iounmap (volatile void __iomem *addr); 426extern void iounmap (volatile void __iomem *addr);
427extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size);
428extern void early_iounmap (volatile void __iomem *addr, unsigned long size);
427 429
428/* 430/*
429 * String version of IO memory access ops: 431 * String version of IO memory access ops:
diff --git a/arch/ia64/include/asm/irq.h b/arch/ia64/include/asm/irq.h
index 5282546cdf82..91b920fd7d53 100644
--- a/arch/ia64/include/asm/irq.h
+++ b/arch/ia64/include/asm/irq.h
@@ -13,7 +13,7 @@
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/cpumask.h> 15#include <linux/cpumask.h>
16#include <asm-ia64/nr-irqs.h> 16#include <generated/nr-irqs.h>
17 17
18static __inline__ int 18static __inline__ int
19irq_canonicalize (int irq) 19irq_canonicalize (int irq)
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h
index c171cdf0a789..43f96ab18fa0 100644
--- a/arch/ia64/include/asm/mca.h
+++ b/arch/ia64/include/asm/mca.h
@@ -106,6 +106,11 @@ struct ia64_sal_os_state {
106 unsigned long os_status; /* OS status to SAL, enum below */ 106 unsigned long os_status; /* OS status to SAL, enum below */
107 unsigned long context; /* 0 if return to same context 107 unsigned long context; /* 0 if return to same context
108 1 if return to new context */ 108 1 if return to new context */
109
110 /* I-resources */
111 unsigned long iip;
112 unsigned long ipsr;
113 unsigned long ifs;
109}; 114};
110 115
111enum { 116enum {
diff --git a/arch/ia64/include/asm/meminit.h b/arch/ia64/include/asm/meminit.h
index 688a812c017d..61c7b1750b16 100644
--- a/arch/ia64/include/asm/meminit.h
+++ b/arch/ia64/include/asm/meminit.h
@@ -61,7 +61,7 @@ extern int register_active_ranges(u64 start, u64 len, int nid);
61 61
62#ifdef CONFIG_VIRTUAL_MEM_MAP 62#ifdef CONFIG_VIRTUAL_MEM_MAP
63# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */ 63# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
64 extern unsigned long vmalloc_end; 64 extern unsigned long VMALLOC_END;
65 extern struct page *vmem_map; 65 extern struct page *vmem_map;
66 extern int find_largest_hole(u64 start, u64 end, void *arg); 66 extern int find_largest_hole(u64 start, u64 end, void *arg);
67 extern int create_mem_map_page_table(u64 start, u64 end, void *arg); 67 extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
diff --git a/arch/ia64/include/asm/numa.h b/arch/ia64/include/asm/numa.h
index 3499ff57bf42..6a8a27cfae3e 100644
--- a/arch/ia64/include/asm/numa.h
+++ b/arch/ia64/include/asm/numa.h
@@ -22,8 +22,6 @@
22 22
23#include <asm/mmzone.h> 23#include <asm/mmzone.h>
24 24
25#define NUMA_NO_NODE -1
26
27extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; 25extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned;
28extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; 26extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
29extern pg_data_t *pgdat_list[MAX_NUMNODES]; 27extern pg_data_t *pgdat_list[MAX_NUMNODES];
diff --git a/arch/ia64/include/asm/perfmon_default_smpl.h b/arch/ia64/include/asm/perfmon_default_smpl.h
index 48822c0811d8..74724b24c2b7 100644
--- a/arch/ia64/include/asm/perfmon_default_smpl.h
+++ b/arch/ia64/include/asm/perfmon_default_smpl.h
@@ -67,7 +67,7 @@ typedef struct {
67 unsigned long ip; /* where did the overflow interrupt happened */ 67 unsigned long ip; /* where did the overflow interrupt happened */
68 unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ 68 unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */
69 69
70 unsigned short cpu; /* cpu on which the overfow occured */ 70 unsigned short cpu; /* cpu on which the overflow occured */
71 unsigned short set; /* event set active when overflow ocurred */ 71 unsigned short set; /* event set active when overflow ocurred */
72 int tgid; /* thread group id (for NPTL, this is getpid()) */ 72 int tgid; /* thread group id (for NPTL, this is getpid()) */
73} pfm_default_smpl_entry_t; 73} pfm_default_smpl_entry_t;
diff --git a/arch/ia64/include/asm/pgtable.h b/arch/ia64/include/asm/pgtable.h
index 8840a690d1e7..69bf13857a9f 100644
--- a/arch/ia64/include/asm/pgtable.h
+++ b/arch/ia64/include/asm/pgtable.h
@@ -228,8 +228,7 @@ ia64_phys_addr_valid (unsigned long addr)
228#define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL) 228#define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL)
229#ifdef CONFIG_VIRTUAL_MEM_MAP 229#ifdef CONFIG_VIRTUAL_MEM_MAP
230# define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9))) 230# define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
231# define VMALLOC_END vmalloc_end 231extern unsigned long VMALLOC_END;
232 extern unsigned long vmalloc_end;
233#else 232#else
234#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSEMEM_VMEMMAP) 233#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSEMEM_VMEMMAP)
235/* SPARSEMEM_VMEMMAP uses half of vmalloc... */ 234/* SPARSEMEM_VMEMMAP uses half of vmalloc... */
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h
index 3eaeedf1aef2..7fa90f73f6be 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -229,7 +229,7 @@ struct cpuinfo_ia64 {
229#endif 229#endif
230}; 230};
231 231
232DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info); 232DECLARE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
233 233
234/* 234/*
235 * The "local" data variable. It refers to the per-CPU data of the currently executing 235 * The "local" data variable. It refers to the per-CPU data of the currently executing
@@ -237,8 +237,8 @@ DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
237 * Do not use the address of local_cpu_data, since it will be different from 237 * Do not use the address of local_cpu_data, since it will be different from
238 * cpu_data(smp_processor_id())! 238 * cpu_data(smp_processor_id())!
239 */ 239 */
240#define local_cpu_data (&__ia64_per_cpu_var(cpu_info)) 240#define local_cpu_data (&__ia64_per_cpu_var(ia64_cpu_info))
241#define cpu_data(cpu) (&per_cpu(cpu_info, cpu)) 241#define cpu_data(cpu) (&per_cpu(ia64_cpu_info, cpu))
242 242
243extern void print_cpu_info (struct cpuinfo_ia64 *); 243extern void print_cpu_info (struct cpuinfo_ia64 *);
244 244
diff --git a/arch/ia64/include/asm/rwsem.h b/arch/ia64/include/asm/rwsem.h
index fbee74b15782..e8762688e8e3 100644
--- a/arch/ia64/include/asm/rwsem.h
+++ b/arch/ia64/include/asm/rwsem.h
@@ -47,7 +47,7 @@ struct rw_semaphore {
47#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) 47#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
48 48
49#define __RWSEM_INITIALIZER(name) \ 49#define __RWSEM_INITIALIZER(name) \
50 { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ 50 { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
51 LIST_HEAD_INIT((name).wait_list) } 51 LIST_HEAD_INIT((name).wait_list) }
52 52
53#define DECLARE_RWSEM(name) \ 53#define DECLARE_RWSEM(name) \
diff --git a/arch/ia64/include/asm/sn/shubio.h b/arch/ia64/include/asm/sn/shubio.h
index 22a6f18a5313..6052422a22b3 100644
--- a/arch/ia64/include/asm/sn/shubio.h
+++ b/arch/ia64/include/asm/sn/shubio.h
@@ -3289,7 +3289,7 @@ typedef ii_icrb0_e_u_t icrbe_t;
3289#define IIO_IIDSR_LVL_SHIFT 0 3289#define IIO_IIDSR_LVL_SHIFT 0
3290#define IIO_IIDSR_LVL_MASK 0x000000ff 3290#define IIO_IIDSR_LVL_MASK 0x000000ff
3291 3291
3292/* Xtalk timeout threshhold register (IIO_IXTT) */ 3292/* Xtalk timeout threshold register (IIO_IXTT) */
3293#define IXTT_RRSP_TO_SHFT 55 /* read response timeout */ 3293#define IXTT_RRSP_TO_SHFT 55 /* read response timeout */
3294#define IXTT_RRSP_TO_MASK (0x1FULL << IXTT_RRSP_TO_SHFT) 3294#define IXTT_RRSP_TO_MASK (0x1FULL << IXTT_RRSP_TO_SHFT)
3295#define IXTT_RRSP_PS_SHFT 32 /* read responsed TO prescalar */ 3295#define IXTT_RRSP_PS_SHFT 32 /* read responsed TO prescalar */
diff --git a/arch/ia64/include/asm/spinlock.h b/arch/ia64/include/asm/spinlock.h
index 239ecdc9516d..1a91c9121d17 100644
--- a/arch/ia64/include/asm/spinlock.h
+++ b/arch/ia64/include/asm/spinlock.h
@@ -17,7 +17,7 @@
17#include <asm/intrinsics.h> 17#include <asm/intrinsics.h>
18#include <asm/system.h> 18#include <asm/system.h>
19 19
20#define __raw_spin_lock_init(x) ((x)->lock = 0) 20#define arch_spin_lock_init(x) ((x)->lock = 0)
21 21
22/* 22/*
23 * Ticket locks are conceptually two parts, one indicating the current head of 23 * Ticket locks are conceptually two parts, one indicating the current head of
@@ -38,7 +38,7 @@
38#define TICKET_BITS 15 38#define TICKET_BITS 15
39#define TICKET_MASK ((1 << TICKET_BITS) - 1) 39#define TICKET_MASK ((1 << TICKET_BITS) - 1)
40 40
41static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) 41static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)
42{ 42{
43 int *p = (int *)&lock->lock, ticket, serve; 43 int *p = (int *)&lock->lock, ticket, serve;
44 44
@@ -58,7 +58,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
58 } 58 }
59} 59}
60 60
61static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) 61static __always_inline int __ticket_spin_trylock(arch_spinlock_t *lock)
62{ 62{
63 int tmp = ACCESS_ONCE(lock->lock); 63 int tmp = ACCESS_ONCE(lock->lock);
64 64
@@ -67,7 +67,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
67 return 0; 67 return 0;
68} 68}
69 69
70static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock) 70static __always_inline void __ticket_spin_unlock(arch_spinlock_t *lock)
71{ 71{
72 unsigned short *p = (unsigned short *)&lock->lock + 1, tmp; 72 unsigned short *p = (unsigned short *)&lock->lock + 1, tmp;
73 73
@@ -75,7 +75,7 @@ static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
75 ACCESS_ONCE(*p) = (tmp + 2) & ~1; 75 ACCESS_ONCE(*p) = (tmp + 2) & ~1;
76} 76}
77 77
78static __always_inline void __ticket_spin_unlock_wait(raw_spinlock_t *lock) 78static __always_inline void __ticket_spin_unlock_wait(arch_spinlock_t *lock)
79{ 79{
80 int *p = (int *)&lock->lock, ticket; 80 int *p = (int *)&lock->lock, ticket;
81 81
@@ -89,64 +89,64 @@ static __always_inline void __ticket_spin_unlock_wait(raw_spinlock_t *lock)
89 } 89 }
90} 90}
91 91
92static inline int __ticket_spin_is_locked(raw_spinlock_t *lock) 92static inline int __ticket_spin_is_locked(arch_spinlock_t *lock)
93{ 93{
94 long tmp = ACCESS_ONCE(lock->lock); 94 long tmp = ACCESS_ONCE(lock->lock);
95 95
96 return !!(((tmp >> TICKET_SHIFT) ^ tmp) & TICKET_MASK); 96 return !!(((tmp >> TICKET_SHIFT) ^ tmp) & TICKET_MASK);
97} 97}
98 98
99static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) 99static inline int __ticket_spin_is_contended(arch_spinlock_t *lock)
100{ 100{
101 long tmp = ACCESS_ONCE(lock->lock); 101 long tmp = ACCESS_ONCE(lock->lock);
102 102
103 return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1; 103 return ((tmp - (tmp >> TICKET_SHIFT)) & TICKET_MASK) > 1;
104} 104}
105 105
106static inline int __raw_spin_is_locked(raw_spinlock_t *lock) 106static inline int arch_spin_is_locked(arch_spinlock_t *lock)
107{ 107{
108 return __ticket_spin_is_locked(lock); 108 return __ticket_spin_is_locked(lock);
109} 109}
110 110
111static inline int __raw_spin_is_contended(raw_spinlock_t *lock) 111static inline int arch_spin_is_contended(arch_spinlock_t *lock)
112{ 112{
113 return __ticket_spin_is_contended(lock); 113 return __ticket_spin_is_contended(lock);
114} 114}
115#define __raw_spin_is_contended __raw_spin_is_contended 115#define arch_spin_is_contended arch_spin_is_contended
116 116
117static __always_inline void __raw_spin_lock(raw_spinlock_t *lock) 117static __always_inline void arch_spin_lock(arch_spinlock_t *lock)
118{ 118{
119 __ticket_spin_lock(lock); 119 __ticket_spin_lock(lock);
120} 120}
121 121
122static __always_inline int __raw_spin_trylock(raw_spinlock_t *lock) 122static __always_inline int arch_spin_trylock(arch_spinlock_t *lock)
123{ 123{
124 return __ticket_spin_trylock(lock); 124 return __ticket_spin_trylock(lock);
125} 125}
126 126
127static __always_inline void __raw_spin_unlock(raw_spinlock_t *lock) 127static __always_inline void arch_spin_unlock(arch_spinlock_t *lock)
128{ 128{
129 __ticket_spin_unlock(lock); 129 __ticket_spin_unlock(lock);
130} 130}
131 131
132static __always_inline void __raw_spin_lock_flags(raw_spinlock_t *lock, 132static __always_inline void arch_spin_lock_flags(arch_spinlock_t *lock,
133 unsigned long flags) 133 unsigned long flags)
134{ 134{
135 __raw_spin_lock(lock); 135 arch_spin_lock(lock);
136} 136}
137 137
138static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) 138static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
139{ 139{
140 __ticket_spin_unlock_wait(lock); 140 __ticket_spin_unlock_wait(lock);
141} 141}
142 142
143#define __raw_read_can_lock(rw) (*(volatile int *)(rw) >= 0) 143#define arch_read_can_lock(rw) (*(volatile int *)(rw) >= 0)
144#define __raw_write_can_lock(rw) (*(volatile int *)(rw) == 0) 144#define arch_write_can_lock(rw) (*(volatile int *)(rw) == 0)
145 145
146#ifdef ASM_SUPPORTED 146#ifdef ASM_SUPPORTED
147 147
148static __always_inline void 148static __always_inline void
149__raw_read_lock_flags(raw_rwlock_t *lock, unsigned long flags) 149arch_read_lock_flags(arch_rwlock_t *lock, unsigned long flags)
150{ 150{
151 __asm__ __volatile__ ( 151 __asm__ __volatile__ (
152 "tbit.nz p6, p0 = %1,%2\n" 152 "tbit.nz p6, p0 = %1,%2\n"
@@ -169,15 +169,15 @@ __raw_read_lock_flags(raw_rwlock_t *lock, unsigned long flags)
169 : "p6", "p7", "r2", "memory"); 169 : "p6", "p7", "r2", "memory");
170} 170}
171 171
172#define __raw_read_lock(lock) __raw_read_lock_flags(lock, 0) 172#define arch_read_lock(lock) arch_read_lock_flags(lock, 0)
173 173
174#else /* !ASM_SUPPORTED */ 174#else /* !ASM_SUPPORTED */
175 175
176#define __raw_read_lock_flags(rw, flags) __raw_read_lock(rw) 176#define arch_read_lock_flags(rw, flags) arch_read_lock(rw)
177 177
178#define __raw_read_lock(rw) \ 178#define arch_read_lock(rw) \
179do { \ 179do { \
180 raw_rwlock_t *__read_lock_ptr = (rw); \ 180 arch_rwlock_t *__read_lock_ptr = (rw); \
181 \ 181 \
182 while (unlikely(ia64_fetchadd(1, (int *) __read_lock_ptr, acq) < 0)) { \ 182 while (unlikely(ia64_fetchadd(1, (int *) __read_lock_ptr, acq) < 0)) { \
183 ia64_fetchadd(-1, (int *) __read_lock_ptr, rel); \ 183 ia64_fetchadd(-1, (int *) __read_lock_ptr, rel); \
@@ -188,16 +188,16 @@ do { \
188 188
189#endif /* !ASM_SUPPORTED */ 189#endif /* !ASM_SUPPORTED */
190 190
191#define __raw_read_unlock(rw) \ 191#define arch_read_unlock(rw) \
192do { \ 192do { \
193 raw_rwlock_t *__read_lock_ptr = (rw); \ 193 arch_rwlock_t *__read_lock_ptr = (rw); \
194 ia64_fetchadd(-1, (int *) __read_lock_ptr, rel); \ 194 ia64_fetchadd(-1, (int *) __read_lock_ptr, rel); \
195} while (0) 195} while (0)
196 196
197#ifdef ASM_SUPPORTED 197#ifdef ASM_SUPPORTED
198 198
199static __always_inline void 199static __always_inline void
200__raw_write_lock_flags(raw_rwlock_t *lock, unsigned long flags) 200arch_write_lock_flags(arch_rwlock_t *lock, unsigned long flags)
201{ 201{
202 __asm__ __volatile__ ( 202 __asm__ __volatile__ (
203 "tbit.nz p6, p0 = %1, %2\n" 203 "tbit.nz p6, p0 = %1, %2\n"
@@ -221,9 +221,9 @@ __raw_write_lock_flags(raw_rwlock_t *lock, unsigned long flags)
221 : "ar.ccv", "p6", "p7", "r2", "r29", "memory"); 221 : "ar.ccv", "p6", "p7", "r2", "r29", "memory");
222} 222}
223 223
224#define __raw_write_lock(rw) __raw_write_lock_flags(rw, 0) 224#define arch_write_lock(rw) arch_write_lock_flags(rw, 0)
225 225
226#define __raw_write_trylock(rw) \ 226#define arch_write_trylock(rw) \
227({ \ 227({ \
228 register long result; \ 228 register long result; \
229 \ 229 \
@@ -235,7 +235,7 @@ __raw_write_lock_flags(raw_rwlock_t *lock, unsigned long flags)
235 (result == 0); \ 235 (result == 0); \
236}) 236})
237 237
238static inline void __raw_write_unlock(raw_rwlock_t *x) 238static inline void arch_write_unlock(arch_rwlock_t *x)
239{ 239{
240 u8 *y = (u8 *)x; 240 u8 *y = (u8 *)x;
241 barrier(); 241 barrier();
@@ -244,9 +244,9 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
244 244
245#else /* !ASM_SUPPORTED */ 245#else /* !ASM_SUPPORTED */
246 246
247#define __raw_write_lock_flags(l, flags) __raw_write_lock(l) 247#define arch_write_lock_flags(l, flags) arch_write_lock(l)
248 248
249#define __raw_write_lock(l) \ 249#define arch_write_lock(l) \
250({ \ 250({ \
251 __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \ 251 __u64 ia64_val, ia64_set_val = ia64_dep_mi(-1, 0, 31, 1); \
252 __u32 *ia64_write_lock_ptr = (__u32 *) (l); \ 252 __u32 *ia64_write_lock_ptr = (__u32 *) (l); \
@@ -257,7 +257,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
257 } while (ia64_val); \ 257 } while (ia64_val); \
258}) 258})
259 259
260#define __raw_write_trylock(rw) \ 260#define arch_write_trylock(rw) \
261({ \ 261({ \
262 __u64 ia64_val; \ 262 __u64 ia64_val; \
263 __u64 ia64_set_val = ia64_dep_mi(-1, 0, 31,1); \ 263 __u64 ia64_set_val = ia64_dep_mi(-1, 0, 31,1); \
@@ -265,7 +265,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
265 (ia64_val == 0); \ 265 (ia64_val == 0); \
266}) 266})
267 267
268static inline void __raw_write_unlock(raw_rwlock_t *x) 268static inline void arch_write_unlock(arch_rwlock_t *x)
269{ 269{
270 barrier(); 270 barrier();
271 x->write_lock = 0; 271 x->write_lock = 0;
@@ -273,10 +273,10 @@ static inline void __raw_write_unlock(raw_rwlock_t *x)
273 273
274#endif /* !ASM_SUPPORTED */ 274#endif /* !ASM_SUPPORTED */
275 275
276static inline int __raw_read_trylock(raw_rwlock_t *x) 276static inline int arch_read_trylock(arch_rwlock_t *x)
277{ 277{
278 union { 278 union {
279 raw_rwlock_t lock; 279 arch_rwlock_t lock;
280 __u32 word; 280 __u32 word;
281 } old, new; 281 } old, new;
282 old.lock = new.lock = *x; 282 old.lock = new.lock = *x;
@@ -285,8 +285,8 @@ static inline int __raw_read_trylock(raw_rwlock_t *x)
285 return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; 285 return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word;
286} 286}
287 287
288#define _raw_spin_relax(lock) cpu_relax() 288#define arch_spin_relax(lock) cpu_relax()
289#define _raw_read_relax(lock) cpu_relax() 289#define arch_read_relax(lock) cpu_relax()
290#define _raw_write_relax(lock) cpu_relax() 290#define arch_write_relax(lock) cpu_relax()
291 291
292#endif /* _ASM_IA64_SPINLOCK_H */ 292#endif /* _ASM_IA64_SPINLOCK_H */
diff --git a/arch/ia64/include/asm/spinlock_types.h b/arch/ia64/include/asm/spinlock_types.h
index 474e46f1ab4a..e2b42a52a6d3 100644
--- a/arch/ia64/include/asm/spinlock_types.h
+++ b/arch/ia64/include/asm/spinlock_types.h
@@ -7,15 +7,15 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int lock; 9 volatile unsigned int lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int read_counter : 31; 15 volatile unsigned int read_counter : 31;
16 volatile unsigned int write_lock : 1; 16 volatile unsigned int write_lock : 1;
17} raw_rwlock_t; 17} arch_rwlock_t;
18 18
19#define __RAW_RW_LOCK_UNLOCKED { 0, 0 } 19#define __ARCH_RW_LOCK_UNLOCKED { 0, 0 }
20 20
21#endif 21#endif
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 9c72e36c5281..10a8f21ca9e3 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -311,7 +311,7 @@
311#define __NR_preadv 1319 311#define __NR_preadv 1319
312#define __NR_pwritev 1320 312#define __NR_pwritev 1320
313#define __NR_rt_tgsigqueueinfo 1321 313#define __NR_rt_tgsigqueueinfo 1321
314#define __NR_rt_recvmmsg 1322 314#define __NR_recvmmsg 1322
315 315
316#ifdef __KERNEL__ 316#ifdef __KERNEL__
317 317
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h
index 88afb54501e4..67455c2ed2b1 100644
--- a/arch/ia64/include/asm/xen/hypervisor.h
+++ b/arch/ia64/include/asm/xen/hypervisor.h
@@ -37,35 +37,9 @@
37#include <xen/interface/xen.h> 37#include <xen/interface/xen.h>
38#include <xen/interface/version.h> /* to compile feature.c */ 38#include <xen/interface/version.h> /* to compile feature.c */
39#include <xen/features.h> /* to comiple xen-netfront.c */ 39#include <xen/features.h> /* to comiple xen-netfront.c */
40#include <xen/xen.h>
40#include <asm/xen/hypercall.h> 41#include <asm/xen/hypercall.h>
41 42
42/* xen_domain_type is set before executing any C code by early_xen_setup */
43enum xen_domain_type {
44 XEN_NATIVE, /* running on bare hardware */
45 XEN_PV_DOMAIN, /* running in a PV domain */
46 XEN_HVM_DOMAIN, /* running in a Xen hvm domain*/
47};
48
49#ifdef CONFIG_XEN
50extern enum xen_domain_type xen_domain_type;
51#else
52#define xen_domain_type XEN_NATIVE
53#endif
54
55#define xen_domain() (xen_domain_type != XEN_NATIVE)
56#define xen_pv_domain() (xen_domain() && \
57 xen_domain_type == XEN_PV_DOMAIN)
58#define xen_hvm_domain() (xen_domain() && \
59 xen_domain_type == XEN_HVM_DOMAIN)
60
61#ifdef CONFIG_XEN_DOM0
62#define xen_initial_domain() (xen_pv_domain() && \
63 (xen_start_info->flags & SIF_INITDOMAIN))
64#else
65#define xen_initial_domain() (0)
66#endif
67
68
69#ifdef CONFIG_XEN 43#ifdef CONFIG_XEN
70extern struct shared_info *HYPERVISOR_shared_info; 44extern struct shared_info *HYPERVISOR_shared_info;
71extern struct start_info *xen_start_info; 45extern struct start_info *xen_start_info;
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 6b7edcab0cb5..2a75e937ae8d 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -81,17 +81,14 @@ define cmd_nr_irqs
81endef 81endef
82 82
83# We use internal kbuild rules to avoid the "is up to date" message from make 83# We use internal kbuild rules to avoid the "is up to date" message from make
84arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \ 84arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
85 $(wildcard $(srctree)/include/asm-ia64/*/irq.h)
86 $(Q)mkdir -p $(dir $@) 85 $(Q)mkdir -p $(dir $@)
87 $(call if_changed_dep,cc_s_c) 86 $(call if_changed_dep,cc_s_c)
88 87
89include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s 88include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s
90 $(Q)mkdir -p $(dir $@) 89 $(Q)mkdir -p $(dir $@)
91 $(call cmd,nr_irqs) 90 $(call cmd,nr_irqs)
92 91
93clean-files += $(objtree)/include/asm-ia64/nr-irqs.h
94
95# 92#
96# native ivt.S, entry.S and fsys.S 93# native ivt.S, entry.S and fsys.S
97# 94#
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index baec6f00f7f3..40574ae11401 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -702,11 +702,23 @@ int __init early_acpi_boot_init(void)
702 printk(KERN_ERR PREFIX 702 printk(KERN_ERR PREFIX
703 "Error parsing MADT - no LAPIC entries\n"); 703 "Error parsing MADT - no LAPIC entries\n");
704 704
705#ifdef CONFIG_SMP
706 if (available_cpus == 0) {
707 printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n");
708 printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id());
709 smp_boot_data.cpu_phys_id[available_cpus] =
710 hard_smp_processor_id();
711 available_cpus = 1; /* We've got at least one of these, no? */
712 }
713 smp_boot_data.cpu_count = available_cpus;
714#endif
715 /* Make boot-up look pretty */
716 printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus,
717 total_cpus);
718
705 return 0; 719 return 0;
706} 720}
707 721
708
709
710int __init acpi_boot_init(void) 722int __init acpi_boot_init(void)
711{ 723{
712 724
@@ -769,18 +781,8 @@ int __init acpi_boot_init(void)
769 if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt)) 781 if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
770 printk(KERN_ERR PREFIX "Can't find FADT\n"); 782 printk(KERN_ERR PREFIX "Can't find FADT\n");
771 783
784#ifdef CONFIG_ACPI_NUMA
772#ifdef CONFIG_SMP 785#ifdef CONFIG_SMP
773 if (available_cpus == 0) {
774 printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n");
775 printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id());
776 smp_boot_data.cpu_phys_id[available_cpus] =
777 hard_smp_processor_id();
778 available_cpus = 1; /* We've got at least one of these, no? */
779 }
780 smp_boot_data.cpu_count = available_cpus;
781
782 smp_build_cpu_map();
783# ifdef CONFIG_ACPI_NUMA
784 if (srat_num_cpus == 0) { 786 if (srat_num_cpus == 0) {
785 int cpu, i = 1; 787 int cpu, i = 1;
786 for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) 788 for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++)
@@ -789,14 +791,9 @@ int __init acpi_boot_init(void)
789 node_cpuid[i++].phys_id = 791 node_cpuid[i++].phys_id =
790 smp_boot_data.cpu_phys_id[cpu]; 792 smp_boot_data.cpu_phys_id[cpu];
791 } 793 }
792# endif
793#endif 794#endif
794#ifdef CONFIG_ACPI_NUMA
795 build_cpu_to_node_map(); 795 build_cpu_to_node_map();
796#endif 796#endif
797 /* Make boot-up look pretty */
798 printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus,
799 total_cpus);
800 return 0; 797 return 0;
801} 798}
802 799
diff --git a/arch/ia64/kernel/esi.c b/arch/ia64/kernel/esi.c
index d5764a3d74af..b091111270cb 100644
--- a/arch/ia64/kernel/esi.c
+++ b/arch/ia64/kernel/esi.c
@@ -84,7 +84,7 @@ static int __init esi_init (void)
84 case ESI_DESC_ENTRY_POINT: 84 case ESI_DESC_ENTRY_POINT:
85 break; 85 break;
86 default: 86 default:
87 printk(KERN_WARNING "Unkown table type %d found in " 87 printk(KERN_WARNING "Unknown table type %d found in "
88 "ESI table, ignoring rest of table\n", *p); 88 "ESI table, ignoring rest of table\n", *p);
89 return -ENODEV; 89 return -ENODEV;
90 } 90 }
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 696eff28a0c4..17a9fba38930 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -1051,7 +1051,7 @@ END(ia64_delay_loop)
1051 * intermediate precision so that we can produce a full 64-bit result. 1051 * intermediate precision so that we can produce a full 64-bit result.
1052 */ 1052 */
1053GLOBAL_ENTRY(ia64_native_sched_clock) 1053GLOBAL_ENTRY(ia64_native_sched_clock)
1054 addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 1054 addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
1055 mov.m r9=ar.itc // fetch cycle-counter (35 cyc) 1055 mov.m r9=ar.itc // fetch cycle-counter (35 cyc)
1056 ;; 1056 ;;
1057 ldf8 f8=[r8] 1057 ldf8 f8=[r8]
@@ -1077,7 +1077,7 @@ sched_clock = ia64_native_sched_clock
1077#ifdef CONFIG_VIRT_CPU_ACCOUNTING 1077#ifdef CONFIG_VIRT_CPU_ACCOUNTING
1078GLOBAL_ENTRY(cycle_to_cputime) 1078GLOBAL_ENTRY(cycle_to_cputime)
1079 alloc r16=ar.pfs,1,0,0,0 1079 alloc r16=ar.pfs,1,0,0,0
1080 addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 1080 addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
1081 ;; 1081 ;;
1082 ldf8 f8=[r8] 1082 ldf8 f8=[r8]
1083 ;; 1083 ;;
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 14d39e300627..461b99902bf6 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
30#endif 30#endif
31 31
32#include <asm/processor.h> 32#include <asm/processor.h>
33EXPORT_SYMBOL(per_cpu__cpu_info); 33EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
34#ifdef CONFIG_SMP 34#ifdef CONFIG_SMP
35EXPORT_SYMBOL(per_cpu__local_per_cpu_offset); 35EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
36#endif 36#endif
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index dab4d393908c..95ac77aeae9b 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -793,12 +793,12 @@ iosapic_register_intr (unsigned int gsi,
793 goto unlock_iosapic_lock; 793 goto unlock_iosapic_lock;
794 } 794 }
795 795
796 spin_lock(&irq_desc[irq].lock); 796 raw_spin_lock(&irq_desc[irq].lock);
797 dest = get_target_cpu(gsi, irq); 797 dest = get_target_cpu(gsi, irq);
798 dmode = choose_dmode(); 798 dmode = choose_dmode();
799 err = register_intr(gsi, irq, dmode, polarity, trigger); 799 err = register_intr(gsi, irq, dmode, polarity, trigger);
800 if (err < 0) { 800 if (err < 0) {
801 spin_unlock(&irq_desc[irq].lock); 801 raw_spin_unlock(&irq_desc[irq].lock);
802 irq = err; 802 irq = err;
803 goto unlock_iosapic_lock; 803 goto unlock_iosapic_lock;
804 } 804 }
@@ -817,7 +817,7 @@ iosapic_register_intr (unsigned int gsi,
817 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), 817 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
818 cpu_logical_id(dest), dest, irq_to_vector(irq)); 818 cpu_logical_id(dest), dest, irq_to_vector(irq));
819 819
820 spin_unlock(&irq_desc[irq].lock); 820 raw_spin_unlock(&irq_desc[irq].lock);
821 unlock_iosapic_lock: 821 unlock_iosapic_lock:
822 spin_unlock_irqrestore(&iosapic_lock, flags); 822 spin_unlock_irqrestore(&iosapic_lock, flags);
823 return irq; 823 return irq;
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 7d8951229e7c..94ee9d067cbd 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v)
71 } 71 }
72 72
73 if (i < NR_IRQS) { 73 if (i < NR_IRQS) {
74 spin_lock_irqsave(&irq_desc[i].lock, flags); 74 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
75 action = irq_desc[i].action; 75 action = irq_desc[i].action;
76 if (!action) 76 if (!action)
77 goto skip; 77 goto skip;
@@ -91,7 +91,7 @@ int show_interrupts(struct seq_file *p, void *v)
91 91
92 seq_putc(p, '\n'); 92 seq_putc(p, '\n');
93skip: 93skip:
94 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 94 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
95 } else if (i == NR_IRQS) 95 } else if (i == NR_IRQS)
96 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); 96 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
97 return 0; 97 return 0;
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index dd9d7b54f1a1..d4093a173a3e 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -260,7 +260,6 @@ void __setup_vector_irq(int cpu)
260} 260}
261 261
262#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) 262#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
263#define IA64_IRQ_MOVE_VECTOR IA64_DEF_FIRST_DEVICE_VECTOR
264 263
265static enum vector_domain_type { 264static enum vector_domain_type {
266 VECTOR_DOMAIN_NONE, 265 VECTOR_DOMAIN_NONE,
@@ -345,7 +344,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
345 344
346 desc = irq_desc + irq; 345 desc = irq_desc + irq;
347 cfg = irq_cfg + irq; 346 cfg = irq_cfg + irq;
348 spin_lock(&desc->lock); 347 raw_spin_lock(&desc->lock);
349 if (!cfg->move_cleanup_count) 348 if (!cfg->move_cleanup_count)
350 goto unlock; 349 goto unlock;
351 350
@@ -358,7 +357,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
358 spin_unlock_irqrestore(&vector_lock, flags); 357 spin_unlock_irqrestore(&vector_lock, flags);
359 cfg->move_cleanup_count--; 358 cfg->move_cleanup_count--;
360 unlock: 359 unlock:
361 spin_unlock(&desc->lock); 360 raw_spin_unlock(&desc->lock);
362 } 361 }
363 return IRQ_HANDLED; 362 return IRQ_HANDLED;
364} 363}
@@ -659,11 +658,8 @@ init_IRQ (void)
659 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); 658 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
660#ifdef CONFIG_SMP 659#ifdef CONFIG_SMP
661#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) 660#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)
662 if (vector_domain_type != VECTOR_DOMAIN_NONE) { 661 if (vector_domain_type != VECTOR_DOMAIN_NONE)
663 BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR);
664 IA64_FIRST_DEVICE_VECTOR++;
665 register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); 662 register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction);
666 }
667#endif 663#endif
668#endif 664#endif
669#ifdef CONFIG_PERFMON 665#ifdef CONFIG_PERFMON
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 496ac7a99488..32f2639e9b0a 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -888,9 +888,10 @@ ia64_mca_modify_comm(const struct task_struct *previous_current)
888} 888}
889 889
890static void 890static void
891finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms, 891finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos,
892 unsigned long *nat) 892 unsigned long *nat)
893{ 893{
894 const pal_min_state_area_t *ms = sos->pal_min_state;
894 const u64 *bank; 895 const u64 *bank;
895 896
896 /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use 897 /* If ipsr.ic then use pmsa_{iip,ipsr,ifs}, else use
@@ -904,6 +905,10 @@ finish_pt_regs(struct pt_regs *regs, const pal_min_state_area_t *ms,
904 regs->cr_iip = ms->pmsa_xip; 905 regs->cr_iip = ms->pmsa_xip;
905 regs->cr_ipsr = ms->pmsa_xpsr; 906 regs->cr_ipsr = ms->pmsa_xpsr;
906 regs->cr_ifs = ms->pmsa_xfs; 907 regs->cr_ifs = ms->pmsa_xfs;
908
909 sos->iip = ms->pmsa_iip;
910 sos->ipsr = ms->pmsa_ipsr;
911 sos->ifs = ms->pmsa_ifs;
907 } 912 }
908 regs->pr = ms->pmsa_pr; 913 regs->pr = ms->pmsa_pr;
909 regs->b0 = ms->pmsa_br0; 914 regs->b0 = ms->pmsa_br0;
@@ -1079,7 +1084,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs,
1079 memcpy(old_regs, regs, sizeof(*regs)); 1084 memcpy(old_regs, regs, sizeof(*regs));
1080 old_regs->loadrs = loadrs; 1085 old_regs->loadrs = loadrs;
1081 old_unat = old_regs->ar_unat; 1086 old_unat = old_regs->ar_unat;
1082 finish_pt_regs(old_regs, ms, &old_unat); 1087 finish_pt_regs(old_regs, sos, &old_unat);
1083 1088
1084 /* Next stack a struct switch_stack. mca_asm.S built a partial 1089 /* Next stack a struct switch_stack. mca_asm.S built a partial
1085 * switch_stack, copy it and fill in the blanks using pt_regs and 1090 * switch_stack, copy it and fill in the blanks using pt_regs and
@@ -1150,7 +1155,7 @@ no_mod:
1150 mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n", 1155 mprintk(KERN_INFO "cpu %d, %s %s, original stack not modified\n",
1151 smp_processor_id(), type, msg); 1156 smp_processor_id(), type, msg);
1152 old_unat = regs->ar_unat; 1157 old_unat = regs->ar_unat;
1153 finish_pt_regs(regs, ms, &old_unat); 1158 finish_pt_regs(regs, sos, &old_unat);
1154 return previous_current; 1159 return previous_current;
1155} 1160}
1156 1161
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index 7461d2573d41..d5bdf9de36b6 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -59,7 +59,7 @@
59ia64_do_tlb_purge: 59ia64_do_tlb_purge:
60#define O(member) IA64_CPUINFO_##member##_OFFSET 60#define O(member) IA64_CPUINFO_##member##_OFFSET
61 61
62 GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 62 GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
63 ;; 63 ;;
64 addl r17=O(PTCE_STRIDE),r2 64 addl r17=O(PTCE_STRIDE),r2
65 addl r2=O(PTCE_BASE),r2 65 addl r2=O(PTCE_BASE),r2
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 402698b6689f..5246285a95fb 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2200,7 +2200,7 @@ pfm_alloc_file(pfm_context_t *ctx)
2200{ 2200{
2201 struct file *file; 2201 struct file *file;
2202 struct inode *inode; 2202 struct inode *inode;
2203 struct dentry *dentry; 2203 struct path path;
2204 char name[32]; 2204 char name[32];
2205 struct qstr this; 2205 struct qstr this;
2206 2206
@@ -2225,18 +2225,19 @@ pfm_alloc_file(pfm_context_t *ctx)
2225 /* 2225 /*
2226 * allocate a new dcache entry 2226 * allocate a new dcache entry
2227 */ 2227 */
2228 dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); 2228 path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this);
2229 if (!dentry) { 2229 if (!path.dentry) {
2230 iput(inode); 2230 iput(inode);
2231 return ERR_PTR(-ENOMEM); 2231 return ERR_PTR(-ENOMEM);
2232 } 2232 }
2233 path.mnt = mntget(pfmfs_mnt);
2233 2234
2234 dentry->d_op = &pfmfs_dentry_operations; 2235 path.dentry->d_op = &pfmfs_dentry_operations;
2235 d_add(dentry, inode); 2236 d_add(path.dentry, inode);
2236 2237
2237 file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops); 2238 file = alloc_file(&path, FMODE_READ, &pfm_file_ops);
2238 if (!file) { 2239 if (!file) {
2239 dput(dentry); 2240 path_put(&path);
2240 return ERR_PTR(-ENFILE); 2241 return ERR_PTR(-ENFILE);
2241 } 2242 }
2242 2243
@@ -3517,7 +3518,7 @@ pfm_use_debug_registers(struct task_struct *task)
3517 * IA64_THREAD_DBG_VALID set. This indicates a task which was 3518 * IA64_THREAD_DBG_VALID set. This indicates a task which was
3518 * able to use the debug registers for debugging purposes via 3519 * able to use the debug registers for debugging purposes via
3519 * ptrace(). Therefore we know it was not using them for 3520 * ptrace(). Therefore we know it was not using them for
3520 * perfmormance monitoring, so we only decrement the number 3521 * performance monitoring, so we only decrement the number
3521 * of "ptraced" debug register users to keep the count up to date 3522 * of "ptraced" debug register users to keep the count up to date
3522 */ 3523 */
3523int 3524int
diff --git a/arch/ia64/kernel/relocate_kernel.S b/arch/ia64/kernel/relocate_kernel.S
index 32f6fc131fbe..c370e02f0061 100644
--- a/arch/ia64/kernel/relocate_kernel.S
+++ b/arch/ia64/kernel/relocate_kernel.S
@@ -61,7 +61,7 @@ GLOBAL_ENTRY(relocate_new_kernel)
61 61
62 // purge all TC entries 62 // purge all TC entries
63#define O(member) IA64_CPUINFO_##member##_OFFSET 63#define O(member) IA64_CPUINFO_##member##_OFFSET
64 GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 64 GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
65 ;; 65 ;;
66 addl r17=O(PTCE_STRIDE),r2 66 addl r17=O(PTCE_STRIDE),r2
67 addl r2=O(PTCE_BASE),r2 67 addl r2=O(PTCE_BASE),r2
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 1de86c96801d..a1ea87919777 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -74,7 +74,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
74EXPORT_SYMBOL(__per_cpu_offset); 74EXPORT_SYMBOL(__per_cpu_offset);
75#endif 75#endif
76 76
77DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); 77DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
78DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); 78DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
79unsigned long ia64_cycles_per_usec; 79unsigned long ia64_cycles_per_usec;
80struct ia64_boot_param *ia64_boot_param; 80struct ia64_boot_param *ia64_boot_param;
@@ -566,19 +566,18 @@ setup_arch (char **cmdline_p)
566 early_acpi_boot_init(); 566 early_acpi_boot_init();
567# ifdef CONFIG_ACPI_NUMA 567# ifdef CONFIG_ACPI_NUMA
568 acpi_numa_init(); 568 acpi_numa_init();
569#ifdef CONFIG_ACPI_HOTPLUG_CPU 569# ifdef CONFIG_ACPI_HOTPLUG_CPU
570 prefill_possible_map(); 570 prefill_possible_map();
571#endif 571# endif
572 per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? 572 per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
573 32 : cpus_weight(early_cpu_possible_map)), 573 32 : cpus_weight(early_cpu_possible_map)),
574 additional_cpus > 0 ? additional_cpus : 0); 574 additional_cpus > 0 ? additional_cpus : 0);
575# endif 575# endif
576#else
577# ifdef CONFIG_SMP
578 smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */
579# endif
580#endif /* CONFIG_APCI_BOOT */ 576#endif /* CONFIG_APCI_BOOT */
581 577
578#ifdef CONFIG_SMP
579 smp_build_cpu_map();
580#endif
582 find_memory(); 581 find_memory();
583 582
584 /* process SAL system table: */ 583 /* process SAL system table: */
@@ -856,18 +855,6 @@ identify_cpu (struct cpuinfo_ia64 *c)
856} 855}
857 856
858/* 857/*
859 * In UP configuration, setup_per_cpu_areas() is defined in
860 * include/linux/percpu.h
861 */
862#ifdef CONFIG_SMP
863void __init
864setup_per_cpu_areas (void)
865{
866 /* start_kernel() requires this... */
867}
868#endif
869
870/*
871 * Do the following calculations: 858 * Do the following calculations:
872 * 859 *
873 * 1. the max. cache line size. 860 * 1. the max. cache line size.
@@ -980,7 +967,7 @@ cpu_init (void)
980 * depends on the data returned by identify_cpu(). We break the dependency by 967 * depends on the data returned by identify_cpu(). We break the dependency by
981 * accessing cpu_data() through the canonical per-CPU address. 968 * accessing cpu_data() through the canonical per-CPU address.
982 */ 969 */
983 cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(cpu_info) - __per_cpu_start); 970 cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(ia64_cpu_info) - __per_cpu_start);
984 identify_cpu(cpu_info); 971 identify_cpu(cpu_info);
985 972
986#ifdef CONFIG_MCKINLEY 973#ifdef CONFIG_MCKINLEY
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index 92ed83f34036..609d50056a6c 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -100,51 +100,7 @@ sys_getpagesize (void)
100asmlinkage unsigned long 100asmlinkage unsigned long
101ia64_brk (unsigned long brk) 101ia64_brk (unsigned long brk)
102{ 102{
103 unsigned long rlim, retval, newbrk, oldbrk; 103 unsigned long retval = sys_brk(brk);
104 struct mm_struct *mm = current->mm;
105
106 /*
107 * Most of this replicates the code in sys_brk() except for an additional safety
108 * check and the clearing of r8. However, we can't call sys_brk() because we need
109 * to acquire the mmap_sem before we can do the test...
110 */
111 down_write(&mm->mmap_sem);
112
113 if (brk < mm->end_code)
114 goto out;
115 newbrk = PAGE_ALIGN(brk);
116 oldbrk = PAGE_ALIGN(mm->brk);
117 if (oldbrk == newbrk)
118 goto set_brk;
119
120 /* Always allow shrinking brk. */
121 if (brk <= mm->brk) {
122 if (!do_munmap(mm, newbrk, oldbrk-newbrk))
123 goto set_brk;
124 goto out;
125 }
126
127 /* Check against unimplemented/unmapped addresses: */
128 if ((newbrk - oldbrk) > RGN_MAP_LIMIT || REGION_OFFSET(newbrk) > RGN_MAP_LIMIT)
129 goto out;
130
131 /* Check against rlimit.. */
132 rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
133 if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim)
134 goto out;
135
136 /* Check against existing mmap mappings. */
137 if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE))
138 goto out;
139
140 /* Ok, looks good - let it rip. */
141 if (do_brk(oldbrk, newbrk-oldbrk) != oldbrk)
142 goto out;
143set_brk:
144 mm->brk = brk;
145out:
146 retval = mm->brk;
147 up_write(&mm->mmap_sem);
148 force_successful_syscall_return(); 104 force_successful_syscall_return();
149 return retval; 105 return retval;
150} 106}
@@ -185,39 +141,6 @@ int ia64_mmap_check(unsigned long addr, unsigned long len,
185 return 0; 141 return 0;
186} 142}
187 143
188static inline unsigned long
189do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff)
190{
191 struct file *file = NULL;
192
193 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
194 if (!(flags & MAP_ANONYMOUS)) {
195 file = fget(fd);
196 if (!file)
197 return -EBADF;
198
199 if (!file->f_op || !file->f_op->mmap) {
200 addr = -ENODEV;
201 goto out;
202 }
203 }
204
205 /* Careful about overflows.. */
206 len = PAGE_ALIGN(len);
207 if (!len || len > TASK_SIZE) {
208 addr = -EINVAL;
209 goto out;
210 }
211
212 down_write(&current->mm->mmap_sem);
213 addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
214 up_write(&current->mm->mmap_sem);
215
216out: if (file)
217 fput(file);
218 return addr;
219}
220
221/* 144/*
222 * mmap2() is like mmap() except that the offset is expressed in units 145 * mmap2() is like mmap() except that the offset is expressed in units
223 * of PAGE_SIZE (instead of bytes). This allows to mmap2() (pieces 146 * of PAGE_SIZE (instead of bytes). This allows to mmap2() (pieces
@@ -226,7 +149,7 @@ out: if (file)
226asmlinkage unsigned long 149asmlinkage unsigned long
227sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff) 150sys_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, long pgoff)
228{ 151{
229 addr = do_mmap2(addr, len, prot, flags, fd, pgoff); 152 addr = sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
230 if (!IS_ERR((void *) addr)) 153 if (!IS_ERR((void *) addr))
231 force_successful_syscall_return(); 154 force_successful_syscall_return();
232 return addr; 155 return addr;
@@ -238,7 +161,7 @@ sys_mmap (unsigned long addr, unsigned long len, int prot, int flags, int fd, lo
238 if (offset_in_page(off) != 0) 161 if (offset_in_page(off) != 0)
239 return -EINVAL; 162 return -EINVAL;
240 163
241 addr = do_mmap2(addr, len, prot, flags, fd, off >> PAGE_SHIFT); 164 addr = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
242 if (!IS_ERR((void *) addr)) 165 if (!IS_ERR((void *) addr))
243 force_successful_syscall_return(); 166 force_successful_syscall_return();
244 return addr; 167 return addr;
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 4990495d7531..a35c661e5e89 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -473,7 +473,7 @@ void update_vsyscall_tz(void)
473{ 473{
474} 474}
475 475
476void update_vsyscall(struct timespec *wall, struct clocksource *c) 476void update_vsyscall(struct timespec *wall, struct clocksource *c, u32 mult)
477{ 477{
478 unsigned long flags; 478 unsigned long flags;
479 479
@@ -481,7 +481,7 @@ void update_vsyscall(struct timespec *wall, struct clocksource *c)
481 481
482 /* copy fsyscall clock data */ 482 /* copy fsyscall clock data */
483 fsyscall_gtod_data.clk_mask = c->mask; 483 fsyscall_gtod_data.clk_mask = c->mask;
484 fsyscall_gtod_data.clk_mult = c->mult; 484 fsyscall_gtod_data.clk_mult = mult;
485 fsyscall_gtod_data.clk_shift = c->shift; 485 fsyscall_gtod_data.clk_shift = c->shift;
486 fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio; 486 fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio;
487 fsyscall_gtod_data.clk_cycle_last = c->cycle_last; 487 fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 0a0c77b2c988..1295ba327f6f 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -166,6 +166,12 @@ SECTIONS
166 } 166 }
167#endif 167#endif
168 168
169#ifdef CONFIG_SMP
170 . = ALIGN(PERCPU_PAGE_SIZE);
171 __cpu0_per_cpu = .;
172 . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
173#endif
174
169 . = ALIGN(PAGE_SIZE); 175 . = ALIGN(PAGE_SIZE);
170 __init_end = .; 176 __init_end = .;
171 177
@@ -198,11 +204,6 @@ SECTIONS
198 data : { } :data 204 data : { } :data
199 .data : AT(ADDR(.data) - LOAD_OFFSET) 205 .data : AT(ADDR(.data) - LOAD_OFFSET)
200 { 206 {
201#ifdef CONFIG_SMP
202 . = ALIGN(PERCPU_PAGE_SIZE);
203 __cpu0_per_cpu = .;
204 . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
205#endif
206 INIT_TASK_DATA(PAGE_SIZE) 207 INIT_TASK_DATA(PAGE_SIZE)
207 CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES) 208 CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES)
208 READ_MOSTLY_DATA(SMP_CACHE_BYTES) 209 READ_MOSTLY_DATA(SMP_CACHE_BYTES)
diff --git a/arch/ia64/kvm/asm-offsets.c b/arch/ia64/kvm/asm-offsets.c
index 0c3564a7a033..9324c875caf5 100644
--- a/arch/ia64/kvm/asm-offsets.c
+++ b/arch/ia64/kvm/asm-offsets.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/autoconf.h>
26#include <linux/kvm_host.h> 25#include <linux/kvm_host.h>
27#include <linux/kbuild.h> 26#include <linux/kbuild.h>
28 27
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 2f724d2bf299..54bf54059811 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -154,38 +154,99 @@ static void *cpu_data;
154void * __cpuinit 154void * __cpuinit
155per_cpu_init (void) 155per_cpu_init (void)
156{ 156{
157 int cpu; 157 static bool first_time = true;
158 static int first_time=1; 158 void *cpu0_data = __cpu0_per_cpu;
159 unsigned int cpu;
160
161 if (!first_time)
162 goto skip;
163 first_time = false;
159 164
160 /* 165 /*
161 * get_free_pages() cannot be used before cpu_init() done. BSP 166 * get_free_pages() cannot be used before cpu_init() done.
162 * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls 167 * BSP allocates PERCPU_PAGE_SIZE bytes for all possible CPUs
163 * get_zeroed_page(). 168 * to avoid that AP calls get_zeroed_page().
164 */ 169 */
165 if (first_time) { 170 for_each_possible_cpu(cpu) {
166 void *cpu0_data = __cpu0_per_cpu; 171 void *src = cpu == 0 ? cpu0_data : __phys_per_cpu_start;
167 172
168 first_time=0; 173 memcpy(cpu_data, src, __per_cpu_end - __per_cpu_start);
174 __per_cpu_offset[cpu] = (char *)cpu_data - __per_cpu_start;
175 per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
169 176
170 __per_cpu_offset[0] = (char *) cpu0_data - __per_cpu_start; 177 /*
171 per_cpu(local_per_cpu_offset, 0) = __per_cpu_offset[0]; 178 * percpu area for cpu0 is moved from the __init area
179 * which is setup by head.S and used till this point.
180 * Update ar.k3. This move is ensures that percpu
181 * area for cpu0 is on the correct node and its
182 * virtual address isn't insanely far from other
183 * percpu areas which is important for congruent
184 * percpu allocator.
185 */
186 if (cpu == 0)
187 ia64_set_kr(IA64_KR_PER_CPU_DATA, __pa(cpu_data) -
188 (unsigned long)__per_cpu_start);
172 189
173 for (cpu = 1; cpu < NR_CPUS; cpu++) { 190 cpu_data += PERCPU_PAGE_SIZE;
174 memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
175 __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
176 cpu_data += PERCPU_PAGE_SIZE;
177 per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
178 }
179 } 191 }
192skip:
180 return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; 193 return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
181} 194}
182 195
183static inline void 196static inline void
184alloc_per_cpu_data(void) 197alloc_per_cpu_data(void)
185{ 198{
186 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS-1, 199 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * num_possible_cpus(),
187 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); 200 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
188} 201}
202
203/**
204 * setup_per_cpu_areas - setup percpu areas
205 *
206 * Arch code has already allocated and initialized percpu areas. All
207 * this function has to do is to teach the determined layout to the
208 * dynamic percpu allocator, which happens to be more complex than
209 * creating whole new ones using helpers.
210 */
211void __init
212setup_per_cpu_areas(void)
213{
214 struct pcpu_alloc_info *ai;
215 struct pcpu_group_info *gi;
216 unsigned int cpu;
217 ssize_t static_size, reserved_size, dyn_size;
218 int rc;
219
220 ai = pcpu_alloc_alloc_info(1, num_possible_cpus());
221 if (!ai)
222 panic("failed to allocate pcpu_alloc_info");
223 gi = &ai->groups[0];
224
225 /* units are assigned consecutively to possible cpus */
226 for_each_possible_cpu(cpu)
227 gi->cpu_map[gi->nr_units++] = cpu;
228
229 /* set parameters */
230 static_size = __per_cpu_end - __per_cpu_start;
231 reserved_size = PERCPU_MODULE_RESERVE;
232 dyn_size = PERCPU_PAGE_SIZE - static_size - reserved_size;
233 if (dyn_size < 0)
234 panic("percpu area overflow static=%zd reserved=%zd\n",
235 static_size, reserved_size);
236
237 ai->static_size = static_size;
238 ai->reserved_size = reserved_size;
239 ai->dyn_size = dyn_size;
240 ai->unit_size = PERCPU_PAGE_SIZE;
241 ai->atom_size = PAGE_SIZE;
242 ai->alloc_size = PERCPU_PAGE_SIZE;
243
244 rc = pcpu_setup_first_chunk(ai, __per_cpu_start + __per_cpu_offset[0]);
245 if (rc)
246 panic("failed to setup percpu area (err=%d)", rc);
247
248 pcpu_free_alloc_info(ai);
249}
189#else 250#else
190#define alloc_per_cpu_data() do { } while (0) 251#define alloc_per_cpu_data() do { } while (0)
191#endif /* CONFIG_SMP */ 252#endif /* CONFIG_SMP */
@@ -270,8 +331,8 @@ paging_init (void)
270 331
271 map_size = PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * 332 map_size = PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
272 sizeof(struct page)); 333 sizeof(struct page));
273 vmalloc_end -= map_size; 334 VMALLOC_END -= map_size;
274 vmem_map = (struct page *) vmalloc_end; 335 vmem_map = (struct page *) VMALLOC_END;
275 efi_memmap_walk(create_mem_map_page_table, NULL); 336 efi_memmap_walk(create_mem_map_page_table, NULL);
276 337
277 /* 338 /*
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index d85ba98d9008..19c4b2195dce 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -143,22 +143,120 @@ 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 (cpu == 0) { 146 void *src = cpu == 0 ? __cpu0_per_cpu : __phys_per_cpu_start;
147 void *cpu0_data = __cpu0_per_cpu; 147
148 __per_cpu_offset[cpu] = (char*)cpu0_data - 148 if (node != node_cpuid[cpu].nid)
149 __per_cpu_start; 149 continue;
150 } else if (node == node_cpuid[cpu].nid) { 150
151 memcpy(__va(cpu_data), __phys_per_cpu_start, 151 memcpy(__va(cpu_data), src, __per_cpu_end - __per_cpu_start);
152 __per_cpu_end - __per_cpu_start); 152 __per_cpu_offset[cpu] = (char *)__va(cpu_data) -
153 __per_cpu_offset[cpu] = (char*)__va(cpu_data) - 153 __per_cpu_start;
154 __per_cpu_start; 154
155 cpu_data += PERCPU_PAGE_SIZE; 155 /*
156 } 156 * percpu area for cpu0 is moved from the __init area
157 * which is setup by head.S and used till this point.
158 * Update ar.k3. This move is ensures that percpu
159 * area for cpu0 is on the correct node and its
160 * virtual address isn't insanely far from other
161 * percpu areas which is important for congruent
162 * percpu allocator.
163 */
164 if (cpu == 0)
165 ia64_set_kr(IA64_KR_PER_CPU_DATA,
166 (unsigned long)cpu_data -
167 (unsigned long)__per_cpu_start);
168
169 cpu_data += PERCPU_PAGE_SIZE;
157 } 170 }
158#endif 171#endif
159 return cpu_data; 172 return cpu_data;
160} 173}
161 174
175#ifdef CONFIG_SMP
176/**
177 * setup_per_cpu_areas - setup percpu areas
178 *
179 * Arch code has already allocated and initialized percpu areas. All
180 * this function has to do is to teach the determined layout to the
181 * dynamic percpu allocator, which happens to be more complex than
182 * creating whole new ones using helpers.
183 */
184void __init setup_per_cpu_areas(void)
185{
186 struct pcpu_alloc_info *ai;
187 struct pcpu_group_info *uninitialized_var(gi);
188 unsigned int *cpu_map;
189 void *base;
190 unsigned long base_offset;
191 unsigned int cpu;
192 ssize_t static_size, reserved_size, dyn_size;
193 int node, prev_node, unit, nr_units, rc;
194
195 ai = pcpu_alloc_alloc_info(MAX_NUMNODES, nr_cpu_ids);
196 if (!ai)
197 panic("failed to allocate pcpu_alloc_info");
198 cpu_map = ai->groups[0].cpu_map;
199
200 /* determine base */
201 base = (void *)ULONG_MAX;
202 for_each_possible_cpu(cpu)
203 base = min(base,
204 (void *)(__per_cpu_offset[cpu] + __per_cpu_start));
205 base_offset = (void *)__per_cpu_start - base;
206
207 /* build cpu_map, units are grouped by node */
208 unit = 0;
209 for_each_node(node)
210 for_each_possible_cpu(cpu)
211 if (node == node_cpuid[cpu].nid)
212 cpu_map[unit++] = cpu;
213 nr_units = unit;
214
215 /* set basic parameters */
216 static_size = __per_cpu_end - __per_cpu_start;
217 reserved_size = PERCPU_MODULE_RESERVE;
218 dyn_size = PERCPU_PAGE_SIZE - static_size - reserved_size;
219 if (dyn_size < 0)
220 panic("percpu area overflow static=%zd reserved=%zd\n",
221 static_size, reserved_size);
222
223 ai->static_size = static_size;
224 ai->reserved_size = reserved_size;
225 ai->dyn_size = dyn_size;
226 ai->unit_size = PERCPU_PAGE_SIZE;
227 ai->atom_size = PAGE_SIZE;
228 ai->alloc_size = PERCPU_PAGE_SIZE;
229
230 /*
231 * CPUs are put into groups according to node. Walk cpu_map
232 * and create new groups at node boundaries.
233 */
234 prev_node = -1;
235 ai->nr_groups = 0;
236 for (unit = 0; unit < nr_units; unit++) {
237 cpu = cpu_map[unit];
238 node = node_cpuid[cpu].nid;
239
240 if (node == prev_node) {
241 gi->nr_units++;
242 continue;
243 }
244 prev_node = node;
245
246 gi = &ai->groups[ai->nr_groups++];
247 gi->nr_units = 1;
248 gi->base_offset = __per_cpu_offset[cpu] + base_offset;
249 gi->cpu_map = &cpu_map[unit];
250 }
251
252 rc = pcpu_setup_first_chunk(ai, base);
253 if (rc)
254 panic("failed to setup percpu area (err=%d)", rc);
255
256 pcpu_free_alloc_info(ai);
257}
258#endif
259
162/** 260/**
163 * fill_pernode - initialize pernode data. 261 * fill_pernode - initialize pernode data.
164 * @node: the node id. 262 * @node: the node id.
@@ -352,7 +450,8 @@ static void __init initialize_pernode_data(void)
352 /* Set the node_data pointer for each per-cpu struct */ 450 /* Set the node_data pointer for each per-cpu struct */
353 for_each_possible_early_cpu(cpu) { 451 for_each_possible_early_cpu(cpu) {
354 node = node_cpuid[cpu].nid; 452 node = node_cpuid[cpu].nid;
355 per_cpu(cpu_info, cpu).node_data = mem_data[node].node_data; 453 per_cpu(ia64_cpu_info, cpu).node_data =
454 mem_data[node].node_data;
356 } 455 }
357#else 456#else
358 { 457 {
@@ -360,7 +459,7 @@ static void __init initialize_pernode_data(void)
360 cpu = 0; 459 cpu = 0;
361 node = node_cpuid[cpu].nid; 460 node = node_cpuid[cpu].nid;
362 cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start + 461 cpu0_cpu_info = (struct cpuinfo_ia64 *)(__phys_per_cpu_start +
363 ((char *)&per_cpu__cpu_info - __per_cpu_start)); 462 ((char *)&per_cpu__ia64_cpu_info - __per_cpu_start));
364 cpu0_cpu_info->node_data = mem_data[node].node_data; 463 cpu0_cpu_info->node_data = mem_data[node].node_data;
365 } 464 }
366#endif /* CONFIG_SMP */ 465#endif /* CONFIG_SMP */
@@ -666,9 +765,9 @@ void __init paging_init(void)
666 sparse_init(); 765 sparse_init();
667 766
668#ifdef CONFIG_VIRTUAL_MEM_MAP 767#ifdef CONFIG_VIRTUAL_MEM_MAP
669 vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * 768 VMALLOC_END -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) *
670 sizeof(struct page)); 769 sizeof(struct page));
671 vmem_map = (struct page *) vmalloc_end; 770 vmem_map = (struct page *) VMALLOC_END;
672 efi_memmap_walk(create_mem_map_page_table, NULL); 771 efi_memmap_walk(create_mem_map_page_table, NULL);
673 printk("Virtual mem_map starts at 0x%p\n", vmem_map); 772 printk("Virtual mem_map starts at 0x%p\n", vmem_map);
674#endif 773#endif
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 1857766a63c1..b9609c69343a 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -44,8 +44,8 @@ extern void ia64_tlb_init (void);
44unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL; 44unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL;
45 45
46#ifdef CONFIG_VIRTUAL_MEM_MAP 46#ifdef CONFIG_VIRTUAL_MEM_MAP
47unsigned long vmalloc_end = VMALLOC_END_INIT; 47unsigned long VMALLOC_END = VMALLOC_END_INIT;
48EXPORT_SYMBOL(vmalloc_end); 48EXPORT_SYMBOL(VMALLOC_END);
49struct page *vmem_map; 49struct page *vmem_map;
50EXPORT_SYMBOL(vmem_map); 50EXPORT_SYMBOL(vmem_map);
51#endif 51#endif
diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c
index 2a140627dfd6..3dccdd8eb275 100644
--- a/arch/ia64/mm/ioremap.c
+++ b/arch/ia64/mm/ioremap.c
@@ -22,6 +22,12 @@ __ioremap (unsigned long phys_addr)
22} 22}
23 23
24void __iomem * 24void __iomem *
25early_ioremap (unsigned long phys_addr, unsigned long size)
26{
27 return __ioremap(phys_addr);
28}
29
30void __iomem *
25ioremap (unsigned long phys_addr, unsigned long size) 31ioremap (unsigned long phys_addr, unsigned long size)
26{ 32{
27 void __iomem *addr; 33 void __iomem *addr;
@@ -102,6 +108,11 @@ ioremap_nocache (unsigned long phys_addr, unsigned long size)
102EXPORT_SYMBOL(ioremap_nocache); 108EXPORT_SYMBOL(ioremap_nocache);
103 109
104void 110void
111early_iounmap (volatile void __iomem *addr, unsigned long size)
112{
113}
114
115void
105iounmap (volatile void __iomem *addr) 116iounmap (volatile void __iomem *addr)
106{ 117{
107 if (REGION_NUMBER(addr) == RGN_GATE) 118 if (REGION_NUMBER(addr) == RGN_GATE)
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index c0fca2c1c858..df639db779f9 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -131,6 +131,7 @@ alloc_pci_controller (int seg)
131} 131}
132 132
133struct pci_root_info { 133struct pci_root_info {
134 struct acpi_device *bridge;
134 struct pci_controller *controller; 135 struct pci_controller *controller;
135 char *name; 136 char *name;
136}; 137};
@@ -297,9 +298,20 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
297 window->offset = offset; 298 window->offset = offset;
298 299
299 if (insert_resource(root, &window->resource)) { 300 if (insert_resource(root, &window->resource)) {
300 printk(KERN_ERR "alloc 0x%llx-0x%llx from %s for %s failed\n", 301 dev_err(&info->bridge->dev,
301 window->resource.start, window->resource.end, 302 "can't allocate host bridge window %pR\n",
302 root->name, info->name); 303 &window->resource);
304 } else {
305 if (offset)
306 dev_info(&info->bridge->dev, "host bridge window %pR "
307 "(PCI address [%#llx-%#llx])\n",
308 &window->resource,
309 window->resource.start - offset,
310 window->resource.end - offset);
311 else
312 dev_info(&info->bridge->dev,
313 "host bridge window %pR\n",
314 &window->resource);
303 } 315 }
304 316
305 return AE_OK; 317 return AE_OK;
@@ -319,8 +331,9 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
319 (res->end - res->start < 16)) 331 (res->end - res->start < 16))
320 continue; 332 continue;
321 if (j >= PCI_BUS_NUM_RESOURCES) { 333 if (j >= PCI_BUS_NUM_RESOURCES) {
322 printk("Ignoring range [%#llx-%#llx] (%lx)\n", 334 dev_warn(&bus->dev,
323 res->start, res->end, res->flags); 335 "ignoring host bridge window %pR (no space)\n",
336 res);
324 continue; 337 continue;
325 } 338 }
326 bus->resource[j++] = res; 339 bus->resource[j++] = res;
@@ -364,6 +377,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
364 goto out3; 377 goto out3;
365 378
366 sprintf(name, "PCI Bus %04x:%02x", domain, bus); 379 sprintf(name, "PCI Bus %04x:%02x", domain, bus);
380 info.bridge = device;
367 info.controller = controller; 381 info.controller = controller;
368 info.name = name; 382 info.name = name;
369 acpi_walk_resources(device->handle, METHOD_NAME__CRS, 383 acpi_walk_resources(device->handle, METHOD_NAME__CRS,
@@ -720,9 +734,6 @@ int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
720 return ret; 734 return ret;
721} 735}
722 736
723/* It's defined in drivers/pci/pci.c */
724extern u8 pci_cache_line_size;
725
726/** 737/**
727 * set_pci_cacheline_size - determine cacheline size for PCI devices 738 * set_pci_cacheline_size - determine cacheline size for PCI devices
728 * 739 *
@@ -731,7 +742,7 @@ extern u8 pci_cache_line_size;
731 * 742 *
732 * Code mostly taken from arch/ia64/kernel/palinfo.c:cache_info(). 743 * Code mostly taken from arch/ia64/kernel/palinfo.c:cache_info().
733 */ 744 */
734static void __init set_pci_cacheline_size(void) 745static void __init set_pci_dfl_cacheline_size(void)
735{ 746{
736 unsigned long levels, unique_caches; 747 unsigned long levels, unique_caches;
737 long status; 748 long status;
@@ -751,7 +762,7 @@ static void __init set_pci_cacheline_size(void)
751 "(status=%ld)\n", __func__, status); 762 "(status=%ld)\n", __func__, status);
752 return; 763 return;
753 } 764 }
754 pci_cache_line_size = (1 << cci.pcci_line_size) / 4; 765 pci_dfl_cache_line_size = (1 << cci.pcci_line_size) / 4;
755} 766}
756 767
757u64 ia64_dma_get_required_mask(struct device *dev) 768u64 ia64_dma_get_required_mask(struct device *dev)
@@ -782,7 +793,7 @@ EXPORT_SYMBOL_GPL(dma_get_required_mask);
782 793
783static int __init pcibios_init(void) 794static int __init pcibios_init(void)
784{ 795{
785 set_pci_cacheline_size(); 796 set_pci_dfl_cacheline_size();
786 return 0; 797 return 0;
787} 798}
788 799
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index fd50ff94302b..66f633bff059 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -390,7 +390,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
390 pcidev_match.handle = NULL; 390 pcidev_match.handle = NULL;
391 391
392 acpi_walk_namespace(ACPI_TYPE_DEVICE, rootbus_handle, ACPI_UINT32_MAX, 392 acpi_walk_namespace(ACPI_TYPE_DEVICE, rootbus_handle, ACPI_UINT32_MAX,
393 find_matching_device, &pcidev_match, NULL); 393 find_matching_device, NULL, &pcidev_match, NULL);
394 394
395 if (!pcidev_match.handle) { 395 if (!pcidev_match.handle) {
396 printk(KERN_ERR 396 printk(KERN_ERR
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 1176506b2bae..e884ba4e031d 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -496,13 +496,13 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
496 seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l, 496 seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l,
497 stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed, 497 stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed,
498 stat->deadlocks, 498 stat->deadlocks,
499 1000 * stat->lock_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, 499 1000 * stat->lock_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
500 1000 * stat->shub_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, 500 1000 * stat->shub_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
501 1000 * stat->shub_itc_clocks_max / per_cpu(cpu_info, cpu).cyc_per_usec, 501 1000 * stat->shub_itc_clocks_max / per_cpu(ia64_cpu_info, cpu).cyc_per_usec,
502 stat->shub_ptc_flushes_not_my_mm, 502 stat->shub_ptc_flushes_not_my_mm,
503 stat->deadlocks2, 503 stat->deadlocks2,
504 stat->shub_ipi_flushes, 504 stat->shub_ipi_flushes,
505 1000 * stat->shub_ipi_flushes_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec); 505 1000 * stat->shub_ipi_flushes_itc_clocks / per_cpu(ia64_cpu_info, cpu).cyc_per_usec);
506 } 506 }
507 return 0; 507 return 0;
508} 508}
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 35b2a27d2e77..efb454534e52 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -9,6 +9,7 @@
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/interrupt.h> 10#include <linux/interrupt.h>
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/bitmap.h>
12#include <asm/sn/sn_sal.h> 13#include <asm/sn/sn_sal.h>
13#include <asm/sn/addrs.h> 14#include <asm/sn/addrs.h>
14#include <asm/sn/io.h> 15#include <asm/sn/io.h>
@@ -369,7 +370,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
369static dma_addr_t 370static dma_addr_t
370tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size) 371tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size)
371{ 372{
372 int i, ps, ps_shift, entry, entries, mapsize, last_entry; 373 int ps, ps_shift, entry, entries, mapsize;
373 u64 xio_addr, end_xio_addr; 374 u64 xio_addr, end_xio_addr;
374 struct tioca_common *tioca_common; 375 struct tioca_common *tioca_common;
375 struct tioca_kernel *tioca_kern; 376 struct tioca_kernel *tioca_kern;
@@ -410,23 +411,13 @@ tioca_dma_mapped(struct pci_dev *pdev, unsigned long paddr, size_t req_size)
410 map = tioca_kern->ca_pcigart_pagemap; 411 map = tioca_kern->ca_pcigart_pagemap;
411 mapsize = tioca_kern->ca_pcigart_entries; 412 mapsize = tioca_kern->ca_pcigart_entries;
412 413
413 entry = find_first_zero_bit(map, mapsize); 414 entry = bitmap_find_next_zero_area(map, mapsize, 0, entries, 0);
414 while (entry < mapsize) { 415 if (entry >= mapsize) {
415 last_entry = find_next_bit(map, mapsize, entry);
416
417 if (last_entry - entry >= entries)
418 break;
419
420 entry = find_next_zero_bit(map, mapsize, last_entry);
421 }
422
423 if (entry > mapsize) {
424 kfree(ca_dmamap); 416 kfree(ca_dmamap);
425 goto map_return; 417 goto map_return;
426 } 418 }
427 419
428 for (i = 0; i < entries; i++) 420 bitmap_set(map, entry, entries);
429 set_bit(entry + i, map);
430 421
431 bus_addr = tioca_kern->ca_pciap_base + (entry * ps); 422 bus_addr = tioca_kern->ca_pciap_base + (entry * ps);
432 423
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index f042e192d2fe..a3fb7cf9ae1d 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -63,19 +63,19 @@ xen_free_irq_vector(int vector)
63} 63}
64 64
65 65
66static DEFINE_PER_CPU(int, timer_irq) = -1; 66static DEFINE_PER_CPU(int, xen_timer_irq) = -1;
67static DEFINE_PER_CPU(int, ipi_irq) = -1; 67static DEFINE_PER_CPU(int, xen_ipi_irq) = -1;
68static DEFINE_PER_CPU(int, resched_irq) = -1; 68static DEFINE_PER_CPU(int, xen_resched_irq) = -1;
69static DEFINE_PER_CPU(int, cmc_irq) = -1; 69static DEFINE_PER_CPU(int, xen_cmc_irq) = -1;
70static DEFINE_PER_CPU(int, cmcp_irq) = -1; 70static DEFINE_PER_CPU(int, xen_cmcp_irq) = -1;
71static DEFINE_PER_CPU(int, cpep_irq) = -1; 71static DEFINE_PER_CPU(int, xen_cpep_irq) = -1;
72#define NAME_SIZE 15 72#define NAME_SIZE 15
73static DEFINE_PER_CPU(char[NAME_SIZE], timer_name); 73static DEFINE_PER_CPU(char[NAME_SIZE], xen_timer_name);
74static DEFINE_PER_CPU(char[NAME_SIZE], ipi_name); 74static DEFINE_PER_CPU(char[NAME_SIZE], xen_ipi_name);
75static DEFINE_PER_CPU(char[NAME_SIZE], resched_name); 75static DEFINE_PER_CPU(char[NAME_SIZE], xen_resched_name);
76static DEFINE_PER_CPU(char[NAME_SIZE], cmc_name); 76static DEFINE_PER_CPU(char[NAME_SIZE], xen_cmc_name);
77static DEFINE_PER_CPU(char[NAME_SIZE], cmcp_name); 77static DEFINE_PER_CPU(char[NAME_SIZE], xen_cmcp_name);
78static DEFINE_PER_CPU(char[NAME_SIZE], cpep_name); 78static DEFINE_PER_CPU(char[NAME_SIZE], xen_cpep_name);
79#undef NAME_SIZE 79#undef NAME_SIZE
80 80
81struct saved_irq { 81struct saved_irq {
@@ -144,64 +144,64 @@ __xen_register_percpu_irq(unsigned int cpu, unsigned int vec,
144 if (xen_slab_ready) { 144 if (xen_slab_ready) {
145 switch (vec) { 145 switch (vec) {
146 case IA64_TIMER_VECTOR: 146 case IA64_TIMER_VECTOR:
147 snprintf(per_cpu(timer_name, cpu), 147 snprintf(per_cpu(xen_timer_name, cpu),
148 sizeof(per_cpu(timer_name, cpu)), 148 sizeof(per_cpu(xen_timer_name, cpu)),
149 "%s%d", action->name, cpu); 149 "%s%d", action->name, cpu);
150 irq = bind_virq_to_irqhandler(VIRQ_ITC, cpu, 150 irq = bind_virq_to_irqhandler(VIRQ_ITC, cpu,
151 action->handler, action->flags, 151 action->handler, action->flags,
152 per_cpu(timer_name, cpu), action->dev_id); 152 per_cpu(xen_timer_name, cpu), action->dev_id);
153 per_cpu(timer_irq, cpu) = irq; 153 per_cpu(xen_timer_irq, cpu) = irq;
154 break; 154 break;
155 case IA64_IPI_RESCHEDULE: 155 case IA64_IPI_RESCHEDULE:
156 snprintf(per_cpu(resched_name, cpu), 156 snprintf(per_cpu(xen_resched_name, cpu),
157 sizeof(per_cpu(resched_name, cpu)), 157 sizeof(per_cpu(xen_resched_name, cpu)),
158 "%s%d", action->name, cpu); 158 "%s%d", action->name, cpu);
159 irq = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR, cpu, 159 irq = bind_ipi_to_irqhandler(XEN_RESCHEDULE_VECTOR, cpu,
160 action->handler, action->flags, 160 action->handler, action->flags,
161 per_cpu(resched_name, cpu), action->dev_id); 161 per_cpu(xen_resched_name, cpu), action->dev_id);
162 per_cpu(resched_irq, cpu) = irq; 162 per_cpu(xen_resched_irq, cpu) = irq;
163 break; 163 break;
164 case IA64_IPI_VECTOR: 164 case IA64_IPI_VECTOR:
165 snprintf(per_cpu(ipi_name, cpu), 165 snprintf(per_cpu(xen_ipi_name, cpu),
166 sizeof(per_cpu(ipi_name, cpu)), 166 sizeof(per_cpu(xen_ipi_name, cpu)),
167 "%s%d", action->name, cpu); 167 "%s%d", action->name, cpu);
168 irq = bind_ipi_to_irqhandler(XEN_IPI_VECTOR, cpu, 168 irq = bind_ipi_to_irqhandler(XEN_IPI_VECTOR, cpu,
169 action->handler, action->flags, 169 action->handler, action->flags,
170 per_cpu(ipi_name, cpu), action->dev_id); 170 per_cpu(xen_ipi_name, cpu), action->dev_id);
171 per_cpu(ipi_irq, cpu) = irq; 171 per_cpu(xen_ipi_irq, cpu) = irq;
172 break; 172 break;
173 case IA64_CMC_VECTOR: 173 case IA64_CMC_VECTOR:
174 snprintf(per_cpu(cmc_name, cpu), 174 snprintf(per_cpu(xen_cmc_name, cpu),
175 sizeof(per_cpu(cmc_name, cpu)), 175 sizeof(per_cpu(xen_cmc_name, cpu)),
176 "%s%d", action->name, cpu); 176 "%s%d", action->name, cpu);
177 irq = bind_virq_to_irqhandler(VIRQ_MCA_CMC, cpu, 177 irq = bind_virq_to_irqhandler(VIRQ_MCA_CMC, cpu,
178 action->handler, 178 action->handler,
179 action->flags, 179 action->flags,
180 per_cpu(cmc_name, cpu), 180 per_cpu(xen_cmc_name, cpu),
181 action->dev_id); 181 action->dev_id);
182 per_cpu(cmc_irq, cpu) = irq; 182 per_cpu(xen_cmc_irq, cpu) = irq;
183 break; 183 break;
184 case IA64_CMCP_VECTOR: 184 case IA64_CMCP_VECTOR:
185 snprintf(per_cpu(cmcp_name, cpu), 185 snprintf(per_cpu(xen_cmcp_name, cpu),
186 sizeof(per_cpu(cmcp_name, cpu)), 186 sizeof(per_cpu(xen_cmcp_name, cpu)),
187 "%s%d", action->name, cpu); 187 "%s%d", action->name, cpu);
188 irq = bind_ipi_to_irqhandler(XEN_CMCP_VECTOR, cpu, 188 irq = bind_ipi_to_irqhandler(XEN_CMCP_VECTOR, cpu,
189 action->handler, 189 action->handler,
190 action->flags, 190 action->flags,
191 per_cpu(cmcp_name, cpu), 191 per_cpu(xen_cmcp_name, cpu),
192 action->dev_id); 192 action->dev_id);
193 per_cpu(cmcp_irq, cpu) = irq; 193 per_cpu(xen_cmcp_irq, cpu) = irq;
194 break; 194 break;
195 case IA64_CPEP_VECTOR: 195 case IA64_CPEP_VECTOR:
196 snprintf(per_cpu(cpep_name, cpu), 196 snprintf(per_cpu(xen_cpep_name, cpu),
197 sizeof(per_cpu(cpep_name, cpu)), 197 sizeof(per_cpu(xen_cpep_name, cpu)),
198 "%s%d", action->name, cpu); 198 "%s%d", action->name, cpu);
199 irq = bind_ipi_to_irqhandler(XEN_CPEP_VECTOR, cpu, 199 irq = bind_ipi_to_irqhandler(XEN_CPEP_VECTOR, cpu,
200 action->handler, 200 action->handler,
201 action->flags, 201 action->flags,
202 per_cpu(cpep_name, cpu), 202 per_cpu(xen_cpep_name, cpu),
203 action->dev_id); 203 action->dev_id);
204 per_cpu(cpep_irq, cpu) = irq; 204 per_cpu(xen_cpep_irq, cpu) = irq;
205 break; 205 break;
206 case IA64_CPE_VECTOR: 206 case IA64_CPE_VECTOR:
207 case IA64_MCA_RENDEZ_VECTOR: 207 case IA64_MCA_RENDEZ_VECTOR:
@@ -275,30 +275,33 @@ unbind_evtchn_callback(struct notifier_block *nfb,
275 275
276 if (action == CPU_DEAD) { 276 if (action == CPU_DEAD) {
277 /* Unregister evtchn. */ 277 /* Unregister evtchn. */
278 if (per_cpu(cpep_irq, cpu) >= 0) { 278 if (per_cpu(xen_cpep_irq, cpu) >= 0) {
279 unbind_from_irqhandler(per_cpu(cpep_irq, cpu), NULL); 279 unbind_from_irqhandler(per_cpu(xen_cpep_irq, cpu),
280 per_cpu(cpep_irq, cpu) = -1; 280 NULL);
281 per_cpu(xen_cpep_irq, cpu) = -1;
281 } 282 }
282 if (per_cpu(cmcp_irq, cpu) >= 0) { 283 if (per_cpu(xen_cmcp_irq, cpu) >= 0) {
283 unbind_from_irqhandler(per_cpu(cmcp_irq, cpu), NULL); 284 unbind_from_irqhandler(per_cpu(xen_cmcp_irq, cpu),
284 per_cpu(cmcp_irq, cpu) = -1; 285 NULL);
286 per_cpu(xen_cmcp_irq, cpu) = -1;
285 } 287 }
286 if (per_cpu(cmc_irq, cpu) >= 0) { 288 if (per_cpu(xen_cmc_irq, cpu) >= 0) {
287 unbind_from_irqhandler(per_cpu(cmc_irq, cpu), NULL); 289 unbind_from_irqhandler(per_cpu(xen_cmc_irq, cpu), NULL);
288 per_cpu(cmc_irq, cpu) = -1; 290 per_cpu(xen_cmc_irq, cpu) = -1;
289 } 291 }
290 if (per_cpu(ipi_irq, cpu) >= 0) { 292 if (per_cpu(xen_ipi_irq, cpu) >= 0) {
291 unbind_from_irqhandler(per_cpu(ipi_irq, cpu), NULL); 293 unbind_from_irqhandler(per_cpu(xen_ipi_irq, cpu), NULL);
292 per_cpu(ipi_irq, cpu) = -1; 294 per_cpu(xen_ipi_irq, cpu) = -1;
293 } 295 }
294 if (per_cpu(resched_irq, cpu) >= 0) { 296 if (per_cpu(xen_resched_irq, cpu) >= 0) {
295 unbind_from_irqhandler(per_cpu(resched_irq, cpu), 297 unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu),
296 NULL); 298 NULL);
297 per_cpu(resched_irq, cpu) = -1; 299 per_cpu(xen_resched_irq, cpu) = -1;
298 } 300 }
299 if (per_cpu(timer_irq, cpu) >= 0) { 301 if (per_cpu(xen_timer_irq, cpu) >= 0) {
300 unbind_from_irqhandler(per_cpu(timer_irq, cpu), NULL); 302 unbind_from_irqhandler(per_cpu(xen_timer_irq, cpu),
301 per_cpu(timer_irq, cpu) = -1; 303 NULL);
304 per_cpu(xen_timer_irq, cpu) = -1;
302 } 305 }
303 } 306 }
304 return NOTIFY_OK; 307 return NOTIFY_OK;
diff --git a/arch/ia64/xen/time.c b/arch/ia64/xen/time.c
index dbeadb9c8e20..c1c544513e8d 100644
--- a/arch/ia64/xen/time.c
+++ b/arch/ia64/xen/time.c
@@ -34,15 +34,15 @@
34 34
35#include "../kernel/fsyscall_gtod_data.h" 35#include "../kernel/fsyscall_gtod_data.h"
36 36
37DEFINE_PER_CPU(struct vcpu_runstate_info, runstate); 37static DEFINE_PER_CPU(struct vcpu_runstate_info, xen_runstate);
38DEFINE_PER_CPU(unsigned long, processed_stolen_time); 38static DEFINE_PER_CPU(unsigned long, xen_stolen_time);
39DEFINE_PER_CPU(unsigned long, processed_blocked_time); 39static DEFINE_PER_CPU(unsigned long, xen_blocked_time);
40 40
41/* taken from i386/kernel/time-xen.c */ 41/* taken from i386/kernel/time-xen.c */
42static void xen_init_missing_ticks_accounting(int cpu) 42static void xen_init_missing_ticks_accounting(int cpu)
43{ 43{
44 struct vcpu_register_runstate_memory_area area; 44 struct vcpu_register_runstate_memory_area area;
45 struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu); 45 struct vcpu_runstate_info *runstate = &per_cpu(xen_runstate, cpu);
46 int rc; 46 int rc;
47 47
48 memset(runstate, 0, sizeof(*runstate)); 48 memset(runstate, 0, sizeof(*runstate));
@@ -52,8 +52,8 @@ static void xen_init_missing_ticks_accounting(int cpu)
52 &area); 52 &area);
53 WARN_ON(rc && rc != -ENOSYS); 53 WARN_ON(rc && rc != -ENOSYS);
54 54
55 per_cpu(processed_blocked_time, cpu) = runstate->time[RUNSTATE_blocked]; 55 per_cpu(xen_blocked_time, cpu) = runstate->time[RUNSTATE_blocked];
56 per_cpu(processed_stolen_time, cpu) = runstate->time[RUNSTATE_runnable] 56 per_cpu(xen_stolen_time, cpu) = runstate->time[RUNSTATE_runnable]
57 + runstate->time[RUNSTATE_offline]; 57 + runstate->time[RUNSTATE_offline];
58} 58}
59 59
@@ -68,7 +68,7 @@ static void get_runstate_snapshot(struct vcpu_runstate_info *res)
68 68
69 BUG_ON(preemptible()); 69 BUG_ON(preemptible());
70 70
71 state = &__get_cpu_var(runstate); 71 state = &__get_cpu_var(xen_runstate);
72 72
73 /* 73 /*
74 * The runstate info is always updated by the hypervisor on 74 * The runstate info is always updated by the hypervisor on
@@ -103,12 +103,12 @@ consider_steal_time(unsigned long new_itm)
103 * This function just checks and reject this effect. 103 * This function just checks and reject this effect.
104 */ 104 */
105 if (!time_after_eq(runstate.time[RUNSTATE_blocked], 105 if (!time_after_eq(runstate.time[RUNSTATE_blocked],
106 per_cpu(processed_blocked_time, cpu))) 106 per_cpu(xen_blocked_time, cpu)))
107 blocked = 0; 107 blocked = 0;
108 108
109 if (!time_after_eq(runstate.time[RUNSTATE_runnable] + 109 if (!time_after_eq(runstate.time[RUNSTATE_runnable] +
110 runstate.time[RUNSTATE_offline], 110 runstate.time[RUNSTATE_offline],
111 per_cpu(processed_stolen_time, cpu))) 111 per_cpu(xen_stolen_time, cpu)))
112 stolen = 0; 112 stolen = 0;
113 113
114 if (!time_after(delta_itm + new_itm, ia64_get_itc())) 114 if (!time_after(delta_itm + new_itm, ia64_get_itc()))
@@ -147,8 +147,8 @@ consider_steal_time(unsigned long new_itm)
147 } else { 147 } else {
148 local_cpu_data->itm_next = delta_itm + new_itm; 148 local_cpu_data->itm_next = delta_itm + new_itm;
149 } 149 }
150 per_cpu(processed_stolen_time, cpu) += NS_PER_TICK * stolen; 150 per_cpu(xen_stolen_time, cpu) += NS_PER_TICK * stolen;
151 per_cpu(processed_blocked_time, cpu) += NS_PER_TICK * blocked; 151 per_cpu(xen_blocked_time, cpu) += NS_PER_TICK * blocked;
152 } 152 }
153 return delta_itm; 153 return delta_itm;
154} 154}
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h
index 0cc34c94bf2b..2f85412ef730 100644
--- a/arch/m32r/include/asm/elf.h
+++ b/arch/m32r/include/asm/elf.h
@@ -102,7 +102,6 @@ typedef elf_fpreg_t elf_fpregset_t;
102 */ 102 */
103#define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0 103#define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0
104 104
105#define USE_ELF_CORE_DUMP
106#define ELF_EXEC_PAGESIZE PAGE_SIZE 105#define ELF_EXEC_PAGESIZE PAGE_SIZE
107 106
108/* 107/*
diff --git a/arch/m32r/include/asm/spinlock.h b/arch/m32r/include/asm/spinlock.h
index dded923883b2..179a06489b10 100644
--- a/arch/m32r/include/asm/spinlock.h
+++ b/arch/m32r/include/asm/spinlock.h
@@ -24,19 +24,19 @@
24 * We make no fairness assumptions. They have a cost. 24 * We make no fairness assumptions. They have a cost.
25 */ 25 */
26 26
27#define __raw_spin_is_locked(x) (*(volatile int *)(&(x)->slock) <= 0) 27#define arch_spin_is_locked(x) (*(volatile int *)(&(x)->slock) <= 0)
28#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 28#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
29#define __raw_spin_unlock_wait(x) \ 29#define arch_spin_unlock_wait(x) \
30 do { cpu_relax(); } while (__raw_spin_is_locked(x)) 30 do { cpu_relax(); } while (arch_spin_is_locked(x))
31 31
32/** 32/**
33 * __raw_spin_trylock - Try spin lock and return a result 33 * arch_spin_trylock - Try spin lock and return a result
34 * @lock: Pointer to the lock variable 34 * @lock: Pointer to the lock variable
35 * 35 *
36 * __raw_spin_trylock() tries to get the lock and returns a result. 36 * arch_spin_trylock() tries to get the lock and returns a result.
37 * On the m32r, the result value is 1 (= Success) or 0 (= Failure). 37 * On the m32r, the result value is 1 (= Success) or 0 (= Failure).
38 */ 38 */
39static inline int __raw_spin_trylock(raw_spinlock_t *lock) 39static inline int arch_spin_trylock(arch_spinlock_t *lock)
40{ 40{
41 int oldval; 41 int oldval;
42 unsigned long tmp1, tmp2; 42 unsigned long tmp1, tmp2;
@@ -50,7 +50,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
50 * } 50 * }
51 */ 51 */
52 __asm__ __volatile__ ( 52 __asm__ __volatile__ (
53 "# __raw_spin_trylock \n\t" 53 "# arch_spin_trylock \n\t"
54 "ldi %1, #0; \n\t" 54 "ldi %1, #0; \n\t"
55 "mvfc %2, psw; \n\t" 55 "mvfc %2, psw; \n\t"
56 "clrpsw #0x40 -> nop; \n\t" 56 "clrpsw #0x40 -> nop; \n\t"
@@ -69,7 +69,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
69 return (oldval > 0); 69 return (oldval > 0);
70} 70}
71 71
72static inline void __raw_spin_lock(raw_spinlock_t *lock) 72static inline void arch_spin_lock(arch_spinlock_t *lock)
73{ 73{
74 unsigned long tmp0, tmp1; 74 unsigned long tmp0, tmp1;
75 75
@@ -84,7 +84,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
84 * } 84 * }
85 */ 85 */
86 __asm__ __volatile__ ( 86 __asm__ __volatile__ (
87 "# __raw_spin_lock \n\t" 87 "# arch_spin_lock \n\t"
88 ".fillinsn \n" 88 ".fillinsn \n"
89 "1: \n\t" 89 "1: \n\t"
90 "mvfc %1, psw; \n\t" 90 "mvfc %1, psw; \n\t"
@@ -111,7 +111,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
111 ); 111 );
112} 112}
113 113
114static inline void __raw_spin_unlock(raw_spinlock_t *lock) 114static inline void arch_spin_unlock(arch_spinlock_t *lock)
115{ 115{
116 mb(); 116 mb();
117 lock->slock = 1; 117 lock->slock = 1;
@@ -140,15 +140,15 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
140 * read_can_lock - would read_trylock() succeed? 140 * read_can_lock - would read_trylock() succeed?
141 * @lock: the rwlock in question. 141 * @lock: the rwlock in question.
142 */ 142 */
143#define __raw_read_can_lock(x) ((int)(x)->lock > 0) 143#define arch_read_can_lock(x) ((int)(x)->lock > 0)
144 144
145/** 145/**
146 * write_can_lock - would write_trylock() succeed? 146 * write_can_lock - would write_trylock() succeed?
147 * @lock: the rwlock in question. 147 * @lock: the rwlock in question.
148 */ 148 */
149#define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) 149#define arch_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
150 150
151static inline void __raw_read_lock(raw_rwlock_t *rw) 151static inline void arch_read_lock(arch_rwlock_t *rw)
152{ 152{
153 unsigned long tmp0, tmp1; 153 unsigned long tmp0, tmp1;
154 154
@@ -199,7 +199,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
199 ); 199 );
200} 200}
201 201
202static inline void __raw_write_lock(raw_rwlock_t *rw) 202static inline void arch_write_lock(arch_rwlock_t *rw)
203{ 203{
204 unsigned long tmp0, tmp1, tmp2; 204 unsigned long tmp0, tmp1, tmp2;
205 205
@@ -252,7 +252,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
252 ); 252 );
253} 253}
254 254
255static inline void __raw_read_unlock(raw_rwlock_t *rw) 255static inline void arch_read_unlock(arch_rwlock_t *rw)
256{ 256{
257 unsigned long tmp0, tmp1; 257 unsigned long tmp0, tmp1;
258 258
@@ -274,7 +274,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
274 ); 274 );
275} 275}
276 276
277static inline void __raw_write_unlock(raw_rwlock_t *rw) 277static inline void arch_write_unlock(arch_rwlock_t *rw)
278{ 278{
279 unsigned long tmp0, tmp1, tmp2; 279 unsigned long tmp0, tmp1, tmp2;
280 280
@@ -298,7 +298,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
298 ); 298 );
299} 299}
300 300
301static inline int __raw_read_trylock(raw_rwlock_t *lock) 301static inline int arch_read_trylock(arch_rwlock_t *lock)
302{ 302{
303 atomic_t *count = (atomic_t*)lock; 303 atomic_t *count = (atomic_t*)lock;
304 if (atomic_dec_return(count) >= 0) 304 if (atomic_dec_return(count) >= 0)
@@ -307,7 +307,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock)
307 return 0; 307 return 0;
308} 308}
309 309
310static inline int __raw_write_trylock(raw_rwlock_t *lock) 310static inline int arch_write_trylock(arch_rwlock_t *lock)
311{ 311{
312 atomic_t *count = (atomic_t *)lock; 312 atomic_t *count = (atomic_t *)lock;
313 if (atomic_sub_and_test(RW_LOCK_BIAS, count)) 313 if (atomic_sub_and_test(RW_LOCK_BIAS, count))
@@ -316,11 +316,11 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)
316 return 0; 316 return 0;
317} 317}
318 318
319#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 319#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
320#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 320#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
321 321
322#define _raw_spin_relax(lock) cpu_relax() 322#define arch_spin_relax(lock) cpu_relax()
323#define _raw_read_relax(lock) cpu_relax() 323#define arch_read_relax(lock) cpu_relax()
324#define _raw_write_relax(lock) cpu_relax() 324#define arch_write_relax(lock) cpu_relax()
325 325
326#endif /* _ASM_M32R_SPINLOCK_H */ 326#endif /* _ASM_M32R_SPINLOCK_H */
diff --git a/arch/m32r/include/asm/spinlock_types.h b/arch/m32r/include/asm/spinlock_types.h
index 83f52105c0e4..92e27672661f 100644
--- a/arch/m32r/include/asm/spinlock_types.h
+++ b/arch/m32r/include/asm/spinlock_types.h
@@ -7,17 +7,17 @@
7 7
8typedef struct { 8typedef struct {
9 volatile int slock; 9 volatile int slock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 1 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 1 }
13 13
14typedef struct { 14typedef struct {
15 volatile int lock; 15 volatile int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define RW_LOCK_BIAS 0x01000000 18#define RW_LOCK_BIAS 0x01000000
19#define RW_LOCK_BIAS_STR "0x01000000" 19#define RW_LOCK_BIAS_STR "0x01000000"
20 20
21#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 21#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
22 22
23#endif /* _ASM_M32R_SPINLOCK_TYPES_H */ 23#endif /* _ASM_M32R_SPINLOCK_TYPES_H */
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c
index 8dfd31e87c4c..3c71f776872c 100644
--- a/arch/m32r/kernel/irq.c
+++ b/arch/m32r/kernel/irq.c
@@ -40,7 +40,7 @@ int show_interrupts(struct seq_file *p, void *v)
40 } 40 }
41 41
42 if (i < NR_IRQS) { 42 if (i < NR_IRQS) {
43 spin_lock_irqsave(&irq_desc[i].lock, flags); 43 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
44 action = irq_desc[i].action; 44 action = irq_desc[i].action;
45 if (!action) 45 if (!action)
46 goto skip; 46 goto skip;
@@ -59,7 +59,7 @@ int show_interrupts(struct seq_file *p, void *v)
59 59
60 seq_putc(p, '\n'); 60 seq_putc(p, '\n');
61skip: 61skip:
62 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 62 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
63 } 63 }
64 return 0; 64 return 0;
65} 65}
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index 305ac852bbed..d3c865c5a6ba 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -76,30 +76,6 @@ asmlinkage int sys_tas(int __user *addr)
76 return oldval; 76 return oldval;
77} 77}
78 78
79asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
80 unsigned long prot, unsigned long flags,
81 unsigned long fd, unsigned long pgoff)
82{
83 int error = -EBADF;
84 struct file *file = NULL;
85
86 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
87 if (!(flags & MAP_ANONYMOUS)) {
88 file = fget(fd);
89 if (!file)
90 goto out;
91 }
92
93 down_write(&current->mm->mmap_sem);
94 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
95 up_write(&current->mm->mmap_sem);
96
97 if (file)
98 fput(file);
99out:
100 return error;
101}
102
103/* 79/*
104 * sys_ipc() is the de-multiplexer for the SysV IPC calls.. 80 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
105 * 81 *
diff --git a/arch/m32r/kernel/syscall_table.S b/arch/m32r/kernel/syscall_table.S
index aa3bf4cfab37..60536e271233 100644
--- a/arch/m32r/kernel/syscall_table.S
+++ b/arch/m32r/kernel/syscall_table.S
@@ -191,7 +191,7 @@ ENTRY(sys_call_table)
191 .long sys_ni_syscall /* streams2 */ 191 .long sys_ni_syscall /* streams2 */
192 .long sys_vfork /* 190 */ 192 .long sys_vfork /* 190 */
193 .long sys_getrlimit 193 .long sys_getrlimit
194 .long sys_mmap2 194 .long sys_mmap_pgoff
195 .long sys_truncate64 195 .long sys_truncate64
196 .long sys_ftruncate64 196 .long sys_ftruncate64
197 .long sys_stat64 /* 195 */ 197 .long sys_stat64 /* 195 */
diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S
index 6c1a9a217887..73613b5f1ee5 100644
--- a/arch/m68k/ifpsp060/src/fpsp.S
+++ b/arch/m68k/ifpsp060/src/fpsp.S
@@ -753,7 +753,7 @@ fovfl_ovfl_on:
753 753
754 bra.l _real_ovfl 754 bra.l _real_ovfl
755 755
756# overflow occurred but is disabled. meanwhile, inexact is enabled. therefore, 756# overflow occurred but is disabled. meanwhile, inexact is enabled. Therefore,
757# we must jump to real_inex(). 757# we must jump to real_inex().
758fovfl_inex_on: 758fovfl_inex_on:
759 759
@@ -1015,7 +1015,7 @@ funfl_unfl_on2:
1015 1015
1016 bra.l _real_unfl 1016 bra.l _real_unfl
1017 1017
1018# undeflow occurred but is disabled. meanwhile, inexact is enabled. therefore, 1018# underflow occurred but is disabled. meanwhile, inexact is enabled. Therefore,
1019# we must jump to real_inex(). 1019# we must jump to real_inex().
1020funfl_inex_on: 1020funfl_inex_on:
1021 1021
@@ -2963,7 +2963,7 @@ iea_disabled:
2963 2963
2964 tst.w %d0 # is instr fmovm? 2964 tst.w %d0 # is instr fmovm?
2965 bmi.b iea_dis_fmovm # yes 2965 bmi.b iea_dis_fmovm # yes
2966# instruction is using an extended precision immediate operand. therefore, 2966# instruction is using an extended precision immediate operand. Therefore,
2967# the total instruction length is 16 bytes. 2967# the total instruction length is 16 bytes.
2968iea_dis_immed: 2968iea_dis_immed:
2969 mov.l &0x10,%d0 # 16 bytes of instruction 2969 mov.l &0x10,%d0 # 16 bytes of instruction
@@ -9624,7 +9624,7 @@ sok_dnrm:
9624 bge.b sok_norm2 # thank goodness no 9624 bge.b sok_norm2 # thank goodness no
9625 9625
9626# the multiply factor that we're trying to create should be a denorm 9626# the multiply factor that we're trying to create should be a denorm
9627# for the multiply to work. therefore, we're going to actually do a 9627# for the multiply to work. Therefore, we're going to actually do a
9628# multiply with a denorm which will cause an unimplemented data type 9628# multiply with a denorm which will cause an unimplemented data type
9629# exception to be put into the machine which will be caught and corrected 9629# exception to be put into the machine which will be caught and corrected
9630# later. we don't do this with the DENORMs above because this method 9630# later. we don't do this with the DENORMs above because this method
@@ -12216,7 +12216,7 @@ fin_sd_unfl_dis:
12216 12216
12217# 12217#
12218# operand will underflow AND underflow or inexact is enabled. 12218# operand will underflow AND underflow or inexact is enabled.
12219# therefore, we must return the result rounded to extended precision. 12219# Therefore, we must return the result rounded to extended precision.
12220# 12220#
12221fin_sd_unfl_ena: 12221fin_sd_unfl_ena:
12222 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 12222 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -12746,7 +12746,7 @@ fdiv_zero_load_p:
12746 12746
12747# 12747#
12748# The destination was In Range and the source was a ZERO. The result, 12748# The destination was In Range and the source was a ZERO. The result,
12749# therefore, is an INF w/ the proper sign. 12749# Therefore, is an INF w/ the proper sign.
12750# So, determine the sign and return a new INF (w/ the j-bit cleared). 12750# So, determine the sign and return a new INF (w/ the j-bit cleared).
12751# 12751#
12752 global fdiv_inf_load # global for fsgldiv 12752 global fdiv_inf_load # global for fsgldiv
@@ -12996,7 +12996,7 @@ fneg_sd_unfl_dis:
12996 12996
12997# 12997#
12998# operand will underflow AND underflow is enabled. 12998# operand will underflow AND underflow is enabled.
12999# therefore, we must return the result rounded to extended precision. 12999# Therefore, we must return the result rounded to extended precision.
13000# 13000#
13001fneg_sd_unfl_ena: 13001fneg_sd_unfl_ena:
13002 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 13002 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -13611,7 +13611,7 @@ fabs_sd_unfl_dis:
13611 13611
13612# 13612#
13613# operand will underflow AND underflow is enabled. 13613# operand will underflow AND underflow is enabled.
13614# therefore, we must return the result rounded to extended precision. 13614# Therefore, we must return the result rounded to extended precision.
13615# 13615#
13616fabs_sd_unfl_ena: 13616fabs_sd_unfl_ena:
13617 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 13617 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -14973,7 +14973,7 @@ fadd_zero_2:
14973 14973
14974# 14974#
14975# the ZEROes have opposite signs: 14975# the ZEROes have opposite signs:
14976# - therefore, we return +ZERO if the rounding modes are RN,RZ, or RP. 14976# - Therefore, we return +ZERO if the rounding modes are RN,RZ, or RP.
14977# - -ZERO is returned in the case of RM. 14977# - -ZERO is returned in the case of RM.
14978# 14978#
14979fadd_zero_2_chk_rm: 14979fadd_zero_2_chk_rm:
@@ -15425,7 +15425,7 @@ fsub_zero_2:
15425 15425
15426# 15426#
15427# the ZEROes have the same signs: 15427# the ZEROes have the same signs:
15428# - therefore, we return +ZERO if the rounding mode is RN,RZ, or RP 15428# - Therefore, we return +ZERO if the rounding mode is RN,RZ, or RP
15429# - -ZERO is returned in the case of RM. 15429# - -ZERO is returned in the case of RM.
15430# 15430#
15431fsub_zero_2_chk_rm: 15431fsub_zero_2_chk_rm:
@@ -15693,7 +15693,7 @@ fsqrt_sd_unfl_dis:
15693 15693
15694# 15694#
15695# operand will underflow AND underflow is enabled. 15695# operand will underflow AND underflow is enabled.
15696# therefore, we must return the result rounded to extended precision. 15696# Therefore, we must return the result rounded to extended precision.
15697# 15697#
15698fsqrt_sd_unfl_ena: 15698fsqrt_sd_unfl_ena:
15699 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 15699 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -21000,7 +21000,7 @@ fout_pack_type:
21000 tst.l %d0 21000 tst.l %d0
21001 bne.b fout_pack_set 21001 bne.b fout_pack_set
21002# "mantissa" is all zero which means that the answer is zero. but, the '040 21002# "mantissa" is all zero which means that the answer is zero. but, the '040
21003# algorithm allows the exponent to be non-zero. the 881/2 do not. therefore, 21003# algorithm allows the exponent to be non-zero. the 881/2 do not. Therefore,
21004# if the mantissa is zero, I will zero the exponent, too. 21004# if the mantissa is zero, I will zero the exponent, too.
21005# the question now is whether the exponents sign bit is allowed to be non-zero 21005# the question now is whether the exponents sign bit is allowed to be non-zero
21006# for a zero, also... 21006# for a zero, also...
@@ -21743,7 +21743,7 @@ denorm_set_stky:
21743 rts 21743 rts
21744 21744
21745# # 21745# #
21746# dnrm_lp(): normalize exponent/mantissa to specified threshhold # 21746# dnrm_lp(): normalize exponent/mantissa to specified threshold #
21747# # 21747# #
21748# INPUT: # 21748# INPUT: #
21749# %a0 : points to the operand to be denormalized # 21749# %a0 : points to the operand to be denormalized #
@@ -22402,7 +22402,7 @@ unnorm_shift:
22402 bgt.b unnorm_nrm_zero # yes; denorm only until exp = 0 22402 bgt.b unnorm_nrm_zero # yes; denorm only until exp = 0
22403 22403
22404# 22404#
22405# exponent would not go < 0. therefore, number stays normalized 22405# exponent would not go < 0. Therefore, number stays normalized
22406# 22406#
22407 sub.w %d0, %d1 # shift exponent value 22407 sub.w %d0, %d1 # shift exponent value
22408 mov.w FTEMP_EX(%a0), %d0 # load old exponent 22408 mov.w FTEMP_EX(%a0), %d0 # load old exponent
diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S
index 51b9f7d879dd..e71ba0ab013c 100644
--- a/arch/m68k/ifpsp060/src/pfpsp.S
+++ b/arch/m68k/ifpsp060/src/pfpsp.S
@@ -752,7 +752,7 @@ fovfl_ovfl_on:
752 752
753 bra.l _real_ovfl 753 bra.l _real_ovfl
754 754
755# overflow occurred but is disabled. meanwhile, inexact is enabled. therefore, 755# overflow occurred but is disabled. meanwhile, inexact is enabled. Therefore,
756# we must jump to real_inex(). 756# we must jump to real_inex().
757fovfl_inex_on: 757fovfl_inex_on:
758 758
@@ -1014,7 +1014,7 @@ funfl_unfl_on2:
1014 1014
1015 bra.l _real_unfl 1015 bra.l _real_unfl
1016 1016
1017# undeflow occurred but is disabled. meanwhile, inexact is enabled. therefore, 1017# underflow occurred but is disabled. meanwhile, inexact is enabled. Therefore,
1018# we must jump to real_inex(). 1018# we must jump to real_inex().
1019funfl_inex_on: 1019funfl_inex_on:
1020 1020
@@ -2962,7 +2962,7 @@ iea_disabled:
2962 2962
2963 tst.w %d0 # is instr fmovm? 2963 tst.w %d0 # is instr fmovm?
2964 bmi.b iea_dis_fmovm # yes 2964 bmi.b iea_dis_fmovm # yes
2965# instruction is using an extended precision immediate operand. therefore, 2965# instruction is using an extended precision immediate operand. Therefore,
2966# the total instruction length is 16 bytes. 2966# the total instruction length is 16 bytes.
2967iea_dis_immed: 2967iea_dis_immed:
2968 mov.l &0x10,%d0 # 16 bytes of instruction 2968 mov.l &0x10,%d0 # 16 bytes of instruction
@@ -5865,7 +5865,7 @@ denorm_set_stky:
5865 rts 5865 rts
5866 5866
5867# # 5867# #
5868# dnrm_lp(): normalize exponent/mantissa to specified threshhold # 5868# dnrm_lp(): normalize exponent/mantissa to specified threshold #
5869# # 5869# #
5870# INPUT: # 5870# INPUT: #
5871# %a0 : points to the operand to be denormalized # 5871# %a0 : points to the operand to be denormalized #
@@ -6524,7 +6524,7 @@ unnorm_shift:
6524 bgt.b unnorm_nrm_zero # yes; denorm only until exp = 0 6524 bgt.b unnorm_nrm_zero # yes; denorm only until exp = 0
6525 6525
6526# 6526#
6527# exponent would not go < 0. therefore, number stays normalized 6527# exponent would not go < 0. Therefore, number stays normalized
6528# 6528#
6529 sub.w %d0, %d1 # shift exponent value 6529 sub.w %d0, %d1 # shift exponent value
6530 mov.w FTEMP_EX(%a0), %d0 # load old exponent 6530 mov.w FTEMP_EX(%a0), %d0 # load old exponent
@@ -7901,7 +7901,7 @@ fout_pack_type:
7901 tst.l %d0 7901 tst.l %d0
7902 bne.b fout_pack_set 7902 bne.b fout_pack_set
7903# "mantissa" is all zero which means that the answer is zero. but, the '040 7903# "mantissa" is all zero which means that the answer is zero. but, the '040
7904# algorithm allows the exponent to be non-zero. the 881/2 do not. therefore, 7904# algorithm allows the exponent to be non-zero. the 881/2 do not. Therefore,
7905# if the mantissa is zero, I will zero the exponent, too. 7905# if the mantissa is zero, I will zero the exponent, too.
7906# the question now is whether the exponents sign bit is allowed to be non-zero 7906# the question now is whether the exponents sign bit is allowed to be non-zero
7907# for a zero, also... 7907# for a zero, also...
@@ -8647,7 +8647,7 @@ fin_sd_unfl_dis:
8647 8647
8648# 8648#
8649# operand will underflow AND underflow or inexact is enabled. 8649# operand will underflow AND underflow or inexact is enabled.
8650# therefore, we must return the result rounded to extended precision. 8650# Therefore, we must return the result rounded to extended precision.
8651# 8651#
8652fin_sd_unfl_ena: 8652fin_sd_unfl_ena:
8653 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 8653 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -9177,7 +9177,7 @@ fdiv_zero_load_p:
9177 9177
9178# 9178#
9179# The destination was In Range and the source was a ZERO. The result, 9179# The destination was In Range and the source was a ZERO. The result,
9180# therefore, is an INF w/ the proper sign. 9180# Therefore, is an INF w/ the proper sign.
9181# So, determine the sign and return a new INF (w/ the j-bit cleared). 9181# So, determine the sign and return a new INF (w/ the j-bit cleared).
9182# 9182#
9183 global fdiv_inf_load # global for fsgldiv 9183 global fdiv_inf_load # global for fsgldiv
@@ -9427,7 +9427,7 @@ fneg_sd_unfl_dis:
9427 9427
9428# 9428#
9429# operand will underflow AND underflow is enabled. 9429# operand will underflow AND underflow is enabled.
9430# therefore, we must return the result rounded to extended precision. 9430# Therefore, we must return the result rounded to extended precision.
9431# 9431#
9432fneg_sd_unfl_ena: 9432fneg_sd_unfl_ena:
9433 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 9433 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -10042,7 +10042,7 @@ fabs_sd_unfl_dis:
10042 10042
10043# 10043#
10044# operand will underflow AND underflow is enabled. 10044# operand will underflow AND underflow is enabled.
10045# therefore, we must return the result rounded to extended precision. 10045# Therefore, we must return the result rounded to extended precision.
10046# 10046#
10047fabs_sd_unfl_ena: 10047fabs_sd_unfl_ena:
10048 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 10048 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
@@ -11404,7 +11404,7 @@ fadd_zero_2:
11404 11404
11405# 11405#
11406# the ZEROes have opposite signs: 11406# the ZEROes have opposite signs:
11407# - therefore, we return +ZERO if the rounding modes are RN,RZ, or RP. 11407# - Therefore, we return +ZERO if the rounding modes are RN,RZ, or RP.
11408# - -ZERO is returned in the case of RM. 11408# - -ZERO is returned in the case of RM.
11409# 11409#
11410fadd_zero_2_chk_rm: 11410fadd_zero_2_chk_rm:
@@ -11856,7 +11856,7 @@ fsub_zero_2:
11856 11856
11857# 11857#
11858# the ZEROes have the same signs: 11858# the ZEROes have the same signs:
11859# - therefore, we return +ZERO if the rounding mode is RN,RZ, or RP 11859# - Therefore, we return +ZERO if the rounding mode is RN,RZ, or RP
11860# - -ZERO is returned in the case of RM. 11860# - -ZERO is returned in the case of RM.
11861# 11861#
11862fsub_zero_2_chk_rm: 11862fsub_zero_2_chk_rm:
@@ -12124,7 +12124,7 @@ fsqrt_sd_unfl_dis:
12124 12124
12125# 12125#
12126# operand will underflow AND underflow is enabled. 12126# operand will underflow AND underflow is enabled.
12127# therefore, we must return the result rounded to extended precision. 12127# Therefore, we must return the result rounded to extended precision.
12128# 12128#
12129fsqrt_sd_unfl_ena: 12129fsqrt_sd_unfl_ena:
12130 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6) 12130 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
diff --git a/arch/m68k/include/asm/asm-offsets.h b/arch/m68k/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/m68k/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h
index fb8a06b9ab6a..67e7a78ad96b 100644
--- a/arch/m68k/include/asm/bootinfo.h
+++ b/arch/m68k/include/asm/bootinfo.h
@@ -145,7 +145,7 @@ struct bi_record {
145 145
146 /* 146 /*
147 * Macintosh hardware profile data - unused, see macintosh.h for 147 * Macintosh hardware profile data - unused, see macintosh.h for
148 * resonable type values 148 * reasonable type values
149 */ 149 */
150 150
151#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */ 151#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
index 0b0f49eb876b..01c193d91412 100644
--- a/arch/m68k/include/asm/elf.h
+++ b/arch/m68k/include/asm/elf.h
@@ -59,7 +59,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
59 is actually used on ASV. */ 59 is actually used on ASV. */
60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
61 61
62#define USE_ELF_CORE_DUMP
63#ifndef CONFIG_SUN3 62#ifndef CONFIG_SUN3
64#define ELF_EXEC_PAGESIZE 4096 63#define ELF_EXEC_PAGESIZE 4096
65#else 64#else
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h
index fe60e1abaee8..aca0e28581c7 100644
--- a/arch/m68k/include/asm/pgtable_mm.h
+++ b/arch/m68k/include/asm/pgtable_mm.h
@@ -83,9 +83,9 @@
83#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) 83#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
84#define VMALLOC_END KMAP_START 84#define VMALLOC_END KMAP_START
85#else 85#else
86extern unsigned long vmalloc_end; 86extern unsigned long m68k_vmalloc_end;
87#define VMALLOC_START 0x0f800000 87#define VMALLOC_START 0x0f800000
88#define VMALLOC_END vmalloc_end 88#define VMALLOC_END m68k_vmalloc_end
89#endif /* CONFIG_SUN3 */ 89#endif /* CONFIG_SUN3 */
90 90
91/* zero page used for uninitialized stuff */ 91/* zero page used for uninitialized stuff */
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index 74fd674b15ad..cbd3d4751dd2 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -165,6 +165,8 @@ unsigned long get_wchan(struct task_struct *p);
165 eip; }) 165 eip; })
166#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) 166#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
167 167
168#define task_pt_regs(tsk) ((struct pt_regs *) ((tsk)->thread.esp0))
169
168#define cpu_relax() barrier() 170#define cpu_relax() barrier()
169 171
170#endif 172#endif
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h
index a6ab663bcc2e..ee4011c23281 100644
--- a/arch/m68k/include/asm/ptrace.h
+++ b/arch/m68k/include/asm/ptrace.h
@@ -86,7 +86,7 @@ struct switch_stack {
86extern void show_regs(struct pt_regs *); 86extern void show_regs(struct pt_regs *);
87 87
88/* 88/*
89 * These are defined as per linux/ptrace.h, which see. 89 * These are defined as per linux/ptrace.h.
90 */ 90 */
91struct task_struct; 91struct task_struct;
92 92
diff --git a/arch/m68k/include/asm/thread_info_no.h b/arch/m68k/include/asm/thread_info_no.h
index c2bde5e24b0b..a6512bfdd01d 100644
--- a/arch/m68k/include/asm/thread_info_no.h
+++ b/arch/m68k/include/asm/thread_info_no.h
@@ -12,8 +12,6 @@
12 12
13#ifdef __KERNEL__ 13#ifdef __KERNEL__
14 14
15#ifndef __ASSEMBLY__
16
17/* 15/*
18 * Size of kernel stack for each process. This must be a power of 2... 16 * Size of kernel stack for each process. This must be a power of 2...
19 */ 17 */
@@ -28,6 +26,8 @@
28 */ 26 */
29#define THREAD_SIZE (PAGE_SIZE<<THREAD_SIZE_ORDER) 27#define THREAD_SIZE (PAGE_SIZE<<THREAD_SIZE_ORDER)
30 28
29#ifndef __ASSEMBLY__
30
31/* 31/*
32 * low level task data. 32 * low level task data.
33 */ 33 */
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index 86edb5fbcfc3..ef54128baa0b 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -196,7 +196,7 @@
196 * for them and trying to understand what they mean. 196 * for them and trying to understand what they mean.
197 * 197 *
198 * CONFIG_xxx: These are the obvious machine configuration defines created 198 * CONFIG_xxx: These are the obvious machine configuration defines created
199 * during configuration. These are defined in include/linux/autoconf.h. 199 * during configuration. These are defined in autoconf.h.
200 * 200 *
201 * CONSOLE: There is support for head.S console in this file. This 201 * CONSOLE: There is support for head.S console in this file. This
202 * console can talk to a Mac frame buffer, but could easily be extrapolated 202 * console can talk to a Mac frame buffer, but could easily be extrapolated
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 7deb402bfc75..218f441de667 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -29,37 +29,16 @@
29#include <asm/page.h> 29#include <asm/page.h>
30#include <asm/unistd.h> 30#include <asm/unistd.h>
31 31
32/* common code for old and new mmaps */
33static inline long do_mmap2(
34 unsigned long addr, unsigned long len,
35 unsigned long prot, unsigned long flags,
36 unsigned long fd, unsigned long pgoff)
37{
38 int error = -EBADF;
39 struct file * file = NULL;
40
41 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
42 if (!(flags & MAP_ANONYMOUS)) {
43 file = fget(fd);
44 if (!file)
45 goto out;
46 }
47
48 down_write(&current->mm->mmap_sem);
49 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
50 up_write(&current->mm->mmap_sem);
51
52 if (file)
53 fput(file);
54out:
55 return error;
56}
57
58asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 32asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
59 unsigned long prot, unsigned long flags, 33 unsigned long prot, unsigned long flags,
60 unsigned long fd, unsigned long pgoff) 34 unsigned long fd, unsigned long pgoff)
61{ 35{
62 return do_mmap2(addr, len, prot, flags, fd, pgoff); 36 /*
37 * This is wrong for sun3 - there PAGE_SIZE is 8Kb,
38 * so we need to shift the argument down by 1; m68k mmap64(3)
39 * (in libc) expects the last argument of mmap2 in 4Kb units.
40 */
41 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
63} 42}
64 43
65/* 44/*
@@ -90,57 +69,11 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
90 if (a.offset & ~PAGE_MASK) 69 if (a.offset & ~PAGE_MASK)
91 goto out; 70 goto out;
92 71
93 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 72 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
94 73 a.offset >> PAGE_SHIFT);
95 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
96out:
97 return error;
98}
99
100#if 0
101struct mmap_arg_struct64 {
102 __u32 addr;
103 __u32 len;
104 __u32 prot;
105 __u32 flags;
106 __u64 offset; /* 64 bits */
107 __u32 fd;
108};
109
110asmlinkage long sys_mmap64(struct mmap_arg_struct64 *arg)
111{
112 int error = -EFAULT;
113 struct file * file = NULL;
114 struct mmap_arg_struct64 a;
115 unsigned long pgoff;
116
117 if (copy_from_user(&a, arg, sizeof(a)))
118 return -EFAULT;
119
120 if ((long)a.offset & ~PAGE_MASK)
121 return -EINVAL;
122
123 pgoff = a.offset >> PAGE_SHIFT;
124 if ((a.offset >> PAGE_SHIFT) != pgoff)
125 return -EINVAL;
126
127 if (!(a.flags & MAP_ANONYMOUS)) {
128 error = -EBADF;
129 file = fget(a.fd);
130 if (!file)
131 goto out;
132 }
133 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
134
135 down_write(&current->mm->mmap_sem);
136 error = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, pgoff);
137 up_write(&current->mm->mmap_sem);
138 if (file)
139 fput(file);
140out: 74out:
141 return error; 75 return error;
142} 76}
143#endif
144 77
145struct sel_arg_struct { 78struct sel_arg_struct {
146 unsigned long n; 79 unsigned long n;
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c
index 3cd19390aae5..94f81ecfe3f8 100644
--- a/arch/m68k/sun3/mmu_emu.c
+++ b/arch/m68k/sun3/mmu_emu.c
@@ -45,8 +45,8 @@
45** Globals 45** Globals
46*/ 46*/
47 47
48unsigned long vmalloc_end; 48unsigned long m68k_vmalloc_end;
49EXPORT_SYMBOL(vmalloc_end); 49EXPORT_SYMBOL(m68k_vmalloc_end);
50 50
51unsigned long pmeg_vaddr[PMEGS_NUM]; 51unsigned long pmeg_vaddr[PMEGS_NUM];
52unsigned char pmeg_alloc[PMEGS_NUM]; 52unsigned char pmeg_alloc[PMEGS_NUM];
@@ -172,8 +172,8 @@ void mmu_emu_init(unsigned long bootmem_end)
172#endif 172#endif
173 // the lowest mapping here is the end of our 173 // the lowest mapping here is the end of our
174 // vmalloc region 174 // vmalloc region
175 if(!vmalloc_end) 175 if (!m68k_vmalloc_end)
176 vmalloc_end = seg; 176 m68k_vmalloc_end = seg;
177 177
178 // mark the segmap alloc'd, and reserve any 178 // mark the segmap alloc'd, and reserve any
179 // of the first 0xbff pages the hardware is 179 // of the first 0xbff pages the hardware is
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index e2201b90aa22..064f5913db1a 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -533,6 +533,13 @@ config AVNET
533 default y 533 default y
534 depends on (AVNET5282) 534 depends on (AVNET5282)
535 535
536config UBOOT
537 bool "Support for U-Boot command line parameters"
538 help
539 If you say Y here kernel will try to collect command
540 line parameters from the initial u-boot stack.
541 default n
542
536config 4KSTACKS 543config 4KSTACKS
537 bool "Use 4Kb for kernel stacks instead of 8Kb" 544 bool "Use 4Kb for kernel stacks instead of 8Kb"
538 default y 545 default y
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 8f8f4abab2ff..5c9ecd427090 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
352 char * filename; 352 char * filename;
353 struct pt_regs *regs = (struct pt_regs *) &name; 353 struct pt_regs *regs = (struct pt_regs *) &name;
354 354
355 lock_kernel();
356 filename = getname(name); 355 filename = getname(name);
357 error = PTR_ERR(filename); 356 error = PTR_ERR(filename);
358 if (IS_ERR(filename)) 357 if (IS_ERR(filename))
359 goto out; 358 return error;
360 error = do_execve(filename, argv, envp, regs); 359 error = do_execve(filename, argv, envp, regs);
361 putname(filename); 360 putname(filename);
362out:
363 unlock_kernel();
364 return error; 361 return error;
365} 362}
366 363
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 5c2bb3eeaaa2..ba92b90d5fbc 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -29,6 +29,8 @@
29#include <linux/bootmem.h> 29#include <linux/bootmem.h>
30#include <linux/seq_file.h> 30#include <linux/seq_file.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/initrd.h>
33#include <linux/root_dev.h>
32 34
33#include <asm/setup.h> 35#include <asm/setup.h>
34#include <asm/irq.h> 36#include <asm/irq.h>
@@ -52,7 +54,6 @@ void (*mach_reset)(void);
52void (*mach_halt)(void); 54void (*mach_halt)(void);
53void (*mach_power_off)(void); 55void (*mach_power_off)(void);
54 56
55
56#ifdef CONFIG_M68000 57#ifdef CONFIG_M68000
57 #define CPU "MC68000" 58 #define CPU "MC68000"
58#endif 59#endif
@@ -111,6 +112,69 @@ void (*mach_power_off)(void);
111extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; 112extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
112extern int _ramstart, _ramend; 113extern int _ramstart, _ramend;
113 114
115#if defined(CONFIG_UBOOT)
116/*
117 * parse_uboot_commandline
118 *
119 * Copies u-boot commandline arguments and store them in the proper linux
120 * variables.
121 *
122 * Assumes:
123 * _init_sp global contains the address in the stack pointer when the
124 * kernel starts (see head.S::_start)
125 *
126 * U-Boot calling convention:
127 * (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
128 *
129 * _init_sp can be parsed as such
130 *
131 * _init_sp+00 = u-boot cmd after jsr into kernel (skip)
132 * _init_sp+04 = &kernel board_info (residual data)
133 * _init_sp+08 = &initrd_start
134 * _init_sp+12 = &initrd_end
135 * _init_sp+16 = &cmd_start
136 * _init_sp+20 = &cmd_end
137 *
138 * This also assumes that the memory locations pointed to are still
139 * unmodified. U-boot places them near the end of external SDRAM.
140 *
141 * Argument(s):
142 * commandp = the linux commandline arg container to fill.
143 * size = the sizeof commandp.
144 *
145 * Returns:
146 */
147void parse_uboot_commandline(char *commandp, int size)
148{
149 extern unsigned long _init_sp;
150 unsigned long *sp;
151 unsigned long uboot_kbd;
152 unsigned long uboot_initrd_start, uboot_initrd_end;
153 unsigned long uboot_cmd_start, uboot_cmd_end;
154
155
156 sp = (unsigned long *)_init_sp;
157 uboot_kbd = sp[1];
158 uboot_initrd_start = sp[2];
159 uboot_initrd_end = sp[3];
160 uboot_cmd_start = sp[4];
161 uboot_cmd_end = sp[5];
162
163 if (uboot_cmd_start && uboot_cmd_end)
164 strncpy(commandp, (const char *)uboot_cmd_start, size);
165#if defined(CONFIG_BLK_DEV_INITRD)
166 if (uboot_initrd_start && uboot_initrd_end &&
167 (uboot_initrd_end > uboot_initrd_start)) {
168 initrd_start = uboot_initrd_start;
169 initrd_end = uboot_initrd_end;
170 ROOT_DEV = Root_RAM0;
171 printk(KERN_INFO "initrd at 0x%lx:0x%lx\n",
172 initrd_start, initrd_end);
173 }
174#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
175}
176#endif /* #if defined(CONFIG_UBOOT) */
177
114void __init setup_arch(char **cmdline_p) 178void __init setup_arch(char **cmdline_p)
115{ 179{
116 int bootmap_size; 180 int bootmap_size;
@@ -128,7 +192,24 @@ void __init setup_arch(char **cmdline_p)
128#if defined(CONFIG_BOOTPARAM) 192#if defined(CONFIG_BOOTPARAM)
129 strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line)); 193 strncpy(&command_line[0], CONFIG_BOOTPARAM_STRING, sizeof(command_line));
130 command_line[sizeof(command_line) - 1] = 0; 194 command_line[sizeof(command_line) - 1] = 0;
131#endif 195#endif /* CONFIG_BOOTPARAM */
196
197#if defined(CONFIG_UBOOT)
198 /* CONFIG_UBOOT and CONFIG_BOOTPARAM defined, concatenate cmdline */
199 #if defined(CONFIG_BOOTPARAM)
200 /* Add the whitespace separator */
201 command_line[strlen(CONFIG_BOOTPARAM_STRING)] = ' ';
202 /* Parse uboot command line into the rest of the buffer */
203 parse_uboot_commandline(
204 &command_line[(strlen(CONFIG_BOOTPARAM_STRING)+1)],
205 (sizeof(command_line) -
206 (strlen(CONFIG_BOOTPARAM_STRING)+1)));
207 /* Only CONFIG_UBOOT defined, create cmdline */
208 #else
209 parse_uboot_commandline(&command_line[0], sizeof(command_line));
210 #endif /* CONFIG_BOOTPARAM */
211 command_line[sizeof(command_line) - 1] = 0;
212#endif /* CONFIG_UBOOT */
132 213
133 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); 214 printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n");
134 215
@@ -204,6 +285,13 @@ void __init setup_arch(char **cmdline_p)
204 free_bootmem(memory_start, memory_end - memory_start); 285 free_bootmem(memory_start, memory_end - memory_start);
205 reserve_bootmem(memory_start, bootmap_size, BOOTMEM_DEFAULT); 286 reserve_bootmem(memory_start, bootmap_size, BOOTMEM_DEFAULT);
206 287
288#if defined(CONFIG_UBOOT) && defined(CONFIG_BLK_DEV_INITRD)
289 if ((initrd_start > 0) && (initrd_start < initrd_end) &&
290 (initrd_end < memory_end))
291 reserve_bootmem(initrd_start, initrd_end - initrd_start,
292 BOOTMEM_DEFAULT);
293#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
294
207 /* 295 /*
208 * Get kmalloc into gear. 296 * Get kmalloc into gear.
209 */ 297 */
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c
index efdd090778a3..b67cbc735a9b 100644
--- a/arch/m68knommu/kernel/sys_m68k.c
+++ b/arch/m68knommu/kernel/sys_m68k.c
@@ -27,39 +27,6 @@
27#include <asm/cacheflush.h> 27#include <asm/cacheflush.h>
28#include <asm/unistd.h> 28#include <asm/unistd.h>
29 29
30/* common code for old and new mmaps */
31static inline long do_mmap2(
32 unsigned long addr, unsigned long len,
33 unsigned long prot, unsigned long flags,
34 unsigned long fd, unsigned long pgoff)
35{
36 int error = -EBADF;
37 struct file * file = NULL;
38
39 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
40 if (!(flags & MAP_ANONYMOUS)) {
41 file = fget(fd);
42 if (!file)
43 goto out;
44 }
45
46 down_write(&current->mm->mmap_sem);
47 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
48 up_write(&current->mm->mmap_sem);
49
50 if (file)
51 fput(file);
52out:
53 return error;
54}
55
56asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
57 unsigned long prot, unsigned long flags,
58 unsigned long fd, unsigned long pgoff)
59{
60 return do_mmap2(addr, len, prot, flags, fd, pgoff);
61}
62
63/* 30/*
64 * Perform the select(nd, in, out, ex, tv) and mmap() system 31 * Perform the select(nd, in, out, ex, tv) and mmap() system
65 * calls. Linux/m68k cloned Linux/i386, which didn't use to be able to 32 * calls. Linux/m68k cloned Linux/i386, which didn't use to be able to
@@ -88,9 +55,8 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
88 if (a.offset & ~PAGE_MASK) 55 if (a.offset & ~PAGE_MASK)
89 goto out; 56 goto out;
90 57
91 a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 58 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
92 59 a.offset >> PAGE_SHIFT);
93 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
94out: 60out:
95 return error; 61 return error;
96} 62}
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index 23535cc415ae..486837efa3d7 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -210,7 +210,7 @@ ENTRY(sys_call_table)
210 .long sys_ni_syscall /* streams2 */ 210 .long sys_ni_syscall /* streams2 */
211 .long sys_vfork /* 190 */ 211 .long sys_vfork /* 190 */
212 .long sys_getrlimit 212 .long sys_getrlimit
213 .long sys_mmap2 213 .long sys_mmap_pgoff
214 .long sys_truncate64 214 .long sys_truncate64
215 .long sys_ftruncate64 215 .long sys_ftruncate64
216 .long sys_stat64 /* 195 */ 216 .long sys_stat64 /* 195 */
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 2736a5e309c0..9f1784f586b9 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -8,6 +8,8 @@
8 */ 8 */
9 9
10#include <asm-generic/vmlinux.lds.h> 10#include <asm-generic/vmlinux.lds.h>
11#include <asm/page.h>
12#include <asm/thread_info.h>
11 13
12#if defined(CONFIG_RAMKERNEL) 14#if defined(CONFIG_RAMKERNEL)
13#define RAM_START CONFIG_KERNELBASE 15#define RAM_START CONFIG_KERNELBASE
@@ -15,7 +17,7 @@
15#define TEXT ram 17#define TEXT ram
16#define DATA ram 18#define DATA ram
17#define INIT ram 19#define INIT ram
18#define BSS ram 20#define BSSS ram
19#endif 21#endif
20#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) 22#if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL)
21#define RAM_START CONFIG_RAMBASE 23#define RAM_START CONFIG_RAMBASE
@@ -27,7 +29,7 @@
27#define TEXT rom 29#define TEXT rom
28#define DATA ram 30#define DATA ram
29#define INIT ram 31#define INIT ram
30#define BSS ram 32#define BSSS ram
31#endif 33#endif
32 34
33#ifndef DATA_ADDR 35#ifndef DATA_ADDR
@@ -147,40 +149,19 @@ SECTIONS {
147 . = ALIGN(4); 149 . = ALIGN(4);
148 _sdata = . ; 150 _sdata = . ;
149 DATA_DATA 151 DATA_DATA
150 . = ALIGN(32); 152 CACHELINE_ALIGNED_DATA(32)
151 *(.data.cacheline_aligned) 153 INIT_TASK_DATA(THREAD_SIZE)
152 . = ALIGN(8192) ;
153 *(.data.init_task)
154 _edata = . ; 154 _edata = . ;
155 } > DATA 155 } > DATA
156 156
157 .init : { 157 .init.text : {
158 . = ALIGN(4096); 158 . = ALIGN(PAGE_SIZE);
159 __init_begin = .; 159 __init_begin = .;
160 _sinittext = .; 160 } > INIT
161 INIT_TEXT 161 INIT_TEXT_SECTION(PAGE_SIZE) > INIT
162 _einittext = .; 162 INIT_DATA_SECTION(16) > INIT
163 INIT_DATA 163 .init.data : {
164 . = ALIGN(16); 164 . = ALIGN(PAGE_SIZE);
165 __setup_start = .;
166 *(.init.setup)
167 __setup_end = .;
168 __initcall_start = .;
169 INITCALLS
170 __initcall_end = .;
171 __con_initcall_start = .;
172 *(.con_initcall.init)
173 __con_initcall_end = .;
174 __security_initcall_start = .;
175 *(.security_initcall.init)
176 __security_initcall_end = .;
177#ifdef CONFIG_BLK_DEV_INITRD
178 . = ALIGN(4);
179 __initramfs_start = .;
180 *(.init.ramfs)
181 __initramfs_end = .;
182#endif
183 . = ALIGN(4096);
184 __init_end = .; 165 __init_end = .;
185 } > INIT 166 } > INIT
186 167
@@ -192,7 +173,7 @@ SECTIONS {
192 . = ALIGN(4) ; 173 . = ALIGN(4) ;
193 _ebss = . ; 174 _ebss = . ;
194 _end = . ; 175 _end = . ;
195 } > BSS 176 } > BSSS
196 177
197 DISCARDS 178 DISCARDS
198} 179}
diff --git a/arch/m68knommu/platform/523x/gpio.c b/arch/m68knommu/platform/523x/gpio.c
index f02840d54d3c..a8842dc27839 100644
--- a/arch/m68knommu/platform/523x/gpio.c
+++ b/arch/m68knommu/platform/523x/gpio.c
@@ -30,7 +30,8 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
30 .direction_output = mcf_gpio_direction_output, 30 .direction_output = mcf_gpio_direction_output,
31 .get = mcf_gpio_get_value, 31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value, 32 .set = mcf_gpio_set_value,
33 .ngpio = 8, 33 .base = 1,
34 .ngpio = 7,
34 }, 35 },
35 .pddr = MCFEPORT_EPDDR, 36 .pddr = MCFEPORT_EPDDR,
36 .podr = MCFEPORT_EPDR, 37 .podr = MCFEPORT_EPDR,
@@ -244,7 +245,7 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
244 .get = mcf_gpio_get_value, 245 .get = mcf_gpio_get_value,
245 .set = mcf_gpio_set_value_fast, 246 .set = mcf_gpio_set_value_fast,
246 .base = 96, 247 .base = 96,
247 .ngpio = 4, 248 .ngpio = 8,
248 }, 249 },
249 .pddr = MCFGPIO_PDDR_TIMER, 250 .pddr = MCFGPIO_PDDR_TIMER,
250 .podr = MCFGPIO_PODR_TIMER, 251 .podr = MCFGPIO_PODR_TIMER,
diff --git a/arch/m68knommu/platform/527x/gpio.c b/arch/m68knommu/platform/527x/gpio.c
index 1028142851ac..0b56e19db0f8 100644
--- a/arch/m68knommu/platform/527x/gpio.c
+++ b/arch/m68knommu/platform/527x/gpio.c
@@ -31,7 +31,8 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
31 .direction_output = mcf_gpio_direction_output, 31 .direction_output = mcf_gpio_direction_output,
32 .get = mcf_gpio_get_value, 32 .get = mcf_gpio_get_value,
33 .set = mcf_gpio_set_value, 33 .set = mcf_gpio_set_value,
34 .ngpio = 8, 34 .base = 1,
35 .ngpio = 7,
35 }, 36 },
36 .pddr = MCFEPORT_EPDDR, 37 .pddr = MCFEPORT_EPDDR,
37 .podr = MCFEPORT_EPDR, 38 .podr = MCFEPORT_EPDR,
@@ -263,7 +264,8 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
263 .direction_output = mcf_gpio_direction_output, 264 .direction_output = mcf_gpio_direction_output,
264 .get = mcf_gpio_get_value, 265 .get = mcf_gpio_get_value,
265 .set = mcf_gpio_set_value, 266 .set = mcf_gpio_set_value,
266 .ngpio = 8, 267 .base = 1,
268 .ngpio = 7,
267 }, 269 },
268 .pddr = MCFEPORT_EPDDR, 270 .pddr = MCFEPORT_EPDDR,
269 .podr = MCFEPORT_EPDR, 271 .podr = MCFEPORT_EPDR,
diff --git a/arch/m68knommu/platform/528x/gpio.c b/arch/m68knommu/platform/528x/gpio.c
index ec593950696a..eedaf0adbcd7 100644
--- a/arch/m68knommu/platform/528x/gpio.c
+++ b/arch/m68knommu/platform/528x/gpio.c
@@ -31,7 +31,7 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = {
31 .get = mcf_gpio_get_value, 31 .get = mcf_gpio_get_value,
32 .set = mcf_gpio_set_value, 32 .set = mcf_gpio_set_value,
33 .base = 1, 33 .base = 1,
34 .ngpio = 8, 34 .ngpio = 7,
35 }, 35 },
36 .pddr = MCFEPORT_EPDDR, 36 .pddr = MCFEPORT_EPDDR,
37 .podr = MCFEPORT_EPDR, 37 .podr = MCFEPORT_EPDR,
diff --git a/arch/m68knommu/platform/coldfire/clk.c b/arch/m68knommu/platform/coldfire/clk.c
index 7cdbf445b28f..9f1260c5e2ad 100644
--- a/arch/m68knommu/platform/coldfire/clk.c
+++ b/arch/m68knommu/platform/coldfire/clk.c
@@ -9,6 +9,7 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/module.h>
12#include <linux/clk.h> 13#include <linux/clk.h>
13#include <asm/coldfire.h> 14#include <asm/coldfire.h>
14 15
@@ -18,23 +19,27 @@ struct clk *clk_get(struct device *dev, const char *id)
18{ 19{
19 return NULL; 20 return NULL;
20} 21}
22EXPORT_SYMBOL(clk_get);
21 23
22int clk_enable(struct clk *clk) 24int clk_enable(struct clk *clk)
23{ 25{
24 return 0; 26 return 0;
25} 27}
28EXPORT_SYMBOL(clk_enable);
26 29
27void clk_disable(struct clk *clk) 30void clk_disable(struct clk *clk)
28{ 31{
29} 32}
33EXPORT_SYMBOL(clk_disable);
30 34
31void clk_put(struct clk *clk) 35void clk_put(struct clk *clk)
32{ 36{
33} 37}
38EXPORT_SYMBOL(clk_put);
34 39
35unsigned long clk_get_rate(struct clk *clk) 40unsigned long clk_get_rate(struct clk *clk)
36{ 41{
37 return MCF_CLK; 42 return MCF_CLK;
38} 43}
39 44EXPORT_SYMBOL(clk_get_rate);
40/***************************************************************************/ 45/***************************************************************************/
diff --git a/arch/m68knommu/platform/coldfire/head.S b/arch/m68knommu/platform/coldfire/head.S
index 2b0d73c0cc32..4b91aa24eb00 100644
--- a/arch/m68knommu/platform/coldfire/head.S
+++ b/arch/m68knommu/platform/coldfire/head.S
@@ -106,6 +106,9 @@
106.global _ramvec 106.global _ramvec
107.global _ramstart 107.global _ramstart
108.global _ramend 108.global _ramend
109#if defined(CONFIG_UBOOT)
110.global _init_sp
111#endif
109 112
110/*****************************************************************************/ 113/*****************************************************************************/
111 114
@@ -124,6 +127,10 @@ _ramstart:
124.long 0 127.long 0
125_ramend: 128_ramend:
126.long 0 129.long 0
130#if defined(CONFIG_UBOOT)
131_init_sp:
132.long 0
133#endif
127 134
128/*****************************************************************************/ 135/*****************************************************************************/
129 136
@@ -137,6 +144,9 @@ __HEAD
137_start: 144_start:
138 nop /* filler */ 145 nop /* filler */
139 movew #0x2700, %sr /* no interrupts */ 146 movew #0x2700, %sr /* no interrupts */
147#if defined(CONFIG_UBOOT)
148 movel %sp,_init_sp /* save initial stack pointer */
149#endif
140 150
141 /* 151 /*
142 * Do any platform or board specific setup now. Most boards 152 * Do any platform or board specific setup now. Most boards
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index bbd8327f1890..fd53e500be67 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -6,8 +6,15 @@ mainmenu "Linux/Microblaze Kernel Configuration"
6config MICROBLAZE 6config MICROBLAZE
7 def_bool y 7 def_bool y
8 select HAVE_LMB 8 select HAVE_LMB
9 select HAVE_FUNCTION_TRACER
10 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
11 select HAVE_FUNCTION_GRAPH_TRACER
12 select HAVE_DYNAMIC_FTRACE
13 select HAVE_FTRACE_MCOUNT_RECORD
9 select USB_ARCH_HAS_EHCI 14 select USB_ARCH_HAS_EHCI
10 select ARCH_WANT_OPTIONAL_GPIOLIB 15 select ARCH_WANT_OPTIONAL_GPIOLIB
16 select HAVE_OPROFILE
17 select TRACING_SUPPORT
11 18
12config SWAP 19config SWAP
13 def_bool n 20 def_bool n
@@ -57,12 +64,24 @@ config GENERIC_GPIO
57config GENERIC_CSUM 64config GENERIC_CSUM
58 def_bool y 65 def_bool y
59 66
67config STACKTRACE_SUPPORT
68 def_bool y
69
70config LOCKDEP_SUPPORT
71 def_bool y
72
73config HAVE_LATENCYTOP_SUPPORT
74 def_bool y
75
60config PCI 76config PCI
61 def_bool n 77 def_bool n
62 78
63config NO_DMA 79config NO_DMA
64 def_bool y 80 def_bool y
65 81
82config DTC
83 def_bool y
84
66source "init/Kconfig" 85source "init/Kconfig"
67 86
68source "kernel/Kconfig.freezer" 87source "kernel/Kconfig.freezer"
diff --git a/arch/microblaze/Kconfig.debug b/arch/microblaze/Kconfig.debug
index 242cd35bdb4b..9dc708a7f700 100644
--- a/arch/microblaze/Kconfig.debug
+++ b/arch/microblaze/Kconfig.debug
@@ -3,6 +3,9 @@
3 3
4menu "Kernel hacking" 4menu "Kernel hacking"
5 5
6config TRACE_IRQFLAGS_SUPPORT
7 def_bool y
8
6source "lib/Kconfig.debug" 9source "lib/Kconfig.debug"
7 10
8config EARLY_PRINTK 11config EARLY_PRINTK
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index 34187354304a..d2d6cfcb1a30 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -51,6 +51,8 @@ core-y += arch/microblaze/kernel/
51core-y += arch/microblaze/mm/ 51core-y += arch/microblaze/mm/
52core-y += arch/microblaze/platform/ 52core-y += arch/microblaze/platform/
53 53
54drivers-$(CONFIG_OPROFILE) += arch/microblaze/oprofile/
55
54boot := arch/microblaze/boot 56boot := arch/microblaze/boot
55 57
56# Are we making a simpleImage.<boardname> target? If so, crack out the boardname 58# Are we making a simpleImage.<boardname> target? If so, crack out the boardname
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
index 21f13322a4ca..902cf9846c3c 100644
--- a/arch/microblaze/boot/Makefile
+++ b/arch/microblaze/boot/Makefile
@@ -2,11 +2,13 @@
2# arch/microblaze/boot/Makefile 2# arch/microblaze/boot/Makefile
3# 3#
4 4
5MKIMAGE := $(srctree)/scripts/mkuboot.sh
6
5obj-y += linked_dtb.o 7obj-y += linked_dtb.o
6 8
7targets := linux.bin linux.bin.gz simpleImage.% 9targets := linux.bin linux.bin.gz simpleImage.%
8 10
9OBJCOPYFLAGS_linux.bin := -O binary 11OBJCOPYFLAGS := -O binary
10 12
11# Where the DTS files live 13# Where the DTS files live
12dtstree := $(srctree)/$(src)/dts 14dtstree := $(srctree)/$(src)/dts
@@ -24,6 +26,7 @@ $(obj)/linux.bin: vmlinux FORCE
24 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ 26 [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \
25 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" 27 touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image"
26 $(call if_changed,objcopy) 28 $(call if_changed,objcopy)
29 $(call if_changed,uimage)
27 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 30 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
28 31
29$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE 32$(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
@@ -36,8 +39,16 @@ quiet_cmd_cp = CP $< $@$2
36quiet_cmd_strip = STRIP $@ 39quiet_cmd_strip = STRIP $@
37 cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@ 40 cmd_strip = $(STRIP) -K _start -K _end -K __log_buf -K _fdt_start vmlinux -o $@
38 41
42quiet_cmd_uimage = UIMAGE $@.ub
43 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
44 -C none -n 'Linux-$(KERNELRELEASE)' \
45 -a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
46 -d $@ $@.ub
47
39$(obj)/simpleImage.%: vmlinux FORCE 48$(obj)/simpleImage.%: vmlinux FORCE
40 $(call if_changed,cp,.unstrip) 49 $(call if_changed,cp,.unstrip)
50 $(call if_changed,objcopy)
51 $(call if_changed,uimage)
41 $(call if_changed,strip) 52 $(call if_changed,strip)
42 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 53 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
43 54
@@ -53,4 +64,4 @@ $(obj)/%.dtb: $(dtstree)/%.dts FORCE
53 64
54clean-kernel += linux.bin linux.bin.gz simpleImage.* 65clean-kernel += linux.bin linux.bin.gz simpleImage.*
55 66
56clean-files += *.dtb 67clean-files += *.dtb simpleImage.*.unstrip
diff --git a/arch/microblaze/include/asm/asm-offsets.h b/arch/microblaze/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/microblaze/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/microblaze/include/asm/cache.h b/arch/microblaze/include/asm/cache.h
index c209c47509d5..e52210891d78 100644
--- a/arch/microblaze/include/asm/cache.h
+++ b/arch/microblaze/include/asm/cache.h
@@ -21,20 +21,4 @@
21 21
22#define SMP_CACHE_BYTES L1_CACHE_BYTES 22#define SMP_CACHE_BYTES L1_CACHE_BYTES
23 23
24void _enable_icache(void);
25void _disable_icache(void);
26void _invalidate_icache(unsigned int addr);
27
28#define __enable_icache() _enable_icache()
29#define __disable_icache() _disable_icache()
30#define __invalidate_icache(addr) _invalidate_icache(addr)
31
32void _enable_dcache(void);
33void _disable_dcache(void);
34void _invalidate_dcache(unsigned int addr);
35
36#define __enable_dcache() _enable_dcache()
37#define __disable_dcache() _disable_dcache()
38#define __invalidate_dcache(addr) _invalidate_dcache(addr)
39
40#endif /* _ASM_MICROBLAZE_CACHE_H */ 24#endif /* _ASM_MICROBLAZE_CACHE_H */
diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h
index 088076e657b3..a6edd356cd08 100644
--- a/arch/microblaze/include/asm/cacheflush.h
+++ b/arch/microblaze/include/asm/cacheflush.h
@@ -18,6 +18,8 @@
18/* Somebody depends on this; sigh... */ 18/* Somebody depends on this; sigh... */
19#include <linux/mm.h> 19#include <linux/mm.h>
20 20
21/* Look at Documentation/cachetlb.txt */
22
21/* 23/*
22 * Cache handling functions. 24 * Cache handling functions.
23 * Microblaze has a write-through data cache, meaning that the data cache 25 * Microblaze has a write-through data cache, meaning that the data cache
@@ -27,78 +29,81 @@
27 * instruction cache to make sure we don't fetch old, bad code. 29 * instruction cache to make sure we don't fetch old, bad code.
28 */ 30 */
29 31
32/* struct cache, d=dcache, i=icache, fl = flush, iv = invalidate,
33 * suffix r = range */
34struct scache {
35 /* icache */
36 void (*ie)(void); /* enable */
37 void (*id)(void); /* disable */
38 void (*ifl)(void); /* flush */
39 void (*iflr)(unsigned long a, unsigned long b);
40 void (*iin)(void); /* invalidate */
41 void (*iinr)(unsigned long a, unsigned long b);
42 /* dcache */
43 void (*de)(void); /* enable */
44 void (*dd)(void); /* disable */
45 void (*dfl)(void); /* flush */
46 void (*dflr)(unsigned long a, unsigned long b);
47 void (*din)(void); /* invalidate */
48 void (*dinr)(unsigned long a, unsigned long b);
49};
50
51/* microblaze cache */
52extern struct scache *mbc;
53
54void microblaze_cache_init(void);
55
56#define enable_icache() mbc->ie();
57#define disable_icache() mbc->id();
58#define flush_icache() mbc->ifl();
59#define flush_icache_range(start, end) mbc->iflr(start, end);
60#define invalidate_icache() mbc->iin();
61#define invalidate_icache_range(start, end) mbc->iinr(start, end);
62
63
64#define flush_icache_user_range(vma, pg, adr, len) flush_icache();
65#define flush_icache_page(vma, pg) do { } while (0)
66
67#define enable_dcache() mbc->de();
68#define disable_dcache() mbc->dd();
30/* FIXME for LL-temac driver */ 69/* FIXME for LL-temac driver */
31#define invalidate_dcache_range(start, end) \ 70#define invalidate_dcache() mbc->din();
32 __invalidate_dcache_range(start, end) 71#define invalidate_dcache_range(start, end) mbc->dinr(start, end);
33 72#define flush_dcache() mbc->dfl();
34#define flush_cache_all() __invalidate_cache_all() 73#define flush_dcache_range(start, end) mbc->dflr(start, end);
35#define flush_cache_mm(mm) do { } while (0)
36#define flush_cache_range(vma, start, end) __invalidate_cache_all()
37#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
38 74
39#define flush_dcache_range(start, end) __invalidate_dcache_range(start, end)
40#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 75#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
76/* D-cache aliasing problem can't happen - cache is between MMU and ram */
41#define flush_dcache_page(page) do { } while (0) 77#define flush_dcache_page(page) do { } while (0)
42#define flush_dcache_mmap_lock(mapping) do { } while (0) 78#define flush_dcache_mmap_lock(mapping) do { } while (0)
43#define flush_dcache_mmap_unlock(mapping) do { } while (0) 79#define flush_dcache_mmap_unlock(mapping) do { } while (0)
44 80
45#define flush_icache_range(start, len) __invalidate_icache_range(start, len)
46#define flush_icache_page(vma, pg) do { } while (0)
47
48#ifndef CONFIG_MMU
49# define flush_icache_user_range(start, len) do { } while (0)
50#else
51# define flush_icache_user_range(vma, pg, adr, len) __invalidate_icache_all()
52
53# define flush_page_to_ram(page) do { } while (0)
54 81
55# define flush_icache() __invalidate_icache_all() 82#define flush_cache_dup_mm(mm) do { } while (0)
56# define flush_cache_sigtramp(vaddr) \ 83#define flush_cache_vmap(start, end) do { } while (0)
57 __invalidate_icache_range(vaddr, vaddr + 8) 84#define flush_cache_vunmap(start, end) do { } while (0)
58 85#define flush_cache_mm(mm) do { } while (0)
59# define flush_dcache_mmap_lock(mapping) do { } while (0) 86#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
60# define flush_dcache_mmap_unlock(mapping) do { } while (0)
61 87
62# define flush_cache_dup_mm(mm) do { } while (0) 88/* MS: kgdb code use this macro, wrong len with FLASH */
89#if 0
90#define flush_cache_range(vma, start, len) { \
91 flush_icache_range((unsigned) (start), (unsigned) (start) + (len)); \
92 flush_dcache_range((unsigned) (start), (unsigned) (start) + (len)); \
93}
63#endif 94#endif
64 95
65#define flush_cache_vmap(start, end) do { } while (0) 96#define flush_cache_range(vma, start, len) do { } while (0)
66#define flush_cache_vunmap(start, end) do { } while (0)
67
68struct page;
69struct mm_struct;
70struct vm_area_struct;
71
72/* see arch/microblaze/kernel/cache.c */
73extern void __invalidate_icache_all(void);
74extern void __invalidate_icache_range(unsigned long start, unsigned long end);
75extern void __invalidate_icache_page(struct vm_area_struct *vma,
76 struct page *page);
77extern void __invalidate_icache_user_range(struct vm_area_struct *vma,
78 struct page *page,
79 unsigned long adr, int len);
80extern void __invalidate_cache_sigtramp(unsigned long addr);
81
82extern void __invalidate_dcache_all(void);
83extern void __invalidate_dcache_range(unsigned long start, unsigned long end);
84extern void __invalidate_dcache_page(struct vm_area_struct *vma,
85 struct page *page);
86extern void __invalidate_dcache_user_range(struct vm_area_struct *vma,
87 struct page *page,
88 unsigned long adr, int len);
89
90extern inline void __invalidate_cache_all(void)
91{
92 __invalidate_icache_all();
93 __invalidate_dcache_all();
94}
95 97
96#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 98#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
97do { memcpy((dst), (src), (len)); \ 99do { \
98 flush_icache_range((unsigned) (dst), (unsigned) (dst) + (len)); \ 100 memcpy((dst), (src), (len)); \
101 flush_icache_range((unsigned) (dst), (unsigned) (dst) + (len)); \
99} while (0) 102} while (0)
100 103
101#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 104#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
102 memcpy((dst), (src), (len)) 105do { \
106 memcpy((dst), (src), (len)); \
107} while (0)
103 108
104#endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */ 109#endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */
diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h
index 52f28f6dc4eb..b4f5ca33aebf 100644
--- a/arch/microblaze/include/asm/cpuinfo.h
+++ b/arch/microblaze/include/asm/cpuinfo.h
@@ -43,7 +43,7 @@ struct cpuinfo {
43 u32 use_icache; 43 u32 use_icache;
44 u32 icache_tagbits; 44 u32 icache_tagbits;
45 u32 icache_write; 45 u32 icache_write;
46 u32 icache_line; 46 u32 icache_line_length;
47 u32 icache_size; 47 u32 icache_size;
48 unsigned long icache_base; 48 unsigned long icache_base;
49 unsigned long icache_high; 49 unsigned long icache_high;
@@ -51,8 +51,9 @@ struct cpuinfo {
51 u32 use_dcache; 51 u32 use_dcache;
52 u32 dcache_tagbits; 52 u32 dcache_tagbits;
53 u32 dcache_write; 53 u32 dcache_write;
54 u32 dcache_line; 54 u32 dcache_line_length;
55 u32 dcache_size; 55 u32 dcache_size;
56 u32 dcache_wb;
56 unsigned long dcache_base; 57 unsigned long dcache_base;
57 unsigned long dcache_high; 58 unsigned long dcache_high;
58 59
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h
index 30286db27c1c..78a038452c0f 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -19,6 +19,18 @@ struct dev_archdata {
19struct pdev_archdata { 19struct pdev_archdata {
20}; 20};
21 21
22static inline void dev_archdata_set_node(struct dev_archdata *ad,
23 struct device_node *np)
24{
25 ad->of_node = np;
26}
27
28static inline struct device_node *
29dev_archdata_get_node(const struct dev_archdata *ad)
30{
31 return ad->of_node;
32}
33
22#endif /* _ASM_MICROBLAZE_DEVICE_H */ 34#endif /* _ASM_MICROBLAZE_DEVICE_H */
23 35
24 36
diff --git a/arch/microblaze/include/asm/elf.h b/arch/microblaze/include/asm/elf.h
index f92fc0dda006..7d4acf2b278e 100644
--- a/arch/microblaze/include/asm/elf.h
+++ b/arch/microblaze/include/asm/elf.h
@@ -77,7 +77,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
77#define ELF_DATA ELFDATA2MSB 77#define ELF_DATA ELFDATA2MSB
78#endif 78#endif
79 79
80#define USE_ELF_CORE_DUMP
81#define ELF_EXEC_PAGESIZE 4096 80#define ELF_EXEC_PAGESIZE 4096
82 81
83 82
diff --git a/arch/microblaze/include/asm/ftrace.h b/arch/microblaze/include/asm/ftrace.h
index 8b137891791f..fd2fa2eca62f 100644
--- a/arch/microblaze/include/asm/ftrace.h
+++ b/arch/microblaze/include/asm/ftrace.h
@@ -1 +1,26 @@
1#ifndef _ASM_MICROBLAZE_FTRACE
2#define _ASM_MICROBLAZE_FTRACE
1 3
4#ifdef CONFIG_FUNCTION_TRACER
5
6#define MCOUNT_ADDR ((long)(_mcount))
7#define MCOUNT_INSN_SIZE 8 /* sizeof mcount call */
8
9#ifndef __ASSEMBLY__
10extern void _mcount(void);
11extern void ftrace_call_graph(void);
12#endif
13
14#ifdef CONFIG_DYNAMIC_FTRACE
15/* reloction of mcount call site is the same as the address */
16static inline unsigned long ftrace_call_adjust(unsigned long addr)
17{
18 return addr;
19}
20
21struct dyn_arch_ftrace {
22};
23#endif /* CONFIG_DYNAMIC_FTRACE */
24
25#endif /* CONFIG_FUNCTION_TRACER */
26#endif /* _ASM_MICROBLAZE_FTRACE */
diff --git a/arch/microblaze/include/asm/futex.h b/arch/microblaze/include/asm/futex.h
index 0b745828f42b..8dbb6e7a03a2 100644
--- a/arch/microblaze/include/asm/futex.h
+++ b/arch/microblaze/include/asm/futex.h
@@ -1 +1,126 @@
1#include <asm-generic/futex.h> 1#ifndef _ASM_MICROBLAZE_FUTEX_H
2#define _ASM_MICROBLAZE_FUTEX_H
3
4#ifdef __KERNEL__
5
6#include <linux/futex.h>
7#include <linux/uaccess.h>
8#include <asm/errno.h>
9
10#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
11({ \
12 __asm__ __volatile__ ( \
13 "1: lwx %0, %2, r0; " \
14 insn \
15 "2: swx %1, %2, r0; \
16 addic %1, r0, 0; \
17 bnei %1, 1b; \
18 3: \
19 .section .fixup,\"ax\"; \
20 4: brid 3b; \
21 addik %1, r0, %3; \
22 .previous; \
23 .section __ex_table,\"a\"; \
24 .word 1b,4b,2b,4b; \
25 .previous;" \
26 : "=&r" (oldval), "=&r" (ret) \
27 : "b" (uaddr), "i" (-EFAULT), "r" (oparg) \
28 ); \
29})
30
31static inline int
32futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
33{
34 int op = (encoded_op >> 28) & 7;
35 int cmp = (encoded_op >> 24) & 15;
36 int oparg = (encoded_op << 8) >> 20;
37 int cmparg = (encoded_op << 20) >> 20;
38 int oldval = 0, ret;
39 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
40 oparg = 1 << oparg;
41
42 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
43 return -EFAULT;
44
45 pagefault_disable();
46
47 switch (op) {
48 case FUTEX_OP_SET:
49 __futex_atomic_op("or %1,%4,%4;", ret, oldval, uaddr, oparg);
50 break;
51 case FUTEX_OP_ADD:
52 __futex_atomic_op("add %1,%0,%4;", ret, oldval, uaddr, oparg);
53 break;
54 case FUTEX_OP_OR:
55 __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg);
56 break;
57 case FUTEX_OP_ANDN:
58 __futex_atomic_op("and %1,%0,%4;", ret, oldval, uaddr, oparg);
59 break;
60 case FUTEX_OP_XOR:
61 __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg);
62 break;
63 default:
64 ret = -ENOSYS;
65 }
66
67 pagefault_enable();
68
69 if (!ret) {
70 switch (cmp) {
71 case FUTEX_OP_CMP_EQ:
72 ret = (oldval == cmparg);
73 break;
74 case FUTEX_OP_CMP_NE:
75 ret = (oldval != cmparg);
76 break;
77 case FUTEX_OP_CMP_LT:
78 ret = (oldval < cmparg);
79 break;
80 case FUTEX_OP_CMP_GE:
81 ret = (oldval >= cmparg);
82 break;
83 case FUTEX_OP_CMP_LE:
84 ret = (oldval <= cmparg);
85 break;
86 case FUTEX_OP_CMP_GT:
87 ret = (oldval > cmparg);
88 break;
89 default:
90 ret = -ENOSYS;
91 }
92 }
93 return ret;
94}
95
96static inline int
97futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
98{
99 int prev, cmp;
100
101 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
102 return -EFAULT;
103
104 __asm__ __volatile__ ("1: lwx %0, %2, r0; \
105 cmp %1, %0, %3; \
106 beqi %1, 3f; \
107 2: swx %4, %2, r0; \
108 addic %1, r0, 0; \
109 bnei %1, 1b; \
110 3: \
111 .section .fixup,\"ax\"; \
112 4: brid 3b; \
113 addik %0, r0, %5; \
114 .previous; \
115 .section __ex_table,\"a\"; \
116 .word 1b,4b,2b,4b; \
117 .previous;" \
118 : "=&r" (prev), "=&r"(cmp) \
119 : "r" (uaddr), "r" (oldval), "r" (newval), "i" (-EFAULT));
120
121 return prev;
122}
123
124#endif /* __KERNEL__ */
125
126#endif
diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h
index dea65645a4f8..2c38c6d80176 100644
--- a/arch/microblaze/include/asm/irqflags.h
+++ b/arch/microblaze/include/asm/irqflags.h
@@ -10,78 +10,73 @@
10#define _ASM_MICROBLAZE_IRQFLAGS_H 10#define _ASM_MICROBLAZE_IRQFLAGS_H
11 11
12#include <linux/irqflags.h> 12#include <linux/irqflags.h>
13#include <asm/registers.h>
13 14
14# if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 15# if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
15 16
16# define local_irq_save(flags) \ 17# define raw_local_irq_save(flags) \
17 do { \ 18 do { \
18 asm volatile ("# local_irq_save \n\t" \ 19 asm volatile (" msrclr %0, %1; \
19 "msrclr %0, %1 \n\t" \ 20 nop;" \
20 "nop \n\t" \
21 : "=r"(flags) \ 21 : "=r"(flags) \
22 : "i"(MSR_IE) \ 22 : "i"(MSR_IE) \
23 : "memory"); \ 23 : "memory"); \
24 } while (0) 24 } while (0)
25 25
26# define local_irq_disable() \ 26# define raw_local_irq_disable() \
27 do { \ 27 do { \
28 asm volatile ("# local_irq_disable \n\t" \ 28 asm volatile (" msrclr r0, %0; \
29 "msrclr r0, %0 \n\t" \ 29 nop;" \
30 "nop \n\t" \ 30 : \
31 : \ 31 : "i"(MSR_IE) \
32 : "i"(MSR_IE) \ 32 : "memory"); \
33 : "memory"); \
34 } while (0) 33 } while (0)
35 34
36# define local_irq_enable() \ 35# define raw_local_irq_enable() \
37 do { \ 36 do { \
38 asm volatile ("# local_irq_enable \n\t" \ 37 asm volatile (" msrset r0, %0; \
39 "msrset r0, %0 \n\t" \ 38 nop;" \
40 "nop \n\t" \ 39 : \
41 : \ 40 : "i"(MSR_IE) \
42 : "i"(MSR_IE) \ 41 : "memory"); \
43 : "memory"); \
44 } while (0) 42 } while (0)
45 43
46# else /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR == 0 */ 44# else /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR == 0 */
47 45
48# define local_irq_save(flags) \ 46# define raw_local_irq_save(flags) \
49 do { \ 47 do { \
50 register unsigned tmp; \ 48 register unsigned tmp; \
51 asm volatile ("# local_irq_save \n\t" \ 49 asm volatile (" mfs %0, rmsr; \
52 "mfs %0, rmsr \n\t" \ 50 nop; \
53 "nop \n\t" \ 51 andi %1, %0, %2; \
54 "andi %1, %0, %2 \n\t" \ 52 mts rmsr, %1; \
55 "mts rmsr, %1 \n\t" \ 53 nop;" \
56 "nop \n\t" \
57 : "=r"(flags), "=r" (tmp) \ 54 : "=r"(flags), "=r" (tmp) \
58 : "i"(~MSR_IE) \ 55 : "i"(~MSR_IE) \
59 : "memory"); \ 56 : "memory"); \
60 } while (0) 57 } while (0)
61 58
62# define local_irq_disable() \ 59# define raw_local_irq_disable() \
63 do { \ 60 do { \
64 register unsigned tmp; \ 61 register unsigned tmp; \
65 asm volatile ("# local_irq_disable \n\t" \ 62 asm volatile (" mfs %0, rmsr; \
66 "mfs %0, rmsr \n\t" \ 63 nop; \
67 "nop \n\t" \ 64 andi %0, %0, %1; \
68 "andi %0, %0, %1 \n\t" \ 65 mts rmsr, %0; \
69 "mts rmsr, %0 \n\t" \ 66 nop;" \
70 "nop \n\t" \
71 : "=r"(tmp) \ 67 : "=r"(tmp) \
72 : "i"(~MSR_IE) \ 68 : "i"(~MSR_IE) \
73 : "memory"); \ 69 : "memory"); \
74 } while (0) 70 } while (0)
75 71
76# define local_irq_enable() \ 72# define raw_local_irq_enable() \
77 do { \ 73 do { \
78 register unsigned tmp; \ 74 register unsigned tmp; \
79 asm volatile ("# local_irq_enable \n\t" \ 75 asm volatile (" mfs %0, rmsr; \
80 "mfs %0, rmsr \n\t" \ 76 nop; \
81 "nop \n\t" \ 77 ori %0, %0, %1; \
82 "ori %0, %0, %1 \n\t" \ 78 mts rmsr, %0; \
83 "mts rmsr, %0 \n\t" \ 79 nop;" \
84 "nop \n\t" \
85 : "=r"(tmp) \ 80 : "=r"(tmp) \
86 : "i"(MSR_IE) \ 81 : "i"(MSR_IE) \
87 : "memory"); \ 82 : "memory"); \
@@ -89,35 +84,28 @@
89 84
90# endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */ 85# endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */
91 86
92#define local_save_flags(flags) \ 87#define raw_local_irq_restore(flags) \
93 do { \ 88 do { \
94 asm volatile ("# local_save_flags \n\t" \ 89 asm volatile (" mts rmsr, %0; \
95 "mfs %0, rmsr \n\t" \ 90 nop;" \
96 "nop \n\t" \
97 : "=r"(flags) \
98 : \ 91 : \
92 : "r"(flags) \
99 : "memory"); \ 93 : "memory"); \
100 } while (0) 94 } while (0)
101 95
102#define local_irq_restore(flags) \ 96static inline unsigned long get_msr(void)
103 do { \
104 asm volatile ("# local_irq_restore \n\t"\
105 "mts rmsr, %0 \n\t" \
106 "nop \n\t" \
107 : \
108 : "r"(flags) \
109 : "memory"); \
110 } while (0)
111
112static inline int irqs_disabled(void)
113{ 97{
114 unsigned long flags; 98 unsigned long flags;
115 99 asm volatile (" mfs %0, rmsr; \
116 local_save_flags(flags); 100 nop;" \
117 return ((flags & MSR_IE) == 0); 101 : "=r"(flags) \
102 : \
103 : "memory"); \
104 return flags;
118} 105}
119 106
120#define raw_irqs_disabled irqs_disabled 107#define raw_local_save_flags(flags) ((flags) = get_msr())
121#define raw_irqs_disabled_flags(flags) ((flags) == 0) 108#define raw_irqs_disabled() ((get_msr() & MSR_IE) == 0)
109#define raw_irqs_disabled_flags(flags) ((flags & MSR_IE) == 0)
122 110
123#endif /* _ASM_MICROBLAZE_IRQFLAGS_H */ 111#endif /* _ASM_MICROBLAZE_IRQFLAGS_H */
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index 880c988c2237..9b66c0fa9a32 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -164,7 +164,8 @@ extern int page_is_ram(unsigned long pfn);
164# endif /* CONFIG_MMU */ 164# endif /* CONFIG_MMU */
165 165
166# ifndef CONFIG_MMU 166# ifndef CONFIG_MMU
167# define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) <= max_mapnr) 167# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \
168 ((pfn) <= (min_low_pfn + max_mapnr)))
168# define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) 169# define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
169# else /* CONFIG_MMU */ 170# else /* CONFIG_MMU */
170# define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT) 171# define ARCH_PFN_OFFSET (memory_start >> PAGE_SHIFT)
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h
index b0131da1387b..7547f5064560 100644
--- a/arch/microblaze/include/asm/pgalloc.h
+++ b/arch/microblaze/include/asm/pgalloc.h
@@ -106,9 +106,6 @@ extern inline void free_pgd_slow(pgd_t *pgd)
106 */ 106 */
107#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); }) 107#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); })
108#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); }) 108#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); })
109/* FIXME two definition - look below */
110#define pmd_free(mm, x) do { } while (0)
111#define pgd_populate(mm, pmd, pte) BUG()
112 109
113static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 110static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
114 unsigned long address) 111 unsigned long address)
@@ -192,14 +189,14 @@ extern inline void pte_free(struct mm_struct *mm, struct page *ptepage)
192 * the pgd will always be present.. 189 * the pgd will always be present..
193 */ 190 */
194#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); }) 191#define pmd_alloc_one(mm, address) ({ BUG(); ((pmd_t *)2); })
195/*#define pmd_free(mm, x) do { } while (0)*/ 192#define pmd_free(mm, x) do { } while (0)
196#define __pmd_free_tlb(tlb, x, addr) do { } while (0) 193#define __pmd_free_tlb(tlb, x, addr) pmd_free((tlb)->mm, x)
197#define pgd_populate(mm, pmd, pte) BUG() 194#define pgd_populate(mm, pmd, pte) BUG()
198 195
199extern int do_check_pgt_cache(int, int); 196extern int do_check_pgt_cache(int, int);
200 197
201#endif /* CONFIG_MMU */ 198#endif /* CONFIG_MMU */
202 199
203#define check_pgt_cache() do {} while (0) 200#define check_pgt_cache() do { } while (0)
204 201
205#endif /* _ASM_MICROBLAZE_PGALLOC_H */ 202#endif /* _ASM_MICROBLAZE_PGALLOC_H */
diff --git a/arch/microblaze/include/asm/pvr.h b/arch/microblaze/include/asm/pvr.h
index 66f1b30dd097..e38abc7714b6 100644
--- a/arch/microblaze/include/asm/pvr.h
+++ b/arch/microblaze/include/asm/pvr.h
@@ -76,20 +76,23 @@ struct pvr_s {
76#define PVR3_FSL_LINKS_MASK 0x00000380 76#define PVR3_FSL_LINKS_MASK 0x00000380
77 77
78/* ICache config PVR masks */ 78/* ICache config PVR masks */
79#define PVR4_USE_ICACHE_MASK 0x80000000 79#define PVR4_USE_ICACHE_MASK 0x80000000 /* ICU */
80#define PVR4_ICACHE_ADDR_TAG_BITS_MASK 0x7C000000 80#define PVR4_ICACHE_ADDR_TAG_BITS_MASK 0x7C000000 /* ICTS */
81#define PVR4_ICACHE_USE_FSL_MASK 0x02000000 81#define PVR4_ICACHE_ALLOW_WR_MASK 0x01000000 /* ICW */
82#define PVR4_ICACHE_ALLOW_WR_MASK 0x01000000 82#define PVR4_ICACHE_LINE_LEN_MASK 0x00E00000 /* ICLL */
83#define PVR4_ICACHE_LINE_LEN_MASK 0x00E00000 83#define PVR4_ICACHE_BYTE_SIZE_MASK 0x001F0000 /* ICBS */
84#define PVR4_ICACHE_BYTE_SIZE_MASK 0x001F0000 84#define PVR4_ICACHE_ALWAYS_USED 0x00008000 /* IAU */
85#define PVR4_ICACHE_INTERFACE 0x00002000 /* ICI */
85 86
86/* DCache config PVR masks */ 87/* DCache config PVR masks */
87#define PVR5_USE_DCACHE_MASK 0x80000000 88#define PVR5_USE_DCACHE_MASK 0x80000000 /* DCU */
88#define PVR5_DCACHE_ADDR_TAG_BITS_MASK 0x7C000000 89#define PVR5_DCACHE_ADDR_TAG_BITS_MASK 0x7C000000 /* DCTS */
89#define PVR5_DCACHE_USE_FSL_MASK 0x02000000 90#define PVR5_DCACHE_ALLOW_WR_MASK 0x01000000 /* DCW */
90#define PVR5_DCACHE_ALLOW_WR_MASK 0x01000000 91#define PVR5_DCACHE_LINE_LEN_MASK 0x00E00000 /* DCLL */
91#define PVR5_DCACHE_LINE_LEN_MASK 0x00E00000 92#define PVR5_DCACHE_BYTE_SIZE_MASK 0x001F0000 /* DCBS */
92#define PVR5_DCACHE_BYTE_SIZE_MASK 0x001F0000 93#define PVR5_DCACHE_ALWAYS_USED 0x00008000 /* DAU */
94#define PVR5_DCACHE_USE_WRITEBACK 0x00004000 /* DWB */
95#define PVR5_DCACHE_INTERFACE 0x00002000 /* DCI */
93 96
94/* ICache base address PVR mask */ 97/* ICache base address PVR mask */
95#define PVR6_ICACHE_BASEADDR_MASK 0xFFFFFFFF 98#define PVR6_ICACHE_BASEADDR_MASK 0xFFFFFFFF
@@ -178,11 +181,14 @@ struct pvr_s {
178 ((pvr.pvr[5] & PVR5_DCACHE_ADDR_TAG_BITS_MASK) >> 26) 181 ((pvr.pvr[5] & PVR5_DCACHE_ADDR_TAG_BITS_MASK) >> 26)
179#define PVR_DCACHE_USE_FSL(pvr) (pvr.pvr[5] & PVR5_DCACHE_USE_FSL_MASK) 182#define PVR_DCACHE_USE_FSL(pvr) (pvr.pvr[5] & PVR5_DCACHE_USE_FSL_MASK)
180#define PVR_DCACHE_ALLOW_WR(pvr) (pvr.pvr[5] & PVR5_DCACHE_ALLOW_WR_MASK) 183#define PVR_DCACHE_ALLOW_WR(pvr) (pvr.pvr[5] & PVR5_DCACHE_ALLOW_WR_MASK)
184/* FIXME two shifts on one line needs any comment */
181#define PVR_DCACHE_LINE_LEN(pvr) \ 185#define PVR_DCACHE_LINE_LEN(pvr) \
182 (1 << ((pvr.pvr[5] & PVR5_DCACHE_LINE_LEN_MASK) >> 21)) 186 (1 << ((pvr.pvr[5] & PVR5_DCACHE_LINE_LEN_MASK) >> 21))
183#define PVR_DCACHE_BYTE_SIZE(pvr) \ 187#define PVR_DCACHE_BYTE_SIZE(pvr) \
184 (1 << ((pvr.pvr[5] & PVR5_DCACHE_BYTE_SIZE_MASK) >> 16)) 188 (1 << ((pvr.pvr[5] & PVR5_DCACHE_BYTE_SIZE_MASK) >> 16))
185 189
190#define PVR_DCACHE_USE_WRITEBACK(pvr) \
191 ((pvr.pvr[5] & PVR5_DCACHE_USE_WRITEBACK) >> 14)
186 192
187#define PVR_ICACHE_BASEADDR(pvr) (pvr.pvr[6] & PVR6_ICACHE_BASEADDR_MASK) 193#define PVR_ICACHE_BASEADDR(pvr) (pvr.pvr[6] & PVR6_ICACHE_BASEADDR_MASK)
188#define PVR_ICACHE_HIGHADDR(pvr) (pvr.pvr[7] & PVR7_ICACHE_HIGHADDR_MASK) 194#define PVR_ICACHE_HIGHADDR(pvr) (pvr.pvr[7] & PVR7_ICACHE_HIGHADDR_MASK)
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h
index ed67c9ed15b8..7f31394985e0 100644
--- a/arch/microblaze/include/asm/setup.h
+++ b/arch/microblaze/include/asm/setup.h
@@ -35,6 +35,8 @@ extern void mmu_reset(void);
35extern void early_console_reg_tlb_alloc(unsigned int addr); 35extern void early_console_reg_tlb_alloc(unsigned int addr);
36# endif /* CONFIG_MMU */ 36# endif /* CONFIG_MMU */
37 37
38extern void of_platform_reset_gpio_probe(void);
39
38void time_init(void); 40void time_init(void);
39void init_IRQ(void); 41void init_IRQ(void);
40void machine_early_init(const char *cmdline, unsigned int ram, 42void machine_early_init(const char *cmdline, unsigned int ram,
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
index b1ed61590660..157970688b2a 100644
--- a/arch/microblaze/include/asm/system.h
+++ b/arch/microblaze/include/asm/system.h
@@ -16,6 +16,8 @@
16#include <asm-generic/cmpxchg.h> 16#include <asm-generic/cmpxchg.h>
17#include <asm-generic/cmpxchg-local.h> 17#include <asm-generic/cmpxchg-local.h>
18 18
19#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
20
19struct task_struct; 21struct task_struct;
20struct thread_info; 22struct thread_info;
21 23
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 5431b4631a7a..371bd6e56d9a 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -272,8 +272,9 @@ static inline int clear_user(char *to, int size)
272 return size; 272 return size;
273} 273}
274 274
275extern unsigned long __copy_tofrom_user(void __user *to, 275#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
276 const void __user *from, unsigned long size); 276#define __copy_from_user_inatomic(to, from, n) \
277 copy_from_user((to), (from), (n))
277 278
278#define copy_to_user(to, from, n) \ 279#define copy_to_user(to, from, n) \
279 (access_ok(VERIFY_WRITE, (to), (n)) ? \ 280 (access_ok(VERIFY_WRITE, (to), (n)) ? \
@@ -290,10 +291,6 @@ extern unsigned long __copy_tofrom_user(void __user *to,
290 (void __user *)(from), (n)) \ 291 (void __user *)(from), (n)) \
291 : -EFAULT) 292 : -EFAULT)
292 293
293#define __copy_from_user(to, from, n) copy_from_user((to), (from), (n))
294#define __copy_from_user_inatomic(to, from, n) \
295 copy_from_user((to), (from), (n))
296
297extern int __strncpy_user(char *to, const char __user *from, int len); 294extern int __strncpy_user(char *to, const char __user *from, int len);
298extern int __strnlen_user(const char __user *sstr, int len); 295extern int __strnlen_user(const char __user *sstr, int len);
299 296
@@ -305,6 +302,9 @@ extern int __strnlen_user(const char __user *sstr, int len);
305 302
306#endif /* CONFIG_MMU */ 303#endif /* CONFIG_MMU */
307 304
305extern unsigned long __copy_tofrom_user(void __user *to,
306 const void __user *from, unsigned long size);
307
308/* 308/*
309 * The exception table consists of pairs of addresses: the first is the 309 * The exception table consists of pairs of addresses: the first is the
310 * address of an instruction that is allowed to fault, and the second is 310 * address of an instruction that is allowed to fault, and the second is
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index d487729683de..b07594eccf9b 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -2,12 +2,22 @@
2# Makefile 2# Makefile
3# 3#
4 4
5ifdef CONFIG_FUNCTION_TRACER
6# Do not trace early boot code and low level code
7CFLAGS_REMOVE_timer.o = -pg
8CFLAGS_REMOVE_intc.o = -pg
9CFLAGS_REMOVE_early_printk.o = -pg
10CFLAGS_REMOVE_selfmod.o = -pg
11CFLAGS_REMOVE_heartbeat.o = -pg
12CFLAGS_REMOVE_ftrace.o = -pg
13endif
14
5extra-y := head.o vmlinux.lds 15extra-y := head.o vmlinux.lds
6 16
7obj-y += exceptions.o \ 17obj-y += exceptions.o \
8 hw_exception_handler.o init_task.o intc.o irq.o of_device.o \ 18 hw_exception_handler.o init_task.o intc.o irq.o of_device.o \
9 of_platform.o process.o prom.o prom_parse.o ptrace.o \ 19 of_platform.o process.o prom.o prom_parse.o ptrace.o \
10 setup.o signal.o sys_microblaze.o timer.o traps.o 20 setup.o signal.o sys_microblaze.o timer.o traps.o reset.o
11 21
12obj-y += cpu/ 22obj-y += cpu/
13 23
@@ -16,5 +26,7 @@ obj-$(CONFIG_SELFMOD) += selfmod.o
16obj-$(CONFIG_HEART_BEAT) += heartbeat.o 26obj-$(CONFIG_HEART_BEAT) += heartbeat.o
17obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o 27obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o
18obj-$(CONFIG_MMU) += misc.o 28obj-$(CONFIG_MMU) += misc.o
29obj-$(CONFIG_STACKTRACE) += stacktrace.o
30obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o mcount.o
19 31
20obj-y += entry$(MMU).o 32obj-y += entry$(MMU).o
diff --git a/arch/microblaze/kernel/cpu/Makefile b/arch/microblaze/kernel/cpu/Makefile
index 20646e549271..59cc7bceaf8c 100644
--- a/arch/microblaze/kernel/cpu/Makefile
+++ b/arch/microblaze/kernel/cpu/Makefile
@@ -2,6 +2,10 @@
2# Build the appropriate CPU version support 2# Build the appropriate CPU version support
3# 3#
4 4
5ifdef CONFIG_FUNCTION_TRACER
6CFLAGS_REMOVE_cache.o = -pg
7endif
8
5EXTRA_CFLAGS += -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \ 9EXTRA_CFLAGS += -DCPU_MAJOR=$(CPU_MAJOR) -DCPU_MINOR=$(CPU_MINOR) \
6 -DCPU_REV=$(CPU_REV) 10 -DCPU_REV=$(CPU_REV)
7 11
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c
index af866a450125..d9d63831cc2f 100644
--- a/arch/microblaze/kernel/cpu/cache.c
+++ b/arch/microblaze/kernel/cpu/cache.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu> 4 * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2007-2009 PetaLogix 5 * Copyright (C) 2007-2009 PetaLogix
6 * Copyright (C) 2007 John Williams <john.williams@petalogix.com> 6 * Copyright (C) 2007-2009 John Williams <john.williams@petalogix.com>
7 * 7 *
8 * This file is subject to the terms and conditions of the GNU General 8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this 9 * Public License. See the file COPYING in the main directory of this
@@ -13,243 +13,534 @@
13#include <asm/cacheflush.h> 13#include <asm/cacheflush.h>
14#include <linux/cache.h> 14#include <linux/cache.h>
15#include <asm/cpuinfo.h> 15#include <asm/cpuinfo.h>
16#include <asm/pvr.h>
16 17
17/* Exported functions */ 18static inline void __invalidate_flush_icache(unsigned int addr)
19{
20 __asm__ __volatile__ ("wic %0, r0;" \
21 : : "r" (addr));
22}
23
24static inline void __flush_dcache(unsigned int addr)
25{
26 __asm__ __volatile__ ("wdc.flush %0, r0;" \
27 : : "r" (addr));
28}
29
30static inline void __invalidate_dcache(unsigned int baseaddr,
31 unsigned int offset)
32{
33 __asm__ __volatile__ ("wdc.clear %0, %1;" \
34 : : "r" (baseaddr), "r" (offset));
35}
18 36
19void _enable_icache(void) 37static inline void __enable_icache_msr(void)
20{ 38{
21 if (cpuinfo.use_icache) { 39 __asm__ __volatile__ (" msrset r0, %0; \
22#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 40 nop; " \
23 __asm__ __volatile__ (" \ 41 : : "i" (MSR_ICE) : "memory");
24 msrset r0, %0; \ 42}
25 nop; " \ 43
26 : \ 44static inline void __disable_icache_msr(void)
27 : "i" (MSR_ICE) \ 45{
46 __asm__ __volatile__ (" msrclr r0, %0; \
47 nop; " \
48 : : "i" (MSR_ICE) : "memory");
49}
50
51static inline void __enable_dcache_msr(void)
52{
53 __asm__ __volatile__ (" msrset r0, %0; \
54 nop; " \
55 : \
56 : "i" (MSR_DCE) \
28 : "memory"); 57 : "memory");
29#else
30 __asm__ __volatile__ (" \
31 mfs r12, rmsr; \
32 nop; \
33 ori r12, r12, %0; \
34 mts rmsr, r12; \
35 nop; " \
36 : \
37 : "i" (MSR_ICE) \
38 : "memory", "r12");
39#endif
40 }
41} 58}
42 59
43void _disable_icache(void) 60static inline void __disable_dcache_msr(void)
44{ 61{
45 if (cpuinfo.use_icache) { 62 __asm__ __volatile__ (" msrclr r0, %0; \
46#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 63 nop; " \
47 __asm__ __volatile__ (" \ 64 : \
48 msrclr r0, %0; \ 65 : "i" (MSR_DCE) \
49 nop; " \
50 : \
51 : "i" (MSR_ICE) \
52 : "memory"); 66 : "memory");
53#else 67}
54 __asm__ __volatile__ (" \ 68
55 mfs r12, rmsr; \ 69static inline void __enable_icache_nomsr(void)
56 nop; \ 70{
57 andi r12, r12, ~%0; \ 71 __asm__ __volatile__ (" mfs r12, rmsr; \
58 mts rmsr, r12; \ 72 nop; \
59 nop; " \ 73 ori r12, r12, %0; \
60 : \ 74 mts rmsr, r12; \
61 : "i" (MSR_ICE) \ 75 nop; " \
76 : \
77 : "i" (MSR_ICE) \
62 : "memory", "r12"); 78 : "memory", "r12");
63#endif
64 }
65} 79}
66 80
67void _invalidate_icache(unsigned int addr) 81static inline void __disable_icache_nomsr(void)
68{ 82{
69 if (cpuinfo.use_icache) { 83 __asm__ __volatile__ (" mfs r12, rmsr; \
70 __asm__ __volatile__ (" \ 84 nop; \
71 wic %0, r0" \ 85 andi r12, r12, ~%0; \
72 : \ 86 mts rmsr, r12; \
73 : "r" (addr)); 87 nop; " \
74 } 88 : \
89 : "i" (MSR_ICE) \
90 : "memory", "r12");
75} 91}
76 92
77void _enable_dcache(void) 93static inline void __enable_dcache_nomsr(void)
78{ 94{
79 if (cpuinfo.use_dcache) { 95 __asm__ __volatile__ (" mfs r12, rmsr; \
80#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 96 nop; \
81 __asm__ __volatile__ (" \ 97 ori r12, r12, %0; \
82 msrset r0, %0; \ 98 mts rmsr, r12; \
83 nop; " \ 99 nop; " \
84 : \ 100 : \
85 : "i" (MSR_DCE) \ 101 : "i" (MSR_DCE) \
86 : "memory");
87#else
88 __asm__ __volatile__ (" \
89 mfs r12, rmsr; \
90 nop; \
91 ori r12, r12, %0; \
92 mts rmsr, r12; \
93 nop; " \
94 : \
95 : "i" (MSR_DCE) \
96 : "memory", "r12"); 102 : "memory", "r12");
97#endif
98 }
99} 103}
100 104
101void _disable_dcache(void) 105static inline void __disable_dcache_nomsr(void)
102{ 106{
103#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 107 __asm__ __volatile__ (" mfs r12, rmsr; \
104 __asm__ __volatile__ (" \ 108 nop; \
105 msrclr r0, %0; \ 109 andi r12, r12, ~%0; \
106 nop; " \ 110 mts rmsr, r12; \
107 : \ 111 nop; " \
108 : "i" (MSR_DCE) \ 112 : \
109 : "memory"); 113 : "i" (MSR_DCE) \
110#else
111 __asm__ __volatile__ (" \
112 mfs r12, rmsr; \
113 nop; \
114 andi r12, r12, ~%0; \
115 mts rmsr, r12; \
116 nop; " \
117 : \
118 : "i" (MSR_DCE) \
119 : "memory", "r12"); 114 : "memory", "r12");
120#endif
121} 115}
122 116
123void _invalidate_dcache(unsigned int addr) 117
118/* Helper macro for computing the limits of cache range loops */
119#define CACHE_LOOP_LIMITS(start, end, cache_line_length, cache_size) \
120do { \
121 int align = ~(cache_line_length - 1); \
122 end = min(start + cache_size, end); \
123 start &= align; \
124 end = ((end & align) + cache_line_length); \
125} while (0);
126
127/*
128 * Helper macro to loop over the specified cache_size/line_length and
129 * execute 'op' on that cacheline
130 */
131#define CACHE_ALL_LOOP(cache_size, line_length, op) \
132do { \
133 unsigned int len = cache_size; \
134 int step = -line_length; \
135 BUG_ON(step >= 0); \
136 \
137 __asm__ __volatile__ (" 1: " #op " %0, r0; \
138 bgtid %0, 1b; \
139 addk %0, %0, %1; \
140 " : : "r" (len), "r" (step) \
141 : "memory"); \
142} while (0);
143
144
145#define CACHE_ALL_LOOP2(cache_size, line_length, op) \
146do { \
147 unsigned int len = cache_size; \
148 int step = -line_length; \
149 BUG_ON(step >= 0); \
150 \
151 __asm__ __volatile__ (" 1: " #op " r0, %0; \
152 bgtid %0, 1b; \
153 addk %0, %0, %1; \
154 " : : "r" (len), "r" (step) \
155 : "memory"); \
156} while (0);
157
158/* for wdc.flush/clear */
159#define CACHE_RANGE_LOOP_2(start, end, line_length, op) \
160do { \
161 int step = -line_length; \
162 int count = end - start; \
163 BUG_ON(count <= 0); \
164 \
165 __asm__ __volatile__ (" 1: " #op " %0, %1; \
166 bgtid %1, 1b; \
167 addk %1, %1, %2; \
168 " : : "r" (start), "r" (count), \
169 "r" (step) : "memory"); \
170} while (0);
171
172/* It is used only first parameter for OP - for wic, wdc */
173#define CACHE_RANGE_LOOP_1(start, end, line_length, op) \
174do { \
175 int step = -line_length; \
176 int count = end - start; \
177 BUG_ON(count <= 0); \
178 \
179 __asm__ __volatile__ (" 1: addk %0, %0, %1; \
180 " #op " %0, r0; \
181 bgtid %1, 1b; \
182 addk %1, %1, %2; \
183 " : : "r" (start), "r" (count), \
184 "r" (step) : "memory"); \
185} while (0);
186
187static void __flush_icache_range_msr_irq(unsigned long start, unsigned long end)
124{ 188{
125 __asm__ __volatile__ (" \ 189 unsigned long flags;
126 wdc %0, r0" \ 190
127 : \ 191 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
128 : "r" (addr)); 192 (unsigned int)start, (unsigned int) end);
193
194 CACHE_LOOP_LIMITS(start, end,
195 cpuinfo.icache_line_length, cpuinfo.icache_size);
196
197 local_irq_save(flags);
198 __disable_icache_msr();
199
200 CACHE_RANGE_LOOP_1(start, end, cpuinfo.icache_line_length, wic);
201
202 __enable_icache_msr();
203 local_irq_restore(flags);
129} 204}
130 205
131void __invalidate_icache_all(void) 206static void __flush_icache_range_nomsr_irq(unsigned long start,
207 unsigned long end)
132{ 208{
133 unsigned int i; 209 unsigned long flags;
134 unsigned flags;
135 210
136 if (cpuinfo.use_icache) { 211 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
137 local_irq_save(flags); 212 (unsigned int)start, (unsigned int) end);
138 __disable_icache();
139 213
140 /* Just loop through cache size and invalidate, no need to add 214 CACHE_LOOP_LIMITS(start, end,
141 CACHE_BASE address */ 215 cpuinfo.icache_line_length, cpuinfo.icache_size);
142 for (i = 0; i < cpuinfo.icache_size;
143 i += cpuinfo.icache_line)
144 __invalidate_icache(i);
145 216
146 __enable_icache(); 217 local_irq_save(flags);
147 local_irq_restore(flags); 218 __disable_icache_nomsr();
148 } 219
220 CACHE_RANGE_LOOP_1(start, end, cpuinfo.icache_line_length, wic);
221
222 __enable_icache_nomsr();
223 local_irq_restore(flags);
149} 224}
150 225
151void __invalidate_icache_range(unsigned long start, unsigned long end) 226static void __flush_icache_range_noirq(unsigned long start,
227 unsigned long end)
152{ 228{
153 unsigned int i; 229 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
154 unsigned flags; 230 (unsigned int)start, (unsigned int) end);
155 unsigned int align; 231
156 232 CACHE_LOOP_LIMITS(start, end,
157 if (cpuinfo.use_icache) { 233 cpuinfo.icache_line_length, cpuinfo.icache_size);
158 /* 234 CACHE_RANGE_LOOP_1(start, end, cpuinfo.icache_line_length, wic);
159 * No need to cover entire cache range, 235}
160 * just cover cache footprint 236
161 */ 237static void __flush_icache_all_msr_irq(void)
162 end = min(start + cpuinfo.icache_size, end); 238{
163 align = ~(cpuinfo.icache_line - 1); 239 unsigned long flags;
164 start &= align; /* Make sure we are aligned */ 240
165 /* Push end up to the next cache line */ 241 pr_debug("%s\n", __func__);
166 end = ((end & align) + cpuinfo.icache_line); 242
167 243 local_irq_save(flags);
168 local_irq_save(flags); 244 __disable_icache_msr();
169 __disable_icache(); 245
170 246 CACHE_ALL_LOOP(cpuinfo.icache_size, cpuinfo.icache_line_length, wic);
171 for (i = start; i < end; i += cpuinfo.icache_line) 247
172 __invalidate_icache(i); 248 __enable_icache_msr();
173 249 local_irq_restore(flags);
174 __enable_icache(); 250}
175 local_irq_restore(flags); 251
176 } 252static void __flush_icache_all_nomsr_irq(void)
253{
254 unsigned long flags;
255
256 pr_debug("%s\n", __func__);
257
258 local_irq_save(flags);
259 __disable_icache_nomsr();
260
261 CACHE_ALL_LOOP(cpuinfo.icache_size, cpuinfo.icache_line_length, wic);
262
263 __enable_icache_nomsr();
264 local_irq_restore(flags);
177} 265}
178 266
179void __invalidate_icache_page(struct vm_area_struct *vma, struct page *page) 267static void __flush_icache_all_noirq(void)
180{ 268{
181 __invalidate_icache_all(); 269 pr_debug("%s\n", __func__);
270 CACHE_ALL_LOOP(cpuinfo.icache_size, cpuinfo.icache_line_length, wic);
182} 271}
183 272
184void __invalidate_icache_user_range(struct vm_area_struct *vma, 273static void __invalidate_dcache_all_msr_irq(void)
185 struct page *page, unsigned long adr,
186 int len)
187{ 274{
188 __invalidate_icache_all(); 275 unsigned long flags;
276
277 pr_debug("%s\n", __func__);
278
279 local_irq_save(flags);
280 __disable_dcache_msr();
281
282 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc);
283
284 __enable_dcache_msr();
285 local_irq_restore(flags);
189} 286}
190 287
191void __invalidate_cache_sigtramp(unsigned long addr) 288static void __invalidate_dcache_all_nomsr_irq(void)
192{ 289{
193 __invalidate_icache_range(addr, addr + 8); 290 unsigned long flags;
291
292 pr_debug("%s\n", __func__);
293
294 local_irq_save(flags);
295 __disable_dcache_nomsr();
296
297 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc);
298
299 __enable_dcache_nomsr();
300 local_irq_restore(flags);
194} 301}
195 302
196void __invalidate_dcache_all(void) 303static void __invalidate_dcache_all_noirq_wt(void)
197{ 304{
198 unsigned int i; 305 pr_debug("%s\n", __func__);
199 unsigned flags; 306 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc)
200
201 if (cpuinfo.use_dcache) {
202 local_irq_save(flags);
203 __disable_dcache();
204
205 /*
206 * Just loop through cache size and invalidate,
207 * no need to add CACHE_BASE address
208 */
209 for (i = 0; i < cpuinfo.dcache_size;
210 i += cpuinfo.dcache_line)
211 __invalidate_dcache(i);
212
213 __enable_dcache();
214 local_irq_restore(flags);
215 }
216} 307}
217 308
218void __invalidate_dcache_range(unsigned long start, unsigned long end) 309/* FIXME this is weird - should be only wdc but not work
310 * MS: I am getting bus errors and other weird things */
311static void __invalidate_dcache_all_wb(void)
219{ 312{
313 pr_debug("%s\n", __func__);
314 CACHE_ALL_LOOP2(cpuinfo.dcache_size, cpuinfo.dcache_line_length,
315 wdc.clear)
316
317#if 0
220 unsigned int i; 318 unsigned int i;
221 unsigned flags; 319
222 unsigned int align; 320 pr_debug("%s\n", __func__);
223 321
224 if (cpuinfo.use_dcache) { 322 /* Just loop through cache size and invalidate it */
225 /* 323 for (i = 0; i < cpuinfo.dcache_size; i += cpuinfo.dcache_line_length)
226 * No need to cover entire cache range, 324 __invalidate_dcache(0, i);
227 * just cover cache footprint 325#endif
228 */ 326}
229 end = min(start + cpuinfo.dcache_size, end); 327
230 align = ~(cpuinfo.dcache_line - 1); 328static void __invalidate_dcache_range_wb(unsigned long start,
231 start &= align; /* Make sure we are aligned */ 329 unsigned long end)
232 /* Push end up to the next cache line */ 330{
233 end = ((end & align) + cpuinfo.dcache_line); 331 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
234 local_irq_save(flags); 332 (unsigned int)start, (unsigned int) end);
235 __disable_dcache(); 333
236 334 CACHE_LOOP_LIMITS(start, end,
237 for (i = start; i < end; i += cpuinfo.dcache_line) 335 cpuinfo.dcache_line_length, cpuinfo.dcache_size);
238 __invalidate_dcache(i); 336 CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.clear);
239 337}
240 __enable_dcache(); 338
241 local_irq_restore(flags); 339static void __invalidate_dcache_range_nomsr_wt(unsigned long start,
242 } 340 unsigned long end)
341{
342 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
343 (unsigned int)start, (unsigned int) end);
344 CACHE_LOOP_LIMITS(start, end,
345 cpuinfo.dcache_line_length, cpuinfo.dcache_size);
346
347 CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc);
243} 348}
244 349
245void __invalidate_dcache_page(struct vm_area_struct *vma, struct page *page) 350static void __invalidate_dcache_range_msr_irq_wt(unsigned long start,
351 unsigned long end)
246{ 352{
247 __invalidate_dcache_all(); 353 unsigned long flags;
354
355 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
356 (unsigned int)start, (unsigned int) end);
357 CACHE_LOOP_LIMITS(start, end,
358 cpuinfo.dcache_line_length, cpuinfo.dcache_size);
359
360 local_irq_save(flags);
361 __disable_dcache_msr();
362
363 CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc);
364
365 __enable_dcache_msr();
366 local_irq_restore(flags);
367}
368
369static void __invalidate_dcache_range_nomsr_irq(unsigned long start,
370 unsigned long end)
371{
372 unsigned long flags;
373
374 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
375 (unsigned int)start, (unsigned int) end);
376
377 CACHE_LOOP_LIMITS(start, end,
378 cpuinfo.dcache_line_length, cpuinfo.dcache_size);
379
380 local_irq_save(flags);
381 __disable_dcache_nomsr();
382
383 CACHE_RANGE_LOOP_1(start, end, cpuinfo.dcache_line_length, wdc);
384
385 __enable_dcache_nomsr();
386 local_irq_restore(flags);
387}
388
389static void __flush_dcache_all_wb(void)
390{
391 pr_debug("%s\n", __func__);
392 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length,
393 wdc.flush);
248} 394}
249 395
250void __invalidate_dcache_user_range(struct vm_area_struct *vma, 396static void __flush_dcache_range_wb(unsigned long start, unsigned long end)
251 struct page *page, unsigned long adr,
252 int len)
253{ 397{
254 __invalidate_dcache_all(); 398 pr_debug("%s: start 0x%x, end 0x%x\n", __func__,
399 (unsigned int)start, (unsigned int) end);
400
401 CACHE_LOOP_LIMITS(start, end,
402 cpuinfo.dcache_line_length, cpuinfo.dcache_size);
403 CACHE_RANGE_LOOP_2(start, end, cpuinfo.dcache_line_length, wdc.flush);
404}
405
406/* struct for wb caches and for wt caches */
407struct scache *mbc;
408
409/* new wb cache model */
410const struct scache wb_msr = {
411 .ie = __enable_icache_msr,
412 .id = __disable_icache_msr,
413 .ifl = __flush_icache_all_noirq,
414 .iflr = __flush_icache_range_noirq,
415 .iin = __flush_icache_all_noirq,
416 .iinr = __flush_icache_range_noirq,
417 .de = __enable_dcache_msr,
418 .dd = __disable_dcache_msr,
419 .dfl = __flush_dcache_all_wb,
420 .dflr = __flush_dcache_range_wb,
421 .din = __invalidate_dcache_all_wb,
422 .dinr = __invalidate_dcache_range_wb,
423};
424
425/* There is only difference in ie, id, de, dd functions */
426const struct scache wb_nomsr = {
427 .ie = __enable_icache_nomsr,
428 .id = __disable_icache_nomsr,
429 .ifl = __flush_icache_all_noirq,
430 .iflr = __flush_icache_range_noirq,
431 .iin = __flush_icache_all_noirq,
432 .iinr = __flush_icache_range_noirq,
433 .de = __enable_dcache_nomsr,
434 .dd = __disable_dcache_nomsr,
435 .dfl = __flush_dcache_all_wb,
436 .dflr = __flush_dcache_range_wb,
437 .din = __invalidate_dcache_all_wb,
438 .dinr = __invalidate_dcache_range_wb,
439};
440
441/* Old wt cache model with disabling irq and turn off cache */
442const struct scache wt_msr = {
443 .ie = __enable_icache_msr,
444 .id = __disable_icache_msr,
445 .ifl = __flush_icache_all_msr_irq,
446 .iflr = __flush_icache_range_msr_irq,
447 .iin = __flush_icache_all_msr_irq,
448 .iinr = __flush_icache_range_msr_irq,
449 .de = __enable_dcache_msr,
450 .dd = __disable_dcache_msr,
451 .dfl = __invalidate_dcache_all_msr_irq,
452 .dflr = __invalidate_dcache_range_msr_irq_wt,
453 .din = __invalidate_dcache_all_msr_irq,
454 .dinr = __invalidate_dcache_range_msr_irq_wt,
455};
456
457const struct scache wt_nomsr = {
458 .ie = __enable_icache_nomsr,
459 .id = __disable_icache_nomsr,
460 .ifl = __flush_icache_all_nomsr_irq,
461 .iflr = __flush_icache_range_nomsr_irq,
462 .iin = __flush_icache_all_nomsr_irq,
463 .iinr = __flush_icache_range_nomsr_irq,
464 .de = __enable_dcache_nomsr,
465 .dd = __disable_dcache_nomsr,
466 .dfl = __invalidate_dcache_all_nomsr_irq,
467 .dflr = __invalidate_dcache_range_nomsr_irq,
468 .din = __invalidate_dcache_all_nomsr_irq,
469 .dinr = __invalidate_dcache_range_nomsr_irq,
470};
471
472/* New wt cache model for newer Microblaze versions */
473const struct scache wt_msr_noirq = {
474 .ie = __enable_icache_msr,
475 .id = __disable_icache_msr,
476 .ifl = __flush_icache_all_noirq,
477 .iflr = __flush_icache_range_noirq,
478 .iin = __flush_icache_all_noirq,
479 .iinr = __flush_icache_range_noirq,
480 .de = __enable_dcache_msr,
481 .dd = __disable_dcache_msr,
482 .dfl = __invalidate_dcache_all_noirq_wt,
483 .dflr = __invalidate_dcache_range_nomsr_wt,
484 .din = __invalidate_dcache_all_noirq_wt,
485 .dinr = __invalidate_dcache_range_nomsr_wt,
486};
487
488const struct scache wt_nomsr_noirq = {
489 .ie = __enable_icache_nomsr,
490 .id = __disable_icache_nomsr,
491 .ifl = __flush_icache_all_noirq,
492 .iflr = __flush_icache_range_noirq,
493 .iin = __flush_icache_all_noirq,
494 .iinr = __flush_icache_range_noirq,
495 .de = __enable_dcache_nomsr,
496 .dd = __disable_dcache_nomsr,
497 .dfl = __invalidate_dcache_all_noirq_wt,
498 .dflr = __invalidate_dcache_range_nomsr_wt,
499 .din = __invalidate_dcache_all_noirq_wt,
500 .dinr = __invalidate_dcache_range_nomsr_wt,
501};
502
503/* CPU version code for 7.20.c - see arch/microblaze/kernel/cpu/cpuinfo.c */
504#define CPUVER_7_20_A 0x0c
505#define CPUVER_7_20_D 0x0f
506
507#define INFO(s) printk(KERN_INFO "cache: " s " \n");
508
509void microblaze_cache_init(void)
510{
511 if (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) {
512 if (cpuinfo.dcache_wb) {
513 INFO("wb_msr");
514 mbc = (struct scache *)&wb_msr;
515 if (cpuinfo.ver_code < CPUVER_7_20_D) {
516 /* MS: problem with signal handling - hw bug */
517 INFO("WB won't work properly");
518 }
519 } else {
520 if (cpuinfo.ver_code >= CPUVER_7_20_A) {
521 INFO("wt_msr_noirq");
522 mbc = (struct scache *)&wt_msr_noirq;
523 } else {
524 INFO("wt_msr");
525 mbc = (struct scache *)&wt_msr;
526 }
527 }
528 } else {
529 if (cpuinfo.dcache_wb) {
530 INFO("wb_nomsr");
531 mbc = (struct scache *)&wb_nomsr;
532 if (cpuinfo.ver_code < CPUVER_7_20_D) {
533 /* MS: problem with signal handling - hw bug */
534 INFO("WB won't work properly");
535 }
536 } else {
537 if (cpuinfo.ver_code >= CPUVER_7_20_A) {
538 INFO("wt_nomsr_noirq");
539 mbc = (struct scache *)&wt_nomsr_noirq;
540 } else {
541 INFO("wt_nomsr");
542 mbc = (struct scache *)&wt_nomsr;
543 }
544 }
545 }
255} 546}
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
index c259786e7faa..f72dbd66c844 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
@@ -21,8 +21,14 @@
21 */ 21 */
22 22
23#define CI(c, p) { ci->c = PVR_##p(pvr); } 23#define CI(c, p) { ci->c = PVR_##p(pvr); }
24
25#if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
24#define err_printk(x) \ 26#define err_printk(x) \
25 early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n"); 27 early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n");
28#else
29#define err_printk(x) \
30 printk(KERN_INFO "ERROR: Microblaze " x "-different for PVR and DTS\n");
31#endif
26 32
27void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) 33void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
28{ 34{
@@ -70,7 +76,7 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
70 CI(use_icache, USE_ICACHE); 76 CI(use_icache, USE_ICACHE);
71 CI(icache_tagbits, ICACHE_ADDR_TAG_BITS); 77 CI(icache_tagbits, ICACHE_ADDR_TAG_BITS);
72 CI(icache_write, ICACHE_ALLOW_WR); 78 CI(icache_write, ICACHE_ALLOW_WR);
73 CI(icache_line, ICACHE_LINE_LEN); 79 ci->icache_line_length = PVR_ICACHE_LINE_LEN(pvr) << 2;
74 CI(icache_size, ICACHE_BYTE_SIZE); 80 CI(icache_size, ICACHE_BYTE_SIZE);
75 CI(icache_base, ICACHE_BASEADDR); 81 CI(icache_base, ICACHE_BASEADDR);
76 CI(icache_high, ICACHE_HIGHADDR); 82 CI(icache_high, ICACHE_HIGHADDR);
@@ -78,11 +84,16 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
78 CI(use_dcache, USE_DCACHE); 84 CI(use_dcache, USE_DCACHE);
79 CI(dcache_tagbits, DCACHE_ADDR_TAG_BITS); 85 CI(dcache_tagbits, DCACHE_ADDR_TAG_BITS);
80 CI(dcache_write, DCACHE_ALLOW_WR); 86 CI(dcache_write, DCACHE_ALLOW_WR);
81 CI(dcache_line, DCACHE_LINE_LEN); 87 ci->dcache_line_length = PVR_DCACHE_LINE_LEN(pvr) << 2;
82 CI(dcache_size, DCACHE_BYTE_SIZE); 88 CI(dcache_size, DCACHE_BYTE_SIZE);
83 CI(dcache_base, DCACHE_BASEADDR); 89 CI(dcache_base, DCACHE_BASEADDR);
84 CI(dcache_high, DCACHE_HIGHADDR); 90 CI(dcache_high, DCACHE_HIGHADDR);
85 91
92 temp = PVR_DCACHE_USE_WRITEBACK(pvr);
93 if (ci->dcache_wb != temp)
94 err_printk("DCACHE WB");
95 ci->dcache_wb = temp;
96
86 CI(use_dopb, D_OPB); 97 CI(use_dopb, D_OPB);
87 CI(use_iopb, I_OPB); 98 CI(use_iopb, I_OPB);
88 CI(use_dlmb, D_LMB); 99 CI(use_dlmb, D_LMB);
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-static.c b/arch/microblaze/kernel/cpu/cpuinfo-static.c
index adb448f93d5f..6095aa6b5c88 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-static.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-static.c
@@ -72,12 +72,12 @@ void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
72 ci->use_icache = fcpu(cpu, "xlnx,use-icache"); 72 ci->use_icache = fcpu(cpu, "xlnx,use-icache");
73 ci->icache_tagbits = fcpu(cpu, "xlnx,addr-tag-bits"); 73 ci->icache_tagbits = fcpu(cpu, "xlnx,addr-tag-bits");
74 ci->icache_write = fcpu(cpu, "xlnx,allow-icache-wr"); 74 ci->icache_write = fcpu(cpu, "xlnx,allow-icache-wr");
75 ci->icache_line = fcpu(cpu, "xlnx,icache-line-len") << 2; 75 ci->icache_line_length = fcpu(cpu, "xlnx,icache-line-len") << 2;
76 if (!ci->icache_line) { 76 if (!ci->icache_line_length) {
77 if (fcpu(cpu, "xlnx,icache-use-fsl")) 77 if (fcpu(cpu, "xlnx,icache-use-fsl"))
78 ci->icache_line = 4 << 2; 78 ci->icache_line_length = 4 << 2;
79 else 79 else
80 ci->icache_line = 1 << 2; 80 ci->icache_line_length = 1 << 2;
81 } 81 }
82 ci->icache_size = fcpu(cpu, "i-cache-size"); 82 ci->icache_size = fcpu(cpu, "i-cache-size");
83 ci->icache_base = fcpu(cpu, "i-cache-baseaddr"); 83 ci->icache_base = fcpu(cpu, "i-cache-baseaddr");
@@ -86,16 +86,17 @@ void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
86 ci->use_dcache = fcpu(cpu, "xlnx,use-dcache"); 86 ci->use_dcache = fcpu(cpu, "xlnx,use-dcache");
87 ci->dcache_tagbits = fcpu(cpu, "xlnx,dcache-addr-tag"); 87 ci->dcache_tagbits = fcpu(cpu, "xlnx,dcache-addr-tag");
88 ci->dcache_write = fcpu(cpu, "xlnx,allow-dcache-wr"); 88 ci->dcache_write = fcpu(cpu, "xlnx,allow-dcache-wr");
89 ci->dcache_line = fcpu(cpu, "xlnx,dcache-line-len") << 2; 89 ci->dcache_line_length = fcpu(cpu, "xlnx,dcache-line-len") << 2;
90 if (!ci->dcache_line) { 90 if (!ci->dcache_line_length) {
91 if (fcpu(cpu, "xlnx,dcache-use-fsl")) 91 if (fcpu(cpu, "xlnx,dcache-use-fsl"))
92 ci->dcache_line = 4 << 2; 92 ci->dcache_line_length = 4 << 2;
93 else 93 else
94 ci->dcache_line = 1 << 2; 94 ci->dcache_line_length = 1 << 2;
95 } 95 }
96 ci->dcache_size = fcpu(cpu, "d-cache-size"); 96 ci->dcache_size = fcpu(cpu, "d-cache-size");
97 ci->dcache_base = fcpu(cpu, "d-cache-baseaddr"); 97 ci->dcache_base = fcpu(cpu, "d-cache-baseaddr");
98 ci->dcache_high = fcpu(cpu, "d-cache-highaddr"); 98 ci->dcache_high = fcpu(cpu, "d-cache-highaddr");
99 ci->dcache_wb = fcpu(cpu, "xlnx,dcache-use-writeback");
99 100
100 ci->use_dopb = fcpu(cpu, "xlnx,d-opb"); 101 ci->use_dopb = fcpu(cpu, "xlnx,d-opb");
101 ci->use_iopb = fcpu(cpu, "xlnx,i-opb"); 102 ci->use_iopb = fcpu(cpu, "xlnx,i-opb");
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index 3539babc1c18..991d71311b0e 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -29,11 +29,8 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
29 {"7.20.a", 0x0c}, 29 {"7.20.a", 0x0c},
30 {"7.20.b", 0x0d}, 30 {"7.20.b", 0x0d},
31 {"7.20.c", 0x0e}, 31 {"7.20.c", 0x0e},
32 /* FIXME There is no keycode defined in MBV for these versions */ 32 {"7.20.d", 0x0f},
33 {"2.10.a", 0x10}, 33 {"7.30.a", 0x10},
34 {"3.00.a", 0x20},
35 {"4.00.a", 0x30},
36 {"4.00.b", 0x40},
37 {NULL, 0}, 34 {NULL, 0},
38}; 35};
39 36
diff --git a/arch/microblaze/kernel/cpu/mb.c b/arch/microblaze/kernel/cpu/mb.c
index 4dcfccdbc364..0c912b2a8e03 100644
--- a/arch/microblaze/kernel/cpu/mb.c
+++ b/arch/microblaze/kernel/cpu/mb.c
@@ -103,11 +103,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
103 else 103 else
104 count += seq_printf(m, "Icache:\t\tno\n"); 104 count += seq_printf(m, "Icache:\t\tno\n");
105 105
106 if (cpuinfo.use_dcache) 106 if (cpuinfo.use_dcache) {
107 count += seq_printf(m, 107 count += seq_printf(m,
108 "Dcache:\t\t%ukB\n", 108 "Dcache:\t\t%ukB\n",
109 cpuinfo.dcache_size >> 10); 109 cpuinfo.dcache_size >> 10);
110 else 110 if (cpuinfo.dcache_wb)
111 count += seq_printf(m, "\t\twrite-back\n");
112 else
113 count += seq_printf(m, "\t\twrite-through\n");
114 } else
111 count += seq_printf(m, "Dcache:\t\tno\n"); 115 count += seq_printf(m, "Dcache:\t\tno\n");
112 116
113 count += seq_printf(m, 117 count += seq_printf(m,
diff --git a/arch/microblaze/kernel/cpu/pvr.c b/arch/microblaze/kernel/cpu/pvr.c
index c9a4340ddd53..9bee9382bf74 100644
--- a/arch/microblaze/kernel/cpu/pvr.c
+++ b/arch/microblaze/kernel/cpu/pvr.c
@@ -45,7 +45,7 @@
45 45
46int cpu_has_pvr(void) 46int cpu_has_pvr(void)
47{ 47{
48 unsigned flags; 48 unsigned long flags;
49 unsigned pvr0; 49 unsigned pvr0;
50 50
51 local_save_flags(flags); 51 local_save_flags(flags);
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
index 9083d85376a4..95b0855802df 100644
--- a/arch/microblaze/kernel/entry-nommu.S
+++ b/arch/microblaze/kernel/entry-nommu.S
@@ -208,8 +208,6 @@ ENTRY(_user_exception)
208 lwi r1, r1, TS_THREAD_INFO /* get the thread info */ 208 lwi r1, r1, TS_THREAD_INFO /* get the thread info */
209 /* calculate kernel stack pointer */ 209 /* calculate kernel stack pointer */
210 addik r1, r1, THREAD_SIZE - PT_SIZE 210 addik r1, r1, THREAD_SIZE - PT_SIZE
211 swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
212 lwi r11, r0, PER_CPU(KM) /* load mode indicator */
2132: 2112:
214 swi r11, r1, PT_MODE /* store the mode */ 212 swi r11, r1, PT_MODE /* store the mode */
215 lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */ 213 lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index e3ecb36dd554..3bad4ff49471 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -31,6 +31,8 @@
31#include <linux/errno.h> 31#include <linux/errno.h>
32#include <asm/signal.h> 32#include <asm/signal.h>
33 33
34#undef DEBUG
35
34/* The size of a state save frame. */ 36/* The size of a state save frame. */
35#define STATE_SAVE_SIZE (PT_SIZE + STATE_SAVE_ARG_SPACE) 37#define STATE_SAVE_SIZE (PT_SIZE + STATE_SAVE_ARG_SPACE)
36 38
@@ -352,10 +354,12 @@ C_ENTRY(_user_exception):
352 add r12, r12, r12; /* convert num -> ptr */ 354 add r12, r12, r12; /* convert num -> ptr */
353 add r12, r12, r12; 355 add r12, r12, r12;
354 356
357#ifdef DEBUG
355 /* Trac syscalls and stored them to r0_ram */ 358 /* Trac syscalls and stored them to r0_ram */
356 lwi r3, r12, 0x400 + r0_ram 359 lwi r3, r12, 0x400 + r0_ram
357 addi r3, r3, 1 360 addi r3, r3, 1
358 swi r3, r12, 0x400 + r0_ram 361 swi r3, r12, 0x400 + r0_ram
362#endif
359 363
360 # Find and jump into the syscall handler. 364 # Find and jump into the syscall handler.
361 lwi r12, r12, sys_call_table 365 lwi r12, r12, sys_call_table
@@ -496,17 +500,6 @@ C_ENTRY(sys_execve):
496 brid microblaze_execve; /* Do real work (tail-call).*/ 500 brid microblaze_execve; /* Do real work (tail-call).*/
497 nop; 501 nop;
498 502
499C_ENTRY(sys_rt_sigsuspend_wrapper):
500 swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */
501 swi r4, r1, PTO+PT_R4;
502 la r7, r1, PTO; /* add user context as 3rd arg */
503 brlid r15, sys_rt_sigsuspend; /* Do real work.*/
504 nop;
505 lwi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */
506 lwi r4, r1, PTO+PT_R4;
507 bri ret_from_trap /* fall through will not work here due to align */
508 nop;
509
510C_ENTRY(sys_rt_sigreturn_wrapper): 503C_ENTRY(sys_rt_sigreturn_wrapper):
511 swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ 504 swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */
512 swi r4, r1, PTO+PT_R4; 505 swi r4, r1, PTO+PT_R4;
@@ -711,15 +704,11 @@ C_ENTRY(ret_from_exc):
711 * (in a possibly modified form) after do_signal returns. 704 * (in a possibly modified form) after do_signal returns.
712 * store return registers separately because this macros is use 705 * store return registers separately because this macros is use
713 * for others exceptions */ 706 * for others exceptions */
714 swi r3, r1, PTO + PT_R3;
715 swi r4, r1, PTO + PT_R4;
716 la r5, r1, PTO; /* Arg 1: struct pt_regs *regs */ 707 la r5, r1, PTO; /* Arg 1: struct pt_regs *regs */
717 add r6, r0, r0; /* Arg 2: sigset_t *oldset */ 708 add r6, r0, r0; /* Arg 2: sigset_t *oldset */
718 addi r7, r0, 0; /* Arg 3: int in_syscall */ 709 addi r7, r0, 0; /* Arg 3: int in_syscall */
719 bralid r15, do_signal; /* Handle any signals */ 710 bralid r15, do_signal; /* Handle any signals */
720 nop; 711 nop;
721 lwi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */
722 lwi r4, r1, PTO+PT_R4;
723 712
724/* Finally, return to user state. */ 713/* Finally, return to user state. */
7251: swi r0, r0, PER_CPU(KM); /* Now officially in user state. */ 7141: swi r0, r0, PER_CPU(KM); /* Now officially in user state. */
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c
new file mode 100644
index 000000000000..388b31ca65a1
--- /dev/null
+++ b/arch/microblaze/kernel/ftrace.c
@@ -0,0 +1,237 @@
1/*
2 * Ftrace support for Microblaze.
3 *
4 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2009 PetaLogix
6 *
7 * Based on MIPS and PowerPC ftrace code
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
11 * for more details.
12 */
13
14#include <asm/cacheflush.h>
15#include <linux/ftrace.h>
16
17#ifdef CONFIG_FUNCTION_GRAPH_TRACER
18/*
19 * Hook the return address and push it in the stack of return addrs
20 * in current thread info.
21 */
22void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
23{
24 unsigned long old;
25 int faulted, err;
26 struct ftrace_graph_ent trace;
27 unsigned long return_hooker = (unsigned long)
28 &return_to_handler;
29
30 if (unlikely(atomic_read(&current->tracing_graph_pause)))
31 return;
32
33 /*
34 * Protect against fault, even if it shouldn't
35 * happen. This tool is too much intrusive to
36 * ignore such a protection.
37 */
38 asm volatile(" 1: lwi %0, %2, 0; \
39 2: swi %3, %2, 0; \
40 addik %1, r0, 0; \
41 3: \
42 .section .fixup, \"ax\"; \
43 4: brid 3b; \
44 addik %1, r0, 1; \
45 .previous; \
46 .section __ex_table,\"a\"; \
47 .word 1b,4b; \
48 .word 2b,4b; \
49 .previous;" \
50 : "=&r" (old), "=r" (faulted)
51 : "r" (parent), "r" (return_hooker)
52 );
53
54 if (unlikely(faulted)) {
55 ftrace_graph_stop();
56 WARN_ON(1);
57 return;
58 }
59
60 err = ftrace_push_return_trace(old, self_addr, &trace.depth, 0);
61 if (err == -EBUSY) {
62 *parent = old;
63 return;
64 }
65
66 trace.func = self_addr;
67 /* Only trace if the calling function expects to */
68 if (!ftrace_graph_entry(&trace)) {
69 current->curr_ret_stack--;
70 *parent = old;
71 }
72}
73#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
74
75#ifdef CONFIG_DYNAMIC_FTRACE
76/* save value to addr - it is save to do it in asm */
77static int ftrace_modify_code(unsigned long addr, unsigned int value)
78{
79 int faulted = 0;
80
81 __asm__ __volatile__(" 1: swi %2, %1, 0; \
82 addik %0, r0, 0; \
83 2: \
84 .section .fixup, \"ax\"; \
85 3: brid 2b; \
86 addik %0, r0, 1; \
87 .previous; \
88 .section __ex_table,\"a\"; \
89 .word 1b,3b; \
90 .previous;" \
91 : "=r" (faulted)
92 : "r" (addr), "r" (value)
93 );
94
95 if (unlikely(faulted))
96 return -EFAULT;
97
98 return 0;
99}
100
101#define MICROBLAZE_NOP 0x80000000
102#define MICROBLAZE_BRI 0xb800000C
103
104static unsigned int recorded; /* if save was or not */
105static unsigned int imm; /* saving whole imm instruction */
106
107/* There are two approaches howto solve ftrace_make nop function - look below */
108#undef USE_FTRACE_NOP
109
110#ifdef USE_FTRACE_NOP
111static unsigned int bralid; /* saving whole bralid instruction */
112#endif
113
114int ftrace_make_nop(struct module *mod,
115 struct dyn_ftrace *rec, unsigned long addr)
116{
117 /* we have this part of code which we are working with
118 * b000c000 imm -16384
119 * b9fc8e30 bralid r15, -29136 // c0008e30 <_mcount>
120 * 80000000 or r0, r0, r0
121 *
122 * The first solution (!USE_FTRACE_NOP-could be called branch solution)
123 * b000c000 bri 12 (0xC - jump to any other instruction)
124 * b9fc8e30 bralid r15, -29136 // c0008e30 <_mcount>
125 * 80000000 or r0, r0, r0
126 * any other instruction
127 *
128 * The second solution (USE_FTRACE_NOP) - no jump just nops
129 * 80000000 or r0, r0, r0
130 * 80000000 or r0, r0, r0
131 * 80000000 or r0, r0, r0
132 */
133 int ret = 0;
134
135 if (recorded == 0) {
136 recorded = 1;
137 imm = *(unsigned int *)rec->ip;
138 pr_debug("%s: imm:0x%x\n", __func__, imm);
139#ifdef USE_FTRACE_NOP
140 bralid = *(unsigned int *)(rec->ip + 4);
141 pr_debug("%s: bralid 0x%x\n", __func__, bralid);
142#endif /* USE_FTRACE_NOP */
143 }
144
145#ifdef USE_FTRACE_NOP
146 ret = ftrace_modify_code(rec->ip, MICROBLAZE_NOP);
147 ret += ftrace_modify_code(rec->ip + 4, MICROBLAZE_NOP);
148#else /* USE_FTRACE_NOP */
149 ret = ftrace_modify_code(rec->ip, MICROBLAZE_BRI);
150#endif /* USE_FTRACE_NOP */
151 return ret;
152}
153
154static int ret_addr; /* initialized as 0 by default */
155
156/* I believe that first is called ftrace_make_nop before this function */
157int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
158{
159 int ret;
160 ret_addr = addr; /* saving where the barrier jump is */
161 pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n",
162 __func__, (unsigned int)addr, (unsigned int)rec->ip, imm);
163 ret = ftrace_modify_code(rec->ip, imm);
164#ifdef USE_FTRACE_NOP
165 pr_debug("%s: bralid:0x%x\n", __func__, bralid);
166 ret += ftrace_modify_code(rec->ip + 4, bralid);
167#endif /* USE_FTRACE_NOP */
168 return ret;
169}
170
171int __init ftrace_dyn_arch_init(void *data)
172{
173 /* The return code is retured via data */
174 *(unsigned long *)data = 0;
175
176 return 0;
177}
178
179int ftrace_update_ftrace_func(ftrace_func_t func)
180{
181 unsigned long ip = (unsigned long)(&ftrace_call);
182 unsigned int upper = (unsigned int)func;
183 unsigned int lower = (unsigned int)func;
184 int ret = 0;
185
186 /* create proper saving to ftrace_call poll */
187 upper = 0xb0000000 + (upper >> 16); /* imm func_upper */
188 lower = 0x32800000 + (lower & 0xFFFF); /* addik r20, r0, func_lower */
189
190 pr_debug("%s: func=0x%x, ip=0x%x, upper=0x%x, lower=0x%x\n",
191 __func__, (unsigned int)func, (unsigned int)ip, upper, lower);
192
193 /* save upper and lower code */
194 ret = ftrace_modify_code(ip, upper);
195 ret += ftrace_modify_code(ip + 4, lower);
196
197 /* We just need to remove the rtsd r15, 8 by NOP */
198 BUG_ON(!ret_addr);
199 if (ret_addr)
200 ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP);
201 else
202 ret = 1; /* fault */
203
204 /* All changes are done - lets do caches consistent */
205 flush_icache();
206 return ret;
207}
208
209#ifdef CONFIG_FUNCTION_GRAPH_TRACER
210unsigned int old_jump; /* saving place for jump instruction */
211
212int ftrace_enable_ftrace_graph_caller(void)
213{
214 unsigned int ret;
215 unsigned long ip = (unsigned long)(&ftrace_call_graph);
216
217 old_jump = *(unsigned int *)ip; /* save jump over instruction */
218 ret = ftrace_modify_code(ip, MICROBLAZE_NOP);
219 flush_icache();
220
221 pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump);
222 return ret;
223}
224
225int ftrace_disable_ftrace_graph_caller(void)
226{
227 unsigned int ret;
228 unsigned long ip = (unsigned long)(&ftrace_call_graph);
229
230 ret = ftrace_modify_code(ip, old_jump);
231 flush_icache();
232
233 pr_debug("%s\n", __func__);
234 return ret;
235}
236#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
237#endif /* CONFIG_DYNAMIC_FTRACE */
diff --git a/arch/microblaze/kernel/heartbeat.c b/arch/microblaze/kernel/heartbeat.c
index 1bdf20222b92..522751737cfa 100644
--- a/arch/microblaze/kernel/heartbeat.c
+++ b/arch/microblaze/kernel/heartbeat.c
@@ -45,6 +45,7 @@ void heartbeat(void)
45void setup_heartbeat(void) 45void setup_heartbeat(void)
46{ 46{
47 struct device_node *gpio = NULL; 47 struct device_node *gpio = NULL;
48 int *prop;
48 int j; 49 int j;
49 char *gpio_list[] = { 50 char *gpio_list[] = {
50 "xlnx,xps-gpio-1.00.a", 51 "xlnx,xps-gpio-1.00.a",
@@ -58,10 +59,14 @@ void setup_heartbeat(void)
58 break; 59 break;
59 } 60 }
60 61
61 base_addr = *(int *) of_get_property(gpio, "reg", NULL); 62 if (gpio) {
62 base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE); 63 base_addr = *(int *) of_get_property(gpio, "reg", NULL);
63 printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr); 64 base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE);
65 printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr);
64 66
65 if (*(int *) of_get_property(gpio, "xlnx,is-bidir", NULL)) 67 /* GPIO is configured as output */
66 out_be32(base_addr + 4, 0); /* GPIO is configured as output */ 68 prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL);
69 if (prop)
70 out_be32(base_addr + 4, 0);
71 }
67} 72}
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
index 6eea6f92b84e..03172c1da770 100644
--- a/arch/microblaze/kernel/intc.c
+++ b/arch/microblaze/kernel/intc.c
@@ -42,8 +42,16 @@ unsigned int nr_irq;
42 42
43static void intc_enable_or_unmask(unsigned int irq) 43static void intc_enable_or_unmask(unsigned int irq)
44{ 44{
45 unsigned long mask = 1 << irq;
45 pr_debug("enable_or_unmask: %d\n", irq); 46 pr_debug("enable_or_unmask: %d\n", irq);
46 out_be32(INTC_BASE + SIE, 1 << irq); 47 out_be32(INTC_BASE + SIE, mask);
48
49 /* ack level irqs because they can't be acked during
50 * ack function since the handle_level_irq function
51 * acks the irq before calling the interrupt handler
52 */
53 if (irq_desc[irq].status & IRQ_LEVEL)
54 out_be32(INTC_BASE + IAR, mask);
47} 55}
48 56
49static void intc_disable_or_mask(unsigned int irq) 57static void intc_disable_or_mask(unsigned int irq)
diff --git a/arch/microblaze/kernel/irq.c b/arch/microblaze/kernel/irq.c
index 7d5ddd62d4d2..0f06034d1fe0 100644
--- a/arch/microblaze/kernel/irq.c
+++ b/arch/microblaze/kernel/irq.c
@@ -68,7 +68,7 @@ int show_interrupts(struct seq_file *p, void *v)
68 } 68 }
69 69
70 if (i < nr_irq) { 70 if (i < nr_irq) {
71 spin_lock_irqsave(&irq_desc[i].lock, flags); 71 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
72 action = irq_desc[i].action; 72 action = irq_desc[i].action;
73 if (!action) 73 if (!action)
74 goto skip; 74 goto skip;
@@ -89,7 +89,7 @@ int show_interrupts(struct seq_file *p, void *v)
89 89
90 seq_putc(p, '\n'); 90 seq_putc(p, '\n');
91skip: 91skip:
92 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 92 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
93 } 93 }
94 return 0; 94 return 0;
95} 95}
diff --git a/arch/microblaze/kernel/mcount.S b/arch/microblaze/kernel/mcount.S
new file mode 100644
index 000000000000..e7eaa7a8cbd3
--- /dev/null
+++ b/arch/microblaze/kernel/mcount.S
@@ -0,0 +1,170 @@
1/*
2 * Low-level ftrace handling
3 *
4 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2009 PetaLogix
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 */
11
12#include <linux/linkage.h>
13
14#define NOALIGN_ENTRY(name) .globl name; name:
15
16/* FIXME MS: I think that I don't need to save all regs */
17#define SAVE_REGS \
18 addik r1, r1, -120; \
19 swi r2, r1, 4; \
20 swi r3, r1, 8; \
21 swi r4, r1, 12; \
22 swi r5, r1, 116; \
23 swi r6, r1, 16; \
24 swi r7, r1, 20; \
25 swi r8, r1, 24; \
26 swi r9, r1, 28; \
27 swi r10, r1, 32; \
28 swi r11, r1, 36; \
29 swi r12, r1, 40; \
30 swi r13, r1, 44; \
31 swi r14, r1, 48; \
32 swi r16, r1, 52; \
33 swi r17, r1, 56; \
34 swi r18, r1, 60; \
35 swi r19, r1, 64; \
36 swi r20, r1, 68; \
37 swi r21, r1, 72; \
38 swi r22, r1, 76; \
39 swi r23, r1, 80; \
40 swi r24, r1, 84; \
41 swi r25, r1, 88; \
42 swi r26, r1, 92; \
43 swi r27, r1, 96; \
44 swi r28, r1, 100; \
45 swi r29, r1, 104; \
46 swi r30, r1, 108; \
47 swi r31, r1, 112;
48
49#define RESTORE_REGS \
50 lwi r2, r1, 4; \
51 lwi r3, r1, 8; \
52 lwi r4, r1, 12; \
53 lwi r5, r1, 116; \
54 lwi r6, r1, 16; \
55 lwi r7, r1, 20; \
56 lwi r8, r1, 24; \
57 lwi r9, r1, 28; \
58 lwi r10, r1, 32; \
59 lwi r11, r1, 36; \
60 lwi r12, r1, 40; \
61 lwi r13, r1, 44; \
62 lwi r14, r1, 48; \
63 lwi r16, r1, 52; \
64 lwi r17, r1, 56; \
65 lwi r18, r1, 60; \
66 lwi r19, r1, 64; \
67 lwi r20, r1, 68; \
68 lwi r21, r1, 72; \
69 lwi r22, r1, 76; \
70 lwi r23, r1, 80; \
71 lwi r24, r1, 84; \
72 lwi r25, r1, 88; \
73 lwi r26, r1, 92; \
74 lwi r27, r1, 96; \
75 lwi r28, r1, 100; \
76 lwi r29, r1, 104; \
77 lwi r30, r1, 108; \
78 lwi r31, r1, 112; \
79 addik r1, r1, 120;
80
81ENTRY(ftrace_stub)
82 rtsd r15, 8;
83 nop;
84
85ENTRY(_mcount)
86#ifdef CONFIG_DYNAMIC_FTRACE
87ENTRY(ftrace_caller)
88 /* MS: It is just barrier which is removed from C code */
89 rtsd r15, 8
90 nop
91#endif /* CONFIG_DYNAMIC_FTRACE */
92 SAVE_REGS
93 swi r15, r1, 0;
94 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST begin of checking */
95 lwi r5, r0, function_trace_stop;
96 bneid r5, end;
97 nop;
98 /* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST end of checking */
99#ifdef CONFIG_FUNCTION_GRAPH_TRACER
100#ifndef CONFIG_DYNAMIC_FTRACE
101 lwi r5, r0, ftrace_graph_return;
102 addik r6, r0, ftrace_stub; /* asm implementation */
103 cmpu r5, r5, r6; /* ftrace_graph_return != ftrace_stub */
104 beqid r5, end_graph_tracer;
105 nop;
106
107 lwi r6, r0, ftrace_graph_entry;
108 addik r5, r0, ftrace_graph_entry_stub; /* implemented in C */
109 cmpu r5, r5, r6; /* ftrace_graph_entry != ftrace_graph_entry_stub */
110 beqid r5, end_graph_tracer;
111 nop;
112#else /* CONFIG_DYNAMIC_FTRACE */
113NOALIGN_ENTRY(ftrace_call_graph)
114 /* MS: jump over graph function - replaced from C code */
115 bri end_graph_tracer
116#endif /* CONFIG_DYNAMIC_FTRACE */
117 addik r5, r1, 120; /* MS: load parent addr */
118 addik r6, r15, 0; /* MS: load current function addr */
119 bralid r15, prepare_ftrace_return;
120 nop;
121 /* MS: graph was taken that's why - can jump over function trace */
122 brid end;
123 nop;
124end_graph_tracer:
125#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
126#ifndef CONFIG_DYNAMIC_FTRACE
127 /* MS: test function trace if is taken or not */
128 lwi r20, r0, ftrace_trace_function;
129 addik r6, r0, ftrace_stub;
130 cmpu r5, r20, r6; /* ftrace_trace_function != ftrace_stub */
131 beqid r5, end; /* MS: not taken -> jump over */
132 nop;
133#else /* CONFIG_DYNAMIC_FTRACE */
134NOALIGN_ENTRY(ftrace_call)
135/* instruction for setup imm FUNC_part1, addik r20, r0, FUNC_part2 */
136 nop
137 nop
138#endif /* CONFIG_DYNAMIC_FTRACE */
139/* static normal trace */
140 lwi r6, r1, 120; /* MS: load parent addr */
141 addik r5, r15, 0; /* MS: load current function addr */
142 /* MS: here is dependency on previous code */
143 brald r15, r20; /* MS: jump to ftrace handler */
144 nop;
145end:
146 lwi r15, r1, 0;
147 RESTORE_REGS
148
149 rtsd r15, 8; /* MS: jump back */
150 nop;
151
152#ifdef CONFIG_FUNCTION_GRAPH_TRACER
153ENTRY(return_to_handler)
154 nop; /* MS: just barrier for rtsd r15, 8 */
155 nop;
156 SAVE_REGS
157 swi r15, r1, 0;
158
159 /* MS: find out returning address */
160 bralid r15, ftrace_return_to_handler;
161 nop;
162
163 /* MS: return value from ftrace_return_to_handler is my returning addr
164 * must be before restore regs because I have to restore r3 content */
165 addik r15, r3, 0;
166 RESTORE_REGS
167
168 rtsd r15, 8; /* MS: jump back */
169 nop;
170#endif /* CONFIG_FUNCTION_TRACER */
diff --git a/arch/microblaze/kernel/microblaze_ksyms.c b/arch/microblaze/kernel/microblaze_ksyms.c
index 59ff20e33e0c..bc4dcb7d3861 100644
--- a/arch/microblaze/kernel/microblaze_ksyms.c
+++ b/arch/microblaze/kernel/microblaze_ksyms.c
@@ -18,6 +18,7 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <linux/ftrace.h>
21#include <linux/uaccess.h> 22#include <linux/uaccess.h>
22 23
23/* 24/*
@@ -47,3 +48,7 @@ extern void __umodsi3(void);
47EXPORT_SYMBOL(__umodsi3); 48EXPORT_SYMBOL(__umodsi3);
48extern char *_ebss; 49extern char *_ebss;
49EXPORT_SYMBOL_GPL(_ebss); 50EXPORT_SYMBOL_GPL(_ebss);
51#ifdef CONFIG_FUNCTION_TRACER
52extern void _mcount(void);
53EXPORT_SYMBOL(_mcount);
54#endif
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index c592d475b3d8..812f1bf06c9e 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -15,6 +15,7 @@
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/pgalloc.h> 17#include <asm/pgalloc.h>
18#include <asm/cacheflush.h>
18 19
19void show_regs(struct pt_regs *regs) 20void show_regs(struct pt_regs *regs)
20{ 21{
diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c
new file mode 100644
index 000000000000..a1721a33042e
--- /dev/null
+++ b/arch/microblaze/kernel/reset.c
@@ -0,0 +1,140 @@
1/*
2 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
3 * Copyright (C) 2009 PetaLogix
4 *
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 */
9
10#include <linux/init.h>
11#include <linux/of_platform.h>
12#include <asm/prom.h>
13
14/* Trigger specific functions */
15#ifdef CONFIG_GPIOLIB
16
17#include <linux/of_gpio.h>
18
19static int handle; /* reset pin handle */
20static unsigned int reset_val;
21
22static int of_reset_gpio_handle(void)
23{
24 int ret; /* variable which stored handle reset gpio pin */
25 struct device_node *root; /* root node */
26 struct device_node *gpio; /* gpio node */
27 struct of_gpio_chip *of_gc = NULL;
28 enum of_gpio_flags flags ;
29 const void *gpio_spec;
30
31 /* find out root node */
32 root = of_find_node_by_path("/");
33
34 /* give me handle for gpio node to be possible allocate pin */
35 ret = of_parse_phandles_with_args(root, "hard-reset-gpios",
36 "#gpio-cells", 0, &gpio, &gpio_spec);
37 if (ret) {
38 pr_debug("%s: can't parse gpios property\n", __func__);
39 goto err0;
40 }
41
42 of_gc = gpio->data;
43 if (!of_gc) {
44 pr_debug("%s: gpio controller %s isn't registered\n",
45 root->full_name, gpio->full_name);
46 ret = -ENODEV;
47 goto err1;
48 }
49
50 ret = of_gc->xlate(of_gc, root, gpio_spec, &flags);
51 if (ret < 0)
52 goto err1;
53
54 ret += of_gc->gc.base;
55err1:
56 of_node_put(gpio);
57err0:
58 pr_debug("%s exited with status %d\n", __func__, ret);
59 return ret;
60}
61
62void of_platform_reset_gpio_probe(void)
63{
64 int ret;
65 handle = of_reset_gpio_handle();
66
67 if (!gpio_is_valid(handle)) {
68 printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
69 handle, "reset");
70 }
71
72 ret = gpio_request(handle, "reset");
73 if (ret < 0) {
74 printk(KERN_INFO "GPIO pin is already allocated\n");
75 return;
76 }
77
78 /* get current setup value */
79 reset_val = gpio_get_value(handle);
80 /* FIXME maybe worth to perform any action */
81 pr_debug("Reset: Gpio output state: 0x%x\n", reset_val);
82
83 /* Setup GPIO as output */
84 ret = gpio_direction_output(handle, 0);
85 if (ret < 0)
86 goto err;
87
88 /* Setup output direction */
89 gpio_set_value(handle, 0);
90
91 printk(KERN_INFO "RESET: Registered gpio device: %d, current val: %d\n",
92 handle, reset_val);
93 return;
94err:
95 gpio_free(handle);
96 return;
97}
98
99
100static void gpio_system_reset(void)
101{
102 gpio_set_value(handle, 1 - reset_val);
103}
104#else
105#define gpio_system_reset() do {} while (0)
106void of_platform_reset_gpio_probe(void)
107{
108 return;
109}
110#endif
111
112void machine_restart(char *cmd)
113{
114 printk(KERN_NOTICE "Machine restart...\n");
115 gpio_system_reset();
116 dump_stack();
117 while (1)
118 ;
119}
120
121void machine_shutdown(void)
122{
123 printk(KERN_NOTICE "Machine shutdown...\n");
124 while (1)
125 ;
126}
127
128void machine_halt(void)
129{
130 printk(KERN_NOTICE "Machine halt...\n");
131 while (1)
132 ;
133}
134
135void machine_power_off(void)
136{
137 printk(KERN_NOTICE "Machine power off...\n");
138 while (1)
139 ;
140}
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 8c1e0f4dcf18..5372b24ad049 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -52,13 +52,12 @@ void __init setup_arch(char **cmdline_p)
52 /* irq_early_init(); */ 52 /* irq_early_init(); */
53 setup_cpuinfo(); 53 setup_cpuinfo();
54 54
55 __invalidate_icache_all(); 55 microblaze_cache_init();
56 __enable_icache();
57 56
58 __invalidate_dcache_all(); 57 enable_dcache();
59 __enable_dcache();
60 58
61 panic_timeout = 120; 59 invalidate_icache();
60 enable_icache();
62 61
63 setup_memory(); 62 setup_memory();
64 63
@@ -131,6 +130,8 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
131 strlcpy(cmd_line, cmdline, COMMAND_LINE_SIZE); 130 strlcpy(cmd_line, cmdline, COMMAND_LINE_SIZE);
132#endif 131#endif
133 132
133 lockdep_init();
134
134/* initialize device tree for usage in early_printk */ 135/* initialize device tree for usage in early_printk */
135 early_init_devtree((void *)_fdt_start); 136 early_init_devtree((void *)_fdt_start);
136 137
@@ -186,32 +187,3 @@ static int microblaze_debugfs_init(void)
186} 187}
187arch_initcall(microblaze_debugfs_init); 188arch_initcall(microblaze_debugfs_init);
188#endif 189#endif
189
190void machine_restart(char *cmd)
191{
192 printk(KERN_NOTICE "Machine restart...\n");
193 dump_stack();
194 while (1)
195 ;
196}
197
198void machine_shutdown(void)
199{
200 printk(KERN_NOTICE "Machine shutdown...\n");
201 while (1)
202 ;
203}
204
205void machine_halt(void)
206{
207 printk(KERN_NOTICE "Machine halt...\n");
208 while (1)
209 ;
210}
211
212void machine_power_off(void)
213{
214 printk(KERN_NOTICE "Machine power off...\n");
215 while (1)
216 ;
217}
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 1c80e4fc40ce..d8d3bb396cd6 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -44,7 +44,6 @@
44 44
45asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall); 45asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall);
46 46
47
48asmlinkage long 47asmlinkage long
49sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, 48sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
50 struct pt_regs *regs) 49 struct pt_regs *regs)
@@ -176,6 +175,11 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
176 struct rt_sigframe __user *frame; 175 struct rt_sigframe __user *frame;
177 int err = 0; 176 int err = 0;
178 int signal; 177 int signal;
178 unsigned long address = 0;
179#ifdef CONFIG_MMU
180 pmd_t *pmdp;
181 pte_t *ptep;
182#endif
179 183
180 frame = get_sigframe(ka, regs, sizeof(*frame)); 184 frame = get_sigframe(ka, regs, sizeof(*frame));
181 185
@@ -216,8 +220,29 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
216 Negative 8 offset because return is rtsd r15, 8 */ 220 Negative 8 offset because return is rtsd r15, 8 */
217 regs->r15 = ((unsigned long)frame->tramp)-8; 221 regs->r15 = ((unsigned long)frame->tramp)-8;
218 222
219 __invalidate_cache_sigtramp((unsigned long)frame->tramp); 223 address = ((unsigned long)frame->tramp);
220 224#ifdef CONFIG_MMU
225 pmdp = pmd_offset(pud_offset(
226 pgd_offset(current->mm, address),
227 address), address);
228
229 preempt_disable();
230 ptep = pte_offset_map(pmdp, address);
231 if (pte_present(*ptep)) {
232 address = (unsigned long) page_address(pte_page(*ptep));
233 /* MS: I need add offset in page */
234 address += ((unsigned long)frame->tramp) & ~PAGE_MASK;
235 /* MS address is virtual */
236 address = virt_to_phys(address);
237 invalidate_icache_range(address, address + 8);
238 flush_dcache_range(address, address + 8);
239 }
240 pte_unmap(ptep);
241 preempt_enable();
242#else
243 flush_icache_range(address, address + 8);
244 flush_dcache_range(address, address + 8);
245#endif
221 if (err) 246 if (err)
222 goto give_sigsegv; 247 goto give_sigsegv;
223 248
@@ -233,6 +258,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
233 258
234 set_fs(USER_DS); 259 set_fs(USER_DS);
235 260
261 /* the tracer may want to single-step inside the handler */
262 if (test_thread_flag(TIF_SINGLESTEP))
263 ptrace_notify(SIGTRAP);
264
236#ifdef DEBUG_SIG 265#ifdef DEBUG_SIG
237 printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n", 266 printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n",
238 current->comm, current->pid, frame, regs->pc); 267 current->comm, current->pid, frame, regs->pc);
diff --git a/arch/microblaze/kernel/stacktrace.c b/arch/microblaze/kernel/stacktrace.c
new file mode 100644
index 000000000000..123692f22647
--- /dev/null
+++ b/arch/microblaze/kernel/stacktrace.c
@@ -0,0 +1,65 @@
1/*
2 * Stack trace support for Microblaze.
3 *
4 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2009 PetaLogix
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12#include <linux/sched.h>
13#include <linux/stacktrace.h>
14#include <linux/thread_info.h>
15#include <linux/ptrace.h>
16#include <linux/module.h>
17
18/* FIXME initial support */
19void save_stack_trace(struct stack_trace *trace)
20{
21 unsigned long *sp;
22 unsigned long addr;
23 asm("addik %0, r1, 0" : "=r" (sp));
24
25 while (!kstack_end(sp)) {
26 addr = *sp++;
27 if (__kernel_text_address(addr)) {
28 if (trace->skip > 0)
29 trace->skip--;
30 else
31 trace->entries[trace->nr_entries++] = addr;
32
33 if (trace->nr_entries >= trace->max_entries)
34 break;
35 }
36 }
37}
38EXPORT_SYMBOL_GPL(save_stack_trace);
39
40void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
41{
42 unsigned int *sp;
43 unsigned long addr;
44
45 struct thread_info *ti = task_thread_info(tsk);
46
47 if (tsk == current)
48 asm("addik %0, r1, 0" : "=r" (sp));
49 else
50 sp = (unsigned int *)ti->cpu_context.r1;
51
52 while (!kstack_end(sp)) {
53 addr = *sp++;
54 if (__kernel_text_address(addr)) {
55 if (trace->skip > 0)
56 trace->skip--;
57 else
58 trace->entries[trace->nr_entries++] = addr;
59
60 if (trace->nr_entries >= trace->max_entries)
61 break;
62 }
63 }
64}
65EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c
index 07cabed4b947..9f3c205fb75b 100644
--- a/arch/microblaze/kernel/sys_microblaze.c
+++ b/arch/microblaze/kernel/sys_microblaze.c
@@ -62,46 +62,14 @@ out:
62 return error; 62 return error;
63} 63}
64 64
65asmlinkage long
66sys_mmap2(unsigned long addr, unsigned long len,
67 unsigned long prot, unsigned long flags,
68 unsigned long fd, unsigned long pgoff)
69{
70 struct file *file = NULL;
71 int ret = -EBADF;
72
73 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
74 if (!(flags & MAP_ANONYMOUS)) {
75 file = fget(fd);
76 if (!file) {
77 printk(KERN_INFO "no fd in mmap\r\n");
78 goto out;
79 }
80 }
81
82 down_write(&current->mm->mmap_sem);
83 ret = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
84 up_write(&current->mm->mmap_sem);
85 if (file)
86 fput(file);
87out:
88 return ret;
89}
90
91asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 65asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
92 unsigned long prot, unsigned long flags, 66 unsigned long prot, unsigned long flags,
93 unsigned long fd, off_t pgoff) 67 unsigned long fd, off_t pgoff)
94{ 68{
95 int err = -EINVAL; 69 if (pgoff & ~PAGE_MASK)
96 70 return -EINVAL;
97 if (pgoff & ~PAGE_MASK) {
98 printk(KERN_INFO "no pagemask in mmap\r\n");
99 goto out;
100 }
101 71
102 err = sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); 72 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT);
103out:
104 return err;
105} 73}
106 74
107/* 75/*
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index c1ab1dc10898..4088be7d4e29 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -183,7 +183,7 @@ ENTRY(sys_call_table)
183 .long sys_rt_sigpending 183 .long sys_rt_sigpending
184 .long sys_rt_sigtimedwait 184 .long sys_rt_sigtimedwait
185 .long sys_rt_sigqueueinfo 185 .long sys_rt_sigqueueinfo
186 .long sys_rt_sigsuspend_wrapper 186 .long sys_rt_sigsuspend
187 .long sys_pread64 /* 180 */ 187 .long sys_pread64 /* 180 */
188 .long sys_pwrite64 188 .long sys_pwrite64
189 .long sys_chown 189 .long sys_chown
@@ -196,7 +196,7 @@ ENTRY(sys_call_table)
196 .long sys_ni_syscall /* reserved for streams2 */ 196 .long sys_ni_syscall /* reserved for streams2 */
197 .long sys_vfork /* 190 */ 197 .long sys_vfork /* 190 */
198 .long sys_getrlimit 198 .long sys_getrlimit
199 .long sys_mmap2 /* mmap2 */ 199 .long sys_mmap_pgoff /* mmap2 */
200 .long sys_truncate64 200 .long sys_truncate64
201 .long sys_ftruncate64 201 .long sys_ftruncate64
202 .long sys_stat64 /* 195 */ 202 .long sys_stat64 /* 195 */
@@ -303,7 +303,7 @@ ENTRY(sys_call_table)
303 .long sys_mkdirat 303 .long sys_mkdirat
304 .long sys_mknodat 304 .long sys_mknodat
305 .long sys_fchownat 305 .long sys_fchownat
306 .long sys_ni_syscall 306 .long sys_futimesat
307 .long sys_fstatat64 /* 300 */ 307 .long sys_fstatat64 /* 300 */
308 .long sys_unlinkat 308 .long sys_unlinkat
309 .long sys_renameat 309 .long sys_renameat
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 5499deae7fa6..ed61b2f17719 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -183,6 +183,31 @@ static cycle_t microblaze_read(struct clocksource *cs)
183 return (cycle_t) (in_be32(TIMER_BASE + TCR1)); 183 return (cycle_t) (in_be32(TIMER_BASE + TCR1));
184} 184}
185 185
186static struct timecounter microblaze_tc = {
187 .cc = NULL,
188};
189
190static cycle_t microblaze_cc_read(const struct cyclecounter *cc)
191{
192 return microblaze_read(NULL);
193}
194
195static struct cyclecounter microblaze_cc = {
196 .read = microblaze_cc_read,
197 .mask = CLOCKSOURCE_MASK(32),
198 .shift = 24,
199};
200
201int __init init_microblaze_timecounter(void)
202{
203 microblaze_cc.mult = div_sc(cpuinfo.cpu_clock_freq, NSEC_PER_SEC,
204 microblaze_cc.shift);
205
206 timecounter_init(&microblaze_tc, &microblaze_cc, sched_clock());
207
208 return 0;
209}
210
186static struct clocksource clocksource_microblaze = { 211static struct clocksource clocksource_microblaze = {
187 .name = "microblaze_clocksource", 212 .name = "microblaze_clocksource",
188 .rating = 300, 213 .rating = 300,
@@ -204,6 +229,9 @@ static int __init microblaze_clocksource_init(void)
204 out_be32(TIMER_BASE + TCSR1, in_be32(TIMER_BASE + TCSR1) & ~TCSR_ENT); 229 out_be32(TIMER_BASE + TCSR1, in_be32(TIMER_BASE + TCSR1) & ~TCSR_ENT);
205 /* start timer1 - up counting without interrupt */ 230 /* start timer1 - up counting without interrupt */
206 out_be32(TIMER_BASE + TCSR1, TCSR_TINT|TCSR_ENT|TCSR_ARHT); 231 out_be32(TIMER_BASE + TCSR1, TCSR_TINT|TCSR_ENT|TCSR_ARHT);
232
233 /* register timecounter - for ftrace support */
234 init_microblaze_timecounter();
207 return 0; 235 return 0;
208} 236}
209 237
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index e704188d7855..5ef619aad634 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -26,11 +26,12 @@ SECTIONS {
26 _stext = . ; 26 _stext = . ;
27 *(.text .text.*) 27 *(.text .text.*)
28 *(.fixup) 28 *(.fixup)
29 EXIT_TEXT 29 EXIT_TEXT
30 EXIT_CALL 30 EXIT_CALL
31 SCHED_TEXT 31 SCHED_TEXT
32 LOCK_TEXT 32 LOCK_TEXT
33 KPROBES_TEXT 33 KPROBES_TEXT
34 IRQENTRY_TEXT
34 . = ALIGN (4) ; 35 . = ALIGN (4) ;
35 _etext = . ; 36 _etext = . ;
36 } 37 }
@@ -86,6 +87,7 @@ SECTIONS {
86 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ; 87 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
87 } 88 }
88 89
90 . = ALIGN(PAGE_SIZE);
89 __init_begin = .; 91 __init_begin = .;
90 92
91 INIT_TEXT_SECTION(PAGE_SIZE) 93 INIT_TEXT_SECTION(PAGE_SIZE)
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c
index 6a907c58a4bc..cc2108b6b260 100644
--- a/arch/microblaze/lib/memcpy.c
+++ b/arch/microblaze/lib/memcpy.c
@@ -9,7 +9,7 @@
9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from 9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from
10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567 10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567
11 * 11 *
12 * Attempts were made, unsuccesfully, to contact the original 12 * Attempts were made, unsuccessfully, to contact the original
13 * author of this code (Michael Morrow, Intel). Below is the original 13 * author of this code (Michael Morrow, Intel). Below is the original
14 * copyright notice. 14 * copyright notice.
15 * 15 *
diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c
index d4e9f49a71f7..0929198c5e68 100644
--- a/arch/microblaze/lib/memmove.c
+++ b/arch/microblaze/lib/memmove.c
@@ -9,7 +9,7 @@
9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from 9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from
10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567 10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567
11 * 11 *
12 * Attempts were made, unsuccesfully, to contact the original 12 * Attempts were made, unsuccessfully, to contact the original
13 * author of this code (Michael Morrow, Intel). Below is the original 13 * author of this code (Michael Morrow, Intel). Below is the original
14 * copyright notice. 14 * copyright notice.
15 * 15 *
diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c
index 941dc8f94b03..4df851d41a29 100644
--- a/arch/microblaze/lib/memset.c
+++ b/arch/microblaze/lib/memset.c
@@ -9,7 +9,7 @@
9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from 9 * It is based on demo code originally Copyright 2001 by Intel Corp, taken from
10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567 10 * http://www.embedded.com/showArticle.jhtml?articleID=19205567
11 * 11 *
12 * Attempts were made, unsuccesfully, to contact the original 12 * Attempts were made, unsuccessfully, to contact the original
13 * author of this code (Michael Morrow, Intel). Below is the original 13 * author of this code (Michael Morrow, Intel). Below is the original
14 * copyright notice. 14 * copyright notice.
15 * 15 *
diff --git a/arch/microblaze/lib/uaccess.c b/arch/microblaze/lib/uaccess.c
index 8eb9df5a26c9..a853fe089c44 100644
--- a/arch/microblaze/lib/uaccess.c
+++ b/arch/microblaze/lib/uaccess.c
@@ -39,3 +39,10 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
39 __do_strncpy_from_user(dst, src, count, res); 39 __do_strncpy_from_user(dst, src, count, res);
40 return res; 40 return res;
41} 41}
42
43unsigned long __copy_tofrom_user(void __user *to,
44 const void __user *from, unsigned long size)
45{
46 memcpy(to, from, size);
47 return 0;
48}
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index a44892e7cd5b..a57cedf36715 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -41,6 +41,7 @@ char *klimit = _end;
41 * have available. 41 * have available.
42 */ 42 */
43unsigned long memory_start; 43unsigned long memory_start;
44EXPORT_SYMBOL(memory_start);
44unsigned long memory_end; /* due to mm/nommu.c */ 45unsigned long memory_end; /* due to mm/nommu.c */
45unsigned long memory_size; 46unsigned long memory_size;
46 47
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c
index 46c4ca5d15c5..2820081b21ab 100644
--- a/arch/microblaze/mm/pgtable.c
+++ b/arch/microblaze/mm/pgtable.c
@@ -144,7 +144,6 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
144 pmd_t *pd; 144 pmd_t *pd;
145 pte_t *pg; 145 pte_t *pg;
146 int err = -ENOMEM; 146 int err = -ENOMEM;
147 /* spin_lock(&init_mm.page_table_lock); */
148 /* Use upper 10 bits of VA to index the first level map */ 147 /* Use upper 10 bits of VA to index the first level map */
149 pd = pmd_offset(pgd_offset_k(va), va); 148 pd = pmd_offset(pgd_offset_k(va), va);
150 /* Use middle 10 bits of VA to index the second-level map */ 149 /* Use middle 10 bits of VA to index the second-level map */
@@ -158,9 +157,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
158 if (mem_init_done) 157 if (mem_init_done)
159 flush_HPTE(0, va, pmd_val(*pd)); 158 flush_HPTE(0, va, pmd_val(*pd));
160 /* flush_HPTE(0, va, pg); */ 159 /* flush_HPTE(0, va, pg); */
161
162 } 160 }
163 /* spin_unlock(&init_mm.page_table_lock); */
164 return err; 161 return err;
165} 162}
166 163
@@ -182,12 +179,6 @@ void __init adjust_total_lowmem(void)
182#endif 179#endif
183} 180}
184 181
185static void show_tmem(unsigned long tmem)
186{
187 volatile unsigned long a;
188 a = a + tmem;
189}
190
191/* 182/*
192 * Map in all of physical memory starting at CONFIG_KERNEL_START. 183 * Map in all of physical memory starting at CONFIG_KERNEL_START.
193 */ 184 */
@@ -197,7 +188,6 @@ void __init mapin_ram(void)
197 188
198 v = CONFIG_KERNEL_START; 189 v = CONFIG_KERNEL_START;
199 p = memory_start; 190 p = memory_start;
200 show_tmem(memory_size);
201 for (s = 0; s < memory_size; s += PAGE_SIZE) { 191 for (s = 0; s < memory_size; s += PAGE_SIZE) {
202 f = _PAGE_PRESENT | _PAGE_ACCESSED | 192 f = _PAGE_PRESENT | _PAGE_ACCESSED |
203 _PAGE_SHARED | _PAGE_HWEXEC; 193 _PAGE_SHARED | _PAGE_HWEXEC;
diff --git a/arch/microblaze/oprofile/Makefile b/arch/microblaze/oprofile/Makefile
new file mode 100644
index 000000000000..0d0348c8af97
--- /dev/null
+++ b/arch/microblaze/oprofile/Makefile
@@ -0,0 +1,13 @@
1#
2# arch/microblaze/oprofile/Makefile
3#
4
5obj-$(CONFIG_OPROFILE) += oprofile.o
6
7DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
8 oprof.o cpu_buffer.o buffer_sync.o \
9 event_buffer.o oprofile_files.o \
10 oprofilefs.o oprofile_stats.o \
11 timer_int.o )
12
13oprofile-y := $(DRIVER_OBJS) microblaze_oprofile.o
diff --git a/arch/microblaze/oprofile/microblaze_oprofile.c b/arch/microblaze/oprofile/microblaze_oprofile.c
new file mode 100644
index 000000000000..def17e59888e
--- /dev/null
+++ b/arch/microblaze/oprofile/microblaze_oprofile.c
@@ -0,0 +1,22 @@
1/*
2 * Microblaze oprofile code
3 *
4 * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2009 PetaLogix
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12#include <linux/oprofile.h>
13#include <linux/init.h>
14
15int __init oprofile_arch_init(struct oprofile_operations *ops)
16{
17 return -1;
18}
19
20void oprofile_arch_exit(void)
21{
22}
diff --git a/arch/microblaze/platform/Kconfig.platform b/arch/microblaze/platform/Kconfig.platform
index 8e9b4752d3ff..669c7eec293e 100644
--- a/arch/microblaze/platform/Kconfig.platform
+++ b/arch/microblaze/platform/Kconfig.platform
@@ -53,31 +53,12 @@ config OPT_LIB_FUNCTION
53 53
54config OPT_LIB_ASM 54config OPT_LIB_ASM
55 bool "Optimalized lib function ASM" 55 bool "Optimalized lib function ASM"
56 depends on OPT_LIB_FUNCTION 56 depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL = 1)
57 default n 57 default n
58 help 58 help
59 Allows turn on optimalized library function (memcpy and memmove). 59 Allows turn on optimalized library function (memcpy and memmove).
60 Function are written in asm code. 60 Function are written in asm code.
61 61
62# This is still a bit broken - disabling for now JW 20070504
63config ALLOW_EDIT_AUTO
64 bool "Permit Display/edit of Kconfig.auto platform settings"
65 default n
66 help
67 Allows the editing of auto-generated platform settings from
68 the Kconfig.auto file. Obviously this does not change the
69 underlying hardware, so be very careful if you go editing
70 these settings.
71
72 Also, if you enable this, and edit various Kconfig.auto
73 settings, YOUR CHANGES WILL BE LOST if you then disable it
74 again. You have been warned!
75
76 If unsure, say no.
77
78comment "Automatic platform settings from Kconfig.auto"
79 depends on ALLOW_EDIT_AUTO
80
81if PLATFORM_GENERIC=y 62if PLATFORM_GENERIC=y
82 source "arch/microblaze/platform/generic/Kconfig.auto" 63 source "arch/microblaze/platform/generic/Kconfig.auto"
83endif 64endif
diff --git a/arch/microblaze/platform/generic/Kconfig.auto b/arch/microblaze/platform/generic/Kconfig.auto
index fbca22d9c8b9..5d86fc19029d 100644
--- a/arch/microblaze/platform/generic/Kconfig.auto
+++ b/arch/microblaze/platform/generic/Kconfig.auto
@@ -21,7 +21,6 @@
21 21
22# Definitions for MICROBLAZE0 22# Definitions for MICROBLAZE0
23comment "Definitions for MICROBLAZE0" 23comment "Definitions for MICROBLAZE0"
24 depends on ALLOW_EDIT_AUTO
25 24
26config KERNEL_BASE_ADDR 25config KERNEL_BASE_ADDR
27 hex "Physical address where Linux Kernel is" 26 hex "Physical address where Linux Kernel is"
@@ -30,33 +29,33 @@ config KERNEL_BASE_ADDR
30 BASE Address for kernel 29 BASE Address for kernel
31 30
32config XILINX_MICROBLAZE0_FAMILY 31config XILINX_MICROBLAZE0_FAMILY
33 string "Targetted FPGA family" if ALLOW_EDIT_AUTO 32 string "Targetted FPGA family"
34 default "virtex5" 33 default "virtex5"
35 34
36config XILINX_MICROBLAZE0_USE_MSR_INSTR 35config XILINX_MICROBLAZE0_USE_MSR_INSTR
37 int "USE_MSR_INSTR range (0:1)" if ALLOW_EDIT_AUTO 36 int "USE_MSR_INSTR range (0:1)"
38 default 1 37 default 0
39 38
40config XILINX_MICROBLAZE0_USE_PCMP_INSTR 39config XILINX_MICROBLAZE0_USE_PCMP_INSTR
41 int "USE_PCMP_INSTR range (0:1)" if ALLOW_EDIT_AUTO 40 int "USE_PCMP_INSTR range (0:1)"
42 default 1 41 default 0
43 42
44config XILINX_MICROBLAZE0_USE_BARREL 43config XILINX_MICROBLAZE0_USE_BARREL
45 int "USE_BARREL range (0:1)" if ALLOW_EDIT_AUTO 44 int "USE_BARREL range (0:1)"
46 default 1 45 default 0
47 46
48config XILINX_MICROBLAZE0_USE_DIV 47config XILINX_MICROBLAZE0_USE_DIV
49 int "USE_DIV range (0:1)" if ALLOW_EDIT_AUTO 48 int "USE_DIV range (0:1)"
50 default 1 49 default 0
51 50
52config XILINX_MICROBLAZE0_USE_HW_MUL 51config XILINX_MICROBLAZE0_USE_HW_MUL
53 int "USE_HW_MUL values (0=NONE, 1=MUL32, 2=MUL64)" if ALLOW_EDIT_AUTO 52 int "USE_HW_MUL values (0=NONE, 1=MUL32, 2=MUL64)"
54 default 2 53 default 0
55 54
56config XILINX_MICROBLAZE0_USE_FPU 55config XILINX_MICROBLAZE0_USE_FPU
57 int "USE_FPU values (0=NONE, 1=BASIC, 2=EXTENDED)" if ALLOW_EDIT_AUTO 56 int "USE_FPU values (0=NONE, 1=BASIC, 2=EXTENDED)"
58 default 2 57 default 0
59 58
60config XILINX_MICROBLAZE0_HW_VER 59config XILINX_MICROBLAZE0_HW_VER
61 string "Core version number" if ALLOW_EDIT_AUTO 60 string "Core version number"
62 default 7.10.d 61 default 7.10.d
diff --git a/arch/microblaze/platform/generic/system.dts b/arch/microblaze/platform/generic/system.dts
index 29993f62b30a..2d5c41767cd0 100644
--- a/arch/microblaze/platform/generic/system.dts
+++ b/arch/microblaze/platform/generic/system.dts
@@ -32,11 +32,16 @@
32 #address-cells = <1>; 32 #address-cells = <1>;
33 #size-cells = <1>; 33 #size-cells = <1>;
34 compatible = "xlnx,microblaze"; 34 compatible = "xlnx,microblaze";
35 hard-reset-gpios = <&LEDs_8Bit 2 1>;
35 model = "testing"; 36 model = "testing";
36 DDR2_SDRAM: memory@90000000 { 37 DDR2_SDRAM: memory@90000000 {
37 device_type = "memory"; 38 device_type = "memory";
38 reg = < 0x90000000 0x10000000 >; 39 reg = < 0x90000000 0x10000000 >;
39 } ; 40 } ;
41 aliases {
42 ethernet0 = &Hard_Ethernet_MAC;
43 serial0 = &RS232_Uart_1;
44 } ;
40 chosen { 45 chosen {
41 bootargs = "console=ttyUL0,115200 highres=on"; 46 bootargs = "console=ttyUL0,115200 highres=on";
42 linux,stdout-path = "/plb@0/serial@84000000"; 47 linux,stdout-path = "/plb@0/serial@84000000";
@@ -127,7 +132,7 @@
127 mb_plb: plb@0 { 132 mb_plb: plb@0 {
128 #address-cells = <1>; 133 #address-cells = <1>;
129 #size-cells = <1>; 134 #size-cells = <1>;
130 compatible = "xlnx,plb-v46-1.03.a", "simple-bus"; 135 compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus";
131 ranges ; 136 ranges ;
132 FLASH: flash@a0000000 { 137 FLASH: flash@a0000000 {
133 bank-width = <2>; 138 bank-width = <2>;
@@ -214,12 +219,12 @@
214 #size-cells = <1>; 219 #size-cells = <1>;
215 compatible = "xlnx,compound"; 220 compatible = "xlnx,compound";
216 ethernet@81c00000 { 221 ethernet@81c00000 {
217 compatible = "xlnx,xps-ll-temac-1.01.b"; 222 compatible = "xlnx,xps-ll-temac-1.01.b", "xlnx,xps-ll-temac-1.00.a";
218 device_type = "network"; 223 device_type = "network";
219 interrupt-parent = <&xps_intc_0>; 224 interrupt-parent = <&xps_intc_0>;
220 interrupts = < 5 2 >; 225 interrupts = < 5 2 >;
221 llink-connected = <&PIM3>; 226 llink-connected = <&PIM3>;
222 local-mac-address = [ 02 00 00 00 00 00 ]; 227 local-mac-address = [ 00 0a 35 00 00 00 ];
223 reg = < 0x81c00000 0x40 >; 228 reg = < 0x81c00000 0x40 >;
224 xlnx,bus2core-clk-ratio = <0x1>; 229 xlnx,bus2core-clk-ratio = <0x1>;
225 xlnx,phy-type = <0x1>; 230 xlnx,phy-type = <0x1>;
@@ -261,6 +266,33 @@
261 xlnx,is-dual = <0x0>; 266 xlnx,is-dual = <0x0>;
262 xlnx,tri-default = <0xffffffff>; 267 xlnx,tri-default = <0xffffffff>;
263 xlnx,tri-default-2 = <0xffffffff>; 268 xlnx,tri-default-2 = <0xffffffff>;
269 #gpio-cells = <2>;
270 gpio-controller;
271 } ;
272
273 gpio-leds {
274 compatible = "gpio-leds";
275
276 heartbeat {
277 label = "Heartbeat";
278 gpios = <&LEDs_8Bit 4 1>;
279 linux,default-trigger = "heartbeat";
280 };
281
282 yellow {
283 label = "Yellow";
284 gpios = <&LEDs_8Bit 5 1>;
285 };
286
287 red {
288 label = "Red";
289 gpios = <&LEDs_8Bit 6 1>;
290 };
291
292 green {
293 label = "Green";
294 gpios = <&LEDs_8Bit 7 1>;
295 };
264 } ; 296 } ;
265 RS232_Uart_1: serial@84000000 { 297 RS232_Uart_1: serial@84000000 {
266 clock-frequency = <125000000>; 298 clock-frequency = <125000000>;
diff --git a/arch/microblaze/platform/platform.c b/arch/microblaze/platform/platform.c
index 56e0234fa34b..5b89b58c5aed 100644
--- a/arch/microblaze/platform/platform.c
+++ b/arch/microblaze/platform/platform.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15#include <asm/prom.h> 15#include <asm/prom.h>
16#include <asm/setup.h>
16 17
17static struct of_device_id xilinx_of_bus_ids[] __initdata = { 18static struct of_device_id xilinx_of_bus_ids[] __initdata = {
18 { .compatible = "simple-bus", }, 19 { .compatible = "simple-bus", },
@@ -26,6 +27,7 @@ static struct of_device_id xilinx_of_bus_ids[] __initdata = {
26static int __init microblaze_device_probe(void) 27static int __init microblaze_device_probe(void)
27{ 28{
28 of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL); 29 of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
30 of_platform_reset_gpio_probe();
29 return 0; 31 return 0;
30} 32}
31device_initcall(microblaze_device_probe); 33device_initcall(microblaze_device_probe);
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index fd7620f025fa..9541171f1220 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -5,9 +5,12 @@ config MIPS
5 select HAVE_IDE 5 select HAVE_IDE
6 select HAVE_OPROFILE 6 select HAVE_OPROFILE
7 select HAVE_ARCH_KGDB 7 select HAVE_ARCH_KGDB
8 # Horrible source of confusion. Die, die, die ... 8 select HAVE_FUNCTION_TRACER
9 select EMBEDDED 9 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
10 select RTC_LIB if !LEMOTE_FULOONG2E 10 select HAVE_DYNAMIC_FTRACE
11 select HAVE_FTRACE_MCOUNT_RECORD
12 select HAVE_FUNCTION_GRAPH_TRACER
13 select RTC_LIB if !MACH_LOONGSON
11 14
12mainmenu "Linux/MIPS Kernel Configuration" 15mainmenu "Linux/MIPS Kernel Configuration"
13 16
@@ -22,6 +25,7 @@ choice
22 25
23config MACH_ALCHEMY 26config MACH_ALCHEMY
24 bool "Alchemy processor based machines" 27 bool "Alchemy processor based machines"
28 select SYS_SUPPORTS_ZBOOT
25 29
26config AR7 30config AR7
27 bool "Texas Instruments AR7" 31 bool "Texas Instruments AR7"
@@ -36,6 +40,7 @@ config AR7
36 select SYS_HAS_EARLY_PRINTK 40 select SYS_HAS_EARLY_PRINTK
37 select SYS_SUPPORTS_32BIT_KERNEL 41 select SYS_SUPPORTS_32BIT_KERNEL
38 select SYS_SUPPORTS_LITTLE_ENDIAN 42 select SYS_SUPPORTS_LITTLE_ENDIAN
43 select SYS_SUPPORTS_ZBOOT_UART16550
39 select GENERIC_GPIO 44 select GENERIC_GPIO
40 select GCD 45 select GCD
41 select VLYNQ 46 select VLYNQ
@@ -43,23 +48,6 @@ config AR7
43 Support for the Texas Instruments AR7 System-on-a-Chip 48 Support for the Texas Instruments AR7 System-on-a-Chip
44 family: TNETD7100, 7200 and 7300. 49 family: TNETD7100, 7200 and 7300.
45 50
46config BASLER_EXCITE
47 bool "Basler eXcite smart camera"
48 select CEVT_R4K
49 select CSRC_R4K
50 select DMA_COHERENT
51 select HW_HAS_PCI
52 select IRQ_CPU
53 select IRQ_CPU_RM7K
54 select IRQ_CPU_RM9K
55 select MIPS_RM9122
56 select SYS_HAS_CPU_RM9000
57 select SYS_SUPPORTS_32BIT_KERNEL
58 select SYS_SUPPORTS_BIG_ENDIAN
59 help
60 The eXcite is a smart camera platform manufactured by
61 Basler Vision Technologies AG.
62
63config BCM47XX 51config BCM47XX
64 bool "BCM47XX based boards" 52 bool "BCM47XX based boards"
65 select CEVT_R4K 53 select CEVT_R4K
@@ -192,6 +180,7 @@ config LASAT
192 180
193config MACH_LOONGSON 181config MACH_LOONGSON
194 bool "Loongson family of machines" 182 bool "Loongson family of machines"
183 select SYS_SUPPORTS_ZBOOT_UART16550
195 help 184 help
196 This enables the support of Loongson family of machines. 185 This enables the support of Loongson family of machines.
197 186
@@ -233,6 +222,7 @@ config MIPS_MALTA
233 select SYS_SUPPORTS_MIPS_CMP 222 select SYS_SUPPORTS_MIPS_CMP
234 select SYS_SUPPORTS_MULTITHREADING 223 select SYS_SUPPORTS_MULTITHREADING
235 select SYS_SUPPORTS_SMARTMIPS 224 select SYS_SUPPORTS_SMARTMIPS
225 select SYS_SUPPORTS_ZBOOT
236 help 226 help
237 This enables support for the MIPS Technologies Malta evaluation 227 This enables support for the MIPS Technologies Malta evaluation
238 board. 228 board.
@@ -334,6 +324,24 @@ config PMC_YOSEMITE
334 Yosemite is an evaluation board for the RM9000x2 processor 324 Yosemite is an evaluation board for the RM9000x2 processor
335 manufactured by PMC-Sierra. 325 manufactured by PMC-Sierra.
336 326
327config POWERTV
328 bool "Cisco PowerTV"
329 select BOOT_ELF32
330 select CEVT_R4K
331 select CPU_MIPSR2_IRQ_VI
332 select CPU_MIPSR2_IRQ_EI
333 select CSRC_POWERTV
334 select DMA_NONCOHERENT
335 select HW_HAS_PCI
336 select SYS_HAS_EARLY_PRINTK
337 select SYS_HAS_CPU_MIPS32_R2
338 select SYS_SUPPORTS_32BIT_KERNEL
339 select SYS_SUPPORTS_BIG_ENDIAN
340 select SYS_SUPPORTS_HIGHMEM
341 select USB_OHCI_LITTLE_ENDIAN
342 help
343 This enables support for the Cisco PowerTV Platform.
344
337config SGI_IP22 345config SGI_IP22
338 bool "SGI IP22 (Indy/Indigo2)" 346 bool "SGI IP22 (Indy/Indigo2)"
339 select ARC 347 select ARC
@@ -674,11 +682,11 @@ config CAVIUM_OCTEON_REFERENCE_BOARD
674endchoice 682endchoice
675 683
676source "arch/mips/alchemy/Kconfig" 684source "arch/mips/alchemy/Kconfig"
677source "arch/mips/basler/excite/Kconfig"
678source "arch/mips/bcm63xx/Kconfig" 685source "arch/mips/bcm63xx/Kconfig"
679source "arch/mips/jazz/Kconfig" 686source "arch/mips/jazz/Kconfig"
680source "arch/mips/lasat/Kconfig" 687source "arch/mips/lasat/Kconfig"
681source "arch/mips/pmc-sierra/Kconfig" 688source "arch/mips/pmc-sierra/Kconfig"
689source "arch/mips/powertv/Kconfig"
682source "arch/mips/sgi-ip27/Kconfig" 690source "arch/mips/sgi-ip27/Kconfig"
683source "arch/mips/sibyte/Kconfig" 691source "arch/mips/sibyte/Kconfig"
684source "arch/mips/txx9/Kconfig" 692source "arch/mips/txx9/Kconfig"
@@ -778,6 +786,9 @@ config CSRC_BCM1480
778config CSRC_IOASIC 786config CSRC_IOASIC
779 bool 787 bool
780 788
789config CSRC_POWERTV
790 bool
791
781config CSRC_R4K_LIB 792config CSRC_R4K_LIB
782 bool 793 bool
783 794
@@ -806,20 +817,6 @@ config DMA_NONCOHERENT
806config DMA_NEED_PCI_MAP_STATE 817config DMA_NEED_PCI_MAP_STATE
807 bool 818 bool
808 819
809config EARLY_PRINTK
810 bool "Early printk" if EMBEDDED && DEBUG_KERNEL
811 depends on SYS_HAS_EARLY_PRINTK
812 default y
813 help
814 This option enables special console drivers which allow the kernel
815 to print messages very early in the bootup process.
816
817 This is useful for kernel debugging when your machine crashes very
818 early before the console code is initialized. For normal operation,
819 it is not recommended because it looks ugly on some machines and
820 doesn't cooperate with an X server. You should normally say N here,
821 unless you want to debug such a crash.
822
823config SYS_HAS_EARLY_PRINTK 820config SYS_HAS_EARLY_PRINTK
824 bool 821 bool
825 822
@@ -1069,6 +1066,21 @@ config CPU_LOONGSON2E
1069 The Loongson 2E processor implements the MIPS III instruction set 1066 The Loongson 2E processor implements the MIPS III instruction set
1070 with many extensions. 1067 with many extensions.
1071 1068
1069 It has an internal FPGA northbridge, which is compatiable to
1070 bonito64.
1071
1072config CPU_LOONGSON2F
1073 bool "Loongson 2F"
1074 depends on SYS_HAS_CPU_LOONGSON2F
1075 select CPU_LOONGSON2
1076 help
1077 The Loongson 2F processor implements the MIPS III instruction set
1078 with many extensions.
1079
1080 Loongson2F have built-in DDR2 and PCIX controller. The PCIX controller
1081 have a similar programming interface with FPGA northbridge used in
1082 Loongson2E.
1083
1072config CPU_MIPS32_R1 1084config CPU_MIPS32_R1
1073 bool "MIPS32 Release 1" 1085 bool "MIPS32 Release 1"
1074 depends on SYS_HAS_CPU_MIPS32_R1 1086 depends on SYS_HAS_CPU_MIPS32_R1
@@ -1294,6 +1306,16 @@ config CPU_CAVIUM_OCTEON
1294 1306
1295endchoice 1307endchoice
1296 1308
1309config SYS_SUPPORTS_ZBOOT
1310 bool
1311 select HAVE_KERNEL_GZIP
1312 select HAVE_KERNEL_BZIP2
1313 select HAVE_KERNEL_LZMA
1314
1315config SYS_SUPPORTS_ZBOOT_UART16550
1316 bool
1317 select SYS_SUPPORTS_ZBOOT
1318
1297config CPU_LOONGSON2 1319config CPU_LOONGSON2
1298 bool 1320 bool
1299 select CPU_SUPPORTS_32BIT_KERNEL 1321 select CPU_SUPPORTS_32BIT_KERNEL
@@ -1303,6 +1325,12 @@ config CPU_LOONGSON2
1303config SYS_HAS_CPU_LOONGSON2E 1325config SYS_HAS_CPU_LOONGSON2E
1304 bool 1326 bool
1305 1327
1328config SYS_HAS_CPU_LOONGSON2F
1329 bool
1330 select CPU_SUPPORTS_CPUFREQ
1331 select CPU_SUPPORTS_ADDRWINCFG if 64BIT
1332 select CPU_SUPPORTS_UNCACHED_ACCELERATED
1333
1306config SYS_HAS_CPU_MIPS32_R1 1334config SYS_HAS_CPU_MIPS32_R1
1307 bool 1335 bool
1308 1336
@@ -1411,8 +1439,17 @@ config CPU_SUPPORTS_32BIT_KERNEL
1411 bool 1439 bool
1412config CPU_SUPPORTS_64BIT_KERNEL 1440config CPU_SUPPORTS_64BIT_KERNEL
1413 bool 1441 bool
1442config CPU_SUPPORTS_CPUFREQ
1443 bool
1444config CPU_SUPPORTS_ADDRWINCFG
1445 bool
1414config CPU_SUPPORTS_HUGEPAGES 1446config CPU_SUPPORTS_HUGEPAGES
1415 bool 1447 bool
1448config CPU_SUPPORTS_UNCACHED_ACCELERATED
1449 bool
1450config MIPS_PGD_C0_CONTEXT
1451 bool
1452 default y if 64BIT && CPU_MIPSR2
1416 1453
1417# 1454#
1418# Set to y for ptrace access to watch registers. 1455# Set to y for ptrace access to watch registers.
@@ -2024,15 +2061,6 @@ config STACKTRACE_SUPPORT
2024 2061
2025source "init/Kconfig" 2062source "init/Kconfig"
2026 2063
2027config PROBE_INITRD_HEADER
2028 bool "Probe initrd header created by addinitrd"
2029 depends on BLK_DEV_INITRD
2030 help
2031 Probe initrd header at the last page of kernel image.
2032 Say Y here if you are using arch/mips/boot/addinitrd.c to
2033 add initrd or initramfs image to the kernel image.
2034 Otherwise, say N.
2035
2036source "kernel/Kconfig.freezer" 2064source "kernel/Kconfig.freezer"
2037 2065
2038menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)" 2066menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
@@ -2104,6 +2132,7 @@ config MMU
2104 2132
2105config I8253 2133config I8253
2106 bool 2134 bool
2135 select MIPS_EXTERNAL_TIMER
2107 2136
2108config ZONE_DMA32 2137config ZONE_DMA32
2109 bool 2138 bool
@@ -2180,6 +2209,8 @@ source "kernel/power/Kconfig"
2180 2209
2181endmenu 2210endmenu
2182 2211
2212source "arch/mips/kernel/cpufreq/Kconfig"
2213
2183source "net/Kconfig" 2214source "net/Kconfig"
2184 2215
2185source "drivers/Kconfig" 2216source "drivers/Kconfig"
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 364ca8938807..d2b88a0be519 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -6,15 +6,66 @@ config TRACE_IRQFLAGS_SUPPORT
6 6
7source "lib/Kconfig.debug" 7source "lib/Kconfig.debug"
8 8
9config EARLY_PRINTK
10 bool "Early printk" if EMBEDDED
11 depends on SYS_HAS_EARLY_PRINTK
12 default y
13 help
14 This option enables special console drivers which allow the kernel
15 to print messages very early in the bootup process.
16
17 This is useful for kernel debugging when your machine crashes very
18 early before the console code is initialized. For normal operation,
19 it is not recommended because it looks ugly on some machines and
20 doesn't cooperate with an X server. You should normally say N here,
21 unless you want to debug such a crash.
22
23config CMDLINE_BOOL
24 bool "Built-in kernel command line"
25 default n
26 help
27 For most systems, it is firmware or second stage bootloader that
28 by default specifies the kernel command line options. However,
29 it might be necessary or advantageous to either override the
30 default kernel command line or add a few extra options to it.
31 For such cases, this option allows you to hardcode your own
32 command line options directly into the kernel. For that, you
33 should choose 'Y' here, and fill in the extra boot arguments
34 in CONFIG_CMDLINE.
35
36 The built-in options will be concatenated to the default command
37 line if CMDLINE_OVERRIDE is set to 'N'. Otherwise, the default
38 command line will be ignored and replaced by the built-in string.
39
40 Most MIPS systems will normally expect 'N' here and rely upon
41 the command line from the firmware or the second-stage bootloader.
42
9config CMDLINE 43config CMDLINE
10 string "Default kernel command string" 44 string "Default kernel command string"
45 depends on CMDLINE_BOOL
11 default "" 46 default ""
12 help 47 help
13 On some platforms, there is currently no way for the boot loader to 48 On some platforms, there is currently no way for the boot loader to
14 pass arguments to the kernel. For these platforms, you can supply 49 pass arguments to the kernel. For these platforms, and for the cases
15 some command-line options at build time by entering them here. In 50 when you want to add some extra options to the command line or ignore
16 other cases you can specify kernel args so that you don't have 51 the default command line, you can supply some command-line options at
17 to set them up in board prom initialization routines. 52 build time by entering them here. In other cases you can specify
53 kernel args so that you don't have to set them up in board prom
54 initialization routines.
55
56 For more information, see the CMDLINE_BOOL and CMDLINE_OVERRIDE
57 options.
58
59config CMDLINE_OVERRIDE
60 bool "Built-in command line overrides firware arguments"
61 default n
62 depends on CMDLINE_BOOL
63 help
64 By setting this option to 'Y' you will have your kernel ignore
65 command line arguments from firmware or second stage bootloader.
66 Instead, the built-in command line will be used exclusively.
67
68 Normally, you will choose 'N' here.
18 69
19config DEBUG_STACK_USAGE 70config DEBUG_STACK_USAGE
20 bool "Enable stack utilization instrumentation" 71 bool "Enable stack utilization instrumentation"
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 77f5021218d3..1893efd43fca 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -48,7 +48,16 @@ ifneq ($(SUBARCH),$(ARCH))
48 endif 48 endif
49endif 49endif
50 50
51ifndef CONFIG_FUNCTION_TRACER
51cflags-y := -ffunction-sections 52cflags-y := -ffunction-sections
53endif
54ifdef CONFIG_FUNCTION_GRAPH_TRACER
55 ifndef KBUILD_MCOUNT_RA_ADDRESS
56 ifeq ($(call cc-option-yn,-mmcount-ra-address), y)
57 cflags-y += -mmcount-ra-address -DKBUILD_MCOUNT_RA_ADDRESS
58 endif
59 endif
60endif
52cflags-y += $(call cc-option, -mno-check-zero-division) 61cflags-y += $(call cc-option, -mno-check-zero-division)
53 62
54ifdef CONFIG_32BIT 63ifdef CONFIG_32BIT
@@ -69,6 +78,7 @@ endif
69 78
70all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32) 79all-$(CONFIG_BOOT_ELF32) := $(vmlinux-32)
71all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64) 80all-$(CONFIG_BOOT_ELF64) := $(vmlinux-64)
81all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
72 82
73# 83#
74# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel 84# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
@@ -124,6 +134,8 @@ cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
124cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap 134cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
125cflags-$(CONFIG_CPU_LOONGSON2E) += \ 135cflags-$(CONFIG_CPU_LOONGSON2E) += \
126 $(call cc-option,-march=loongson2e,-march=r4600) 136 $(call cc-option,-march=loongson2e,-march=r4600)
137cflags-$(CONFIG_CPU_LOONGSON2F) += \
138 $(call cc-option,-march=loongson2f,-march=r4600)
127 139
128cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ 140cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
129 -Wa,-mips32 -Wa,--trap 141 -Wa,-mips32 -Wa,--trap
@@ -324,6 +336,7 @@ core-$(CONFIG_MACH_LOONGSON) +=arch/mips/loongson/
324cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \ 336cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \
325 -mno-branch-likely 337 -mno-branch-likely
326load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 338load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000
339load-$(CONFIG_LEMOTE_MACH2F) +=0xffffffff80200000
327 340
328# 341#
329# MIPS Malta board 342# MIPS Malta board
@@ -331,7 +344,7 @@ load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000
331core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/ 344core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/
332cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta 345cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta
333load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 346load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
334all-$(CONFIG_MIPS_MALTA) := vmlinux.bin 347all-$(CONFIG_MIPS_MALTA) := vmlinuz.bin
335 348
336# 349#
337# MIPS SIM 350# MIPS SIM
@@ -356,13 +369,6 @@ cflags-$(CONFIG_PMC_YOSEMITE) += -I$(srctree)/arch/mips/include/asm/mach-yosemit
356load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 369load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000
357 370
358# 371#
359# Basler eXcite
360#
361core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/
362cflags-$(CONFIG_BASLER_EXCITE) += -I$(srctree)/arch/mips/include/asm/mach-excite
363load-$(CONFIG_BASLER_EXCITE) += 0x80100000
364
365#
366# LASAT platforms 372# LASAT platforms
367# 373#
368core-$(CONFIG_LASAT) += arch/mips/lasat/ 374core-$(CONFIG_LASAT) += arch/mips/lasat/
@@ -441,6 +447,13 @@ core-$(CONFIG_NEC_MARKEINS) += arch/mips/emma/markeins/
441load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000 447load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000
442 448
443# 449#
450# Cisco PowerTV Platform
451#
452core-$(CONFIG_POWERTV) += arch/mips/powertv/
453cflags-$(CONFIG_POWERTV) += -I$(srctree)/arch/mips/include/asm/mach-powertv
454load-$(CONFIG_POWERTV) += 0xffffffff90800000
455
456#
444# SGI IP22 (Indy/Indigo2) 457# SGI IP22 (Indy/Indigo2)
445# 458#
446# Set the load address to >= 0xffffffff88069000 if you want to leave space for 459# Set the load address to >= 0xffffffff88069000 if you want to leave space for
@@ -581,7 +594,7 @@ load-$(CONFIG_SNI_RM) += 0xffffffff80600000
581else 594else
582load-$(CONFIG_SNI_RM) += 0xffffffff80030000 595load-$(CONFIG_SNI_RM) += 0xffffffff80030000
583endif 596endif
584all-$(CONFIG_SNI_RM) := vmlinux.ecoff 597all-$(CONFIG_SNI_RM) := vmlinuz.ecoff
585 598
586# 599#
587# Common TXx9 600# Common TXx9
@@ -699,9 +712,23 @@ vmlinux.64: vmlinux
699 $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@ 712 $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
700 713
701makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1) 714makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
715makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
716 VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1)
702 717
703all: $(all-y) 718all: $(all-y)
704 719
720vmlinuz: vmlinux FORCE
721 +@$(call makezboot,$@)
722
723vmlinuz.bin: vmlinux
724 +@$(call makezboot,$@)
725
726vmlinuz.ecoff: vmlinux
727 +@$(call makezboot,$@)
728
729vmlinuz.srec: vmlinux
730 +@$(call makezboot,$@)
731
705vmlinux.bin: $(vmlinux-32) 732vmlinux.bin: $(vmlinux-32)
706 +@$(call makeboot,$@) 733 +@$(call makeboot,$@)
707 734
@@ -726,11 +753,13 @@ endif
726 753
727install: 754install:
728 $(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE) 755 $(Q)install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
756 $(Q)install -D -m 755 vmlinuz $(INSTALL_PATH)/vmlinuz-$(KERNELRELEASE)
729 $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE) 757 $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
730 $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE) 758 $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
731 759
732archclean: 760archclean:
733 @$(MAKE) $(clean)=arch/mips/boot 761 @$(MAKE) $(clean)=arch/mips/boot
762 @$(MAKE) $(clean)=arch/mips/boot/compressed
734 @$(MAKE) $(clean)=arch/mips/lasat 763 @$(MAKE) $(clean)=arch/mips/lasat
735 764
736define archhelp 765define archhelp
@@ -738,10 +767,18 @@ define archhelp
738 echo ' vmlinux.ecoff - ECOFF boot image' 767 echo ' vmlinux.ecoff - ECOFF boot image'
739 echo ' vmlinux.bin - Raw binary boot image' 768 echo ' vmlinux.bin - Raw binary boot image'
740 echo ' vmlinux.srec - SREC boot image' 769 echo ' vmlinux.srec - SREC boot image'
770 echo ' vmlinuz - Compressed boot(zboot) image'
771 echo ' vmlinuz.ecoff - ECOFF zboot image'
772 echo ' vmlinuz.bin - Raw binary zboot image'
773 echo ' vmlinuz.srec - SREC zboot image'
741 echo 774 echo
742 echo ' These will be default as apropriate for a configured platform.' 775 echo ' These will be default as apropriate for a configured platform.'
743endef 776endef
744 777
745CLEAN_FILES += vmlinux.32 \ 778CLEAN_FILES += vmlinux.32 \
746 vmlinux.64 \ 779 vmlinux.64 \
747 vmlinux.ecoff 780 vmlinux.ecoff \
781 vmlinuz \
782 vmlinuz.ecoff \
783 vmlinuz.bin \
784 vmlinuz.srec
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 835f3f0319ca..85169c08d8dc 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -505,7 +505,7 @@ static int __init ar7_register_devices(void)
505 int res; 505 int res;
506 u32 *bootcr, val; 506 u32 *bootcr, val;
507#ifdef CONFIG_SERIAL_8250 507#ifdef CONFIG_SERIAL_8250
508 static struct uart_port uart_port[2]; 508 static struct uart_port uart_port[2] __initdata;
509 509
510 memset(uart_port, 0, sizeof(struct uart_port) * 2); 510 memset(uart_port, 0, sizeof(struct uart_port) * 2);
511 511
diff --git a/arch/mips/basler/excite/Kconfig b/arch/mips/basler/excite/Kconfig
deleted file mode 100644
index ba506075608b..000000000000
--- a/arch/mips/basler/excite/Kconfig
+++ /dev/null
@@ -1,9 +0,0 @@
1config BASLER_EXCITE_PROTOTYPE
2 bool "Support for pre-release units"
3 depends on BASLER_EXCITE
4 default n
5 help
6 Pre-series (prototype) units are different from later ones in
7 some ways. Select this option if you have one of these. Please
8 note that a kernel built with this option selected will not be
9 able to run on normal units.
diff --git a/arch/mips/basler/excite/Makefile b/arch/mips/basler/excite/Makefile
deleted file mode 100644
index cff29cf46d03..000000000000
--- a/arch/mips/basler/excite/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for Basler eXcite
3#
4
5obj-$(CONFIG_BASLER_EXCITE) += excite_irq.o excite_prom.o excite_setup.o \
6 excite_device.o excite_procfs.o
7
8obj-m += excite_iodev.o
diff --git a/arch/mips/basler/excite/excite_device.c b/arch/mips/basler/excite/excite_device.c
deleted file mode 100644
index e00bc2d7f301..000000000000
--- a/arch/mips/basler/excite/excite_device.c
+++ /dev/null
@@ -1,403 +0,0 @@
1/*
2 * Copyright (C) 2004 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
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#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/platform_device.h>
23#include <linux/ioport.h>
24#include <linux/err.h>
25#include <linux/jiffies.h>
26#include <linux/sched.h>
27#include <asm/types.h>
28#include <asm/rm9k-ocd.h>
29
30#include <excite.h>
31#include <rm9k_eth.h>
32#include <rm9k_wdt.h>
33#include <rm9k_xicap.h>
34#include <excite_nandflash.h>
35
36#include "excite_iodev.h"
37
38#define RM9K_GE_UNIT 0
39#define XICAP_UNIT 0
40#define NAND_UNIT 0
41
42#define DLL_TIMEOUT 3 /* seconds */
43
44
45#define RINIT(__start__, __end__, __name__, __parent__) { \
46 .name = __name__ "_0", \
47 .start = (__start__), \
48 .end = (__end__), \
49 .flags = 0, \
50 .parent = (__parent__) \
51}
52
53#define RINIT_IRQ(__irq__, __name__) { \
54 .name = __name__ "_0", \
55 .start = (__irq__), \
56 .end = (__irq__), \
57 .flags = IORESOURCE_IRQ, \
58 .parent = NULL \
59}
60
61
62
63enum {
64 slice_xicap,
65 slice_eth
66};
67
68
69
70static struct resource
71 excite_ctr_resource __maybe_unused = {
72 .name = "GPI counters",
73 .start = 0,
74 .end = 5,
75 .flags = 0,
76 .parent = NULL,
77 .sibling = NULL,
78 .child = NULL
79 },
80 excite_gpislice_resource __maybe_unused = {
81 .name = "GPI slices",
82 .start = 0,
83 .end = 1,
84 .flags = 0,
85 .parent = NULL,
86 .sibling = NULL,
87 .child = NULL
88 },
89 excite_mdio_channel_resource __maybe_unused = {
90 .name = "MDIO channels",
91 .start = 0,
92 .end = 1,
93 .flags = 0,
94 .parent = NULL,
95 .sibling = NULL,
96 .child = NULL
97 },
98 excite_fifomem_resource __maybe_unused = {
99 .name = "FIFO memory",
100 .start = 0,
101 .end = 767,
102 .flags = 0,
103 .parent = NULL,
104 .sibling = NULL,
105 .child = NULL
106 },
107 excite_scram_resource __maybe_unused = {
108 .name = "Scratch RAM",
109 .start = EXCITE_PHYS_SCRAM,
110 .end = EXCITE_PHYS_SCRAM + EXCITE_SIZE_SCRAM - 1,
111 .flags = IORESOURCE_MEM,
112 .parent = NULL,
113 .sibling = NULL,
114 .child = NULL
115 },
116 excite_fpga_resource __maybe_unused = {
117 .name = "System FPGA",
118 .start = EXCITE_PHYS_FPGA,
119 .end = EXCITE_PHYS_FPGA + EXCITE_SIZE_FPGA - 1,
120 .flags = IORESOURCE_MEM,
121 .parent = NULL,
122 .sibling = NULL,
123 .child = NULL
124 },
125 excite_nand_resource __maybe_unused = {
126 .name = "NAND flash control",
127 .start = EXCITE_PHYS_NAND,
128 .end = EXCITE_PHYS_NAND + EXCITE_SIZE_NAND - 1,
129 .flags = IORESOURCE_MEM,
130 .parent = NULL,
131 .sibling = NULL,
132 .child = NULL
133 },
134 excite_titan_resource __maybe_unused = {
135 .name = "TITAN registers",
136 .start = EXCITE_PHYS_TITAN,
137 .end = EXCITE_PHYS_TITAN + EXCITE_SIZE_TITAN - 1,
138 .flags = IORESOURCE_MEM,
139 .parent = NULL,
140 .sibling = NULL,
141 .child = NULL
142 };
143
144
145
146static void adjust_resources(struct resource *res, unsigned int n)
147{
148 struct resource *p;
149 const unsigned long mask = IORESOURCE_IO | IORESOURCE_MEM
150 | IORESOURCE_IRQ | IORESOURCE_DMA;
151
152 for (p = res; p < res + n; p++) {
153 const struct resource * const parent = p->parent;
154 if (parent) {
155 p->start += parent->start;
156 p->end += parent->start;
157 p->flags = parent->flags & mask;
158 }
159 }
160}
161
162
163
164#if defined(CONFIG_EXCITE_FCAP_GPI) || defined(CONFIG_EXCITE_FCAP_GPI_MODULE)
165static struct resource xicap_rsrc[] = {
166 RINIT(0x4840, 0x486f, XICAP_RESOURCE_FIFO_RX, &excite_titan_resource),
167 RINIT(0x4940, 0x494b, XICAP_RESOURCE_FIFO_TX, &excite_titan_resource),
168 RINIT(0x5040, 0x5127, XICAP_RESOURCE_XDMA, &excite_titan_resource),
169 RINIT(0x1000, 0x112f, XICAP_RESOURCE_PKTPROC, &excite_titan_resource),
170 RINIT(0x1100, 0x110f, XICAP_RESOURCE_PKT_STREAM, &excite_fpga_resource),
171 RINIT(0x0800, 0x0bff, XICAP_RESOURCE_DMADESC, &excite_scram_resource),
172 RINIT(slice_xicap, slice_xicap, XICAP_RESOURCE_GPI_SLICE, &excite_gpislice_resource),
173 RINIT(0x0100, 0x02ff, XICAP_RESOURCE_FIFO_BLK, &excite_fifomem_resource),
174 RINIT_IRQ(TITAN_IRQ, XICAP_RESOURCE_IRQ)
175};
176
177static struct platform_device xicap_pdev = {
178 .name = XICAP_NAME,
179 .id = XICAP_UNIT,
180 .num_resources = ARRAY_SIZE(xicap_rsrc),
181 .resource = xicap_rsrc
182};
183
184/*
185 * Create a platform device for the GPI port that receives the
186 * image data from the embedded camera.
187 */
188static int __init xicap_devinit(void)
189{
190 unsigned long tend;
191 u32 reg;
192 int retval;
193
194 adjust_resources(xicap_rsrc, ARRAY_SIZE(xicap_rsrc));
195
196 /* Power up the slice and configure it. */
197 reg = titan_readl(CPTC1R);
198 reg &= ~(0x11100 << slice_xicap);
199 titan_writel(reg, CPTC1R);
200
201 /* Enable slice & DLL. */
202 reg= titan_readl(CPRR);
203 reg &= ~(0x00030003 << (slice_xicap * 2));
204 titan_writel(reg, CPRR);
205
206 /* Wait for DLLs to lock */
207 tend = jiffies + DLL_TIMEOUT * HZ;
208 while (time_before(jiffies, tend)) {
209 if (!(~titan_readl(CPDSR) & (0x1 << (slice_xicap * 4))))
210 break;
211 yield();
212 }
213
214 if (~titan_readl(CPDSR) & (0x1 << (slice_xicap * 4))) {
215 printk(KERN_ERR "%s: DLL not locked after %u seconds\n",
216 xicap_pdev.name, DLL_TIMEOUT);
217 retval = -ETIME;
218 } else {
219 /* Register platform device */
220 retval = platform_device_register(&xicap_pdev);
221 }
222
223 return retval;
224}
225
226device_initcall(xicap_devinit);
227#endif /* defined(CONFIG_EXCITE_FCAP_GPI) || defined(CONFIG_EXCITE_FCAP_GPI_MODULE) */
228
229
230
231#if defined(CONFIG_WDT_RM9K_GPI) || defined(CONFIG_WDT_RM9K_GPI_MODULE)
232static struct resource wdt_rsrc[] = {
233 RINIT(0, 0, WDT_RESOURCE_COUNTER, &excite_ctr_resource),
234 RINIT(0x0084, 0x008f, WDT_RESOURCE_REGS, &excite_titan_resource),
235 RINIT_IRQ(TITAN_IRQ, WDT_RESOURCE_IRQ)
236};
237
238static struct platform_device wdt_pdev = {
239 .name = WDT_NAME,
240 .id = -1,
241 .num_resources = ARRAY_SIZE(wdt_rsrc),
242 .resource = wdt_rsrc
243};
244
245/*
246 * Create a platform device for the GPI port that receives the
247 * image data from the embedded camera.
248 */
249static int __init wdt_devinit(void)
250{
251 adjust_resources(wdt_rsrc, ARRAY_SIZE(wdt_rsrc));
252 return platform_device_register(&wdt_pdev);
253}
254
255device_initcall(wdt_devinit);
256#endif /* defined(CONFIG_WDT_RM9K_GPI) || defined(CONFIG_WDT_RM9K_GPI_MODULE) */
257
258
259
260static struct resource excite_nandflash_rsrc[] = {
261 RINIT(0x2000, 0x201f, EXCITE_NANDFLASH_RESOURCE_REGS, &excite_nand_resource)
262};
263
264static struct platform_device excite_nandflash_pdev = {
265 .name = "excite_nand",
266 .id = NAND_UNIT,
267 .num_resources = ARRAY_SIZE(excite_nandflash_rsrc),
268 .resource = excite_nandflash_rsrc
269};
270
271/*
272 * Create a platform device for the access to the nand-flash
273 * port
274 */
275static int __init excite_nandflash_devinit(void)
276{
277 adjust_resources(excite_nandflash_rsrc, ARRAY_SIZE(excite_nandflash_rsrc));
278
279 /* nothing to be done here */
280
281 /* Register platform device */
282 return platform_device_register(&excite_nandflash_pdev);
283}
284
285device_initcall(excite_nandflash_devinit);
286
287
288
289static struct resource iodev_rsrc[] = {
290 RINIT_IRQ(FPGA1_IRQ, IODEV_RESOURCE_IRQ)
291};
292
293static struct platform_device io_pdev = {
294 .name = IODEV_NAME,
295 .id = -1,
296 .num_resources = ARRAY_SIZE(iodev_rsrc),
297 .resource = iodev_rsrc
298};
299
300/*
301 * Create a platform device for the external I/O ports.
302 */
303static int __init io_devinit(void)
304{
305 adjust_resources(iodev_rsrc, ARRAY_SIZE(iodev_rsrc));
306 return platform_device_register(&io_pdev);
307}
308
309device_initcall(io_devinit);
310
311
312
313
314#if defined(CONFIG_RM9K_GE) || defined(CONFIG_RM9K_GE_MODULE)
315static struct resource rm9k_ge_rsrc[] = {
316 RINIT(0x2200, 0x27ff, RM9K_GE_RESOURCE_MAC, &excite_titan_resource),
317 RINIT(0x1800, 0x1fff, RM9K_GE_RESOURCE_MSTAT, &excite_titan_resource),
318 RINIT(0x2000, 0x212f, RM9K_GE_RESOURCE_PKTPROC, &excite_titan_resource),
319 RINIT(0x5140, 0x5227, RM9K_GE_RESOURCE_XDMA, &excite_titan_resource),
320 RINIT(0x4870, 0x489f, RM9K_GE_RESOURCE_FIFO_RX, &excite_titan_resource),
321 RINIT(0x494c, 0x4957, RM9K_GE_RESOURCE_FIFO_TX, &excite_titan_resource),
322 RINIT(0x0000, 0x007f, RM9K_GE_RESOURCE_FIFOMEM_RX, &excite_fifomem_resource),
323 RINIT(0x0080, 0x00ff, RM9K_GE_RESOURCE_FIFOMEM_TX, &excite_fifomem_resource),
324 RINIT(0x0180, 0x019f, RM9K_GE_RESOURCE_PHY, &excite_titan_resource),
325 RINIT(0x0000, 0x03ff, RM9K_GE_RESOURCE_DMADESC_RX, &excite_scram_resource),
326 RINIT(0x0400, 0x07ff, RM9K_GE_RESOURCE_DMADESC_TX, &excite_scram_resource),
327 RINIT(slice_eth, slice_eth, RM9K_GE_RESOURCE_GPI_SLICE, &excite_gpislice_resource),
328 RINIT(0, 0, RM9K_GE_RESOURCE_MDIO_CHANNEL, &excite_mdio_channel_resource),
329 RINIT_IRQ(TITAN_IRQ, RM9K_GE_RESOURCE_IRQ_MAIN),
330 RINIT_IRQ(PHY_IRQ, RM9K_GE_RESOURCE_IRQ_PHY)
331};
332
333static struct platform_device rm9k_ge_pdev = {
334 .name = RM9K_GE_NAME,
335 .id = RM9K_GE_UNIT,
336 .num_resources = ARRAY_SIZE(rm9k_ge_rsrc),
337 .resource = rm9k_ge_rsrc
338};
339
340
341
342/*
343 * Create a platform device for the Ethernet port.
344 */
345static int __init rm9k_ge_devinit(void)
346{
347 u32 reg;
348
349 adjust_resources(rm9k_ge_rsrc, ARRAY_SIZE(rm9k_ge_rsrc));
350
351 /* Power up the slice and configure it. */
352 reg = titan_readl(CPTC1R);
353 reg &= ~(0x11000 << slice_eth);
354 reg |= 0x100 << slice_eth;
355 titan_writel(reg, CPTC1R);
356
357 /* Take the MAC out of reset, reset the DLLs. */
358 reg = titan_readl(CPRR);
359 reg &= ~(0x00030000 << (slice_eth * 2));
360 reg |= 0x3 << (slice_eth * 2);
361 titan_writel(reg, CPRR);
362
363 return platform_device_register(&rm9k_ge_pdev);
364}
365
366device_initcall(rm9k_ge_devinit);
367#endif /* defined(CONFIG_RM9K_GE) || defined(CONFIG_RM9K_GE_MODULE) */
368
369
370
371static int __init excite_setup_devs(void)
372{
373 int res;
374 u32 reg;
375
376 /* Enable xdma and fifo interrupts */
377 reg = titan_readl(0x0050);
378 titan_writel(reg | 0x18000000, 0x0050);
379
380 res = request_resource(&iomem_resource, &excite_titan_resource);
381 if (res)
382 return res;
383 res = request_resource(&iomem_resource, &excite_scram_resource);
384 if (res)
385 return res;
386 res = request_resource(&iomem_resource, &excite_fpga_resource);
387 if (res)
388 return res;
389 res = request_resource(&iomem_resource, &excite_nand_resource);
390 if (res)
391 return res;
392 excite_fpga_resource.flags = excite_fpga_resource.parent->flags &
393 ( IORESOURCE_IO | IORESOURCE_MEM
394 | IORESOURCE_IRQ | IORESOURCE_DMA);
395 excite_nand_resource.flags = excite_nand_resource.parent->flags &
396 ( IORESOURCE_IO | IORESOURCE_MEM
397 | IORESOURCE_IRQ | IORESOURCE_DMA);
398
399 return 0;
400}
401
402arch_initcall(excite_setup_devs);
403
diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c
deleted file mode 100644
index 938b1d0b7652..000000000000
--- a/arch/mips/basler/excite/excite_iodev.c
+++ /dev/null
@@ -1,178 +0,0 @@
1/*
2 * Copyright (C) 2005 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
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#include <linux/compiler.h>
21#include <linux/init.h>
22#include <linux/module.h>
23#include <linux/sched.h>
24#include <linux/wait.h>
25#include <linux/poll.h>
26#include <linux/interrupt.h>
27#include <linux/platform_device.h>
28#include <linux/miscdevice.h>
29#include <linux/smp_lock.h>
30
31#include "excite_iodev.h"
32
33
34
35static const struct resource *iodev_get_resource(struct platform_device *, const char *, unsigned int);
36static int __init iodev_probe(struct platform_device *);
37static int __exit iodev_remove(struct platform_device *);
38static int iodev_open(struct inode *, struct file *);
39static int iodev_release(struct inode *, struct file *);
40static ssize_t iodev_read(struct file *, char __user *, size_t s, loff_t *);
41static unsigned int iodev_poll(struct file *, struct poll_table_struct *);
42static irqreturn_t iodev_irqhdl(int, void *);
43
44
45
46static const char iodev_name[] = "iodev";
47static unsigned int iodev_irq;
48static DECLARE_WAIT_QUEUE_HEAD(wq);
49
50
51
52static const struct file_operations fops =
53{
54 .owner = THIS_MODULE,
55 .open = iodev_open,
56 .release = iodev_release,
57 .read = iodev_read,
58 .poll = iodev_poll
59};
60
61static struct miscdevice miscdev =
62{
63 .minor = MISC_DYNAMIC_MINOR,
64 .name = iodev_name,
65 .fops = &fops
66};
67
68static struct platform_driver iodev_driver = {
69 .driver = {
70 .name = iodev_name,
71 .owner = THIS_MODULE,
72 },
73 .probe = iodev_probe,
74 .remove = __devexit_p(iodev_remove),
75};
76
77
78
79static const struct resource *
80iodev_get_resource(struct platform_device *pdv, const char *name,
81 unsigned int type)
82{
83 char buf[80];
84 if (snprintf(buf, sizeof buf, "%s_0", name) >= sizeof buf)
85 return NULL;
86 return platform_get_resource_byname(pdv, type, buf);
87}
88
89
90
91/* No hotplugging on the platform bus - use __init */
92static int __init iodev_probe(struct platform_device *dev)
93{
94 const struct resource * const ri =
95 iodev_get_resource(dev, IODEV_RESOURCE_IRQ, IORESOURCE_IRQ);
96
97 if (unlikely(!ri))
98 return -ENXIO;
99
100 iodev_irq = ri->start;
101 return misc_register(&miscdev);
102}
103
104
105
106static int __exit iodev_remove(struct platform_device *dev)
107{
108 return misc_deregister(&miscdev);
109}
110
111static int iodev_open(struct inode *i, struct file *f)
112{
113 int ret;
114
115 ret = request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED,
116 iodev_name, &miscdev);
117
118 return ret;
119}
120
121static int iodev_release(struct inode *i, struct file *f)
122{
123 free_irq(iodev_irq, &miscdev);
124 return 0;
125}
126
127
128
129
130static ssize_t
131iodev_read(struct file *f, char __user *d, size_t s, loff_t *o)
132{
133 ssize_t ret;
134 DEFINE_WAIT(w);
135
136 prepare_to_wait(&wq, &w, TASK_INTERRUPTIBLE);
137 if (!signal_pending(current))
138 schedule();
139 ret = signal_pending(current) ? -ERESTARTSYS : 0;
140 finish_wait(&wq, &w);
141 return ret;
142}
143
144
145static unsigned int iodev_poll(struct file *f, struct poll_table_struct *p)
146{
147 poll_wait(f, &wq, p);
148 return POLLOUT | POLLWRNORM;
149}
150
151static irqreturn_t iodev_irqhdl(int irq, void *ctxt)
152{
153 wake_up(&wq);
154
155 return IRQ_HANDLED;
156}
157
158static int __init iodev_init_module(void)
159{
160 return platform_driver_register(&iodev_driver);
161}
162
163
164
165static void __exit iodev_cleanup_module(void)
166{
167 platform_driver_unregister(&iodev_driver);
168}
169
170module_init(iodev_init_module);
171module_exit(iodev_cleanup_module);
172
173
174
175MODULE_AUTHOR("Thomas Koeller <thomas.koeller@baslerweb.com>");
176MODULE_DESCRIPTION("Basler eXcite i/o interrupt handler");
177MODULE_VERSION("0.0");
178MODULE_LICENSE("GPL");
diff --git a/arch/mips/basler/excite/excite_iodev.h b/arch/mips/basler/excite/excite_iodev.h
deleted file mode 100644
index cbfbb5d2ee62..000000000000
--- a/arch/mips/basler/excite/excite_iodev.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __EXCITE_IODEV_H__
2#define __EXCITE_IODEV_H__
3
4/* Device name */
5#define IODEV_NAME "iodev"
6
7/* Resource names */
8#define IODEV_RESOURCE_IRQ "excite_iodev_irq"
9
10#endif /* __EXCITE_IODEV_H__ */
diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c
deleted file mode 100644
index 934e0a6b1011..000000000000
--- a/arch/mips/basler/excite/excite_irq.c
+++ /dev/null
@@ -1,122 +0,0 @@
1/*
2 * Copyright (C) by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslereb.com>
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#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/kernel_stat.h>
23#include <linux/module.h>
24#include <linux/signal.h>
25#include <linux/sched.h>
26#include <linux/types.h>
27#include <linux/interrupt.h>
28#include <linux/ioport.h>
29#include <linux/timex.h>
30#include <linux/slab.h>
31#include <linux/random.h>
32#include <linux/bitops.h>
33#include <asm/bootinfo.h>
34#include <asm/io.h>
35#include <asm/irq.h>
36#include <asm/irq_cpu.h>
37#include <asm/mipsregs.h>
38#include <asm/system.h>
39#include <asm/rm9k-ocd.h>
40
41#include <excite.h>
42
43extern asmlinkage void excite_handle_int(void);
44
45/*
46 * Initialize the interrupt handler
47 */
48void __init arch_init_irq(void)
49{
50 mips_cpu_irq_init();
51 rm7k_cpu_irq_init();
52 rm9k_cpu_irq_init();
53}
54
55asmlinkage void plat_irq_dispatch(void)
56{
57 const u32
58 interrupts = read_c0_cause() >> 8,
59 mask = ((read_c0_status() >> 8) & 0x000000ff) |
60 (read_c0_intcontrol() & 0x0000ff00),
61 pending = interrupts & mask;
62 u32 msgintflags, msgintmask, msgint;
63
64 /* process timer interrupt */
65 if (pending & (1 << TIMER_IRQ)) {
66 do_IRQ(TIMER_IRQ);
67 return;
68 }
69
70 /* Process PCI interrupts */
71#if USB_IRQ < 10
72 msgintflags = ocd_readl(INTP0Status0 + (USB_MSGINT / 0x20 * 0x10));
73 msgintmask = ocd_readl(INTP0Mask0 + (USB_MSGINT / 0x20 * 0x10));
74 msgint = msgintflags & msgintmask & (0x1 << (USB_MSGINT % 0x20));
75 if ((pending & (1 << USB_IRQ)) && msgint) {
76#else
77 if (pending & (1 << USB_IRQ)) {
78#endif
79 do_IRQ(USB_IRQ);
80 return;
81 }
82
83 /* Process TITAN interrupts */
84 msgintflags = ocd_readl(INTP0Status0 + (TITAN_MSGINT / 0x20 * 0x10));
85 msgintmask = ocd_readl(INTP0Mask0 + (TITAN_MSGINT / 0x20 * 0x10));
86 msgint = msgintflags & msgintmask & (0x1 << (TITAN_MSGINT % 0x20));
87 if ((pending & (1 << TITAN_IRQ)) && msgint) {
88 ocd_writel(msgint, INTP0Clear0 + (TITAN_MSGINT / 0x20 * 0x10));
89 do_IRQ(TITAN_IRQ);
90 return;
91 }
92
93 /* Process FPGA line #0 interrupts */
94 msgintflags = ocd_readl(INTP0Status0 + (FPGA0_MSGINT / 0x20 * 0x10));
95 msgintmask = ocd_readl(INTP0Mask0 + (FPGA0_MSGINT / 0x20 * 0x10));
96 msgint = msgintflags & msgintmask & (0x1 << (FPGA0_MSGINT % 0x20));
97 if ((pending & (1 << FPGA0_IRQ)) && msgint) {
98 do_IRQ(FPGA0_IRQ);
99 return;
100 }
101
102 /* Process FPGA line #1 interrupts */
103 msgintflags = ocd_readl(INTP0Status0 + (FPGA1_MSGINT / 0x20 * 0x10));
104 msgintmask = ocd_readl(INTP0Mask0 + (FPGA1_MSGINT / 0x20 * 0x10));
105 msgint = msgintflags & msgintmask & (0x1 << (FPGA1_MSGINT % 0x20));
106 if ((pending & (1 << FPGA1_IRQ)) && msgint) {
107 do_IRQ(FPGA1_IRQ);
108 return;
109 }
110
111 /* Process PHY interrupts */
112 msgintflags = ocd_readl(INTP0Status0 + (PHY_MSGINT / 0x20 * 0x10));
113 msgintmask = ocd_readl(INTP0Mask0 + (PHY_MSGINT / 0x20 * 0x10));
114 msgint = msgintflags & msgintmask & (0x1 << (PHY_MSGINT % 0x20));
115 if ((pending & (1 << PHY_IRQ)) && msgint) {
116 do_IRQ(PHY_IRQ);
117 return;
118 }
119
120 /* Process spurious interrupts */
121 spurious_interrupt();
122}
diff --git a/arch/mips/basler/excite/excite_procfs.c b/arch/mips/basler/excite/excite_procfs.c
deleted file mode 100644
index 08923e6825b5..000000000000
--- a/arch/mips/basler/excite/excite_procfs.c
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * Copyright (C) 2004, 2005 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
4 *
5 * Procfs support for Basler eXcite
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#include <linux/module.h>
22#include <linux/proc_fs.h>
23#include <linux/seq_file.h>
24#include <linux/stat.h>
25#include <asm/page.h>
26#include <asm/io.h>
27#include <asm/system.h>
28#include <asm/rm9k-ocd.h>
29
30#include <excite.h>
31
32static int excite_unit_id_proc_show(struct seq_file *m, void *v)
33{
34 seq_printf(m, "%06x", unit_id);
35 return 0;
36}
37
38static int excite_unit_id_proc_open(struct inode *inode, struct file *file)
39{
40 return single_open(file, excite_unit_id_proc_show, NULL);
41}
42
43static const struct file_operations excite_unit_id_proc_fops = {
44 .owner = THIS_MODULE,
45 .open = excite_unit_id_proc_open,
46 .read = seq_read,
47 .llseek = seq_lseek,
48 .release = single_release,
49};
50
51static int
52excite_bootrom_read(char *page, char **start, off_t off, int count,
53 int *eof, void *data)
54{
55 void __iomem * src;
56
57 if (off >= EXCITE_SIZE_BOOTROM) {
58 *eof = 1;
59 return 0;
60 }
61
62 if ((off + count) > EXCITE_SIZE_BOOTROM)
63 count = EXCITE_SIZE_BOOTROM - off;
64
65 src = ioremap(EXCITE_PHYS_BOOTROM + off, count);
66 if (src) {
67 memcpy_fromio(page, src, count);
68 iounmap(src);
69 *start = page;
70 } else {
71 count = -ENOMEM;
72 }
73
74 return count;
75}
76
77void excite_procfs_init(void)
78{
79 /* Create & populate /proc/excite */
80 struct proc_dir_entry * const pdir = proc_mkdir("excite", NULL);
81 if (pdir) {
82 struct proc_dir_entry * e;
83
84 e = proc_create("unit_id", S_IRUGO, pdir,
85 &excite_unit_id_proc_fops);
86 if (e) e->size = 6;
87
88 e = create_proc_read_entry("bootrom", S_IRUGO, pdir,
89 excite_bootrom_read, NULL);
90 if (e) e->size = EXCITE_SIZE_BOOTROM;
91 }
92}
diff --git a/arch/mips/basler/excite/excite_prom.c b/arch/mips/basler/excite/excite_prom.c
deleted file mode 100644
index 68d8bc597e34..000000000000
--- a/arch/mips/basler/excite/excite_prom.c
+++ /dev/null
@@ -1,144 +0,0 @@
1/*
2 * Copyright (C) 2004, 2005 by Thomas Koeller (thomas.koeller@baslerweb.com)
3 * Based on the PMC-Sierra Yosemite board support by Ralf Baechle and
4 * Manish Lachwani.
5 *
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#include <linux/init.h>
22#include <linux/sched.h>
23#include <linux/mm.h>
24#include <linux/delay.h>
25#include <linux/smp.h>
26#include <linux/module.h>
27#include <asm/io.h>
28#include <asm/pgtable.h>
29#include <asm/processor.h>
30#include <asm/reboot.h>
31#include <asm/system.h>
32#include <asm/bootinfo.h>
33#include <asm/string.h>
34
35#include <excite.h>
36
37/* This struct is used by Redboot to pass arguments to the kernel */
38typedef struct
39{
40 char *name;
41 char *val;
42} t_env_var;
43
44struct parmblock {
45 t_env_var memsize;
46 t_env_var modetty0;
47 t_env_var ethaddr;
48 t_env_var env_end;
49 char *argv[2];
50 char text[0];
51};
52
53static unsigned int prom_argc;
54static const char ** prom_argv;
55static const t_env_var * prom_env;
56
57static void prom_halt(void) __attribute__((noreturn));
58static void prom_exit(void) __attribute__((noreturn));
59
60
61
62const char *get_system_type(void)
63{
64 return "Basler eXcite";
65}
66
67/*
68 * Halt the system
69 */
70static void prom_halt(void)
71{
72 printk(KERN_NOTICE "\n** System halted.\n");
73 while (1)
74 asm volatile (
75 "\t.set\tmips3\n"
76 "\twait\n"
77 "\t.set\tmips0\n"
78 );
79}
80
81/*
82 * Reset the CPU and re-enter Redboot
83 */
84static void prom_exit(void)
85{
86 unsigned int i;
87 volatile unsigned char * const flg =
88 (volatile unsigned char *) (EXCITE_ADDR_FPGA + EXCITE_FPGA_DPR);
89
90 /* Clear the watchdog reset flag, set the reboot flag */
91 *flg &= ~0x01;
92 *flg |= 0x80;
93
94 for (i = 0; i < 10; i++) {
95 *(volatile unsigned char *) (EXCITE_ADDR_FPGA + EXCITE_FPGA_SYSCTL) = 0x02;
96 iob();
97 mdelay(1000);
98 }
99
100 printk(KERN_NOTICE "Reset failed\n");
101 prom_halt();
102}
103
104static const char __init *prom_getenv(char *name)
105{
106 const t_env_var * p;
107 for (p = prom_env; p->name != NULL; p++)
108 if(strcmp(name, p->name) == 0)
109 break;
110 return p->val;
111}
112
113/*
114 * Init routine which accepts the variables from Redboot
115 */
116void __init prom_init(void)
117{
118 const struct parmblock * const pb = (struct parmblock *) fw_arg2;
119
120 prom_argc = fw_arg0;
121 prom_argv = (const char **) fw_arg1;
122 prom_env = &pb->memsize;
123
124 /* Callbacks for halt, restart */
125 _machine_restart = (void (*)(char *)) prom_exit;
126 _machine_halt = prom_halt;
127
128#ifdef CONFIG_32BIT
129 /* copy command line */
130 strcpy(arcs_cmdline, prom_argv[1]);
131 memsize = simple_strtol(prom_getenv("memsize"), NULL, 16);
132 strcpy(modetty, prom_getenv("modetty0"));
133#endif /* CONFIG_32BIT */
134
135#ifdef CONFIG_64BIT
136# error 64 bit support not implemented
137#endif /* CONFIG_64BIT */
138}
139
140/* This is called from free_initmem(), so we need to provide it */
141void __init prom_free_prom_memory(void)
142{
143 /* Nothing to do */
144}
diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c
deleted file mode 100644
index d66b3b8edf2a..000000000000
--- a/arch/mips/basler/excite/excite_setup.c
+++ /dev/null
@@ -1,302 +0,0 @@
1/*
2 * Copyright (C) 2004, 2005 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
4 * Based on the PMC-Sierra Yosemite board support by Ralf Baechle and
5 * Manish Lachwani.
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 <linux/types.h>
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/string.h>
26#include <linux/tty.h>
27#include <linux/serial_core.h>
28#include <linux/serial.h>
29#include <linux/serial_8250.h>
30#include <linux/ioport.h>
31#include <linux/spinlock.h>
32#include <asm/bootinfo.h>
33#include <asm/mipsregs.h>
34#include <asm/pgtable-32.h>
35#include <asm/io.h>
36#include <asm/time.h>
37#include <asm/rm9k-ocd.h>
38
39#include <excite.h>
40
41#define TITAN_UART_CLK 25000000
42
43#if 1
44/* normal serial port assignment */
45#define REGBASE_SER0 0x0208
46#define REGBASE_SER1 0x0238
47#define MASK_SER0 0x1
48#define MASK_SER1 0x2
49#else
50/* serial ports swapped */
51#define REGBASE_SER0 0x0238
52#define REGBASE_SER1 0x0208
53#define MASK_SER0 0x2
54#define MASK_SER1 0x1
55#endif
56
57unsigned long memsize;
58char modetty[30];
59unsigned int titan_irq = TITAN_IRQ;
60static void __iomem * ctl_regs;
61u32 unit_id;
62
63volatile void __iomem * const ocd_base = (void *) (EXCITE_ADDR_OCD);
64volatile void __iomem * const titan_base = (void *) (EXCITE_ADDR_TITAN);
65
66/* Protect access to shared GPI registers */
67DEFINE_SPINLOCK(titan_lock);
68int titan_irqflags;
69
70
71/*
72 * The eXcite platform uses the alternate timer interrupt
73 *
74 * Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how
75 * to handle the alternate timer interrupt of the RM9000.
76 */
77void __init plat_time_init(void)
78{
79 const u32 modebit5 = ocd_readl(0x00e4);
80 unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2;
81 unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
82
83 if (div == 33)
84 div = 1;
85 mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
86}
87
88static int __init excite_init_console(void)
89{
90#if defined(CONFIG_SERIAL_8250)
91 static __initdata char serr[] =
92 KERN_ERR "Serial port #%u setup failed\n";
93 struct uart_port up;
94
95 /* Take the DUART out of reset */
96 titan_writel(0x00ff1cff, CPRR);
97
98#if (CONFIG_SERIAL_8250_NR_UARTS > 1)
99 /* Enable both ports */
100 titan_writel(MASK_SER0 | MASK_SER1, UACFG);
101#else
102 /* Enable port #0 only */
103 titan_writel(MASK_SER0, UACFG);
104#endif
105
106 /*
107 * Set up serial port #0. Do not use autodetection; the result is
108 * not what we want.
109 */
110 memset(&up, 0, sizeof(up));
111 up.membase = (char *) titan_addr(REGBASE_SER0);
112 up.irq = TITAN_IRQ;
113 up.uartclk = TITAN_UART_CLK;
114 up.regshift = 0;
115 up.iotype = UPIO_RM9000;
116 up.type = PORT_RM9000;
117 up.flags = UPF_SHARE_IRQ;
118 up.line = 0;
119 if (early_serial_setup(&up))
120 printk(serr, up.line);
121
122#if CONFIG_SERIAL_8250_NR_UARTS > 1
123 /* And now for port #1. */
124 up.membase = (char *) titan_addr(REGBASE_SER1);
125 up.line = 1;
126 if (early_serial_setup(&up))
127 printk(serr, up.line);
128#endif /* CONFIG_SERIAL_8250_NR_UARTS > 1 */
129#else
130 /* Leave the DUART in reset */
131 titan_writel(0x00ff3cff, CPRR);
132#endif /* defined(CONFIG_SERIAL_8250) */
133
134 return 0;
135}
136
137static int __init excite_platform_init(void)
138{
139 unsigned int i;
140 unsigned char buf[3];
141 u8 reg;
142 void __iomem * dpr;
143
144 /* BIU buffer allocations */
145 ocd_writel(8, CPURSLMT); /* CPU */
146 titan_writel(4, CPGRWL); /* GPI / Ethernet */
147
148 /* Map control registers located in FPGA */
149 ctl_regs = ioremap_nocache(EXCITE_PHYS_FPGA + EXCITE_FPGA_SYSCTL, 16);
150 if (!ctl_regs)
151 panic("eXcite: failed to map platform control registers\n");
152 memcpy_fromio(buf, ctl_regs + 2, ARRAY_SIZE(buf));
153 unit_id = buf[0] | (buf[1] << 8) | (buf[2] << 16);
154
155 /* Clear the reboot flag */
156 dpr = ioremap_nocache(EXCITE_PHYS_FPGA + EXCITE_FPGA_DPR, 1);
157 reg = __raw_readb(dpr);
158 __raw_writeb(reg & 0x7f, dpr);
159 iounmap(dpr);
160
161 /* Interrupt controller setup */
162 for (i = INTP0Status0; i < INTP0Status0 + 0x80; i += 0x10) {
163 ocd_writel(0x00000000, i + 0x04);
164 ocd_writel(0xffffffff, i + 0x0c);
165 }
166 ocd_writel(0x2, NMICONFIG);
167
168 ocd_writel(0x1 << (TITAN_MSGINT % 0x20),
169 INTP0Mask0 + (0x10 * (TITAN_MSGINT / 0x20)));
170 ocd_writel((0x1 << (FPGA0_MSGINT % 0x20))
171 | ocd_readl(INTP0Mask0 + (0x10 * (FPGA0_MSGINT / 0x20))),
172 INTP0Mask0 + (0x10 * (FPGA0_MSGINT / 0x20)));
173 ocd_writel((0x1 << (FPGA1_MSGINT % 0x20))
174 | ocd_readl(INTP0Mask0 + (0x10 * (FPGA1_MSGINT / 0x20))),
175 INTP0Mask0 + (0x10 * (FPGA1_MSGINT / 0x20)));
176 ocd_writel((0x1 << (PHY_MSGINT % 0x20))
177 | ocd_readl(INTP0Mask0 + (0x10 * (PHY_MSGINT / 0x20))),
178 INTP0Mask0 + (0x10 * (PHY_MSGINT / 0x20)));
179#if USB_IRQ < 10
180 ocd_writel((0x1 << (USB_MSGINT % 0x20))
181 | ocd_readl(INTP0Mask0 + (0x10 * (USB_MSGINT / 0x20))),
182 INTP0Mask0 + (0x10 * (USB_MSGINT / 0x20)));
183#endif
184 /* Enable the packet FIFO, XDMA and XDMA arbiter */
185 titan_writel(0x00ff18ff, CPRR);
186
187 /*
188 * Set up the PADMUX. Power down all ethernet slices,
189 * they will be powered up and configured at device startup.
190 */
191 titan_writel(0x00878206, CPTC1R);
192 titan_writel(0x00001100, CPTC0R); /* latch PADMUX, enable WCIMODE */
193
194 /* Reset and enable the FIFO block */
195 titan_writel(0x00000001, SDRXFCIE);
196 titan_writel(0x00000001, SDTXFCIE);
197 titan_writel(0x00000100, SDRXFCIE);
198 titan_writel(0x00000000, SDTXFCIE);
199
200 /*
201 * Initialize the common interrupt shared by all components of
202 * the GPI/Ethernet subsystem.
203 */
204 titan_writel((EXCITE_PHYS_OCD >> 12), CPCFG0);
205 titan_writel(TITAN_MSGINT, CPCFG1);
206
207 /*
208 * XDMA configuration.
209 * In order for the XDMA to be sharable among multiple drivers,
210 * the setup must be done here in the platform. The reason is that
211 * this setup can only be done while the XDMA is in reset. If this
212 * were done in a driver, it would interrupt all other drivers
213 * using the XDMA.
214 */
215 titan_writel(0x80021dff, GXCFG); /* XDMA reset */
216 titan_writel(0x00000000, CPXCISRA);
217 titan_writel(0x00000000, CPXCISRB); /* clear pending interrupts */
218#if defined(CONFIG_HIGHMEM)
219# error change for HIGHMEM support!
220#else
221 titan_writel(0x00000000, GXDMADRPFX); /* buffer address prefix */
222#endif
223 titan_writel(0, GXDMA_DESCADR);
224
225 for (i = 0x5040; i <= 0x5300; i += 0x0040)
226 titan_writel(0x80080000, i); /* reset channel */
227
228 titan_writel((0x1 << 29) /* no sparse tx descr. */
229 | (0x1 << 28) /* no sparse rx descr. */
230 | (0x1 << 23) | (0x1 << 24) /* descriptor coherency */
231 | (0x1 << 21) | (0x1 << 22) /* data coherency */
232 | (0x1 << 17)
233 | 0x1dff,
234 GXCFG);
235
236#if defined(CONFIG_SMP)
237# error No SMP support
238#else
239 /* All interrupts go to core #0 only. */
240 titan_writel(0x1f007fff, CPDST0A);
241 titan_writel(0x00000000, CPDST0B);
242 titan_writel(0x0000ff3f, CPDST1A);
243 titan_writel(0x00000000, CPDST1B);
244 titan_writel(0x00ffffff, CPXDSTA);
245 titan_writel(0x00000000, CPXDSTB);
246#endif
247
248 /* Enable DUART interrupts, disable everything else. */
249 titan_writel(0x04000000, CPGIG0ER);
250 titan_writel(0x000000c0, CPGIG1ER);
251
252 excite_procfs_init();
253 return 0;
254}
255
256void __init plat_mem_setup(void)
257{
258 volatile u32 * const boot_ocd_base = (u32 *) 0xbf7fc000;
259
260 /* Announce RAM to system */
261 add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
262
263 /* Set up the peripheral address map */
264 *(boot_ocd_base + (LKB9 / sizeof(u32))) = 0;
265 *(boot_ocd_base + (LKB10 / sizeof(u32))) = 0;
266 *(boot_ocd_base + (LKB11 / sizeof(u32))) = 0;
267 *(boot_ocd_base + (LKB12 / sizeof(u32))) = 0;
268 wmb();
269 *(boot_ocd_base + (LKB0 / sizeof(u32))) = EXCITE_PHYS_OCD >> 4;
270 wmb();
271
272 ocd_writel((EXCITE_PHYS_TITAN >> 4) | 0x1UL, LKB5);
273 ocd_writel(((EXCITE_SIZE_TITAN >> 4) & 0x7fffff00) - 0x100, LKM5);
274 ocd_writel((EXCITE_PHYS_SCRAM >> 4) | 0x1UL, LKB13);
275 ocd_writel(((EXCITE_SIZE_SCRAM >> 4) & 0xffffff00) - 0x100, LKM13);
276
277 /* Local bus slot #0 */
278 ocd_writel(0x00040510, LDP0);
279 ocd_writel((EXCITE_PHYS_BOOTROM >> 4) | 0x1UL, LKB9);
280 ocd_writel(((EXCITE_SIZE_BOOTROM >> 4) & 0x03ffff00) - 0x100, LKM9);
281
282 /* Local bus slot #2 */
283 ocd_writel(0x00000330, LDP2);
284 ocd_writel((EXCITE_PHYS_FPGA >> 4) | 0x1, LKB11);
285 ocd_writel(((EXCITE_SIZE_FPGA >> 4) - 0x100) & 0x03ffff00, LKM11);
286
287 /* Local bus slot #3 */
288 ocd_writel(0x00123413, LDP3);
289 ocd_writel((EXCITE_PHYS_NAND >> 4) | 0x1, LKB12);
290 ocd_writel(((EXCITE_SIZE_NAND >> 4) - 0x100) & 0x03ffff00, LKM12);
291}
292
293
294
295console_initcall(excite_init_console);
296arch_initcall(excite_platform_init);
297
298EXPORT_SYMBOL(titan_lock);
299EXPORT_SYMBOL(titan_irqflags);
300EXPORT_SYMBOL(titan_irq);
301EXPORT_SYMBOL(ocd_base);
302EXPORT_SYMBOL(titan_base);
diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index fb284c3b2cff..c51405e57921 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -100,11 +100,11 @@ static __init void prom_init_console(void)
100 100
101static __init void prom_init_cmdline(void) 101static __init void prom_init_cmdline(void)
102{ 102{
103 static char buf[CL_SIZE] __initdata; 103 static char buf[COMMAND_LINE_SIZE] __initdata;
104 104
105 /* Get the kernel command line from CFE */ 105 /* Get the kernel command line from CFE */
106 if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) { 106 if (cfe_getenv("LINUX_CMDLINE", buf, COMMAND_LINE_SIZE) >= 0) {
107 buf[CL_SIZE-1] = 0; 107 buf[COMMAND_LINE_SIZE - 1] = 0;
108 strcpy(arcs_cmdline, buf); 108 strcpy(arcs_cmdline, buf);
109 } 109 }
110 110
@@ -112,13 +112,13 @@ static __init void prom_init_cmdline(void)
112 * as CFE is not available anymore later in the boot process. */ 112 * as CFE is not available anymore later in the boot process. */
113 if ((strstr(arcs_cmdline, "console=")) == NULL) { 113 if ((strstr(arcs_cmdline, "console=")) == NULL) {
114 /* Try to read the default serial port used by CFE */ 114 /* Try to read the default serial port used by CFE */
115 if ((cfe_getenv("BOOT_CONSOLE", buf, CL_SIZE) < 0) 115 if ((cfe_getenv("BOOT_CONSOLE", buf, COMMAND_LINE_SIZE) < 0)
116 || (strncmp("uart", buf, 4))) 116 || (strncmp("uart", buf, 4)))
117 /* Default to uart0 */ 117 /* Default to uart0 */
118 strcpy(buf, "uart0"); 118 strcpy(buf, "uart0");
119 119
120 /* Compute the new command line */ 120 /* Compute the new command line */
121 snprintf(arcs_cmdline, CL_SIZE, "%s console=ttyS%c,115200", 121 snprintf(arcs_cmdline, COMMAND_LINE_SIZE, "%s console=ttyS%c,115200",
122 arcs_cmdline, buf[4]); 122 arcs_cmdline, buf[4]);
123 } 123 }
124} 124}
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
index 2a209d74f0b4..094bc84765a3 100644
--- a/arch/mips/boot/Makefile
+++ b/arch/mips/boot/Makefile
@@ -25,7 +25,7 @@ strip-flags = $(addprefix --remove-section=,$(drop-sections))
25 25
26VMLINUX = vmlinux 26VMLINUX = vmlinux
27 27
28all: vmlinux.ecoff vmlinux.srec addinitrd 28all: vmlinux.ecoff vmlinux.srec
29 29
30vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) 30vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX)
31 $(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS) 31 $(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS)
@@ -39,11 +39,7 @@ vmlinux.bin: $(VMLINUX)
39vmlinux.srec: $(VMLINUX) 39vmlinux.srec: $(VMLINUX)
40 $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec 40 $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec
41 41
42$(obj)/addinitrd: $(obj)/addinitrd.c 42clean-files += elf2ecoff \
43 $(HOSTCC) -o $@ $^
44
45clean-files += addinitrd \
46 elf2ecoff \
47 vmlinux.bin \ 43 vmlinux.bin \
48 vmlinux.ecoff \ 44 vmlinux.ecoff \
49 vmlinux.srec 45 vmlinux.srec
diff --git a/arch/mips/boot/addinitrd.c b/arch/mips/boot/addinitrd.c
deleted file mode 100644
index b5b3febc10cc..000000000000
--- a/arch/mips/boot/addinitrd.c
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2 * addinitrd - program to add a initrd image to an ecoff kernel
3 *
4 * (C) 1999 Thomas Bogendoerfer
5 * minor modifications, cleanup: Guido Guenther <agx@sigxcpu.org>
6 * further cleanup: Maciej W. Rozycki
7 */
8
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <fcntl.h>
12#include <unistd.h>
13#include <stdio.h>
14#include <netinet/in.h>
15
16#include "ecoff.h"
17
18#define MIPS_PAGE_SIZE 4096
19#define MIPS_PAGE_MASK (MIPS_PAGE_SIZE-1)
20
21#define swab16(x) \
22 ((unsigned short)( \
23 (((unsigned short)(x) & (unsigned short)0x00ffU) << 8) | \
24 (((unsigned short)(x) & (unsigned short)0xff00U) >> 8) ))
25
26#define swab32(x) \
27 ((unsigned int)( \
28 (((unsigned int)(x) & (unsigned int)0x000000ffUL) << 24) | \
29 (((unsigned int)(x) & (unsigned int)0x0000ff00UL) << 8) | \
30 (((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \
31 (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) ))
32
33#define SWAB(a) (swab ? swab32(a) : (a))
34
35void die(char *s)
36{
37 perror(s);
38 exit(1);
39}
40
41int main(int argc, char *argv[])
42{
43 int fd_vmlinux, fd_initrd, fd_outfile;
44 FILHDR efile;
45 AOUTHDR eaout;
46 SCNHDR esecs[3];
47 struct stat st;
48 char buf[1024];
49 unsigned long loadaddr;
50 unsigned long initrd_header[2];
51 int i, cnt;
52 int swab = 0;
53
54 if (argc != 4) {
55 printf("Usage: %s <vmlinux> <initrd> <outfile>\n", argv[0]);
56 exit(1);
57 }
58
59 if ((fd_vmlinux = open (argv[1], O_RDONLY)) < 0)
60 die("open vmlinux");
61 if (read (fd_vmlinux, &efile, sizeof efile) != sizeof efile)
62 die("read file header");
63 if (read (fd_vmlinux, &eaout, sizeof eaout) != sizeof eaout)
64 die("read aout header");
65 if (read (fd_vmlinux, esecs, sizeof esecs) != sizeof esecs)
66 die("read section headers");
67 /*
68 * check whether the file is good for us
69 */
70 /* TBD */
71
72 /*
73 * check, if we have to swab words
74 */
75 if (ntohs(0xaa55) == 0xaa55) {
76 if (efile.f_magic == swab16(MIPSELMAGIC))
77 swab = 1;
78 } else {
79 if (efile.f_magic == swab16(MIPSEBMAGIC))
80 swab = 1;
81 }
82
83 /* make sure we have an empty data segment for the initrd */
84 if (eaout.dsize || esecs[1].s_size) {
85 fprintf(stderr, "Data segment not empty. Giving up!\n");
86 exit(1);
87 }
88 if ((fd_initrd = open (argv[2], O_RDONLY)) < 0)
89 die("open initrd");
90 if (fstat (fd_initrd, &st) < 0)
91 die("fstat initrd");
92 loadaddr = ((SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)
93 + MIPS_PAGE_SIZE-1) & ~MIPS_PAGE_MASK) - 8;
94 if (loadaddr < (SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)))
95 loadaddr += MIPS_PAGE_SIZE;
96 initrd_header[0] = SWAB(0x494E5244);
97 initrd_header[1] = SWAB(st.st_size);
98 eaout.dsize = esecs[1].s_size = initrd_header[1] = SWAB(st.st_size+8);
99 eaout.data_start = esecs[1].s_vaddr = esecs[1].s_paddr = SWAB(loadaddr);
100
101 if ((fd_outfile = open (argv[3], O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
102 die("open outfile");
103 if (write (fd_outfile, &efile, sizeof efile) != sizeof efile)
104 die("write file header");
105 if (write (fd_outfile, &eaout, sizeof eaout) != sizeof eaout)
106 die("write aout header");
107 if (write (fd_outfile, esecs, sizeof esecs) != sizeof esecs)
108 die("write section headers");
109 /* skip padding */
110 if(lseek(fd_vmlinux, SWAB(esecs[0].s_scnptr), SEEK_SET) == (off_t)-1)
111 die("lseek vmlinux");
112 if(lseek(fd_outfile, SWAB(esecs[0].s_scnptr), SEEK_SET) == (off_t)-1)
113 die("lseek outfile");
114 /* copy text segment */
115 cnt = SWAB(eaout.tsize);
116 while (cnt) {
117 if ((i = read (fd_vmlinux, buf, sizeof buf)) <= 0)
118 die("read vmlinux");
119 if (write (fd_outfile, buf, i) != i)
120 die("write vmlinux");
121 cnt -= i;
122 }
123 if (write (fd_outfile, initrd_header, sizeof initrd_header) != sizeof initrd_header)
124 die("write initrd header");
125 while ((i = read (fd_initrd, buf, sizeof buf)) > 0)
126 if (write (fd_outfile, buf, i) != i)
127 die("write initrd");
128 close(fd_vmlinux);
129 close(fd_initrd);
130 return 0;
131}
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
new file mode 100644
index 000000000000..e27f40bbd4e5
--- /dev/null
+++ b/arch/mips/boot/compressed/Makefile
@@ -0,0 +1,100 @@
1#
2# This file is subject to the terms and conditions of the GNU General Public
3# License.
4#
5# Adapted for MIPS Pete Popov, Dan Malek
6#
7# Copyright (C) 1994 by Linus Torvalds
8# Adapted for PowerPC by Gary Thomas
9# modified by Cort (cort@cs.nmt.edu)
10#
11# Copyright (C) 2009 Lemote Inc. & DSLab, Lanzhou University
12# Author: Wu Zhangjin <wuzj@lemote.com>
13#
14
15# compressed kernel load addr: VMLINUZ_LOAD_ADDRESS > VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE
16VMLINUX_SIZE := $(shell wc -c $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | cut -d' ' -f1)
17VMLINUX_SIZE := $(shell [ -n "$(VMLINUX_SIZE)" ] && echo $$(($(VMLINUX_SIZE) + (65536 - $(VMLINUX_SIZE) % 65536))))
18VMLINUZ_LOAD_ADDRESS := 0x$(shell [ -n "$(VMLINUX_SIZE)" ] && printf %x $$(($(VMLINUX_LOAD_ADDRESS) + $(VMLINUX_SIZE))))
19
20# set the default size of the mallocing area for decompressing
21BOOT_HEAP_SIZE := 0x400000
22
23# Disable Function Tracer
24KBUILD_CFLAGS := $(shell echo $(KBUILD_CFLAGS) | sed -e "s/-pg//")
25
26KBUILD_CFLAGS := $(LINUXINCLUDE) $(KBUILD_CFLAGS) -D__KERNEL__ \
27 -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" \
28
29KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
30 -DKERNEL_ENTRY=0x$(shell $(NM) $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | grep " kernel_entry" | cut -f1 -d \ ) \
31 -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE)
32
33obj-y := $(obj)/head.o $(obj)/decompress.o $(obj)/dbg.o
34
35obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
36
37OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S
38$(obj)/vmlinux.bin: $(KBUILD_IMAGE)
39 $(call if_changed,objcopy)
40
41suffix_$(CONFIG_KERNEL_GZIP) = gz
42suffix_$(CONFIG_KERNEL_BZIP2) = bz2
43suffix_$(CONFIG_KERNEL_LZMA) = lzma
44tool_$(CONFIG_KERNEL_GZIP) = gzip
45tool_$(CONFIG_KERNEL_BZIP2) = bzip2
46tool_$(CONFIG_KERNEL_LZMA) = lzma
47$(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin
48 $(call if_changed,$(tool_y))
49
50$(obj)/piggy.o: $(obj)/vmlinux.$(suffix_y) $(obj)/dummy.o
51 $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) \
52 --add-section=.image=$< \
53 --set-section-flags=.image=contents,alloc,load,readonly,data \
54 $(obj)/dummy.o $@
55
56LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T
57vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o
58 $(call if_changed,ld)
59 $(Q)$(OBJCOPY) $(OBJCOPYFLAGS) -R .comment -R .stab -R .stabstr -R .initrd -R .sysmap $@
60
61#
62# Some DECstations need all possible sections of an ECOFF executable
63#
64ifdef CONFIG_MACH_DECSTATION
65 E2EFLAGS = -a
66else
67 E2EFLAGS =
68endif
69
70# elf2ecoff can only handle 32bit image
71
72ifdef CONFIG_32BIT
73 VMLINUZ = vmlinuz
74else
75 VMLINUZ = vmlinuz.32
76endif
77
78vmlinuz.32: vmlinuz
79 $(Q)$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
80
81vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ)
82 $(Q)$(obj)/../elf2ecoff $(VMLINUZ) vmlinuz.ecoff $(E2EFLAGS)
83
84$(obj)/../elf2ecoff: $(src)/../elf2ecoff.c
85 $(Q)$(HOSTCC) -o $@ $^
86
87drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options
88strip-flags = $(addprefix --remove-section=,$(drop-sections))
89
90OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary $(strip-flags)
91vmlinuz.bin: vmlinuz
92 $(call if_changed,objcopy)
93
94OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec $(strip-flags)
95vmlinuz.srec: vmlinuz
96 $(call if_changed,objcopy)
97
98clean:
99clean-files += *.o \
100 vmlinu*
diff --git a/arch/mips/boot/compressed/dbg.c b/arch/mips/boot/compressed/dbg.c
new file mode 100644
index 000000000000..ff4dc7a33a9f
--- /dev/null
+++ b/arch/mips/boot/compressed/dbg.c
@@ -0,0 +1,37 @@
1/*
2 * MIPS-specific debug support for pre-boot environment
3 *
4 * NOTE: putc() is board specific, if your board have a 16550 compatible uart,
5 * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you
6 * need to implement your own putc().
7 */
8
9#include <linux/init.h>
10#include <linux/types.h>
11
12void __attribute__ ((weak)) putc(char c)
13{
14}
15
16void puts(const char *s)
17{
18 char c;
19 while ((c = *s++) != '\0') {
20 putc(c);
21 if (c == '\n')
22 putc('\r');
23 }
24}
25
26void puthex(unsigned long long val)
27{
28
29 unsigned char buf[10];
30 int i;
31 for (i = 7; i >= 0; i--) {
32 buf[i] = "0123456789ABCDEF"[val & 0x0F];
33 val >>= 4;
34 }
35 buf[8] = '\0';
36 puts(buf);
37}
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c
new file mode 100644
index 000000000000..67330c2f7318
--- /dev/null
+++ b/arch/mips/boot/compressed/decompress.c
@@ -0,0 +1,126 @@
1/*
2 * Misc. bootloader code for many machines.
3 *
4 * Copyright 2001 MontaVista Software Inc.
5 * Author: Matt Porter <mporter@mvista.com> Derived from
6 * arch/ppc/boot/prep/misc.c
7 *
8 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology
9 * Author: Wu Zhangjin <wuzj@lemote.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17#include <linux/types.h>
18#include <linux/kernel.h>
19
20#include <asm/addrspace.h>
21
22/* These two variables specify the free mem region
23 * that can be used for temporary malloc area
24 */
25unsigned long free_mem_ptr;
26unsigned long free_mem_end_ptr;
27char *zimage_start;
28
29/* The linker tells us where the image is. */
30extern unsigned char __image_begin, __image_end;
31extern unsigned char __ramdisk_begin, __ramdisk_end;
32unsigned long initrd_size;
33
34/* debug interfaces */
35extern void puts(const char *s);
36extern void puthex(unsigned long long val);
37
38void error(char *x)
39{
40 puts("\n\n");
41 puts(x);
42 puts("\n\n -- System halted");
43
44 while (1)
45 ; /* Halt */
46}
47
48/* activate the code for pre-boot environment */
49#define STATIC static
50
51#ifdef CONFIG_KERNEL_GZIP
52void *memcpy(void *dest, const void *src, size_t n)
53{
54 int i;
55 const char *s = src;
56 char *d = dest;
57
58 for (i = 0; i < n; i++)
59 d[i] = s[i];
60 return dest;
61}
62#include "../../../../lib/decompress_inflate.c"
63#endif
64
65#ifdef CONFIG_KERNEL_BZIP2
66void *memset(void *s, int c, size_t n)
67{
68 int i;
69 char *ss = s;
70
71 for (i = 0; i < n; i++)
72 ss[i] = c;
73 return s;
74}
75#include "../../../../lib/decompress_bunzip2.c"
76#endif
77
78#ifdef CONFIG_KERNEL_LZMA
79#include "../../../../lib/decompress_unlzma.c"
80#endif
81
82void decompress_kernel(unsigned long boot_heap_start)
83{
84 int zimage_size;
85
86 /*
87 * We link ourself to an arbitrary low address. When we run, we
88 * relocate outself to that address. __image_beign points to
89 * the part of the image where the zImage is. -- Tom
90 */
91 zimage_start = (char *)(unsigned long)(&__image_begin);
92 zimage_size = (unsigned long)(&__image_end) -
93 (unsigned long)(&__image_begin);
94
95 /*
96 * The zImage and initrd will be between start and _end, so they've
97 * already been moved once. We're good to go now. -- Tom
98 */
99 puts("zimage at: ");
100 puthex((unsigned long)zimage_start);
101 puts(" ");
102 puthex((unsigned long)(zimage_size + zimage_start));
103 puts("\n");
104
105 if (initrd_size) {
106 puts("initrd at: ");
107 puthex((unsigned long)(&__ramdisk_begin));
108 puts(" ");
109 puthex((unsigned long)(&__ramdisk_end));
110 puts("\n");
111 }
112
113 /* this area are prepared for mallocing when decompressing */
114 free_mem_ptr = boot_heap_start;
115 free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE;
116
117 /* Display standard Linux/MIPS boot prompt for kernel args */
118 puts("Uncompressing Linux at load address ");
119 puthex(VMLINUX_LOAD_ADDRESS_ULL);
120 puts("\n");
121 /* Decompress the kernel with according algorithm */
122 decompress(zimage_start, zimage_size, 0, 0,
123 (void *)VMLINUX_LOAD_ADDRESS_ULL, 0, error);
124 /* FIXME: is there a need to flush cache here? */
125 puts("Now, booting the kernel...\n");
126}
diff --git a/arch/mips/boot/compressed/dummy.c b/arch/mips/boot/compressed/dummy.c
new file mode 100644
index 000000000000..31dbf45bf99c
--- /dev/null
+++ b/arch/mips/boot/compressed/dummy.c
@@ -0,0 +1,4 @@
1int main(void)
2{
3 return 0;
4}
diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S
new file mode 100644
index 000000000000..4e65a8420bee
--- /dev/null
+++ b/arch/mips/boot/compressed/head.S
@@ -0,0 +1,56 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994, 1995 Waldorf Electronics
7 * Written by Ralf Baechle and Andreas Busse
8 * Copyright (C) 1995 - 1999 Ralf Baechle
9 * Copyright (C) 1996 Paul M. Antoine
10 * Modified for DECStation and hence R3000 support by Paul M. Antoine
11 * Further modifications by David S. Miller and Harald Koerfgen
12 * Copyright (C) 1999 Silicon Graphics, Inc.
13 */
14
15#include <asm/asm.h>
16#include <asm/regdef.h>
17
18 .set noreorder
19 .cprestore
20 LEAF(start)
21start:
22 /* Save boot rom start args */
23 move s0, a0
24 move s1, a1
25 move s2, a2
26 move s3, a3
27
28 /* Clear BSS */
29 PTR_LA a0, _edata
30 PTR_LA a2, _end
311: sw zero, 0(a0)
32 bne a2, a0, 1b
33 addiu a0, a0, 4
34
35 PTR_LA a0, (.heap) /* heap address */
36 PTR_LA sp, (.stack + 8192) /* stack address */
37
38 PTR_LA ra, 2f
39 PTR_LA k0, decompress_kernel
40 jr k0
41 nop
422:
43 move a0, s0
44 move a1, s1
45 move a2, s2
46 move a3, s3
47 PTR_LI k0, KERNEL_ENTRY
48 jr k0
49 nop
503:
51 b 3b
52 nop
53 END(start)
54
55 .comm .heap,BOOT_HEAP_SIZE,4
56 .comm .stack,4096*2,4
diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script
new file mode 100644
index 000000000000..29e9f4c0d5d8
--- /dev/null
+++ b/arch/mips/boot/compressed/ld.script
@@ -0,0 +1,150 @@
1OUTPUT_ARCH(mips)
2ENTRY(start)
3SECTIONS
4{
5 /* Read-only sections, merged into text segment: */
6 .init : { *(.init) } =0
7 .text :
8 {
9 _ftext = . ;
10 *(.text)
11 *(.rodata)
12 *(.rodata1)
13 /* .gnu.warning sections are handled specially by elf32.em. */
14 *(.gnu.warning)
15 } =0
16 .kstrtab : { *(.kstrtab) }
17
18 . = ALIGN(16); /* Exception table */
19 __start___ex_table = .;
20 __ex_table : { *(__ex_table) }
21 __stop___ex_table = .;
22
23 __start___dbe_table = .; /* Exception table for data bus errors */
24 __dbe_table : { *(__dbe_table) }
25 __stop___dbe_table = .;
26
27 __start___ksymtab = .; /* Kernel symbol table */
28 __ksymtab : { *(__ksymtab) }
29 __stop___ksymtab = .;
30
31 _etext = .;
32
33 . = ALIGN(8192);
34 .data.init_task : { *(.data.init_task) }
35
36 /* Startup code */
37 . = ALIGN(4096);
38 __init_begin = .;
39 .text.init : { *(.text.init) }
40 .data.init : { *(.data.init) }
41 . = ALIGN(16);
42 __setup_start = .;
43 .setup.init : { *(.setup.init) }
44 __setup_end = .;
45 __initcall_start = .;
46 .initcall.init : { *(.initcall.init) }
47 __initcall_end = .;
48 . = ALIGN(4096); /* Align double page for init_task_union */
49 __init_end = .;
50
51 . = ALIGN(4096);
52 .data.page_aligned : { *(.data.idt) }
53
54 . = ALIGN(32);
55 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
56
57 .fini : { *(.fini) } =0
58 .reginfo : { *(.reginfo) }
59 /* Adjust the address for the data segment. We want to adjust up to
60 the same address within the page on the next page up. It would
61 be more correct to do this:
62 . = .;
63 The current expression does not correctly handle the case of a
64 text segment ending precisely at the end of a page; it causes the
65 data segment to skip a page. The above expression does not have
66 this problem, but it will currently (2/95) cause BFD to allocate
67 a single segment, combining both text and data, for this case.
68 This will prevent the text segment from being shared among
69 multiple executions of the program; I think that is more
70 important than losing a page of the virtual address space (note
71 that no actual memory is lost; the page which is skipped can not
72 be referenced). */
73 . = .;
74 .data :
75 {
76 _fdata = . ;
77 *(.data)
78
79 /* Put the compressed image here, so bss is on the end. */
80 __image_begin = .;
81 *(.image)
82 __image_end = .;
83 /* Align the initial ramdisk image (INITRD) on page boundaries. */
84 . = ALIGN(4096);
85 __ramdisk_begin = .;
86 *(.initrd)
87 __ramdisk_end = .;
88 . = ALIGN(4096);
89
90 CONSTRUCTORS
91 }
92 .data1 : { *(.data1) }
93 _gp = . + 0x8000;
94 .lit8 : { *(.lit8) }
95 .lit4 : { *(.lit4) }
96 .ctors : { *(.ctors) }
97 .dtors : { *(.dtors) }
98 .got : { *(.got.plt) *(.got) }
99 .dynamic : { *(.dynamic) }
100 /* We want the small data sections together, so single-instruction offsets
101 can access them all, and initialized data all before uninitialized, so
102 we can shorten the on-disk segment size. */
103 .sdata : { *(.sdata) }
104 . = ALIGN(4);
105 _edata = .;
106 PROVIDE (edata = .);
107
108 __bss_start = .;
109 _fbss = .;
110 .sbss : { *(.sbss) *(.scommon) }
111 .bss :
112 {
113 *(.dynbss)
114 *(.bss)
115 *(COMMON)
116 . = ALIGN(4);
117 _end = . ;
118 PROVIDE (end = .);
119 }
120
121 /* Sections to be discarded */
122 /DISCARD/ :
123 {
124 *(.text.exit)
125 *(.data.exit)
126 *(.exitcall.exit)
127 }
128
129 /* This is the MIPS specific mdebug section. */
130 .mdebug : { *(.mdebug) }
131 /* These are needed for ELF backends which have not yet been
132 converted to the new style linker. */
133 .stab 0 : { *(.stab) }
134 .stabstr 0 : { *(.stabstr) }
135 /* DWARF debug sections.
136 Symbols in the .debug DWARF section are relative to the beginning of the
137 section so we begin .debug at 0. It's not clear yet what needs to happen
138 for the others. */
139 .debug 0 : { *(.debug) }
140 .debug_srcinfo 0 : { *(.debug_srcinfo) }
141 .debug_aranges 0 : { *(.debug_aranges) }
142 .debug_pubnames 0 : { *(.debug_pubnames) }
143 .debug_sfnames 0 : { *(.debug_sfnames) }
144 .line 0 : { *(.line) }
145 /* These must appear regardless of . */
146 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
147 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
148 .comment : { *(.comment) }
149 .note : { *(.note) }
150}
diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c
new file mode 100644
index 000000000000..c9caaf4fbf60
--- /dev/null
+++ b/arch/mips/boot/compressed/uart-16550.c
@@ -0,0 +1,43 @@
1/*
2 * 16550 compatible uart based serial debug support for zboot
3 */
4
5#include <linux/types.h>
6#include <linux/serial_reg.h>
7#include <linux/init.h>
8
9#include <asm/addrspace.h>
10
11#if defined(CONFIG_MACH_LOONGSON) || defined(CONFIG_MIPS_MALTA)
12#define UART_BASE 0x1fd003f8
13#define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
14#endif
15
16#ifdef CONFIG_AR7
17#include <ar7.h>
18#define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
19#endif
20
21#ifndef PORT
22#error please define the serial port address for your own machine
23#endif
24
25static inline unsigned int serial_in(int offset)
26{
27 return *((char *)PORT(offset));
28}
29
30static inline void serial_out(int offset, int value)
31{
32 *((char *)PORT(offset)) = value;
33}
34
35void putc(char c)
36{
37 int timeout = 1024;
38
39 while (((serial_in(UART_LSR) & UART_LSR_THRE) == 0) && (timeout-- > 0))
40 ;
41
42 serial_out(UART_TX, c);
43}
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile
index 139436280520..3e9876317e61 100644
--- a/arch/mips/cavium-octeon/Makefile
+++ b/arch/mips/cavium-octeon/Makefile
@@ -9,7 +9,7 @@
9# Copyright (C) 2005-2009 Cavium Networks 9# Copyright (C) 2005-2009 Cavium Networks
10# 10#
11 11
12obj-y := setup.o serial.o octeon-platform.o octeon-irq.o csrc-octeon.o 12obj-y := cpu.o setup.o serial.o octeon-platform.o octeon-irq.o csrc-octeon.o
13obj-y += dma-octeon.o flash_setup.o 13obj-y += dma-octeon.o flash_setup.o
14obj-y += octeon-memcpy.o 14obj-y += octeon-memcpy.o
15 15
diff --git a/arch/mips/cavium-octeon/cpu.c b/arch/mips/cavium-octeon/cpu.c
new file mode 100644
index 000000000000..b6df5387e855
--- /dev/null
+++ b/arch/mips/cavium-octeon/cpu.c
@@ -0,0 +1,52 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2009 Wind River Systems,
7 * written by Ralf Baechle <ralf@linux-mips.org>
8 */
9#include <linux/init.h>
10#include <linux/irqflags.h>
11#include <linux/notifier.h>
12#include <linux/prefetch.h>
13#include <linux/sched.h>
14
15#include <asm/cop2.h>
16#include <asm/current.h>
17#include <asm/mipsregs.h>
18#include <asm/page.h>
19#include <asm/octeon/octeon.h>
20
21static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action,
22 void *data)
23{
24 unsigned long flags;
25 unsigned int status;
26
27 switch (action) {
28 case CU2_EXCEPTION:
29 prefetch(&current->thread.cp2);
30 local_irq_save(flags);
31 KSTK_STATUS(current) |= ST0_CU2;
32 status = read_c0_status();
33 write_c0_status(status | ST0_CU2);
34 octeon_cop2_restore(&(current->thread.cp2));
35 write_c0_status(status & ~ST0_CU2);
36 local_irq_restore(flags);
37
38 return NOTIFY_BAD; /* Don't call default notifier */
39 }
40
41 return NOTIFY_OK; /* Let default notifier send signals */
42}
43
44static struct notifier_block cnmips_cu2_notifier = {
45 .notifier_call = cnmips_cu2_call,
46};
47
48static int cnmips_cu2_setup(void)
49{
50 return register_cu2_notifier(&cnmips_cu2_notifier);
51}
52early_initcall(cnmips_cu2_setup);
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index be711dd2d918..cfdb4c2ac5c3 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -159,6 +159,94 @@ out:
159} 159}
160device_initcall(octeon_rng_device_init); 160device_initcall(octeon_rng_device_init);
161 161
162/* Octeon SMI/MDIO interface. */
163static int __init octeon_mdiobus_device_init(void)
164{
165 struct platform_device *pd;
166 int ret = 0;
167
168 if (octeon_is_simulation())
169 return 0; /* No mdio in the simulator. */
170
171 /* The bus number is the platform_device id. */
172 pd = platform_device_alloc("mdio-octeon", 0);
173 if (!pd) {
174 ret = -ENOMEM;
175 goto out;
176 }
177
178 ret = platform_device_add(pd);
179 if (ret)
180 goto fail;
181
182 return ret;
183fail:
184 platform_device_put(pd);
185
186out:
187 return ret;
188
189}
190device_initcall(octeon_mdiobus_device_init);
191
192/* Octeon mgmt port Ethernet interface. */
193static int __init octeon_mgmt_device_init(void)
194{
195 struct platform_device *pd;
196 int ret = 0;
197 int port, num_ports;
198
199 struct resource mgmt_port_resource = {
200 .flags = IORESOURCE_IRQ,
201 .start = -1,
202 .end = -1
203 };
204
205 if (!OCTEON_IS_MODEL(OCTEON_CN56XX) && !OCTEON_IS_MODEL(OCTEON_CN52XX))
206 return 0;
207
208 if (OCTEON_IS_MODEL(OCTEON_CN56XX))
209 num_ports = 1;
210 else
211 num_ports = 2;
212
213 for (port = 0; port < num_ports; port++) {
214 pd = platform_device_alloc("octeon_mgmt", port);
215 if (!pd) {
216 ret = -ENOMEM;
217 goto out;
218 }
219 switch (port) {
220 case 0:
221 mgmt_port_resource.start = OCTEON_IRQ_MII0;
222 break;
223 case 1:
224 mgmt_port_resource.start = OCTEON_IRQ_MII1;
225 break;
226 default:
227 BUG();
228 }
229 mgmt_port_resource.end = mgmt_port_resource.start;
230
231 ret = platform_device_add_resources(pd, &mgmt_port_resource, 1);
232
233 if (ret)
234 goto fail;
235
236 ret = platform_device_add(pd);
237 if (ret)
238 goto fail;
239 }
240 return ret;
241fail:
242 platform_device_put(pd);
243
244out:
245 return ret;
246
247}
248device_initcall(octeon_mgmt_device_init);
249
162MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>"); 250MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>");
163MODULE_LICENSE("GPL"); 251MODULE_LICENSE("GPL");
164MODULE_DESCRIPTION("Platform driver for Octeon SOC"); 252MODULE_DESCRIPTION("Platform driver for Octeon SOC");
diff --git a/arch/mips/configs/ar7_defconfig b/arch/mips/configs/ar7_defconfig
index 35648302f7cc..5a5b6ba7514e 100644
--- a/arch/mips/configs/ar7_defconfig
+++ b/arch/mips/configs/ar7_defconfig
@@ -10,7 +10,6 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12CONFIG_AR7=y 12CONFIG_AR7=y
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_BCM47XX is not set 13# CONFIG_BCM47XX is not set
15# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
@@ -265,7 +264,6 @@ CONFIG_DEFAULT_DEADLINE=y
265# CONFIG_DEFAULT_CFQ is not set 264# CONFIG_DEFAULT_CFQ is not set
266# CONFIG_DEFAULT_NOOP is not set 265# CONFIG_DEFAULT_NOOP is not set
267CONFIG_DEFAULT_IOSCHED="deadline" 266CONFIG_DEFAULT_IOSCHED="deadline"
268CONFIG_PROBE_INITRD_HEADER=y
269# CONFIG_FREEZER is not set 267# CONFIG_FREEZER is not set
270 268
271# 269#
@@ -1053,7 +1051,9 @@ CONFIG_TRACING_SUPPORT=y
1053# CONFIG_DYNAMIC_DEBUG is not set 1051# CONFIG_DYNAMIC_DEBUG is not set
1054# CONFIG_SAMPLES is not set 1052# CONFIG_SAMPLES is not set
1055CONFIG_HAVE_ARCH_KGDB=y 1053CONFIG_HAVE_ARCH_KGDB=y
1054CONFIG_CMDLINE_BOOL=y
1056CONFIG_CMDLINE="rootfstype=squashfs,jffs2" 1055CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
1056# CONFIG_CMDLINE_OVERRIDE is not set
1057 1057
1058# 1058#
1059# Security options 1059# Security options
diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig
index 94b7d57f906d..267bd46120bc 100644
--- a/arch/mips/configs/bcm47xx_defconfig
+++ b/arch/mips/configs/bcm47xx_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13CONFIG_BCM47XX=y 12CONFIG_BCM47XX=y
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1853,7 +1852,7 @@ CONFIG_DEBUG_FS=y
1853# CONFIG_HEADERS_CHECK is not set 1852# CONFIG_HEADERS_CHECK is not set
1854# CONFIG_DEBUG_KERNEL is not set 1853# CONFIG_DEBUG_KERNEL is not set
1855# CONFIG_SAMPLES is not set 1854# CONFIG_SAMPLES is not set
1856CONFIG_CMDLINE="" 1855# CONFIG_CMDLINE_BOOL is not set
1857 1856
1858# 1857#
1859# Security options 1858# Security options
diff --git a/arch/mips/configs/bcm63xx_defconfig b/arch/mips/configs/bcm63xx_defconfig
index ea00c18d1f7b..7fee0273c829 100644
--- a/arch/mips/configs/bcm63xx_defconfig
+++ b/arch/mips/configs/bcm63xx_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14CONFIG_BCM63XX=y 13CONFIG_BCM63XX=y
15# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
@@ -942,7 +941,9 @@ CONFIG_TRACING_SUPPORT=y
942# CONFIG_BLK_DEV_IO_TRACE is not set 941# CONFIG_BLK_DEV_IO_TRACE is not set
943# CONFIG_SAMPLES is not set 942# CONFIG_SAMPLES is not set
944CONFIG_HAVE_ARCH_KGDB=y 943CONFIG_HAVE_ARCH_KGDB=y
944CONFIG_CMDLINE_BOOL=y
945CONFIG_CMDLINE="console=ttyS0,115200" 945CONFIG_CMDLINE="console=ttyS0,115200"
946# CONFIG_CMDLINE_OVERRIDE is not set
946 947
947# 948#
948# Security options 949# Security options
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index 13d9eb4736c0..c2f06e38c854 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1237,7 +1236,7 @@ CONFIG_DEBUG_MUTEXES=y
1237# CONFIG_BACKTRACE_SELF_TEST is not set 1236# CONFIG_BACKTRACE_SELF_TEST is not set
1238# CONFIG_FAULT_INJECTION is not set 1237# CONFIG_FAULT_INJECTION is not set
1239# CONFIG_SAMPLES is not set 1238# CONFIG_SAMPLES is not set
1240CONFIG_CMDLINE="" 1239# CONFIG_CMDLINE_BOOL is not set
1241# CONFIG_DEBUG_STACK_USAGE is not set 1240# CONFIG_DEBUG_STACK_USAGE is not set
1242# CONFIG_SB1XXX_CORELIS is not set 1241# CONFIG_SB1XXX_CORELIS is not set
1243# CONFIG_RUNTIME_DEBUG is not set 1242# CONFIG_RUNTIME_DEBUG is not set
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig
index 185df23fd460..72b7e456916e 100644
--- a/arch/mips/configs/capcella_defconfig
+++ b/arch/mips/configs/capcella_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -783,7 +782,9 @@ CONFIG_ENABLE_MUST_CHECK=y
783# CONFIG_HEADERS_CHECK is not set 782# CONFIG_HEADERS_CHECK is not set
784# CONFIG_DEBUG_KERNEL is not set 783# CONFIG_DEBUG_KERNEL is not set
785CONFIG_CROSSCOMPILE=y 784CONFIG_CROSSCOMPILE=y
785CONFIG_CMDLINE_BOOL=y
786CONFIG_CMDLINE="mem=32M console=ttyVR0,38400" 786CONFIG_CMDLINE="mem=32M console=ttyVR0,38400"
787# CONFIG_CMDLINE_OVERRIDE is not set
787 788
788# 789#
789# Security options 790# Security options
diff --git a/arch/mips/configs/cavium-octeon_defconfig b/arch/mips/configs/cavium-octeon_defconfig
index 7afaa28a3768..c8507bc8e925 100644
--- a/arch/mips/configs/cavium-octeon_defconfig
+++ b/arch/mips/configs/cavium-octeon_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -269,7 +268,6 @@ CONFIG_DEFAULT_CFQ=y
269# CONFIG_DEFAULT_NOOP is not set 268# CONFIG_DEFAULT_NOOP is not set
270CONFIG_DEFAULT_IOSCHED="cfq" 269CONFIG_DEFAULT_IOSCHED="cfq"
271CONFIG_CLASSIC_RCU=y 270CONFIG_CLASSIC_RCU=y
272# CONFIG_PROBE_INITRD_HEADER is not set
273# CONFIG_FREEZER is not set 271# CONFIG_FREEZER is not set
274 272
275# 273#
@@ -822,7 +820,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
822# CONFIG_SAMPLES is not set 820# CONFIG_SAMPLES is not set
823CONFIG_HAVE_ARCH_KGDB=y 821CONFIG_HAVE_ARCH_KGDB=y
824# CONFIG_KGDB is not set 822# CONFIG_KGDB is not set
825CONFIG_CMDLINE="" 823# CONFIG_CMDLINE_BOOL is not set
826# CONFIG_DEBUG_STACK_USAGE is not set 824# CONFIG_DEBUG_STACK_USAGE is not set
827# CONFIG_RUNTIME_DEBUG is not set 825# CONFIG_RUNTIME_DEBUG is not set
828 826
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index 6c8cca8589ba..49e61312e006 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14CONFIG_MIPS_COBALT=y 13CONFIG_MIPS_COBALT=y
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1126,7 +1125,7 @@ CONFIG_FRAME_WARN=1024
1126# CONFIG_SLUB_STATS is not set 1125# CONFIG_SLUB_STATS is not set
1127# CONFIG_DEBUG_MEMORY_INIT is not set 1126# CONFIG_DEBUG_MEMORY_INIT is not set
1128# CONFIG_SAMPLES is not set 1127# CONFIG_SAMPLES is not set
1129CONFIG_CMDLINE="" 1128# CONFIG_CMDLINE_BOOL is not set
1130 1129
1131# 1130#
1132# Security options 1131# Security options
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig
index dbdf3bb1a34a..68e90cd6b2d4 100644
--- a/arch/mips/configs/db1000_defconfig
+++ b/arch/mips/configs/db1000_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_DB1000=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1090,7 +1089,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1090# CONFIG_DEBUG_KERNEL is not set 1089# CONFIG_DEBUG_KERNEL is not set
1091CONFIG_LOG_BUF_SHIFT=14 1090CONFIG_LOG_BUF_SHIFT=14
1092CONFIG_CROSSCOMPILE=y 1091CONFIG_CROSSCOMPILE=y
1093CONFIG_CMDLINE="" 1092# CONFIG_CMDLINE_BOOL is not set
1094 1093
1095# 1094#
1096# Security options 1095# Security options
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig
index fa6814475898..90812830e940 100644
--- a/arch/mips/configs/db1100_defconfig
+++ b/arch/mips/configs/db1100_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_DB1100=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1090,7 +1089,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1090# CONFIG_DEBUG_KERNEL is not set 1089# CONFIG_DEBUG_KERNEL is not set
1091CONFIG_LOG_BUF_SHIFT=14 1090CONFIG_LOG_BUF_SHIFT=14
1092CONFIG_CROSSCOMPILE=y 1091CONFIG_CROSSCOMPILE=y
1093CONFIG_CMDLINE="" 1092# CONFIG_CMDLINE_BOOL is not set
1094 1093
1095# 1094#
1096# Security options 1095# Security options
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig
index d73f1de43b5d..dabf03032e06 100644
--- a/arch/mips/configs/db1200_defconfig
+++ b/arch/mips/configs/db1200_defconfig
@@ -23,7 +23,6 @@ CONFIG_MACH_ALCHEMY=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24CONFIG_MIPS_DB1200=y 24CONFIG_MIPS_DB1200=y
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1172,7 +1171,9 @@ CONFIG_ENABLE_MUST_CHECK=y
1172# CONFIG_DEBUG_KERNEL is not set 1171# CONFIG_DEBUG_KERNEL is not set
1173CONFIG_LOG_BUF_SHIFT=14 1172CONFIG_LOG_BUF_SHIFT=14
1174CONFIG_CROSSCOMPILE=y 1173CONFIG_CROSSCOMPILE=y
1174CONFIG_CMDLINE_BOOL=y
1175CONFIG_CMDLINE="mem=48M" 1175CONFIG_CMDLINE="mem=48M"
1176# CONFIG_CMDLINE_OVERRIDE is not set
1176 1177
1177# 1178#
1178# Security options 1179# Security options
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig
index ec3e028a5b2e..a15131373138 100644
--- a/arch/mips/configs/db1500_defconfig
+++ b/arch/mips/configs/db1500_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_DB1500=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1390,7 +1389,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1390# CONFIG_DEBUG_KERNEL is not set 1389# CONFIG_DEBUG_KERNEL is not set
1391CONFIG_LOG_BUF_SHIFT=14 1390CONFIG_LOG_BUF_SHIFT=14
1392CONFIG_CROSSCOMPILE=y 1391CONFIG_CROSSCOMPILE=y
1393CONFIG_CMDLINE="" 1392# CONFIG_CMDLINE_BOOL is not set
1394 1393
1395# 1394#
1396# Security options 1395# Security options
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig
index 7631dae51be9..6b64339c0014 100644
--- a/arch/mips/configs/db1550_defconfig
+++ b/arch/mips/configs/db1550_defconfig
@@ -23,7 +23,6 @@ CONFIG_MACH_ALCHEMY=y
23CONFIG_MIPS_DB1550=y 23CONFIG_MIPS_DB1550=y
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1207,7 +1206,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1207# CONFIG_DEBUG_KERNEL is not set 1206# CONFIG_DEBUG_KERNEL is not set
1208CONFIG_LOG_BUF_SHIFT=14 1207CONFIG_LOG_BUF_SHIFT=14
1209CONFIG_CROSSCOMPILE=y 1208CONFIG_CROSSCOMPILE=y
1210CONFIG_CMDLINE="" 1209# CONFIG_CMDLINE_BOOL is not set
1211 1210
1212# 1211#
1213# Security options 1212# Security options
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig
index 9e65e6a2dcb3..cbb4d86f2912 100644
--- a/arch/mips/configs/decstation_defconfig
+++ b/arch/mips/configs/decstation_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27CONFIG_MACH_DECSTATION=y 26CONFIG_MACH_DECSTATION=y
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -882,7 +881,7 @@ CONFIG_MAGIC_SYSRQ=y
882# CONFIG_DEBUG_KERNEL is not set 881# CONFIG_DEBUG_KERNEL is not set
883CONFIG_LOG_BUF_SHIFT=14 882CONFIG_LOG_BUF_SHIFT=14
884CONFIG_CROSSCOMPILE=y 883CONFIG_CROSSCOMPILE=y
885CONFIG_CMDLINE="" 884# CONFIG_CMDLINE_BOOL is not set
886 885
887# 886#
888# Security options 887# Security options
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig
index 1bd84d42b14f..52968c46c806 100644
--- a/arch/mips/configs/e55_defconfig
+++ b/arch/mips/configs/e55_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -561,7 +560,9 @@ CONFIG_ENABLE_MUST_CHECK=y
561# CONFIG_HEADERS_CHECK is not set 560# CONFIG_HEADERS_CHECK is not set
562# CONFIG_DEBUG_KERNEL is not set 561# CONFIG_DEBUG_KERNEL is not set
563CONFIG_CROSSCOMPILE=y 562CONFIG_CROSSCOMPILE=y
563CONFIG_CMDLINE_BOOL=y
564CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M" 564CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x1f0,0x3f6,40 mem=8M"
565# CONFIG_CMDLINE_OVERRIDE is not set
565 566
566# 567#
567# Security options 568# Security options
diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig
deleted file mode 100644
index 1995d43a2ed1..000000000000
--- a/arch/mips/configs/excite_defconfig
+++ /dev/null
@@ -1,1335 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Tue Feb 20 21:47:31 2007
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11CONFIG_ZONE_DMA=y
12# CONFIG_MIPS_MTX1 is not set
13# CONFIG_MIPS_BOSPORUS is not set
14# CONFIG_MIPS_PB1000 is not set
15# CONFIG_MIPS_PB1100 is not set
16# CONFIG_MIPS_PB1500 is not set
17# CONFIG_MIPS_PB1550 is not set
18# CONFIG_MIPS_PB1200 is not set
19# CONFIG_MIPS_DB1000 is not set
20# CONFIG_MIPS_DB1100 is not set
21# CONFIG_MIPS_DB1500 is not set
22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set
25CONFIG_BASLER_EXCITE=y
26# CONFIG_BASLER_EXCITE_PROTOTYPE is not set
27# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set
30# CONFIG_MIPS_MALTA is not set
31# CONFIG_WR_PPMC is not set
32# CONFIG_MIPS_SIM is not set
33# CONFIG_MOMENCO_JAGUAR_ATX is not set
34# CONFIG_MIPS_XXS1500 is not set
35# CONFIG_PNX8550_JBS is not set
36# CONFIG_PNX8550_STB810 is not set
37# CONFIG_MACH_VR41XX is not set
38# CONFIG_PMC_YOSEMITE is not set
39# CONFIG_MARKEINS is not set
40# CONFIG_SGI_IP22 is not set
41# CONFIG_SGI_IP27 is not set
42# CONFIG_SGI_IP32 is not set
43# CONFIG_SIBYTE_BIGSUR is not set
44# CONFIG_SIBYTE_SWARM is not set
45# CONFIG_SIBYTE_SENTOSA is not set
46# CONFIG_SIBYTE_RHONE is not set
47# CONFIG_SIBYTE_CARMEL is not set
48# CONFIG_SIBYTE_LITTLESUR is not set
49# CONFIG_SIBYTE_CRHINE is not set
50# CONFIG_SIBYTE_CRHONE is not set
51# CONFIG_SNI_RM is not set
52# CONFIG_TOSHIBA_JMR3927 is not set
53# CONFIG_TOSHIBA_RBTX4927 is not set
54# CONFIG_TOSHIBA_RBTX4938 is not set
55CONFIG_RWSEM_GENERIC_SPINLOCK=y
56# CONFIG_ARCH_HAS_ILOG2_U32 is not set
57# CONFIG_ARCH_HAS_ILOG2_U64 is not set
58CONFIG_GENERIC_FIND_NEXT_BIT=y
59CONFIG_GENERIC_HWEIGHT=y
60CONFIG_GENERIC_CALIBRATE_DELAY=y
61CONFIG_GENERIC_TIME=y
62CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
63# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
64CONFIG_DMA_COHERENT=y
65CONFIG_CPU_BIG_ENDIAN=y
66# CONFIG_CPU_LITTLE_ENDIAN is not set
67CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
68CONFIG_IRQ_CPU=y
69CONFIG_IRQ_CPU_RM7K=y
70CONFIG_IRQ_CPU_RM9K=y
71CONFIG_MIPS_RM9122=y
72CONFIG_SERIAL_RM9000=y
73CONFIG_GPI_RM9000=y
74CONFIG_WDT_RM9000=y
75CONFIG_MIPS_L1_CACHE_SHIFT=5
76
77#
78# CPU selection
79#
80# CONFIG_CPU_MIPS32_R1 is not set
81# CONFIG_CPU_MIPS32_R2 is not set
82# CONFIG_CPU_MIPS64_R1 is not set
83# CONFIG_CPU_MIPS64_R2 is not set
84# CONFIG_CPU_R3000 is not set
85# CONFIG_CPU_TX39XX is not set
86# CONFIG_CPU_VR41XX is not set
87# CONFIG_CPU_R4300 is not set
88# CONFIG_CPU_R4X00 is not set
89# CONFIG_CPU_TX49XX is not set
90# CONFIG_CPU_R5000 is not set
91# CONFIG_CPU_R5432 is not set
92# CONFIG_CPU_R6000 is not set
93# CONFIG_CPU_NEVADA is not set
94# CONFIG_CPU_R8000 is not set
95# CONFIG_CPU_R10000 is not set
96# CONFIG_CPU_RM7000 is not set
97CONFIG_CPU_RM9000=y
98# CONFIG_CPU_SB1 is not set
99CONFIG_SYS_HAS_CPU_RM9000=y
100CONFIG_WEAK_ORDERING=y
101CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
102CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
103CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
104CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
105
106#
107# Kernel type
108#
109CONFIG_32BIT=y
110# CONFIG_64BIT is not set
111CONFIG_PAGE_SIZE_4KB=y
112# CONFIG_PAGE_SIZE_8KB is not set
113# CONFIG_PAGE_SIZE_16KB is not set
114# CONFIG_PAGE_SIZE_64KB is not set
115CONFIG_CPU_HAS_PREFETCH=y
116CONFIG_MIPS_MT_DISABLED=y
117# CONFIG_MIPS_MT_SMP is not set
118# CONFIG_MIPS_MT_SMTC is not set
119# CONFIG_MIPS_VPE_LOADER is not set
120# CONFIG_64BIT_PHYS_ADDR is not set
121CONFIG_CPU_HAS_SYNC=y
122CONFIG_GENERIC_HARDIRQS=y
123CONFIG_GENERIC_IRQ_PROBE=y
124CONFIG_CPU_SUPPORTS_HIGHMEM=y
125CONFIG_ARCH_FLATMEM_ENABLE=y
126CONFIG_SELECT_MEMORY_MODEL=y
127CONFIG_FLATMEM_MANUAL=y
128# CONFIG_DISCONTIGMEM_MANUAL is not set
129# CONFIG_SPARSEMEM_MANUAL is not set
130CONFIG_FLATMEM=y
131CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_SPARSEMEM_STATIC is not set
133CONFIG_SPLIT_PTLOCK_CPUS=4
134# CONFIG_RESOURCES_64BIT is not set
135CONFIG_ZONE_DMA_FLAG=1
136# CONFIG_HZ_48 is not set
137# CONFIG_HZ_100 is not set
138# CONFIG_HZ_128 is not set
139# CONFIG_HZ_250 is not set
140# CONFIG_HZ_256 is not set
141CONFIG_HZ_1000=y
142# CONFIG_HZ_1024 is not set
143CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
144CONFIG_HZ=1000
145# CONFIG_PREEMPT_NONE is not set
146# CONFIG_PREEMPT_VOLUNTARY is not set
147CONFIG_PREEMPT=y
148CONFIG_PREEMPT_BKL=y
149# CONFIG_KEXEC is not set
150CONFIG_LOCKDEP_SUPPORT=y
151CONFIG_STACKTRACE_SUPPORT=y
152CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
153
154#
155# Code maturity level options
156#
157CONFIG_EXPERIMENTAL=y
158CONFIG_BROKEN_ON_SMP=y
159CONFIG_LOCK_KERNEL=y
160CONFIG_INIT_ENV_ARG_LIMIT=32
161
162#
163# General setup
164#
165CONFIG_LOCALVERSION=""
166# CONFIG_LOCALVERSION_AUTO is not set
167CONFIG_SWAP=y
168CONFIG_SYSVIPC=y
169# CONFIG_IPC_NS is not set
170CONFIG_SYSVIPC_SYSCTL=y
171CONFIG_POSIX_MQUEUE=y
172# CONFIG_BSD_PROCESS_ACCT is not set
173# CONFIG_TASKSTATS is not set
174# CONFIG_UTS_NS is not set
175# CONFIG_AUDIT is not set
176# CONFIG_IKCONFIG is not set
177CONFIG_SYSFS_DEPRECATED=y
178# CONFIG_RELAY is not set
179CONFIG_CC_OPTIMIZE_FOR_SIZE=y
180CONFIG_SYSCTL=y
181CONFIG_EMBEDDED=y
182CONFIG_SYSCTL_SYSCALL=y
183CONFIG_KALLSYMS=y
184# CONFIG_KALLSYMS_EXTRA_PASS is not set
185CONFIG_HOTPLUG=y
186CONFIG_PRINTK=y
187CONFIG_BUG=y
188CONFIG_ELF_CORE=y
189CONFIG_BASE_FULL=y
190CONFIG_FUTEX=y
191CONFIG_EPOLL=y
192CONFIG_SHMEM=y
193CONFIG_SLAB=y
194CONFIG_VM_EVENT_COUNTERS=y
195CONFIG_RT_MUTEXES=y
196# CONFIG_TINY_SHMEM is not set
197CONFIG_BASE_SMALL=0
198# CONFIG_SLOB is not set
199
200#
201# Loadable module support
202#
203CONFIG_MODULES=y
204CONFIG_MODULE_UNLOAD=y
205# CONFIG_MODULE_FORCE_UNLOAD is not set
206# CONFIG_MODVERSIONS is not set
207# CONFIG_MODULE_SRCVERSION_ALL is not set
208CONFIG_KMOD=y
209
210#
211# Block layer
212#
213CONFIG_BLOCK=y
214# CONFIG_LBD is not set
215# CONFIG_BLK_DEV_IO_TRACE is not set
216# CONFIG_LSF is not set
217
218#
219# IO Schedulers
220#
221CONFIG_IOSCHED_NOOP=y
222CONFIG_IOSCHED_AS=y
223CONFIG_IOSCHED_DEADLINE=y
224CONFIG_IOSCHED_CFQ=y
225CONFIG_DEFAULT_AS=y
226# CONFIG_DEFAULT_DEADLINE is not set
227# CONFIG_DEFAULT_CFQ is not set
228# CONFIG_DEFAULT_NOOP is not set
229CONFIG_DEFAULT_IOSCHED="anticipatory"
230
231#
232# Bus options (PCI, PCMCIA, EISA, ISA, TC)
233#
234CONFIG_HW_HAS_PCI=y
235CONFIG_PCI=y
236CONFIG_MMU=y
237
238#
239# PCCARD (PCMCIA/CardBus) support
240#
241# CONFIG_PCCARD is not set
242
243#
244# PCI Hotplug Support
245#
246# CONFIG_HOTPLUG_PCI is not set
247
248#
249# Executable file formats
250#
251CONFIG_BINFMT_ELF=y
252# CONFIG_BINFMT_MISC is not set
253CONFIG_TRAD_SIGNALS=y
254
255#
256# Power management options
257#
258CONFIG_PM=y
259# CONFIG_PM_LEGACY is not set
260# CONFIG_PM_DEBUG is not set
261# CONFIG_PM_SYSFS_DEPRECATED is not set
262
263#
264# Networking
265#
266CONFIG_NET=y
267
268#
269# Networking options
270#
271# CONFIG_NETDEBUG is not set
272CONFIG_PACKET=y
273CONFIG_PACKET_MMAP=y
274CONFIG_UNIX=y
275CONFIG_XFRM=y
276# CONFIG_XFRM_USER is not set
277# CONFIG_XFRM_SUB_POLICY is not set
278CONFIG_XFRM_MIGRATE=y
279# CONFIG_NET_KEY is not set
280CONFIG_INET=y
281# CONFIG_IP_MULTICAST is not set
282# CONFIG_IP_ADVANCED_ROUTER is not set
283CONFIG_IP_FIB_HASH=y
284CONFIG_IP_PNP=y
285CONFIG_IP_PNP_DHCP=y
286# CONFIG_IP_PNP_BOOTP is not set
287# CONFIG_IP_PNP_RARP is not set
288# CONFIG_NET_IPIP is not set
289# CONFIG_NET_IPGRE is not set
290# CONFIG_ARPD is not set
291# CONFIG_SYN_COOKIES is not set
292# CONFIG_INET_AH is not set
293# CONFIG_INET_ESP is not set
294# CONFIG_INET_IPCOMP is not set
295# CONFIG_INET_XFRM_TUNNEL is not set
296# CONFIG_INET_TUNNEL is not set
297CONFIG_INET_XFRM_MODE_TRANSPORT=m
298CONFIG_INET_XFRM_MODE_TUNNEL=m
299CONFIG_INET_XFRM_MODE_BEET=m
300CONFIG_INET_DIAG=y
301CONFIG_INET_TCP_DIAG=y
302# CONFIG_TCP_CONG_ADVANCED is not set
303CONFIG_TCP_CONG_CUBIC=y
304CONFIG_DEFAULT_TCP_CONG="cubic"
305CONFIG_TCP_MD5SIG=y
306# CONFIG_IPV6 is not set
307# CONFIG_INET6_XFRM_TUNNEL is not set
308# CONFIG_INET6_TUNNEL is not set
309CONFIG_NETWORK_SECMARK=y
310# CONFIG_NETFILTER is not set
311
312#
313# DCCP Configuration (EXPERIMENTAL)
314#
315# CONFIG_IP_DCCP is not set
316
317#
318# SCTP Configuration (EXPERIMENTAL)
319#
320# CONFIG_IP_SCTP is not set
321
322#
323# TIPC Configuration (EXPERIMENTAL)
324#
325# CONFIG_TIPC is not set
326# CONFIG_ATM is not set
327# CONFIG_BRIDGE is not set
328# CONFIG_VLAN_8021Q is not set
329# CONFIG_DECNET is not set
330# CONFIG_LLC2 is not set
331# CONFIG_IPX is not set
332# CONFIG_ATALK is not set
333# CONFIG_X25 is not set
334# CONFIG_LAPB is not set
335# CONFIG_ECONET is not set
336# CONFIG_WAN_ROUTER is not set
337
338#
339# QoS and/or fair queueing
340#
341# CONFIG_NET_SCHED is not set
342
343#
344# Network testing
345#
346# CONFIG_NET_PKTGEN is not set
347# CONFIG_HAMRADIO is not set
348# CONFIG_IRDA is not set
349# CONFIG_BT is not set
350# CONFIG_IEEE80211 is not set
351
352#
353# Device Drivers
354#
355
356#
357# Generic Driver Options
358#
359CONFIG_STANDALONE=y
360CONFIG_PREVENT_FIRMWARE_BUILD=y
361CONFIG_FW_LOADER=m
362# CONFIG_SYS_HYPERVISOR is not set
363
364#
365# Connector - unified userspace <-> kernelspace linker
366#
367# CONFIG_CONNECTOR is not set
368
369#
370# Memory Technology Devices (MTD)
371#
372CONFIG_MTD=y
373# CONFIG_MTD_DEBUG is not set
374# CONFIG_MTD_CONCAT is not set
375CONFIG_MTD_PARTITIONS=y
376# CONFIG_MTD_REDBOOT_PARTS is not set
377# CONFIG_MTD_CMDLINE_PARTS is not set
378
379#
380# User Modules And Translation Layers
381#
382CONFIG_MTD_CHAR=y
383CONFIG_MTD_BLKDEVS=y
384CONFIG_MTD_BLOCK=y
385# CONFIG_FTL is not set
386# CONFIG_NFTL is not set
387# CONFIG_INFTL is not set
388# CONFIG_RFD_FTL is not set
389# CONFIG_SSFDC is not set
390
391#
392# RAM/ROM/Flash chip drivers
393#
394# CONFIG_MTD_CFI is not set
395# CONFIG_MTD_JEDECPROBE is not set
396CONFIG_MTD_MAP_BANK_WIDTH_1=y
397CONFIG_MTD_MAP_BANK_WIDTH_2=y
398CONFIG_MTD_MAP_BANK_WIDTH_4=y
399# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
400# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
401# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
402CONFIG_MTD_CFI_I1=y
403CONFIG_MTD_CFI_I2=y
404# CONFIG_MTD_CFI_I4 is not set
405# CONFIG_MTD_CFI_I8 is not set
406# CONFIG_MTD_RAM is not set
407# CONFIG_MTD_ROM is not set
408# CONFIG_MTD_ABSENT is not set
409# CONFIG_MTD_OBSOLETE_CHIPS is not set
410
411#
412# Mapping drivers for chip access
413#
414# CONFIG_MTD_COMPLEX_MAPPINGS is not set
415# CONFIG_MTD_PLATRAM is not set
416
417#
418# Self-contained MTD device drivers
419#
420# CONFIG_MTD_PMC551 is not set
421# CONFIG_MTD_SLRAM is not set
422# CONFIG_MTD_PHRAM is not set
423# CONFIG_MTD_MTDRAM is not set
424# CONFIG_MTD_BLOCK2MTD is not set
425
426#
427# Disk-On-Chip Device Drivers
428#
429# CONFIG_MTD_DOC2000 is not set
430# CONFIG_MTD_DOC2001 is not set
431# CONFIG_MTD_DOC2001PLUS is not set
432
433#
434# NAND Flash Device Drivers
435#
436CONFIG_MTD_NAND=y
437CONFIG_MTD_NAND_VERIFY_WRITE=y
438# CONFIG_MTD_NAND_ECC_SMC is not set
439CONFIG_MTD_NAND_IDS=y
440# CONFIG_MTD_NAND_DISKONCHIP is not set
441# CONFIG_MTD_NAND_BASLER_EXCITE is not set
442# CONFIG_MTD_NAND_CAFE is not set
443# CONFIG_MTD_NAND_NANDSIM is not set
444
445#
446# OneNAND Flash Device Drivers
447#
448# CONFIG_MTD_ONENAND is not set
449
450#
451# Parallel port support
452#
453# CONFIG_PARPORT is not set
454
455#
456# Plug and Play support
457#
458# CONFIG_PNPACPI is not set
459
460#
461# Block devices
462#
463# CONFIG_BLK_CPQ_DA is not set
464# CONFIG_BLK_CPQ_CISS_DA is not set
465# CONFIG_BLK_DEV_DAC960 is not set
466# CONFIG_BLK_DEV_UMEM is not set
467# CONFIG_BLK_DEV_COW_COMMON is not set
468CONFIG_BLK_DEV_LOOP=m
469# CONFIG_BLK_DEV_CRYPTOLOOP is not set
470# CONFIG_BLK_DEV_NBD is not set
471# CONFIG_BLK_DEV_SX8 is not set
472# CONFIG_BLK_DEV_UB is not set
473# CONFIG_BLK_DEV_RAM is not set
474# CONFIG_BLK_DEV_INITRD is not set
475# CONFIG_CDROM_PKTCDVD is not set
476# CONFIG_ATA_OVER_ETH is not set
477
478#
479# Misc devices
480#
481CONFIG_SGI_IOC4=m
482# CONFIG_TIFM_CORE is not set
483
484#
485# ATA/ATAPI/MFM/RLL support
486#
487# CONFIG_IDE is not set
488
489#
490# SCSI device support
491#
492# CONFIG_RAID_ATTRS is not set
493CONFIG_SCSI=y
494CONFIG_SCSI_TGT=m
495# CONFIG_SCSI_NETLINK is not set
496# CONFIG_SCSI_PROC_FS is not set
497
498#
499# SCSI support type (disk, tape, CD-ROM)
500#
501CONFIG_BLK_DEV_SD=y
502# CONFIG_CHR_DEV_ST is not set
503# CONFIG_CHR_DEV_OSST is not set
504# CONFIG_BLK_DEV_SR is not set
505# CONFIG_CHR_DEV_SG is not set
506# CONFIG_CHR_DEV_SCH is not set
507
508#
509# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
510#
511# CONFIG_SCSI_MULTI_LUN is not set
512# CONFIG_SCSI_CONSTANTS is not set
513# CONFIG_SCSI_LOGGING is not set
514CONFIG_SCSI_SCAN_ASYNC=y
515
516#
517# SCSI Transports
518#
519# CONFIG_SCSI_SPI_ATTRS is not set
520# CONFIG_SCSI_FC_ATTRS is not set
521# CONFIG_SCSI_ISCSI_ATTRS is not set
522CONFIG_SCSI_SAS_ATTRS=m
523CONFIG_SCSI_SAS_LIBSAS=m
524# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
525
526#
527# SCSI low-level drivers
528#
529# CONFIG_ISCSI_TCP is not set
530# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
531# CONFIG_SCSI_3W_9XXX is not set
532# CONFIG_SCSI_ACARD is not set
533# CONFIG_SCSI_AACRAID is not set
534# CONFIG_SCSI_AIC7XXX is not set
535# CONFIG_SCSI_AIC7XXX_OLD is not set
536# CONFIG_SCSI_AIC79XX is not set
537CONFIG_SCSI_AIC94XX=m
538# CONFIG_AIC94XX_DEBUG is not set
539# CONFIG_SCSI_DPT_I2O is not set
540# CONFIG_SCSI_ARCMSR is not set
541# CONFIG_MEGARAID_NEWGEN is not set
542# CONFIG_MEGARAID_LEGACY is not set
543# CONFIG_MEGARAID_SAS is not set
544# CONFIG_SCSI_HPTIOP is not set
545# CONFIG_SCSI_DMX3191D is not set
546# CONFIG_SCSI_FUTURE_DOMAIN is not set
547# CONFIG_SCSI_IPS is not set
548# CONFIG_SCSI_INITIO is not set
549# CONFIG_SCSI_INIA100 is not set
550# CONFIG_SCSI_STEX is not set
551# CONFIG_SCSI_SYM53C8XX_2 is not set
552# CONFIG_SCSI_QLOGIC_1280 is not set
553# CONFIG_SCSI_QLA_FC is not set
554# CONFIG_SCSI_QLA_ISCSI is not set
555# CONFIG_SCSI_LPFC is not set
556# CONFIG_SCSI_DC395x is not set
557# CONFIG_SCSI_DC390T is not set
558# CONFIG_SCSI_NSP32 is not set
559# CONFIG_SCSI_DEBUG is not set
560# CONFIG_SCSI_SRP is not set
561
562#
563# Serial ATA (prod) and Parallel ATA (experimental) drivers
564#
565# CONFIG_ATA is not set
566
567#
568# Multi-device support (RAID and LVM)
569#
570# CONFIG_MD is not set
571
572#
573# Fusion MPT device support
574#
575# CONFIG_FUSION is not set
576# CONFIG_FUSION_SPI is not set
577# CONFIG_FUSION_FC is not set
578# CONFIG_FUSION_SAS is not set
579
580#
581# IEEE 1394 (FireWire) support
582#
583# CONFIG_IEEE1394 is not set
584
585#
586# I2O device support
587#
588# CONFIG_I2O is not set
589
590#
591# Network device support
592#
593CONFIG_NETDEVICES=y
594# CONFIG_DUMMY is not set
595# CONFIG_BONDING is not set
596# CONFIG_EQUALIZER is not set
597# CONFIG_TUN is not set
598
599#
600# ARCnet devices
601#
602# CONFIG_ARCNET is not set
603
604#
605# PHY device support
606#
607
608#
609# Ethernet (10 or 100Mbit)
610#
611# CONFIG_NET_ETHERNET is not set
612
613#
614# Ethernet (1000 Mbit)
615#
616# CONFIG_ACENIC is not set
617# CONFIG_DL2K is not set
618# CONFIG_E1000 is not set
619# CONFIG_NS83820 is not set
620# CONFIG_HAMACHI is not set
621# CONFIG_YELLOWFIN is not set
622# CONFIG_R8169 is not set
623# CONFIG_SIS190 is not set
624# CONFIG_SKGE is not set
625# CONFIG_SKY2 is not set
626# CONFIG_SK98LIN is not set
627# CONFIG_TIGON3 is not set
628# CONFIG_BNX2 is not set
629CONFIG_QLA3XXX=m
630# CONFIG_ATL1 is not set
631
632#
633# Ethernet (10000 Mbit)
634#
635# CONFIG_CHELSIO_T1 is not set
636CONFIG_CHELSIO_T3=m
637# CONFIG_IXGB is not set
638# CONFIG_S2IO is not set
639# CONFIG_MYRI10GE is not set
640CONFIG_NETXEN_NIC=m
641
642#
643# Token Ring devices
644#
645# CONFIG_TR is not set
646
647#
648# Wireless LAN (non-hamradio)
649#
650# CONFIG_NET_RADIO is not set
651
652#
653# Wan interfaces
654#
655# CONFIG_WAN is not set
656# CONFIG_FDDI is not set
657# CONFIG_HIPPI is not set
658# CONFIG_PPP is not set
659# CONFIG_SLIP is not set
660# CONFIG_NET_FC is not set
661# CONFIG_SHAPER is not set
662# CONFIG_NETCONSOLE is not set
663# CONFIG_NETPOLL is not set
664# CONFIG_NET_POLL_CONTROLLER is not set
665
666#
667# ISDN subsystem
668#
669# CONFIG_ISDN is not set
670
671#
672# Telephony Support
673#
674# CONFIG_PHONE is not set
675
676#
677# Input device support
678#
679CONFIG_INPUT=y
680# CONFIG_INPUT_FF_MEMLESS is not set
681
682#
683# Userland interfaces
684#
685CONFIG_INPUT_MOUSEDEV=m
686CONFIG_INPUT_MOUSEDEV_PSAUX=y
687CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
688CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
689# CONFIG_INPUT_JOYDEV is not set
690# CONFIG_INPUT_TSDEV is not set
691CONFIG_INPUT_EVDEV=m
692# CONFIG_INPUT_EVBUG is not set
693
694#
695# Input Device Drivers
696#
697# CONFIG_INPUT_KEYBOARD is not set
698# CONFIG_INPUT_MOUSE is not set
699# CONFIG_INPUT_JOYSTICK is not set
700# CONFIG_INPUT_TOUCHSCREEN is not set
701# CONFIG_INPUT_MISC is not set
702
703#
704# Hardware I/O ports
705#
706# CONFIG_SERIO is not set
707# CONFIG_GAMEPORT is not set
708
709#
710# Character devices
711#
712CONFIG_VT=y
713CONFIG_VT_CONSOLE=y
714CONFIG_HW_CONSOLE=y
715CONFIG_VT_HW_CONSOLE_BINDING=y
716# CONFIG_SERIAL_NONSTANDARD is not set
717
718#
719# Serial drivers
720#
721CONFIG_SERIAL_8250=y
722CONFIG_SERIAL_8250_CONSOLE=y
723CONFIG_SERIAL_8250_PCI=y
724CONFIG_SERIAL_8250_NR_UARTS=2
725CONFIG_SERIAL_8250_RUNTIME_UARTS=2
726CONFIG_SERIAL_8250_EXTENDED=y
727# CONFIG_SERIAL_8250_MANY_PORTS is not set
728CONFIG_SERIAL_8250_SHARE_IRQ=y
729# CONFIG_SERIAL_8250_DETECT_IRQ is not set
730# CONFIG_SERIAL_8250_RSA is not set
731
732#
733# Non-8250 serial port support
734#
735CONFIG_SERIAL_CORE=y
736CONFIG_SERIAL_CORE_CONSOLE=y
737# CONFIG_SERIAL_JSM is not set
738CONFIG_UNIX98_PTYS=y
739# CONFIG_LEGACY_PTYS is not set
740
741#
742# IPMI
743#
744# CONFIG_IPMI_HANDLER is not set
745
746#
747# Watchdog Cards
748#
749CONFIG_WATCHDOG=y
750# CONFIG_WATCHDOG_NOWAYOUT is not set
751
752#
753# Watchdog Device Drivers
754#
755# CONFIG_SOFT_WATCHDOG is not set
756CONFIG_WDT_RM9K_GPI=m
757
758#
759# PCI-based Watchdog Cards
760#
761# CONFIG_PCIPCWATCHDOG is not set
762# CONFIG_WDTPCI is not set
763
764#
765# USB-based Watchdog Cards
766#
767# CONFIG_USBPCWATCHDOG is not set
768# CONFIG_HW_RANDOM is not set
769# CONFIG_RTC is not set
770# CONFIG_GEN_RTC is not set
771# CONFIG_DTLK is not set
772# CONFIG_R3964 is not set
773# CONFIG_APPLICOM is not set
774# CONFIG_DRM is not set
775# CONFIG_RAW_DRIVER is not set
776
777#
778# TPM devices
779#
780# CONFIG_TCG_TPM is not set
781
782#
783# I2C support
784#
785# CONFIG_I2C is not set
786
787#
788# SPI support
789#
790# CONFIG_SPI is not set
791# CONFIG_SPI_MASTER is not set
792
793#
794# Dallas's 1-wire bus
795#
796# CONFIG_W1 is not set
797
798#
799# Hardware Monitoring support
800#
801# CONFIG_HWMON is not set
802# CONFIG_HWMON_VID is not set
803
804#
805# Multimedia devices
806#
807# CONFIG_VIDEO_DEV is not set
808
809#
810# Digital Video Broadcasting Devices
811#
812# CONFIG_DVB is not set
813# CONFIG_USB_DABUSB is not set
814
815#
816# Graphics support
817#
818# CONFIG_FIRMWARE_EDID is not set
819CONFIG_FB=y
820# CONFIG_FB_CFB_FILLRECT is not set
821# CONFIG_FB_CFB_COPYAREA is not set
822# CONFIG_FB_CFB_IMAGEBLIT is not set
823# CONFIG_FB_SVGALIB is not set
824# CONFIG_FB_MACMODES is not set
825# CONFIG_FB_BACKLIGHT is not set
826# CONFIG_FB_MODE_HELPERS is not set
827# CONFIG_FB_TILEBLITTING is not set
828# CONFIG_FB_CIRRUS is not set
829# CONFIG_FB_PM2 is not set
830# CONFIG_FB_CYBER2000 is not set
831# CONFIG_FB_ASILIANT is not set
832# CONFIG_FB_IMSTT is not set
833# CONFIG_FB_S1D13XXX is not set
834# CONFIG_FB_NVIDIA is not set
835# CONFIG_FB_RIVA is not set
836# CONFIG_FB_MATROX is not set
837# CONFIG_FB_RADEON is not set
838# CONFIG_FB_ATY128 is not set
839# CONFIG_FB_ATY is not set
840# CONFIG_FB_S3 is not set
841# CONFIG_FB_SAVAGE is not set
842# CONFIG_FB_SIS is not set
843# CONFIG_FB_NEOMAGIC is not set
844# CONFIG_FB_KYRO is not set
845# CONFIG_FB_3DFX is not set
846# CONFIG_FB_VOODOO1 is not set
847# CONFIG_FB_SMIVGX is not set
848# CONFIG_FB_TRIDENT is not set
849# CONFIG_FB_VIRTUAL is not set
850
851#
852# Console display driver support
853#
854# CONFIG_VGA_CONSOLE is not set
855CONFIG_DUMMY_CONSOLE=y
856CONFIG_FRAMEBUFFER_CONSOLE=m
857# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
858# CONFIG_FONTS is not set
859CONFIG_FONT_8x8=y
860CONFIG_FONT_8x16=y
861
862#
863# Logo configuration
864#
865# CONFIG_LOGO is not set
866# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
867
868#
869# Sound
870#
871# CONFIG_SOUND is not set
872
873#
874# HID Devices
875#
876CONFIG_HID=y
877# CONFIG_HID_DEBUG is not set
878
879#
880# USB support
881#
882CONFIG_USB_ARCH_HAS_HCD=y
883CONFIG_USB_ARCH_HAS_OHCI=y
884CONFIG_USB_ARCH_HAS_EHCI=y
885CONFIG_USB=y
886# CONFIG_USB_DEBUG is not set
887
888#
889# Miscellaneous USB options
890#
891CONFIG_USB_DEVICEFS=y
892# CONFIG_USB_DYNAMIC_MINORS is not set
893# CONFIG_USB_SUSPEND is not set
894# CONFIG_USB_OTG is not set
895
896#
897# USB Host Controller Drivers
898#
899CONFIG_USB_EHCI_HCD=y
900# CONFIG_USB_EHCI_SPLIT_ISO is not set
901# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
902# CONFIG_USB_EHCI_TT_NEWSCHED is not set
903# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
904# CONFIG_USB_ISP116X_HCD is not set
905CONFIG_USB_OHCI_HCD=y
906# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
907# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
908CONFIG_USB_OHCI_LITTLE_ENDIAN=y
909# CONFIG_USB_UHCI_HCD is not set
910# CONFIG_USB_SL811_HCD is not set
911
912#
913# USB Device Class drivers
914#
915# CONFIG_USB_ACM is not set
916# CONFIG_USB_PRINTER is not set
917
918#
919# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
920#
921
922#
923# may also be needed; see USB_STORAGE Help for more information
924#
925CONFIG_USB_STORAGE=y
926# CONFIG_USB_STORAGE_DEBUG is not set
927# CONFIG_USB_STORAGE_DATAFAB is not set
928# CONFIG_USB_STORAGE_FREECOM is not set
929# CONFIG_USB_STORAGE_DPCM is not set
930# CONFIG_USB_STORAGE_USBAT is not set
931# CONFIG_USB_STORAGE_SDDR09 is not set
932# CONFIG_USB_STORAGE_SDDR55 is not set
933# CONFIG_USB_STORAGE_JUMPSHOT is not set
934# CONFIG_USB_STORAGE_ALAUDA is not set
935# CONFIG_USB_STORAGE_KARMA is not set
936# CONFIG_USB_LIBUSUAL is not set
937
938#
939# USB Input Devices
940#
941CONFIG_USB_HID=m
942# CONFIG_USB_HIDINPUT_POWERBOOK is not set
943# CONFIG_HID_FF is not set
944# CONFIG_USB_HIDDEV is not set
945
946#
947# USB HID Boot Protocol drivers
948#
949# CONFIG_USB_KBD is not set
950# CONFIG_USB_MOUSE is not set
951# CONFIG_USB_AIPTEK is not set
952# CONFIG_USB_WACOM is not set
953# CONFIG_USB_ACECAD is not set
954# CONFIG_USB_KBTAB is not set
955# CONFIG_USB_POWERMATE is not set
956# CONFIG_USB_TOUCHSCREEN is not set
957# CONFIG_USB_YEALINK is not set
958# CONFIG_USB_XPAD is not set
959# CONFIG_USB_ATI_REMOTE is not set
960# CONFIG_USB_ATI_REMOTE2 is not set
961# CONFIG_USB_KEYSPAN_REMOTE is not set
962# CONFIG_USB_APPLETOUCH is not set
963# CONFIG_USB_GTCO is not set
964
965#
966# USB Imaging devices
967#
968# CONFIG_USB_MDC800 is not set
969# CONFIG_USB_MICROTEK is not set
970
971#
972# USB Network Adapters
973#
974# CONFIG_USB_CATC is not set
975# CONFIG_USB_KAWETH is not set
976# CONFIG_USB_PEGASUS is not set
977# CONFIG_USB_RTL8150 is not set
978# CONFIG_USB_USBNET_MII is not set
979# CONFIG_USB_USBNET is not set
980# CONFIG_USB_MON is not set
981
982#
983# USB port drivers
984#
985
986#
987# USB Serial Converter support
988#
989# CONFIG_USB_SERIAL is not set
990
991#
992# USB Miscellaneous drivers
993#
994# CONFIG_USB_EMI62 is not set
995# CONFIG_USB_EMI26 is not set
996# CONFIG_USB_ADUTUX is not set
997# CONFIG_USB_AUERSWALD is not set
998# CONFIG_USB_RIO500 is not set
999# CONFIG_USB_LEGOTOWER is not set
1000# CONFIG_USB_LCD is not set
1001# CONFIG_USB_BERRY_CHARGE is not set
1002# CONFIG_USB_LED is not set
1003# CONFIG_USB_CYPRESS_CY7C63 is not set
1004# CONFIG_USB_CYTHERM is not set
1005# CONFIG_USB_PHIDGET is not set
1006# CONFIG_USB_IDMOUSE is not set
1007# CONFIG_USB_FTDI_ELAN is not set
1008# CONFIG_USB_APPLEDISPLAY is not set
1009# CONFIG_USB_SISUSBVGA is not set
1010# CONFIG_USB_LD is not set
1011# CONFIG_USB_TRANCEVIBRATOR is not set
1012# CONFIG_USB_TEST is not set
1013
1014#
1015# USB DSL modem support
1016#
1017
1018#
1019# USB Gadget Support
1020#
1021# CONFIG_USB_GADGET is not set
1022
1023#
1024# MMC/SD Card support
1025#
1026# CONFIG_MMC is not set
1027
1028#
1029# LED devices
1030#
1031# CONFIG_NEW_LEDS is not set
1032
1033#
1034# LED drivers
1035#
1036
1037#
1038# LED Triggers
1039#
1040
1041#
1042# InfiniBand support
1043#
1044# CONFIG_INFINIBAND is not set
1045
1046#
1047# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1048#
1049
1050#
1051# Real Time Clock
1052#
1053# CONFIG_RTC_CLASS is not set
1054
1055#
1056# DMA Engine support
1057#
1058# CONFIG_DMA_ENGINE is not set
1059
1060#
1061# DMA Clients
1062#
1063
1064#
1065# DMA Devices
1066#
1067
1068#
1069# Auxiliary Display support
1070#
1071
1072#
1073# Virtualization
1074#
1075
1076#
1077# File systems
1078#
1079CONFIG_EXT2_FS=y
1080# CONFIG_EXT2_FS_XATTR is not set
1081# CONFIG_EXT2_FS_XIP is not set
1082# CONFIG_EXT3_FS is not set
1083# CONFIG_EXT4DEV_FS is not set
1084# CONFIG_REISERFS_FS is not set
1085# CONFIG_JFS_FS is not set
1086CONFIG_FS_POSIX_ACL=y
1087# CONFIG_XFS_FS is not set
1088# CONFIG_GFS2_FS is not set
1089# CONFIG_OCFS2_FS is not set
1090# CONFIG_MINIX_FS is not set
1091# CONFIG_ROMFS_FS is not set
1092CONFIG_INOTIFY=y
1093CONFIG_INOTIFY_USER=y
1094# CONFIG_QUOTA is not set
1095# CONFIG_DNOTIFY is not set
1096# CONFIG_AUTOFS_FS is not set
1097# CONFIG_AUTOFS4_FS is not set
1098# CONFIG_FUSE_FS is not set
1099CONFIG_GENERIC_ACL=y
1100
1101#
1102# CD-ROM/DVD Filesystems
1103#
1104# CONFIG_ISO9660_FS is not set
1105# CONFIG_UDF_FS is not set
1106
1107#
1108# DOS/FAT/NT Filesystems
1109#
1110CONFIG_FAT_FS=m
1111CONFIG_MSDOS_FS=m
1112CONFIG_VFAT_FS=m
1113CONFIG_FAT_DEFAULT_CODEPAGE=437
1114CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1115# CONFIG_NTFS_FS is not set
1116
1117#
1118# Pseudo filesystems
1119#
1120CONFIG_PROC_FS=y
1121CONFIG_PROC_KCORE=y
1122CONFIG_PROC_SYSCTL=y
1123CONFIG_SYSFS=y
1124CONFIG_TMPFS=y
1125CONFIG_TMPFS_POSIX_ACL=y
1126# CONFIG_HUGETLB_PAGE is not set
1127CONFIG_RAMFS=y
1128CONFIG_CONFIGFS_FS=m
1129
1130#
1131# Miscellaneous filesystems
1132#
1133# CONFIG_ADFS_FS is not set
1134# CONFIG_AFFS_FS is not set
1135# CONFIG_HFS_FS is not set
1136# CONFIG_HFSPLUS_FS is not set
1137# CONFIG_BEFS_FS is not set
1138# CONFIG_BFS_FS is not set
1139# CONFIG_EFS_FS is not set
1140CONFIG_JFFS2_FS=y
1141CONFIG_JFFS2_FS_DEBUG=0
1142CONFIG_JFFS2_FS_WRITEBUFFER=y
1143# CONFIG_JFFS2_SUMMARY is not set
1144# CONFIG_JFFS2_FS_XATTR is not set
1145# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1146CONFIG_JFFS2_ZLIB=y
1147CONFIG_JFFS2_RTIME=y
1148# CONFIG_JFFS2_RUBIN is not set
1149# CONFIG_CRAMFS is not set
1150# CONFIG_VXFS_FS is not set
1151# CONFIG_HPFS_FS is not set
1152# CONFIG_QNX4FS_FS is not set
1153# CONFIG_SYSV_FS is not set
1154# CONFIG_UFS_FS is not set
1155
1156#
1157# Network File Systems
1158#
1159CONFIG_NFS_FS=y
1160CONFIG_NFS_V3=y
1161# CONFIG_NFS_V3_ACL is not set
1162# CONFIG_NFS_V4 is not set
1163# CONFIG_NFS_DIRECTIO is not set
1164# CONFIG_NFSD is not set
1165CONFIG_ROOT_NFS=y
1166CONFIG_LOCKD=y
1167CONFIG_LOCKD_V4=y
1168CONFIG_NFS_COMMON=y
1169CONFIG_SUNRPC=y
1170# CONFIG_RPCSEC_GSS_KRB5 is not set
1171# CONFIG_RPCSEC_GSS_SPKM3 is not set
1172# CONFIG_SMB_FS is not set
1173# CONFIG_CIFS is not set
1174# CONFIG_NCP_FS is not set
1175# CONFIG_CODA_FS is not set
1176# CONFIG_AFS_FS is not set
1177# CONFIG_9P_FS is not set
1178
1179#
1180# Partition Types
1181#
1182CONFIG_PARTITION_ADVANCED=y
1183# CONFIG_ACORN_PARTITION is not set
1184# CONFIG_OSF_PARTITION is not set
1185# CONFIG_AMIGA_PARTITION is not set
1186# CONFIG_ATARI_PARTITION is not set
1187# CONFIG_MAC_PARTITION is not set
1188CONFIG_MSDOS_PARTITION=y
1189# CONFIG_BSD_DISKLABEL is not set
1190# CONFIG_MINIX_SUBPARTITION is not set
1191# CONFIG_SOLARIS_X86_PARTITION is not set
1192# CONFIG_UNIXWARE_DISKLABEL is not set
1193# CONFIG_LDM_PARTITION is not set
1194# CONFIG_SGI_PARTITION is not set
1195# CONFIG_ULTRIX_PARTITION is not set
1196# CONFIG_SUN_PARTITION is not set
1197# CONFIG_KARMA_PARTITION is not set
1198# CONFIG_EFI_PARTITION is not set
1199
1200#
1201# Native Language Support
1202#
1203CONFIG_NLS=y
1204CONFIG_NLS_DEFAULT="iso8859-1"
1205CONFIG_NLS_CODEPAGE_437=m
1206# CONFIG_NLS_CODEPAGE_737 is not set
1207# CONFIG_NLS_CODEPAGE_775 is not set
1208CONFIG_NLS_CODEPAGE_850=m
1209# CONFIG_NLS_CODEPAGE_852 is not set
1210# CONFIG_NLS_CODEPAGE_855 is not set
1211# CONFIG_NLS_CODEPAGE_857 is not set
1212# CONFIG_NLS_CODEPAGE_860 is not set
1213# CONFIG_NLS_CODEPAGE_861 is not set
1214# CONFIG_NLS_CODEPAGE_862 is not set
1215# CONFIG_NLS_CODEPAGE_863 is not set
1216# CONFIG_NLS_CODEPAGE_864 is not set
1217# CONFIG_NLS_CODEPAGE_865 is not set
1218# CONFIG_NLS_CODEPAGE_866 is not set
1219# CONFIG_NLS_CODEPAGE_869 is not set
1220# CONFIG_NLS_CODEPAGE_936 is not set
1221# CONFIG_NLS_CODEPAGE_950 is not set
1222# CONFIG_NLS_CODEPAGE_932 is not set
1223# CONFIG_NLS_CODEPAGE_949 is not set
1224# CONFIG_NLS_CODEPAGE_874 is not set
1225# CONFIG_NLS_ISO8859_8 is not set
1226# CONFIG_NLS_CODEPAGE_1250 is not set
1227# CONFIG_NLS_CODEPAGE_1251 is not set
1228# CONFIG_NLS_ASCII is not set
1229CONFIG_NLS_ISO8859_1=m
1230# CONFIG_NLS_ISO8859_2 is not set
1231# CONFIG_NLS_ISO8859_3 is not set
1232# CONFIG_NLS_ISO8859_4 is not set
1233# CONFIG_NLS_ISO8859_5 is not set
1234# CONFIG_NLS_ISO8859_6 is not set
1235# CONFIG_NLS_ISO8859_7 is not set
1236# CONFIG_NLS_ISO8859_9 is not set
1237# CONFIG_NLS_ISO8859_13 is not set
1238# CONFIG_NLS_ISO8859_14 is not set
1239# CONFIG_NLS_ISO8859_15 is not set
1240# CONFIG_NLS_KOI8_R is not set
1241# CONFIG_NLS_KOI8_U is not set
1242# CONFIG_NLS_UTF8 is not set
1243
1244#
1245# Distributed Lock Manager
1246#
1247CONFIG_DLM=m
1248CONFIG_DLM_TCP=y
1249# CONFIG_DLM_SCTP is not set
1250# CONFIG_DLM_DEBUG is not set
1251
1252#
1253# Profiling support
1254#
1255# CONFIG_PROFILING is not set
1256
1257#
1258# Kernel hacking
1259#
1260CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1261# CONFIG_PRINTK_TIME is not set
1262CONFIG_ENABLE_MUST_CHECK=y
1263# CONFIG_MAGIC_SYSRQ is not set
1264# CONFIG_UNUSED_SYMBOLS is not set
1265# CONFIG_DEBUG_FS is not set
1266# CONFIG_HEADERS_CHECK is not set
1267# CONFIG_DEBUG_KERNEL is not set
1268CONFIG_LOG_BUF_SHIFT=14
1269CONFIG_CROSSCOMPILE=y
1270CONFIG_CMDLINE=""
1271
1272#
1273# Security options
1274#
1275# CONFIG_KEYS is not set
1276# CONFIG_SECURITY is not set
1277
1278#
1279# Cryptographic options
1280#
1281CONFIG_CRYPTO=y
1282CONFIG_CRYPTO_ALGAPI=y
1283CONFIG_CRYPTO_BLKCIPHER=m
1284CONFIG_CRYPTO_HASH=m
1285CONFIG_CRYPTO_MANAGER=m
1286# CONFIG_CRYPTO_HMAC is not set
1287CONFIG_CRYPTO_XCBC=m
1288# CONFIG_CRYPTO_NULL is not set
1289# CONFIG_CRYPTO_MD4 is not set
1290CONFIG_CRYPTO_MD5=y
1291# CONFIG_CRYPTO_SHA1 is not set
1292# CONFIG_CRYPTO_SHA256 is not set
1293# CONFIG_CRYPTO_SHA512 is not set
1294# CONFIG_CRYPTO_WP512 is not set
1295# CONFIG_CRYPTO_TGR192 is not set
1296CONFIG_CRYPTO_GF128MUL=m
1297CONFIG_CRYPTO_ECB=m
1298CONFIG_CRYPTO_CBC=m
1299CONFIG_CRYPTO_PCBC=m
1300CONFIG_CRYPTO_LRW=m
1301# CONFIG_CRYPTO_DES is not set
1302CONFIG_CRYPTO_FCRYPT=m
1303# CONFIG_CRYPTO_BLOWFISH is not set
1304# CONFIG_CRYPTO_TWOFISH is not set
1305# CONFIG_CRYPTO_SERPENT is not set
1306# CONFIG_CRYPTO_AES is not set
1307# CONFIG_CRYPTO_CAST5 is not set
1308# CONFIG_CRYPTO_CAST6 is not set
1309# CONFIG_CRYPTO_TEA is not set
1310# CONFIG_CRYPTO_ARC4 is not set
1311# CONFIG_CRYPTO_KHAZAD is not set
1312# CONFIG_CRYPTO_ANUBIS is not set
1313# CONFIG_CRYPTO_DEFLATE is not set
1314# CONFIG_CRYPTO_MICHAEL_MIC is not set
1315# CONFIG_CRYPTO_CRC32C is not set
1316CONFIG_CRYPTO_CAMELLIA=m
1317# CONFIG_CRYPTO_TEST is not set
1318
1319#
1320# Hardware crypto devices
1321#
1322
1323#
1324# Library routines
1325#
1326CONFIG_BITREVERSE=y
1327# CONFIG_CRC_CCITT is not set
1328# CONFIG_CRC16 is not set
1329CONFIG_CRC32=y
1330# CONFIG_LIBCRC32C is not set
1331CONFIG_ZLIB_INFLATE=y
1332CONFIG_ZLIB_DEFLATE=y
1333CONFIG_PLIST=y
1334CONFIG_HAS_IOMEM=y
1335CONFIG_HAS_IOPORT=y
diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fuloong2e_defconfig
index 0197f0de6b3f..a09dd03aa8c8 100644
--- a/arch/mips/configs/fuloong2e_defconfig
+++ b/arch/mips/configs/fuloong2e_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.31-rc1 3# Linux kernel version: 2.6.32-rc4
4# Thu Jul 2 22:37:00 2009 4# Fri Oct 16 13:18:01 2009
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -10,8 +10,8 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_AR7 is not set 12# CONFIG_AR7 is not set
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_BCM47XX is not set 13# CONFIG_BCM47XX is not set
14# CONFIG_BCM63XX is not set
15# CONFIG_MIPS_COBALT is not set 15# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set 16# CONFIG_MACH_DECSTATION is not set
17# CONFIG_MACH_JAZZ is not set 17# CONFIG_MACH_JAZZ is not set
@@ -105,6 +105,8 @@ CONFIG_CPU_LOONGSON2E=y
105# CONFIG_CPU_RM9000 is not set 105# CONFIG_CPU_RM9000 is not set
106# CONFIG_CPU_SB1 is not set 106# CONFIG_CPU_SB1 is not set
107# CONFIG_CPU_CAVIUM_OCTEON is not set 107# CONFIG_CPU_CAVIUM_OCTEON is not set
108CONFIG_SYS_SUPPORTS_ZBOOT=y
109CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
108CONFIG_CPU_LOONGSON2=y 110CONFIG_CPU_LOONGSON2=y
109CONFIG_SYS_HAS_CPU_LOONGSON2E=y 111CONFIG_SYS_HAS_CPU_LOONGSON2E=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y 112CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
@@ -135,12 +137,16 @@ CONFIG_SYS_SUPPORTS_HIGHMEM=y
135CONFIG_ARCH_FLATMEM_ENABLE=y 137CONFIG_ARCH_FLATMEM_ENABLE=y
136CONFIG_ARCH_POPULATES_NODE_MAP=y 138CONFIG_ARCH_POPULATES_NODE_MAP=y
137CONFIG_SELECT_MEMORY_MODEL=y 139CONFIG_SELECT_MEMORY_MODEL=y
138CONFIG_FLATMEM_MANUAL=y 140# CONFIG_FLATMEM_MANUAL is not set
139# CONFIG_DISCONTIGMEM_MANUAL is not set 141# CONFIG_DISCONTIGMEM_MANUAL is not set
140# CONFIG_SPARSEMEM_MANUAL is not set 142CONFIG_SPARSEMEM_MANUAL=y
141CONFIG_FLATMEM=y 143CONFIG_SPARSEMEM=y
142CONFIG_FLAT_NODE_MEM_MAP=y 144CONFIG_HAVE_MEMORY_PRESENT=y
143CONFIG_SPARSEMEM_STATIC=y 145CONFIG_SPARSEMEM_STATIC=y
146
147#
148# Memory hotplug is currently incompatible with Software Suspend
149#
144CONFIG_PAGEFLAGS_EXTENDED=y 150CONFIG_PAGEFLAGS_EXTENDED=y
145CONFIG_SPLIT_PTLOCK_CPUS=4 151CONFIG_SPLIT_PTLOCK_CPUS=4
146CONFIG_PHYS_ADDR_T_64BIT=y 152CONFIG_PHYS_ADDR_T_64BIT=y
@@ -148,6 +154,7 @@ CONFIG_ZONE_DMA_FLAG=0
148CONFIG_VIRT_TO_BUS=y 154CONFIG_VIRT_TO_BUS=y
149CONFIG_HAVE_MLOCK=y 155CONFIG_HAVE_MLOCK=y
150CONFIG_HAVE_MLOCKED_PAGE_BIT=y 156CONFIG_HAVE_MLOCKED_PAGE_BIT=y
157# CONFIG_KSM is not set
151CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 158CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
152CONFIG_TICK_ONESHOT=y 159CONFIG_TICK_ONESHOT=y
153CONFIG_NO_HZ=y 160CONFIG_NO_HZ=y
@@ -180,6 +187,12 @@ CONFIG_BROKEN_ON_SMP=y
180CONFIG_INIT_ENV_ARG_LIMIT=32 187CONFIG_INIT_ENV_ARG_LIMIT=32
181CONFIG_LOCALVERSION="-fuloong2e" 188CONFIG_LOCALVERSION="-fuloong2e"
182# CONFIG_LOCALVERSION_AUTO is not set 189# CONFIG_LOCALVERSION_AUTO is not set
190CONFIG_HAVE_KERNEL_GZIP=y
191CONFIG_HAVE_KERNEL_BZIP2=y
192CONFIG_HAVE_KERNEL_LZMA=y
193CONFIG_KERNEL_GZIP=y
194# CONFIG_KERNEL_BZIP2 is not set
195# CONFIG_KERNEL_LZMA is not set
183CONFIG_SWAP=y 196CONFIG_SWAP=y
184CONFIG_SYSVIPC=y 197CONFIG_SYSVIPC=y
185CONFIG_SYSVIPC_SYSCTL=y 198CONFIG_SYSVIPC_SYSCTL=y
@@ -193,11 +206,12 @@ CONFIG_BSD_PROCESS_ACCT=y
193# 206#
194# RCU Subsystem 207# RCU Subsystem
195# 208#
196CONFIG_CLASSIC_RCU=y 209CONFIG_TREE_RCU=y
197# CONFIG_TREE_RCU is not set 210# CONFIG_TREE_PREEMPT_RCU is not set
198# CONFIG_PREEMPT_RCU is not set 211# CONFIG_RCU_TRACE is not set
212CONFIG_RCU_FANOUT=64
213# CONFIG_RCU_FANOUT_EXACT is not set
199# CONFIG_TREE_RCU_TRACE is not set 214# CONFIG_TREE_RCU_TRACE is not set
200# CONFIG_PREEMPT_RCU_TRACE is not set
201CONFIG_IKCONFIG=y 215CONFIG_IKCONFIG=y
202CONFIG_IKCONFIG_PROC=y 216CONFIG_IKCONFIG_PROC=y
203CONFIG_LOG_BUF_SHIFT=14 217CONFIG_LOG_BUF_SHIFT=14
@@ -235,18 +249,16 @@ CONFIG_SHMEM=y
235CONFIG_AIO=y 249CONFIG_AIO=y
236 250
237# 251#
238# Performance Counters 252# Kernel Performance Events And Counters
239# 253#
240CONFIG_VM_EVENT_COUNTERS=y 254CONFIG_VM_EVENT_COUNTERS=y
241CONFIG_PCI_QUIRKS=y 255CONFIG_PCI_QUIRKS=y
242# CONFIG_STRIP_ASM_SYMS is not set
243# CONFIG_COMPAT_BRK is not set 256# CONFIG_COMPAT_BRK is not set
244CONFIG_SLAB=y 257CONFIG_SLAB=y
245# CONFIG_SLUB is not set 258# CONFIG_SLUB is not set
246# CONFIG_SLOB is not set 259# CONFIG_SLOB is not set
247CONFIG_PROFILING=y 260CONFIG_PROFILING=y
248CONFIG_TRACEPOINTS=y 261CONFIG_TRACEPOINTS=y
249CONFIG_MARKERS=y
250CONFIG_OPROFILE=m 262CONFIG_OPROFILE=m
251CONFIG_HAVE_OPROFILE=y 263CONFIG_HAVE_OPROFILE=y
252CONFIG_HAVE_SYSCALL_WRAPPERS=y 264CONFIG_HAVE_SYSCALL_WRAPPERS=y
@@ -255,8 +267,8 @@ CONFIG_HAVE_SYSCALL_WRAPPERS=y
255# GCOV-based kernel profiling 267# GCOV-based kernel profiling
256# 268#
257# CONFIG_GCOV_KERNEL is not set 269# CONFIG_GCOV_KERNEL is not set
258# CONFIG_SLOW_WORK is not set 270CONFIG_SLOW_WORK=y
259# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set 271CONFIG_HAVE_GENERIC_DMA_COHERENT=y
260CONFIG_SLABINFO=y 272CONFIG_SLABINFO=y
261CONFIG_RT_MUTEXES=y 273CONFIG_RT_MUTEXES=y
262CONFIG_BASE_SMALL=0 274CONFIG_BASE_SMALL=0
@@ -283,7 +295,7 @@ CONFIG_IOSCHED_CFQ=y
283CONFIG_DEFAULT_CFQ=y 295CONFIG_DEFAULT_CFQ=y
284# CONFIG_DEFAULT_NOOP is not set 296# CONFIG_DEFAULT_NOOP is not set
285CONFIG_DEFAULT_IOSCHED="cfq" 297CONFIG_DEFAULT_IOSCHED="cfq"
286# CONFIG_FREEZER is not set 298CONFIG_FREEZER=y
287 299
288# 300#
289# Bus options (PCI, PCMCIA, EISA, ISA, TC) 301# Bus options (PCI, PCMCIA, EISA, ISA, TC)
@@ -321,9 +333,14 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y
321CONFIG_ARCH_SUSPEND_POSSIBLE=y 333CONFIG_ARCH_SUSPEND_POSSIBLE=y
322CONFIG_PM=y 334CONFIG_PM=y
323# CONFIG_PM_DEBUG is not set 335# CONFIG_PM_DEBUG is not set
336CONFIG_PM_SLEEP=y
324# CONFIG_SUSPEND is not set 337# CONFIG_SUSPEND is not set
325# CONFIG_HIBERNATION is not set 338CONFIG_HIBERNATION_NVS=y
339CONFIG_HIBERNATION=y
340CONFIG_PM_STD_PARTITION="/dev/hda3"
341# CONFIG_PM_RUNTIME is not set
326CONFIG_NET=y 342CONFIG_NET=y
343CONFIG_COMPAT_NETLINK_MESSAGES=y
327 344
328# 345#
329# Networking options 346# Networking options
@@ -442,6 +459,7 @@ CONFIG_IP_NF_ARPFILTER=m
442CONFIG_IP_NF_ARP_MANGLE=m 459CONFIG_IP_NF_ARP_MANGLE=m
443# CONFIG_IP_DCCP is not set 460# CONFIG_IP_DCCP is not set
444# CONFIG_IP_SCTP is not set 461# CONFIG_IP_SCTP is not set
462# CONFIG_RDS is not set
445# CONFIG_TIPC is not set 463# CONFIG_TIPC is not set
446# CONFIG_ATM is not set 464# CONFIG_ATM is not set
447# CONFIG_BRIDGE is not set 465# CONFIG_BRIDGE is not set
@@ -473,6 +491,7 @@ CONFIG_NET_CLS_ROUTE=y
473# CONFIG_AF_RXRPC is not set 491# CONFIG_AF_RXRPC is not set
474CONFIG_WIRELESS=y 492CONFIG_WIRELESS=y
475# CONFIG_CFG80211 is not set 493# CONFIG_CFG80211 is not set
494CONFIG_CFG80211_DEFAULT_PS_VALUE=0
476CONFIG_WIRELESS_OLD_REGULATORY=y 495CONFIG_WIRELESS_OLD_REGULATORY=y
477CONFIG_WIRELESS_EXT=y 496CONFIG_WIRELESS_EXT=y
478CONFIG_WIRELESS_EXT_SYSFS=y 497CONFIG_WIRELESS_EXT_SYSFS=y
@@ -481,7 +500,6 @@ CONFIG_WIRELESS_EXT_SYSFS=y
481# 500#
482# CFG80211 needs to be enabled for MAC80211 501# CFG80211 needs to be enabled for MAC80211
483# 502#
484CONFIG_MAC80211_DEFAULT_PS_VALUE=0
485# CONFIG_WIMAX is not set 503# CONFIG_WIMAX is not set
486# CONFIG_RFKILL is not set 504# CONFIG_RFKILL is not set
487CONFIG_NET_9P=m 505CONFIG_NET_9P=m
@@ -495,6 +513,7 @@ CONFIG_NET_9P=m
495# Generic Driver Options 513# Generic Driver Options
496# 514#
497CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 515CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
516# CONFIG_DEVTMPFS is not set
498CONFIG_STANDALONE=y 517CONFIG_STANDALONE=y
499CONFIG_PREVENT_FIRMWARE_BUILD=y 518CONFIG_PREVENT_FIRMWARE_BUILD=y
500CONFIG_FW_LOADER=m 519CONFIG_FW_LOADER=m
@@ -504,9 +523,9 @@ CONFIG_EXTRA_FIRMWARE=""
504# CONFIG_CONNECTOR is not set 523# CONFIG_CONNECTOR is not set
505CONFIG_MTD=m 524CONFIG_MTD=m
506# CONFIG_MTD_DEBUG is not set 525# CONFIG_MTD_DEBUG is not set
526# CONFIG_MTD_TESTS is not set
507# CONFIG_MTD_CONCAT is not set 527# CONFIG_MTD_CONCAT is not set
508# CONFIG_MTD_PARTITIONS is not set 528# CONFIG_MTD_PARTITIONS is not set
509# CONFIG_MTD_TESTS is not set
510 529
511# 530#
512# User Modules And Translation Layers 531# User Modules And Translation Layers
@@ -820,6 +839,7 @@ CONFIG_8139TOO=y
820# CONFIG_SUNDANCE is not set 839# CONFIG_SUNDANCE is not set
821# CONFIG_TLAN is not set 840# CONFIG_TLAN is not set
822# CONFIG_KS8842 is not set 841# CONFIG_KS8842 is not set
842# CONFIG_KS8851_MLL is not set
823# CONFIG_VIA_RHINE is not set 843# CONFIG_VIA_RHINE is not set
824# CONFIG_SC92031 is not set 844# CONFIG_SC92031 is not set
825# CONFIG_ATL2 is not set 845# CONFIG_ATL2 is not set
@@ -867,10 +887,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
867# CONFIG_SFC is not set 887# CONFIG_SFC is not set
868# CONFIG_BE2NET is not set 888# CONFIG_BE2NET is not set
869# CONFIG_TR is not set 889# CONFIG_TR is not set
870 890CONFIG_WLAN=y
871#
872# Wireless LAN
873#
874# CONFIG_WLAN_PRE80211 is not set 891# CONFIG_WLAN_PRE80211 is not set
875# CONFIG_WLAN_80211 is not set 892# CONFIG_WLAN_80211 is not set
876 893
@@ -886,6 +903,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
886# CONFIG_USB_PEGASUS is not set 903# CONFIG_USB_PEGASUS is not set
887# CONFIG_USB_RTL8150 is not set 904# CONFIG_USB_RTL8150 is not set
888# CONFIG_USB_USBNET is not set 905# CONFIG_USB_USBNET is not set
906# CONFIG_USB_CDC_PHONET is not set
889# CONFIG_WAN is not set 907# CONFIG_WAN is not set
890# CONFIG_FDDI is not set 908# CONFIG_FDDI is not set
891# CONFIG_HIPPI is not set 909# CONFIG_HIPPI is not set
@@ -933,12 +951,16 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
933# Input Device Drivers 951# Input Device Drivers
934# 952#
935CONFIG_INPUT_KEYBOARD=y 953CONFIG_INPUT_KEYBOARD=y
954# CONFIG_KEYBOARD_ADP5588 is not set
936CONFIG_KEYBOARD_ATKBD=y 955CONFIG_KEYBOARD_ATKBD=y
937# CONFIG_KEYBOARD_SUNKBD is not set 956# CONFIG_QT2160 is not set
938# CONFIG_KEYBOARD_LKKBD is not set 957# CONFIG_KEYBOARD_LKKBD is not set
939# CONFIG_KEYBOARD_XTKBD is not set 958# CONFIG_KEYBOARD_MAX7359 is not set
940# CONFIG_KEYBOARD_NEWTON is not set 959# CONFIG_KEYBOARD_NEWTON is not set
960# CONFIG_KEYBOARD_OPENCORES is not set
941# CONFIG_KEYBOARD_STOWAWAY is not set 961# CONFIG_KEYBOARD_STOWAWAY is not set
962# CONFIG_KEYBOARD_SUNKBD is not set
963# CONFIG_KEYBOARD_XTKBD is not set
942CONFIG_INPUT_MOUSE=y 964CONFIG_INPUT_MOUSE=y
943CONFIG_MOUSE_PS2=y 965CONFIG_MOUSE_PS2=y
944CONFIG_MOUSE_PS2_ALPS=y 966CONFIG_MOUSE_PS2_ALPS=y
@@ -946,6 +968,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y
946CONFIG_MOUSE_PS2_SYNAPTICS=y 968CONFIG_MOUSE_PS2_SYNAPTICS=y
947CONFIG_MOUSE_PS2_TRACKPOINT=y 969CONFIG_MOUSE_PS2_TRACKPOINT=y
948# CONFIG_MOUSE_PS2_ELANTECH is not set 970# CONFIG_MOUSE_PS2_ELANTECH is not set
971# CONFIG_MOUSE_PS2_SENTELIC is not set
949# CONFIG_MOUSE_PS2_TOUCHKIT is not set 972# CONFIG_MOUSE_PS2_TOUCHKIT is not set
950CONFIG_MOUSE_SERIAL=y 973CONFIG_MOUSE_SERIAL=y
951# CONFIG_MOUSE_APPLETOUCH is not set 974# CONFIG_MOUSE_APPLETOUCH is not set
@@ -1015,6 +1038,7 @@ CONFIG_RTC=y
1015CONFIG_DEVPORT=y 1038CONFIG_DEVPORT=y
1016CONFIG_I2C=m 1039CONFIG_I2C=m
1017CONFIG_I2C_BOARDINFO=y 1040CONFIG_I2C_BOARDINFO=y
1041CONFIG_I2C_COMPAT=y
1018CONFIG_I2C_CHARDEV=m 1042CONFIG_I2C_CHARDEV=m
1019CONFIG_I2C_HELPER_AUTO=y 1043CONFIG_I2C_HELPER_AUTO=y
1020 1044
@@ -1070,9 +1094,6 @@ CONFIG_I2C_VIAPRO=m
1070# Miscellaneous I2C Chip support 1094# Miscellaneous I2C Chip support
1071# 1095#
1072# CONFIG_DS1682 is not set 1096# CONFIG_DS1682 is not set
1073# CONFIG_SENSORS_PCF8574 is not set
1074# CONFIG_PCF8575 is not set
1075# CONFIG_SENSORS_PCA9539 is not set
1076# CONFIG_SENSORS_TSL2550 is not set 1097# CONFIG_SENSORS_TSL2550 is not set
1077# CONFIG_I2C_DEBUG_CORE is not set 1098# CONFIG_I2C_DEBUG_CORE is not set
1078# CONFIG_I2C_DEBUG_ALGO is not set 1099# CONFIG_I2C_DEBUG_ALGO is not set
@@ -1088,7 +1109,6 @@ CONFIG_I2C_VIAPRO=m
1088# CONFIG_POWER_SUPPLY is not set 1109# CONFIG_POWER_SUPPLY is not set
1089# CONFIG_HWMON is not set 1110# CONFIG_HWMON is not set
1090# CONFIG_THERMAL is not set 1111# CONFIG_THERMAL is not set
1091# CONFIG_THERMAL_HWMON is not set
1092# CONFIG_WATCHDOG is not set 1112# CONFIG_WATCHDOG is not set
1093CONFIG_SSB_POSSIBLE=y 1113CONFIG_SSB_POSSIBLE=y
1094 1114
@@ -1105,6 +1125,7 @@ CONFIG_SSB_POSSIBLE=y
1105# CONFIG_HTC_PASIC3 is not set 1125# CONFIG_HTC_PASIC3 is not set
1106# CONFIG_MFD_TMIO is not set 1126# CONFIG_MFD_TMIO is not set
1107# CONFIG_MFD_WM8400 is not set 1127# CONFIG_MFD_WM8400 is not set
1128# CONFIG_MFD_WM831X is not set
1108# CONFIG_MFD_WM8350_I2C is not set 1129# CONFIG_MFD_WM8350_I2C is not set
1109# CONFIG_MFD_PCF50633 is not set 1130# CONFIG_MFD_PCF50633 is not set
1110# CONFIG_AB3100_CORE is not set 1131# CONFIG_AB3100_CORE is not set
@@ -1114,6 +1135,7 @@ CONFIG_SSB_POSSIBLE=y
1114# 1135#
1115# Graphics support 1136# Graphics support
1116# 1137#
1138CONFIG_VGA_ARB=y
1117# CONFIG_DRM is not set 1139# CONFIG_DRM is not set
1118# CONFIG_VGASTATE is not set 1140# CONFIG_VGASTATE is not set
1119CONFIG_VIDEO_OUTPUT_CONTROL=m 1141CONFIG_VIDEO_OUTPUT_CONTROL=m
@@ -1198,6 +1220,7 @@ CONFIG_FONT_8x16=y
1198# CONFIG_LOGO is not set 1220# CONFIG_LOGO is not set
1199CONFIG_SOUND=y 1221CONFIG_SOUND=y
1200CONFIG_SOUND_OSS_CORE=y 1222CONFIG_SOUND_OSS_CORE=y
1223CONFIG_SOUND_OSS_CORE_PRECLAIM=y
1201CONFIG_SND=m 1224CONFIG_SND=m
1202CONFIG_SND_TIMER=m 1225CONFIG_SND_TIMER=m
1203CONFIG_SND_PCM=m 1226CONFIG_SND_PCM=m
@@ -1304,7 +1327,6 @@ CONFIG_SND_USB=y
1304CONFIG_AC97_BUS=m 1327CONFIG_AC97_BUS=m
1305CONFIG_HID_SUPPORT=y 1328CONFIG_HID_SUPPORT=y
1306CONFIG_HID=y 1329CONFIG_HID=y
1307# CONFIG_HID_DEBUG is not set
1308CONFIG_HIDRAW=y 1330CONFIG_HIDRAW=y
1309 1331
1310# 1332#
@@ -1356,6 +1378,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
1356# CONFIG_USB_OXU210HP_HCD is not set 1378# CONFIG_USB_OXU210HP_HCD is not set
1357# CONFIG_USB_ISP116X_HCD is not set 1379# CONFIG_USB_ISP116X_HCD is not set
1358CONFIG_USB_ISP1760_HCD=m 1380CONFIG_USB_ISP1760_HCD=m
1381# CONFIG_USB_ISP1362_HCD is not set
1359CONFIG_USB_OHCI_HCD=y 1382CONFIG_USB_OHCI_HCD=y
1360# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1383# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1361# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1384# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1453,6 +1476,7 @@ CONFIG_UIO_CIF=m
1453# CONFIG_UIO_SMX is not set 1476# CONFIG_UIO_SMX is not set
1454# CONFIG_UIO_AEC is not set 1477# CONFIG_UIO_AEC is not set
1455# CONFIG_UIO_SERCOS3 is not set 1478# CONFIG_UIO_SERCOS3 is not set
1479# CONFIG_UIO_PCI_GENERIC is not set
1456 1480
1457# 1481#
1458# TI VLYNQ 1482# TI VLYNQ
@@ -1469,10 +1493,10 @@ CONFIG_EXT3_FS=y
1469# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 1493# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1470# CONFIG_EXT3_FS_XATTR is not set 1494# CONFIG_EXT3_FS_XATTR is not set
1471CONFIG_EXT4_FS=m 1495CONFIG_EXT4_FS=m
1472CONFIG_EXT4DEV_COMPAT=y
1473CONFIG_EXT4_FS_XATTR=y 1496CONFIG_EXT4_FS_XATTR=y
1474CONFIG_EXT4_FS_POSIX_ACL=y 1497CONFIG_EXT4_FS_POSIX_ACL=y
1475CONFIG_EXT4_FS_SECURITY=y 1498CONFIG_EXT4_FS_SECURITY=y
1499# CONFIG_EXT4_DEBUG is not set
1476CONFIG_FS_XIP=y 1500CONFIG_FS_XIP=y
1477CONFIG_JBD=y 1501CONFIG_JBD=y
1478# CONFIG_JBD_DEBUG is not set 1502# CONFIG_JBD_DEBUG is not set
@@ -1489,6 +1513,7 @@ CONFIG_FS_POSIX_ACL=y
1489# CONFIG_GFS2_FS is not set 1513# CONFIG_GFS2_FS is not set
1490# CONFIG_OCFS2_FS is not set 1514# CONFIG_OCFS2_FS is not set
1491# CONFIG_BTRFS_FS is not set 1515# CONFIG_BTRFS_FS is not set
1516# CONFIG_NILFS2_FS is not set
1492CONFIG_FILE_LOCKING=y 1517CONFIG_FILE_LOCKING=y
1493CONFIG_FSNOTIFY=y 1518CONFIG_FSNOTIFY=y
1494CONFIG_DNOTIFY=y 1519CONFIG_DNOTIFY=y
@@ -1557,7 +1582,6 @@ CONFIG_OMFS_FS=m
1557# CONFIG_ROMFS_FS is not set 1582# CONFIG_ROMFS_FS is not set
1558# CONFIG_SYSV_FS is not set 1583# CONFIG_SYSV_FS is not set
1559# CONFIG_UFS_FS is not set 1584# CONFIG_UFS_FS is not set
1560# CONFIG_NILFS2_FS is not set
1561CONFIG_NETWORK_FILESYSTEMS=y 1585CONFIG_NETWORK_FILESYSTEMS=y
1562CONFIG_NFS_FS=m 1586CONFIG_NFS_FS=m
1563CONFIG_NFS_V3=y 1587CONFIG_NFS_V3=y
@@ -1666,6 +1690,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
1666# CONFIG_ENABLE_MUST_CHECK is not set 1690# CONFIG_ENABLE_MUST_CHECK is not set
1667CONFIG_FRAME_WARN=2048 1691CONFIG_FRAME_WARN=2048
1668# CONFIG_MAGIC_SYSRQ is not set 1692# CONFIG_MAGIC_SYSRQ is not set
1693# CONFIG_STRIP_ASM_SYMS is not set
1669# CONFIG_UNUSED_SYMBOLS is not set 1694# CONFIG_UNUSED_SYMBOLS is not set
1670CONFIG_DEBUG_FS=y 1695CONFIG_DEBUG_FS=y
1671# CONFIG_HEADERS_CHECK is not set 1696# CONFIG_HEADERS_CHECK is not set
@@ -1678,13 +1703,14 @@ CONFIG_NOP_TRACER=y
1678CONFIG_RING_BUFFER=y 1703CONFIG_RING_BUFFER=y
1679CONFIG_EVENT_TRACING=y 1704CONFIG_EVENT_TRACING=y
1680CONFIG_CONTEXT_SWITCH_TRACER=y 1705CONFIG_CONTEXT_SWITCH_TRACER=y
1706CONFIG_RING_BUFFER_ALLOW_SWAP=y
1681CONFIG_TRACING=y 1707CONFIG_TRACING=y
1682CONFIG_TRACING_SUPPORT=y 1708CONFIG_TRACING_SUPPORT=y
1683# CONFIG_FTRACE is not set 1709# CONFIG_FTRACE is not set
1684# CONFIG_DYNAMIC_DEBUG is not set 1710# CONFIG_DYNAMIC_DEBUG is not set
1685# CONFIG_SAMPLES is not set 1711# CONFIG_SAMPLES is not set
1686CONFIG_HAVE_ARCH_KGDB=y 1712CONFIG_HAVE_ARCH_KGDB=y
1687CONFIG_CMDLINE="" 1713# CONFIG_CMDLINE_BOOL is not set
1688 1714
1689# 1715#
1690# Security options 1716# Security options
@@ -1742,11 +1768,13 @@ CONFIG_CRYPTO_XTS=m
1742# 1768#
1743CONFIG_CRYPTO_HMAC=y 1769CONFIG_CRYPTO_HMAC=y
1744# CONFIG_CRYPTO_XCBC is not set 1770# CONFIG_CRYPTO_XCBC is not set
1771# CONFIG_CRYPTO_VMAC is not set
1745 1772
1746# 1773#
1747# Digest 1774# Digest
1748# 1775#
1749# CONFIG_CRYPTO_CRC32C is not set 1776# CONFIG_CRYPTO_CRC32C is not set
1777CONFIG_CRYPTO_GHASH=m
1750# CONFIG_CRYPTO_MD4 is not set 1778# CONFIG_CRYPTO_MD4 is not set
1751CONFIG_CRYPTO_MD5=m 1779CONFIG_CRYPTO_MD5=m
1752# CONFIG_CRYPTO_MICHAEL_MIC is not set 1780# CONFIG_CRYPTO_MICHAEL_MIC is not set
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig
index f14d38ba6034..222d7eca2fe4 100644
--- a/arch/mips/configs/ip22_defconfig
+++ b/arch/mips/configs/ip22_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1188,7 +1187,7 @@ CONFIG_DEBUG_MEMORY_INIT=y
1188CONFIG_DYNAMIC_PRINTK_DEBUG=y 1187CONFIG_DYNAMIC_PRINTK_DEBUG=y
1189# CONFIG_SAMPLES is not set 1188# CONFIG_SAMPLES is not set
1190CONFIG_HAVE_ARCH_KGDB=y 1189CONFIG_HAVE_ARCH_KGDB=y
1191CONFIG_CMDLINE="" 1190# CONFIG_CMDLINE_BOOL is not set
1192 1191
1193# 1192#
1194# Security options 1193# Security options
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig
index 1fc73aa7b509..ed84b4cb3c8d 100644
--- a/arch/mips/configs/ip27_defconfig
+++ b/arch/mips/configs/ip27_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -940,7 +939,7 @@ CONFIG_ENABLE_MUST_CHECK=y
940# CONFIG_HEADERS_CHECK is not set 939# CONFIG_HEADERS_CHECK is not set
941# CONFIG_DEBUG_KERNEL is not set 940# CONFIG_DEBUG_KERNEL is not set
942CONFIG_CROSSCOMPILE=y 941CONFIG_CROSSCOMPILE=y
943CONFIG_CMDLINE="" 942# CONFIG_CMDLINE_BOOL is not set
944 943
945# 944#
946# Security options 945# Security options
diff --git a/arch/mips/configs/ip28_defconfig b/arch/mips/configs/ip28_defconfig
index 539dccb0345d..dab2e5aaadaf 100644
--- a/arch/mips/configs/ip28_defconfig
+++ b/arch/mips/configs/ip28_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -816,7 +815,7 @@ CONFIG_MAGIC_SYSRQ=y
816# CONFIG_HEADERS_CHECK is not set 815# CONFIG_HEADERS_CHECK is not set
817# CONFIG_DEBUG_KERNEL is not set 816# CONFIG_DEBUG_KERNEL is not set
818# CONFIG_SAMPLES is not set 817# CONFIG_SAMPLES is not set
819CONFIG_CMDLINE="" 818# CONFIG_CMDLINE_BOOL is not set
820 819
821# 820#
822# Security options 821# Security options
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig
index d934bdefb393..1841c88d3d24 100644
--- a/arch/mips/configs/ip32_defconfig
+++ b/arch/mips/configs/ip32_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1126,7 +1125,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
1126# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1125# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1127# CONFIG_SAMPLES is not set 1126# CONFIG_SAMPLES is not set
1128CONFIG_HAVE_ARCH_KGDB=y 1127CONFIG_HAVE_ARCH_KGDB=y
1129CONFIG_CMDLINE="" 1128# CONFIG_CMDLINE_BOOL is not set
1130 1129
1131# 1130#
1132# Security options 1131# Security options
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
index d22df61833a8..14c2ab3b2674 100644
--- a/arch/mips/configs/jazz_defconfig
+++ b/arch/mips/configs/jazz_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28CONFIG_MACH_JAZZ=y 27CONFIG_MACH_JAZZ=y
@@ -1374,7 +1373,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1374# CONFIG_DEBUG_KERNEL is not set 1373# CONFIG_DEBUG_KERNEL is not set
1375CONFIG_LOG_BUF_SHIFT=14 1374CONFIG_LOG_BUF_SHIFT=14
1376CONFIG_CROSSCOMPILE=y 1375CONFIG_CROSSCOMPILE=y
1377CONFIG_CMDLINE="" 1376# CONFIG_CMDLINE_BOOL is not set
1378 1377
1379# 1378#
1380# Security options 1379# Security options
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig
index 5380f1f582d9..4d66c44cced8 100644
--- a/arch/mips/configs/jmr3927_defconfig
+++ b/arch/mips/configs/jmr3927_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -835,7 +834,7 @@ CONFIG_SYSCTL_SYSCALL_CHECK=y
835# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 834# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
836# CONFIG_SAMPLES is not set 835# CONFIG_SAMPLES is not set
837CONFIG_HAVE_ARCH_KGDB=y 836CONFIG_HAVE_ARCH_KGDB=y
838CONFIG_CMDLINE="" 837# CONFIG_CMDLINE_BOOL is not set
839 838
840# 839#
841# Security options 840# Security options
diff --git a/arch/mips/configs/lasat_defconfig b/arch/mips/configs/lasat_defconfig
index 044074db7e55..08d481e3d42a 100644
--- a/arch/mips/configs/lasat_defconfig
+++ b/arch/mips/configs/lasat_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -798,7 +797,7 @@ CONFIG_MAGIC_SYSRQ=y
798# CONFIG_HEADERS_CHECK is not set 797# CONFIG_HEADERS_CHECK is not set
799# CONFIG_DEBUG_KERNEL is not set 798# CONFIG_DEBUG_KERNEL is not set
800CONFIG_CROSSCOMPILE=y 799CONFIG_CROSSCOMPILE=y
801CONFIG_CMDLINE="" 800# CONFIG_CMDLINE_BOOL is not set
802 801
803# 802#
804# Security options 803# Security options
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
new file mode 100644
index 000000000000..b71a0a4fb95f
--- /dev/null
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -0,0 +1,1835 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc6
4# Mon Nov 9 23:42:42 2009
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_AR7 is not set
13# CONFIG_BCM47XX is not set
14# CONFIG_BCM63XX is not set
15# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set
17# CONFIG_MACH_JAZZ is not set
18# CONFIG_LASAT is not set
19CONFIG_MACH_LOONGSON=y
20# CONFIG_MIPS_MALTA is not set
21# CONFIG_MIPS_SIM is not set
22# CONFIG_NEC_MARKEINS is not set
23# CONFIG_MACH_VR41XX is not set
24# CONFIG_NXP_STB220 is not set
25# CONFIG_NXP_STB225 is not set
26# CONFIG_PNX8550_JBS is not set
27# CONFIG_PNX8550_STB810 is not set
28# CONFIG_PMC_MSP is not set
29# CONFIG_PMC_YOSEMITE is not set
30# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP28 is not set
33# CONFIG_SGI_IP32 is not set
34# CONFIG_SIBYTE_CRHINE is not set
35# CONFIG_SIBYTE_CARMEL is not set
36# CONFIG_SIBYTE_CRHONE is not set
37# CONFIG_SIBYTE_RHONE is not set
38# CONFIG_SIBYTE_SWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set
40# CONFIG_SIBYTE_SENTOSA is not set
41# CONFIG_SIBYTE_BIGSUR is not set
42# CONFIG_SNI_RM is not set
43# CONFIG_MACH_TX39XX is not set
44# CONFIG_MACH_TX49XX is not set
45# CONFIG_MIKROTIK_RB532 is not set
46# CONFIG_WR_PPMC is not set
47# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
48# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
49# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
50CONFIG_ARCH_SPARSEMEM_ENABLE=y
51# CONFIG_LEMOTE_FULOONG2E is not set
52CONFIG_LEMOTE_MACH2F=y
53CONFIG_CS5536=y
54CONFIG_RWSEM_GENERIC_SPINLOCK=y
55# CONFIG_ARCH_HAS_ILOG2_U32 is not set
56# CONFIG_ARCH_HAS_ILOG2_U64 is not set
57CONFIG_ARCH_SUPPORTS_OPROFILE=y
58CONFIG_GENERIC_FIND_NEXT_BIT=y
59CONFIG_GENERIC_HWEIGHT=y
60CONFIG_GENERIC_CALIBRATE_DELAY=y
61CONFIG_GENERIC_CLOCKEVENTS=y
62CONFIG_GENERIC_TIME=y
63CONFIG_GENERIC_CMOS_UPDATE=y
64CONFIG_SCHED_OMIT_FRAME_POINTER=y
65CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
66CONFIG_CEVT_R4K_LIB=y
67CONFIG_CEVT_R4K=y
68CONFIG_CSRC_R4K_LIB=y
69CONFIG_CSRC_R4K=y
70CONFIG_DMA_NONCOHERENT=y
71CONFIG_DMA_NEED_PCI_MAP_STATE=y
72CONFIG_EARLY_PRINTK=y
73CONFIG_SYS_HAS_EARLY_PRINTK=y
74CONFIG_I8259=y
75# CONFIG_NO_IOPORT is not set
76CONFIG_GENERIC_ISA_DMA=y
77CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y
78# CONFIG_CPU_BIG_ENDIAN is not set
79CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
81CONFIG_IRQ_CPU=y
82CONFIG_BOOT_ELF32=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5
84
85#
86# CPU selection
87#
88# CONFIG_CPU_LOONGSON2E is not set
89CONFIG_CPU_LOONGSON2F=y
90# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set
92# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set
95# CONFIG_CPU_TX39XX is not set
96# CONFIG_CPU_VR41XX is not set
97# CONFIG_CPU_R4300 is not set
98# CONFIG_CPU_R4X00 is not set
99# CONFIG_CPU_TX49XX is not set
100# CONFIG_CPU_R5000 is not set
101# CONFIG_CPU_R5432 is not set
102# CONFIG_CPU_R5500 is not set
103# CONFIG_CPU_R6000 is not set
104# CONFIG_CPU_NEVADA is not set
105# CONFIG_CPU_R8000 is not set
106# CONFIG_CPU_R10000 is not set
107# CONFIG_CPU_RM7000 is not set
108# CONFIG_CPU_RM9000 is not set
109# CONFIG_CPU_SB1 is not set
110# CONFIG_CPU_CAVIUM_OCTEON is not set
111CONFIG_SYS_SUPPORTS_ZBOOT=y
112CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
113CONFIG_CPU_LOONGSON2=y
114CONFIG_SYS_HAS_CPU_LOONGSON2F=y
115CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
116CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
117CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
118CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
119
120#
121# Kernel type
122#
123# CONFIG_32BIT is not set
124CONFIG_64BIT=y
125# CONFIG_PAGE_SIZE_4KB is not set
126# CONFIG_PAGE_SIZE_8KB is not set
127CONFIG_PAGE_SIZE_16KB=y
128# CONFIG_PAGE_SIZE_32KB is not set
129# CONFIG_PAGE_SIZE_64KB is not set
130CONFIG_BOARD_SCACHE=y
131CONFIG_MIPS_MT_DISABLED=y
132# CONFIG_MIPS_MT_SMP is not set
133# CONFIG_MIPS_MT_SMTC is not set
134CONFIG_CPU_HAS_WB=y
135CONFIG_CPU_HAS_SYNC=y
136CONFIG_GENERIC_HARDIRQS=y
137CONFIG_GENERIC_IRQ_PROBE=y
138CONFIG_CPU_SUPPORTS_HIGHMEM=y
139CONFIG_SYS_SUPPORTS_HIGHMEM=y
140CONFIG_ARCH_FLATMEM_ENABLE=y
141CONFIG_ARCH_POPULATES_NODE_MAP=y
142CONFIG_SELECT_MEMORY_MODEL=y
143# CONFIG_FLATMEM_MANUAL is not set
144# CONFIG_DISCONTIGMEM_MANUAL is not set
145CONFIG_SPARSEMEM_MANUAL=y
146CONFIG_SPARSEMEM=y
147CONFIG_HAVE_MEMORY_PRESENT=y
148CONFIG_SPARSEMEM_STATIC=y
149
150#
151# Memory hotplug is currently incompatible with Software Suspend
152#
153CONFIG_PAGEFLAGS_EXTENDED=y
154CONFIG_SPLIT_PTLOCK_CPUS=4
155CONFIG_PHYS_ADDR_T_64BIT=y
156CONFIG_ZONE_DMA_FLAG=0
157CONFIG_VIRT_TO_BUS=y
158CONFIG_HAVE_MLOCK=y
159CONFIG_HAVE_MLOCKED_PAGE_BIT=y
160# CONFIG_KSM is not set
161CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
162CONFIG_TICK_ONESHOT=y
163CONFIG_NO_HZ=y
164CONFIG_HIGH_RES_TIMERS=y
165CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
166# CONFIG_HZ_48 is not set
167# CONFIG_HZ_100 is not set
168# CONFIG_HZ_128 is not set
169CONFIG_HZ_250=y
170# CONFIG_HZ_256 is not set
171# CONFIG_HZ_1000 is not set
172# CONFIG_HZ_1024 is not set
173CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
174CONFIG_HZ=250
175# CONFIG_PREEMPT_NONE is not set
176# CONFIG_PREEMPT_VOLUNTARY is not set
177CONFIG_PREEMPT=y
178# CONFIG_KEXEC is not set
179# CONFIG_SECCOMP is not set
180CONFIG_LOCKDEP_SUPPORT=y
181CONFIG_STACKTRACE_SUPPORT=y
182CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
183CONFIG_CONSTRUCTORS=y
184
185#
186# General setup
187#
188CONFIG_EXPERIMENTAL=y
189CONFIG_BROKEN_ON_SMP=y
190CONFIG_LOCK_KERNEL=y
191CONFIG_INIT_ENV_ARG_LIMIT=32
192CONFIG_LOCALVERSION=""
193# CONFIG_LOCALVERSION_AUTO is not set
194CONFIG_HAVE_KERNEL_GZIP=y
195CONFIG_HAVE_KERNEL_BZIP2=y
196CONFIG_HAVE_KERNEL_LZMA=y
197# CONFIG_KERNEL_GZIP is not set
198# CONFIG_KERNEL_BZIP2 is not set
199CONFIG_KERNEL_LZMA=y
200CONFIG_SWAP=y
201CONFIG_SYSVIPC=y
202CONFIG_SYSVIPC_SYSCTL=y
203# CONFIG_POSIX_MQUEUE is not set
204CONFIG_BSD_PROCESS_ACCT=y
205CONFIG_BSD_PROCESS_ACCT_V3=y
206# CONFIG_TASKSTATS is not set
207CONFIG_AUDIT=y
208
209#
210# RCU Subsystem
211#
212CONFIG_TREE_RCU=y
213# CONFIG_TREE_PREEMPT_RCU is not set
214# CONFIG_RCU_TRACE is not set
215CONFIG_RCU_FANOUT=64
216# CONFIG_RCU_FANOUT_EXACT is not set
217# CONFIG_TREE_RCU_TRACE is not set
218CONFIG_IKCONFIG=y
219CONFIG_IKCONFIG_PROC=y
220CONFIG_LOG_BUF_SHIFT=15
221# CONFIG_GROUP_SCHED is not set
222# CONFIG_CGROUPS is not set
223CONFIG_SYSFS_DEPRECATED=y
224CONFIG_SYSFS_DEPRECATED_V2=y
225# CONFIG_RELAY is not set
226# CONFIG_NAMESPACES is not set
227# CONFIG_BLK_DEV_INITRD is not set
228# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
229CONFIG_SYSCTL=y
230CONFIG_ANON_INODES=y
231CONFIG_EMBEDDED=y
232CONFIG_SYSCTL_SYSCALL=y
233CONFIG_KALLSYMS=y
234# CONFIG_KALLSYMS_EXTRA_PASS is not set
235CONFIG_HOTPLUG=y
236CONFIG_PRINTK=y
237CONFIG_BUG=y
238CONFIG_ELF_CORE=y
239CONFIG_PCSPKR_PLATFORM=y
240CONFIG_BASE_FULL=y
241CONFIG_FUTEX=y
242CONFIG_EPOLL=y
243CONFIG_SIGNALFD=y
244CONFIG_TIMERFD=y
245CONFIG_EVENTFD=y
246CONFIG_SHMEM=y
247CONFIG_AIO=y
248
249#
250# Kernel Performance Events And Counters
251#
252CONFIG_VM_EVENT_COUNTERS=y
253CONFIG_PCI_QUIRKS=y
254CONFIG_SLUB_DEBUG=y
255CONFIG_COMPAT_BRK=y
256# CONFIG_SLAB is not set
257CONFIG_SLUB=y
258# CONFIG_SLOB is not set
259# CONFIG_PROFILING is not set
260CONFIG_HAVE_OPROFILE=y
261CONFIG_HAVE_SYSCALL_WRAPPERS=y
262
263#
264# GCOV-based kernel profiling
265#
266# CONFIG_SLOW_WORK is not set
267CONFIG_HAVE_GENERIC_DMA_COHERENT=y
268CONFIG_SLABINFO=y
269CONFIG_RT_MUTEXES=y
270CONFIG_BASE_SMALL=0
271CONFIG_MODULES=y
272# CONFIG_MODULE_FORCE_LOAD is not set
273CONFIG_MODULE_UNLOAD=y
274# CONFIG_MODULE_FORCE_UNLOAD is not set
275CONFIG_MODVERSIONS=y
276# CONFIG_MODULE_SRCVERSION_ALL is not set
277CONFIG_BLOCK=y
278CONFIG_BLK_DEV_BSG=y
279CONFIG_BLK_DEV_INTEGRITY=y
280CONFIG_BLOCK_COMPAT=y
281
282#
283# IO Schedulers
284#
285CONFIG_IOSCHED_NOOP=y
286CONFIG_IOSCHED_AS=y
287CONFIG_IOSCHED_DEADLINE=y
288CONFIG_IOSCHED_CFQ=y
289# CONFIG_DEFAULT_AS is not set
290# CONFIG_DEFAULT_DEADLINE is not set
291CONFIG_DEFAULT_CFQ=y
292# CONFIG_DEFAULT_NOOP is not set
293CONFIG_DEFAULT_IOSCHED="cfq"
294CONFIG_FREEZER=y
295
296#
297# Bus options (PCI, PCMCIA, EISA, ISA, TC)
298#
299CONFIG_HW_HAS_PCI=y
300CONFIG_PCI=y
301CONFIG_PCI_DOMAINS=y
302# CONFIG_ARCH_SUPPORTS_MSI is not set
303CONFIG_PCI_LEGACY=y
304# CONFIG_PCI_STUB is not set
305# CONFIG_PCI_IOV is not set
306CONFIG_ISA=y
307CONFIG_MMU=y
308# CONFIG_PCCARD is not set
309# CONFIG_HOTPLUG_PCI is not set
310
311#
312# Executable file formats
313#
314CONFIG_BINFMT_ELF=y
315# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
316# CONFIG_HAVE_AOUT is not set
317# CONFIG_BINFMT_MISC is not set
318CONFIG_MIPS32_COMPAT=y
319CONFIG_COMPAT=y
320CONFIG_SYSVIPC_COMPAT=y
321CONFIG_MIPS32_O32=y
322CONFIG_MIPS32_N32=y
323CONFIG_BINFMT_ELF32=y
324
325#
326# Power management options
327#
328CONFIG_ARCH_HIBERNATION_POSSIBLE=y
329CONFIG_ARCH_SUSPEND_POSSIBLE=y
330CONFIG_PM=y
331# CONFIG_PM_DEBUG is not set
332CONFIG_PM_SLEEP=y
333CONFIG_SUSPEND=y
334CONFIG_SUSPEND_FREEZER=y
335CONFIG_HIBERNATION_NVS=y
336CONFIG_HIBERNATION=y
337CONFIG_PM_STD_PARTITION="/dev/hda3"
338# CONFIG_PM_RUNTIME is not set
339CONFIG_NET=y
340CONFIG_COMPAT_NETLINK_MESSAGES=y
341
342#
343# Networking options
344#
345CONFIG_PACKET=y
346CONFIG_PACKET_MMAP=y
347CONFIG_UNIX=y
348CONFIG_XFRM=y
349# CONFIG_XFRM_USER is not set
350# CONFIG_XFRM_SUB_POLICY is not set
351# CONFIG_XFRM_MIGRATE is not set
352# CONFIG_XFRM_STATISTICS is not set
353# CONFIG_NET_KEY is not set
354CONFIG_INET=y
355CONFIG_IP_MULTICAST=y
356CONFIG_IP_ADVANCED_ROUTER=y
357CONFIG_ASK_IP_FIB_HASH=y
358# CONFIG_IP_FIB_TRIE is not set
359CONFIG_IP_FIB_HASH=y
360CONFIG_IP_MULTIPLE_TABLES=y
361CONFIG_IP_ROUTE_MULTIPATH=y
362CONFIG_IP_ROUTE_VERBOSE=y
363# CONFIG_IP_PNP is not set
364# CONFIG_NET_IPIP is not set
365# CONFIG_NET_IPGRE is not set
366CONFIG_IP_MROUTE=y
367CONFIG_IP_PIMSM_V1=y
368CONFIG_IP_PIMSM_V2=y
369# CONFIG_ARPD is not set
370CONFIG_SYN_COOKIES=y
371# CONFIG_INET_AH is not set
372# CONFIG_INET_ESP is not set
373# CONFIG_INET_IPCOMP is not set
374# CONFIG_INET_XFRM_TUNNEL is not set
375CONFIG_INET_TUNNEL=m
376CONFIG_INET_XFRM_MODE_TRANSPORT=m
377CONFIG_INET_XFRM_MODE_TUNNEL=m
378CONFIG_INET_XFRM_MODE_BEET=m
379CONFIG_INET_LRO=y
380CONFIG_INET_DIAG=y
381CONFIG_INET_TCP_DIAG=y
382CONFIG_TCP_CONG_ADVANCED=y
383CONFIG_TCP_CONG_BIC=y
384CONFIG_TCP_CONG_CUBIC=y
385CONFIG_TCP_CONG_WESTWOOD=m
386CONFIG_TCP_CONG_HTCP=m
387# CONFIG_TCP_CONG_HSTCP is not set
388# CONFIG_TCP_CONG_HYBLA is not set
389# CONFIG_TCP_CONG_VEGAS is not set
390# CONFIG_TCP_CONG_SCALABLE is not set
391# CONFIG_TCP_CONG_LP is not set
392# CONFIG_TCP_CONG_VENO is not set
393# CONFIG_TCP_CONG_YEAH is not set
394# CONFIG_TCP_CONG_ILLINOIS is not set
395CONFIG_DEFAULT_BIC=y
396# CONFIG_DEFAULT_CUBIC is not set
397# CONFIG_DEFAULT_HTCP is not set
398# CONFIG_DEFAULT_VEGAS is not set
399# CONFIG_DEFAULT_WESTWOOD is not set
400# CONFIG_DEFAULT_RENO is not set
401CONFIG_DEFAULT_TCP_CONG="bic"
402# CONFIG_TCP_MD5SIG is not set
403CONFIG_IPV6=m
404CONFIG_IPV6_PRIVACY=y
405# CONFIG_IPV6_ROUTER_PREF is not set
406# CONFIG_IPV6_OPTIMISTIC_DAD is not set
407# CONFIG_INET6_AH is not set
408# CONFIG_INET6_ESP is not set
409# CONFIG_INET6_IPCOMP is not set
410# CONFIG_IPV6_MIP6 is not set
411# CONFIG_INET6_XFRM_TUNNEL is not set
412# CONFIG_INET6_TUNNEL is not set
413CONFIG_INET6_XFRM_MODE_TRANSPORT=m
414CONFIG_INET6_XFRM_MODE_TUNNEL=m
415CONFIG_INET6_XFRM_MODE_BEET=m
416# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
417CONFIG_IPV6_SIT=m
418CONFIG_IPV6_NDISC_NODETYPE=y
419# CONFIG_IPV6_TUNNEL is not set
420# CONFIG_IPV6_MULTIPLE_TABLES is not set
421# CONFIG_IPV6_MROUTE is not set
422CONFIG_NETWORK_SECMARK=y
423CONFIG_NETFILTER=y
424# CONFIG_NETFILTER_DEBUG is not set
425CONFIG_NETFILTER_ADVANCED=y
426
427#
428# Core Netfilter Configuration
429#
430# CONFIG_NETFILTER_NETLINK_QUEUE is not set
431# CONFIG_NETFILTER_NETLINK_LOG is not set
432# CONFIG_NF_CONNTRACK is not set
433# CONFIG_NETFILTER_XTABLES is not set
434# CONFIG_IP_VS is not set
435
436#
437# IP: Netfilter Configuration
438#
439# CONFIG_NF_DEFRAG_IPV4 is not set
440# CONFIG_IP_NF_QUEUE is not set
441# CONFIG_IP_NF_IPTABLES is not set
442# CONFIG_IP_NF_ARPTABLES is not set
443
444#
445# IPv6: Netfilter Configuration
446#
447# CONFIG_IP6_NF_QUEUE is not set
448# CONFIG_IP6_NF_IPTABLES is not set
449# CONFIG_IP_DCCP is not set
450# CONFIG_IP_SCTP is not set
451# CONFIG_RDS is not set
452# CONFIG_TIPC is not set
453# CONFIG_ATM is not set
454# CONFIG_BRIDGE is not set
455# CONFIG_NET_DSA is not set
456# CONFIG_VLAN_8021Q is not set
457# CONFIG_DECNET is not set
458# CONFIG_LLC2 is not set
459# CONFIG_IPX is not set
460# CONFIG_ATALK is not set
461# CONFIG_X25 is not set
462# CONFIG_LAPB is not set
463# CONFIG_ECONET is not set
464# CONFIG_WAN_ROUTER is not set
465# CONFIG_PHONET is not set
466# CONFIG_IEEE802154 is not set
467CONFIG_NET_SCHED=y
468
469#
470# Queueing/Scheduling
471#
472# CONFIG_NET_SCH_CBQ is not set
473# CONFIG_NET_SCH_HTB is not set
474# CONFIG_NET_SCH_HFSC is not set
475# CONFIG_NET_SCH_PRIO is not set
476# CONFIG_NET_SCH_MULTIQ is not set
477# CONFIG_NET_SCH_RED is not set
478# CONFIG_NET_SCH_SFQ is not set
479# CONFIG_NET_SCH_TEQL is not set
480# CONFIG_NET_SCH_TBF is not set
481# CONFIG_NET_SCH_GRED is not set
482# CONFIG_NET_SCH_DSMARK is not set
483# CONFIG_NET_SCH_NETEM is not set
484# CONFIG_NET_SCH_DRR is not set
485# CONFIG_NET_SCH_INGRESS is not set
486
487#
488# Classification
489#
490CONFIG_NET_CLS=y
491# CONFIG_NET_CLS_BASIC is not set
492# CONFIG_NET_CLS_TCINDEX is not set
493# CONFIG_NET_CLS_ROUTE4 is not set
494# CONFIG_NET_CLS_FW is not set
495# CONFIG_NET_CLS_U32 is not set
496# CONFIG_NET_CLS_RSVP is not set
497# CONFIG_NET_CLS_RSVP6 is not set
498# CONFIG_NET_CLS_FLOW is not set
499CONFIG_NET_EMATCH=y
500CONFIG_NET_EMATCH_STACK=32
501# CONFIG_NET_EMATCH_CMP is not set
502# CONFIG_NET_EMATCH_NBYTE is not set
503# CONFIG_NET_EMATCH_U32 is not set
504# CONFIG_NET_EMATCH_META is not set
505# CONFIG_NET_EMATCH_TEXT is not set
506CONFIG_NET_CLS_ACT=y
507# CONFIG_NET_ACT_POLICE is not set
508# CONFIG_NET_ACT_GACT is not set
509# CONFIG_NET_ACT_MIRRED is not set
510# CONFIG_NET_ACT_NAT is not set
511# CONFIG_NET_ACT_PEDIT is not set
512# CONFIG_NET_ACT_SIMP is not set
513# CONFIG_NET_ACT_SKBEDIT is not set
514CONFIG_NET_SCH_FIFO=y
515# CONFIG_DCB is not set
516
517#
518# Network testing
519#
520# CONFIG_NET_PKTGEN is not set
521# CONFIG_HAMRADIO is not set
522# CONFIG_CAN is not set
523# CONFIG_IRDA is not set
524# CONFIG_BT is not set
525# CONFIG_AF_RXRPC is not set
526CONFIG_FIB_RULES=y
527CONFIG_WIRELESS=y
528# CONFIG_CFG80211 is not set
529CONFIG_CFG80211_DEFAULT_PS_VALUE=0
530# CONFIG_WIRELESS_OLD_REGULATORY is not set
531CONFIG_WIRELESS_EXT=y
532CONFIG_WIRELESS_EXT_SYSFS=y
533# CONFIG_LIB80211 is not set
534
535#
536# CFG80211 needs to be enabled for MAC80211
537#
538# CONFIG_WIMAX is not set
539CONFIG_RFKILL=m
540# CONFIG_RFKILL_INPUT is not set
541# CONFIG_NET_9P is not set
542
543#
544# Device Drivers
545#
546
547#
548# Generic Driver Options
549#
550CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
551# CONFIG_DEVTMPFS is not set
552CONFIG_STANDALONE=y
553CONFIG_PREVENT_FIRMWARE_BUILD=y
554CONFIG_FW_LOADER=y
555CONFIG_FIRMWARE_IN_KERNEL=y
556CONFIG_EXTRA_FIRMWARE=""
557# CONFIG_SYS_HYPERVISOR is not set
558# CONFIG_CONNECTOR is not set
559# CONFIG_MTD is not set
560# CONFIG_PARPORT is not set
561# CONFIG_PNP is not set
562CONFIG_BLK_DEV=y
563# CONFIG_BLK_CPQ_DA is not set
564# CONFIG_BLK_CPQ_CISS_DA is not set
565# CONFIG_BLK_DEV_DAC960 is not set
566# CONFIG_BLK_DEV_UMEM is not set
567# CONFIG_BLK_DEV_COW_COMMON is not set
568CONFIG_BLK_DEV_LOOP=y
569CONFIG_BLK_DEV_CRYPTOLOOP=y
570# CONFIG_BLK_DEV_NBD is not set
571# CONFIG_BLK_DEV_SX8 is not set
572# CONFIG_BLK_DEV_UB is not set
573CONFIG_BLK_DEV_RAM=y
574CONFIG_BLK_DEV_RAM_COUNT=16
575CONFIG_BLK_DEV_RAM_SIZE=8192
576# CONFIG_BLK_DEV_XIP is not set
577# CONFIG_CDROM_PKTCDVD is not set
578# CONFIG_ATA_OVER_ETH is not set
579# CONFIG_BLK_DEV_HD is not set
580CONFIG_MISC_DEVICES=y
581# CONFIG_PHANTOM is not set
582# CONFIG_SGI_IOC4 is not set
583# CONFIG_TIFM_CORE is not set
584# CONFIG_ENCLOSURE_SERVICES is not set
585# CONFIG_HP_ILO is not set
586# CONFIG_C2PORT is not set
587
588#
589# EEPROM support
590#
591# CONFIG_EEPROM_93CX6 is not set
592# CONFIG_CB710_CORE is not set
593CONFIG_HAVE_IDE=y
594CONFIG_IDE=y
595
596#
597# Please see Documentation/ide/ide.txt for help/info on IDE drives
598#
599CONFIG_IDE_XFER_MODE=y
600CONFIG_IDE_TIMINGS=y
601# CONFIG_BLK_DEV_IDE_SATA is not set
602CONFIG_IDE_GD=y
603CONFIG_IDE_GD_ATA=y
604# CONFIG_IDE_GD_ATAPI is not set
605# CONFIG_BLK_DEV_IDECD is not set
606# CONFIG_BLK_DEV_IDETAPE is not set
607CONFIG_IDE_TASK_IOCTL=y
608CONFIG_IDE_PROC_FS=y
609
610#
611# IDE chipset support/bugfixes
612#
613# CONFIG_IDE_GENERIC is not set
614# CONFIG_BLK_DEV_PLATFORM is not set
615CONFIG_BLK_DEV_IDEDMA_SFF=y
616
617#
618# PCI IDE chipsets support
619#
620CONFIG_BLK_DEV_IDEPCI=y
621# CONFIG_IDEPCI_PCIBUS_ORDER is not set
622# CONFIG_BLK_DEV_OFFBOARD is not set
623CONFIG_BLK_DEV_GENERIC=y
624# CONFIG_BLK_DEV_OPTI621 is not set
625CONFIG_BLK_DEV_IDEDMA_PCI=y
626# CONFIG_BLK_DEV_AEC62XX is not set
627# CONFIG_BLK_DEV_ALI15X3 is not set
628CONFIG_BLK_DEV_AMD74XX=y
629# CONFIG_BLK_DEV_CMD64X is not set
630# CONFIG_BLK_DEV_TRIFLEX is not set
631# CONFIG_BLK_DEV_CS5520 is not set
632# CONFIG_BLK_DEV_CS5530 is not set
633# CONFIG_BLK_DEV_HPT366 is not set
634# CONFIG_BLK_DEV_JMICRON is not set
635# CONFIG_BLK_DEV_SC1200 is not set
636# CONFIG_BLK_DEV_PIIX is not set
637# CONFIG_BLK_DEV_IT8172 is not set
638# CONFIG_BLK_DEV_IT8213 is not set
639# CONFIG_BLK_DEV_IT821X is not set
640# CONFIG_BLK_DEV_NS87415 is not set
641# CONFIG_BLK_DEV_PDC202XX_OLD is not set
642# CONFIG_BLK_DEV_PDC202XX_NEW is not set
643# CONFIG_BLK_DEV_SVWKS is not set
644# CONFIG_BLK_DEV_SIIMAGE is not set
645# CONFIG_BLK_DEV_SLC90E66 is not set
646# CONFIG_BLK_DEV_TRM290 is not set
647# CONFIG_BLK_DEV_VIA82CXXX is not set
648# CONFIG_BLK_DEV_TC86C001 is not set
649
650#
651# Other IDE chipsets support
652#
653
654#
655# Note: most of these also require special kernel boot parameters
656#
657# CONFIG_BLK_DEV_4DRIVES is not set
658# CONFIG_BLK_DEV_ALI14XX is not set
659# CONFIG_BLK_DEV_DTC2278 is not set
660# CONFIG_BLK_DEV_HT6560B is not set
661# CONFIG_BLK_DEV_QD65XX is not set
662# CONFIG_BLK_DEV_UMC8672 is not set
663CONFIG_BLK_DEV_IDEDMA=y
664
665#
666# SCSI device support
667#
668# CONFIG_RAID_ATTRS is not set
669CONFIG_SCSI=m
670CONFIG_SCSI_DMA=y
671# CONFIG_SCSI_TGT is not set
672# CONFIG_SCSI_NETLINK is not set
673CONFIG_SCSI_PROC_FS=y
674
675#
676# SCSI support type (disk, tape, CD-ROM)
677#
678CONFIG_BLK_DEV_SD=m
679# CONFIG_CHR_DEV_ST is not set
680# CONFIG_CHR_DEV_OSST is not set
681# CONFIG_BLK_DEV_SR is not set
682CONFIG_CHR_DEV_SG=m
683# CONFIG_CHR_DEV_SCH is not set
684CONFIG_SCSI_MULTI_LUN=y
685# CONFIG_SCSI_CONSTANTS is not set
686# CONFIG_SCSI_LOGGING is not set
687# CONFIG_SCSI_SCAN_ASYNC is not set
688CONFIG_SCSI_WAIT_SCAN=m
689
690#
691# SCSI Transports
692#
693# CONFIG_SCSI_SPI_ATTRS is not set
694# CONFIG_SCSI_FC_ATTRS is not set
695# CONFIG_SCSI_ISCSI_ATTRS is not set
696# CONFIG_SCSI_SAS_ATTRS is not set
697# CONFIG_SCSI_SAS_LIBSAS is not set
698# CONFIG_SCSI_SRP_ATTRS is not set
699# CONFIG_SCSI_LOWLEVEL is not set
700# CONFIG_SCSI_DH is not set
701# CONFIG_SCSI_OSD_INITIATOR is not set
702# CONFIG_ATA is not set
703# CONFIG_MD is not set
704# CONFIG_FUSION is not set
705
706#
707# IEEE 1394 (FireWire) support
708#
709
710#
711# You can enable one or both FireWire driver stacks.
712#
713
714#
715# See the help texts for more information.
716#
717# CONFIG_FIREWIRE is not set
718# CONFIG_IEEE1394 is not set
719# CONFIG_I2O is not set
720CONFIG_NETDEVICES=y
721# CONFIG_IFB is not set
722# CONFIG_DUMMY is not set
723# CONFIG_BONDING is not set
724# CONFIG_MACVLAN is not set
725# CONFIG_EQUALIZER is not set
726# CONFIG_TUN is not set
727# CONFIG_VETH is not set
728# CONFIG_ARCNET is not set
729# CONFIG_PHYLIB is not set
730CONFIG_NET_ETHERNET=y
731CONFIG_MII=y
732# CONFIG_AX88796 is not set
733# CONFIG_HAPPYMEAL is not set
734# CONFIG_SUNGEM is not set
735# CONFIG_CASSINI is not set
736# CONFIG_NET_VENDOR_3COM is not set
737# CONFIG_NET_VENDOR_SMC is not set
738# CONFIG_SMC91X is not set
739# CONFIG_DM9000 is not set
740# CONFIG_ETHOC is not set
741# CONFIG_NET_VENDOR_RACAL is not set
742# CONFIG_DNET is not set
743# CONFIG_NET_TULIP is not set
744# CONFIG_AT1700 is not set
745# CONFIG_DEPCA is not set
746# CONFIG_HP100 is not set
747# CONFIG_NET_ISA is not set
748# CONFIG_IBM_NEW_EMAC_ZMII is not set
749# CONFIG_IBM_NEW_EMAC_RGMII is not set
750# CONFIG_IBM_NEW_EMAC_TAH is not set
751# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
752# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
753# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
754# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
755CONFIG_NET_PCI=y
756# CONFIG_PCNET32 is not set
757# CONFIG_AMD8111_ETH is not set
758# CONFIG_ADAPTEC_STARFIRE is not set
759# CONFIG_AC3200 is not set
760# CONFIG_APRICOT is not set
761# CONFIG_B44 is not set
762# CONFIG_FORCEDETH is not set
763# CONFIG_CS89x0 is not set
764# CONFIG_TC35815 is not set
765# CONFIG_E100 is not set
766# CONFIG_FEALNX is not set
767# CONFIG_NATSEMI is not set
768# CONFIG_NE2K_PCI is not set
769# CONFIG_8139CP is not set
770CONFIG_8139TOO=y
771# CONFIG_8139TOO_PIO is not set
772CONFIG_8139TOO_TUNE_TWISTER=y
773# CONFIG_8139TOO_8129 is not set
774# CONFIG_8139_OLD_RX_RESET is not set
775# CONFIG_R6040 is not set
776# CONFIG_SIS900 is not set
777# CONFIG_EPIC100 is not set
778# CONFIG_SMSC9420 is not set
779# CONFIG_SUNDANCE is not set
780# CONFIG_TLAN is not set
781# CONFIG_KS8842 is not set
782# CONFIG_KS8851_MLL is not set
783# CONFIG_VIA_RHINE is not set
784# CONFIG_SC92031 is not set
785# CONFIG_ATL2 is not set
786CONFIG_NETDEV_1000=y
787# CONFIG_ACENIC is not set
788# CONFIG_DL2K is not set
789# CONFIG_E1000 is not set
790# CONFIG_E1000E is not set
791# CONFIG_IP1000 is not set
792# CONFIG_IGB is not set
793# CONFIG_IGBVF is not set
794# CONFIG_NS83820 is not set
795# CONFIG_HAMACHI is not set
796# CONFIG_YELLOWFIN is not set
797CONFIG_R8169=y
798# CONFIG_SIS190 is not set
799# CONFIG_SKGE is not set
800# CONFIG_SKY2 is not set
801# CONFIG_VIA_VELOCITY is not set
802# CONFIG_TIGON3 is not set
803# CONFIG_BNX2 is not set
804# CONFIG_CNIC is not set
805# CONFIG_QLA3XXX is not set
806# CONFIG_ATL1 is not set
807# CONFIG_ATL1E is not set
808# CONFIG_ATL1C is not set
809# CONFIG_JME is not set
810# CONFIG_NETDEV_10000 is not set
811# CONFIG_TR is not set
812CONFIG_WLAN=y
813CONFIG_WLAN_PRE80211=y
814# CONFIG_STRIP is not set
815# CONFIG_WAVELAN is not set
816CONFIG_WLAN_80211=y
817# CONFIG_LIBERTAS is not set
818# CONFIG_ATMEL is not set
819# CONFIG_PRISM54 is not set
820# CONFIG_USB_ZD1201 is not set
821# CONFIG_HOSTAP is not set
822
823#
824# Enable WiMAX (Networking options) to see the WiMAX drivers
825#
826
827#
828# USB Network Adapters
829#
830# CONFIG_USB_CATC is not set
831# CONFIG_USB_KAWETH is not set
832# CONFIG_USB_PEGASUS is not set
833# CONFIG_USB_RTL8150 is not set
834# CONFIG_USB_USBNET is not set
835# CONFIG_USB_HSO is not set
836# CONFIG_WAN is not set
837# CONFIG_FDDI is not set
838# CONFIG_HIPPI is not set
839# CONFIG_PPP is not set
840# CONFIG_SLIP is not set
841# CONFIG_NET_FC is not set
842# CONFIG_NETCONSOLE is not set
843# CONFIG_NETPOLL is not set
844# CONFIG_NET_POLL_CONTROLLER is not set
845# CONFIG_ISDN is not set
846# CONFIG_PHONE is not set
847
848#
849# Input device support
850#
851CONFIG_INPUT=y
852# CONFIG_INPUT_FF_MEMLESS is not set
853# CONFIG_INPUT_POLLDEV is not set
854
855#
856# Userland interfaces
857#
858CONFIG_INPUT_MOUSEDEV=y
859CONFIG_INPUT_MOUSEDEV_PSAUX=y
860CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
861CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
862# CONFIG_INPUT_JOYDEV is not set
863CONFIG_INPUT_EVDEV=y
864# CONFIG_INPUT_EVBUG is not set
865
866#
867# Input Device Drivers
868#
869CONFIG_INPUT_KEYBOARD=y
870CONFIG_KEYBOARD_ATKBD=y
871# CONFIG_KEYBOARD_LKKBD is not set
872# CONFIG_KEYBOARD_NEWTON is not set
873# CONFIG_KEYBOARD_OPENCORES is not set
874# CONFIG_KEYBOARD_STOWAWAY is not set
875# CONFIG_KEYBOARD_SUNKBD is not set
876# CONFIG_KEYBOARD_XTKBD is not set
877CONFIG_INPUT_MOUSE=y
878CONFIG_MOUSE_PS2=y
879# CONFIG_MOUSE_PS2_ALPS is not set
880# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
881CONFIG_MOUSE_PS2_SYNAPTICS=y
882# CONFIG_MOUSE_PS2_TRACKPOINT is not set
883# CONFIG_MOUSE_PS2_ELANTECH is not set
884# CONFIG_MOUSE_PS2_SENTELIC is not set
885# CONFIG_MOUSE_PS2_TOUCHKIT is not set
886# CONFIG_MOUSE_SERIAL is not set
887# CONFIG_MOUSE_APPLETOUCH is not set
888# CONFIG_MOUSE_BCM5974 is not set
889# CONFIG_MOUSE_INPORT is not set
890# CONFIG_MOUSE_LOGIBM is not set
891# CONFIG_MOUSE_PC110PAD is not set
892# CONFIG_MOUSE_VSXXXAA is not set
893# CONFIG_INPUT_JOYSTICK is not set
894# CONFIG_INPUT_TABLET is not set
895# CONFIG_INPUT_TOUCHSCREEN is not set
896# CONFIG_INPUT_MISC is not set
897
898#
899# Hardware I/O ports
900#
901CONFIG_SERIO=y
902CONFIG_SERIO_I8042=y
903# CONFIG_SERIO_SERPORT is not set
904# CONFIG_SERIO_PCIPS2 is not set
905CONFIG_SERIO_LIBPS2=y
906# CONFIG_SERIO_RAW is not set
907# CONFIG_GAMEPORT is not set
908
909#
910# Character devices
911#
912CONFIG_VT=y
913CONFIG_CONSOLE_TRANSLATIONS=y
914CONFIG_VT_CONSOLE=y
915CONFIG_HW_CONSOLE=y
916# CONFIG_VT_HW_CONSOLE_BINDING is not set
917CONFIG_DEVKMEM=y
918CONFIG_SERIAL_NONSTANDARD=y
919# CONFIG_COMPUTONE is not set
920# CONFIG_ROCKETPORT is not set
921# CONFIG_CYCLADES is not set
922# CONFIG_DIGIEPCA is not set
923# CONFIG_MOXA_INTELLIO is not set
924# CONFIG_MOXA_SMARTIO is not set
925# CONFIG_ISI is not set
926# CONFIG_SYNCLINKMP is not set
927# CONFIG_SYNCLINK_GT is not set
928# CONFIG_N_HDLC is not set
929# CONFIG_RISCOM8 is not set
930# CONFIG_SPECIALIX is not set
931# CONFIG_STALDRV is not set
932# CONFIG_NOZOMI is not set
933
934#
935# Serial drivers
936#
937CONFIG_SERIAL_8250=y
938CONFIG_SERIAL_8250_CONSOLE=y
939# CONFIG_SERIAL_8250_PCI is not set
940CONFIG_SERIAL_8250_NR_UARTS=16
941CONFIG_SERIAL_8250_RUNTIME_UARTS=4
942CONFIG_SERIAL_8250_EXTENDED=y
943CONFIG_SERIAL_8250_MANY_PORTS=y
944CONFIG_SERIAL_8250_FOURPORT=y
945# CONFIG_SERIAL_8250_ACCENT is not set
946# CONFIG_SERIAL_8250_BOCA is not set
947# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
948# CONFIG_SERIAL_8250_HUB6 is not set
949# CONFIG_SERIAL_8250_SHARE_IRQ is not set
950# CONFIG_SERIAL_8250_DETECT_IRQ is not set
951# CONFIG_SERIAL_8250_RSA is not set
952
953#
954# Non-8250 serial port support
955#
956CONFIG_SERIAL_CORE=y
957CONFIG_SERIAL_CORE_CONSOLE=y
958# CONFIG_SERIAL_JSM is not set
959CONFIG_UNIX98_PTYS=y
960# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
961CONFIG_LEGACY_PTYS=y
962CONFIG_LEGACY_PTY_COUNT=16
963# CONFIG_IPMI_HANDLER is not set
964CONFIG_HW_RANDOM=y
965# CONFIG_HW_RANDOM_TIMERIOMEM is not set
966CONFIG_RTC=y
967# CONFIG_DTLK is not set
968# CONFIG_R3964 is not set
969# CONFIG_APPLICOM is not set
970# CONFIG_RAW_DRIVER is not set
971# CONFIG_TCG_TPM is not set
972CONFIG_DEVPORT=y
973# CONFIG_I2C is not set
974# CONFIG_SPI is not set
975
976#
977# PPS support
978#
979# CONFIG_PPS is not set
980# CONFIG_W1 is not set
981# CONFIG_POWER_SUPPLY is not set
982CONFIG_HWMON=y
983# CONFIG_HWMON_VID is not set
984# CONFIG_HWMON_DEBUG_CHIP is not set
985
986#
987# Native drivers
988#
989# CONFIG_SENSORS_I5K_AMB is not set
990# CONFIG_SENSORS_F71805F is not set
991# CONFIG_SENSORS_F71882FG is not set
992# CONFIG_SENSORS_IT87 is not set
993# CONFIG_SENSORS_PC87360 is not set
994# CONFIG_SENSORS_PC87427 is not set
995# CONFIG_SENSORS_SIS5595 is not set
996# CONFIG_SENSORS_SMSC47M1 is not set
997# CONFIG_SENSORS_SMSC47B397 is not set
998# CONFIG_SENSORS_VIA686A is not set
999# CONFIG_SENSORS_VT1211 is not set
1000# CONFIG_SENSORS_VT8231 is not set
1001# CONFIG_SENSORS_W83627HF is not set
1002# CONFIG_SENSORS_W83627EHF is not set
1003CONFIG_THERMAL=y
1004# CONFIG_THERMAL_HWMON is not set
1005# CONFIG_WATCHDOG is not set
1006CONFIG_SSB_POSSIBLE=y
1007
1008#
1009# Sonics Silicon Backplane
1010#
1011# CONFIG_SSB is not set
1012
1013#
1014# Multifunction device drivers
1015#
1016# CONFIG_MFD_CORE is not set
1017# CONFIG_MFD_SM501 is not set
1018# CONFIG_HTC_PASIC3 is not set
1019# CONFIG_MFD_TMIO is not set
1020# CONFIG_REGULATOR is not set
1021CONFIG_MEDIA_SUPPORT=m
1022
1023#
1024# Multimedia core support
1025#
1026CONFIG_VIDEO_DEV=m
1027CONFIG_VIDEO_V4L2_COMMON=m
1028CONFIG_VIDEO_ALLOW_V4L1=y
1029CONFIG_VIDEO_V4L1_COMPAT=y
1030# CONFIG_DVB_CORE is not set
1031CONFIG_VIDEO_MEDIA=m
1032
1033#
1034# Multimedia drivers
1035#
1036# CONFIG_MEDIA_ATTACH is not set
1037CONFIG_VIDEO_V4L2=m
1038CONFIG_VIDEO_V4L1=m
1039CONFIG_VIDEO_CAPTURE_DRIVERS=y
1040# CONFIG_VIDEO_ADV_DEBUG is not set
1041# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
1042CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
1043# CONFIG_VIDEO_VIVI is not set
1044# CONFIG_VIDEO_PMS is not set
1045# CONFIG_VIDEO_CPIA is not set
1046# CONFIG_VIDEO_CPIA2 is not set
1047# CONFIG_VIDEO_STRADIS is not set
1048CONFIG_V4L_USB_DRIVERS=y
1049CONFIG_USB_VIDEO_CLASS=m
1050CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
1051CONFIG_USB_GSPCA=m
1052# CONFIG_USB_M5602 is not set
1053# CONFIG_USB_STV06XX is not set
1054# CONFIG_USB_GL860 is not set
1055# CONFIG_USB_GSPCA_CONEX is not set
1056# CONFIG_USB_GSPCA_ETOMS is not set
1057# CONFIG_USB_GSPCA_FINEPIX is not set
1058# CONFIG_USB_GSPCA_JEILINJ is not set
1059# CONFIG_USB_GSPCA_MARS is not set
1060# CONFIG_USB_GSPCA_MR97310A is not set
1061# CONFIG_USB_GSPCA_OV519 is not set
1062# CONFIG_USB_GSPCA_OV534 is not set
1063# CONFIG_USB_GSPCA_PAC207 is not set
1064# CONFIG_USB_GSPCA_PAC7311 is not set
1065# CONFIG_USB_GSPCA_SN9C20X is not set
1066# CONFIG_USB_GSPCA_SONIXB is not set
1067# CONFIG_USB_GSPCA_SONIXJ is not set
1068# CONFIG_USB_GSPCA_SPCA500 is not set
1069# CONFIG_USB_GSPCA_SPCA501 is not set
1070# CONFIG_USB_GSPCA_SPCA505 is not set
1071# CONFIG_USB_GSPCA_SPCA506 is not set
1072# CONFIG_USB_GSPCA_SPCA508 is not set
1073# CONFIG_USB_GSPCA_SPCA561 is not set
1074# CONFIG_USB_GSPCA_SQ905 is not set
1075# CONFIG_USB_GSPCA_SQ905C is not set
1076# CONFIG_USB_GSPCA_STK014 is not set
1077# CONFIG_USB_GSPCA_SUNPLUS is not set
1078# CONFIG_USB_GSPCA_T613 is not set
1079# CONFIG_USB_GSPCA_TV8532 is not set
1080# CONFIG_USB_GSPCA_VC032X is not set
1081# CONFIG_USB_GSPCA_ZC3XX is not set
1082# CONFIG_VIDEO_HDPVR is not set
1083# CONFIG_USB_VICAM is not set
1084# CONFIG_USB_IBMCAM is not set
1085# CONFIG_USB_KONICAWC is not set
1086# CONFIG_USB_QUICKCAM_MESSENGER is not set
1087# CONFIG_USB_ET61X251 is not set
1088# CONFIG_USB_OV511 is not set
1089# CONFIG_USB_SE401 is not set
1090# CONFIG_USB_SN9C102 is not set
1091# CONFIG_USB_STV680 is not set
1092# CONFIG_USB_ZC0301 is not set
1093# CONFIG_USB_PWC is not set
1094CONFIG_USB_PWC_INPUT_EVDEV=y
1095# CONFIG_USB_ZR364XX is not set
1096# CONFIG_USB_STKWEBCAM is not set
1097# CONFIG_USB_S2255 is not set
1098# CONFIG_RADIO_ADAPTERS is not set
1099# CONFIG_DAB is not set
1100
1101#
1102# Graphics support
1103#
1104CONFIG_VGA_ARB=y
1105# CONFIG_DRM is not set
1106# CONFIG_VGASTATE is not set
1107CONFIG_VIDEO_OUTPUT_CONTROL=y
1108CONFIG_FB=y
1109CONFIG_FIRMWARE_EDID=y
1110# CONFIG_FB_DDC is not set
1111CONFIG_FB_BOOT_VESA_SUPPORT=y
1112CONFIG_FB_CFB_FILLRECT=y
1113CONFIG_FB_CFB_COPYAREA=y
1114CONFIG_FB_CFB_IMAGEBLIT=y
1115# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1116# CONFIG_FB_SYS_FILLRECT is not set
1117# CONFIG_FB_SYS_COPYAREA is not set
1118# CONFIG_FB_SYS_IMAGEBLIT is not set
1119# CONFIG_FB_FOREIGN_ENDIAN is not set
1120# CONFIG_FB_SYS_FOPS is not set
1121# CONFIG_FB_SVGALIB is not set
1122# CONFIG_FB_MACMODES is not set
1123# CONFIG_FB_BACKLIGHT is not set
1124CONFIG_FB_MODE_HELPERS=y
1125CONFIG_FB_TILEBLITTING=y
1126
1127#
1128# Frame buffer hardware drivers
1129#
1130# CONFIG_FB_CIRRUS is not set
1131# CONFIG_FB_PM2 is not set
1132# CONFIG_FB_CYBER2000 is not set
1133# CONFIG_FB_ASILIANT is not set
1134# CONFIG_FB_IMSTT is not set
1135# CONFIG_FB_S1D13XXX is not set
1136# CONFIG_FB_NVIDIA is not set
1137# CONFIG_FB_RIVA is not set
1138# CONFIG_FB_MATROX is not set
1139# CONFIG_FB_RADEON is not set
1140# CONFIG_FB_ATY128 is not set
1141# CONFIG_FB_ATY is not set
1142# CONFIG_FB_S3 is not set
1143# CONFIG_FB_SAVAGE is not set
1144CONFIG_FB_SIS=y
1145CONFIG_FB_SIS_300=y
1146CONFIG_FB_SIS_315=y
1147# CONFIG_FB_VIA is not set
1148# CONFIG_FB_NEOMAGIC is not set
1149# CONFIG_FB_KYRO is not set
1150# CONFIG_FB_3DFX is not set
1151# CONFIG_FB_VOODOO1 is not set
1152# CONFIG_FB_VT8623 is not set
1153# CONFIG_FB_TRIDENT is not set
1154# CONFIG_FB_ARK is not set
1155# CONFIG_FB_PM3 is not set
1156# CONFIG_FB_CARMINE is not set
1157# CONFIG_FB_VIRTUAL is not set
1158# CONFIG_FB_METRONOME is not set
1159# CONFIG_FB_MB862XX is not set
1160# CONFIG_FB_BROADSHEET is not set
1161CONFIG_BACKLIGHT_LCD_SUPPORT=y
1162# CONFIG_LCD_CLASS_DEVICE is not set
1163CONFIG_BACKLIGHT_CLASS_DEVICE=y
1164CONFIG_BACKLIGHT_GENERIC=y
1165
1166#
1167# Display device support
1168#
1169# CONFIG_DISPLAY_SUPPORT is not set
1170
1171#
1172# Console display driver support
1173#
1174# CONFIG_VGA_CONSOLE is not set
1175# CONFIG_MDA_CONSOLE is not set
1176CONFIG_DUMMY_CONSOLE=y
1177CONFIG_FRAMEBUFFER_CONSOLE=y
1178# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1179CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
1180CONFIG_FONTS=y
1181CONFIG_FONT_8x8=y
1182CONFIG_FONT_8x16=y
1183CONFIG_FONT_6x11=y
1184CONFIG_FONT_7x14=y
1185CONFIG_FONT_PEARL_8x8=y
1186CONFIG_FONT_ACORN_8x8=y
1187CONFIG_FONT_MINI_4x6=y
1188CONFIG_FONT_SUN8x16=y
1189CONFIG_FONT_SUN12x22=y
1190CONFIG_FONT_10x18=y
1191CONFIG_LOGO=y
1192# CONFIG_LOGO_LINUX_MONO is not set
1193# CONFIG_LOGO_LINUX_VGA16 is not set
1194CONFIG_LOGO_LINUX_CLUT224=y
1195CONFIG_SOUND=m
1196# CONFIG_SOUND_OSS_CORE is not set
1197CONFIG_SND=m
1198CONFIG_SND_TIMER=m
1199CONFIG_SND_PCM=m
1200# CONFIG_SND_SEQUENCER is not set
1201# CONFIG_SND_MIXER_OSS is not set
1202# CONFIG_SND_PCM_OSS is not set
1203# CONFIG_SND_HRTIMER is not set
1204# CONFIG_SND_RTCTIMER is not set
1205# CONFIG_SND_DYNAMIC_MINORS is not set
1206# CONFIG_SND_SUPPORT_OLD_API is not set
1207# CONFIG_SND_VERBOSE_PROCFS is not set
1208# CONFIG_SND_VERBOSE_PRINTK is not set
1209# CONFIG_SND_DEBUG is not set
1210CONFIG_SND_VMASTER=y
1211# CONFIG_SND_RAWMIDI_SEQ is not set
1212# CONFIG_SND_OPL3_LIB_SEQ is not set
1213# CONFIG_SND_OPL4_LIB_SEQ is not set
1214# CONFIG_SND_SBAWE_SEQ is not set
1215# CONFIG_SND_EMU10K1_SEQ is not set
1216CONFIG_SND_AC97_CODEC=m
1217# CONFIG_SND_DRIVERS is not set
1218CONFIG_SND_PCI=y
1219# CONFIG_SND_AD1889 is not set
1220# CONFIG_SND_ALS300 is not set
1221# CONFIG_SND_ALI5451 is not set
1222# CONFIG_SND_ATIIXP is not set
1223# CONFIG_SND_ATIIXP_MODEM is not set
1224# CONFIG_SND_AU8810 is not set
1225# CONFIG_SND_AU8820 is not set
1226# CONFIG_SND_AU8830 is not set
1227# CONFIG_SND_AW2 is not set
1228# CONFIG_SND_AZT3328 is not set
1229# CONFIG_SND_BT87X is not set
1230# CONFIG_SND_CA0106 is not set
1231# CONFIG_SND_CMIPCI is not set
1232# CONFIG_SND_OXYGEN is not set
1233# CONFIG_SND_CS4281 is not set
1234# CONFIG_SND_CS46XX is not set
1235CONFIG_SND_CS5535AUDIO=m
1236# CONFIG_SND_CTXFI is not set
1237# CONFIG_SND_DARLA20 is not set
1238# CONFIG_SND_GINA20 is not set
1239# CONFIG_SND_LAYLA20 is not set
1240# CONFIG_SND_DARLA24 is not set
1241# CONFIG_SND_GINA24 is not set
1242# CONFIG_SND_LAYLA24 is not set
1243# CONFIG_SND_MONA is not set
1244# CONFIG_SND_MIA is not set
1245# CONFIG_SND_ECHO3G is not set
1246# CONFIG_SND_INDIGO is not set
1247# CONFIG_SND_INDIGOIO is not set
1248# CONFIG_SND_INDIGODJ is not set
1249# CONFIG_SND_INDIGOIOX is not set
1250# CONFIG_SND_INDIGODJX is not set
1251# CONFIG_SND_EMU10K1 is not set
1252# CONFIG_SND_EMU10K1X is not set
1253# CONFIG_SND_ENS1370 is not set
1254# CONFIG_SND_ENS1371 is not set
1255# CONFIG_SND_ES1938 is not set
1256# CONFIG_SND_ES1968 is not set
1257# CONFIG_SND_FM801 is not set
1258# CONFIG_SND_HDA_INTEL is not set
1259# CONFIG_SND_HDSP is not set
1260# CONFIG_SND_HDSPM is not set
1261# CONFIG_SND_HIFIER is not set
1262# CONFIG_SND_ICE1712 is not set
1263# CONFIG_SND_ICE1724 is not set
1264# CONFIG_SND_INTEL8X0 is not set
1265# CONFIG_SND_INTEL8X0M is not set
1266# CONFIG_SND_KORG1212 is not set
1267# CONFIG_SND_LX6464ES is not set
1268# CONFIG_SND_MAESTRO3 is not set
1269# CONFIG_SND_MIXART is not set
1270# CONFIG_SND_NM256 is not set
1271# CONFIG_SND_PCXHR is not set
1272# CONFIG_SND_RIPTIDE is not set
1273# CONFIG_SND_RME32 is not set
1274# CONFIG_SND_RME96 is not set
1275# CONFIG_SND_RME9652 is not set
1276# CONFIG_SND_SONICVIBES is not set
1277# CONFIG_SND_TRIDENT is not set
1278# CONFIG_SND_VIA82XX is not set
1279# CONFIG_SND_VIA82XX_MODEM is not set
1280# CONFIG_SND_VIRTUOSO is not set
1281# CONFIG_SND_VX222 is not set
1282# CONFIG_SND_YMFPCI is not set
1283# CONFIG_SND_MIPS is not set
1284# CONFIG_SND_USB is not set
1285# CONFIG_SND_SOC is not set
1286# CONFIG_SOUND_PRIME is not set
1287CONFIG_AC97_BUS=m
1288CONFIG_HID_SUPPORT=y
1289CONFIG_HID=y
1290CONFIG_HIDRAW=y
1291
1292#
1293# USB Input Devices
1294#
1295CONFIG_USB_HID=y
1296# CONFIG_HID_PID is not set
1297CONFIG_USB_HIDDEV=y
1298
1299#
1300# Special HID drivers
1301#
1302# CONFIG_HID_A4TECH is not set
1303# CONFIG_HID_APPLE is not set
1304# CONFIG_HID_BELKIN is not set
1305# CONFIG_HID_CHERRY is not set
1306# CONFIG_HID_CHICONY is not set
1307# CONFIG_HID_CYPRESS is not set
1308# CONFIG_HID_DRAGONRISE is not set
1309# CONFIG_HID_EZKEY is not set
1310# CONFIG_HID_KYE is not set
1311# CONFIG_HID_GYRATION is not set
1312# CONFIG_HID_TWINHAN is not set
1313# CONFIG_HID_KENSINGTON is not set
1314# CONFIG_HID_LOGITECH is not set
1315# CONFIG_HID_MICROSOFT is not set
1316# CONFIG_HID_MONTEREY is not set
1317# CONFIG_HID_NTRIG is not set
1318# CONFIG_HID_PANTHERLORD is not set
1319# CONFIG_HID_PETALYNX is not set
1320# CONFIG_HID_SAMSUNG is not set
1321# CONFIG_HID_SONY is not set
1322# CONFIG_HID_SUNPLUS is not set
1323# CONFIG_HID_GREENASIA is not set
1324# CONFIG_HID_SMARTJOYPLUS is not set
1325# CONFIG_HID_TOPSEED is not set
1326# CONFIG_HID_THRUSTMASTER is not set
1327# CONFIG_HID_ZEROPLUS is not set
1328CONFIG_USB_SUPPORT=y
1329CONFIG_USB_ARCH_HAS_HCD=y
1330CONFIG_USB_ARCH_HAS_OHCI=y
1331CONFIG_USB_ARCH_HAS_EHCI=y
1332CONFIG_USB=y
1333# CONFIG_USB_DEBUG is not set
1334# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1335
1336#
1337# Miscellaneous USB options
1338#
1339CONFIG_USB_DEVICEFS=y
1340# CONFIG_USB_DEVICE_CLASS is not set
1341CONFIG_USB_DYNAMIC_MINORS=y
1342CONFIG_USB_SUSPEND=y
1343# CONFIG_USB_OTG is not set
1344CONFIG_USB_OTG_WHITELIST=y
1345# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1346CONFIG_USB_MON=y
1347# CONFIG_USB_WUSB is not set
1348# CONFIG_USB_WUSB_CBAF is not set
1349
1350#
1351# USB Host Controller Drivers
1352#
1353# CONFIG_USB_C67X00_HCD is not set
1354# CONFIG_USB_XHCI_HCD is not set
1355CONFIG_USB_EHCI_HCD=y
1356CONFIG_USB_EHCI_ROOT_HUB_TT=y
1357# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1358# CONFIG_USB_OXU210HP_HCD is not set
1359# CONFIG_USB_ISP116X_HCD is not set
1360# CONFIG_USB_ISP1760_HCD is not set
1361# CONFIG_USB_ISP1362_HCD is not set
1362CONFIG_USB_OHCI_HCD=y
1363# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1364# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1365CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1366CONFIG_USB_UHCI_HCD=m
1367# CONFIG_USB_SL811_HCD is not set
1368# CONFIG_USB_R8A66597_HCD is not set
1369# CONFIG_USB_WHCI_HCD is not set
1370# CONFIG_USB_HWA_HCD is not set
1371
1372#
1373# USB Device Class drivers
1374#
1375CONFIG_USB_ACM=m
1376# CONFIG_USB_PRINTER is not set
1377CONFIG_USB_WDM=m
1378# CONFIG_USB_TMC is not set
1379
1380#
1381# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1382#
1383
1384#
1385# also be needed; see USB_STORAGE Help for more info
1386#
1387CONFIG_USB_STORAGE=m
1388# CONFIG_USB_STORAGE_DEBUG is not set
1389CONFIG_USB_STORAGE_DATAFAB=m
1390CONFIG_USB_STORAGE_FREECOM=m
1391CONFIG_USB_STORAGE_ISD200=m
1392CONFIG_USB_STORAGE_USBAT=m
1393CONFIG_USB_STORAGE_SDDR09=m
1394CONFIG_USB_STORAGE_SDDR55=m
1395CONFIG_USB_STORAGE_JUMPSHOT=m
1396CONFIG_USB_STORAGE_ALAUDA=m
1397# CONFIG_USB_STORAGE_ONETOUCH is not set
1398# CONFIG_USB_STORAGE_KARMA is not set
1399# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1400# CONFIG_USB_LIBUSUAL is not set
1401
1402#
1403# USB Imaging devices
1404#
1405# CONFIG_USB_MDC800 is not set
1406# CONFIG_USB_MICROTEK is not set
1407
1408#
1409# USB port drivers
1410#
1411CONFIG_USB_SERIAL=m
1412# CONFIG_USB_EZUSB is not set
1413CONFIG_USB_SERIAL_GENERIC=y
1414# CONFIG_USB_SERIAL_AIRCABLE is not set
1415# CONFIG_USB_SERIAL_ARK3116 is not set
1416# CONFIG_USB_SERIAL_BELKIN is not set
1417# CONFIG_USB_SERIAL_CH341 is not set
1418# CONFIG_USB_SERIAL_WHITEHEAT is not set
1419# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1420# CONFIG_USB_SERIAL_CP210X is not set
1421# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1422# CONFIG_USB_SERIAL_EMPEG is not set
1423# CONFIG_USB_SERIAL_FTDI_SIO is not set
1424# CONFIG_USB_SERIAL_FUNSOFT is not set
1425# CONFIG_USB_SERIAL_VISOR is not set
1426# CONFIG_USB_SERIAL_IPAQ is not set
1427# CONFIG_USB_SERIAL_IR is not set
1428# CONFIG_USB_SERIAL_EDGEPORT is not set
1429# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
1430# CONFIG_USB_SERIAL_GARMIN is not set
1431# CONFIG_USB_SERIAL_IPW is not set
1432# CONFIG_USB_SERIAL_IUU is not set
1433# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
1434# CONFIG_USB_SERIAL_KEYSPAN is not set
1435# CONFIG_USB_SERIAL_KLSI is not set
1436# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1437# CONFIG_USB_SERIAL_MCT_U232 is not set
1438# CONFIG_USB_SERIAL_MOS7720 is not set
1439# CONFIG_USB_SERIAL_MOS7840 is not set
1440# CONFIG_USB_SERIAL_MOTOROLA is not set
1441# CONFIG_USB_SERIAL_NAVMAN is not set
1442# CONFIG_USB_SERIAL_PL2303 is not set
1443# CONFIG_USB_SERIAL_OTI6858 is not set
1444# CONFIG_USB_SERIAL_QUALCOMM is not set
1445# CONFIG_USB_SERIAL_SPCP8X5 is not set
1446# CONFIG_USB_SERIAL_HP4X is not set
1447# CONFIG_USB_SERIAL_SAFE is not set
1448# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1449# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1450# CONFIG_USB_SERIAL_SYMBOL is not set
1451# CONFIG_USB_SERIAL_TI is not set
1452# CONFIG_USB_SERIAL_CYBERJACK is not set
1453# CONFIG_USB_SERIAL_XIRCOM is not set
1454# CONFIG_USB_SERIAL_OPTION is not set
1455# CONFIG_USB_SERIAL_OMNINET is not set
1456# CONFIG_USB_SERIAL_OPTICON is not set
1457# CONFIG_USB_SERIAL_DEBUG is not set
1458
1459#
1460# USB Miscellaneous drivers
1461#
1462# CONFIG_USB_EMI62 is not set
1463# CONFIG_USB_EMI26 is not set
1464# CONFIG_USB_ADUTUX is not set
1465# CONFIG_USB_SEVSEG is not set
1466# CONFIG_USB_RIO500 is not set
1467# CONFIG_USB_LEGOTOWER is not set
1468# CONFIG_USB_LCD is not set
1469# CONFIG_USB_BERRY_CHARGE is not set
1470# CONFIG_USB_LED is not set
1471# CONFIG_USB_CYPRESS_CY7C63 is not set
1472# CONFIG_USB_CYTHERM is not set
1473# CONFIG_USB_IDMOUSE is not set
1474# CONFIG_USB_FTDI_ELAN is not set
1475# CONFIG_USB_APPLEDISPLAY is not set
1476# CONFIG_USB_SISUSBVGA is not set
1477# CONFIG_USB_LD is not set
1478# CONFIG_USB_TRANCEVIBRATOR is not set
1479# CONFIG_USB_IOWARRIOR is not set
1480# CONFIG_USB_TEST is not set
1481# CONFIG_USB_ISIGHTFW is not set
1482# CONFIG_USB_VST is not set
1483# CONFIG_USB_GADGET is not set
1484
1485#
1486# OTG and related infrastructure
1487#
1488# CONFIG_NOP_USB_XCEIV is not set
1489# CONFIG_UWB is not set
1490# CONFIG_MMC is not set
1491# CONFIG_MEMSTICK is not set
1492# CONFIG_NEW_LEDS is not set
1493# CONFIG_ACCESSIBILITY is not set
1494# CONFIG_INFINIBAND is not set
1495# CONFIG_RTC_CLASS is not set
1496# CONFIG_DMADEVICES is not set
1497# CONFIG_AUXDISPLAY is not set
1498# CONFIG_UIO is not set
1499
1500#
1501# TI VLYNQ
1502#
1503CONFIG_STAGING=y
1504# CONFIG_STAGING_EXCLUDE_BUILD is not set
1505# CONFIG_ET131X is not set
1506# CONFIG_USB_IP_COMMON is not set
1507# CONFIG_PRISM2_USB is not set
1508# CONFIG_ECHO is not set
1509# CONFIG_COMEDI is not set
1510# CONFIG_ASUS_OLED is not set
1511# CONFIG_ALTERA_PCIE_CHDMA is not set
1512# CONFIG_RTL8187SE is not set
1513# CONFIG_RTL8192SU is not set
1514# CONFIG_RTL8192E is not set
1515# CONFIG_INPUT_MIMIO is not set
1516# CONFIG_TRANZPORT is not set
1517
1518#
1519# Android
1520#
1521
1522#
1523# Qualcomm MSM Camera And Video
1524#
1525
1526#
1527# Camera Sensor Selection
1528#
1529# CONFIG_INPUT_GPIO is not set
1530# CONFIG_DST is not set
1531# CONFIG_POHMELFS is not set
1532# CONFIG_B3DFG is not set
1533# CONFIG_PLAN9AUTH is not set
1534# CONFIG_LINE6_USB is not set
1535# CONFIG_USB_SERIAL_QUATECH2 is not set
1536# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
1537# CONFIG_VT6655 is not set
1538# CONFIG_VT6656 is not set
1539# CONFIG_FB_UDL is not set
1540# CONFIG_VME_BUS is not set
1541
1542#
1543# RAR Register Driver
1544#
1545# CONFIG_RAR_REGISTER is not set
1546# CONFIG_IIO is not set
1547CONFIG_FB_SM7XX=y
1548CONFIG_FB_SM7XX_ACCEL=y
1549
1550#
1551# File systems
1552#
1553# CONFIG_EXT2_FS is not set
1554CONFIG_EXT3_FS=y
1555# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1556CONFIG_EXT3_FS_XATTR=y
1557CONFIG_EXT3_FS_POSIX_ACL=y
1558CONFIG_EXT3_FS_SECURITY=y
1559# CONFIG_EXT4_FS is not set
1560CONFIG_JBD=y
1561CONFIG_FS_MBCACHE=y
1562# CONFIG_REISERFS_FS is not set
1563# CONFIG_JFS_FS is not set
1564CONFIG_FS_POSIX_ACL=y
1565# CONFIG_XFS_FS is not set
1566# CONFIG_GFS2_FS is not set
1567# CONFIG_OCFS2_FS is not set
1568# CONFIG_BTRFS_FS is not set
1569# CONFIG_NILFS2_FS is not set
1570CONFIG_FILE_LOCKING=y
1571CONFIG_FSNOTIFY=y
1572CONFIG_DNOTIFY=y
1573CONFIG_INOTIFY=y
1574CONFIG_INOTIFY_USER=y
1575CONFIG_QUOTA=y
1576# CONFIG_QUOTA_NETLINK_INTERFACE is not set
1577CONFIG_PRINT_QUOTA_WARNING=y
1578# CONFIG_QFMT_V1 is not set
1579# CONFIG_QFMT_V2 is not set
1580CONFIG_QUOTACTL=y
1581# CONFIG_AUTOFS_FS is not set
1582# CONFIG_AUTOFS4_FS is not set
1583# CONFIG_FUSE_FS is not set
1584
1585#
1586# Caches
1587#
1588# CONFIG_FSCACHE is not set
1589
1590#
1591# CD-ROM/DVD Filesystems
1592#
1593CONFIG_ISO9660_FS=m
1594CONFIG_JOLIET=y
1595CONFIG_ZISOFS=y
1596# CONFIG_UDF_FS is not set
1597
1598#
1599# DOS/FAT/NT Filesystems
1600#
1601CONFIG_FAT_FS=m
1602# CONFIG_MSDOS_FS is not set
1603CONFIG_VFAT_FS=m
1604CONFIG_FAT_DEFAULT_CODEPAGE=437
1605CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1606# CONFIG_NTFS_FS is not set
1607
1608#
1609# Pseudo filesystems
1610#
1611CONFIG_PROC_FS=y
1612CONFIG_PROC_KCORE=y
1613CONFIG_PROC_SYSCTL=y
1614CONFIG_PROC_PAGE_MONITOR=y
1615CONFIG_SYSFS=y
1616CONFIG_TMPFS=y
1617# CONFIG_TMPFS_POSIX_ACL is not set
1618# CONFIG_HUGETLB_PAGE is not set
1619# CONFIG_CONFIGFS_FS is not set
1620# CONFIG_MISC_FILESYSTEMS is not set
1621CONFIG_NETWORK_FILESYSTEMS=y
1622CONFIG_NFS_FS=m
1623CONFIG_NFS_V3=y
1624CONFIG_NFS_V3_ACL=y
1625# CONFIG_NFS_V4 is not set
1626# CONFIG_NFSD is not set
1627CONFIG_LOCKD=m
1628CONFIG_LOCKD_V4=y
1629CONFIG_NFS_ACL_SUPPORT=m
1630CONFIG_NFS_COMMON=y
1631CONFIG_SUNRPC=m
1632# CONFIG_RPCSEC_GSS_KRB5 is not set
1633# CONFIG_RPCSEC_GSS_SPKM3 is not set
1634# CONFIG_SMB_FS is not set
1635# CONFIG_CIFS is not set
1636# CONFIG_NCP_FS is not set
1637# CONFIG_CODA_FS is not set
1638# CONFIG_AFS_FS is not set
1639
1640#
1641# Partition Types
1642#
1643# CONFIG_PARTITION_ADVANCED is not set
1644CONFIG_MSDOS_PARTITION=y
1645CONFIG_NLS=y
1646CONFIG_NLS_DEFAULT="utf-8"
1647# CONFIG_NLS_CODEPAGE_437 is not set
1648# CONFIG_NLS_CODEPAGE_737 is not set
1649# CONFIG_NLS_CODEPAGE_775 is not set
1650# CONFIG_NLS_CODEPAGE_850 is not set
1651# CONFIG_NLS_CODEPAGE_852 is not set
1652# CONFIG_NLS_CODEPAGE_855 is not set
1653# CONFIG_NLS_CODEPAGE_857 is not set
1654# CONFIG_NLS_CODEPAGE_860 is not set
1655# CONFIG_NLS_CODEPAGE_861 is not set
1656# CONFIG_NLS_CODEPAGE_862 is not set
1657# CONFIG_NLS_CODEPAGE_863 is not set
1658# CONFIG_NLS_CODEPAGE_864 is not set
1659# CONFIG_NLS_CODEPAGE_865 is not set
1660# CONFIG_NLS_CODEPAGE_866 is not set
1661# CONFIG_NLS_CODEPAGE_869 is not set
1662# CONFIG_NLS_CODEPAGE_936 is not set
1663# CONFIG_NLS_CODEPAGE_950 is not set
1664# CONFIG_NLS_CODEPAGE_932 is not set
1665# CONFIG_NLS_CODEPAGE_949 is not set
1666# CONFIG_NLS_CODEPAGE_874 is not set
1667# CONFIG_NLS_ISO8859_8 is not set
1668# CONFIG_NLS_CODEPAGE_1250 is not set
1669# CONFIG_NLS_CODEPAGE_1251 is not set
1670# CONFIG_NLS_ASCII is not set
1671# CONFIG_NLS_ISO8859_1 is not set
1672# CONFIG_NLS_ISO8859_2 is not set
1673# CONFIG_NLS_ISO8859_3 is not set
1674# CONFIG_NLS_ISO8859_4 is not set
1675# CONFIG_NLS_ISO8859_5 is not set
1676# CONFIG_NLS_ISO8859_6 is not set
1677# CONFIG_NLS_ISO8859_7 is not set
1678# CONFIG_NLS_ISO8859_9 is not set
1679# CONFIG_NLS_ISO8859_13 is not set
1680# CONFIG_NLS_ISO8859_14 is not set
1681# CONFIG_NLS_ISO8859_15 is not set
1682# CONFIG_NLS_KOI8_R is not set
1683# CONFIG_NLS_KOI8_U is not set
1684# CONFIG_NLS_UTF8 is not set
1685# CONFIG_DLM is not set
1686
1687#
1688# Kernel hacking
1689#
1690CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1691CONFIG_PRINTK_TIME=y
1692CONFIG_ENABLE_WARN_DEPRECATED=y
1693CONFIG_ENABLE_MUST_CHECK=y
1694CONFIG_FRAME_WARN=1024
1695# CONFIG_MAGIC_SYSRQ is not set
1696CONFIG_STRIP_ASM_SYMS=y
1697# CONFIG_UNUSED_SYMBOLS is not set
1698# CONFIG_DEBUG_FS is not set
1699# CONFIG_HEADERS_CHECK is not set
1700# CONFIG_DEBUG_KERNEL is not set
1701# CONFIG_SLUB_DEBUG_ON is not set
1702# CONFIG_SLUB_STATS is not set
1703# CONFIG_DEBUG_MEMORY_INIT is not set
1704# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1705CONFIG_SYSCTL_SYSCALL_CHECK=y
1706CONFIG_TRACING_SUPPORT=y
1707# CONFIG_FTRACE is not set
1708# CONFIG_SAMPLES is not set
1709CONFIG_HAVE_ARCH_KGDB=y
1710# CONFIG_CMDLINE_BOOL is not set
1711
1712#
1713# Security options
1714#
1715# CONFIG_KEYS is not set
1716# CONFIG_SECURITY is not set
1717# CONFIG_SECURITYFS is not set
1718# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1719CONFIG_CRYPTO=y
1720
1721#
1722# Crypto core or helper
1723#
1724CONFIG_CRYPTO_ALGAPI=y
1725CONFIG_CRYPTO_ALGAPI2=y
1726CONFIG_CRYPTO_AEAD2=y
1727CONFIG_CRYPTO_BLKCIPHER=y
1728CONFIG_CRYPTO_BLKCIPHER2=y
1729CONFIG_CRYPTO_HASH2=y
1730CONFIG_CRYPTO_RNG2=y
1731CONFIG_CRYPTO_PCOMP=y
1732CONFIG_CRYPTO_MANAGER=y
1733CONFIG_CRYPTO_MANAGER2=y
1734# CONFIG_CRYPTO_GF128MUL is not set
1735# CONFIG_CRYPTO_NULL is not set
1736CONFIG_CRYPTO_WORKQUEUE=y
1737# CONFIG_CRYPTO_CRYPTD is not set
1738# CONFIG_CRYPTO_AUTHENC is not set
1739# CONFIG_CRYPTO_TEST is not set
1740
1741#
1742# Authenticated Encryption with Associated Data
1743#
1744# CONFIG_CRYPTO_CCM is not set
1745# CONFIG_CRYPTO_GCM is not set
1746# CONFIG_CRYPTO_SEQIV is not set
1747
1748#
1749# Block modes
1750#
1751CONFIG_CRYPTO_CBC=y
1752# CONFIG_CRYPTO_CTR is not set
1753# CONFIG_CRYPTO_CTS is not set
1754# CONFIG_CRYPTO_ECB is not set
1755# CONFIG_CRYPTO_LRW is not set
1756# CONFIG_CRYPTO_PCBC is not set
1757# CONFIG_CRYPTO_XTS is not set
1758
1759#
1760# Hash modes
1761#
1762# CONFIG_CRYPTO_HMAC is not set
1763# CONFIG_CRYPTO_XCBC is not set
1764# CONFIG_CRYPTO_VMAC is not set
1765
1766#
1767# Digest
1768#
1769# CONFIG_CRYPTO_CRC32C is not set
1770# CONFIG_CRYPTO_GHASH is not set
1771# CONFIG_CRYPTO_MD4 is not set
1772# CONFIG_CRYPTO_MD5 is not set
1773# CONFIG_CRYPTO_MICHAEL_MIC is not set
1774# CONFIG_CRYPTO_RMD128 is not set
1775# CONFIG_CRYPTO_RMD160 is not set
1776# CONFIG_CRYPTO_RMD256 is not set
1777# CONFIG_CRYPTO_RMD320 is not set
1778# CONFIG_CRYPTO_SHA1 is not set
1779# CONFIG_CRYPTO_SHA256 is not set
1780# CONFIG_CRYPTO_SHA512 is not set
1781# CONFIG_CRYPTO_TGR192 is not set
1782# CONFIG_CRYPTO_WP512 is not set
1783
1784#
1785# Ciphers
1786#
1787# CONFIG_CRYPTO_AES is not set
1788# CONFIG_CRYPTO_ANUBIS is not set
1789# CONFIG_CRYPTO_ARC4 is not set
1790# CONFIG_CRYPTO_BLOWFISH is not set
1791# CONFIG_CRYPTO_CAMELLIA is not set
1792# CONFIG_CRYPTO_CAST5 is not set
1793# CONFIG_CRYPTO_CAST6 is not set
1794# CONFIG_CRYPTO_DES is not set
1795# CONFIG_CRYPTO_FCRYPT is not set
1796# CONFIG_CRYPTO_KHAZAD is not set
1797# CONFIG_CRYPTO_SALSA20 is not set
1798# CONFIG_CRYPTO_SEED is not set
1799# CONFIG_CRYPTO_SERPENT is not set
1800# CONFIG_CRYPTO_TEA is not set
1801# CONFIG_CRYPTO_TWOFISH is not set
1802
1803#
1804# Compression
1805#
1806# CONFIG_CRYPTO_DEFLATE is not set
1807# CONFIG_CRYPTO_ZLIB is not set
1808# CONFIG_CRYPTO_LZO is not set
1809
1810#
1811# Random Number Generation
1812#
1813# CONFIG_CRYPTO_ANSI_CPRNG is not set
1814CONFIG_CRYPTO_HW=y
1815# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1816# CONFIG_BINARY_PRINTF is not set
1817
1818#
1819# Library routines
1820#
1821CONFIG_BITREVERSE=y
1822CONFIG_GENERIC_FIND_LAST_BIT=y
1823# CONFIG_CRC_CCITT is not set
1824# CONFIG_CRC16 is not set
1825CONFIG_CRC_T10DIF=y
1826# CONFIG_CRC_ITU_T is not set
1827CONFIG_CRC32=y
1828# CONFIG_CRC7 is not set
1829# CONFIG_LIBCRC32C is not set
1830CONFIG_AUDIT_GENERIC=y
1831CONFIG_ZLIB_INFLATE=m
1832CONFIG_HAS_IOMEM=y
1833CONFIG_HAS_IOPORT=y
1834CONFIG_HAS_DMA=y
1835CONFIG_NLATTR=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 3f01870b4d65..d3c601206db2 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -10,7 +10,6 @@ CONFIG_MIPS=y
10# 10#
11CONFIG_ZONE_DMA=y 11CONFIG_ZONE_DMA=y
12# CONFIG_MACH_ALCHEMY is not set 12# CONFIG_MACH_ALCHEMY is not set
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_BCM47XX is not set 13# CONFIG_BCM47XX is not set
15# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
16# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
@@ -1591,7 +1590,7 @@ CONFIG_FRAME_WARN=1024
1591# CONFIG_DYNAMIC_PRINTK_DEBUG is not set 1590# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
1592# CONFIG_SAMPLES is not set 1591# CONFIG_SAMPLES is not set
1593CONFIG_HAVE_ARCH_KGDB=y 1592CONFIG_HAVE_ARCH_KGDB=y
1594CONFIG_CMDLINE="" 1593# CONFIG_CMDLINE_BOOL is not set
1595 1594
1596# 1595#
1597# Security options 1596# Security options
diff --git a/arch/mips/configs/markeins_defconfig b/arch/mips/configs/markeins_defconfig
index d001f7e87418..6a325c02b63c 100644
--- a/arch/mips/configs/markeins_defconfig
+++ b/arch/mips/configs/markeins_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -1366,7 +1365,9 @@ CONFIG_ENABLE_MUST_CHECK=y
1366# CONFIG_DEBUG_KERNEL is not set 1365# CONFIG_DEBUG_KERNEL is not set
1367CONFIG_LOG_BUF_SHIFT=14 1366CONFIG_LOG_BUF_SHIFT=14
1368CONFIG_CROSSCOMPILE=y 1367CONFIG_CROSSCOMPILE=y
1368CONFIG_CMDLINE_BOOL=y
1369CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw" 1369CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw"
1370# CONFIG_CMDLINE_OVERRIDE is not set
1370 1371
1371# 1372#
1372# Security options 1373# Security options
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig
index 7358454deaa6..f77a34e0f938 100644
--- a/arch/mips/configs/mipssim_defconfig
+++ b/arch/mips/configs/mipssim_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -635,7 +634,9 @@ CONFIG_FORCED_INLINING=y
635# CONFIG_RCU_TORTURE_TEST is not set 634# CONFIG_RCU_TORTURE_TEST is not set
636# CONFIG_FAULT_INJECTION is not set 635# CONFIG_FAULT_INJECTION is not set
637CONFIG_CROSSCOMPILE=y 636CONFIG_CROSSCOMPILE=y
637CONFIG_CMDLINE_BOOL=y
638CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp" 638CONFIG_CMDLINE="nfsroot=192.168.192.169:/u1/mipsel,timeo=20 ip=dhcp"
639# CONFIG_CMDLINE_OVERRIDE is not set
639# CONFIG_DEBUG_STACK_USAGE is not set 640# CONFIG_DEBUG_STACK_USAGE is not set
640# CONFIG_RUNTIME_DEBUG is not set 641# CONFIG_RUNTIME_DEBUG is not set
641 642
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
index 8c720e51795b..17203056b22b 100644
--- a/arch/mips/configs/mpc30x_defconfig
+++ b/arch/mips/configs/mpc30x_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -817,7 +816,9 @@ CONFIG_ENABLE_MUST_CHECK=y
817# CONFIG_HEADERS_CHECK is not set 816# CONFIG_HEADERS_CHECK is not set
818# CONFIG_DEBUG_KERNEL is not set 817# CONFIG_DEBUG_KERNEL is not set
819CONFIG_CROSSCOMPILE=y 818CONFIG_CROSSCOMPILE=y
819CONFIG_CMDLINE_BOOL=y
820CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73" 820CONFIG_CMDLINE="mem=32M console=ttyVR0,19200 ide0=0x170,0x376,73"
821# CONFIG_CMDLINE_OVERRIDE is not set
821 822
822# 823#
823# Security options 824# Security options
diff --git a/arch/mips/configs/msp71xx_defconfig b/arch/mips/configs/msp71xx_defconfig
index ecbc030b7b6c..000d185ddf42 100644
--- a/arch/mips/configs/msp71xx_defconfig
+++ b/arch/mips/configs/msp71xx_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -1412,7 +1411,7 @@ CONFIG_FORCED_INLINING=y
1412# CONFIG_RCU_TORTURE_TEST is not set 1411# CONFIG_RCU_TORTURE_TEST is not set
1413# CONFIG_FAULT_INJECTION is not set 1412# CONFIG_FAULT_INJECTION is not set
1414CONFIG_CROSSCOMPILE=y 1413CONFIG_CROSSCOMPILE=y
1415CONFIG_CMDLINE="" 1414# CONFIG_CMDLINE_BOOL is not set
1416# CONFIG_DEBUG_STACK_USAGE is not set 1415# CONFIG_DEBUG_STACK_USAGE is not set
1417# CONFIG_RUNTIME_DEBUG is not set 1416# CONFIG_RUNTIME_DEBUG is not set
1418# CONFIG_MIPS_UNCACHED is not set 1417# CONFIG_MIPS_UNCACHED is not set
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 9477f040796d..144b94d9a6ad 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11CONFIG_MACH_ALCHEMY=y 11CONFIG_MACH_ALCHEMY=y
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -3018,7 +3017,7 @@ CONFIG_MAGIC_SYSRQ=y
3018# CONFIG_HEADERS_CHECK is not set 3017# CONFIG_HEADERS_CHECK is not set
3019# CONFIG_DEBUG_KERNEL is not set 3018# CONFIG_DEBUG_KERNEL is not set
3020CONFIG_CROSSCOMPILE=y 3019CONFIG_CROSSCOMPILE=y
3021CONFIG_CMDLINE="" 3020# CONFIG_CMDLINE_BOOL is not set
3022 3021
3023# 3022#
3024# Security options 3023# Security options
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index be8091ef0a79..ddf67f639194 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_PB1100=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1083,7 +1082,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1083# CONFIG_DEBUG_KERNEL is not set 1082# CONFIG_DEBUG_KERNEL is not set
1084CONFIG_LOG_BUF_SHIFT=14 1083CONFIG_LOG_BUF_SHIFT=14
1085CONFIG_CROSSCOMPILE=y 1084CONFIG_CROSSCOMPILE=y
1086CONFIG_CMDLINE="" 1085# CONFIG_CMDLINE_BOOL is not set
1087 1086
1088# 1087#
1089# Security options 1088# Security options
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index e74ba794c789..5ec60836b645 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_PB1500=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1200,7 +1199,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1200# CONFIG_DEBUG_KERNEL is not set 1199# CONFIG_DEBUG_KERNEL is not set
1201CONFIG_LOG_BUF_SHIFT=14 1200CONFIG_LOG_BUF_SHIFT=14
1202CONFIG_CROSSCOMPILE=y 1201CONFIG_CROSSCOMPILE=y
1203CONFIG_CMDLINE="" 1202# CONFIG_CMDLINE_BOOL is not set
1204 1203
1205# 1204#
1206# Security options 1205# Security options
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig
index 1d896fd830da..6647642b5d97 100644
--- a/arch/mips/configs/pb1550_defconfig
+++ b/arch/mips/configs/pb1550_defconfig
@@ -23,7 +23,6 @@ CONFIG_MIPS_PB1550=y
23# CONFIG_MIPS_DB1550 is not set 23# CONFIG_MIPS_DB1550 is not set
24# CONFIG_MIPS_DB1200 is not set 24# CONFIG_MIPS_DB1200 is not set
25# CONFIG_MIPS_MIRAGE is not set 25# CONFIG_MIPS_MIRAGE is not set
26# CONFIG_BASLER_EXCITE is not set
27# CONFIG_MIPS_COBALT is not set 26# CONFIG_MIPS_COBALT is not set
28# CONFIG_MACH_DECSTATION is not set 27# CONFIG_MACH_DECSTATION is not set
29# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
@@ -1193,7 +1192,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1193# CONFIG_DEBUG_KERNEL is not set 1192# CONFIG_DEBUG_KERNEL is not set
1194CONFIG_LOG_BUF_SHIFT=14 1193CONFIG_LOG_BUF_SHIFT=14
1195CONFIG_CROSSCOMPILE=y 1194CONFIG_CROSSCOMPILE=y
1196CONFIG_CMDLINE="" 1195# CONFIG_CMDLINE_BOOL is not set
1197 1196
1198# 1197#
1199# Security options 1198# Security options
diff --git a/arch/mips/configs/pnx8335-stb225_defconfig b/arch/mips/configs/pnx8335-stb225_defconfig
index fef4d31c2055..848344d588d1 100644
--- a/arch/mips/configs/pnx8335-stb225_defconfig
+++ b/arch/mips/configs/pnx8335-stb225_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1034,7 +1033,7 @@ CONFIG_FRAME_WARN=1024
1034# CONFIG_DEBUG_KERNEL is not set 1033# CONFIG_DEBUG_KERNEL is not set
1035# CONFIG_SAMPLES is not set 1034# CONFIG_SAMPLES is not set
1036# CONFIG_KERNEL_TESTS is not set 1035# CONFIG_KERNEL_TESTS is not set
1037CONFIG_CMDLINE="" 1036# CONFIG_CMDLINE_BOOL is not set
1038 1037
1039# 1038#
1040# Security options 1039# Security options
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig
index e10c7116c3c2..9d721fdccb30 100644
--- a/arch/mips/configs/pnx8550-jbs_defconfig
+++ b/arch/mips/configs/pnx8550-jbs_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -1215,7 +1214,9 @@ CONFIG_DEBUG_MUTEXES=y
1215CONFIG_FORCED_INLINING=y 1214CONFIG_FORCED_INLINING=y
1216# CONFIG_RCU_TORTURE_TEST is not set 1215# CONFIG_RCU_TORTURE_TEST is not set
1217CONFIG_CROSSCOMPILE=y 1216CONFIG_CROSSCOMPILE=y
1217CONFIG_CMDLINE_BOOL=y
1218CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp" 1218CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp"
1219# CONFIG_CMDLINE_OVERRIDE is not set
1219# CONFIG_DEBUG_STACK_USAGE is not set 1220# CONFIG_DEBUG_STACK_USAGE is not set
1220# CONFIG_RUNTIME_DEBUG is not set 1221# CONFIG_RUNTIME_DEBUG is not set
1221 1222
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig
index 5ed3c8dfa0a1..ab07ec08c6fa 100644
--- a/arch/mips/configs/pnx8550-stb810_defconfig
+++ b/arch/mips/configs/pnx8550-stb810_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -1205,7 +1204,9 @@ CONFIG_DEBUG_SLAB=y
1205CONFIG_FORCED_INLINING=y 1204CONFIG_FORCED_INLINING=y
1206# CONFIG_RCU_TORTURE_TEST is not set 1205# CONFIG_RCU_TORTURE_TEST is not set
1207CONFIG_CROSSCOMPILE=y 1206CONFIG_CROSSCOMPILE=y
1207CONFIG_CMDLINE_BOOL=y
1208CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp" 1208CONFIG_CMDLINE="console=ttyS1,38400n8 root=/dev/nfs ip=bootp"
1209# CONFIG_CMDLINE_OVERRIDE is not set
1209# CONFIG_DEBUG_STACK_USAGE is not set 1210# CONFIG_DEBUG_STACK_USAGE is not set
1210# CONFIG_RUNTIME_DEBUG is not set 1211# CONFIG_RUNTIME_DEBUG is not set
1211 1212
diff --git a/arch/mips/configs/powertv_defconfig b/arch/mips/configs/powertv_defconfig
new file mode 100644
index 000000000000..7291633d81cc
--- /dev/null
+++ b/arch/mips/configs/powertv_defconfig
@@ -0,0 +1,1550 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.31-rc5
4# Fri Aug 28 14:49:33 2009
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_AR7 is not set
13# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set
16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set
18# CONFIG_LEMOTE_FULONG is not set
19# CONFIG_MIPS_MALTA is not set
20# CONFIG_MIPS_SIM is not set
21# CONFIG_NEC_MARKEINS is not set
22# CONFIG_MACH_VR41XX is not set
23# CONFIG_NXP_STB220 is not set
24# CONFIG_NXP_STB225 is not set
25# CONFIG_PNX8550_JBS is not set
26# CONFIG_PNX8550_STB810 is not set
27# CONFIG_PMC_MSP is not set
28# CONFIG_PMC_YOSEMITE is not set
29CONFIG_POWERTV=y
30# CONFIG_SGI_IP22 is not set
31# CONFIG_SGI_IP27 is not set
32# CONFIG_SGI_IP28 is not set
33# CONFIG_SGI_IP32 is not set
34# CONFIG_SIBYTE_CRHINE is not set
35# CONFIG_SIBYTE_CARMEL is not set
36# CONFIG_SIBYTE_CRHONE is not set
37# CONFIG_SIBYTE_RHONE is not set
38# CONFIG_SIBYTE_SWARM is not set
39# CONFIG_SIBYTE_LITTLESUR is not set
40# CONFIG_SIBYTE_SENTOSA is not set
41# CONFIG_SIBYTE_BIGSUR is not set
42# CONFIG_SNI_RM is not set
43# CONFIG_MACH_TX39XX is not set
44# CONFIG_MACH_TX49XX is not set
45# CONFIG_MIKROTIK_RB532 is not set
46# CONFIG_WR_PPMC is not set
47# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
48# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
49# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
50# CONFIG_MIN_RUNTIME_RESOURCES is not set
51# CONFIG_BOOTLOADER_DRIVER is not set
52CONFIG_BOOTLOADER_FAMILY="R2"
53CONFIG_CSRC_POWERTV=y
54CONFIG_RWSEM_GENERIC_SPINLOCK=y
55# CONFIG_ARCH_HAS_ILOG2_U32 is not set
56# CONFIG_ARCH_HAS_ILOG2_U64 is not set
57CONFIG_ARCH_SUPPORTS_OPROFILE=y
58CONFIG_GENERIC_FIND_NEXT_BIT=y
59CONFIG_GENERIC_HWEIGHT=y
60CONFIG_GENERIC_CALIBRATE_DELAY=y
61CONFIG_GENERIC_CLOCKEVENTS=y
62CONFIG_GENERIC_TIME=y
63CONFIG_GENERIC_CMOS_UPDATE=y
64CONFIG_SCHED_OMIT_FRAME_POINTER=y
65CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
66CONFIG_CEVT_R4K_LIB=y
67CONFIG_CEVT_R4K=y
68CONFIG_DMA_NONCOHERENT=y
69CONFIG_DMA_NEED_PCI_MAP_STATE=y
70# CONFIG_EARLY_PRINTK is not set
71CONFIG_SYS_HAS_EARLY_PRINTK=y
72# CONFIG_NO_IOPORT is not set
73CONFIG_CPU_BIG_ENDIAN=y
74# CONFIG_CPU_LITTLE_ENDIAN is not set
75CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
76CONFIG_BOOT_ELF32=y
77CONFIG_MIPS_L1_CACHE_SHIFT=5
78
79#
80# CPU selection
81#
82# CONFIG_CPU_LOONGSON2 is not set
83# CONFIG_CPU_MIPS32_R1 is not set
84CONFIG_CPU_MIPS32_R2=y
85# CONFIG_CPU_MIPS64_R1 is not set
86# CONFIG_CPU_MIPS64_R2 is not set
87# CONFIG_CPU_R3000 is not set
88# CONFIG_CPU_TX39XX is not set
89# CONFIG_CPU_VR41XX is not set
90# CONFIG_CPU_R4300 is not set
91# CONFIG_CPU_R4X00 is not set
92# CONFIG_CPU_TX49XX is not set
93# CONFIG_CPU_R5000 is not set
94# CONFIG_CPU_R5432 is not set
95# CONFIG_CPU_R5500 is not set
96# CONFIG_CPU_R6000 is not set
97# CONFIG_CPU_NEVADA is not set
98# CONFIG_CPU_R8000 is not set
99# CONFIG_CPU_R10000 is not set
100# CONFIG_CPU_RM7000 is not set
101# CONFIG_CPU_RM9000 is not set
102# CONFIG_CPU_SB1 is not set
103# CONFIG_CPU_CAVIUM_OCTEON is not set
104CONFIG_SYS_HAS_CPU_MIPS32_R2=y
105CONFIG_CPU_MIPS32=y
106CONFIG_CPU_MIPSR2=y
107CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
108CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
109CONFIG_HARDWARE_WATCHPOINTS=y
110
111#
112# Kernel type
113#
114CONFIG_32BIT=y
115# CONFIG_64BIT is not set
116CONFIG_PAGE_SIZE_4KB=y
117# CONFIG_PAGE_SIZE_8KB is not set
118# CONFIG_PAGE_SIZE_16KB is not set
119# CONFIG_PAGE_SIZE_32KB is not set
120# CONFIG_PAGE_SIZE_64KB is not set
121CONFIG_CPU_HAS_PREFETCH=y
122CONFIG_MIPS_MT_DISABLED=y
123# CONFIG_MIPS_MT_SMP is not set
124# CONFIG_MIPS_MT_SMTC is not set
125CONFIG_CPU_HAS_LLSC=y
126CONFIG_CPU_MIPSR2_IRQ_VI=y
127CONFIG_CPU_MIPSR2_IRQ_EI=y
128CONFIG_CPU_HAS_SYNC=y
129CONFIG_GENERIC_HARDIRQS=y
130CONFIG_GENERIC_IRQ_PROBE=y
131# CONFIG_HIGHMEM is not set
132CONFIG_CPU_SUPPORTS_HIGHMEM=y
133CONFIG_SYS_SUPPORTS_HIGHMEM=y
134CONFIG_ARCH_FLATMEM_ENABLE=y
135CONFIG_ARCH_POPULATES_NODE_MAP=y
136CONFIG_SELECT_MEMORY_MODEL=y
137CONFIG_FLATMEM_MANUAL=y
138# CONFIG_DISCONTIGMEM_MANUAL is not set
139# CONFIG_SPARSEMEM_MANUAL is not set
140CONFIG_FLATMEM=y
141CONFIG_FLAT_NODE_MEM_MAP=y
142CONFIG_PAGEFLAGS_EXTENDED=y
143CONFIG_SPLIT_PTLOCK_CPUS=4
144# CONFIG_PHYS_ADDR_T_64BIT is not set
145CONFIG_ZONE_DMA_FLAG=0
146CONFIG_VIRT_TO_BUS=y
147CONFIG_HAVE_MLOCK=y
148CONFIG_HAVE_MLOCKED_PAGE_BIT=y
149CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
150CONFIG_TICK_ONESHOT=y
151CONFIG_NO_HZ=y
152CONFIG_HIGH_RES_TIMERS=y
153CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
154# CONFIG_HZ_48 is not set
155# CONFIG_HZ_100 is not set
156# CONFIG_HZ_128 is not set
157# CONFIG_HZ_250 is not set
158# CONFIG_HZ_256 is not set
159CONFIG_HZ_1000=y
160# CONFIG_HZ_1024 is not set
161CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
162CONFIG_HZ=1000
163# CONFIG_PREEMPT_NONE is not set
164# CONFIG_PREEMPT_VOLUNTARY is not set
165CONFIG_PREEMPT=y
166# CONFIG_KEXEC is not set
167# CONFIG_SECCOMP is not set
168CONFIG_LOCKDEP_SUPPORT=y
169CONFIG_STACKTRACE_SUPPORT=y
170CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
171CONFIG_CONSTRUCTORS=y
172
173#
174# General setup
175#
176CONFIG_EXPERIMENTAL=y
177CONFIG_BROKEN_ON_SMP=y
178CONFIG_LOCK_KERNEL=y
179CONFIG_INIT_ENV_ARG_LIMIT=32
180CONFIG_LOCALVERSION=""
181CONFIG_LOCALVERSION_AUTO=y
182# CONFIG_SWAP is not set
183CONFIG_SYSVIPC=y
184CONFIG_SYSVIPC_SYSCTL=y
185# CONFIG_POSIX_MQUEUE is not set
186# CONFIG_BSD_PROCESS_ACCT is not set
187# CONFIG_TASKSTATS is not set
188# CONFIG_AUDIT is not set
189
190#
191# RCU Subsystem
192#
193CONFIG_CLASSIC_RCU=y
194# CONFIG_TREE_RCU is not set
195# CONFIG_PREEMPT_RCU is not set
196# CONFIG_TREE_RCU_TRACE is not set
197# CONFIG_PREEMPT_RCU_TRACE is not set
198# CONFIG_IKCONFIG is not set
199CONFIG_LOG_BUF_SHIFT=16
200CONFIG_GROUP_SCHED=y
201CONFIG_FAIR_GROUP_SCHED=y
202# CONFIG_RT_GROUP_SCHED is not set
203CONFIG_USER_SCHED=y
204# CONFIG_CGROUP_SCHED is not set
205# CONFIG_CGROUPS is not set
206# CONFIG_SYSFS_DEPRECATED_V2 is not set
207CONFIG_RELAY=y
208# CONFIG_NAMESPACES is not set
209CONFIG_BLK_DEV_INITRD=y
210CONFIG_INITRAMFS_SOURCE=""
211# CONFIG_RD_GZIP is not set
212# CONFIG_RD_BZIP2 is not set
213# CONFIG_RD_LZMA is not set
214# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
215CONFIG_SYSCTL=y
216CONFIG_ANON_INODES=y
217CONFIG_EMBEDDED=y
218# CONFIG_SYSCTL_SYSCALL is not set
219CONFIG_KALLSYMS=y
220CONFIG_KALLSYMS_ALL=y
221# CONFIG_KALLSYMS_EXTRA_PASS is not set
222CONFIG_HOTPLUG=y
223CONFIG_PRINTK=y
224CONFIG_BUG=y
225CONFIG_ELF_CORE=y
226# CONFIG_PCSPKR_PLATFORM is not set
227CONFIG_BASE_FULL=y
228CONFIG_FUTEX=y
229# CONFIG_EPOLL is not set
230# CONFIG_SIGNALFD is not set
231CONFIG_TIMERFD=y
232# CONFIG_EVENTFD is not set
233CONFIG_SHMEM=y
234CONFIG_AIO=y
235
236#
237# Performance Counters
238#
239# CONFIG_VM_EVENT_COUNTERS is not set
240CONFIG_PCI_QUIRKS=y
241# CONFIG_SLUB_DEBUG is not set
242# CONFIG_STRIP_ASM_SYMS is not set
243CONFIG_COMPAT_BRK=y
244# CONFIG_SLAB is not set
245CONFIG_SLUB=y
246# CONFIG_SLOB is not set
247# CONFIG_PROFILING is not set
248# CONFIG_MARKERS is not set
249CONFIG_HAVE_OPROFILE=y
250
251#
252# GCOV-based kernel profiling
253#
254# CONFIG_GCOV_KERNEL is not set
255# CONFIG_SLOW_WORK is not set
256# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
257CONFIG_RT_MUTEXES=y
258CONFIG_BASE_SMALL=0
259CONFIG_MODULES=y
260# CONFIG_MODULE_FORCE_LOAD is not set
261CONFIG_MODULE_UNLOAD=y
262# CONFIG_MODULE_FORCE_UNLOAD is not set
263CONFIG_MODVERSIONS=y
264CONFIG_MODULE_SRCVERSION_ALL=y
265CONFIG_BLOCK=y
266CONFIG_LBDAF=y
267# CONFIG_BLK_DEV_BSG is not set
268# CONFIG_BLK_DEV_INTEGRITY is not set
269
270#
271# IO Schedulers
272#
273CONFIG_IOSCHED_NOOP=y
274# CONFIG_IOSCHED_AS is not set
275# CONFIG_IOSCHED_DEADLINE is not set
276# CONFIG_IOSCHED_CFQ is not set
277# CONFIG_DEFAULT_AS is not set
278# CONFIG_DEFAULT_DEADLINE is not set
279# CONFIG_DEFAULT_CFQ is not set
280CONFIG_DEFAULT_NOOP=y
281CONFIG_DEFAULT_IOSCHED="noop"
282# CONFIG_PROBE_INITRD_HEADER is not set
283# CONFIG_FREEZER is not set
284
285#
286# Bus options (PCI, PCMCIA, EISA, ISA, TC)
287#
288CONFIG_HW_HAS_PCI=y
289CONFIG_PCI=y
290CONFIG_PCI_DOMAINS=y
291# CONFIG_ARCH_SUPPORTS_MSI is not set
292# CONFIG_PCI_LEGACY is not set
293# CONFIG_PCI_DEBUG is not set
294# CONFIG_PCI_STUB is not set
295# CONFIG_PCI_IOV is not set
296CONFIG_MMU=y
297# CONFIG_PCCARD is not set
298# CONFIG_HOTPLUG_PCI is not set
299
300#
301# Executable file formats
302#
303CONFIG_BINFMT_ELF=y
304# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
305# CONFIG_HAVE_AOUT is not set
306# CONFIG_BINFMT_MISC is not set
307CONFIG_TRAD_SIGNALS=y
308
309#
310# Power management options
311#
312CONFIG_ARCH_HIBERNATION_POSSIBLE=y
313CONFIG_ARCH_SUSPEND_POSSIBLE=y
314# CONFIG_PM is not set
315CONFIG_NET=y
316
317#
318# Networking options
319#
320CONFIG_PACKET=y
321CONFIG_PACKET_MMAP=y
322CONFIG_UNIX=y
323CONFIG_XFRM=y
324# CONFIG_XFRM_USER is not set
325# CONFIG_XFRM_SUB_POLICY is not set
326# CONFIG_XFRM_MIGRATE is not set
327# CONFIG_XFRM_STATISTICS is not set
328CONFIG_XFRM_IPCOMP=y
329# CONFIG_NET_KEY is not set
330CONFIG_INET=y
331CONFIG_IP_MULTICAST=y
332CONFIG_IP_ADVANCED_ROUTER=y
333CONFIG_ASK_IP_FIB_HASH=y
334# CONFIG_IP_FIB_TRIE is not set
335CONFIG_IP_FIB_HASH=y
336# CONFIG_IP_MULTIPLE_TABLES is not set
337# CONFIG_IP_ROUTE_MULTIPATH is not set
338# CONFIG_IP_ROUTE_VERBOSE is not set
339CONFIG_IP_PNP=y
340# CONFIG_IP_PNP_DHCP is not set
341# CONFIG_IP_PNP_BOOTP is not set
342# CONFIG_IP_PNP_RARP is not set
343# CONFIG_NET_IPIP is not set
344# CONFIG_NET_IPGRE is not set
345# CONFIG_IP_MROUTE is not set
346# CONFIG_ARPD is not set
347CONFIG_SYN_COOKIES=y
348# CONFIG_INET_AH is not set
349# CONFIG_INET_ESP is not set
350# CONFIG_INET_IPCOMP is not set
351# CONFIG_INET_XFRM_TUNNEL is not set
352# CONFIG_INET_TUNNEL is not set
353# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
354# CONFIG_INET_XFRM_MODE_TUNNEL is not set
355# CONFIG_INET_XFRM_MODE_BEET is not set
356# CONFIG_INET_LRO is not set
357# CONFIG_INET_DIAG is not set
358# CONFIG_TCP_CONG_ADVANCED is not set
359CONFIG_TCP_CONG_CUBIC=y
360CONFIG_DEFAULT_TCP_CONG="cubic"
361# CONFIG_TCP_MD5SIG is not set
362CONFIG_IPV6=y
363CONFIG_IPV6_PRIVACY=y
364# CONFIG_IPV6_ROUTER_PREF is not set
365# CONFIG_IPV6_OPTIMISTIC_DAD is not set
366CONFIG_INET6_AH=y
367CONFIG_INET6_ESP=y
368CONFIG_INET6_IPCOMP=y
369# CONFIG_IPV6_MIP6 is not set
370CONFIG_INET6_XFRM_TUNNEL=y
371CONFIG_INET6_TUNNEL=y
372# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
373# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
374# CONFIG_INET6_XFRM_MODE_BEET is not set
375# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
376# CONFIG_IPV6_SIT is not set
377CONFIG_IPV6_TUNNEL=y
378# CONFIG_IPV6_MULTIPLE_TABLES is not set
379# CONFIG_IPV6_MROUTE is not set
380# CONFIG_NETWORK_SECMARK is not set
381CONFIG_NETFILTER=y
382# CONFIG_NETFILTER_DEBUG is not set
383CONFIG_NETFILTER_ADVANCED=y
384# CONFIG_BRIDGE_NETFILTER is not set
385
386#
387# Core Netfilter Configuration
388#
389# CONFIG_NETFILTER_NETLINK_QUEUE is not set
390# CONFIG_NETFILTER_NETLINK_LOG is not set
391# CONFIG_NF_CONNTRACK is not set
392CONFIG_NETFILTER_XTABLES=y
393# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
394# CONFIG_NETFILTER_XT_TARGET_MARK is not set
395# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
396# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
397# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
398# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
399# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
400# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
401# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
402# CONFIG_NETFILTER_XT_MATCH_ESP is not set
403# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
404# CONFIG_NETFILTER_XT_MATCH_HL is not set
405# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
406# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
407# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
408# CONFIG_NETFILTER_XT_MATCH_MAC is not set
409# CONFIG_NETFILTER_XT_MATCH_MARK is not set
410CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
411# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
412# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
413# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
414# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
415# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
416# CONFIG_NETFILTER_XT_MATCH_REALM is not set
417# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
418# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
419# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
420# CONFIG_NETFILTER_XT_MATCH_STRING is not set
421# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
422# CONFIG_NETFILTER_XT_MATCH_TIME is not set
423# CONFIG_NETFILTER_XT_MATCH_U32 is not set
424# CONFIG_IP_VS is not set
425
426#
427# IP: Netfilter Configuration
428#
429# CONFIG_NF_DEFRAG_IPV4 is not set
430# CONFIG_IP_NF_QUEUE is not set
431CONFIG_IP_NF_IPTABLES=y
432# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
433# CONFIG_IP_NF_MATCH_AH is not set
434# CONFIG_IP_NF_MATCH_ECN is not set
435# CONFIG_IP_NF_MATCH_TTL is not set
436CONFIG_IP_NF_FILTER=y
437# CONFIG_IP_NF_TARGET_REJECT is not set
438# CONFIG_IP_NF_TARGET_LOG is not set
439# CONFIG_IP_NF_TARGET_ULOG is not set
440# CONFIG_IP_NF_MANGLE is not set
441# CONFIG_IP_NF_TARGET_TTL is not set
442# CONFIG_IP_NF_RAW is not set
443CONFIG_IP_NF_ARPTABLES=y
444CONFIG_IP_NF_ARPFILTER=y
445# CONFIG_IP_NF_ARP_MANGLE is not set
446
447#
448# IPv6: Netfilter Configuration
449#
450# CONFIG_IP6_NF_QUEUE is not set
451CONFIG_IP6_NF_IPTABLES=y
452# CONFIG_IP6_NF_MATCH_AH is not set
453# CONFIG_IP6_NF_MATCH_EUI64 is not set
454# CONFIG_IP6_NF_MATCH_FRAG is not set
455# CONFIG_IP6_NF_MATCH_OPTS is not set
456# CONFIG_IP6_NF_MATCH_HL is not set
457# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
458# CONFIG_IP6_NF_MATCH_MH is not set
459# CONFIG_IP6_NF_MATCH_RT is not set
460# CONFIG_IP6_NF_TARGET_HL is not set
461# CONFIG_IP6_NF_TARGET_LOG is not set
462CONFIG_IP6_NF_FILTER=y
463# CONFIG_IP6_NF_TARGET_REJECT is not set
464# CONFIG_IP6_NF_MANGLE is not set
465# CONFIG_IP6_NF_RAW is not set
466# CONFIG_IP_DCCP is not set
467# CONFIG_IP_SCTP is not set
468# CONFIG_TIPC is not set
469# CONFIG_ATM is not set
470CONFIG_STP=y
471CONFIG_BRIDGE=y
472# CONFIG_NET_DSA is not set
473# CONFIG_VLAN_8021Q is not set
474# CONFIG_DECNET is not set
475CONFIG_LLC=y
476# CONFIG_LLC2 is not set
477# CONFIG_IPX is not set
478# CONFIG_ATALK is not set
479# CONFIG_X25 is not set
480# CONFIG_LAPB is not set
481# CONFIG_ECONET is not set
482# CONFIG_WAN_ROUTER is not set
483# CONFIG_PHONET is not set
484# CONFIG_IEEE802154 is not set
485CONFIG_NET_SCHED=y
486
487#
488# Queueing/Scheduling
489#
490# CONFIG_NET_SCH_CBQ is not set
491# CONFIG_NET_SCH_HTB is not set
492# CONFIG_NET_SCH_HFSC is not set
493# CONFIG_NET_SCH_PRIO is not set
494# CONFIG_NET_SCH_MULTIQ is not set
495# CONFIG_NET_SCH_RED is not set
496# CONFIG_NET_SCH_SFQ is not set
497# CONFIG_NET_SCH_TEQL is not set
498CONFIG_NET_SCH_TBF=y
499# CONFIG_NET_SCH_GRED is not set
500# CONFIG_NET_SCH_DSMARK is not set
501# CONFIG_NET_SCH_NETEM is not set
502# CONFIG_NET_SCH_DRR is not set
503
504#
505# Classification
506#
507# CONFIG_NET_CLS_BASIC is not set
508# CONFIG_NET_CLS_TCINDEX is not set
509# CONFIG_NET_CLS_ROUTE4 is not set
510# CONFIG_NET_CLS_FW is not set
511# CONFIG_NET_CLS_U32 is not set
512# CONFIG_NET_CLS_RSVP is not set
513# CONFIG_NET_CLS_RSVP6 is not set
514# CONFIG_NET_CLS_FLOW is not set
515# CONFIG_NET_EMATCH is not set
516# CONFIG_NET_CLS_ACT is not set
517CONFIG_NET_SCH_FIFO=y
518# CONFIG_DCB is not set
519
520#
521# Network testing
522#
523# CONFIG_NET_PKTGEN is not set
524# CONFIG_HAMRADIO is not set
525# CONFIG_CAN is not set
526# CONFIG_IRDA is not set
527# CONFIG_BT is not set
528# CONFIG_AF_RXRPC is not set
529# CONFIG_WIRELESS is not set
530# CONFIG_WIMAX is not set
531# CONFIG_RFKILL is not set
532# CONFIG_NET_9P is not set
533
534#
535# Device Drivers
536#
537
538#
539# Generic Driver Options
540#
541CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
542CONFIG_STANDALONE=y
543CONFIG_PREVENT_FIRMWARE_BUILD=y
544CONFIG_FW_LOADER=y
545CONFIG_FIRMWARE_IN_KERNEL=y
546CONFIG_EXTRA_FIRMWARE=""
547# CONFIG_DEBUG_DRIVER is not set
548# CONFIG_DEBUG_DEVRES is not set
549# CONFIG_SYS_HYPERVISOR is not set
550# CONFIG_CONNECTOR is not set
551CONFIG_MTD=y
552# CONFIG_MTD_DEBUG is not set
553# CONFIG_MTD_CONCAT is not set
554CONFIG_MTD_PARTITIONS=y
555# CONFIG_MTD_TESTS is not set
556# CONFIG_MTD_REDBOOT_PARTS is not set
557CONFIG_MTD_CMDLINE_PARTS=y
558# CONFIG_MTD_AR7_PARTS is not set
559
560#
561# User Modules And Translation Layers
562#
563CONFIG_MTD_CHAR=y
564CONFIG_MTD_BLKDEVS=y
565CONFIG_MTD_BLOCK=y
566# CONFIG_FTL is not set
567# CONFIG_NFTL is not set
568# CONFIG_INFTL is not set
569# CONFIG_RFD_FTL is not set
570# CONFIG_SSFDC is not set
571# CONFIG_MTD_OOPS is not set
572
573#
574# RAM/ROM/Flash chip drivers
575#
576# CONFIG_MTD_CFI is not set
577# CONFIG_MTD_JEDECPROBE is not set
578CONFIG_MTD_MAP_BANK_WIDTH_1=y
579CONFIG_MTD_MAP_BANK_WIDTH_2=y
580CONFIG_MTD_MAP_BANK_WIDTH_4=y
581# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
582# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
583# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
584CONFIG_MTD_CFI_I1=y
585CONFIG_MTD_CFI_I2=y
586# CONFIG_MTD_CFI_I4 is not set
587# CONFIG_MTD_CFI_I8 is not set
588# CONFIG_MTD_RAM is not set
589# CONFIG_MTD_ROM is not set
590# CONFIG_MTD_ABSENT is not set
591
592#
593# Mapping drivers for chip access
594#
595# CONFIG_MTD_COMPLEX_MAPPINGS is not set
596# CONFIG_MTD_INTEL_VR_NOR is not set
597# CONFIG_MTD_PLATRAM is not set
598
599#
600# Self-contained MTD device drivers
601#
602# CONFIG_MTD_PMC551 is not set
603# CONFIG_MTD_SLRAM is not set
604# CONFIG_MTD_PHRAM is not set
605# CONFIG_MTD_MTDRAM is not set
606# CONFIG_MTD_BLOCK2MTD is not set
607
608#
609# Disk-On-Chip Device Drivers
610#
611# CONFIG_MTD_DOC2000 is not set
612# CONFIG_MTD_DOC2001 is not set
613# CONFIG_MTD_DOC2001PLUS is not set
614CONFIG_MTD_NAND=y
615# CONFIG_MTD_NAND_VERIFY_WRITE is not set
616# CONFIG_MTD_NAND_ECC_SMC is not set
617# CONFIG_MTD_NAND_MUSEUM_IDS is not set
618CONFIG_MTD_NAND_IDS=y
619# CONFIG_MTD_NAND_DISKONCHIP is not set
620# CONFIG_MTD_NAND_CAFE is not set
621# CONFIG_MTD_NAND_NANDSIM is not set
622# CONFIG_MTD_NAND_PLATFORM is not set
623# CONFIG_MTD_ALAUDA is not set
624# CONFIG_MTD_ONENAND is not set
625
626#
627# LPDDR flash memory drivers
628#
629# CONFIG_MTD_LPDDR is not set
630
631#
632# UBI - Unsorted block images
633#
634# CONFIG_MTD_UBI is not set
635# CONFIG_PARPORT is not set
636CONFIG_BLK_DEV=y
637# CONFIG_BLK_CPQ_DA is not set
638# CONFIG_BLK_CPQ_CISS_DA is not set
639# CONFIG_BLK_DEV_DAC960 is not set
640# CONFIG_BLK_DEV_UMEM is not set
641# CONFIG_BLK_DEV_COW_COMMON is not set
642CONFIG_BLK_DEV_LOOP=y
643# CONFIG_BLK_DEV_CRYPTOLOOP is not set
644# CONFIG_BLK_DEV_NBD is not set
645# CONFIG_BLK_DEV_SX8 is not set
646# CONFIG_BLK_DEV_UB is not set
647CONFIG_BLK_DEV_RAM=y
648CONFIG_BLK_DEV_RAM_COUNT=16
649CONFIG_BLK_DEV_RAM_SIZE=32768
650# CONFIG_BLK_DEV_XIP is not set
651# CONFIG_CDROM_PKTCDVD is not set
652# CONFIG_ATA_OVER_ETH is not set
653# CONFIG_BLK_DEV_HD is not set
654# CONFIG_MISC_DEVICES is not set
655CONFIG_HAVE_IDE=y
656# CONFIG_IDE is not set
657
658#
659# SCSI device support
660#
661# CONFIG_RAID_ATTRS is not set
662CONFIG_SCSI=y
663CONFIG_SCSI_DMA=y
664# CONFIG_SCSI_TGT is not set
665# CONFIG_SCSI_NETLINK is not set
666# CONFIG_SCSI_PROC_FS is not set
667
668#
669# SCSI support type (disk, tape, CD-ROM)
670#
671CONFIG_BLK_DEV_SD=y
672# CONFIG_CHR_DEV_ST is not set
673# CONFIG_CHR_DEV_OSST is not set
674# CONFIG_BLK_DEV_SR is not set
675# CONFIG_CHR_DEV_SG is not set
676# CONFIG_CHR_DEV_SCH is not set
677# CONFIG_SCSI_MULTI_LUN is not set
678# CONFIG_SCSI_CONSTANTS is not set
679# CONFIG_SCSI_LOGGING is not set
680# CONFIG_SCSI_SCAN_ASYNC is not set
681CONFIG_SCSI_WAIT_SCAN=m
682
683#
684# SCSI Transports
685#
686# CONFIG_SCSI_SPI_ATTRS is not set
687# CONFIG_SCSI_FC_ATTRS is not set
688# CONFIG_SCSI_ISCSI_ATTRS is not set
689# CONFIG_SCSI_SAS_LIBSAS is not set
690# CONFIG_SCSI_SRP_ATTRS is not set
691# CONFIG_SCSI_LOWLEVEL is not set
692# CONFIG_SCSI_DH is not set
693# CONFIG_SCSI_OSD_INITIATOR is not set
694CONFIG_ATA=y
695# CONFIG_ATA_NONSTANDARD is not set
696CONFIG_SATA_PMP=y
697# CONFIG_SATA_AHCI is not set
698# CONFIG_SATA_SIL24 is not set
699CONFIG_ATA_SFF=y
700# CONFIG_SATA_SVW is not set
701# CONFIG_ATA_PIIX is not set
702# CONFIG_SATA_MV is not set
703# CONFIG_SATA_NV is not set
704# CONFIG_PDC_ADMA is not set
705# CONFIG_SATA_QSTOR is not set
706# CONFIG_SATA_PROMISE is not set
707# CONFIG_SATA_SX4 is not set
708# CONFIG_SATA_SIL is not set
709# CONFIG_SATA_SIS is not set
710# CONFIG_SATA_ULI is not set
711# CONFIG_SATA_VIA is not set
712# CONFIG_SATA_VITESSE is not set
713# CONFIG_SATA_INIC162X is not set
714# CONFIG_PATA_ALI is not set
715# CONFIG_PATA_AMD is not set
716# CONFIG_PATA_ARTOP is not set
717# CONFIG_PATA_ATIIXP is not set
718# CONFIG_PATA_CMD640_PCI is not set
719# CONFIG_PATA_CMD64X is not set
720# CONFIG_PATA_CS5520 is not set
721# CONFIG_PATA_CS5530 is not set
722# CONFIG_PATA_CYPRESS is not set
723# CONFIG_PATA_EFAR is not set
724# CONFIG_ATA_GENERIC is not set
725# CONFIG_PATA_HPT366 is not set
726# CONFIG_PATA_HPT37X is not set
727# CONFIG_PATA_HPT3X2N is not set
728# CONFIG_PATA_HPT3X3 is not set
729# CONFIG_PATA_IT821X is not set
730# CONFIG_PATA_IT8213 is not set
731# CONFIG_PATA_JMICRON is not set
732# CONFIG_PATA_TRIFLEX is not set
733# CONFIG_PATA_MARVELL is not set
734# CONFIG_PATA_MPIIX is not set
735# CONFIG_PATA_OLDPIIX is not set
736# CONFIG_PATA_NETCELL is not set
737# CONFIG_PATA_NINJA32 is not set
738# CONFIG_PATA_NS87410 is not set
739# CONFIG_PATA_NS87415 is not set
740# CONFIG_PATA_OPTI is not set
741# CONFIG_PATA_OPTIDMA is not set
742# CONFIG_PATA_PDC_OLD is not set
743# CONFIG_PATA_RADISYS is not set
744# CONFIG_PATA_RZ1000 is not set
745# CONFIG_PATA_SC1200 is not set
746# CONFIG_PATA_SERVERWORKS is not set
747# CONFIG_PATA_PDC2027X is not set
748# CONFIG_PATA_SIL680 is not set
749# CONFIG_PATA_SIS is not set
750# CONFIG_PATA_VIA is not set
751# CONFIG_PATA_WINBOND is not set
752# CONFIG_PATA_PLATFORM is not set
753# CONFIG_PATA_SCH is not set
754# CONFIG_MD is not set
755# CONFIG_FUSION is not set
756
757#
758# IEEE 1394 (FireWire) support
759#
760
761#
762# You can enable one or both FireWire driver stacks.
763#
764
765#
766# See the help texts for more information.
767#
768# CONFIG_FIREWIRE is not set
769# CONFIG_IEEE1394 is not set
770# CONFIG_I2O is not set
771CONFIG_NETDEVICES=y
772# CONFIG_DUMMY is not set
773# CONFIG_BONDING is not set
774# CONFIG_MACVLAN is not set
775# CONFIG_EQUALIZER is not set
776# CONFIG_TUN is not set
777# CONFIG_VETH is not set
778# CONFIG_ARCNET is not set
779# CONFIG_PHYLIB is not set
780CONFIG_NET_ETHERNET=y
781CONFIG_MII=y
782# CONFIG_AX88796 is not set
783# CONFIG_HAPPYMEAL is not set
784# CONFIG_SUNGEM is not set
785# CONFIG_CASSINI is not set
786# CONFIG_NET_VENDOR_3COM is not set
787# CONFIG_SMC91X is not set
788# CONFIG_DM9000 is not set
789# CONFIG_ETHOC is not set
790# CONFIG_DNET is not set
791# CONFIG_NET_TULIP is not set
792# CONFIG_HP100 is not set
793# CONFIG_IBM_NEW_EMAC_ZMII is not set
794# CONFIG_IBM_NEW_EMAC_RGMII is not set
795# CONFIG_IBM_NEW_EMAC_TAH is not set
796# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
797# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
798# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
799# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
800# CONFIG_NET_PCI is not set
801# CONFIG_B44 is not set
802# CONFIG_KS8842 is not set
803# CONFIG_ATL2 is not set
804CONFIG_NETDEV_1000=y
805# CONFIG_ACENIC is not set
806# CONFIG_DL2K is not set
807# CONFIG_E1000 is not set
808# CONFIG_E1000E is not set
809# CONFIG_IP1000 is not set
810# CONFIG_IGB is not set
811# CONFIG_IGBVF is not set
812# CONFIG_NS83820 is not set
813# CONFIG_HAMACHI is not set
814# CONFIG_YELLOWFIN is not set
815# CONFIG_R8169 is not set
816# CONFIG_SIS190 is not set
817# CONFIG_SKGE is not set
818# CONFIG_SKY2 is not set
819# CONFIG_VIA_VELOCITY is not set
820# CONFIG_TIGON3 is not set
821# CONFIG_BNX2 is not set
822# CONFIG_CNIC is not set
823# CONFIG_QLA3XXX is not set
824# CONFIG_ATL1 is not set
825# CONFIG_ATL1E is not set
826# CONFIG_ATL1C is not set
827# CONFIG_JME is not set
828CONFIG_NETDEV_10000=y
829# CONFIG_CHELSIO_T1 is not set
830CONFIG_CHELSIO_T3_DEPENDS=y
831# CONFIG_CHELSIO_T3 is not set
832# CONFIG_ENIC is not set
833# CONFIG_IXGBE is not set
834# CONFIG_IXGB is not set
835# CONFIG_S2IO is not set
836# CONFIG_VXGE is not set
837# CONFIG_MYRI10GE is not set
838# CONFIG_NETXEN_NIC is not set
839# CONFIG_NIU is not set
840# CONFIG_MLX4_EN is not set
841# CONFIG_MLX4_CORE is not set
842# CONFIG_TEHUTI is not set
843# CONFIG_BNX2X is not set
844# CONFIG_QLGE is not set
845# CONFIG_SFC is not set
846# CONFIG_BE2NET is not set
847# CONFIG_TR is not set
848
849#
850# Wireless LAN
851#
852# CONFIG_WLAN_PRE80211 is not set
853# CONFIG_WLAN_80211 is not set
854
855#
856# Enable WiMAX (Networking options) to see the WiMAX drivers
857#
858
859#
860# USB Network Adapters
861#
862# CONFIG_USB_CATC is not set
863# CONFIG_USB_KAWETH is not set
864# CONFIG_USB_PEGASUS is not set
865CONFIG_USB_RTL8150=y
866# CONFIG_USB_USBNET is not set
867# CONFIG_WAN is not set
868# CONFIG_FDDI is not set
869# CONFIG_HIPPI is not set
870# CONFIG_PPP is not set
871# CONFIG_SLIP is not set
872# CONFIG_NET_FC is not set
873# CONFIG_NETCONSOLE is not set
874# CONFIG_NETPOLL is not set
875# CONFIG_NET_POLL_CONTROLLER is not set
876# CONFIG_ISDN is not set
877# CONFIG_PHONE is not set
878
879#
880# Input device support
881#
882CONFIG_INPUT=y
883# CONFIG_INPUT_FF_MEMLESS is not set
884# CONFIG_INPUT_POLLDEV is not set
885
886#
887# Userland interfaces
888#
889# CONFIG_INPUT_MOUSEDEV is not set
890# CONFIG_INPUT_JOYDEV is not set
891CONFIG_INPUT_EVDEV=y
892# CONFIG_INPUT_EVBUG is not set
893
894#
895# Input Device Drivers
896#
897# CONFIG_INPUT_KEYBOARD is not set
898# CONFIG_INPUT_MOUSE is not set
899# CONFIG_INPUT_JOYSTICK is not set
900# CONFIG_INPUT_TABLET is not set
901# CONFIG_INPUT_TOUCHSCREEN is not set
902# CONFIG_INPUT_MISC is not set
903
904#
905# Hardware I/O ports
906#
907# CONFIG_SERIO is not set
908# CONFIG_GAMEPORT is not set
909
910#
911# Character devices
912#
913# CONFIG_VT is not set
914# CONFIG_DEVKMEM is not set
915# CONFIG_SERIAL_NONSTANDARD is not set
916# CONFIG_NOZOMI is not set
917
918#
919# Serial drivers
920#
921# CONFIG_SERIAL_8250 is not set
922
923#
924# Non-8250 serial port support
925#
926# CONFIG_SERIAL_JSM is not set
927CONFIG_UNIX98_PTYS=y
928# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
929# CONFIG_LEGACY_PTYS is not set
930# CONFIG_IPMI_HANDLER is not set
931# CONFIG_HW_RANDOM is not set
932# CONFIG_R3964 is not set
933# CONFIG_APPLICOM is not set
934# CONFIG_RAW_DRIVER is not set
935# CONFIG_TCG_TPM is not set
936CONFIG_DEVPORT=y
937# CONFIG_I2C is not set
938# CONFIG_SPI is not set
939
940#
941# PPS support
942#
943# CONFIG_PPS is not set
944# CONFIG_W1 is not set
945# CONFIG_POWER_SUPPLY is not set
946# CONFIG_HWMON is not set
947# CONFIG_THERMAL is not set
948# CONFIG_THERMAL_HWMON is not set
949# CONFIG_WATCHDOG is not set
950CONFIG_SSB_POSSIBLE=y
951
952#
953# Sonics Silicon Backplane
954#
955# CONFIG_SSB is not set
956
957#
958# Multifunction device drivers
959#
960# CONFIG_MFD_CORE is not set
961# CONFIG_MFD_SM501 is not set
962# CONFIG_HTC_PASIC3 is not set
963# CONFIG_MFD_TMIO is not set
964# CONFIG_REGULATOR is not set
965# CONFIG_MEDIA_SUPPORT is not set
966
967#
968# Graphics support
969#
970# CONFIG_DRM is not set
971# CONFIG_VGASTATE is not set
972# CONFIG_VIDEO_OUTPUT_CONTROL is not set
973# CONFIG_FB is not set
974# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
975
976#
977# Display device support
978#
979# CONFIG_DISPLAY_SUPPORT is not set
980# CONFIG_SOUND is not set
981CONFIG_HID_SUPPORT=y
982CONFIG_HID=y
983# CONFIG_HID_DEBUG is not set
984# CONFIG_HIDRAW is not set
985
986#
987# USB Input Devices
988#
989CONFIG_USB_HID=y
990# CONFIG_HID_PID is not set
991CONFIG_USB_HIDDEV=y
992
993#
994# Special HID drivers
995#
996# CONFIG_HID_A4TECH is not set
997# CONFIG_HID_APPLE is not set
998# CONFIG_HID_BELKIN is not set
999# CONFIG_HID_CHERRY is not set
1000# CONFIG_HID_CHICONY is not set
1001# CONFIG_HID_CYPRESS is not set
1002# CONFIG_HID_DRAGONRISE is not set
1003# CONFIG_HID_EZKEY is not set
1004# CONFIG_HID_KYE is not set
1005# CONFIG_HID_GYRATION is not set
1006# CONFIG_HID_KENSINGTON is not set
1007# CONFIG_HID_LOGITECH is not set
1008# CONFIG_HID_MICROSOFT is not set
1009# CONFIG_HID_MONTEREY is not set
1010# CONFIG_HID_NTRIG is not set
1011# CONFIG_HID_PANTHERLORD is not set
1012# CONFIG_HID_PETALYNX is not set
1013# CONFIG_HID_SAMSUNG is not set
1014# CONFIG_HID_SONY is not set
1015# CONFIG_HID_SUNPLUS is not set
1016# CONFIG_HID_GREENASIA is not set
1017# CONFIG_HID_SMARTJOYPLUS is not set
1018# CONFIG_HID_TOPSEED is not set
1019# CONFIG_HID_THRUSTMASTER is not set
1020# CONFIG_HID_ZEROPLUS is not set
1021CONFIG_USB_SUPPORT=y
1022CONFIG_USB_ARCH_HAS_HCD=y
1023CONFIG_USB_ARCH_HAS_OHCI=y
1024CONFIG_USB_ARCH_HAS_EHCI=y
1025CONFIG_USB=y
1026# CONFIG_USB_DEBUG is not set
1027CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
1028
1029#
1030# Miscellaneous USB options
1031#
1032CONFIG_USB_DEVICEFS=y
1033# CONFIG_USB_DEVICE_CLASS is not set
1034# CONFIG_USB_DYNAMIC_MINORS is not set
1035# CONFIG_USB_OTG is not set
1036# CONFIG_USB_OTG_WHITELIST is not set
1037# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1038# CONFIG_USB_MON is not set
1039# CONFIG_USB_WUSB is not set
1040# CONFIG_USB_WUSB_CBAF is not set
1041
1042#
1043# USB Host Controller Drivers
1044#
1045# CONFIG_USB_C67X00_HCD is not set
1046# CONFIG_USB_XHCI_HCD is not set
1047CONFIG_USB_EHCI_HCD=y
1048# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1049# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1050# CONFIG_USB_OXU210HP_HCD is not set
1051# CONFIG_USB_ISP116X_HCD is not set
1052# CONFIG_USB_ISP1760_HCD is not set
1053CONFIG_USB_OHCI_HCD=y
1054# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1055# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1056CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1057# CONFIG_USB_UHCI_HCD is not set
1058# CONFIG_USB_SL811_HCD is not set
1059# CONFIG_USB_R8A66597_HCD is not set
1060# CONFIG_USB_WHCI_HCD is not set
1061# CONFIG_USB_HWA_HCD is not set
1062
1063#
1064# USB Device Class drivers
1065#
1066# CONFIG_USB_ACM is not set
1067# CONFIG_USB_PRINTER is not set
1068# CONFIG_USB_WDM is not set
1069# CONFIG_USB_TMC is not set
1070
1071#
1072# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
1073#
1074
1075#
1076# also be needed; see USB_STORAGE Help for more info
1077#
1078CONFIG_USB_STORAGE=y
1079# CONFIG_USB_STORAGE_DEBUG is not set
1080# CONFIG_USB_STORAGE_DATAFAB is not set
1081# CONFIG_USB_STORAGE_FREECOM is not set
1082# CONFIG_USB_STORAGE_ISD200 is not set
1083# CONFIG_USB_STORAGE_USBAT is not set
1084# CONFIG_USB_STORAGE_SDDR09 is not set
1085# CONFIG_USB_STORAGE_SDDR55 is not set
1086# CONFIG_USB_STORAGE_JUMPSHOT is not set
1087# CONFIG_USB_STORAGE_ALAUDA is not set
1088# CONFIG_USB_STORAGE_ONETOUCH is not set
1089# CONFIG_USB_STORAGE_KARMA is not set
1090# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1091# CONFIG_USB_LIBUSUAL is not set
1092
1093#
1094# USB Imaging devices
1095#
1096# CONFIG_USB_MDC800 is not set
1097# CONFIG_USB_MICROTEK is not set
1098
1099#
1100# USB port drivers
1101#
1102CONFIG_USB_SERIAL=y
1103CONFIG_USB_SERIAL_CONSOLE=y
1104# CONFIG_USB_EZUSB is not set
1105# CONFIG_USB_SERIAL_GENERIC is not set
1106# CONFIG_USB_SERIAL_AIRCABLE is not set
1107# CONFIG_USB_SERIAL_ARK3116 is not set
1108# CONFIG_USB_SERIAL_BELKIN is not set
1109# CONFIG_USB_SERIAL_CH341 is not set
1110# CONFIG_USB_SERIAL_WHITEHEAT is not set
1111# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
1112CONFIG_USB_SERIAL_CP210X=y
1113# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
1114# CONFIG_USB_SERIAL_EMPEG is not set
1115# CONFIG_USB_SERIAL_FTDI_SIO is not set
1116# CONFIG_USB_SERIAL_FUNSOFT is not set
1117# CONFIG_USB_SERIAL_VISOR is not set
1118# CONFIG_USB_SERIAL_IPAQ is not set
1119# CONFIG_USB_SERIAL_IR is not set
1120# CONFIG_USB_SERIAL_EDGEPORT is not set
1121# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
1122# CONFIG_USB_SERIAL_GARMIN is not set
1123# CONFIG_USB_SERIAL_IPW is not set
1124# CONFIG_USB_SERIAL_IUU is not set
1125# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
1126# CONFIG_USB_SERIAL_KEYSPAN is not set
1127# CONFIG_USB_SERIAL_KLSI is not set
1128# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1129# CONFIG_USB_SERIAL_MCT_U232 is not set
1130# CONFIG_USB_SERIAL_MOS7720 is not set
1131# CONFIG_USB_SERIAL_MOS7840 is not set
1132# CONFIG_USB_SERIAL_MOTOROLA is not set
1133# CONFIG_USB_SERIAL_NAVMAN is not set
1134# CONFIG_USB_SERIAL_PL2303 is not set
1135# CONFIG_USB_SERIAL_OTI6858 is not set
1136# CONFIG_USB_SERIAL_QUALCOMM is not set
1137# CONFIG_USB_SERIAL_SPCP8X5 is not set
1138# CONFIG_USB_SERIAL_HP4X is not set
1139# CONFIG_USB_SERIAL_SAFE is not set
1140# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
1141# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
1142# CONFIG_USB_SERIAL_SYMBOL is not set
1143# CONFIG_USB_SERIAL_TI is not set
1144# CONFIG_USB_SERIAL_CYBERJACK is not set
1145# CONFIG_USB_SERIAL_XIRCOM is not set
1146# CONFIG_USB_SERIAL_OPTION is not set
1147# CONFIG_USB_SERIAL_OMNINET is not set
1148# CONFIG_USB_SERIAL_OPTICON is not set
1149# CONFIG_USB_SERIAL_DEBUG is not set
1150
1151#
1152# USB Miscellaneous drivers
1153#
1154# CONFIG_USB_EMI62 is not set
1155# CONFIG_USB_EMI26 is not set
1156# CONFIG_USB_ADUTUX is not set
1157# CONFIG_USB_SEVSEG is not set
1158# CONFIG_USB_RIO500 is not set
1159# CONFIG_USB_LEGOTOWER is not set
1160# CONFIG_USB_LCD is not set
1161# CONFIG_USB_BERRY_CHARGE is not set
1162# CONFIG_USB_LED is not set
1163# CONFIG_USB_CYPRESS_CY7C63 is not set
1164# CONFIG_USB_CYTHERM is not set
1165# CONFIG_USB_IDMOUSE is not set
1166# CONFIG_USB_FTDI_ELAN is not set
1167# CONFIG_USB_APPLEDISPLAY is not set
1168# CONFIG_USB_SISUSBVGA is not set
1169# CONFIG_USB_LD is not set
1170# CONFIG_USB_TRANCEVIBRATOR is not set
1171# CONFIG_USB_IOWARRIOR is not set
1172# CONFIG_USB_TEST is not set
1173# CONFIG_USB_ISIGHTFW is not set
1174# CONFIG_USB_VST is not set
1175# CONFIG_USB_GADGET is not set
1176
1177#
1178# OTG and related infrastructure
1179#
1180# CONFIG_NOP_USB_XCEIV is not set
1181# CONFIG_UWB is not set
1182# CONFIG_MMC is not set
1183# CONFIG_MEMSTICK is not set
1184# CONFIG_NEW_LEDS is not set
1185# CONFIG_ACCESSIBILITY is not set
1186# CONFIG_INFINIBAND is not set
1187CONFIG_RTC_LIB=y
1188# CONFIG_RTC_CLASS is not set
1189# CONFIG_DMADEVICES is not set
1190# CONFIG_AUXDISPLAY is not set
1191# CONFIG_UIO is not set
1192
1193#
1194# TI VLYNQ
1195#
1196# CONFIG_STAGING is not set
1197
1198#
1199# File systems
1200#
1201CONFIG_EXT2_FS=y
1202# CONFIG_EXT2_FS_XATTR is not set
1203# CONFIG_EXT2_FS_XIP is not set
1204CONFIG_EXT3_FS=y
1205# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1206# CONFIG_EXT3_FS_XATTR is not set
1207# CONFIG_EXT4_FS is not set
1208CONFIG_JBD=y
1209# CONFIG_JBD_DEBUG is not set
1210# CONFIG_REISERFS_FS is not set
1211# CONFIG_JFS_FS is not set
1212# CONFIG_FS_POSIX_ACL is not set
1213# CONFIG_XFS_FS is not set
1214# CONFIG_GFS2_FS is not set
1215# CONFIG_OCFS2_FS is not set
1216# CONFIG_BTRFS_FS is not set
1217CONFIG_FILE_LOCKING=y
1218CONFIG_FSNOTIFY=y
1219# CONFIG_DNOTIFY is not set
1220CONFIG_INOTIFY=y
1221CONFIG_INOTIFY_USER=y
1222# CONFIG_QUOTA is not set
1223# CONFIG_AUTOFS_FS is not set
1224# CONFIG_AUTOFS4_FS is not set
1225CONFIG_FUSE_FS=y
1226# CONFIG_CUSE is not set
1227
1228#
1229# Caches
1230#
1231# CONFIG_FSCACHE is not set
1232
1233#
1234# CD-ROM/DVD Filesystems
1235#
1236# CONFIG_ISO9660_FS is not set
1237# CONFIG_UDF_FS is not set
1238
1239#
1240# DOS/FAT/NT Filesystems
1241#
1242# CONFIG_MSDOS_FS is not set
1243# CONFIG_VFAT_FS is not set
1244# CONFIG_NTFS_FS is not set
1245
1246#
1247# Pseudo filesystems
1248#
1249CONFIG_PROC_FS=y
1250CONFIG_PROC_KCORE=y
1251CONFIG_PROC_SYSCTL=y
1252CONFIG_PROC_PAGE_MONITOR=y
1253CONFIG_SYSFS=y
1254CONFIG_TMPFS=y
1255# CONFIG_TMPFS_POSIX_ACL is not set
1256# CONFIG_HUGETLB_PAGE is not set
1257# CONFIG_CONFIGFS_FS is not set
1258CONFIG_MISC_FILESYSTEMS=y
1259# CONFIG_ADFS_FS is not set
1260# CONFIG_AFFS_FS is not set
1261# CONFIG_HFS_FS is not set
1262# CONFIG_HFSPLUS_FS is not set
1263# CONFIG_BEFS_FS is not set
1264# CONFIG_BFS_FS is not set
1265# CONFIG_EFS_FS is not set
1266CONFIG_JFFS2_FS=y
1267CONFIG_JFFS2_FS_DEBUG=0
1268CONFIG_JFFS2_FS_WRITEBUFFER=y
1269# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1270# CONFIG_JFFS2_SUMMARY is not set
1271# CONFIG_JFFS2_FS_XATTR is not set
1272# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1273CONFIG_JFFS2_ZLIB=y
1274# CONFIG_JFFS2_LZO is not set
1275CONFIG_JFFS2_RTIME=y
1276# CONFIG_JFFS2_RUBIN is not set
1277CONFIG_CRAMFS=y
1278# CONFIG_SQUASHFS is not set
1279# CONFIG_VXFS_FS is not set
1280# CONFIG_MINIX_FS is not set
1281# CONFIG_OMFS_FS is not set
1282# CONFIG_HPFS_FS is not set
1283# CONFIG_QNX4FS_FS is not set
1284# CONFIG_ROMFS_FS is not set
1285# CONFIG_SYSV_FS is not set
1286# CONFIG_UFS_FS is not set
1287# CONFIG_NILFS2_FS is not set
1288CONFIG_NETWORK_FILESYSTEMS=y
1289CONFIG_NFS_FS=y
1290CONFIG_NFS_V3=y
1291# CONFIG_NFS_V3_ACL is not set
1292# CONFIG_NFS_V4 is not set
1293CONFIG_ROOT_NFS=y
1294# CONFIG_NFSD is not set
1295CONFIG_LOCKD=y
1296CONFIG_LOCKD_V4=y
1297CONFIG_NFS_COMMON=y
1298CONFIG_SUNRPC=y
1299# CONFIG_RPCSEC_GSS_KRB5 is not set
1300# CONFIG_RPCSEC_GSS_SPKM3 is not set
1301# CONFIG_SMB_FS is not set
1302# CONFIG_CIFS is not set
1303# CONFIG_NCP_FS is not set
1304# CONFIG_CODA_FS is not set
1305# CONFIG_AFS_FS is not set
1306
1307#
1308# Partition Types
1309#
1310# CONFIG_PARTITION_ADVANCED is not set
1311CONFIG_MSDOS_PARTITION=y
1312CONFIG_NLS=y
1313CONFIG_NLS_DEFAULT="iso8859-1"
1314# CONFIG_NLS_CODEPAGE_437 is not set
1315# CONFIG_NLS_CODEPAGE_737 is not set
1316# CONFIG_NLS_CODEPAGE_775 is not set
1317# CONFIG_NLS_CODEPAGE_850 is not set
1318# CONFIG_NLS_CODEPAGE_852 is not set
1319# CONFIG_NLS_CODEPAGE_855 is not set
1320# CONFIG_NLS_CODEPAGE_857 is not set
1321# CONFIG_NLS_CODEPAGE_860 is not set
1322# CONFIG_NLS_CODEPAGE_861 is not set
1323# CONFIG_NLS_CODEPAGE_862 is not set
1324# CONFIG_NLS_CODEPAGE_863 is not set
1325# CONFIG_NLS_CODEPAGE_864 is not set
1326# CONFIG_NLS_CODEPAGE_865 is not set
1327# CONFIG_NLS_CODEPAGE_866 is not set
1328# CONFIG_NLS_CODEPAGE_869 is not set
1329# CONFIG_NLS_CODEPAGE_936 is not set
1330# CONFIG_NLS_CODEPAGE_950 is not set
1331# CONFIG_NLS_CODEPAGE_932 is not set
1332# CONFIG_NLS_CODEPAGE_949 is not set
1333# CONFIG_NLS_CODEPAGE_874 is not set
1334# CONFIG_NLS_ISO8859_8 is not set
1335# CONFIG_NLS_CODEPAGE_1250 is not set
1336# CONFIG_NLS_CODEPAGE_1251 is not set
1337# CONFIG_NLS_ASCII is not set
1338# CONFIG_NLS_ISO8859_1 is not set
1339# CONFIG_NLS_ISO8859_2 is not set
1340# CONFIG_NLS_ISO8859_3 is not set
1341# CONFIG_NLS_ISO8859_4 is not set
1342# CONFIG_NLS_ISO8859_5 is not set
1343# CONFIG_NLS_ISO8859_6 is not set
1344# CONFIG_NLS_ISO8859_7 is not set
1345# CONFIG_NLS_ISO8859_9 is not set
1346# CONFIG_NLS_ISO8859_13 is not set
1347# CONFIG_NLS_ISO8859_14 is not set
1348# CONFIG_NLS_ISO8859_15 is not set
1349# CONFIG_NLS_KOI8_R is not set
1350# CONFIG_NLS_KOI8_U is not set
1351# CONFIG_NLS_UTF8 is not set
1352# CONFIG_DLM is not set
1353
1354#
1355# Kernel hacking
1356#
1357CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1358CONFIG_PRINTK_TIME=y
1359CONFIG_ENABLE_WARN_DEPRECATED=y
1360CONFIG_ENABLE_MUST_CHECK=y
1361CONFIG_FRAME_WARN=1024
1362# CONFIG_MAGIC_SYSRQ is not set
1363# CONFIG_UNUSED_SYMBOLS is not set
1364CONFIG_DEBUG_FS=y
1365# CONFIG_HEADERS_CHECK is not set
1366CONFIG_DEBUG_KERNEL=y
1367# CONFIG_DEBUG_SHIRQ is not set
1368CONFIG_DETECT_SOFTLOCKUP=y
1369# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1370CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1371CONFIG_DETECT_HUNG_TASK=y
1372# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1373CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1374# CONFIG_SCHED_DEBUG is not set
1375# CONFIG_SCHEDSTATS is not set
1376# CONFIG_TIMER_STATS is not set
1377# CONFIG_DEBUG_OBJECTS is not set
1378# CONFIG_DEBUG_PREEMPT is not set
1379# CONFIG_DEBUG_RT_MUTEXES is not set
1380# CONFIG_RT_MUTEX_TESTER is not set
1381# CONFIG_DEBUG_SPINLOCK is not set
1382# CONFIG_DEBUG_MUTEXES is not set
1383# CONFIG_DEBUG_LOCK_ALLOC is not set
1384# CONFIG_PROVE_LOCKING is not set
1385# CONFIG_LOCK_STAT is not set
1386# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1387# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1388# CONFIG_DEBUG_KOBJECT is not set
1389CONFIG_DEBUG_INFO=y
1390# CONFIG_DEBUG_VM is not set
1391# CONFIG_DEBUG_WRITECOUNT is not set
1392# CONFIG_DEBUG_MEMORY_INIT is not set
1393# CONFIG_DEBUG_LIST is not set
1394# CONFIG_DEBUG_SG is not set
1395# CONFIG_DEBUG_NOTIFIERS is not set
1396# CONFIG_BOOT_PRINTK_DELAY is not set
1397# CONFIG_RCU_TORTURE_TEST is not set
1398# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1399# CONFIG_BACKTRACE_SELF_TEST is not set
1400# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1401# CONFIG_FAULT_INJECTION is not set
1402# CONFIG_PAGE_POISONING is not set
1403CONFIG_TRACING_SUPPORT=y
1404CONFIG_FTRACE=y
1405# CONFIG_IRQSOFF_TRACER is not set
1406# CONFIG_PREEMPT_TRACER is not set
1407# CONFIG_SCHED_TRACER is not set
1408# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1409# CONFIG_BOOT_TRACER is not set
1410CONFIG_BRANCH_PROFILE_NONE=y
1411# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1412# CONFIG_PROFILE_ALL_BRANCHES is not set
1413# CONFIG_KMEMTRACE is not set
1414# CONFIG_WORKQUEUE_TRACER is not set
1415# CONFIG_BLK_DEV_IO_TRACE is not set
1416# CONFIG_DYNAMIC_DEBUG is not set
1417# CONFIG_SAMPLES is not set
1418CONFIG_HAVE_ARCH_KGDB=y
1419# CONFIG_KGDB is not set
1420# CONFIG_KMEMCHECK is not set
1421CONFIG_CMDLINE_BOOL=y
1422CONFIG_CMDLINE="rw dhash_entries=1024 ihash_entries=1024 ip=10.0.1.3:10.0.1.1:10.0.1.1:255.255.255.0:zeus:eth0: root=/dev/nfs nfsroot=/nfsroot/cramfs,wsize=512,rsize=512,tcp nokgdb console=ttyUSB0,115200 memsize=252M"
1423# CONFIG_CMDLINE_OVERRIDE is not set
1424# CONFIG_DEBUG_STACK_USAGE is not set
1425# CONFIG_RUNTIME_DEBUG is not set
1426
1427#
1428# Security options
1429#
1430# CONFIG_KEYS is not set
1431# CONFIG_SECURITY is not set
1432# CONFIG_SECURITYFS is not set
1433# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1434CONFIG_CRYPTO=y
1435
1436#
1437# Crypto core or helper
1438#
1439# CONFIG_CRYPTO_FIPS is not set
1440CONFIG_CRYPTO_ALGAPI=y
1441CONFIG_CRYPTO_ALGAPI2=y
1442CONFIG_CRYPTO_AEAD=y
1443CONFIG_CRYPTO_AEAD2=y
1444CONFIG_CRYPTO_BLKCIPHER=y
1445CONFIG_CRYPTO_BLKCIPHER2=y
1446CONFIG_CRYPTO_HASH=y
1447CONFIG_CRYPTO_HASH2=y
1448CONFIG_CRYPTO_RNG2=y
1449CONFIG_CRYPTO_PCOMP=y
1450CONFIG_CRYPTO_MANAGER=y
1451CONFIG_CRYPTO_MANAGER2=y
1452# CONFIG_CRYPTO_GF128MUL is not set
1453# CONFIG_CRYPTO_NULL is not set
1454CONFIG_CRYPTO_WORKQUEUE=y
1455# CONFIG_CRYPTO_CRYPTD is not set
1456CONFIG_CRYPTO_AUTHENC=y
1457# CONFIG_CRYPTO_TEST is not set
1458
1459#
1460# Authenticated Encryption with Associated Data
1461#
1462# CONFIG_CRYPTO_CCM is not set
1463# CONFIG_CRYPTO_GCM is not set
1464# CONFIG_CRYPTO_SEQIV is not set
1465
1466#
1467# Block modes
1468#
1469CONFIG_CRYPTO_CBC=y
1470# CONFIG_CRYPTO_CTR is not set
1471# CONFIG_CRYPTO_CTS is not set
1472# CONFIG_CRYPTO_ECB is not set
1473# CONFIG_CRYPTO_LRW is not set
1474# CONFIG_CRYPTO_PCBC is not set
1475# CONFIG_CRYPTO_XTS is not set
1476
1477#
1478# Hash modes
1479#
1480CONFIG_CRYPTO_HMAC=y
1481# CONFIG_CRYPTO_XCBC is not set
1482
1483#
1484# Digest
1485#
1486# CONFIG_CRYPTO_CRC32C is not set
1487# CONFIG_CRYPTO_MD4 is not set
1488CONFIG_CRYPTO_MD5=y
1489# CONFIG_CRYPTO_MICHAEL_MIC is not set
1490# CONFIG_CRYPTO_RMD128 is not set
1491# CONFIG_CRYPTO_RMD160 is not set
1492# CONFIG_CRYPTO_RMD256 is not set
1493# CONFIG_CRYPTO_RMD320 is not set
1494CONFIG_CRYPTO_SHA1=y
1495# CONFIG_CRYPTO_SHA256 is not set
1496# CONFIG_CRYPTO_SHA512 is not set
1497# CONFIG_CRYPTO_TGR192 is not set
1498# CONFIG_CRYPTO_WP512 is not set
1499
1500#
1501# Ciphers
1502#
1503# CONFIG_CRYPTO_AES is not set
1504# CONFIG_CRYPTO_ANUBIS is not set
1505# CONFIG_CRYPTO_ARC4 is not set
1506# CONFIG_CRYPTO_BLOWFISH is not set
1507# CONFIG_CRYPTO_CAMELLIA is not set
1508# CONFIG_CRYPTO_CAST5 is not set
1509# CONFIG_CRYPTO_CAST6 is not set
1510CONFIG_CRYPTO_DES=y
1511# CONFIG_CRYPTO_FCRYPT is not set
1512# CONFIG_CRYPTO_KHAZAD is not set
1513# CONFIG_CRYPTO_SALSA20 is not set
1514# CONFIG_CRYPTO_SEED is not set
1515# CONFIG_CRYPTO_SERPENT is not set
1516# CONFIG_CRYPTO_TEA is not set
1517# CONFIG_CRYPTO_TWOFISH is not set
1518
1519#
1520# Compression
1521#
1522CONFIG_CRYPTO_DEFLATE=y
1523# CONFIG_CRYPTO_ZLIB is not set
1524# CONFIG_CRYPTO_LZO is not set
1525
1526#
1527# Random Number Generation
1528#
1529# CONFIG_CRYPTO_ANSI_CPRNG is not set
1530# CONFIG_CRYPTO_HW is not set
1531# CONFIG_BINARY_PRINTF is not set
1532
1533#
1534# Library routines
1535#
1536CONFIG_BITREVERSE=y
1537CONFIG_GENERIC_FIND_LAST_BIT=y
1538# CONFIG_CRC_CCITT is not set
1539# CONFIG_CRC16 is not set
1540# CONFIG_CRC_T10DIF is not set
1541# CONFIG_CRC_ITU_T is not set
1542CONFIG_CRC32=y
1543# CONFIG_CRC7 is not set
1544# CONFIG_LIBCRC32C is not set
1545CONFIG_ZLIB_INFLATE=y
1546CONFIG_ZLIB_DEFLATE=y
1547CONFIG_HAS_IOMEM=y
1548CONFIG_HAS_IOPORT=y
1549CONFIG_HAS_DMA=y
1550CONFIG_NLATTR=y
diff --git a/arch/mips/configs/rb532_defconfig b/arch/mips/configs/rb532_defconfig
index f40c3a04739d..57a50483abdf 100644
--- a/arch/mips/configs/rb532_defconfig
+++ b/arch/mips/configs/rb532_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1204,7 +1203,7 @@ CONFIG_FRAME_WARN=1024
1204# CONFIG_HEADERS_CHECK is not set 1203# CONFIG_HEADERS_CHECK is not set
1205# CONFIG_DEBUG_KERNEL is not set 1204# CONFIG_DEBUG_KERNEL is not set
1206# CONFIG_SAMPLES is not set 1205# CONFIG_SAMPLES is not set
1207CONFIG_CMDLINE="" 1206# CONFIG_CMDLINE_BOOL is not set
1208 1207
1209# 1208#
1210# Security options 1209# Security options
diff --git a/arch/mips/configs/rbtx49xx_defconfig b/arch/mips/configs/rbtx49xx_defconfig
index 6c6a19aebe1f..21c2022d46ee 100644
--- a/arch/mips/configs/rbtx49xx_defconfig
+++ b/arch/mips/configs/rbtx49xx_defconfig
@@ -10,7 +10,6 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_AR7 is not set 12# CONFIG_AR7 is not set
13# CONFIG_BASLER_EXCITE is not set
14# CONFIG_BCM47XX is not set 13# CONFIG_BCM47XX is not set
15# CONFIG_BCM63XX is not set 14# CONFIG_BCM63XX is not set
16# CONFIG_MIPS_COBALT is not set 15# CONFIG_MIPS_COBALT is not set
@@ -284,7 +283,6 @@ CONFIG_DEFAULT_AS=y
284# CONFIG_DEFAULT_CFQ is not set 283# CONFIG_DEFAULT_CFQ is not set
285# CONFIG_DEFAULT_NOOP is not set 284# CONFIG_DEFAULT_NOOP is not set
286CONFIG_DEFAULT_IOSCHED="anticipatory" 285CONFIG_DEFAULT_IOSCHED="anticipatory"
287# CONFIG_PROBE_INITRD_HEADER is not set
288# CONFIG_FREEZER is not set 286# CONFIG_FREEZER is not set
289 287
290# 288#
@@ -1063,7 +1061,7 @@ CONFIG_TRACING_SUPPORT=y
1063# CONFIG_DYNAMIC_DEBUG is not set 1061# CONFIG_DYNAMIC_DEBUG is not set
1064# CONFIG_SAMPLES is not set 1062# CONFIG_SAMPLES is not set
1065CONFIG_HAVE_ARCH_KGDB=y 1063CONFIG_HAVE_ARCH_KGDB=y
1066CONFIG_CMDLINE="" 1064# CONFIG_CMDLINE_BOOL is not set
1067 1065
1068# 1066#
1069# Security options 1067# Security options
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index e53b8d096cfc..790362890033 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -1694,7 +1693,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1694# CONFIG_DEBUG_KERNEL is not set 1693# CONFIG_DEBUG_KERNEL is not set
1695CONFIG_LOG_BUF_SHIFT=14 1694CONFIG_LOG_BUF_SHIFT=14
1696CONFIG_CROSSCOMPILE=y 1695CONFIG_CROSSCOMPILE=y
1697CONFIG_CMDLINE="" 1696# CONFIG_CMDLINE_BOOL is not set
1698 1697
1699# 1698#
1700# Security options 1699# Security options
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index 7f38c0b956f3..7f07bf02b838 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -961,7 +960,7 @@ CONFIG_ENABLE_MUST_CHECK=y
961# CONFIG_HEADERS_CHECK is not set 960# CONFIG_HEADERS_CHECK is not set
962# CONFIG_DEBUG_KERNEL is not set 961# CONFIG_DEBUG_KERNEL is not set
963# CONFIG_SAMPLES is not set 962# CONFIG_SAMPLES is not set
964CONFIG_CMDLINE="" 963# CONFIG_CMDLINE_BOOL is not set
965# CONFIG_SB1XXX_CORELIS is not set 964# CONFIG_SB1XXX_CORELIS is not set
966 965
967# 966#
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
index b5059881bc7e..c54d1128f9a3 100644
--- a/arch/mips/configs/tb0219_defconfig
+++ b/arch/mips/configs/tb0219_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -892,7 +891,9 @@ CONFIG_FRAME_WARN=1024
892# CONFIG_HEADERS_CHECK is not set 891# CONFIG_HEADERS_CHECK is not set
893# CONFIG_DEBUG_KERNEL is not set 892# CONFIG_DEBUG_KERNEL is not set
894# CONFIG_SAMPLES is not set 893# CONFIG_SAMPLES is not set
894CONFIG_CMDLINE_BOOL=y
895CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 895CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
896# CONFIG_CMDLINE_OVERRIDE is not set
896 897
897# 898#
898# Security options 899# Security options
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index b06a716bf23f..e7c5cd32a2bd 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -895,7 +894,9 @@ CONFIG_FRAME_WARN=1024
895# CONFIG_HEADERS_CHECK is not set 894# CONFIG_HEADERS_CHECK is not set
896# CONFIG_DEBUG_KERNEL is not set 895# CONFIG_DEBUG_KERNEL is not set
897# CONFIG_SAMPLES is not set 896# CONFIG_SAMPLES is not set
897CONFIG_CMDLINE_BOOL=y
898CONFIG_CMDLINE="cca=3 mem=32M console=ttyVR0,115200" 898CONFIG_CMDLINE="cca=3 mem=32M console=ttyVR0,115200"
899# CONFIG_CMDLINE_OVERRIDE is not set
899 900
900# 901#
901# Security options 902# Security options
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 46512cf7ce04..b50032ba4d01 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set 12# CONFIG_BCM47XX is not set
14# CONFIG_MIPS_COBALT is not set 13# CONFIG_MIPS_COBALT is not set
15# CONFIG_MACH_DECSTATION is not set 14# CONFIG_MACH_DECSTATION is not set
@@ -1077,7 +1076,9 @@ CONFIG_FRAME_WARN=1024
1077# CONFIG_HEADERS_CHECK is not set 1076# CONFIG_HEADERS_CHECK is not set
1078# CONFIG_DEBUG_KERNEL is not set 1077# CONFIG_DEBUG_KERNEL is not set
1079# CONFIG_SAMPLES is not set 1078# CONFIG_SAMPLES is not set
1079CONFIG_CMDLINE_BOOL=y
1080CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 1080CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1081# CONFIG_CMDLINE_OVERRIDE is not set
1081 1082
1082# 1083#
1083# Security options 1084# Security options
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig
index b437eb7f8672..c02ba08b69ab 100644
--- a/arch/mips/configs/workpad_defconfig
+++ b/arch/mips/configs/workpad_defconfig
@@ -9,7 +9,6 @@ CONFIG_MIPS=y
9# Machine selection 9# Machine selection
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_MIPS_COBALT is not set 12# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 13# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 14# CONFIG_MACH_JAZZ is not set
@@ -755,7 +754,9 @@ CONFIG_ENABLE_MUST_CHECK=y
755# CONFIG_HEADERS_CHECK is not set 754# CONFIG_HEADERS_CHECK is not set
756# CONFIG_DEBUG_KERNEL is not set 755# CONFIG_DEBUG_KERNEL is not set
757CONFIG_CROSSCOMPILE=y 756CONFIG_CROSSCOMPILE=y
757CONFIG_CMDLINE_BOOL=y
758CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M" 758CONFIG_CMDLINE="console=ttyVR0,19200 ide0=0x170,0x376,49 mem=16M"
759# CONFIG_CMDLINE_OVERRIDE is not set
759 760
760# 761#
761# Security options 762# Security options
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig
index 06acc7482e4c..a35bc41389e5 100644
--- a/arch/mips/configs/wrppmc_defconfig
+++ b/arch/mips/configs/wrppmc_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -887,7 +886,9 @@ CONFIG_ENABLE_MUST_CHECK=y
887# CONFIG_DEBUG_KERNEL is not set 886# CONFIG_DEBUG_KERNEL is not set
888CONFIG_LOG_BUF_SHIFT=14 887CONFIG_LOG_BUF_SHIFT=14
889CONFIG_CROSSCOMPILE=y 888CONFIG_CROSSCOMPILE=y
889CONFIG_CMDLINE_BOOL=y
890CONFIG_CMDLINE="console=ttyS0,115200n8" 890CONFIG_CMDLINE="console=ttyS0,115200n8"
891# CONFIG_CMDLINE_OVERRIDE is not set
891 892
892# 893#
893# Security options 894# Security options
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig
index 69feaf88b510..e3d68d651e7d 100644
--- a/arch/mips/configs/yosemite_defconfig
+++ b/arch/mips/configs/yosemite_defconfig
@@ -22,7 +22,6 @@ CONFIG_ZONE_DMA=y
22# CONFIG_MIPS_DB1550 is not set 22# CONFIG_MIPS_DB1550 is not set
23# CONFIG_MIPS_DB1200 is not set 23# CONFIG_MIPS_DB1200 is not set
24# CONFIG_MIPS_MIRAGE is not set 24# CONFIG_MIPS_MIRAGE is not set
25# CONFIG_BASLER_EXCITE is not set
26# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 27# CONFIG_MACH_JAZZ is not set
@@ -824,7 +823,7 @@ CONFIG_DEBUG_MUTEXES=y
824CONFIG_FORCED_INLINING=y 823CONFIG_FORCED_INLINING=y
825# CONFIG_RCU_TORTURE_TEST is not set 824# CONFIG_RCU_TORTURE_TEST is not set
826CONFIG_CROSSCOMPILE=y 825CONFIG_CROSSCOMPILE=y
827CONFIG_CMDLINE="" 826# CONFIG_CMDLINE_BOOL is not set
828# CONFIG_DEBUG_STACK_USAGE is not set 827# CONFIG_DEBUG_STACK_USAGE is not set
829# CONFIG_RUNTIME_DEBUG is not set 828# CONFIG_RUNTIME_DEBUG is not set
830 829
diff --git a/arch/mips/fw/arc/cmdline.c b/arch/mips/fw/arc/cmdline.c
index 4ca4eef934a5..5c8603c85f20 100644
--- a/arch/mips/fw/arc/cmdline.c
+++ b/arch/mips/fw/arc/cmdline.c
@@ -16,11 +16,6 @@
16 16
17#undef DEBUG_CMDLINE 17#undef DEBUG_CMDLINE
18 18
19char * __init prom_getcmdline(void)
20{
21 return arcs_cmdline;
22}
23
24static char *ignored[] = { 19static char *ignored[] = {
25 "ConsoleIn=", 20 "ConsoleIn=",
26 "ConsoleOut=", 21 "ConsoleOut=",
diff --git a/arch/mips/include/asm/asm-offsets.h b/arch/mips/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/mips/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index f5dfaf6a1606..09eee09780f2 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -67,9 +67,9 @@
67#define MACH_LEMOTE_ML2F7 3 67#define MACH_LEMOTE_ML2F7 3
68#define MACH_LEMOTE_YL2F89 4 68#define MACH_LEMOTE_YL2F89 4
69#define MACH_DEXXON_GDIUM2F10 5 69#define MACH_DEXXON_GDIUM2F10 5
70#define MACH_LOONGSON_END 6 70#define MACH_LEMOTE_NAS 6
71 71#define MACH_LEMOTE_LL2F 7
72#define CL_SIZE COMMAND_LINE_SIZE 72#define MACH_LOONGSON_END 8
73 73
74extern char *system_type; 74extern char *system_type;
75const char *get_system_type(void); 75const char *get_system_type(void);
@@ -107,7 +107,7 @@ extern void free_init_pages(const char *what,
107/* 107/*
108 * Initial kernel command line, usually setup by prom_init() 108 * Initial kernel command line, usually setup by prom_init()
109 */ 109 */
110extern char arcs_cmdline[CL_SIZE]; 110extern char arcs_cmdline[COMMAND_LINE_SIZE];
111 111
112/* 112/*
113 * Registers a0, a1, a3 and a4 as passed to the kernel entry by firmware 113 * Registers a0, a1, a3 and a4 as passed to the kernel entry by firmware
diff --git a/arch/mips/include/asm/clock.h b/arch/mips/include/asm/clock.h
new file mode 100644
index 000000000000..83894aa7932c
--- /dev/null
+++ b/arch/mips/include/asm/clock.h
@@ -0,0 +1,64 @@
1#ifndef __ASM_MIPS_CLOCK_H
2#define __ASM_MIPS_CLOCK_H
3
4#include <linux/kref.h>
5#include <linux/list.h>
6#include <linux/seq_file.h>
7#include <linux/clk.h>
8
9extern void (*cpu_wait) (void);
10
11struct clk;
12
13struct clk_ops {
14 void (*init) (struct clk *clk);
15 void (*enable) (struct clk *clk);
16 void (*disable) (struct clk *clk);
17 void (*recalc) (struct clk *clk);
18 int (*set_rate) (struct clk *clk, unsigned long rate, int algo_id);
19 long (*round_rate) (struct clk *clk, unsigned long rate);
20};
21
22struct clk {
23 struct list_head node;
24 const char *name;
25 int id;
26 struct module *owner;
27
28 struct clk *parent;
29 struct clk_ops *ops;
30
31 struct kref kref;
32
33 unsigned long rate;
34 unsigned long flags;
35};
36
37#define CLK_ALWAYS_ENABLED (1 << 0)
38#define CLK_RATE_PROPAGATES (1 << 1)
39
40/* Should be defined by processor-specific code */
41void arch_init_clk_ops(struct clk_ops **, int type);
42
43int clk_init(void);
44
45int __clk_enable(struct clk *);
46void __clk_disable(struct clk *);
47
48void clk_recalc_rate(struct clk *);
49
50int clk_register(struct clk *);
51void clk_unregister(struct clk *);
52
53/* the exported API, in addition to clk_set_rate */
54/**
55 * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
56 * @clk: clock source
57 * @rate: desired clock rate in Hz
58 * @algo_id: algorithm id to be passed down to ops->set_rate
59 *
60 * Returns success (0) or negative errno.
61 */
62int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id);
63
64#endif /* __ASM_MIPS_CLOCK_H */
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h
new file mode 100644
index 000000000000..6b04c98b7fad
--- /dev/null
+++ b/arch/mips/include/asm/cop2.h
@@ -0,0 +1,23 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2009 Wind River Systems,
7 * written by Ralf Baechle <ralf@linux-mips.org>
8 */
9#ifndef __ASM_COP2_H
10#define __ASM_COP2_H
11
12enum cu2_ops {
13 CU2_EXCEPTION,
14 CU2_LWC2_OP,
15 CU2_LDC2_OP,
16 CU2_SWC2_OP,
17 CU2_SDC2_OP,
18};
19
20extern int register_cu2_notifier(struct notifier_block *nb);
21extern int cu2_notifier_call_chain(unsigned long val, void *v);
22
23#endif /* __ASM_COP2_H */
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 4b96d1a36056..cf373a95fe4a 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -154,6 +154,8 @@
154#define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ 154#define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */
155#define PRID_REV_VR4130 0x0080 155#define PRID_REV_VR4130 0x0080
156#define PRID_REV_34K_V1_0_2 0x0022 156#define PRID_REV_34K_V1_0_2 0x0022
157#define PRID_REV_LOONGSON2E 0x0002
158#define PRID_REV_LOONGSON2F 0x0003
157 159
158/* 160/*
159 * Older processors used to encode processor version and revision in two 161 * Older processors used to encode processor version and revision in two
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 7990694cda22..7a6a35dbe529 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -326,7 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
326#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ 326#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \
327 dump_task_fpu(tsk, elf_fpregs) 327 dump_task_fpu(tsk, elf_fpregs)
328 328
329#define USE_ELF_CORE_DUMP
330#define ELF_EXEC_PAGESIZE PAGE_SIZE 329#define ELF_EXEC_PAGESIZE PAGE_SIZE
331 330
332/* This yields a mask that user programs can use to figure out what 331/* This yields a mask that user programs can use to figure out what
diff --git a/arch/mips/include/asm/fcntl.h b/arch/mips/include/asm/fcntl.h
index 2a52333a062d..e482fe90fe88 100644
--- a/arch/mips/include/asm/fcntl.h
+++ b/arch/mips/include/asm/fcntl.h
@@ -10,7 +10,7 @@
10 10
11 11
12#define O_APPEND 0x0008 12#define O_APPEND 0x0008
13#define O_SYNC 0x0010 13#define O_DSYNC 0x0010 /* used to be O_SYNC, see below */
14#define O_NONBLOCK 0x0080 14#define O_NONBLOCK 0x0080
15#define O_CREAT 0x0100 /* not fcntl */ 15#define O_CREAT 0x0100 /* not fcntl */
16#define O_TRUNC 0x0200 /* not fcntl */ 16#define O_TRUNC 0x0200 /* not fcntl */
@@ -18,6 +18,21 @@
18#define O_NOCTTY 0x0800 /* not fcntl */ 18#define O_NOCTTY 0x0800 /* not fcntl */
19#define FASYNC 0x1000 /* fcntl, for BSD compatibility */ 19#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
20#define O_LARGEFILE 0x2000 /* allow large file opens */ 20#define O_LARGEFILE 0x2000 /* allow large file opens */
21/*
22 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
23 * the O_SYNC flag. We continue to use the existing numerical value
24 * for O_DSYNC semantics now, but using the correct symbolic name for it.
25 * This new value is used to request true Posix O_SYNC semantics. It is
26 * defined in this strange way to make sure applications compiled against
27 * new headers get at least O_DSYNC semantics on older kernels.
28 *
29 * This has the nice side-effect that we can simply test for O_DSYNC
30 * wherever we do not care if O_DSYNC or O_SYNC is used.
31 *
32 * Note: __O_SYNC must never be used directly.
33 */
34#define __O_SYNC 0x4000
35#define O_SYNC (__O_SYNC|O_DSYNC)
21#define O_DIRECT 0x8000 /* direct disk access hint */ 36#define O_DIRECT 0x8000 /* direct disk access hint */
22 37
23#define F_GETLK 14 38#define F_GETLK 14
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h
index 8a3ef247659a..7fcef8ef3fab 100644
--- a/arch/mips/include/asm/fpu.h
+++ b/arch/mips/include/asm/fpu.h
@@ -28,15 +28,7 @@
28struct sigcontext; 28struct sigcontext;
29struct sigcontext32; 29struct sigcontext32;
30 30
31extern asmlinkage int (*save_fp_context)(struct sigcontext __user *sc);
32extern asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc);
33
34extern asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
35extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
36
37extern void fpu_emulator_init_fpu(void); 31extern void fpu_emulator_init_fpu(void);
38extern int fpu_emulator_save_context(struct sigcontext __user *sc);
39extern int fpu_emulator_restore_context(struct sigcontext __user *sc);
40extern void _init_fpu(void); 32extern void _init_fpu(void);
41extern void _save_fp(struct task_struct *); 33extern void _save_fp(struct task_struct *);
42extern void _restore_fp(struct task_struct *); 34extern void _restore_fp(struct task_struct *);
diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h
index e5189572956c..aecada6f6117 100644
--- a/arch/mips/include/asm/fpu_emulator.h
+++ b/arch/mips/include/asm/fpu_emulator.h
@@ -25,17 +25,27 @@
25 25
26#include <asm/break.h> 26#include <asm/break.h>
27#include <asm/inst.h> 27#include <asm/inst.h>
28#include <asm/local.h>
29
30#ifdef CONFIG_DEBUG_FS
28 31
29struct mips_fpu_emulator_stats { 32struct mips_fpu_emulator_stats {
30 unsigned int emulated; 33 local_t emulated;
31 unsigned int loads; 34 local_t loads;
32 unsigned int stores; 35 local_t stores;
33 unsigned int cp1ops; 36 local_t cp1ops;
34 unsigned int cp1xops; 37 local_t cp1xops;
35 unsigned int errors; 38 local_t errors;
36}; 39};
37 40
38extern struct mips_fpu_emulator_stats fpuemustats; 41DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
42
43#define MIPS_FPU_EMU_INC_STATS(M) \
44 cpu_local_wrap(__local_inc(&__get_cpu_var(fpuemustats).M))
45
46#else
47#define MIPS_FPU_EMU_INC_STATS(M) do { } while (0)
48#endif /* CONFIG_DEBUG_FS */
39 49
40extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir, 50extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir,
41 unsigned long cpc); 51 unsigned long cpc);
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index 40a8c178f10d..3986cd8704f3 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -1 +1,90 @@
1/* empty */ 1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive for
4 * more details.
5 *
6 * Copyright (C) 2009 DSLab, Lanzhou University, China
7 * Author: Wu Zhangjin <wuzj@lemote.com>
8 */
9
10#ifndef _ASM_MIPS_FTRACE_H
11#define _ASM_MIPS_FTRACE_H
12
13#ifdef CONFIG_FUNCTION_TRACER
14
15#define MCOUNT_ADDR ((unsigned long)(_mcount))
16#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
17
18#ifndef __ASSEMBLY__
19extern void _mcount(void);
20#define mcount _mcount
21
22#define safe_load(load, src, dst, error) \
23do { \
24 asm volatile ( \
25 "1: " load " %[" STR(dst) "], 0(%[" STR(src) "])\n"\
26 " li %[" STR(error) "], 0\n" \
27 "2:\n" \
28 \
29 ".section .fixup, \"ax\"\n" \
30 "3: li %[" STR(error) "], 1\n" \
31 " j 2b\n" \
32 ".previous\n" \
33 \
34 ".section\t__ex_table,\"a\"\n\t" \
35 STR(PTR) "\t1b, 3b\n\t" \
36 ".previous\n" \
37 \
38 : [dst] "=&r" (dst), [error] "=r" (error)\
39 : [src] "r" (src) \
40 : "memory" \
41 ); \
42} while (0)
43
44#define safe_store(store, src, dst, error) \
45do { \
46 asm volatile ( \
47 "1: " store " %[" STR(src) "], 0(%[" STR(dst) "])\n"\
48 " li %[" STR(error) "], 0\n" \
49 "2:\n" \
50 \
51 ".section .fixup, \"ax\"\n" \
52 "3: li %[" STR(error) "], 1\n" \
53 " j 2b\n" \
54 ".previous\n" \
55 \
56 ".section\t__ex_table,\"a\"\n\t"\
57 STR(PTR) "\t1b, 3b\n\t" \
58 ".previous\n" \
59 \
60 : [error] "=r" (error) \
61 : [dst] "r" (dst), [src] "r" (src)\
62 : "memory" \
63 ); \
64} while (0)
65
66#define safe_load_code(dst, src, error) \
67 safe_load(STR(lw), src, dst, error)
68#define safe_store_code(src, dst, error) \
69 safe_store(STR(sw), src, dst, error)
70
71#define safe_load_stack(dst, src, error) \
72 safe_load(STR(PTR_L), src, dst, error)
73
74#define safe_store_stack(src, dst, error) \
75 safe_store(STR(PTR_S), src, dst, error)
76
77
78#ifdef CONFIG_DYNAMIC_FTRACE
79static inline unsigned long ftrace_call_adjust(unsigned long addr)
80{
81 return addr;
82}
83
84struct dyn_arch_ftrace {
85};
86
87#endif /* CONFIG_DYNAMIC_FTRACE */
88#endif /* __ASSEMBLY__ */
89#endif /* CONFIG_FUNCTION_TRACER */
90#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h
index 09b08d05ff72..06960364c96b 100644
--- a/arch/mips/include/asm/irq.h
+++ b/arch/mips/include/asm/irq.h
@@ -113,36 +113,11 @@ do { \
113 113
114#endif 114#endif
115 115
116/* 116extern void do_IRQ(unsigned int irq);
117 * do_IRQ handles all normal device IRQ's (the special
118 * SMP cross-CPU interrupts have their own specific
119 * handlers).
120 *
121 * Ideally there should be away to get this into kernel/irq/handle.c to
122 * avoid the overhead of a call for just a tiny function ...
123 */
124#define do_IRQ(irq) \
125do { \
126 irq_enter(); \
127 __DO_IRQ_SMTC_HOOK(irq); \
128 generic_handle_irq(irq); \
129 irq_exit(); \
130} while (0)
131 117
132#ifdef CONFIG_MIPS_MT_SMTC_IRQAFF 118#ifdef CONFIG_MIPS_MT_SMTC_IRQAFF
133/*
134 * To avoid inefficient and in some cases pathological re-checking of
135 * IRQ affinity, we have this variant that skips the affinity check.
136 */
137
138 119
139#define do_IRQ_no_affinity(irq) \ 120extern void do_IRQ_no_affinity(unsigned int irq);
140do { \
141 irq_enter(); \
142 __NO_AFFINITY_IRQ_SMTC_HOOK(irq); \
143 generic_handle_irq(irq); \
144 irq_exit(); \
145} while (0)
146 121
147#endif /* CONFIG_MIPS_MT_SMTC_IRQAFF */ 122#endif /* CONFIG_MIPS_MT_SMTC_IRQAFF */
148 123
diff --git a/arch/mips/include/asm/mach-excite/cpu-feature-overrides.h b/arch/mips/include/asm/mach-excite/cpu-feature-overrides.h
deleted file mode 100644
index 107104c3cd12..000000000000
--- a/arch/mips/include/asm/mach-excite/cpu-feature-overrides.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2004 Thomas Koeller <thomas.koeller@baslerweb.com>
7 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
8 */
9#ifndef __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H
10#define __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H
11
12/*
13 * Basler eXcite has an RM9122 processor.
14 */
15#define cpu_has_watch 1
16#define cpu_has_mips16 0
17#define cpu_has_divec 0
18#define cpu_has_vce 0
19#define cpu_has_cache_cdex_p 0
20#define cpu_has_cache_cdex_s 0
21#define cpu_has_prefetch 1
22#define cpu_has_mcheck 0
23#define cpu_has_ejtag 0
24
25#define cpu_has_llsc 1
26#define cpu_has_vtag_icache 0
27#define cpu_has_dc_aliases 0
28#define cpu_has_ic_fills_f_dc 0
29#define cpu_has_dsp 0
30#define cpu_icache_snoops_remote_store 0
31#define cpu_has_mipsmt 0
32#define cpu_has_userlocal 0
33
34#define cpu_has_nofpuex 0
35#define cpu_has_64bits 1
36
37#define cpu_has_mips32r1 0
38#define cpu_has_mips32r2 0
39#define cpu_has_mips64r1 0
40#define cpu_has_mips64r2 0
41
42#define cpu_has_inclusive_pcaches 0
43
44#define cpu_dcache_line_size() 32
45#define cpu_icache_line_size() 32
46#define cpu_scache_line_size() 32
47
48#endif /* __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H */
diff --git a/arch/mips/include/asm/mach-excite/excite.h b/arch/mips/include/asm/mach-excite/excite.h
deleted file mode 100644
index 4c29ba44992c..000000000000
--- a/arch/mips/include/asm/mach-excite/excite.h
+++ /dev/null
@@ -1,154 +0,0 @@
1#ifndef __EXCITE_H__
2#define __EXCITE_H__
3
4#include <linux/init.h>
5#include <asm/addrspace.h>
6#include <asm/types.h>
7
8#define EXCITE_CPU_EXT_CLOCK 100000000
9
10#if !defined(__ASSEMBLY__)
11void __init excite_kgdb_init(void);
12void excite_procfs_init(void);
13extern unsigned long memsize;
14extern char modetty[];
15extern u32 unit_id;
16#endif
17
18/* Base name for XICAP devices */
19#define XICAP_NAME "xicap_gpi"
20
21/* OCD register offsets */
22#define LKB0 0x0038
23#define LKB5 0x0128
24#define LKM5 0x012C
25#define LKB7 0x0138
26#define LKM7 0x013c
27#define LKB8 0x0140
28#define LKM8 0x0144
29#define LKB9 0x0148
30#define LKM9 0x014c
31#define LKB10 0x0150
32#define LKM10 0x0154
33#define LKB11 0x0158
34#define LKM11 0x015c
35#define LKB12 0x0160
36#define LKM12 0x0164
37#define LKB13 0x0168
38#define LKM13 0x016c
39#define LDP0 0x0200
40#define LDP1 0x0210
41#define LDP2 0x0220
42#define LDP3 0x0230
43#define INTPIN0 0x0A40
44#define INTPIN1 0x0A44
45#define INTPIN2 0x0A48
46#define INTPIN3 0x0A4C
47#define INTPIN4 0x0A50
48#define INTPIN5 0x0A54
49#define INTPIN6 0x0A58
50#define INTPIN7 0x0A5C
51
52
53
54
55/* TITAN register offsets */
56#define CPRR 0x0004
57#define CPDSR 0x0008
58#define CPTC0R 0x000c
59#define CPTC1R 0x0010
60#define CPCFG0 0x0020
61#define CPCFG1 0x0024
62#define CPDST0A 0x0028
63#define CPDST0B 0x002c
64#define CPDST1A 0x0030
65#define CPDST1B 0x0034
66#define CPXDSTA 0x0038
67#define CPXDSTB 0x003c
68#define CPXCISRA 0x0048
69#define CPXCISRB 0x004c
70#define CPGIG0ER 0x0050
71#define CPGIG1ER 0x0054
72#define CPGRWL 0x0068
73#define CPURSLMT 0x00f8
74#define UACFG 0x0200
75#define UAINTS 0x0204
76#define SDRXFCIE 0x4828
77#define SDTXFCIE 0x4928
78#define INTP0Status0 0x1B00
79#define INTP0Mask0 0x1B04
80#define INTP0Set0 0x1B08
81#define INTP0Clear0 0x1B0C
82#define GXCFG 0x5000
83#define GXDMADRPFX 0x5018
84#define GXDMA_DESCADR 0x501c
85#define GXCH0TDESSTRT 0x5054
86
87/* IRQ definitions */
88#define NMICONFIG 0xac0
89#define TITAN_MSGINT 0xc4
90#define TITAN_IRQ ((TITAN_MSGINT / 0x20) + 2)
91#define FPGA0_MSGINT 0x5a
92#define FPGA0_IRQ ((FPGA0_MSGINT / 0x20) + 2)
93#define FPGA1_MSGINT 0x7b
94#define FPGA1_IRQ ((FPGA1_MSGINT / 0x20) + 2)
95#define PHY_MSGINT 0x9c
96#define PHY_IRQ ((PHY_MSGINT / 0x20) + 2)
97
98#if defined(CONFIG_BASLER_EXCITE_PROTOTYPE)
99/* Pre-release units used interrupt pin #9 */
100#define USB_IRQ 11
101#else
102/* Re-designed units use interrupt pin #1 */
103#define USB_MSGINT 0x39
104#define USB_IRQ ((USB_MSGINT / 0x20) + 2)
105#endif
106#define TIMER_IRQ 12
107
108
109/* Device address ranges */
110#define EXCITE_OFFS_OCD 0x1fffc000
111#define EXCITE_SIZE_OCD (16 * 1024)
112#define EXCITE_PHYS_OCD CPHYSADDR(EXCITE_OFFS_OCD)
113#define EXCITE_ADDR_OCD CKSEG1ADDR(EXCITE_OFFS_OCD)
114
115#define EXCITE_OFFS_SCRAM 0x1fffa000
116#define EXCITE_SIZE_SCRAM (8 << 10)
117#define EXCITE_PHYS_SCRAM CPHYSADDR(EXCITE_OFFS_SCRAM)
118#define EXCITE_ADDR_SCRAM CKSEG1ADDR(EXCITE_OFFS_SCRAM)
119
120#define EXCITE_OFFS_PCI_IO 0x1fff8000
121#define EXCITE_SIZE_PCI_IO (8 << 10)
122#define EXCITE_PHYS_PCI_IO CPHYSADDR(EXCITE_OFFS_PCI_IO)
123#define EXCITE_ADDR_PCI_IO CKSEG1ADDR(EXCITE_OFFS_PCI_IO)
124
125#define EXCITE_OFFS_TITAN 0x1fff0000
126#define EXCITE_SIZE_TITAN (32 << 10)
127#define EXCITE_PHYS_TITAN CPHYSADDR(EXCITE_OFFS_TITAN)
128#define EXCITE_ADDR_TITAN CKSEG1ADDR(EXCITE_OFFS_TITAN)
129
130#define EXCITE_OFFS_PCI_MEM 0x1ffe0000
131#define EXCITE_SIZE_PCI_MEM (64 << 10)
132#define EXCITE_PHYS_PCI_MEM CPHYSADDR(EXCITE_OFFS_PCI_MEM)
133#define EXCITE_ADDR_PCI_MEM CKSEG1ADDR(EXCITE_OFFS_PCI_MEM)
134
135#define EXCITE_OFFS_FPGA 0x1ffdc000
136#define EXCITE_SIZE_FPGA (16 << 10)
137#define EXCITE_PHYS_FPGA CPHYSADDR(EXCITE_OFFS_FPGA)
138#define EXCITE_ADDR_FPGA CKSEG1ADDR(EXCITE_OFFS_FPGA)
139
140#define EXCITE_OFFS_NAND 0x1ffd8000
141#define EXCITE_SIZE_NAND (16 << 10)
142#define EXCITE_PHYS_NAND CPHYSADDR(EXCITE_OFFS_NAND)
143#define EXCITE_ADDR_NAND CKSEG1ADDR(EXCITE_OFFS_NAND)
144
145#define EXCITE_OFFS_BOOTROM 0x1f000000
146#define EXCITE_SIZE_BOOTROM (8 << 20)
147#define EXCITE_PHYS_BOOTROM CPHYSADDR(EXCITE_OFFS_BOOTROM)
148#define EXCITE_ADDR_BOOTROM CKSEG1ADDR(EXCITE_OFFS_BOOTROM)
149
150/* FPGA address offsets */
151#define EXCITE_FPGA_DPR 0x0104 /* dual-ported ram */
152#define EXCITE_FPGA_SYSCTL 0x0200 /* system control register block */
153
154#endif /* __EXCITE_H__ */
diff --git a/arch/mips/include/asm/mach-excite/excite_fpga.h b/arch/mips/include/asm/mach-excite/excite_fpga.h
deleted file mode 100644
index 0a1ef69bece7..000000000000
--- a/arch/mips/include/asm/mach-excite/excite_fpga.h
+++ /dev/null
@@ -1,80 +0,0 @@
1#ifndef EXCITE_FPGA_H_INCLUDED
2#define EXCITE_FPGA_H_INCLUDED
3
4
5/**
6 * Address alignment of the individual FPGA bytes.
7 * The address arrangement of the individual bytes of the FPGA is two
8 * byte aligned at the embedded MK2 platform.
9 */
10#ifdef EXCITE_CCI_FPGA_MK2
11typedef unsigned char excite_cci_fpga_align_t __attribute__ ((aligned(2)));
12#else
13typedef unsigned char excite_cci_fpga_align_t;
14#endif
15
16
17/**
18 * Size of Dual Ported RAM.
19 */
20#define EXCITE_DPR_SIZE 263
21
22
23/**
24 * Size of Reserved Status Fields in Dual Ported RAM.
25 */
26#define EXCITE_DPR_STATUS_SIZE 7
27
28
29
30/**
31 * FPGA.
32 * Hardware register layout of the FPGA interface. The FPGA must accessed
33 * byte wise solely.
34 * @see EXCITE_CCI_DPR_MK2
35 */
36typedef struct excite_fpga {
37
38 /**
39 * Dual Ported RAM.
40 */
41 excite_cci_fpga_align_t dpr[EXCITE_DPR_SIZE];
42
43 /**
44 * Status.
45 */
46 excite_cci_fpga_align_t status[EXCITE_DPR_STATUS_SIZE];
47
48#ifdef EXCITE_CCI_FPGA_MK2
49 /**
50 * RM9000 Interrupt.
51 * Write access initiates interrupt at the RM9000 (MIPS) processor of the eXcite.
52 */
53 excite_cci_fpga_align_t rm9k_int;
54#else
55 /**
56 * MK2 Interrupt.
57 * Write access initiates interrupt at the ARM processor of the MK2.
58 */
59 excite_cci_fpga_align_t mk2_int;
60
61 excite_cci_fpga_align_t gap[0x1000-0x10f];
62
63 /**
64 * IRQ Source/Acknowledge.
65 */
66 excite_cci_fpga_align_t rm9k_irq_src;
67
68 /**
69 * IRQ Mask.
70 * Set bits enable the related interrupt.
71 */
72 excite_cci_fpga_align_t rm9k_irq_mask;
73#endif
74
75
76} excite_fpga;
77
78
79
80#endif /* ndef EXCITE_FPGA_H_INCLUDED */
diff --git a/arch/mips/include/asm/mach-excite/excite_nandflash.h b/arch/mips/include/asm/mach-excite/excite_nandflash.h
deleted file mode 100644
index c4cf6140622e..000000000000
--- a/arch/mips/include/asm/mach-excite/excite_nandflash.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __EXCITE_NANDFLASH_H__
2#define __EXCITE_NANDFLASH_H__
3
4/* Resource names */
5#define EXCITE_NANDFLASH_RESOURCE_REGS "excite_nandflash_regs"
6
7#endif /* __EXCITE_NANDFLASH_H__ */
diff --git a/arch/mips/include/asm/mach-excite/rm9k_eth.h b/arch/mips/include/asm/mach-excite/rm9k_eth.h
deleted file mode 100644
index 94705a46f72e..000000000000
--- a/arch/mips/include/asm/mach-excite/rm9k_eth.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#if !defined(__RM9K_ETH_H__)
2#define __RM9K_ETH_H__
3
4#define RM9K_GE_NAME "rm9k_ge"
5
6/* Resource names */
7#define RM9K_GE_RESOURCE_MAC "rm9k_ge_mac"
8#define RM9K_GE_RESOURCE_MSTAT "rm9k_ge_mstat"
9#define RM9K_GE_RESOURCE_PKTPROC "rm9k_ge_pktproc"
10#define RM9K_GE_RESOURCE_XDMA "rm9k_ge_xdma"
11#define RM9K_GE_RESOURCE_FIFO_RX "rm9k_ge_fifo_rx"
12#define RM9K_GE_RESOURCE_FIFO_TX "rm9k_ge_fifo_tx"
13#define RM9K_GE_RESOURCE_FIFOMEM_RX "rm9k_ge_fifo_memory_rx"
14#define RM9K_GE_RESOURCE_FIFOMEM_TX "rm9k_ge_fifo_memory_tx"
15#define RM9K_GE_RESOURCE_PHY "rm9k_ge_phy"
16#define RM9K_GE_RESOURCE_DMADESC_RX "rm9k_ge_dmadesc_rx"
17#define RM9K_GE_RESOURCE_DMADESC_TX "rm9k_ge_dmadesc_tx"
18#define RM9K_GE_RESOURCE_IRQ_MAIN "rm9k_ge_irq_main"
19#define RM9K_GE_RESOURCE_IRQ_PHY "rm9k_ge_irq_phy"
20#define RM9K_GE_RESOURCE_GPI_SLICE "rm9k_ge_gpi_slice"
21#define RM9K_GE_RESOURCE_MDIO_CHANNEL "rm9k_ge_mdio_channel"
22
23#endif /* !defined(__RM9K_ETH_H__) */
diff --git a/arch/mips/include/asm/mach-excite/rm9k_wdt.h b/arch/mips/include/asm/mach-excite/rm9k_wdt.h
deleted file mode 100644
index 3fa3c08d2da7..000000000000
--- a/arch/mips/include/asm/mach-excite/rm9k_wdt.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __RM9K_WDT_H__
2#define __RM9K_WDT_H__
3
4/* Device name */
5#define WDT_NAME "wdt_gpi"
6
7/* Resource names */
8#define WDT_RESOURCE_REGS "excite_watchdog_regs"
9#define WDT_RESOURCE_IRQ "excite_watchdog_irq"
10#define WDT_RESOURCE_COUNTER "excite_watchdog_counter"
11
12#endif /* __RM9K_WDT_H__ */
diff --git a/arch/mips/include/asm/mach-excite/rm9k_xicap.h b/arch/mips/include/asm/mach-excite/rm9k_xicap.h
deleted file mode 100644
index 009577734a8d..000000000000
--- a/arch/mips/include/asm/mach-excite/rm9k_xicap.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef __EXCITE_XICAP_H__
2#define __EXCITE_XICAP_H__
3
4
5/* Resource names */
6#define XICAP_RESOURCE_FIFO_RX "xicap_fifo_rx"
7#define XICAP_RESOURCE_FIFO_TX "xicap_fifo_tx"
8#define XICAP_RESOURCE_XDMA "xicap_xdma"
9#define XICAP_RESOURCE_DMADESC "xicap_dmadesc"
10#define XICAP_RESOURCE_PKTPROC "xicap_pktproc"
11#define XICAP_RESOURCE_IRQ "xicap_irq"
12#define XICAP_RESOURCE_GPI_SLICE "xicap_gpi_slice"
13#define XICAP_RESOURCE_FIFO_BLK "xicap_fifo_blocks"
14#define XICAP_RESOURCE_PKT_STREAM "xicap_pkt_stream"
15
16#endif /* __EXCITE_XICAP_H__ */
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h
new file mode 100644
index 000000000000..021f77ca59ec
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h
@@ -0,0 +1,305 @@
1/*
2 * The header file of cs5536 sourth bridge.
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu <liujl@lemote.com>
6 */
7
8#ifndef _CS5536_H
9#define _CS5536_H
10
11#include <linux/types.h>
12
13extern void _rdmsr(u32 msr, u32 *hi, u32 *lo);
14extern void _wrmsr(u32 msr, u32 hi, u32 lo);
15
16/*
17 * MSR module base
18 */
19#define CS5536_SB_MSR_BASE (0x00000000)
20#define CS5536_GLIU_MSR_BASE (0x10000000)
21#define CS5536_ILLEGAL_MSR_BASE (0x20000000)
22#define CS5536_USB_MSR_BASE (0x40000000)
23#define CS5536_IDE_MSR_BASE (0x60000000)
24#define CS5536_DIVIL_MSR_BASE (0x80000000)
25#define CS5536_ACC_MSR_BASE (0xa0000000)
26#define CS5536_UNUSED_MSR_BASE (0xc0000000)
27#define CS5536_GLCP_MSR_BASE (0xe0000000)
28
29#define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset))
30#define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset))
31#define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset))
32#define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset))
33#define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset))
34#define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset))
35#define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset))
36#define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset))
37#define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset))
38
39/*
40 * BAR SPACE OF VIRTUAL PCI :
41 * range for pci probe use, length is the actual size.
42 */
43/* IO space for all DIVIL modules */
44#define CS5536_IRQ_RANGE 0xffffffe0 /* USERD FOR PCI PROBE */
45#define CS5536_IRQ_LENGTH 0x20 /* THE REGS ACTUAL LENGTH */
46#define CS5536_SMB_RANGE 0xfffffff8
47#define CS5536_SMB_LENGTH 0x08
48#define CS5536_GPIO_RANGE 0xffffff00
49#define CS5536_GPIO_LENGTH 0x100
50#define CS5536_MFGPT_RANGE 0xffffffc0
51#define CS5536_MFGPT_LENGTH 0x40
52#define CS5536_ACPI_RANGE 0xffffffe0
53#define CS5536_ACPI_LENGTH 0x20
54#define CS5536_PMS_RANGE 0xffffff80
55#define CS5536_PMS_LENGTH 0x80
56/* IO space for IDE */
57#define CS5536_IDE_RANGE 0xfffffff0
58#define CS5536_IDE_LENGTH 0x10
59/* IO space for ACC */
60#define CS5536_ACC_RANGE 0xffffff80
61#define CS5536_ACC_LENGTH 0x80
62/* MEM space for ALL USB modules */
63#define CS5536_OHCI_RANGE 0xfffff000
64#define CS5536_OHCI_LENGTH 0x1000
65#define CS5536_EHCI_RANGE 0xfffff000
66#define CS5536_EHCI_LENGTH 0x1000
67
68/*
69 * PCI MSR ACCESS
70 */
71#define PCI_MSR_CTRL 0xF0
72#define PCI_MSR_ADDR 0xF4
73#define PCI_MSR_DATA_LO 0xF8
74#define PCI_MSR_DATA_HI 0xFC
75
76/**************** MSR *****************************/
77
78/*
79 * GLIU STANDARD MSR
80 */
81#define GLIU_CAP 0x00
82#define GLIU_CONFIG 0x01
83#define GLIU_SMI 0x02
84#define GLIU_ERROR 0x03
85#define GLIU_PM 0x04
86#define GLIU_DIAG 0x05
87
88/*
89 * GLIU SPEC. MSR
90 */
91#define GLIU_P2D_BM0 0x20
92#define GLIU_P2D_BM1 0x21
93#define GLIU_P2D_BM2 0x22
94#define GLIU_P2D_BMK0 0x23
95#define GLIU_P2D_BMK1 0x24
96#define GLIU_P2D_BM3 0x25
97#define GLIU_P2D_BM4 0x26
98#define GLIU_COH 0x80
99#define GLIU_PAE 0x81
100#define GLIU_ARB 0x82
101#define GLIU_ASMI 0x83
102#define GLIU_AERR 0x84
103#define GLIU_DEBUG 0x85
104#define GLIU_PHY_CAP 0x86
105#define GLIU_NOUT_RESP 0x87
106#define GLIU_NOUT_WDATA 0x88
107#define GLIU_WHOAMI 0x8B
108#define GLIU_SLV_DIS 0x8C
109#define GLIU_IOD_BM0 0xE0
110#define GLIU_IOD_BM1 0xE1
111#define GLIU_IOD_BM2 0xE2
112#define GLIU_IOD_BM3 0xE3
113#define GLIU_IOD_BM4 0xE4
114#define GLIU_IOD_BM5 0xE5
115#define GLIU_IOD_BM6 0xE6
116#define GLIU_IOD_BM7 0xE7
117#define GLIU_IOD_BM8 0xE8
118#define GLIU_IOD_BM9 0xE9
119#define GLIU_IOD_SC0 0xEA
120#define GLIU_IOD_SC1 0xEB
121#define GLIU_IOD_SC2 0xEC
122#define GLIU_IOD_SC3 0xED
123#define GLIU_IOD_SC4 0xEE
124#define GLIU_IOD_SC5 0xEF
125#define GLIU_IOD_SC6 0xF0
126#define GLIU_IOD_SC7 0xF1
127
128/*
129 * SB STANDARD
130 */
131#define SB_CAP 0x00
132#define SB_CONFIG 0x01
133#define SB_SMI 0x02
134#define SB_ERROR 0x03
135#define SB_MAR_ERR_EN 0x00000001
136#define SB_TAR_ERR_EN 0x00000002
137#define SB_RSVD_BIT1 0x00000004
138#define SB_EXCEP_ERR_EN 0x00000008
139#define SB_SYSE_ERR_EN 0x00000010
140#define SB_PARE_ERR_EN 0x00000020
141#define SB_TAS_ERR_EN 0x00000040
142#define SB_MAR_ERR_FLAG 0x00010000
143#define SB_TAR_ERR_FLAG 0x00020000
144#define SB_RSVD_BIT2 0x00040000
145#define SB_EXCEP_ERR_FLAG 0x00080000
146#define SB_SYSE_ERR_FLAG 0x00100000
147#define SB_PARE_ERR_FLAG 0x00200000
148#define SB_TAS_ERR_FLAG 0x00400000
149#define SB_PM 0x04
150#define SB_DIAG 0x05
151
152/*
153 * SB SPEC.
154 */
155#define SB_CTRL 0x10
156#define SB_R0 0x20
157#define SB_R1 0x21
158#define SB_R2 0x22
159#define SB_R3 0x23
160#define SB_R4 0x24
161#define SB_R5 0x25
162#define SB_R6 0x26
163#define SB_R7 0x27
164#define SB_R8 0x28
165#define SB_R9 0x29
166#define SB_R10 0x2A
167#define SB_R11 0x2B
168#define SB_R12 0x2C
169#define SB_R13 0x2D
170#define SB_R14 0x2E
171#define SB_R15 0x2F
172
173/*
174 * GLCP STANDARD
175 */
176#define GLCP_CAP 0x00
177#define GLCP_CONFIG 0x01
178#define GLCP_SMI 0x02
179#define GLCP_ERROR 0x03
180#define GLCP_PM 0x04
181#define GLCP_DIAG 0x05
182
183/*
184 * GLCP SPEC.
185 */
186#define GLCP_CLK_DIS_DELAY 0x08
187#define GLCP_PM_CLK_DISABLE 0x09
188#define GLCP_GLB_PM 0x0B
189#define GLCP_DBG_OUT 0x0C
190#define GLCP_RSVD1 0x0D
191#define GLCP_SOFT_COM 0x0E
192#define SOFT_BAR_SMB_FLAG 0x00000001
193#define SOFT_BAR_GPIO_FLAG 0x00000002
194#define SOFT_BAR_MFGPT_FLAG 0x00000004
195#define SOFT_BAR_IRQ_FLAG 0x00000008
196#define SOFT_BAR_PMS_FLAG 0x00000010
197#define SOFT_BAR_ACPI_FLAG 0x00000020
198#define SOFT_BAR_IDE_FLAG 0x00000400
199#define SOFT_BAR_ACC_FLAG 0x00000800
200#define SOFT_BAR_OHCI_FLAG 0x00001000
201#define SOFT_BAR_EHCI_FLAG 0x00002000
202#define GLCP_RSVD2 0x0F
203#define GLCP_CLK_OFF 0x10
204#define GLCP_CLK_ACTIVE 0x11
205#define GLCP_CLK_DISABLE 0x12
206#define GLCP_CLK4ACK 0x13
207#define GLCP_SYS_RST 0x14
208#define GLCP_RSVD3 0x15
209#define GLCP_DBG_CLK_CTRL 0x16
210#define GLCP_CHIP_REV_ID 0x17
211
212/* PIC */
213#define PIC_YSEL_LOW 0x20
214#define PIC_YSEL_LOW_USB_SHIFT 8
215#define PIC_YSEL_LOW_ACC_SHIFT 16
216#define PIC_YSEL_LOW_FLASH_SHIFT 24
217#define PIC_YSEL_HIGH 0x21
218#define PIC_ZSEL_LOW 0x22
219#define PIC_ZSEL_HIGH 0x23
220#define PIC_IRQM_PRIM 0x24
221#define PIC_IRQM_LPC 0x25
222#define PIC_XIRR_STS_LOW 0x26
223#define PIC_XIRR_STS_HIGH 0x27
224#define PCI_SHDW 0x34
225
226/*
227 * DIVIL STANDARD
228 */
229#define DIVIL_CAP 0x00
230#define DIVIL_CONFIG 0x01
231#define DIVIL_SMI 0x02
232#define DIVIL_ERROR 0x03
233#define DIVIL_PM 0x04
234#define DIVIL_DIAG 0x05
235
236/*
237 * DIVIL SPEC.
238 */
239#define DIVIL_LBAR_IRQ 0x08
240#define DIVIL_LBAR_KEL 0x09
241#define DIVIL_LBAR_SMB 0x0B
242#define DIVIL_LBAR_GPIO 0x0C
243#define DIVIL_LBAR_MFGPT 0x0D
244#define DIVIL_LBAR_ACPI 0x0E
245#define DIVIL_LBAR_PMS 0x0F
246#define DIVIL_LEG_IO 0x14
247#define DIVIL_BALL_OPTS 0x15
248#define DIVIL_SOFT_IRQ 0x16
249#define DIVIL_SOFT_RESET 0x17
250
251/* MFGPT */
252#define MFGPT_IRQ 0x28
253
254/*
255 * IDE STANDARD
256 */
257#define IDE_CAP 0x00
258#define IDE_CONFIG 0x01
259#define IDE_SMI 0x02
260#define IDE_ERROR 0x03
261#define IDE_PM 0x04
262#define IDE_DIAG 0x05
263
264/*
265 * IDE SPEC.
266 */
267#define IDE_IO_BAR 0x08
268#define IDE_CFG 0x10
269#define IDE_DTC 0x12
270#define IDE_CAST 0x13
271#define IDE_ETC 0x14
272#define IDE_INTERNAL_PM 0x15
273
274/*
275 * ACC STANDARD
276 */
277#define ACC_CAP 0x00
278#define ACC_CONFIG 0x01
279#define ACC_SMI 0x02
280#define ACC_ERROR 0x03
281#define ACC_PM 0x04
282#define ACC_DIAG 0x05
283
284/*
285 * USB STANDARD
286 */
287#define USB_CAP 0x00
288#define USB_CONFIG 0x01
289#define USB_SMI 0x02
290#define USB_ERROR 0x03
291#define USB_PM 0x04
292#define USB_DIAG 0x05
293
294/*
295 * USB SPEC.
296 */
297#define USB_OHCI 0x08
298#define USB_EHCI 0x09
299
300/****************** NATIVE ***************************/
301/* GPIO : I/O SPACE; REG : 32BITS */
302#define GPIOL_OUT_VAL 0x00
303#define GPIOL_OUT_EN 0x04
304
305#endif /* _CS5536_H */
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h
new file mode 100644
index 000000000000..4b493d6772c2
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h
@@ -0,0 +1,35 @@
1/*
2 * cs5536 mfgpt header file
3 */
4
5#ifndef _CS5536_MFGPT_H
6#define _CS5536_MFGPT_H
7
8#include <cs5536/cs5536.h>
9#include <cs5536/cs5536_pci.h>
10
11#ifdef CONFIG_CS5536_MFGPT
12extern void setup_mfgpt0_timer(void);
13extern void disable_mfgpt0_counter(void);
14extern void enable_mfgpt0_counter(void);
15#else
16static inline void __maybe_unused setup_mfgpt0_timer(void)
17{
18}
19static inline void __maybe_unused disable_mfgpt0_counter(void)
20{
21}
22static inline void __maybe_unused enable_mfgpt0_counter(void)
23{
24}
25#endif
26
27#define MFGPT_TICK_RATE 14318000
28#define COMPARE ((MFGPT_TICK_RATE + HZ/2) / HZ)
29
30#define MFGPT_BASE mfgpt_base
31#define MFGPT0_CMP2 (MFGPT_BASE + 2)
32#define MFGPT0_CNT (MFGPT_BASE + 4)
33#define MFGPT0_SETUP (MFGPT_BASE + 6)
34
35#endif /*!_CS5536_MFGPT_H */
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h
new file mode 100644
index 000000000000..0dca9c89ee7c
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h
@@ -0,0 +1,153 @@
1/*
2 * the definition file of cs5536 Virtual Support Module(VSM).
3 * pci configuration space can be accessed through the VSM, so
4 * there is no need of the MSR read/write now, except the spec.
5 * MSR registers which are not implemented yet.
6 *
7 * Copyright (C) 2007 Lemote Inc.
8 * Author : jlliu, liujl@lemote.com
9 */
10
11#ifndef _CS5536_PCI_H
12#define _CS5536_PCI_H
13
14#include <linux/types.h>
15#include <linux/pci_regs.h>
16
17extern void cs5536_pci_conf_write4(int function, int reg, u32 value);
18extern u32 cs5536_pci_conf_read4(int function, int reg);
19
20#define CS5536_ACC_INTR 9
21#define CS5536_IDE_INTR 14
22#define CS5536_USB_INTR 11
23#define CS5536_MFGPT_INTR 5
24#define CS5536_UART1_INTR 4
25#define CS5536_UART2_INTR 3
26
27/************** PCI BUS DEVICE FUNCTION ***************/
28
29/*
30 * PCI bus device function
31 */
32#define PCI_BUS_CS5536 0
33#define PCI_IDSEL_CS5536 14
34
35/********** STANDARD PCI-2.2 EXPANSION ****************/
36
37/*
38 * PCI configuration space
39 * we have to virtualize the PCI configure space head, so we should
40 * define the necessary IDs and some others.
41 */
42
43/* CONFIG of PCI VENDOR ID*/
44#define CFG_PCI_VENDOR_ID(mod_dev_id, sys_vendor_id) \
45 (((mod_dev_id) << 16) | (sys_vendor_id))
46
47/* VENDOR ID */
48#define CS5536_VENDOR_ID 0x1022
49
50/* DEVICE ID */
51#define CS5536_ISA_DEVICE_ID 0x2090
52#define CS5536_IDE_DEVICE_ID 0x209a
53#define CS5536_ACC_DEVICE_ID 0x2093
54#define CS5536_OHCI_DEVICE_ID 0x2094
55#define CS5536_EHCI_DEVICE_ID 0x2095
56
57/* CLASS CODE : CLASS SUB-CLASS INTERFACE */
58#define CS5536_ISA_CLASS_CODE 0x060100
59#define CS5536_IDE_CLASS_CODE 0x010180
60#define CS5536_ACC_CLASS_CODE 0x040100
61#define CS5536_OHCI_CLASS_CODE 0x0C0310
62#define CS5536_EHCI_CLASS_CODE 0x0C0320
63
64/* BHLC : BIST HEADER-TYPE LATENCY-TIMER CACHE-LINE-SIZE */
65
66#define CFG_PCI_CACHE_LINE_SIZE(header_type, latency_timer) \
67 ((PCI_NONE_BIST << 24) | ((header_type) << 16) \
68 | ((latency_timer) << 8) | PCI_NORMAL_CACHE_LINE_SIZE);
69
70#define PCI_NONE_BIST 0x00 /* RO not implemented yet. */
71#define PCI_BRIDGE_HEADER_TYPE 0x80 /* RO */
72#define PCI_NORMAL_HEADER_TYPE 0x00
73#define PCI_NORMAL_LATENCY_TIMER 0x00
74#define PCI_NORMAL_CACHE_LINE_SIZE 0x08 /* RW */
75
76/* BAR */
77#define PCI_BAR0_REG 0x10
78#define PCI_BAR1_REG 0x14
79#define PCI_BAR2_REG 0x18
80#define PCI_BAR3_REG 0x1c
81#define PCI_BAR4_REG 0x20
82#define PCI_BAR5_REG 0x24
83#define PCI_BAR_COUNT 6
84#define PCI_BAR_RANGE_MASK 0xFFFFFFFF
85
86/* CARDBUS CIS POINTER */
87#define PCI_CARDBUS_CIS_POINTER 0x00000000
88
89/* SUBSYSTEM VENDOR ID */
90#define CS5536_SUB_VENDOR_ID CS5536_VENDOR_ID
91
92/* SUBSYSTEM ID */
93#define CS5536_ISA_SUB_ID CS5536_ISA_DEVICE_ID
94#define CS5536_IDE_SUB_ID CS5536_IDE_DEVICE_ID
95#define CS5536_ACC_SUB_ID CS5536_ACC_DEVICE_ID
96#define CS5536_OHCI_SUB_ID CS5536_OHCI_DEVICE_ID
97#define CS5536_EHCI_SUB_ID CS5536_EHCI_DEVICE_ID
98
99/* EXPANSION ROM BAR */
100#define PCI_EXPANSION_ROM_BAR 0x00000000
101
102/* CAPABILITIES POINTER */
103#define PCI_CAPLIST_POINTER 0x00000000
104#define PCI_CAPLIST_USB_POINTER 0x40
105/* INTERRUPT */
106
107#define CFG_PCI_INTERRUPT_LINE(pin, mod_intr) \
108 ((PCI_MAX_LATENCY << 24) | (PCI_MIN_GRANT << 16) | \
109 ((pin) << 8) | (mod_intr))
110
111#define PCI_MAX_LATENCY 0x40
112#define PCI_MIN_GRANT 0x00
113#define PCI_DEFAULT_PIN 0x01
114
115/*********** EXPANSION PCI REG ************************/
116
117/*
118 * ISA EXPANSION
119 */
120#define PCI_UART1_INT_REG 0x50
121#define PCI_UART2_INT_REG 0x54
122#define PCI_ISA_FIXUP_REG 0x58
123
124/*
125 * IDE EXPANSION
126 */
127#define PCI_IDE_CFG_REG 0x40
128#define CS5536_IDE_FLASH_SIGNATURE 0xDEADBEEF
129#define PCI_IDE_DTC_REG 0x48
130#define PCI_IDE_CAST_REG 0x4C
131#define PCI_IDE_ETC_REG 0x50
132#define PCI_IDE_PM_REG 0x54
133#define PCI_IDE_INT_REG 0x60
134
135/*
136 * ACC EXPANSION
137 */
138#define PCI_ACC_INT_REG 0x50
139
140/*
141 * OHCI EXPANSION : INTTERUPT IS IMPLEMENTED BY THE OHCI
142 */
143#define PCI_OHCI_PM_REG 0x40
144#define PCI_OHCI_INT_REG 0x50
145
146/*
147 * EHCI EXPANSION
148 */
149#define PCI_EHCI_LEGSMIEN_REG 0x50
150#define PCI_EHCI_LEGSMISTS_REG 0x54
151#define PCI_EHCI_FLADJ_REG 0x60
152
153#endif /* _CS5536_PCI_H_ */
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h
new file mode 100644
index 000000000000..6305bea7e18e
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h
@@ -0,0 +1,31 @@
1/*
2 * the read/write interfaces for Virtual Support Module(VSM)
3 *
4 * Copyright (C) 2009 Lemote, Inc.
5 * Author: Wu Zhangjin <wuzj@lemote.com>
6 */
7
8#ifndef _CS5536_VSM_H
9#define _CS5536_VSM_H
10
11#include <linux/types.h>
12
13typedef void (*cs5536_pci_vsm_write)(int reg, u32 value);
14typedef u32 (*cs5536_pci_vsm_read)(int reg);
15
16#define DECLARE_CS5536_MODULE(name) \
17extern void pci_##name##_write_reg(int reg, u32 value); \
18extern u32 pci_##name##_read_reg(int reg);
19
20/* ide module */
21DECLARE_CS5536_MODULE(ide)
22/* acc module */
23DECLARE_CS5536_MODULE(acc)
24/* ohci module */
25DECLARE_CS5536_MODULE(ohci)
26/* isa module */
27DECLARE_CS5536_MODULE(isa)
28/* ehci module */
29DECLARE_CS5536_MODULE(ehci)
30
31#endif /* _CS5536_VSM_H */
diff --git a/arch/mips/include/asm/mach-loongson/dma-coherence.h b/arch/mips/include/asm/mach-loongson/dma-coherence.h
index 71a6851ba833..981c75f91a7d 100644
--- a/arch/mips/include/asm/mach-loongson/dma-coherence.h
+++ b/arch/mips/include/asm/mach-loongson/dma-coherence.h
@@ -28,7 +28,11 @@ static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
28static inline unsigned long plat_dma_addr_to_phys(struct device *dev, 28static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
29 dma_addr_t dma_addr) 29 dma_addr_t dma_addr)
30{ 30{
31#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT)
32 return (dma_addr > 0x8fffffff) ? dma_addr : (dma_addr & 0x0fffffff);
33#else
31 return dma_addr & 0x7fffffff; 34 return dma_addr & 0x7fffffff;
35#endif
32} 36}
33 37
34static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, 38static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
index da70bcf2304e..ee8bc8376972 100644
--- a/arch/mips/include/asm/mach-loongson/loongson.h
+++ b/arch/mips/include/asm/mach-loongson/loongson.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology 2 * Copyright (C) 2009 Lemote, Inc.
3 * Author: Wu Zhangjin <wuzj@lemote.com> 3 * Author: Wu Zhangjin <wuzj@lemote.com>
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
@@ -15,9 +15,6 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18/* there is an internal bonito64-compatiable northbridge in loongson2e/2f */
19#include <asm/mips-boards/bonito64.h>
20
21/* loongson internal northbridge initialization */ 18/* loongson internal northbridge initialization */
22extern void bonito_irq_init(void); 19extern void bonito_irq_init(void);
23 20
@@ -32,7 +29,19 @@ extern unsigned long memsize, highmemsize;
32/* loongson-specific command line, env and memory initialization */ 29/* loongson-specific command line, env and memory initialization */
33extern void __init prom_init_memory(void); 30extern void __init prom_init_memory(void);
34extern void __init prom_init_cmdline(void); 31extern void __init prom_init_cmdline(void);
32extern void __init prom_init_machtype(void);
35extern void __init prom_init_env(void); 33extern void __init prom_init_env(void);
34#ifdef CONFIG_LOONGSON_UART_BASE
35extern unsigned long _loongson_uart_base, loongson_uart_base;
36extern void prom_init_loongson_uart_base(void);
37#endif
38
39static inline void prom_init_uart_base(void)
40{
41#ifdef CONFIG_LOONGSON_UART_BASE
42 prom_init_loongson_uart_base();
43#endif
44}
36 45
37/* irq operation functions */ 46/* irq operation functions */
38extern void bonito_irqdispatch(void); 47extern void bonito_irqdispatch(void);
@@ -40,25 +49,276 @@ extern void __init bonito_irq_init(void);
40extern void __init set_irq_trigger_mode(void); 49extern void __init set_irq_trigger_mode(void);
41extern void __init mach_init_irq(void); 50extern void __init mach_init_irq(void);
42extern void mach_irq_dispatch(unsigned int pending); 51extern void mach_irq_dispatch(unsigned int pending);
52extern int mach_i8259_irq(void);
53
54/* We need this in some places... */
55#define delay() ({ \
56 int x; \
57 for (x = 0; x < 100000; x++) \
58 __asm__ __volatile__(""); \
59})
60
61#define LOONGSON_REG(x) \
62 (*(volatile u32 *)((char *)CKSEG1ADDR(LOONGSON_REG_BASE) + (x)))
63
64#define LOONGSON_IRQ_BASE 32
65#define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */
66
67#define LOONGSON_FLASH_BASE 0x1c000000
68#define LOONGSON_FLASH_SIZE 0x02000000 /* 32M */
69#define LOONGSON_FLASH_TOP (LOONGSON_FLASH_BASE+LOONGSON_FLASH_SIZE-1)
70
71#define LOONGSON_LIO0_BASE 0x1e000000
72#define LOONGSON_LIO0_SIZE 0x01C00000 /* 28M */
73#define LOONGSON_LIO0_TOP (LOONGSON_LIO0_BASE+LOONGSON_LIO0_SIZE-1)
74
75#define LOONGSON_BOOT_BASE 0x1fc00000
76#define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */
77#define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1)
78#define LOONGSON_REG_BASE 0x1fe00000
79#define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */
80#define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1)
81
82#define LOONGSON_LIO1_BASE 0x1ff00000
83#define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */
84#define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1)
85
86#define LOONGSON_PCILO0_BASE 0x10000000
87#define LOONGSON_PCILO1_BASE 0x14000000
88#define LOONGSON_PCILO2_BASE 0x18000000
89#define LOONGSON_PCILO_BASE LOONGSON_PCILO0_BASE
90#define LOONGSON_PCILO_SIZE 0x0c000000 /* 64M * 3 */
91#define LOONGSON_PCILO_TOP (LOONGSON_PCILO0_BASE+LOONGSON_PCILO_SIZE-1)
92
93#define LOONGSON_PCICFG_BASE 0x1fe80000
94#define LOONGSON_PCICFG_SIZE 0x00000800 /* 2K */
95#define LOONGSON_PCICFG_TOP (LOONGSON_PCICFG_BASE+LOONGSON_PCICFG_SIZE-1)
96#define LOONGSON_PCIIO_BASE 0x1fd00000
97#define LOONGSON_PCIIO_SIZE 0x00100000 /* 1M */
98#define LOONGSON_PCIIO_TOP (LOONGSON_PCIIO_BASE+LOONGSON_PCIIO_SIZE-1)
99
100/* Loongson Register Bases */
101
102#define LOONGSON_PCICONFIGBASE 0x00
103#define LOONGSON_REGBASE 0x100
43 104
44/* PCI Configuration Registers */ 105/* PCI Configuration Registers */
45#define LOONGSON_PCI_ISR4C BONITO_PCI_REG(0x4c) 106
107#define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x))
108#define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00)
109#define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04)
110#define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08)
111#define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c)
112#define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10)
113#define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14)
114#define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18)
115#define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c)
116#define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20)
117#define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30)
118#define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c)
119
120#define LOONGSON_PCI_ISR4C LOONGSON_PCI_REG(0x4c)
121
122#define LOONGSON_PCICMD_PERR_CLR 0x80000000
123#define LOONGSON_PCICMD_SERR_CLR 0x40000000
124#define LOONGSON_PCICMD_MABORT_CLR 0x20000000
125#define LOONGSON_PCICMD_MTABORT_CLR 0x10000000
126#define LOONGSON_PCICMD_TABORT_CLR 0x08000000
127#define LOONGSON_PCICMD_MPERR_CLR 0x01000000
128#define LOONGSON_PCICMD_PERRRESPEN 0x00000040
129#define LOONGSON_PCICMD_ASTEPEN 0x00000080
130#define LOONGSON_PCICMD_SERREN 0x00000100
131#define LOONGSON_PCILTIMER_BUSLATENCY 0x0000ff00
132#define LOONGSON_PCILTIMER_BUSLATENCY_SHIFT 8
133
134/* Loongson h/w Configuration */
135
136#define LOONGSON_GENCFG_OFFSET 0x4
137#define LOONGSON_GENCFG LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET)
138
139#define LOONGSON_GENCFG_DEBUGMODE 0x00000001
140#define LOONGSON_GENCFG_SNOOPEN 0x00000002
141#define LOONGSON_GENCFG_CPUSELFRESET 0x00000004
142
143#define LOONGSON_GENCFG_FORCE_IRQA 0x00000008
144#define LOONGSON_GENCFG_IRQA_ISOUT 0x00000010
145#define LOONGSON_GENCFG_IRQA_FROM_INT1 0x00000020
146#define LOONGSON_GENCFG_BYTESWAP 0x00000040
147
148#define LOONGSON_GENCFG_UNCACHED 0x00000080
149#define LOONGSON_GENCFG_PREFETCHEN 0x00000100
150#define LOONGSON_GENCFG_WBEHINDEN 0x00000200
151#define LOONGSON_GENCFG_CACHEALG 0x00000c00
152#define LOONGSON_GENCFG_CACHEALG_SHIFT 10
153#define LOONGSON_GENCFG_PCIQUEUE 0x00001000
154#define LOONGSON_GENCFG_CACHESTOP 0x00002000
155#define LOONGSON_GENCFG_MSTRBYTESWAP 0x00004000
156#define LOONGSON_GENCFG_BUSERREN 0x00008000
157#define LOONGSON_GENCFG_NORETRYTIMEOUT 0x00010000
158#define LOONGSON_GENCFG_SHORTCOPYTIMEOUT 0x00020000
159
160/* PCI address map control */
161
162#define LOONGSON_PCIMAP LOONGSON_REG(LOONGSON_REGBASE + 0x10)
163#define LOONGSON_PCIMEMBASECFG LOONGSON_REG(LOONGSON_REGBASE + 0x14)
164#define LOONGSON_PCIMAP_CFG LOONGSON_REG(LOONGSON_REGBASE + 0x18)
165
166/* GPIO Regs - r/w */
167
168#define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c)
169#define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20)
170
171/* ICU Configuration Regs - r/w */
172
173#define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24)
174#define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28)
175#define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c)
176
177/* ICU Enable Regs - IntEn & IntISR are r/o. */
178
179#define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30)
180#define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34)
181#define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38)
182#define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c)
183
184/* ICU */
185#define LOONGSON_ICU_MBOXES 0x0000000f
186#define LOONGSON_ICU_MBOXES_SHIFT 0
187#define LOONGSON_ICU_DMARDY 0x00000010
188#define LOONGSON_ICU_DMAEMPTY 0x00000020
189#define LOONGSON_ICU_COPYRDY 0x00000040
190#define LOONGSON_ICU_COPYEMPTY 0x00000080
191#define LOONGSON_ICU_COPYERR 0x00000100
192#define LOONGSON_ICU_PCIIRQ 0x00000200
193#define LOONGSON_ICU_MASTERERR 0x00000400
194#define LOONGSON_ICU_SYSTEMERR 0x00000800
195#define LOONGSON_ICU_DRAMPERR 0x00001000
196#define LOONGSON_ICU_RETRYERR 0x00002000
197#define LOONGSON_ICU_GPIOS 0x01ff0000
198#define LOONGSON_ICU_GPIOS_SHIFT 16
199#define LOONGSON_ICU_GPINS 0x7e000000
200#define LOONGSON_ICU_GPINS_SHIFT 25
201#define LOONGSON_ICU_MBOX(N) (1<<(LOONGSON_ICU_MBOXES_SHIFT+(N)))
202#define LOONGSON_ICU_GPIO(N) (1<<(LOONGSON_ICU_GPIOS_SHIFT+(N)))
203#define LOONGSON_ICU_GPIN(N) (1<<(LOONGSON_ICU_GPINS_SHIFT+(N)))
204
205/* PCI prefetch window base & mask */
206
207#define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40)
208#define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44)
209#define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48)
210#define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c)
46 211
47/* PCI_Hit*_Sel_* */ 212/* PCI_Hit*_Sel_* */
48 213
49#define LOONGSON_PCI_HIT0_SEL_L BONITO(BONITO_REGBASE + 0x50) 214#define LOONGSON_PCI_HIT0_SEL_L LOONGSON_REG(LOONGSON_REGBASE + 0x50)
50#define LOONGSON_PCI_HIT0_SEL_H BONITO(BONITO_REGBASE + 0x54) 215#define LOONGSON_PCI_HIT0_SEL_H LOONGSON_REG(LOONGSON_REGBASE + 0x54)
51#define LOONGSON_PCI_HIT1_SEL_L BONITO(BONITO_REGBASE + 0x58) 216#define LOONGSON_PCI_HIT1_SEL_L LOONGSON_REG(LOONGSON_REGBASE + 0x58)
52#define LOONGSON_PCI_HIT1_SEL_H BONITO(BONITO_REGBASE + 0x5c) 217#define LOONGSON_PCI_HIT1_SEL_H LOONGSON_REG(LOONGSON_REGBASE + 0x5c)
53#define LOONGSON_PCI_HIT2_SEL_L BONITO(BONITO_REGBASE + 0x60) 218#define LOONGSON_PCI_HIT2_SEL_L LOONGSON_REG(LOONGSON_REGBASE + 0x60)
54#define LOONGSON_PCI_HIT2_SEL_H BONITO(BONITO_REGBASE + 0x64) 219#define LOONGSON_PCI_HIT2_SEL_H LOONGSON_REG(LOONGSON_REGBASE + 0x64)
55 220
56/* PXArb Config & Status */ 221/* PXArb Config & Status */
57 222
58#define LOONGSON_PXARB_CFG BONITO(BONITO_REGBASE + 0x68) 223#define LOONGSON_PXARB_CFG LOONGSON_REG(LOONGSON_REGBASE + 0x68)
59#define LOONGSON_PXARB_STATUS BONITO(BONITO_REGBASE + 0x6c) 224#define LOONGSON_PXARB_STATUS LOONGSON_REG(LOONGSON_REGBASE + 0x6c)
225
226/* pcimap */
227
228#define LOONGSON_PCIMAP_PCIMAP_LO0 0x0000003f
229#define LOONGSON_PCIMAP_PCIMAP_LO0_SHIFT 0
230#define LOONGSON_PCIMAP_PCIMAP_LO1 0x00000fc0
231#define LOONGSON_PCIMAP_PCIMAP_LO1_SHIFT 6
232#define LOONGSON_PCIMAP_PCIMAP_LO2 0x0003f000
233#define LOONGSON_PCIMAP_PCIMAP_LO2_SHIFT 12
234#define LOONGSON_PCIMAP_PCIMAP_2 0x00040000
235#define LOONGSON_PCIMAP_WIN(WIN, ADDR) \
236 ((((ADDR)>>26) & LOONGSON_PCIMAP_PCIMAP_LO0) << ((WIN)*6))
237
238#ifdef CONFIG_CPU_SUPPORTS_CPUFREQ
239#include <linux/cpufreq.h>
240extern void loongson2_cpu_wait(void);
241extern struct cpufreq_frequency_table loongson2_clockmod_table[];
242
243/* Chip Config */
244#define LOONGSON_CHIPCFG0 LOONGSON_REG(LOONGSON_REGBASE + 0x80)
245#endif
246
247/*
248 * address windows configuration module
249 *
250 * loongson2e do not have this module
251 */
252#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
253
254/* address window config module base address */
255#define LOONGSON_ADDRWINCFG_BASE 0x3ff00000ul
256#define LOONGSON_ADDRWINCFG_SIZE 0x180
257
258extern unsigned long _loongson_addrwincfg_base;
259#define LOONGSON_ADDRWINCFG(offset) \
260 (*(volatile u64 *)(_loongson_addrwincfg_base + (offset)))
261
262#define CPU_WIN0_BASE LOONGSON_ADDRWINCFG(0x00)
263#define CPU_WIN1_BASE LOONGSON_ADDRWINCFG(0x08)
264#define CPU_WIN2_BASE LOONGSON_ADDRWINCFG(0x10)
265#define CPU_WIN3_BASE LOONGSON_ADDRWINCFG(0x18)
266
267#define CPU_WIN0_MASK LOONGSON_ADDRWINCFG(0x20)
268#define CPU_WIN1_MASK LOONGSON_ADDRWINCFG(0x28)
269#define CPU_WIN2_MASK LOONGSON_ADDRWINCFG(0x30)
270#define CPU_WIN3_MASK LOONGSON_ADDRWINCFG(0x38)
271
272#define CPU_WIN0_MMAP LOONGSON_ADDRWINCFG(0x40)
273#define CPU_WIN1_MMAP LOONGSON_ADDRWINCFG(0x48)
274#define CPU_WIN2_MMAP LOONGSON_ADDRWINCFG(0x50)
275#define CPU_WIN3_MMAP LOONGSON_ADDRWINCFG(0x58)
276
277#define PCIDMA_WIN0_BASE LOONGSON_ADDRWINCFG(0x60)
278#define PCIDMA_WIN1_BASE LOONGSON_ADDRWINCFG(0x68)
279#define PCIDMA_WIN2_BASE LOONGSON_ADDRWINCFG(0x70)
280#define PCIDMA_WIN3_BASE LOONGSON_ADDRWINCFG(0x78)
281
282#define PCIDMA_WIN0_MASK LOONGSON_ADDRWINCFG(0x80)
283#define PCIDMA_WIN1_MASK LOONGSON_ADDRWINCFG(0x88)
284#define PCIDMA_WIN2_MASK LOONGSON_ADDRWINCFG(0x90)
285#define PCIDMA_WIN3_MASK LOONGSON_ADDRWINCFG(0x98)
286
287#define PCIDMA_WIN0_MMAP LOONGSON_ADDRWINCFG(0xa0)
288#define PCIDMA_WIN1_MMAP LOONGSON_ADDRWINCFG(0xa8)
289#define PCIDMA_WIN2_MMAP LOONGSON_ADDRWINCFG(0xb0)
290#define PCIDMA_WIN3_MMAP LOONGSON_ADDRWINCFG(0xb8)
291
292#define ADDRWIN_WIN0 0
293#define ADDRWIN_WIN1 1
294#define ADDRWIN_WIN2 2
295#define ADDRWIN_WIN3 3
296
297#define ADDRWIN_MAP_DST_DDR 0
298#define ADDRWIN_MAP_DST_PCI 1
299#define ADDRWIN_MAP_DST_LIO 1
300
301/*
302 * s: CPU, PCIDMA
303 * d: DDR, PCI, LIO
304 * win: 0, 1, 2, 3
305 * src: map source
306 * dst: map destination
307 * size: ~mask + 1
308 */
309#define LOONGSON_ADDRWIN_CFG(s, d, w, src, dst, size) do {\
310 s##_WIN##w##_BASE = (src); \
311 s##_WIN##w##_MMAP = (src) | ADDRWIN_MAP_DST_##d; \
312 s##_WIN##w##_MASK = ~(size-1); \
313} while (0)
314
315#define LOONGSON_ADDRWIN_CPUTOPCI(win, src, dst, size) \
316 LOONGSON_ADDRWIN_CFG(CPU, PCI, win, src, dst, size)
317#define LOONGSON_ADDRWIN_CPUTODDR(win, src, dst, size) \
318 LOONGSON_ADDRWIN_CFG(CPU, DDR, win, src, dst, size)
319#define LOONGSON_ADDRWIN_PCITODDR(win, src, dst, size) \
320 LOONGSON_ADDRWIN_CFG(PCIDMA, DDR, win, src, dst, size)
60 321
61/* loongson2-specific perf counter IRQ */ 322#endif /* ! CONFIG_CPU_SUPPORTS_ADDRWINCFG */
62#define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6)
63 323
64#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */ 324#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */
diff --git a/arch/mips/include/asm/mach-loongson/machine.h b/arch/mips/include/asm/mach-loongson/machine.h
index 206ea2067916..acf8359cb135 100644
--- a/arch/mips/include/asm/mach-loongson/machine.h
+++ b/arch/mips/include/asm/mach-loongson/machine.h
@@ -13,10 +13,15 @@
13 13
14#ifdef CONFIG_LEMOTE_FULOONG2E 14#ifdef CONFIG_LEMOTE_FULOONG2E
15 15
16#define LOONGSON_UART_BASE (BONITO_PCIIO_BASE + 0x3f8)
17
18#define LOONGSON_MACHTYPE MACH_LEMOTE_FL2E 16#define LOONGSON_MACHTYPE MACH_LEMOTE_FL2E
19 17
20#endif 18#endif
21 19
20/* use fuloong2f as the default machine of LEMOTE_MACH2F */
21#ifdef CONFIG_LEMOTE_MACH2F
22
23#define LOONGSON_MACHTYPE MACH_LEMOTE_FL2F
24
25#endif
26
22#endif /* __ASM_MACH_LOONGSON_MACHINE_H */ 27#endif /* __ASM_MACH_LOONGSON_MACHINE_H */
diff --git a/arch/mips/include/asm/mach-loongson/mem.h b/arch/mips/include/asm/mach-loongson/mem.h
index bd7b3cba7e35..e9960f341b96 100644
--- a/arch/mips/include/asm/mach-loongson/mem.h
+++ b/arch/mips/include/asm/mach-loongson/mem.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology 2 * Copyright (C) 2009 Lemote, Inc.
3 * Author: Wu Zhangjin <wuzj@lemote.com> 3 * Author: Wu Zhangjin <wuzj@lemote.com>
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
@@ -12,19 +12,30 @@
12#define __ASM_MACH_LOONGSON_MEM_H 12#define __ASM_MACH_LOONGSON_MEM_H
13 13
14/* 14/*
15 * On Lemote Loongson 2e 15 * high memory space
16 * 16 *
17 * the high memory space starts from 512M. 17 * in loongson2e, starts from 512M
18 * the peripheral registers reside between 0x1000:0000 and 0x2000:0000. 18 * in loongson2f, starts from 2G 256M
19 */ 19 */
20#ifdef CONFIG_CPU_LOONGSON2E
21#define LOONGSON_HIGHMEM_START 0x20000000
22#else
23#define LOONGSON_HIGHMEM_START 0x90000000
24#endif
20 25
21#ifdef CONFIG_LEMOTE_FULOONG2E 26/*
22 27 * the peripheral registers(MMIO):
23#define LOONGSON_HIGHMEM_START 0x20000000 28 *
29 * On the Lemote Loongson 2e system, reside between 0x1000:0000 and 0x2000:0000.
30 * On the Lemote Loongson 2f system, reside between 0x1000:0000 and 0x8000:0000.
31 */
24 32
25#define LOONGSON_MMIO_MEM_START 0x10000000 33#define LOONGSON_MMIO_MEM_START 0x10000000
26#define LOONGSON_MMIO_MEM_END 0x20000000
27 34
35#ifdef CONFIG_CPU_LOONGSON2E
36#define LOONGSON_MMIO_MEM_END 0x20000000
37#else
38#define LOONGSON_MMIO_MEM_END 0x80000000
28#endif 39#endif
29 40
30#endif /* __ASM_MACH_LOONGSON_MEM_H */ 41#endif /* __ASM_MACH_LOONGSON_MEM_H */
diff --git a/arch/mips/include/asm/mach-loongson/pci.h b/arch/mips/include/asm/mach-loongson/pci.h
index f1663ca81da0..a199a4f6de4e 100644
--- a/arch/mips/include/asm/mach-loongson/pci.h
+++ b/arch/mips/include/asm/mach-loongson/pci.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2008 Zhang Le <r0bertz@gentoo.org> 2 * Copyright (c) 2008 Zhang Le <r0bertz@gentoo.org>
3 * Copyright (c) 2009 Wu Zhangjin <wuzj@lemote.com>
3 * 4 *
4 * This program is free software; you can redistribute it 5 * This program is free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General 6 * and/or modify it under the terms of the GNU General
@@ -22,16 +23,39 @@
22#ifndef __ASM_MACH_LOONGSON_PCI_H_ 23#ifndef __ASM_MACH_LOONGSON_PCI_H_
23#define __ASM_MACH_LOONGSON_PCI_H_ 24#define __ASM_MACH_LOONGSON_PCI_H_
24 25
25extern struct pci_ops bonito64_pci_ops; 26extern struct pci_ops loongson_pci_ops;
26 27
27#ifdef CONFIG_LEMOTE_FULOONG2E 28/* this is an offset from mips_io_port_base */
29#define LOONGSON_PCI_IO_START 0x00004000UL
30
31#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
32
33/*
34 * we use address window2 to map cpu address space to pci space
35 * window2: cpu [1G, 2G] -> pci [1G, 2G]
36 * why not use window 0 & 1? because they are used by cpu when booting.
37 * window0: cpu [0, 256M] -> ddr [0, 256M]
38 * window1: cpu [256M, 512M] -> pci [256M, 512M]
39 */
40
41/* the smallest LOONGSON_CPU_MEM_SRC can be 512M */
42#define LOONGSON_CPU_MEM_SRC 0x40000000ul /* 1G */
43#define LOONGSON_PCI_MEM_DST LOONGSON_CPU_MEM_SRC
44
45#define LOONGSON_PCI_MEM_START LOONGSON_PCI_MEM_DST
46#define LOONGSON_PCI_MEM_END (0x80000000ul-1) /* 2G */
47
48#define MMAP_CPUTOPCI_SIZE (LOONGSON_PCI_MEM_END - \
49 LOONGSON_PCI_MEM_START + 1)
50
51#else /* loongson2f/32bit & loongson2e */
28 52
29/* this pci memory space is mapped by pcimap in pci.c */ 53/* this pci memory space is mapped by pcimap in pci.c */
30#define LOONGSON_PCI_MEM_START BONITO_PCILO1_BASE 54#define LOONGSON_PCI_MEM_START LOONGSON_PCILO1_BASE
31#define LOONGSON_PCI_MEM_END (BONITO_PCILO1_BASE + 0x04000000 * 2) 55#define LOONGSON_PCI_MEM_END (LOONGSON_PCILO1_BASE + 0x04000000 * 2)
32/* this is an offset from mips_io_port_base */ 56/* this is an offset from mips_io_port_base */
33#define LOONGSON_PCI_IO_START 0x00004000UL 57#define LOONGSON_PCI_IO_START 0x00004000UL
34 58
35#endif 59#endif /* !CONFIG_CPU_SUPPORTS_ADDRWINCFG */
36 60
37#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */ 61#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */
diff --git a/arch/mips/include/asm/mach-pnx833x/gpio.h b/arch/mips/include/asm/mach-pnx833x/gpio.h
index 8de0eb9c98a3..ed3a88da70f6 100644
--- a/arch/mips/include/asm/mach-pnx833x/gpio.h
+++ b/arch/mips/include/asm/mach-pnx833x/gpio.h
@@ -24,7 +24,7 @@
24 24
25/* BIG FAT WARNING: races danger! 25/* BIG FAT WARNING: races danger!
26 No protections exist here. Current users are only early init code, 26 No protections exist here. Current users are only early init code,
27 when locking is not needed because no cuncurency yet exists there, 27 when locking is not needed because no concurrency yet exists there,
28 and GPIO IRQ dispatcher, which does locking. 28 and GPIO IRQ dispatcher, which does locking.
29 However, if many uses will ever happen, proper locking will be needed 29 However, if many uses will ever happen, proper locking will be needed
30 - including locking between different uses 30 - including locking between different uses
diff --git a/arch/mips/include/asm/mach-powertv/asic.h b/arch/mips/include/asm/mach-powertv/asic.h
new file mode 100644
index 000000000000..bcad43a93ebf
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/asic.h
@@ -0,0 +1,107 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef _ASM_MACH_POWERTV_ASIC_H
20#define _ASM_MACH_POWERTV_ASIC_H
21
22#include <linux/ioport.h>
23#include <asm/mach-powertv/asic_regs.h>
24
25#define DVR_CAPABLE (1<<0)
26#define PCIE_CAPABLE (1<<1)
27#define FFS_CAPABLE (1<<2)
28#define DISPLAY_CAPABLE (1<<3)
29
30/* Platform Family types
31 * For compitability, the new value must be added in the end */
32enum family_type {
33 FAMILY_8500,
34 FAMILY_8500RNG,
35 FAMILY_4500,
36 FAMILY_1500,
37 FAMILY_8600,
38 FAMILY_4600,
39 FAMILY_4600VZA,
40 FAMILY_8600VZB,
41 FAMILY_1500VZE,
42 FAMILY_1500VZF,
43 FAMILIES
44};
45
46/* Register maps for each ASIC */
47extern const struct register_map calliope_register_map;
48extern const struct register_map cronus_register_map;
49extern const struct register_map zeus_register_map;
50
51extern struct resource dvr_cronus_resources[];
52extern struct resource dvr_zeus_resources[];
53extern struct resource non_dvr_calliope_resources[];
54extern struct resource non_dvr_cronus_resources[];
55extern struct resource non_dvr_cronuslite_resources[];
56extern struct resource non_dvr_vz_calliope_resources[];
57extern struct resource non_dvr_vze_calliope_resources[];
58extern struct resource non_dvr_vzf_calliope_resources[];
59extern struct resource non_dvr_zeus_resources[];
60
61extern void powertv_platform_init(void);
62extern void platform_alloc_bootmem(void);
63extern enum asic_type platform_get_asic(void);
64extern enum family_type platform_get_family(void);
65extern int platform_supports_dvr(void);
66extern int platform_supports_ffs(void);
67extern int platform_supports_pcie(void);
68extern int platform_supports_display(void);
69extern void configure_platform(void);
70extern void platform_configure_usb_ehci(void);
71extern void platform_unconfigure_usb_ehci(void);
72extern void platform_configure_usb_ohci(void);
73extern void platform_unconfigure_usb_ohci(void);
74
75/* Platform Resources */
76#define ASIC_RESOURCE_GET_EXISTS 1
77extern struct resource *asic_resource_get(const char *name);
78extern void platform_release_memory(void *baddr, int size);
79
80/* Reboot Cause */
81extern void set_reboot_cause(char code, unsigned int data, unsigned int data2);
82extern void set_locked_reboot_cause(char code, unsigned int data,
83 unsigned int data2);
84
85enum sys_reboot_type {
86 sys_unknown_reboot = 0x00, /* Unknown reboot cause */
87 sys_davic_change = 0x01, /* Reboot due to change in DAVIC
88 * mode */
89 sys_user_reboot = 0x02, /* Reboot initiated by user */
90 sys_system_reboot = 0x03, /* Reboot initiated by OS */
91 sys_trap_reboot = 0x04, /* Reboot due to a CPU trap */
92 sys_silent_reboot = 0x05, /* Silent reboot */
93 sys_boot_ldr_reboot = 0x06, /* Bootloader reboot */
94 sys_power_up_reboot = 0x07, /* Power on bootup. Older
95 * drivers may report as
96 * userReboot. */
97 sys_code_change = 0x08, /* Reboot to take code change.
98 * Older drivers may report as
99 * userReboot. */
100 sys_hardware_reset = 0x09, /* HW watchdog or front-panel
101 * reset button reset. Older
102 * drivers may report as
103 * userReboot. */
104 sys_watchdogInterrupt = 0x0A /* Pre-watchdog interrupt */
105};
106
107#endif /* _ASM_MACH_POWERTV_ASIC_H */
diff --git a/arch/mips/include/asm/mach-powertv/asic_regs.h b/arch/mips/include/asm/mach-powertv/asic_regs.h
new file mode 100644
index 000000000000..9a65c93782f9
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/asic_regs.h
@@ -0,0 +1,155 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef __ASM_MACH_POWERTV_ASIC_H_
20#define __ASM_MACH_POWERTV_ASIC_H_
21#include <linux/io.h>
22
23/* ASIC types */
24enum asic_type {
25 ASIC_UNKNOWN,
26 ASIC_ZEUS,
27 ASIC_CALLIOPE,
28 ASIC_CRONUS,
29 ASIC_CRONUSLITE,
30 ASICS
31};
32
33/* hardcoded values read from Chip Version registers */
34#define CRONUS_10 0x0B4C1C20
35#define CRONUS_11 0x0B4C1C21
36#define CRONUSLITE_10 0x0B4C1C40
37
38#define NAND_FLASH_BASE 0x03000000
39#define ZEUS_IO_BASE 0x09000000
40#define CALLIOPE_IO_BASE 0x08000000
41#define CRONUS_IO_BASE 0x09000000
42#define ASIC_IO_SIZE 0x01000000
43
44/* Definitions for backward compatibility */
45#define UART1_INTSTAT uart1_intstat
46#define UART1_INTEN uart1_inten
47#define UART1_CONFIG1 uart1_config1
48#define UART1_CONFIG2 uart1_config2
49#define UART1_DIVISORHI uart1_divisorhi
50#define UART1_DIVISORLO uart1_divisorlo
51#define UART1_DATA uart1_data
52#define UART1_STATUS uart1_status
53
54/* ASIC register enumeration */
55struct register_map {
56 u32 eic_slow0_strt_add;
57 u32 eic_cfg_bits;
58 u32 eic_ready_status;
59
60 u32 chipver3;
61 u32 chipver2;
62 u32 chipver1;
63 u32 chipver0;
64
65 u32 uart1_intstat;
66 u32 uart1_inten;
67 u32 uart1_config1;
68 u32 uart1_config2;
69 u32 uart1_divisorhi;
70 u32 uart1_divisorlo;
71 u32 uart1_data;
72 u32 uart1_status;
73
74 u32 int_stat_3;
75 u32 int_stat_2;
76 u32 int_stat_1;
77 u32 int_stat_0;
78 u32 int_config;
79 u32 int_int_scan;
80 u32 ien_int_3;
81 u32 ien_int_2;
82 u32 ien_int_1;
83 u32 ien_int_0;
84 u32 int_level_3_3;
85 u32 int_level_3_2;
86 u32 int_level_3_1;
87 u32 int_level_3_0;
88 u32 int_level_2_3;
89 u32 int_level_2_2;
90 u32 int_level_2_1;
91 u32 int_level_2_0;
92 u32 int_level_1_3;
93 u32 int_level_1_2;
94 u32 int_level_1_1;
95 u32 int_level_1_0;
96 u32 int_level_0_3;
97 u32 int_level_0_2;
98 u32 int_level_0_1;
99 u32 int_level_0_0;
100 u32 int_docsis_en;
101
102 u32 mips_pll_setup;
103 u32 usb_fs;
104 u32 test_bus;
105 u32 crt_spare;
106 u32 usb2_ohci_int_mask;
107 u32 usb2_strap;
108 u32 ehci_hcapbase;
109 u32 ohci_hc_revision;
110 u32 bcm1_bs_lmi_steer;
111 u32 usb2_control;
112 u32 usb2_stbus_obc;
113 u32 usb2_stbus_mess_size;
114 u32 usb2_stbus_chunk_size;
115
116 u32 pcie_regs;
117 u32 tim_ch;
118 u32 tim_cl;
119 u32 gpio_dout;
120 u32 gpio_din;
121 u32 gpio_dir;
122 u32 watchdog;
123 u32 front_panel;
124
125 u32 register_maps;
126};
127
128extern enum asic_type asic;
129extern const struct register_map *register_map;
130extern unsigned long asic_phy_base; /* Physical address of ASIC */
131extern unsigned long asic_base; /* Virtual address of ASIC */
132
133/*
134 * Macros to interface to registers through their ioremapped address
135 * asic_reg_offset Returns the offset of a given register from the start
136 * of the ASIC address space
137 * asic_reg_phys_addr Returns the physical address of the given register
138 * asic_reg_addr Returns the iomapped virtual address of the given
139 * register.
140 */
141#define asic_reg_offset(x) (register_map->x)
142#define asic_reg_phys_addr(x) (asic_phy_base + asic_reg_offset(x))
143#define asic_reg_addr(x) \
144 ((unsigned int *) (asic_base + asic_reg_offset(x)))
145
146/*
147 * The asic_reg macro is gone. It should be replaced by either asic_read or
148 * asic_write, as appropriate.
149 */
150
151#define asic_read(x) readl(asic_reg_addr(x))
152#define asic_write(v, x) writel(v, asic_reg_addr(x))
153
154extern void asic_irq_init(void);
155#endif
diff --git a/arch/mips/include/asm/mach-powertv/dma-coherence.h b/arch/mips/include/asm/mach-powertv/dma-coherence.h
new file mode 100644
index 000000000000..5b8d5ebeb838
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h
@@ -0,0 +1,119 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Version from mach-generic modified to support PowerTV port
7 * Portions Copyright (C) 2009 Cisco Systems, Inc.
8 * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org>
9 *
10 */
11
12#ifndef __ASM_MACH_POWERTV_DMA_COHERENCE_H
13#define __ASM_MACH_POWERTV_DMA_COHERENCE_H
14
15#include <linux/sched.h>
16#include <linux/version.h>
17#include <linux/device.h>
18#include <asm/mach-powertv/asic.h>
19
20static inline bool is_kseg2(void *addr)
21{
22 return (unsigned long)addr >= KSEG2;
23}
24
25static inline unsigned long virt_to_phys_from_pte(void *addr)
26{
27 pgd_t *pgd;
28 pud_t *pud;
29 pmd_t *pmd;
30 pte_t *ptep, pte;
31
32 unsigned long virt_addr = (unsigned long)addr;
33 unsigned long phys_addr = 0UL;
34
35 /* get the page global directory. */
36 pgd = pgd_offset_k(virt_addr);
37
38 if (!pgd_none(*pgd)) {
39 /* get the page upper directory */
40 pud = pud_offset(pgd, virt_addr);
41 if (!pud_none(*pud)) {
42 /* get the page middle directory */
43 pmd = pmd_offset(pud, virt_addr);
44 if (!pmd_none(*pmd)) {
45 /* get a pointer to the page table entry */
46 ptep = pte_offset(pmd, virt_addr);
47 pte = *ptep;
48 /* check for a valid page */
49 if (pte_present(pte)) {
50 /* get the physical address the page is
51 * refering to */
52 phys_addr = (unsigned long)
53 page_to_phys(pte_page(pte));
54 /* add the offset within the page */
55 phys_addr |= (virt_addr & ~PAGE_MASK);
56 }
57 }
58 }
59 }
60
61 return phys_addr;
62}
63
64static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr,
65 size_t size)
66{
67 if (is_kseg2(addr))
68 return phys_to_bus(virt_to_phys_from_pte(addr));
69 else
70 return phys_to_bus(virt_to_phys(addr));
71}
72
73static inline dma_addr_t plat_map_dma_mem_page(struct device *dev,
74 struct page *page)
75{
76 return phys_to_bus(page_to_phys(page));
77}
78
79static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
80 dma_addr_t dma_addr)
81{
82 return bus_to_phys(dma_addr);
83}
84
85static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
86 size_t size, enum dma_data_direction direction)
87{
88}
89
90static inline int plat_dma_supported(struct device *dev, u64 mask)
91{
92 /*
93 * we fall back to GFP_DMA when the mask isn't all 1s,
94 * so we can't guarantee allocations that must be
95 * within a tighter range than GFP_DMA..
96 */
97 if (mask < DMA_BIT_MASK(24))
98 return 0;
99
100 return 1;
101}
102
103static inline void plat_extra_sync_for_device(struct device *dev)
104{
105 return;
106}
107
108static inline int plat_dma_mapping_error(struct device *dev,
109 dma_addr_t dma_addr)
110{
111 return 0;
112}
113
114static inline int plat_device_is_coherent(struct device *dev)
115{
116 return 0;
117}
118
119#endif /* __ASM_MACH_POWERTV_DMA_COHERENCE_H */
diff --git a/arch/mips/include/asm/mach-powertv/interrupts.h b/arch/mips/include/asm/mach-powertv/interrupts.h
new file mode 100644
index 000000000000..629a57413657
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/interrupts.h
@@ -0,0 +1,254 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef _ASM_MACH_POWERTV_INTERRUPTS_H_
20#define _ASM_MACH_POWERTV_INTERRUPTS_H_
21
22/*
23 * Defines for all of the interrupt lines
24 */
25
26/* Definitions for backward compatibility */
27#define kIrq_Uart1 irq_uart1
28
29#define ibase 0
30
31/*------------- Register: int_stat_3 */
32/* 126 unused (bit 31) */
33#define irq_asc2video (ibase+126) /* ASC 2 Video Interrupt */
34#define irq_asc1video (ibase+125) /* ASC 1 Video Interrupt */
35#define irq_comms_block_wd (ibase+124) /* ASC 1 Video Interrupt */
36#define irq_fdma_mailbox (ibase+123) /* FDMA Mailbox Output */
37#define irq_fdma_gp (ibase+122) /* FDMA GP Output */
38#define irq_mips_pic (ibase+121) /* MIPS Performance Counter
39 * Interrupt */
40#define irq_mips_timer (ibase+120) /* MIPS Timer Interrupt */
41#define irq_memory_protect (ibase+119) /* Memory Protection Interrupt
42 * -- Ored by glue logic inside
43 * SPARC ILC (see
44 * INT_MEM_PROT_STAT, below,
45 * for individual interrupts)
46 */
47/* 118 unused (bit 22) */
48#define irq_sbag (ibase+117) /* SBAG Interrupt -- Ored by
49 * glue logic inside SPARC ILC
50 * (see INT_SBAG_STAT, below,
51 * for individual interrupts) */
52#define irq_qam_b_fec (ibase+116) /* QAM B FEC Interrupt */
53#define irq_qam_a_fec (ibase+115) /* QAM A FEC Interrupt */
54/* 114 unused (bit 18) */
55#define irq_mailbox (ibase+113) /* Mailbox Debug Interrupt --
56 * Ored by glue logic inside
57 * SPARC ILC (see
58 * INT_MAILBOX_STAT, below, for
59 * individual interrupts) */
60#define irq_fuse_stat1 (ibase+112) /* Fuse Status 1 */
61#define irq_fuse_stat2 (ibase+111) /* Fuse Status 2 */
62#define irq_fuse_stat3 (ibase+110) /* Blitter Interrupt / Fuse
63 * Status 3 */
64#define irq_blitter (ibase+110) /* Blitter Interrupt / Fuse
65 * Status 3 */
66#define irq_avc1_pp0 (ibase+109) /* AVC Decoder #1 PP0
67 * Interrupt */
68#define irq_avc1_pp1 (ibase+108) /* AVC Decoder #1 PP1
69 * Interrupt */
70#define irq_avc1_mbe (ibase+107) /* AVC Decoder #1 MBE
71 * Interrupt */
72#define irq_avc2_pp0 (ibase+106) /* AVC Decoder #2 PP0
73 * Interrupt */
74#define irq_avc2_pp1 (ibase+105) /* AVC Decoder #2 PP1
75 * Interrupt */
76#define irq_avc2_mbe (ibase+104) /* AVC Decoder #2 MBE
77 * Interrupt */
78#define irq_zbug_spi (ibase+103) /* Zbug SPI Slave Interrupt */
79#define irq_qam_mod2 (ibase+102) /* QAM Modulator 2 DMA
80 * Interrupt */
81#define irq_ir_rx (ibase+101) /* IR RX 2 Interrupt */
82#define irq_aud_dsp2 (ibase+100) /* Audio DSP #2 Interrupt */
83#define irq_aud_dsp1 (ibase+99) /* Audio DSP #1 Interrupt */
84#define irq_docsis (ibase+98) /* DOCSIS Debug Interrupt */
85#define irq_sd_dvp1 (ibase+97) /* SD DVP #1 Interrupt */
86#define irq_sd_dvp2 (ibase+96) /* SD DVP #2 Interrupt */
87/*------------- Register: int_stat_2 */
88#define irq_hd_dvp (ibase+95) /* HD DVP Interrupt */
89#define kIrq_Prewatchdog (ibase+94) /* watchdog Pre-Interrupt */
90#define irq_timer2 (ibase+93) /* Programmable Timer
91 * Interrupt 2 */
92#define irq_1394 (ibase+92) /* 1394 Firewire Interrupt */
93#define irq_usbohci (ibase+91) /* USB 2.0 OHCI Interrupt */
94#define irq_usbehci (ibase+90) /* USB 2.0 EHCI Interrupt */
95#define irq_pciexp (ibase+89) /* PCI Express 0 Interrupt */
96#define irq_pciexp0 (ibase+89) /* PCI Express 0 Interrupt */
97#define irq_afe1 (ibase+88) /* AFE 1 Interrupt */
98#define irq_sata (ibase+87) /* SATA 1 Interrupt */
99#define irq_sata1 (ibase+87) /* SATA 1 Interrupt */
100#define irq_dtcp (ibase+86) /* DTCP Interrupt */
101#define irq_pciexp1 (ibase+85) /* PCI Express 1 Interrupt */
102/* 84 unused (bit 20) */
103/* 83 unused (bit 19) */
104/* 82 unused (bit 18) */
105#define irq_sata2 (ibase+81) /* SATA2 Interrupt */
106#define irq_uart2 (ibase+80) /* UART2 Interrupt */
107#define irq_legacy_usb (ibase+79) /* Legacy USB Host ISR (1.1
108 * Host module) */
109#define irq_pod (ibase+78) /* POD Interrupt */
110#define irq_slave_usb (ibase+77) /* Slave USB */
111#define irq_denc1 (ibase+76) /* DENC #1 VTG Interrupt */
112#define irq_vbi_vtg (ibase+75) /* VBI VTG Interrupt */
113#define irq_afe2 (ibase+74) /* AFE 2 Interrupt */
114#define irq_denc2 (ibase+73) /* DENC #2 VTG Interrupt */
115#define irq_asc2 (ibase+72) /* ASC #2 Interrupt */
116#define irq_asc1 (ibase+71) /* ASC #1 Interrupt */
117#define irq_mod_dma (ibase+70) /* Modulator DMA Interrupt */
118#define irq_byte_eng1 (ibase+69) /* Byte Engine Interrupt [1] */
119#define irq_byte_eng0 (ibase+68) /* Byte Engine Interrupt [0] */
120/* 67 unused (bit 03) */
121/* 66 unused (bit 02) */
122/* 65 unused (bit 01) */
123/* 64 unused (bit 00) */
124/*------------- Register: int_stat_1 */
125/* 63 unused (bit 31) */
126/* 62 unused (bit 30) */
127/* 61 unused (bit 29) */
128/* 60 unused (bit 28) */
129/* 59 unused (bit 27) */
130/* 58 unused (bit 26) */
131/* 57 unused (bit 25) */
132/* 56 unused (bit 24) */
133#define irq_buf_dma_mem2mem (ibase+55) /* BufDMA Memory to Memory
134 * Interrupt */
135#define irq_buf_dma_usbtransmit (ibase+54) /* BufDMA USB Transmit
136 * Interrupt */
137#define irq_buf_dma_qpskpodtransmit (ibase+53) /* BufDMA QPSK/POD Tramsit
138 * Interrupt */
139#define irq_buf_dma_transmit_error (ibase+52) /* BufDMA Transmit Error
140 * Interrupt */
141#define irq_buf_dma_usbrecv (ibase+51) /* BufDMA USB Receive
142 * Interrupt */
143#define irq_buf_dma_qpskpodrecv (ibase+50) /* BufDMA QPSK/POD Receive
144 * Interrupt */
145#define irq_buf_dma_recv_error (ibase+49) /* BufDMA Receive Error
146 * Interrupt */
147#define irq_qamdma_transmit_play (ibase+48) /* QAMDMA Transmit/Play
148 * Interrupt */
149#define irq_qamdma_transmit_error (ibase+47) /* QAMDMA Transmit Error
150 * Interrupt */
151#define irq_qamdma_recv2high (ibase+46) /* QAMDMA Receive 2 High
152 * (Chans 63-32) */
153#define irq_qamdma_recv2low (ibase+45) /* QAMDMA Receive 2 Low
154 * (Chans 31-0) */
155#define irq_qamdma_recv1high (ibase+44) /* QAMDMA Receive 1 High
156 * (Chans 63-32) */
157#define irq_qamdma_recv1low (ibase+43) /* QAMDMA Receive 1 Low
158 * (Chans 31-0) */
159#define irq_qamdma_recv_error (ibase+42) /* QAMDMA Receive Error
160 * Interrupt */
161#define irq_mpegsplice (ibase+41) /* MPEG Splice Interrupt */
162#define irq_deinterlace_rdy (ibase+40) /* Deinterlacer Frame Ready
163 * Interrupt */
164#define irq_ext_in0 (ibase+39) /* External Interrupt irq_in0 */
165#define irq_gpio3 (ibase+38) /* GP I/O IRQ 3 - From GP I/O
166 * Module */
167#define irq_gpio2 (ibase+37) /* GP I/O IRQ 2 - From GP I/O
168 * Module (ABE_intN) */
169#define irq_pcrcmplt1 (ibase+36) /* PCR Capture Complete or
170 * Discontinuity 1 */
171#define irq_pcrcmplt2 (ibase+35) /* PCR Capture Complete or
172 * Discontinuity 2 */
173#define irq_parse_peierr (ibase+34) /* PID Parser Error Detect
174 * (PEI) */
175#define irq_parse_cont_err (ibase+33) /* PID Parser continuity error
176 * detect */
177#define irq_ds1framer (ibase+32) /* DS1 Framer Interrupt */
178/*------------- Register: int_stat_0 */
179#define irq_gpio1 (ibase+31) /* GP I/O IRQ 1 - From GP I/O
180 * Module */
181#define irq_gpio0 (ibase+30) /* GP I/O IRQ 0 - From GP I/O
182 * Module */
183#define irq_qpsk_out_aloha (ibase+29) /* QPSK Output Slotted Aloha
184 * (chan 3) Transmission
185 * Completed OK */
186#define irq_qpsk_out_tdma (ibase+28) /* QPSK Output TDMA (chan 2)
187 * Transmission Completed OK */
188#define irq_qpsk_out_reserve (ibase+27) /* QPSK Output Reservation
189 * (chan 1) Transmission
190 * Completed OK */
191#define irq_qpsk_out_aloha_err (ibase+26) /* QPSK Output Slotted Aloha
192 * (chan 3)Transmission
193 * completed with Errors. */
194#define irq_qpsk_out_tdma_err (ibase+25) /* QPSK Output TDMA (chan 2)
195 * Transmission completed with
196 * Errors. */
197#define irq_qpsk_out_rsrv_err (ibase+24) /* QPSK Output Reservation
198 * (chan 1) Transmission
199 * completed with Errors */
200#define irq_aloha_fail (ibase+23) /* Unsuccessful Resend of Aloha
201 * for N times. Aloha retry
202 * timeout for channel 3. */
203#define irq_timer1 (ibase+22) /* Programmable Timer
204 * Interrupt */
205#define irq_keyboard (ibase+21) /* Keyboard Module Interrupt */
206#define irq_i2c (ibase+20) /* I2C Module Interrupt */
207#define irq_spi (ibase+19) /* SPI Module Interrupt */
208#define irq_irblaster (ibase+18) /* IR Blaster Interrupt */
209#define irq_splice_detect (ibase+17) /* PID Key Change Interrupt or
210 * Splice Detect Interrupt */
211#define irq_se_micro (ibase+16) /* Secure Micro I/F Module
212 * Interrupt */
213#define irq_uart1 (ibase+15) /* UART Interrupt */
214#define irq_irrecv (ibase+14) /* IR Receiver Interrupt */
215#define irq_host_int1 (ibase+13) /* Host-to-Host Interrupt 1 */
216#define irq_host_int0 (ibase+12) /* Host-to-Host Interrupt 0 */
217#define irq_qpsk_hecerr (ibase+11) /* QPSK HEC Error Interrupt */
218#define irq_qpsk_crcerr (ibase+10) /* QPSK AAL-5 CRC Error
219 * Interrupt */
220/* 9 unused (bit 09) */
221/* 8 unused (bit 08) */
222#define irq_psicrcerr (ibase+7) /* QAM PSI CRC Error
223 * Interrupt */
224#define irq_psilength_err (ibase+6) /* QAM PSI Length Error
225 * Interrupt */
226#define irq_esfforward (ibase+5) /* ESF Interrupt Mark From
227 * Forward Path Reference -
228 * every 3ms when forward Mbits
229 * and forward slot control
230 * bytes are updated. */
231#define irq_esfreverse (ibase+4) /* ESF Interrupt Mark from
232 * Reverse Path Reference -
233 * delayed from forward mark by
234 * the ranging delay plus a
235 * fixed amount. When reverse
236 * Mbits and reverse slot
237 * control bytes are updated.
238 * Occurs every 3ms for 3.0M and
239 * 1.554 M upstream rates and
240 * every 6 ms for 256K upstream
241 * rate. */
242#define irq_aloha_timeout (ibase+3) /* Slotted-Aloha timeout on
243 * Channel 1. */
244#define irq_reservation (ibase+2) /* Partial (or Incremental)
245 * Reservation Message Completed
246 * or Slotted aloha verify for
247 * channel 1. */
248#define irq_aloha3 (ibase+1) /* Slotted-Aloha Message Verify
249 * Interrupt or Reservation
250 * increment completed for
251 * channel 3. */
252#define irq_mpeg_d (ibase+0) /* MPEG Decoder Interrupt */
253#endif /* _ASM_MACH_POWERTV_INTERRUPTS_H_ */
254
diff --git a/arch/mips/include/asm/mach-powertv/ioremap.h b/arch/mips/include/asm/mach-powertv/ioremap.h
new file mode 100644
index 000000000000..e6276d5146e8
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/ioremap.h
@@ -0,0 +1,90 @@
1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version
5 * 2 of the License, or (at your option) any later version.
6 *
7 * Portions Copyright (C) Cisco Systems, Inc.
8 */
9#ifndef __ASM_MACH_POWERTV_IOREMAP_H
10#define __ASM_MACH_POWERTV_IOREMAP_H
11
12#include <linux/types.h>
13
14#define LOW_MEM_BOUNDARY_PHYS 0x20000000
15#define LOW_MEM_BOUNDARY_MASK (~(LOW_MEM_BOUNDARY_PHYS - 1))
16
17/*
18 * The bus addresses are different than the physical addresses that
19 * the processor sees by an offset. This offset varies by ASIC
20 * version. Define a variable to hold the offset and some macros to
21 * make the conversion simpler. */
22extern unsigned long phys_to_bus_offset;
23
24#ifdef CONFIG_HIGHMEM
25#define MEM_GAP_PHYS 0x60000000
26/*
27 * TODO: We will use the hard code for conversion between physical and
28 * bus until the bootloader releases their device tree to us.
29 */
30#define phys_to_bus(x) (((x) < LOW_MEM_BOUNDARY_PHYS) ? \
31 ((x) + phys_to_bus_offset) : (x))
32#define bus_to_phys(x) (((x) < MEM_GAP_PHYS_ADDR) ? \
33 ((x) - phys_to_bus_offset) : (x))
34#else
35#define phys_to_bus(x) ((x) + phys_to_bus_offset)
36#define bus_to_phys(x) ((x) - phys_to_bus_offset)
37#endif
38
39/*
40 * Determine whether the address we are given is for an ASIC device
41 * Params: addr Address to check
42 * Returns: Zero if the address is not for ASIC devices, non-zero
43 * if it is.
44 */
45static inline int asic_is_device_addr(phys_t addr)
46{
47 return !((phys_t)addr & (phys_t) LOW_MEM_BOUNDARY_MASK);
48}
49
50/*
51 * Determine whether the address we are given is external RAM mappable
52 * into KSEG1.
53 * Params: addr Address to check
54 * Returns: Zero if the address is not for external RAM and
55 */
56static inline int asic_is_lowmem_ram_addr(phys_t addr)
57{
58 /*
59 * The RAM always starts at the following address in the processor's
60 * physical address space
61 */
62 static const phys_t phys_ram_base = 0x10000000;
63 phys_t bus_ram_base;
64
65 bus_ram_base = phys_to_bus_offset + phys_ram_base;
66
67 return addr >= bus_ram_base &&
68 addr < (bus_ram_base + (LOW_MEM_BOUNDARY_PHYS - phys_ram_base));
69}
70
71/*
72 * Allow physical addresses to be fixed up to help peripherals located
73 * outside the low 32-bit range -- generic pass-through version.
74 */
75static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
76{
77 return phys_addr;
78}
79
80static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size,
81 unsigned long flags)
82{
83 return NULL;
84}
85
86static inline int plat_iounmap(const volatile void __iomem *addr)
87{
88 return 0;
89}
90#endif /* __ASM_MACH_POWERTV_IOREMAP_H */
diff --git a/arch/mips/include/asm/mach-powertv/irq.h b/arch/mips/include/asm/mach-powertv/irq.h
new file mode 100644
index 000000000000..4bd5d0c61a91
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/irq.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef _ASM_MACH_POWERTV_IRQ_H
20#define _ASM_MACH_POWERTV_IRQ_H
21#include <asm/mach-powertv/interrupts.h>
22
23#define MIPS_CPU_IRQ_BASE ibase
24#define NR_IRQS 127
25#endif
diff --git a/arch/mips/include/asm/mach-powertv/powertv-clock.h b/arch/mips/include/asm/mach-powertv/powertv-clock.h
new file mode 100644
index 000000000000..6f3e9a0fcf8c
--- /dev/null
+++ b/arch/mips/include/asm/mach-powertv/powertv-clock.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18/*
19 * Local definitions for the powertv PCI code
20 */
21
22#ifndef _POWERTV_PCI_POWERTV_PCI_H_
23#define _POWERTV_PCI_POWERTV_PCI_H_
24extern int asic_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
25extern int asic_pcie_init(void);
26extern int asic_pcie_init(void);
27
28extern int log_level;
29#endif
diff --git a/arch/mips/include/asm/mach-excite/war.h b/arch/mips/include/asm/mach-powertv/war.h
index 1f82180c1598..7ac05ecc512b 100644
--- a/arch/mips/include/asm/mach-excite/war.h
+++ b/arch/mips/include/asm/mach-powertv/war.h
@@ -3,10 +3,13 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * This version for the PowerTV platform copied from the Malta version.
7 *
6 * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> 8 * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
9 * Portions copyright (C) 2009 Cisco Systems, Inc.
7 */ 10 */
8#ifndef __ASM_MIPS_MACH_EXCITE_WAR_H 11#ifndef __ASM_MACH_POWERTV_WAR_H
9#define __ASM_MIPS_MACH_EXCITE_WAR_H 12#define __ASM_MACH_POWERTV_WAR_H
10 13
11#define R4600_V1_INDEX_ICACHEOP_WAR 0 14#define R4600_V1_INDEX_ICACHEOP_WAR 0
12#define R4600_V1_HIT_CACHEOP_WAR 0 15#define R4600_V1_HIT_CACHEOP_WAR 0
@@ -14,12 +17,12 @@
14#define R5432_CP0_INTERRUPT_WAR 0 17#define R5432_CP0_INTERRUPT_WAR 0
15#define BCM1250_M3_WAR 0 18#define BCM1250_M3_WAR 0
16#define SIBYTE_1956_WAR 0 19#define SIBYTE_1956_WAR 0
17#define MIPS4K_ICACHE_REFILL_WAR 0 20#define MIPS4K_ICACHE_REFILL_WAR 1
18#define MIPS_CACHE_SYNC_WAR 0 21#define MIPS_CACHE_SYNC_WAR 1
19#define TX49XX_ICACHE_INDEX_INV_WAR 0 22#define TX49XX_ICACHE_INDEX_INV_WAR 0
20#define RM9000_CDEX_SMP_WAR 1 23#define RM9000_CDEX_SMP_WAR 0
21#define ICACHE_REFILLS_WORKAROUND_WAR 1 24#define ICACHE_REFILLS_WORKAROUND_WAR 1
22#define R10000_LLSC_WAR 0 25#define R10000_LLSC_WAR 0
23#define MIPS34K_MISSED_ITLB_WAR 0 26#define MIPS34K_MISSED_ITLB_WAR 0
24 27
25#endif /* __ASM_MIPS_MACH_EXCITE_WAR_H */ 28#endif /* __ASM_MACH_POWERTV_WAR_H */
diff --git a/arch/mips/include/asm/mips-boards/bonito64.h b/arch/mips/include/asm/mips-boards/bonito64.h
index a576ce044c3c..d14e2adc4be5 100644
--- a/arch/mips/include/asm/mips-boards/bonito64.h
+++ b/arch/mips/include/asm/mips-boards/bonito64.h
@@ -26,11 +26,6 @@
26/* offsets from base register */ 26/* offsets from base register */
27#define BONITO(x) (x) 27#define BONITO(x) (x)
28 28
29#elif defined(CONFIG_LEMOTE_FULOONG2E)
30
31#define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x)))
32#define BONITO_IRQ_BASE 32
33
34#else 29#else
35 30
36/* 31/*
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h
index 6083db586500..145bb81ccaa5 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -24,6 +24,33 @@
24#endif /* SMTC */ 24#endif /* SMTC */
25#include <asm-generic/mm_hooks.h> 25#include <asm-generic/mm_hooks.h>
26 26
27#ifdef CONFIG_MIPS_PGD_C0_CONTEXT
28
29#define TLBMISS_HANDLER_SETUP_PGD(pgd) \
30 tlbmiss_handler_setup_pgd((unsigned long)(pgd))
31
32static inline void tlbmiss_handler_setup_pgd(unsigned long pgd)
33{
34 /* Check for swapper_pg_dir and convert to physical address. */
35 if ((pgd & CKSEG3) == CKSEG0)
36 pgd = CPHYSADDR(pgd);
37 write_c0_context(pgd << 11);
38}
39
40#define TLBMISS_HANDLER_SETUP() \
41 do { \
42 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir); \
43 write_c0_xcontext((unsigned long) smp_processor_id() << 51); \
44 } while (0)
45
46
47static inline unsigned long get_current_pgd(void)
48{
49 return PHYS_TO_XKSEG_CACHED((read_c0_context() >> 11) & ~0xfffUL);
50}
51
52#else /* CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/
53
27/* 54/*
28 * For the fast tlb miss handlers, we keep a per cpu array of pointers 55 * For the fast tlb miss handlers, we keep a per cpu array of pointers
29 * to the current pgd for each processor. Also, the proc. id is stuffed 56 * to the current pgd for each processor. Also, the proc. id is stuffed
@@ -46,7 +73,7 @@ extern unsigned long pgd_current[];
46 back_to_back_c0_hazard(); \ 73 back_to_back_c0_hazard(); \
47 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) 74 TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
48#endif 75#endif
49 76#endif /* CONFIG_MIPS_PGD_C0_CONTEXT*/
50#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 77#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
51 78
52#define ASID_INC 0x40 79#define ASID_INC 0x40
diff --git a/arch/mips/include/asm/octeon/cvmx-agl-defs.h b/arch/mips/include/asm/octeon/cvmx-agl-defs.h
new file mode 100644
index 000000000000..ec94b9ab7be1
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-agl-defs.h
@@ -0,0 +1,1194 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file 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 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_AGL_DEFS_H__
29#define __CVMX_AGL_DEFS_H__
30
31#define CVMX_AGL_GMX_BAD_REG \
32 CVMX_ADD_IO_SEG(0x00011800E0000518ull)
33#define CVMX_AGL_GMX_BIST \
34 CVMX_ADD_IO_SEG(0x00011800E0000400ull)
35#define CVMX_AGL_GMX_DRV_CTL \
36 CVMX_ADD_IO_SEG(0x00011800E00007F0ull)
37#define CVMX_AGL_GMX_INF_MODE \
38 CVMX_ADD_IO_SEG(0x00011800E00007F8ull)
39#define CVMX_AGL_GMX_PRTX_CFG(offset) \
40 CVMX_ADD_IO_SEG(0x00011800E0000010ull + (((offset) & 1) * 2048))
41#define CVMX_AGL_GMX_RXX_ADR_CAM0(offset) \
42 CVMX_ADD_IO_SEG(0x00011800E0000180ull + (((offset) & 1) * 2048))
43#define CVMX_AGL_GMX_RXX_ADR_CAM1(offset) \
44 CVMX_ADD_IO_SEG(0x00011800E0000188ull + (((offset) & 1) * 2048))
45#define CVMX_AGL_GMX_RXX_ADR_CAM2(offset) \
46 CVMX_ADD_IO_SEG(0x00011800E0000190ull + (((offset) & 1) * 2048))
47#define CVMX_AGL_GMX_RXX_ADR_CAM3(offset) \
48 CVMX_ADD_IO_SEG(0x00011800E0000198ull + (((offset) & 1) * 2048))
49#define CVMX_AGL_GMX_RXX_ADR_CAM4(offset) \
50 CVMX_ADD_IO_SEG(0x00011800E00001A0ull + (((offset) & 1) * 2048))
51#define CVMX_AGL_GMX_RXX_ADR_CAM5(offset) \
52 CVMX_ADD_IO_SEG(0x00011800E00001A8ull + (((offset) & 1) * 2048))
53#define CVMX_AGL_GMX_RXX_ADR_CAM_EN(offset) \
54 CVMX_ADD_IO_SEG(0x00011800E0000108ull + (((offset) & 1) * 2048))
55#define CVMX_AGL_GMX_RXX_ADR_CTL(offset) \
56 CVMX_ADD_IO_SEG(0x00011800E0000100ull + (((offset) & 1) * 2048))
57#define CVMX_AGL_GMX_RXX_DECISION(offset) \
58 CVMX_ADD_IO_SEG(0x00011800E0000040ull + (((offset) & 1) * 2048))
59#define CVMX_AGL_GMX_RXX_FRM_CHK(offset) \
60 CVMX_ADD_IO_SEG(0x00011800E0000020ull + (((offset) & 1) * 2048))
61#define CVMX_AGL_GMX_RXX_FRM_CTL(offset) \
62 CVMX_ADD_IO_SEG(0x00011800E0000018ull + (((offset) & 1) * 2048))
63#define CVMX_AGL_GMX_RXX_FRM_MAX(offset) \
64 CVMX_ADD_IO_SEG(0x00011800E0000030ull + (((offset) & 1) * 2048))
65#define CVMX_AGL_GMX_RXX_FRM_MIN(offset) \
66 CVMX_ADD_IO_SEG(0x00011800E0000028ull + (((offset) & 1) * 2048))
67#define CVMX_AGL_GMX_RXX_IFG(offset) \
68 CVMX_ADD_IO_SEG(0x00011800E0000058ull + (((offset) & 1) * 2048))
69#define CVMX_AGL_GMX_RXX_INT_EN(offset) \
70 CVMX_ADD_IO_SEG(0x00011800E0000008ull + (((offset) & 1) * 2048))
71#define CVMX_AGL_GMX_RXX_INT_REG(offset) \
72 CVMX_ADD_IO_SEG(0x00011800E0000000ull + (((offset) & 1) * 2048))
73#define CVMX_AGL_GMX_RXX_JABBER(offset) \
74 CVMX_ADD_IO_SEG(0x00011800E0000038ull + (((offset) & 1) * 2048))
75#define CVMX_AGL_GMX_RXX_PAUSE_DROP_TIME(offset) \
76 CVMX_ADD_IO_SEG(0x00011800E0000068ull + (((offset) & 1) * 2048))
77#define CVMX_AGL_GMX_RXX_STATS_CTL(offset) \
78 CVMX_ADD_IO_SEG(0x00011800E0000050ull + (((offset) & 1) * 2048))
79#define CVMX_AGL_GMX_RXX_STATS_OCTS(offset) \
80 CVMX_ADD_IO_SEG(0x00011800E0000088ull + (((offset) & 1) * 2048))
81#define CVMX_AGL_GMX_RXX_STATS_OCTS_CTL(offset) \
82 CVMX_ADD_IO_SEG(0x00011800E0000098ull + (((offset) & 1) * 2048))
83#define CVMX_AGL_GMX_RXX_STATS_OCTS_DMAC(offset) \
84 CVMX_ADD_IO_SEG(0x00011800E00000A8ull + (((offset) & 1) * 2048))
85#define CVMX_AGL_GMX_RXX_STATS_OCTS_DRP(offset) \
86 CVMX_ADD_IO_SEG(0x00011800E00000B8ull + (((offset) & 1) * 2048))
87#define CVMX_AGL_GMX_RXX_STATS_PKTS(offset) \
88 CVMX_ADD_IO_SEG(0x00011800E0000080ull + (((offset) & 1) * 2048))
89#define CVMX_AGL_GMX_RXX_STATS_PKTS_BAD(offset) \
90 CVMX_ADD_IO_SEG(0x00011800E00000C0ull + (((offset) & 1) * 2048))
91#define CVMX_AGL_GMX_RXX_STATS_PKTS_CTL(offset) \
92 CVMX_ADD_IO_SEG(0x00011800E0000090ull + (((offset) & 1) * 2048))
93#define CVMX_AGL_GMX_RXX_STATS_PKTS_DMAC(offset) \
94 CVMX_ADD_IO_SEG(0x00011800E00000A0ull + (((offset) & 1) * 2048))
95#define CVMX_AGL_GMX_RXX_STATS_PKTS_DRP(offset) \
96 CVMX_ADD_IO_SEG(0x00011800E00000B0ull + (((offset) & 1) * 2048))
97#define CVMX_AGL_GMX_RXX_UDD_SKP(offset) \
98 CVMX_ADD_IO_SEG(0x00011800E0000048ull + (((offset) & 1) * 2048))
99#define CVMX_AGL_GMX_RX_BP_DROPX(offset) \
100 CVMX_ADD_IO_SEG(0x00011800E0000420ull + (((offset) & 1) * 8))
101#define CVMX_AGL_GMX_RX_BP_OFFX(offset) \
102 CVMX_ADD_IO_SEG(0x00011800E0000460ull + (((offset) & 1) * 8))
103#define CVMX_AGL_GMX_RX_BP_ONX(offset) \
104 CVMX_ADD_IO_SEG(0x00011800E0000440ull + (((offset) & 1) * 8))
105#define CVMX_AGL_GMX_RX_PRT_INFO \
106 CVMX_ADD_IO_SEG(0x00011800E00004E8ull)
107#define CVMX_AGL_GMX_RX_TX_STATUS \
108 CVMX_ADD_IO_SEG(0x00011800E00007E8ull)
109#define CVMX_AGL_GMX_SMACX(offset) \
110 CVMX_ADD_IO_SEG(0x00011800E0000230ull + (((offset) & 1) * 2048))
111#define CVMX_AGL_GMX_STAT_BP \
112 CVMX_ADD_IO_SEG(0x00011800E0000520ull)
113#define CVMX_AGL_GMX_TXX_APPEND(offset) \
114 CVMX_ADD_IO_SEG(0x00011800E0000218ull + (((offset) & 1) * 2048))
115#define CVMX_AGL_GMX_TXX_CTL(offset) \
116 CVMX_ADD_IO_SEG(0x00011800E0000270ull + (((offset) & 1) * 2048))
117#define CVMX_AGL_GMX_TXX_MIN_PKT(offset) \
118 CVMX_ADD_IO_SEG(0x00011800E0000240ull + (((offset) & 1) * 2048))
119#define CVMX_AGL_GMX_TXX_PAUSE_PKT_INTERVAL(offset) \
120 CVMX_ADD_IO_SEG(0x00011800E0000248ull + (((offset) & 1) * 2048))
121#define CVMX_AGL_GMX_TXX_PAUSE_PKT_TIME(offset) \
122 CVMX_ADD_IO_SEG(0x00011800E0000238ull + (((offset) & 1) * 2048))
123#define CVMX_AGL_GMX_TXX_PAUSE_TOGO(offset) \
124 CVMX_ADD_IO_SEG(0x00011800E0000258ull + (((offset) & 1) * 2048))
125#define CVMX_AGL_GMX_TXX_PAUSE_ZERO(offset) \
126 CVMX_ADD_IO_SEG(0x00011800E0000260ull + (((offset) & 1) * 2048))
127#define CVMX_AGL_GMX_TXX_SOFT_PAUSE(offset) \
128 CVMX_ADD_IO_SEG(0x00011800E0000250ull + (((offset) & 1) * 2048))
129#define CVMX_AGL_GMX_TXX_STAT0(offset) \
130 CVMX_ADD_IO_SEG(0x00011800E0000280ull + (((offset) & 1) * 2048))
131#define CVMX_AGL_GMX_TXX_STAT1(offset) \
132 CVMX_ADD_IO_SEG(0x00011800E0000288ull + (((offset) & 1) * 2048))
133#define CVMX_AGL_GMX_TXX_STAT2(offset) \
134 CVMX_ADD_IO_SEG(0x00011800E0000290ull + (((offset) & 1) * 2048))
135#define CVMX_AGL_GMX_TXX_STAT3(offset) \
136 CVMX_ADD_IO_SEG(0x00011800E0000298ull + (((offset) & 1) * 2048))
137#define CVMX_AGL_GMX_TXX_STAT4(offset) \
138 CVMX_ADD_IO_SEG(0x00011800E00002A0ull + (((offset) & 1) * 2048))
139#define CVMX_AGL_GMX_TXX_STAT5(offset) \
140 CVMX_ADD_IO_SEG(0x00011800E00002A8ull + (((offset) & 1) * 2048))
141#define CVMX_AGL_GMX_TXX_STAT6(offset) \
142 CVMX_ADD_IO_SEG(0x00011800E00002B0ull + (((offset) & 1) * 2048))
143#define CVMX_AGL_GMX_TXX_STAT7(offset) \
144 CVMX_ADD_IO_SEG(0x00011800E00002B8ull + (((offset) & 1) * 2048))
145#define CVMX_AGL_GMX_TXX_STAT8(offset) \
146 CVMX_ADD_IO_SEG(0x00011800E00002C0ull + (((offset) & 1) * 2048))
147#define CVMX_AGL_GMX_TXX_STAT9(offset) \
148 CVMX_ADD_IO_SEG(0x00011800E00002C8ull + (((offset) & 1) * 2048))
149#define CVMX_AGL_GMX_TXX_STATS_CTL(offset) \
150 CVMX_ADD_IO_SEG(0x00011800E0000268ull + (((offset) & 1) * 2048))
151#define CVMX_AGL_GMX_TXX_THRESH(offset) \
152 CVMX_ADD_IO_SEG(0x00011800E0000210ull + (((offset) & 1) * 2048))
153#define CVMX_AGL_GMX_TX_BP \
154 CVMX_ADD_IO_SEG(0x00011800E00004D0ull)
155#define CVMX_AGL_GMX_TX_COL_ATTEMPT \
156 CVMX_ADD_IO_SEG(0x00011800E0000498ull)
157#define CVMX_AGL_GMX_TX_IFG \
158 CVMX_ADD_IO_SEG(0x00011800E0000488ull)
159#define CVMX_AGL_GMX_TX_INT_EN \
160 CVMX_ADD_IO_SEG(0x00011800E0000508ull)
161#define CVMX_AGL_GMX_TX_INT_REG \
162 CVMX_ADD_IO_SEG(0x00011800E0000500ull)
163#define CVMX_AGL_GMX_TX_JAM \
164 CVMX_ADD_IO_SEG(0x00011800E0000490ull)
165#define CVMX_AGL_GMX_TX_LFSR \
166 CVMX_ADD_IO_SEG(0x00011800E00004F8ull)
167#define CVMX_AGL_GMX_TX_OVR_BP \
168 CVMX_ADD_IO_SEG(0x00011800E00004C8ull)
169#define CVMX_AGL_GMX_TX_PAUSE_PKT_DMAC \
170 CVMX_ADD_IO_SEG(0x00011800E00004A0ull)
171#define CVMX_AGL_GMX_TX_PAUSE_PKT_TYPE \
172 CVMX_ADD_IO_SEG(0x00011800E00004A8ull)
173
174union cvmx_agl_gmx_bad_reg {
175 uint64_t u64;
176 struct cvmx_agl_gmx_bad_reg_s {
177 uint64_t reserved_38_63:26;
178 uint64_t txpsh1:1;
179 uint64_t txpop1:1;
180 uint64_t ovrflw1:1;
181 uint64_t txpsh:1;
182 uint64_t txpop:1;
183 uint64_t ovrflw:1;
184 uint64_t reserved_27_31:5;
185 uint64_t statovr:1;
186 uint64_t reserved_23_25:3;
187 uint64_t loststat:1;
188 uint64_t reserved_4_21:18;
189 uint64_t out_ovr:2;
190 uint64_t reserved_0_1:2;
191 } s;
192 struct cvmx_agl_gmx_bad_reg_s cn52xx;
193 struct cvmx_agl_gmx_bad_reg_s cn52xxp1;
194 struct cvmx_agl_gmx_bad_reg_cn56xx {
195 uint64_t reserved_35_63:29;
196 uint64_t txpsh:1;
197 uint64_t txpop:1;
198 uint64_t ovrflw:1;
199 uint64_t reserved_27_31:5;
200 uint64_t statovr:1;
201 uint64_t reserved_23_25:3;
202 uint64_t loststat:1;
203 uint64_t reserved_3_21:19;
204 uint64_t out_ovr:1;
205 uint64_t reserved_0_1:2;
206 } cn56xx;
207 struct cvmx_agl_gmx_bad_reg_cn56xx cn56xxp1;
208};
209
210union cvmx_agl_gmx_bist {
211 uint64_t u64;
212 struct cvmx_agl_gmx_bist_s {
213 uint64_t reserved_10_63:54;
214 uint64_t status:10;
215 } s;
216 struct cvmx_agl_gmx_bist_s cn52xx;
217 struct cvmx_agl_gmx_bist_s cn52xxp1;
218 struct cvmx_agl_gmx_bist_s cn56xx;
219 struct cvmx_agl_gmx_bist_s cn56xxp1;
220};
221
222union cvmx_agl_gmx_drv_ctl {
223 uint64_t u64;
224 struct cvmx_agl_gmx_drv_ctl_s {
225 uint64_t reserved_49_63:15;
226 uint64_t byp_en1:1;
227 uint64_t reserved_45_47:3;
228 uint64_t pctl1:5;
229 uint64_t reserved_37_39:3;
230 uint64_t nctl1:5;
231 uint64_t reserved_17_31:15;
232 uint64_t byp_en:1;
233 uint64_t reserved_13_15:3;
234 uint64_t pctl:5;
235 uint64_t reserved_5_7:3;
236 uint64_t nctl:5;
237 } s;
238 struct cvmx_agl_gmx_drv_ctl_s cn52xx;
239 struct cvmx_agl_gmx_drv_ctl_s cn52xxp1;
240 struct cvmx_agl_gmx_drv_ctl_cn56xx {
241 uint64_t reserved_17_63:47;
242 uint64_t byp_en:1;
243 uint64_t reserved_13_15:3;
244 uint64_t pctl:5;
245 uint64_t reserved_5_7:3;
246 uint64_t nctl:5;
247 } cn56xx;
248 struct cvmx_agl_gmx_drv_ctl_cn56xx cn56xxp1;
249};
250
251union cvmx_agl_gmx_inf_mode {
252 uint64_t u64;
253 struct cvmx_agl_gmx_inf_mode_s {
254 uint64_t reserved_2_63:62;
255 uint64_t en:1;
256 uint64_t reserved_0_0:1;
257 } s;
258 struct cvmx_agl_gmx_inf_mode_s cn52xx;
259 struct cvmx_agl_gmx_inf_mode_s cn52xxp1;
260 struct cvmx_agl_gmx_inf_mode_s cn56xx;
261 struct cvmx_agl_gmx_inf_mode_s cn56xxp1;
262};
263
264union cvmx_agl_gmx_prtx_cfg {
265 uint64_t u64;
266 struct cvmx_agl_gmx_prtx_cfg_s {
267 uint64_t reserved_6_63:58;
268 uint64_t tx_en:1;
269 uint64_t rx_en:1;
270 uint64_t slottime:1;
271 uint64_t duplex:1;
272 uint64_t speed:1;
273 uint64_t en:1;
274 } s;
275 struct cvmx_agl_gmx_prtx_cfg_s cn52xx;
276 struct cvmx_agl_gmx_prtx_cfg_s cn52xxp1;
277 struct cvmx_agl_gmx_prtx_cfg_s cn56xx;
278 struct cvmx_agl_gmx_prtx_cfg_s cn56xxp1;
279};
280
281union cvmx_agl_gmx_rxx_adr_cam0 {
282 uint64_t u64;
283 struct cvmx_agl_gmx_rxx_adr_cam0_s {
284 uint64_t adr:64;
285 } s;
286 struct cvmx_agl_gmx_rxx_adr_cam0_s cn52xx;
287 struct cvmx_agl_gmx_rxx_adr_cam0_s cn52xxp1;
288 struct cvmx_agl_gmx_rxx_adr_cam0_s cn56xx;
289 struct cvmx_agl_gmx_rxx_adr_cam0_s cn56xxp1;
290};
291
292union cvmx_agl_gmx_rxx_adr_cam1 {
293 uint64_t u64;
294 struct cvmx_agl_gmx_rxx_adr_cam1_s {
295 uint64_t adr:64;
296 } s;
297 struct cvmx_agl_gmx_rxx_adr_cam1_s cn52xx;
298 struct cvmx_agl_gmx_rxx_adr_cam1_s cn52xxp1;
299 struct cvmx_agl_gmx_rxx_adr_cam1_s cn56xx;
300 struct cvmx_agl_gmx_rxx_adr_cam1_s cn56xxp1;
301};
302
303union cvmx_agl_gmx_rxx_adr_cam2 {
304 uint64_t u64;
305 struct cvmx_agl_gmx_rxx_adr_cam2_s {
306 uint64_t adr:64;
307 } s;
308 struct cvmx_agl_gmx_rxx_adr_cam2_s cn52xx;
309 struct cvmx_agl_gmx_rxx_adr_cam2_s cn52xxp1;
310 struct cvmx_agl_gmx_rxx_adr_cam2_s cn56xx;
311 struct cvmx_agl_gmx_rxx_adr_cam2_s cn56xxp1;
312};
313
314union cvmx_agl_gmx_rxx_adr_cam3 {
315 uint64_t u64;
316 struct cvmx_agl_gmx_rxx_adr_cam3_s {
317 uint64_t adr:64;
318 } s;
319 struct cvmx_agl_gmx_rxx_adr_cam3_s cn52xx;
320 struct cvmx_agl_gmx_rxx_adr_cam3_s cn52xxp1;
321 struct cvmx_agl_gmx_rxx_adr_cam3_s cn56xx;
322 struct cvmx_agl_gmx_rxx_adr_cam3_s cn56xxp1;
323};
324
325union cvmx_agl_gmx_rxx_adr_cam4 {
326 uint64_t u64;
327 struct cvmx_agl_gmx_rxx_adr_cam4_s {
328 uint64_t adr:64;
329 } s;
330 struct cvmx_agl_gmx_rxx_adr_cam4_s cn52xx;
331 struct cvmx_agl_gmx_rxx_adr_cam4_s cn52xxp1;
332 struct cvmx_agl_gmx_rxx_adr_cam4_s cn56xx;
333 struct cvmx_agl_gmx_rxx_adr_cam4_s cn56xxp1;
334};
335
336union cvmx_agl_gmx_rxx_adr_cam5 {
337 uint64_t u64;
338 struct cvmx_agl_gmx_rxx_adr_cam5_s {
339 uint64_t adr:64;
340 } s;
341 struct cvmx_agl_gmx_rxx_adr_cam5_s cn52xx;
342 struct cvmx_agl_gmx_rxx_adr_cam5_s cn52xxp1;
343 struct cvmx_agl_gmx_rxx_adr_cam5_s cn56xx;
344 struct cvmx_agl_gmx_rxx_adr_cam5_s cn56xxp1;
345};
346
347union cvmx_agl_gmx_rxx_adr_cam_en {
348 uint64_t u64;
349 struct cvmx_agl_gmx_rxx_adr_cam_en_s {
350 uint64_t reserved_8_63:56;
351 uint64_t en:8;
352 } s;
353 struct cvmx_agl_gmx_rxx_adr_cam_en_s cn52xx;
354 struct cvmx_agl_gmx_rxx_adr_cam_en_s cn52xxp1;
355 struct cvmx_agl_gmx_rxx_adr_cam_en_s cn56xx;
356 struct cvmx_agl_gmx_rxx_adr_cam_en_s cn56xxp1;
357};
358
359union cvmx_agl_gmx_rxx_adr_ctl {
360 uint64_t u64;
361 struct cvmx_agl_gmx_rxx_adr_ctl_s {
362 uint64_t reserved_4_63:60;
363 uint64_t cam_mode:1;
364 uint64_t mcst:2;
365 uint64_t bcst:1;
366 } s;
367 struct cvmx_agl_gmx_rxx_adr_ctl_s cn52xx;
368 struct cvmx_agl_gmx_rxx_adr_ctl_s cn52xxp1;
369 struct cvmx_agl_gmx_rxx_adr_ctl_s cn56xx;
370 struct cvmx_agl_gmx_rxx_adr_ctl_s cn56xxp1;
371};
372
373union cvmx_agl_gmx_rxx_decision {
374 uint64_t u64;
375 struct cvmx_agl_gmx_rxx_decision_s {
376 uint64_t reserved_5_63:59;
377 uint64_t cnt:5;
378 } s;
379 struct cvmx_agl_gmx_rxx_decision_s cn52xx;
380 struct cvmx_agl_gmx_rxx_decision_s cn52xxp1;
381 struct cvmx_agl_gmx_rxx_decision_s cn56xx;
382 struct cvmx_agl_gmx_rxx_decision_s cn56xxp1;
383};
384
385union cvmx_agl_gmx_rxx_frm_chk {
386 uint64_t u64;
387 struct cvmx_agl_gmx_rxx_frm_chk_s {
388 uint64_t reserved_9_63:55;
389 uint64_t skperr:1;
390 uint64_t rcverr:1;
391 uint64_t lenerr:1;
392 uint64_t alnerr:1;
393 uint64_t fcserr:1;
394 uint64_t jabber:1;
395 uint64_t maxerr:1;
396 uint64_t reserved_1_1:1;
397 uint64_t minerr:1;
398 } s;
399 struct cvmx_agl_gmx_rxx_frm_chk_s cn52xx;
400 struct cvmx_agl_gmx_rxx_frm_chk_s cn52xxp1;
401 struct cvmx_agl_gmx_rxx_frm_chk_s cn56xx;
402 struct cvmx_agl_gmx_rxx_frm_chk_s cn56xxp1;
403};
404
405union cvmx_agl_gmx_rxx_frm_ctl {
406 uint64_t u64;
407 struct cvmx_agl_gmx_rxx_frm_ctl_s {
408 uint64_t reserved_10_63:54;
409 uint64_t pre_align:1;
410 uint64_t pad_len:1;
411 uint64_t vlan_len:1;
412 uint64_t pre_free:1;
413 uint64_t ctl_smac:1;
414 uint64_t ctl_mcst:1;
415 uint64_t ctl_bck:1;
416 uint64_t ctl_drp:1;
417 uint64_t pre_strp:1;
418 uint64_t pre_chk:1;
419 } s;
420 struct cvmx_agl_gmx_rxx_frm_ctl_s cn52xx;
421 struct cvmx_agl_gmx_rxx_frm_ctl_s cn52xxp1;
422 struct cvmx_agl_gmx_rxx_frm_ctl_s cn56xx;
423 struct cvmx_agl_gmx_rxx_frm_ctl_s cn56xxp1;
424};
425
426union cvmx_agl_gmx_rxx_frm_max {
427 uint64_t u64;
428 struct cvmx_agl_gmx_rxx_frm_max_s {
429 uint64_t reserved_16_63:48;
430 uint64_t len:16;
431 } s;
432 struct cvmx_agl_gmx_rxx_frm_max_s cn52xx;
433 struct cvmx_agl_gmx_rxx_frm_max_s cn52xxp1;
434 struct cvmx_agl_gmx_rxx_frm_max_s cn56xx;
435 struct cvmx_agl_gmx_rxx_frm_max_s cn56xxp1;
436};
437
438union cvmx_agl_gmx_rxx_frm_min {
439 uint64_t u64;
440 struct cvmx_agl_gmx_rxx_frm_min_s {
441 uint64_t reserved_16_63:48;
442 uint64_t len:16;
443 } s;
444 struct cvmx_agl_gmx_rxx_frm_min_s cn52xx;
445 struct cvmx_agl_gmx_rxx_frm_min_s cn52xxp1;
446 struct cvmx_agl_gmx_rxx_frm_min_s cn56xx;
447 struct cvmx_agl_gmx_rxx_frm_min_s cn56xxp1;
448};
449
450union cvmx_agl_gmx_rxx_ifg {
451 uint64_t u64;
452 struct cvmx_agl_gmx_rxx_ifg_s {
453 uint64_t reserved_4_63:60;
454 uint64_t ifg:4;
455 } s;
456 struct cvmx_agl_gmx_rxx_ifg_s cn52xx;
457 struct cvmx_agl_gmx_rxx_ifg_s cn52xxp1;
458 struct cvmx_agl_gmx_rxx_ifg_s cn56xx;
459 struct cvmx_agl_gmx_rxx_ifg_s cn56xxp1;
460};
461
462union cvmx_agl_gmx_rxx_int_en {
463 uint64_t u64;
464 struct cvmx_agl_gmx_rxx_int_en_s {
465 uint64_t reserved_20_63:44;
466 uint64_t pause_drp:1;
467 uint64_t reserved_16_18:3;
468 uint64_t ifgerr:1;
469 uint64_t coldet:1;
470 uint64_t falerr:1;
471 uint64_t rsverr:1;
472 uint64_t pcterr:1;
473 uint64_t ovrerr:1;
474 uint64_t reserved_9_9:1;
475 uint64_t skperr:1;
476 uint64_t rcverr:1;
477 uint64_t lenerr:1;
478 uint64_t alnerr:1;
479 uint64_t fcserr:1;
480 uint64_t jabber:1;
481 uint64_t maxerr:1;
482 uint64_t reserved_1_1:1;
483 uint64_t minerr:1;
484 } s;
485 struct cvmx_agl_gmx_rxx_int_en_s cn52xx;
486 struct cvmx_agl_gmx_rxx_int_en_s cn52xxp1;
487 struct cvmx_agl_gmx_rxx_int_en_s cn56xx;
488 struct cvmx_agl_gmx_rxx_int_en_s cn56xxp1;
489};
490
491union cvmx_agl_gmx_rxx_int_reg {
492 uint64_t u64;
493 struct cvmx_agl_gmx_rxx_int_reg_s {
494 uint64_t reserved_20_63:44;
495 uint64_t pause_drp:1;
496 uint64_t reserved_16_18:3;
497 uint64_t ifgerr:1;
498 uint64_t coldet:1;
499 uint64_t falerr:1;
500 uint64_t rsverr:1;
501 uint64_t pcterr:1;
502 uint64_t ovrerr:1;
503 uint64_t reserved_9_9:1;
504 uint64_t skperr:1;
505 uint64_t rcverr:1;
506 uint64_t lenerr:1;
507 uint64_t alnerr:1;
508 uint64_t fcserr:1;
509 uint64_t jabber:1;
510 uint64_t maxerr:1;
511 uint64_t reserved_1_1:1;
512 uint64_t minerr:1;
513 } s;
514 struct cvmx_agl_gmx_rxx_int_reg_s cn52xx;
515 struct cvmx_agl_gmx_rxx_int_reg_s cn52xxp1;
516 struct cvmx_agl_gmx_rxx_int_reg_s cn56xx;
517 struct cvmx_agl_gmx_rxx_int_reg_s cn56xxp1;
518};
519
520union cvmx_agl_gmx_rxx_jabber {
521 uint64_t u64;
522 struct cvmx_agl_gmx_rxx_jabber_s {
523 uint64_t reserved_16_63:48;
524 uint64_t cnt:16;
525 } s;
526 struct cvmx_agl_gmx_rxx_jabber_s cn52xx;
527 struct cvmx_agl_gmx_rxx_jabber_s cn52xxp1;
528 struct cvmx_agl_gmx_rxx_jabber_s cn56xx;
529 struct cvmx_agl_gmx_rxx_jabber_s cn56xxp1;
530};
531
532union cvmx_agl_gmx_rxx_pause_drop_time {
533 uint64_t u64;
534 struct cvmx_agl_gmx_rxx_pause_drop_time_s {
535 uint64_t reserved_16_63:48;
536 uint64_t status:16;
537 } s;
538 struct cvmx_agl_gmx_rxx_pause_drop_time_s cn52xx;
539 struct cvmx_agl_gmx_rxx_pause_drop_time_s cn52xxp1;
540 struct cvmx_agl_gmx_rxx_pause_drop_time_s cn56xx;
541 struct cvmx_agl_gmx_rxx_pause_drop_time_s cn56xxp1;
542};
543
544union cvmx_agl_gmx_rxx_stats_ctl {
545 uint64_t u64;
546 struct cvmx_agl_gmx_rxx_stats_ctl_s {
547 uint64_t reserved_1_63:63;
548 uint64_t rd_clr:1;
549 } s;
550 struct cvmx_agl_gmx_rxx_stats_ctl_s cn52xx;
551 struct cvmx_agl_gmx_rxx_stats_ctl_s cn52xxp1;
552 struct cvmx_agl_gmx_rxx_stats_ctl_s cn56xx;
553 struct cvmx_agl_gmx_rxx_stats_ctl_s cn56xxp1;
554};
555
556union cvmx_agl_gmx_rxx_stats_octs {
557 uint64_t u64;
558 struct cvmx_agl_gmx_rxx_stats_octs_s {
559 uint64_t reserved_48_63:16;
560 uint64_t cnt:48;
561 } s;
562 struct cvmx_agl_gmx_rxx_stats_octs_s cn52xx;
563 struct cvmx_agl_gmx_rxx_stats_octs_s cn52xxp1;
564 struct cvmx_agl_gmx_rxx_stats_octs_s cn56xx;
565 struct cvmx_agl_gmx_rxx_stats_octs_s cn56xxp1;
566};
567
568union cvmx_agl_gmx_rxx_stats_octs_ctl {
569 uint64_t u64;
570 struct cvmx_agl_gmx_rxx_stats_octs_ctl_s {
571 uint64_t reserved_48_63:16;
572 uint64_t cnt:48;
573 } s;
574 struct cvmx_agl_gmx_rxx_stats_octs_ctl_s cn52xx;
575 struct cvmx_agl_gmx_rxx_stats_octs_ctl_s cn52xxp1;
576 struct cvmx_agl_gmx_rxx_stats_octs_ctl_s cn56xx;
577 struct cvmx_agl_gmx_rxx_stats_octs_ctl_s cn56xxp1;
578};
579
580union cvmx_agl_gmx_rxx_stats_octs_dmac {
581 uint64_t u64;
582 struct cvmx_agl_gmx_rxx_stats_octs_dmac_s {
583 uint64_t reserved_48_63:16;
584 uint64_t cnt:48;
585 } s;
586 struct cvmx_agl_gmx_rxx_stats_octs_dmac_s cn52xx;
587 struct cvmx_agl_gmx_rxx_stats_octs_dmac_s cn52xxp1;
588 struct cvmx_agl_gmx_rxx_stats_octs_dmac_s cn56xx;
589 struct cvmx_agl_gmx_rxx_stats_octs_dmac_s cn56xxp1;
590};
591
592union cvmx_agl_gmx_rxx_stats_octs_drp {
593 uint64_t u64;
594 struct cvmx_agl_gmx_rxx_stats_octs_drp_s {
595 uint64_t reserved_48_63:16;
596 uint64_t cnt:48;
597 } s;
598 struct cvmx_agl_gmx_rxx_stats_octs_drp_s cn52xx;
599 struct cvmx_agl_gmx_rxx_stats_octs_drp_s cn52xxp1;
600 struct cvmx_agl_gmx_rxx_stats_octs_drp_s cn56xx;
601 struct cvmx_agl_gmx_rxx_stats_octs_drp_s cn56xxp1;
602};
603
604union cvmx_agl_gmx_rxx_stats_pkts {
605 uint64_t u64;
606 struct cvmx_agl_gmx_rxx_stats_pkts_s {
607 uint64_t reserved_32_63:32;
608 uint64_t cnt:32;
609 } s;
610 struct cvmx_agl_gmx_rxx_stats_pkts_s cn52xx;
611 struct cvmx_agl_gmx_rxx_stats_pkts_s cn52xxp1;
612 struct cvmx_agl_gmx_rxx_stats_pkts_s cn56xx;
613 struct cvmx_agl_gmx_rxx_stats_pkts_s cn56xxp1;
614};
615
616union cvmx_agl_gmx_rxx_stats_pkts_bad {
617 uint64_t u64;
618 struct cvmx_agl_gmx_rxx_stats_pkts_bad_s {
619 uint64_t reserved_32_63:32;
620 uint64_t cnt:32;
621 } s;
622 struct cvmx_agl_gmx_rxx_stats_pkts_bad_s cn52xx;
623 struct cvmx_agl_gmx_rxx_stats_pkts_bad_s cn52xxp1;
624 struct cvmx_agl_gmx_rxx_stats_pkts_bad_s cn56xx;
625 struct cvmx_agl_gmx_rxx_stats_pkts_bad_s cn56xxp1;
626};
627
628union cvmx_agl_gmx_rxx_stats_pkts_ctl {
629 uint64_t u64;
630 struct cvmx_agl_gmx_rxx_stats_pkts_ctl_s {
631 uint64_t reserved_32_63:32;
632 uint64_t cnt:32;
633 } s;
634 struct cvmx_agl_gmx_rxx_stats_pkts_ctl_s cn52xx;
635 struct cvmx_agl_gmx_rxx_stats_pkts_ctl_s cn52xxp1;
636 struct cvmx_agl_gmx_rxx_stats_pkts_ctl_s cn56xx;
637 struct cvmx_agl_gmx_rxx_stats_pkts_ctl_s cn56xxp1;
638};
639
640union cvmx_agl_gmx_rxx_stats_pkts_dmac {
641 uint64_t u64;
642 struct cvmx_agl_gmx_rxx_stats_pkts_dmac_s {
643 uint64_t reserved_32_63:32;
644 uint64_t cnt:32;
645 } s;
646 struct cvmx_agl_gmx_rxx_stats_pkts_dmac_s cn52xx;
647 struct cvmx_agl_gmx_rxx_stats_pkts_dmac_s cn52xxp1;
648 struct cvmx_agl_gmx_rxx_stats_pkts_dmac_s cn56xx;
649 struct cvmx_agl_gmx_rxx_stats_pkts_dmac_s cn56xxp1;
650};
651
652union cvmx_agl_gmx_rxx_stats_pkts_drp {
653 uint64_t u64;
654 struct cvmx_agl_gmx_rxx_stats_pkts_drp_s {
655 uint64_t reserved_32_63:32;
656 uint64_t cnt:32;
657 } s;
658 struct cvmx_agl_gmx_rxx_stats_pkts_drp_s cn52xx;
659 struct cvmx_agl_gmx_rxx_stats_pkts_drp_s cn52xxp1;
660 struct cvmx_agl_gmx_rxx_stats_pkts_drp_s cn56xx;
661 struct cvmx_agl_gmx_rxx_stats_pkts_drp_s cn56xxp1;
662};
663
664union cvmx_agl_gmx_rxx_udd_skp {
665 uint64_t u64;
666 struct cvmx_agl_gmx_rxx_udd_skp_s {
667 uint64_t reserved_9_63:55;
668 uint64_t fcssel:1;
669 uint64_t reserved_7_7:1;
670 uint64_t len:7;
671 } s;
672 struct cvmx_agl_gmx_rxx_udd_skp_s cn52xx;
673 struct cvmx_agl_gmx_rxx_udd_skp_s cn52xxp1;
674 struct cvmx_agl_gmx_rxx_udd_skp_s cn56xx;
675 struct cvmx_agl_gmx_rxx_udd_skp_s cn56xxp1;
676};
677
678union cvmx_agl_gmx_rx_bp_dropx {
679 uint64_t u64;
680 struct cvmx_agl_gmx_rx_bp_dropx_s {
681 uint64_t reserved_6_63:58;
682 uint64_t mark:6;
683 } s;
684 struct cvmx_agl_gmx_rx_bp_dropx_s cn52xx;
685 struct cvmx_agl_gmx_rx_bp_dropx_s cn52xxp1;
686 struct cvmx_agl_gmx_rx_bp_dropx_s cn56xx;
687 struct cvmx_agl_gmx_rx_bp_dropx_s cn56xxp1;
688};
689
690union cvmx_agl_gmx_rx_bp_offx {
691 uint64_t u64;
692 struct cvmx_agl_gmx_rx_bp_offx_s {
693 uint64_t reserved_6_63:58;
694 uint64_t mark:6;
695 } s;
696 struct cvmx_agl_gmx_rx_bp_offx_s cn52xx;
697 struct cvmx_agl_gmx_rx_bp_offx_s cn52xxp1;
698 struct cvmx_agl_gmx_rx_bp_offx_s cn56xx;
699 struct cvmx_agl_gmx_rx_bp_offx_s cn56xxp1;
700};
701
702union cvmx_agl_gmx_rx_bp_onx {
703 uint64_t u64;
704 struct cvmx_agl_gmx_rx_bp_onx_s {
705 uint64_t reserved_9_63:55;
706 uint64_t mark:9;
707 } s;
708 struct cvmx_agl_gmx_rx_bp_onx_s cn52xx;
709 struct cvmx_agl_gmx_rx_bp_onx_s cn52xxp1;
710 struct cvmx_agl_gmx_rx_bp_onx_s cn56xx;
711 struct cvmx_agl_gmx_rx_bp_onx_s cn56xxp1;
712};
713
714union cvmx_agl_gmx_rx_prt_info {
715 uint64_t u64;
716 struct cvmx_agl_gmx_rx_prt_info_s {
717 uint64_t reserved_18_63:46;
718 uint64_t drop:2;
719 uint64_t reserved_2_15:14;
720 uint64_t commit:2;
721 } s;
722 struct cvmx_agl_gmx_rx_prt_info_s cn52xx;
723 struct cvmx_agl_gmx_rx_prt_info_s cn52xxp1;
724 struct cvmx_agl_gmx_rx_prt_info_cn56xx {
725 uint64_t reserved_17_63:47;
726 uint64_t drop:1;
727 uint64_t reserved_1_15:15;
728 uint64_t commit:1;
729 } cn56xx;
730 struct cvmx_agl_gmx_rx_prt_info_cn56xx cn56xxp1;
731};
732
733union cvmx_agl_gmx_rx_tx_status {
734 uint64_t u64;
735 struct cvmx_agl_gmx_rx_tx_status_s {
736 uint64_t reserved_6_63:58;
737 uint64_t tx:2;
738 uint64_t reserved_2_3:2;
739 uint64_t rx:2;
740 } s;
741 struct cvmx_agl_gmx_rx_tx_status_s cn52xx;
742 struct cvmx_agl_gmx_rx_tx_status_s cn52xxp1;
743 struct cvmx_agl_gmx_rx_tx_status_cn56xx {
744 uint64_t reserved_5_63:59;
745 uint64_t tx:1;
746 uint64_t reserved_1_3:3;
747 uint64_t rx:1;
748 } cn56xx;
749 struct cvmx_agl_gmx_rx_tx_status_cn56xx cn56xxp1;
750};
751
752union cvmx_agl_gmx_smacx {
753 uint64_t u64;
754 struct cvmx_agl_gmx_smacx_s {
755 uint64_t reserved_48_63:16;
756 uint64_t smac:48;
757 } s;
758 struct cvmx_agl_gmx_smacx_s cn52xx;
759 struct cvmx_agl_gmx_smacx_s cn52xxp1;
760 struct cvmx_agl_gmx_smacx_s cn56xx;
761 struct cvmx_agl_gmx_smacx_s cn56xxp1;
762};
763
764union cvmx_agl_gmx_stat_bp {
765 uint64_t u64;
766 struct cvmx_agl_gmx_stat_bp_s {
767 uint64_t reserved_17_63:47;
768 uint64_t bp:1;
769 uint64_t cnt:16;
770 } s;
771 struct cvmx_agl_gmx_stat_bp_s cn52xx;
772 struct cvmx_agl_gmx_stat_bp_s cn52xxp1;
773 struct cvmx_agl_gmx_stat_bp_s cn56xx;
774 struct cvmx_agl_gmx_stat_bp_s cn56xxp1;
775};
776
777union cvmx_agl_gmx_txx_append {
778 uint64_t u64;
779 struct cvmx_agl_gmx_txx_append_s {
780 uint64_t reserved_4_63:60;
781 uint64_t force_fcs:1;
782 uint64_t fcs:1;
783 uint64_t pad:1;
784 uint64_t preamble:1;
785 } s;
786 struct cvmx_agl_gmx_txx_append_s cn52xx;
787 struct cvmx_agl_gmx_txx_append_s cn52xxp1;
788 struct cvmx_agl_gmx_txx_append_s cn56xx;
789 struct cvmx_agl_gmx_txx_append_s cn56xxp1;
790};
791
792union cvmx_agl_gmx_txx_ctl {
793 uint64_t u64;
794 struct cvmx_agl_gmx_txx_ctl_s {
795 uint64_t reserved_2_63:62;
796 uint64_t xsdef_en:1;
797 uint64_t xscol_en:1;
798 } s;
799 struct cvmx_agl_gmx_txx_ctl_s cn52xx;
800 struct cvmx_agl_gmx_txx_ctl_s cn52xxp1;
801 struct cvmx_agl_gmx_txx_ctl_s cn56xx;
802 struct cvmx_agl_gmx_txx_ctl_s cn56xxp1;
803};
804
805union cvmx_agl_gmx_txx_min_pkt {
806 uint64_t u64;
807 struct cvmx_agl_gmx_txx_min_pkt_s {
808 uint64_t reserved_8_63:56;
809 uint64_t min_size:8;
810 } s;
811 struct cvmx_agl_gmx_txx_min_pkt_s cn52xx;
812 struct cvmx_agl_gmx_txx_min_pkt_s cn52xxp1;
813 struct cvmx_agl_gmx_txx_min_pkt_s cn56xx;
814 struct cvmx_agl_gmx_txx_min_pkt_s cn56xxp1;
815};
816
817union cvmx_agl_gmx_txx_pause_pkt_interval {
818 uint64_t u64;
819 struct cvmx_agl_gmx_txx_pause_pkt_interval_s {
820 uint64_t reserved_16_63:48;
821 uint64_t interval:16;
822 } s;
823 struct cvmx_agl_gmx_txx_pause_pkt_interval_s cn52xx;
824 struct cvmx_agl_gmx_txx_pause_pkt_interval_s cn52xxp1;
825 struct cvmx_agl_gmx_txx_pause_pkt_interval_s cn56xx;
826 struct cvmx_agl_gmx_txx_pause_pkt_interval_s cn56xxp1;
827};
828
829union cvmx_agl_gmx_txx_pause_pkt_time {
830 uint64_t u64;
831 struct cvmx_agl_gmx_txx_pause_pkt_time_s {
832 uint64_t reserved_16_63:48;
833 uint64_t time:16;
834 } s;
835 struct cvmx_agl_gmx_txx_pause_pkt_time_s cn52xx;
836 struct cvmx_agl_gmx_txx_pause_pkt_time_s cn52xxp1;
837 struct cvmx_agl_gmx_txx_pause_pkt_time_s cn56xx;
838 struct cvmx_agl_gmx_txx_pause_pkt_time_s cn56xxp1;
839};
840
841union cvmx_agl_gmx_txx_pause_togo {
842 uint64_t u64;
843 struct cvmx_agl_gmx_txx_pause_togo_s {
844 uint64_t reserved_16_63:48;
845 uint64_t time:16;
846 } s;
847 struct cvmx_agl_gmx_txx_pause_togo_s cn52xx;
848 struct cvmx_agl_gmx_txx_pause_togo_s cn52xxp1;
849 struct cvmx_agl_gmx_txx_pause_togo_s cn56xx;
850 struct cvmx_agl_gmx_txx_pause_togo_s cn56xxp1;
851};
852
853union cvmx_agl_gmx_txx_pause_zero {
854 uint64_t u64;
855 struct cvmx_agl_gmx_txx_pause_zero_s {
856 uint64_t reserved_1_63:63;
857 uint64_t send:1;
858 } s;
859 struct cvmx_agl_gmx_txx_pause_zero_s cn52xx;
860 struct cvmx_agl_gmx_txx_pause_zero_s cn52xxp1;
861 struct cvmx_agl_gmx_txx_pause_zero_s cn56xx;
862 struct cvmx_agl_gmx_txx_pause_zero_s cn56xxp1;
863};
864
865union cvmx_agl_gmx_txx_soft_pause {
866 uint64_t u64;
867 struct cvmx_agl_gmx_txx_soft_pause_s {
868 uint64_t reserved_16_63:48;
869 uint64_t time:16;
870 } s;
871 struct cvmx_agl_gmx_txx_soft_pause_s cn52xx;
872 struct cvmx_agl_gmx_txx_soft_pause_s cn52xxp1;
873 struct cvmx_agl_gmx_txx_soft_pause_s cn56xx;
874 struct cvmx_agl_gmx_txx_soft_pause_s cn56xxp1;
875};
876
877union cvmx_agl_gmx_txx_stat0 {
878 uint64_t u64;
879 struct cvmx_agl_gmx_txx_stat0_s {
880 uint64_t xsdef:32;
881 uint64_t xscol:32;
882 } s;
883 struct cvmx_agl_gmx_txx_stat0_s cn52xx;
884 struct cvmx_agl_gmx_txx_stat0_s cn52xxp1;
885 struct cvmx_agl_gmx_txx_stat0_s cn56xx;
886 struct cvmx_agl_gmx_txx_stat0_s cn56xxp1;
887};
888
889union cvmx_agl_gmx_txx_stat1 {
890 uint64_t u64;
891 struct cvmx_agl_gmx_txx_stat1_s {
892 uint64_t scol:32;
893 uint64_t mcol:32;
894 } s;
895 struct cvmx_agl_gmx_txx_stat1_s cn52xx;
896 struct cvmx_agl_gmx_txx_stat1_s cn52xxp1;
897 struct cvmx_agl_gmx_txx_stat1_s cn56xx;
898 struct cvmx_agl_gmx_txx_stat1_s cn56xxp1;
899};
900
901union cvmx_agl_gmx_txx_stat2 {
902 uint64_t u64;
903 struct cvmx_agl_gmx_txx_stat2_s {
904 uint64_t reserved_48_63:16;
905 uint64_t octs:48;
906 } s;
907 struct cvmx_agl_gmx_txx_stat2_s cn52xx;
908 struct cvmx_agl_gmx_txx_stat2_s cn52xxp1;
909 struct cvmx_agl_gmx_txx_stat2_s cn56xx;
910 struct cvmx_agl_gmx_txx_stat2_s cn56xxp1;
911};
912
913union cvmx_agl_gmx_txx_stat3 {
914 uint64_t u64;
915 struct cvmx_agl_gmx_txx_stat3_s {
916 uint64_t reserved_32_63:32;
917 uint64_t pkts:32;
918 } s;
919 struct cvmx_agl_gmx_txx_stat3_s cn52xx;
920 struct cvmx_agl_gmx_txx_stat3_s cn52xxp1;
921 struct cvmx_agl_gmx_txx_stat3_s cn56xx;
922 struct cvmx_agl_gmx_txx_stat3_s cn56xxp1;
923};
924
925union cvmx_agl_gmx_txx_stat4 {
926 uint64_t u64;
927 struct cvmx_agl_gmx_txx_stat4_s {
928 uint64_t hist1:32;
929 uint64_t hist0:32;
930 } s;
931 struct cvmx_agl_gmx_txx_stat4_s cn52xx;
932 struct cvmx_agl_gmx_txx_stat4_s cn52xxp1;
933 struct cvmx_agl_gmx_txx_stat4_s cn56xx;
934 struct cvmx_agl_gmx_txx_stat4_s cn56xxp1;
935};
936
937union cvmx_agl_gmx_txx_stat5 {
938 uint64_t u64;
939 struct cvmx_agl_gmx_txx_stat5_s {
940 uint64_t hist3:32;
941 uint64_t hist2:32;
942 } s;
943 struct cvmx_agl_gmx_txx_stat5_s cn52xx;
944 struct cvmx_agl_gmx_txx_stat5_s cn52xxp1;
945 struct cvmx_agl_gmx_txx_stat5_s cn56xx;
946 struct cvmx_agl_gmx_txx_stat5_s cn56xxp1;
947};
948
949union cvmx_agl_gmx_txx_stat6 {
950 uint64_t u64;
951 struct cvmx_agl_gmx_txx_stat6_s {
952 uint64_t hist5:32;
953 uint64_t hist4:32;
954 } s;
955 struct cvmx_agl_gmx_txx_stat6_s cn52xx;
956 struct cvmx_agl_gmx_txx_stat6_s cn52xxp1;
957 struct cvmx_agl_gmx_txx_stat6_s cn56xx;
958 struct cvmx_agl_gmx_txx_stat6_s cn56xxp1;
959};
960
961union cvmx_agl_gmx_txx_stat7 {
962 uint64_t u64;
963 struct cvmx_agl_gmx_txx_stat7_s {
964 uint64_t hist7:32;
965 uint64_t hist6:32;
966 } s;
967 struct cvmx_agl_gmx_txx_stat7_s cn52xx;
968 struct cvmx_agl_gmx_txx_stat7_s cn52xxp1;
969 struct cvmx_agl_gmx_txx_stat7_s cn56xx;
970 struct cvmx_agl_gmx_txx_stat7_s cn56xxp1;
971};
972
973union cvmx_agl_gmx_txx_stat8 {
974 uint64_t u64;
975 struct cvmx_agl_gmx_txx_stat8_s {
976 uint64_t mcst:32;
977 uint64_t bcst:32;
978 } s;
979 struct cvmx_agl_gmx_txx_stat8_s cn52xx;
980 struct cvmx_agl_gmx_txx_stat8_s cn52xxp1;
981 struct cvmx_agl_gmx_txx_stat8_s cn56xx;
982 struct cvmx_agl_gmx_txx_stat8_s cn56xxp1;
983};
984
985union cvmx_agl_gmx_txx_stat9 {
986 uint64_t u64;
987 struct cvmx_agl_gmx_txx_stat9_s {
988 uint64_t undflw:32;
989 uint64_t ctl:32;
990 } s;
991 struct cvmx_agl_gmx_txx_stat9_s cn52xx;
992 struct cvmx_agl_gmx_txx_stat9_s cn52xxp1;
993 struct cvmx_agl_gmx_txx_stat9_s cn56xx;
994 struct cvmx_agl_gmx_txx_stat9_s cn56xxp1;
995};
996
997union cvmx_agl_gmx_txx_stats_ctl {
998 uint64_t u64;
999 struct cvmx_agl_gmx_txx_stats_ctl_s {
1000 uint64_t reserved_1_63:63;
1001 uint64_t rd_clr:1;
1002 } s;
1003 struct cvmx_agl_gmx_txx_stats_ctl_s cn52xx;
1004 struct cvmx_agl_gmx_txx_stats_ctl_s cn52xxp1;
1005 struct cvmx_agl_gmx_txx_stats_ctl_s cn56xx;
1006 struct cvmx_agl_gmx_txx_stats_ctl_s cn56xxp1;
1007};
1008
1009union cvmx_agl_gmx_txx_thresh {
1010 uint64_t u64;
1011 struct cvmx_agl_gmx_txx_thresh_s {
1012 uint64_t reserved_6_63:58;
1013 uint64_t cnt:6;
1014 } s;
1015 struct cvmx_agl_gmx_txx_thresh_s cn52xx;
1016 struct cvmx_agl_gmx_txx_thresh_s cn52xxp1;
1017 struct cvmx_agl_gmx_txx_thresh_s cn56xx;
1018 struct cvmx_agl_gmx_txx_thresh_s cn56xxp1;
1019};
1020
1021union cvmx_agl_gmx_tx_bp {
1022 uint64_t u64;
1023 struct cvmx_agl_gmx_tx_bp_s {
1024 uint64_t reserved_2_63:62;
1025 uint64_t bp:2;
1026 } s;
1027 struct cvmx_agl_gmx_tx_bp_s cn52xx;
1028 struct cvmx_agl_gmx_tx_bp_s cn52xxp1;
1029 struct cvmx_agl_gmx_tx_bp_cn56xx {
1030 uint64_t reserved_1_63:63;
1031 uint64_t bp:1;
1032 } cn56xx;
1033 struct cvmx_agl_gmx_tx_bp_cn56xx cn56xxp1;
1034};
1035
1036union cvmx_agl_gmx_tx_col_attempt {
1037 uint64_t u64;
1038 struct cvmx_agl_gmx_tx_col_attempt_s {
1039 uint64_t reserved_5_63:59;
1040 uint64_t limit:5;
1041 } s;
1042 struct cvmx_agl_gmx_tx_col_attempt_s cn52xx;
1043 struct cvmx_agl_gmx_tx_col_attempt_s cn52xxp1;
1044 struct cvmx_agl_gmx_tx_col_attempt_s cn56xx;
1045 struct cvmx_agl_gmx_tx_col_attempt_s cn56xxp1;
1046};
1047
1048union cvmx_agl_gmx_tx_ifg {
1049 uint64_t u64;
1050 struct cvmx_agl_gmx_tx_ifg_s {
1051 uint64_t reserved_8_63:56;
1052 uint64_t ifg2:4;
1053 uint64_t ifg1:4;
1054 } s;
1055 struct cvmx_agl_gmx_tx_ifg_s cn52xx;
1056 struct cvmx_agl_gmx_tx_ifg_s cn52xxp1;
1057 struct cvmx_agl_gmx_tx_ifg_s cn56xx;
1058 struct cvmx_agl_gmx_tx_ifg_s cn56xxp1;
1059};
1060
1061union cvmx_agl_gmx_tx_int_en {
1062 uint64_t u64;
1063 struct cvmx_agl_gmx_tx_int_en_s {
1064 uint64_t reserved_18_63:46;
1065 uint64_t late_col:2;
1066 uint64_t reserved_14_15:2;
1067 uint64_t xsdef:2;
1068 uint64_t reserved_10_11:2;
1069 uint64_t xscol:2;
1070 uint64_t reserved_4_7:4;
1071 uint64_t undflw:2;
1072 uint64_t reserved_1_1:1;
1073 uint64_t pko_nxa:1;
1074 } s;
1075 struct cvmx_agl_gmx_tx_int_en_s cn52xx;
1076 struct cvmx_agl_gmx_tx_int_en_s cn52xxp1;
1077 struct cvmx_agl_gmx_tx_int_en_cn56xx {
1078 uint64_t reserved_17_63:47;
1079 uint64_t late_col:1;
1080 uint64_t reserved_13_15:3;
1081 uint64_t xsdef:1;
1082 uint64_t reserved_9_11:3;
1083 uint64_t xscol:1;
1084 uint64_t reserved_3_7:5;
1085 uint64_t undflw:1;
1086 uint64_t reserved_1_1:1;
1087 uint64_t pko_nxa:1;
1088 } cn56xx;
1089 struct cvmx_agl_gmx_tx_int_en_cn56xx cn56xxp1;
1090};
1091
1092union cvmx_agl_gmx_tx_int_reg {
1093 uint64_t u64;
1094 struct cvmx_agl_gmx_tx_int_reg_s {
1095 uint64_t reserved_18_63:46;
1096 uint64_t late_col:2;
1097 uint64_t reserved_14_15:2;
1098 uint64_t xsdef:2;
1099 uint64_t reserved_10_11:2;
1100 uint64_t xscol:2;
1101 uint64_t reserved_4_7:4;
1102 uint64_t undflw:2;
1103 uint64_t reserved_1_1:1;
1104 uint64_t pko_nxa:1;
1105 } s;
1106 struct cvmx_agl_gmx_tx_int_reg_s cn52xx;
1107 struct cvmx_agl_gmx_tx_int_reg_s cn52xxp1;
1108 struct cvmx_agl_gmx_tx_int_reg_cn56xx {
1109 uint64_t reserved_17_63:47;
1110 uint64_t late_col:1;
1111 uint64_t reserved_13_15:3;
1112 uint64_t xsdef:1;
1113 uint64_t reserved_9_11:3;
1114 uint64_t xscol:1;
1115 uint64_t reserved_3_7:5;
1116 uint64_t undflw:1;
1117 uint64_t reserved_1_1:1;
1118 uint64_t pko_nxa:1;
1119 } cn56xx;
1120 struct cvmx_agl_gmx_tx_int_reg_cn56xx cn56xxp1;
1121};
1122
1123union cvmx_agl_gmx_tx_jam {
1124 uint64_t u64;
1125 struct cvmx_agl_gmx_tx_jam_s {
1126 uint64_t reserved_8_63:56;
1127 uint64_t jam:8;
1128 } s;
1129 struct cvmx_agl_gmx_tx_jam_s cn52xx;
1130 struct cvmx_agl_gmx_tx_jam_s cn52xxp1;
1131 struct cvmx_agl_gmx_tx_jam_s cn56xx;
1132 struct cvmx_agl_gmx_tx_jam_s cn56xxp1;
1133};
1134
1135union cvmx_agl_gmx_tx_lfsr {
1136 uint64_t u64;
1137 struct cvmx_agl_gmx_tx_lfsr_s {
1138 uint64_t reserved_16_63:48;
1139 uint64_t lfsr:16;
1140 } s;
1141 struct cvmx_agl_gmx_tx_lfsr_s cn52xx;
1142 struct cvmx_agl_gmx_tx_lfsr_s cn52xxp1;
1143 struct cvmx_agl_gmx_tx_lfsr_s cn56xx;
1144 struct cvmx_agl_gmx_tx_lfsr_s cn56xxp1;
1145};
1146
1147union cvmx_agl_gmx_tx_ovr_bp {
1148 uint64_t u64;
1149 struct cvmx_agl_gmx_tx_ovr_bp_s {
1150 uint64_t reserved_10_63:54;
1151 uint64_t en:2;
1152 uint64_t reserved_6_7:2;
1153 uint64_t bp:2;
1154 uint64_t reserved_2_3:2;
1155 uint64_t ign_full:2;
1156 } s;
1157 struct cvmx_agl_gmx_tx_ovr_bp_s cn52xx;
1158 struct cvmx_agl_gmx_tx_ovr_bp_s cn52xxp1;
1159 struct cvmx_agl_gmx_tx_ovr_bp_cn56xx {
1160 uint64_t reserved_9_63:55;
1161 uint64_t en:1;
1162 uint64_t reserved_5_7:3;
1163 uint64_t bp:1;
1164 uint64_t reserved_1_3:3;
1165 uint64_t ign_full:1;
1166 } cn56xx;
1167 struct cvmx_agl_gmx_tx_ovr_bp_cn56xx cn56xxp1;
1168};
1169
1170union cvmx_agl_gmx_tx_pause_pkt_dmac {
1171 uint64_t u64;
1172 struct cvmx_agl_gmx_tx_pause_pkt_dmac_s {
1173 uint64_t reserved_48_63:16;
1174 uint64_t dmac:48;
1175 } s;
1176 struct cvmx_agl_gmx_tx_pause_pkt_dmac_s cn52xx;
1177 struct cvmx_agl_gmx_tx_pause_pkt_dmac_s cn52xxp1;
1178 struct cvmx_agl_gmx_tx_pause_pkt_dmac_s cn56xx;
1179 struct cvmx_agl_gmx_tx_pause_pkt_dmac_s cn56xxp1;
1180};
1181
1182union cvmx_agl_gmx_tx_pause_pkt_type {
1183 uint64_t u64;
1184 struct cvmx_agl_gmx_tx_pause_pkt_type_s {
1185 uint64_t reserved_16_63:48;
1186 uint64_t type:16;
1187 } s;
1188 struct cvmx_agl_gmx_tx_pause_pkt_type_s cn52xx;
1189 struct cvmx_agl_gmx_tx_pause_pkt_type_s cn52xxp1;
1190 struct cvmx_agl_gmx_tx_pause_pkt_type_s cn56xx;
1191 struct cvmx_agl_gmx_tx_pause_pkt_type_s cn56xxp1;
1192};
1193
1194#endif
diff --git a/arch/mips/include/asm/octeon/cvmx-mixx-defs.h b/arch/mips/include/asm/octeon/cvmx-mixx-defs.h
new file mode 100644
index 000000000000..dab6dca492f9
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-mixx-defs.h
@@ -0,0 +1,248 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file 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 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_MIXX_DEFS_H__
29#define __CVMX_MIXX_DEFS_H__
30
31#define CVMX_MIXX_BIST(offset) \
32 CVMX_ADD_IO_SEG(0x0001070000100078ull + (((offset) & 1) * 2048))
33#define CVMX_MIXX_CTL(offset) \
34 CVMX_ADD_IO_SEG(0x0001070000100020ull + (((offset) & 1) * 2048))
35#define CVMX_MIXX_INTENA(offset) \
36 CVMX_ADD_IO_SEG(0x0001070000100050ull + (((offset) & 1) * 2048))
37#define CVMX_MIXX_IRCNT(offset) \
38 CVMX_ADD_IO_SEG(0x0001070000100030ull + (((offset) & 1) * 2048))
39#define CVMX_MIXX_IRHWM(offset) \
40 CVMX_ADD_IO_SEG(0x0001070000100028ull + (((offset) & 1) * 2048))
41#define CVMX_MIXX_IRING1(offset) \
42 CVMX_ADD_IO_SEG(0x0001070000100010ull + (((offset) & 1) * 2048))
43#define CVMX_MIXX_IRING2(offset) \
44 CVMX_ADD_IO_SEG(0x0001070000100018ull + (((offset) & 1) * 2048))
45#define CVMX_MIXX_ISR(offset) \
46 CVMX_ADD_IO_SEG(0x0001070000100048ull + (((offset) & 1) * 2048))
47#define CVMX_MIXX_ORCNT(offset) \
48 CVMX_ADD_IO_SEG(0x0001070000100040ull + (((offset) & 1) * 2048))
49#define CVMX_MIXX_ORHWM(offset) \
50 CVMX_ADD_IO_SEG(0x0001070000100038ull + (((offset) & 1) * 2048))
51#define CVMX_MIXX_ORING1(offset) \
52 CVMX_ADD_IO_SEG(0x0001070000100000ull + (((offset) & 1) * 2048))
53#define CVMX_MIXX_ORING2(offset) \
54 CVMX_ADD_IO_SEG(0x0001070000100008ull + (((offset) & 1) * 2048))
55#define CVMX_MIXX_REMCNT(offset) \
56 CVMX_ADD_IO_SEG(0x0001070000100058ull + (((offset) & 1) * 2048))
57
58union cvmx_mixx_bist {
59 uint64_t u64;
60 struct cvmx_mixx_bist_s {
61 uint64_t reserved_4_63:60;
62 uint64_t mrqdat:1;
63 uint64_t ipfdat:1;
64 uint64_t irfdat:1;
65 uint64_t orfdat:1;
66 } s;
67 struct cvmx_mixx_bist_s cn52xx;
68 struct cvmx_mixx_bist_s cn52xxp1;
69 struct cvmx_mixx_bist_s cn56xx;
70 struct cvmx_mixx_bist_s cn56xxp1;
71};
72
73union cvmx_mixx_ctl {
74 uint64_t u64;
75 struct cvmx_mixx_ctl_s {
76 uint64_t reserved_8_63:56;
77 uint64_t crc_strip:1;
78 uint64_t busy:1;
79 uint64_t en:1;
80 uint64_t reset:1;
81 uint64_t lendian:1;
82 uint64_t nbtarb:1;
83 uint64_t mrq_hwm:2;
84 } s;
85 struct cvmx_mixx_ctl_s cn52xx;
86 struct cvmx_mixx_ctl_s cn52xxp1;
87 struct cvmx_mixx_ctl_s cn56xx;
88 struct cvmx_mixx_ctl_s cn56xxp1;
89};
90
91union cvmx_mixx_intena {
92 uint64_t u64;
93 struct cvmx_mixx_intena_s {
94 uint64_t reserved_7_63:57;
95 uint64_t orunena:1;
96 uint64_t irunena:1;
97 uint64_t data_drpena:1;
98 uint64_t ithena:1;
99 uint64_t othena:1;
100 uint64_t ivfena:1;
101 uint64_t ovfena:1;
102 } s;
103 struct cvmx_mixx_intena_s cn52xx;
104 struct cvmx_mixx_intena_s cn52xxp1;
105 struct cvmx_mixx_intena_s cn56xx;
106 struct cvmx_mixx_intena_s cn56xxp1;
107};
108
109union cvmx_mixx_ircnt {
110 uint64_t u64;
111 struct cvmx_mixx_ircnt_s {
112 uint64_t reserved_20_63:44;
113 uint64_t ircnt:20;
114 } s;
115 struct cvmx_mixx_ircnt_s cn52xx;
116 struct cvmx_mixx_ircnt_s cn52xxp1;
117 struct cvmx_mixx_ircnt_s cn56xx;
118 struct cvmx_mixx_ircnt_s cn56xxp1;
119};
120
121union cvmx_mixx_irhwm {
122 uint64_t u64;
123 struct cvmx_mixx_irhwm_s {
124 uint64_t reserved_40_63:24;
125 uint64_t ibplwm:20;
126 uint64_t irhwm:20;
127 } s;
128 struct cvmx_mixx_irhwm_s cn52xx;
129 struct cvmx_mixx_irhwm_s cn52xxp1;
130 struct cvmx_mixx_irhwm_s cn56xx;
131 struct cvmx_mixx_irhwm_s cn56xxp1;
132};
133
134union cvmx_mixx_iring1 {
135 uint64_t u64;
136 struct cvmx_mixx_iring1_s {
137 uint64_t reserved_60_63:4;
138 uint64_t isize:20;
139 uint64_t reserved_36_39:4;
140 uint64_t ibase:33;
141 uint64_t reserved_0_2:3;
142 } s;
143 struct cvmx_mixx_iring1_s cn52xx;
144 struct cvmx_mixx_iring1_s cn52xxp1;
145 struct cvmx_mixx_iring1_s cn56xx;
146 struct cvmx_mixx_iring1_s cn56xxp1;
147};
148
149union cvmx_mixx_iring2 {
150 uint64_t u64;
151 struct cvmx_mixx_iring2_s {
152 uint64_t reserved_52_63:12;
153 uint64_t itlptr:20;
154 uint64_t reserved_20_31:12;
155 uint64_t idbell:20;
156 } s;
157 struct cvmx_mixx_iring2_s cn52xx;
158 struct cvmx_mixx_iring2_s cn52xxp1;
159 struct cvmx_mixx_iring2_s cn56xx;
160 struct cvmx_mixx_iring2_s cn56xxp1;
161};
162
163union cvmx_mixx_isr {
164 uint64_t u64;
165 struct cvmx_mixx_isr_s {
166 uint64_t reserved_7_63:57;
167 uint64_t orun:1;
168 uint64_t irun:1;
169 uint64_t data_drp:1;
170 uint64_t irthresh:1;
171 uint64_t orthresh:1;
172 uint64_t idblovf:1;
173 uint64_t odblovf:1;
174 } s;
175 struct cvmx_mixx_isr_s cn52xx;
176 struct cvmx_mixx_isr_s cn52xxp1;
177 struct cvmx_mixx_isr_s cn56xx;
178 struct cvmx_mixx_isr_s cn56xxp1;
179};
180
181union cvmx_mixx_orcnt {
182 uint64_t u64;
183 struct cvmx_mixx_orcnt_s {
184 uint64_t reserved_20_63:44;
185 uint64_t orcnt:20;
186 } s;
187 struct cvmx_mixx_orcnt_s cn52xx;
188 struct cvmx_mixx_orcnt_s cn52xxp1;
189 struct cvmx_mixx_orcnt_s cn56xx;
190 struct cvmx_mixx_orcnt_s cn56xxp1;
191};
192
193union cvmx_mixx_orhwm {
194 uint64_t u64;
195 struct cvmx_mixx_orhwm_s {
196 uint64_t reserved_20_63:44;
197 uint64_t orhwm:20;
198 } s;
199 struct cvmx_mixx_orhwm_s cn52xx;
200 struct cvmx_mixx_orhwm_s cn52xxp1;
201 struct cvmx_mixx_orhwm_s cn56xx;
202 struct cvmx_mixx_orhwm_s cn56xxp1;
203};
204
205union cvmx_mixx_oring1 {
206 uint64_t u64;
207 struct cvmx_mixx_oring1_s {
208 uint64_t reserved_60_63:4;
209 uint64_t osize:20;
210 uint64_t reserved_36_39:4;
211 uint64_t obase:33;
212 uint64_t reserved_0_2:3;
213 } s;
214 struct cvmx_mixx_oring1_s cn52xx;
215 struct cvmx_mixx_oring1_s cn52xxp1;
216 struct cvmx_mixx_oring1_s cn56xx;
217 struct cvmx_mixx_oring1_s cn56xxp1;
218};
219
220union cvmx_mixx_oring2 {
221 uint64_t u64;
222 struct cvmx_mixx_oring2_s {
223 uint64_t reserved_52_63:12;
224 uint64_t otlptr:20;
225 uint64_t reserved_20_31:12;
226 uint64_t odbell:20;
227 } s;
228 struct cvmx_mixx_oring2_s cn52xx;
229 struct cvmx_mixx_oring2_s cn52xxp1;
230 struct cvmx_mixx_oring2_s cn56xx;
231 struct cvmx_mixx_oring2_s cn56xxp1;
232};
233
234union cvmx_mixx_remcnt {
235 uint64_t u64;
236 struct cvmx_mixx_remcnt_s {
237 uint64_t reserved_52_63:12;
238 uint64_t iremcnt:20;
239 uint64_t reserved_20_31:12;
240 uint64_t oremcnt:20;
241 } s;
242 struct cvmx_mixx_remcnt_s cn52xx;
243 struct cvmx_mixx_remcnt_s cn52xxp1;
244 struct cvmx_mixx_remcnt_s cn56xx;
245 struct cvmx_mixx_remcnt_s cn56xxp1;
246};
247
248#endif
diff --git a/arch/mips/include/asm/octeon/cvmx-smix-defs.h b/arch/mips/include/asm/octeon/cvmx-smix-defs.h
new file mode 100644
index 000000000000..9ae45fcbe3e3
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-smix-defs.h
@@ -0,0 +1,178 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2008 Cavium Networks
8 *
9 * This file 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 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_SMIX_DEFS_H__
29#define __CVMX_SMIX_DEFS_H__
30
31#define CVMX_SMIX_CLK(offset) \
32 CVMX_ADD_IO_SEG(0x0001180000001818ull + (((offset) & 1) * 256))
33#define CVMX_SMIX_CMD(offset) \
34 CVMX_ADD_IO_SEG(0x0001180000001800ull + (((offset) & 1) * 256))
35#define CVMX_SMIX_EN(offset) \
36 CVMX_ADD_IO_SEG(0x0001180000001820ull + (((offset) & 1) * 256))
37#define CVMX_SMIX_RD_DAT(offset) \
38 CVMX_ADD_IO_SEG(0x0001180000001810ull + (((offset) & 1) * 256))
39#define CVMX_SMIX_WR_DAT(offset) \
40 CVMX_ADD_IO_SEG(0x0001180000001808ull + (((offset) & 1) * 256))
41
42union cvmx_smix_clk {
43 uint64_t u64;
44 struct cvmx_smix_clk_s {
45 uint64_t reserved_25_63:39;
46 uint64_t mode:1;
47 uint64_t reserved_21_23:3;
48 uint64_t sample_hi:5;
49 uint64_t sample_mode:1;
50 uint64_t reserved_14_14:1;
51 uint64_t clk_idle:1;
52 uint64_t preamble:1;
53 uint64_t sample:4;
54 uint64_t phase:8;
55 } s;
56 struct cvmx_smix_clk_cn30xx {
57 uint64_t reserved_21_63:43;
58 uint64_t sample_hi:5;
59 uint64_t reserved_14_15:2;
60 uint64_t clk_idle:1;
61 uint64_t preamble:1;
62 uint64_t sample:4;
63 uint64_t phase:8;
64 } cn30xx;
65 struct cvmx_smix_clk_cn30xx cn31xx;
66 struct cvmx_smix_clk_cn30xx cn38xx;
67 struct cvmx_smix_clk_cn30xx cn38xxp2;
68 struct cvmx_smix_clk_cn50xx {
69 uint64_t reserved_25_63:39;
70 uint64_t mode:1;
71 uint64_t reserved_21_23:3;
72 uint64_t sample_hi:5;
73 uint64_t reserved_14_15:2;
74 uint64_t clk_idle:1;
75 uint64_t preamble:1;
76 uint64_t sample:4;
77 uint64_t phase:8;
78 } cn50xx;
79 struct cvmx_smix_clk_s cn52xx;
80 struct cvmx_smix_clk_cn50xx cn52xxp1;
81 struct cvmx_smix_clk_s cn56xx;
82 struct cvmx_smix_clk_cn50xx cn56xxp1;
83 struct cvmx_smix_clk_cn30xx cn58xx;
84 struct cvmx_smix_clk_cn30xx cn58xxp1;
85};
86
87union cvmx_smix_cmd {
88 uint64_t u64;
89 struct cvmx_smix_cmd_s {
90 uint64_t reserved_18_63:46;
91 uint64_t phy_op:2;
92 uint64_t reserved_13_15:3;
93 uint64_t phy_adr:5;
94 uint64_t reserved_5_7:3;
95 uint64_t reg_adr:5;
96 } s;
97 struct cvmx_smix_cmd_cn30xx {
98 uint64_t reserved_17_63:47;
99 uint64_t phy_op:1;
100 uint64_t reserved_13_15:3;
101 uint64_t phy_adr:5;
102 uint64_t reserved_5_7:3;
103 uint64_t reg_adr:5;
104 } cn30xx;
105 struct cvmx_smix_cmd_cn30xx cn31xx;
106 struct cvmx_smix_cmd_cn30xx cn38xx;
107 struct cvmx_smix_cmd_cn30xx cn38xxp2;
108 struct cvmx_smix_cmd_s cn50xx;
109 struct cvmx_smix_cmd_s cn52xx;
110 struct cvmx_smix_cmd_s cn52xxp1;
111 struct cvmx_smix_cmd_s cn56xx;
112 struct cvmx_smix_cmd_s cn56xxp1;
113 struct cvmx_smix_cmd_cn30xx cn58xx;
114 struct cvmx_smix_cmd_cn30xx cn58xxp1;
115};
116
117union cvmx_smix_en {
118 uint64_t u64;
119 struct cvmx_smix_en_s {
120 uint64_t reserved_1_63:63;
121 uint64_t en:1;
122 } s;
123 struct cvmx_smix_en_s cn30xx;
124 struct cvmx_smix_en_s cn31xx;
125 struct cvmx_smix_en_s cn38xx;
126 struct cvmx_smix_en_s cn38xxp2;
127 struct cvmx_smix_en_s cn50xx;
128 struct cvmx_smix_en_s cn52xx;
129 struct cvmx_smix_en_s cn52xxp1;
130 struct cvmx_smix_en_s cn56xx;
131 struct cvmx_smix_en_s cn56xxp1;
132 struct cvmx_smix_en_s cn58xx;
133 struct cvmx_smix_en_s cn58xxp1;
134};
135
136union cvmx_smix_rd_dat {
137 uint64_t u64;
138 struct cvmx_smix_rd_dat_s {
139 uint64_t reserved_18_63:46;
140 uint64_t pending:1;
141 uint64_t val:1;
142 uint64_t dat:16;
143 } s;
144 struct cvmx_smix_rd_dat_s cn30xx;
145 struct cvmx_smix_rd_dat_s cn31xx;
146 struct cvmx_smix_rd_dat_s cn38xx;
147 struct cvmx_smix_rd_dat_s cn38xxp2;
148 struct cvmx_smix_rd_dat_s cn50xx;
149 struct cvmx_smix_rd_dat_s cn52xx;
150 struct cvmx_smix_rd_dat_s cn52xxp1;
151 struct cvmx_smix_rd_dat_s cn56xx;
152 struct cvmx_smix_rd_dat_s cn56xxp1;
153 struct cvmx_smix_rd_dat_s cn58xx;
154 struct cvmx_smix_rd_dat_s cn58xxp1;
155};
156
157union cvmx_smix_wr_dat {
158 uint64_t u64;
159 struct cvmx_smix_wr_dat_s {
160 uint64_t reserved_18_63:46;
161 uint64_t pending:1;
162 uint64_t val:1;
163 uint64_t dat:16;
164 } s;
165 struct cvmx_smix_wr_dat_s cn30xx;
166 struct cvmx_smix_wr_dat_s cn31xx;
167 struct cvmx_smix_wr_dat_s cn38xx;
168 struct cvmx_smix_wr_dat_s cn38xxp2;
169 struct cvmx_smix_wr_dat_s cn50xx;
170 struct cvmx_smix_wr_dat_s cn52xx;
171 struct cvmx_smix_wr_dat_s cn52xxp1;
172 struct cvmx_smix_wr_dat_s cn56xx;
173 struct cvmx_smix_wr_dat_s cn56xxp1;
174 struct cvmx_smix_wr_dat_s cn58xx;
175 struct cvmx_smix_wr_dat_s cn58xxp1;
176};
177
178#endif
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h
index cac9b1a206fc..4d0a8c61fc3e 100644
--- a/arch/mips/include/asm/octeon/octeon.h
+++ b/arch/mips/include/asm/octeon/octeon.h
@@ -47,6 +47,7 @@ struct octeon_cop2_state;
47extern unsigned long octeon_crypto_enable(struct octeon_cop2_state *state); 47extern unsigned long octeon_crypto_enable(struct octeon_cop2_state *state);
48extern void octeon_crypto_disable(struct octeon_cop2_state *state, 48extern void octeon_crypto_disable(struct octeon_cop2_state *state,
49 unsigned long flags); 49 unsigned long flags);
50extern asmlinkage void octeon_cop2_restore(struct octeon_cop2_state *task);
50 51
51extern void octeon_init_cvmcount(void); 52extern void octeon_init_cvmcount(void);
52 53
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index d6eb6134abec..1854336e56a2 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -390,6 +390,19 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma,
390#include <asm-generic/pgtable.h> 390#include <asm-generic/pgtable.h>
391 391
392/* 392/*
393 * uncached accelerated TLB map for video memory access
394 */
395#ifdef CONFIG_CPU_SUPPORTS_UNCACHED_ACCELERATED
396#define __HAVE_PHYS_MEM_ACCESS_PROT
397
398struct file;
399pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
400 unsigned long size, pgprot_t vma_prot);
401int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
402 unsigned long size, pgprot_t *vma_prot);
403#endif
404
405/*
393 * We provide our own get_unmapped area to cope with the virtual aliasing 406 * We provide our own get_unmapped area to cope with the virtual aliasing
394 * constraints placed on us by the cache architecture. 407 * constraints placed on us by the cache architecture.
395 */ 408 */
diff --git a/arch/mips/include/asm/sgi/ioc.h b/arch/mips/include/asm/sgi/ioc.h
index 343ed15f8dc4..57a971904cfe 100644
--- a/arch/mips/include/asm/sgi/ioc.h
+++ b/arch/mips/include/asm/sgi/ioc.h
@@ -164,7 +164,7 @@ struct sgioc_regs {
164 u32 _unused5; 164 u32 _unused5;
165 u8 _write[3]; 165 u8 _write[3];
166 volatile u8 write; 166 volatile u8 write;
167#define SGIOC_WRITE_NTHRESH 0x01 /* use 4.5db threshhold */ 167#define SGIOC_WRITE_NTHRESH 0x01 /* use 4.5db threshold */
168#define SGIOC_WRITE_TPSPEED 0x02 /* use 100ohm TP speed */ 168#define SGIOC_WRITE_TPSPEED 0x02 /* use 100ohm TP speed */
169#define SGIOC_WRITE_EPSEL 0x04 /* force cable mode: 1=AUI 0=TP */ 169#define SGIOC_WRITE_EPSEL 0x04 /* force cable mode: 1=AUI 0=TP */
170#define SGIOC_WRITE_EASEL 0x08 /* 1=autoselect 0=manual cable selection */ 170#define SGIOC_WRITE_EASEL 0x08 /* 1=autoselect 0=manual cable selection */
diff --git a/arch/mips/include/asm/sgialib.h b/arch/mips/include/asm/sgialib.h
index bfce5c786f1c..63741ca1e422 100644
--- a/arch/mips/include/asm/sgialib.h
+++ b/arch/mips/include/asm/sgialib.h
@@ -85,8 +85,7 @@ extern void prom_identify_arch(void);
85extern PCHAR ArcGetEnvironmentVariable(PCHAR name); 85extern PCHAR ArcGetEnvironmentVariable(PCHAR name);
86extern LONG ArcSetEnvironmentVariable(PCHAR name, PCHAR value); 86extern LONG ArcSetEnvironmentVariable(PCHAR name, PCHAR value);
87 87
88/* ARCS command line acquisition and parsing. */ 88/* ARCS command line parsing. */
89extern char *prom_getcmdline(void);
90extern void prom_init_cmdline(void); 89extern void prom_init_cmdline(void);
91 90
92/* Acquiring info about the current time, etc. */ 91/* Acquiring info about the current time, etc. */
diff --git a/arch/mips/include/asm/sibyte/sb1250_mac.h b/arch/mips/include/asm/sibyte/sb1250_mac.h
index b6faf08ca81d..591b9061fd8e 100644
--- a/arch/mips/include/asm/sibyte/sb1250_mac.h
+++ b/arch/mips/include/asm/sibyte/sb1250_mac.h
@@ -212,7 +212,7 @@
212#define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1) 212#define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1)
213 213
214/* 214/*
215 * MAC Fifo Threshhold registers (Table 9-14) 215 * MAC Fifo Threshold registers (Table 9-14)
216 * Register: MAC_THRSH_CFG_0 216 * Register: MAC_THRSH_CFG_0
217 * Register: MAC_THRSH_CFG_1 217 * Register: MAC_THRSH_CFG_1
218 * Register: MAC_THRSH_CFG_2 218 * Register: MAC_THRSH_CFG_2
diff --git a/arch/mips/include/asm/sn/sn0/hubio.h b/arch/mips/include/asm/sn/sn0/hubio.h
index d0c29d4de084..31c76c021bb6 100644
--- a/arch/mips/include/asm/sn/sn0/hubio.h
+++ b/arch/mips/include/asm/sn/sn0/hubio.h
@@ -825,7 +825,7 @@ typedef union iprb_u {
825 struct { 825 struct {
826 u64 rsvd1: 15, 826 u64 rsvd1: 15,
827 error: 1, /* Widget rcvd wr resp pkt w/ error */ 827 error: 1, /* Widget rcvd wr resp pkt w/ error */
828 ovflow: 5, /* Over flow count. perf measurement */ 828 ovflow: 5, /* Overflow count. perf measurement */
829 fire_and_forget: 1, /* Launch Write without response */ 829 fire_and_forget: 1, /* Launch Write without response */
830 mode: 2, /* Widget operation Mode */ 830 mode: 2, /* Widget operation Mode */
831 rsvd2: 2, 831 rsvd2: 2,
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h
index 5b60a09a0f08..21ef9efbde43 100644
--- a/arch/mips/include/asm/spinlock.h
+++ b/arch/mips/include/asm/spinlock.h
@@ -34,33 +34,33 @@
34 * becomes equal to the the initial value of the tail. 34 * becomes equal to the the initial value of the tail.
35 */ 35 */
36 36
37static inline int __raw_spin_is_locked(raw_spinlock_t *lock) 37static inline int arch_spin_is_locked(arch_spinlock_t *lock)
38{ 38{
39 unsigned int counters = ACCESS_ONCE(lock->lock); 39 unsigned int counters = ACCESS_ONCE(lock->lock);
40 40
41 return ((counters >> 14) ^ counters) & 0x1fff; 41 return ((counters >> 14) ^ counters) & 0x1fff;
42} 42}
43 43
44#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 44#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
45#define __raw_spin_unlock_wait(x) \ 45#define arch_spin_unlock_wait(x) \
46 while (__raw_spin_is_locked(x)) { cpu_relax(); } 46 while (arch_spin_is_locked(x)) { cpu_relax(); }
47 47
48static inline int __raw_spin_is_contended(raw_spinlock_t *lock) 48static inline int arch_spin_is_contended(arch_spinlock_t *lock)
49{ 49{
50 unsigned int counters = ACCESS_ONCE(lock->lock); 50 unsigned int counters = ACCESS_ONCE(lock->lock);
51 51
52 return (((counters >> 14) - counters) & 0x1fff) > 1; 52 return (((counters >> 14) - counters) & 0x1fff) > 1;
53} 53}
54#define __raw_spin_is_contended __raw_spin_is_contended 54#define arch_spin_is_contended arch_spin_is_contended
55 55
56static inline void __raw_spin_lock(raw_spinlock_t *lock) 56static inline void arch_spin_lock(arch_spinlock_t *lock)
57{ 57{
58 int my_ticket; 58 int my_ticket;
59 int tmp; 59 int tmp;
60 60
61 if (R10000_LLSC_WAR) { 61 if (R10000_LLSC_WAR) {
62 __asm__ __volatile__ ( 62 __asm__ __volatile__ (
63 " .set push # __raw_spin_lock \n" 63 " .set push # arch_spin_lock \n"
64 " .set noreorder \n" 64 " .set noreorder \n"
65 " \n" 65 " \n"
66 "1: ll %[ticket], %[ticket_ptr] \n" 66 "1: ll %[ticket], %[ticket_ptr] \n"
@@ -94,7 +94,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
94 [my_ticket] "=&r" (my_ticket)); 94 [my_ticket] "=&r" (my_ticket));
95 } else { 95 } else {
96 __asm__ __volatile__ ( 96 __asm__ __volatile__ (
97 " .set push # __raw_spin_lock \n" 97 " .set push # arch_spin_lock \n"
98 " .set noreorder \n" 98 " .set noreorder \n"
99 " \n" 99 " \n"
100 " ll %[ticket], %[ticket_ptr] \n" 100 " ll %[ticket], %[ticket_ptr] \n"
@@ -134,7 +134,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
134 smp_llsc_mb(); 134 smp_llsc_mb();
135} 135}
136 136
137static inline void __raw_spin_unlock(raw_spinlock_t *lock) 137static inline void arch_spin_unlock(arch_spinlock_t *lock)
138{ 138{
139 int tmp; 139 int tmp;
140 140
@@ -142,7 +142,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
142 142
143 if (R10000_LLSC_WAR) { 143 if (R10000_LLSC_WAR) {
144 __asm__ __volatile__ ( 144 __asm__ __volatile__ (
145 " # __raw_spin_unlock \n" 145 " # arch_spin_unlock \n"
146 "1: ll %[ticket], %[ticket_ptr] \n" 146 "1: ll %[ticket], %[ticket_ptr] \n"
147 " addiu %[ticket], %[ticket], 1 \n" 147 " addiu %[ticket], %[ticket], 1 \n"
148 " ori %[ticket], %[ticket], 0x2000 \n" 148 " ori %[ticket], %[ticket], 0x2000 \n"
@@ -153,7 +153,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
153 [ticket] "=&r" (tmp)); 153 [ticket] "=&r" (tmp));
154 } else { 154 } else {
155 __asm__ __volatile__ ( 155 __asm__ __volatile__ (
156 " .set push # __raw_spin_unlock \n" 156 " .set push # arch_spin_unlock \n"
157 " .set noreorder \n" 157 " .set noreorder \n"
158 " \n" 158 " \n"
159 " ll %[ticket], %[ticket_ptr] \n" 159 " ll %[ticket], %[ticket_ptr] \n"
@@ -174,13 +174,13 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
174 } 174 }
175} 175}
176 176
177static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock) 177static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock)
178{ 178{
179 int tmp, tmp2, tmp3; 179 int tmp, tmp2, tmp3;
180 180
181 if (R10000_LLSC_WAR) { 181 if (R10000_LLSC_WAR) {
182 __asm__ __volatile__ ( 182 __asm__ __volatile__ (
183 " .set push # __raw_spin_trylock \n" 183 " .set push # arch_spin_trylock \n"
184 " .set noreorder \n" 184 " .set noreorder \n"
185 " \n" 185 " \n"
186 "1: ll %[ticket], %[ticket_ptr] \n" 186 "1: ll %[ticket], %[ticket_ptr] \n"
@@ -204,7 +204,7 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock)
204 [now_serving] "=&r" (tmp3)); 204 [now_serving] "=&r" (tmp3));
205 } else { 205 } else {
206 __asm__ __volatile__ ( 206 __asm__ __volatile__ (
207 " .set push # __raw_spin_trylock \n" 207 " .set push # arch_spin_trylock \n"
208 " .set noreorder \n" 208 " .set noreorder \n"
209 " \n" 209 " \n"
210 " ll %[ticket], %[ticket_ptr] \n" 210 " ll %[ticket], %[ticket_ptr] \n"
@@ -248,21 +248,21 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock)
248 * read_can_lock - would read_trylock() succeed? 248 * read_can_lock - would read_trylock() succeed?
249 * @lock: the rwlock in question. 249 * @lock: the rwlock in question.
250 */ 250 */
251#define __raw_read_can_lock(rw) ((rw)->lock >= 0) 251#define arch_read_can_lock(rw) ((rw)->lock >= 0)
252 252
253/* 253/*
254 * write_can_lock - would write_trylock() succeed? 254 * write_can_lock - would write_trylock() succeed?
255 * @lock: the rwlock in question. 255 * @lock: the rwlock in question.
256 */ 256 */
257#define __raw_write_can_lock(rw) (!(rw)->lock) 257#define arch_write_can_lock(rw) (!(rw)->lock)
258 258
259static inline void __raw_read_lock(raw_rwlock_t *rw) 259static inline void arch_read_lock(arch_rwlock_t *rw)
260{ 260{
261 unsigned int tmp; 261 unsigned int tmp;
262 262
263 if (R10000_LLSC_WAR) { 263 if (R10000_LLSC_WAR) {
264 __asm__ __volatile__( 264 __asm__ __volatile__(
265 " .set noreorder # __raw_read_lock \n" 265 " .set noreorder # arch_read_lock \n"
266 "1: ll %1, %2 \n" 266 "1: ll %1, %2 \n"
267 " bltz %1, 1b \n" 267 " bltz %1, 1b \n"
268 " addu %1, 1 \n" 268 " addu %1, 1 \n"
@@ -275,7 +275,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
275 : "memory"); 275 : "memory");
276 } else { 276 } else {
277 __asm__ __volatile__( 277 __asm__ __volatile__(
278 " .set noreorder # __raw_read_lock \n" 278 " .set noreorder # arch_read_lock \n"
279 "1: ll %1, %2 \n" 279 "1: ll %1, %2 \n"
280 " bltz %1, 2f \n" 280 " bltz %1, 2f \n"
281 " addu %1, 1 \n" 281 " addu %1, 1 \n"
@@ -301,7 +301,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
301/* Note the use of sub, not subu which will make the kernel die with an 301/* Note the use of sub, not subu which will make the kernel die with an
302 overflow exception if we ever try to unlock an rwlock that is already 302 overflow exception if we ever try to unlock an rwlock that is already
303 unlocked or is being held by a writer. */ 303 unlocked or is being held by a writer. */
304static inline void __raw_read_unlock(raw_rwlock_t *rw) 304static inline void arch_read_unlock(arch_rwlock_t *rw)
305{ 305{
306 unsigned int tmp; 306 unsigned int tmp;
307 307
@@ -309,7 +309,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
309 309
310 if (R10000_LLSC_WAR) { 310 if (R10000_LLSC_WAR) {
311 __asm__ __volatile__( 311 __asm__ __volatile__(
312 "1: ll %1, %2 # __raw_read_unlock \n" 312 "1: ll %1, %2 # arch_read_unlock \n"
313 " sub %1, 1 \n" 313 " sub %1, 1 \n"
314 " sc %1, %0 \n" 314 " sc %1, %0 \n"
315 " beqzl %1, 1b \n" 315 " beqzl %1, 1b \n"
@@ -318,7 +318,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
318 : "memory"); 318 : "memory");
319 } else { 319 } else {
320 __asm__ __volatile__( 320 __asm__ __volatile__(
321 " .set noreorder # __raw_read_unlock \n" 321 " .set noreorder # arch_read_unlock \n"
322 "1: ll %1, %2 \n" 322 "1: ll %1, %2 \n"
323 " sub %1, 1 \n" 323 " sub %1, 1 \n"
324 " sc %1, %0 \n" 324 " sc %1, %0 \n"
@@ -335,13 +335,13 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
335 } 335 }
336} 336}
337 337
338static inline void __raw_write_lock(raw_rwlock_t *rw) 338static inline void arch_write_lock(arch_rwlock_t *rw)
339{ 339{
340 unsigned int tmp; 340 unsigned int tmp;
341 341
342 if (R10000_LLSC_WAR) { 342 if (R10000_LLSC_WAR) {
343 __asm__ __volatile__( 343 __asm__ __volatile__(
344 " .set noreorder # __raw_write_lock \n" 344 " .set noreorder # arch_write_lock \n"
345 "1: ll %1, %2 \n" 345 "1: ll %1, %2 \n"
346 " bnez %1, 1b \n" 346 " bnez %1, 1b \n"
347 " lui %1, 0x8000 \n" 347 " lui %1, 0x8000 \n"
@@ -354,7 +354,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
354 : "memory"); 354 : "memory");
355 } else { 355 } else {
356 __asm__ __volatile__( 356 __asm__ __volatile__(
357 " .set noreorder # __raw_write_lock \n" 357 " .set noreorder # arch_write_lock \n"
358 "1: ll %1, %2 \n" 358 "1: ll %1, %2 \n"
359 " bnez %1, 2f \n" 359 " bnez %1, 2f \n"
360 " lui %1, 0x8000 \n" 360 " lui %1, 0x8000 \n"
@@ -377,26 +377,26 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
377 smp_llsc_mb(); 377 smp_llsc_mb();
378} 378}
379 379
380static inline void __raw_write_unlock(raw_rwlock_t *rw) 380static inline void arch_write_unlock(arch_rwlock_t *rw)
381{ 381{
382 smp_mb(); 382 smp_mb();
383 383
384 __asm__ __volatile__( 384 __asm__ __volatile__(
385 " # __raw_write_unlock \n" 385 " # arch_write_unlock \n"
386 " sw $0, %0 \n" 386 " sw $0, %0 \n"
387 : "=m" (rw->lock) 387 : "=m" (rw->lock)
388 : "m" (rw->lock) 388 : "m" (rw->lock)
389 : "memory"); 389 : "memory");
390} 390}
391 391
392static inline int __raw_read_trylock(raw_rwlock_t *rw) 392static inline int arch_read_trylock(arch_rwlock_t *rw)
393{ 393{
394 unsigned int tmp; 394 unsigned int tmp;
395 int ret; 395 int ret;
396 396
397 if (R10000_LLSC_WAR) { 397 if (R10000_LLSC_WAR) {
398 __asm__ __volatile__( 398 __asm__ __volatile__(
399 " .set noreorder # __raw_read_trylock \n" 399 " .set noreorder # arch_read_trylock \n"
400 " li %2, 0 \n" 400 " li %2, 0 \n"
401 "1: ll %1, %3 \n" 401 "1: ll %1, %3 \n"
402 " bltz %1, 2f \n" 402 " bltz %1, 2f \n"
@@ -413,7 +413,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
413 : "memory"); 413 : "memory");
414 } else { 414 } else {
415 __asm__ __volatile__( 415 __asm__ __volatile__(
416 " .set noreorder # __raw_read_trylock \n" 416 " .set noreorder # arch_read_trylock \n"
417 " li %2, 0 \n" 417 " li %2, 0 \n"
418 "1: ll %1, %3 \n" 418 "1: ll %1, %3 \n"
419 " bltz %1, 2f \n" 419 " bltz %1, 2f \n"
@@ -433,14 +433,14 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
433 return ret; 433 return ret;
434} 434}
435 435
436static inline int __raw_write_trylock(raw_rwlock_t *rw) 436static inline int arch_write_trylock(arch_rwlock_t *rw)
437{ 437{
438 unsigned int tmp; 438 unsigned int tmp;
439 int ret; 439 int ret;
440 440
441 if (R10000_LLSC_WAR) { 441 if (R10000_LLSC_WAR) {
442 __asm__ __volatile__( 442 __asm__ __volatile__(
443 " .set noreorder # __raw_write_trylock \n" 443 " .set noreorder # arch_write_trylock \n"
444 " li %2, 0 \n" 444 " li %2, 0 \n"
445 "1: ll %1, %3 \n" 445 "1: ll %1, %3 \n"
446 " bnez %1, 2f \n" 446 " bnez %1, 2f \n"
@@ -457,7 +457,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
457 : "memory"); 457 : "memory");
458 } else { 458 } else {
459 __asm__ __volatile__( 459 __asm__ __volatile__(
460 " .set noreorder # __raw_write_trylock \n" 460 " .set noreorder # arch_write_trylock \n"
461 " li %2, 0 \n" 461 " li %2, 0 \n"
462 "1: ll %1, %3 \n" 462 "1: ll %1, %3 \n"
463 " bnez %1, 2f \n" 463 " bnez %1, 2f \n"
@@ -480,11 +480,11 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
480 return ret; 480 return ret;
481} 481}
482 482
483#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 483#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
484#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 484#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
485 485
486#define _raw_spin_relax(lock) cpu_relax() 486#define arch_spin_relax(lock) cpu_relax()
487#define _raw_read_relax(lock) cpu_relax() 487#define arch_read_relax(lock) cpu_relax()
488#define _raw_write_relax(lock) cpu_relax() 488#define arch_write_relax(lock) cpu_relax()
489 489
490#endif /* _ASM_SPINLOCK_H */ 490#endif /* _ASM_SPINLOCK_H */
diff --git a/arch/mips/include/asm/spinlock_types.h b/arch/mips/include/asm/spinlock_types.h
index adeedaa116c1..ee197c2f9c98 100644
--- a/arch/mips/include/asm/spinlock_types.h
+++ b/arch/mips/include/asm/spinlock_types.h
@@ -12,14 +12,14 @@ typedef struct {
12 * bits 15..28: ticket 12 * bits 15..28: ticket
13 */ 13 */
14 unsigned int lock; 14 unsigned int lock;
15} raw_spinlock_t; 15} arch_spinlock_t;
16 16
17#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 17#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
18 18
19typedef struct { 19typedef struct {
20 volatile unsigned int lock; 20 volatile unsigned int lock;
21} raw_rwlock_t; 21} arch_rwlock_t;
22 22
23#define __RAW_RW_LOCK_UNLOCKED { 0 } 23#define __ARCH_RW_LOCK_UNLOCKED { 0 }
24 24
25#endif 25#endif
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
index db0fa7b5aeaf..3b6da3330e32 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
@@ -51,9 +51,6 @@
51 LONG_S v1, PT_ACX(sp) 51 LONG_S v1, PT_ACX(sp)
52#else 52#else
53 mfhi v1 53 mfhi v1
54 LONG_S v1, PT_HI(sp)
55 mflo v1
56 LONG_S v1, PT_LO(sp)
57#endif 54#endif
58#ifdef CONFIG_32BIT 55#ifdef CONFIG_32BIT
59 LONG_S $8, PT_R8(sp) 56 LONG_S $8, PT_R8(sp)
@@ -62,10 +59,17 @@
62 LONG_S $10, PT_R10(sp) 59 LONG_S $10, PT_R10(sp)
63 LONG_S $11, PT_R11(sp) 60 LONG_S $11, PT_R11(sp)
64 LONG_S $12, PT_R12(sp) 61 LONG_S $12, PT_R12(sp)
62#ifndef CONFIG_CPU_HAS_SMARTMIPS
63 LONG_S v1, PT_HI(sp)
64 mflo v1
65#endif
65 LONG_S $13, PT_R13(sp) 66 LONG_S $13, PT_R13(sp)
66 LONG_S $14, PT_R14(sp) 67 LONG_S $14, PT_R14(sp)
67 LONG_S $15, PT_R15(sp) 68 LONG_S $15, PT_R15(sp)
68 LONG_S $24, PT_R24(sp) 69 LONG_S $24, PT_R24(sp)
70#ifndef CONFIG_CPU_HAS_SMARTMIPS
71 LONG_S v1, PT_LO(sp)
72#endif
69 .endm 73 .endm
70 74
71 .macro SAVE_STATIC 75 .macro SAVE_STATIC
@@ -83,15 +87,19 @@
83#ifdef CONFIG_SMP 87#ifdef CONFIG_SMP
84#ifdef CONFIG_MIPS_MT_SMTC 88#ifdef CONFIG_MIPS_MT_SMTC
85#define PTEBASE_SHIFT 19 /* TCBIND */ 89#define PTEBASE_SHIFT 19 /* TCBIND */
90#define CPU_ID_REG CP0_TCBIND
91#define CPU_ID_MFC0 mfc0
92#elif defined(CONFIG_MIPS_PGD_C0_CONTEXT)
93#define PTEBASE_SHIFT 48 /* XCONTEXT */
94#define CPU_ID_REG CP0_XCONTEXT
95#define CPU_ID_MFC0 MFC0
86#else 96#else
87#define PTEBASE_SHIFT 23 /* CONTEXT */ 97#define PTEBASE_SHIFT 23 /* CONTEXT */
98#define CPU_ID_REG CP0_CONTEXT
99#define CPU_ID_MFC0 MFC0
88#endif 100#endif
89 .macro get_saved_sp /* SMP variation */ 101 .macro get_saved_sp /* SMP variation */
90#ifdef CONFIG_MIPS_MT_SMTC 102 CPU_ID_MFC0 k0, CPU_ID_REG
91 mfc0 k0, CP0_TCBIND
92#else
93 MFC0 k0, CP0_CONTEXT
94#endif
95#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) 103#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
96 lui k1, %hi(kernelsp) 104 lui k1, %hi(kernelsp)
97#else 105#else
@@ -107,11 +115,7 @@
107 .endm 115 .endm
108 116
109 .macro set_saved_sp stackp temp temp2 117 .macro set_saved_sp stackp temp temp2
110#ifdef CONFIG_MIPS_MT_SMTC 118 CPU_ID_MFC0 \temp, CPU_ID_REG
111 mfc0 \temp, CP0_TCBIND
112#else
113 MFC0 \temp, CP0_CONTEXT
114#endif
115 LONG_SRL \temp, PTEBASE_SHIFT 119 LONG_SRL \temp, PTEBASE_SHIFT
116 LONG_S \stackp, kernelsp(\temp) 120 LONG_S \stackp, kernelsp(\temp)
117 .endm 121 .endm
@@ -166,7 +170,6 @@
166 LONG_S $0, PT_R0(sp) 170 LONG_S $0, PT_R0(sp)
167 mfc0 v1, CP0_STATUS 171 mfc0 v1, CP0_STATUS
168 LONG_S $2, PT_R2(sp) 172 LONG_S $2, PT_R2(sp)
169 LONG_S v1, PT_STATUS(sp)
170#ifdef CONFIG_MIPS_MT_SMTC 173#ifdef CONFIG_MIPS_MT_SMTC
171 /* 174 /*
172 * Ideally, these instructions would be shuffled in 175 * Ideally, these instructions would be shuffled in
@@ -178,20 +181,21 @@
178 LONG_S v1, PT_TCSTATUS(sp) 181 LONG_S v1, PT_TCSTATUS(sp)
179#endif /* CONFIG_MIPS_MT_SMTC */ 182#endif /* CONFIG_MIPS_MT_SMTC */
180 LONG_S $4, PT_R4(sp) 183 LONG_S $4, PT_R4(sp)
181 mfc0 v1, CP0_CAUSE
182 LONG_S $5, PT_R5(sp) 184 LONG_S $5, PT_R5(sp)
183 LONG_S v1, PT_CAUSE(sp) 185 LONG_S v1, PT_STATUS(sp)
186 mfc0 v1, CP0_CAUSE
184 LONG_S $6, PT_R6(sp) 187 LONG_S $6, PT_R6(sp)
185 MFC0 v1, CP0_EPC
186 LONG_S $7, PT_R7(sp) 188 LONG_S $7, PT_R7(sp)
189 LONG_S v1, PT_CAUSE(sp)
190 MFC0 v1, CP0_EPC
187#ifdef CONFIG_64BIT 191#ifdef CONFIG_64BIT
188 LONG_S $8, PT_R8(sp) 192 LONG_S $8, PT_R8(sp)
189 LONG_S $9, PT_R9(sp) 193 LONG_S $9, PT_R9(sp)
190#endif 194#endif
191 LONG_S v1, PT_EPC(sp)
192 LONG_S $25, PT_R25(sp) 195 LONG_S $25, PT_R25(sp)
193 LONG_S $28, PT_R28(sp) 196 LONG_S $28, PT_R28(sp)
194 LONG_S $31, PT_R31(sp) 197 LONG_S $31, PT_R31(sp)
198 LONG_S v1, PT_EPC(sp)
195 ori $28, sp, _THREAD_MASK 199 ori $28, sp, _THREAD_MASK
196 xori $28, _THREAD_MASK 200 xori $28, _THREAD_MASK
197#ifdef CONFIG_CPU_CAVIUM_OCTEON 201#ifdef CONFIG_CPU_CAVIUM_OCTEON
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
index df6a430de5eb..c7f1bfef1574 100644
--- a/arch/mips/include/asm/time.h
+++ b/arch/mips/include/asm/time.h
@@ -84,8 +84,16 @@ static inline int init_mips_clocksource(void)
84#endif 84#endif
85} 85}
86 86
87extern void clocksource_set_clock(struct clocksource *cs, unsigned int clock); 87static inline void clocksource_set_clock(struct clocksource *cs,
88extern void clockevent_set_clock(struct clock_event_device *cd, 88 unsigned int clock)
89 unsigned int clock); 89{
90 clocksource_calc_mult_shift(cs, clock, 4);
91}
92
93static inline void clockevent_set_clock(struct clock_event_device *cd,
94 unsigned int clock)
95{
96 clockevents_calc_mult_shift(cd, clock, 4);
97}
90 98
91#endif /* _ASM_TIME_H */ 99#endif /* _ASM_TIME_H */
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index eecd2a9f155c..9326af5186fe 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -2,14 +2,17 @@
2# Makefile for the Linux/MIPS kernel. 2# Makefile for the Linux/MIPS kernel.
3# 3#
4 4
5CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS)
6
7extra-y := head.o init_task.o vmlinux.lds 5extra-y := head.o init_task.o vmlinux.lds
8 6
9obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ 7obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
10 ptrace.o reset.o setup.o signal.o syscall.o \ 8 ptrace.o reset.o setup.o signal.o syscall.o \
11 time.o topology.o traps.o unaligned.o watch.o 9 time.o topology.o traps.o unaligned.o watch.o
12 10
11ifdef CONFIG_FUNCTION_TRACER
12CFLAGS_REMOVE_ftrace.o = -pg
13CFLAGS_REMOVE_early_printk.o = -pg
14endif
15
13obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o 16obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o
14obj-$(CONFIG_CEVT_R4K_LIB) += cevt-r4k.o 17obj-$(CONFIG_CEVT_R4K_LIB) += cevt-r4k.o
15obj-$(CONFIG_MIPS_MT_SMTC) += cevt-smtc.o 18obj-$(CONFIG_MIPS_MT_SMTC) += cevt-smtc.o
@@ -19,6 +22,7 @@ obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o
19obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o 22obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o
20obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o 23obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o
21obj-$(CONFIG_CSRC_IOASIC) += csrc-ioasic.o 24obj-$(CONFIG_CSRC_IOASIC) += csrc-ioasic.o
25obj-$(CONFIG_CSRC_POWERTV) += csrc-powertv.o
22obj-$(CONFIG_CSRC_R4K_LIB) += csrc-r4k.o 26obj-$(CONFIG_CSRC_R4K_LIB) += csrc-r4k.o
23obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o 27obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o
24obj-$(CONFIG_SYNC_R4K) += sync-r4k.o 28obj-$(CONFIG_SYNC_R4K) += sync-r4k.o
@@ -26,6 +30,8 @@ obj-$(CONFIG_SYNC_R4K) += sync-r4k.o
26obj-$(CONFIG_STACKTRACE) += stacktrace.o 30obj-$(CONFIG_STACKTRACE) += stacktrace.o
27obj-$(CONFIG_MODULES) += mips_ksyms.o module.o 31obj-$(CONFIG_MODULES) += mips_ksyms.o module.o
28 32
33obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
34
29obj-$(CONFIG_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o 35obj-$(CONFIG_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o
30obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o 36obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o
31obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o 37obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o
@@ -92,4 +98,8 @@ CFLAGS_cpu-bugs64.o = $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/n
92 98
93obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o 99obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o
94 100
101obj-$(CONFIG_MIPS_CPUFREQ) += cpufreq/
102
95EXTRA_CFLAGS += -Werror 103EXTRA_CFLAGS += -Werror
104
105CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS)
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 7a51866068a4..80e202eca056 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -16,6 +16,7 @@
16#include <linux/ptrace.h> 16#include <linux/ptrace.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19#include <linux/module.h>
19 20
20#include <asm/bugs.h> 21#include <asm/bugs.h>
21#include <asm/cpu.h> 22#include <asm/cpu.h>
@@ -32,6 +33,7 @@
32 * the CPU very much. 33 * the CPU very much.
33 */ 34 */
34void (*cpu_wait)(void); 35void (*cpu_wait)(void);
36EXPORT_SYMBOL(cpu_wait);
35 37
36static void r3081_wait(void) 38static void r3081_wait(void)
37{ 39{
diff --git a/arch/mips/kernel/cpufreq/Kconfig b/arch/mips/kernel/cpufreq/Kconfig
new file mode 100644
index 000000000000..58c601eee6fd
--- /dev/null
+++ b/arch/mips/kernel/cpufreq/Kconfig
@@ -0,0 +1,41 @@
1#
2# CPU Frequency scaling
3#
4
5config MIPS_EXTERNAL_TIMER
6 bool
7
8config MIPS_CPUFREQ
9 bool
10 default y
11 depends on CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER
12
13if MIPS_CPUFREQ
14
15menu "CPU Frequency scaling"
16
17source "drivers/cpufreq/Kconfig"
18
19if CPU_FREQ
20
21comment "CPUFreq processor drivers"
22
23config LOONGSON2_CPUFREQ
24 tristate "Loongson2 CPUFreq Driver"
25 select CPU_FREQ_TABLE
26 depends on MIPS_CPUFREQ
27 help
28 This option adds a CPUFreq driver for loongson processors which
29 support software configurable cpu frequency.
30
31 Loongson2F and it's successors support this feature.
32
33 For details, take a look at <file:Documentation/cpu-freq/>.
34
35 If in doubt, say N.
36
37endif # CPU_FREQ
38
39endmenu
40
41endif # MIPS_CPUFREQ
diff --git a/arch/mips/kernel/cpufreq/Makefile b/arch/mips/kernel/cpufreq/Makefile
new file mode 100644
index 000000000000..c3479a432efe
--- /dev/null
+++ b/arch/mips/kernel/cpufreq/Makefile
@@ -0,0 +1,5 @@
1#
2# Makefile for the Linux/MIPS cpufreq.
3#
4
5obj-$(CONFIG_LOONGSON2_CPUFREQ) += loongson2_cpufreq.o loongson2_clock.o
diff --git a/arch/mips/kernel/cpufreq/loongson2_clock.c b/arch/mips/kernel/cpufreq/loongson2_clock.c
new file mode 100644
index 000000000000..d7ca256e33ef
--- /dev/null
+++ b/arch/mips/kernel/cpufreq/loongson2_clock.c
@@ -0,0 +1,166 @@
1/*
2 * Copyright (C) 2006 - 2008 Lemote Inc. & Insititute of Computing Technology
3 * Author: Yanhua, yanh@lemote.com
4 *
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 */
9
10#include <linux/cpufreq.h>
11#include <linux/platform_device.h>
12
13#include <asm/clock.h>
14
15#include <loongson.h>
16
17static LIST_HEAD(clock_list);
18static DEFINE_SPINLOCK(clock_lock);
19static DEFINE_MUTEX(clock_list_sem);
20
21/* Minimum CLK support */
22enum {
23 DC_ZERO, DC_25PT = 2, DC_37PT, DC_50PT, DC_62PT, DC_75PT,
24 DC_87PT, DC_DISABLE, DC_RESV
25};
26
27struct cpufreq_frequency_table loongson2_clockmod_table[] = {
28 {DC_RESV, CPUFREQ_ENTRY_INVALID},
29 {DC_ZERO, CPUFREQ_ENTRY_INVALID},
30 {DC_25PT, 0},
31 {DC_37PT, 0},
32 {DC_50PT, 0},
33 {DC_62PT, 0},
34 {DC_75PT, 0},
35 {DC_87PT, 0},
36 {DC_DISABLE, 0},
37 {DC_RESV, CPUFREQ_TABLE_END},
38};
39EXPORT_SYMBOL_GPL(loongson2_clockmod_table);
40
41static struct clk cpu_clk = {
42 .name = "cpu_clk",
43 .flags = CLK_ALWAYS_ENABLED | CLK_RATE_PROPAGATES,
44 .rate = 800000000,
45};
46
47struct clk *clk_get(struct device *dev, const char *id)
48{
49 return &cpu_clk;
50}
51EXPORT_SYMBOL(clk_get);
52
53static void propagate_rate(struct clk *clk)
54{
55 struct clk *clkp;
56
57 list_for_each_entry(clkp, &clock_list, node) {
58 if (likely(clkp->parent != clk))
59 continue;
60 if (likely(clkp->ops && clkp->ops->recalc))
61 clkp->ops->recalc(clkp);
62 if (unlikely(clkp->flags & CLK_RATE_PROPAGATES))
63 propagate_rate(clkp);
64 }
65}
66
67int clk_enable(struct clk *clk)
68{
69 return 0;
70}
71EXPORT_SYMBOL(clk_enable);
72
73void clk_disable(struct clk *clk)
74{
75}
76EXPORT_SYMBOL(clk_disable);
77
78unsigned long clk_get_rate(struct clk *clk)
79{
80 return (unsigned long)clk->rate;
81}
82EXPORT_SYMBOL(clk_get_rate);
83
84void clk_put(struct clk *clk)
85{
86}
87EXPORT_SYMBOL(clk_put);
88
89int clk_set_rate(struct clk *clk, unsigned long rate)
90{
91 return clk_set_rate_ex(clk, rate, 0);
92}
93EXPORT_SYMBOL_GPL(clk_set_rate);
94
95int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
96{
97 int ret = 0;
98 int regval;
99 int i;
100
101 if (likely(clk->ops && clk->ops->set_rate)) {
102 unsigned long flags;
103
104 spin_lock_irqsave(&clock_lock, flags);
105 ret = clk->ops->set_rate(clk, rate, algo_id);
106 spin_unlock_irqrestore(&clock_lock, flags);
107 }
108
109 if (unlikely(clk->flags & CLK_RATE_PROPAGATES))
110 propagate_rate(clk);
111
112 for (i = 0; loongson2_clockmod_table[i].frequency != CPUFREQ_TABLE_END;
113 i++) {
114 if (loongson2_clockmod_table[i].frequency ==
115 CPUFREQ_ENTRY_INVALID)
116 continue;
117 if (rate == loongson2_clockmod_table[i].frequency)
118 break;
119 }
120 if (rate != loongson2_clockmod_table[i].frequency)
121 return -ENOTSUPP;
122
123 clk->rate = rate;
124
125 regval = LOONGSON_CHIPCFG0;
126 regval = (regval & ~0x7) | (loongson2_clockmod_table[i].index - 1);
127 LOONGSON_CHIPCFG0 = regval;
128
129 return ret;
130}
131EXPORT_SYMBOL_GPL(clk_set_rate_ex);
132
133long clk_round_rate(struct clk *clk, unsigned long rate)
134{
135 if (likely(clk->ops && clk->ops->round_rate)) {
136 unsigned long flags, rounded;
137
138 spin_lock_irqsave(&clock_lock, flags);
139 rounded = clk->ops->round_rate(clk, rate);
140 spin_unlock_irqrestore(&clock_lock, flags);
141
142 return rounded;
143 }
144
145 return rate;
146}
147EXPORT_SYMBOL_GPL(clk_round_rate);
148
149/*
150 * This is the simple version of Loongson-2 wait, Maybe we need do this in
151 * interrupt disabled content
152 */
153
154DEFINE_SPINLOCK(loongson2_wait_lock);
155void loongson2_cpu_wait(void)
156{
157 u32 cpu_freq;
158 unsigned long flags;
159
160 spin_lock_irqsave(&loongson2_wait_lock, flags);
161 cpu_freq = LOONGSON_CHIPCFG0;
162 LOONGSON_CHIPCFG0 &= ~0x7; /* Put CPU into wait mode */
163 LOONGSON_CHIPCFG0 = cpu_freq; /* Restore CPU state */
164 spin_unlock_irqrestore(&loongson2_wait_lock, flags);
165}
166EXPORT_SYMBOL_GPL(loongson2_cpu_wait);
diff --git a/arch/mips/kernel/cpufreq/loongson2_cpufreq.c b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c
new file mode 100644
index 000000000000..2f6a0b147ab8
--- /dev/null
+++ b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c
@@ -0,0 +1,227 @@
1/*
2 * Cpufreq driver for the loongson-2 processors
3 *
4 * The 2E revision of loongson processor not support this feature.
5 *
6 * Copyright (C) 2006 - 2008 Lemote Inc. & Insititute of Computing Technology
7 * Author: Yanhua, yanh@lemote.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
11 * for more details.
12 */
13#include <linux/cpufreq.h>
14#include <linux/module.h>
15#include <linux/err.h>
16#include <linux/sched.h> /* set_cpus_allowed() */
17#include <linux/delay.h>
18#include <linux/platform_device.h>
19
20#include <asm/clock.h>
21
22#include <loongson.h>
23
24static uint nowait;
25
26static struct clk *cpuclk;
27
28static void (*saved_cpu_wait) (void);
29
30static int loongson2_cpu_freq_notifier(struct notifier_block *nb,
31 unsigned long val, void *data);
32
33static struct notifier_block loongson2_cpufreq_notifier_block = {
34 .notifier_call = loongson2_cpu_freq_notifier
35};
36
37static int loongson2_cpu_freq_notifier(struct notifier_block *nb,
38 unsigned long val, void *data)
39{
40 if (val == CPUFREQ_POSTCHANGE)
41 current_cpu_data.udelay_val = loops_per_jiffy;
42
43 return 0;
44}
45
46static unsigned int loongson2_cpufreq_get(unsigned int cpu)
47{
48 return clk_get_rate(cpuclk);
49}
50
51/*
52 * Here we notify other drivers of the proposed change and the final change.
53 */
54static int loongson2_cpufreq_target(struct cpufreq_policy *policy,
55 unsigned int target_freq,
56 unsigned int relation)
57{
58 unsigned int cpu = policy->cpu;
59 unsigned int newstate = 0;
60 cpumask_t cpus_allowed;
61 struct cpufreq_freqs freqs;
62 unsigned int freq;
63
64 if (!cpu_online(cpu))
65 return -ENODEV;
66
67 cpus_allowed = current->cpus_allowed;
68 set_cpus_allowed(current, cpumask_of_cpu(cpu));
69
70 if (cpufreq_frequency_table_target
71 (policy, &loongson2_clockmod_table[0], target_freq, relation,
72 &newstate))
73 return -EINVAL;
74
75 freq =
76 ((cpu_clock_freq / 1000) *
77 loongson2_clockmod_table[newstate].index) / 8;
78 if (freq < policy->min || freq > policy->max)
79 return -EINVAL;
80
81 pr_debug("cpufreq: requested frequency %u Hz\n", target_freq * 1000);
82
83 freqs.cpu = cpu;
84 freqs.old = loongson2_cpufreq_get(cpu);
85 freqs.new = freq;
86 freqs.flags = 0;
87
88 if (freqs.new == freqs.old)
89 return 0;
90
91 /* notifiers */
92 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
93
94 set_cpus_allowed(current, cpus_allowed);
95
96 /* setting the cpu frequency */
97 clk_set_rate(cpuclk, freq);
98
99 /* notifiers */
100 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
101
102 pr_debug("cpufreq: set frequency %u kHz\n", freq);
103
104 return 0;
105}
106
107static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
108{
109 int i;
110
111 if (!cpu_online(policy->cpu))
112 return -ENODEV;
113
114 cpuclk = clk_get(NULL, "cpu_clk");
115 if (IS_ERR(cpuclk)) {
116 printk(KERN_ERR "cpufreq: couldn't get CPU clk\n");
117 return PTR_ERR(cpuclk);
118 }
119
120 cpuclk->rate = cpu_clock_freq / 1000;
121 if (!cpuclk->rate)
122 return -EINVAL;
123
124 /* clock table init */
125 for (i = 2;
126 (loongson2_clockmod_table[i].frequency != CPUFREQ_TABLE_END);
127 i++)
128 loongson2_clockmod_table[i].frequency = (cpuclk->rate * i) / 8;
129
130 policy->cur = loongson2_cpufreq_get(policy->cpu);
131
132 cpufreq_frequency_table_get_attr(&loongson2_clockmod_table[0],
133 policy->cpu);
134
135 return cpufreq_frequency_table_cpuinfo(policy,
136 &loongson2_clockmod_table[0]);
137}
138
139static int loongson2_cpufreq_verify(struct cpufreq_policy *policy)
140{
141 return cpufreq_frequency_table_verify(policy,
142 &loongson2_clockmod_table[0]);
143}
144
145static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
146{
147 clk_put(cpuclk);
148 return 0;
149}
150
151static struct freq_attr *loongson2_table_attr[] = {
152 &cpufreq_freq_attr_scaling_available_freqs,
153 NULL,
154};
155
156static struct cpufreq_driver loongson2_cpufreq_driver = {
157 .owner = THIS_MODULE,
158 .name = "loongson2",
159 .init = loongson2_cpufreq_cpu_init,
160 .verify = loongson2_cpufreq_verify,
161 .target = loongson2_cpufreq_target,
162 .get = loongson2_cpufreq_get,
163 .exit = loongson2_cpufreq_exit,
164 .attr = loongson2_table_attr,
165};
166
167static struct platform_device_id platform_device_ids[] = {
168 {
169 .name = "loongson2_cpufreq",
170 },
171 {}
172};
173
174MODULE_DEVICE_TABLE(platform, platform_device_ids);
175
176static struct platform_driver platform_driver = {
177 .driver = {
178 .name = "loongson2_cpufreq",
179 .owner = THIS_MODULE,
180 },
181 .id_table = platform_device_ids,
182};
183
184static int __init cpufreq_init(void)
185{
186 int ret;
187
188 /* Register platform stuff */
189 ret = platform_driver_register(&platform_driver);
190 if (ret)
191 return ret;
192
193 pr_info("cpufreq: Loongson-2F CPU frequency driver.\n");
194
195 cpufreq_register_notifier(&loongson2_cpufreq_notifier_block,
196 CPUFREQ_TRANSITION_NOTIFIER);
197
198 ret = cpufreq_register_driver(&loongson2_cpufreq_driver);
199
200 if (!ret && !nowait) {
201 saved_cpu_wait = cpu_wait;
202 cpu_wait = loongson2_cpu_wait;
203 }
204
205 return ret;
206}
207
208static void __exit cpufreq_exit(void)
209{
210 if (!nowait && saved_cpu_wait)
211 cpu_wait = saved_cpu_wait;
212 cpufreq_unregister_driver(&loongson2_cpufreq_driver);
213 cpufreq_unregister_notifier(&loongson2_cpufreq_notifier_block,
214 CPUFREQ_TRANSITION_NOTIFIER);
215
216 platform_driver_unregister(&platform_driver);
217}
218
219module_init(cpufreq_init);
220module_exit(cpufreq_exit);
221
222module_param(nowait, uint, 0644);
223MODULE_PARM_DESC(nowait, "Disable Loongson-2F specific wait");
224
225MODULE_AUTHOR("Yanhua <yanh@lemote.com>");
226MODULE_DESCRIPTION("cpufreq driver for Loongson2F");
227MODULE_LICENSE("GPL");
diff --git a/arch/mips/kernel/csrc-powertv.c b/arch/mips/kernel/csrc-powertv.c
new file mode 100644
index 000000000000..a27c16c8690e
--- /dev/null
+++ b/arch/mips/kernel/csrc-powertv.c
@@ -0,0 +1,180 @@
1/*
2 * Copyright (C) 2008 Scientific-Atlanta, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (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 */
18/*
19 * The file comes from kernel/csrc-r4k.c
20 */
21#include <linux/clocksource.h>
22#include <linux/init.h>
23
24#include <asm/time.h> /* Not included in linux/time.h */
25
26#include <asm/mach-powertv/asic_regs.h>
27#include "powertv-clock.h"
28
29/* MIPS PLL Register Definitions */
30#define PLL_GET_M(x) (((x) >> 8) & 0x000000FF)
31#define PLL_GET_N(x) (((x) >> 16) & 0x000000FF)
32#define PLL_GET_P(x) (((x) >> 24) & 0x00000007)
33
34/*
35 * returns: Clock frequency in kHz
36 */
37unsigned int __init mips_get_pll_freq(void)
38{
39 unsigned int pll_reg, m, n, p;
40 unsigned int fin = 54000; /* Base frequency in kHz */
41 unsigned int fout;
42
43 /* Read PLL register setting */
44 pll_reg = asic_read(mips_pll_setup);
45 m = PLL_GET_M(pll_reg);
46 n = PLL_GET_N(pll_reg);
47 p = PLL_GET_P(pll_reg);
48 pr_info("MIPS PLL Register:0x%x M=%d N=%d P=%d\n", pll_reg, m, n, p);
49
50 /* Calculate clock frequency = (2 * N * 54MHz) / (M * (2**P)) */
51 fout = ((2 * n * fin) / (m * (0x01 << p)));
52
53 pr_info("MIPS Clock Freq=%d kHz\n", fout);
54
55 return fout;
56}
57
58static cycle_t c0_hpt_read(struct clocksource *cs)
59{
60 return read_c0_count();
61}
62
63static struct clocksource clocksource_mips = {
64 .name = "powertv-counter",
65 .read = c0_hpt_read,
66 .mask = CLOCKSOURCE_MASK(32),
67 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
68};
69
70static void __init powertv_c0_hpt_clocksource_init(void)
71{
72 unsigned int pll_freq = mips_get_pll_freq();
73
74 pr_info("CPU frequency %d.%02d MHz\n", pll_freq / 1000,
75 (pll_freq % 1000) * 100 / 1000);
76
77 mips_hpt_frequency = pll_freq / 2 * 1000;
78
79 clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
80
81 clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
82
83 clocksource_register(&clocksource_mips);
84}
85
86/**
87 * struct tim_c - free running counter
88 * @hi: High 16 bits of the counter
89 * @lo: Low 32 bits of the counter
90 *
91 * Lays out the structure of the free running counter in memory. This counter
92 * increments at a rate of 27 MHz/8 on all platforms.
93 */
94struct tim_c {
95 unsigned int hi;
96 unsigned int lo;
97};
98
99static struct tim_c *tim_c;
100
101static cycle_t tim_c_read(struct clocksource *cs)
102{
103 unsigned int hi;
104 unsigned int next_hi;
105 unsigned int lo;
106
107 hi = readl(&tim_c->hi);
108
109 for (;;) {
110 lo = readl(&tim_c->lo);
111 next_hi = readl(&tim_c->hi);
112 if (next_hi == hi)
113 break;
114 hi = next_hi;
115 }
116
117pr_crit("%s: read %llx\n", __func__, ((u64) hi << 32) | lo);
118 return ((u64) hi << 32) | lo;
119}
120
121#define TIM_C_SIZE 48 /* # bits in the timer */
122
123static struct clocksource clocksource_tim_c = {
124 .name = "powertv-tim_c",
125 .read = tim_c_read,
126 .mask = CLOCKSOURCE_MASK(TIM_C_SIZE),
127 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
128};
129
130/**
131 * powertv_tim_c_clocksource_init - set up a clock source for the TIM_C clock
132 *
133 * The hard part here is coming up with a constant k and shift s such that
134 * the 48-bit TIM_C value multiplied by k doesn't overflow and that value,
135 * when shifted right by s, yields the corresponding number of nanoseconds.
136 * We know that TIM_C counts at 27 MHz/8, so each cycle corresponds to
137 * 1 / (27,000,000/8) seconds. Multiply that by a billion and you get the
138 * number of nanoseconds. Since the TIM_C value has 48 bits and the math is
139 * done in 64 bits, avoiding an overflow means that k must be less than
140 * 64 - 48 = 16 bits.
141 */
142static void __init powertv_tim_c_clocksource_init(void)
143{
144 int prescale;
145 unsigned long dividend;
146 unsigned long k;
147 int s;
148 const int max_k_bits = (64 - 48) - 1;
149 const unsigned long billion = 1000000000;
150 const unsigned long counts_per_second = 27000000 / 8;
151
152 prescale = BITS_PER_LONG - ilog2(billion) - 1;
153 dividend = billion << prescale;
154 k = dividend / counts_per_second;
155 s = ilog2(k) - max_k_bits;
156
157 if (s < 0)
158 s = prescale;
159
160 else {
161 k >>= s;
162 s += prescale;
163 }
164
165 clocksource_tim_c.mult = k;
166 clocksource_tim_c.shift = s;
167 clocksource_tim_c.rating = 200;
168
169 clocksource_register(&clocksource_tim_c);
170 tim_c = (struct tim_c *) asic_reg_addr(tim_ch);
171}
172
173/**
174 powertv_clocksource_init - initialize all clocksources
175 */
176void __init powertv_clocksource_init(void)
177{
178 powertv_c0_hpt_clocksource_init();
179 powertv_tim_c_clocksource_init();
180}
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
new file mode 100644
index 000000000000..68b067040d8b
--- /dev/null
+++ b/arch/mips/kernel/ftrace.c
@@ -0,0 +1,275 @@
1/*
2 * Code for replacing ftrace calls with jumps.
3 *
4 * Copyright (C) 2007-2008 Steven Rostedt <srostedt@redhat.com>
5 * Copyright (C) 2009 DSLab, Lanzhou University, China
6 * Author: Wu Zhangjin <wuzj@lemote.com>
7 *
8 * Thanks goes to Steven Rostedt for writing the original x86 version.
9 */
10
11#include <linux/uaccess.h>
12#include <linux/init.h>
13#include <linux/ftrace.h>
14
15#include <asm/cacheflush.h>
16#include <asm/asm.h>
17#include <asm/asm-offsets.h>
18
19#ifdef CONFIG_DYNAMIC_FTRACE
20
21#define JAL 0x0c000000 /* jump & link: ip --> ra, jump to target */
22#define ADDR_MASK 0x03ffffff /* op_code|addr : 31...26|25 ....0 */
23#define jump_insn_encode(op_code, addr) \
24 ((unsigned int)((op_code) | (((addr) >> 2) & ADDR_MASK)))
25
26static unsigned int ftrace_nop = 0x00000000;
27
28static int ftrace_modify_code(unsigned long ip, unsigned int new_code)
29{
30 int faulted;
31
32 /* *(unsigned int *)ip = new_code; */
33 safe_store_code(new_code, ip, faulted);
34
35 if (unlikely(faulted))
36 return -EFAULT;
37
38 flush_icache_range(ip, ip + 8);
39
40 return 0;
41}
42
43static int lui_v1;
44static int jal_mcount;
45
46int ftrace_make_nop(struct module *mod,
47 struct dyn_ftrace *rec, unsigned long addr)
48{
49 unsigned int new;
50 int faulted;
51 unsigned long ip = rec->ip;
52
53 /* We have compiled module with -mlong-calls, but compiled the kernel
54 * without it, we need to cope with them respectively. */
55 if (ip & 0x40000000) {
56 /* record it for ftrace_make_call */
57 if (lui_v1 == 0) {
58 /* lui_v1 = *(unsigned int *)ip; */
59 safe_load_code(lui_v1, ip, faulted);
60
61 if (unlikely(faulted))
62 return -EFAULT;
63 }
64
65 /* lui v1, hi_16bit_of_mcount --> b 1f (0x10000004)
66 * addiu v1, v1, low_16bit_of_mcount
67 * move at, ra
68 * jalr v1
69 * nop
70 * 1f: (ip + 12)
71 */
72 new = 0x10000004;
73 } else {
74 /* record/calculate it for ftrace_make_call */
75 if (jal_mcount == 0) {
76 /* We can record it directly like this:
77 * jal_mcount = *(unsigned int *)ip;
78 * Herein, jump over the first two nop instructions */
79 jal_mcount = jump_insn_encode(JAL, (MCOUNT_ADDR + 8));
80 }
81
82 /* move at, ra
83 * jalr v1 --> nop
84 */
85 new = ftrace_nop;
86 }
87 return ftrace_modify_code(ip, new);
88}
89
90static int modified; /* initialized as 0 by default */
91
92int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
93{
94 unsigned int new;
95 unsigned long ip = rec->ip;
96
97 /* We just need to remove the "b ftrace_stub" at the fist time! */
98 if (modified == 0) {
99 modified = 1;
100 ftrace_modify_code(addr, ftrace_nop);
101 }
102 /* ip, module: 0xc0000000, kernel: 0x80000000 */
103 new = (ip & 0x40000000) ? lui_v1 : jal_mcount;
104
105 return ftrace_modify_code(ip, new);
106}
107
108#define FTRACE_CALL_IP ((unsigned long)(&ftrace_call))
109
110int ftrace_update_ftrace_func(ftrace_func_t func)
111{
112 unsigned int new;
113
114 new = jump_insn_encode(JAL, (unsigned long)func);
115
116 return ftrace_modify_code(FTRACE_CALL_IP, new);
117}
118
119int __init ftrace_dyn_arch_init(void *data)
120{
121 /* The return code is retured via data */
122 *(unsigned long *)data = 0;
123
124 return 0;
125}
126#endif /* CONFIG_DYNAMIC_FTRACE */
127
128#ifdef CONFIG_FUNCTION_GRAPH_TRACER
129
130#ifdef CONFIG_DYNAMIC_FTRACE
131
132extern void ftrace_graph_call(void);
133#define JMP 0x08000000 /* jump to target directly */
134#define CALL_FTRACE_GRAPH_CALLER \
135 jump_insn_encode(JMP, (unsigned long)(&ftrace_graph_caller))
136#define FTRACE_GRAPH_CALL_IP ((unsigned long)(&ftrace_graph_call))
137
138int ftrace_enable_ftrace_graph_caller(void)
139{
140 return ftrace_modify_code(FTRACE_GRAPH_CALL_IP,
141 CALL_FTRACE_GRAPH_CALLER);
142}
143
144int ftrace_disable_ftrace_graph_caller(void)
145{
146 return ftrace_modify_code(FTRACE_GRAPH_CALL_IP, ftrace_nop);
147}
148
149#endif /* !CONFIG_DYNAMIC_FTRACE */
150
151#ifndef KBUILD_MCOUNT_RA_ADDRESS
152#define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */
153#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
154#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
155
156unsigned long ftrace_get_parent_addr(unsigned long self_addr,
157 unsigned long parent,
158 unsigned long parent_addr,
159 unsigned long fp)
160{
161 unsigned long sp, ip, ra;
162 unsigned int code;
163 int faulted;
164
165 /* in module or kernel? */
166 if (self_addr & 0x40000000) {
167 /* module: move to the instruction "lui v1, HI_16BIT_OF_MCOUNT" */
168 ip = self_addr - 20;
169 } else {
170 /* kernel: move to the instruction "move ra, at" */
171 ip = self_addr - 12;
172 }
173
174 /* search the text until finding the non-store instruction or "s{d,w}
175 * ra, offset(sp)" instruction */
176 do {
177 ip -= 4;
178
179 /* get the code at "ip": code = *(unsigned int *)ip; */
180 safe_load_code(code, ip, faulted);
181
182 if (unlikely(faulted))
183 return 0;
184
185 /* If we hit the non-store instruction before finding where the
186 * ra is stored, then this is a leaf function and it does not
187 * store the ra on the stack. */
188 if ((code & S_R_SP) != S_R_SP)
189 return parent_addr;
190
191 } while (((code & S_RA_SP) != S_RA_SP));
192
193 sp = fp + (code & OFFSET_MASK);
194
195 /* ra = *(unsigned long *)sp; */
196 safe_load_stack(ra, sp, faulted);
197 if (unlikely(faulted))
198 return 0;
199
200 if (ra == parent)
201 return sp;
202 return 0;
203}
204
205#endif
206
207/*
208 * Hook the return address and push it in the stack of return addrs
209 * in current thread info.
210 */
211void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
212 unsigned long fp)
213{
214 unsigned long old;
215 struct ftrace_graph_ent trace;
216 unsigned long return_hooker = (unsigned long)
217 &return_to_handler;
218 int faulted;
219
220 if (unlikely(atomic_read(&current->tracing_graph_pause)))
221 return;
222
223 /* "parent" is the stack address saved the return address of the caller
224 * of _mcount.
225 *
226 * if the gcc < 4.5, a leaf function does not save the return address
227 * in the stack address, so, we "emulate" one in _mcount's stack space,
228 * and hijack it directly, but for a non-leaf function, it save the
229 * return address to the its own stack space, we can not hijack it
230 * directly, but need to find the real stack address,
231 * ftrace_get_parent_addr() does it!
232 *
233 * if gcc>= 4.5, with the new -mmcount-ra-address option, for a
234 * non-leaf function, the location of the return address will be saved
235 * to $12 for us, and for a leaf function, only put a zero into $12. we
236 * do it in ftrace_graph_caller of mcount.S.
237 */
238
239 /* old = *parent; */
240 safe_load_stack(old, parent, faulted);
241 if (unlikely(faulted))
242 goto out;
243#ifndef KBUILD_MCOUNT_RA_ADDRESS
244 parent = (unsigned long *)ftrace_get_parent_addr(self_addr, old,
245 (unsigned long)parent,
246 fp);
247 /* If fails when getting the stack address of the non-leaf function's
248 * ra, stop function graph tracer and return */
249 if (parent == 0)
250 goto out;
251#endif
252 /* *parent = return_hooker; */
253 safe_store_stack(return_hooker, parent, faulted);
254 if (unlikely(faulted))
255 goto out;
256
257 if (ftrace_push_return_trace(old, self_addr, &trace.depth, fp) ==
258 -EBUSY) {
259 *parent = old;
260 return;
261 }
262
263 trace.func = self_addr;
264
265 /* Only trace if the calling function expects to */
266 if (!ftrace_graph_entry(&trace)) {
267 current->curr_ret_stack--;
268 *parent = old;
269 }
270 return;
271out:
272 ftrace_graph_stop();
273 WARN_ON(1);
274}
275#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 7b845ba9dff4..981f86c26168 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -22,6 +22,7 @@
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/kallsyms.h> 23#include <linux/kallsyms.h>
24#include <linux/kgdb.h> 24#include <linux/kgdb.h>
25#include <linux/ftrace.h>
25 26
26#include <asm/atomic.h> 27#include <asm/atomic.h>
27#include <asm/system.h> 28#include <asm/system.h>
@@ -99,7 +100,7 @@ int show_interrupts(struct seq_file *p, void *v)
99 } 100 }
100 101
101 if (i < NR_IRQS) { 102 if (i < NR_IRQS) {
102 spin_lock_irqsave(&irq_desc[i].lock, flags); 103 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
103 action = irq_desc[i].action; 104 action = irq_desc[i].action;
104 if (!action) 105 if (!action)
105 goto skip; 106 goto skip;
@@ -118,7 +119,7 @@ int show_interrupts(struct seq_file *p, void *v)
118 119
119 seq_putc(p, '\n'); 120 seq_putc(p, '\n');
120skip: 121skip:
121 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 122 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
122 } else if (i == NR_IRQS) { 123 } else if (i == NR_IRQS) {
123 seq_putc(p, '\n'); 124 seq_putc(p, '\n');
124 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); 125 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
@@ -150,3 +151,32 @@ void __init init_IRQ(void)
150 kgdb_early_setup = 1; 151 kgdb_early_setup = 1;
151#endif 152#endif
152} 153}
154
155/*
156 * do_IRQ handles all normal device IRQ's (the special
157 * SMP cross-CPU interrupts have their own specific
158 * handlers).
159 */
160void __irq_entry do_IRQ(unsigned int irq)
161{
162 irq_enter();
163 __DO_IRQ_SMTC_HOOK(irq);
164 generic_handle_irq(irq);
165 irq_exit();
166}
167
168#ifdef CONFIG_MIPS_MT_SMTC_IRQAFF
169/*
170 * To avoid inefficient and in some cases pathological re-checking of
171 * IRQ affinity, we have this variant that skips the affinity check.
172 */
173
174void __irq_entry do_IRQ_no_affinity(unsigned int irq)
175{
176 irq_enter();
177 __NO_AFFINITY_IRQ_SMTC_HOOK(irq);
178 generic_handle_irq(irq);
179 irq_exit();
180}
181
182#endif /* CONFIG_MIPS_MT_SMTC_IRQAFF */
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index ad4e017ed2f3..80e2ba694bab 100644
--- a/arch/mips/kernel/kspd.c
+++ b/arch/mips/kernel/kspd.c
@@ -82,6 +82,7 @@ static int sp_stopping;
82#define MTSP_O_SHLOCK 0x0010 82#define MTSP_O_SHLOCK 0x0010
83#define MTSP_O_EXLOCK 0x0020 83#define MTSP_O_EXLOCK 0x0020
84#define MTSP_O_ASYNC 0x0040 84#define MTSP_O_ASYNC 0x0040
85/* XXX: check which of these is actually O_SYNC vs O_DSYNC */
85#define MTSP_O_FSYNC O_SYNC 86#define MTSP_O_FSYNC O_SYNC
86#define MTSP_O_NOFOLLOW 0x0100 87#define MTSP_O_NOFOLLOW 0x0100
87#define MTSP_O_SYNC 0x0080 88#define MTSP_O_SYNC 0x0080
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 1a2793efdc4e..f042563c924f 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -67,28 +67,13 @@ SYSCALL_DEFINE6(32_mmap2, unsigned long, addr, unsigned long, len,
67 unsigned long, prot, unsigned long, flags, unsigned long, fd, 67 unsigned long, prot, unsigned long, flags, unsigned long, fd,
68 unsigned long, pgoff) 68 unsigned long, pgoff)
69{ 69{
70 struct file * file = NULL;
71 unsigned long error; 70 unsigned long error;
72 71
73 error = -EINVAL; 72 error = -EINVAL;
74 if (pgoff & (~PAGE_MASK >> 12)) 73 if (pgoff & (~PAGE_MASK >> 12))
75 goto out; 74 goto out;
76 pgoff >>= PAGE_SHIFT-12; 75 error = sys_mmap_pgoff(addr, len, prot, flags, fd,
77 76 pgoff >> (PAGE_SHIFT-12));
78 if (!(flags & MAP_ANONYMOUS)) {
79 error = -EBADF;
80 file = fget(fd);
81 if (!file)
82 goto out;
83 }
84 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
85
86 down_write(&current->mm->mmap_sem);
87 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
88 up_write(&current->mm->mmap_sem);
89 if (file)
90 fput(file);
91
92out: 77out:
93 return error; 78 return error;
94} 79}
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
new file mode 100644
index 000000000000..0a9cfdb271dd
--- /dev/null
+++ b/arch/mips/kernel/mcount.S
@@ -0,0 +1,189 @@
1/*
2 * MIPS specific _mcount support
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive for
6 * more details.
7 *
8 * Copyright (C) 2009 Lemote Inc. & DSLab, Lanzhou University, China
9 * Author: Wu Zhangjin <wuzj@lemote.com>
10 */
11
12#include <asm/regdef.h>
13#include <asm/stackframe.h>
14#include <asm/ftrace.h>
15
16 .text
17 .set noreorder
18 .set noat
19
20 .macro MCOUNT_SAVE_REGS
21 PTR_SUBU sp, PT_SIZE
22 PTR_S ra, PT_R31(sp)
23 PTR_S AT, PT_R1(sp)
24 PTR_S a0, PT_R4(sp)
25 PTR_S a1, PT_R5(sp)
26 PTR_S a2, PT_R6(sp)
27 PTR_S a3, PT_R7(sp)
28#ifdef CONFIG_64BIT
29 PTR_S a4, PT_R8(sp)
30 PTR_S a5, PT_R9(sp)
31 PTR_S a6, PT_R10(sp)
32 PTR_S a7, PT_R11(sp)
33#endif
34 .endm
35
36 .macro MCOUNT_RESTORE_REGS
37 PTR_L ra, PT_R31(sp)
38 PTR_L AT, PT_R1(sp)
39 PTR_L a0, PT_R4(sp)
40 PTR_L a1, PT_R5(sp)
41 PTR_L a2, PT_R6(sp)
42 PTR_L a3, PT_R7(sp)
43#ifdef CONFIG_64BIT
44 PTR_L a4, PT_R8(sp)
45 PTR_L a5, PT_R9(sp)
46 PTR_L a6, PT_R10(sp)
47 PTR_L a7, PT_R11(sp)
48#endif
49#ifdef CONFIG_64BIT
50 PTR_ADDIU sp, PT_SIZE
51#else
52 PTR_ADDIU sp, (PT_SIZE + 8)
53#endif
54.endm
55
56 .macro RETURN_BACK
57 jr ra
58 move ra, AT
59 .endm
60
61#ifdef CONFIG_DYNAMIC_FTRACE
62
63NESTED(ftrace_caller, PT_SIZE, ra)
64 .globl _mcount
65_mcount:
66 b ftrace_stub
67 nop
68 lw t1, function_trace_stop
69 bnez t1, ftrace_stub
70 nop
71
72 MCOUNT_SAVE_REGS
73#ifdef KBUILD_MCOUNT_RA_ADDRESS
74 PTR_S t0, PT_R12(sp) /* t0 saved the location of the return address(at) by -mmcount-ra-address */
75#endif
76
77 move a0, ra /* arg1: next ip, selfaddr */
78 .globl ftrace_call
79ftrace_call:
80 nop /* a placeholder for the call to a real tracing function */
81 move a1, AT /* arg2: the caller's next ip, parent */
82
83#ifdef CONFIG_FUNCTION_GRAPH_TRACER
84 .globl ftrace_graph_call
85ftrace_graph_call:
86 nop
87 nop
88#endif
89
90 MCOUNT_RESTORE_REGS
91 .globl ftrace_stub
92ftrace_stub:
93 RETURN_BACK
94 END(ftrace_caller)
95
96#else /* ! CONFIG_DYNAMIC_FTRACE */
97
98NESTED(_mcount, PT_SIZE, ra)
99 lw t1, function_trace_stop
100 bnez t1, ftrace_stub
101 nop
102 PTR_LA t1, ftrace_stub
103 PTR_L t2, ftrace_trace_function /* Prepare t2 for (1) */
104 bne t1, t2, static_trace
105 nop
106
107#ifdef CONFIG_FUNCTION_GRAPH_TRACER
108 PTR_L t3, ftrace_graph_return
109 bne t1, t3, ftrace_graph_caller
110 nop
111 PTR_LA t1, ftrace_graph_entry_stub
112 PTR_L t3, ftrace_graph_entry
113 bne t1, t3, ftrace_graph_caller
114 nop
115#endif
116 b ftrace_stub
117 nop
118
119static_trace:
120 MCOUNT_SAVE_REGS
121
122 move a0, ra /* arg1: next ip, selfaddr */
123 jalr t2 /* (1) call *ftrace_trace_function */
124 move a1, AT /* arg2: the caller's next ip, parent */
125
126 MCOUNT_RESTORE_REGS
127 .globl ftrace_stub
128ftrace_stub:
129 RETURN_BACK
130 END(_mcount)
131
132#endif /* ! CONFIG_DYNAMIC_FTRACE */
133
134#ifdef CONFIG_FUNCTION_GRAPH_TRACER
135
136NESTED(ftrace_graph_caller, PT_SIZE, ra)
137#ifdef CONFIG_DYNAMIC_FTRACE
138 PTR_L a1, PT_R31(sp) /* load the original ra from the stack */
139#ifdef KBUILD_MCOUNT_RA_ADDRESS
140 PTR_L t0, PT_R12(sp) /* load the original t0 from the stack */
141#endif
142#else
143 MCOUNT_SAVE_REGS
144 move a1, ra /* arg2: next ip, selfaddr */
145#endif
146
147#ifdef KBUILD_MCOUNT_RA_ADDRESS
148 bnez t0, 1f /* non-leaf func: t0 saved the location of the return address */
149 nop
150 PTR_LA t0, PT_R1(sp) /* leaf func: get the location of at(old ra) from our own stack */
1511: move a0, t0 /* arg1: the location of the return address */
152#else
153 PTR_LA a0, PT_R1(sp) /* arg1: &AT -> a0 */
154#endif
155 jal prepare_ftrace_return
156#ifdef CONFIG_FRAME_POINTER
157 move a2, fp /* arg3: frame pointer */
158#else
159#ifdef CONFIG_64BIT
160 PTR_LA a2, PT_SIZE(sp)
161#else
162 PTR_LA a2, (PT_SIZE+8)(sp)
163#endif
164#endif
165
166 MCOUNT_RESTORE_REGS
167 RETURN_BACK
168 END(ftrace_graph_caller)
169
170 .align 2
171 .globl return_to_handler
172return_to_handler:
173 PTR_SUBU sp, PT_SIZE
174 PTR_S v0, PT_R2(sp)
175
176 jal ftrace_return_to_handler
177 PTR_S v1, PT_R3(sp)
178
179 /* restore the real parent address: v0 -> ra */
180 move ra, v0
181
182 PTR_L v0, PT_R2(sp)
183 PTR_L v1, PT_R3(sp)
184 jr ra
185 PTR_ADDIU sp, PT_SIZE
186#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
187
188 .set at
189 .set reorder
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
index 225755d0c1f6..1d04807874db 100644
--- a/arch/mips/kernel/mips_ksyms.c
+++ b/arch/mips/kernel/mips_ksyms.c
@@ -13,6 +13,7 @@
13#include <asm/checksum.h> 13#include <asm/checksum.h>
14#include <asm/pgtable.h> 14#include <asm/pgtable.h>
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include <asm/ftrace.h>
16 17
17extern void *__bzero(void *__s, size_t __count); 18extern void *__bzero(void *__s, size_t __count);
18extern long __strncpy_from_user_nocheck_asm(char *__to, 19extern long __strncpy_from_user_nocheck_asm(char *__to,
@@ -51,3 +52,7 @@ EXPORT_SYMBOL(csum_partial_copy_nocheck);
51EXPORT_SYMBOL(__csum_partial_copy_user); 52EXPORT_SYMBOL(__csum_partial_copy_user);
52 53
53EXPORT_SYMBOL(invalid_pte_table); 54EXPORT_SYMBOL(invalid_pte_table);
55#ifdef CONFIG_FUNCTION_TRACER
56/* _mcount is defined in arch/mips/kernel/mcount.S */
57EXPORT_SYMBOL(_mcount);
58#endif
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 2b290d70083e..f9513f9e61d3 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -58,8 +58,12 @@ EXPORT_SYMBOL(mips_machtype);
58 58
59struct boot_mem_map boot_mem_map; 59struct boot_mem_map boot_mem_map;
60 60
61static char command_line[CL_SIZE]; 61static char __initdata command_line[COMMAND_LINE_SIZE];
62 char arcs_cmdline[CL_SIZE]=CONFIG_CMDLINE; 62char __initdata arcs_cmdline[COMMAND_LINE_SIZE];
63
64#ifdef CONFIG_CMDLINE_BOOL
65static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
66#endif
63 67
64/* 68/*
65 * mips_io_port_base is the begin of the address space to which x86 style 69 * mips_io_port_base is the begin of the address space to which x86 style
@@ -166,26 +170,8 @@ static unsigned long __init init_initrd(void)
166 * already set up initrd_start and initrd_end. In these cases 170 * already set up initrd_start and initrd_end. In these cases
167 * perfom sanity checks and use them if all looks good. 171 * perfom sanity checks and use them if all looks good.
168 */ 172 */
169 if (!initrd_start || initrd_end <= initrd_start) { 173 if (!initrd_start || initrd_end <= initrd_start)
170#ifdef CONFIG_PROBE_INITRD_HEADER
171 u32 *initrd_header;
172
173 /*
174 * See if initrd has been added to the kernel image by
175 * arch/mips/boot/addinitrd.c. In that case a header is
176 * prepended to initrd and is made up by 8 bytes. The first
177 * word is a magic number and the second one is the size of
178 * initrd. Initrd start must be page aligned in any cases.
179 */
180 initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
181 if (initrd_header[0] != 0x494E5244)
182 goto disable;
183 initrd_start = (unsigned long)(initrd_header + 2);
184 initrd_end = initrd_start + initrd_header[1];
185#else
186 goto disable; 174 goto disable;
187#endif
188 }
189 175
190 if (initrd_start & ~PAGE_MASK) { 176 if (initrd_start & ~PAGE_MASK) {
191 pr_err("initrd start must be page aligned\n"); 177 pr_err("initrd start must be page aligned\n");
@@ -476,8 +462,20 @@ static void __init arch_mem_init(char **cmdline_p)
476 pr_info("Determined physical RAM map:\n"); 462 pr_info("Determined physical RAM map:\n");
477 print_memory_map(); 463 print_memory_map();
478 464
479 strlcpy(command_line, arcs_cmdline, sizeof(command_line)); 465#ifdef CONFIG_CMDLINE_BOOL
480 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 466#ifdef CONFIG_CMDLINE_OVERRIDE
467 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
468#else
469 if (builtin_cmdline[0]) {
470 strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
471 strlcat(arcs_cmdline, builtin_cmdline, COMMAND_LINE_SIZE);
472 }
473 strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
474#endif
475#else
476 strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
477#endif
478 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
481 479
482 *cmdline_p = command_line; 480 *cmdline_p = command_line;
483 481
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 6254041b942f..d0c68b5d717b 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -35,6 +35,15 @@
35 35
36#include "signal-common.h" 36#include "signal-common.h"
37 37
38static int (*save_fp_context)(struct sigcontext __user *sc);
39static int (*restore_fp_context)(struct sigcontext __user *sc);
40
41extern asmlinkage int _save_fp_context(struct sigcontext __user *sc);
42extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc);
43
44extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc);
45extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc);
46
38/* 47/*
39 * Horribly complicated - with the bloody RM9000 workarounds enabled 48 * Horribly complicated - with the bloody RM9000 workarounds enabled
40 * the signal trampolines is moving to the end of the structure so we can 49 * the signal trampolines is moving to the end of the structure so we can
@@ -709,3 +718,40 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
709 key_replace_session_keyring(); 718 key_replace_session_keyring();
710 } 719 }
711} 720}
721
722#ifdef CONFIG_SMP
723static int smp_save_fp_context(struct sigcontext __user *sc)
724{
725 return raw_cpu_has_fpu
726 ? _save_fp_context(sc)
727 : fpu_emulator_save_context(sc);
728}
729
730static int smp_restore_fp_context(struct sigcontext __user *sc)
731{
732 return raw_cpu_has_fpu
733 ? _restore_fp_context(sc)
734 : fpu_emulator_restore_context(sc);
735}
736#endif
737
738static int signal_setup(void)
739{
740#ifdef CONFIG_SMP
741 /* For now just do the cpu_has_fpu check when the functions are invoked */
742 save_fp_context = smp_save_fp_context;
743 restore_fp_context = smp_restore_fp_context;
744#else
745 if (cpu_has_fpu) {
746 save_fp_context = _save_fp_context;
747 restore_fp_context = _restore_fp_context;
748 } else {
749 save_fp_context = fpu_emulator_save_context;
750 restore_fp_context = fpu_emulator_restore_context;
751 }
752#endif
753
754 return 0;
755}
756
757arch_initcall(signal_setup);
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 2e74075ac0ca..03abaf048f09 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -35,6 +35,15 @@
35 35
36#include "signal-common.h" 36#include "signal-common.h"
37 37
38static int (*save_fp_context32)(struct sigcontext32 __user *sc);
39static int (*restore_fp_context32)(struct sigcontext32 __user *sc);
40
41extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc);
42extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc);
43
44extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 __user *sc);
45extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user *sc);
46
38/* 47/*
39 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... 48 * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
40 */ 49 */
@@ -828,3 +837,18 @@ SYSCALL_DEFINE5(32_waitid, int, which, compat_pid_t, pid,
828 info.si_code |= __SI_CHLD; 837 info.si_code |= __SI_CHLD;
829 return copy_siginfo_to_user32(uinfo, &info); 838 return copy_siginfo_to_user32(uinfo, &info);
830} 839}
840
841static int signal32_init(void)
842{
843 if (cpu_has_fpu) {
844 save_fp_context32 = _save_fp_context32;
845 restore_fp_context32 = _restore_fp_context32;
846 } else {
847 save_fp_context32 = fpu_emulator_save_context32;
848 restore_fp_context32 = fpu_emulator_restore_context32;
849 }
850
851 return 0;
852}
853
854arch_initcall(signal32_init);
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index e72e6844d134..6cdca1956b77 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -32,6 +32,7 @@
32#include <linux/cpumask.h> 32#include <linux/cpumask.h>
33#include <linux/cpu.h> 33#include <linux/cpu.h>
34#include <linux/err.h> 34#include <linux/err.h>
35#include <linux/ftrace.h>
35 36
36#include <asm/atomic.h> 37#include <asm/atomic.h>
37#include <asm/cpu.h> 38#include <asm/cpu.h>
@@ -130,7 +131,7 @@ asmlinkage __cpuinit void start_secondary(void)
130/* 131/*
131 * Call into both interrupt handlers, as we share the IPI for them 132 * Call into both interrupt handlers, as we share the IPI for them
132 */ 133 */
133void smp_call_function_interrupt(void) 134void __irq_entry smp_call_function_interrupt(void)
134{ 135{
135 irq_enter(); 136 irq_enter();
136 generic_smp_call_function_single_interrupt(); 137 generic_smp_call_function_single_interrupt();
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 24630fd8ef60..23499b5bd9c3 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -25,6 +25,7 @@
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/kernel_stat.h> 26#include <linux/kernel_stat.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/ftrace.h>
28 29
29#include <asm/cpu.h> 30#include <asm/cpu.h>
30#include <asm/processor.h> 31#include <asm/processor.h>
@@ -939,23 +940,29 @@ static void ipi_call_interrupt(void)
939 940
940DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); 941DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device);
941 942
942void ipi_decode(struct smtc_ipi *pipi) 943static void __irq_entry smtc_clock_tick_interrupt(void)
943{ 944{
944 unsigned int cpu = smp_processor_id(); 945 unsigned int cpu = smp_processor_id();
945 struct clock_event_device *cd; 946 struct clock_event_device *cd;
947 int irq = MIPS_CPU_IRQ_BASE + 1;
948
949 irq_enter();
950 kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
951 cd = &per_cpu(mips_clockevent_device, cpu);
952 cd->event_handler(cd);
953 irq_exit();
954}
955
956void ipi_decode(struct smtc_ipi *pipi)
957{
946 void *arg_copy = pipi->arg; 958 void *arg_copy = pipi->arg;
947 int type_copy = pipi->type; 959 int type_copy = pipi->type;
948 int irq = MIPS_CPU_IRQ_BASE + 1;
949 960
950 smtc_ipi_nq(&freeIPIq, pipi); 961 smtc_ipi_nq(&freeIPIq, pipi);
951 962
952 switch (type_copy) { 963 switch (type_copy) {
953 case SMTC_CLOCK_TICK: 964 case SMTC_CLOCK_TICK:
954 irq_enter(); 965 smtc_clock_tick_interrupt();
955 kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
956 cd = &per_cpu(mips_clockevent_device, cpu);
957 cd->event_handler(cd);
958 irq_exit();
959 break; 966 break;
960 967
961 case LINUX_SMP_IPI: 968 case LINUX_SMP_IPI:
@@ -1331,7 +1338,7 @@ void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu)
1331 if (!((asid += ASID_INC) & ASID_MASK) ) { 1338 if (!((asid += ASID_INC) & ASID_MASK) ) {
1332 if (cpu_has_vtag_icache) 1339 if (cpu_has_vtag_icache)
1333 flush_icache_all(); 1340 flush_icache_all();
1334 /* Traverse all online CPUs (hack requires contigous range) */ 1341 /* Traverse all online CPUs (hack requires contiguous range) */
1335 for_each_online_cpu(i) { 1342 for_each_online_cpu(i) {
1336 /* 1343 /*
1337 * We don't need to worry about our own CPU, nor those of 1344 * We don't need to worry about our own CPU, nor those of
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index fe0d79805603..3f7f466190b4 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -93,7 +93,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
93 * We do not accept a shared mapping if it would violate 93 * We do not accept a shared mapping if it would violate
94 * cache aliasing constraints. 94 * cache aliasing constraints.
95 */ 95 */
96 if ((flags & MAP_SHARED) && (addr & shm_align_mask)) 96 if ((flags & MAP_SHARED) &&
97 ((addr - (pgoff << PAGE_SHIFT)) & shm_align_mask))
97 return -EINVAL; 98 return -EINVAL;
98 return addr; 99 return addr;
99 } 100 }
@@ -129,31 +130,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
129 } 130 }
130} 131}
131 132
132/* common code for old and new mmaps */
133static inline unsigned long
134do_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
135 unsigned long flags, unsigned long fd, unsigned long pgoff)
136{
137 unsigned long error = -EBADF;
138 struct file * file = NULL;
139
140 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
141 if (!(flags & MAP_ANONYMOUS)) {
142 file = fget(fd);
143 if (!file)
144 goto out;
145 }
146
147 down_write(&current->mm->mmap_sem);
148 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
149 up_write(&current->mm->mmap_sem);
150
151 if (file)
152 fput(file);
153out:
154 return error;
155}
156
157SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len, 133SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len,
158 unsigned long, prot, unsigned long, flags, unsigned long, 134 unsigned long, prot, unsigned long, flags, unsigned long,
159 fd, off_t, offset) 135 fd, off_t, offset)
@@ -164,7 +140,7 @@ SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len,
164 if (offset & ~PAGE_MASK) 140 if (offset & ~PAGE_MASK)
165 goto out; 141 goto out;
166 142
167 result = do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 143 result = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
168 144
169out: 145out:
170 return result; 146 return result;
@@ -177,7 +153,7 @@ SYSCALL_DEFINE6(mips_mmap2, unsigned long, addr, unsigned long, len,
177 if (pgoff & (~PAGE_MASK >> 12)) 153 if (pgoff & (~PAGE_MASK >> 12))
178 return -EINVAL; 154 return -EINVAL;
179 155
180 return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT-12)); 156 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT-12));
181} 157}
182 158
183save_static_function(sys_fork); 159save_static_function(sys_fork);
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 1f467d534642..fb7497405510 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -71,39 +71,6 @@ EXPORT_SYMBOL(perf_irq);
71 71
72unsigned int mips_hpt_frequency; 72unsigned int mips_hpt_frequency;
73 73
74void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
75{
76 u64 temp;
77 u32 shift;
78
79 /* Find a shift value */
80 for (shift = 32; shift > 0; shift--) {
81 temp = (u64) NSEC_PER_SEC << shift;
82 do_div(temp, clock);
83 if ((temp >> 32) == 0)
84 break;
85 }
86 cs->shift = shift;
87 cs->mult = (u32) temp;
88}
89
90void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
91 unsigned int clock)
92{
93 u64 temp;
94 u32 shift;
95
96 /* Find a shift value */
97 for (shift = 32; shift > 0; shift--) {
98 temp = (u64) clock << shift;
99 do_div(temp, NSEC_PER_SEC);
100 if ((temp >> 32) == 0)
101 break;
102 }
103 cd->shift = shift;
104 cd->mult = (u32) temp;
105}
106
107/* 74/*
108 * This function exists in order to cause an error due to a duplicate 75 * This function exists in order to cause an error due to a duplicate
109 * definition if platform code should have its own implementation. The hook 76 * definition if platform code should have its own implementation. The hook
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 0a18b4c62afb..308e43460864 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -25,10 +25,12 @@
25#include <linux/ptrace.h> 25#include <linux/ptrace.h>
26#include <linux/kgdb.h> 26#include <linux/kgdb.h>
27#include <linux/kdebug.h> 27#include <linux/kdebug.h>
28#include <linux/notifier.h>
28 29
29#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
30#include <asm/branch.h> 31#include <asm/branch.h>
31#include <asm/break.h> 32#include <asm/break.h>
33#include <asm/cop2.h>
32#include <asm/cpu.h> 34#include <asm/cpu.h>
33#include <asm/dsp.h> 35#include <asm/dsp.h>
34#include <asm/fpu.h> 36#include <asm/fpu.h>
@@ -79,10 +81,6 @@ extern asmlinkage void handle_reserved(void);
79extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, 81extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
80 struct mips_fpu_struct *ctx, int has_fpu); 82 struct mips_fpu_struct *ctx, int has_fpu);
81 83
82#ifdef CONFIG_CPU_CAVIUM_OCTEON
83extern asmlinkage void octeon_cop2_restore(struct octeon_cop2_state *task);
84#endif
85
86void (*board_be_init)(void); 84void (*board_be_init)(void);
87int (*board_be_handler)(struct pt_regs *regs, int is_fixup); 85int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
88void (*board_nmi_handler_setup)(void); 86void (*board_nmi_handler_setup)(void);
@@ -857,6 +855,44 @@ static void mt_ase_fp_affinity(void)
857#endif /* CONFIG_MIPS_MT_FPAFF */ 855#endif /* CONFIG_MIPS_MT_FPAFF */
858} 856}
859 857
858/*
859 * No lock; only written during early bootup by CPU 0.
860 */
861static RAW_NOTIFIER_HEAD(cu2_chain);
862
863int __ref register_cu2_notifier(struct notifier_block *nb)
864{
865 return raw_notifier_chain_register(&cu2_chain, nb);
866}
867
868int cu2_notifier_call_chain(unsigned long val, void *v)
869{
870 return raw_notifier_call_chain(&cu2_chain, val, v);
871}
872
873static int default_cu2_call(struct notifier_block *nfb, unsigned long action,
874 void *data)
875{
876 struct pt_regs *regs = data;
877
878 switch (action) {
879 default:
880 die_if_kernel("Unhandled kernel unaligned access or invalid "
881 "instruction", regs);
882 /* Fall through */
883
884 case CU2_EXCEPTION:
885 force_sig(SIGILL, current);
886 }
887
888 return NOTIFY_OK;
889}
890
891static struct notifier_block default_cu2_notifier = {
892 .notifier_call = default_cu2_call,
893 .priority = 0x80000000, /* Run last */
894};
895
860asmlinkage void do_cpu(struct pt_regs *regs) 896asmlinkage void do_cpu(struct pt_regs *regs)
861{ 897{
862 unsigned int __user *epc; 898 unsigned int __user *epc;
@@ -920,17 +956,9 @@ asmlinkage void do_cpu(struct pt_regs *regs)
920 return; 956 return;
921 957
922 case 2: 958 case 2:
923#ifdef CONFIG_CPU_CAVIUM_OCTEON 959 raw_notifier_call_chain(&cu2_chain, CU2_EXCEPTION, regs);
924 prefetch(&current->thread.cp2); 960 break;
925 local_irq_save(flags); 961
926 KSTK_STATUS(current) |= ST0_CU2;
927 status = read_c0_status();
928 write_c0_status(status | ST0_CU2);
929 octeon_cop2_restore(&(current->thread.cp2));
930 write_c0_status(status & ~ST0_CU2);
931 local_irq_restore(flags);
932 return;
933#endif
934 case 3: 962 case 3:
935 break; 963 break;
936 } 964 }
@@ -1367,77 +1395,6 @@ void *set_vi_handler(int n, vi_handler_t addr)
1367 return set_vi_srs_handler(n, addr, 0); 1395 return set_vi_srs_handler(n, addr, 0);
1368} 1396}
1369 1397
1370/*
1371 * This is used by native signal handling
1372 */
1373asmlinkage int (*save_fp_context)(struct sigcontext __user *sc);
1374asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc);
1375
1376extern asmlinkage int _save_fp_context(struct sigcontext __user *sc);
1377extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc);
1378
1379extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc);
1380extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc);
1381
1382#ifdef CONFIG_SMP
1383static int smp_save_fp_context(struct sigcontext __user *sc)
1384{
1385 return raw_cpu_has_fpu
1386 ? _save_fp_context(sc)
1387 : fpu_emulator_save_context(sc);
1388}
1389
1390static int smp_restore_fp_context(struct sigcontext __user *sc)
1391{
1392 return raw_cpu_has_fpu
1393 ? _restore_fp_context(sc)
1394 : fpu_emulator_restore_context(sc);
1395}
1396#endif
1397
1398static inline void signal_init(void)
1399{
1400#ifdef CONFIG_SMP
1401 /* For now just do the cpu_has_fpu check when the functions are invoked */
1402 save_fp_context = smp_save_fp_context;
1403 restore_fp_context = smp_restore_fp_context;
1404#else
1405 if (cpu_has_fpu) {
1406 save_fp_context = _save_fp_context;
1407 restore_fp_context = _restore_fp_context;
1408 } else {
1409 save_fp_context = fpu_emulator_save_context;
1410 restore_fp_context = fpu_emulator_restore_context;
1411 }
1412#endif
1413}
1414
1415#ifdef CONFIG_MIPS32_COMPAT
1416
1417/*
1418 * This is used by 32-bit signal stuff on the 64-bit kernel
1419 */
1420asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc);
1421asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc);
1422
1423extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc);
1424extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc);
1425
1426extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 __user *sc);
1427extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user *sc);
1428
1429static inline void signal32_init(void)
1430{
1431 if (cpu_has_fpu) {
1432 save_fp_context32 = _save_fp_context32;
1433 restore_fp_context32 = _restore_fp_context32;
1434 } else {
1435 save_fp_context32 = fpu_emulator_save_context32;
1436 restore_fp_context32 = fpu_emulator_restore_context32;
1437 }
1438}
1439#endif
1440
1441extern void cpu_cache_init(void); 1398extern void cpu_cache_init(void);
1442extern void tlb_init(void); 1399extern void tlb_init(void);
1443extern void flush_tlb_handlers(void); 1400extern void flush_tlb_handlers(void);
@@ -1751,13 +1708,10 @@ void __init trap_init(void)
1751 else 1708 else
1752 memcpy((void *)(ebase + 0x080), &except_vec3_generic, 0x80); 1709 memcpy((void *)(ebase + 0x080), &except_vec3_generic, 0x80);
1753 1710
1754 signal_init();
1755#ifdef CONFIG_MIPS32_COMPAT
1756 signal32_init();
1757#endif
1758
1759 local_flush_icache_range(ebase, ebase + 0x400); 1711 local_flush_icache_range(ebase, ebase + 0x400);
1760 flush_tlb_handlers(); 1712 flush_tlb_handlers();
1761 1713
1762 sort_extable(__start___dbe_table, __stop___dbe_table); 1714 sort_extable(__start___dbe_table, __stop___dbe_table);
1715
1716 register_cu2_notifier(&default_cu2_notifier);
1763} 1717}
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 67bd626942ab..69b039ca8d83 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -81,6 +81,7 @@
81#include <asm/asm.h> 81#include <asm/asm.h>
82#include <asm/branch.h> 82#include <asm/branch.h>
83#include <asm/byteorder.h> 83#include <asm/byteorder.h>
84#include <asm/cop2.h>
84#include <asm/inst.h> 85#include <asm/inst.h>
85#include <asm/uaccess.h> 86#include <asm/uaccess.h>
86#include <asm/system.h> 87#include <asm/system.h>
@@ -451,17 +452,27 @@ static void emulate_load_store_insn(struct pt_regs *regs,
451 */ 452 */
452 goto sigbus; 453 goto sigbus;
453 454
455 /*
456 * COP2 is available to implementor for application specific use.
457 * It's up to applications to register a notifier chain and do
458 * whatever they have to do, including possible sending of signals.
459 */
454 case lwc2_op: 460 case lwc2_op:
461 cu2_notifier_call_chain(CU2_LWC2_OP, regs);
462 break;
463
455 case ldc2_op: 464 case ldc2_op:
465 cu2_notifier_call_chain(CU2_LDC2_OP, regs);
466 break;
467
456 case swc2_op: 468 case swc2_op:
469 cu2_notifier_call_chain(CU2_SWC2_OP, regs);
470 break;
471
457 case sdc2_op: 472 case sdc2_op:
458 /* 473 cu2_notifier_call_chain(CU2_SDC2_OP, regs);
459 * These are the coprocessor 2 load/stores. The current 474 break;
460 * implementations don't use cp2 and cp2 should always be 475
461 * disabled in c0_status. So send SIGILL.
462 * (No longer true: The Sony Praystation uses cp2 for
463 * 3D matrix operations. Dunno if that thingy has a MMU ...)
464 */
465 default: 476 default:
466 /* 477 /*
467 * Pheeee... We encountered an yet unknown instruction or 478 * Pheeee... We encountered an yet unknown instruction or
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 162b29954baa..f25df73db923 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -46,6 +46,7 @@ SECTIONS
46 SCHED_TEXT 46 SCHED_TEXT
47 LOCK_TEXT 47 LOCK_TEXT
48 KPROBES_TEXT 48 KPROBES_TEXT
49 IRQENTRY_TEXT
49 *(.text.*) 50 *(.text.*)
50 *(.fixup) 51 *(.fixup)
51 *(.gnu.warning) 52 *(.gnu.warning)
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c
index 0bb6037afba3..8e388da1926f 100644
--- a/arch/mips/lasat/picvue_proc.c
+++ b/arch/mips/lasat/picvue_proc.c
@@ -4,12 +4,14 @@
4 * Brian Murphy <brian.murphy@eicon.com> 4 * Brian Murphy <brian.murphy@eicon.com>
5 * 5 *
6 */ 6 */
7#include <linux/bug.h>
7#include <linux/kernel.h> 8#include <linux/kernel.h>
8#include <linux/module.h> 9#include <linux/module.h>
9#include <linux/init.h> 10#include <linux/init.h>
10#include <linux/errno.h> 11#include <linux/errno.h>
11 12
12#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
14#include <linux/seq_file.h>
13#include <linux/interrupt.h> 15#include <linux/interrupt.h>
14 16
15#include <linux/timer.h> 17#include <linux/timer.h>
@@ -38,12 +40,9 @@ static void pvc_display(unsigned long data)
38 40
39static DECLARE_TASKLET(pvc_display_tasklet, &pvc_display, 0); 41static DECLARE_TASKLET(pvc_display_tasklet, &pvc_display, 0);
40 42
41static int pvc_proc_read_line(char *page, char **start, 43static int pvc_line_proc_show(struct seq_file *m, void *v)
42 off_t off, int count,
43 int *eof, void *data)
44{ 44{
45 char *origpage = page; 45 int lineno = *(int *)m->private;
46 int lineno = *(int *)data;
47 46
48 if (lineno < 0 || lineno > PVC_NLINES) { 47 if (lineno < 0 || lineno > PVC_NLINES) {
49 printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno); 48 printk(KERN_WARNING "proc_read_line: invalid lineno %d\n", lineno);
@@ -51,45 +50,66 @@ static int pvc_proc_read_line(char *page, char **start,
51 } 50 }
52 51
53 mutex_lock(&pvc_mutex); 52 mutex_lock(&pvc_mutex);
54 page += sprintf(page, "%s\n", pvc_lines[lineno]); 53 seq_printf(m, "%s\n", pvc_lines[lineno]);
55 mutex_unlock(&pvc_mutex); 54 mutex_unlock(&pvc_mutex);
56 55
57 return page - origpage; 56 return 0;
58} 57}
59 58
60static int pvc_proc_write_line(struct file *file, const char *buffer, 59static int pvc_line_proc_open(struct inode *inode, struct file *file)
61 unsigned long count, void *data)
62{ 60{
63 int origcount = count; 61 return single_open(file, pvc_line_proc_show, PDE(inode)->data);
64 int lineno = *(int *)data; 62}
65 63
66 if (lineno < 0 || lineno > PVC_NLINES) { 64static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
67 printk(KERN_WARNING "proc_write_line: invalid lineno %d\n", 65 size_t count, loff_t *pos)
68 lineno); 66{
69 return origcount; 67 int lineno = *(int *)PDE(file->f_path.dentry->d_inode)->data;
70 } 68 char kbuf[PVC_LINELEN];
69 size_t len;
70
71 BUG_ON(lineno < 0 || lineno > PVC_NLINES);
71 72
72 if (count > PVC_LINELEN) 73 len = min(count, sizeof(kbuf) - 1);
73 count = PVC_LINELEN; 74 if (copy_from_user(kbuf, buf, len))
75 return -EFAULT;
76 kbuf[len] = '\0';
74 77
75 if (buffer[count-1] == '\n') 78 if (len > 0 && kbuf[len - 1] == '\n')
76 count--; 79 len--;
77 80
78 mutex_lock(&pvc_mutex); 81 mutex_lock(&pvc_mutex);
79 strncpy(pvc_lines[lineno], buffer, count); 82 strncpy(pvc_lines[lineno], kbuf, len);
80 pvc_lines[lineno][count] = '\0'; 83 pvc_lines[lineno][len] = '\0';
81 mutex_unlock(&pvc_mutex); 84 mutex_unlock(&pvc_mutex);
82 85
83 tasklet_schedule(&pvc_display_tasklet); 86 tasklet_schedule(&pvc_display_tasklet);
84 87
85 return origcount; 88 return count;
86} 89}
87 90
88static int pvc_proc_write_scroll(struct file *file, const char *buffer, 91static const struct file_operations pvc_line_proc_fops = {
89 unsigned long count, void *data) 92 .owner = THIS_MODULE,
93 .open = pvc_line_proc_open,
94 .read = seq_read,
95 .llseek = seq_lseek,
96 .release = single_release,
97 .write = pvc_line_proc_write,
98};
99
100static ssize_t pvc_scroll_proc_write(struct file *file, const char __user *buf,
101 size_t count, loff_t *pos)
90{ 102{
91 int origcount = count; 103 char kbuf[42];
92 int cmd = simple_strtol(buffer, NULL, 10); 104 size_t len;
105 int cmd;
106
107 len = min(count, sizeof(kbuf) - 1);
108 if (copy_from_user(kbuf, buf, len))
109 return -EFAULT;
110 kbuf[len] = '\0';
111
112 cmd = simple_strtol(kbuf, NULL, 10);
93 113
94 mutex_lock(&pvc_mutex); 114 mutex_lock(&pvc_mutex);
95 if (scroll_interval != 0) 115 if (scroll_interval != 0)
@@ -110,22 +130,31 @@ static int pvc_proc_write_scroll(struct file *file, const char *buffer,
110 } 130 }
111 mutex_unlock(&pvc_mutex); 131 mutex_unlock(&pvc_mutex);
112 132
113 return origcount; 133 return count;
114} 134}
115 135
116static int pvc_proc_read_scroll(char *page, char **start, 136static int pvc_scroll_proc_show(struct seq_file *m, void *v)
117 off_t off, int count,
118 int *eof, void *data)
119{ 137{
120 char *origpage = page;
121
122 mutex_lock(&pvc_mutex); 138 mutex_lock(&pvc_mutex);
123 page += sprintf(page, "%d\n", scroll_dir * scroll_interval); 139 seq_printf(m, "%d\n", scroll_dir * scroll_interval);
124 mutex_unlock(&pvc_mutex); 140 mutex_unlock(&pvc_mutex);
125 141
126 return page - origpage; 142 return 0;
127} 143}
128 144
145static int pvc_scroll_proc_open(struct inode *inode, struct file *file)
146{
147 return single_open(file, pvc_scroll_proc_show, NULL);
148}
149
150static const struct file_operations pvc_scroll_proc_fops = {
151 .owner = THIS_MODULE,
152 .open = pvc_scroll_proc_open,
153 .read = seq_read,
154 .llseek = seq_lseek,
155 .release = single_release,
156 .write = pvc_scroll_proc_write,
157};
129 158
130void pvc_proc_timerfunc(unsigned long data) 159void pvc_proc_timerfunc(unsigned long data)
131{ 160{
@@ -163,22 +192,16 @@ static int __init pvc_proc_init(void)
163 pvc_linedata[i] = i; 192 pvc_linedata[i] = i;
164 } 193 }
165 for (i = 0; i < PVC_NLINES; i++) { 194 for (i = 0; i < PVC_NLINES; i++) {
166 proc_entry = create_proc_entry(pvc_linename[i], 0644, 195 proc_entry = proc_create_data(pvc_linename[i], 0644, pvc_display_dir,
167 pvc_display_dir); 196 &pvc_line_proc_fops, &pvc_linedata[i]);
168 if (proc_entry == NULL) 197 if (proc_entry == NULL)
169 goto error; 198 goto error;
170
171 proc_entry->read_proc = pvc_proc_read_line;
172 proc_entry->write_proc = pvc_proc_write_line;
173 proc_entry->data = &pvc_linedata[i];
174 } 199 }
175 proc_entry = create_proc_entry("scroll", 0644, pvc_display_dir); 200 proc_entry = proc_create("scroll", 0644, pvc_display_dir,
201 &pvc_scroll_proc_fops);
176 if (proc_entry == NULL) 202 if (proc_entry == NULL)
177 goto error; 203 goto error;
178 204
179 proc_entry->write_proc = pvc_proc_write_scroll;
180 proc_entry->read_proc = pvc_proc_read_scroll;
181
182 init_timer(&timer); 205 init_timer(&timer);
183 timer.function = pvc_proc_timerfunc; 206 timer.function = pvc_proc_timerfunc;
184 207
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c
index 6acc6cb85f0a..20fde19a5fbf 100644
--- a/arch/mips/lasat/prom.c
+++ b/arch/mips/lasat/prom.c
@@ -100,8 +100,8 @@ void __init prom_init(void)
100 100
101 /* Get the command line */ 101 /* Get the command line */
102 if (argc > 0) { 102 if (argc > 0) {
103 strncpy(arcs_cmdline, argv[0], CL_SIZE-1); 103 strncpy(arcs_cmdline, argv[0], COMMAND_LINE_SIZE-1);
104 arcs_cmdline[CL_SIZE-1] = '\0'; 104 arcs_cmdline[COMMAND_LINE_SIZE-1] = '\0';
105 } 105 }
106 106
107 /* Set the I/O base address */ 107 /* Set the I/O base address */
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 14b9a28a4aec..d87ffd04cb0a 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -204,7 +204,7 @@ static ctl_table lasat_table[] = {
204 .maxlen = sizeof(int), 204 .maxlen = sizeof(int),
205 .mode = 0644, 205 .mode = 0644,
206 .proc_handler = proc_lasat_prid, 206 .proc_handler = proc_lasat_prid,
207. }, 207 },
208#ifdef CONFIG_INET 208#ifdef CONFIG_INET
209 { 209 {
210 .procname = "ipaddr", 210 .procname = "ipaddr",
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index d45092505fa1..3df1967dea08 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -1,31 +1,85 @@
1choice 1choice
2 prompt "Machine Type" 2 prompt "Machine Type"
3 depends on MACH_LOONGSON 3 depends on MACH_LOONGSON
4 4
5config LEMOTE_FULOONG2E 5config LEMOTE_FULOONG2E
6 bool "Lemote Fuloong(2e) mini-PC" 6 bool "Lemote Fuloong(2e) mini-PC"
7 select ARCH_SPARSEMEM_ENABLE 7 select ARCH_SPARSEMEM_ENABLE
8 select CEVT_R4K 8 select CEVT_R4K
9 select CSRC_R4K 9 select CSRC_R4K
10 select SYS_HAS_CPU_LOONGSON2E 10 select SYS_HAS_CPU_LOONGSON2E
11 select DMA_NONCOHERENT 11 select DMA_NONCOHERENT
12 select BOOT_ELF32 12 select BOOT_ELF32
13 select BOARD_SCACHE 13 select BOARD_SCACHE
14 select HW_HAS_PCI 14 select HW_HAS_PCI
15 select I8259 15 select I8259
16 select ISA 16 select ISA
17 select IRQ_CPU 17 select IRQ_CPU
18 select SYS_SUPPORTS_32BIT_KERNEL 18 select SYS_SUPPORTS_32BIT_KERNEL
19 select SYS_SUPPORTS_64BIT_KERNEL 19 select SYS_SUPPORTS_64BIT_KERNEL
20 select SYS_SUPPORTS_LITTLE_ENDIAN 20 select SYS_SUPPORTS_LITTLE_ENDIAN
21 select SYS_SUPPORTS_HIGHMEM 21 select SYS_SUPPORTS_HIGHMEM
22 select SYS_HAS_EARLY_PRINTK 22 select SYS_HAS_EARLY_PRINTK
23 select GENERIC_HARDIRQS_NO__DO_IRQ 23 select GENERIC_HARDIRQS_NO__DO_IRQ
24 select GENERIC_ISA_DMA_SUPPORT_BROKEN 24 select GENERIC_ISA_DMA_SUPPORT_BROKEN
25 select CPU_HAS_WB 25 select CPU_HAS_WB
26 help 26 help
27 Lemote Fuloong(2e) mini-PC board based on the Chinese Loongson-2E CPU and 27 Lemote Fuloong(2e) mini-PC board based on the Chinese Loongson-2E CPU and
28 an FPGA northbridge 28 an FPGA northbridge
29 29
30 Lemote Fuloong(2e) mini PC have a VIA686B south bridge. 30 Lemote Fuloong(2e) mini PC have a VIA686B south bridge.
31
32config LEMOTE_MACH2F
33 bool "Lemote Loongson 2F family machines"
34 select ARCH_SPARSEMEM_ENABLE
35 select BOARD_SCACHE
36 select BOOT_ELF32
37 select CEVT_R4K if ! MIPS_EXTERNAL_TIMER
38 select CPU_HAS_WB
39 select CS5536
40 select CSRC_R4K if ! MIPS_EXTERNAL_TIMER
41 select DMA_NONCOHERENT
42 select GENERIC_HARDIRQS_NO__DO_IRQ
43 select GENERIC_ISA_DMA_SUPPORT_BROKEN
44 select HW_HAS_PCI
45 select I8259
46 select IRQ_CPU
47 select ISA
48 select SYS_HAS_CPU_LOONGSON2F
49 select SYS_HAS_EARLY_PRINTK
50 select SYS_SUPPORTS_32BIT_KERNEL
51 select SYS_SUPPORTS_64BIT_KERNEL
52 select SYS_SUPPORTS_HIGHMEM
53 select SYS_SUPPORTS_LITTLE_ENDIAN
54 help
55 Lemote Loongson 2F family machines utilize the 2F revision of
56 Loongson processor and the AMD CS5536 south bridge.
57
58 These family machines include fuloong2f mini PC, yeeloong2f notebook,
59 LingLoong allinone PC and so forth.
31endchoice 60endchoice
61
62config CS5536
63 bool
64
65config CS5536_MFGPT
66 bool "CS5536 MFGPT Timer"
67 depends on CS5536
68 select MIPS_EXTERNAL_TIMER
69 help
70 This option enables the mfgpt0 timer of AMD CS5536.
71
72 If you want to enable the Loongson2 CPUFreq Driver, Please enable
73 this option at first, otherwise, You will get wrong system time.
74
75 If unsure, say Yes.
76
77config LOONGSON_SUSPEND
78 bool
79 default y
80 depends on CPU_SUPPORTS_CPUFREQ && SUSPEND
81
82config LOONGSON_UART_BASE
83 bool
84 default y
85 depends on EARLY_PRINTK || SERIAL_8250
diff --git a/arch/mips/loongson/Makefile b/arch/mips/loongson/Makefile
index 39048c455d7d..2b76cb0fb07d 100644
--- a/arch/mips/loongson/Makefile
+++ b/arch/mips/loongson/Makefile
@@ -9,3 +9,9 @@ obj-$(CONFIG_MACH_LOONGSON) += common/
9# 9#
10 10
11obj-$(CONFIG_LEMOTE_FULOONG2E) += fuloong-2e/ 11obj-$(CONFIG_LEMOTE_FULOONG2E) += fuloong-2e/
12
13#
14# Lemote loongson2f family machines
15#
16
17obj-$(CONFIG_LEMOTE_MACH2F) += lemote-2f/
diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
index 656b3cc0a2a6..7668c4de1151 100644
--- a/arch/mips/loongson/common/Makefile
+++ b/arch/mips/loongson/common/Makefile
@@ -3,9 +3,23 @@
3# 3#
4 4
5obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \ 5obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
6 pci.o bonito-irq.o mem.o machtype.o 6 pci.o bonito-irq.o mem.o machtype.o platform.o
7 7
8# 8#
9# Early printk support 9# Serial port support
10# 10#
11obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 11obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
12obj-$(CONFIG_SERIAL_8250) += serial.o
13obj-$(CONFIG_LOONGSON_UART_BASE) += uart_base.o
14
15#
16# Enable CS5536 Virtual Support Module(VSM) to virtulize the PCI configure
17# space
18#
19obj-$(CONFIG_CS5536) += cs5536/
20
21#
22# Suspend Support
23#
24
25obj-$(CONFIG_LOONGSON_SUSPEND) += pm.o
diff --git a/arch/mips/loongson/common/bonito-irq.c b/arch/mips/loongson/common/bonito-irq.c
index 3e31e7ad713e..2dc2a4cc632a 100644
--- a/arch/mips/loongson/common/bonito-irq.c
+++ b/arch/mips/loongson/common/bonito-irq.c
@@ -12,18 +12,19 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/compiler.h>
15 16
16#include <loongson.h> 17#include <loongson.h>
17 18
18static inline void bonito_irq_enable(unsigned int irq) 19static inline void bonito_irq_enable(unsigned int irq)
19{ 20{
20 BONITO_INTENSET = (1 << (irq - BONITO_IRQ_BASE)); 21 LOONGSON_INTENSET = (1 << (irq - LOONGSON_IRQ_BASE));
21 mmiowb(); 22 mmiowb();
22} 23}
23 24
24static inline void bonito_irq_disable(unsigned int irq) 25static inline void bonito_irq_disable(unsigned int irq)
25{ 26{
26 BONITO_INTENCLR = (1 << (irq - BONITO_IRQ_BASE)); 27 LOONGSON_INTENCLR = (1 << (irq - LOONGSON_IRQ_BASE));
27 mmiowb(); 28 mmiowb();
28} 29}
29 30
@@ -35,7 +36,7 @@ static struct irq_chip bonito_irq_type = {
35 .unmask = bonito_irq_enable, 36 .unmask = bonito_irq_enable,
36}; 37};
37 38
38static struct irqaction dma_timeout_irqaction = { 39static struct irqaction __maybe_unused dma_timeout_irqaction = {
39 .handler = no_action, 40 .handler = no_action,
40 .name = "dma_timeout", 41 .name = "dma_timeout",
41}; 42};
@@ -44,8 +45,10 @@ void bonito_irq_init(void)
44{ 45{
45 u32 i; 46 u32 i;
46 47
47 for (i = BONITO_IRQ_BASE; i < BONITO_IRQ_BASE + 32; i++) 48 for (i = LOONGSON_IRQ_BASE; i < LOONGSON_IRQ_BASE + 32; i++)
48 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq); 49 set_irq_chip_and_handler(i, &bonito_irq_type, handle_level_irq);
49 50
50 setup_irq(BONITO_IRQ_BASE + 10, &dma_timeout_irqaction); 51#ifdef CONFIG_CPU_LOONGSON2E
52 setup_irq(LOONGSON_IRQ_BASE + 10, &dma_timeout_irqaction);
53#endif
51} 54}
diff --git a/arch/mips/loongson/common/cmdline.c b/arch/mips/loongson/common/cmdline.c
index 75f1b243ee4e..7ad47f227477 100644
--- a/arch/mips/loongson/common/cmdline.c
+++ b/arch/mips/loongson/common/cmdline.c
@@ -9,7 +9,7 @@
9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology 9 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
10 * Author: Fuxin Zhang, zhangfx@lemote.com 10 * Author: Fuxin Zhang, zhangfx@lemote.com
11 * 11 *
12 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology 12 * Copyright (C) 2009 Lemote Inc.
13 * Author: Wu Zhangjin, wuzj@lemote.com 13 * Author: Wu Zhangjin, wuzj@lemote.com
14 * 14 *
15 * This program is free software; you can redistribute it and/or modify it 15 * This program is free software; you can redistribute it and/or modify it
@@ -49,4 +49,6 @@ void __init prom_init_cmdline(void)
49 strcat(arcs_cmdline, " console=ttyS0,115200"); 49 strcat(arcs_cmdline, " console=ttyS0,115200");
50 if ((strstr(arcs_cmdline, "root=")) == NULL) 50 if ((strstr(arcs_cmdline, "root=")) == NULL)
51 strcat(arcs_cmdline, " root=/dev/hda1"); 51 strcat(arcs_cmdline, " root=/dev/hda1");
52
53 prom_init_machtype();
52} 54}
diff --git a/arch/mips/loongson/common/cs5536/Makefile b/arch/mips/loongson/common/cs5536/Makefile
new file mode 100644
index 000000000000..510d4cdc2378
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/Makefile
@@ -0,0 +1,13 @@
1#
2# Makefile for CS5536 support.
3#
4
5obj-$(CONFIG_CS5536) += cs5536_pci.o cs5536_ide.o cs5536_acc.o cs5536_ohci.o \
6 cs5536_isa.o cs5536_ehci.o
7
8#
9# Enable cs5536 mfgpt Timer
10#
11obj-$(CONFIG_CS5536_MFGPT) += cs5536_mfgpt.o
12
13EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/loongson/common/cs5536/cs5536_acc.c b/arch/mips/loongson/common/cs5536/cs5536_acc.c
new file mode 100644
index 000000000000..b49485f187e0
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_acc.c
@@ -0,0 +1,140 @@
1/*
2 * the ACC Virtual Support Module of AMD CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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#include <cs5536/cs5536.h>
17#include <cs5536/cs5536_pci.h>
18
19void pci_acc_write_reg(int reg, u32 value)
20{
21 u32 hi = 0, lo = value;
22
23 switch (reg) {
24 case PCI_COMMAND:
25 _rdmsr(GLIU_MSR_REG(GLIU_PAE), &hi, &lo);
26 if (value & PCI_COMMAND_MASTER)
27 lo |= (0x03 << 8);
28 else
29 lo &= ~(0x03 << 8);
30 _wrmsr(GLIU_MSR_REG(GLIU_PAE), hi, lo);
31 break;
32 case PCI_STATUS:
33 if (value & PCI_STATUS_PARITY) {
34 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
35 if (lo & SB_PARE_ERR_FLAG) {
36 lo = (lo & 0x0000ffff) | SB_PARE_ERR_FLAG;
37 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
38 }
39 }
40 break;
41 case PCI_BAR0_REG:
42 if (value == PCI_BAR_RANGE_MASK) {
43 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
44 lo |= SOFT_BAR_ACC_FLAG;
45 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
46 } else if (value & 0x01) {
47 value &= 0xfffffffc;
48 hi = 0xA0000000 | ((value & 0x000ff000) >> 12);
49 lo = 0x000fff80 | ((value & 0x00000fff) << 20);
50 _wrmsr(GLIU_MSR_REG(GLIU_IOD_BM1), hi, lo);
51 }
52 break;
53 case PCI_ACC_INT_REG:
54 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), &hi, &lo);
55 /* disable all the usb interrupt in PIC */
56 lo &= ~(0xf << PIC_YSEL_LOW_ACC_SHIFT);
57 if (value) /* enable all the acc interrupt in PIC */
58 lo |= (CS5536_ACC_INTR << PIC_YSEL_LOW_ACC_SHIFT);
59 _wrmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), hi, lo);
60 break;
61 default:
62 break;
63 }
64}
65
66u32 pci_acc_read_reg(int reg)
67{
68 u32 hi, lo;
69 u32 conf_data = 0;
70
71 switch (reg) {
72 case PCI_VENDOR_ID:
73 conf_data =
74 CFG_PCI_VENDOR_ID(CS5536_ACC_DEVICE_ID, CS5536_VENDOR_ID);
75 break;
76 case PCI_COMMAND:
77 _rdmsr(GLIU_MSR_REG(GLIU_IOD_BM1), &hi, &lo);
78 if (((lo & 0xfff00000) || (hi & 0x000000ff))
79 && ((hi & 0xf0000000) == 0xa0000000))
80 conf_data |= PCI_COMMAND_IO;
81 _rdmsr(GLIU_MSR_REG(GLIU_PAE), &hi, &lo);
82 if ((lo & 0x300) == 0x300)
83 conf_data |= PCI_COMMAND_MASTER;
84 break;
85 case PCI_STATUS:
86 conf_data |= PCI_STATUS_66MHZ;
87 conf_data |= PCI_STATUS_FAST_BACK;
88 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
89 if (lo & SB_PARE_ERR_FLAG)
90 conf_data |= PCI_STATUS_PARITY;
91 conf_data |= PCI_STATUS_DEVSEL_MEDIUM;
92 break;
93 case PCI_CLASS_REVISION:
94 _rdmsr(ACC_MSR_REG(ACC_CAP), &hi, &lo);
95 conf_data = lo & 0x000000ff;
96 conf_data |= (CS5536_ACC_CLASS_CODE << 8);
97 break;
98 case PCI_CACHE_LINE_SIZE:
99 conf_data =
100 CFG_PCI_CACHE_LINE_SIZE(PCI_NORMAL_HEADER_TYPE,
101 PCI_NORMAL_LATENCY_TIMER);
102 break;
103 case PCI_BAR0_REG:
104 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
105 if (lo & SOFT_BAR_ACC_FLAG) {
106 conf_data = CS5536_ACC_RANGE |
107 PCI_BASE_ADDRESS_SPACE_IO;
108 lo &= ~SOFT_BAR_ACC_FLAG;
109 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
110 } else {
111 _rdmsr(GLIU_MSR_REG(GLIU_IOD_BM1), &hi, &lo);
112 conf_data = (hi & 0x000000ff) << 12;
113 conf_data |= (lo & 0xfff00000) >> 20;
114 conf_data |= 0x01;
115 conf_data &= ~0x02;
116 }
117 break;
118 case PCI_CARDBUS_CIS:
119 conf_data = PCI_CARDBUS_CIS_POINTER;
120 break;
121 case PCI_SUBSYSTEM_VENDOR_ID:
122 conf_data =
123 CFG_PCI_VENDOR_ID(CS5536_ACC_SUB_ID, CS5536_SUB_VENDOR_ID);
124 break;
125 case PCI_ROM_ADDRESS:
126 conf_data = PCI_EXPANSION_ROM_BAR;
127 break;
128 case PCI_CAPABILITY_LIST:
129 conf_data = PCI_CAPLIST_USB_POINTER;
130 break;
131 case PCI_INTERRUPT_LINE:
132 conf_data =
133 CFG_PCI_INTERRUPT_LINE(PCI_DEFAULT_PIN, CS5536_ACC_INTR);
134 break;
135 default:
136 break;
137 }
138
139 return conf_data;
140}
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ehci.c b/arch/mips/loongson/common/cs5536/cs5536_ehci.c
new file mode 100644
index 000000000000..74f9c59d36af
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_ehci.c
@@ -0,0 +1,158 @@
1/*
2 * the EHCI Virtual Support Module of AMD CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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#include <cs5536/cs5536.h>
17#include <cs5536/cs5536_pci.h>
18
19void pci_ehci_write_reg(int reg, u32 value)
20{
21 u32 hi = 0, lo = value;
22
23 switch (reg) {
24 case PCI_COMMAND:
25 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
26 if (value & PCI_COMMAND_MASTER)
27 hi |= PCI_COMMAND_MASTER;
28 else
29 hi &= ~PCI_COMMAND_MASTER;
30
31 if (value & PCI_COMMAND_MEMORY)
32 hi |= PCI_COMMAND_MEMORY;
33 else
34 hi &= ~PCI_COMMAND_MEMORY;
35 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo);
36 break;
37 case PCI_STATUS:
38 if (value & PCI_STATUS_PARITY) {
39 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
40 if (lo & SB_PARE_ERR_FLAG) {
41 lo = (lo & 0x0000ffff) | SB_PARE_ERR_FLAG;
42 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
43 }
44 }
45 break;
46 case PCI_BAR0_REG:
47 if (value == PCI_BAR_RANGE_MASK) {
48 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
49 lo |= SOFT_BAR_EHCI_FLAG;
50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
51 } else if ((value & 0x01) == 0x00) {
52 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo);
53
54 value &= 0xfffffff0;
55 hi = 0x40000000 | ((value & 0xff000000) >> 24);
56 lo = 0x000fffff | ((value & 0x00fff000) << 8);
57 _wrmsr(GLIU_MSR_REG(GLIU_P2D_BM4), hi, lo);
58 }
59 break;
60 case PCI_EHCI_LEGSMIEN_REG:
61 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
62 hi &= 0x003f0000;
63 hi |= (value & 0x3f) << 16;
64 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo);
65 break;
66 case PCI_EHCI_FLADJ_REG:
67 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
68 hi &= ~0x00003f00;
69 hi |= value & 0x00003f00;
70 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo);
71 break;
72 default:
73 break;
74 }
75}
76
77u32 pci_ehci_read_reg(int reg)
78{
79 u32 conf_data = 0;
80 u32 hi, lo;
81
82 switch (reg) {
83 case PCI_VENDOR_ID:
84 conf_data =
85 CFG_PCI_VENDOR_ID(CS5536_EHCI_DEVICE_ID, CS5536_VENDOR_ID);
86 break;
87 case PCI_COMMAND:
88 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
89 if (hi & PCI_COMMAND_MASTER)
90 conf_data |= PCI_COMMAND_MASTER;
91 if (hi & PCI_COMMAND_MEMORY)
92 conf_data |= PCI_COMMAND_MEMORY;
93 break;
94 case PCI_STATUS:
95 conf_data |= PCI_STATUS_66MHZ;
96 conf_data |= PCI_STATUS_FAST_BACK;
97 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
98 if (lo & SB_PARE_ERR_FLAG)
99 conf_data |= PCI_STATUS_PARITY;
100 conf_data |= PCI_STATUS_DEVSEL_MEDIUM;
101 break;
102 case PCI_CLASS_REVISION:
103 _rdmsr(USB_MSR_REG(USB_CAP), &hi, &lo);
104 conf_data = lo & 0x000000ff;
105 conf_data |= (CS5536_EHCI_CLASS_CODE << 8);
106 break;
107 case PCI_CACHE_LINE_SIZE:
108 conf_data =
109 CFG_PCI_CACHE_LINE_SIZE(PCI_NORMAL_HEADER_TYPE,
110 PCI_NORMAL_LATENCY_TIMER);
111 break;
112 case PCI_BAR0_REG:
113 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
114 if (lo & SOFT_BAR_EHCI_FLAG) {
115 conf_data = CS5536_EHCI_RANGE |
116 PCI_BASE_ADDRESS_SPACE_MEMORY;
117 lo &= ~SOFT_BAR_EHCI_FLAG;
118 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
119 } else {
120 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
121 conf_data = lo & 0xfffff000;
122 }
123 break;
124 case PCI_CARDBUS_CIS:
125 conf_data = PCI_CARDBUS_CIS_POINTER;
126 break;
127 case PCI_SUBSYSTEM_VENDOR_ID:
128 conf_data =
129 CFG_PCI_VENDOR_ID(CS5536_EHCI_SUB_ID, CS5536_SUB_VENDOR_ID);
130 break;
131 case PCI_ROM_ADDRESS:
132 conf_data = PCI_EXPANSION_ROM_BAR;
133 break;
134 case PCI_CAPABILITY_LIST:
135 conf_data = PCI_CAPLIST_USB_POINTER;
136 break;
137 case PCI_INTERRUPT_LINE:
138 conf_data =
139 CFG_PCI_INTERRUPT_LINE(PCI_DEFAULT_PIN, CS5536_USB_INTR);
140 break;
141 case PCI_EHCI_LEGSMIEN_REG:
142 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
143 conf_data = (hi & 0x003f0000) >> 16;
144 break;
145 case PCI_EHCI_LEGSMISTS_REG:
146 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
147 conf_data = (hi & 0x3f000000) >> 24;
148 break;
149 case PCI_EHCI_FLADJ_REG:
150 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
151 conf_data = hi & 0x00003f00;
152 break;
153 default:
154 break;
155 }
156
157 return conf_data;
158}
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ide.c b/arch/mips/loongson/common/cs5536/cs5536_ide.c
new file mode 100644
index 000000000000..3f61594b3884
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_ide.c
@@ -0,0 +1,179 @@
1/*
2 * the IDE Virtual Support Module of AMD CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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#include <cs5536/cs5536.h>
17#include <cs5536/cs5536_pci.h>
18
19void pci_ide_write_reg(int reg, u32 value)
20{
21 u32 hi = 0, lo = value;
22
23 switch (reg) {
24 case PCI_COMMAND:
25 _rdmsr(GLIU_MSR_REG(GLIU_PAE), &hi, &lo);
26 if (value & PCI_COMMAND_MASTER)
27 lo |= (0x03 << 4);
28 else
29 lo &= ~(0x03 << 4);
30 _wrmsr(GLIU_MSR_REG(GLIU_PAE), hi, lo);
31 break;
32 case PCI_STATUS:
33 if (value & PCI_STATUS_PARITY) {
34 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
35 if (lo & SB_PARE_ERR_FLAG) {
36 lo = (lo & 0x0000ffff) | SB_PARE_ERR_FLAG;
37 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
38 }
39 }
40 break;
41 case PCI_CACHE_LINE_SIZE:
42 value &= 0x0000ff00;
43 _rdmsr(SB_MSR_REG(SB_CTRL), &hi, &lo);
44 hi &= 0xffffff00;
45 hi |= (value >> 8);
46 _wrmsr(SB_MSR_REG(SB_CTRL), hi, lo);
47 break;
48 case PCI_BAR4_REG:
49 if (value == PCI_BAR_RANGE_MASK) {
50 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
51 lo |= SOFT_BAR_IDE_FLAG;
52 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
53 } else if (value & 0x01) {
54 lo = (value & 0xfffffff0) | 0x1;
55 _wrmsr(IDE_MSR_REG(IDE_IO_BAR), hi, lo);
56
57 value &= 0xfffffffc;
58 hi = 0x60000000 | ((value & 0x000ff000) >> 12);
59 lo = 0x000ffff0 | ((value & 0x00000fff) << 20);
60 _wrmsr(GLIU_MSR_REG(GLIU_IOD_BM2), hi, lo);
61 }
62 break;
63 case PCI_IDE_CFG_REG:
64 if (value == CS5536_IDE_FLASH_SIGNATURE) {
65 _rdmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), &hi, &lo);
66 lo |= 0x01;
67 _wrmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), hi, lo);
68 } else
69 _wrmsr(IDE_MSR_REG(IDE_CFG), hi, lo);
70 break;
71 case PCI_IDE_DTC_REG:
72 _wrmsr(IDE_MSR_REG(IDE_DTC), hi, lo);
73 break;
74 case PCI_IDE_CAST_REG:
75 _wrmsr(IDE_MSR_REG(IDE_CAST), hi, lo);
76 break;
77 case PCI_IDE_ETC_REG:
78 _wrmsr(IDE_MSR_REG(IDE_ETC), hi, lo);
79 break;
80 case PCI_IDE_PM_REG:
81 _wrmsr(IDE_MSR_REG(IDE_INTERNAL_PM), hi, lo);
82 break;
83 default:
84 break;
85 }
86}
87
88u32 pci_ide_read_reg(int reg)
89{
90 u32 conf_data = 0;
91 u32 hi, lo;
92
93 switch (reg) {
94 case PCI_VENDOR_ID:
95 conf_data =
96 CFG_PCI_VENDOR_ID(CS5536_IDE_DEVICE_ID, CS5536_VENDOR_ID);
97 break;
98 case PCI_COMMAND:
99 _rdmsr(IDE_MSR_REG(IDE_IO_BAR), &hi, &lo);
100 if (lo & 0xfffffff0)
101 conf_data |= PCI_COMMAND_IO;
102 _rdmsr(GLIU_MSR_REG(GLIU_PAE), &hi, &lo);
103 if ((lo & 0x30) == 0x30)
104 conf_data |= PCI_COMMAND_MASTER;
105 break;
106 case PCI_STATUS:
107 conf_data |= PCI_STATUS_66MHZ;
108 conf_data |= PCI_STATUS_FAST_BACK;
109 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
110 if (lo & SB_PARE_ERR_FLAG)
111 conf_data |= PCI_STATUS_PARITY;
112 conf_data |= PCI_STATUS_DEVSEL_MEDIUM;
113 break;
114 case PCI_CLASS_REVISION:
115 _rdmsr(IDE_MSR_REG(IDE_CAP), &hi, &lo);
116 conf_data = lo & 0x000000ff;
117 conf_data |= (CS5536_IDE_CLASS_CODE << 8);
118 break;
119 case PCI_CACHE_LINE_SIZE:
120 _rdmsr(SB_MSR_REG(SB_CTRL), &hi, &lo);
121 hi &= 0x000000f8;
122 conf_data = CFG_PCI_CACHE_LINE_SIZE(PCI_NORMAL_HEADER_TYPE, hi);
123 break;
124 case PCI_BAR4_REG:
125 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
126 if (lo & SOFT_BAR_IDE_FLAG) {
127 conf_data = CS5536_IDE_RANGE |
128 PCI_BASE_ADDRESS_SPACE_IO;
129 lo &= ~SOFT_BAR_IDE_FLAG;
130 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
131 } else {
132 _rdmsr(IDE_MSR_REG(IDE_IO_BAR), &hi, &lo);
133 conf_data = lo & 0xfffffff0;
134 conf_data |= 0x01;
135 conf_data &= ~0x02;
136 }
137 break;
138 case PCI_CARDBUS_CIS:
139 conf_data = PCI_CARDBUS_CIS_POINTER;
140 break;
141 case PCI_SUBSYSTEM_VENDOR_ID:
142 conf_data =
143 CFG_PCI_VENDOR_ID(CS5536_IDE_SUB_ID, CS5536_SUB_VENDOR_ID);
144 break;
145 case PCI_ROM_ADDRESS:
146 conf_data = PCI_EXPANSION_ROM_BAR;
147 break;
148 case PCI_CAPABILITY_LIST:
149 conf_data = PCI_CAPLIST_POINTER;
150 break;
151 case PCI_INTERRUPT_LINE:
152 conf_data =
153 CFG_PCI_INTERRUPT_LINE(PCI_DEFAULT_PIN, CS5536_IDE_INTR);
154 break;
155 case PCI_IDE_CFG_REG:
156 _rdmsr(IDE_MSR_REG(IDE_CFG), &hi, &lo);
157 conf_data = lo;
158 break;
159 case PCI_IDE_DTC_REG:
160 _rdmsr(IDE_MSR_REG(IDE_DTC), &hi, &lo);
161 conf_data = lo;
162 break;
163 case PCI_IDE_CAST_REG:
164 _rdmsr(IDE_MSR_REG(IDE_CAST), &hi, &lo);
165 conf_data = lo;
166 break;
167 case PCI_IDE_ETC_REG:
168 _rdmsr(IDE_MSR_REG(IDE_ETC), &hi, &lo);
169 conf_data = lo;
170 case PCI_IDE_PM_REG:
171 _rdmsr(IDE_MSR_REG(IDE_INTERNAL_PM), &hi, &lo);
172 conf_data = lo;
173 break;
174 default:
175 break;
176 }
177
178 return conf_data;
179}
diff --git a/arch/mips/loongson/common/cs5536/cs5536_isa.c b/arch/mips/loongson/common/cs5536/cs5536_isa.c
new file mode 100644
index 000000000000..b6f17f538e48
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_isa.c
@@ -0,0 +1,316 @@
1/*
2 * the ISA Virtual Support Module of AMD CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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#include <cs5536/cs5536.h>
17#include <cs5536/cs5536_pci.h>
18
19/* common variables for PCI_ISA_READ/WRITE_BAR */
20static const u32 divil_msr_reg[6] = {
21 DIVIL_MSR_REG(DIVIL_LBAR_SMB), DIVIL_MSR_REG(DIVIL_LBAR_GPIO),
22 DIVIL_MSR_REG(DIVIL_LBAR_MFGPT), DIVIL_MSR_REG(DIVIL_LBAR_IRQ),
23 DIVIL_MSR_REG(DIVIL_LBAR_PMS), DIVIL_MSR_REG(DIVIL_LBAR_ACPI),
24};
25
26static const u32 soft_bar_flag[6] = {
27 SOFT_BAR_SMB_FLAG, SOFT_BAR_GPIO_FLAG, SOFT_BAR_MFGPT_FLAG,
28 SOFT_BAR_IRQ_FLAG, SOFT_BAR_PMS_FLAG, SOFT_BAR_ACPI_FLAG,
29};
30
31static const u32 sb_msr_reg[6] = {
32 SB_MSR_REG(SB_R0), SB_MSR_REG(SB_R1), SB_MSR_REG(SB_R2),
33 SB_MSR_REG(SB_R3), SB_MSR_REG(SB_R4), SB_MSR_REG(SB_R5),
34};
35
36static const u32 bar_space_range[6] = {
37 CS5536_SMB_RANGE, CS5536_GPIO_RANGE, CS5536_MFGPT_RANGE,
38 CS5536_IRQ_RANGE, CS5536_PMS_RANGE, CS5536_ACPI_RANGE,
39};
40
41static const int bar_space_len[6] = {
42 CS5536_SMB_LENGTH, CS5536_GPIO_LENGTH, CS5536_MFGPT_LENGTH,
43 CS5536_IRQ_LENGTH, CS5536_PMS_LENGTH, CS5536_ACPI_LENGTH,
44};
45
46/*
47 * enable the divil module bar space.
48 *
49 * For all the DIVIL module LBAR, you should control the DIVIL LBAR reg
50 * and the RCONFx(0~5) reg to use the modules.
51 */
52static void divil_lbar_enable(void)
53{
54 u32 hi, lo;
55 int offset;
56
57 /*
58 * The DIVIL IRQ is not used yet. and make the RCONF0 reserved.
59 */
60
61 for (offset = DIVIL_LBAR_SMB; offset <= DIVIL_LBAR_PMS; offset++) {
62 _rdmsr(DIVIL_MSR_REG(offset), &hi, &lo);
63 hi |= 0x01;
64 _wrmsr(DIVIL_MSR_REG(DIVIL_LBAR_SMB), hi, lo);
65 }
66}
67
68/*
69 * disable the divil module bar space.
70 */
71static void divil_lbar_disable(void)
72{
73 u32 hi, lo;
74 int offset;
75
76 for (offset = DIVIL_LBAR_SMB; offset <= DIVIL_LBAR_PMS; offset++) {
77 _rdmsr(DIVIL_MSR_REG(offset), &hi, &lo);
78 hi &= ~0x01;
79 _wrmsr(DIVIL_MSR_REG(DIVIL_LBAR_SMB), hi, lo);
80 }
81}
82
83/*
84 * BAR write: write value to the n BAR
85 */
86
87void pci_isa_write_bar(int n, u32 value)
88{
89 u32 hi = 0, lo = value;
90
91 if (value == PCI_BAR_RANGE_MASK) {
92 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
93 lo |= soft_bar_flag[n];
94 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
95 } else if (value & 0x01) {
96 /* NATIVE reg */
97 hi = 0x0000f001;
98 lo &= bar_space_range[n];
99 _wrmsr(divil_msr_reg[n], hi, lo);
100
101 /* RCONFx is 4bytes in units for I/O space */
102 hi = ((value & 0x000ffffc) << 12) |
103 ((bar_space_len[n] - 4) << 12) | 0x01;
104 lo = ((value & 0x000ffffc) << 12) | 0x01;
105 _wrmsr(sb_msr_reg[n], hi, lo);
106 }
107}
108
109/*
110 * BAR read: read the n BAR
111 */
112
113u32 pci_isa_read_bar(int n)
114{
115 u32 conf_data = 0;
116 u32 hi, lo;
117
118 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
119 if (lo & soft_bar_flag[n]) {
120 conf_data = bar_space_range[n] | PCI_BASE_ADDRESS_SPACE_IO;
121 lo &= ~soft_bar_flag[n];
122 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
123 } else {
124 _rdmsr(divil_msr_reg[n], &hi, &lo);
125 conf_data = lo & bar_space_range[n];
126 conf_data |= 0x01;
127 conf_data &= ~0x02;
128 }
129 return conf_data;
130}
131
132/*
133 * isa_write: ISA write transfer
134 *
135 * We assume that this is not a bus master transfer.
136 */
137void pci_isa_write_reg(int reg, u32 value)
138{
139 u32 hi = 0, lo = value;
140 u32 temp;
141
142 switch (reg) {
143 case PCI_COMMAND:
144 if (value & PCI_COMMAND_IO)
145 divil_lbar_enable();
146 else
147 divil_lbar_disable();
148 break;
149 case PCI_STATUS:
150 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
151 temp = lo & 0x0000ffff;
152 if ((value & PCI_STATUS_SIG_TARGET_ABORT) &&
153 (lo & SB_TAS_ERR_EN))
154 temp |= SB_TAS_ERR_FLAG;
155
156 if ((value & PCI_STATUS_REC_TARGET_ABORT) &&
157 (lo & SB_TAR_ERR_EN))
158 temp |= SB_TAR_ERR_FLAG;
159
160 if ((value & PCI_STATUS_REC_MASTER_ABORT)
161 && (lo & SB_MAR_ERR_EN))
162 temp |= SB_MAR_ERR_FLAG;
163
164 if ((value & PCI_STATUS_DETECTED_PARITY)
165 && (lo & SB_PARE_ERR_EN))
166 temp |= SB_PARE_ERR_FLAG;
167
168 lo = temp;
169 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
170 break;
171 case PCI_CACHE_LINE_SIZE:
172 value &= 0x0000ff00;
173 _rdmsr(SB_MSR_REG(SB_CTRL), &hi, &lo);
174 hi &= 0xffffff00;
175 hi |= (value >> 8);
176 _wrmsr(SB_MSR_REG(SB_CTRL), hi, lo);
177 break;
178 case PCI_BAR0_REG:
179 pci_isa_write_bar(0, value);
180 break;
181 case PCI_BAR1_REG:
182 pci_isa_write_bar(1, value);
183 break;
184 case PCI_BAR2_REG:
185 pci_isa_write_bar(2, value);
186 break;
187 case PCI_BAR3_REG:
188 pci_isa_write_bar(3, value);
189 break;
190 case PCI_BAR4_REG:
191 pci_isa_write_bar(4, value);
192 break;
193 case PCI_BAR5_REG:
194 pci_isa_write_bar(5, value);
195 break;
196 case PCI_UART1_INT_REG:
197 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_HIGH), &hi, &lo);
198 /* disable uart1 interrupt in PIC */
199 lo &= ~(0xf << 24);
200 if (value) /* enable uart1 interrupt in PIC */
201 lo |= (CS5536_UART1_INTR << 24);
202 _wrmsr(DIVIL_MSR_REG(PIC_YSEL_HIGH), hi, lo);
203 break;
204 case PCI_UART2_INT_REG:
205 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_HIGH), &hi, &lo);
206 /* disable uart2 interrupt in PIC */
207 lo &= ~(0xf << 28);
208 if (value) /* enable uart2 interrupt in PIC */
209 lo |= (CS5536_UART2_INTR << 28);
210 _wrmsr(DIVIL_MSR_REG(PIC_YSEL_HIGH), hi, lo);
211 break;
212 case PCI_ISA_FIXUP_REG:
213 if (value) {
214 /* enable the TARGET ABORT/MASTER ABORT etc. */
215 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
216 lo |= 0x00000063;
217 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
218 }
219
220 default:
221 /* ALL OTHER PCI CONFIG SPACE HEADER IS NOT IMPLEMENTED. */
222 break;
223 }
224}
225
226/*
227 * isa_read: ISA read transfers
228 *
229 * We assume that this is not a bus master transfer.
230 */
231u32 pci_isa_read_reg(int reg)
232{
233 u32 conf_data = 0;
234 u32 hi, lo;
235
236 switch (reg) {
237 case PCI_VENDOR_ID:
238 conf_data =
239 CFG_PCI_VENDOR_ID(CS5536_ISA_DEVICE_ID, CS5536_VENDOR_ID);
240 break;
241 case PCI_COMMAND:
242 /* we just check the first LBAR for the IO enable bit, */
243 /* maybe we should changed later. */
244 _rdmsr(DIVIL_MSR_REG(DIVIL_LBAR_SMB), &hi, &lo);
245 if (hi & 0x01)
246 conf_data |= PCI_COMMAND_IO;
247 break;
248 case PCI_STATUS:
249 conf_data |= PCI_STATUS_66MHZ;
250 conf_data |= PCI_STATUS_DEVSEL_MEDIUM;
251 conf_data |= PCI_STATUS_FAST_BACK;
252
253 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
254 if (lo & SB_TAS_ERR_FLAG)
255 conf_data |= PCI_STATUS_SIG_TARGET_ABORT;
256 if (lo & SB_TAR_ERR_FLAG)
257 conf_data |= PCI_STATUS_REC_TARGET_ABORT;
258 if (lo & SB_MAR_ERR_FLAG)
259 conf_data |= PCI_STATUS_REC_MASTER_ABORT;
260 if (lo & SB_PARE_ERR_FLAG)
261 conf_data |= PCI_STATUS_DETECTED_PARITY;
262 break;
263 case PCI_CLASS_REVISION:
264 _rdmsr(GLCP_MSR_REG(GLCP_CHIP_REV_ID), &hi, &lo);
265 conf_data = lo & 0x000000ff;
266 conf_data |= (CS5536_ISA_CLASS_CODE << 8);
267 break;
268 case PCI_CACHE_LINE_SIZE:
269 _rdmsr(SB_MSR_REG(SB_CTRL), &hi, &lo);
270 hi &= 0x000000f8;
271 conf_data = CFG_PCI_CACHE_LINE_SIZE(PCI_BRIDGE_HEADER_TYPE, hi);
272 break;
273 /*
274 * we only use the LBAR of DIVIL, no RCONF used.
275 * all of them are IO space.
276 */
277 case PCI_BAR0_REG:
278 return pci_isa_read_bar(0);
279 break;
280 case PCI_BAR1_REG:
281 return pci_isa_read_bar(1);
282 break;
283 case PCI_BAR2_REG:
284 return pci_isa_read_bar(2);
285 break;
286 case PCI_BAR3_REG:
287 break;
288 case PCI_BAR4_REG:
289 return pci_isa_read_bar(4);
290 break;
291 case PCI_BAR5_REG:
292 return pci_isa_read_bar(5);
293 break;
294 case PCI_CARDBUS_CIS:
295 conf_data = PCI_CARDBUS_CIS_POINTER;
296 break;
297 case PCI_SUBSYSTEM_VENDOR_ID:
298 conf_data =
299 CFG_PCI_VENDOR_ID(CS5536_ISA_SUB_ID, CS5536_SUB_VENDOR_ID);
300 break;
301 case PCI_ROM_ADDRESS:
302 conf_data = PCI_EXPANSION_ROM_BAR;
303 break;
304 case PCI_CAPABILITY_LIST:
305 conf_data = PCI_CAPLIST_POINTER;
306 break;
307 case PCI_INTERRUPT_LINE:
308 /* no interrupt used here */
309 conf_data = CFG_PCI_INTERRUPT_LINE(0x00, 0x00);
310 break;
311 default:
312 break;
313 }
314
315 return conf_data;
316}
diff --git a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
new file mode 100644
index 000000000000..6cb44dbaeec2
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
@@ -0,0 +1,217 @@
1/*
2 * CS5536 General timer functions
3 *
4 * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology
5 * Author: Yanhua, yanh@lemote.com
6 *
7 * Copyright (C) 2009 Lemote Inc.
8 * Author: Wu zhangjin, wuzj@lemote.com
9 *
10 * Reference: AMD Geode(TM) CS5536 Companion Device Data Book
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
18#include <linux/io.h>
19#include <linux/init.h>
20#include <linux/module.h>
21#include <linux/jiffies.h>
22#include <linux/spinlock.h>
23#include <linux/interrupt.h>
24#include <linux/clockchips.h>
25
26#include <asm/time.h>
27
28#include <cs5536/cs5536_mfgpt.h>
29
30DEFINE_SPINLOCK(mfgpt_lock);
31EXPORT_SYMBOL(mfgpt_lock);
32
33static u32 mfgpt_base;
34
35/*
36 * Initialize the MFGPT timer.
37 *
38 * This is also called after resume to bring the MFGPT into operation again.
39 */
40
41/* disable counter */
42void disable_mfgpt0_counter(void)
43{
44 outw(inw(MFGPT0_SETUP) & 0x7fff, MFGPT0_SETUP);
45}
46EXPORT_SYMBOL(disable_mfgpt0_counter);
47
48/* enable counter, comparator2 to event mode, 14.318MHz clock */
49void enable_mfgpt0_counter(void)
50{
51 outw(0xe310, MFGPT0_SETUP);
52}
53EXPORT_SYMBOL(enable_mfgpt0_counter);
54
55static void init_mfgpt_timer(enum clock_event_mode mode,
56 struct clock_event_device *evt)
57{
58 spin_lock(&mfgpt_lock);
59
60 switch (mode) {
61 case CLOCK_EVT_MODE_PERIODIC:
62 outw(COMPARE, MFGPT0_CMP2); /* set comparator2 */
63 outw(0, MFGPT0_CNT); /* set counter to 0 */
64 enable_mfgpt0_counter();
65 break;
66
67 case CLOCK_EVT_MODE_SHUTDOWN:
68 case CLOCK_EVT_MODE_UNUSED:
69 if (evt->mode == CLOCK_EVT_MODE_PERIODIC ||
70 evt->mode == CLOCK_EVT_MODE_ONESHOT)
71 disable_mfgpt0_counter();
72 break;
73
74 case CLOCK_EVT_MODE_ONESHOT:
75 /* The oneshot mode have very high deviation, Not use it! */
76 break;
77
78 case CLOCK_EVT_MODE_RESUME:
79 /* Nothing to do here */
80 break;
81 }
82 spin_unlock(&mfgpt_lock);
83}
84
85static struct clock_event_device mfgpt_clockevent = {
86 .name = "mfgpt",
87 .features = CLOCK_EVT_FEAT_PERIODIC,
88 .set_mode = init_mfgpt_timer,
89 .irq = CS5536_MFGPT_INTR,
90};
91
92static irqreturn_t timer_interrupt(int irq, void *dev_id)
93{
94 u32 basehi;
95
96 /*
97 * get MFGPT base address
98 *
99 * NOTE: do not remove me, it's need for the value of mfgpt_base is
100 * variable
101 */
102 _rdmsr(DIVIL_MSR_REG(DIVIL_LBAR_MFGPT), &basehi, &mfgpt_base);
103
104 /* ack */
105 outw(inw(MFGPT0_SETUP) | 0x4000, MFGPT0_SETUP);
106
107 mfgpt_clockevent.event_handler(&mfgpt_clockevent);
108
109 return IRQ_HANDLED;
110}
111
112static struct irqaction irq5 = {
113 .handler = timer_interrupt,
114 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
115 .name = "timer"
116};
117
118/*
119 * Initialize the conversion factor and the min/max deltas of the clock event
120 * structure and register the clock event source with the framework.
121 */
122void __init setup_mfgpt0_timer(void)
123{
124 u32 basehi;
125 struct clock_event_device *cd = &mfgpt_clockevent;
126 unsigned int cpu = smp_processor_id();
127
128 cd->cpumask = cpumask_of(cpu);
129 clockevent_set_clock(cd, MFGPT_TICK_RATE);
130 cd->max_delta_ns = clockevent_delta2ns(0xffff, cd);
131 cd->min_delta_ns = clockevent_delta2ns(0xf, cd);
132
133 /* Enable MFGPT0 Comparator 2 Output to the Interrupt Mapper */
134 _wrmsr(DIVIL_MSR_REG(MFGPT_IRQ), 0, 0x100);
135
136 /* Enable Interrupt Gate 5 */
137 _wrmsr(DIVIL_MSR_REG(PIC_ZSEL_LOW), 0, 0x50000);
138
139 /* get MFGPT base address */
140 _rdmsr(DIVIL_MSR_REG(DIVIL_LBAR_MFGPT), &basehi, &mfgpt_base);
141
142 clockevents_register_device(cd);
143
144 setup_irq(CS5536_MFGPT_INTR, &irq5);
145}
146
147/*
148 * Since the MFGPT overflows every tick, its not very useful
149 * to just read by itself. So use jiffies to emulate a free
150 * running counter:
151 */
152static cycle_t mfgpt_read(struct clocksource *cs)
153{
154 unsigned long flags;
155 int count;
156 u32 jifs;
157 static int old_count;
158 static u32 old_jifs;
159
160 spin_lock_irqsave(&mfgpt_lock, flags);
161 /*
162 * Although our caller may have the read side of xtime_lock,
163 * this is now a seqlock, and we are cheating in this routine
164 * by having side effects on state that we cannot undo if
165 * there is a collision on the seqlock and our caller has to
166 * retry. (Namely, old_jifs and old_count.) So we must treat
167 * jiffies as volatile despite the lock. We read jiffies
168 * before latching the timer count to guarantee that although
169 * the jiffies value might be older than the count (that is,
170 * the counter may underflow between the last point where
171 * jiffies was incremented and the point where we latch the
172 * count), it cannot be newer.
173 */
174 jifs = jiffies;
175 /* read the count */
176 count = inw(MFGPT0_CNT);
177
178 /*
179 * It's possible for count to appear to go the wrong way for this
180 * reason:
181 *
182 * The timer counter underflows, but we haven't handled the resulting
183 * interrupt and incremented jiffies yet.
184 *
185 * Previous attempts to handle these cases intelligently were buggy, so
186 * we just do the simple thing now.
187 */
188 if (count < old_count && jifs == old_jifs)
189 count = old_count;
190
191 old_count = count;
192 old_jifs = jifs;
193
194 spin_unlock_irqrestore(&mfgpt_lock, flags);
195
196 return (cycle_t) (jifs * COMPARE) + count;
197}
198
199static struct clocksource clocksource_mfgpt = {
200 .name = "mfgpt",
201 .rating = 120, /* Functional for real use, but not desired */
202 .read = mfgpt_read,
203 .mask = CLOCKSOURCE_MASK(32),
204 .mult = 0,
205 .shift = 22,
206};
207
208int __init init_mfgpt_clocksource(void)
209{
210 if (num_possible_cpus() > 1) /* MFGPT does not scale! */
211 return 0;
212
213 clocksource_mfgpt.mult = clocksource_hz2mult(MFGPT_TICK_RATE, 22);
214 return clocksource_register(&clocksource_mfgpt);
215}
216
217arch_initcall(init_mfgpt_clocksource);
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ohci.c b/arch/mips/loongson/common/cs5536/cs5536_ohci.c
new file mode 100644
index 000000000000..8fdb02b6e90f
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_ohci.c
@@ -0,0 +1,147 @@
1/*
2 * the OHCI Virtual Support Module of AMD CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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#include <cs5536/cs5536.h>
17#include <cs5536/cs5536_pci.h>
18
19void pci_ohci_write_reg(int reg, u32 value)
20{
21 u32 hi = 0, lo = value;
22
23 switch (reg) {
24 case PCI_COMMAND:
25 _rdmsr(USB_MSR_REG(USB_OHCI), &hi, &lo);
26 if (value & PCI_COMMAND_MASTER)
27 hi |= PCI_COMMAND_MASTER;
28 else
29 hi &= ~PCI_COMMAND_MASTER;
30
31 if (value & PCI_COMMAND_MEMORY)
32 hi |= PCI_COMMAND_MEMORY;
33 else
34 hi &= ~PCI_COMMAND_MEMORY;
35 _wrmsr(USB_MSR_REG(USB_OHCI), hi, lo);
36 break;
37 case PCI_STATUS:
38 if (value & PCI_STATUS_PARITY) {
39 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
40 if (lo & SB_PARE_ERR_FLAG) {
41 lo = (lo & 0x0000ffff) | SB_PARE_ERR_FLAG;
42 _wrmsr(SB_MSR_REG(SB_ERROR), hi, lo);
43 }
44 }
45 break;
46 case PCI_BAR0_REG:
47 if (value == PCI_BAR_RANGE_MASK) {
48 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
49 lo |= SOFT_BAR_OHCI_FLAG;
50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
51 } else if ((value & 0x01) == 0x00) {
52 _wrmsr(USB_MSR_REG(USB_OHCI), hi, lo);
53
54 value &= 0xfffffff0;
55 hi = 0x40000000 | ((value & 0xff000000) >> 24);
56 lo = 0x000fffff | ((value & 0x00fff000) << 8);
57 _wrmsr(GLIU_MSR_REG(GLIU_P2D_BM3), hi, lo);
58 }
59 break;
60 case PCI_OHCI_INT_REG:
61 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), &hi, &lo);
62 lo &= ~(0xf << PIC_YSEL_LOW_USB_SHIFT);
63 if (value) /* enable all the usb interrupt in PIC */
64 lo |= (CS5536_USB_INTR << PIC_YSEL_LOW_USB_SHIFT);
65 _wrmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), hi, lo);
66 break;
67 default:
68 break;
69 }
70}
71
72u32 pci_ohci_read_reg(int reg)
73{
74 u32 conf_data = 0;
75 u32 hi, lo;
76
77 switch (reg) {
78 case PCI_VENDOR_ID:
79 conf_data =
80 CFG_PCI_VENDOR_ID(CS5536_OHCI_DEVICE_ID, CS5536_VENDOR_ID);
81 break;
82 case PCI_COMMAND:
83 _rdmsr(USB_MSR_REG(USB_OHCI), &hi, &lo);
84 if (hi & PCI_COMMAND_MASTER)
85 conf_data |= PCI_COMMAND_MASTER;
86 if (hi & PCI_COMMAND_MEMORY)
87 conf_data |= PCI_COMMAND_MEMORY;
88 break;
89 case PCI_STATUS:
90 conf_data |= PCI_STATUS_66MHZ;
91 conf_data |= PCI_STATUS_FAST_BACK;
92 _rdmsr(SB_MSR_REG(SB_ERROR), &hi, &lo);
93 if (lo & SB_PARE_ERR_FLAG)
94 conf_data |= PCI_STATUS_PARITY;
95 conf_data |= PCI_STATUS_DEVSEL_MEDIUM;
96 break;
97 case PCI_CLASS_REVISION:
98 _rdmsr(USB_MSR_REG(USB_CAP), &hi, &lo);
99 conf_data = lo & 0x000000ff;
100 conf_data |= (CS5536_OHCI_CLASS_CODE << 8);
101 break;
102 case PCI_CACHE_LINE_SIZE:
103 conf_data =
104 CFG_PCI_CACHE_LINE_SIZE(PCI_NORMAL_HEADER_TYPE,
105 PCI_NORMAL_LATENCY_TIMER);
106 break;
107 case PCI_BAR0_REG:
108 _rdmsr(GLCP_MSR_REG(GLCP_SOFT_COM), &hi, &lo);
109 if (lo & SOFT_BAR_OHCI_FLAG) {
110 conf_data = CS5536_OHCI_RANGE |
111 PCI_BASE_ADDRESS_SPACE_MEMORY;
112 lo &= ~SOFT_BAR_OHCI_FLAG;
113 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
114 } else {
115 _rdmsr(USB_MSR_REG(USB_OHCI), &hi, &lo);
116 conf_data = lo & 0xffffff00;
117 conf_data &= ~0x0000000f; /* 32bit mem */
118 }
119 break;
120 case PCI_CARDBUS_CIS:
121 conf_data = PCI_CARDBUS_CIS_POINTER;
122 break;
123 case PCI_SUBSYSTEM_VENDOR_ID:
124 conf_data =
125 CFG_PCI_VENDOR_ID(CS5536_OHCI_SUB_ID, CS5536_SUB_VENDOR_ID);
126 break;
127 case PCI_ROM_ADDRESS:
128 conf_data = PCI_EXPANSION_ROM_BAR;
129 break;
130 case PCI_CAPABILITY_LIST:
131 conf_data = PCI_CAPLIST_USB_POINTER;
132 break;
133 case PCI_INTERRUPT_LINE:
134 conf_data =
135 CFG_PCI_INTERRUPT_LINE(PCI_DEFAULT_PIN, CS5536_USB_INTR);
136 break;
137 case PCI_OHCI_INT_REG:
138 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), &hi, &lo);
139 if ((lo & 0x00000f00) == CS5536_USB_INTR)
140 conf_data = 1;
141 break;
142 default:
143 break;
144 }
145
146 return conf_data;
147}
diff --git a/arch/mips/loongson/common/cs5536/cs5536_pci.c b/arch/mips/loongson/common/cs5536/cs5536_pci.c
new file mode 100644
index 000000000000..e23f3d7d2c1d
--- /dev/null
+++ b/arch/mips/loongson/common/cs5536/cs5536_pci.c
@@ -0,0 +1,87 @@
1/*
2 * read/write operation to the PCI config space of CS5536
3 *
4 * Copyright (C) 2007 Lemote, Inc.
5 * Author : jlliu, liujl@lemote.com
6 *
7 * Copyright (C) 2009 Lemote, Inc.
8 * Author: Wu Zhangjin, wuzj@lemote.com
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 * the Virtual Support Module(VSM) for virtulizing the PCI
16 * configure space are defined in cs5536_modulename.c respectively,
17 *
18 * after this virtulizing, user can access the PCI configure space
19 * directly as a normal multi-function PCI device which follows
20 * the PCI-2.2 spec.
21 */
22
23#include <linux/types.h>
24#include <cs5536/cs5536_vsm.h>
25
26enum {
27 CS5536_FUNC_START = -1,
28 CS5536_ISA_FUNC,
29 reserved_func,
30 CS5536_IDE_FUNC,
31 CS5536_ACC_FUNC,
32 CS5536_OHCI_FUNC,
33 CS5536_EHCI_FUNC,
34 CS5536_FUNC_END,
35};
36
37static const cs5536_pci_vsm_write vsm_conf_write[] = {
38 [CS5536_ISA_FUNC] pci_isa_write_reg,
39 [reserved_func] NULL,
40 [CS5536_IDE_FUNC] pci_ide_write_reg,
41 [CS5536_ACC_FUNC] pci_acc_write_reg,
42 [CS5536_OHCI_FUNC] pci_ohci_write_reg,
43 [CS5536_EHCI_FUNC] pci_ehci_write_reg,
44};
45
46static const cs5536_pci_vsm_read vsm_conf_read[] = {
47 [CS5536_ISA_FUNC] pci_isa_read_reg,
48 [reserved_func] NULL,
49 [CS5536_IDE_FUNC] pci_ide_read_reg,
50 [CS5536_ACC_FUNC] pci_acc_read_reg,
51 [CS5536_OHCI_FUNC] pci_ohci_read_reg,
52 [CS5536_EHCI_FUNC] pci_ehci_read_reg,
53};
54
55/*
56 * write to PCI config space and transfer it to MSR write.
57 */
58void cs5536_pci_conf_write4(int function, int reg, u32 value)
59{
60 if ((function <= CS5536_FUNC_START) || (function >= CS5536_FUNC_END))
61 return;
62 if ((reg < 0) || (reg > 0x100) || ((reg & 0x03) != 0))
63 return;
64
65 if (vsm_conf_write[function] != NULL)
66 vsm_conf_write[function](reg, value);
67}
68
69/*
70 * read PCI config space and transfer it to MSR access.
71 */
72u32 cs5536_pci_conf_read4(int function, int reg)
73{
74 u32 data = 0;
75
76 if ((function <= CS5536_FUNC_START) || (function >= CS5536_FUNC_END))
77 return 0;
78 if ((reg < 0) || ((reg & 0x03) != 0))
79 return 0;
80 if (reg > 0x100)
81 return 0xffffffff;
82
83 if (vsm_conf_read[function] != NULL)
84 data = vsm_conf_read[function](reg);
85
86 return data;
87}
diff --git a/arch/mips/loongson/common/early_printk.c b/arch/mips/loongson/common/early_printk.c
index bc73edc0cfd8..23e7a8f8897f 100644
--- a/arch/mips/loongson/common/early_printk.c
+++ b/arch/mips/loongson/common/early_printk.c
@@ -1,7 +1,7 @@
1/* early printk support 1/* early printk support
2 * 2 *
3 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca> 3 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
4 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology 4 * Copyright (c) 2009 Lemote Inc.
5 * Author: Wu Zhangjin, wuzj@lemote.com 5 * Author: Wu Zhangjin, wuzj@lemote.com
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
@@ -12,26 +12,29 @@
12#include <linux/serial_reg.h> 12#include <linux/serial_reg.h>
13 13
14#include <loongson.h> 14#include <loongson.h>
15#include <machine.h>
16 15
17#define PORT(base, offset) (u8 *)(base + offset) 16#define PORT(base, offset) (u8 *)(base + offset)
18 17
19static inline unsigned int serial_in(phys_addr_t base, int offset) 18static inline unsigned int serial_in(unsigned char *base, int offset)
20{ 19{
21 return readb(PORT(base, offset)); 20 return readb(PORT(base, offset));
22} 21}
23 22
24static inline void serial_out(phys_addr_t base, int offset, int value) 23static inline void serial_out(unsigned char *base, int offset, int value)
25{ 24{
26 writeb(value, PORT(base, offset)); 25 writeb(value, PORT(base, offset));
27} 26}
28 27
29void prom_putchar(char c) 28void prom_putchar(char c)
30{ 29{
31 phys_addr_t uart_base = 30 int timeout;
32 (phys_addr_t) ioremap_nocache(LOONGSON_UART_BASE, 8); 31 unsigned char *uart_base;
33 32
34 while ((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0) 33 uart_base = (unsigned char *)_loongson_uart_base;
34 timeout = 1024;
35
36 while (((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0) &&
37 (timeout-- > 0))
35 ; 38 ;
36 39
37 serial_out(uart_base, UART_TX, c); 40 serial_out(uart_base, UART_TX, c);
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c
index b9ef50385541..196d947d929a 100644
--- a/arch/mips/loongson/common/env.c
+++ b/arch/mips/loongson/common/env.c
@@ -17,11 +17,14 @@
17 * Free Software Foundation; either version 2 of the License, or (at your 17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version. 18 * option) any later version.
19 */ 19 */
20#include <linux/module.h>
21
20#include <asm/bootinfo.h> 22#include <asm/bootinfo.h>
21 23
22#include <loongson.h> 24#include <loongson.h>
23 25
24unsigned long bus_clock, cpu_clock_freq; 26unsigned long bus_clock, cpu_clock_freq;
27EXPORT_SYMBOL(cpu_clock_freq);
25unsigned long memsize, highmemsize; 28unsigned long memsize, highmemsize;
26 29
27/* pmon passes arguments in 32bit pointers */ 30/* pmon passes arguments in 32bit pointers */
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
index 3abe927422a3..a2abd9355737 100644
--- a/arch/mips/loongson/common/init.c
+++ b/arch/mips/loongson/common/init.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology 2 * Copyright (C) 2009 Lemote Inc.
3 * Author: Wu Zhangjin, wuzj@lemote.com 3 * Author: Wu Zhangjin, wuzj@lemote.com
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
@@ -10,19 +10,28 @@
10 10
11#include <linux/bootmem.h> 11#include <linux/bootmem.h>
12 12
13#include <asm/bootinfo.h>
14
15#include <loongson.h> 13#include <loongson.h>
16 14
15/* Loongson CPU address windows config space base address */
16unsigned long __maybe_unused _loongson_addrwincfg_base;
17
17void __init prom_init(void) 18void __init prom_init(void)
18{ 19{
19 /* init base address of io space */ 20 /* init base address of io space */
20 set_io_port_base((unsigned long) 21 set_io_port_base((unsigned long)
21 ioremap(BONITO_PCIIO_BASE, BONITO_PCIIO_SIZE)); 22 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
23
24#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
25 _loongson_addrwincfg_base = (unsigned long)
26 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
27#endif
22 28
23 prom_init_cmdline(); 29 prom_init_cmdline();
24 prom_init_env(); 30 prom_init_env();
25 prom_init_memory(); 31 prom_init_memory();
32
33 /*init the uart base address */
34 prom_init_uart_base();
26} 35}
27 36
28void __init prom_free_prom_memory(void) 37void __init prom_free_prom_memory(void)
diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c
index b32b4a3e5137..20e732831978 100644
--- a/arch/mips/loongson/common/irq.c
+++ b/arch/mips/loongson/common/irq.c
@@ -20,21 +20,21 @@ void bonito_irqdispatch(void)
20 int i; 20 int i;
21 21
22 /* workaround the IO dma problem: let cpu looping to allow DMA finish */ 22 /* workaround the IO dma problem: let cpu looping to allow DMA finish */
23 int_status = BONITO_INTISR; 23 int_status = LOONGSON_INTISR;
24 if (int_status & (1 << 10)) { 24 if (int_status & (1 << 10)) {
25 while (int_status & (1 << 10)) { 25 while (int_status & (1 << 10)) {
26 udelay(1); 26 udelay(1);
27 int_status = BONITO_INTISR; 27 int_status = LOONGSON_INTISR;
28 } 28 }
29 } 29 }
30 30
31 /* Get pending sources, masked by current enables */ 31 /* Get pending sources, masked by current enables */
32 int_status = BONITO_INTISR & BONITO_INTEN; 32 int_status = LOONGSON_INTISR & LOONGSON_INTEN;
33 33
34 if (int_status != 0) { 34 if (int_status != 0) {
35 i = __ffs(int_status); 35 i = __ffs(int_status);
36 int_status &= ~(1 << i); 36 int_status &= ~(1 << i);
37 do_IRQ(BONITO_IRQ_BASE + i); 37 do_IRQ(LOONGSON_IRQ_BASE + i);
38 } 38 }
39} 39}
40 40
@@ -60,13 +60,13 @@ void __init arch_init_irq(void)
60 set_irq_trigger_mode(); 60 set_irq_trigger_mode();
61 61
62 /* no steer */ 62 /* no steer */
63 BONITO_INTSTEER = 0; 63 LOONGSON_INTSTEER = 0;
64 64
65 /* 65 /*
66 * Mask out all interrupt by writing "1" to all bit position in 66 * Mask out all interrupt by writing "1" to all bit position in
67 * the interrupt reset reg. 67 * the interrupt reset reg.
68 */ 68 */
69 BONITO_INTENCLR = ~0; 69 LOONGSON_INTENCLR = ~0;
70 70
71 /* machine specific irq init */ 71 /* machine specific irq init */
72 mach_init_irq(); 72 mach_init_irq();
diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c
index 7b348248de7d..0ed52b3f5314 100644
--- a/arch/mips/loongson/common/machtype.c
+++ b/arch/mips/loongson/common/machtype.c
@@ -15,6 +15,9 @@
15#include <loongson.h> 15#include <loongson.h>
16#include <machine.h> 16#include <machine.h>
17 17
18/* please ensure the length of the machtype string is less than 50 */
19#define MACHTYPE_LEN 50
20
18static const char *system_types[] = { 21static const char *system_types[] = {
19 [MACH_LOONGSON_UNKNOWN] "unknown loongson machine", 22 [MACH_LOONGSON_UNKNOWN] "unknown loongson machine",
20 [MACH_LEMOTE_FL2E] "lemote-fuloong-2e-box", 23 [MACH_LEMOTE_FL2E] "lemote-fuloong-2e-box",
@@ -22,29 +25,35 @@ static const char *system_types[] = {
22 [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches", 25 [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches",
23 [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches", 26 [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches",
24 [MACH_DEXXON_GDIUM2F10] "dexxon-gidum-2f-10inches", 27 [MACH_DEXXON_GDIUM2F10] "dexxon-gidum-2f-10inches",
28 [MACH_LEMOTE_NAS] "lemote-nas-2f",
29 [MACH_LEMOTE_LL2F] "lemote-lynloong-2f",
25 [MACH_LOONGSON_END] NULL, 30 [MACH_LOONGSON_END] NULL,
26}; 31};
27 32
28const char *get_system_type(void) 33const char *get_system_type(void)
29{ 34{
30 if (mips_machtype == MACH_UNKNOWN)
31 mips_machtype = LOONGSON_MACHTYPE;
32
33 return system_types[mips_machtype]; 35 return system_types[mips_machtype];
34} 36}
35 37
36static __init int machtype_setup(char *str) 38void __init prom_init_machtype(void)
37{ 39{
40 char *p, str[MACHTYPE_LEN];
38 int machtype = MACH_LEMOTE_FL2E; 41 int machtype = MACH_LEMOTE_FL2E;
39 42
40 if (!str) 43 mips_machtype = LOONGSON_MACHTYPE;
41 return -EINVAL; 44
45 p = strstr(arcs_cmdline, "machtype=");
46 if (!p)
47 return;
48 p += strlen("machtype=");
49 strncpy(str, p, MACHTYPE_LEN);
50 p = strstr(str, " ");
51 if (p)
52 *p = '\0';
42 53
43 for (; system_types[machtype]; machtype++) 54 for (; system_types[machtype]; machtype++)
44 if (strstr(system_types[machtype], str)) { 55 if (strstr(system_types[machtype], str)) {
45 mips_machtype = machtype; 56 mips_machtype = machtype;
46 break; 57 break;
47 } 58 }
48 return 0;
49} 59}
50__setup("machtype=", machtype_setup);
diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c
index 7c92f79b6480..ceacd092b446 100644
--- a/arch/mips/loongson/common/mem.c
+++ b/arch/mips/loongson/common/mem.c
@@ -12,24 +12,107 @@
12 12
13#include <loongson.h> 13#include <loongson.h>
14#include <mem.h> 14#include <mem.h>
15#include <pci.h>
15 16
16void __init prom_init_memory(void) 17void __init prom_init_memory(void)
17{ 18{
18 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); 19 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
20
21 add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize <<
22 20), BOOT_MEM_RESERVED);
23#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
24 {
25 int bit;
26
27 bit = fls(memsize + highmemsize);
28 if (bit != ffs(memsize + highmemsize))
29 bit += 20;
30 else
31 bit = bit + 20 - 1;
32
33 /* set cpu window3 to map CPU to DDR: 2G -> 2G */
34 LOONGSON_ADDRWIN_CPUTODDR(ADDRWIN_WIN3, 0x80000000ul,
35 0x80000000ul, (1 << bit));
36 mmiowb();
37 }
38#endif /* !CONFIG_CPU_SUPPORTS_ADDRWINCFG */
39
19#ifdef CONFIG_64BIT 40#ifdef CONFIG_64BIT
20 if (highmemsize > 0) 41 if (highmemsize > 0)
21 add_memory_region(LOONGSON_HIGHMEM_START, 42 add_memory_region(LOONGSON_HIGHMEM_START,
22 highmemsize << 20, BOOT_MEM_RAM); 43 highmemsize << 20, BOOT_MEM_RAM);
23#endif /* CONFIG_64BIT */ 44
45 add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START -
46 LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED);
47
48#endif /* !CONFIG_64BIT */
24} 49}
25 50
26/* override of arch/mips/mm/cache.c: __uncached_access */ 51/* override of arch/mips/mm/cache.c: __uncached_access */
27int __uncached_access(struct file *file, unsigned long addr) 52int __uncached_access(struct file *file, unsigned long addr)
28{ 53{
29 if (file->f_flags & O_SYNC) 54 if (file->f_flags & O_DSYNC)
30 return 1; 55 return 1;
31 56
32 return addr >= __pa(high_memory) || 57 return addr >= __pa(high_memory) ||
33 ((addr >= LOONGSON_MMIO_MEM_START) && 58 ((addr >= LOONGSON_MMIO_MEM_START) &&
34 (addr < LOONGSON_MMIO_MEM_END)); 59 (addr < LOONGSON_MMIO_MEM_END));
35} 60}
61
62#ifdef CONFIG_CPU_SUPPORTS_UNCACHED_ACCELERATED
63
64#include <linux/pci.h>
65#include <linux/sched.h>
66#include <asm/current.h>
67
68static unsigned long uca_start, uca_end;
69
70pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
71 unsigned long size, pgprot_t vma_prot)
72{
73 unsigned long offset = pfn << PAGE_SHIFT;
74 unsigned long end = offset + size;
75
76 if (__uncached_access(file, offset)) {
77 if (((uca_start && offset) >= uca_start) &&
78 (end <= uca_end))
79 return __pgprot((pgprot_val(vma_prot) &
80 ~_CACHE_MASK) |
81 _CACHE_UNCACHED_ACCELERATED);
82 else
83 return pgprot_noncached(vma_prot);
84 }
85 return vma_prot;
86}
87
88static int __init find_vga_mem_init(void)
89{
90 struct pci_dev *dev = 0;
91 struct resource *r;
92 int idx;
93
94 if (uca_start)
95 return 0;
96
97 for_each_pci_dev(dev) {
98 if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
99 for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
100 r = &dev->resource[idx];
101 if (!r->start && r->end)
102 continue;
103 if (r->flags & IORESOURCE_IO)
104 continue;
105 if (r->flags & IORESOURCE_MEM) {
106 uca_start = r->start;
107 uca_end = r->end;
108 return 0;
109 }
110 }
111 }
112 }
113
114 return 0;
115}
116
117late_initcall(find_vga_mem_init);
118#endif /* !CONFIG_CPU_SUPPORTS_UNCACHED_ACCELERATED */
diff --git a/arch/mips/loongson/common/pci.c b/arch/mips/loongson/common/pci.c
index a3a4abfb6c9a..31d8c5ecd16c 100644
--- a/arch/mips/loongson/common/pci.c
+++ b/arch/mips/loongson/common/pci.c
@@ -27,7 +27,7 @@ static struct resource loongson_pci_io_resource = {
27}; 27};
28 28
29static struct pci_controller loongson_pci_controller = { 29static struct pci_controller loongson_pci_controller = {
30 .pci_ops = &bonito64_pci_ops, 30 .pci_ops = &loongson_pci_ops,
31 .io_resource = &loongson_pci_io_resource, 31 .io_resource = &loongson_pci_io_resource,
32 .mem_resource = &loongson_pci_mem_resource, 32 .mem_resource = &loongson_pci_mem_resource,
33 .mem_offset = 0x00000000UL, 33 .mem_offset = 0x00000000UL,
@@ -44,15 +44,15 @@ static void __init setup_pcimap(void)
44 * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0 44 * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0
45 * [<2G] [384M,448M] [320M,384M] [0M,64M] 45 * [<2G] [384M,448M] [320M,384M] [0M,64M]
46 */ 46 */
47 BONITO_PCIMAP = BONITO_PCIMAP_PCIMAP_2 | 47 LOONGSON_PCIMAP = LOONGSON_PCIMAP_PCIMAP_2 |
48 BONITO_PCIMAP_WIN(2, BONITO_PCILO2_BASE) | 48 LOONGSON_PCIMAP_WIN(2, LOONGSON_PCILO2_BASE) |
49 BONITO_PCIMAP_WIN(1, BONITO_PCILO1_BASE) | 49 LOONGSON_PCIMAP_WIN(1, LOONGSON_PCILO1_BASE) |
50 BONITO_PCIMAP_WIN(0, 0); 50 LOONGSON_PCIMAP_WIN(0, 0);
51 51
52 /* 52 /*
53 * PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M] 53 * PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M]
54 */ 54 */
55 BONITO_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */ 55 LOONGSON_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */
56 /* size: 256M, burst transmission, pre-fetch enable, 64bit */ 56 /* size: 256M, burst transmission, pre-fetch enable, 64bit */
57 LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul; 57 LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul;
58 LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful; 58 LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful;
@@ -67,6 +67,14 @@ static void __init setup_pcimap(void)
67 /* can not change gnt to break pci transfer when device's gnt not 67 /* can not change gnt to break pci transfer when device's gnt not
68 deassert for some broken device */ 68 deassert for some broken device */
69 LOONGSON_PXARB_CFG = 0x00fe0105ul; 69 LOONGSON_PXARB_CFG = 0x00fe0105ul;
70
71#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
72 /*
73 * set cpu addr window2 to map CPU address space to PCI address space
74 */
75 LOONGSON_ADDRWIN_CPUTOPCI(ADDRWIN_WIN2, LOONGSON_CPU_MEM_SRC,
76 LOONGSON_PCI_MEM_DST, MMAP_CPUTOPCI_SIZE);
77#endif
70} 78}
71 79
72static int __init pcibios_init(void) 80static int __init pcibios_init(void)
diff --git a/arch/mips/loongson/common/platform.c b/arch/mips/loongson/common/platform.c
new file mode 100644
index 000000000000..be81777eb94d
--- /dev/null
+++ b/arch/mips/loongson/common/platform.c
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2009 Lemote Inc.
3 * Author: Wu Zhangjin, wuzj@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#include <linux/err.h>
12#include <linux/platform_device.h>
13
14static struct platform_device loongson2_cpufreq_device = {
15 .name = "loongson2_cpufreq",
16 .id = -1,
17};
18
19static int __init loongson2_cpufreq_init(void)
20{
21 struct cpuinfo_mips *c = &current_cpu_data;
22
23 /* Only 2F revision and it's successors support CPUFreq */
24 if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_LOONGSON2F)
25 return platform_device_register(&loongson2_cpufreq_device);
26
27 return -ENODEV;
28}
29
30arch_initcall(loongson2_cpufreq_init);
diff --git a/arch/mips/loongson/common/pm.c b/arch/mips/loongson/common/pm.c
new file mode 100644
index 000000000000..b625fec8a4d5
--- /dev/null
+++ b/arch/mips/loongson/common/pm.c
@@ -0,0 +1,161 @@
1/*
2 * loongson-specific suspend support
3 *
4 * Copyright (C) 2009 Lemote Inc.
5 * Author: Wu Zhangjin <wuzj@lemote.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#include <linux/suspend.h>
13#include <linux/interrupt.h>
14#include <linux/pm.h>
15
16#include <asm/i8259.h>
17#include <asm/mipsregs.h>
18
19#include <loongson.h>
20
21static unsigned int __maybe_unused cached_master_mask; /* i8259A */
22static unsigned int __maybe_unused cached_slave_mask;
23static unsigned int __maybe_unused cached_bonito_irq_mask; /* bonito */
24
25void arch_suspend_disable_irqs(void)
26{
27 /* disable all mips events */
28 local_irq_disable();
29
30#ifdef CONFIG_I8259
31 /* disable all events of i8259A */
32 cached_slave_mask = inb(PIC_SLAVE_IMR);
33 cached_master_mask = inb(PIC_MASTER_IMR);
34
35 outb(0xff, PIC_SLAVE_IMR);
36 inb(PIC_SLAVE_IMR);
37 outb(0xff, PIC_MASTER_IMR);
38 inb(PIC_MASTER_IMR);
39#endif
40 /* disable all events of bonito */
41 cached_bonito_irq_mask = LOONGSON_INTEN;
42 LOONGSON_INTENCLR = 0xffff;
43 (void)LOONGSON_INTENCLR;
44}
45
46void arch_suspend_enable_irqs(void)
47{
48 /* enable all mips events */
49 local_irq_enable();
50#ifdef CONFIG_I8259
51 /* only enable the cached events of i8259A */
52 outb(cached_slave_mask, PIC_SLAVE_IMR);
53 outb(cached_master_mask, PIC_MASTER_IMR);
54#endif
55 /* enable all cached events of bonito */
56 LOONGSON_INTENSET = cached_bonito_irq_mask;
57 (void)LOONGSON_INTENSET;
58}
59
60/*
61 * Setup the board-specific events for waking up loongson from wait mode
62 */
63void __weak setup_wakeup_events(void)
64{
65}
66
67/*
68 * Check wakeup events
69 */
70int __weak wakeup_loongson(void)
71{
72 return 1;
73}
74
75/*
76 * If the events are really what we want to wakeup the CPU, wake it up
77 * otherwise put the CPU asleep again.
78 */
79static void wait_for_wakeup_events(void)
80{
81 while (!wakeup_loongson())
82 LOONGSON_CHIPCFG0 &= ~0x7;
83}
84
85/*
86 * Stop all perf counters
87 *
88 * $24 is the control register of Loongson perf counter
89 */
90static inline void stop_perf_counters(void)
91{
92 __write_64bit_c0_register($24, 0, 0);
93}
94
95
96static void loongson_suspend_enter(void)
97{
98 static unsigned int cached_cpu_freq;
99
100 /* setup wakeup events via enabling the IRQs */
101 setup_wakeup_events();
102
103 stop_perf_counters();
104
105 cached_cpu_freq = LOONGSON_CHIPCFG0;
106
107 /* Put CPU into wait mode */
108 LOONGSON_CHIPCFG0 &= ~0x7;
109
110 /* wait for the given events to wakeup cpu from wait mode */
111 wait_for_wakeup_events();
112
113 LOONGSON_CHIPCFG0 = cached_cpu_freq;
114 mmiowb();
115}
116
117void __weak mach_suspend(void)
118{
119}
120
121void __weak mach_resume(void)
122{
123}
124
125static int loongson_pm_enter(suspend_state_t state)
126{
127 mach_suspend();
128
129 /* processor specific suspend */
130 loongson_suspend_enter();
131
132 mach_resume();
133
134 return 0;
135}
136
137static int loongson_pm_valid_state(suspend_state_t state)
138{
139 switch (state) {
140 case PM_SUSPEND_ON:
141 case PM_SUSPEND_STANDBY:
142 case PM_SUSPEND_MEM:
143 return 1;
144
145 default:
146 return 0;
147 }
148}
149
150static struct platform_suspend_ops loongson_pm_ops = {
151 .valid = loongson_pm_valid_state,
152 .enter = loongson_pm_enter,
153};
154
155static int __init loongson_pm_init(void)
156{
157 suspend_set_ops(&loongson_pm_ops);
158
159 return 0;
160}
161arch_initcall(loongson_pm_init);
diff --git a/arch/mips/loongson/common/reset.c b/arch/mips/loongson/common/reset.c
index 97e918251edd..d57f1719da95 100644
--- a/arch/mips/loongson/common/reset.c
+++ b/arch/mips/loongson/common/reset.c
@@ -22,7 +22,7 @@ static void loongson_restart(char *command)
22 mach_prepare_reboot(); 22 mach_prepare_reboot();
23 23
24 /* reboot via jumping to boot base address */ 24 /* reboot via jumping to boot base address */
25 ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) (); 25 ((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) ();
26} 26}
27 27
28static void loongson_halt(void) 28static void loongson_halt(void)
diff --git a/arch/mips/loongson/common/serial.c b/arch/mips/loongson/common/serial.c
new file mode 100644
index 000000000000..23b66a5f88cb
--- /dev/null
+++ b/arch/mips/loongson/common/serial.c
@@ -0,0 +1,76 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
7 *
8 * Copyright (C) 2009 Lemote, Inc.
9 * Author: Yan hua (yanhua@lemote.com)
10 * Author: Wu Zhangjin (wuzj@lemote.com)
11 */
12
13#include <linux/io.h>
14#include <linux/init.h>
15#include <linux/serial_8250.h>
16
17#include <asm/bootinfo.h>
18
19#include <loongson.h>
20#include <machine.h>
21
22#define PORT(int) \
23{ \
24 .irq = int, \
25 .uartclk = 1843200, \
26 .iotype = UPIO_PORT, \
27 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
28 .regshift = 0, \
29}
30
31#define PORT_M(int) \
32{ \
33 .irq = MIPS_CPU_IRQ_BASE + (int), \
34 .uartclk = 3686400, \
35 .iotype = UPIO_MEM, \
36 .membase = (void __iomem *)NULL, \
37 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
38 .regshift = 0, \
39}
40
41static struct plat_serial8250_port uart8250_data[][2] = {
42 [MACH_LOONGSON_UNKNOWN] {},
43 [MACH_LEMOTE_FL2E] {PORT(4), {} },
44 [MACH_LEMOTE_FL2F] {PORT(3), {} },
45 [MACH_LEMOTE_ML2F7] {PORT_M(3), {} },
46 [MACH_LEMOTE_YL2F89] {PORT_M(3), {} },
47 [MACH_DEXXON_GDIUM2F10] {PORT_M(3), {} },
48 [MACH_LEMOTE_NAS] {PORT_M(3), {} },
49 [MACH_LEMOTE_LL2F] {PORT(3), {} },
50 [MACH_LOONGSON_END] {},
51};
52
53static struct platform_device uart8250_device = {
54 .name = "serial8250",
55 .id = PLAT8250_DEV_PLATFORM,
56};
57
58static int __init serial_init(void)
59{
60 unsigned char iotype;
61
62 iotype = uart8250_data[mips_machtype][0].iotype;
63
64 if (UPIO_MEM == iotype)
65 uart8250_data[mips_machtype][0].membase =
66 (void __iomem *)_loongson_uart_base;
67 else if (UPIO_PORT == iotype)
68 uart8250_data[mips_machtype][0].iobase =
69 loongson_uart_base - LOONGSON_PCIIO_BASE;
70
71 uart8250_device.dev.platform_data = uart8250_data[mips_machtype];
72
73 return platform_device_register(&uart8250_device);
74}
75
76device_initcall(serial_init);
diff --git a/arch/mips/loongson/common/time.c b/arch/mips/loongson/common/time.c
index 6e08c8270abe..35f0b66a94f5 100644
--- a/arch/mips/loongson/common/time.c
+++ b/arch/mips/loongson/common/time.c
@@ -14,11 +14,14 @@
14#include <asm/time.h> 14#include <asm/time.h>
15 15
16#include <loongson.h> 16#include <loongson.h>
17#include <cs5536/cs5536_mfgpt.h>
17 18
18void __init plat_time_init(void) 19void __init plat_time_init(void)
19{ 20{
20 /* setup mips r4k timer */ 21 /* setup mips r4k timer */
21 mips_hpt_frequency = cpu_clock_freq / 2; 22 mips_hpt_frequency = cpu_clock_freq / 2;
23
24 setup_mfgpt0_timer();
22} 25}
23 26
24void read_persistent_clock(struct timespec *ts) 27void read_persistent_clock(struct timespec *ts)
diff --git a/arch/mips/loongson/common/uart_base.c b/arch/mips/loongson/common/uart_base.c
new file mode 100644
index 000000000000..78ff66ae749e
--- /dev/null
+++ b/arch/mips/loongson/common/uart_base.c
@@ -0,0 +1,45 @@
1/*
2 * Copyright (C) 2009 Lemote Inc.
3 * Author: Wu Zhangjin, wuzj@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#include <linux/module.h>
12#include <asm/bootinfo.h>
13
14#include <loongson.h>
15
16/* ioremapped */
17unsigned long _loongson_uart_base;
18EXPORT_SYMBOL(_loongson_uart_base);
19/* raw */
20unsigned long loongson_uart_base;
21EXPORT_SYMBOL(loongson_uart_base);
22
23void prom_init_loongson_uart_base(void)
24{
25 switch (mips_machtype) {
26 case MACH_LEMOTE_FL2E:
27 loongson_uart_base = LOONGSON_PCIIO_BASE + 0x3f8;
28 break;
29 case MACH_LEMOTE_FL2F:
30 case MACH_LEMOTE_LL2F:
31 loongson_uart_base = LOONGSON_PCIIO_BASE + 0x2f8;
32 break;
33 case MACH_LEMOTE_ML2F7:
34 case MACH_LEMOTE_YL2F89:
35 case MACH_DEXXON_GDIUM2F10:
36 case MACH_LEMOTE_NAS:
37 default:
38 /* The CPU provided serial port */
39 loongson_uart_base = LOONGSON_LIO1_BASE + 0x3f8;
40 break;
41 }
42
43 _loongson_uart_base =
44 (unsigned long)ioremap_nocache(loongson_uart_base, 8);
45}
diff --git a/arch/mips/loongson/fuloong-2e/irq.c b/arch/mips/loongson/fuloong-2e/irq.c
index 7888cf69424a..320e9379bdd7 100644
--- a/arch/mips/loongson/fuloong-2e/irq.c
+++ b/arch/mips/loongson/fuloong-2e/irq.c
@@ -47,8 +47,8 @@ static struct irqaction cascade_irqaction = {
47void __init set_irq_trigger_mode(void) 47void __init set_irq_trigger_mode(void)
48{ 48{
49 /* most bonito irq should be level triggered */ 49 /* most bonito irq should be level triggered */
50 BONITO_INTEDGE = BONITO_ICU_SYSTEMERR | BONITO_ICU_MASTERERR | 50 LOONGSON_INTEDGE = LOONGSON_ICU_SYSTEMERR | LOONGSON_ICU_MASTERERR |
51 BONITO_ICU_RETRYERR | BONITO_ICU_MBOXES; 51 LOONGSON_ICU_RETRYERR | LOONGSON_ICU_MBOXES;
52} 52}
53 53
54void __init mach_init_irq(void) 54void __init mach_init_irq(void)
diff --git a/arch/mips/loongson/fuloong-2e/reset.c b/arch/mips/loongson/fuloong-2e/reset.c
index 677fe186db95..fc16c677d476 100644
--- a/arch/mips/loongson/fuloong-2e/reset.c
+++ b/arch/mips/loongson/fuloong-2e/reset.c
@@ -14,8 +14,8 @@
14 14
15void mach_prepare_reboot(void) 15void mach_prepare_reboot(void)
16{ 16{
17 BONITO_BONGENCFG &= ~(1 << 2); 17 LOONGSON_GENCFG &= ~(1 << 2);
18 BONITO_BONGENCFG |= (1 << 2); 18 LOONGSON_GENCFG |= (1 << 2);
19} 19}
20 20
21void mach_prepare_shutdown(void) 21void mach_prepare_shutdown(void)
diff --git a/arch/mips/loongson/lemote-2f/Makefile b/arch/mips/loongson/lemote-2f/Makefile
new file mode 100644
index 000000000000..4d84b27dc41b
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/Makefile
@@ -0,0 +1,11 @@
1#
2# Makefile for lemote loongson2f family machines
3#
4
5obj-y += irq.o reset.o ec_kb3310b.o
6
7#
8# Suspend Support
9#
10
11obj-$(CONFIG_LOONGSON_SUSPEND) += pm.o
diff --git a/arch/mips/loongson/lemote-2f/ec_kb3310b.c b/arch/mips/loongson/lemote-2f/ec_kb3310b.c
new file mode 100644
index 000000000000..4d84111a2cd4
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/ec_kb3310b.c
@@ -0,0 +1,130 @@
1/*
2 * Basic KB3310B Embedded Controller support for the YeeLoong 2F netbook
3 *
4 * Copyright (C) 2008 Lemote Inc.
5 * Author: liujl <liujl@lemote.com>, 2008-04-20
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#include <linux/module.h>
14#include <linux/spinlock.h>
15#include <linux/delay.h>
16
17#include "ec_kb3310b.h"
18
19static DEFINE_SPINLOCK(index_access_lock);
20static DEFINE_SPINLOCK(port_access_lock);
21
22unsigned char ec_read(unsigned short addr)
23{
24 unsigned char value;
25 unsigned long flags;
26
27 spin_lock_irqsave(&index_access_lock, flags);
28 outb((addr & 0xff00) >> 8, EC_IO_PORT_HIGH);
29 outb((addr & 0x00ff), EC_IO_PORT_LOW);
30 value = inb(EC_IO_PORT_DATA);
31 spin_unlock_irqrestore(&index_access_lock, flags);
32
33 return value;
34}
35EXPORT_SYMBOL_GPL(ec_read);
36
37void ec_write(unsigned short addr, unsigned char val)
38{
39 unsigned long flags;
40
41 spin_lock_irqsave(&index_access_lock, flags);
42 outb((addr & 0xff00) >> 8, EC_IO_PORT_HIGH);
43 outb((addr & 0x00ff), EC_IO_PORT_LOW);
44 outb(val, EC_IO_PORT_DATA);
45 /* flush the write action */
46 inb(EC_IO_PORT_DATA);
47 spin_unlock_irqrestore(&index_access_lock, flags);
48
49 return;
50}
51EXPORT_SYMBOL_GPL(ec_write);
52
53/*
54 * This function is used for EC command writes and corresponding status queries.
55 */
56int ec_query_seq(unsigned char cmd)
57{
58 int timeout;
59 unsigned char status;
60 unsigned long flags;
61 int ret = 0;
62
63 spin_lock_irqsave(&port_access_lock, flags);
64
65 /* make chip goto reset mode */
66 udelay(EC_REG_DELAY);
67 outb(cmd, EC_CMD_PORT);
68 udelay(EC_REG_DELAY);
69
70 /* check if the command is received by ec */
71 timeout = EC_CMD_TIMEOUT;
72 status = inb(EC_STS_PORT);
73 while (timeout-- && (status & (1 << 1))) {
74 status = inb(EC_STS_PORT);
75 udelay(EC_REG_DELAY);
76 }
77
78 if (timeout <= 0) {
79 printk(KERN_ERR "%s: deadable error : timeout...\n", __func__);
80 ret = -EINVAL;
81 } else
82 printk(KERN_INFO
83 "(%x/%d)ec issued command %d status : 0x%x\n",
84 timeout, EC_CMD_TIMEOUT - timeout, cmd, status);
85
86 spin_unlock_irqrestore(&port_access_lock, flags);
87
88 return ret;
89}
90EXPORT_SYMBOL_GPL(ec_query_seq);
91
92/*
93 * Send query command to EC to get the proper event number
94 */
95int ec_query_event_num(void)
96{
97 return ec_query_seq(CMD_GET_EVENT_NUM);
98}
99EXPORT_SYMBOL(ec_query_event_num);
100
101/*
102 * Get event number from EC
103 *
104 * NOTE: This routine must follow the query_event_num function in the
105 * interrupt.
106 */
107int ec_get_event_num(void)
108{
109 int timeout = 100;
110 unsigned char value;
111 unsigned char status;
112
113 udelay(EC_REG_DELAY);
114 status = inb(EC_STS_PORT);
115 udelay(EC_REG_DELAY);
116 while (timeout-- && !(status & (1 << 0))) {
117 status = inb(EC_STS_PORT);
118 udelay(EC_REG_DELAY);
119 }
120 if (timeout <= 0) {
121 pr_info("%s: get event number timeout.\n", __func__);
122
123 return -EINVAL;
124 }
125 value = inb(EC_DAT_PORT);
126 udelay(EC_REG_DELAY);
127
128 return value;
129}
130EXPORT_SYMBOL(ec_get_event_num);
diff --git a/arch/mips/loongson/lemote-2f/ec_kb3310b.h b/arch/mips/loongson/lemote-2f/ec_kb3310b.h
new file mode 100644
index 000000000000..1595a21b315b
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/ec_kb3310b.h
@@ -0,0 +1,188 @@
1/*
2 * KB3310B Embedded Controller
3 *
4 * Copyright (C) 2008 Lemote Inc.
5 * Author: liujl <liujl@lemote.com>, 2008-03-14
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 _EC_KB3310B_H
14#define _EC_KB3310B_H
15
16extern unsigned char ec_read(unsigned short addr);
17extern void ec_write(unsigned short addr, unsigned char val);
18extern int ec_query_seq(unsigned char cmd);
19extern int ec_query_event_num(void);
20extern int ec_get_event_num(void);
21
22typedef int (*sci_handler) (int status);
23extern sci_handler yeeloong_report_lid_status;
24
25#define SCI_IRQ_NUM 0x0A
26
27/*
28 * The following registers are determined by the EC index configuration.
29 * 1, fill the PORT_HIGH as EC register high part.
30 * 2, fill the PORT_LOW as EC register low part.
31 * 3, fill the PORT_DATA as EC register write data or get the data from it.
32 */
33#define EC_IO_PORT_HIGH 0x0381
34#define EC_IO_PORT_LOW 0x0382
35#define EC_IO_PORT_DATA 0x0383
36
37/*
38 * EC delay time is 500us for register and status access
39 */
40#define EC_REG_DELAY 500 /* unit : us */
41#define EC_CMD_TIMEOUT 0x1000
42
43/*
44 * EC access port for SCI communication
45 */
46#define EC_CMD_PORT 0x66
47#define EC_STS_PORT 0x66
48#define EC_DAT_PORT 0x62
49#define CMD_INIT_IDLE_MODE 0xdd
50#define CMD_EXIT_IDLE_MODE 0xdf
51#define CMD_INIT_RESET_MODE 0xd8
52#define CMD_REBOOT_SYSTEM 0x8c
53#define CMD_GET_EVENT_NUM 0x84
54#define CMD_PROGRAM_PIECE 0xda
55
56/* temperature & fan registers */
57#define REG_TEMPERATURE_VALUE 0xF458
58#define REG_FAN_AUTO_MAN_SWITCH 0xF459
59#define BIT_FAN_AUTO 0
60#define BIT_FAN_MANUAL 1
61#define REG_FAN_CONTROL 0xF4D2
62#define BIT_FAN_CONTROL_ON (1 << 0)
63#define BIT_FAN_CONTROL_OFF (0 << 0)
64#define REG_FAN_STATUS 0xF4DA
65#define BIT_FAN_STATUS_ON (1 << 0)
66#define BIT_FAN_STATUS_OFF (0 << 0)
67#define REG_FAN_SPEED_HIGH 0xFE22
68#define REG_FAN_SPEED_LOW 0xFE23
69#define REG_FAN_SPEED_LEVEL 0xF4CC
70/* fan speed divider */
71#define FAN_SPEED_DIVIDER 480000 /* (60*1000*1000/62.5/2)*/
72
73/* battery registers */
74#define REG_BAT_DESIGN_CAP_HIGH 0xF77D
75#define REG_BAT_DESIGN_CAP_LOW 0xF77E
76#define REG_BAT_FULLCHG_CAP_HIGH 0xF780
77#define REG_BAT_FULLCHG_CAP_LOW 0xF781
78#define REG_BAT_DESIGN_VOL_HIGH 0xF782
79#define REG_BAT_DESIGN_VOL_LOW 0xF783
80#define REG_BAT_CURRENT_HIGH 0xF784
81#define REG_BAT_CURRENT_LOW 0xF785
82#define REG_BAT_VOLTAGE_HIGH 0xF786
83#define REG_BAT_VOLTAGE_LOW 0xF787
84#define REG_BAT_TEMPERATURE_HIGH 0xF788
85#define REG_BAT_TEMPERATURE_LOW 0xF789
86#define REG_BAT_RELATIVE_CAP_HIGH 0xF492
87#define REG_BAT_RELATIVE_CAP_LOW 0xF493
88#define REG_BAT_VENDOR 0xF4C4
89#define FLAG_BAT_VENDOR_SANYO 0x01
90#define FLAG_BAT_VENDOR_SIMPLO 0x02
91#define REG_BAT_CELL_COUNT 0xF4C6
92#define FLAG_BAT_CELL_3S1P 0x03
93#define FLAG_BAT_CELL_3S2P 0x06
94#define REG_BAT_CHARGE 0xF4A2
95#define FLAG_BAT_CHARGE_DISCHARGE 0x01
96#define FLAG_BAT_CHARGE_CHARGE 0x02
97#define FLAG_BAT_CHARGE_ACPOWER 0x00
98#define REG_BAT_STATUS 0xF4B0
99#define BIT_BAT_STATUS_LOW (1 << 5)
100#define BIT_BAT_STATUS_DESTROY (1 << 2)
101#define BIT_BAT_STATUS_FULL (1 << 1)
102#define BIT_BAT_STATUS_IN (1 << 0)
103#define REG_BAT_CHARGE_STATUS 0xF4B1
104#define BIT_BAT_CHARGE_STATUS_OVERTEMP (1 << 2)
105#define BIT_BAT_CHARGE_STATUS_PRECHG (1 << 1)
106#define REG_BAT_STATE 0xF482
107#define BIT_BAT_STATE_CHARGING (1 << 1)
108#define BIT_BAT_STATE_DISCHARGING (1 << 0)
109#define REG_BAT_POWER 0xF440
110#define BIT_BAT_POWER_S3 (1 << 2)
111#define BIT_BAT_POWER_ON (1 << 1)
112#define BIT_BAT_POWER_ACIN (1 << 0)
113
114/* other registers */
115/* Audio: rd/wr */
116#define REG_AUDIO_VOLUME 0xF46C
117#define REG_AUDIO_MUTE 0xF4E7
118#define REG_AUDIO_BEEP 0xF4D0
119/* USB port power or not: rd/wr */
120#define REG_USB0_FLAG 0xF461
121#define REG_USB1_FLAG 0xF462
122#define REG_USB2_FLAG 0xF463
123#define BIT_USB_FLAG_ON 1
124#define BIT_USB_FLAG_OFF 0
125/* LID */
126#define REG_LID_DETECT 0xF4BD
127#define BIT_LID_DETECT_ON 1
128#define BIT_LID_DETECT_OFF 0
129/* CRT */
130#define REG_CRT_DETECT 0xF4AD
131#define BIT_CRT_DETECT_PLUG 1
132#define BIT_CRT_DETECT_UNPLUG 0
133/* LCD backlight brightness adjust: 9 levels */
134#define REG_DISPLAY_BRIGHTNESS 0xF4F5
135/* Black screen Status */
136#define BIT_DISPLAY_LCD_ON 1
137#define BIT_DISPLAY_LCD_OFF 0
138/* LCD backlight control: off/restore */
139#define REG_BACKLIGHT_CTRL 0xF7BD
140#define BIT_BACKLIGHT_ON 1
141#define BIT_BACKLIGHT_OFF 0
142/* Reset the machine auto-clear: rd/wr */
143#define REG_RESET 0xF4EC
144#define BIT_RESET_ON 1
145/* Light the led: rd/wr */
146#define REG_LED 0xF4C8
147#define BIT_LED_RED_POWER (1 << 0)
148#define BIT_LED_ORANGE_POWER (1 << 1)
149#define BIT_LED_GREEN_CHARGE (1 << 2)
150#define BIT_LED_RED_CHARGE (1 << 3)
151#define BIT_LED_NUMLOCK (1 << 4)
152/* Test led mode, all led on/off */
153#define REG_LED_TEST 0xF4C2
154#define BIT_LED_TEST_IN 1
155#define BIT_LED_TEST_OUT 0
156/* Camera on/off */
157#define REG_CAMERA_STATUS 0xF46A
158#define BIT_CAMERA_STATUS_ON 1
159#define BIT_CAMERA_STATUS_OFF 0
160#define REG_CAMERA_CONTROL 0xF7B7
161#define BIT_CAMERA_CONTROL_OFF 0
162#define BIT_CAMERA_CONTROL_ON 1
163/* Wlan Status */
164#define REG_WLAN 0xF4FA
165#define BIT_WLAN_ON 1
166#define BIT_WLAN_OFF 0
167#define REG_DISPLAY_LCD 0xF79F
168
169/* SCI Event Number from EC */
170enum {
171 EVENT_LID = 0x23, /* LID open/close */
172 EVENT_DISPLAY_TOGGLE, /* Fn+F3 for display switch */
173 EVENT_SLEEP, /* Fn+F1 for entering sleep mode */
174 EVENT_OVERTEMP, /* Over-temperature happened */
175 EVENT_CRT_DETECT, /* CRT is connected */
176 EVENT_CAMERA, /* Camera on/off */
177 EVENT_USB_OC2, /* USB2 Over Current occurred */
178 EVENT_USB_OC0, /* USB0 Over Current occurred */
179 EVENT_BLACK_SCREEN, /* Turn on/off backlight */
180 EVENT_AUDIO_MUTE, /* Mute on/off */
181 EVENT_DISPLAY_BRIGHTNESS,/* LCD backlight brightness adjust */
182 EVENT_AC_BAT, /* AC & Battery relative issue */
183 EVENT_AUDIO_VOLUME, /* Volume adjust */
184 EVENT_WLAN, /* Wlan on/off */
185 EVENT_END
186};
187
188#endif /* !_EC_KB3310B_H */
diff --git a/arch/mips/loongson/lemote-2f/irq.c b/arch/mips/loongson/lemote-2f/irq.c
new file mode 100644
index 000000000000..77d32f9cf31e
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/irq.c
@@ -0,0 +1,134 @@
1/*
2 * Copyright (C) 2007 Lemote Inc.
3 * Author: Fuxin Zhang, zhangfx@lemote.com
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#include <linux/interrupt.h>
12#include <linux/module.h>
13
14#include <asm/irq_cpu.h>
15#include <asm/i8259.h>
16#include <asm/mipsregs.h>
17
18#include <loongson.h>
19#include <machine.h>
20
21#define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* cpu timer */
22#define LOONGSON_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */
23#define LOONGSON_NORTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 6) /* bonito */
24#define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 3) /* cpu serial port */
25#define LOONGSON_SOUTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 2) /* i8259 */
26
27#define LOONGSON_INT_BIT_INT0 (1 << 11)
28#define LOONGSON_INT_BIT_INT1 (1 << 12)
29
30/*
31 * The generic i8259_irq() make the kernel hang on booting. Since we cannot
32 * get the irq via the IRR directly, we access the ISR instead.
33 */
34int mach_i8259_irq(void)
35{
36 int irq, isr;
37
38 irq = -1;
39
40 if ((LOONGSON_INTISR & LOONGSON_INTEN) & LOONGSON_INT_BIT_INT0) {
41 spin_lock(&i8259A_lock);
42 isr = inb(PIC_MASTER_CMD) &
43 ~inb(PIC_MASTER_IMR) & ~(1 << PIC_CASCADE_IR);
44 if (!isr)
45 isr = (inb(PIC_SLAVE_CMD) & ~inb(PIC_SLAVE_IMR)) << 8;
46 irq = ffs(isr) - 1;
47 if (unlikely(irq == 7)) {
48 /*
49 * This may be a spurious interrupt.
50 *
51 * Read the interrupt status register (ISR). If the most
52 * significant bit is not set then there is no valid
53 * interrupt.
54 */
55 outb(0x0B, PIC_MASTER_ISR); /* ISR register */
56 if (~inb(PIC_MASTER_ISR) & 0x80)
57 irq = -1;
58 }
59 spin_unlock(&i8259A_lock);
60 }
61
62 return irq;
63}
64EXPORT_SYMBOL(mach_i8259_irq);
65
66static void i8259_irqdispatch(void)
67{
68 int irq;
69
70 irq = mach_i8259_irq();
71 if (irq >= 0)
72 do_IRQ(irq);
73 else
74 spurious_interrupt();
75}
76
77void mach_irq_dispatch(unsigned int pending)
78{
79 if (pending & CAUSEF_IP7)
80 do_IRQ(LOONGSON_TIMER_IRQ);
81 else if (pending & CAUSEF_IP6) { /* North Bridge, Perf counter */
82#ifdef CONFIG_OPROFILE
83 do_IRQ(LOONGSON2_PERFCNT_IRQ);
84#endif
85 bonito_irqdispatch();
86 } else if (pending & CAUSEF_IP3) /* CPU UART */
87 do_IRQ(LOONGSON_UART_IRQ);
88 else if (pending & CAUSEF_IP2) /* South Bridge */
89 i8259_irqdispatch();
90 else
91 spurious_interrupt();
92}
93
94void __init set_irq_trigger_mode(void)
95{
96 /* setup cs5536 as high level trigger */
97 LOONGSON_INTPOL = LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1;
98 LOONGSON_INTEDGE &= ~(LOONGSON_INT_BIT_INT0 | LOONGSON_INT_BIT_INT1);
99}
100
101static irqreturn_t ip6_action(int cpl, void *dev_id)
102{
103 return IRQ_HANDLED;
104}
105
106struct irqaction ip6_irqaction = {
107 .handler = ip6_action,
108 .name = "cascade",
109 .flags = IRQF_SHARED,
110};
111
112struct irqaction cascade_irqaction = {
113 .handler = no_action,
114 .name = "cascade",
115};
116
117void __init mach_init_irq(void)
118{
119 /* init all controller
120 * 0-15 ------> i8259 interrupt
121 * 16-23 ------> mips cpu interrupt
122 * 32-63 ------> bonito irq
123 */
124
125 /* Sets the first-level interrupt dispatcher. */
126 mips_cpu_irq_init();
127 init_i8259_irqs();
128 bonito_irq_init();
129
130 /* setup north bridge irq (bonito) */
131 setup_irq(LOONGSON_NORTH_BRIDGE_IRQ, &ip6_irqaction);
132 /* setup source bridge irq (i8259) */
133 setup_irq(LOONGSON_SOUTH_BRIDGE_IRQ, &cascade_irqaction);
134}
diff --git a/arch/mips/loongson/lemote-2f/pm.c b/arch/mips/loongson/lemote-2f/pm.c
new file mode 100644
index 000000000000..d7af2e616592
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/pm.c
@@ -0,0 +1,149 @@
1/*
2 * Lemote loongson2f family machines' specific suspend support
3 *
4 * Copyright (C) 2009 Lemote Inc.
5 * Author: Wu Zhangjin <wuzj@lemote.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#include <linux/suspend.h>
14#include <linux/interrupt.h>
15#include <linux/pm.h>
16#include <linux/i8042.h>
17#include <linux/module.h>
18
19#include <asm/i8259.h>
20#include <asm/mipsregs.h>
21#include <asm/bootinfo.h>
22
23#include <loongson.h>
24
25#include <cs5536/cs5536_mfgpt.h>
26#include "ec_kb3310b.h"
27
28#define I8042_KBD_IRQ 1
29#define I8042_CTR_KBDINT 0x01
30#define I8042_CTR_KBDDIS 0x10
31
32static unsigned char i8042_ctr;
33
34static int i8042_enable_kbd_port(void)
35{
36 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) {
37 pr_err("i8042.c: Can't read CTR while enabling i8042 kbd port."
38 "\n");
39 return -EIO;
40 }
41
42 i8042_ctr &= ~I8042_CTR_KBDDIS;
43 i8042_ctr |= I8042_CTR_KBDINT;
44
45 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
46 i8042_ctr &= ~I8042_CTR_KBDINT;
47 i8042_ctr |= I8042_CTR_KBDDIS;
48 pr_err("i8042.c: Failed to enable KBD port.\n");
49
50 return -EIO;
51 }
52
53 return 0;
54}
55
56void setup_wakeup_events(void)
57{
58 int irq_mask;
59
60 switch (mips_machtype) {
61 case MACH_LEMOTE_ML2F7:
62 case MACH_LEMOTE_YL2F89:
63 /* open the keyboard irq in i8259A */
64 outb((0xff & ~(1 << I8042_KBD_IRQ)), PIC_MASTER_IMR);
65 irq_mask = inb(PIC_MASTER_IMR);
66
67 /* enable keyboard port */
68 i8042_enable_kbd_port();
69
70 /* Wakeup CPU via SCI lid open event */
71 outb(irq_mask & ~(1 << PIC_CASCADE_IR), PIC_MASTER_IMR);
72 inb(PIC_MASTER_IMR);
73 outb(0xff & ~(1 << (SCI_IRQ_NUM - 8)), PIC_SLAVE_IMR);
74 inb(PIC_SLAVE_IMR);
75
76 break;
77
78 default:
79 break;
80 }
81}
82
83static struct delayed_work lid_task;
84static int initialized;
85/* yeeloong_report_lid_status will be implemented in yeeloong_laptop.c */
86sci_handler yeeloong_report_lid_status;
87EXPORT_SYMBOL(yeeloong_report_lid_status);
88static void yeeloong_lid_update_task(struct work_struct *work)
89{
90 if (yeeloong_report_lid_status)
91 yeeloong_report_lid_status(BIT_LID_DETECT_ON);
92}
93
94int wakeup_loongson(void)
95{
96 int irq;
97
98 /* query the interrupt number */
99 irq = mach_i8259_irq();
100 if (irq < 0)
101 return 0;
102
103 printk(KERN_INFO "%s: irq = %d\n", __func__, irq);
104
105 if (irq == I8042_KBD_IRQ)
106 return 1;
107 else if (irq == SCI_IRQ_NUM) {
108 int ret, sci_event;
109 /* query the event number */
110 ret = ec_query_seq(CMD_GET_EVENT_NUM);
111 if (ret < 0)
112 return 0;
113 sci_event = ec_get_event_num();
114 if (sci_event < 0)
115 return 0;
116 if (sci_event == EVENT_LID) {
117 int lid_status;
118 /* check the LID status */
119 lid_status = ec_read(REG_LID_DETECT);
120 /* wakeup cpu when people open the LID */
121 if (lid_status == BIT_LID_DETECT_ON) {
122 /* If we call it directly here, the WARNING
123 * will be sent out by getnstimeofday
124 * via "WARN_ON(timekeeping_suspended);"
125 * because we can not schedule in suspend mode.
126 */
127 if (initialized == 0) {
128 INIT_DELAYED_WORK(&lid_task,
129 yeeloong_lid_update_task);
130 initialized = 1;
131 }
132 schedule_delayed_work(&lid_task, 1);
133 return 1;
134 }
135 }
136 }
137
138 return 0;
139}
140
141void __weak mach_suspend(void)
142{
143 disable_mfgpt0_counter();
144}
145
146void __weak mach_resume(void)
147{
148 enable_mfgpt0_counter();
149}
diff --git a/arch/mips/loongson/lemote-2f/reset.c b/arch/mips/loongson/lemote-2f/reset.c
new file mode 100644
index 000000000000..51d1a60d5349
--- /dev/null
+++ b/arch/mips/loongson/lemote-2f/reset.c
@@ -0,0 +1,159 @@
1/* Board-specific reboot/shutdown routines
2 *
3 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
4 *
5 * Copyright (C) 2009 Lemote Inc.
6 * Author: Wu Zhangjin, wuzj@lemote.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
14#include <linux/io.h>
15#include <linux/delay.h>
16#include <linux/types.h>
17
18#include <asm/bootinfo.h>
19
20#include <loongson.h>
21
22#include <cs5536/cs5536.h>
23#include "ec_kb3310b.h"
24
25static void reset_cpu(void)
26{
27 /*
28 * reset cpu to full speed, this is needed when enabling cpu frequency
29 * scalling
30 */
31 LOONGSON_CHIPCFG0 |= 0x7;
32}
33
34/* reset support for fuloong2f */
35
36static void fl2f_reboot(void)
37{
38 reset_cpu();
39
40 /* send a reset signal to south bridge.
41 *
42 * NOTE: if enable "Power Management" in kernel, rtl8169 will not reset
43 * normally with this reset operation and it will not work in PMON, but
44 * you can type halt command and then reboot, seems the hardware reset
45 * logic not work normally.
46 */
47 {
48 u32 hi, lo;
49 _rdmsr(DIVIL_MSR_REG(DIVIL_SOFT_RESET), &hi, &lo);
50 lo |= 0x00000001;
51 _wrmsr(DIVIL_MSR_REG(DIVIL_SOFT_RESET), hi, lo);
52 }
53}
54
55static void fl2f_shutdown(void)
56{
57 u32 hi, lo, val;
58 int gpio_base;
59
60 /* get gpio base */
61 _rdmsr(DIVIL_MSR_REG(DIVIL_LBAR_GPIO), &hi, &lo);
62 gpio_base = lo & 0xff00;
63
64 /* make cs5536 gpio13 output enable */
65 val = inl(gpio_base + GPIOL_OUT_EN);
66 val &= ~(1 << (16 + 13));
67 val |= (1 << 13);
68 outl(val, gpio_base + GPIOL_OUT_EN);
69 mmiowb();
70 /* make cs5536 gpio13 output low level voltage. */
71 val = inl(gpio_base + GPIOL_OUT_VAL) & ~(1 << (13));
72 val |= (1 << (16 + 13));
73 outl(val, gpio_base + GPIOL_OUT_VAL);
74 mmiowb();
75}
76
77/* reset support for yeeloong2f and mengloong2f notebook */
78
79void ml2f_reboot(void)
80{
81 reset_cpu();
82
83 /* sending an reset signal to EC(embedded controller) */
84 ec_write(REG_RESET, BIT_RESET_ON);
85}
86
87#define yl2f89_reboot ml2f_reboot
88
89/* menglong(7inches) laptop has different shutdown logic from 8.9inches */
90#define EC_SHUTDOWN_IO_PORT_HIGH 0xff2d
91#define EC_SHUTDOWN_IO_PORT_LOW 0xff2e
92#define EC_SHUTDOWN_IO_PORT_DATA 0xff2f
93#define REG_SHUTDOWN_HIGH 0xFC
94#define REG_SHUTDOWN_LOW 0x29
95#define BIT_SHUTDOWN_ON (1 << 1)
96
97static void ml2f_shutdown(void)
98{
99 u8 val;
100 u64 i;
101
102 outb(REG_SHUTDOWN_HIGH, EC_SHUTDOWN_IO_PORT_HIGH);
103 outb(REG_SHUTDOWN_LOW, EC_SHUTDOWN_IO_PORT_LOW);
104 mmiowb();
105 val = inb(EC_SHUTDOWN_IO_PORT_DATA);
106 outb(val & (~BIT_SHUTDOWN_ON), EC_SHUTDOWN_IO_PORT_DATA);
107 mmiowb();
108 /* need enough wait here... how many microseconds needs? */
109 for (i = 0; i < 0x10000; i++)
110 delay();
111 outb(val | BIT_SHUTDOWN_ON, EC_SHUTDOWN_IO_PORT_DATA);
112 mmiowb();
113}
114
115static void yl2f89_shutdown(void)
116{
117 /* cpu-gpio0 output low */
118 LOONGSON_GPIODATA &= ~0x00000001;
119 /* cpu-gpio0 as output */
120 LOONGSON_GPIOIE &= ~0x00000001;
121}
122
123void mach_prepare_reboot(void)
124{
125 switch (mips_machtype) {
126 case MACH_LEMOTE_FL2F:
127 case MACH_LEMOTE_NAS:
128 case MACH_LEMOTE_LL2F:
129 fl2f_reboot();
130 break;
131 case MACH_LEMOTE_ML2F7:
132 ml2f_reboot();
133 break;
134 case MACH_LEMOTE_YL2F89:
135 yl2f89_reboot();
136 break;
137 default:
138 break;
139 }
140}
141
142void mach_prepare_shutdown(void)
143{
144 switch (mips_machtype) {
145 case MACH_LEMOTE_FL2F:
146 case MACH_LEMOTE_NAS:
147 case MACH_LEMOTE_LL2F:
148 fl2f_shutdown();
149 break;
150 case MACH_LEMOTE_ML2F7:
151 ml2f_shutdown();
152 break;
153 case MACH_LEMOTE_YL2F89:
154 yl2f89_shutdown();
155 break;
156 default:
157 break;
158 }
159}
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 454b53924490..8f2f8e9d8b21 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -35,6 +35,7 @@
35 * better performance by compiling with -msoft-float! 35 * better performance by compiling with -msoft-float!
36 */ 36 */
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/module.h>
38#include <linux/debugfs.h> 39#include <linux/debugfs.h>
39 40
40#include <asm/inst.h> 41#include <asm/inst.h>
@@ -68,7 +69,9 @@ static int fpux_emu(struct pt_regs *,
68 69
69/* Further private data for which no space exists in mips_fpu_struct */ 70/* Further private data for which no space exists in mips_fpu_struct */
70 71
71struct mips_fpu_emulator_stats fpuemustats; 72#ifdef CONFIG_DEBUG_FS
73DEFINE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
74#endif
72 75
73/* Control registers */ 76/* Control registers */
74 77
@@ -209,7 +212,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
209 unsigned int cond; 212 unsigned int cond;
210 213
211 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) { 214 if (get_user(ir, (mips_instruction __user *) xcp->cp0_epc)) {
212 fpuemustats.errors++; 215 MIPS_FPU_EMU_INC_STATS(errors);
213 return SIGBUS; 216 return SIGBUS;
214 } 217 }
215 218
@@ -240,7 +243,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
240 return SIGILL; 243 return SIGILL;
241 } 244 }
242 if (get_user(ir, (mips_instruction __user *) emulpc)) { 245 if (get_user(ir, (mips_instruction __user *) emulpc)) {
243 fpuemustats.errors++; 246 MIPS_FPU_EMU_INC_STATS(errors);
244 return SIGBUS; 247 return SIGBUS;
245 } 248 }
246 /* __compute_return_epc() will have updated cp0_epc */ 249 /* __compute_return_epc() will have updated cp0_epc */
@@ -253,16 +256,16 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
253 } 256 }
254 257
255 emul: 258 emul:
256 fpuemustats.emulated++; 259 MIPS_FPU_EMU_INC_STATS(emulated);
257 switch (MIPSInst_OPCODE(ir)) { 260 switch (MIPSInst_OPCODE(ir)) {
258 case ldc1_op:{ 261 case ldc1_op:{
259 u64 __user *va = (u64 __user *) (xcp->regs[MIPSInst_RS(ir)] + 262 u64 __user *va = (u64 __user *) (xcp->regs[MIPSInst_RS(ir)] +
260 MIPSInst_SIMM(ir)); 263 MIPSInst_SIMM(ir));
261 u64 val; 264 u64 val;
262 265
263 fpuemustats.loads++; 266 MIPS_FPU_EMU_INC_STATS(loads);
264 if (get_user(val, va)) { 267 if (get_user(val, va)) {
265 fpuemustats.errors++; 268 MIPS_FPU_EMU_INC_STATS(errors);
266 return SIGBUS; 269 return SIGBUS;
267 } 270 }
268 DITOREG(val, MIPSInst_RT(ir)); 271 DITOREG(val, MIPSInst_RT(ir));
@@ -274,10 +277,10 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
274 MIPSInst_SIMM(ir)); 277 MIPSInst_SIMM(ir));
275 u64 val; 278 u64 val;
276 279
277 fpuemustats.stores++; 280 MIPS_FPU_EMU_INC_STATS(stores);
278 DIFROMREG(val, MIPSInst_RT(ir)); 281 DIFROMREG(val, MIPSInst_RT(ir));
279 if (put_user(val, va)) { 282 if (put_user(val, va)) {
280 fpuemustats.errors++; 283 MIPS_FPU_EMU_INC_STATS(errors);
281 return SIGBUS; 284 return SIGBUS;
282 } 285 }
283 break; 286 break;
@@ -288,9 +291,9 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
288 MIPSInst_SIMM(ir)); 291 MIPSInst_SIMM(ir));
289 u32 val; 292 u32 val;
290 293
291 fpuemustats.loads++; 294 MIPS_FPU_EMU_INC_STATS(loads);
292 if (get_user(val, va)) { 295 if (get_user(val, va)) {
293 fpuemustats.errors++; 296 MIPS_FPU_EMU_INC_STATS(errors);
294 return SIGBUS; 297 return SIGBUS;
295 } 298 }
296 SITOREG(val, MIPSInst_RT(ir)); 299 SITOREG(val, MIPSInst_RT(ir));
@@ -302,10 +305,10 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
302 MIPSInst_SIMM(ir)); 305 MIPSInst_SIMM(ir));
303 u32 val; 306 u32 val;
304 307
305 fpuemustats.stores++; 308 MIPS_FPU_EMU_INC_STATS(stores);
306 SIFROMREG(val, MIPSInst_RT(ir)); 309 SIFROMREG(val, MIPSInst_RT(ir));
307 if (put_user(val, va)) { 310 if (put_user(val, va)) {
308 fpuemustats.errors++; 311 MIPS_FPU_EMU_INC_STATS(errors);
309 return SIGBUS; 312 return SIGBUS;
310 } 313 }
311 break; 314 break;
@@ -429,7 +432,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
429 432
430 if (get_user(ir, 433 if (get_user(ir,
431 (mips_instruction __user *) xcp->cp0_epc)) { 434 (mips_instruction __user *) xcp->cp0_epc)) {
432 fpuemustats.errors++; 435 MIPS_FPU_EMU_INC_STATS(errors);
433 return SIGBUS; 436 return SIGBUS;
434 } 437 }
435 438
@@ -595,7 +598,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
595{ 598{
596 unsigned rcsr = 0; /* resulting csr */ 599 unsigned rcsr = 0; /* resulting csr */
597 600
598 fpuemustats.cp1xops++; 601 MIPS_FPU_EMU_INC_STATS(cp1xops);
599 602
600 switch (MIPSInst_FMA_FFMT(ir)) { 603 switch (MIPSInst_FMA_FFMT(ir)) {
601 case s_fmt:{ /* 0 */ 604 case s_fmt:{ /* 0 */
@@ -610,9 +613,9 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
610 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] + 613 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] +
611 xcp->regs[MIPSInst_FT(ir)]); 614 xcp->regs[MIPSInst_FT(ir)]);
612 615
613 fpuemustats.loads++; 616 MIPS_FPU_EMU_INC_STATS(loads);
614 if (get_user(val, va)) { 617 if (get_user(val, va)) {
615 fpuemustats.errors++; 618 MIPS_FPU_EMU_INC_STATS(errors);
616 return SIGBUS; 619 return SIGBUS;
617 } 620 }
618 SITOREG(val, MIPSInst_FD(ir)); 621 SITOREG(val, MIPSInst_FD(ir));
@@ -622,11 +625,11 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
622 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] + 625 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] +
623 xcp->regs[MIPSInst_FT(ir)]); 626 xcp->regs[MIPSInst_FT(ir)]);
624 627
625 fpuemustats.stores++; 628 MIPS_FPU_EMU_INC_STATS(stores);
626 629
627 SIFROMREG(val, MIPSInst_FS(ir)); 630 SIFROMREG(val, MIPSInst_FS(ir));
628 if (put_user(val, va)) { 631 if (put_user(val, va)) {
629 fpuemustats.errors++; 632 MIPS_FPU_EMU_INC_STATS(errors);
630 return SIGBUS; 633 return SIGBUS;
631 } 634 }
632 break; 635 break;
@@ -687,9 +690,9 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
687 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] + 690 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] +
688 xcp->regs[MIPSInst_FT(ir)]); 691 xcp->regs[MIPSInst_FT(ir)]);
689 692
690 fpuemustats.loads++; 693 MIPS_FPU_EMU_INC_STATS(loads);
691 if (get_user(val, va)) { 694 if (get_user(val, va)) {
692 fpuemustats.errors++; 695 MIPS_FPU_EMU_INC_STATS(errors);
693 return SIGBUS; 696 return SIGBUS;
694 } 697 }
695 DITOREG(val, MIPSInst_FD(ir)); 698 DITOREG(val, MIPSInst_FD(ir));
@@ -699,10 +702,10 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
699 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] + 702 va = (void __user *) (xcp->regs[MIPSInst_FR(ir)] +
700 xcp->regs[MIPSInst_FT(ir)]); 703 xcp->regs[MIPSInst_FT(ir)]);
701 704
702 fpuemustats.stores++; 705 MIPS_FPU_EMU_INC_STATS(stores);
703 DIFROMREG(val, MIPSInst_FS(ir)); 706 DIFROMREG(val, MIPSInst_FS(ir));
704 if (put_user(val, va)) { 707 if (put_user(val, va)) {
705 fpuemustats.errors++; 708 MIPS_FPU_EMU_INC_STATS(errors);
706 return SIGBUS; 709 return SIGBUS;
707 } 710 }
708 break; 711 break;
@@ -769,7 +772,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
769#endif 772#endif
770 } rv; /* resulting value */ 773 } rv; /* resulting value */
771 774
772 fpuemustats.cp1ops++; 775 MIPS_FPU_EMU_INC_STATS(cp1ops);
773 switch (rfmt = (MIPSInst_FFMT(ir) & 0xf)) { 776 switch (rfmt = (MIPSInst_FFMT(ir) & 0xf)) {
774 case s_fmt:{ /* 0 */ 777 case s_fmt:{ /* 0 */
775 union { 778 union {
@@ -1240,7 +1243,7 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1240 prevepc = xcp->cp0_epc; 1243 prevepc = xcp->cp0_epc;
1241 1244
1242 if (get_user(insn, (mips_instruction __user *) xcp->cp0_epc)) { 1245 if (get_user(insn, (mips_instruction __user *) xcp->cp0_epc)) {
1243 fpuemustats.errors++; 1246 MIPS_FPU_EMU_INC_STATS(errors);
1244 return SIGBUS; 1247 return SIGBUS;
1245 } 1248 }
1246 if (insn == 0) 1249 if (insn == 0)
@@ -1276,33 +1279,50 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1276} 1279}
1277 1280
1278#ifdef CONFIG_DEBUG_FS 1281#ifdef CONFIG_DEBUG_FS
1282
1283static int fpuemu_stat_get(void *data, u64 *val)
1284{
1285 int cpu;
1286 unsigned long sum = 0;
1287 for_each_online_cpu(cpu) {
1288 struct mips_fpu_emulator_stats *ps;
1289 local_t *pv;
1290 ps = &per_cpu(fpuemustats, cpu);
1291 pv = (void *)ps + (unsigned long)data;
1292 sum += local_read(pv);
1293 }
1294 *val = sum;
1295 return 0;
1296}
1297DEFINE_SIMPLE_ATTRIBUTE(fops_fpuemu_stat, fpuemu_stat_get, NULL, "%llu\n");
1298
1279extern struct dentry *mips_debugfs_dir; 1299extern struct dentry *mips_debugfs_dir;
1280static int __init debugfs_fpuemu(void) 1300static int __init debugfs_fpuemu(void)
1281{ 1301{
1282 struct dentry *d, *dir; 1302 struct dentry *d, *dir;
1283 int i;
1284 static struct {
1285 const char *name;
1286 unsigned int *v;
1287 } vars[] __initdata = {
1288 { "emulated", &fpuemustats.emulated },
1289 { "loads", &fpuemustats.loads },
1290 { "stores", &fpuemustats.stores },
1291 { "cp1ops", &fpuemustats.cp1ops },
1292 { "cp1xops", &fpuemustats.cp1xops },
1293 { "errors", &fpuemustats.errors },
1294 };
1295 1303
1296 if (!mips_debugfs_dir) 1304 if (!mips_debugfs_dir)
1297 return -ENODEV; 1305 return -ENODEV;
1298 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir); 1306 dir = debugfs_create_dir("fpuemustats", mips_debugfs_dir);
1299 if (!dir) 1307 if (!dir)
1300 return -ENOMEM; 1308 return -ENOMEM;
1301 for (i = 0; i < ARRAY_SIZE(vars); i++) { 1309
1302 d = debugfs_create_u32(vars[i].name, S_IRUGO, dir, vars[i].v); 1310#define FPU_STAT_CREATE(M) \
1303 if (!d) 1311 do { \
1304 return -ENOMEM; 1312 d = debugfs_create_file(#M , S_IRUGO, dir, \
1305 } 1313 (void *)offsetof(struct mips_fpu_emulator_stats, M), \
1314 &fops_fpuemu_stat); \
1315 if (!d) \
1316 return -ENOMEM; \
1317 } while (0)
1318
1319 FPU_STAT_CREATE(emulated);
1320 FPU_STAT_CREATE(loads);
1321 FPU_STAT_CREATE(stores);
1322 FPU_STAT_CREATE(cp1ops);
1323 FPU_STAT_CREATE(cp1xops);
1324 FPU_STAT_CREATE(errors);
1325
1306 return 0; 1326 return 0;
1307} 1327}
1308__initcall(debugfs_fpuemu); 1328__initcall(debugfs_fpuemu);
diff --git a/arch/mips/math-emu/dp_sub.c b/arch/mips/math-emu/dp_sub.c
index b30c5b1f1a2c..a2127d685a0d 100644
--- a/arch/mips/math-emu/dp_sub.c
+++ b/arch/mips/math-emu/dp_sub.c
@@ -110,7 +110,7 @@ ieee754dp ieee754dp_sub(ieee754dp x, ieee754dp y)
110 110
111 case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_DNORM): 111 case CLPAIR(IEEE754_CLASS_DNORM, IEEE754_CLASS_DNORM):
112 DPDNORMX; 112 DPDNORMX;
113 /* FAAL THOROUGH */ 113 /* FALL THROUGH */
114 114
115 case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_DNORM): 115 case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_DNORM):
116 /* normalize ym,ye */ 116 /* normalize ym,ye */
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c
index df7b9d928efc..36d975ae08f8 100644
--- a/arch/mips/math-emu/dsemul.c
+++ b/arch/mips/math-emu/dsemul.c
@@ -98,7 +98,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
98 err |= __put_user(cpc, &fr->epc); 98 err |= __put_user(cpc, &fr->epc);
99 99
100 if (unlikely(err)) { 100 if (unlikely(err)) {
101 fpuemustats.errors++; 101 MIPS_FPU_EMU_INC_STATS(errors);
102 return SIGBUS; 102 return SIGBUS;
103 } 103 }
104 104
@@ -136,7 +136,7 @@ int do_dsemulret(struct pt_regs *xcp)
136 err |= __get_user(cookie, &fr->cookie); 136 err |= __get_user(cookie, &fr->cookie);
137 137
138 if (unlikely(err || (insn != BREAK_MATH) || (cookie != BD_COOKIE))) { 138 if (unlikely(err || (insn != BREAK_MATH) || (cookie != BD_COOKIE))) {
139 fpuemustats.errors++; 139 MIPS_FPU_EMU_INC_STATS(errors);
140 return 0; 140 return 0;
141 } 141 }
142 142
diff --git a/arch/mips/mipssim/Makefile b/arch/mips/mipssim/Makefile
index 57f43c1c7882..41b96571315e 100644
--- a/arch/mips/mipssim/Makefile
+++ b/arch/mips/mipssim/Makefile
@@ -17,8 +17,7 @@
17# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 17# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18# 18#
19 19
20obj-y := sim_platform.o sim_setup.o sim_mem.o sim_time.o sim_int.o \ 20obj-y := sim_platform.o sim_setup.o sim_mem.o sim_time.o sim_int.o
21 sim_cmdline.o
22 21
23obj-$(CONFIG_EARLY_PRINTK) += sim_console.o 22obj-$(CONFIG_EARLY_PRINTK) += sim_console.o
24obj-$(CONFIG_MIPS_MT_SMTC) += sim_smtc.o 23obj-$(CONFIG_MIPS_MT_SMTC) += sim_smtc.o
diff --git a/arch/mips/mipssim/sim_setup.c b/arch/mips/mipssim/sim_setup.c
index 2877675c5f0d..0824f6af4777 100644
--- a/arch/mips/mipssim/sim_setup.c
+++ b/arch/mips/mipssim/sim_setup.c
@@ -61,7 +61,6 @@ void __init prom_init(void)
61 set_io_port_base(0xbfd00000); 61 set_io_port_base(0xbfd00000);
62 62
63 pr_info("\nLINUX started...\n"); 63 pr_info("\nLINUX started...\n");
64 prom_init_cmdline();
65 prom_meminit(); 64 prom_meminit();
66 65
67#ifdef CONFIG_MIPS_MT_SMP 66#ifdef CONFIG_MIPS_MT_SMP
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 694d51f523d1..102b2dfa542a 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -194,7 +194,7 @@ void __devinit cpu_cache_init(void)
194 194
195int __weak __uncached_access(struct file *file, unsigned long addr) 195int __weak __uncached_access(struct file *file, unsigned long addr)
196{ 196{
197 if (file->f_flags & O_SYNC) 197 if (file->f_flags & O_DSYNC)
198 return 1; 198 return 1;
199 199
200 return addr >= __pa(high_memory); 200 return addr >= __pa(high_memory);
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c
index 1bd1f18ac23c..3571090ba178 100644
--- a/arch/mips/mm/cerr-sb1.c
+++ b/arch/mips/mm/cerr-sb1.c
@@ -567,13 +567,10 @@ static uint32_t extract_dc(unsigned short addr, int data)
567 datalo = ((unsigned long long)datalohi << 32) | datalolo; 567 datalo = ((unsigned long long)datalohi << 32) | datalolo;
568 ecc = dc_ecc(datalo); 568 ecc = dc_ecc(datalo);
569 if (ecc != datahi) { 569 if (ecc != datahi) {
570 int bits = 0; 570 int bits;
571 bad_ecc |= 1 << (3-offset); 571 bad_ecc |= 1 << (3-offset);
572 ecc ^= datahi; 572 ecc ^= datahi;
573 while (ecc) { 573 bits = hweight8(ecc);
574 if (ecc & 1) bits++;
575 ecc >>= 1;
576 }
577 res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE; 574 res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE;
578 } 575 }
579 printk(" %02X-%016llX", datahi, datalo); 576 printk(" %02X-%016llX", datahi, datalo);
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 8d1f4f363049..9e8d00389eef 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -462,7 +462,9 @@ void __init_refok free_initmem(void)
462 __pa_symbol(&__init_end)); 462 __pa_symbol(&__init_end));
463} 463}
464 464
465#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
465unsigned long pgd_current[NR_CPUS]; 466unsigned long pgd_current[NR_CPUS];
467#endif
466/* 468/*
467 * On 64-bit we've got three-level pagetables with a slightly 469 * On 64-bit we've got three-level pagetables with a slightly
468 * different layout ... 470 * different layout ...
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index bb1719a55d22..3d0baa4a842d 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -160,6 +160,12 @@ static u32 tlb_handler[128] __cpuinitdata;
160static struct uasm_label labels[128] __cpuinitdata; 160static struct uasm_label labels[128] __cpuinitdata;
161static struct uasm_reloc relocs[128] __cpuinitdata; 161static struct uasm_reloc relocs[128] __cpuinitdata;
162 162
163#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
164/*
165 * CONFIG_MIPS_PGD_C0_CONTEXT implies 64 bit and lack of pgd_current,
166 * we cannot do r3000 under these circumstances.
167 */
168
163/* 169/*
164 * The R3000 TLB handler is simple. 170 * The R3000 TLB handler is simple.
165 */ 171 */
@@ -199,6 +205,7 @@ static void __cpuinit build_r3000_tlb_refill_handler(void)
199 205
200 dump_handler((u32 *)ebase, 32); 206 dump_handler((u32 *)ebase, 32);
201} 207}
208#endif /* CONFIG_MIPS_PGD_C0_CONTEXT */
202 209
203/* 210/*
204 * The R4000 TLB handler is much more complicated. We have two 211 * The R4000 TLB handler is much more complicated. We have two
@@ -497,8 +504,9 @@ static void __cpuinit
497build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, 504build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
498 unsigned int tmp, unsigned int ptr) 505 unsigned int tmp, unsigned int ptr)
499{ 506{
507#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
500 long pgdc = (long)pgd_current; 508 long pgdc = (long)pgd_current;
501 509#endif
502 /* 510 /*
503 * The vmalloc handling is not in the hotpath. 511 * The vmalloc handling is not in the hotpath.
504 */ 512 */
@@ -506,7 +514,15 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
506 uasm_il_bltz(p, r, tmp, label_vmalloc); 514 uasm_il_bltz(p, r, tmp, label_vmalloc);
507 /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ 515 /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */
508 516
509#ifdef CONFIG_SMP 517#ifdef CONFIG_MIPS_PGD_C0_CONTEXT
518 /*
519 * &pgd << 11 stored in CONTEXT [23..63].
520 */
521 UASM_i_MFC0(p, ptr, C0_CONTEXT);
522 uasm_i_dins(p, ptr, 0, 0, 23); /* Clear lower 23 bits of context. */
523 uasm_i_ori(p, ptr, ptr, 0x540); /* 1 0 1 0 1 << 6 xkphys cached */
524 uasm_i_drotr(p, ptr, ptr, 11);
525#elif defined(CONFIG_SMP)
510# ifdef CONFIG_MIPS_MT_SMTC 526# ifdef CONFIG_MIPS_MT_SMTC
511 /* 527 /*
512 * SMTC uses TCBind value as "CPU" index 528 * SMTC uses TCBind value as "CPU" index
@@ -520,7 +536,7 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
520 */ 536 */
521 uasm_i_dmfc0(p, ptr, C0_CONTEXT); 537 uasm_i_dmfc0(p, ptr, C0_CONTEXT);
522 uasm_i_dsrl(p, ptr, ptr, 23); 538 uasm_i_dsrl(p, ptr, ptr, 23);
523#endif 539# endif
524 UASM_i_LA_mostly(p, tmp, pgdc); 540 UASM_i_LA_mostly(p, tmp, pgdc);
525 uasm_i_daddu(p, ptr, ptr, tmp); 541 uasm_i_daddu(p, ptr, ptr, tmp);
526 uasm_i_dmfc0(p, tmp, C0_BADVADDR); 542 uasm_i_dmfc0(p, tmp, C0_BADVADDR);
@@ -1033,6 +1049,7 @@ build_pte_modifiable(u32 **p, struct uasm_reloc **r,
1033 iPTE_LW(p, pte, ptr); 1049 iPTE_LW(p, pte, ptr);
1034} 1050}
1035 1051
1052#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
1036/* 1053/*
1037 * R3000 style TLB load/store/modify handlers. 1054 * R3000 style TLB load/store/modify handlers.
1038 */ 1055 */
@@ -1184,6 +1201,7 @@ static void __cpuinit build_r3000_tlb_modify_handler(void)
1184 1201
1185 dump_handler(handle_tlbm, ARRAY_SIZE(handle_tlbm)); 1202 dump_handler(handle_tlbm, ARRAY_SIZE(handle_tlbm));
1186} 1203}
1204#endif /* CONFIG_MIPS_PGD_C0_CONTEXT */
1187 1205
1188/* 1206/*
1189 * R4000 style TLB load/store/modify handlers. 1207 * R4000 style TLB load/store/modify handlers.
@@ -1400,6 +1418,7 @@ void __cpuinit build_tlb_refill_handler(void)
1400 case CPU_TX3912: 1418 case CPU_TX3912:
1401 case CPU_TX3922: 1419 case CPU_TX3922:
1402 case CPU_TX3927: 1420 case CPU_TX3927:
1421#ifndef CONFIG_MIPS_PGD_C0_CONTEXT
1403 build_r3000_tlb_refill_handler(); 1422 build_r3000_tlb_refill_handler();
1404 if (!run_once) { 1423 if (!run_once) {
1405 build_r3000_tlb_load_handler(); 1424 build_r3000_tlb_load_handler();
@@ -1407,6 +1426,9 @@ void __cpuinit build_tlb_refill_handler(void)
1407 build_r3000_tlb_modify_handler(); 1426 build_r3000_tlb_modify_handler();
1408 run_once++; 1427 run_once++;
1409 } 1428 }
1429#else
1430 panic("No R3000 TLB refill handler");
1431#endif
1410 break; 1432 break;
1411 1433
1412 case CPU_R6000: 1434 case CPU_R6000:
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index f467199676a8..0a165c5179a1 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -60,11 +60,11 @@ enum opcode {
60 insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl, 60 insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl,
61 insn_bne, insn_cache, insn_daddu, insn_daddiu, insn_dmfc0, 61 insn_bne, insn_cache, insn_daddu, insn_daddiu, insn_dmfc0,
62 insn_dmtc0, insn_dsll, insn_dsll32, insn_dsra, insn_dsrl, 62 insn_dmtc0, insn_dsll, insn_dsll32, insn_dsra, insn_dsrl,
63 insn_dsrl32, insn_dsubu, insn_eret, insn_j, insn_jal, insn_jr, 63 insn_dsrl32, insn_drotr, insn_dsubu, insn_eret, insn_j, insn_jal,
64 insn_ld, insn_ll, insn_lld, insn_lui, insn_lw, insn_mfc0, 64 insn_jr, insn_ld, insn_ll, insn_lld, insn_lui, insn_lw, insn_mfc0,
65 insn_mtc0, insn_ori, insn_pref, insn_rfe, insn_sc, insn_scd, 65 insn_mtc0, insn_ori, insn_pref, insn_rfe, insn_sc, insn_scd,
66 insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw, 66 insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw,
67 insn_tlbp, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori 67 insn_tlbp, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, insn_dins
68}; 68};
69 69
70struct insn { 70struct insn {
@@ -104,6 +104,7 @@ static struct insn insn_table[] __cpuinitdata = {
104 { insn_dsra, M(spec_op, 0, 0, 0, 0, dsra_op), RT | RD | RE }, 104 { insn_dsra, M(spec_op, 0, 0, 0, 0, dsra_op), RT | RD | RE },
105 { insn_dsrl, M(spec_op, 0, 0, 0, 0, dsrl_op), RT | RD | RE }, 105 { insn_dsrl, M(spec_op, 0, 0, 0, 0, dsrl_op), RT | RD | RE },
106 { insn_dsrl32, M(spec_op, 0, 0, 0, 0, dsrl32_op), RT | RD | RE }, 106 { insn_dsrl32, M(spec_op, 0, 0, 0, 0, dsrl32_op), RT | RD | RE },
107 { insn_drotr, M(spec_op, 1, 0, 0, 0, dsrl_op), RT | RD | RE },
107 { insn_dsubu, M(spec_op, 0, 0, 0, 0, dsubu_op), RS | RT | RD }, 108 { insn_dsubu, M(spec_op, 0, 0, 0, 0, dsubu_op), RS | RT | RD },
108 { insn_eret, M(cop0_op, cop_op, 0, 0, 0, eret_op), 0 }, 109 { insn_eret, M(cop0_op, cop_op, 0, 0, 0, eret_op), 0 },
109 { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM }, 110 { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM },
@@ -132,6 +133,7 @@ static struct insn insn_table[] __cpuinitdata = {
132 { insn_tlbwr, M(cop0_op, cop_op, 0, 0, 0, tlbwr_op), 0 }, 133 { insn_tlbwr, M(cop0_op, cop_op, 0, 0, 0, tlbwr_op), 0 },
133 { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, 134 { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD },
134 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, 135 { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
136 { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE },
135 { insn_invalid, 0, 0 } 137 { insn_invalid, 0, 0 }
136}; 138};
137 139
@@ -304,6 +306,12 @@ Ip_u2u1s3(op) \
304 build_insn(buf, insn##op, b, a, c); \ 306 build_insn(buf, insn##op, b, a, c); \
305} 307}
306 308
309#define I_u2u1msbu3(op) \
310Ip_u2u1msbu3(op) \
311{ \
312 build_insn(buf, insn##op, b, a, c+d-1, c); \
313}
314
307#define I_u1u2(op) \ 315#define I_u1u2(op) \
308Ip_u1u2(op) \ 316Ip_u1u2(op) \
309{ \ 317{ \
@@ -349,6 +357,7 @@ I_u2u1u3(_dsll32)
349I_u2u1u3(_dsra) 357I_u2u1u3(_dsra)
350I_u2u1u3(_dsrl) 358I_u2u1u3(_dsrl)
351I_u2u1u3(_dsrl32) 359I_u2u1u3(_dsrl32)
360I_u2u1u3(_drotr)
352I_u3u1u2(_dsubu) 361I_u3u1u2(_dsubu)
353I_0(_eret) 362I_0(_eret)
354I_u1(_j) 363I_u1(_j)
@@ -377,6 +386,7 @@ I_0(_tlbwi)
377I_0(_tlbwr) 386I_0(_tlbwr)
378I_u3u1u2(_xor) 387I_u3u1u2(_xor)
379I_u2u1u3(_xori) 388I_u2u1u3(_xori)
389I_u2u1msbu3(_dins);
380 390
381/* Handle labels. */ 391/* Handle labels. */
382void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) 392void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid)
diff --git a/arch/mips/mm/uasm.h b/arch/mips/mm/uasm.h
index c6d1e3dd82d4..3d153edaa51e 100644
--- a/arch/mips/mm/uasm.h
+++ b/arch/mips/mm/uasm.h
@@ -34,6 +34,11 @@ uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c)
34void __cpuinit \ 34void __cpuinit \
35uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) 35uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c)
36 36
37#define Ip_u2u1msbu3(op) \
38void __cpuinit \
39uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c, \
40 unsigned int d)
41
37#define Ip_u1u2(op) \ 42#define Ip_u1u2(op) \
38void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b) 43void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b)
39 44
@@ -65,6 +70,7 @@ Ip_u2u1u3(_dsll32);
65Ip_u2u1u3(_dsra); 70Ip_u2u1u3(_dsra);
66Ip_u2u1u3(_dsrl); 71Ip_u2u1u3(_dsrl);
67Ip_u2u1u3(_dsrl32); 72Ip_u2u1u3(_dsrl32);
73Ip_u2u1u3(_drotr);
68Ip_u3u1u2(_dsubu); 74Ip_u3u1u2(_dsubu);
69Ip_0(_eret); 75Ip_0(_eret);
70Ip_u1(_j); 76Ip_u1(_j);
@@ -93,6 +99,7 @@ Ip_0(_tlbwi);
93Ip_0(_tlbwr); 99Ip_0(_tlbwr);
94Ip_u3u1u2(_xor); 100Ip_u3u1u2(_xor);
95Ip_u2u1u3(_xori); 101Ip_u2u1u3(_xori);
102Ip_u2u1msbu3(_dins);
96 103
97/* Handle labels. */ 104/* Handle labels. */
98struct uasm_label { 105struct uasm_label {
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index 9035c64bc5ed..b27419c84919 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -55,7 +55,7 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
55 char *memsize_str; 55 char *memsize_str;
56 unsigned int memsize; 56 unsigned int memsize;
57 char *ptr; 57 char *ptr;
58 static char cmdline[CL_SIZE] __initdata; 58 static char cmdline[COMMAND_LINE_SIZE] __initdata;
59 59
60 /* otherwise look in the environment */ 60 /* otherwise look in the environment */
61 memsize_str = prom_getenv("memsize"); 61 memsize_str = prom_getenv("memsize");
diff --git a/arch/mips/nxp/pnx833x/common/interrupts.c b/arch/mips/nxp/pnx833x/common/interrupts.c
index 30533ba200e2..3a467c04f811 100644
--- a/arch/mips/nxp/pnx833x/common/interrupts.c
+++ b/arch/mips/nxp/pnx833x/common/interrupts.c
@@ -295,7 +295,7 @@ static int pnx833x_set_type_gpio_irq(unsigned int irq, unsigned int flow_type)
295} 295}
296 296
297static struct irq_chip pnx833x_pic_irq_type = { 297static struct irq_chip pnx833x_pic_irq_type = {
298 .typename = "PNX-PIC", 298 .name = "PNX-PIC",
299 .startup = pnx833x_startup_pic_irq, 299 .startup = pnx833x_startup_pic_irq,
300 .shutdown = pnx833x_shutdown_pic_irq, 300 .shutdown = pnx833x_shutdown_pic_irq,
301 .enable = pnx833x_enable_pic_irq, 301 .enable = pnx833x_enable_pic_irq,
@@ -305,7 +305,7 @@ static struct irq_chip pnx833x_pic_irq_type = {
305}; 305};
306 306
307static struct irq_chip pnx833x_gpio_irq_type = { 307static struct irq_chip pnx833x_gpio_irq_type = {
308 .typename = "PNX-GPIO", 308 .name = "PNX-GPIO",
309 .startup = pnx833x_startup_gpio_irq, 309 .startup = pnx833x_startup_gpio_irq,
310 .shutdown = pnx833x_disable_gpio_irq, 310 .shutdown = pnx833x_disable_gpio_irq,
311 .enable = pnx833x_enable_gpio_irq, 311 .enable = pnx833x_enable_gpio_irq,
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c
index 575cd1473475..475ff46712ab 100644
--- a/arch/mips/oprofile/op_model_loongson2.c
+++ b/arch/mips/oprofile/op_model_loongson2.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Loongson2 performance counter driver for oprofile 2 * Loongson2 performance counter driver for oprofile
3 * 3 *
4 * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology 4 * Copyright (C) 2009 Lemote Inc.
5 * Author: Yanhua <yanh@lemote.com> 5 * Author: Yanhua <yanh@lemote.com>
6 * Author: Wu Zhangjin <wuzj@lemote.com> 6 * Author: Wu Zhangjin <wuzj@lemote.com>
7 * 7 *
@@ -125,6 +125,9 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
125 */ 125 */
126 126
127 /* Check whether the irq belongs to me */ 127 /* Check whether the irq belongs to me */
128 enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
129 if (!enabled)
130 return IRQ_NONE;
128 enabled = reg.cnt1_enabled | reg.cnt2_enabled; 131 enabled = reg.cnt1_enabled | reg.cnt2_enabled;
129 if (!enabled) 132 if (!enabled)
130 return IRQ_NONE; 133 return IRQ_NONE;
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index 91bfe73a7f60..c9209ca6c8e7 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -22,13 +22,13 @@ obj-$(CONFIG_BCM63XX) += pci-bcm63xx.o fixup-bcm63xx.o \
22# 22#
23# These are still pretty much in the old state, watch, go blind. 23# These are still pretty much in the old state, watch, go blind.
24# 24#
25obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o
26obj-$(CONFIG_LASAT) += pci-lasat.o 25obj-$(CONFIG_LASAT) += pci-lasat.o
27obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o 26obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
28obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o 27obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o
29obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o 28obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o
30obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o 29obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o
31obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-bonito64.o 30obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-loongson2.o
31obj-$(CONFIG_LEMOTE_MACH2F) += fixup-lemote2f.o ops-loongson2.o
32obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o 32obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o
33obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o 33obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o
34obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o 34obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o
diff --git a/arch/mips/pci/fixup-excite.c b/arch/mips/pci/fixup-excite.c
deleted file mode 100644
index cd64d9f177c4..000000000000
--- a/arch/mips/pci/fixup-excite.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (C) 2004 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
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#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/pci.h>
22#include <excite.h>
23
24int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25{
26 if (pin == 0)
27 return -1;
28
29 return USB_IRQ; /* USB controller is the only PCI device */
30}
31
32/* Do platform specific device initialization at pci_enable_device() time */
33int pcibios_plat_dev_init(struct pci_dev *dev)
34{
35 return 0;
36}
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c
index 0c4c7a81213f..4f6d8da07f93 100644
--- a/arch/mips/pci/fixup-fuloong2e.c
+++ b/arch/mips/pci/fixup-fuloong2e.c
@@ -13,7 +13,8 @@
13 */ 13 */
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/pci.h> 15#include <linux/pci.h>
16#include <asm/mips-boards/bonito64.h> 16
17#include <loongson.h>
17 18
18/* South bridge slot number is set by the pci probe process */ 19/* South bridge slot number is set by the pci probe process */
19static u8 sb_slot = 5; 20static u8 sb_slot = 5;
@@ -35,7 +36,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
35 break; 36 break;
36 } 37 }
37 } else { 38 } else {
38 irq = BONITO_IRQ_BASE + 25 + pin; 39 irq = LOONGSON_IRQ_BASE + 25 + pin;
39 } 40 }
40 return irq; 41 return irq;
41 42
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c
new file mode 100644
index 000000000000..caf2edeb02f0
--- /dev/null
+++ b/arch/mips/pci/fixup-lemote2f.c
@@ -0,0 +1,160 @@
1/*
2 * Copyright (C) 2008 Lemote Technology
3 * Copyright (C) 2004 ICT CAS
4 * Author: Li xiaoyu, lixy@ict.ac.cn
5 *
6 * Copyright (C) 2007 Lemote, Inc.
7 * Author: Fuxin Zhang, zhangfx@lemote.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#include <linux/init.h>
15#include <linux/pci.h>
16
17#include <loongson.h>
18#include <cs5536/cs5536.h>
19#include <cs5536/cs5536_pci.h>
20
21/* PCI interrupt pins
22 *
23 * These should not be changed, or you should consider loongson2f interrupt
24 * register and your pci card dispatch
25 */
26
27#define PCIA 4
28#define PCIB 5
29#define PCIC 6
30#define PCID 7
31
32/* all the pci device has the PCIA pin, check the datasheet. */
33static char irq_tab[][5] __initdata = {
34 /* INTA INTB INTC INTD */
35 {0, 0, 0, 0, 0}, /* 11: Unused */
36 {0, 0, 0, 0, 0}, /* 12: Unused */
37 {0, 0, 0, 0, 0}, /* 13: Unused */
38 {0, 0, 0, 0, 0}, /* 14: Unused */
39 {0, 0, 0, 0, 0}, /* 15: Unused */
40 {0, 0, 0, 0, 0}, /* 16: Unused */
41 {0, PCIA, 0, 0, 0}, /* 17: RTL8110-0 */
42 {0, PCIB, 0, 0, 0}, /* 18: RTL8110-1 */
43 {0, PCIC, 0, 0, 0}, /* 19: SiI3114 */
44 {0, PCID, 0, 0, 0}, /* 20: 3-ports nec usb */
45 {0, PCIA, PCIB, PCIC, PCID}, /* 21: PCI-SLOT */
46 {0, 0, 0, 0, 0}, /* 22: Unused */
47 {0, 0, 0, 0, 0}, /* 23: Unused */
48 {0, 0, 0, 0, 0}, /* 24: Unused */
49 {0, 0, 0, 0, 0}, /* 25: Unused */
50 {0, 0, 0, 0, 0}, /* 26: Unused */
51 {0, 0, 0, 0, 0}, /* 27: Unused */
52};
53
54int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
55{
56 int virq;
57
58 if ((PCI_SLOT(dev->devfn) != PCI_IDSEL_CS5536)
59 && (PCI_SLOT(dev->devfn) < 32)) {
60 virq = irq_tab[slot][pin];
61 printk(KERN_INFO "slot: %d, pin: %d, irq: %d\n", slot, pin,
62 virq + LOONGSON_IRQ_BASE);
63 if (virq != 0)
64 return LOONGSON_IRQ_BASE + virq;
65 else
66 return 0;
67 } else if (PCI_SLOT(dev->devfn) == PCI_IDSEL_CS5536) { /* cs5536 */
68 switch (PCI_FUNC(dev->devfn)) {
69 case 2:
70 pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
71 CS5536_IDE_INTR);
72 return CS5536_IDE_INTR; /* for IDE */
73 case 3:
74 pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
75 CS5536_ACC_INTR);
76 return CS5536_ACC_INTR; /* for AUDIO */
77 case 4: /* for OHCI */
78 case 5: /* for EHCI */
79 case 6: /* for UDC */
80 case 7: /* for OTG */
81 pci_write_config_byte(dev, PCI_INTERRUPT_LINE,
82 CS5536_USB_INTR);
83 return CS5536_USB_INTR;
84 }
85 return dev->irq;
86 } else {
87 printk(KERN_INFO " strange pci slot number.\n");
88 return 0;
89 }
90}
91
92/* Do platform specific device initialization at pci_enable_device() time */
93int pcibios_plat_dev_init(struct pci_dev *dev)
94{
95 return 0;
96}
97
98/* CS5536 SPEC. fixup */
99static void __init loongson_cs5536_isa_fixup(struct pci_dev *pdev)
100{
101 /* the uart1 and uart2 interrupt in PIC is enabled as default */
102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1);
103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1);
104}
105
106static void __init loongson_cs5536_ide_fixup(struct pci_dev *pdev)
107{
108 /* setting the mutex pin as IDE function */
109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG,
110 CS5536_IDE_FLASH_SIGNATURE);
111}
112
113static void __init loongson_cs5536_acc_fixup(struct pci_dev *pdev)
114{
115 /* enable the AUDIO interrupt in PIC */
116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1);
117
118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0);
119}
120
121static void __init loongson_cs5536_ohci_fixup(struct pci_dev *pdev)
122{
123 /* enable the OHCI interrupt in PIC */
124 /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */
125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1);
126}
127
128static void __init loongson_cs5536_ehci_fixup(struct pci_dev *pdev)
129{
130 u32 hi, lo;
131
132 /* Serial short detect enable */
133 _rdmsr(USB_MSR_REG(USB_CONFIG), &hi, &lo);
134 _wrmsr(USB_MSR_REG(USB_CONFIG), (1 << 1) | (1 << 2) | (1 << 3), lo);
135
136 /* setting the USB2.0 micro frame length */
137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000);
138}
139
140static void __init loongson_nec_fixup(struct pci_dev *pdev)
141{
142 unsigned int val;
143
144 pci_read_config_dword(pdev, 0xe0, &val);
145 /* Only 2 port be used */
146 pci_write_config_dword(pdev, 0xe0, (val & ~3) | 0x2);
147}
148
149DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA,
150 loongson_cs5536_isa_fixup);
151DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_OHC,
152 loongson_cs5536_ohci_fixup);
153DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_EHC,
154 loongson_cs5536_ehci_fixup);
155DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO,
156 loongson_cs5536_acc_fixup);
157DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE,
158 loongson_cs5536_ide_fixup);
159DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
160 loongson_nec_fixup);
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c
index 54e55e7a2431..1b3e03f20c54 100644
--- a/arch/mips/pci/ops-bonito64.c
+++ b/arch/mips/pci/ops-bonito64.c
@@ -29,13 +29,8 @@
29#define PCI_ACCESS_READ 0 29#define PCI_ACCESS_READ 0
30#define PCI_ACCESS_WRITE 1 30#define PCI_ACCESS_WRITE 1
31 31
32#ifdef CONFIG_LEMOTE_FULOONG2E
33#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset))
34#define ID_SEL_BEGIN 11
35#else
36#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset)) 32#define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset))
37#define ID_SEL_BEGIN 10 33#define ID_SEL_BEGIN 10
38#endif
39#define MAX_DEV_NUM (31 - ID_SEL_BEGIN) 34#define MAX_DEV_NUM (31 - ID_SEL_BEGIN)
40 35
41 36
@@ -77,10 +72,8 @@ static int bonito64_pcibios_config_access(unsigned char access_type,
77 addrp = CFG_SPACE_REG(addr & 0xffff); 72 addrp = CFG_SPACE_REG(addr & 0xffff);
78 if (access_type == PCI_ACCESS_WRITE) { 73 if (access_type == PCI_ACCESS_WRITE) {
79 writel(cpu_to_le32(*data), addrp); 74 writel(cpu_to_le32(*data), addrp);
80#ifndef CONFIG_LEMOTE_FULOONG2E
81 /* Wait till done */ 75 /* Wait till done */
82 while (BONITO_PCIMSTAT & 0xF); 76 while (BONITO_PCIMSTAT & 0xF);
83#endif
84 } else { 77 } else {
85 *data = le32_to_cpu(readl(addrp)); 78 *data = le32_to_cpu(readl(addrp));
86 } 79 }
diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c
new file mode 100644
index 000000000000..aa5d3da27212
--- /dev/null
+++ b/arch/mips/pci/ops-loongson2.c
@@ -0,0 +1,208 @@
1/*
2 * fuloong2e specific PCI support.
3 *
4 * Copyright (C) 1999, 2000, 2004 MIPS Technologies, Inc.
5 * All rights reserved.
6 * Authors: Carsten Langgaard <carstenl@mips.com>
7 * Maciej W. Rozycki <macro@mips.com>
8 *
9 * Copyright (C) 2009 Lemote Inc.
10 * Author: Wu Zhangjin <wuzj@lemote.com>
11 *
12 * This program is free software; you can distribute it and/or modify it
13 * under the terms of the GNU General Public License (Version 2) as
14 * published by the Free Software Foundation.
15 */
16#include <linux/types.h>
17#include <linux/pci.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20
21#include <loongson.h>
22
23#ifdef CONFIG_CS5536
24#include <cs5536/cs5536_pci.h>
25#include <cs5536/cs5536.h>
26#endif
27
28#define PCI_ACCESS_READ 0
29#define PCI_ACCESS_WRITE 1
30
31#define CFG_SPACE_REG(offset) \
32 (void *)CKSEG1ADDR(LOONGSON_PCICFG_BASE | (offset))
33#define ID_SEL_BEGIN 11
34#define MAX_DEV_NUM (31 - ID_SEL_BEGIN)
35
36
37static int loongson_pcibios_config_access(unsigned char access_type,
38 struct pci_bus *bus,
39 unsigned int devfn, int where,
40 u32 *data)
41{
42 u32 busnum = bus->number;
43 u32 addr, type;
44 u32 dummy;
45 void *addrp;
46 int device = PCI_SLOT(devfn);
47 int function = PCI_FUNC(devfn);
48 int reg = where & ~3;
49
50 if (busnum == 0) {
51 /* board-specific part,currently,only fuloong2f,yeeloong2f
52 * use CS5536, fuloong2e use via686b, gdium has no
53 * south bridge
54 */
55#ifdef CONFIG_CS5536
56 /* cs5536_pci_conf_read4/write4() will call _rdmsr/_wrmsr() to
57 * access the regsters PCI_MSR_ADDR, PCI_MSR_DATA_LO,
58 * PCI_MSR_DATA_HI, which is bigger than PCI_MSR_CTRL, so, it
59 * will not go this branch, but the others. so, no calling dead
60 * loop here.
61 */
62 if ((PCI_IDSEL_CS5536 == device) && (reg < PCI_MSR_CTRL)) {
63 switch (access_type) {
64 case PCI_ACCESS_READ:
65 *data = cs5536_pci_conf_read4(function, reg);
66 break;
67 case PCI_ACCESS_WRITE:
68 cs5536_pci_conf_write4(function, reg, *data);
69 break;
70 }
71 return 0;
72 }
73#endif
74 /* Type 0 configuration for onboard PCI bus */
75 if (device > MAX_DEV_NUM)
76 return -1;
77
78 addr = (1 << (device + ID_SEL_BEGIN)) | (function << 8) | reg;
79 type = 0;
80 } else {
81 /* Type 1 configuration for offboard PCI bus */
82 addr = (busnum << 16) | (device << 11) | (function << 8) | reg;
83 type = 0x10000;
84 }
85
86 /* Clear aborts */
87 LOONGSON_PCICMD |= LOONGSON_PCICMD_MABORT_CLR | \
88 LOONGSON_PCICMD_MTABORT_CLR;
89
90 LOONGSON_PCIMAP_CFG = (addr >> 16) | type;
91
92 /* Flush Bonito register block */
93 dummy = LOONGSON_PCIMAP_CFG;
94 mmiowb();
95
96 addrp = CFG_SPACE_REG(addr & 0xffff);
97 if (access_type == PCI_ACCESS_WRITE)
98 writel(cpu_to_le32(*data), addrp);
99 else
100 *data = le32_to_cpu(readl(addrp));
101
102 /* Detect Master/Target abort */
103 if (LOONGSON_PCICMD & (LOONGSON_PCICMD_MABORT_CLR |
104 LOONGSON_PCICMD_MTABORT_CLR)) {
105 /* Error occurred */
106
107 /* Clear bits */
108 LOONGSON_PCICMD |= (LOONGSON_PCICMD_MABORT_CLR |
109 LOONGSON_PCICMD_MTABORT_CLR);
110
111 return -1;
112 }
113
114 return 0;
115
116}
117
118
119/*
120 * We can't address 8 and 16 bit words directly. Instead we have to
121 * read/write a 32bit word and mask/modify the data we actually want.
122 */
123static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn,
124 int where, int size, u32 *val)
125{
126 u32 data = 0;
127
128 if ((size == 2) && (where & 1))
129 return PCIBIOS_BAD_REGISTER_NUMBER;
130 else if ((size == 4) && (where & 3))
131 return PCIBIOS_BAD_REGISTER_NUMBER;
132
133 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where,
134 &data))
135 return -1;
136
137 if (size == 1)
138 *val = (data >> ((where & 3) << 3)) & 0xff;
139 else if (size == 2)
140 *val = (data >> ((where & 3) << 3)) & 0xffff;
141 else
142 *val = data;
143
144 return PCIBIOS_SUCCESSFUL;
145}
146
147static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn,
148 int where, int size, u32 val)
149{
150 u32 data = 0;
151
152 if ((size == 2) && (where & 1))
153 return PCIBIOS_BAD_REGISTER_NUMBER;
154 else if ((size == 4) && (where & 3))
155 return PCIBIOS_BAD_REGISTER_NUMBER;
156
157 if (size == 4)
158 data = val;
159 else {
160 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn,
161 where, &data))
162 return -1;
163
164 if (size == 1)
165 data = (data & ~(0xff << ((where & 3) << 3))) |
166 (val << ((where & 3) << 3));
167 else if (size == 2)
168 data = (data & ~(0xffff << ((where & 3) << 3))) |
169 (val << ((where & 3) << 3));
170 }
171
172 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where,
173 &data))
174 return -1;
175
176 return PCIBIOS_SUCCESSFUL;
177}
178
179struct pci_ops loongson_pci_ops = {
180 .read = loongson_pcibios_read,
181 .write = loongson_pcibios_write
182};
183
184#ifdef CONFIG_CS5536
185void _rdmsr(u32 msr, u32 *hi, u32 *lo)
186{
187 struct pci_bus bus = {
188 .number = PCI_BUS_CS5536
189 };
190 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0);
191 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr);
192 loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_LO, 4, lo);
193 loongson_pcibios_read(&bus, devfn, PCI_MSR_DATA_HI, 4, hi);
194}
195EXPORT_SYMBOL(_rdmsr);
196
197void _wrmsr(u32 msr, u32 hi, u32 lo)
198{
199 struct pci_bus bus = {
200 .number = PCI_BUS_CS5536
201 };
202 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0);
203 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr);
204 loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_LO, 4, lo);
205 loongson_pcibios_write(&bus, devfn, PCI_MSR_DATA_HI, 4, hi);
206}
207EXPORT_SYMBOL(_wrmsr);
208#endif
diff --git a/arch/mips/pci/pci-excite.c b/arch/mips/pci/pci-excite.c
deleted file mode 100644
index 8a56876afcc6..000000000000
--- a/arch/mips/pci/pci-excite.c
+++ /dev/null
@@ -1,149 +0,0 @@
1/*
2 * Copyright (C) 2004 by Basler Vision Technologies AG
3 * Author: Thomas Koeller <thomas.koeller@baslerweb.com>
4 * Based on the PMC-Sierra Yosemite board support by Ralf Baechle.
5 *
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 <linux/init.h>
21#include <linux/kernel.h>
22#include <linux/types.h>
23#include <linux/pci.h>
24#include <linux/bitops.h>
25#include <asm/rm9k-ocd.h>
26#include <excite.h>
27
28
29extern struct pci_ops titan_pci_ops;
30
31
32static struct resource
33 mem_resource = {
34 .name = "PCI memory",
35 .start = EXCITE_PHYS_PCI_MEM,
36 .end = EXCITE_PHYS_PCI_MEM + EXCITE_SIZE_PCI_MEM - 1,
37 .flags = IORESOURCE_MEM
38 },
39 io_resource = {
40 .name = "PCI I/O",
41 .start = EXCITE_PHYS_PCI_IO,
42 .end = EXCITE_PHYS_PCI_IO + EXCITE_SIZE_PCI_IO - 1,
43 .flags = IORESOURCE_IO
44 };
45
46
47static struct pci_controller bx_controller = {
48 .pci_ops = &titan_pci_ops,
49 .mem_resource = &mem_resource,
50 .mem_offset = 0x00000000UL,
51 .io_resource = &io_resource,
52 .io_offset = 0x00000000UL
53};
54
55
56static char
57 iopage_failed[] __initdata = "Cannot allocate PCI I/O page",
58 modebits_no_pci[] __initdata = "PCI is not configured in mode bits";
59
60#define RM9000x2_OCD_HTSC 0x0604
61#define RM9000x2_OCD_HTBHL 0x060c
62#define RM9000x2_OCD_PCIHRST 0x078c
63
64#define RM9K_OCD_MODEBIT1 0x00d4 /* (MODEBIT1) Mode Bit 1 */
65#define RM9K_OCD_CPHDCR 0x00f4 /* CPU-PCI/HT Data Control. */
66
67#define PCISC_FB2B 0x00000200
68#define PCISC_MWICG 0x00000010
69#define PCISC_EMC 0x00000004
70#define PCISC_ERMA 0x00000002
71
72
73
74static int __init basler_excite_pci_setup(void)
75{
76 const unsigned int fullbars = memsize / (256 << 20);
77 unsigned int i;
78
79 /* Check modebits to see if PCI is really enabled. */
80 if (!((ocd_readl(RM9K_OCD_MODEBIT1) >> (47-32)) & 0x1))
81 panic(modebits_no_pci);
82
83 if (NULL == request_mem_region(EXCITE_PHYS_PCI_IO, EXCITE_SIZE_PCI_IO,
84 "Memory-mapped PCI I/O page"))
85 panic(iopage_failed);
86
87 /* Enable PCI 0 as master for config cycles */
88 ocd_writel(PCISC_EMC | PCISC_ERMA, RM9000x2_OCD_HTSC);
89
90
91 /* Set up latency timer */
92 ocd_writel(0x8008, RM9000x2_OCD_HTBHL);
93
94 /* Setup host IO and Memory space */
95 ocd_writel((EXCITE_PHYS_PCI_IO >> 4) | 1, LKB7);
96 ocd_writel(((EXCITE_SIZE_PCI_IO >> 4) & 0x7fffff00) - 0x100, LKM7);
97 ocd_writel((EXCITE_PHYS_PCI_MEM >> 4) | 1, LKB8);
98 ocd_writel(((EXCITE_SIZE_PCI_MEM >> 4) & 0x7fffff00) - 0x100, LKM8);
99
100 /* Set up PCI BARs to map all installed memory */
101 for (i = 0; i < 6; i++) {
102 const unsigned int bar = 0x610 + i * 4;
103
104 if (i < fullbars) {
105 ocd_writel(0x10000000 * i, bar);
106 ocd_writel(0x01000000 * i, bar + 0x140);
107 ocd_writel(0x0ffff029, bar + 0x100);
108 continue;
109 }
110
111 if (i == fullbars) {
112 int o;
113 u32 mask;
114
115 const unsigned long rem = memsize - i * 0x10000000;
116 if (!rem) {
117 ocd_writel(0x00000000, bar + 0x100);
118 continue;
119 }
120
121 o = ffs(rem) - 1;
122 if (rem & ~(0x1 << o))
123 o++;
124 mask = ((0x1 << o) & 0x0ffff000) - 0x1000;
125 ocd_writel(0x10000000 * i, bar);
126 ocd_writel(0x01000000 * i, bar + 0x140);
127 ocd_writel(0x00000029 | mask, bar + 0x100);
128 continue;
129 }
130
131 ocd_writel(0x00000000, bar + 0x100);
132 }
133
134 /* Finally, enable the PCI interrupt */
135#if USB_IRQ > 7
136 set_c0_intcontrol(1 << USB_IRQ);
137#else
138 set_c0_status(1 << (USB_IRQ + 8));
139#endif
140
141 ioport_resource.start = EXCITE_PHYS_PCI_IO;
142 ioport_resource.end = EXCITE_PHYS_PCI_IO + EXCITE_SIZE_PCI_IO - 1;
143 set_io_port_base((unsigned long) ioremap_nocache(EXCITE_PHYS_PCI_IO, EXCITE_SIZE_PCI_IO));
144 register_pci_controller(&bx_controller);
145 return 0;
146}
147
148
149arch_initcall(basler_excite_pci_setup);
diff --git a/arch/mips/powertv/Kconfig b/arch/mips/powertv/Kconfig
new file mode 100644
index 000000000000..ff0e7e3e6954
--- /dev/null
+++ b/arch/mips/powertv/Kconfig
@@ -0,0 +1,21 @@
1source "arch/mips/powertv/asic/Kconfig"
2
3config BOOTLOADER_DRIVER
4 bool "PowerTV Bootloader Driver Support"
5 default n
6 depends on POWERTV
7 help
8 Use this option if you want to load bootloader driver.
9
10config BOOTLOADER_FAMILY
11 string "POWERTV Bootloader Family string"
12 default "85"
13 depends on POWERTV && !BOOTLOADER_DRIVER
14 help
15 This value should be specified when the bootloader driver is disabled
16 and must be exactly two characters long. Families supported are:
17 R1 - RNG-100 R2 - RNG-200
18 A1 - Class A B1 - Class B
19 E1 - Class E F1 - Class F
20 44 - 45xx 46 - 46xx
21 85 - 85xx 86 - 86xx
diff --git a/arch/mips/powertv/Makefile b/arch/mips/powertv/Makefile
new file mode 100644
index 000000000000..2c516718affe
--- /dev/null
+++ b/arch/mips/powertv/Makefile
@@ -0,0 +1,28 @@
1#
2# Carsten Langgaard, carstenl@mips.com
3# Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4#
5# Carsten Langgaard, carstenl@mips.com
6# Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
7# Portions copyright (C) 2009 Cisco Systems, Inc.
8#
9# This program is free software; you can distribute it and/or modify it
10# under the terms of the GNU General Public License (Version 2) as
11# published by the Free Software Foundation.
12#
13# This program is distributed in the hope it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16# for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program; if not, write to the Free Software Foundation, Inc.,
20# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
21#
22# Makefile for the Cisco PowerTV-specific kernel interface routines
23# under Linux.
24#
25
26obj-y += cmdline.o init.o memory.o reset.o time.o powertv_setup.o asic/ pci/
27
28EXTRA_CFLAGS += -Wall -Werror
diff --git a/arch/mips/powertv/asic/Kconfig b/arch/mips/powertv/asic/Kconfig
new file mode 100644
index 000000000000..2016bfe94d66
--- /dev/null
+++ b/arch/mips/powertv/asic/Kconfig
@@ -0,0 +1,28 @@
1config MIN_RUNTIME_RESOURCES
2 bool "Support for minimum runtime resources"
3 default n
4 depends on POWERTV
5 help
6 Enables support for minimizing the number of (SA asic) runtime
7 resources that are preallocated by the kernel.
8
9config MIN_RUNTIME_DOCSIS
10 bool "Support for minimum DOCSIS resource"
11 default y
12 depends on MIN_RUNTIME_RESOURCES
13 help
14 Enables support for the preallocated DOCSIS resource.
15
16config MIN_RUNTIME_PMEM
17 bool "Support for minimum PMEM resource"
18 default y
19 depends on MIN_RUNTIME_RESOURCES
20 help
21 Enables support for the preallocated Memory resource.
22
23config MIN_RUNTIME_TFTP
24 bool "Support for minimum TFTP resource"
25 default y
26 depends on MIN_RUNTIME_RESOURCES
27 help
28 Enables support for the preallocated TFTP resource.
diff --git a/arch/mips/powertv/asic/Makefile b/arch/mips/powertv/asic/Makefile
new file mode 100644
index 000000000000..bebfdcff0443
--- /dev/null
+++ b/arch/mips/powertv/asic/Makefile
@@ -0,0 +1,23 @@
1#
2# Copyright (C) 2009 Scientific-Atlanta, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17#
18
19obj-y += asic-calliope.o asic-cronus.o asic-zeus.o asic_devices.o asic_int.o \
20 irq_asic.o prealloc-calliope.o prealloc-cronus.o \
21 prealloc-cronuslite.o prealloc-zeus.o
22
23EXTRA_CFLAGS += -Wall -Werror
diff --git a/arch/mips/powertv/asic/asic-calliope.c b/arch/mips/powertv/asic/asic-calliope.c
new file mode 100644
index 000000000000..03d3884c6270
--- /dev/null
+++ b/arch/mips/powertv/asic/asic-calliope.c
@@ -0,0 +1,98 @@
1/*
2 * Locations of devices in the Calliope ASIC.
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 *
23 * Description: Defines the platform resources for the SA settop.
24 */
25
26#include <asm/mach-powertv/asic.h>
27
28const struct register_map calliope_register_map = {
29 .eic_slow0_strt_add = 0x800000,
30 .eic_cfg_bits = 0x800038,
31 .eic_ready_status = 0x80004c,
32
33 .chipver3 = 0xA00800,
34 .chipver2 = 0xA00804,
35 .chipver1 = 0xA00808,
36 .chipver0 = 0xA0080c,
37
38 /* The registers of IRBlaster */
39 .uart1_intstat = 0xA01800,
40 .uart1_inten = 0xA01804,
41 .uart1_config1 = 0xA01808,
42 .uart1_config2 = 0xA0180C,
43 .uart1_divisorhi = 0xA01810,
44 .uart1_divisorlo = 0xA01814,
45 .uart1_data = 0xA01818,
46 .uart1_status = 0xA0181C,
47
48 .int_stat_3 = 0xA02800,
49 .int_stat_2 = 0xA02804,
50 .int_stat_1 = 0xA02808,
51 .int_stat_0 = 0xA0280c,
52 .int_config = 0xA02810,
53 .int_int_scan = 0xA02818,
54 .ien_int_3 = 0xA02830,
55 .ien_int_2 = 0xA02834,
56 .ien_int_1 = 0xA02838,
57 .ien_int_0 = 0xA0283c,
58 .int_level_3_3 = 0xA02880,
59 .int_level_3_2 = 0xA02884,
60 .int_level_3_1 = 0xA02888,
61 .int_level_3_0 = 0xA0288c,
62 .int_level_2_3 = 0xA02890,
63 .int_level_2_2 = 0xA02894,
64 .int_level_2_1 = 0xA02898,
65 .int_level_2_0 = 0xA0289c,
66 .int_level_1_3 = 0xA028a0,
67 .int_level_1_2 = 0xA028a4,
68 .int_level_1_1 = 0xA028a8,
69 .int_level_1_0 = 0xA028ac,
70 .int_level_0_3 = 0xA028b0,
71 .int_level_0_2 = 0xA028b4,
72 .int_level_0_1 = 0xA028b8,
73 .int_level_0_0 = 0xA028bc,
74 .int_docsis_en = 0xA028F4,
75
76 .mips_pll_setup = 0x980000,
77 .usb_fs = 0x980030, /* -default 72800028- */
78 .test_bus = 0x9800CC,
79 .crt_spare = 0x9800d4,
80 .usb2_ohci_int_mask = 0x9A000c,
81 .usb2_strap = 0x9A0014,
82 .ehci_hcapbase = 0x9BFE00,
83 .ohci_hc_revision = 0x9BFC00,
84 .bcm1_bs_lmi_steer = 0x9E0004,
85 .usb2_control = 0x9E0054,
86 .usb2_stbus_obc = 0x9BFF00,
87 .usb2_stbus_mess_size = 0x9BFF04,
88 .usb2_stbus_chunk_size = 0x9BFF08,
89
90 .pcie_regs = 0x000000, /* -doesn't exist- */
91 .tim_ch = 0xA02C10,
92 .tim_cl = 0xA02C14,
93 .gpio_dout = 0xA02c20,
94 .gpio_din = 0xA02c24,
95 .gpio_dir = 0xA02c2C,
96 .watchdog = 0xA02c30,
97 .front_panel = 0x000000, /* -not used- */
98};
diff --git a/arch/mips/powertv/asic/asic-cronus.c b/arch/mips/powertv/asic/asic-cronus.c
new file mode 100644
index 000000000000..5f4589c9f83d
--- /dev/null
+++ b/arch/mips/powertv/asic/asic-cronus.c
@@ -0,0 +1,98 @@
1/*
2 * Locations of devices in the Cronus ASIC
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 *
23 * Description: Defines the platform resources for the SA settop.
24 */
25
26#include <asm/mach-powertv/asic.h>
27
28const struct register_map cronus_register_map = {
29 .eic_slow0_strt_add = 0x000000,
30 .eic_cfg_bits = 0x000038,
31 .eic_ready_status = 0x00004C,
32
33 .chipver3 = 0x2A0800,
34 .chipver2 = 0x2A0804,
35 .chipver1 = 0x2A0808,
36 .chipver0 = 0x2A080C,
37
38 /* The registers of IRBlaster */
39 .uart1_intstat = 0x2A1800,
40 .uart1_inten = 0x2A1804,
41 .uart1_config1 = 0x2A1808,
42 .uart1_config2 = 0x2A180C,
43 .uart1_divisorhi = 0x2A1810,
44 .uart1_divisorlo = 0x2A1814,
45 .uart1_data = 0x2A1818,
46 .uart1_status = 0x2A181C,
47
48 .int_stat_3 = 0x2A2800,
49 .int_stat_2 = 0x2A2804,
50 .int_stat_1 = 0x2A2808,
51 .int_stat_0 = 0x2A280C,
52 .int_config = 0x2A2810,
53 .int_int_scan = 0x2A2818,
54 .ien_int_3 = 0x2A2830,
55 .ien_int_2 = 0x2A2834,
56 .ien_int_1 = 0x2A2838,
57 .ien_int_0 = 0x2A283C,
58 .int_level_3_3 = 0x2A2880,
59 .int_level_3_2 = 0x2A2884,
60 .int_level_3_1 = 0x2A2888,
61 .int_level_3_0 = 0x2A288C,
62 .int_level_2_3 = 0x2A2890,
63 .int_level_2_2 = 0x2A2894,
64 .int_level_2_1 = 0x2A2898,
65 .int_level_2_0 = 0x2A289C,
66 .int_level_1_3 = 0x2A28A0,
67 .int_level_1_2 = 0x2A28A4,
68 .int_level_1_1 = 0x2A28A8,
69 .int_level_1_0 = 0x2A28AC,
70 .int_level_0_3 = 0x2A28B0,
71 .int_level_0_2 = 0x2A28B4,
72 .int_level_0_1 = 0x2A28B8,
73 .int_level_0_0 = 0x2A28BC,
74 .int_docsis_en = 0x2A28F4,
75
76 .mips_pll_setup = 0x1C0000,
77 .usb_fs = 0x1C0018,
78 .test_bus = 0x1C00CC,
79 .crt_spare = 0x1c00d4,
80 .usb2_ohci_int_mask = 0x20000C,
81 .usb2_strap = 0x200014,
82 .ehci_hcapbase = 0x21FE00,
83 .ohci_hc_revision = 0x1E0000,
84 .bcm1_bs_lmi_steer = 0x2E0008,
85 .usb2_control = 0x2E004C,
86 .usb2_stbus_obc = 0x21FF00,
87 .usb2_stbus_mess_size = 0x21FF04,
88 .usb2_stbus_chunk_size = 0x21FF08,
89
90 .pcie_regs = 0x220000,
91 .tim_ch = 0x2A2C10,
92 .tim_cl = 0x2A2C14,
93 .gpio_dout = 0x2A2C20,
94 .gpio_din = 0x2A2C24,
95 .gpio_dir = 0x2A2C2C,
96 .watchdog = 0x2A2C30,
97 .front_panel = 0x2A3800,
98};
diff --git a/arch/mips/powertv/asic/asic-zeus.c b/arch/mips/powertv/asic/asic-zeus.c
new file mode 100644
index 000000000000..1469daab920e
--- /dev/null
+++ b/arch/mips/powertv/asic/asic-zeus.c
@@ -0,0 +1,98 @@
1/*
2 * Locations of devices in the Zeus ASIC
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 *
23 * Description: Defines the platform resources for the SA settop.
24 */
25
26#include <asm/mach-powertv/asic.h>
27
28const struct register_map zeus_register_map = {
29 .eic_slow0_strt_add = 0x000000,
30 .eic_cfg_bits = 0x000038,
31 .eic_ready_status = 0x00004c,
32
33 .chipver3 = 0x280800,
34 .chipver2 = 0x280804,
35 .chipver1 = 0x280808,
36 .chipver0 = 0x28080c,
37
38 /* The registers of IRBlaster */
39 .uart1_intstat = 0x281800,
40 .uart1_inten = 0x281804,
41 .uart1_config1 = 0x281808,
42 .uart1_config2 = 0x28180C,
43 .uart1_divisorhi = 0x281810,
44 .uart1_divisorlo = 0x281814,
45 .uart1_data = 0x281818,
46 .uart1_status = 0x28181C,
47
48 .int_stat_3 = 0x282800,
49 .int_stat_2 = 0x282804,
50 .int_stat_1 = 0x282808,
51 .int_stat_0 = 0x28280c,
52 .int_config = 0x282810,
53 .int_int_scan = 0x282818,
54 .ien_int_3 = 0x282830,
55 .ien_int_2 = 0x282834,
56 .ien_int_1 = 0x282838,
57 .ien_int_0 = 0x28283c,
58 .int_level_3_3 = 0x282880,
59 .int_level_3_2 = 0x282884,
60 .int_level_3_1 = 0x282888,
61 .int_level_3_0 = 0x28288c,
62 .int_level_2_3 = 0x282890,
63 .int_level_2_2 = 0x282894,
64 .int_level_2_1 = 0x282898,
65 .int_level_2_0 = 0x28289c,
66 .int_level_1_3 = 0x2828a0,
67 .int_level_1_2 = 0x2828a4,
68 .int_level_1_1 = 0x2828a8,
69 .int_level_1_0 = 0x2828ac,
70 .int_level_0_3 = 0x2828b0,
71 .int_level_0_2 = 0x2828b4,
72 .int_level_0_1 = 0x2828b8,
73 .int_level_0_0 = 0x2828bc,
74 .int_docsis_en = 0x2828F4,
75
76 .mips_pll_setup = 0x1a0000,
77 .usb_fs = 0x1a0018,
78 .test_bus = 0x1a0238,
79 .crt_spare = 0x1a0090,
80 .usb2_ohci_int_mask = 0x1e000c,
81 .usb2_strap = 0x1e0014,
82 .ehci_hcapbase = 0x1FFE00,
83 .ohci_hc_revision = 0x1FFC00,
84 .bcm1_bs_lmi_steer = 0x2C0008,
85 .usb2_control = 0x2c01a0,
86 .usb2_stbus_obc = 0x1FFF00,
87 .usb2_stbus_mess_size = 0x1FFF04,
88 .usb2_stbus_chunk_size = 0x1FFF08,
89
90 .pcie_regs = 0x200000,
91 .tim_ch = 0x282C10,
92 .tim_cl = 0x282C14,
93 .gpio_dout = 0x282c20,
94 .gpio_din = 0x282c24,
95 .gpio_dir = 0x282c2C,
96 .watchdog = 0x282c30,
97 .front_panel = 0x283800,
98};
diff --git a/arch/mips/powertv/asic/asic_devices.c b/arch/mips/powertv/asic/asic_devices.c
new file mode 100644
index 000000000000..bae82880b6b5
--- /dev/null
+++ b/arch/mips/powertv/asic/asic_devices.c
@@ -0,0 +1,787 @@
1/*
2 * ASIC Device List Intialization
3 *
4 * Description: Defines the platform resources for the SA settop.
5 *
6 * Copyright (C) 2005-2009 Scientific-Atlanta, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * Author: Ken Eppinett
23 * David Schleef <ds@schleef.org>
24 *
25 * Description: Defines the platform resources for the SA settop.
26 *
27 * NOTE: The bootloader allocates persistent memory at an address which is
28 * 16 MiB below the end of the highest address in KSEG0. All fixed
29 * address memory reservations must avoid this region.
30 */
31
32#include <linux/device.h>
33#include <linux/kernel.h>
34#include <linux/init.h>
35#include <linux/resource.h>
36#include <linux/serial_reg.h>
37#include <linux/io.h>
38#include <linux/bootmem.h>
39#include <linux/mm.h>
40#include <linux/platform_device.h>
41#include <linux/module.h>
42#include <asm/page.h>
43#include <linux/swap.h>
44#include <linux/highmem.h>
45#include <linux/dma-mapping.h>
46
47#include <asm/mach-powertv/asic.h>
48#include <asm/mach-powertv/asic_regs.h>
49#include <asm/mach-powertv/interrupts.h>
50
51#ifdef CONFIG_BOOTLOADER_DRIVER
52#include <asm/mach-powertv/kbldr.h>
53#endif
54#include <asm/bootinfo.h>
55
56#define BOOTLDRFAMILY(byte1, byte0) (((byte1) << 8) | (byte0))
57
58/*
59 * Forward Prototypes
60 */
61static void pmem_setup_resource(void);
62
63/*
64 * Global Variables
65 */
66enum asic_type asic;
67
68unsigned int platform_features;
69unsigned int platform_family;
70const struct register_map *register_map;
71EXPORT_SYMBOL(register_map); /* Exported for testing */
72unsigned long asic_phy_base;
73unsigned long asic_base;
74EXPORT_SYMBOL(asic_base); /* Exported for testing */
75struct resource *gp_resources;
76static bool usb_configured;
77
78/*
79 * Don't recommend to use it directly, it is usually used by kernel internally.
80 * Portable code should be using interfaces such as ioremp, dma_map_single, etc.
81 */
82unsigned long phys_to_bus_offset;
83EXPORT_SYMBOL(phys_to_bus_offset);
84
85/*
86 *
87 * IO Resource Definition
88 *
89 */
90
91struct resource asic_resource = {
92 .name = "ASIC Resource",
93 .start = 0,
94 .end = ASIC_IO_SIZE,
95 .flags = IORESOURCE_MEM,
96};
97
98/*
99 *
100 * USB Host Resource Definition
101 *
102 */
103
104static struct resource ehci_resources[] = {
105 {
106 .parent = &asic_resource,
107 .start = 0,
108 .end = 0xff,
109 .flags = IORESOURCE_MEM,
110 },
111 {
112 .start = irq_usbehci,
113 .end = irq_usbehci,
114 .flags = IORESOURCE_IRQ,
115 },
116};
117
118static u64 ehci_dmamask = DMA_BIT_MASK(32);
119
120static struct platform_device ehci_device = {
121 .name = "powertv-ehci",
122 .id = 0,
123 .num_resources = 2,
124 .resource = ehci_resources,
125 .dev = {
126 .dma_mask = &ehci_dmamask,
127 .coherent_dma_mask = DMA_BIT_MASK(32),
128 },
129};
130
131static struct resource ohci_resources[] = {
132 {
133 .parent = &asic_resource,
134 .start = 0,
135 .end = 0xff,
136 .flags = IORESOURCE_MEM,
137 },
138 {
139 .start = irq_usbohci,
140 .end = irq_usbohci,
141 .flags = IORESOURCE_IRQ,
142 },
143};
144
145static u64 ohci_dmamask = DMA_BIT_MASK(32);
146
147static struct platform_device ohci_device = {
148 .name = "powertv-ohci",
149 .id = 0,
150 .num_resources = 2,
151 .resource = ohci_resources,
152 .dev = {
153 .dma_mask = &ohci_dmamask,
154 .coherent_dma_mask = DMA_BIT_MASK(32),
155 },
156};
157
158static struct platform_device *platform_devices[] = {
159 &ehci_device,
160 &ohci_device,
161};
162
163/*
164 *
165 * Platform Configuration and Device Initialization
166 *
167 */
168static void __init fs_update(int pe, int md, int sdiv, int disable_div_by_3)
169{
170 int en_prg, byp, pwr, nsb, val;
171 int sout;
172
173 sout = 1;
174 en_prg = 1;
175 byp = 0;
176 nsb = 1;
177 pwr = 1;
178
179 val = ((sdiv << 29) | (md << 24) | (pe<<8) | (sout<<3) | (byp<<2) |
180 (nsb<<1) | (disable_div_by_3<<5));
181
182 asic_write(val, usb_fs);
183 asic_write(val | (en_prg<<4), usb_fs);
184 asic_write(val | (en_prg<<4) | pwr, usb_fs);
185}
186
187/*
188 * Allow override of bootloader-specified model
189 */
190static char __initdata cmdline[COMMAND_LINE_SIZE];
191
192#define FORCEFAMILY_PARAM "forcefamily"
193
194static __init int check_forcefamily(unsigned char forced_family[2])
195{
196 const char *p;
197
198 forced_family[0] = '\0';
199 forced_family[1] = '\0';
200
201 /* Check the command line for a forcefamily directive */
202 strncpy(cmdline, arcs_cmdline, COMMAND_LINE_SIZE - 1);
203 p = strstr(cmdline, FORCEFAMILY_PARAM);
204 if (p && (p != cmdline) && (*(p - 1) != ' '))
205 p = strstr(p, " " FORCEFAMILY_PARAM "=");
206
207 if (p) {
208 p += strlen(FORCEFAMILY_PARAM "=");
209
210 if (*p == '\0' || *(p + 1) == '\0' ||
211 (*(p + 2) != '\0' && *(p + 2) != ' '))
212 pr_err(FORCEFAMILY_PARAM " must be exactly two "
213 "characters long, ignoring value\n");
214
215 else {
216 forced_family[0] = *p;
217 forced_family[1] = *(p + 1);
218 }
219 }
220
221 return 0;
222}
223
224/*
225 * platform_set_family - determine major platform family type.
226 *
227 * Returns family type; -1 if none
228 * Returns the family type; -1 if none
229 *
230 */
231static __init noinline void platform_set_family(void)
232{
233#define BOOTLDRFAMILY(byte1, byte0) (((byte1) << 8) | (byte0))
234
235 unsigned char forced_family[2];
236 unsigned short bootldr_family;
237
238 check_forcefamily(forced_family);
239
240 if (forced_family[0] != '\0' && forced_family[1] != '\0')
241 bootldr_family = BOOTLDRFAMILY(forced_family[0],
242 forced_family[1]);
243 else {
244
245#ifdef CONFIG_BOOTLOADER_DRIVER
246 bootldr_family = (unsigned short) kbldr_GetSWFamily();
247#else
248#if defined(CONFIG_BOOTLOADER_FAMILY)
249 bootldr_family = (unsigned short) BOOTLDRFAMILY(
250 CONFIG_BOOTLOADER_FAMILY[0],
251 CONFIG_BOOTLOADER_FAMILY[1]);
252#else
253#error "Unknown Bootloader Family"
254#endif
255#endif
256 }
257
258 pr_info("Bootloader Family = 0x%04X\n", bootldr_family);
259
260 switch (bootldr_family) {
261 case BOOTLDRFAMILY('R', '1'):
262 platform_family = FAMILY_1500;
263 break;
264 case BOOTLDRFAMILY('4', '4'):
265 platform_family = FAMILY_4500;
266 break;
267 case BOOTLDRFAMILY('4', '6'):
268 platform_family = FAMILY_4600;
269 break;
270 case BOOTLDRFAMILY('A', '1'):
271 platform_family = FAMILY_4600VZA;
272 break;
273 case BOOTLDRFAMILY('8', '5'):
274 platform_family = FAMILY_8500;
275 break;
276 case BOOTLDRFAMILY('R', '2'):
277 platform_family = FAMILY_8500RNG;
278 break;
279 case BOOTLDRFAMILY('8', '6'):
280 platform_family = FAMILY_8600;
281 break;
282 case BOOTLDRFAMILY('B', '1'):
283 platform_family = FAMILY_8600VZB;
284 break;
285 case BOOTLDRFAMILY('E', '1'):
286 platform_family = FAMILY_1500VZE;
287 break;
288 case BOOTLDRFAMILY('F', '1'):
289 platform_family = FAMILY_1500VZF;
290 break;
291 default:
292 platform_family = -1;
293 }
294}
295
296unsigned int platform_get_family(void)
297{
298 return platform_family;
299}
300EXPORT_SYMBOL(platform_get_family);
301
302/*
303 * \brief usb_eye_configure() for optimizing the USB eye on Calliope.
304 *
305 * \param unsigned int value saved to the register.
306 *
307 * \return none
308 *
309 */
310static void __init usb_eye_configure(unsigned int value)
311{
312 asic_write(asic_read(crt_spare) | value, crt_spare);
313}
314
315/*
316 * platform_get_asic - determine the ASIC type.
317 *
318 * \param none
319 *
320 * \return ASIC type; ASIC_UNKNOWN if none
321 *
322 */
323enum asic_type platform_get_asic(void)
324{
325 return asic;
326}
327EXPORT_SYMBOL(platform_get_asic);
328
329/*
330 * platform_configure_usb - usb configuration based on platform type.
331 * @bcm1_usb2_ctl: value for the BCM1_USB2_CTL register, which is
332 * quirky
333 */
334static void __init platform_configure_usb(void)
335{
336 u32 bcm1_usb2_ctl;
337
338 if (usb_configured)
339 return;
340
341 switch (asic) {
342 case ASIC_ZEUS:
343 fs_update(0x0000, 0x11, 0x02, 0);
344 bcm1_usb2_ctl = 0x803;
345 break;
346
347 case ASIC_CRONUS:
348 case ASIC_CRONUSLITE:
349 fs_update(0x0000, 0x11, 0x02, 0);
350 bcm1_usb2_ctl = 0x803;
351 break;
352
353 case ASIC_CALLIOPE:
354 fs_update(0x0000, 0x11, 0x02, 1);
355
356 switch (platform_family) {
357 case FAMILY_1500VZE:
358 break;
359
360 case FAMILY_1500VZF:
361 usb_eye_configure(0x003c0000);
362 break;
363
364 default:
365 usb_eye_configure(0x00300000);
366 break;
367 }
368
369 bcm1_usb2_ctl = 0x803;
370 break;
371
372 default:
373 pr_err("Unknown ASIC type: %d\n", asic);
374 break;
375 }
376
377 /* turn on USB power */
378 asic_write(0, usb2_strap);
379 /* Enable all OHCI interrupts */
380 asic_write(bcm1_usb2_ctl, usb2_control);
381 /* USB2_STBUS_OBC store32/load32 */
382 asic_write(3, usb2_stbus_obc);
383 /* USB2_STBUS_MESS_SIZE 2 packets */
384 asic_write(1, usb2_stbus_mess_size);
385 /* USB2_STBUS_CHUNK_SIZE 2 packets */
386 asic_write(1, usb2_stbus_chunk_size);
387
388 usb_configured = true;
389}
390
391/*
392 * Set up the USB EHCI interface
393 */
394void platform_configure_usb_ehci()
395{
396 platform_configure_usb();
397}
398
399/*
400 * Set up the USB OHCI interface
401 */
402void platform_configure_usb_ohci()
403{
404 platform_configure_usb();
405}
406
407/*
408 * Shut the USB EHCI interface down--currently a NOP
409 */
410void platform_unconfigure_usb_ehci()
411{
412}
413
414/*
415 * Shut the USB OHCI interface down--currently a NOP
416 */
417void platform_unconfigure_usb_ohci()
418{
419}
420
421/**
422 * configure_platform - configuration based on platform type.
423 */
424void __init configure_platform(void)
425{
426 platform_set_family();
427
428 switch (platform_family) {
429 case FAMILY_1500:
430 case FAMILY_1500VZE:
431 case FAMILY_1500VZF:
432 platform_features = FFS_CAPABLE;
433 asic = ASIC_CALLIOPE;
434 asic_phy_base = CALLIOPE_IO_BASE;
435 register_map = &calliope_register_map;
436 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
437 ASIC_IO_SIZE);
438
439 if (platform_family == FAMILY_1500VZE) {
440 gp_resources = non_dvr_vze_calliope_resources;
441 pr_info("Platform: 1500/Vz Class E - "
442 "CALLIOPE, NON_DVR_CAPABLE\n");
443 } else if (platform_family == FAMILY_1500VZF) {
444 gp_resources = non_dvr_vzf_calliope_resources;
445 pr_info("Platform: 1500/Vz Class F - "
446 "CALLIOPE, NON_DVR_CAPABLE\n");
447 } else {
448 gp_resources = non_dvr_calliope_resources;
449 pr_info("Platform: 1500/RNG100 - CALLIOPE, "
450 "NON_DVR_CAPABLE\n");
451 }
452 break;
453
454 case FAMILY_4500:
455 platform_features = FFS_CAPABLE | PCIE_CAPABLE |
456 DISPLAY_CAPABLE;
457 asic = ASIC_ZEUS;
458 asic_phy_base = ZEUS_IO_BASE;
459 register_map = &zeus_register_map;
460 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
461 ASIC_IO_SIZE);
462 gp_resources = non_dvr_zeus_resources;
463
464 pr_info("Platform: 4500 - ZEUS, NON_DVR_CAPABLE\n");
465 break;
466
467 case FAMILY_4600:
468 {
469 unsigned int chipversion = 0;
470
471 /* The settop has PCIE but it isn't used, so don't advertise
472 * it*/
473 platform_features = FFS_CAPABLE | DISPLAY_CAPABLE;
474 asic_phy_base = CRONUS_IO_BASE; /* same as Cronus */
475 register_map = &cronus_register_map; /* same as Cronus */
476 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
477 ASIC_IO_SIZE);
478 gp_resources = non_dvr_cronuslite_resources;
479
480 /* ASIC version will determine if this is a real CronusLite or
481 * Castrati(Cronus) */
482 chipversion = asic_read(chipver3) << 24;
483 chipversion |= asic_read(chipver2) << 16;
484 chipversion |= asic_read(chipver1) << 8;
485 chipversion |= asic_read(chipver0);
486
487 if ((chipversion == CRONUS_10) || (chipversion == CRONUS_11))
488 asic = ASIC_CRONUS;
489 else
490 asic = ASIC_CRONUSLITE;
491
492 pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, "
493 "chipversion=0x%08X\n",
494 (asic == ASIC_CRONUS) ? "CRONUS" : "CRONUS LITE",
495 chipversion);
496 break;
497 }
498 case FAMILY_4600VZA:
499 platform_features = FFS_CAPABLE | DISPLAY_CAPABLE;
500 asic = ASIC_CRONUS;
501 asic_phy_base = CRONUS_IO_BASE;
502 register_map = &cronus_register_map;
503 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
504 ASIC_IO_SIZE);
505 gp_resources = non_dvr_cronus_resources;
506
507 pr_info("Platform: Vz Class A - CRONUS, NON_DVR_CAPABLE\n");
508 break;
509
510 case FAMILY_8500:
511 case FAMILY_8500RNG:
512 platform_features = DVR_CAPABLE | PCIE_CAPABLE |
513 DISPLAY_CAPABLE;
514 asic = ASIC_ZEUS;
515 asic_phy_base = ZEUS_IO_BASE;
516 register_map = &zeus_register_map;
517 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
518 ASIC_IO_SIZE);
519 gp_resources = dvr_zeus_resources;
520
521 pr_info("Platform: 8500/RNG200 - ZEUS, DVR_CAPABLE\n");
522 break;
523
524 case FAMILY_8600:
525 case FAMILY_8600VZB:
526 platform_features = DVR_CAPABLE | PCIE_CAPABLE |
527 DISPLAY_CAPABLE;
528 asic = ASIC_CRONUS;
529 asic_phy_base = CRONUS_IO_BASE;
530 register_map = &cronus_register_map;
531 asic_base = (unsigned long)ioremap_nocache(asic_phy_base,
532 ASIC_IO_SIZE);
533 gp_resources = dvr_cronus_resources;
534
535 pr_info("Platform: 8600/Vz Class B - CRONUS, "
536 "DVR_CAPABLE\n");
537 break;
538
539 default:
540 pr_crit("Platform: UNKNOWN PLATFORM\n");
541 break;
542 }
543
544 switch (asic) {
545 case ASIC_ZEUS:
546 phys_to_bus_offset = 0x30000000;
547 break;
548 case ASIC_CALLIOPE:
549 phys_to_bus_offset = 0x10000000;
550 break;
551 case ASIC_CRONUSLITE:
552 /* Fall through */
553 case ASIC_CRONUS:
554 /*
555 * TODO: We suppose 0x10000000 aliases into 0x20000000-
556 * 0x2XXXXXXX. If 0x10000000 aliases into 0x60000000-
557 * 0x6XXXXXXX, the offset should be 0x50000000, not 0x10000000.
558 */
559 phys_to_bus_offset = 0x10000000;
560 break;
561 default:
562 phys_to_bus_offset = 0x00000000;
563 break;
564 }
565}
566
567/**
568 * platform_devices_init - sets up USB device resourse.
569 */
570static int __init platform_devices_init(void)
571{
572 pr_notice("%s: ----- Initializing USB resources -----\n", __func__);
573
574 asic_resource.start = asic_phy_base;
575 asic_resource.end += asic_resource.start;
576
577 ehci_resources[0].start = asic_reg_phys_addr(ehci_hcapbase);
578 ehci_resources[0].end += ehci_resources[0].start;
579
580 ohci_resources[0].start = asic_reg_phys_addr(ohci_hc_revision);
581 ohci_resources[0].end += ohci_resources[0].start;
582
583 set_io_port_base(0);
584
585 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
586
587 return 0;
588}
589
590arch_initcall(platform_devices_init);
591
592/*
593 *
594 * BOOTMEM ALLOCATION
595 *
596 */
597/*
598 * Allocates/reserves the Platform memory resources early in the boot process.
599 * This ignores any resources that are designated IORESOURCE_IO
600 */
601void __init platform_alloc_bootmem(void)
602{
603 int i;
604 int total = 0;
605
606 /* Get persistent memory data from command line before allocating
607 * resources. This need to happen before normal command line parsing
608 * has been done */
609 pmem_setup_resource();
610
611 /* Loop through looking for resources that want a particular address */
612 for (i = 0; gp_resources[i].flags != 0; i++) {
613 int size = gp_resources[i].end - gp_resources[i].start + 1;
614 if ((gp_resources[i].start != 0) &&
615 ((gp_resources[i].flags & IORESOURCE_MEM) != 0)) {
616 reserve_bootmem(bus_to_phys(gp_resources[i].start),
617 size, 0);
618 total += gp_resources[i].end -
619 gp_resources[i].start + 1;
620 pr_info("reserve resource %s at %08x (%u bytes)\n",
621 gp_resources[i].name, gp_resources[i].start,
622 gp_resources[i].end -
623 gp_resources[i].start + 1);
624 }
625 }
626
627 /* Loop through assigning addresses for those that are left */
628 for (i = 0; gp_resources[i].flags != 0; i++) {
629 int size = gp_resources[i].end - gp_resources[i].start + 1;
630 if ((gp_resources[i].start == 0) &&
631 ((gp_resources[i].flags & IORESOURCE_MEM) != 0)) {
632 void *mem = alloc_bootmem_pages(size);
633
634 if (mem == NULL)
635 pr_err("Unable to allocate bootmem pages "
636 "for %s\n", gp_resources[i].name);
637
638 else {
639 gp_resources[i].start =
640 phys_to_bus(virt_to_phys(mem));
641 gp_resources[i].end =
642 gp_resources[i].start + size - 1;
643 total += size;
644 pr_info("allocate resource %s at %08x "
645 "(%u bytes)\n",
646 gp_resources[i].name,
647 gp_resources[i].start, size);
648 }
649 }
650 }
651
652 pr_info("Total Platform driver memory allocation: 0x%08x\n", total);
653
654 /* indicate resources that are platform I/O related */
655 for (i = 0; gp_resources[i].flags != 0; i++) {
656 if ((gp_resources[i].start != 0) &&
657 ((gp_resources[i].flags & IORESOURCE_IO) != 0)) {
658 pr_info("reserved platform resource %s at %08x\n",
659 gp_resources[i].name, gp_resources[i].start);
660 }
661 }
662}
663
664/*
665 *
666 * PERSISTENT MEMORY (PMEM) CONFIGURATION
667 *
668 */
669static unsigned long pmemaddr __initdata;
670
671static int __init early_param_pmemaddr(char *p)
672{
673 pmemaddr = (unsigned long)simple_strtoul(p, NULL, 0);
674 return 0;
675}
676early_param("pmemaddr", early_param_pmemaddr);
677
678static long pmemlen __initdata;
679
680static int __init early_param_pmemlen(char *p)
681{
682/* TODO: we can use this code when and if the bootloader ever changes this */
683#if 0
684 pmemlen = (unsigned long)simple_strtoul(p, NULL, 0);
685#else
686 pmemlen = 0x20000;
687#endif
688 return 0;
689}
690early_param("pmemlen", early_param_pmemlen);
691
692/*
693 * Set up persistent memory. If we were given values, we patch the array of
694 * resources. Otherwise, persistent memory may be allocated anywhere at all.
695 */
696static void __init pmem_setup_resource(void)
697{
698 struct resource *resource;
699 resource = asic_resource_get("DiagPersistentMemory");
700
701 if (resource && pmemaddr && pmemlen) {
702 /* The address provided by bootloader is in kseg0. Convert to
703 * a bus address. */
704 resource->start = phys_to_bus(pmemaddr - 0x80000000);
705 resource->end = resource->start + pmemlen - 1;
706
707 pr_info("persistent memory: start=0x%x end=0x%x\n",
708 resource->start, resource->end);
709 }
710}
711
712/*
713 *
714 * RESOURCE ACCESS FUNCTIONS
715 *
716 */
717
718/**
719 * asic_resource_get - retrieves parameters for a platform resource.
720 * @name: string to match resource
721 *
722 * Returns a pointer to a struct resource corresponding to the given name.
723 *
724 * CANNOT BE NAMED platform_resource_get, which would be the obvious choice,
725 * as this function name is already declared
726 */
727struct resource *asic_resource_get(const char *name)
728{
729 int i;
730
731 for (i = 0; gp_resources[i].flags != 0; i++) {
732 if (strcmp(gp_resources[i].name, name) == 0)
733 return &gp_resources[i];
734 }
735
736 return NULL;
737}
738EXPORT_SYMBOL(asic_resource_get);
739
740/**
741 * platform_release_memory - release pre-allocated memory
742 * @ptr: pointer to memory to release
743 * @size: size of resource
744 *
745 * This must only be called for memory allocated or reserved via the boot
746 * memory allocator.
747 */
748void platform_release_memory(void *ptr, int size)
749{
750 unsigned long addr;
751 unsigned long end;
752
753 addr = ((unsigned long)ptr + (PAGE_SIZE - 1)) & PAGE_MASK;
754 end = ((unsigned long)ptr + size) & PAGE_MASK;
755
756 for (; addr < end; addr += PAGE_SIZE) {
757 ClearPageReserved(virt_to_page(__va(addr)));
758 init_page_count(virt_to_page(__va(addr)));
759 free_page((unsigned long)__va(addr));
760 }
761}
762EXPORT_SYMBOL(platform_release_memory);
763
764/*
765 *
766 * FEATURE AVAILABILITY FUNCTIONS
767 *
768 */
769int platform_supports_dvr(void)
770{
771 return (platform_features & DVR_CAPABLE) != 0;
772}
773
774int platform_supports_ffs(void)
775{
776 return (platform_features & FFS_CAPABLE) != 0;
777}
778
779int platform_supports_pcie(void)
780{
781 return (platform_features & PCIE_CAPABLE) != 0;
782}
783
784int platform_supports_display(void)
785{
786 return (platform_features & DISPLAY_CAPABLE) != 0;
787}
diff --git a/arch/mips/powertv/asic/asic_int.c b/arch/mips/powertv/asic/asic_int.c
new file mode 100644
index 000000000000..80b2eed21ac3
--- /dev/null
+++ b/arch/mips/powertv/asic/asic_int.c
@@ -0,0 +1,125 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
4 * Copyright (C) 2001 Ralf Baechle
5 * Portions copyright (C) 2009 Cisco Systems, Inc.
6 *
7 * This program is free software; you can distribute it and/or modify it
8 * under the terms of the GNU General Public License (Version 2) as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
19 *
20 * Routines for generic manipulation of the interrupts found on the PowerTV
21 * platform.
22 *
23 * The interrupt controller is located in the South Bridge a PIIX4 device
24 * with two internal 82C95 interrupt controllers.
25 */
26#include <linux/init.h>
27#include <linux/irq.h>
28#include <linux/sched.h>
29#include <linux/slab.h>
30#include <linux/interrupt.h>
31#include <linux/kernel_stat.h>
32#include <linux/kernel.h>
33#include <linux/random.h>
34
35#include <asm/irq_cpu.h>
36#include <linux/io.h>
37#include <asm/irq_regs.h>
38#include <asm/mips-boards/generic.h>
39
40#include <asm/mach-powertv/asic_regs.h>
41
42static DEFINE_SPINLOCK(asic_irq_lock);
43
44static inline int get_int(void)
45{
46 unsigned long flags;
47 int irq;
48
49 spin_lock_irqsave(&asic_irq_lock, flags);
50
51 irq = (asic_read(int_int_scan) >> 4) - 1;
52
53 if (irq == 0 || irq >= NR_IRQS)
54 irq = -1;
55
56 spin_unlock_irqrestore(&asic_irq_lock, flags);
57
58 return irq;
59}
60
61static void asic_irqdispatch(void)
62{
63 int irq;
64
65 irq = get_int();
66 if (irq < 0)
67 return; /* interrupt has already been cleared */
68
69 do_IRQ(irq);
70}
71
72static inline int clz(unsigned long x)
73{
74 __asm__(
75 " .set push \n"
76 " .set mips32 \n"
77 " clz %0, %1 \n"
78 " .set pop \n"
79 : "=r" (x)
80 : "r" (x));
81
82 return x;
83}
84
85/*
86 * Version of ffs that only looks at bits 12..15.
87 */
88static inline unsigned int irq_ffs(unsigned int pending)
89{
90 return fls(pending) - 1 + CAUSEB_IP;
91}
92
93/*
94 * TODO: check how it works under EIC mode.
95 */
96asmlinkage void plat_irq_dispatch(void)
97{
98 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
99 int irq;
100
101 irq = irq_ffs(pending);
102
103 if (irq == CAUSEF_IP3)
104 asic_irqdispatch();
105 else if (irq >= 0)
106 do_IRQ(irq);
107 else
108 spurious_interrupt();
109}
110
111void __init arch_init_irq(void)
112{
113 int i;
114
115 asic_irq_init();
116
117 /*
118 * Initialize interrupt exception vectors.
119 */
120 if (cpu_has_veic || cpu_has_vint) {
121 int nvec = cpu_has_veic ? 64 : 8;
122 for (i = 0; i < nvec; i++)
123 set_vi_handler(i, asic_irqdispatch);
124 }
125}
diff --git a/arch/mips/powertv/asic/irq_asic.c b/arch/mips/powertv/asic/irq_asic.c
new file mode 100644
index 000000000000..b54d24499b06
--- /dev/null
+++ b/arch/mips/powertv/asic/irq_asic.c
@@ -0,0 +1,116 @@
1/*
2 * Portions copyright (C) 2005-2009 Scientific Atlanta
3 * Portions copyright (C) 2009 Cisco Systems, Inc.
4 *
5 * Modified from arch/mips/kernel/irq-rm7000.c:
6 * Copyright (C) 2003 Ralf Baechle
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#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/kernel.h>
16
17#include <asm/irq_cpu.h>
18#include <asm/mipsregs.h>
19#include <asm/system.h>
20
21#include <asm/mach-powertv/asic_regs.h>
22
23static inline void unmask_asic_irq(unsigned int irq)
24{
25 unsigned long enable_bit;
26
27 enable_bit = (1 << (irq & 0x1f));
28
29 switch (irq >> 5) {
30 case 0:
31 asic_write(asic_read(ien_int_0) | enable_bit, ien_int_0);
32 break;
33 case 1:
34 asic_write(asic_read(ien_int_1) | enable_bit, ien_int_1);
35 break;
36 case 2:
37 asic_write(asic_read(ien_int_2) | enable_bit, ien_int_2);
38 break;
39 case 3:
40 asic_write(asic_read(ien_int_3) | enable_bit, ien_int_3);
41 break;
42 default:
43 BUG();
44 }
45}
46
47static inline void mask_asic_irq(unsigned int irq)
48{
49 unsigned long disable_mask;
50
51 disable_mask = ~(1 << (irq & 0x1f));
52
53 switch (irq >> 5) {
54 case 0:
55 asic_write(asic_read(ien_int_0) & disable_mask, ien_int_0);
56 break;
57 case 1:
58 asic_write(asic_read(ien_int_1) & disable_mask, ien_int_1);
59 break;
60 case 2:
61 asic_write(asic_read(ien_int_2) & disable_mask, ien_int_2);
62 break;
63 case 3:
64 asic_write(asic_read(ien_int_3) & disable_mask, ien_int_3);
65 break;
66 default:
67 BUG();
68 }
69}
70
71static struct irq_chip asic_irq_chip = {
72 .name = "ASIC Level",
73 .ack = mask_asic_irq,
74 .mask = mask_asic_irq,
75 .mask_ack = mask_asic_irq,
76 .unmask = unmask_asic_irq,
77 .eoi = unmask_asic_irq,
78};
79
80void __init asic_irq_init(void)
81{
82 int i;
83
84 /* set priority to 0 */
85 write_c0_status(read_c0_status() & ~(0x0000fc00));
86
87 asic_write(0, ien_int_0);
88 asic_write(0, ien_int_1);
89 asic_write(0, ien_int_2);
90 asic_write(0, ien_int_3);
91
92 asic_write(0x0fffffff, int_level_3_3);
93 asic_write(0xffffffff, int_level_3_2);
94 asic_write(0xffffffff, int_level_3_1);
95 asic_write(0xffffffff, int_level_3_0);
96 asic_write(0xffffffff, int_level_2_3);
97 asic_write(0xffffffff, int_level_2_2);
98 asic_write(0xffffffff, int_level_2_1);
99 asic_write(0xffffffff, int_level_2_0);
100 asic_write(0xffffffff, int_level_1_3);
101 asic_write(0xffffffff, int_level_1_2);
102 asic_write(0xffffffff, int_level_1_1);
103 asic_write(0xffffffff, int_level_1_0);
104 asic_write(0xffffffff, int_level_0_3);
105 asic_write(0xffffffff, int_level_0_2);
106 asic_write(0xffffffff, int_level_0_1);
107 asic_write(0xffffffff, int_level_0_0);
108
109 asic_write(0xf, int_int_scan);
110
111 /*
112 * Initialize interrupt handlers.
113 */
114 for (i = 0; i < NR_IRQS; i++)
115 set_irq_chip_and_handler(i, &asic_irq_chip, handle_level_irq);
116}
diff --git a/arch/mips/powertv/asic/prealloc-calliope.c b/arch/mips/powertv/asic/prealloc-calliope.c
new file mode 100644
index 000000000000..cd5b76a1c951
--- /dev/null
+++ b/arch/mips/powertv/asic/prealloc-calliope.c
@@ -0,0 +1,620 @@
1/*
2 * Memory pre-allocations for Calliope boxes.
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 */
23
24#include <linux/init.h>
25#include <asm/mach-powertv/asic.h>
26
27/*
28 * NON_DVR_CAPABLE CALLIOPE RESOURCES
29 */
30struct resource non_dvr_calliope_resources[] __initdata =
31{
32 /*
33 * VIDEO / LX1
34 */
35 {
36 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
37 .start = 0x24000000,
38 .end = 0x24200000 - 1, /*2MiB */
39 .flags = IORESOURCE_MEM,
40 },
41 {
42 .name = "ST231aMonitor", /*8KiB block ST231a monitor */
43 .start = 0x24200000,
44 .end = 0x24202000 - 1,
45 .flags = IORESOURCE_MEM,
46 },
47 {
48 .name = "MediaMemory1",
49 .start = 0x24202000,
50 .end = 0x26700000 - 1, /*~36.9MiB (32MiB - (2MiB + 8KiB)) */
51 .flags = IORESOURCE_MEM,
52 },
53 /*
54 * Sysaudio Driver
55 */
56 {
57 .name = "DSP_Image_Buff",
58 .start = 0x00000000,
59 .end = 0x000FFFFF,
60 .flags = IORESOURCE_MEM,
61 },
62 {
63 .name = "ADSC_CPU_PCM_Buff",
64 .start = 0x00000000,
65 .end = 0x00009FFF,
66 .flags = IORESOURCE_MEM,
67 },
68 {
69 .name = "ADSC_AUX_Buff",
70 .start = 0x00000000,
71 .end = 0x00003FFF,
72 .flags = IORESOURCE_MEM,
73 },
74 {
75 .name = "ADSC_Main_Buff",
76 .start = 0x00000000,
77 .end = 0x00003FFF,
78 .flags = IORESOURCE_MEM,
79 },
80 /*
81 * STAVEM driver/STAPI
82 */
83 {
84 .name = "AVMEMPartition0",
85 .start = 0x00000000,
86 .end = 0x00600000 - 1, /* 6 MB total */
87 .flags = IORESOURCE_MEM,
88 },
89 /*
90 * DOCSIS Subsystem
91 */
92 {
93 .name = "Docsis",
94 .start = 0x22000000,
95 .end = 0x22700000 - 1,
96 .flags = IORESOURCE_MEM,
97 },
98 /*
99 * GHW HAL Driver
100 */
101 {
102 .name = "GraphicsHeap",
103 .start = 0x22700000,
104 .end = 0x23500000 - 1, /* 14 MB total */
105 .flags = IORESOURCE_MEM,
106 },
107 /*
108 * multi com buffer area
109 */
110 {
111 .name = "MulticomSHM",
112 .start = 0x23700000,
113 .end = 0x23720000 - 1,
114 .flags = IORESOURCE_MEM,
115 },
116 /*
117 * DMA Ring buffer (don't need recording buffers)
118 */
119 {
120 .name = "BMM_Buffer",
121 .start = 0x00000000,
122 .end = 0x000AA000 - 1,
123 .flags = IORESOURCE_MEM,
124 },
125 /*
126 * Display bins buffer for unit0
127 */
128 {
129 .name = "DisplayBins0",
130 .start = 0x00000000,
131 .end = 0x00000FFF, /* 4 KB total */
132 .flags = IORESOURCE_MEM,
133 },
134 /*
135 *
136 * AVFS: player HAL memory
137 *
138 *
139 */
140 {
141 .name = "AvfsDmaMem",
142 .start = 0x00000000,
143 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */
144 .flags = IORESOURCE_MEM,
145 },
146 /*
147 * PMEM
148 */
149 {
150 .name = "DiagPersistentMemory",
151 .start = 0x00000000,
152 .end = 0x10000 - 1,
153 .flags = IORESOURCE_MEM,
154 },
155 /*
156 * Smartcard
157 */
158 {
159 .name = "SmartCardInfo",
160 .start = 0x00000000,
161 .end = 0x2800 - 1,
162 .flags = IORESOURCE_MEM,
163 },
164 /*
165 * NAND Flash
166 */
167 {
168 .name = "NandFlash",
169 .start = NAND_FLASH_BASE,
170 .end = NAND_FLASH_BASE + 0x400 - 1,
171 .flags = IORESOURCE_IO,
172 },
173 /*
174 * Synopsys GMAC Memory Region
175 */
176 {
177 .name = "GMAC",
178 .start = 0x00000000,
179 .end = 0x00010000 - 1,
180 .flags = IORESOURCE_MEM,
181 },
182 /*
183 * Add other resources here
184 *
185 */
186 { },
187};
188
189struct resource non_dvr_vz_calliope_resources[] __initdata =
190{
191 /*
192 * VIDEO / LX1
193 */
194 {
195 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
196 .start = 0x24000000,
197 .end = 0x24200000 - 1, /*2 Meg */
198 .flags = IORESOURCE_MEM,
199 },
200 {
201 .name = "ST231aMonitor", /* 8k block ST231a monitor */
202 .start = 0x24200000,
203 .end = 0x24202000 - 1,
204 .flags = IORESOURCE_MEM,
205 },
206 {
207 .name = "MediaMemory1",
208 .start = 0x22202000,
209 .end = 0x22C20B85 - 1, /* 10.12 Meg */
210 .flags = IORESOURCE_MEM,
211 },
212 /*
213 * Sysaudio Driver
214 */
215 {
216 .name = "DSP_Image_Buff",
217 .start = 0x00000000,
218 .end = 0x000FFFFF,
219 .flags = IORESOURCE_MEM,
220 },
221 {
222 .name = "ADSC_CPU_PCM_Buff",
223 .start = 0x00000000,
224 .end = 0x00009FFF,
225 .flags = IORESOURCE_MEM,
226 },
227 {
228 .name = "ADSC_AUX_Buff",
229 .start = 0x00000000,
230 .end = 0x00003FFF,
231 .flags = IORESOURCE_MEM,
232 },
233 {
234 .name = "ADSC_Main_Buff",
235 .start = 0x00000000,
236 .end = 0x00003FFF,
237 .flags = IORESOURCE_MEM,
238 },
239 /*
240 * STAVEM driver/STAPI
241 */
242 {
243 .name = "AVMEMPartition0",
244 .start = 0x20300000,
245 .end = 0x20620000-1, /*3.125 MB total */
246 .flags = IORESOURCE_MEM,
247 },
248 /*
249 * GHW HAL Driver
250 */
251 {
252 .name = "GraphicsHeap",
253 .start = 0x20100000,
254 .end = 0x20300000 - 1,
255 .flags = IORESOURCE_MEM,
256 },
257 /*
258 * multi com buffer area
259 */
260 {
261 .name = "MulticomSHM",
262 .start = 0x23900000,
263 .end = 0x23920000 - 1,
264 .flags = IORESOURCE_MEM,
265 },
266 /*
267 * DMA Ring buffer
268 */
269 {
270 .name = "BMM_Buffer",
271 .start = 0x00000000,
272 .end = 0x000AA000 - 1,
273 .flags = IORESOURCE_MEM,
274 },
275 /*
276 * Display bins buffer for unit0
277 */
278 {
279 .name = "DisplayBins0",
280 .start = 0x00000000,
281 .end = 0x00000FFF,
282 .flags = IORESOURCE_MEM,
283 },
284 /*
285 * PMEM
286 */
287 {
288 .name = "DiagPersistentMemory",
289 .start = 0x00000000,
290 .end = 0x10000 - 1,
291 .flags = IORESOURCE_MEM,
292 },
293 /*
294 * Smartcard
295 */
296 {
297 .name = "SmartCardInfo",
298 .start = 0x00000000,
299 .end = 0x2800 - 1,
300 .flags = IORESOURCE_MEM,
301 },
302 /*
303 * NAND Flash
304 */
305 {
306 .name = "NandFlash",
307 .start = NAND_FLASH_BASE,
308 .end = NAND_FLASH_BASE+0x400 - 1,
309 .flags = IORESOURCE_IO,
310 },
311 /*
312 * Synopsys GMAC Memory Region
313 */
314 {
315 .name = "GMAC",
316 .start = 0x00000000,
317 .end = 0x00010000 - 1,
318 .flags = IORESOURCE_MEM,
319 },
320 /*
321 * Add other resources here
322 */
323 { },
324};
325
326struct resource non_dvr_vze_calliope_resources[] __initdata =
327{
328 /*
329 * VIDEO / LX1
330 */
331 {
332 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
333 .start = 0x22000000,
334 .end = 0x22200000 - 1, /*2 Meg */
335 .flags = IORESOURCE_MEM,
336 },
337 {
338 .name = "ST231aMonitor", /* 8k block ST231a monitor */
339 .start = 0x22200000,
340 .end = 0x22202000 - 1,
341 .flags = IORESOURCE_MEM,
342 },
343 {
344 .name = "MediaMemory1",
345 .start = 0x22202000,
346 .end = 0x22C20B85 - 1, /* 10.12 Meg */
347 .flags = IORESOURCE_MEM,
348 },
349 /*
350 * Sysaudio Driver
351 */
352 {
353 .name = "DSP_Image_Buff",
354 .start = 0x00000000,
355 .end = 0x000FFFFF,
356 .flags = IORESOURCE_MEM,
357 },
358 {
359 .name = "ADSC_CPU_PCM_Buff",
360 .start = 0x00000000,
361 .end = 0x00009FFF,
362 .flags = IORESOURCE_MEM,
363 },
364 {
365 .name = "ADSC_AUX_Buff",
366 .start = 0x00000000,
367 .end = 0x00003FFF,
368 .flags = IORESOURCE_MEM,
369 },
370 {
371 .name = "ADSC_Main_Buff",
372 .start = 0x00000000,
373 .end = 0x00003FFF,
374 .flags = IORESOURCE_MEM,
375 },
376 /*
377 * STAVEM driver/STAPI
378 */
379 {
380 .name = "AVMEMPartition0",
381 .start = 0x20396000,
382 .end = 0x206B6000 - 1, /* 3.125 MB total */
383 .flags = IORESOURCE_MEM,
384 },
385 /*
386 * GHW HAL Driver
387 */
388 {
389 .name = "GraphicsHeap",
390 .start = 0x20100000,
391 .end = 0x20396000 - 1,
392 .flags = IORESOURCE_MEM,
393 },
394 /*
395 * multi com buffer area
396 */
397 {
398 .name = "MulticomSHM",
399 .start = 0x206B6000,
400 .end = 0x206D6000 - 1,
401 .flags = IORESOURCE_MEM,
402 },
403 /*
404 * DMA Ring buffer
405 */
406 {
407 .name = "BMM_Buffer",
408 .start = 0x00000000,
409 .end = 0x000AA000 - 1,
410 .flags = IORESOURCE_MEM,
411 },
412 /*
413 * Display bins buffer for unit0
414 */
415 {
416 .name = "DisplayBins0",
417 .start = 0x00000000,
418 .end = 0x00000FFF,
419 .flags = IORESOURCE_MEM,
420 },
421 /*
422 * PMEM
423 */
424 {
425 .name = "DiagPersistentMemory",
426 .start = 0x00000000,
427 .end = 0x10000 - 1,
428 .flags = IORESOURCE_MEM,
429 },
430 /*
431 * Smartcard
432 */
433 {
434 .name = "SmartCardInfo",
435 .start = 0x00000000,
436 .end = 0x2800 - 1,
437 .flags = IORESOURCE_MEM,
438 },
439 /*
440 * NAND Flash
441 */
442 {
443 .name = "NandFlash",
444 .start = NAND_FLASH_BASE,
445 .end = NAND_FLASH_BASE+0x400 - 1,
446 .flags = IORESOURCE_MEM,
447 },
448 /*
449 * Synopsys GMAC Memory Region
450 */
451 {
452 .name = "GMAC",
453 .start = 0x00000000,
454 .end = 0x00010000 - 1,
455 .flags = IORESOURCE_MEM,
456 },
457 /*
458 * Add other resources here
459 */
460 { },
461};
462
463struct resource non_dvr_vzf_calliope_resources[] __initdata =
464{
465 /*
466 * VIDEO / LX1
467 */
468 {
469 .name = "ST231aImage", /*Delta-Mu 1 image and ram */
470 .start = 0x24000000,
471 .end = 0x24200000 - 1, /*2MiB */
472 .flags = IORESOURCE_MEM,
473 },
474 {
475 .name = "ST231aMonitor", /*8KiB block ST231a monitor */
476 .start = 0x24200000,
477 .end = 0x24202000 - 1,
478 .flags = IORESOURCE_MEM,
479 },
480 {
481 .name = "MediaMemory1",
482 .start = 0x24202000,
483 /* ~19.4 (21.5MiB - (2MiB + 8KiB)) */
484 .end = 0x25580000 - 1,
485 .flags = IORESOURCE_MEM,
486 },
487 /*
488 * Sysaudio Driver
489 */
490 {
491 .name = "DSP_Image_Buff",
492 .start = 0x00000000,
493 .end = 0x000FFFFF,
494 .flags = IORESOURCE_MEM,
495 },
496 {
497 .name = "ADSC_CPU_PCM_Buff",
498 .start = 0x00000000,
499 .end = 0x00009FFF,
500 .flags = IORESOURCE_MEM,
501 },
502 {
503 .name = "ADSC_AUX_Buff",
504 .start = 0x00000000,
505 .end = 0x00003FFF,
506 .flags = IORESOURCE_MEM,
507 },
508 {
509 .name = "ADSC_Main_Buff",
510 .start = 0x00000000,
511 .end = 0x00003FFF,
512 .flags = IORESOURCE_MEM,
513 },
514 /*
515 * STAVEM driver/STAPI
516 */
517 {
518 .name = "AVMEMPartition0",
519 .start = 0x00000000,
520 .end = 0x00480000 - 1, /* 4.5 MB total */
521 .flags = IORESOURCE_MEM,
522 },
523 /*
524 * GHW HAL Driver
525 */
526 {
527 .name = "GraphicsHeap",
528 .start = 0x22700000,
529 .end = 0x23500000 - 1, /* 14 MB total */
530 .flags = IORESOURCE_MEM,
531 },
532 /*
533 * multi com buffer area
534 */
535 {
536 .name = "MulticomSHM",
537 .start = 0x23700000,
538 .end = 0x23720000 - 1,
539 .flags = IORESOURCE_MEM,
540 },
541 /*
542 * DMA Ring buffer (don't need recording buffers)
543 */
544 {
545 .name = "BMM_Buffer",
546 .start = 0x00000000,
547 .end = 0x000AA000 - 1,
548 .flags = IORESOURCE_MEM,
549 },
550 /*
551 * Display bins buffer for unit0
552 */
553 {
554 .name = "DisplayBins0",
555 .start = 0x00000000,
556 .end = 0x00000FFF, /* 4 KB total */
557 .flags = IORESOURCE_MEM,
558 },
559 /*
560 * Display bins buffer for unit1
561 */
562 {
563 .name = "DisplayBins1",
564 .start = 0x00000000,
565 .end = 0x00000FFF, /* 4 KB total */
566 .flags = IORESOURCE_MEM,
567 },
568 /*
569 *
570 * AVFS: player HAL memory
571 *
572 *
573 */
574 {
575 .name = "AvfsDmaMem",
576 .start = 0x00000000,
577 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */
578 .flags = IORESOURCE_MEM,
579 },
580 /*
581 * PMEM
582 */
583 {
584 .name = "DiagPersistentMemory",
585 .start = 0x00000000,
586 .end = 0x10000 - 1,
587 .flags = IORESOURCE_MEM,
588 },
589 /*
590 * Smartcard
591 */
592 {
593 .name = "SmartCardInfo",
594 .start = 0x00000000,
595 .end = 0x2800 - 1,
596 .flags = IORESOURCE_MEM,
597 },
598 /*
599 * NAND Flash
600 */
601 {
602 .name = "NandFlash",
603 .start = NAND_FLASH_BASE,
604 .end = NAND_FLASH_BASE + 0x400 - 1,
605 .flags = IORESOURCE_MEM,
606 },
607 /*
608 * Synopsys GMAC Memory Region
609 */
610 {
611 .name = "GMAC",
612 .start = 0x00000000,
613 .end = 0x00010000 - 1,
614 .flags = IORESOURCE_MEM,
615 },
616 /*
617 * Add other resources here
618 */
619 { },
620};
diff --git a/arch/mips/powertv/asic/prealloc-cronus.c b/arch/mips/powertv/asic/prealloc-cronus.c
new file mode 100644
index 000000000000..45a5c3ea718c
--- /dev/null
+++ b/arch/mips/powertv/asic/prealloc-cronus.c
@@ -0,0 +1,608 @@
1/*
2 * Memory pre-allocations for Cronus boxes.
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 */
23
24#include <linux/init.h>
25#include <asm/mach-powertv/asic.h>
26
27/*
28 * DVR_CAPABLE CRONUS RESOURCES
29 */
30struct resource dvr_cronus_resources[] __initdata =
31{
32 /*
33 *
34 * VIDEO1 / LX1
35 *
36 */
37 {
38 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
39 .start = 0x24000000,
40 .end = 0x241FFFFF, /* 2MiB */
41 .flags = IORESOURCE_MEM,
42 },
43 {
44 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
45 .start = 0x24200000,
46 .end = 0x24201FFF,
47 .flags = IORESOURCE_MEM,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x24202000,
52 .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_MEM,
54 },
55 /*
56 *
57 * VIDEO2 / LX2
58 *
59 */
60 {
61 .name = "ST231bImage", /* Delta-Mu 2 image and ram */
62 .start = 0x60000000,
63 .end = 0x601FFFFF, /* 2MiB */
64 .flags = IORESOURCE_IO,
65 },
66 {
67 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
68 .start = 0x60200000,
69 .end = 0x60201FFF,
70 .flags = IORESOURCE_IO,
71 },
72 {
73 .name = "MediaMemory2",
74 .start = 0x60202000,
75 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
76 .flags = IORESOURCE_IO,
77 },
78 /*
79 *
80 * Sysaudio Driver
81 *
82 * This driver requires:
83 *
84 * Arbitrary Based Buffers:
85 * DSP_Image_Buff - DSP code and data images (1MB)
86 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
87 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
88 * ADSC_Main_Buff - ADSC Main buffer (16KB)
89 *
90 */
91 {
92 .name = "DSP_Image_Buff",
93 .start = 0x00000000,
94 .end = 0x000FFFFF,
95 .flags = IORESOURCE_MEM,
96 },
97 {
98 .name = "ADSC_CPU_PCM_Buff",
99 .start = 0x00000000,
100 .end = 0x00009FFF,
101 .flags = IORESOURCE_MEM,
102 },
103 {
104 .name = "ADSC_AUX_Buff",
105 .start = 0x00000000,
106 .end = 0x00003FFF,
107 .flags = IORESOURCE_MEM,
108 },
109 {
110 .name = "ADSC_Main_Buff",
111 .start = 0x00000000,
112 .end = 0x00003FFF,
113 .flags = IORESOURCE_MEM,
114 },
115 /*
116 *
117 * STAVEM driver/STAPI
118 *
119 * This driver requires:
120 *
121 * Arbitrary Based Buffers:
122 * This memory area is used for allocating buffers for Video decoding
123 * purposes. Allocation/De-allocation within this buffer is managed
124 * by the STAVMEM driver of the STAPI. They could be Decimated
125 * Picture Buffers, Intermediate Buffers, as deemed necessary for
126 * video decoding purposes, for any video decoders on Zeus.
127 *
128 */
129 {
130 .name = "AVMEMPartition0",
131 .start = 0x63580000,
132 .end = 0x64180000 - 1, /* 12 MB total */
133 .flags = IORESOURCE_IO,
134 },
135 /*
136 *
137 * DOCSIS Subsystem
138 *
139 * This driver requires:
140 *
141 * Arbitrary Based Buffers:
142 * Docsis -
143 *
144 */
145 {
146 .name = "Docsis",
147 .start = 0x62000000,
148 .end = 0x62700000 - 1, /* 7 MB total */
149 .flags = IORESOURCE_IO,
150 },
151 /*
152 *
153 * GHW HAL Driver
154 *
155 * This driver requires:
156 *
157 * Arbitrary Based Buffers:
158 * GraphicsHeap - PowerTV Graphics Heap
159 *
160 */
161 {
162 .name = "GraphicsHeap",
163 .start = 0x62700000,
164 .end = 0x63500000 - 1, /* 14 MB total */
165 .flags = IORESOURCE_IO,
166 },
167 /*
168 *
169 * multi com buffer area
170 *
171 * This driver requires:
172 *
173 * Arbitrary Based Buffers:
174 * Docsis -
175 *
176 */
177 {
178 .name = "MulticomSHM",
179 .start = 0x26000000,
180 .end = 0x26020000 - 1,
181 .flags = IORESOURCE_MEM,
182 },
183 /*
184 *
185 * DMA Ring buffer
186 *
187 * This driver requires:
188 *
189 * Arbitrary Based Buffers:
190 * Docsis -
191 *
192 */
193 {
194 .name = "BMM_Buffer",
195 .start = 0x00000000,
196 .end = 0x00280000 - 1,
197 .flags = IORESOURCE_MEM,
198 },
199 /*
200 *
201 * Display bins buffer for unit0
202 *
203 * This driver requires:
204 *
205 * Arbitrary Based Buffers:
206 * Display Bins for unit0
207 *
208 */
209 {
210 .name = "DisplayBins0",
211 .start = 0x00000000,
212 .end = 0x00000FFF, /* 4 KB total */
213 .flags = IORESOURCE_MEM,
214 },
215 /*
216 *
217 * Display bins buffer
218 *
219 * This driver requires:
220 *
221 * Arbitrary Based Buffers:
222 * Display Bins for unit1
223 *
224 */
225 {
226 .name = "DisplayBins1",
227 .start = 0x64AD4000,
228 .end = 0x64AD5000 - 1, /* 4 KB total */
229 .flags = IORESOURCE_IO,
230 },
231 /*
232 *
233 * ITFS
234 *
235 * This driver requires:
236 *
237 * Arbitrary Based Buffers:
238 * Docsis -
239 *
240 */
241 {
242 .name = "ITFS",
243 .start = 0x64180000,
244 /* 815,104 bytes each for 2 ITFS partitions. */
245 .end = 0x6430DFFF,
246 .flags = IORESOURCE_IO,
247 },
248 /*
249 *
250 * AVFS
251 *
252 * This driver requires:
253 *
254 * Arbitrary Based Buffers:
255 * Docsis -
256 *
257 */
258 {
259 .name = "AvfsDmaMem",
260 .start = 0x6430E000,
261 /* (945K * 8) = (128K *3) 5 playbacks / 3 server */
262 .end = 0x64AD0000 - 1,
263 .flags = IORESOURCE_IO,
264 },
265 {
266 .name = "AvfsFileSys",
267 .start = 0x64AD0000,
268 .end = 0x64AD1000 - 1, /* 4K */
269 .flags = IORESOURCE_IO,
270 },
271 /*
272 *
273 * PMEM
274 *
275 * This driver requires:
276 *
277 * Arbitrary Based Buffers:
278 * Persistent memory for diagnostics.
279 *
280 */
281 {
282 .name = "DiagPersistentMemory",
283 .start = 0x00000000,
284 .end = 0x10000 - 1,
285 .flags = IORESOURCE_MEM,
286 },
287 /*
288 *
289 * Smartcard
290 *
291 * This driver requires:
292 *
293 * Arbitrary Based Buffers:
294 * Read and write buffers for Internal/External cards
295 *
296 */
297 {
298 .name = "SmartCardInfo",
299 .start = 0x64AD1000,
300 .end = 0x64AD3800 - 1,
301 .flags = IORESOURCE_IO,
302 },
303 /*
304 *
305 * KAVNET
306 * NP Reset Vector - must be of the form xxCxxxxx
307 * NP Image - must be video bank 1
308 * NP IPC - must be video bank 2
309 */
310 {
311 .name = "NP_Reset_Vector",
312 .start = 0x27c00000,
313 .end = 0x27c01000 - 1,
314 .flags = IORESOURCE_MEM,
315 },
316 {
317 .name = "NP_Image",
318 .start = 0x27020000,
319 .end = 0x27060000 - 1,
320 .flags = IORESOURCE_MEM,
321 },
322 {
323 .name = "NP_IPC",
324 .start = 0x63500000,
325 .end = 0x63580000 - 1,
326 .flags = IORESOURCE_IO,
327 },
328 /*
329 * Add other resources here
330 */
331 { },
332};
333
334/*
335 * NON_DVR_CAPABLE CRONUS RESOURCES
336 */
337struct resource non_dvr_cronus_resources[] __initdata =
338{
339 /*
340 *
341 * VIDEO1 / LX1
342 *
343 */
344 {
345 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
346 .start = 0x24000000,
347 .end = 0x241FFFFF, /* 2MiB */
348 .flags = IORESOURCE_MEM,
349 },
350 {
351 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
352 .start = 0x24200000,
353 .end = 0x24201FFF,
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .name = "MediaMemory1",
358 .start = 0x24202000,
359 .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
360 .flags = IORESOURCE_MEM,
361 },
362 /*
363 *
364 * VIDEO2 / LX2
365 *
366 */
367 {
368 .name = "ST231bImage", /* Delta-Mu 2 image and ram */
369 .start = 0x60000000,
370 .end = 0x601FFFFF, /* 2MiB */
371 .flags = IORESOURCE_IO,
372 },
373 {
374 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
375 .start = 0x60200000,
376 .end = 0x60201FFF,
377 .flags = IORESOURCE_IO,
378 },
379 {
380 .name = "MediaMemory2",
381 .start = 0x60202000,
382 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
383 .flags = IORESOURCE_IO,
384 },
385 /*
386 *
387 * Sysaudio Driver
388 *
389 * This driver requires:
390 *
391 * Arbitrary Based Buffers:
392 * DSP_Image_Buff - DSP code and data images (1MB)
393 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
394 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
395 * ADSC_Main_Buff - ADSC Main buffer (16KB)
396 *
397 */
398 {
399 .name = "DSP_Image_Buff",
400 .start = 0x00000000,
401 .end = 0x000FFFFF,
402 .flags = IORESOURCE_MEM,
403 },
404 {
405 .name = "ADSC_CPU_PCM_Buff",
406 .start = 0x00000000,
407 .end = 0x00009FFF,
408 .flags = IORESOURCE_MEM,
409 },
410 {
411 .name = "ADSC_AUX_Buff",
412 .start = 0x00000000,
413 .end = 0x00003FFF,
414 .flags = IORESOURCE_MEM,
415 },
416 {
417 .name = "ADSC_Main_Buff",
418 .start = 0x00000000,
419 .end = 0x00003FFF,
420 .flags = IORESOURCE_MEM,
421 },
422 /*
423 *
424 * STAVEM driver/STAPI
425 *
426 * This driver requires:
427 *
428 * Arbitrary Based Buffers:
429 * This memory area is used for allocating buffers for Video decoding
430 * purposes. Allocation/De-allocation within this buffer is managed
431 * by the STAVMEM driver of the STAPI. They could be Decimated
432 * Picture Buffers, Intermediate Buffers, as deemed necessary for
433 * video decoding purposes, for any video decoders on Zeus.
434 *
435 */
436 {
437 .name = "AVMEMPartition0",
438 .start = 0x63580000,
439 .end = 0x64180000 - 1, /* 12 MB total */
440 .flags = IORESOURCE_IO,
441 },
442 /*
443 *
444 * DOCSIS Subsystem
445 *
446 * This driver requires:
447 *
448 * Arbitrary Based Buffers:
449 * Docsis -
450 *
451 */
452 {
453 .name = "Docsis",
454 .start = 0x62000000,
455 .end = 0x62700000 - 1, /* 7 MB total */
456 .flags = IORESOURCE_IO,
457 },
458 /*
459 *
460 * GHW HAL Driver
461 *
462 * This driver requires:
463 *
464 * Arbitrary Based Buffers:
465 * GraphicsHeap - PowerTV Graphics Heap
466 *
467 */
468 {
469 .name = "GraphicsHeap",
470 .start = 0x62700000,
471 .end = 0x63500000 - 1, /* 14 MB total */
472 .flags = IORESOURCE_IO,
473 },
474 /*
475 *
476 * multi com buffer area
477 *
478 * This driver requires:
479 *
480 * Arbitrary Based Buffers:
481 * Docsis -
482 *
483 */
484 {
485 .name = "MulticomSHM",
486 .start = 0x26000000,
487 .end = 0x26020000 - 1,
488 .flags = IORESOURCE_MEM,
489 },
490 /*
491 *
492 * DMA Ring buffer
493 *
494 * This driver requires:
495 *
496 * Arbitrary Based Buffers:
497 * Docsis -
498 *
499 */
500 {
501 .name = "BMM_Buffer",
502 .start = 0x00000000,
503 .end = 0x000AA000 - 1,
504 .flags = IORESOURCE_MEM,
505 },
506 /*
507 *
508 * Display bins buffer for unit0
509 *
510 * This driver requires:
511 *
512 * Arbitrary Based Buffers:
513 * Display Bins for unit0
514 *
515 */
516 {
517 .name = "DisplayBins0",
518 .start = 0x00000000,
519 .end = 0x00000FFF, /* 4 KB total */
520 .flags = IORESOURCE_MEM,
521 },
522 /*
523 *
524 * Display bins buffer
525 *
526 * This driver requires:
527 *
528 * Arbitrary Based Buffers:
529 * Display Bins for unit1
530 *
531 */
532 {
533 .name = "DisplayBins1",
534 .start = 0x64AD4000,
535 .end = 0x64AD5000 - 1, /* 4 KB total */
536 .flags = IORESOURCE_IO,
537 },
538 /*
539 *
540 * AVFS: player HAL memory
541 *
542 *
543 */
544 {
545 .name = "AvfsDmaMem",
546 .start = 0x6430E000,
547 .end = 0x645D2C00 - 1, /* 945K * 3 for playback */
548 .flags = IORESOURCE_IO,
549 },
550 /*
551 *
552 * PMEM
553 *
554 * This driver requires:
555 *
556 * Arbitrary Based Buffers:
557 * Persistent memory for diagnostics.
558 *
559 */
560 {
561 .name = "DiagPersistentMemory",
562 .start = 0x00000000,
563 .end = 0x10000 - 1,
564 .flags = IORESOURCE_MEM,
565 },
566 /*
567 *
568 * Smartcard
569 *
570 * This driver requires:
571 *
572 * Arbitrary Based Buffers:
573 * Read and write buffers for Internal/External cards
574 *
575 */
576 {
577 .name = "SmartCardInfo",
578 .start = 0x64AD1000,
579 .end = 0x64AD3800 - 1,
580 .flags = IORESOURCE_IO,
581 },
582 /*
583 *
584 * KAVNET
585 * NP Reset Vector - must be of the form xxCxxxxx
586 * NP Image - must be video bank 1
587 * NP IPC - must be video bank 2
588 */
589 {
590 .name = "NP_Reset_Vector",
591 .start = 0x27c00000,
592 .end = 0x27c01000 - 1,
593 .flags = IORESOURCE_MEM,
594 },
595 {
596 .name = "NP_Image",
597 .start = 0x27020000,
598 .end = 0x27060000 - 1,
599 .flags = IORESOURCE_MEM,
600 },
601 {
602 .name = "NP_IPC",
603 .start = 0x63500000,
604 .end = 0x63580000 - 1,
605 .flags = IORESOURCE_IO,
606 },
607 { },
608};
diff --git a/arch/mips/powertv/asic/prealloc-cronuslite.c b/arch/mips/powertv/asic/prealloc-cronuslite.c
new file mode 100644
index 000000000000..23a905613c04
--- /dev/null
+++ b/arch/mips/powertv/asic/prealloc-cronuslite.c
@@ -0,0 +1,290 @@
1/*
2 * Memory pre-allocations for Cronus Lite boxes.
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 */
23
24#include <linux/init.h>
25#include <asm/mach-powertv/asic.h>
26
27/*
28 * NON_DVR_CAPABLE CRONUSLITE RESOURCES
29 */
30struct resource non_dvr_cronuslite_resources[] __initdata =
31{
32 /*
33 *
34 * VIDEO2 / LX2
35 *
36 */
37 {
38 .name = "ST231aImage", /* Delta-Mu 2 image and ram */
39 .start = 0x60000000,
40 .end = 0x601FFFFF, /* 2MiB */
41 .flags = IORESOURCE_IO,
42 },
43 {
44 .name = "ST231aMonitor", /* 8KiB block ST231b monitor */
45 .start = 0x60200000,
46 .end = 0x60201FFF,
47 .flags = IORESOURCE_IO,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x60202000,
52 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_IO,
54 },
55 /*
56 *
57 * Sysaudio Driver
58 *
59 * This driver requires:
60 *
61 * Arbitrary Based Buffers:
62 * DSP_Image_Buff - DSP code and data images (1MB)
63 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
64 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
65 * ADSC_Main_Buff - ADSC Main buffer (16KB)
66 *
67 */
68 {
69 .name = "DSP_Image_Buff",
70 .start = 0x00000000,
71 .end = 0x000FFFFF,
72 .flags = IORESOURCE_MEM,
73 },
74 {
75 .name = "ADSC_CPU_PCM_Buff",
76 .start = 0x00000000,
77 .end = 0x00009FFF,
78 .flags = IORESOURCE_MEM,
79 },
80 {
81 .name = "ADSC_AUX_Buff",
82 .start = 0x00000000,
83 .end = 0x00003FFF,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "ADSC_Main_Buff",
88 .start = 0x00000000,
89 .end = 0x00003FFF,
90 .flags = IORESOURCE_MEM,
91 },
92 /*
93 *
94 * STAVEM driver/STAPI
95 *
96 * This driver requires:
97 *
98 * Arbitrary Based Buffers:
99 * This memory area is used for allocating buffers for Video decoding
100 * purposes. Allocation/De-allocation within this buffer is managed
101 * by the STAVMEM driver of the STAPI. They could be Decimated
102 * Picture Buffers, Intermediate Buffers, as deemed necessary for
103 * video decoding purposes, for any video decoders on Zeus.
104 *
105 */
106 {
107 .name = "AVMEMPartition0",
108 .start = 0x63580000,
109 .end = 0x63B80000 - 1, /* 6 MB total */
110 .flags = IORESOURCE_IO,
111 },
112 /*
113 *
114 * DOCSIS Subsystem
115 *
116 * This driver requires:
117 *
118 * Arbitrary Based Buffers:
119 * Docsis -
120 *
121 */
122 {
123 .name = "Docsis",
124 .start = 0x62000000,
125 .end = 0x62700000 - 1, /* 7 MB total */
126 .flags = IORESOURCE_IO,
127 },
128 /*
129 *
130 * GHW HAL Driver
131 *
132 * This driver requires:
133 *
134 * Arbitrary Based Buffers:
135 * GraphicsHeap - PowerTV Graphics Heap
136 *
137 */
138 {
139 .name = "GraphicsHeap",
140 .start = 0x62700000,
141 .end = 0x63500000 - 1, /* 14 MB total */
142 .flags = IORESOURCE_IO,
143 },
144 /*
145 *
146 * multi com buffer area
147 *
148 * This driver requires:
149 *
150 * Arbitrary Based Buffers:
151 * Docsis -
152 *
153 */
154 {
155 .name = "MulticomSHM",
156 .start = 0x26000000,
157 .end = 0x26020000 - 1,
158 .flags = IORESOURCE_MEM,
159 },
160 /*
161 *
162 * DMA Ring buffer
163 *
164 * This driver requires:
165 *
166 * Arbitrary Based Buffers:
167 * Docsis -
168 *
169 */
170 {
171 .name = "BMM_Buffer",
172 .start = 0x00000000,
173 .end = 0x000AA000 - 1,
174 .flags = IORESOURCE_MEM,
175 },
176 /*
177 *
178 * Display bins buffer for unit0
179 *
180 * This driver requires:
181 *
182 * Arbitrary Based Buffers:
183 * Display Bins for unit0
184 *
185 */
186 {
187 .name = "DisplayBins0",
188 .start = 0x00000000,
189 .end = 0x00000FFF, /* 4 KB total */
190 .flags = IORESOURCE_MEM,
191 },
192 /*
193 *
194 * Display bins buffer
195 *
196 * This driver requires:
197 *
198 * Arbitrary Based Buffers:
199 * Display Bins for unit1
200 *
201 */
202 {
203 .name = "DisplayBins1",
204 .start = 0x63B83000,
205 .end = 0x63B84000 - 1, /* 4 KB total */
206 .flags = IORESOURCE_IO,
207 },
208 /*
209 *
210 * AVFS: player HAL memory
211 *
212 *
213 */
214 {
215 .name = "AvfsDmaMem",
216 .start = 0x63B84000,
217 .end = 0x63E48C00 - 1, /* 945K * 3 for playback */
218 .flags = IORESOURCE_IO,
219 },
220 /*
221 *
222 * PMEM
223 *
224 * This driver requires:
225 *
226 * Arbitrary Based Buffers:
227 * Persistent memory for diagnostics.
228 *
229 */
230 {
231 .name = "DiagPersistentMemory",
232 .start = 0x00000000,
233 .end = 0x10000 - 1,
234 .flags = IORESOURCE_MEM,
235 },
236 /*
237 *
238 * Smartcard
239 *
240 * This driver requires:
241 *
242 * Arbitrary Based Buffers:
243 * Read and write buffers for Internal/External cards
244 *
245 */
246 {
247 .name = "SmartCardInfo",
248 .start = 0x63B80000,
249 .end = 0x63B82800 - 1,
250 .flags = IORESOURCE_IO,
251 },
252 /*
253 *
254 * KAVNET
255 * NP Reset Vector - must be of the form xxCxxxxx
256 * NP Image - must be video bank 1
257 * NP IPC - must be video bank 2
258 */
259 {
260 .name = "NP_Reset_Vector",
261 .start = 0x27c00000,
262 .end = 0x27c01000 - 1,
263 .flags = IORESOURCE_MEM,
264 },
265 {
266 .name = "NP_Image",
267 .start = 0x27020000,
268 .end = 0x27060000 - 1,
269 .flags = IORESOURCE_MEM,
270 },
271 {
272 .name = "NP_IPC",
273 .start = 0x63500000,
274 .end = 0x63580000 - 1,
275 .flags = IORESOURCE_IO,
276 },
277 /*
278 * NAND Flash
279 */
280 {
281 .name = "NandFlash",
282 .start = NAND_FLASH_BASE,
283 .end = NAND_FLASH_BASE + 0x400 - 1,
284 .flags = IORESOURCE_IO,
285 },
286 /*
287 * Add other resources here
288 */
289 { },
290};
diff --git a/arch/mips/powertv/asic/prealloc-zeus.c b/arch/mips/powertv/asic/prealloc-zeus.c
new file mode 100644
index 000000000000..018d4514dbe3
--- /dev/null
+++ b/arch/mips/powertv/asic/prealloc-zeus.c
@@ -0,0 +1,459 @@
1/*
2 * Memory pre-allocations for Zeus boxes.
3 *
4 * Copyright (C) 2005-2009 Scientific-Atlanta, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: Ken Eppinett
21 * David Schleef <ds@schleef.org>
22 */
23
24#include <linux/init.h>
25#include <asm/mach-powertv/asic.h>
26
27/*
28 * DVR_CAPABLE RESOURCES
29 */
30struct resource dvr_zeus_resources[] __initdata =
31{
32 /*
33 *
34 * VIDEO1 / LX1
35 *
36 */
37 {
38 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
39 .start = 0x20000000,
40 .end = 0x201FFFFF, /* 2MiB */
41 .flags = IORESOURCE_IO,
42 },
43 {
44 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
45 .start = 0x20200000,
46 .end = 0x20201FFF,
47 .flags = IORESOURCE_IO,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x20202000,
52 .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_IO,
54 },
55 /*
56 *
57 * VIDEO2 / LX2
58 *
59 */
60 {
61 .name = "ST231bImage", /* Delta-Mu 2 image and ram */
62 .start = 0x30000000,
63 .end = 0x301FFFFF, /* 2MiB */
64 .flags = IORESOURCE_IO,
65 },
66 {
67 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
68 .start = 0x30200000,
69 .end = 0x30201FFF,
70 .flags = IORESOURCE_IO,
71 },
72 {
73 .name = "MediaMemory2",
74 .start = 0x30202000,
75 .end = 0x31FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
76 .flags = IORESOURCE_IO,
77 },
78 /*
79 *
80 * Sysaudio Driver
81 *
82 * This driver requires:
83 *
84 * Arbitrary Based Buffers:
85 * DSP_Image_Buff - DSP code and data images (1MB)
86 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
87 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
88 * ADSC_Main_Buff - ADSC Main buffer (16KB)
89 *
90 */
91 {
92 .name = "DSP_Image_Buff",
93 .start = 0x00000000,
94 .end = 0x000FFFFF,
95 .flags = IORESOURCE_MEM,
96 },
97 {
98 .name = "ADSC_CPU_PCM_Buff",
99 .start = 0x00000000,
100 .end = 0x00009FFF,
101 .flags = IORESOURCE_MEM,
102 },
103 {
104 .name = "ADSC_AUX_Buff",
105 .start = 0x00000000,
106 .end = 0x00003FFF,
107 .flags = IORESOURCE_MEM,
108 },
109 {
110 .name = "ADSC_Main_Buff",
111 .start = 0x00000000,
112 .end = 0x00003FFF,
113 .flags = IORESOURCE_MEM,
114 },
115 /*
116 *
117 * STAVEM driver/STAPI
118 *
119 * This driver requires:
120 *
121 * Arbitrary Based Buffers:
122 * This memory area is used for allocating buffers for Video decoding
123 * purposes. Allocation/De-allocation within this buffer is managed
124 * by the STAVMEM driver of the STAPI. They could be Decimated
125 * Picture Buffers, Intermediate Buffers, as deemed necessary for
126 * video decoding purposes, for any video decoders on Zeus.
127 *
128 */
129 {
130 .name = "AVMEMPartition0",
131 .start = 0x00000000,
132 .end = 0x00c00000 - 1, /* 12 MB total */
133 .flags = IORESOURCE_MEM,
134 },
135 /*
136 *
137 * DOCSIS Subsystem
138 *
139 * This driver requires:
140 *
141 * Arbitrary Based Buffers:
142 * Docsis -
143 *
144 */
145 {
146 .name = "Docsis",
147 .start = 0x40100000,
148 .end = 0x407fffff,
149 .flags = IORESOURCE_MEM,
150 },
151 /*
152 *
153 * GHW HAL Driver
154 *
155 * This driver requires:
156 *
157 * Arbitrary Based Buffers:
158 * GraphicsHeap - PowerTV Graphics Heap
159 *
160 */
161 {
162 .name = "GraphicsHeap",
163 .start = 0x46900000,
164 .end = 0x47700000 - 1, /* 14 MB total */
165 .flags = IORESOURCE_MEM,
166 },
167 /*
168 *
169 * multi com buffer area
170 *
171 * This driver requires:
172 *
173 * Arbitrary Based Buffers:
174 * Docsis -
175 *
176 */
177 {
178 .name = "MulticomSHM",
179 .start = 0x47900000,
180 .end = 0x47920000 - 1,
181 .flags = IORESOURCE_MEM,
182 },
183 /*
184 *
185 * DMA Ring buffer
186 *
187 * This driver requires:
188 *
189 * Arbitrary Based Buffers:
190 * Docsis -
191 *
192 */
193 {
194 .name = "BMM_Buffer",
195 .start = 0x00000000,
196 .end = 0x00280000 - 1,
197 .flags = IORESOURCE_MEM,
198 },
199 /*
200 *
201 * Display bins buffer for unit0
202 *
203 * This driver requires:
204 *
205 * Arbitrary Based Buffers:
206 * Display Bins for unit0
207 *
208 */
209 {
210 .name = "DisplayBins0",
211 .start = 0x00000000,
212 .end = 0x00000FFF, /* 4 KB total */
213 .flags = IORESOURCE_MEM,
214 },
215 /*
216 *
217 * Display bins buffer
218 *
219 * This driver requires:
220 *
221 * Arbitrary Based Buffers:
222 * Display Bins for unit1
223 *
224 */
225 {
226 .name = "DisplayBins1",
227 .start = 0x00000000,
228 .end = 0x00000FFF, /* 4 KB total */
229 .flags = IORESOURCE_MEM,
230 },
231 /*
232 *
233 * ITFS
234 *
235 * This driver requires:
236 *
237 * Arbitrary Based Buffers:
238 * Docsis -
239 *
240 */
241 {
242 .name = "ITFS",
243 .start = 0x00000000,
244 /* 815,104 bytes each for 2 ITFS partitions. */
245 .end = 0x0018DFFF,
246 .flags = IORESOURCE_MEM,
247 },
248 /*
249 *
250 * AVFS
251 *
252 * This driver requires:
253 *
254 * Arbitrary Based Buffers:
255 * Docsis -
256 *
257 */
258 {
259 .name = "AvfsDmaMem",
260 .start = 0x00000000,
261 /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
262 .end = 0x007c2000 - 1,
263 .flags = IORESOURCE_MEM,
264 },
265 {
266 .name = "AvfsFileSys",
267 .start = 0x00000000,
268 .end = 0x00001000 - 1, /* 4K */
269 .flags = IORESOURCE_MEM,
270 },
271 /*
272 *
273 * PMEM
274 *
275 * This driver requires:
276 *
277 * Arbitrary Based Buffers:
278 * Persistent memory for diagnostics.
279 *
280 */
281 {
282 .name = "DiagPersistentMemory",
283 .start = 0x00000000,
284 .end = 0x10000 - 1,
285 .flags = IORESOURCE_MEM,
286 },
287 /*
288 *
289 * Smartcard
290 *
291 * This driver requires:
292 *
293 * Arbitrary Based Buffers:
294 * Read and write buffers for Internal/External cards
295 *
296 */
297 {
298 .name = "SmartCardInfo",
299 .start = 0x00000000,
300 .end = 0x2800 - 1,
301 .flags = IORESOURCE_MEM,
302 },
303 /*
304 * Add other resources here
305 */
306 { },
307};
308
309/*
310 * NON_DVR_CAPABLE ZEUS RESOURCES
311 */
312struct resource non_dvr_zeus_resources[] __initdata =
313{
314 /*
315 * VIDEO1 / LX1
316 */
317 {
318 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
319 .start = 0x20000000,
320 .end = 0x201FFFFF, /* 2MiB */
321 .flags = IORESOURCE_IO,
322 },
323 {
324 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
325 .start = 0x20200000,
326 .end = 0x20201FFF,
327 .flags = IORESOURCE_IO,
328 },
329 {
330 .name = "MediaMemory1",
331 .start = 0x20202000,
332 .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
333 .flags = IORESOURCE_IO,
334 },
335 /*
336 * Sysaudio Driver
337 */
338 {
339 .name = "DSP_Image_Buff",
340 .start = 0x00000000,
341 .end = 0x000FFFFF,
342 .flags = IORESOURCE_MEM,
343 },
344 {
345 .name = "ADSC_CPU_PCM_Buff",
346 .start = 0x00000000,
347 .end = 0x00009FFF,
348 .flags = IORESOURCE_MEM,
349 },
350 {
351 .name = "ADSC_AUX_Buff",
352 .start = 0x00000000,
353 .end = 0x00003FFF,
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .name = "ADSC_Main_Buff",
358 .start = 0x00000000,
359 .end = 0x00003FFF,
360 .flags = IORESOURCE_MEM,
361 },
362 /*
363 * STAVEM driver/STAPI
364 */
365 {
366 .name = "AVMEMPartition0",
367 .start = 0x00000000,
368 .end = 0x00600000 - 1, /* 6 MB total */
369 .flags = IORESOURCE_MEM,
370 },
371 /*
372 * DOCSIS Subsystem
373 */
374 {
375 .name = "Docsis",
376 .start = 0x40100000,
377 .end = 0x407fffff,
378 .flags = IORESOURCE_MEM,
379 },
380 /*
381 * GHW HAL Driver
382 */
383 {
384 .name = "GraphicsHeap",
385 .start = 0x46900000,
386 .end = 0x47700000 - 1, /* 14 MB total */
387 .flags = IORESOURCE_MEM,
388 },
389 /*
390 * multi com buffer area
391 */
392 {
393 .name = "MulticomSHM",
394 .start = 0x47900000,
395 .end = 0x47920000 - 1,
396 .flags = IORESOURCE_MEM,
397 },
398 /*
399 * DMA Ring buffer
400 */
401 {
402 .name = "BMM_Buffer",
403 .start = 0x00000000,
404 .end = 0x00280000 - 1,
405 .flags = IORESOURCE_MEM,
406 },
407 /*
408 * Display bins buffer for unit0
409 */
410 {
411 .name = "DisplayBins0",
412 .start = 0x00000000,
413 .end = 0x00000FFF, /* 4 KB total */
414 .flags = IORESOURCE_MEM,
415 },
416 /*
417 *
418 * AVFS: player HAL memory
419 *
420 *
421 */
422 {
423 .name = "AvfsDmaMem",
424 .start = 0x00000000,
425 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */
426 .flags = IORESOURCE_MEM,
427 },
428 /*
429 * PMEM
430 */
431 {
432 .name = "DiagPersistentMemory",
433 .start = 0x00000000,
434 .end = 0x10000 - 1,
435 .flags = IORESOURCE_MEM,
436 },
437 /*
438 * Smartcard
439 */
440 {
441 .name = "SmartCardInfo",
442 .start = 0x00000000,
443 .end = 0x2800 - 1,
444 .flags = IORESOURCE_MEM,
445 },
446 /*
447 * NAND Flash
448 */
449 {
450 .name = "NandFlash",
451 .start = NAND_FLASH_BASE,
452 .end = NAND_FLASH_BASE + 0x400 - 1,
453 .flags = IORESOURCE_IO,
454 },
455 /*
456 * Add other resources here
457 */
458 { },
459};
diff --git a/arch/mips/powertv/cmdline.c b/arch/mips/powertv/cmdline.c
new file mode 100644
index 000000000000..98d73cb0d452
--- /dev/null
+++ b/arch/mips/powertv/cmdline.c
@@ -0,0 +1,52 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 * Portions copyright (C) 2009 Cisco Systems, Inc.
5 *
6 * This program is free software; you can distribute it and/or modify it
7 * 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 it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18 *
19 * Kernel command line creation using the prom monitor (YAMON) argc/argv.
20 */
21#include <linux/init.h>
22#include <linux/string.h>
23
24#include <asm/bootinfo.h>
25
26#include "init.h"
27
28/*
29 * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
30 * This macro take care of sign extension.
31 */
32#define prom_argv(index) ((char *)(long)_prom_argv[(index)])
33
34char * __init prom_getcmdline(void)
35{
36 return &(arcs_cmdline[0]);
37}
38
39void __init prom_init_cmdline(void)
40{
41 int len;
42
43 if (prom_argc != 1)
44 return;
45
46 len = strlen(arcs_cmdline);
47
48 arcs_cmdline[len] = ' ';
49
50 strlcpy(arcs_cmdline + len + 1, (char *)_prom_argv,
51 COMMAND_LINE_SIZE - len - 1);
52}
diff --git a/arch/mips/powertv/init.c b/arch/mips/powertv/init.c
new file mode 100644
index 000000000000..5f4e4c304e48
--- /dev/null
+++ b/arch/mips/powertv/init.c
@@ -0,0 +1,128 @@
1/*
2 * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc.
3 * All rights reserved.
4 * Authors: Carsten Langgaard <carstenl@mips.com>
5 * Maciej W. Rozycki <macro@mips.com>
6 * Portions copyright (C) 2009 Cisco Systems, Inc.
7 *
8 * This program is free software; you can distribute it and/or modify it
9 * under the terms of the GNU General Public License (Version 2) as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
20 *
21 * PROM library initialisation code.
22 */
23#include <linux/init.h>
24#include <linux/string.h>
25#include <linux/kernel.h>
26
27#include <asm/bootinfo.h>
28#include <linux/io.h>
29#include <asm/system.h>
30#include <asm/cacheflush.h>
31#include <asm/traps.h>
32
33#include <asm/mips-boards/prom.h>
34#include <asm/mips-boards/generic.h>
35#include <asm/mach-powertv/asic.h>
36
37#include "init.h"
38
39int prom_argc;
40int *_prom_argv, *_prom_envp;
41unsigned long _prom_memsize;
42
43/*
44 * YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
45 * This macro take care of sign extension, if running in 64-bit mode.
46 */
47#define prom_envp(index) ((char *)(long)_prom_envp[(index)])
48
49char *prom_getenv(char *envname)
50{
51 char *result = NULL;
52
53 if (_prom_envp != NULL) {
54 /*
55 * Return a pointer to the given environment variable.
56 * In 64-bit mode: we're using 64-bit pointers, but all pointers
57 * in the PROM structures are only 32-bit, so we need some
58 * workarounds, if we are running in 64-bit mode.
59 */
60 int i, index = 0;
61
62 i = strlen(envname);
63
64 while (prom_envp(index)) {
65 if (strncmp(envname, prom_envp(index), i) == 0) {
66 result = prom_envp(index + 1);
67 break;
68 }
69 index += 2;
70 }
71 }
72
73 return result;
74}
75
76/* TODO: Verify on linux-mips mailing list that the following two */
77/* functions are correct */
78/* TODO: Copy NMI and EJTAG exception vectors to memory from the */
79/* BootROM exception vectors. Flush their cache entries. test it. */
80
81static void __init mips_nmi_setup(void)
82{
83 void *base;
84#if defined(CONFIG_CPU_MIPS32_R1)
85 base = cpu_has_veic ?
86 (void *)(CAC_BASE + 0xa80) :
87 (void *)(CAC_BASE + 0x380);
88#elif defined(CONFIG_CPU_MIPS32_R2)
89 base = (void *)0xbfc00000;
90#else
91#error NMI exception handler address not defined
92#endif
93}
94
95static void __init mips_ejtag_setup(void)
96{
97 void *base;
98
99#if defined(CONFIG_CPU_MIPS32_R1)
100 base = cpu_has_veic ?
101 (void *)(CAC_BASE + 0xa00) :
102 (void *)(CAC_BASE + 0x300);
103#elif defined(CONFIG_CPU_MIPS32_R2)
104 base = (void *)0xbfc00480;
105#else
106#error EJTAG exception handler address not defined
107#endif
108}
109
110void __init prom_init(void)
111{
112 prom_argc = fw_arg0;
113 _prom_argv = (int *) fw_arg1;
114 _prom_envp = (int *) fw_arg2;
115 _prom_memsize = (unsigned long) fw_arg3;
116
117 board_nmi_handler_setup = mips_nmi_setup;
118 board_ejtag_handler_setup = mips_ejtag_setup;
119
120 pr_info("\nLINUX started...\n");
121 prom_init_cmdline();
122 configure_platform();
123 prom_meminit();
124
125#ifndef CONFIG_BOOTLOADER_DRIVER
126 pr_info("\nBootloader driver isn't loaded...\n");
127#endif
128}
diff --git a/arch/mips/powertv/init.h b/arch/mips/powertv/init.h
new file mode 100644
index 000000000000..7af6bf25008c
--- /dev/null
+++ b/arch/mips/powertv/init.h
@@ -0,0 +1,28 @@
1/*
2 * Definitions from powertv init.c file
3 *
4 * Copyright (C) 2009 Cisco Systems, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: David VomLehn
21 */
22
23#ifndef _POWERTV_INIT_H
24#define _POWERTV_INIT_H
25extern int prom_argc;
26extern int *_prom_argv;
27extern unsigned long _prom_memsize;
28#endif
diff --git a/arch/mips/powertv/memory.c b/arch/mips/powertv/memory.c
new file mode 100644
index 000000000000..28d06605fff6
--- /dev/null
+++ b/arch/mips/powertv/memory.c
@@ -0,0 +1,186 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 * Portions copyright (C) 2009 Cisco Systems, Inc.
5 *
6 * This program is free software; you can distribute it and/or modify it
7 * 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 it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18 *
19 * Apparently originally from arch/mips/malta-memory.c. Modified to work
20 * with the PowerTV bootloader.
21 */
22#include <linux/init.h>
23#include <linux/mm.h>
24#include <linux/bootmem.h>
25#include <linux/pfn.h>
26#include <linux/string.h>
27
28#include <asm/bootinfo.h>
29#include <asm/page.h>
30#include <asm/sections.h>
31
32#include <asm/mips-boards/prom.h>
33
34#include "init.h"
35
36/* Memory constants */
37#define KIBIBYTE(n) ((n) * 1024) /* Number of kibibytes */
38#define MEBIBYTE(n) ((n) * KIBIBYTE(1024)) /* Number of mebibytes */
39#define DEFAULT_MEMSIZE MEBIBYTE(256) /* If no memsize provided */
40#define LOW_MEM_MAX MEBIBYTE(252) /* Max usable low mem */
41#define RES_BOOTLDR_MEMSIZE MEBIBYTE(1) /* Memory reserved for bldr */
42#define BOOT_MEM_SIZE KIBIBYTE(256) /* Memory reserved for bldr */
43#define PHYS_MEM_START 0x10000000 /* Start of physical memory */
44
45unsigned long ptv_memsize;
46
47char __initdata cmdline[COMMAND_LINE_SIZE];
48
49void __init prom_meminit(void)
50{
51 char *memsize_str;
52 unsigned long memsize = 0;
53 unsigned int physend;
54 char *ptr;
55 int low_mem;
56 int high_mem;
57
58 /* Check the command line first for a memsize directive */
59 strcpy(cmdline, arcs_cmdline);
60 ptr = strstr(cmdline, "memsize=");
61 if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' '))
62 ptr = strstr(ptr, " memsize=");
63
64 if (ptr) {
65 memsize = memparse(ptr + 8, &ptr);
66 } else {
67 /* otherwise look in the environment */
68 memsize_str = prom_getenv("memsize");
69
70 if (memsize_str != NULL) {
71 pr_info("prom memsize = %s\n", memsize_str);
72 memsize = simple_strtol(memsize_str, NULL, 0);
73 }
74
75 if (memsize == 0) {
76 if (_prom_memsize != 0) {
77 memsize = _prom_memsize;
78 pr_info("_prom_memsize = 0x%lx\n", memsize);
79 /* add in memory that the bootloader doesn't
80 * report */
81 memsize += BOOT_MEM_SIZE;
82 } else {
83 memsize = DEFAULT_MEMSIZE;
84 pr_info("Memsize not passed by bootloader, "
85 "defaulting to 0x%lx\n", memsize);
86 }
87 }
88 }
89
90 /* Store memsize for diagnostic purposes */
91 ptv_memsize = memsize;
92
93 physend = PFN_ALIGN(&_end) - 0x80000000;
94 if (memsize > LOW_MEM_MAX) {
95 low_mem = LOW_MEM_MAX;
96 high_mem = memsize - low_mem;
97 } else {
98 low_mem = memsize;
99 high_mem = 0;
100 }
101
102/*
103 * TODO: We will use the hard code for memory configuration until
104 * the bootloader releases their device tree to us.
105 */
106 /*
107 * Add the memory reserved for use by the bootloader to the
108 * memory map.
109 */
110 add_memory_region(PHYS_MEM_START, RES_BOOTLDR_MEMSIZE,
111 BOOT_MEM_RESERVED);
112#ifdef CONFIG_HIGHMEM_256_128
113 /*
114 * Add memory in low for general use by the kernel and its friends
115 * (like drivers, applications, etc).
116 */
117 add_memory_region(PHYS_MEM_START + RES_BOOTLDR_MEMSIZE,
118 LOW_MEM_MAX - RES_BOOTLDR_MEMSIZE, BOOT_MEM_RAM);
119 /*
120 * Add the memory reserved for reset vector.
121 */
122 add_memory_region(0x1fc00000, MEBIBYTE(4), BOOT_MEM_RESERVED);
123 /*
124 * Add the memory reserved.
125 */
126 add_memory_region(0x20000000, MEBIBYTE(1024 + 75), BOOT_MEM_RESERVED);
127 /*
128 * Add memory in high for general use by the kernel and its friends
129 * (like drivers, applications, etc).
130 *
131 * 75MB is reserved for devices which are using the memory in high.
132 */
133 add_memory_region(0x60000000 + MEBIBYTE(75), MEBIBYTE(128 - 75),
134 BOOT_MEM_RAM);
135#elif defined CONFIG_HIGHMEM_128_128
136 /*
137 * Add memory in low for general use by the kernel and its friends
138 * (like drivers, applications, etc).
139 */
140 add_memory_region(PHYS_MEM_START + RES_BOOTLDR_MEMSIZE,
141 MEBIBYTE(128) - RES_BOOTLDR_MEMSIZE, BOOT_MEM_RAM);
142 /*
143 * Add the memory reserved.
144 */
145 add_memory_region(PHYS_MEM_START + MEBIBYTE(128),
146 MEBIBYTE(128 + 1024 + 75), BOOT_MEM_RESERVED);
147 /*
148 * Add memory in high for general use by the kernel and its friends
149 * (like drivers, applications, etc).
150 *
151 * 75MB is reserved for devices which are using the memory in high.
152 */
153 add_memory_region(0x60000000 + MEBIBYTE(75), MEBIBYTE(128 - 75),
154 BOOT_MEM_RAM);
155#else
156 /* Add low memory regions for either:
157 * - no-highmemory configuration case -OR-
158 * - highmemory "HIGHMEM_LOWBANK_ONLY" case
159 */
160 /*
161 * Add memory for general use by the kernel and its friends
162 * (like drivers, applications, etc).
163 */
164 add_memory_region(PHYS_MEM_START + RES_BOOTLDR_MEMSIZE,
165 low_mem - RES_BOOTLDR_MEMSIZE, BOOT_MEM_RAM);
166 /*
167 * Add the memory reserved for reset vector.
168 */
169 add_memory_region(0x1fc00000, MEBIBYTE(4), BOOT_MEM_RESERVED);
170#endif
171}
172
173void __init prom_free_prom_memory(void)
174{
175 unsigned long addr;
176 int i;
177
178 for (i = 0; i < boot_mem_map.nr_map; i++) {
179 if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
180 continue;
181
182 addr = boot_mem_map.map[i].addr;
183 free_init_pages("prom memory",
184 addr, addr + boot_mem_map.map[i].size);
185 }
186}
diff --git a/arch/mips/powertv/pci/Makefile b/arch/mips/powertv/pci/Makefile
new file mode 100644
index 000000000000..f5c62462fc9d
--- /dev/null
+++ b/arch/mips/powertv/pci/Makefile
@@ -0,0 +1,21 @@
1#
2# Copyright (C) 2009 Scientific-Atlanta, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17#
18
19obj-$(CONFIG_PCI) += fixup-powertv.o
20
21EXTRA_CFLAGS += -Wall -Werror
diff --git a/arch/mips/powertv/pci/fixup-powertv.c b/arch/mips/powertv/pci/fixup-powertv.c
new file mode 100644
index 000000000000..726bc2e824b3
--- /dev/null
+++ b/arch/mips/powertv/pci/fixup-powertv.c
@@ -0,0 +1,36 @@
1#include <linux/init.h>
2#include <linux/pci.h>
3#include <asm/mach-powertv/interrupts.h>
4#include "powertv-pci.h"
5
6int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
7{
8 return asic_pcie_map_irq(dev, slot, pin);
9}
10
11/* Do platform specific device initialization at pci_enable_device() time */
12int pcibios_plat_dev_init(struct pci_dev *dev)
13{
14 return 0;
15}
16
17/*
18 * asic_pcie_map_irq
19 *
20 * Parameters:
21 * *dev - pointer to a pci_dev structure (not used)
22 * slot - slot number (not used)
23 * pin - pin number (not used)
24 *
25 * Return Value:
26 * Returns: IRQ number (always the PCI Express IRQ number)
27 *
28 * Description:
29 * asic_pcie_map_irq will return the IRQ number of the PCI Express interrupt.
30 *
31 */
32int asic_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
33{
34 return irq_pciexp;
35}
36EXPORT_SYMBOL(asic_pcie_map_irq);
diff --git a/arch/mips/powertv/pci/powertv-pci.h b/arch/mips/powertv/pci/powertv-pci.h
new file mode 100644
index 000000000000..1b5886bbd759
--- /dev/null
+++ b/arch/mips/powertv/pci/powertv-pci.h
@@ -0,0 +1,31 @@
1/*
2 * powertv-pci.c
3 *
4 * Copyright (C) 2009 Cisco Systems, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20/*
21 * Local definitions for the powertv PCI code
22 */
23
24#ifndef _POWERTV_PCI_POWERTV_PCI_H_
25#define _POWERTV_PCI_POWERTV_PCI_H_
26extern int asic_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
27extern int asic_pcie_init(void);
28extern int asic_pcie_init(void);
29
30extern int log_level;
31#endif
diff --git a/arch/mips/powertv/powertv-clock.h b/arch/mips/powertv/powertv-clock.h
new file mode 100644
index 000000000000..d94c54311485
--- /dev/null
+++ b/arch/mips/powertv/powertv-clock.h
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2009 Cisco Systems, Inc.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 *
18 * Author: David VomLehn
19 */
20
21#ifndef _POWERTV_POWERTV_CLOCK_H
22#define _POWERTV_POWERTV_CLOCK_H
23extern int powertv_clockevent_init(void);
24extern void powertv_clocksource_init(void);
25extern unsigned int mips_get_pll_freq(void);
26#endif
diff --git a/arch/mips/powertv/powertv_setup.c b/arch/mips/powertv/powertv_setup.c
new file mode 100644
index 000000000000..bd8ebf128f29
--- /dev/null
+++ b/arch/mips/powertv/powertv_setup.c
@@ -0,0 +1,351 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
4 * Portions copyright (C) 2009 Cisco Systems, Inc.
5 *
6 * This program is free software; you can distribute it and/or modify it
7 * 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 it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18 */
19#include <linux/init.h>
20#include <linux/sched.h>
21#include <linux/ioport.h>
22#include <linux/pci.h>
23#include <linux/screen_info.h>
24#include <linux/notifier.h>
25#include <linux/etherdevice.h>
26#include <linux/if_ether.h>
27#include <linux/ctype.h>
28
29#include <linux/cpu.h>
30#include <asm/bootinfo.h>
31#include <asm/irq.h>
32#include <asm/mips-boards/generic.h>
33#include <asm/mips-boards/prom.h>
34#include <asm/dma.h>
35#include <linux/time.h>
36#include <asm/traps.h>
37#include <asm/asm-offsets.h>
38#include "reset.h"
39
40#define VAL(n) STR(n)
41
42/*
43 * Macros for loading addresses and storing registers:
44 * PTR_LA Load the address into a register
45 * LONG_S Store the full width of the given register.
46 * LONG_L Load the full width of the given register
47 * PTR_ADDIU Add a constant value to a register used as a pointer
48 * REG_SIZE Number of 8-bit bytes in a full width register
49 */
50#ifdef CONFIG_64BIT
51#warning TODO: 64-bit code needs to be verified
52#define PTR_LA "dla "
53#define LONG_S "sd "
54#define LONG_L "ld "
55#define PTR_ADDIU "daddiu "
56#define REG_SIZE "8" /* In bytes */
57#endif
58
59#ifdef CONFIG_32BIT
60#define PTR_LA "la "
61#define LONG_S "sw "
62#define LONG_L "lw "
63#define PTR_ADDIU "addiu "
64#define REG_SIZE "4" /* In bytes */
65#endif
66
67static struct pt_regs die_regs;
68static bool have_die_regs;
69
70static void register_panic_notifier(void);
71static int panic_handler(struct notifier_block *notifier_block,
72 unsigned long event, void *cause_string);
73
74const char *get_system_type(void)
75{
76 return "PowerTV";
77}
78
79void __init plat_mem_setup(void)
80{
81 panic_on_oops = 1;
82 register_panic_notifier();
83
84#if 0
85 mips_pcibios_init();
86#endif
87 mips_reboot_setup();
88}
89
90/*
91 * Install a panic notifier for platform-specific diagnostics
92 */
93static void register_panic_notifier()
94{
95 static struct notifier_block panic_notifier = {
96 .notifier_call = panic_handler,
97 .next = NULL,
98 .priority = INT_MAX
99 };
100 atomic_notifier_chain_register(&panic_notifier_list, &panic_notifier);
101}
102
103static int panic_handler(struct notifier_block *notifier_block,
104 unsigned long event, void *cause_string)
105{
106 struct pt_regs my_regs;
107
108 /* Save all of the registers */
109 {
110 unsigned long at, v0, v1; /* Must be on the stack */
111
112 /* Start by saving $at and v0 on the stack. We use $at
113 * ourselves, but it looks like the compiler may use v0 or v1
114 * to load the address of the pt_regs structure. We'll come
115 * back later to store the registers in the pt_regs
116 * structure. */
117 __asm__ __volatile__ (
118 ".set noat\n"
119 LONG_S "$at, %[at]\n"
120 LONG_S "$2, %[v0]\n"
121 LONG_S "$3, %[v1]\n"
122 :
123 [at] "=m" (at),
124 [v0] "=m" (v0),
125 [v1] "=m" (v1)
126 :
127 : "at"
128 );
129
130 __asm__ __volatile__ (
131 ".set noat\n"
132 "move $at, %[pt_regs]\n"
133
134 /* Argument registers */
135 LONG_S "$4, " VAL(PT_R4) "($at)\n"
136 LONG_S "$5, " VAL(PT_R5) "($at)\n"
137 LONG_S "$6, " VAL(PT_R6) "($at)\n"
138 LONG_S "$7, " VAL(PT_R7) "($at)\n"
139
140 /* Temporary regs */
141 LONG_S "$8, " VAL(PT_R8) "($at)\n"
142 LONG_S "$9, " VAL(PT_R9) "($at)\n"
143 LONG_S "$10, " VAL(PT_R10) "($at)\n"
144 LONG_S "$11, " VAL(PT_R11) "($at)\n"
145 LONG_S "$12, " VAL(PT_R12) "($at)\n"
146 LONG_S "$13, " VAL(PT_R13) "($at)\n"
147 LONG_S "$14, " VAL(PT_R14) "($at)\n"
148 LONG_S "$15, " VAL(PT_R15) "($at)\n"
149
150 /* "Saved" registers */
151 LONG_S "$16, " VAL(PT_R16) "($at)\n"
152 LONG_S "$17, " VAL(PT_R17) "($at)\n"
153 LONG_S "$18, " VAL(PT_R18) "($at)\n"
154 LONG_S "$19, " VAL(PT_R19) "($at)\n"
155 LONG_S "$20, " VAL(PT_R20) "($at)\n"
156 LONG_S "$21, " VAL(PT_R21) "($at)\n"
157 LONG_S "$22, " VAL(PT_R22) "($at)\n"
158 LONG_S "$23, " VAL(PT_R23) "($at)\n"
159
160 /* Add'l temp regs */
161 LONG_S "$24, " VAL(PT_R24) "($at)\n"
162 LONG_S "$25, " VAL(PT_R25) "($at)\n"
163
164 /* Kernel temp regs */
165 LONG_S "$26, " VAL(PT_R26) "($at)\n"
166 LONG_S "$27, " VAL(PT_R27) "($at)\n"
167
168 /* Global pointer, stack pointer, frame pointer and
169 * return address */
170 LONG_S "$gp, " VAL(PT_R28) "($at)\n"
171 LONG_S "$sp, " VAL(PT_R29) "($at)\n"
172 LONG_S "$fp, " VAL(PT_R30) "($at)\n"
173 LONG_S "$ra, " VAL(PT_R31) "($at)\n"
174
175 /* Now we can get the $at and v0 registers back and
176 * store them */
177 LONG_L "$8, %[at]\n"
178 LONG_S "$8, " VAL(PT_R1) "($at)\n"
179 LONG_L "$8, %[v0]\n"
180 LONG_S "$8, " VAL(PT_R2) "($at)\n"
181 LONG_L "$8, %[v1]\n"
182 LONG_S "$8, " VAL(PT_R3) "($at)\n"
183 :
184 :
185 [at] "m" (at),
186 [v0] "m" (v0),
187 [v1] "m" (v1),
188 [pt_regs] "r" (&my_regs)
189 : "at", "t0"
190 );
191
192 /* Set the current EPC value to be the current location in this
193 * function */
194 __asm__ __volatile__ (
195 ".set noat\n"
196 "1:\n"
197 PTR_LA "$at, 1b\n"
198 LONG_S "$at, %[cp0_epc]\n"
199 :
200 [cp0_epc] "=m" (my_regs.cp0_epc)
201 :
202 : "at"
203 );
204
205 my_regs.cp0_cause = read_c0_cause();
206 my_regs.cp0_status = read_c0_status();
207 }
208
209#ifdef CONFIG_DIAGNOSTICS
210 failure_report((char *) cause_string,
211 have_die_regs ? &die_regs : &my_regs);
212 have_die_regs = false;
213#else
214 pr_crit("I'm feeling a bit sleepy. hmmmmm... perhaps a nap would... "
215 "zzzz... \n");
216#endif
217
218 return NOTIFY_DONE;
219}
220
221/**
222 * Platform-specific handling of oops
223 * @str: Pointer to the oops string
224 * @regs: Pointer to the oops registers
225 * All we do here is to save the registers for subsequent printing through
226 * the panic notifier.
227 */
228void platform_die(const char *str, const struct pt_regs *regs)
229{
230 /* If we already have saved registers, don't overwrite them as they
231 * they apply to the initial fault */
232
233 if (!have_die_regs) {
234 have_die_regs = true;
235 die_regs = *regs;
236 }
237}
238
239/* Information about the RF MAC address, if one was supplied on the
240 * command line. */
241static bool have_rfmac;
242static u8 rfmac[ETH_ALEN];
243
244static int rfmac_param(char *p)
245{
246 u8 *q;
247 bool is_high_nibble;
248 int c;
249
250 /* Skip a leading "0x", if present */
251 if (*p == '0' && *(p+1) == 'x')
252 p += 2;
253
254 q = rfmac;
255 is_high_nibble = true;
256
257 for (c = (unsigned char) *p++;
258 isxdigit(c) && q - rfmac < ETH_ALEN;
259 c = (unsigned char) *p++) {
260 int nibble;
261
262 nibble = (isdigit(c) ? (c - '0') :
263 (isupper(c) ? c - 'A' + 10 : c - 'a' + 10));
264
265 if (is_high_nibble)
266 *q = nibble << 4;
267 else
268 *q++ |= nibble;
269
270 is_high_nibble = !is_high_nibble;
271 }
272
273 /* If we parsed all the way to the end of the parameter value and
274 * parsed all ETH_ALEN bytes, we have a usable RF MAC address */
275 have_rfmac = (c == '\0' && q - rfmac == ETH_ALEN);
276
277 return 0;
278}
279
280early_param("rfmac", rfmac_param);
281
282/*
283 * Generate an Ethernet MAC address that has a good chance of being unique.
284 * @addr: Pointer to six-byte array containing the Ethernet address
285 * Generates an Ethernet MAC address that is highly likely to be unique for
286 * this particular system on a network with other systems of the same type.
287 *
288 * The problem we are solving is that, when random_ether_addr() is used to
289 * generate MAC addresses at startup, there isn't much entropy for the random
290 * number generator to use and the addresses it produces are fairly likely to
291 * be the same as those of other identical systems on the same local network.
292 * This is true even for relatively small numbers of systems (for the reason
293 * why, see the Wikipedia entry for "Birthday problem" at:
294 * http://en.wikipedia.org/wiki/Birthday_problem
295 *
296 * The good news is that we already have a MAC address known to be unique, the
297 * RF MAC address. The bad news is that this address is already in use on the
298 * RF interface. Worse, the obvious trick, taking the RF MAC address and
299 * turning on the locally managed bit, has already been used for other devices.
300 * Still, this does give us something to work with.
301 *
302 * The approach we take is:
303 * 1. If we can't get the RF MAC Address, just call random_ether_addr.
304 * 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24
305 * bits of the new address. This is very likely to be unique, except for
306 * the current box.
307 * 3. To avoid using addresses already on the current box, we set the top
308 * six bits of the address with a value different from any currently
309 * registered Scientific Atlanta organizationally unique identifyer
310 * (OUI). This avoids duplication with any addresses on the system that
311 * were generated from valid Scientific Atlanta-registered address by
312 * simply flipping the locally managed bit.
313 * 4. We aren't generating a multicast address, so we leave the multicast
314 * bit off. Since we aren't using a registered address, we have to set
315 * the locally managed bit.
316 * 5. We then randomly generate the remaining 16-bits. This does two
317 * things:
318 * a. It allows us to call this function for more than one device
319 * in this system
320 * b. It ensures that things will probably still work even if
321 * some device on the device network has a locally managed
322 * address that matches the top six bits from step 2.
323 */
324void platform_random_ether_addr(u8 addr[ETH_ALEN])
325{
326 const int num_random_bytes = 2;
327 const unsigned char non_sciatl_oui_bits = 0xc0u;
328 const unsigned char mac_addr_locally_managed = (1 << 1);
329
330 if (!have_rfmac) {
331 pr_warning("rfmac not available on command line; "
332 "generating random MAC address\n");
333 random_ether_addr(addr);
334 }
335
336 else {
337 int i;
338
339 /* Set the first byte to something that won't match a Scientific
340 * Atlanta OUI, is locally managed, and isn't a multicast
341 * address */
342 addr[0] = non_sciatl_oui_bits | mac_addr_locally_managed;
343
344 /* Get some bytes of random address information */
345 get_random_bytes(&addr[1], num_random_bytes);
346
347 /* Copy over the NIC-specific bits of the RF MAC address */
348 for (i = 1 + num_random_bytes; i < ETH_ALEN; i++)
349 addr[i] = rfmac[i];
350 }
351}
diff --git a/arch/mips/powertv/reset.c b/arch/mips/powertv/reset.c
new file mode 100644
index 000000000000..494c652c984b
--- /dev/null
+++ b/arch/mips/powertv/reset.c
@@ -0,0 +1,65 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 * Portions copyright (C) 2009 Cisco Systems, Inc.
5 *
6 * This program is free software; you can distribute it and/or modify it
7 * 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 it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18 */
19#include <linux/pm.h>
20
21#include <linux/io.h>
22#include <asm/reboot.h> /* Not included by linux/reboot.h */
23
24#ifdef CONFIG_BOOTLOADER_DRIVER
25#include <asm/mach-powertv/kbldr.h>
26#endif
27
28#include <asm/mach-powertv/asic_regs.h>
29#include "reset.h"
30
31static void mips_machine_restart(char *command);
32static void mips_machine_halt(void);
33
34static void mips_machine_restart(char *command)
35{
36#ifdef CONFIG_BOOTLOADER_DRIVER
37 /*
38 * Call the bootloader's reset function to ensure
39 * that persistent data is flushed before hard reset
40 */
41 kbldr_SetCauseAndReset();
42#else
43 writel(0x1, asic_reg_addr(watchdog));
44#endif
45}
46
47static void mips_machine_halt(void)
48{
49#ifdef CONFIG_BOOTLOADER_DRIVER
50 /*
51 * Call the bootloader's reset function to ensure
52 * that persistent data is flushed before hard reset
53 */
54 kbldr_SetCauseAndReset();
55#else
56 writel(0x1, asic_reg_addr(watchdog));
57#endif
58}
59
60void mips_reboot_setup(void)
61{
62 _machine_restart = mips_machine_restart;
63 _machine_halt = mips_machine_halt;
64 pm_power_off = mips_machine_halt;
65}
diff --git a/arch/mips/powertv/reset.h b/arch/mips/powertv/reset.h
new file mode 100644
index 000000000000..888fd09e2620
--- /dev/null
+++ b/arch/mips/powertv/reset.h
@@ -0,0 +1,26 @@
1/*
2 * Definitions from powertv reset.c file
3 *
4 * Copyright (C) 2009 Cisco Systems, 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Author: David VomLehn
21 */
22
23#ifndef _POWERTV_POWERTV_RESET_H
24#define _POWERTV_POWERTV_RESET_H
25extern void mips_reboot_setup(void);
26#endif
diff --git a/arch/mips/mipssim/sim_cmdline.c b/arch/mips/powertv/time.c
index 74240e1ce5a5..1e0a5ef4c8c7 100644
--- a/arch/mips/mipssim/sim_cmdline.c
+++ b/arch/mips/powertv/time.c
@@ -1,5 +1,7 @@
1/* 1/*
2 * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. 2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved.
4 * Portions copyright (C) 2009 Cisco Systems, Inc.
3 * 5 *
4 * This program is free software; you can distribute it and/or modify it 6 * This program is free software; you can distribute it and/or modify it
5 * under the terms of the GNU General Public License (Version 2) as 7 * under the terms of the GNU General Public License (Version 2) as
@@ -14,19 +16,22 @@
14 * with this program; if not, write to the Free Software Foundation, Inc., 16 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16 * 18 *
19 * Setting up the clock on the MIPS boards.
17 */ 20 */
21
18#include <linux/init.h> 22#include <linux/init.h>
19#include <linux/string.h> 23#include <asm/mach-powertv/interrupts.h>
20#include <asm/bootinfo.h> 24#include <asm/time.h>
21 25
22extern char arcs_cmdline[]; 26#include "powertv-clock.h"
23 27
24char * __init prom_getcmdline(void) 28unsigned int __cpuinit get_c0_compare_int(void)
25{ 29{
26 return arcs_cmdline; 30 return irq_mips_timer;
27} 31}
28 32
29void __init prom_init_cmdline(void) 33void __init plat_time_init(void)
30{ 34{
31 /* XXX: Get boot line from environment? */ 35 powertv_clocksource_init();
36 r4k_clockevent_init();
32} 37}
diff --git a/arch/mips/rb532/prom.c b/arch/mips/rb532/prom.c
index ad5bd1097974..d7c26d00cfef 100644
--- a/arch/mips/rb532/prom.c
+++ b/arch/mips/rb532/prom.c
@@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag)
69 69
70void __init prom_setup_cmdline(void) 70void __init prom_setup_cmdline(void)
71{ 71{
72 static char cmd_line[CL_SIZE] __initdata; 72 static char cmd_line[COMMAND_LINE_SIZE] __initdata;
73 char *cp, *board; 73 char *cp, *board;
74 int prom_argc; 74 int prom_argc;
75 char **prom_argv, **prom_envp; 75 char **prom_argv, **prom_envp;
@@ -115,7 +115,7 @@ void __init prom_setup_cmdline(void)
115 strcpy(cp, arcs_cmdline); 115 strcpy(cp, arcs_cmdline);
116 cp += strlen(arcs_cmdline); 116 cp += strlen(arcs_cmdline);
117 } 117 }
118 cmd_line[CL_SIZE-1] = '\0'; 118 cmd_line[COMMAND_LINE_SIZE - 1] = '\0';
119 119
120 strcpy(arcs_cmdline, cmd_line); 120 strcpy(arcs_cmdline, cmd_line);
121} 121}
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c
index 1617241d2737..da44ccb20829 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -50,9 +50,9 @@
50 50
51static char __init *decode_eisa_sig(unsigned long addr) 51static char __init *decode_eisa_sig(unsigned long addr)
52{ 52{
53 static char sig_str[EISA_SIG_LEN]; 53 static char sig_str[EISA_SIG_LEN] __initdata;
54 u8 sig[4]; 54 u8 sig[4];
55 u16 rev; 55 u16 rev;
56 int i; 56 int i;
57 57
58 for (i = 0; i < 4; i++) { 58 for (i = 0; i < 4; i++) {
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index 0ecd5fe9486e..383f11d7f442 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/ftrace.h>
16 17
17#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
18#include <asm/sgi/hpc3.h> 19#include <asm/sgi/hpc3.h>
@@ -150,7 +151,7 @@ static void indy_local1_irqdispatch(void)
150 151
151extern void ip22_be_interrupt(int irq); 152extern void ip22_be_interrupt(int irq);
152 153
153static void indy_buserror_irq(void) 154static void __irq_entry indy_buserror_irq(void)
154{ 155{
155 int irq = SGI_BUSERR_IRQ; 156 int irq = SGI_BUSERR_IRQ;
156 157
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
index b9a931358e23..5deeb68b6c9c 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -67,7 +67,7 @@ void __init plat_mem_setup(void)
67 cserial = ArcGetEnvironmentVariable("ConsoleOut"); 67 cserial = ArcGetEnvironmentVariable("ConsoleOut");
68 68
69 if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) { 69 if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
70 static char options[8]; 70 static char options[8] __initdata;
71 char *baud = ArcGetEnvironmentVariable("dbaud"); 71 char *baud = ArcGetEnvironmentVariable("dbaud");
72 if (baud) 72 if (baud)
73 strcpy(options, baud); 73 strcpy(options, baud);
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
index c8f7d2328b24..603fc91c1030 100644
--- a/arch/mips/sgi-ip22/ip22-time.c
+++ b/arch/mips/sgi-ip22/ip22-time.c
@@ -16,6 +16,7 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/kernel_stat.h> 17#include <linux/kernel_stat.h>
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/ftrace.h>
19 20
20#include <asm/cpu.h> 21#include <asm/cpu.h>
21#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
@@ -115,7 +116,7 @@ __init void plat_time_init(void)
115} 116}
116 117
117/* Generic SGI handler for (spurious) 8254 interrupts */ 118/* Generic SGI handler for (spurious) 8254 interrupts */
118void indy_8254timer_irq(void) 119void __irq_entry indy_8254timer_irq(void)
119{ 120{
120 int irq = SGI_8254_0_IRQ; 121 int irq = SGI_8254_0_IRQ;
121 ULONG cnt; 122 ULONG cnt;
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
index c5a5d4a31b4b..3abd1465ec02 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -90,7 +90,7 @@ void __init plat_mem_setup(void)
90 { 90 {
91 char* con = ArcGetEnvironmentVariable("console"); 91 char* con = ArcGetEnvironmentVariable("console");
92 if (con && *con == 'd') { 92 if (con && *con == 'd') {
93 static char options[8]; 93 static char options[8] __initdata;
94 char *baud = ArcGetEnvironmentVariable("dbaud"); 94 char *baud = ArcGetEnvironmentVariable("dbaud");
95 if (baud) 95 if (baud)
96 strcpy(options, baud); 96 strcpy(options, baud);
diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c
index eb5396cf81bb..6343011e9902 100644
--- a/arch/mips/sibyte/common/cfe.c
+++ b/arch/mips/sibyte/common/cfe.c
@@ -287,7 +287,7 @@ void __init prom_init(void)
287 * boot console 287 * boot console
288 */ 288 */
289 cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE); 289 cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
290 if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) { 290 if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, COMMAND_LINE_SIZE) < 0) {
291 if (argc >= 0) { 291 if (argc >= 0) {
292 /* The loader should have set the command line */ 292 /* The loader should have set the command line */
293 /* too early for panic to do any good */ 293 /* too early for panic to do any good */
@@ -318,7 +318,7 @@ void __init prom_init(void)
318#endif /* CONFIG_BLK_DEV_INITRD */ 318#endif /* CONFIG_BLK_DEV_INITRD */
319 319
320 /* Not sure this is needed, but it's the safe way. */ 320 /* Not sure this is needed, but it's the safe way. */
321 arcs_cmdline[CL_SIZE-1] = 0; 321 arcs_cmdline[COMMAND_LINE_SIZE-1] = 0;
322 322
323 prom_meminit(); 323 prom_meminit();
324 324
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
index 7dd76fb3b645..e6980892834a 100644
--- a/arch/mips/sni/a20r.c
+++ b/arch/mips/sni/a20r.c
@@ -188,7 +188,7 @@ static void end_a20r_irq(unsigned int irq)
188} 188}
189 189
190static struct irq_chip a20r_irq_type = { 190static struct irq_chip a20r_irq_type = {
191 .typename = "A20R", 191 .name = "A20R",
192 .ack = mask_a20r_irq, 192 .ack = mask_a20r_irq,
193 .mask = mask_a20r_irq, 193 .mask = mask_a20r_irq,
194 .mask_ack = mask_a20r_irq, 194 .mask_ack = mask_a20r_irq,
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c
index 74e6c67982fb..51e62bbaa23b 100644
--- a/arch/mips/sni/pcimt.c
+++ b/arch/mips/sni/pcimt.c
@@ -214,7 +214,7 @@ static void end_pcimt_irq(unsigned int irq)
214} 214}
215 215
216static struct irq_chip pcimt_irq_type = { 216static struct irq_chip pcimt_irq_type = {
217 .typename = "PCIMT", 217 .name = "PCIMT",
218 .ack = disable_pcimt_irq, 218 .ack = disable_pcimt_irq,
219 .mask = disable_pcimt_irq, 219 .mask = disable_pcimt_irq,
220 .mask_ack = disable_pcimt_irq, 220 .mask_ack = disable_pcimt_irq,
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index 071a9573ac7f..f4699d35858b 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -176,7 +176,7 @@ void end_pcit_irq(unsigned int irq)
176} 176}
177 177
178static struct irq_chip pcit_irq_type = { 178static struct irq_chip pcit_irq_type = {
179 .typename = "PCIT", 179 .name = "PCIT",
180 .ack = disable_pcit_irq, 180 .ack = disable_pcit_irq,
181 .mask = disable_pcit_irq, 181 .mask = disable_pcit_irq,
182 .mask_ack = disable_pcit_irq, 182 .mask_ack = disable_pcit_irq,
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c
index 5e687819cbc2..46f00691f448 100644
--- a/arch/mips/sni/rm200.c
+++ b/arch/mips/sni/rm200.c
@@ -449,7 +449,7 @@ void end_rm200_irq(unsigned int irq)
449} 449}
450 450
451static struct irq_chip rm200_irq_type = { 451static struct irq_chip rm200_irq_type = {
452 .typename = "RM200", 452 .name = "RM200",
453 .ack = disable_rm200_irq, 453 .ack = disable_rm200_irq,
454 .mask = disable_rm200_irq, 454 .mask = disable_rm200_irq,
455 .mask_ack = disable_rm200_irq, 455 .mask_ack = disable_rm200_irq,
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index a49272ce7ef5..d16b462154c3 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -60,7 +60,7 @@ static void __init sni_console_setup(void)
60 char *cdev; 60 char *cdev;
61 char *baud; 61 char *baud;
62 int port; 62 int port;
63 static char options[8]; 63 static char options[8] __initdata;
64 64
65 cdev = prom_getenv("console_dev"); 65 cdev = prom_getenv("console_dev");
66 if (strncmp(cdev, "tty", 3) == 0) { 66 if (strncmp(cdev, "tty", 3) == 0) {
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index d66802edebb2..06e801c7e258 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -160,7 +160,7 @@ static void __init prom_init_cmdline(void)
160 int argc; 160 int argc;
161 int *argv32; 161 int *argv32;
162 int i; /* Always ignore the "-c" at argv[0] */ 162 int i; /* Always ignore the "-c" at argv[0] */
163 static char builtin[CL_SIZE] __initdata; 163 static char builtin[COMMAND_LINE_SIZE] __initdata;
164 164
165 if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { 165 if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) {
166 /* 166 /*
@@ -315,7 +315,7 @@ static inline void txx9_cache_fixup(void)
315 315
316static void __init preprocess_cmdline(void) 316static void __init preprocess_cmdline(void)
317{ 317{
318 static char cmdline[CL_SIZE] __initdata; 318 static char cmdline[COMMAND_LINE_SIZE] __initdata;
319 char *s; 319 char *s;
320 320
321 strcpy(cmdline, arcs_cmdline); 321 strcpy(cmdline, arcs_cmdline);
diff --git a/arch/mips/txx9/generic/smsc_fdc37m81x.c b/arch/mips/txx9/generic/smsc_fdc37m81x.c
index a2b2d62d88e3..8ebc3848f3ac 100644
--- a/arch/mips/txx9/generic/smsc_fdc37m81x.c
+++ b/arch/mips/txx9/generic/smsc_fdc37m81x.c
@@ -117,7 +117,7 @@ unsigned long __init smsc_fdc37m81x_init(unsigned long port)
117 if (chip_id == SMSC_FDC37M81X_CHIP_ID) 117 if (chip_id == SMSC_FDC37M81X_CHIP_ID)
118 smsc_fdc37m81x_config_end(); 118 smsc_fdc37m81x_config_end();
119 else { 119 else {
120 printk(KERN_WARNING "%s: unknow chip id 0x%02x\n", __func__, 120 printk(KERN_WARNING "%s: unknown chip id 0x%02x\n", __func__,
121 chip_id); 121 chip_id);
122 g_smsc_fdc37m81x_base = 0; 122 g_smsc_fdc37m81x_base = 0;
123 } 123 }
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
index 6d39e222b170..6153b6a05ccf 100644
--- a/arch/mips/vr41xx/common/icu.c
+++ b/arch/mips/vr41xx/common/icu.c
@@ -159,9 +159,9 @@ void vr41xx_enable_piuint(uint16_t mask)
159 159
160 if (current_cpu_type() == CPU_VR4111 || 160 if (current_cpu_type() == CPU_VR4111 ||
161 current_cpu_type() == CPU_VR4121) { 161 current_cpu_type() == CPU_VR4121) {
162 spin_lock_irqsave(&desc->lock, flags); 162 raw_spin_lock_irqsave(&desc->lock, flags);
163 icu1_set(MPIUINTREG, mask); 163 icu1_set(MPIUINTREG, mask);
164 spin_unlock_irqrestore(&desc->lock, flags); 164 raw_spin_unlock_irqrestore(&desc->lock, flags);
165 } 165 }
166} 166}
167 167
@@ -174,9 +174,9 @@ void vr41xx_disable_piuint(uint16_t mask)
174 174
175 if (current_cpu_type() == CPU_VR4111 || 175 if (current_cpu_type() == CPU_VR4111 ||
176 current_cpu_type() == CPU_VR4121) { 176 current_cpu_type() == CPU_VR4121) {
177 spin_lock_irqsave(&desc->lock, flags); 177 raw_spin_lock_irqsave(&desc->lock, flags);
178 icu1_clear(MPIUINTREG, mask); 178 icu1_clear(MPIUINTREG, mask);
179 spin_unlock_irqrestore(&desc->lock, flags); 179 raw_spin_unlock_irqrestore(&desc->lock, flags);
180 } 180 }
181} 181}
182 182
@@ -189,9 +189,9 @@ void vr41xx_enable_aiuint(uint16_t mask)
189 189
190 if (current_cpu_type() == CPU_VR4111 || 190 if (current_cpu_type() == CPU_VR4111 ||
191 current_cpu_type() == CPU_VR4121) { 191 current_cpu_type() == CPU_VR4121) {
192 spin_lock_irqsave(&desc->lock, flags); 192 raw_spin_lock_irqsave(&desc->lock, flags);
193 icu1_set(MAIUINTREG, mask); 193 icu1_set(MAIUINTREG, mask);
194 spin_unlock_irqrestore(&desc->lock, flags); 194 raw_spin_unlock_irqrestore(&desc->lock, flags);
195 } 195 }
196} 196}
197 197
@@ -204,9 +204,9 @@ void vr41xx_disable_aiuint(uint16_t mask)
204 204
205 if (current_cpu_type() == CPU_VR4111 || 205 if (current_cpu_type() == CPU_VR4111 ||
206 current_cpu_type() == CPU_VR4121) { 206 current_cpu_type() == CPU_VR4121) {
207 spin_lock_irqsave(&desc->lock, flags); 207 raw_spin_lock_irqsave(&desc->lock, flags);
208 icu1_clear(MAIUINTREG, mask); 208 icu1_clear(MAIUINTREG, mask);
209 spin_unlock_irqrestore(&desc->lock, flags); 209 raw_spin_unlock_irqrestore(&desc->lock, flags);
210 } 210 }
211} 211}
212 212
@@ -219,9 +219,9 @@ void vr41xx_enable_kiuint(uint16_t mask)
219 219
220 if (current_cpu_type() == CPU_VR4111 || 220 if (current_cpu_type() == CPU_VR4111 ||
221 current_cpu_type() == CPU_VR4121) { 221 current_cpu_type() == CPU_VR4121) {
222 spin_lock_irqsave(&desc->lock, flags); 222 raw_spin_lock_irqsave(&desc->lock, flags);
223 icu1_set(MKIUINTREG, mask); 223 icu1_set(MKIUINTREG, mask);
224 spin_unlock_irqrestore(&desc->lock, flags); 224 raw_spin_unlock_irqrestore(&desc->lock, flags);
225 } 225 }
226} 226}
227 227
@@ -234,9 +234,9 @@ void vr41xx_disable_kiuint(uint16_t mask)
234 234
235 if (current_cpu_type() == CPU_VR4111 || 235 if (current_cpu_type() == CPU_VR4111 ||
236 current_cpu_type() == CPU_VR4121) { 236 current_cpu_type() == CPU_VR4121) {
237 spin_lock_irqsave(&desc->lock, flags); 237 raw_spin_lock_irqsave(&desc->lock, flags);
238 icu1_clear(MKIUINTREG, mask); 238 icu1_clear(MKIUINTREG, mask);
239 spin_unlock_irqrestore(&desc->lock, flags); 239 raw_spin_unlock_irqrestore(&desc->lock, flags);
240 } 240 }
241} 241}
242 242
@@ -247,9 +247,9 @@ void vr41xx_enable_macint(uint16_t mask)
247 struct irq_desc *desc = irq_desc + ETHERNET_IRQ; 247 struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
248 unsigned long flags; 248 unsigned long flags;
249 249
250 spin_lock_irqsave(&desc->lock, flags); 250 raw_spin_lock_irqsave(&desc->lock, flags);
251 icu1_set(MMACINTREG, mask); 251 icu1_set(MMACINTREG, mask);
252 spin_unlock_irqrestore(&desc->lock, flags); 252 raw_spin_unlock_irqrestore(&desc->lock, flags);
253} 253}
254 254
255EXPORT_SYMBOL(vr41xx_enable_macint); 255EXPORT_SYMBOL(vr41xx_enable_macint);
@@ -259,9 +259,9 @@ void vr41xx_disable_macint(uint16_t mask)
259 struct irq_desc *desc = irq_desc + ETHERNET_IRQ; 259 struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
260 unsigned long flags; 260 unsigned long flags;
261 261
262 spin_lock_irqsave(&desc->lock, flags); 262 raw_spin_lock_irqsave(&desc->lock, flags);
263 icu1_clear(MMACINTREG, mask); 263 icu1_clear(MMACINTREG, mask);
264 spin_unlock_irqrestore(&desc->lock, flags); 264 raw_spin_unlock_irqrestore(&desc->lock, flags);
265} 265}
266 266
267EXPORT_SYMBOL(vr41xx_disable_macint); 267EXPORT_SYMBOL(vr41xx_disable_macint);
@@ -271,9 +271,9 @@ void vr41xx_enable_dsiuint(uint16_t mask)
271 struct irq_desc *desc = irq_desc + DSIU_IRQ; 271 struct irq_desc *desc = irq_desc + DSIU_IRQ;
272 unsigned long flags; 272 unsigned long flags;
273 273
274 spin_lock_irqsave(&desc->lock, flags); 274 raw_spin_lock_irqsave(&desc->lock, flags);
275 icu1_set(MDSIUINTREG, mask); 275 icu1_set(MDSIUINTREG, mask);
276 spin_unlock_irqrestore(&desc->lock, flags); 276 raw_spin_unlock_irqrestore(&desc->lock, flags);
277} 277}
278 278
279EXPORT_SYMBOL(vr41xx_enable_dsiuint); 279EXPORT_SYMBOL(vr41xx_enable_dsiuint);
@@ -283,9 +283,9 @@ void vr41xx_disable_dsiuint(uint16_t mask)
283 struct irq_desc *desc = irq_desc + DSIU_IRQ; 283 struct irq_desc *desc = irq_desc + DSIU_IRQ;
284 unsigned long flags; 284 unsigned long flags;
285 285
286 spin_lock_irqsave(&desc->lock, flags); 286 raw_spin_lock_irqsave(&desc->lock, flags);
287 icu1_clear(MDSIUINTREG, mask); 287 icu1_clear(MDSIUINTREG, mask);
288 spin_unlock_irqrestore(&desc->lock, flags); 288 raw_spin_unlock_irqrestore(&desc->lock, flags);
289} 289}
290 290
291EXPORT_SYMBOL(vr41xx_disable_dsiuint); 291EXPORT_SYMBOL(vr41xx_disable_dsiuint);
@@ -295,9 +295,9 @@ void vr41xx_enable_firint(uint16_t mask)
295 struct irq_desc *desc = irq_desc + FIR_IRQ; 295 struct irq_desc *desc = irq_desc + FIR_IRQ;
296 unsigned long flags; 296 unsigned long flags;
297 297
298 spin_lock_irqsave(&desc->lock, flags); 298 raw_spin_lock_irqsave(&desc->lock, flags);
299 icu2_set(MFIRINTREG, mask); 299 icu2_set(MFIRINTREG, mask);
300 spin_unlock_irqrestore(&desc->lock, flags); 300 raw_spin_unlock_irqrestore(&desc->lock, flags);
301} 301}
302 302
303EXPORT_SYMBOL(vr41xx_enable_firint); 303EXPORT_SYMBOL(vr41xx_enable_firint);
@@ -307,9 +307,9 @@ void vr41xx_disable_firint(uint16_t mask)
307 struct irq_desc *desc = irq_desc + FIR_IRQ; 307 struct irq_desc *desc = irq_desc + FIR_IRQ;
308 unsigned long flags; 308 unsigned long flags;
309 309
310 spin_lock_irqsave(&desc->lock, flags); 310 raw_spin_lock_irqsave(&desc->lock, flags);
311 icu2_clear(MFIRINTREG, mask); 311 icu2_clear(MFIRINTREG, mask);
312 spin_unlock_irqrestore(&desc->lock, flags); 312 raw_spin_unlock_irqrestore(&desc->lock, flags);
313} 313}
314 314
315EXPORT_SYMBOL(vr41xx_disable_firint); 315EXPORT_SYMBOL(vr41xx_disable_firint);
@@ -322,9 +322,9 @@ void vr41xx_enable_pciint(void)
322 if (current_cpu_type() == CPU_VR4122 || 322 if (current_cpu_type() == CPU_VR4122 ||
323 current_cpu_type() == CPU_VR4131 || 323 current_cpu_type() == CPU_VR4131 ||
324 current_cpu_type() == CPU_VR4133) { 324 current_cpu_type() == CPU_VR4133) {
325 spin_lock_irqsave(&desc->lock, flags); 325 raw_spin_lock_irqsave(&desc->lock, flags);
326 icu2_write(MPCIINTREG, PCIINT0); 326 icu2_write(MPCIINTREG, PCIINT0);
327 spin_unlock_irqrestore(&desc->lock, flags); 327 raw_spin_unlock_irqrestore(&desc->lock, flags);
328 } 328 }
329} 329}
330 330
@@ -338,9 +338,9 @@ void vr41xx_disable_pciint(void)
338 if (current_cpu_type() == CPU_VR4122 || 338 if (current_cpu_type() == CPU_VR4122 ||
339 current_cpu_type() == CPU_VR4131 || 339 current_cpu_type() == CPU_VR4131 ||
340 current_cpu_type() == CPU_VR4133) { 340 current_cpu_type() == CPU_VR4133) {
341 spin_lock_irqsave(&desc->lock, flags); 341 raw_spin_lock_irqsave(&desc->lock, flags);
342 icu2_write(MPCIINTREG, 0); 342 icu2_write(MPCIINTREG, 0);
343 spin_unlock_irqrestore(&desc->lock, flags); 343 raw_spin_unlock_irqrestore(&desc->lock, flags);
344 } 344 }
345} 345}
346 346
@@ -354,9 +354,9 @@ void vr41xx_enable_scuint(void)
354 if (current_cpu_type() == CPU_VR4122 || 354 if (current_cpu_type() == CPU_VR4122 ||
355 current_cpu_type() == CPU_VR4131 || 355 current_cpu_type() == CPU_VR4131 ||
356 current_cpu_type() == CPU_VR4133) { 356 current_cpu_type() == CPU_VR4133) {
357 spin_lock_irqsave(&desc->lock, flags); 357 raw_spin_lock_irqsave(&desc->lock, flags);
358 icu2_write(MSCUINTREG, SCUINT0); 358 icu2_write(MSCUINTREG, SCUINT0);
359 spin_unlock_irqrestore(&desc->lock, flags); 359 raw_spin_unlock_irqrestore(&desc->lock, flags);
360 } 360 }
361} 361}
362 362
@@ -370,9 +370,9 @@ void vr41xx_disable_scuint(void)
370 if (current_cpu_type() == CPU_VR4122 || 370 if (current_cpu_type() == CPU_VR4122 ||
371 current_cpu_type() == CPU_VR4131 || 371 current_cpu_type() == CPU_VR4131 ||
372 current_cpu_type() == CPU_VR4133) { 372 current_cpu_type() == CPU_VR4133) {
373 spin_lock_irqsave(&desc->lock, flags); 373 raw_spin_lock_irqsave(&desc->lock, flags);
374 icu2_write(MSCUINTREG, 0); 374 icu2_write(MSCUINTREG, 0);
375 spin_unlock_irqrestore(&desc->lock, flags); 375 raw_spin_unlock_irqrestore(&desc->lock, flags);
376 } 376 }
377} 377}
378 378
@@ -386,9 +386,9 @@ void vr41xx_enable_csiint(uint16_t mask)
386 if (current_cpu_type() == CPU_VR4122 || 386 if (current_cpu_type() == CPU_VR4122 ||
387 current_cpu_type() == CPU_VR4131 || 387 current_cpu_type() == CPU_VR4131 ||
388 current_cpu_type() == CPU_VR4133) { 388 current_cpu_type() == CPU_VR4133) {
389 spin_lock_irqsave(&desc->lock, flags); 389 raw_spin_lock_irqsave(&desc->lock, flags);
390 icu2_set(MCSIINTREG, mask); 390 icu2_set(MCSIINTREG, mask);
391 spin_unlock_irqrestore(&desc->lock, flags); 391 raw_spin_unlock_irqrestore(&desc->lock, flags);
392 } 392 }
393} 393}
394 394
@@ -402,9 +402,9 @@ void vr41xx_disable_csiint(uint16_t mask)
402 if (current_cpu_type() == CPU_VR4122 || 402 if (current_cpu_type() == CPU_VR4122 ||
403 current_cpu_type() == CPU_VR4131 || 403 current_cpu_type() == CPU_VR4131 ||
404 current_cpu_type() == CPU_VR4133) { 404 current_cpu_type() == CPU_VR4133) {
405 spin_lock_irqsave(&desc->lock, flags); 405 raw_spin_lock_irqsave(&desc->lock, flags);
406 icu2_clear(MCSIINTREG, mask); 406 icu2_clear(MCSIINTREG, mask);
407 spin_unlock_irqrestore(&desc->lock, flags); 407 raw_spin_unlock_irqrestore(&desc->lock, flags);
408 } 408 }
409} 409}
410 410
@@ -418,9 +418,9 @@ void vr41xx_enable_bcuint(void)
418 if (current_cpu_type() == CPU_VR4122 || 418 if (current_cpu_type() == CPU_VR4122 ||
419 current_cpu_type() == CPU_VR4131 || 419 current_cpu_type() == CPU_VR4131 ||
420 current_cpu_type() == CPU_VR4133) { 420 current_cpu_type() == CPU_VR4133) {
421 spin_lock_irqsave(&desc->lock, flags); 421 raw_spin_lock_irqsave(&desc->lock, flags);
422 icu2_write(MBCUINTREG, BCUINTR); 422 icu2_write(MBCUINTREG, BCUINTR);
423 spin_unlock_irqrestore(&desc->lock, flags); 423 raw_spin_unlock_irqrestore(&desc->lock, flags);
424 } 424 }
425} 425}
426 426
@@ -434,9 +434,9 @@ void vr41xx_disable_bcuint(void)
434 if (current_cpu_type() == CPU_VR4122 || 434 if (current_cpu_type() == CPU_VR4122 ||
435 current_cpu_type() == CPU_VR4131 || 435 current_cpu_type() == CPU_VR4131 ||
436 current_cpu_type() == CPU_VR4133) { 436 current_cpu_type() == CPU_VR4133) {
437 spin_lock_irqsave(&desc->lock, flags); 437 raw_spin_lock_irqsave(&desc->lock, flags);
438 icu2_write(MBCUINTREG, 0); 438 icu2_write(MBCUINTREG, 0);
439 spin_unlock_irqrestore(&desc->lock, flags); 439 raw_spin_unlock_irqrestore(&desc->lock, flags);
440 } 440 }
441} 441}
442 442
@@ -486,7 +486,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
486 486
487 pin = SYSINT1_IRQ_TO_PIN(irq); 487 pin = SYSINT1_IRQ_TO_PIN(irq);
488 488
489 spin_lock_irq(&desc->lock); 489 raw_spin_lock_irq(&desc->lock);
490 490
491 intassign0 = icu1_read(INTASSIGN0); 491 intassign0 = icu1_read(INTASSIGN0);
492 intassign1 = icu1_read(INTASSIGN1); 492 intassign1 = icu1_read(INTASSIGN1);
@@ -525,7 +525,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
525 intassign1 |= (uint16_t)assign << 9; 525 intassign1 |= (uint16_t)assign << 9;
526 break; 526 break;
527 default: 527 default:
528 spin_unlock_irq(&desc->lock); 528 raw_spin_unlock_irq(&desc->lock);
529 return -EINVAL; 529 return -EINVAL;
530 } 530 }
531 531
@@ -533,7 +533,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
533 icu1_write(INTASSIGN0, intassign0); 533 icu1_write(INTASSIGN0, intassign0);
534 icu1_write(INTASSIGN1, intassign1); 534 icu1_write(INTASSIGN1, intassign1);
535 535
536 spin_unlock_irq(&desc->lock); 536 raw_spin_unlock_irq(&desc->lock);
537 537
538 return 0; 538 return 0;
539} 539}
@@ -546,7 +546,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
546 546
547 pin = SYSINT2_IRQ_TO_PIN(irq); 547 pin = SYSINT2_IRQ_TO_PIN(irq);
548 548
549 spin_lock_irq(&desc->lock); 549 raw_spin_lock_irq(&desc->lock);
550 550
551 intassign2 = icu1_read(INTASSIGN2); 551 intassign2 = icu1_read(INTASSIGN2);
552 intassign3 = icu1_read(INTASSIGN3); 552 intassign3 = icu1_read(INTASSIGN3);
@@ -593,7 +593,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
593 intassign3 |= (uint16_t)assign << 12; 593 intassign3 |= (uint16_t)assign << 12;
594 break; 594 break;
595 default: 595 default:
596 spin_unlock_irq(&desc->lock); 596 raw_spin_unlock_irq(&desc->lock);
597 return -EINVAL; 597 return -EINVAL;
598 } 598 }
599 599
@@ -601,7 +601,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
601 icu1_write(INTASSIGN2, intassign2); 601 icu1_write(INTASSIGN2, intassign2);
602 icu1_write(INTASSIGN3, intassign3); 602 icu1_write(INTASSIGN3, intassign3);
603 603
604 spin_unlock_irq(&desc->lock); 604 raw_spin_unlock_irq(&desc->lock);
605 605
606 return 0; 606 return 0;
607} 607}
diff --git a/arch/mn10300/include/asm/asm-offsets.h b/arch/mn10300/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/mn10300/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h
index 75a70aa9fd6f..e5fa97cd9a14 100644
--- a/arch/mn10300/include/asm/elf.h
+++ b/arch/mn10300/include/asm/elf.h
@@ -77,7 +77,6 @@ do { \
77 _ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \ 77 _ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \
78} while (0) 78} while (0)
79 79
80#define USE_ELF_CORE_DUMP
81#define CORE_DUMP_USE_REGSET 80#define CORE_DUMP_USE_REGSET
82#define ELF_EXEC_PAGESIZE 4096 81#define ELF_EXEC_PAGESIZE 4096
83 82
diff --git a/arch/mn10300/include/asm/mman.h b/arch/mn10300/include/asm/mman.h
index 8eebf89f5ab1..db5c53da73ce 100644
--- a/arch/mn10300/include/asm/mman.h
+++ b/arch/mn10300/include/asm/mman.h
@@ -1 +1,6 @@
1#include <asm-generic/mman.h> 1#include <asm-generic/mman.h>
2
3#define MIN_MAP_ADDR PAGE_SIZE /* minimum fixed mmap address */
4
5#define arch_mmap_check(addr, len, flags) \
6 (((flags) & MAP_FIXED && (addr) < MIN_MAP_ADDR) ? -EINVAL : 0)
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index a94e7ea3faa6..c9ee6c009d79 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -578,7 +578,7 @@ ENTRY(sys_call_table)
578 .long sys_ni_syscall /* reserved for streams2 */ 578 .long sys_ni_syscall /* reserved for streams2 */
579 .long sys_vfork /* 190 */ 579 .long sys_vfork /* 190 */
580 .long sys_getrlimit 580 .long sys_getrlimit
581 .long sys_mmap2 581 .long sys_mmap_pgoff
582 .long sys_truncate64 582 .long sys_truncate64
583 .long sys_ftruncate64 583 .long sys_ftruncate64
584 .long sys_stat64 /* 195 */ 584 .long sys_stat64 /* 195 */
diff --git a/arch/mn10300/kernel/irq.c b/arch/mn10300/kernel/irq.c
index 4c3c58ef5cda..e2d5ed891f37 100644
--- a/arch/mn10300/kernel/irq.c
+++ b/arch/mn10300/kernel/irq.c
@@ -215,7 +215,7 @@ int show_interrupts(struct seq_file *p, void *v)
215 215
216 /* display information rows, one per active CPU */ 216 /* display information rows, one per active CPU */
217 case 1 ... NR_IRQS - 1: 217 case 1 ... NR_IRQS - 1:
218 spin_lock_irqsave(&irq_desc[i].lock, flags); 218 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
219 219
220 action = irq_desc[i].action; 220 action = irq_desc[i].action;
221 if (action) { 221 if (action) {
@@ -235,7 +235,7 @@ int show_interrupts(struct seq_file *p, void *v)
235 seq_putc(p, '\n'); 235 seq_putc(p, '\n');
236 } 236 }
237 237
238 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 238 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
239 break; 239 break;
240 240
241 /* polish off with NMI and error counters */ 241 /* polish off with NMI and error counters */
diff --git a/arch/mn10300/kernel/kprobes.c b/arch/mn10300/kernel/kprobes.c
index dacafab00eb2..67e6389d625a 100644
--- a/arch/mn10300/kernel/kprobes.c
+++ b/arch/mn10300/kernel/kprobes.c
@@ -31,13 +31,13 @@ const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist);
31#define KPROBE_HIT_ACTIVE 0x00000001 31#define KPROBE_HIT_ACTIVE 0x00000001
32#define KPROBE_HIT_SS 0x00000002 32#define KPROBE_HIT_SS 0x00000002
33 33
34static struct kprobe *current_kprobe; 34static struct kprobe *cur_kprobe;
35static unsigned long current_kprobe_orig_pc; 35static unsigned long cur_kprobe_orig_pc;
36static unsigned long current_kprobe_next_pc; 36static unsigned long cur_kprobe_next_pc;
37static int current_kprobe_ss_flags; 37static int cur_kprobe_ss_flags;
38static unsigned long kprobe_status; 38static unsigned long kprobe_status;
39static kprobe_opcode_t current_kprobe_ss_buf[MAX_INSN_SIZE + 2]; 39static kprobe_opcode_t cur_kprobe_ss_buf[MAX_INSN_SIZE + 2];
40static unsigned long current_kprobe_bp_addr; 40static unsigned long cur_kprobe_bp_addr;
41 41
42DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 42DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
43 43
@@ -399,26 +399,25 @@ void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
399{ 399{
400 unsigned long nextpc; 400 unsigned long nextpc;
401 401
402 current_kprobe_orig_pc = regs->pc; 402 cur_kprobe_orig_pc = regs->pc;
403 memcpy(current_kprobe_ss_buf, &p->ainsn.insn[0], MAX_INSN_SIZE); 403 memcpy(cur_kprobe_ss_buf, &p->ainsn.insn[0], MAX_INSN_SIZE);
404 regs->pc = (unsigned long) current_kprobe_ss_buf; 404 regs->pc = (unsigned long) cur_kprobe_ss_buf;
405 405
406 nextpc = find_nextpc(regs, &current_kprobe_ss_flags); 406 nextpc = find_nextpc(regs, &cur_kprobe_ss_flags);
407 if (current_kprobe_ss_flags & SINGLESTEP_PCREL) 407 if (cur_kprobe_ss_flags & SINGLESTEP_PCREL)
408 current_kprobe_next_pc = 408 cur_kprobe_next_pc = cur_kprobe_orig_pc + (nextpc - regs->pc);
409 current_kprobe_orig_pc + (nextpc - regs->pc);
410 else 409 else
411 current_kprobe_next_pc = nextpc; 410 cur_kprobe_next_pc = nextpc;
412 411
413 /* branching instructions need special handling */ 412 /* branching instructions need special handling */
414 if (current_kprobe_ss_flags & SINGLESTEP_BRANCH) 413 if (cur_kprobe_ss_flags & SINGLESTEP_BRANCH)
415 nextpc = singlestep_branch_setup(regs); 414 nextpc = singlestep_branch_setup(regs);
416 415
417 current_kprobe_bp_addr = nextpc; 416 cur_kprobe_bp_addr = nextpc;
418 417
419 *(u8 *) nextpc = BREAKPOINT_INSTRUCTION; 418 *(u8 *) nextpc = BREAKPOINT_INSTRUCTION;
420 mn10300_dcache_flush_range2((unsigned) current_kprobe_ss_buf, 419 mn10300_dcache_flush_range2((unsigned) cur_kprobe_ss_buf,
421 sizeof(current_kprobe_ss_buf)); 420 sizeof(cur_kprobe_ss_buf));
422 mn10300_icache_inv(); 421 mn10300_icache_inv();
423} 422}
424 423
@@ -440,7 +439,7 @@ static inline int __kprobes kprobe_handler(struct pt_regs *regs)
440 disarm_kprobe(p, regs); 439 disarm_kprobe(p, regs);
441 ret = 1; 440 ret = 1;
442 } else { 441 } else {
443 p = current_kprobe; 442 p = cur_kprobe;
444 if (p->break_handler && p->break_handler(p, regs)) 443 if (p->break_handler && p->break_handler(p, regs))
445 goto ss_probe; 444 goto ss_probe;
446 } 445 }
@@ -464,7 +463,7 @@ static inline int __kprobes kprobe_handler(struct pt_regs *regs)
464 } 463 }
465 464
466 kprobe_status = KPROBE_HIT_ACTIVE; 465 kprobe_status = KPROBE_HIT_ACTIVE;
467 current_kprobe = p; 466 cur_kprobe = p;
468 if (p->pre_handler(p, regs)) { 467 if (p->pre_handler(p, regs)) {
469 /* handler has already set things up, so skip ss setup */ 468 /* handler has already set things up, so skip ss setup */
470 return 1; 469 return 1;
@@ -491,8 +490,8 @@ no_kprobe:
491static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) 490static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
492{ 491{
493 /* we may need to fixup regs/stack after singlestepping a call insn */ 492 /* we may need to fixup regs/stack after singlestepping a call insn */
494 if (current_kprobe_ss_flags & SINGLESTEP_BRANCH) { 493 if (cur_kprobe_ss_flags & SINGLESTEP_BRANCH) {
495 regs->pc = current_kprobe_orig_pc; 494 regs->pc = cur_kprobe_orig_pc;
496 switch (p->ainsn.insn[0]) { 495 switch (p->ainsn.insn[0]) {
497 case 0xcd: /* CALL (d16,PC) */ 496 case 0xcd: /* CALL (d16,PC) */
498 *(unsigned *) regs->sp = regs->mdr = regs->pc + 5; 497 *(unsigned *) regs->sp = regs->mdr = regs->pc + 5;
@@ -523,8 +522,8 @@ static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
523 } 522 }
524 } 523 }
525 524
526 regs->pc = current_kprobe_next_pc; 525 regs->pc = cur_kprobe_next_pc;
527 current_kprobe_bp_addr = 0; 526 cur_kprobe_bp_addr = 0;
528} 527}
529 528
530static inline int __kprobes post_kprobe_handler(struct pt_regs *regs) 529static inline int __kprobes post_kprobe_handler(struct pt_regs *regs)
@@ -532,10 +531,10 @@ static inline int __kprobes post_kprobe_handler(struct pt_regs *regs)
532 if (!kprobe_running()) 531 if (!kprobe_running())
533 return 0; 532 return 0;
534 533
535 if (current_kprobe->post_handler) 534 if (cur_kprobe->post_handler)
536 current_kprobe->post_handler(current_kprobe, regs, 0); 535 cur_kprobe->post_handler(cur_kprobe, regs, 0);
537 536
538 resume_execution(current_kprobe, regs); 537 resume_execution(cur_kprobe, regs);
539 reset_current_kprobe(); 538 reset_current_kprobe();
540 preempt_enable_no_resched(); 539 preempt_enable_no_resched();
541 return 1; 540 return 1;
@@ -545,12 +544,12 @@ static inline int __kprobes post_kprobe_handler(struct pt_regs *regs)
545static inline 544static inline
546int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) 545int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)
547{ 546{
548 if (current_kprobe->fault_handler && 547 if (cur_kprobe->fault_handler &&
549 current_kprobe->fault_handler(current_kprobe, regs, trapnr)) 548 cur_kprobe->fault_handler(cur_kprobe, regs, trapnr))
550 return 1; 549 return 1;
551 550
552 if (kprobe_status & KPROBE_HIT_SS) { 551 if (kprobe_status & KPROBE_HIT_SS) {
553 resume_execution(current_kprobe, regs); 552 resume_execution(cur_kprobe, regs);
554 reset_current_kprobe(); 553 reset_current_kprobe();
555 preempt_enable_no_resched(); 554 preempt_enable_no_resched();
556 } 555 }
@@ -567,7 +566,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
567 566
568 switch (val) { 567 switch (val) {
569 case DIE_BREAKPOINT: 568 case DIE_BREAKPOINT:
570 if (current_kprobe_bp_addr != args->regs->pc) { 569 if (cur_kprobe_bp_addr != args->regs->pc) {
571 if (kprobe_handler(args->regs)) 570 if (kprobe_handler(args->regs))
572 return NOTIFY_STOP; 571 return NOTIFY_STOP;
573 } else { 572 } else {
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 892cce82867e..ec8a21df1142 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name,
275 char *filename; 275 char *filename;
276 int error; 276 int error;
277 277
278 lock_kernel();
279
280 filename = getname(name); 278 filename = getname(name);
281 error = PTR_ERR(filename); 279 error = PTR_ERR(filename);
282 if (!IS_ERR(filename)) { 280 if (IS_ERR(filename))
283 error = do_execve(filename, argv, envp, __frame); 281 return error;
284 putname(filename); 282 error = do_execve(filename, argv, envp, __frame);
285 } 283 putname(filename);
286
287 unlock_kernel();
288 return error; 284 return error;
289} 285}
290 286
diff --git a/arch/mn10300/kernel/sys_mn10300.c b/arch/mn10300/kernel/sys_mn10300.c
index 8ca5af00334c..17cc6ce04e84 100644
--- a/arch/mn10300/kernel/sys_mn10300.c
+++ b/arch/mn10300/kernel/sys_mn10300.c
@@ -23,47 +23,13 @@
23 23
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25 25
26#define MIN_MAP_ADDR PAGE_SIZE /* minimum fixed mmap address */
27
28/*
29 * memory mapping syscall
30 */
31asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
32 unsigned long prot, unsigned long flags,
33 unsigned long fd, unsigned long pgoff)
34{
35 struct file *file = NULL;
36 long error = -EINVAL;
37
38 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
39
40 if (flags & MAP_FIXED && addr < MIN_MAP_ADDR)
41 goto out;
42
43 error = -EBADF;
44 if (!(flags & MAP_ANONYMOUS)) {
45 file = fget(fd);
46 if (!file)
47 goto out;
48 }
49
50 down_write(&current->mm->mmap_sem);
51 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
52 up_write(&current->mm->mmap_sem);
53
54 if (file)
55 fput(file);
56out:
57 return error;
58}
59
60asmlinkage long old_mmap(unsigned long addr, unsigned long len, 26asmlinkage long old_mmap(unsigned long addr, unsigned long len,
61 unsigned long prot, unsigned long flags, 27 unsigned long prot, unsigned long flags,
62 unsigned long fd, unsigned long offset) 28 unsigned long fd, unsigned long offset)
63{ 29{
64 if (offset & ~PAGE_MASK) 30 if (offset & ~PAGE_MASK)
65 return -EINVAL; 31 return -EINVAL;
66 return sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 32 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
67} 33}
68 34
69struct sel_arg_struct { 35struct sel_arg_struct {
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c
index 18072e03a019..92343bd35fa3 100644
--- a/arch/parisc/hpux/sys_hpux.c
+++ b/arch/parisc/hpux/sys_hpux.c
@@ -445,12 +445,7 @@ done:
445 445
446int hpux_pipe(int *kstack_fildes) 446int hpux_pipe(int *kstack_fildes)
447{ 447{
448 int error; 448 return do_pipe_flags(kstack_fildes, 0);
449
450 lock_kernel();
451 error = do_pipe_flags(kstack_fildes, 0);
452 unlock_kernel();
453 return error;
454} 449}
455 450
456/* lies - says it works, but it really didn't lock anything */ 451/* lies - says it works, but it really didn't lock anything */
diff --git a/arch/parisc/include/asm/asm-offsets.h b/arch/parisc/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/parisc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index 8bc9e96699b2..716634d1f546 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -27,19 +27,19 @@
27# define ATOMIC_HASH_SIZE 4 27# define ATOMIC_HASH_SIZE 4
28# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) (a))/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ])) 28# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) (a))/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
29 29
30extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; 30extern arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
31 31
32/* Can't use raw_spin_lock_irq because of #include problems, so 32/* Can't use raw_spin_lock_irq because of #include problems, so
33 * this is the substitute */ 33 * this is the substitute */
34#define _atomic_spin_lock_irqsave(l,f) do { \ 34#define _atomic_spin_lock_irqsave(l,f) do { \
35 raw_spinlock_t *s = ATOMIC_HASH(l); \ 35 arch_spinlock_t *s = ATOMIC_HASH(l); \
36 local_irq_save(f); \ 36 local_irq_save(f); \
37 __raw_spin_lock(s); \ 37 arch_spin_lock(s); \
38} while(0) 38} while(0)
39 39
40#define _atomic_spin_unlock_irqrestore(l,f) do { \ 40#define _atomic_spin_unlock_irqrestore(l,f) do { \
41 raw_spinlock_t *s = ATOMIC_HASH(l); \ 41 arch_spinlock_t *s = ATOMIC_HASH(l); \
42 __raw_spin_unlock(s); \ 42 arch_spin_unlock(s); \
43 local_irq_restore(f); \ 43 local_irq_restore(f); \
44} while(0) 44} while(0)
45 45
diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h
index 8cfc553fc837..75e46c557a16 100644
--- a/arch/parisc/include/asm/bug.h
+++ b/arch/parisc/include/asm/bug.h
@@ -32,14 +32,14 @@
32 "\t.popsection" \ 32 "\t.popsection" \
33 : : "i" (__FILE__), "i" (__LINE__), \ 33 : : "i" (__FILE__), "i" (__LINE__), \
34 "i" (0), "i" (sizeof(struct bug_entry)) ); \ 34 "i" (0), "i" (sizeof(struct bug_entry)) ); \
35 for(;;) ; \ 35 unreachable(); \
36 } while(0) 36 } while(0)
37 37
38#else 38#else
39#define BUG() \ 39#define BUG() \
40 do { \ 40 do { \
41 asm volatile(PARISC_BUG_BREAK_ASM : : ); \ 41 asm volatile(PARISC_BUG_BREAK_ASM : : ); \
42 for(;;) ; \ 42 unreachable(); \
43 } while(0) 43 } while(0)
44#endif 44#endif
45 45
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
index 9c802eb4be84..19f6cb1a4a1c 100644
--- a/arch/parisc/include/asm/elf.h
+++ b/arch/parisc/include/asm/elf.h
@@ -328,7 +328,6 @@ struct pt_regs; /* forward declaration... */
328 such function. */ 328 such function. */
329#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0 329#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0
330 330
331#define USE_ELF_CORE_DUMP
332#define ELF_EXEC_PAGESIZE 4096 331#define ELF_EXEC_PAGESIZE 4096
333 332
334/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 333/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/parisc/include/asm/fcntl.h b/arch/parisc/include/asm/fcntl.h
index 1e1c824764ee..f357fc693c89 100644
--- a/arch/parisc/include/asm/fcntl.h
+++ b/arch/parisc/include/asm/fcntl.h
@@ -1,14 +1,13 @@
1#ifndef _PARISC_FCNTL_H 1#ifndef _PARISC_FCNTL_H
2#define _PARISC_FCNTL_H 2#define _PARISC_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_APPEND 000000010 4#define O_APPEND 000000010
7#define O_BLKSEEK 000000100 /* HPUX only */ 5#define O_BLKSEEK 000000100 /* HPUX only */
8#define O_CREAT 000000400 /* not fcntl */ 6#define O_CREAT 000000400 /* not fcntl */
9#define O_EXCL 000002000 /* not fcntl */ 7#define O_EXCL 000002000 /* not fcntl */
10#define O_LARGEFILE 000004000 8#define O_LARGEFILE 000004000
11#define O_SYNC 000100000 9#define __O_SYNC 000100000
10#define O_SYNC (__O_SYNC|O_DSYNC)
12#define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */ 11#define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */
13#define O_NOCTTY 000400000 /* not fcntl */ 12#define O_NOCTTY 000400000 /* not fcntl */
14#define O_DSYNC 001000000 /* HPUX only */ 13#define O_DSYNC 001000000 /* HPUX only */
diff --git a/arch/parisc/include/asm/ftrace.h b/arch/parisc/include/asm/ftrace.h
index 2fa05dd6aeee..72c0fafaa039 100644
--- a/arch/parisc/include/asm/ftrace.h
+++ b/arch/parisc/include/asm/ftrace.h
@@ -20,6 +20,20 @@ struct ftrace_ret_stack {
20 * Defined in entry.S 20 * Defined in entry.S
21 */ 21 */
22extern void return_to_handler(void); 22extern void return_to_handler(void);
23
24
25extern unsigned long return_address(unsigned int);
26
27#define HAVE_ARCH_CALLER_ADDR
28
29#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
30#define CALLER_ADDR1 return_address(1)
31#define CALLER_ADDR2 return_address(2)
32#define CALLER_ADDR3 return_address(3)
33#define CALLER_ADDR4 return_address(4)
34#define CALLER_ADDR5 return_address(5)
35#define CALLER_ADDR6 return_address(6)
36
23#endif /* __ASSEMBLY__ */ 37#endif /* __ASSEMBLY__ */
24 38
25#endif /* _ASM_PARISC_FTRACE_H */ 39#endif /* _ASM_PARISC_FTRACE_H */
diff --git a/arch/parisc/include/asm/spinlock.h b/arch/parisc/include/asm/spinlock.h
index fae03e136fa8..74036f436a3b 100644
--- a/arch/parisc/include/asm/spinlock.h
+++ b/arch/parisc/include/asm/spinlock.h
@@ -5,17 +5,17 @@
5#include <asm/processor.h> 5#include <asm/processor.h>
6#include <asm/spinlock_types.h> 6#include <asm/spinlock_types.h>
7 7
8static inline int __raw_spin_is_locked(raw_spinlock_t *x) 8static inline int arch_spin_is_locked(arch_spinlock_t *x)
9{ 9{
10 volatile unsigned int *a = __ldcw_align(x); 10 volatile unsigned int *a = __ldcw_align(x);
11 return *a == 0; 11 return *a == 0;
12} 12}
13 13
14#define __raw_spin_lock(lock) __raw_spin_lock_flags(lock, 0) 14#define arch_spin_lock(lock) arch_spin_lock_flags(lock, 0)
15#define __raw_spin_unlock_wait(x) \ 15#define arch_spin_unlock_wait(x) \
16 do { cpu_relax(); } while (__raw_spin_is_locked(x)) 16 do { cpu_relax(); } while (arch_spin_is_locked(x))
17 17
18static inline void __raw_spin_lock_flags(raw_spinlock_t *x, 18static inline void arch_spin_lock_flags(arch_spinlock_t *x,
19 unsigned long flags) 19 unsigned long flags)
20{ 20{
21 volatile unsigned int *a; 21 volatile unsigned int *a;
@@ -33,7 +33,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *x,
33 mb(); 33 mb();
34} 34}
35 35
36static inline void __raw_spin_unlock(raw_spinlock_t *x) 36static inline void arch_spin_unlock(arch_spinlock_t *x)
37{ 37{
38 volatile unsigned int *a; 38 volatile unsigned int *a;
39 mb(); 39 mb();
@@ -42,7 +42,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *x)
42 mb(); 42 mb();
43} 43}
44 44
45static inline int __raw_spin_trylock(raw_spinlock_t *x) 45static inline int arch_spin_trylock(arch_spinlock_t *x)
46{ 46{
47 volatile unsigned int *a; 47 volatile unsigned int *a;
48 int ret; 48 int ret;
@@ -69,38 +69,38 @@ static inline int __raw_spin_trylock(raw_spinlock_t *x)
69 69
70/* Note that we have to ensure interrupts are disabled in case we're 70/* Note that we have to ensure interrupts are disabled in case we're
71 * interrupted by some other code that wants to grab the same read lock */ 71 * interrupted by some other code that wants to grab the same read lock */
72static __inline__ void __raw_read_lock(raw_rwlock_t *rw) 72static __inline__ void arch_read_lock(arch_rwlock_t *rw)
73{ 73{
74 unsigned long flags; 74 unsigned long flags;
75 local_irq_save(flags); 75 local_irq_save(flags);
76 __raw_spin_lock_flags(&rw->lock, flags); 76 arch_spin_lock_flags(&rw->lock, flags);
77 rw->counter++; 77 rw->counter++;
78 __raw_spin_unlock(&rw->lock); 78 arch_spin_unlock(&rw->lock);
79 local_irq_restore(flags); 79 local_irq_restore(flags);
80} 80}
81 81
82/* Note that we have to ensure interrupts are disabled in case we're 82/* Note that we have to ensure interrupts are disabled in case we're
83 * interrupted by some other code that wants to grab the same read lock */ 83 * interrupted by some other code that wants to grab the same read lock */
84static __inline__ void __raw_read_unlock(raw_rwlock_t *rw) 84static __inline__ void arch_read_unlock(arch_rwlock_t *rw)
85{ 85{
86 unsigned long flags; 86 unsigned long flags;
87 local_irq_save(flags); 87 local_irq_save(flags);
88 __raw_spin_lock_flags(&rw->lock, flags); 88 arch_spin_lock_flags(&rw->lock, flags);
89 rw->counter--; 89 rw->counter--;
90 __raw_spin_unlock(&rw->lock); 90 arch_spin_unlock(&rw->lock);
91 local_irq_restore(flags); 91 local_irq_restore(flags);
92} 92}
93 93
94/* Note that we have to ensure interrupts are disabled in case we're 94/* Note that we have to ensure interrupts are disabled in case we're
95 * interrupted by some other code that wants to grab the same read lock */ 95 * interrupted by some other code that wants to grab the same read lock */
96static __inline__ int __raw_read_trylock(raw_rwlock_t *rw) 96static __inline__ int arch_read_trylock(arch_rwlock_t *rw)
97{ 97{
98 unsigned long flags; 98 unsigned long flags;
99 retry: 99 retry:
100 local_irq_save(flags); 100 local_irq_save(flags);
101 if (__raw_spin_trylock(&rw->lock)) { 101 if (arch_spin_trylock(&rw->lock)) {
102 rw->counter++; 102 rw->counter++;
103 __raw_spin_unlock(&rw->lock); 103 arch_spin_unlock(&rw->lock);
104 local_irq_restore(flags); 104 local_irq_restore(flags);
105 return 1; 105 return 1;
106 } 106 }
@@ -111,7 +111,7 @@ static __inline__ int __raw_read_trylock(raw_rwlock_t *rw)
111 return 0; 111 return 0;
112 112
113 /* Wait until we have a realistic chance at the lock */ 113 /* Wait until we have a realistic chance at the lock */
114 while (__raw_spin_is_locked(&rw->lock) && rw->counter >= 0) 114 while (arch_spin_is_locked(&rw->lock) && rw->counter >= 0)
115 cpu_relax(); 115 cpu_relax();
116 116
117 goto retry; 117 goto retry;
@@ -119,15 +119,15 @@ static __inline__ int __raw_read_trylock(raw_rwlock_t *rw)
119 119
120/* Note that we have to ensure interrupts are disabled in case we're 120/* Note that we have to ensure interrupts are disabled in case we're
121 * interrupted by some other code that wants to read_trylock() this lock */ 121 * interrupted by some other code that wants to read_trylock() this lock */
122static __inline__ void __raw_write_lock(raw_rwlock_t *rw) 122static __inline__ void arch_write_lock(arch_rwlock_t *rw)
123{ 123{
124 unsigned long flags; 124 unsigned long flags;
125retry: 125retry:
126 local_irq_save(flags); 126 local_irq_save(flags);
127 __raw_spin_lock_flags(&rw->lock, flags); 127 arch_spin_lock_flags(&rw->lock, flags);
128 128
129 if (rw->counter != 0) { 129 if (rw->counter != 0) {
130 __raw_spin_unlock(&rw->lock); 130 arch_spin_unlock(&rw->lock);
131 local_irq_restore(flags); 131 local_irq_restore(flags);
132 132
133 while (rw->counter != 0) 133 while (rw->counter != 0)
@@ -141,27 +141,27 @@ retry:
141 local_irq_restore(flags); 141 local_irq_restore(flags);
142} 142}
143 143
144static __inline__ void __raw_write_unlock(raw_rwlock_t *rw) 144static __inline__ void arch_write_unlock(arch_rwlock_t *rw)
145{ 145{
146 rw->counter = 0; 146 rw->counter = 0;
147 __raw_spin_unlock(&rw->lock); 147 arch_spin_unlock(&rw->lock);
148} 148}
149 149
150/* Note that we have to ensure interrupts are disabled in case we're 150/* Note that we have to ensure interrupts are disabled in case we're
151 * interrupted by some other code that wants to read_trylock() this lock */ 151 * interrupted by some other code that wants to read_trylock() this lock */
152static __inline__ int __raw_write_trylock(raw_rwlock_t *rw) 152static __inline__ int arch_write_trylock(arch_rwlock_t *rw)
153{ 153{
154 unsigned long flags; 154 unsigned long flags;
155 int result = 0; 155 int result = 0;
156 156
157 local_irq_save(flags); 157 local_irq_save(flags);
158 if (__raw_spin_trylock(&rw->lock)) { 158 if (arch_spin_trylock(&rw->lock)) {
159 if (rw->counter == 0) { 159 if (rw->counter == 0) {
160 rw->counter = -1; 160 rw->counter = -1;
161 result = 1; 161 result = 1;
162 } else { 162 } else {
163 /* Read-locked. Oh well. */ 163 /* Read-locked. Oh well. */
164 __raw_spin_unlock(&rw->lock); 164 arch_spin_unlock(&rw->lock);
165 } 165 }
166 } 166 }
167 local_irq_restore(flags); 167 local_irq_restore(flags);
@@ -173,7 +173,7 @@ static __inline__ int __raw_write_trylock(raw_rwlock_t *rw)
173 * read_can_lock - would read_trylock() succeed? 173 * read_can_lock - would read_trylock() succeed?
174 * @lock: the rwlock in question. 174 * @lock: the rwlock in question.
175 */ 175 */
176static __inline__ int __raw_read_can_lock(raw_rwlock_t *rw) 176static __inline__ int arch_read_can_lock(arch_rwlock_t *rw)
177{ 177{
178 return rw->counter >= 0; 178 return rw->counter >= 0;
179} 179}
@@ -182,16 +182,16 @@ static __inline__ int __raw_read_can_lock(raw_rwlock_t *rw)
182 * write_can_lock - would write_trylock() succeed? 182 * write_can_lock - would write_trylock() succeed?
183 * @lock: the rwlock in question. 183 * @lock: the rwlock in question.
184 */ 184 */
185static __inline__ int __raw_write_can_lock(raw_rwlock_t *rw) 185static __inline__ int arch_write_can_lock(arch_rwlock_t *rw)
186{ 186{
187 return !rw->counter; 187 return !rw->counter;
188} 188}
189 189
190#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 190#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
191#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 191#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
192 192
193#define _raw_spin_relax(lock) cpu_relax() 193#define arch_spin_relax(lock) cpu_relax()
194#define _raw_read_relax(lock) cpu_relax() 194#define arch_read_relax(lock) cpu_relax()
195#define _raw_write_relax(lock) cpu_relax() 195#define arch_write_relax(lock) cpu_relax()
196 196
197#endif /* __ASM_SPINLOCK_H */ 197#endif /* __ASM_SPINLOCK_H */
diff --git a/arch/parisc/include/asm/spinlock_types.h b/arch/parisc/include/asm/spinlock_types.h
index 3f72f47cf4b2..8c373aa28a86 100644
--- a/arch/parisc/include/asm/spinlock_types.h
+++ b/arch/parisc/include/asm/spinlock_types.h
@@ -4,18 +4,18 @@
4typedef struct { 4typedef struct {
5#ifdef CONFIG_PA20 5#ifdef CONFIG_PA20
6 volatile unsigned int slock; 6 volatile unsigned int slock;
7# define __RAW_SPIN_LOCK_UNLOCKED { 1 } 7# define __ARCH_SPIN_LOCK_UNLOCKED { 1 }
8#else 8#else
9 volatile unsigned int lock[4]; 9 volatile unsigned int lock[4];
10# define __RAW_SPIN_LOCK_UNLOCKED { { 1, 1, 1, 1 } } 10# define __ARCH_SPIN_LOCK_UNLOCKED { { 1, 1, 1, 1 } }
11#endif 11#endif
12} raw_spinlock_t; 12} arch_spinlock_t;
13 13
14typedef struct { 14typedef struct {
15 raw_spinlock_t lock; 15 arch_spinlock_t lock;
16 volatile int counter; 16 volatile int counter;
17} raw_rwlock_t; 17} arch_rwlock_t;
18 18
19#define __RAW_RW_LOCK_UNLOCKED { __RAW_SPIN_LOCK_UNLOCKED, 0 } 19#define __ARCH_RW_LOCK_UNLOCKED { __ARCH_SPIN_LOCK_UNLOCKED, 0 }
20 20
21#endif 21#endif
diff --git a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
index fcd3c707bf12..ec787b411e9a 100644
--- a/arch/parisc/kernel/asm-offsets.c
+++ b/arch/parisc/kernel/asm-offsets.c
@@ -244,9 +244,6 @@ int main(void)
244 DEFINE(THREAD_SZ, sizeof(struct thread_info)); 244 DEFINE(THREAD_SZ, sizeof(struct thread_info));
245 DEFINE(THREAD_SZ_ALGN, align(sizeof(struct thread_info), 64)); 245 DEFINE(THREAD_SZ_ALGN, align(sizeof(struct thread_info), 64));
246 BLANK(); 246 BLANK();
247 DEFINE(IRQSTAT_SIRQ_PEND, offsetof(irq_cpustat_t, __softirq_pending));
248 DEFINE(IRQSTAT_SZ, sizeof(irq_cpustat_t));
249 BLANK();
250 DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base)); 247 DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
251 DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride)); 248 DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));
252 DEFINE(ICACHE_COUNT, offsetof(struct pdc_cache_info, ic_count)); 249 DEFINE(ICACHE_COUNT, offsetof(struct pdc_cache_info, ic_count));
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 2e7610cb33d5..efbcee5d2220 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -145,7 +145,7 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
145#endif 145#endif
146 146
147static struct irq_chip cpu_interrupt_type = { 147static struct irq_chip cpu_interrupt_type = {
148 .typename = "CPU", 148 .name = "CPU",
149 .startup = cpu_startup_irq, 149 .startup = cpu_startup_irq,
150 .shutdown = cpu_disable_irq, 150 .shutdown = cpu_disable_irq,
151 .enable = cpu_enable_irq, 151 .enable = cpu_enable_irq,
@@ -180,7 +180,7 @@ int show_interrupts(struct seq_file *p, void *v)
180 if (i < NR_IRQS) { 180 if (i < NR_IRQS) {
181 struct irqaction *action; 181 struct irqaction *action;
182 182
183 spin_lock_irqsave(&irq_desc[i].lock, flags); 183 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
184 action = irq_desc[i].action; 184 action = irq_desc[i].action;
185 if (!action) 185 if (!action)
186 goto skip; 186 goto skip;
@@ -192,7 +192,7 @@ int show_interrupts(struct seq_file *p, void *v)
192 seq_printf(p, "%10u ", kstat_irqs(i)); 192 seq_printf(p, "%10u ", kstat_irqs(i));
193#endif 193#endif
194 194
195 seq_printf(p, " %14s", irq_desc[i].chip->typename); 195 seq_printf(p, " %14s", irq_desc[i].chip->name);
196#ifndef PARISC_IRQ_CR16_COUNTS 196#ifndef PARISC_IRQ_CR16_COUNTS
197 seq_printf(p, " %s", action->name); 197 seq_printf(p, " %s", action->name);
198 198
@@ -224,7 +224,7 @@ int show_interrupts(struct seq_file *p, void *v)
224 224
225 seq_putc(p, '\n'); 225 seq_putc(p, '\n');
226 skip: 226 skip:
227 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 227 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
228 } 228 }
229 229
230 return 0; 230 return 0;
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index 75099efb3bf3..f9f6783e4bdd 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -24,7 +24,7 @@
24 * 24 *
25 * This driver programs the PCX-U/PCX-W performance counters 25 * This driver programs the PCX-U/PCX-W performance counters
26 * on the PA-RISC 2.0 chips. The driver keeps all images now 26 * on the PA-RISC 2.0 chips. The driver keeps all images now
27 * internally to the kernel to hopefully eliminate the possiblity 27 * internally to the kernel to hopefully eliminate the possibility
28 * of a bad image halting the CPU. Also, there are different 28 * of a bad image halting the CPU. Also, there are different
29 * images for the PCX-W and later chips vs the PCX-U chips. 29 * images for the PCX-W and later chips vs the PCX-U chips.
30 * 30 *
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index e8467e4aa8d1..fb37ac52e46c 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -26,7 +26,6 @@
26#include <linux/stddef.h> 26#include <linux/stddef.h>
27#include <linux/compat.h> 27#include <linux/compat.h>
28#include <linux/elf.h> 28#include <linux/elf.h>
29#include <linux/tracehook.h>
30#include <asm/ucontext.h> 29#include <asm/ucontext.h>
31#include <asm/rt_sigframe.h> 30#include <asm/rt_sigframe.h>
32#include <asm/uaccess.h> 31#include <asm/uaccess.h>
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 1fd0f0cec037..3f2fce8ce6b6 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -60,8 +60,6 @@ static int smp_debug_lvl = 0;
60#define smp_debug(lvl, ...) do { } while(0) 60#define smp_debug(lvl, ...) do { } while(0)
61#endif /* DEBUG_SMP */ 61#endif /* DEBUG_SMP */
62 62
63DEFINE_SPINLOCK(smp_lock);
64
65volatile struct task_struct *smp_init_current_idle_task; 63volatile struct task_struct *smp_init_current_idle_task;
66 64
67/* track which CPU is booting */ 65/* track which CPU is booting */
@@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cpuinitdata;
69 67
70static int parisc_max_cpus __cpuinitdata = 1; 68static int parisc_max_cpus __cpuinitdata = 1;
71 69
72DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED; 70static DEFINE_PER_CPU(spinlock_t, ipi_lock);
73 71
74enum ipi_message_type { 72enum ipi_message_type {
75 IPI_NOP=0, 73 IPI_NOP=0,
@@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
438*/ 436*/
439void __init smp_prepare_cpus(unsigned int max_cpus) 437void __init smp_prepare_cpus(unsigned int max_cpus)
440{ 438{
439 int cpu;
440
441 for_each_possible_cpu(cpu)
442 spin_lock_init(&per_cpu(ipi_lock, cpu));
443
441 init_cpu_present(cpumask_of(0)); 444 init_cpu_present(cpumask_of(0));
442 445
443 parisc_max_cpus = max_cpus; 446 parisc_max_cpus = max_cpus;
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index 71b31957c8f1..9147391afb03 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -110,37 +110,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
110 return addr; 110 return addr;
111} 111}
112 112
113static unsigned long do_mmap2(unsigned long addr, unsigned long len,
114 unsigned long prot, unsigned long flags, unsigned long fd,
115 unsigned long pgoff)
116{
117 struct file * file = NULL;
118 unsigned long error = -EBADF;
119 if (!(flags & MAP_ANONYMOUS)) {
120 file = fget(fd);
121 if (!file)
122 goto out;
123 }
124
125 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
126
127 down_write(&current->mm->mmap_sem);
128 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
129 up_write(&current->mm->mmap_sem);
130
131 if (file != NULL)
132 fput(file);
133out:
134 return error;
135}
136
137asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, 113asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
138 unsigned long prot, unsigned long flags, unsigned long fd, 114 unsigned long prot, unsigned long flags, unsigned long fd,
139 unsigned long pgoff) 115 unsigned long pgoff)
140{ 116{
141 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE 117 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
142 we have. */ 118 we have. */
143 return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT - 12)); 119 return sys_mmap_pgoff(addr, len, prot, flags, fd,
120 pgoff >> (PAGE_SHIFT - 12));
144} 121}
145 122
146asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, 123asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
@@ -148,7 +125,8 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
148 unsigned long offset) 125 unsigned long offset)
149{ 126{
150 if (!(offset & ~PAGE_MASK)) { 127 if (!(offset & ~PAGE_MASK)) {
151 return do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 128 return sys_mmap_pgoff(addr, len, prot, flags, fd,
129 offset >> PAGE_SHIFT);
152 } else { 130 } else {
153 return -EINVAL; 131 return -EINVAL;
154 } 132 }
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 76d23ec8dfaa..9779ece2b070 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -26,13 +26,7 @@
26#include <linux/shm.h> 26#include <linux/shm.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/uio.h> 28#include <linux/uio.h>
29#include <linux/nfs_fs.h>
30#include <linux/ncp_fs.h> 29#include <linux/ncp_fs.h>
31#include <linux/sunrpc/svc.h>
32#include <linux/nfsd/nfsd.h>
33#include <linux/nfsd/cache.h>
34#include <linux/nfsd/xdr.h>
35#include <linux/nfsd/syscall.h>
36#include <linux/poll.h> 30#include <linux/poll.h>
37#include <linux/personality.h> 31#include <linux/personality.h>
38#include <linux/stat.h> 32#include <linux/stat.h>
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index a36799e85693..d58eac1a8288 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -13,6 +13,7 @@
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/kallsyms.h> 15#include <linux/kallsyms.h>
16#include <linux/sort.h>
16 17
17#include <asm/uaccess.h> 18#include <asm/uaccess.h>
18#include <asm/assembly.h> 19#include <asm/assembly.h>
@@ -115,24 +116,18 @@ unwind_table_init(struct unwind_table *table, const char *name,
115 } 116 }
116} 117}
117 118
119static int cmp_unwind_table_entry(const void *a, const void *b)
120{
121 return ((const struct unwind_table_entry *)a)->region_start
122 - ((const struct unwind_table_entry *)b)->region_start;
123}
124
118static void 125static void
119unwind_table_sort(struct unwind_table_entry *start, 126unwind_table_sort(struct unwind_table_entry *start,
120 struct unwind_table_entry *finish) 127 struct unwind_table_entry *finish)
121{ 128{
122 struct unwind_table_entry el, *p, *q; 129 sort(start, finish - start, sizeof(struct unwind_table_entry),
123 130 cmp_unwind_table_entry, NULL);
124 for (p = start + 1; p < finish; ++p) {
125 if (p[0].region_start < p[-1].region_start) {
126 el = *p;
127 q = p;
128 do {
129 q[0] = q[-1];
130 --q;
131 } while (q > start &&
132 el.region_start < q[-1].region_start);
133 *q = el;
134 }
135 }
136} 131}
137 132
138struct unwind_table * 133struct unwind_table *
@@ -417,3 +412,30 @@ int unwind_to_user(struct unwind_frame_info *info)
417 412
418 return ret; 413 return ret;
419} 414}
415
416unsigned long return_address(unsigned int level)
417{
418 struct unwind_frame_info info;
419 struct pt_regs r;
420 unsigned long sp;
421
422 /* initialize unwind info */
423 asm volatile ("copy %%r30, %0" : "=r"(sp));
424 memset(&r, 0, sizeof(struct pt_regs));
425 r.iaoq[0] = (unsigned long) current_text_addr();
426 r.gr[2] = (unsigned long) __builtin_return_address(0);
427 r.gr[30] = sp;
428 unwind_frame_init(&info, current, &r);
429
430 /* unwind stack */
431 ++level;
432 do {
433 if (unwind_once(&info) < 0 || info.ip == 0)
434 return 0;
435 if (!__kernel_text_address(info.ip)) {
436 return 0;
437 }
438 } while (info.ip && level--);
439
440 return info.ip;
441}
diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c
index e3eb739fab19..353963d42059 100644
--- a/arch/parisc/lib/bitops.c
+++ b/arch/parisc/lib/bitops.c
@@ -12,8 +12,8 @@
12#include <asm/atomic.h> 12#include <asm/atomic.h>
13 13
14#ifdef CONFIG_SMP 14#ifdef CONFIG_SMP
15raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = { 15arch_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned = {
16 [0 ... (ATOMIC_HASH_SIZE-1)] = __RAW_SPIN_LOCK_UNLOCKED 16 [0 ... (ATOMIC_HASH_SIZE-1)] = __ARCH_SPIN_LOCK_UNLOCKED
17}; 17};
18#endif 18#endif
19 19
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 0df57466e783..ba3948c70072 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -704,7 +704,7 @@ config PPC_PCI_CHOICE
704config PCI 704config PCI
705 bool "PCI support" if PPC_PCI_CHOICE 705 bool "PCI support" if PPC_PCI_CHOICE
706 default y if !40x && !CPM2 && !8xx && !PPC_83xx \ 706 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
707 && !PPC_85xx && !PPC_86xx 707 && !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
708 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx 708 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
709 default PCI_QSPAN if !4xx && !CPM2 && 8xx 709 default PCI_QSPAN if !4xx && !CPM2 && 8xx
710 select ARCH_SUPPORTS_MSI 710 select ARCH_SUPPORTS_MSI
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index bf3382f1904d..5cdd7ed9a12e 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -254,6 +254,14 @@ config PPC_EARLY_DEBUG_CPM
254 using a CPM-based serial port. This assumes that the bootwrapper 254 using a CPM-based serial port. This assumes that the bootwrapper
255 has run, and set up the CPM in a particular way. 255 has run, and set up the CPM in a particular way.
256 256
257config PPC_EARLY_DEBUG_USBGECKO
258 bool "Early debugging through the USB Gecko adapter"
259 depends on GAMECUBE_COMMON
260 select USBGECKO_UDBG
261 help
262 Select this to enable early debugging for Nintendo GameCube/Wii
263 consoles via an external USB Gecko adapter.
264
257endchoice 265endchoice
258 266
259config PPC_EARLY_DEBUG_44x_PHYSLOW 267config PPC_EARLY_DEBUG_44x_PHYSLOW
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 7bfc8ad87798..bb2465bcb327 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -66,7 +66,7 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
66 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ 66 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
67 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ 67 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
68 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ 68 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
69 fsl-soc.c mpc8xx.c pq2.c 69 fsl-soc.c mpc8xx.c pq2.c ugecon.c
70src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ 70src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
71 cuboot-ebony.c cuboot-hotfoot.c treeboot-ebony.c prpmc2800.c \ 71 cuboot-ebony.c cuboot-hotfoot.c treeboot-ebony.c prpmc2800.c \
72 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ 72 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
@@ -76,7 +76,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c
76 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ 76 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
77 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ 77 cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
78 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ 78 virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
79 cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c 79 cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \
80 gamecube-head.S gamecube.c wii-head.S wii.c
80src-boot := $(src-wlib) $(src-plat) empty.c 81src-boot := $(src-wlib) $(src-plat) empty.c
81 82
82src-boot := $(addprefix $(obj)/, $(src-boot)) 83src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -254,6 +255,8 @@ image-$(CONFIG_KSI8560) += cuImage.ksi8560
254image-$(CONFIG_STORCENTER) += cuImage.storcenter 255image-$(CONFIG_STORCENTER) += cuImage.storcenter
255image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2 256image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2
256image-$(CONFIG_PPC_C2K) += cuImage.c2k 257image-$(CONFIG_PPC_C2K) += cuImage.c2k
258image-$(CONFIG_GAMECUBE) += dtbImage.gamecube
259image-$(CONFIG_WII) += dtbImage.wii
257 260
258# Board port in arch/powerpc/platform/amigaone/Kconfig 261# Board port in arch/powerpc/platform/amigaone/Kconfig
259image-$(CONFIG_AMIGAONE) += cuImage.amigaone 262image-$(CONFIG_AMIGAONE) += cuImage.amigaone
diff --git a/arch/powerpc/boot/dts/gamecube.dts b/arch/powerpc/boot/dts/gamecube.dts
new file mode 100644
index 000000000000..ef3be0e58b02
--- /dev/null
+++ b/arch/powerpc/boot/dts/gamecube.dts
@@ -0,0 +1,114 @@
1/*
2 * arch/powerpc/boot/dts/gamecube.dts
3 *
4 * Nintendo GameCube platform device tree source
5 * Copyright (C) 2007-2009 The GameCube Linux Team
6 * Copyright (C) 2007,2008,2009 Albert Herranz
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 */
14
15/dts-v1/;
16
17/ {
18 model = "nintendo,gamecube";
19 compatible = "nintendo,gamecube";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 chosen {
24 bootargs = "root=/dev/gcnsda2 rootwait udbg-immortal";
25 };
26
27 memory {
28 device_type = "memory";
29 reg = <0x00000000 0x01800000>;
30 };
31
32 cpus {
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,gekko@0 {
37 device_type = "cpu";
38 reg = <0>;
39 clock-frequency = <486000000>; /* 486MHz */
40 bus-frequency = <162000000>; /* 162MHz core-to-bus 3x */
41 timebase-frequency = <40500000>; /* 162MHz / 4 */
42 i-cache-line-size = <32>;
43 d-cache-line-size = <32>;
44 i-cache-size = <32768>;
45 d-cache-size = <32768>;
46 };
47 };
48
49 /* devices contained int the flipper chipset */
50 flipper {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 compatible = "nintendo,flipper";
54 ranges = <0x0c000000 0x0c000000 0x00010000>;
55 interrupt-parent = <&PIC>;
56
57 video@0c002000 {
58 compatible = "nintendo,flipper-vi";
59 reg = <0x0c002000 0x100>;
60 interrupts = <8>;
61 };
62
63 processor-interface@0c003000 {
64 compatible = "nintendo,flipper-pi";
65 reg = <0x0c003000 0x100>;
66
67 PIC: pic {
68 #interrupt-cells = <1>;
69 compatible = "nintendo,flipper-pic";
70 interrupt-controller;
71 };
72 };
73
74 dsp@0c005000 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "nintendo,flipper-dsp";
78 reg = <0x0c005000 0x200>;
79 interrupts = <6>;
80
81 memory@0 {
82 compatible = "nintendo,flipper-aram";
83 reg = <0 0x1000000>; /* 16MB */
84 };
85 };
86
87 disk@0c006000 {
88 compatible = "nintendo,flipper-di";
89 reg = <0x0c006000 0x40>;
90 interrupts = <2>;
91 };
92
93 audio@0c006c00 {
94 compatible = "nintendo,flipper-ai";
95 reg = <0x0c006c00 0x20>;
96 interrupts = <6>;
97 };
98
99 gamepad-controller@0c006400 {
100 compatible = "nintendo,flipper-si";
101 reg = <0x0c006400 0x100>;
102 interrupts = <3>;
103 };
104
105 /* External Interface bus */
106 exi@0c006800 {
107 compatible = "nintendo,flipper-exi";
108 reg = <0x0c006800 0x40>;
109 virtual-reg = <0x0c006800>;
110 interrupts = <4>;
111 };
112 };
113};
114
diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
new file mode 100644
index 000000000000..77528c9a8dbd
--- /dev/null
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -0,0 +1,218 @@
1/*
2 * arch/powerpc/boot/dts/wii.dts
3 *
4 * Nintendo Wii platform device tree source
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15/dts-v1/;
16
17/*
18 * This is commented-out for now.
19 * Until a later patch is merged, the kernel can use only the first
20 * contiguous RAM range and will BUG() if the memreserve is outside
21 * that range.
22 */
23/*/memreserve/ 0x10000000 0x0004000;*/ /* DSP RAM */
24
25/ {
26 model = "nintendo,wii";
27 compatible = "nintendo,wii";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 chosen {
32 bootargs = "root=/dev/mmcblk0p2 rootwait udbg-immortal";
33 };
34
35 memory {
36 device_type = "memory";
37 reg = <0x00000000 0x01800000 /* MEM1 24MB 1T-SRAM */
38 0x10000000 0x04000000>; /* MEM2 64MB GDDR3 */
39 };
40
41 cpus {
42 #address-cells = <1>;
43 #size-cells = <0>;
44
45 PowerPC,broadway@0 {
46 device_type = "cpu";
47 reg = <0>;
48 clock-frequency = <729000000>; /* 729MHz */
49 bus-frequency = <243000000>; /* 243MHz core-to-bus 3x */
50 timebase-frequency = <60750000>; /* 243MHz / 4 */
51 i-cache-line-size = <32>;
52 d-cache-line-size = <32>;
53 i-cache-size = <32768>;
54 d-cache-size = <32768>;
55 };
56 };
57
58 /* devices contained in the hollywood chipset */
59 hollywood {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 compatible = "nintendo,hollywood";
63 ranges = <0x0c000000 0x0c000000 0x01000000
64 0x0d000000 0x0d000000 0x00800000
65 0x0d800000 0x0d800000 0x00800000>;
66 interrupt-parent = <&PIC0>;
67
68 video@0c002000 {
69 compatible = "nintendo,hollywood-vi",
70 "nintendo,flipper-vi";
71 reg = <0x0c002000 0x100>;
72 interrupts = <8>;
73 };
74
75 processor-interface@0c003000 {
76 compatible = "nintendo,hollywood-pi",
77 "nintendo,flipper-pi";
78 reg = <0x0c003000 0x100>;
79
80 PIC0: pic0 {
81 #interrupt-cells = <1>;
82 compatible = "nintendo,flipper-pic";
83 interrupt-controller;
84 };
85 };
86
87 dsp@0c005000 {
88 #address-cells = <1>;
89 #size-cells = <1>;
90 compatible = "nintendo,hollywood-dsp",
91 "nintendo,flipper-dsp";
92 reg = <0x0c005000 0x200>;
93 interrupts = <6>;
94 };
95
96 gamepad-controller@0d006400 {
97 compatible = "nintendo,hollywood-si",
98 "nintendo,flipper-si";
99 reg = <0x0d006400 0x100>;
100 interrupts = <3>;
101 };
102
103 audio@0c006c00 {
104 compatible = "nintendo,hollywood-ai",
105 "nintendo,flipper-ai";
106 reg = <0x0d006c00 0x20>;
107 interrupts = <6>;
108 };
109
110 /* External Interface bus */
111 exi@0d006800 {
112 compatible = "nintendo,hollywood-exi",
113 "nintendo,flipper-exi";
114 reg = <0x0d006800 0x40>;
115 virtual-reg = <0x0d006800>;
116 interrupts = <4>;
117 };
118
119 usb@0d040000 {
120 compatible = "nintendo,hollywood-usb-ehci",
121 "usb-ehci";
122 reg = <0x0d040000 0x100>;
123 interrupts = <4>;
124 interrupt-parent = <&PIC1>;
125 };
126
127 usb@0d050000 {
128 compatible = "nintendo,hollywood-usb-ohci",
129 "usb-ohci";
130 reg = <0x0d050000 0x100>;
131 interrupts = <5>;
132 interrupt-parent = <&PIC1>;
133 };
134
135 usb@0d060000 {
136 compatible = "nintendo,hollywood-usb-ohci",
137 "usb-ohci";
138 reg = <0x0d060000 0x100>;
139 interrupts = <6>;
140 interrupt-parent = <&PIC1>;
141 };
142
143 sd@0d070000 {
144 compatible = "nintendo,hollywood-sdhci",
145 "sdhci";
146 reg = <0x0d070000 0x200>;
147 interrupts = <7>;
148 interrupt-parent = <&PIC1>;
149 };
150
151 sdio@0d080000 {
152 compatible = "nintendo,hollywood-sdhci",
153 "sdhci";
154 reg = <0x0d080000 0x200>;
155 interrupts = <8>;
156 interrupt-parent = <&PIC1>;
157 };
158
159 ipc@0d000000 {
160 compatible = "nintendo,hollywood-ipc";
161 reg = <0x0d000000 0x10>;
162 interrupts = <30>;
163 interrupt-parent = <&PIC1>;
164 };
165
166 PIC1: pic1@0d800030 {
167 #interrupt-cells = <1>;
168 compatible = "nintendo,hollywood-pic";
169 reg = <0x0d800030 0x10>;
170 interrupt-controller;
171 interrupts = <14>;
172 };
173
174 GPIO: gpio@0d8000c0 {
175 #gpio-cells = <2>;
176 compatible = "nintendo,hollywood-gpio";
177 reg = <0x0d8000c0 0x40>;
178 gpio-controller;
179
180 /*
181 * This is commented out while a standard binding
182 * for i2c over gpio is defined.
183 */
184 /*
185 i2c-video {
186 #address-cells = <1>;
187 #size-cells = <0>;
188 compatible = "i2c-gpio";
189
190 gpios = <&GPIO 15 0
191 &GPIO 14 0>;
192 clock-frequency = <250000>;
193 no-clock-stretching;
194 scl-is-open-drain;
195 sda-is-open-drain;
196 sda-enforce-dir;
197
198 AVE: audio-video-encoder@70 {
199 compatible = "nintendo,wii-audio-video-encoder";
200 reg = <0x70>;
201 };
202 };
203 */
204 };
205
206 control@0d800100 {
207 compatible = "nintendo,hollywood-control";
208 reg = <0x0d800100 0x300>;
209 };
210
211 disk@0d806000 {
212 compatible = "nintendo,hollywood-di";
213 reg = <0x0d806000 0x40>;
214 interrupts = <2>;
215 };
216 };
217};
218
diff --git a/arch/powerpc/boot/gamecube-head.S b/arch/powerpc/boot/gamecube-head.S
new file mode 100644
index 000000000000..65a9b2a3bf33
--- /dev/null
+++ b/arch/powerpc/boot/gamecube-head.S
@@ -0,0 +1,111 @@
1/*
2 * arch/powerpc/boot/gamecube-head.S
3 *
4 * Nintendo GameCube bootwrapper entry.
5 * Copyright (C) 2004-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include "ppc_asm.h"
16
17/*
18 * The entry code does no assumptions regarding:
19 * - if the data and instruction caches are enabled or not
20 * - if the MMU is enabled or not
21 *
22 * We enable the caches if not already enabled, enable the MMU with an
23 * identity mapping scheme and jump to the start code.
24 */
25
26 .text
27
28 .globl _zimage_start
29_zimage_start:
30
31 /* turn the MMU off */
32 mfmsr 9
33 rlwinm 9, 9, 0, ~((1<<4)|(1<<5)) /* MSR_DR|MSR_IR */
34 bcl 20, 31, 1f
351:
36 mflr 8
37 clrlwi 8, 8, 3 /* convert to a real address */
38 addi 8, 8, _mmu_off - 1b
39 mtsrr0 8
40 mtsrr1 9
41 rfi
42_mmu_off:
43 /* MMU disabled */
44
45 /* setup BATs */
46 isync
47 li 8, 0
48 mtspr 0x210, 8 /* IBAT0U */
49 mtspr 0x212, 8 /* IBAT1U */
50 mtspr 0x214, 8 /* IBAT2U */
51 mtspr 0x216, 8 /* IBAT3U */
52 mtspr 0x218, 8 /* DBAT0U */
53 mtspr 0x21a, 8 /* DBAT1U */
54 mtspr 0x21c, 8 /* DBAT2U */
55 mtspr 0x21e, 8 /* DBAT3U */
56
57 li 8, 0x01ff /* first 16MiB */
58 li 9, 0x0002 /* rw */
59 mtspr 0x211, 9 /* IBAT0L */
60 mtspr 0x210, 8 /* IBAT0U */
61 mtspr 0x219, 9 /* DBAT0L */
62 mtspr 0x218, 8 /* DBAT0U */
63
64 lis 8, 0x0c00 /* I/O mem */
65 ori 8, 8, 0x3ff /* 32MiB */
66 lis 9, 0x0c00
67 ori 9, 9, 0x002a /* uncached, guarded, rw */
68 mtspr 0x21b, 9 /* DBAT1L */
69 mtspr 0x21a, 8 /* DBAT1U */
70
71 lis 8, 0x0100 /* next 8MiB */
72 ori 8, 8, 0x00ff /* 8MiB */
73 lis 9, 0x0100
74 ori 9, 9, 0x0002 /* rw */
75 mtspr 0x215, 9 /* IBAT2L */
76 mtspr 0x214, 8 /* IBAT2U */
77 mtspr 0x21d, 9 /* DBAT2L */
78 mtspr 0x21c, 8 /* DBAT2U */
79
80 /* enable and invalidate the caches if not already enabled */
81 mfspr 8, 0x3f0 /* HID0 */
82 andi. 0, 8, (1<<15) /* HID0_ICE */
83 bne 1f
84 ori 8, 8, (1<<15)|(1<<11) /* HID0_ICE|HID0_ICFI*/
851:
86 andi. 0, 8, (1<<14) /* HID0_DCE */
87 bne 1f
88 ori 8, 8, (1<<14)|(1<<10) /* HID0_DCE|HID0_DCFI*/
891:
90 mtspr 0x3f0, 8 /* HID0 */
91 isync
92
93 /* initialize arguments */
94 li 3, 0
95 li 4, 0
96 li 5, 0
97
98 /* turn the MMU on */
99 bcl 20, 31, 1f
1001:
101 mflr 8
102 addi 8, 8, _mmu_on - 1b
103 mfmsr 9
104 ori 9, 9, (1<<4)|(1<<5) /* MSR_DR|MSR_IR */
105 mtsrr0 8
106 mtsrr1 9
107 sync
108 rfi
109_mmu_on:
110 b _zimage_start_lib
111
diff --git a/arch/powerpc/boot/gamecube.c b/arch/powerpc/boot/gamecube.c
new file mode 100644
index 000000000000..28ae7057be5e
--- /dev/null
+++ b/arch/powerpc/boot/gamecube.c
@@ -0,0 +1,35 @@
1/*
2 * arch/powerpc/boot/gamecube.c
3 *
4 * Nintendo GameCube bootwrapper support
5 * Copyright (C) 2004-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include <stddef.h>
16#include "stdio.h"
17#include "types.h"
18#include "io.h"
19#include "ops.h"
20
21#include "ugecon.h"
22
23BSS_STACK(8192);
24
25void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
26{
27 u32 heapsize = 16*1024*1024 - (u32)_end;
28
29 simple_alloc_init(_end, heapsize, 32, 64);
30 fdt_init(_dtb_start);
31
32 if (ug_probe())
33 console_ops.write = ug_console_write;
34}
35
diff --git a/arch/powerpc/boot/ugecon.c b/arch/powerpc/boot/ugecon.c
new file mode 100644
index 000000000000..8f2a6b311534
--- /dev/null
+++ b/arch/powerpc/boot/ugecon.c
@@ -0,0 +1,147 @@
1/*
2 * arch/powerpc/boot/ugecon.c
3 *
4 * USB Gecko bootwrapper console.
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include <stddef.h>
16#include "stdio.h"
17#include "types.h"
18#include "io.h"
19#include "ops.h"
20
21
22#define EXI_CLK_32MHZ 5
23
24#define EXI_CSR 0x00
25#define EXI_CSR_CLKMASK (0x7<<4)
26#define EXI_CSR_CLK_32MHZ (EXI_CLK_32MHZ<<4)
27#define EXI_CSR_CSMASK (0x7<<7)
28#define EXI_CSR_CS_0 (0x1<<7) /* Chip Select 001 */
29
30#define EXI_CR 0x0c
31#define EXI_CR_TSTART (1<<0)
32#define EXI_CR_WRITE (1<<2)
33#define EXI_CR_READ_WRITE (2<<2)
34#define EXI_CR_TLEN(len) (((len)-1)<<4)
35
36#define EXI_DATA 0x10
37
38
39/* virtual address base for input/output, retrieved from device tree */
40static void *ug_io_base;
41
42
43static u32 ug_io_transaction(u32 in)
44{
45 u32 *csr_reg = ug_io_base + EXI_CSR;
46 u32 *data_reg = ug_io_base + EXI_DATA;
47 u32 *cr_reg = ug_io_base + EXI_CR;
48 u32 csr, data, cr;
49
50 /* select */
51 csr = EXI_CSR_CLK_32MHZ | EXI_CSR_CS_0;
52 out_be32(csr_reg, csr);
53
54 /* read/write */
55 data = in;
56 out_be32(data_reg, data);
57 cr = EXI_CR_TLEN(2) | EXI_CR_READ_WRITE | EXI_CR_TSTART;
58 out_be32(cr_reg, cr);
59
60 while (in_be32(cr_reg) & EXI_CR_TSTART)
61 barrier();
62
63 /* deselect */
64 out_be32(csr_reg, 0);
65
66 data = in_be32(data_reg);
67 return data;
68}
69
70static int ug_is_txfifo_ready(void)
71{
72 return ug_io_transaction(0xc0000000) & 0x04000000;
73}
74
75static void ug_raw_putc(char ch)
76{
77 ug_io_transaction(0xb0000000 | (ch << 20));
78}
79
80static void ug_putc(char ch)
81{
82 int count = 16;
83
84 if (!ug_io_base)
85 return;
86
87 while (!ug_is_txfifo_ready() && count--)
88 barrier();
89 if (count >= 0)
90 ug_raw_putc(ch);
91}
92
93void ug_console_write(const char *buf, int len)
94{
95 char *b = (char *)buf;
96
97 while (len--) {
98 if (*b == '\n')
99 ug_putc('\r');
100 ug_putc(*b++);
101 }
102}
103
104static int ug_is_adapter_present(void)
105{
106 if (!ug_io_base)
107 return 0;
108 return ug_io_transaction(0x90000000) == 0x04700000;
109}
110
111static void *ug_grab_exi_io_base(void)
112{
113 u32 v;
114 void *devp;
115
116 devp = find_node_by_compatible(NULL, "nintendo,flipper-exi");
117 if (devp == NULL)
118 goto err_out;
119 if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v))
120 goto err_out;
121
122 return (void *)v;
123
124err_out:
125 return NULL;
126}
127
128void *ug_probe(void)
129{
130 void *exi_io_base;
131 int i;
132
133 exi_io_base = ug_grab_exi_io_base();
134 if (!exi_io_base)
135 return NULL;
136
137 /* look for a usbgecko on memcard slots A and B */
138 for (i = 0; i < 2; i++) {
139 ug_io_base = exi_io_base + 0x14 * i;
140 if (ug_is_adapter_present())
141 break;
142 }
143 if (i == 2)
144 ug_io_base = NULL;
145 return ug_io_base;
146}
147
diff --git a/arch/powerpc/boot/ugecon.h b/arch/powerpc/boot/ugecon.h
new file mode 100644
index 000000000000..43737539169b
--- /dev/null
+++ b/arch/powerpc/boot/ugecon.h
@@ -0,0 +1,24 @@
1/*
2 * arch/powerpc/boot/ugecon.h
3 *
4 * USB Gecko early bootwrapper console.
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#ifndef __UGECON_H
16#define __UGECON_H
17
18extern void *ug_probe(void);
19
20extern void ug_putc(char ch);
21extern void ug_console_write(const char *buf, int len);
22
23#endif /* __UGECON_H */
24
diff --git a/arch/powerpc/boot/wii-head.S b/arch/powerpc/boot/wii-head.S
new file mode 100644
index 000000000000..edd79b836fcf
--- /dev/null
+++ b/arch/powerpc/boot/wii-head.S
@@ -0,0 +1,142 @@
1/*
2 * arch/powerpc/boot/wii-head.S
3 *
4 * Nintendo Wii bootwrapper entry.
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include "ppc_asm.h"
16
17/*
18 * The entry code does no assumptions regarding:
19 * - if the data and instruction caches are enabled or not
20 * - if the MMU is enabled or not
21 * - if the high BATs are enabled or not
22 *
23 * We enable the high BATs, enable the caches if not already enabled,
24 * enable the MMU with an identity mapping scheme and jump to the start code.
25 */
26
27 .text
28
29 .globl _zimage_start
30_zimage_start:
31
32 /* turn the MMU off */
33 mfmsr 9
34 rlwinm 9, 9, 0, ~((1<<4)|(1<<5)) /* MSR_DR|MSR_IR */
35 bcl 20, 31, 1f
361:
37 mflr 8
38 clrlwi 8, 8, 3 /* convert to a real address */
39 addi 8, 8, _mmu_off - 1b
40 mtsrr0 8
41 mtsrr1 9
42 rfi
43_mmu_off:
44 /* MMU disabled */
45
46 /* setup BATs */
47 isync
48 li 8, 0
49 mtspr 0x210, 8 /* IBAT0U */
50 mtspr 0x212, 8 /* IBAT1U */
51 mtspr 0x214, 8 /* IBAT2U */
52 mtspr 0x216, 8 /* IBAT3U */
53 mtspr 0x218, 8 /* DBAT0U */
54 mtspr 0x21a, 8 /* DBAT1U */
55 mtspr 0x21c, 8 /* DBAT2U */
56 mtspr 0x21e, 8 /* DBAT3U */
57
58 mtspr 0x230, 8 /* IBAT4U */
59 mtspr 0x232, 8 /* IBAT5U */
60 mtspr 0x234, 8 /* IBAT6U */
61 mtspr 0x236, 8 /* IBAT7U */
62 mtspr 0x238, 8 /* DBAT4U */
63 mtspr 0x23a, 8 /* DBAT5U */
64 mtspr 0x23c, 8 /* DBAT6U */
65 mtspr 0x23e, 8 /* DBAT7U */
66
67 li 8, 0x01ff /* first 16MiB */
68 li 9, 0x0002 /* rw */
69 mtspr 0x211, 9 /* IBAT0L */
70 mtspr 0x210, 8 /* IBAT0U */
71 mtspr 0x219, 9 /* DBAT0L */
72 mtspr 0x218, 8 /* DBAT0U */
73
74 lis 8, 0x0c00 /* I/O mem */
75 ori 8, 8, 0x3ff /* 32MiB */
76 lis 9, 0x0c00
77 ori 9, 9, 0x002a /* uncached, guarded, rw */
78 mtspr 0x21b, 9 /* DBAT1L */
79 mtspr 0x21a, 8 /* DBAT1U */
80
81 lis 8, 0x0100 /* next 8MiB */
82 ori 8, 8, 0x00ff /* 8MiB */
83 lis 9, 0x0100
84 ori 9, 9, 0x0002 /* rw */
85 mtspr 0x215, 9 /* IBAT2L */
86 mtspr 0x214, 8 /* IBAT2U */
87 mtspr 0x21d, 9 /* DBAT2L */
88 mtspr 0x21c, 8 /* DBAT2U */
89
90 lis 8, 0x1000 /* MEM2 */
91 ori 8, 8, 0x07ff /* 64MiB */
92 lis 9, 0x1000
93 ori 9, 9, 0x0002 /* rw */
94 mtspr 0x216, 8 /* IBAT3U */
95 mtspr 0x217, 9 /* IBAT3L */
96 mtspr 0x21e, 8 /* DBAT3U */
97 mtspr 0x21f, 9 /* DBAT3L */
98
99 /* enable the high BATs */
100 mfspr 8, 0x3f3 /* HID4 */
101 oris 8, 8, 0x0200
102 mtspr 0x3f3, 8 /* HID4 */
103
104 /* enable and invalidate the caches if not already enabled */
105 mfspr 8, 0x3f0 /* HID0 */
106 andi. 0, 8, (1<<15) /* HID0_ICE */
107 bne 1f
108 ori 8, 8, (1<<15)|(1<<11) /* HID0_ICE|HID0_ICFI*/
1091:
110 andi. 0, 8, (1<<14) /* HID0_DCE */
111 bne 1f
112 ori 8, 8, (1<<14)|(1<<10) /* HID0_DCE|HID0_DCFI*/
1131:
114 mtspr 0x3f0, 8 /* HID0 */
115 isync
116
117 /* initialize arguments */
118 li 3, 0
119 li 4, 0
120 li 5, 0
121
122 /* turn the MMU on */
123 bcl 20, 31, 1f
1241:
125 mflr 8
126 addi 8, 8, _mmu_on - 1b
127 mfmsr 9
128 ori 9, 9, (1<<4)|(1<<5) /* MSR_DR|MSR_IR */
129 mtsrr0 8
130 mtsrr1 9
131 sync
132 rfi
133_mmu_on:
134 /* turn on the front blue led (aka: yay! we got here!) */
135 lis 8, 0x0d00
136 ori 8, 8, 0x00c0
137 lwz 9, 0(8)
138 ori 9, 9, 0x20
139 stw 9, 0(8)
140
141 b _zimage_start_lib
142
diff --git a/arch/powerpc/boot/wii.c b/arch/powerpc/boot/wii.c
new file mode 100644
index 000000000000..2ebaec0344dd
--- /dev/null
+++ b/arch/powerpc/boot/wii.c
@@ -0,0 +1,158 @@
1/*
2 * arch/powerpc/boot/wii.c
3 *
4 * Nintendo Wii bootwrapper support
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include <stddef.h>
16#include "stdio.h"
17#include "types.h"
18#include "io.h"
19#include "ops.h"
20
21#include "ugecon.h"
22
23BSS_STACK(8192);
24
25#define HW_REG(x) ((void *)(x))
26
27#define EXI_CTRL HW_REG(0x0d800070)
28#define EXI_CTRL_ENABLE (1<<0)
29
30#define MEM2_TOP (0x10000000 + 64*1024*1024)
31#define FIRMWARE_DEFAULT_SIZE (12*1024*1024)
32
33
34struct mipc_infohdr {
35 char magic[3];
36 u8 version;
37 u32 mem2_boundary;
38 u32 ipc_in;
39 size_t ipc_in_size;
40 u32 ipc_out;
41 size_t ipc_out_size;
42};
43
44static int mipc_check_address(u32 pa)
45{
46 /* only MEM2 addresses */
47 if (pa < 0x10000000 || pa > 0x14000000)
48 return -EINVAL;
49 return 0;
50}
51
52static struct mipc_infohdr *mipc_get_infohdr(void)
53{
54 struct mipc_infohdr **hdrp, *hdr;
55
56 /* 'mini' header pointer is the last word of MEM2 memory */
57 hdrp = (struct mipc_infohdr **)0x13fffffc;
58 if (mipc_check_address((u32)hdrp)) {
59 printf("mini: invalid hdrp %08X\n", (u32)hdrp);
60 hdr = NULL;
61 goto out;
62 }
63
64 hdr = *hdrp;
65 if (mipc_check_address((u32)hdr)) {
66 printf("mini: invalid hdr %08X\n", (u32)hdr);
67 hdr = NULL;
68 goto out;
69 }
70 if (memcmp(hdr->magic, "IPC", 3)) {
71 printf("mini: invalid magic\n");
72 hdr = NULL;
73 goto out;
74 }
75
76out:
77 return hdr;
78}
79
80static int mipc_get_mem2_boundary(u32 *mem2_boundary)
81{
82 struct mipc_infohdr *hdr;
83 int error;
84
85 hdr = mipc_get_infohdr();
86 if (!hdr) {
87 error = -1;
88 goto out;
89 }
90
91 if (mipc_check_address(hdr->mem2_boundary)) {
92 printf("mini: invalid mem2_boundary %08X\n",
93 hdr->mem2_boundary);
94 error = -EINVAL;
95 goto out;
96 }
97 *mem2_boundary = hdr->mem2_boundary;
98 error = 0;
99out:
100 return error;
101
102}
103
104static void platform_fixups(void)
105{
106 void *mem;
107 u32 reg[4];
108 u32 mem2_boundary;
109 int len;
110 int error;
111
112 mem = finddevice("/memory");
113 if (!mem)
114 fatal("Can't find memory node\n");
115
116 /* two ranges of (address, size) words */
117 len = getprop(mem, "reg", reg, sizeof(reg));
118 if (len != sizeof(reg)) {
119 /* nothing to do */
120 goto out;
121 }
122
123 /* retrieve MEM2 boundary from 'mini' */
124 error = mipc_get_mem2_boundary(&mem2_boundary);
125 if (error) {
126 /* if that fails use a sane value */
127 mem2_boundary = MEM2_TOP - FIRMWARE_DEFAULT_SIZE;
128 }
129
130 if (mem2_boundary > reg[2] && mem2_boundary < reg[2] + reg[3]) {
131 reg[3] = mem2_boundary - reg[2];
132 printf("top of MEM2 @ %08X\n", reg[2] + reg[3]);
133 setprop(mem, "reg", reg, sizeof(reg));
134 }
135
136out:
137 return;
138}
139
140void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
141{
142 u32 heapsize = 24*1024*1024 - (u32)_end;
143
144 simple_alloc_init(_end, heapsize, 32, 64);
145 fdt_init(_dtb_start);
146
147 /*
148 * 'mini' boots the Broadway processor with EXI disabled.
149 * We need it enabled before probing for the USB Gecko.
150 */
151 out_be32(EXI_CTRL, in_be32(EXI_CTRL) | EXI_CTRL_ENABLE);
152
153 if (ug_probe())
154 console_ops.write = ug_console_write;
155
156 platform_ops.fixups = platform_fixups;
157}
158
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ac9e9a58b2b0..390512ae7f86 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -230,6 +230,10 @@ xpedite52*)
230 link_address='0x1400000' 230 link_address='0x1400000'
231 platformo=$object/cuboot-85xx.o 231 platformo=$object/cuboot-85xx.o
232 ;; 232 ;;
233gamecube|wii)
234 link_address='0x600000'
235 platformo="$object/$platform-head.o $object/$platform.o"
236 ;;
233esac 237esac
234 238
235vmz="$tmpdir/`basename \"$kernel\"`.$ext" 239vmz="$tmpdir/`basename \"$kernel\"`.$ext"
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index fc905924c022..826a65d3f002 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -757,7 +757,7 @@ CONFIG_SUNGEM=y
757# CONFIG_B44 is not set 757# CONFIG_B44 is not set
758# CONFIG_ATL2 is not set 758# CONFIG_ATL2 is not set
759CONFIG_NETDEV_1000=y 759CONFIG_NETDEV_1000=y
760CONFIG_ACENIC=y 760CONFIG_ACENIC=m
761CONFIG_ACENIC_OMIT_TIGON_I=y 761CONFIG_ACENIC_OMIT_TIGON_I=y
762# CONFIG_DL2K is not set 762# CONFIG_DL2K is not set
763CONFIG_E1000=y 763CONFIG_E1000=y
@@ -794,8 +794,8 @@ CONFIG_NETDEV_10000=y
794# CONFIG_BNX2X is not set 794# CONFIG_BNX2X is not set
795# CONFIG_QLGE is not set 795# CONFIG_QLGE is not set
796# CONFIG_SFC is not set 796# CONFIG_SFC is not set
797CONFIG_TR=y 797# CONFIG_TR is not set
798CONFIG_IBMOL=y 798# CONFIG_IBMOL is not set
799# CONFIG_3C359 is not set 799# CONFIG_3C359 is not set
800# CONFIG_TMS380TR is not set 800# CONFIG_TMS380TR is not set
801 801
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
new file mode 100644
index 000000000000..942e1193e9e4
--- /dev/null
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -0,0 +1,1061 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc8
4# Sun Nov 22 21:07:30 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
19CONFIG_PPC_FPU=y
20# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
25CONFIG_PPC_PERF_CTRS=y
26# CONFIG_SMP is not set
27CONFIG_NOT_COHERENT_CACHE=y
28CONFIG_PPC32=y
29CONFIG_WORD_SIZE=32
30# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
31CONFIG_MMU=y
32CONFIG_GENERIC_CMOS_UPDATE=y
33CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
39# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
40CONFIG_IRQ_PER_CPU=y
41CONFIG_STACKTRACE_SUPPORT=y
42CONFIG_HAVE_LATENCYTOP_SUPPORT=y
43CONFIG_TRACE_IRQFLAGS_SUPPORT=y
44CONFIG_LOCKDEP_SUPPORT=y
45CONFIG_RWSEM_XCHGADD_ALGORITHM=y
46CONFIG_ARCH_HAS_ILOG2_U32=y
47CONFIG_GENERIC_HWEIGHT=y
48CONFIG_GENERIC_FIND_NEXT_BIT=y
49# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
50CONFIG_PPC=y
51CONFIG_EARLY_PRINTK=y
52CONFIG_GENERIC_NVRAM=y
53CONFIG_SCHED_OMIT_FRAME_POINTER=y
54CONFIG_ARCH_MAY_HAVE_PC_FDC=y
55CONFIG_PPC_OF=y
56CONFIG_OF=y
57# CONFIG_PPC_UDBG_16550 is not set
58# CONFIG_GENERIC_TBSYNC is not set
59CONFIG_AUDIT_ARCH=y
60CONFIG_GENERIC_BUG=y
61CONFIG_DTC=y
62# CONFIG_DEFAULT_UIMAGE is not set
63# CONFIG_PPC_DCR_NATIVE is not set
64# CONFIG_PPC_DCR_MMIO is not set
65CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
66CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
67CONFIG_CONSTRUCTORS=y
68
69#
70# General setup
71#
72CONFIG_EXPERIMENTAL=y
73CONFIG_BROKEN_ON_SMP=y
74CONFIG_LOCK_KERNEL=y
75CONFIG_INIT_ENV_ARG_LIMIT=32
76CONFIG_LOCALVERSION="-gcn"
77CONFIG_LOCALVERSION_AUTO=y
78CONFIG_SWAP=y
79CONFIG_SYSVIPC=y
80CONFIG_SYSVIPC_SYSCTL=y
81# CONFIG_POSIX_MQUEUE is not set
82# CONFIG_BSD_PROCESS_ACCT is not set
83# CONFIG_TASKSTATS is not set
84# CONFIG_AUDIT is not set
85
86#
87# RCU Subsystem
88#
89CONFIG_TREE_RCU=y
90# CONFIG_TREE_PREEMPT_RCU is not set
91# CONFIG_RCU_TRACE is not set
92CONFIG_RCU_FANOUT=32
93# CONFIG_RCU_FANOUT_EXACT is not set
94# CONFIG_TREE_RCU_TRACE is not set
95CONFIG_IKCONFIG=y
96CONFIG_IKCONFIG_PROC=y
97CONFIG_LOG_BUF_SHIFT=14
98CONFIG_GROUP_SCHED=y
99CONFIG_FAIR_GROUP_SCHED=y
100# CONFIG_RT_GROUP_SCHED is not set
101CONFIG_USER_SCHED=y
102# CONFIG_CGROUP_SCHED is not set
103# CONFIG_CGROUPS is not set
104CONFIG_SYSFS_DEPRECATED=y
105CONFIG_SYSFS_DEPRECATED_V2=y
106# CONFIG_RELAY is not set
107# CONFIG_NAMESPACES is not set
108CONFIG_BLK_DEV_INITRD=y
109CONFIG_INITRAMFS_SOURCE=""
110CONFIG_RD_GZIP=y
111# CONFIG_RD_BZIP2 is not set
112# CONFIG_RD_LZMA is not set
113# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
114CONFIG_SYSCTL=y
115CONFIG_ANON_INODES=y
116CONFIG_EMBEDDED=y
117CONFIG_SYSCTL_SYSCALL=y
118CONFIG_KALLSYMS=y
119CONFIG_KALLSYMS_ALL=y
120# CONFIG_KALLSYMS_EXTRA_PASS is not set
121CONFIG_HOTPLUG=y
122CONFIG_PRINTK=y
123CONFIG_BUG=y
124# CONFIG_ELF_CORE is not set
125CONFIG_BASE_FULL=y
126CONFIG_FUTEX=y
127CONFIG_EPOLL=y
128CONFIG_SIGNALFD=y
129CONFIG_TIMERFD=y
130CONFIG_EVENTFD=y
131CONFIG_SHMEM=y
132CONFIG_AIO=y
133CONFIG_HAVE_PERF_EVENTS=y
134
135#
136# Kernel Performance Events And Counters
137#
138CONFIG_PERF_EVENTS=y
139CONFIG_EVENT_PROFILE=y
140CONFIG_PERF_COUNTERS=y
141# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
142# CONFIG_VM_EVENT_COUNTERS is not set
143CONFIG_COMPAT_BRK=y
144CONFIG_SLAB=y
145# CONFIG_SLUB is not set
146# CONFIG_SLOB is not set
147# CONFIG_PROFILING is not set
148CONFIG_TRACEPOINTS=y
149CONFIG_HAVE_OPROFILE=y
150# CONFIG_KPROBES is not set
151CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
152CONFIG_HAVE_IOREMAP_PROT=y
153CONFIG_HAVE_KPROBES=y
154CONFIG_HAVE_KRETPROBES=y
155CONFIG_HAVE_ARCH_TRACEHOOK=y
156CONFIG_HAVE_DMA_ATTRS=y
157CONFIG_HAVE_DMA_API_DEBUG=y
158
159#
160# GCOV-based kernel profiling
161#
162# CONFIG_GCOV_KERNEL is not set
163CONFIG_SLOW_WORK=y
164# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
165CONFIG_SLABINFO=y
166CONFIG_RT_MUTEXES=y
167CONFIG_BASE_SMALL=0
168CONFIG_MODULES=y
169# CONFIG_MODULE_FORCE_LOAD is not set
170CONFIG_MODULE_UNLOAD=y
171# CONFIG_MODULE_FORCE_UNLOAD is not set
172# CONFIG_MODVERSIONS is not set
173# CONFIG_MODULE_SRCVERSION_ALL is not set
174CONFIG_BLOCK=y
175CONFIG_LBDAF=y
176# CONFIG_BLK_DEV_BSG is not set
177# CONFIG_BLK_DEV_INTEGRITY is not set
178
179#
180# IO Schedulers
181#
182CONFIG_IOSCHED_NOOP=y
183CONFIG_IOSCHED_AS=y
184CONFIG_IOSCHED_DEADLINE=y
185CONFIG_IOSCHED_CFQ=y
186CONFIG_DEFAULT_AS=y
187# CONFIG_DEFAULT_DEADLINE is not set
188# CONFIG_DEFAULT_CFQ is not set
189# CONFIG_DEFAULT_NOOP is not set
190CONFIG_DEFAULT_IOSCHED="anticipatory"
191# CONFIG_FREEZER is not set
192
193#
194# Platform support
195#
196# CONFIG_PPC_CHRP is not set
197# CONFIG_MPC5121_ADS is not set
198# CONFIG_MPC5121_GENERIC is not set
199# CONFIG_PPC_MPC52xx is not set
200# CONFIG_PPC_PMAC is not set
201# CONFIG_PPC_CELL is not set
202# CONFIG_PPC_CELL_NATIVE is not set
203# CONFIG_PPC_82xx is not set
204# CONFIG_PQ2ADS is not set
205# CONFIG_PPC_83xx is not set
206# CONFIG_PPC_86xx is not set
207CONFIG_EMBEDDED6xx=y
208# CONFIG_LINKSTATION is not set
209# CONFIG_STORCENTER is not set
210# CONFIG_MPC7448HPC2 is not set
211# CONFIG_PPC_HOLLY is not set
212# CONFIG_PPC_PRPMC2800 is not set
213# CONFIG_PPC_C2K is not set
214CONFIG_GAMECUBE_COMMON=y
215CONFIG_USBGECKO_UDBG=y
216CONFIG_FLIPPER_PIC=y
217CONFIG_GAMECUBE=y
218# CONFIG_WII is not set
219# CONFIG_AMIGAONE is not set
220# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
221# CONFIG_IPIC is not set
222# CONFIG_MPIC is not set
223# CONFIG_MPIC_WEIRD is not set
224# CONFIG_PPC_I8259 is not set
225# CONFIG_PPC_RTAS is not set
226# CONFIG_MMIO_NVRAM is not set
227# CONFIG_PPC_MPC106 is not set
228# CONFIG_PPC_970_NAP is not set
229# CONFIG_PPC_INDIRECT_IO is not set
230# CONFIG_GENERIC_IOMAP is not set
231# CONFIG_CPU_FREQ is not set
232# CONFIG_TAU is not set
233# CONFIG_FSL_ULI1575 is not set
234# CONFIG_SIMPLE_GPIO is not set
235
236#
237# Kernel options
238#
239# CONFIG_HIGHMEM is not set
240# CONFIG_NO_HZ is not set
241# CONFIG_HIGH_RES_TIMERS is not set
242CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
243# CONFIG_HZ_100 is not set
244CONFIG_HZ_250=y
245# CONFIG_HZ_300 is not set
246# CONFIG_HZ_1000 is not set
247CONFIG_HZ=250
248# CONFIG_SCHED_HRTICK is not set
249# CONFIG_PREEMPT_NONE is not set
250# CONFIG_PREEMPT_VOLUNTARY is not set
251CONFIG_PREEMPT=y
252CONFIG_BINFMT_ELF=y
253# CONFIG_HAVE_AOUT is not set
254CONFIG_BINFMT_MISC=m
255# CONFIG_IOMMU_HELPER is not set
256# CONFIG_SWIOTLB is not set
257CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
258CONFIG_ARCH_HAS_WALK_MEMORY=y
259CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
260CONFIG_KEXEC=y
261# CONFIG_CRASH_DUMP is not set
262CONFIG_MAX_ACTIVE_REGIONS=32
263CONFIG_ARCH_FLATMEM_ENABLE=y
264CONFIG_ARCH_POPULATES_NODE_MAP=y
265CONFIG_SELECT_MEMORY_MODEL=y
266CONFIG_FLATMEM_MANUAL=y
267# CONFIG_DISCONTIGMEM_MANUAL is not set
268# CONFIG_SPARSEMEM_MANUAL is not set
269CONFIG_FLATMEM=y
270CONFIG_FLAT_NODE_MEM_MAP=y
271CONFIG_PAGEFLAGS_EXTENDED=y
272CONFIG_SPLIT_PTLOCK_CPUS=4
273# CONFIG_MIGRATION is not set
274# CONFIG_PHYS_ADDR_T_64BIT is not set
275CONFIG_ZONE_DMA_FLAG=1
276CONFIG_BOUNCE=y
277CONFIG_VIRT_TO_BUS=y
278CONFIG_HAVE_MLOCK=y
279CONFIG_HAVE_MLOCKED_PAGE_BIT=y
280# CONFIG_KSM is not set
281CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
282CONFIG_PPC_4K_PAGES=y
283# CONFIG_PPC_16K_PAGES is not set
284# CONFIG_PPC_64K_PAGES is not set
285# CONFIG_PPC_256K_PAGES is not set
286CONFIG_FORCE_MAX_ZONEORDER=11
287CONFIG_PROC_DEVICETREE=y
288# CONFIG_CMDLINE_BOOL is not set
289CONFIG_EXTRA_TARGETS=""
290# CONFIG_PM is not set
291# CONFIG_SECCOMP is not set
292CONFIG_ISA_DMA_API=y
293
294#
295# Bus options
296#
297CONFIG_ZONE_DMA=y
298CONFIG_GENERIC_ISA_DMA=y
299# CONFIG_PCI is not set
300# CONFIG_PCI_DOMAINS is not set
301# CONFIG_PCI_SYSCALL is not set
302# CONFIG_ARCH_SUPPORTS_MSI is not set
303# CONFIG_PCCARD is not set
304# CONFIG_HAS_RAPIDIO is not set
305
306#
307# Advanced setup
308#
309CONFIG_ADVANCED_OPTIONS=y
310# CONFIG_LOWMEM_SIZE_BOOL is not set
311CONFIG_LOWMEM_SIZE=0x30000000
312# CONFIG_PAGE_OFFSET_BOOL is not set
313CONFIG_PAGE_OFFSET=0xc0000000
314# CONFIG_KERNEL_START_BOOL is not set
315CONFIG_KERNEL_START=0xc0000000
316CONFIG_PHYSICAL_START=0x00000000
317# CONFIG_TASK_SIZE_BOOL is not set
318CONFIG_TASK_SIZE=0xc0000000
319# CONFIG_CONSISTENT_SIZE_BOOL is not set
320CONFIG_CONSISTENT_SIZE=0x00200000
321CONFIG_NET=y
322
323#
324# Networking options
325#
326CONFIG_PACKET=y
327# CONFIG_PACKET_MMAP is not set
328CONFIG_UNIX=y
329# CONFIG_NET_KEY is not set
330CONFIG_INET=y
331# CONFIG_IP_MULTICAST is not set
332# CONFIG_IP_ADVANCED_ROUTER is not set
333CONFIG_IP_FIB_HASH=y
334CONFIG_IP_PNP=y
335CONFIG_IP_PNP_DHCP=y
336# CONFIG_IP_PNP_BOOTP is not set
337CONFIG_IP_PNP_RARP=y
338# CONFIG_NET_IPIP is not set
339# CONFIG_NET_IPGRE is not set
340# CONFIG_ARPD is not set
341# CONFIG_SYN_COOKIES is not set
342# CONFIG_INET_AH is not set
343# CONFIG_INET_ESP is not set
344# CONFIG_INET_IPCOMP is not set
345# CONFIG_INET_XFRM_TUNNEL is not set
346# CONFIG_INET_TUNNEL is not set
347# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
348# CONFIG_INET_XFRM_MODE_TUNNEL is not set
349# CONFIG_INET_XFRM_MODE_BEET is not set
350# CONFIG_INET_LRO is not set
351# CONFIG_INET_DIAG is not set
352# CONFIG_TCP_CONG_ADVANCED is not set
353CONFIG_TCP_CONG_CUBIC=y
354CONFIG_DEFAULT_TCP_CONG="cubic"
355# CONFIG_TCP_MD5SIG is not set
356# CONFIG_IPV6 is not set
357# CONFIG_NETWORK_SECMARK is not set
358# CONFIG_NETFILTER is not set
359# CONFIG_IP_DCCP is not set
360# CONFIG_IP_SCTP is not set
361# CONFIG_RDS is not set
362# CONFIG_TIPC is not set
363# CONFIG_ATM is not set
364# CONFIG_BRIDGE is not set
365# CONFIG_NET_DSA is not set
366# CONFIG_VLAN_8021Q is not set
367# CONFIG_DECNET is not set
368# CONFIG_LLC2 is not set
369# CONFIG_IPX is not set
370# CONFIG_ATALK is not set
371# CONFIG_X25 is not set
372# CONFIG_LAPB is not set
373# CONFIG_ECONET is not set
374# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
377# CONFIG_NET_SCHED is not set
378# CONFIG_DCB is not set
379
380#
381# Network testing
382#
383# CONFIG_NET_PKTGEN is not set
384# CONFIG_NET_DROP_MONITOR is not set
385# CONFIG_HAMRADIO is not set
386# CONFIG_CAN is not set
387# CONFIG_IRDA is not set
388# CONFIG_BT is not set
389# CONFIG_AF_RXRPC is not set
390# CONFIG_WIRELESS is not set
391# CONFIG_WIMAX is not set
392# CONFIG_RFKILL is not set
393# CONFIG_NET_9P is not set
394
395#
396# Device Drivers
397#
398
399#
400# Generic Driver Options
401#
402CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
403# CONFIG_DEVTMPFS is not set
404# CONFIG_STANDALONE is not set
405CONFIG_PREVENT_FIRMWARE_BUILD=y
406# CONFIG_FW_LOADER is not set
407# CONFIG_DEBUG_DRIVER is not set
408# CONFIG_DEBUG_DEVRES is not set
409# CONFIG_SYS_HYPERVISOR is not set
410# CONFIG_CONNECTOR is not set
411# CONFIG_MTD is not set
412CONFIG_OF_DEVICE=y
413# CONFIG_PARPORT is not set
414CONFIG_BLK_DEV=y
415# CONFIG_BLK_DEV_FD is not set
416# CONFIG_BLK_DEV_COW_COMMON is not set
417CONFIG_BLK_DEV_LOOP=y
418# CONFIG_BLK_DEV_CRYPTOLOOP is not set
419CONFIG_BLK_DEV_NBD=m
420CONFIG_BLK_DEV_RAM=y
421CONFIG_BLK_DEV_RAM_COUNT=2
422CONFIG_BLK_DEV_RAM_SIZE=4096
423# CONFIG_BLK_DEV_XIP is not set
424# CONFIG_CDROM_PKTCDVD is not set
425# CONFIG_ATA_OVER_ETH is not set
426# CONFIG_BLK_DEV_HD is not set
427CONFIG_MISC_DEVICES=y
428# CONFIG_ENCLOSURE_SERVICES is not set
429# CONFIG_C2PORT is not set
430
431#
432# EEPROM support
433#
434# CONFIG_EEPROM_93CX6 is not set
435CONFIG_HAVE_IDE=y
436# CONFIG_IDE is not set
437
438#
439# SCSI device support
440#
441# CONFIG_RAID_ATTRS is not set
442# CONFIG_SCSI is not set
443# CONFIG_SCSI_DMA is not set
444# CONFIG_SCSI_NETLINK is not set
445# CONFIG_ATA is not set
446# CONFIG_MD is not set
447# CONFIG_MACINTOSH_DRIVERS is not set
448CONFIG_NETDEVICES=y
449# CONFIG_DUMMY is not set
450# CONFIG_BONDING is not set
451# CONFIG_MACVLAN is not set
452# CONFIG_EQUALIZER is not set
453# CONFIG_TUN is not set
454# CONFIG_VETH is not set
455# CONFIG_PHYLIB is not set
456CONFIG_NET_ETHERNET=y
457# CONFIG_MII is not set
458# CONFIG_ETHOC is not set
459# CONFIG_DNET is not set
460# CONFIG_IBM_NEW_EMAC_ZMII is not set
461# CONFIG_IBM_NEW_EMAC_RGMII is not set
462# CONFIG_IBM_NEW_EMAC_TAH is not set
463# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
464# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
465# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
466# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
467# CONFIG_B44 is not set
468# CONFIG_KS8842 is not set
469# CONFIG_KS8851_MLL is not set
470# CONFIG_XILINX_EMACLITE is not set
471# CONFIG_NETDEV_1000 is not set
472# CONFIG_NETDEV_10000 is not set
473# CONFIG_WLAN is not set
474
475#
476# Enable WiMAX (Networking options) to see the WiMAX drivers
477#
478# CONFIG_WAN is not set
479# CONFIG_PPP is not set
480# CONFIG_SLIP is not set
481# CONFIG_NETCONSOLE is not set
482# CONFIG_NETPOLL is not set
483# CONFIG_NET_POLL_CONTROLLER is not set
484# CONFIG_ISDN is not set
485# CONFIG_PHONE is not set
486
487#
488# Input device support
489#
490CONFIG_INPUT=y
491CONFIG_INPUT_FF_MEMLESS=m
492# CONFIG_INPUT_POLLDEV is not set
493
494#
495# Userland interfaces
496#
497# CONFIG_INPUT_MOUSEDEV is not set
498CONFIG_INPUT_JOYDEV=y
499CONFIG_INPUT_EVDEV=y
500# CONFIG_INPUT_EVBUG is not set
501
502#
503# Input Device Drivers
504#
505CONFIG_INPUT_KEYBOARD=y
506# CONFIG_KEYBOARD_ATKBD is not set
507# CONFIG_KEYBOARD_LKKBD is not set
508# CONFIG_KEYBOARD_NEWTON is not set
509# CONFIG_KEYBOARD_OPENCORES is not set
510# CONFIG_KEYBOARD_STOWAWAY is not set
511# CONFIG_KEYBOARD_SUNKBD is not set
512# CONFIG_KEYBOARD_XTKBD is not set
513# CONFIG_INPUT_MOUSE is not set
514CONFIG_INPUT_JOYSTICK=y
515# CONFIG_JOYSTICK_ANALOG is not set
516# CONFIG_JOYSTICK_A3D is not set
517# CONFIG_JOYSTICK_ADI is not set
518# CONFIG_JOYSTICK_COBRA is not set
519# CONFIG_JOYSTICK_GF2K is not set
520# CONFIG_JOYSTICK_GRIP is not set
521# CONFIG_JOYSTICK_GRIP_MP is not set
522# CONFIG_JOYSTICK_GUILLEMOT is not set
523# CONFIG_JOYSTICK_INTERACT is not set
524# CONFIG_JOYSTICK_SIDEWINDER is not set
525# CONFIG_JOYSTICK_TMDC is not set
526# CONFIG_JOYSTICK_IFORCE is not set
527# CONFIG_JOYSTICK_WARRIOR is not set
528# CONFIG_JOYSTICK_MAGELLAN is not set
529# CONFIG_JOYSTICK_SPACEORB is not set
530# CONFIG_JOYSTICK_SPACEBALL is not set
531# CONFIG_JOYSTICK_STINGER is not set
532# CONFIG_JOYSTICK_TWIDJOY is not set
533# CONFIG_JOYSTICK_ZHENHUA is not set
534# CONFIG_JOYSTICK_JOYDUMP is not set
535# CONFIG_INPUT_TABLET is not set
536# CONFIG_INPUT_TOUCHSCREEN is not set
537# CONFIG_INPUT_MISC is not set
538
539#
540# Hardware I/O ports
541#
542CONFIG_SERIO=y
543# CONFIG_SERIO_I8042 is not set
544# CONFIG_SERIO_SERPORT is not set
545# CONFIG_SERIO_LIBPS2 is not set
546# CONFIG_SERIO_RAW is not set
547# CONFIG_SERIO_XILINX_XPS_PS2 is not set
548# CONFIG_GAMEPORT is not set
549
550#
551# Character devices
552#
553CONFIG_VT=y
554CONFIG_CONSOLE_TRANSLATIONS=y
555CONFIG_VT_CONSOLE=y
556CONFIG_HW_CONSOLE=y
557# CONFIG_VT_HW_CONSOLE_BINDING is not set
558# CONFIG_DEVKMEM is not set
559# CONFIG_SERIAL_NONSTANDARD is not set
560
561#
562# Serial drivers
563#
564# CONFIG_SERIAL_8250 is not set
565
566#
567# Non-8250 serial port support
568#
569# CONFIG_SERIAL_UARTLITE is not set
570CONFIG_UNIX98_PTYS=y
571# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
572CONFIG_LEGACY_PTYS=y
573CONFIG_LEGACY_PTY_COUNT=64
574# CONFIG_HVC_UDBG is not set
575# CONFIG_IPMI_HANDLER is not set
576# CONFIG_HW_RANDOM is not set
577# CONFIG_NVRAM is not set
578# CONFIG_R3964 is not set
579# CONFIG_RAW_DRIVER is not set
580# CONFIG_TCG_TPM is not set
581# CONFIG_I2C is not set
582# CONFIG_SPI is not set
583
584#
585# PPS support
586#
587# CONFIG_PPS is not set
588CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
589# CONFIG_GPIOLIB is not set
590# CONFIG_W1 is not set
591# CONFIG_POWER_SUPPLY is not set
592# CONFIG_HWMON is not set
593# CONFIG_THERMAL is not set
594# CONFIG_WATCHDOG is not set
595CONFIG_SSB_POSSIBLE=y
596
597#
598# Sonics Silicon Backplane
599#
600# CONFIG_SSB is not set
601
602#
603# Multifunction device drivers
604#
605# CONFIG_MFD_CORE is not set
606# CONFIG_MFD_SM501 is not set
607# CONFIG_HTC_PASIC3 is not set
608# CONFIG_MFD_TMIO is not set
609# CONFIG_REGULATOR is not set
610# CONFIG_MEDIA_SUPPORT is not set
611
612#
613# Graphics support
614#
615# CONFIG_VGASTATE is not set
616# CONFIG_VIDEO_OUTPUT_CONTROL is not set
617CONFIG_FB=y
618# CONFIG_FIRMWARE_EDID is not set
619# CONFIG_FB_DDC is not set
620# CONFIG_FB_BOOT_VESA_SUPPORT is not set
621# CONFIG_FB_CFB_FILLRECT is not set
622# CONFIG_FB_CFB_COPYAREA is not set
623# CONFIG_FB_CFB_IMAGEBLIT is not set
624# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
625# CONFIG_FB_SYS_FILLRECT is not set
626# CONFIG_FB_SYS_COPYAREA is not set
627# CONFIG_FB_SYS_IMAGEBLIT is not set
628# CONFIG_FB_FOREIGN_ENDIAN is not set
629# CONFIG_FB_SYS_FOPS is not set
630# CONFIG_FB_SVGALIB is not set
631# CONFIG_FB_MACMODES is not set
632# CONFIG_FB_BACKLIGHT is not set
633# CONFIG_FB_MODE_HELPERS is not set
634# CONFIG_FB_TILEBLITTING is not set
635
636#
637# Frame buffer hardware drivers
638#
639# CONFIG_FB_OF is not set
640# CONFIG_FB_VGA16 is not set
641# CONFIG_FB_S1D13XXX is not set
642# CONFIG_FB_IBM_GXT4500 is not set
643# CONFIG_FB_VIRTUAL is not set
644# CONFIG_FB_METRONOME is not set
645# CONFIG_FB_MB862XX is not set
646# CONFIG_FB_BROADSHEET is not set
647# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
648
649#
650# Display device support
651#
652# CONFIG_DISPLAY_SUPPORT is not set
653
654#
655# Console display driver support
656#
657# CONFIG_VGA_CONSOLE is not set
658CONFIG_DUMMY_CONSOLE=y
659CONFIG_FRAMEBUFFER_CONSOLE=y
660# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
661# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
662# CONFIG_FONTS is not set
663CONFIG_FONT_8x8=y
664CONFIG_FONT_8x16=y
665CONFIG_LOGO=y
666# CONFIG_LOGO_LINUX_MONO is not set
667# CONFIG_LOGO_LINUX_VGA16 is not set
668# CONFIG_LOGO_LINUX_CLUT224 is not set
669CONFIG_SOUND=y
670CONFIG_SOUND_OSS_CORE=y
671CONFIG_SOUND_OSS_CORE_PRECLAIM=y
672CONFIG_SND=y
673CONFIG_SND_TIMER=y
674CONFIG_SND_PCM=y
675CONFIG_SND_SEQUENCER=y
676# CONFIG_SND_SEQ_DUMMY is not set
677CONFIG_SND_OSSEMUL=y
678CONFIG_SND_MIXER_OSS=y
679CONFIG_SND_PCM_OSS=y
680CONFIG_SND_PCM_OSS_PLUGINS=y
681CONFIG_SND_SEQUENCER_OSS=y
682# CONFIG_SND_DYNAMIC_MINORS is not set
683CONFIG_SND_SUPPORT_OLD_API=y
684# CONFIG_SND_VERBOSE_PROCFS is not set
685# CONFIG_SND_VERBOSE_PRINTK is not set
686# CONFIG_SND_DEBUG is not set
687# CONFIG_SND_RAWMIDI_SEQ is not set
688# CONFIG_SND_OPL3_LIB_SEQ is not set
689# CONFIG_SND_OPL4_LIB_SEQ is not set
690# CONFIG_SND_SBAWE_SEQ is not set
691# CONFIG_SND_EMU10K1_SEQ is not set
692CONFIG_SND_DRIVERS=y
693# CONFIG_SND_DUMMY is not set
694# CONFIG_SND_VIRMIDI is not set
695# CONFIG_SND_MTPAV is not set
696# CONFIG_SND_SERIAL_U16550 is not set
697# CONFIG_SND_MPU401 is not set
698CONFIG_SND_PPC=y
699# CONFIG_SND_SOC is not set
700# CONFIG_SOUND_PRIME is not set
701CONFIG_HID_SUPPORT=y
702CONFIG_HID=y
703# CONFIG_HIDRAW is not set
704# CONFIG_HID_PID is not set
705
706#
707# Special HID drivers
708#
709# CONFIG_USB_SUPPORT is not set
710# CONFIG_MMC is not set
711# CONFIG_MEMSTICK is not set
712# CONFIG_NEW_LEDS is not set
713# CONFIG_ACCESSIBILITY is not set
714# CONFIG_EDAC is not set
715CONFIG_RTC_LIB=y
716CONFIG_RTC_CLASS=y
717CONFIG_RTC_HCTOSYS=y
718CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
719# CONFIG_RTC_DEBUG is not set
720
721#
722# RTC interfaces
723#
724CONFIG_RTC_INTF_SYSFS=y
725CONFIG_RTC_INTF_PROC=y
726CONFIG_RTC_INTF_DEV=y
727# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
728# CONFIG_RTC_DRV_TEST is not set
729
730#
731# SPI RTC drivers
732#
733
734#
735# Platform RTC drivers
736#
737# CONFIG_RTC_DRV_CMOS is not set
738# CONFIG_RTC_DRV_DS1286 is not set
739# CONFIG_RTC_DRV_DS1511 is not set
740# CONFIG_RTC_DRV_DS1553 is not set
741# CONFIG_RTC_DRV_DS1742 is not set
742# CONFIG_RTC_DRV_STK17TA8 is not set
743# CONFIG_RTC_DRV_M48T86 is not set
744# CONFIG_RTC_DRV_M48T35 is not set
745# CONFIG_RTC_DRV_M48T59 is not set
746# CONFIG_RTC_DRV_BQ4802 is not set
747# CONFIG_RTC_DRV_V3020 is not set
748
749#
750# on-CPU RTC drivers
751#
752CONFIG_RTC_DRV_GENERIC=y
753# CONFIG_DMADEVICES is not set
754# CONFIG_AUXDISPLAY is not set
755# CONFIG_UIO is not set
756
757#
758# TI VLYNQ
759#
760# CONFIG_STAGING is not set
761
762#
763# File systems
764#
765CONFIG_EXT2_FS=y
766# CONFIG_EXT2_FS_XATTR is not set
767# CONFIG_EXT2_FS_XIP is not set
768CONFIG_EXT3_FS=y
769# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
770# CONFIG_EXT3_FS_XATTR is not set
771# CONFIG_EXT4_FS is not set
772CONFIG_JBD=y
773# CONFIG_JBD_DEBUG is not set
774# CONFIG_REISERFS_FS is not set
775# CONFIG_JFS_FS is not set
776# CONFIG_FS_POSIX_ACL is not set
777# CONFIG_XFS_FS is not set
778# CONFIG_GFS2_FS is not set
779# CONFIG_OCFS2_FS is not set
780# CONFIG_BTRFS_FS is not set
781# CONFIG_NILFS2_FS is not set
782CONFIG_FILE_LOCKING=y
783CONFIG_FSNOTIFY=y
784CONFIG_DNOTIFY=y
785CONFIG_INOTIFY=y
786CONFIG_INOTIFY_USER=y
787# CONFIG_QUOTA is not set
788# CONFIG_AUTOFS_FS is not set
789# CONFIG_AUTOFS4_FS is not set
790# CONFIG_FUSE_FS is not set
791
792#
793# Caches
794#
795# CONFIG_FSCACHE is not set
796
797#
798# CD-ROM/DVD Filesystems
799#
800CONFIG_ISO9660_FS=y
801CONFIG_JOLIET=y
802# CONFIG_ZISOFS is not set
803# CONFIG_UDF_FS is not set
804
805#
806# DOS/FAT/NT Filesystems
807#
808CONFIG_FAT_FS=y
809CONFIG_MSDOS_FS=y
810CONFIG_VFAT_FS=y
811CONFIG_FAT_DEFAULT_CODEPAGE=437
812CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
813# CONFIG_NTFS_FS is not set
814
815#
816# Pseudo filesystems
817#
818CONFIG_PROC_FS=y
819CONFIG_PROC_KCORE=y
820CONFIG_PROC_SYSCTL=y
821# CONFIG_PROC_PAGE_MONITOR is not set
822CONFIG_SYSFS=y
823CONFIG_TMPFS=y
824# CONFIG_TMPFS_POSIX_ACL is not set
825# CONFIG_HUGETLB_PAGE is not set
826# CONFIG_CONFIGFS_FS is not set
827CONFIG_MISC_FILESYSTEMS=y
828# CONFIG_ADFS_FS is not set
829# CONFIG_AFFS_FS is not set
830# CONFIG_HFS_FS is not set
831# CONFIG_HFSPLUS_FS is not set
832# CONFIG_BEFS_FS is not set
833# CONFIG_BFS_FS is not set
834# CONFIG_EFS_FS is not set
835# CONFIG_CRAMFS is not set
836# CONFIG_SQUASHFS is not set
837# CONFIG_VXFS_FS is not set
838# CONFIG_MINIX_FS is not set
839# CONFIG_OMFS_FS is not set
840# CONFIG_HPFS_FS is not set
841# CONFIG_QNX4FS_FS is not set
842# CONFIG_ROMFS_FS is not set
843# CONFIG_SYSV_FS is not set
844# CONFIG_UFS_FS is not set
845CONFIG_NETWORK_FILESYSTEMS=y
846CONFIG_NFS_FS=y
847CONFIG_NFS_V3=y
848# CONFIG_NFS_V3_ACL is not set
849# CONFIG_NFS_V4 is not set
850CONFIG_ROOT_NFS=y
851# CONFIG_NFSD is not set
852CONFIG_LOCKD=y
853CONFIG_LOCKD_V4=y
854CONFIG_NFS_COMMON=y
855CONFIG_SUNRPC=y
856# CONFIG_RPCSEC_GSS_KRB5 is not set
857# CONFIG_RPCSEC_GSS_SPKM3 is not set
858# CONFIG_SMB_FS is not set
859CONFIG_CIFS=y
860# CONFIG_CIFS_STATS is not set
861# CONFIG_CIFS_WEAK_PW_HASH is not set
862# CONFIG_CIFS_XATTR is not set
863# CONFIG_CIFS_DEBUG2 is not set
864# CONFIG_CIFS_EXPERIMENTAL is not set
865# CONFIG_NCP_FS is not set
866# CONFIG_CODA_FS is not set
867# CONFIG_AFS_FS is not set
868
869#
870# Partition Types
871#
872# CONFIG_PARTITION_ADVANCED is not set
873CONFIG_MSDOS_PARTITION=y
874CONFIG_NLS=y
875CONFIG_NLS_DEFAULT="iso8859-1"
876CONFIG_NLS_CODEPAGE_437=y
877# CONFIG_NLS_CODEPAGE_737 is not set
878# CONFIG_NLS_CODEPAGE_775 is not set
879# CONFIG_NLS_CODEPAGE_850 is not set
880# CONFIG_NLS_CODEPAGE_852 is not set
881# CONFIG_NLS_CODEPAGE_855 is not set
882# CONFIG_NLS_CODEPAGE_857 is not set
883# CONFIG_NLS_CODEPAGE_860 is not set
884# CONFIG_NLS_CODEPAGE_861 is not set
885# CONFIG_NLS_CODEPAGE_862 is not set
886# CONFIG_NLS_CODEPAGE_863 is not set
887# CONFIG_NLS_CODEPAGE_864 is not set
888# CONFIG_NLS_CODEPAGE_865 is not set
889# CONFIG_NLS_CODEPAGE_866 is not set
890# CONFIG_NLS_CODEPAGE_869 is not set
891# CONFIG_NLS_CODEPAGE_936 is not set
892# CONFIG_NLS_CODEPAGE_950 is not set
893# CONFIG_NLS_CODEPAGE_932 is not set
894# CONFIG_NLS_CODEPAGE_949 is not set
895# CONFIG_NLS_CODEPAGE_874 is not set
896# CONFIG_NLS_ISO8859_8 is not set
897# CONFIG_NLS_CODEPAGE_1250 is not set
898# CONFIG_NLS_CODEPAGE_1251 is not set
899# CONFIG_NLS_ASCII is not set
900CONFIG_NLS_ISO8859_1=y
901# CONFIG_NLS_ISO8859_2 is not set
902# CONFIG_NLS_ISO8859_3 is not set
903# CONFIG_NLS_ISO8859_4 is not set
904# CONFIG_NLS_ISO8859_5 is not set
905# CONFIG_NLS_ISO8859_6 is not set
906# CONFIG_NLS_ISO8859_7 is not set
907# CONFIG_NLS_ISO8859_9 is not set
908# CONFIG_NLS_ISO8859_13 is not set
909# CONFIG_NLS_ISO8859_14 is not set
910# CONFIG_NLS_ISO8859_15 is not set
911# CONFIG_NLS_KOI8_R is not set
912# CONFIG_NLS_KOI8_U is not set
913# CONFIG_NLS_UTF8 is not set
914# CONFIG_DLM is not set
915CONFIG_BINARY_PRINTF=y
916
917#
918# Library routines
919#
920CONFIG_BITREVERSE=y
921CONFIG_GENERIC_FIND_LAST_BIT=y
922CONFIG_CRC_CCITT=y
923# CONFIG_CRC16 is not set
924# CONFIG_CRC_T10DIF is not set
925# CONFIG_CRC_ITU_T is not set
926CONFIG_CRC32=y
927# CONFIG_CRC7 is not set
928# CONFIG_LIBCRC32C is not set
929CONFIG_ZLIB_INFLATE=y
930CONFIG_DECOMPRESS_GZIP=y
931CONFIG_HAS_IOMEM=y
932CONFIG_HAS_IOPORT=y
933CONFIG_HAS_DMA=y
934CONFIG_HAVE_LMB=y
935CONFIG_NLATTR=y
936CONFIG_GENERIC_ATOMIC64=y
937
938#
939# Kernel hacking
940#
941CONFIG_PRINTK_TIME=y
942CONFIG_ENABLE_WARN_DEPRECATED=y
943CONFIG_ENABLE_MUST_CHECK=y
944CONFIG_FRAME_WARN=1024
945# CONFIG_MAGIC_SYSRQ is not set
946# CONFIG_STRIP_ASM_SYMS is not set
947# CONFIG_UNUSED_SYMBOLS is not set
948CONFIG_DEBUG_FS=y
949# CONFIG_HEADERS_CHECK is not set
950CONFIG_DEBUG_KERNEL=y
951# CONFIG_DEBUG_SHIRQ is not set
952CONFIG_DETECT_SOFTLOCKUP=y
953# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
954CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
955# CONFIG_DETECT_HUNG_TASK is not set
956CONFIG_SCHED_DEBUG=y
957CONFIG_SCHEDSTATS=y
958# CONFIG_TIMER_STATS is not set
959# CONFIG_DEBUG_OBJECTS is not set
960# CONFIG_DEBUG_SLAB is not set
961# CONFIG_DEBUG_KMEMLEAK is not set
962CONFIG_DEBUG_PREEMPT=y
963# CONFIG_DEBUG_RT_MUTEXES is not set
964# CONFIG_RT_MUTEX_TESTER is not set
965CONFIG_DEBUG_SPINLOCK=y
966CONFIG_DEBUG_MUTEXES=y
967# CONFIG_DEBUG_LOCK_ALLOC is not set
968# CONFIG_PROVE_LOCKING is not set
969# CONFIG_LOCK_STAT is not set
970CONFIG_DEBUG_SPINLOCK_SLEEP=y
971# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
972CONFIG_STACKTRACE=y
973# CONFIG_DEBUG_KOBJECT is not set
974CONFIG_DEBUG_BUGVERBOSE=y
975# CONFIG_DEBUG_INFO is not set
976# CONFIG_DEBUG_VM is not set
977# CONFIG_DEBUG_WRITECOUNT is not set
978# CONFIG_DEBUG_MEMORY_INIT is not set
979# CONFIG_DEBUG_LIST is not set
980# CONFIG_DEBUG_SG is not set
981# CONFIG_DEBUG_NOTIFIERS is not set
982# CONFIG_DEBUG_CREDENTIALS is not set
983# CONFIG_RCU_TORTURE_TEST is not set
984# CONFIG_RCU_CPU_STALL_DETECTOR is not set
985# CONFIG_BACKTRACE_SELF_TEST is not set
986# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
987# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
988# CONFIG_FAULT_INJECTION is not set
989CONFIG_LATENCYTOP=y
990CONFIG_SYSCTL_SYSCALL_CHECK=y
991# CONFIG_DEBUG_PAGEALLOC is not set
992CONFIG_NOP_TRACER=y
993CONFIG_HAVE_FUNCTION_TRACER=y
994CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
995CONFIG_HAVE_DYNAMIC_FTRACE=y
996CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
997CONFIG_TRACER_MAX_TRACE=y
998CONFIG_RING_BUFFER=y
999CONFIG_EVENT_TRACING=y
1000CONFIG_CONTEXT_SWITCH_TRACER=y
1001CONFIG_TRACING=y
1002CONFIG_GENERIC_TRACER=y
1003CONFIG_TRACING_SUPPORT=y
1004CONFIG_FTRACE=y
1005# CONFIG_FUNCTION_TRACER is not set
1006# CONFIG_IRQSOFF_TRACER is not set
1007# CONFIG_PREEMPT_TRACER is not set
1008CONFIG_SCHED_TRACER=y
1009CONFIG_BOOT_TRACER=y
1010CONFIG_BRANCH_PROFILE_NONE=y
1011# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1012# CONFIG_PROFILE_ALL_BRANCHES is not set
1013# CONFIG_STACK_TRACER is not set
1014# CONFIG_KMEMTRACE is not set
1015# CONFIG_WORKQUEUE_TRACER is not set
1016# CONFIG_BLK_DEV_IO_TRACE is not set
1017# CONFIG_FTRACE_STARTUP_TEST is not set
1018# CONFIG_RING_BUFFER_BENCHMARK is not set
1019# CONFIG_DYNAMIC_DEBUG is not set
1020CONFIG_DMA_API_DEBUG=y
1021# CONFIG_SAMPLES is not set
1022CONFIG_HAVE_ARCH_KGDB=y
1023# CONFIG_KGDB is not set
1024# CONFIG_PPC_DISABLE_WERROR is not set
1025CONFIG_PPC_WERROR=y
1026CONFIG_PRINT_STACK_DEPTH=64
1027# CONFIG_DEBUG_STACKOVERFLOW is not set
1028# CONFIG_DEBUG_STACK_USAGE is not set
1029# CONFIG_PPC_EMULATED_STATS is not set
1030# CONFIG_CODE_PATCHING_SELFTEST is not set
1031# CONFIG_FTR_FIXUP_SELFTEST is not set
1032# CONFIG_MSI_BITMAP_SELFTEST is not set
1033# CONFIG_XMON is not set
1034# CONFIG_IRQSTACKS is not set
1035# CONFIG_VIRQ_DEBUG is not set
1036# CONFIG_BDI_SWITCH is not set
1037# CONFIG_BOOTX_TEXT is not set
1038CONFIG_PPC_EARLY_DEBUG=y
1039# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1040# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1041# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1042# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1043# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1044# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1045# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1046# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
1047# CONFIG_PPC_EARLY_DEBUG_44x is not set
1048# CONFIG_PPC_EARLY_DEBUG_40x is not set
1049# CONFIG_PPC_EARLY_DEBUG_CPM is not set
1050CONFIG_PPC_EARLY_DEBUG_USBGECKO=y
1051
1052#
1053# Security options
1054#
1055# CONFIG_KEYS is not set
1056# CONFIG_SECURITY is not set
1057# CONFIG_SECURITYFS is not set
1058# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1059# CONFIG_CRYPTO is not set
1060# CONFIG_PPC_CLOCK is not set
1061# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index f925c555508e..76982c51a4c7 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -714,8 +714,8 @@ CONFIG_NETDEV_10000=y
714# CONFIG_BNX2X is not set 714# CONFIG_BNX2X is not set
715# CONFIG_QLGE is not set 715# CONFIG_QLGE is not set
716# CONFIG_SFC is not set 716# CONFIG_SFC is not set
717CONFIG_TR=y 717# CONFIG_TR is not set
718CONFIG_IBMOL=y 718# CONFIG_IBMOL is not set
719# CONFIG_3C359 is not set 719# CONFIG_3C359 is not set
720# CONFIG_TMS380TR is not set 720# CONFIG_TMS380TR is not set
721 721
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 252401824575..7b3804a6e363 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -304,11 +304,11 @@ CONFIG_TICK_ONESHOT=y
304CONFIG_NO_HZ=y 304CONFIG_NO_HZ=y
305CONFIG_HIGH_RES_TIMERS=y 305CONFIG_HIGH_RES_TIMERS=y
306CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 306CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
307# CONFIG_HZ_100 is not set 307CONFIG_HZ_100=y
308CONFIG_HZ_250=y 308# CONFIG_HZ_250 is not set
309# CONFIG_HZ_300 is not set 309# CONFIG_HZ_300 is not set
310# CONFIG_HZ_1000 is not set 310# CONFIG_HZ_1000 is not set
311CONFIG_HZ=250 311CONFIG_HZ=100
312CONFIG_SCHED_HRTICK=y 312CONFIG_SCHED_HRTICK=y
313CONFIG_PREEMPT_NONE=y 313CONFIG_PREEMPT_NONE=y
314# CONFIG_PREEMPT_VOLUNTARY is not set 314# CONFIG_PREEMPT_VOLUNTARY is not set
@@ -980,7 +980,7 @@ CONFIG_E100=y
980# CONFIG_SC92031 is not set 980# CONFIG_SC92031 is not set
981# CONFIG_ATL2 is not set 981# CONFIG_ATL2 is not set
982CONFIG_NETDEV_1000=y 982CONFIG_NETDEV_1000=y
983CONFIG_ACENIC=y 983CONFIG_ACENIC=m
984CONFIG_ACENIC_OMIT_TIGON_I=y 984CONFIG_ACENIC_OMIT_TIGON_I=y
985# CONFIG_DL2K is not set 985# CONFIG_DL2K is not set
986CONFIG_E1000=y 986CONFIG_E1000=y
@@ -1023,8 +1023,8 @@ CONFIG_PASEMI_MAC=y
1023# CONFIG_BNX2X is not set 1023# CONFIG_BNX2X is not set
1024# CONFIG_QLGE is not set 1024# CONFIG_QLGE is not set
1025# CONFIG_SFC is not set 1025# CONFIG_SFC is not set
1026CONFIG_TR=y 1026# CONFIG_TR is not set
1027CONFIG_IBMOL=y 1027# CONFIG_IBMOL is not set
1028# CONFIG_3C359 is not set 1028# CONFIG_3C359 is not set
1029# CONFIG_TMS380TR is not set 1029# CONFIG_TMS380TR is not set
1030 1030
@@ -1863,7 +1863,7 @@ CONFIG_HFSPLUS_FS=m
1863# CONFIG_BEFS_FS is not set 1863# CONFIG_BEFS_FS is not set
1864# CONFIG_BFS_FS is not set 1864# CONFIG_BFS_FS is not set
1865# CONFIG_EFS_FS is not set 1865# CONFIG_EFS_FS is not set
1866CONFIG_CRAMFS=y 1866CONFIG_CRAMFS=m
1867# CONFIG_VXFS_FS is not set 1867# CONFIG_VXFS_FS is not set
1868# CONFIG_MINIX_FS is not set 1868# CONFIG_MINIX_FS is not set
1869# CONFIG_OMFS_FS is not set 1869# CONFIG_OMFS_FS is not set
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig
index 18af46036258..8195f1650cbf 100644
--- a/arch/powerpc/configs/ppc64e_defconfig
+++ b/arch/powerpc/configs/ppc64e_defconfig
@@ -1008,8 +1008,8 @@ CONFIG_IXGB=m
1008# CONFIG_QLGE is not set 1008# CONFIG_QLGE is not set
1009# CONFIG_SFC is not set 1009# CONFIG_SFC is not set
1010# CONFIG_BE2NET is not set 1010# CONFIG_BE2NET is not set
1011CONFIG_TR=y 1011# CONFIG_TR is not set
1012CONFIG_IBMOL=y 1012# CONFIG_IBMOL is not set
1013# CONFIG_3C359 is not set 1013# CONFIG_3C359 is not set
1014# CONFIG_TMS380TR is not set 1014# CONFIG_TMS380TR is not set
1015CONFIG_WLAN=y 1015CONFIG_WLAN=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index c568329723b8..ca9ff9aad74a 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -230,11 +230,11 @@ CONFIG_TICK_ONESHOT=y
230CONFIG_NO_HZ=y 230CONFIG_NO_HZ=y
231CONFIG_HIGH_RES_TIMERS=y 231CONFIG_HIGH_RES_TIMERS=y
232CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 232CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
233# CONFIG_HZ_100 is not set 233CONFIG_HZ_100=y
234CONFIG_HZ_250=y 234# CONFIG_HZ_250 is not set
235# CONFIG_HZ_300 is not set 235# CONFIG_HZ_300 is not set
236# CONFIG_HZ_1000 is not set 236# CONFIG_HZ_1000 is not set
237CONFIG_HZ=250 237CONFIG_HZ=100
238CONFIG_SCHED_HRTICK=y 238CONFIG_SCHED_HRTICK=y
239CONFIG_PREEMPT_NONE=y 239CONFIG_PREEMPT_NONE=y
240# CONFIG_PREEMPT_VOLUNTARY is not set 240# CONFIG_PREEMPT_VOLUNTARY is not set
@@ -796,7 +796,7 @@ CONFIG_E100=y
796# CONFIG_NET_POCKET is not set 796# CONFIG_NET_POCKET is not set
797# CONFIG_ATL2 is not set 797# CONFIG_ATL2 is not set
798CONFIG_NETDEV_1000=y 798CONFIG_NETDEV_1000=y
799CONFIG_ACENIC=y 799CONFIG_ACENIC=m
800CONFIG_ACENIC_OMIT_TIGON_I=y 800CONFIG_ACENIC_OMIT_TIGON_I=y
801# CONFIG_DL2K is not set 801# CONFIG_DL2K is not set
802CONFIG_E1000=y 802CONFIG_E1000=y
@@ -834,8 +834,8 @@ CONFIG_S2IO=m
834# CONFIG_BNX2X is not set 834# CONFIG_BNX2X is not set
835# CONFIG_QLGE is not set 835# CONFIG_QLGE is not set
836# CONFIG_SFC is not set 836# CONFIG_SFC is not set
837CONFIG_TR=y 837# CONFIG_TR is not set
838CONFIG_IBMOL=y 838# CONFIG_IBMOL is not set
839# CONFIG_3C359 is not set 839# CONFIG_3C359 is not set
840# CONFIG_TMS380TR is not set 840# CONFIG_TMS380TR is not set
841 841
@@ -1494,7 +1494,7 @@ CONFIG_CONFIGFS_FS=m
1494# CONFIG_BEFS_FS is not set 1494# CONFIG_BEFS_FS is not set
1495# CONFIG_BFS_FS is not set 1495# CONFIG_BFS_FS is not set
1496# CONFIG_EFS_FS is not set 1496# CONFIG_EFS_FS is not set
1497CONFIG_CRAMFS=y 1497CONFIG_CRAMFS=m
1498# CONFIG_VXFS_FS is not set 1498# CONFIG_VXFS_FS is not set
1499# CONFIG_MINIX_FS is not set 1499# CONFIG_MINIX_FS is not set
1500# CONFIG_OMFS_FS is not set 1500# CONFIG_OMFS_FS is not set
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
new file mode 100644
index 000000000000..c386828c639a
--- /dev/null
+++ b/arch/powerpc/configs/wii_defconfig
@@ -0,0 +1,1406 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.32-rc8
4# Sun Nov 22 20:37:21 2009
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_PPC_BOOK3S_32=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_BOOK3S=y
18CONFIG_6xx=y
19CONFIG_PPC_FPU=y
20# CONFIG_ALTIVEC is not set
21CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC_HAVE_PMU_SUPPORT=y
25CONFIG_PPC_PERF_CTRS=y
26# CONFIG_SMP is not set
27CONFIG_NOT_COHERENT_CACHE=y
28CONFIG_PPC32=y
29CONFIG_WORD_SIZE=32
30# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
31CONFIG_MMU=y
32CONFIG_GENERIC_CMOS_UPDATE=y
33CONFIG_GENERIC_TIME=y
34CONFIG_GENERIC_TIME_VSYSCALL=y
35CONFIG_GENERIC_CLOCKEVENTS=y
36CONFIG_GENERIC_HARDIRQS=y
37CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
38# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
39# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
40CONFIG_IRQ_PER_CPU=y
41CONFIG_STACKTRACE_SUPPORT=y
42CONFIG_HAVE_LATENCYTOP_SUPPORT=y
43CONFIG_TRACE_IRQFLAGS_SUPPORT=y
44CONFIG_LOCKDEP_SUPPORT=y
45CONFIG_RWSEM_XCHGADD_ALGORITHM=y
46CONFIG_ARCH_HAS_ILOG2_U32=y
47CONFIG_GENERIC_HWEIGHT=y
48CONFIG_GENERIC_FIND_NEXT_BIT=y
49CONFIG_GENERIC_GPIO=y
50# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
51CONFIG_PPC=y
52CONFIG_EARLY_PRINTK=y
53CONFIG_GENERIC_NVRAM=y
54CONFIG_SCHED_OMIT_FRAME_POINTER=y
55CONFIG_ARCH_MAY_HAVE_PC_FDC=y
56CONFIG_PPC_OF=y
57CONFIG_OF=y
58# CONFIG_PPC_UDBG_16550 is not set
59# CONFIG_GENERIC_TBSYNC is not set
60CONFIG_AUDIT_ARCH=y
61CONFIG_GENERIC_BUG=y
62CONFIG_DTC=y
63# CONFIG_DEFAULT_UIMAGE is not set
64# CONFIG_PPC_DCR_NATIVE is not set
65# CONFIG_PPC_DCR_MMIO is not set
66CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
67CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
68CONFIG_CONSTRUCTORS=y
69
70#
71# General setup
72#
73CONFIG_EXPERIMENTAL=y
74CONFIG_BROKEN_ON_SMP=y
75CONFIG_LOCK_KERNEL=y
76CONFIG_INIT_ENV_ARG_LIMIT=32
77CONFIG_LOCALVERSION="-wii"
78# CONFIG_LOCALVERSION_AUTO is not set
79CONFIG_SWAP=y
80CONFIG_SYSVIPC=y
81CONFIG_SYSVIPC_SYSCTL=y
82# CONFIG_POSIX_MQUEUE is not set
83# CONFIG_BSD_PROCESS_ACCT is not set
84# CONFIG_TASKSTATS is not set
85# CONFIG_AUDIT is not set
86
87#
88# RCU Subsystem
89#
90CONFIG_TREE_RCU=y
91# CONFIG_TREE_PREEMPT_RCU is not set
92# CONFIG_RCU_TRACE is not set
93CONFIG_RCU_FANOUT=32
94# CONFIG_RCU_FANOUT_EXACT is not set
95# CONFIG_TREE_RCU_TRACE is not set
96CONFIG_IKCONFIG=y
97CONFIG_IKCONFIG_PROC=y
98CONFIG_LOG_BUF_SHIFT=14
99CONFIG_GROUP_SCHED=y
100CONFIG_FAIR_GROUP_SCHED=y
101# CONFIG_RT_GROUP_SCHED is not set
102CONFIG_USER_SCHED=y
103# CONFIG_CGROUP_SCHED is not set
104# CONFIG_CGROUPS is not set
105CONFIG_SYSFS_DEPRECATED=y
106CONFIG_SYSFS_DEPRECATED_V2=y
107CONFIG_RELAY=y
108# CONFIG_NAMESPACES is not set
109CONFIG_BLK_DEV_INITRD=y
110CONFIG_INITRAMFS_SOURCE=""
111CONFIG_RD_GZIP=y
112# CONFIG_RD_BZIP2 is not set
113# CONFIG_RD_LZMA is not set
114# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
115CONFIG_SYSCTL=y
116CONFIG_ANON_INODES=y
117CONFIG_EMBEDDED=y
118CONFIG_SYSCTL_SYSCALL=y
119CONFIG_KALLSYMS=y
120CONFIG_KALLSYMS_ALL=y
121# CONFIG_KALLSYMS_EXTRA_PASS is not set
122CONFIG_HOTPLUG=y
123CONFIG_PRINTK=y
124CONFIG_BUG=y
125# CONFIG_ELF_CORE is not set
126CONFIG_BASE_FULL=y
127CONFIG_FUTEX=y
128CONFIG_EPOLL=y
129CONFIG_SIGNALFD=y
130CONFIG_TIMERFD=y
131CONFIG_EVENTFD=y
132CONFIG_SHMEM=y
133CONFIG_AIO=y
134CONFIG_HAVE_PERF_EVENTS=y
135
136#
137# Kernel Performance Events And Counters
138#
139CONFIG_PERF_EVENTS=y
140CONFIG_EVENT_PROFILE=y
141CONFIG_PERF_COUNTERS=y
142# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
143# CONFIG_VM_EVENT_COUNTERS is not set
144CONFIG_COMPAT_BRK=y
145CONFIG_SLAB=y
146# CONFIG_SLUB is not set
147# CONFIG_SLOB is not set
148# CONFIG_PROFILING is not set
149CONFIG_TRACEPOINTS=y
150CONFIG_HAVE_OPROFILE=y
151# CONFIG_KPROBES is not set
152CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
153CONFIG_HAVE_IOREMAP_PROT=y
154CONFIG_HAVE_KPROBES=y
155CONFIG_HAVE_KRETPROBES=y
156CONFIG_HAVE_ARCH_TRACEHOOK=y
157CONFIG_HAVE_DMA_ATTRS=y
158CONFIG_HAVE_DMA_API_DEBUG=y
159
160#
161# GCOV-based kernel profiling
162#
163# CONFIG_GCOV_KERNEL is not set
164CONFIG_SLOW_WORK=y
165# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
166CONFIG_SLABINFO=y
167CONFIG_RT_MUTEXES=y
168CONFIG_BASE_SMALL=0
169CONFIG_MODULES=y
170# CONFIG_MODULE_FORCE_LOAD is not set
171CONFIG_MODULE_UNLOAD=y
172# CONFIG_MODULE_FORCE_UNLOAD is not set
173# CONFIG_MODVERSIONS is not set
174# CONFIG_MODULE_SRCVERSION_ALL is not set
175CONFIG_BLOCK=y
176CONFIG_LBDAF=y
177CONFIG_BLK_DEV_BSG=y
178# CONFIG_BLK_DEV_INTEGRITY is not set
179
180#
181# IO Schedulers
182#
183CONFIG_IOSCHED_NOOP=y
184CONFIG_IOSCHED_AS=y
185CONFIG_IOSCHED_DEADLINE=y
186CONFIG_IOSCHED_CFQ=y
187CONFIG_DEFAULT_AS=y
188# CONFIG_DEFAULT_DEADLINE is not set
189# CONFIG_DEFAULT_CFQ is not set
190# CONFIG_DEFAULT_NOOP is not set
191CONFIG_DEFAULT_IOSCHED="anticipatory"
192# CONFIG_FREEZER is not set
193
194#
195# Platform support
196#
197# CONFIG_PPC_CHRP is not set
198# CONFIG_MPC5121_ADS is not set
199# CONFIG_MPC5121_GENERIC is not set
200# CONFIG_PPC_MPC52xx is not set
201# CONFIG_PPC_PMAC is not set
202# CONFIG_PPC_CELL is not set
203# CONFIG_PPC_CELL_NATIVE is not set
204# CONFIG_PPC_82xx is not set
205# CONFIG_PQ2ADS is not set
206# CONFIG_PPC_83xx is not set
207# CONFIG_PPC_86xx is not set
208CONFIG_EMBEDDED6xx=y
209# CONFIG_LINKSTATION is not set
210# CONFIG_STORCENTER is not set
211# CONFIG_MPC7448HPC2 is not set
212# CONFIG_PPC_HOLLY is not set
213# CONFIG_PPC_PRPMC2800 is not set
214# CONFIG_PPC_C2K is not set
215CONFIG_GAMECUBE_COMMON=y
216CONFIG_USBGECKO_UDBG=y
217CONFIG_FLIPPER_PIC=y
218# CONFIG_GAMECUBE is not set
219CONFIG_HLWD_PIC=y
220CONFIG_STARLET_MINI=y
221CONFIG_WII=y
222# CONFIG_AMIGAONE is not set
223# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
224# CONFIG_IPIC is not set
225# CONFIG_MPIC is not set
226# CONFIG_MPIC_WEIRD is not set
227# CONFIG_PPC_I8259 is not set
228# CONFIG_PPC_RTAS is not set
229# CONFIG_MMIO_NVRAM is not set
230# CONFIG_PPC_MPC106 is not set
231# CONFIG_PPC_970_NAP is not set
232# CONFIG_PPC_INDIRECT_IO is not set
233# CONFIG_GENERIC_IOMAP is not set
234# CONFIG_CPU_FREQ is not set
235# CONFIG_TAU is not set
236# CONFIG_FSL_ULI1575 is not set
237# CONFIG_SIMPLE_GPIO is not set
238
239#
240# Kernel options
241#
242# CONFIG_HIGHMEM is not set
243# CONFIG_NO_HZ is not set
244# CONFIG_HIGH_RES_TIMERS is not set
245CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
246# CONFIG_HZ_100 is not set
247CONFIG_HZ_250=y
248# CONFIG_HZ_300 is not set
249# CONFIG_HZ_1000 is not set
250CONFIG_HZ=250
251# CONFIG_SCHED_HRTICK is not set
252# CONFIG_PREEMPT_NONE is not set
253# CONFIG_PREEMPT_VOLUNTARY is not set
254CONFIG_PREEMPT=y
255CONFIG_BINFMT_ELF=y
256# CONFIG_HAVE_AOUT is not set
257CONFIG_BINFMT_MISC=m
258# CONFIG_IOMMU_HELPER is not set
259# CONFIG_SWIOTLB is not set
260CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
261CONFIG_ARCH_HAS_WALK_MEMORY=y
262CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
263CONFIG_KEXEC=y
264# CONFIG_CRASH_DUMP is not set
265CONFIG_MAX_ACTIVE_REGIONS=32
266CONFIG_ARCH_FLATMEM_ENABLE=y
267CONFIG_ARCH_POPULATES_NODE_MAP=y
268CONFIG_SELECT_MEMORY_MODEL=y
269CONFIG_FLATMEM_MANUAL=y
270# CONFIG_DISCONTIGMEM_MANUAL is not set
271# CONFIG_SPARSEMEM_MANUAL is not set
272CONFIG_FLATMEM=y
273CONFIG_FLAT_NODE_MEM_MAP=y
274CONFIG_PAGEFLAGS_EXTENDED=y
275CONFIG_SPLIT_PTLOCK_CPUS=4
276# CONFIG_MIGRATION is not set
277# CONFIG_PHYS_ADDR_T_64BIT is not set
278CONFIG_ZONE_DMA_FLAG=1
279CONFIG_BOUNCE=y
280CONFIG_VIRT_TO_BUS=y
281CONFIG_HAVE_MLOCK=y
282CONFIG_HAVE_MLOCKED_PAGE_BIT=y
283# CONFIG_KSM is not set
284CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
285CONFIG_PPC_4K_PAGES=y
286# CONFIG_PPC_16K_PAGES is not set
287# CONFIG_PPC_64K_PAGES is not set
288# CONFIG_PPC_256K_PAGES is not set
289CONFIG_FORCE_MAX_ZONEORDER=11
290CONFIG_PROC_DEVICETREE=y
291# CONFIG_CMDLINE_BOOL is not set
292CONFIG_EXTRA_TARGETS=""
293# CONFIG_PM is not set
294# CONFIG_SECCOMP is not set
295CONFIG_ISA_DMA_API=y
296
297#
298# Bus options
299#
300CONFIG_ZONE_DMA=y
301CONFIG_GENERIC_ISA_DMA=y
302# CONFIG_PCI is not set
303# CONFIG_PCI_DOMAINS is not set
304# CONFIG_PCI_SYSCALL is not set
305# CONFIG_ARCH_SUPPORTS_MSI is not set
306# CONFIG_PCCARD is not set
307# CONFIG_HAS_RAPIDIO is not set
308
309#
310# Advanced setup
311#
312CONFIG_ADVANCED_OPTIONS=y
313# CONFIG_LOWMEM_SIZE_BOOL is not set
314CONFIG_LOWMEM_SIZE=0x30000000
315# CONFIG_PAGE_OFFSET_BOOL is not set
316CONFIG_PAGE_OFFSET=0xc0000000
317# CONFIG_KERNEL_START_BOOL is not set
318CONFIG_KERNEL_START=0xc0000000
319CONFIG_PHYSICAL_START=0x00000000
320# CONFIG_TASK_SIZE_BOOL is not set
321CONFIG_TASK_SIZE=0xc0000000
322# CONFIG_CONSISTENT_SIZE_BOOL is not set
323CONFIG_CONSISTENT_SIZE=0x00200000
324CONFIG_NET=y
325
326#
327# Networking options
328#
329CONFIG_PACKET=y
330# CONFIG_PACKET_MMAP is not set
331CONFIG_UNIX=y
332# CONFIG_NET_KEY is not set
333CONFIG_INET=y
334# CONFIG_IP_MULTICAST is not set
335# CONFIG_IP_ADVANCED_ROUTER is not set
336CONFIG_IP_FIB_HASH=y
337CONFIG_IP_PNP=y
338CONFIG_IP_PNP_DHCP=y
339# CONFIG_IP_PNP_BOOTP is not set
340CONFIG_IP_PNP_RARP=y
341# CONFIG_NET_IPIP is not set
342# CONFIG_NET_IPGRE is not set
343# CONFIG_ARPD is not set
344# CONFIG_SYN_COOKIES is not set
345# CONFIG_INET_AH is not set
346# CONFIG_INET_ESP is not set
347# CONFIG_INET_IPCOMP is not set
348# CONFIG_INET_XFRM_TUNNEL is not set
349# CONFIG_INET_TUNNEL is not set
350# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
351# CONFIG_INET_XFRM_MODE_TUNNEL is not set
352# CONFIG_INET_XFRM_MODE_BEET is not set
353# CONFIG_INET_LRO is not set
354# CONFIG_INET_DIAG is not set
355# CONFIG_TCP_CONG_ADVANCED is not set
356CONFIG_TCP_CONG_CUBIC=y
357CONFIG_DEFAULT_TCP_CONG="cubic"
358# CONFIG_TCP_MD5SIG is not set
359# CONFIG_IPV6 is not set
360# CONFIG_NETWORK_SECMARK is not set
361# CONFIG_NETFILTER is not set
362# CONFIG_IP_DCCP is not set
363# CONFIG_IP_SCTP is not set
364# CONFIG_RDS is not set
365# CONFIG_TIPC is not set
366# CONFIG_ATM is not set
367# CONFIG_BRIDGE is not set
368# CONFIG_NET_DSA is not set
369# CONFIG_VLAN_8021Q is not set
370# CONFIG_DECNET is not set
371# CONFIG_LLC2 is not set
372# CONFIG_IPX is not set
373# CONFIG_ATALK is not set
374# CONFIG_X25 is not set
375# CONFIG_LAPB is not set
376# CONFIG_ECONET is not set
377# CONFIG_WAN_ROUTER is not set
378# CONFIG_PHONET is not set
379# CONFIG_IEEE802154 is not set
380# CONFIG_NET_SCHED is not set
381# CONFIG_DCB is not set
382
383#
384# Network testing
385#
386# CONFIG_NET_PKTGEN is not set
387# CONFIG_NET_DROP_MONITOR is not set
388# CONFIG_HAMRADIO is not set
389# CONFIG_CAN is not set
390# CONFIG_IRDA is not set
391CONFIG_BT=y
392CONFIG_BT_L2CAP=y
393# CONFIG_BT_SCO is not set
394CONFIG_BT_RFCOMM=y
395# CONFIG_BT_RFCOMM_TTY is not set
396CONFIG_BT_BNEP=y
397CONFIG_BT_BNEP_MC_FILTER=y
398# CONFIG_BT_BNEP_PROTO_FILTER is not set
399CONFIG_BT_HIDP=y
400
401#
402# Bluetooth device drivers
403#
404# CONFIG_BT_HCIBTSDIO is not set
405# CONFIG_BT_HCIUART is not set
406# CONFIG_BT_HCIVHCI is not set
407# CONFIG_BT_MRVL is not set
408# CONFIG_AF_RXRPC is not set
409CONFIG_WIRELESS=y
410CONFIG_CFG80211=y
411# CONFIG_NL80211_TESTMODE is not set
412# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
413# CONFIG_CFG80211_REG_DEBUG is not set
414CONFIG_CFG80211_DEFAULT_PS=y
415CONFIG_CFG80211_DEFAULT_PS_VALUE=1
416# CONFIG_CFG80211_DEBUGFS is not set
417CONFIG_WIRELESS_OLD_REGULATORY=y
418CONFIG_WIRELESS_EXT=y
419CONFIG_WIRELESS_EXT_SYSFS=y
420# CONFIG_LIB80211 is not set
421CONFIG_MAC80211=y
422# CONFIG_MAC80211_RC_PID is not set
423CONFIG_MAC80211_RC_MINSTREL=y
424# CONFIG_MAC80211_RC_DEFAULT_PID is not set
425CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
426CONFIG_MAC80211_RC_DEFAULT="minstrel"
427# CONFIG_MAC80211_MESH is not set
428# CONFIG_MAC80211_LEDS is not set
429# CONFIG_MAC80211_DEBUGFS is not set
430# CONFIG_MAC80211_DEBUG_MENU is not set
431# CONFIG_WIMAX is not set
432# CONFIG_RFKILL is not set
433# CONFIG_NET_9P is not set
434
435#
436# Device Drivers
437#
438
439#
440# Generic Driver Options
441#
442CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
443# CONFIG_DEVTMPFS is not set
444# CONFIG_STANDALONE is not set
445CONFIG_PREVENT_FIRMWARE_BUILD=y
446CONFIG_FW_LOADER=y
447# CONFIG_FIRMWARE_IN_KERNEL is not set
448CONFIG_EXTRA_FIRMWARE=""
449# CONFIG_DEBUG_DRIVER is not set
450# CONFIG_DEBUG_DEVRES is not set
451# CONFIG_SYS_HYPERVISOR is not set
452# CONFIG_CONNECTOR is not set
453# CONFIG_MTD is not set
454CONFIG_OF_DEVICE=y
455CONFIG_OF_GPIO=y
456CONFIG_OF_I2C=y
457# CONFIG_PARPORT is not set
458CONFIG_BLK_DEV=y
459# CONFIG_BLK_DEV_FD is not set
460# CONFIG_BLK_DEV_COW_COMMON is not set
461CONFIG_BLK_DEV_LOOP=y
462# CONFIG_BLK_DEV_CRYPTOLOOP is not set
463# CONFIG_BLK_DEV_NBD is not set
464CONFIG_BLK_DEV_RAM=y
465CONFIG_BLK_DEV_RAM_COUNT=2
466CONFIG_BLK_DEV_RAM_SIZE=4096
467# CONFIG_BLK_DEV_XIP is not set
468# CONFIG_CDROM_PKTCDVD is not set
469# CONFIG_ATA_OVER_ETH is not set
470# CONFIG_BLK_DEV_HD is not set
471CONFIG_MISC_DEVICES=y
472# CONFIG_ICS932S401 is not set
473# CONFIG_ENCLOSURE_SERVICES is not set
474# CONFIG_ISL29003 is not set
475# CONFIG_C2PORT is not set
476
477#
478# EEPROM support
479#
480# CONFIG_EEPROM_AT24 is not set
481# CONFIG_EEPROM_LEGACY is not set
482# CONFIG_EEPROM_MAX6875 is not set
483# CONFIG_EEPROM_93CX6 is not set
484CONFIG_HAVE_IDE=y
485# CONFIG_IDE is not set
486
487#
488# SCSI device support
489#
490# CONFIG_RAID_ATTRS is not set
491CONFIG_SCSI=y
492CONFIG_SCSI_DMA=y
493# CONFIG_SCSI_TGT is not set
494# CONFIG_SCSI_NETLINK is not set
495CONFIG_SCSI_PROC_FS=y
496
497#
498# SCSI support type (disk, tape, CD-ROM)
499#
500CONFIG_BLK_DEV_SD=y
501# CONFIG_CHR_DEV_ST is not set
502# CONFIG_CHR_DEV_OSST is not set
503# CONFIG_BLK_DEV_SR is not set
504# CONFIG_CHR_DEV_SG is not set
505# CONFIG_CHR_DEV_SCH is not set
506CONFIG_SCSI_MULTI_LUN=y
507# CONFIG_SCSI_CONSTANTS is not set
508# CONFIG_SCSI_LOGGING is not set
509# CONFIG_SCSI_SCAN_ASYNC is not set
510CONFIG_SCSI_WAIT_SCAN=m
511
512#
513# SCSI Transports
514#
515# CONFIG_SCSI_SPI_ATTRS is not set
516# CONFIG_SCSI_FC_ATTRS is not set
517# CONFIG_SCSI_ISCSI_ATTRS is not set
518# CONFIG_SCSI_SAS_ATTRS is not set
519# CONFIG_SCSI_SAS_LIBSAS is not set
520# CONFIG_SCSI_SRP_ATTRS is not set
521CONFIG_SCSI_LOWLEVEL=y
522# CONFIG_ISCSI_TCP is not set
523# CONFIG_LIBFC is not set
524# CONFIG_LIBFCOE is not set
525# CONFIG_SCSI_DEBUG is not set
526# CONFIG_SCSI_DH is not set
527# CONFIG_SCSI_OSD_INITIATOR is not set
528# CONFIG_ATA is not set
529# CONFIG_MD is not set
530# CONFIG_MACINTOSH_DRIVERS is not set
531CONFIG_NETDEVICES=y
532# CONFIG_DUMMY is not set
533# CONFIG_BONDING is not set
534# CONFIG_MACVLAN is not set
535# CONFIG_EQUALIZER is not set
536# CONFIG_TUN is not set
537# CONFIG_VETH is not set
538# CONFIG_PHYLIB is not set
539CONFIG_NET_ETHERNET=y
540CONFIG_MII=y
541# CONFIG_ETHOC is not set
542# CONFIG_DNET is not set
543# CONFIG_IBM_NEW_EMAC_ZMII is not set
544# CONFIG_IBM_NEW_EMAC_RGMII is not set
545# CONFIG_IBM_NEW_EMAC_TAH is not set
546# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
547# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
548# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
549# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
550# CONFIG_B44 is not set
551# CONFIG_KS8842 is not set
552# CONFIG_KS8851_MLL is not set
553# CONFIG_XILINX_EMACLITE is not set
554# CONFIG_NETDEV_1000 is not set
555# CONFIG_NETDEV_10000 is not set
556CONFIG_WLAN=y
557# CONFIG_WLAN_PRE80211 is not set
558CONFIG_WLAN_80211=y
559# CONFIG_LIBERTAS is not set
560# CONFIG_LIBERTAS_THINFIRM is not set
561# CONFIG_MAC80211_HWSIM is not set
562# CONFIG_P54_COMMON is not set
563# CONFIG_ATH_COMMON is not set
564# CONFIG_HOSTAP is not set
565CONFIG_B43=y
566CONFIG_B43_SDIO=y
567CONFIG_B43_PIO=y
568# CONFIG_B43_PHY_LP is not set
569CONFIG_B43_DEBUG=y
570# CONFIG_B43_FORCE_PIO is not set
571# CONFIG_B43LEGACY is not set
572# CONFIG_RT2X00 is not set
573# CONFIG_WL12XX is not set
574# CONFIG_IWM is not set
575
576#
577# Enable WiMAX (Networking options) to see the WiMAX drivers
578#
579# CONFIG_WAN is not set
580# CONFIG_PPP is not set
581# CONFIG_SLIP is not set
582# CONFIG_NETCONSOLE is not set
583# CONFIG_NETPOLL is not set
584# CONFIG_NET_POLL_CONTROLLER is not set
585# CONFIG_ISDN is not set
586# CONFIG_PHONE is not set
587
588#
589# Input device support
590#
591CONFIG_INPUT=y
592CONFIG_INPUT_FF_MEMLESS=m
593# CONFIG_INPUT_POLLDEV is not set
594
595#
596# Userland interfaces
597#
598CONFIG_INPUT_MOUSEDEV=y
599# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
600CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
601CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
602CONFIG_INPUT_JOYDEV=y
603CONFIG_INPUT_EVDEV=y
604# CONFIG_INPUT_EVBUG is not set
605
606#
607# Input Device Drivers
608#
609CONFIG_INPUT_KEYBOARD=y
610# CONFIG_KEYBOARD_ADP5588 is not set
611# CONFIG_KEYBOARD_ATKBD is not set
612# CONFIG_QT2160 is not set
613# CONFIG_KEYBOARD_LKKBD is not set
614# CONFIG_KEYBOARD_GPIO is not set
615# CONFIG_KEYBOARD_MATRIX is not set
616# CONFIG_KEYBOARD_MAX7359 is not set
617# CONFIG_KEYBOARD_NEWTON is not set
618# CONFIG_KEYBOARD_OPENCORES is not set
619# CONFIG_KEYBOARD_STOWAWAY is not set
620# CONFIG_KEYBOARD_SUNKBD is not set
621# CONFIG_KEYBOARD_XTKBD is not set
622CONFIG_INPUT_MOUSE=y
623# CONFIG_MOUSE_PS2 is not set
624# CONFIG_MOUSE_SERIAL is not set
625# CONFIG_MOUSE_VSXXXAA is not set
626# CONFIG_MOUSE_GPIO is not set
627# CONFIG_MOUSE_SYNAPTICS_I2C is not set
628CONFIG_INPUT_JOYSTICK=y
629# CONFIG_JOYSTICK_ANALOG is not set
630# CONFIG_JOYSTICK_A3D is not set
631# CONFIG_JOYSTICK_ADI is not set
632# CONFIG_JOYSTICK_COBRA is not set
633# CONFIG_JOYSTICK_GF2K is not set
634# CONFIG_JOYSTICK_GRIP is not set
635# CONFIG_JOYSTICK_GRIP_MP is not set
636# CONFIG_JOYSTICK_GUILLEMOT is not set
637# CONFIG_JOYSTICK_INTERACT is not set
638# CONFIG_JOYSTICK_SIDEWINDER is not set
639# CONFIG_JOYSTICK_TMDC is not set
640# CONFIG_JOYSTICK_IFORCE is not set
641# CONFIG_JOYSTICK_WARRIOR is not set
642# CONFIG_JOYSTICK_MAGELLAN is not set
643# CONFIG_JOYSTICK_SPACEORB is not set
644# CONFIG_JOYSTICK_SPACEBALL is not set
645# CONFIG_JOYSTICK_STINGER is not set
646# CONFIG_JOYSTICK_TWIDJOY is not set
647# CONFIG_JOYSTICK_ZHENHUA is not set
648# CONFIG_JOYSTICK_JOYDUMP is not set
649# CONFIG_INPUT_TABLET is not set
650# CONFIG_INPUT_TOUCHSCREEN is not set
651CONFIG_INPUT_MISC=y
652CONFIG_INPUT_UINPUT=y
653# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
654
655#
656# Hardware I/O ports
657#
658CONFIG_SERIO=y
659# CONFIG_SERIO_I8042 is not set
660# CONFIG_SERIO_SERPORT is not set
661# CONFIG_SERIO_LIBPS2 is not set
662# CONFIG_SERIO_RAW is not set
663# CONFIG_SERIO_XILINX_XPS_PS2 is not set
664# CONFIG_GAMEPORT is not set
665
666#
667# Character devices
668#
669CONFIG_VT=y
670CONFIG_CONSOLE_TRANSLATIONS=y
671CONFIG_VT_CONSOLE=y
672CONFIG_HW_CONSOLE=y
673# CONFIG_VT_HW_CONSOLE_BINDING is not set
674# CONFIG_DEVKMEM is not set
675# CONFIG_SERIAL_NONSTANDARD is not set
676
677#
678# Serial drivers
679#
680# CONFIG_SERIAL_8250 is not set
681
682#
683# Non-8250 serial port support
684#
685# CONFIG_SERIAL_UARTLITE is not set
686CONFIG_UNIX98_PTYS=y
687# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
688CONFIG_LEGACY_PTYS=y
689CONFIG_LEGACY_PTY_COUNT=64
690# CONFIG_HVC_UDBG is not set
691# CONFIG_IPMI_HANDLER is not set
692# CONFIG_HW_RANDOM is not set
693CONFIG_NVRAM=y
694# CONFIG_R3964 is not set
695# CONFIG_RAW_DRIVER is not set
696# CONFIG_TCG_TPM is not set
697CONFIG_I2C=y
698CONFIG_I2C_BOARDINFO=y
699CONFIG_I2C_COMPAT=y
700CONFIG_I2C_CHARDEV=y
701CONFIG_I2C_HELPER_AUTO=y
702CONFIG_I2C_ALGOBIT=y
703
704#
705# I2C Hardware Bus support
706#
707
708#
709# I2C system bus drivers (mostly embedded / system-on-chip)
710#
711CONFIG_I2C_GPIO=y
712# CONFIG_I2C_MPC is not set
713# CONFIG_I2C_OCORES is not set
714# CONFIG_I2C_SIMTEC is not set
715
716#
717# External I2C/SMBus adapter drivers
718#
719# CONFIG_I2C_PARPORT_LIGHT is not set
720# CONFIG_I2C_TAOS_EVM is not set
721
722#
723# Other I2C/SMBus bus drivers
724#
725# CONFIG_I2C_PCA_PLATFORM is not set
726# CONFIG_I2C_STUB is not set
727
728#
729# Miscellaneous I2C Chip support
730#
731# CONFIG_DS1682 is not set
732# CONFIG_SENSORS_TSL2550 is not set
733# CONFIG_I2C_DEBUG_CORE is not set
734# CONFIG_I2C_DEBUG_ALGO is not set
735# CONFIG_I2C_DEBUG_BUS is not set
736# CONFIG_I2C_DEBUG_CHIP is not set
737# CONFIG_SPI is not set
738
739#
740# PPS support
741#
742# CONFIG_PPS is not set
743CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
744CONFIG_GPIOLIB=y
745# CONFIG_DEBUG_GPIO is not set
746CONFIG_GPIO_SYSFS=y
747
748#
749# Memory mapped GPIO expanders:
750#
751# CONFIG_GPIO_XILINX is not set
752
753#
754# I2C GPIO expanders:
755#
756# CONFIG_GPIO_MAX732X is not set
757# CONFIG_GPIO_PCA953X is not set
758# CONFIG_GPIO_PCF857X is not set
759
760#
761# PCI GPIO expanders:
762#
763
764#
765# SPI GPIO expanders:
766#
767
768#
769# AC97 GPIO expanders:
770#
771# CONFIG_W1 is not set
772# CONFIG_POWER_SUPPLY is not set
773# CONFIG_HWMON is not set
774# CONFIG_THERMAL is not set
775# CONFIG_WATCHDOG is not set
776CONFIG_SSB_POSSIBLE=y
777
778#
779# Sonics Silicon Backplane
780#
781CONFIG_SSB=y
782CONFIG_SSB_BLOCKIO=y
783CONFIG_SSB_SDIOHOST_POSSIBLE=y
784CONFIG_SSB_SDIOHOST=y
785# CONFIG_SSB_SILENT is not set
786CONFIG_SSB_DEBUG=y
787
788#
789# Multifunction device drivers
790#
791# CONFIG_MFD_CORE is not set
792# CONFIG_MFD_SM501 is not set
793# CONFIG_HTC_PASIC3 is not set
794# CONFIG_TPS65010 is not set
795# CONFIG_TWL4030_CORE is not set
796# CONFIG_MFD_TMIO is not set
797# CONFIG_PMIC_DA903X is not set
798# CONFIG_MFD_WM8400 is not set
799# CONFIG_MFD_WM831X is not set
800# CONFIG_MFD_WM8350_I2C is not set
801# CONFIG_MFD_PCF50633 is not set
802# CONFIG_AB3100_CORE is not set
803# CONFIG_REGULATOR is not set
804# CONFIG_MEDIA_SUPPORT is not set
805
806#
807# Graphics support
808#
809# CONFIG_VGASTATE is not set
810# CONFIG_VIDEO_OUTPUT_CONTROL is not set
811CONFIG_FB=y
812# CONFIG_FIRMWARE_EDID is not set
813# CONFIG_FB_DDC is not set
814# CONFIG_FB_BOOT_VESA_SUPPORT is not set
815# CONFIG_FB_CFB_FILLRECT is not set
816# CONFIG_FB_CFB_COPYAREA is not set
817# CONFIG_FB_CFB_IMAGEBLIT is not set
818# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
819# CONFIG_FB_SYS_FILLRECT is not set
820# CONFIG_FB_SYS_COPYAREA is not set
821# CONFIG_FB_SYS_IMAGEBLIT is not set
822# CONFIG_FB_FOREIGN_ENDIAN is not set
823# CONFIG_FB_SYS_FOPS is not set
824# CONFIG_FB_SVGALIB is not set
825# CONFIG_FB_MACMODES is not set
826# CONFIG_FB_BACKLIGHT is not set
827# CONFIG_FB_MODE_HELPERS is not set
828# CONFIG_FB_TILEBLITTING is not set
829
830#
831# Frame buffer hardware drivers
832#
833# CONFIG_FB_OF is not set
834# CONFIG_FB_VGA16 is not set
835# CONFIG_FB_S1D13XXX is not set
836# CONFIG_FB_IBM_GXT4500 is not set
837# CONFIG_FB_VIRTUAL is not set
838# CONFIG_FB_METRONOME is not set
839# CONFIG_FB_MB862XX is not set
840# CONFIG_FB_BROADSHEET is not set
841# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
842
843#
844# Display device support
845#
846# CONFIG_DISPLAY_SUPPORT is not set
847
848#
849# Console display driver support
850#
851# CONFIG_VGA_CONSOLE is not set
852CONFIG_DUMMY_CONSOLE=y
853CONFIG_FRAMEBUFFER_CONSOLE=y
854# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
855# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
856# CONFIG_FONTS is not set
857CONFIG_FONT_8x8=y
858CONFIG_FONT_8x16=y
859# CONFIG_LOGO is not set
860CONFIG_SOUND=y
861CONFIG_SOUND_OSS_CORE=y
862CONFIG_SOUND_OSS_CORE_PRECLAIM=y
863CONFIG_SND=y
864CONFIG_SND_TIMER=y
865CONFIG_SND_PCM=y
866CONFIG_SND_SEQUENCER=y
867# CONFIG_SND_SEQ_DUMMY is not set
868CONFIG_SND_OSSEMUL=y
869CONFIG_SND_MIXER_OSS=y
870CONFIG_SND_PCM_OSS=y
871CONFIG_SND_PCM_OSS_PLUGINS=y
872CONFIG_SND_SEQUENCER_OSS=y
873# CONFIG_SND_DYNAMIC_MINORS is not set
874CONFIG_SND_SUPPORT_OLD_API=y
875# CONFIG_SND_VERBOSE_PROCFS is not set
876# CONFIG_SND_VERBOSE_PRINTK is not set
877# CONFIG_SND_DEBUG is not set
878# CONFIG_SND_RAWMIDI_SEQ is not set
879# CONFIG_SND_OPL3_LIB_SEQ is not set
880# CONFIG_SND_OPL4_LIB_SEQ is not set
881# CONFIG_SND_SBAWE_SEQ is not set
882# CONFIG_SND_EMU10K1_SEQ is not set
883CONFIG_SND_DRIVERS=y
884# CONFIG_SND_DUMMY is not set
885# CONFIG_SND_VIRMIDI is not set
886# CONFIG_SND_MTPAV is not set
887# CONFIG_SND_SERIAL_U16550 is not set
888# CONFIG_SND_MPU401 is not set
889CONFIG_SND_PPC=y
890# CONFIG_SND_SOC is not set
891# CONFIG_SOUND_PRIME is not set
892CONFIG_HID_SUPPORT=y
893CONFIG_HID=y
894# CONFIG_HIDRAW is not set
895# CONFIG_HID_PID is not set
896
897#
898# Special HID drivers
899#
900CONFIG_HID_APPLE=m
901CONFIG_HID_WACOM=m
902CONFIG_USB_SUPPORT=y
903# CONFIG_USB_ARCH_HAS_HCD is not set
904# CONFIG_USB_ARCH_HAS_OHCI is not set
905# CONFIG_USB_ARCH_HAS_EHCI is not set
906# CONFIG_USB_OTG_WHITELIST is not set
907# CONFIG_USB_OTG_BLACKLIST_HUB is not set
908
909#
910# Enable Host or Gadget support to see Inventra options
911#
912
913#
914# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
915#
916# CONFIG_USB_GADGET is not set
917
918#
919# OTG and related infrastructure
920#
921CONFIG_MMC=y
922# CONFIG_MMC_DEBUG is not set
923# CONFIG_MMC_UNSAFE_RESUME is not set
924
925#
926# MMC/SD/SDIO Card Drivers
927#
928CONFIG_MMC_BLOCK=y
929CONFIG_MMC_BLOCK_BOUNCE=y
930# CONFIG_SDIO_UART is not set
931# CONFIG_MMC_TEST is not set
932
933#
934# MMC/SD/SDIO Host Controller Drivers
935#
936CONFIG_MMC_SDHCI=y
937# CONFIG_MMC_SDHCI_OF is not set
938# CONFIG_MMC_SDHCI_PLTFM is not set
939# CONFIG_MMC_WBSD is not set
940# CONFIG_MMC_AT91 is not set
941# CONFIG_MMC_ATMELMCI is not set
942# CONFIG_MEMSTICK is not set
943# CONFIG_NEW_LEDS is not set
944# CONFIG_ACCESSIBILITY is not set
945# CONFIG_EDAC is not set
946CONFIG_RTC_LIB=y
947CONFIG_RTC_CLASS=y
948CONFIG_RTC_HCTOSYS=y
949CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
950# CONFIG_RTC_DEBUG is not set
951
952#
953# RTC interfaces
954#
955CONFIG_RTC_INTF_SYSFS=y
956CONFIG_RTC_INTF_PROC=y
957CONFIG_RTC_INTF_DEV=y
958# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
959# CONFIG_RTC_DRV_TEST is not set
960
961#
962# I2C RTC drivers
963#
964# CONFIG_RTC_DRV_DS1307 is not set
965# CONFIG_RTC_DRV_DS1374 is not set
966# CONFIG_RTC_DRV_DS1672 is not set
967# CONFIG_RTC_DRV_MAX6900 is not set
968# CONFIG_RTC_DRV_RS5C372 is not set
969# CONFIG_RTC_DRV_ISL1208 is not set
970# CONFIG_RTC_DRV_X1205 is not set
971# CONFIG_RTC_DRV_PCF8563 is not set
972# CONFIG_RTC_DRV_PCF8583 is not set
973# CONFIG_RTC_DRV_M41T80 is not set
974# CONFIG_RTC_DRV_S35390A is not set
975# CONFIG_RTC_DRV_FM3130 is not set
976# CONFIG_RTC_DRV_RX8581 is not set
977# CONFIG_RTC_DRV_RX8025 is not set
978
979#
980# SPI RTC drivers
981#
982
983#
984# Platform RTC drivers
985#
986# CONFIG_RTC_DRV_CMOS is not set
987# CONFIG_RTC_DRV_DS1286 is not set
988# CONFIG_RTC_DRV_DS1511 is not set
989# CONFIG_RTC_DRV_DS1553 is not set
990# CONFIG_RTC_DRV_DS1742 is not set
991# CONFIG_RTC_DRV_STK17TA8 is not set
992# CONFIG_RTC_DRV_M48T86 is not set
993# CONFIG_RTC_DRV_M48T35 is not set
994# CONFIG_RTC_DRV_M48T59 is not set
995# CONFIG_RTC_DRV_BQ4802 is not set
996# CONFIG_RTC_DRV_V3020 is not set
997
998#
999# on-CPU RTC drivers
1000#
1001CONFIG_RTC_DRV_GENERIC=y
1002# CONFIG_DMADEVICES is not set
1003# CONFIG_AUXDISPLAY is not set
1004# CONFIG_UIO is not set
1005
1006#
1007# TI VLYNQ
1008#
1009# CONFIG_STAGING is not set
1010
1011#
1012# File systems
1013#
1014CONFIG_EXT2_FS=y
1015# CONFIG_EXT2_FS_XATTR is not set
1016# CONFIG_EXT2_FS_XIP is not set
1017CONFIG_EXT3_FS=y
1018# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
1019# CONFIG_EXT3_FS_XATTR is not set
1020# CONFIG_EXT4_FS is not set
1021CONFIG_JBD=y
1022# CONFIG_JBD_DEBUG is not set
1023# CONFIG_REISERFS_FS is not set
1024# CONFIG_JFS_FS is not set
1025# CONFIG_FS_POSIX_ACL is not set
1026# CONFIG_XFS_FS is not set
1027# CONFIG_GFS2_FS is not set
1028# CONFIG_OCFS2_FS is not set
1029# CONFIG_BTRFS_FS is not set
1030# CONFIG_NILFS2_FS is not set
1031CONFIG_FILE_LOCKING=y
1032CONFIG_FSNOTIFY=y
1033CONFIG_DNOTIFY=y
1034CONFIG_INOTIFY=y
1035CONFIG_INOTIFY_USER=y
1036# CONFIG_QUOTA is not set
1037# CONFIG_AUTOFS_FS is not set
1038# CONFIG_AUTOFS4_FS is not set
1039CONFIG_FUSE_FS=m
1040# CONFIG_CUSE is not set
1041
1042#
1043# Caches
1044#
1045# CONFIG_FSCACHE is not set
1046
1047#
1048# CD-ROM/DVD Filesystems
1049#
1050CONFIG_ISO9660_FS=y
1051CONFIG_JOLIET=y
1052# CONFIG_ZISOFS is not set
1053# CONFIG_UDF_FS is not set
1054
1055#
1056# DOS/FAT/NT Filesystems
1057#
1058CONFIG_FAT_FS=y
1059CONFIG_MSDOS_FS=y
1060CONFIG_VFAT_FS=y
1061CONFIG_FAT_DEFAULT_CODEPAGE=437
1062CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1063# CONFIG_NTFS_FS is not set
1064
1065#
1066# Pseudo filesystems
1067#
1068CONFIG_PROC_FS=y
1069CONFIG_PROC_KCORE=y
1070CONFIG_PROC_SYSCTL=y
1071# CONFIG_PROC_PAGE_MONITOR is not set
1072CONFIG_SYSFS=y
1073CONFIG_TMPFS=y
1074# CONFIG_TMPFS_POSIX_ACL is not set
1075# CONFIG_HUGETLB_PAGE is not set
1076# CONFIG_CONFIGFS_FS is not set
1077CONFIG_MISC_FILESYSTEMS=y
1078# CONFIG_ADFS_FS is not set
1079# CONFIG_AFFS_FS is not set
1080# CONFIG_HFS_FS is not set
1081# CONFIG_HFSPLUS_FS is not set
1082# CONFIG_BEFS_FS is not set
1083# CONFIG_BFS_FS is not set
1084# CONFIG_EFS_FS is not set
1085# CONFIG_CRAMFS is not set
1086# CONFIG_SQUASHFS is not set
1087# CONFIG_VXFS_FS is not set
1088# CONFIG_MINIX_FS is not set
1089# CONFIG_OMFS_FS is not set
1090# CONFIG_HPFS_FS is not set
1091# CONFIG_QNX4FS_FS is not set
1092# CONFIG_ROMFS_FS is not set
1093# CONFIG_SYSV_FS is not set
1094# CONFIG_UFS_FS is not set
1095CONFIG_NETWORK_FILESYSTEMS=y
1096CONFIG_NFS_FS=y
1097CONFIG_NFS_V3=y
1098# CONFIG_NFS_V3_ACL is not set
1099# CONFIG_NFS_V4 is not set
1100CONFIG_ROOT_NFS=y
1101# CONFIG_NFSD is not set
1102CONFIG_LOCKD=y
1103CONFIG_LOCKD_V4=y
1104CONFIG_NFS_COMMON=y
1105CONFIG_SUNRPC=y
1106# CONFIG_RPCSEC_GSS_KRB5 is not set
1107# CONFIG_RPCSEC_GSS_SPKM3 is not set
1108# CONFIG_SMB_FS is not set
1109CONFIG_CIFS=m
1110# CONFIG_CIFS_STATS is not set
1111# CONFIG_CIFS_WEAK_PW_HASH is not set
1112# CONFIG_CIFS_XATTR is not set
1113# CONFIG_CIFS_DEBUG2 is not set
1114# CONFIG_CIFS_EXPERIMENTAL is not set
1115# CONFIG_NCP_FS is not set
1116# CONFIG_CODA_FS is not set
1117# CONFIG_AFS_FS is not set
1118
1119#
1120# Partition Types
1121#
1122# CONFIG_PARTITION_ADVANCED is not set
1123CONFIG_MSDOS_PARTITION=y
1124CONFIG_NLS=y
1125CONFIG_NLS_DEFAULT="iso8859-1"
1126CONFIG_NLS_CODEPAGE_437=y
1127# CONFIG_NLS_CODEPAGE_737 is not set
1128# CONFIG_NLS_CODEPAGE_775 is not set
1129# CONFIG_NLS_CODEPAGE_850 is not set
1130# CONFIG_NLS_CODEPAGE_852 is not set
1131# CONFIG_NLS_CODEPAGE_855 is not set
1132# CONFIG_NLS_CODEPAGE_857 is not set
1133# CONFIG_NLS_CODEPAGE_860 is not set
1134# CONFIG_NLS_CODEPAGE_861 is not set
1135# CONFIG_NLS_CODEPAGE_862 is not set
1136# CONFIG_NLS_CODEPAGE_863 is not set
1137# CONFIG_NLS_CODEPAGE_864 is not set
1138# CONFIG_NLS_CODEPAGE_865 is not set
1139# CONFIG_NLS_CODEPAGE_866 is not set
1140# CONFIG_NLS_CODEPAGE_869 is not set
1141# CONFIG_NLS_CODEPAGE_936 is not set
1142# CONFIG_NLS_CODEPAGE_950 is not set
1143# CONFIG_NLS_CODEPAGE_932 is not set
1144# CONFIG_NLS_CODEPAGE_949 is not set
1145# CONFIG_NLS_CODEPAGE_874 is not set
1146# CONFIG_NLS_ISO8859_8 is not set
1147# CONFIG_NLS_CODEPAGE_1250 is not set
1148# CONFIG_NLS_CODEPAGE_1251 is not set
1149# CONFIG_NLS_ASCII is not set
1150CONFIG_NLS_ISO8859_1=y
1151# CONFIG_NLS_ISO8859_2 is not set
1152# CONFIG_NLS_ISO8859_3 is not set
1153# CONFIG_NLS_ISO8859_4 is not set
1154# CONFIG_NLS_ISO8859_5 is not set
1155# CONFIG_NLS_ISO8859_6 is not set
1156# CONFIG_NLS_ISO8859_7 is not set
1157# CONFIG_NLS_ISO8859_9 is not set
1158# CONFIG_NLS_ISO8859_13 is not set
1159# CONFIG_NLS_ISO8859_14 is not set
1160# CONFIG_NLS_ISO8859_15 is not set
1161# CONFIG_NLS_KOI8_R is not set
1162# CONFIG_NLS_KOI8_U is not set
1163# CONFIG_NLS_UTF8 is not set
1164# CONFIG_DLM is not set
1165CONFIG_BINARY_PRINTF=y
1166
1167#
1168# Library routines
1169#
1170CONFIG_BITREVERSE=y
1171CONFIG_GENERIC_FIND_LAST_BIT=y
1172CONFIG_CRC_CCITT=y
1173CONFIG_CRC16=y
1174# CONFIG_CRC_T10DIF is not set
1175# CONFIG_CRC_ITU_T is not set
1176CONFIG_CRC32=y
1177# CONFIG_CRC7 is not set
1178# CONFIG_LIBCRC32C is not set
1179CONFIG_ZLIB_INFLATE=y
1180CONFIG_DECOMPRESS_GZIP=y
1181CONFIG_HAS_IOMEM=y
1182CONFIG_HAS_IOPORT=y
1183CONFIG_HAS_DMA=y
1184CONFIG_HAVE_LMB=y
1185CONFIG_NLATTR=y
1186CONFIG_GENERIC_ATOMIC64=y
1187
1188#
1189# Kernel hacking
1190#
1191CONFIG_PRINTK_TIME=y
1192CONFIG_ENABLE_WARN_DEPRECATED=y
1193CONFIG_ENABLE_MUST_CHECK=y
1194CONFIG_FRAME_WARN=1024
1195CONFIG_MAGIC_SYSRQ=y
1196# CONFIG_STRIP_ASM_SYMS is not set
1197# CONFIG_UNUSED_SYMBOLS is not set
1198CONFIG_DEBUG_FS=y
1199# CONFIG_HEADERS_CHECK is not set
1200CONFIG_DEBUG_KERNEL=y
1201# CONFIG_DEBUG_SHIRQ is not set
1202CONFIG_DETECT_SOFTLOCKUP=y
1203# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1204CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1205# CONFIG_DETECT_HUNG_TASK is not set
1206CONFIG_SCHED_DEBUG=y
1207CONFIG_SCHEDSTATS=y
1208# CONFIG_TIMER_STATS is not set
1209# CONFIG_DEBUG_OBJECTS is not set
1210# CONFIG_DEBUG_SLAB is not set
1211# CONFIG_DEBUG_KMEMLEAK is not set
1212CONFIG_DEBUG_PREEMPT=y
1213# CONFIG_DEBUG_RT_MUTEXES is not set
1214# CONFIG_RT_MUTEX_TESTER is not set
1215CONFIG_DEBUG_SPINLOCK=y
1216CONFIG_DEBUG_MUTEXES=y
1217# CONFIG_DEBUG_LOCK_ALLOC is not set
1218# CONFIG_PROVE_LOCKING is not set
1219# CONFIG_LOCK_STAT is not set
1220CONFIG_DEBUG_SPINLOCK_SLEEP=y
1221# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1222CONFIG_STACKTRACE=y
1223# CONFIG_DEBUG_KOBJECT is not set
1224CONFIG_DEBUG_BUGVERBOSE=y
1225# CONFIG_DEBUG_INFO is not set
1226# CONFIG_DEBUG_VM is not set
1227# CONFIG_DEBUG_WRITECOUNT is not set
1228# CONFIG_DEBUG_MEMORY_INIT is not set
1229# CONFIG_DEBUG_LIST is not set
1230# CONFIG_DEBUG_SG is not set
1231# CONFIG_DEBUG_NOTIFIERS is not set
1232# CONFIG_DEBUG_CREDENTIALS is not set
1233# CONFIG_RCU_TORTURE_TEST is not set
1234# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1235# CONFIG_BACKTRACE_SELF_TEST is not set
1236# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1237# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
1238# CONFIG_FAULT_INJECTION is not set
1239CONFIG_LATENCYTOP=y
1240CONFIG_SYSCTL_SYSCALL_CHECK=y
1241# CONFIG_DEBUG_PAGEALLOC is not set
1242CONFIG_NOP_TRACER=y
1243CONFIG_HAVE_FUNCTION_TRACER=y
1244CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
1245CONFIG_HAVE_DYNAMIC_FTRACE=y
1246CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
1247CONFIG_TRACER_MAX_TRACE=y
1248CONFIG_RING_BUFFER=y
1249CONFIG_EVENT_TRACING=y
1250CONFIG_CONTEXT_SWITCH_TRACER=y
1251CONFIG_TRACING=y
1252CONFIG_GENERIC_TRACER=y
1253CONFIG_TRACING_SUPPORT=y
1254CONFIG_FTRACE=y
1255# CONFIG_FUNCTION_TRACER is not set
1256# CONFIG_IRQSOFF_TRACER is not set
1257# CONFIG_PREEMPT_TRACER is not set
1258CONFIG_SCHED_TRACER=y
1259CONFIG_BOOT_TRACER=y
1260CONFIG_BRANCH_PROFILE_NONE=y
1261# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1262# CONFIG_PROFILE_ALL_BRANCHES is not set
1263# CONFIG_STACK_TRACER is not set
1264# CONFIG_KMEMTRACE is not set
1265# CONFIG_WORKQUEUE_TRACER is not set
1266CONFIG_BLK_DEV_IO_TRACE=y
1267# CONFIG_FTRACE_STARTUP_TEST is not set
1268# CONFIG_RING_BUFFER_BENCHMARK is not set
1269# CONFIG_DYNAMIC_DEBUG is not set
1270CONFIG_DMA_API_DEBUG=y
1271# CONFIG_SAMPLES is not set
1272CONFIG_HAVE_ARCH_KGDB=y
1273# CONFIG_KGDB is not set
1274# CONFIG_PPC_DISABLE_WERROR is not set
1275CONFIG_PPC_WERROR=y
1276CONFIG_PRINT_STACK_DEPTH=64
1277# CONFIG_DEBUG_STACKOVERFLOW is not set
1278# CONFIG_DEBUG_STACK_USAGE is not set
1279# CONFIG_PPC_EMULATED_STATS is not set
1280# CONFIG_CODE_PATCHING_SELFTEST is not set
1281# CONFIG_FTR_FIXUP_SELFTEST is not set
1282# CONFIG_MSI_BITMAP_SELFTEST is not set
1283# CONFIG_XMON is not set
1284# CONFIG_IRQSTACKS is not set
1285# CONFIG_VIRQ_DEBUG is not set
1286# CONFIG_BDI_SWITCH is not set
1287# CONFIG_BOOTX_TEXT is not set
1288CONFIG_PPC_EARLY_DEBUG=y
1289# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1290# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1291# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1292# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1293# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1294# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1295# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1296# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
1297# CONFIG_PPC_EARLY_DEBUG_44x is not set
1298# CONFIG_PPC_EARLY_DEBUG_40x is not set
1299# CONFIG_PPC_EARLY_DEBUG_CPM is not set
1300CONFIG_PPC_EARLY_DEBUG_USBGECKO=y
1301
1302#
1303# Security options
1304#
1305# CONFIG_KEYS is not set
1306# CONFIG_SECURITY is not set
1307# CONFIG_SECURITYFS is not set
1308# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1309CONFIG_CRYPTO=y
1310
1311#
1312# Crypto core or helper
1313#
1314CONFIG_CRYPTO_ALGAPI=y
1315CONFIG_CRYPTO_ALGAPI2=y
1316CONFIG_CRYPTO_AEAD2=y
1317CONFIG_CRYPTO_BLKCIPHER=y
1318CONFIG_CRYPTO_BLKCIPHER2=y
1319CONFIG_CRYPTO_HASH2=y
1320CONFIG_CRYPTO_RNG2=y
1321CONFIG_CRYPTO_PCOMP=y
1322CONFIG_CRYPTO_MANAGER=y
1323CONFIG_CRYPTO_MANAGER2=y
1324# CONFIG_CRYPTO_GF128MUL is not set
1325# CONFIG_CRYPTO_NULL is not set
1326CONFIG_CRYPTO_WORKQUEUE=y
1327# CONFIG_CRYPTO_CRYPTD is not set
1328# CONFIG_CRYPTO_AUTHENC is not set
1329# CONFIG_CRYPTO_TEST is not set
1330
1331#
1332# Authenticated Encryption with Associated Data
1333#
1334# CONFIG_CRYPTO_CCM is not set
1335# CONFIG_CRYPTO_GCM is not set
1336# CONFIG_CRYPTO_SEQIV is not set
1337
1338#
1339# Block modes
1340#
1341# CONFIG_CRYPTO_CBC is not set
1342# CONFIG_CRYPTO_CTR is not set
1343# CONFIG_CRYPTO_CTS is not set
1344CONFIG_CRYPTO_ECB=y
1345# CONFIG_CRYPTO_LRW is not set
1346# CONFIG_CRYPTO_PCBC is not set
1347# CONFIG_CRYPTO_XTS is not set
1348
1349#
1350# Hash modes
1351#
1352# CONFIG_CRYPTO_HMAC is not set
1353# CONFIG_CRYPTO_XCBC is not set
1354# CONFIG_CRYPTO_VMAC is not set
1355
1356#
1357# Digest
1358#
1359# CONFIG_CRYPTO_CRC32C is not set
1360# CONFIG_CRYPTO_GHASH is not set
1361# CONFIG_CRYPTO_MD4 is not set
1362# CONFIG_CRYPTO_MD5 is not set
1363# CONFIG_CRYPTO_MICHAEL_MIC is not set
1364# CONFIG_CRYPTO_RMD128 is not set
1365# CONFIG_CRYPTO_RMD160 is not set
1366# CONFIG_CRYPTO_RMD256 is not set
1367# CONFIG_CRYPTO_RMD320 is not set
1368# CONFIG_CRYPTO_SHA1 is not set
1369# CONFIG_CRYPTO_SHA256 is not set
1370# CONFIG_CRYPTO_SHA512 is not set
1371# CONFIG_CRYPTO_TGR192 is not set
1372# CONFIG_CRYPTO_WP512 is not set
1373
1374#
1375# Ciphers
1376#
1377CONFIG_CRYPTO_AES=y
1378# CONFIG_CRYPTO_ANUBIS is not set
1379CONFIG_CRYPTO_ARC4=y
1380# CONFIG_CRYPTO_BLOWFISH is not set
1381# CONFIG_CRYPTO_CAMELLIA is not set
1382# CONFIG_CRYPTO_CAST5 is not set
1383# CONFIG_CRYPTO_CAST6 is not set
1384# CONFIG_CRYPTO_DES is not set
1385# CONFIG_CRYPTO_FCRYPT is not set
1386# CONFIG_CRYPTO_KHAZAD is not set
1387# CONFIG_CRYPTO_SALSA20 is not set
1388# CONFIG_CRYPTO_SEED is not set
1389# CONFIG_CRYPTO_SERPENT is not set
1390# CONFIG_CRYPTO_TEA is not set
1391# CONFIG_CRYPTO_TWOFISH is not set
1392
1393#
1394# Compression
1395#
1396# CONFIG_CRYPTO_DEFLATE is not set
1397# CONFIG_CRYPTO_ZLIB is not set
1398# CONFIG_CRYPTO_LZO is not set
1399
1400#
1401# Random Number Generation
1402#
1403# CONFIG_CRYPTO_ANSI_CPRNG is not set
1404# CONFIG_CRYPTO_HW is not set
1405# CONFIG_PPC_CLOCK is not set
1406# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/include/asm/asm-offsets.h b/arch/powerpc/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/powerpc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/powerpc/include/asm/async_tx.h b/arch/powerpc/include/asm/async_tx.h
new file mode 100644
index 000000000000..8b2dc55d01ab
--- /dev/null
+++ b/arch/powerpc/include/asm/async_tx.h
@@ -0,0 +1,47 @@
1/*
2 * Copyright (C) 2008-2009 DENX Software Engineering.
3 *
4 * Author: Yuri Tikhonov <yur@emcraft.com>
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 Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59
18 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 * The full GNU General Public License is included in this distribution in the
21 * file called COPYING.
22 */
23#ifndef _ASM_POWERPC_ASYNC_TX_H_
24#define _ASM_POWERPC_ASYNC_TX_H_
25
26#if defined(CONFIG_440SPe) || defined(CONFIG_440SP)
27extern struct dma_chan *
28ppc440spe_async_tx_find_best_channel(enum dma_transaction_type cap,
29 struct page **dst_lst, int dst_cnt, struct page **src_lst,
30 int src_cnt, size_t src_sz);
31
32#define async_tx_find_channel(dep, cap, dst_lst, dst_cnt, src_lst, \
33 src_cnt, src_sz) \
34 ppc440spe_async_tx_find_best_channel(cap, dst_lst, dst_cnt, src_lst, \
35 src_cnt, src_sz)
36#else
37
38#define async_tx_find_channel(dep, type, dst, dst_count, src, src_count, len) \
39 __async_tx_find_channel(dep, type)
40
41struct dma_chan *
42__async_tx_find_channel(struct async_submit_ctl *submit,
43 enum dma_transaction_type tx_type);
44
45#endif
46
47#endif
diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h
index 64e1fdca233e..2c15212e1700 100644
--- a/arch/powerpc/include/asm/bug.h
+++ b/arch/powerpc/include/asm/bug.h
@@ -68,7 +68,7 @@
68 _EMIT_BUG_ENTRY \ 68 _EMIT_BUG_ENTRY \
69 : : "i" (__FILE__), "i" (__LINE__), \ 69 : : "i" (__FILE__), "i" (__LINE__), \
70 "i" (0), "i" (sizeof(struct bug_entry))); \ 70 "i" (0), "i" (sizeof(struct bug_entry))); \
71 for(;;) ; \ 71 unreachable(); \
72} while (0) 72} while (0)
73 73
74#define BUG_ON(x) do { \ 74#define BUG_ON(x) do { \
diff --git a/arch/powerpc/include/asm/dcr-regs.h b/arch/powerpc/include/asm/dcr-regs.h
index 828e3aa1f2fc..380274de429f 100644
--- a/arch/powerpc/include/asm/dcr-regs.h
+++ b/arch/powerpc/include/asm/dcr-regs.h
@@ -157,4 +157,27 @@
157#define L2C_SNP_SSR_32G 0x0000f000 157#define L2C_SNP_SSR_32G 0x0000f000
158#define L2C_SNP_ESR 0x00000800 158#define L2C_SNP_ESR 0x00000800
159 159
160/*
161 * DCR register offsets for 440SP/440SPe I2O/DMA controller.
162 * The base address is configured in the device tree.
163 */
164#define DCRN_I2O0_IBAL 0x006
165#define DCRN_I2O0_IBAH 0x007
166#define I2O_REG_ENABLE 0x00000001 /* Enable I2O/DMA access */
167
168/* 440SP/440SPe Software Reset DCR */
169#define DCRN_SDR0_SRST 0x0200
170#define DCRN_SDR0_SRST_I2ODMA (0x80000000 >> 15) /* Reset I2O/DMA */
171
172/* 440SP/440SPe Memory Queue DCR offsets */
173#define DCRN_MQ0_XORBA 0x04
174#define DCRN_MQ0_CF2H 0x06
175#define DCRN_MQ0_CFBHL 0x0f
176#define DCRN_MQ0_BAUH 0x10
177
178/* HB/LL Paths Configuration Register */
179#define MQ0_CFBHL_TPLM 28
180#define MQ0_CFBHL_HBCL 23
181#define MQ0_CFBHL_POLY 15
182
160#endif /* __DCR_REGS_H__ */ 183#endif /* __DCR_REGS_H__ */
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index e281daebddca..80a973bb9e71 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -197,7 +197,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
197 if (!dev->dma_mask) 197 if (!dev->dma_mask)
198 return 0; 198 return 0;
199 199
200 return addr + size <= *dev->dma_mask; 200 return addr + size - 1 <= *dev->dma_mask;
201} 201}
202 202
203static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 203static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 014a624f4c8e..17828ad411eb 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -170,7 +170,6 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
170#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) 170#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
171#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC) 171#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC)
172 172
173#define USE_ELF_CORE_DUMP
174#define CORE_DUMP_USE_REGSET 173#define CORE_DUMP_USE_REGSET
175#define ELF_EXEC_PAGESIZE PAGE_SIZE 174#define ELF_EXEC_PAGESIZE PAGE_SIZE
176 175
diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h
index f1f4e23a84e9..5c2c0233175e 100644
--- a/arch/powerpc/include/asm/fixmap.h
+++ b/arch/powerpc/include/asm/fixmap.h
@@ -44,6 +44,9 @@
44 */ 44 */
45enum fixed_addresses { 45enum fixed_addresses {
46 FIX_HOLE, 46 FIX_HOLE,
47 /* reserve the top 128K for early debugging purposes */
48 FIX_EARLY_DEBUG_TOP = FIX_HOLE,
49 FIX_EARLY_DEBUG_BASE = FIX_EARLY_DEBUG_TOP+((128*1024)/PAGE_SIZE)-1,
47#ifdef CONFIG_HIGHMEM 50#ifdef CONFIG_HIGHMEM
48 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ 51 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
49 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, 52 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h
index 08454880a2c0..0192a4ee2bc2 100644
--- a/arch/powerpc/include/asm/module.h
+++ b/arch/powerpc/include/asm/module.h
@@ -87,5 +87,10 @@ struct exception_table_entry;
87void sort_ex_table(struct exception_table_entry *start, 87void sort_ex_table(struct exception_table_entry *start,
88 struct exception_table_entry *finish); 88 struct exception_table_entry *finish);
89 89
90#ifdef CONFIG_MODVERSIONS
91#define ARCH_RELOCATES_KCRCTAB
92
93extern const unsigned long reloc_start[];
94#endif
90#endif /* __KERNEL__ */ 95#endif /* __KERNEL__ */
91#endif /* _ASM_POWERPC_MODULE_H */ 96#endif /* _ASM_POWERPC_MODULE_H */
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 8c341490cfc5..cbd759e3cd78 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -140,6 +140,8 @@ extern void user_enable_single_step(struct task_struct *);
140extern void user_enable_block_step(struct task_struct *); 140extern void user_enable_block_step(struct task_struct *);
141extern void user_disable_single_step(struct task_struct *); 141extern void user_disable_single_step(struct task_struct *);
142 142
143#define ARCH_HAS_USER_SINGLE_STEP_INFO
144
143#endif /* __ASSEMBLY__ */ 145#endif /* __ASSEMBLY__ */
144 146
145#endif /* __KERNEL__ */ 147#endif /* __KERNEL__ */
diff --git a/arch/powerpc/include/asm/reg_fsl_emb.h b/arch/powerpc/include/asm/reg_fsl_emb.h
index 1e180a594589..0de404dfee8b 100644
--- a/arch/powerpc/include/asm/reg_fsl_emb.h
+++ b/arch/powerpc/include/asm/reg_fsl_emb.h
@@ -39,7 +39,7 @@
39#define PMRN_PMLCB2 0x112 /* PM Local Control B2 */ 39#define PMRN_PMLCB2 0x112 /* PM Local Control B2 */
40#define PMRN_PMLCB3 0x113 /* PM Local Control B3 */ 40#define PMRN_PMLCB3 0x113 /* PM Local Control B3 */
41 41
42#define PMLCB_THRESHMUL_MASK 0x0700 /* Threshhold Multiple Field */ 42#define PMLCB_THRESHMUL_MASK 0x0700 /* Threshold Multiple Field */
43#define PMLCB_THRESHMUL_SHIFT 8 43#define PMLCB_THRESHMUL_SHIFT 8
44 44
45#define PMLCB_THRESHOLD_MASK 0x003f /* Threshold Field */ 45#define PMLCB_THRESHOLD_MASK 0x003f /* Threshold Field */
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 168fce726201..20de73c36682 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -58,7 +58,7 @@ struct rtas_t {
58 unsigned long entry; /* physical address pointer */ 58 unsigned long entry; /* physical address pointer */
59 unsigned long base; /* physical address pointer */ 59 unsigned long base; /* physical address pointer */
60 unsigned long size; 60 unsigned long size;
61 raw_spinlock_t lock; 61 arch_spinlock_t lock;
62 struct rtas_args args; 62 struct rtas_args args;
63 struct device_node *dev; /* virtual address pointer */ 63 struct device_node *dev; /* virtual address pointer */
64}; 64};
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index d9ea8d39c342..1d3b270d3083 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -37,7 +37,7 @@ extern void cpu_die(void);
37extern void smp_send_debugger_break(int cpu); 37extern void smp_send_debugger_break(int cpu);
38extern void smp_message_recv(int); 38extern void smp_message_recv(int);
39 39
40DECLARE_PER_CPU(unsigned int, pvr); 40DECLARE_PER_CPU(unsigned int, cpu_pvr);
41 41
42#ifdef CONFIG_HOTPLUG_CPU 42#ifdef CONFIG_HOTPLUG_CPU
43extern void fixup_irqs(cpumask_t map); 43extern void fixup_irqs(cpumask_t map);
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
index 198266cf9e2d..764094cff681 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -28,7 +28,7 @@
28#include <asm/asm-compat.h> 28#include <asm/asm-compat.h>
29#include <asm/synch.h> 29#include <asm/synch.h>
30 30
31#define __raw_spin_is_locked(x) ((x)->slock != 0) 31#define arch_spin_is_locked(x) ((x)->slock != 0)
32 32
33#ifdef CONFIG_PPC64 33#ifdef CONFIG_PPC64
34/* use 0x800000yy when locked, where yy == CPU number */ 34/* use 0x800000yy when locked, where yy == CPU number */
@@ -54,7 +54,7 @@
54 * This returns the old value in the lock, so we succeeded 54 * This returns the old value in the lock, so we succeeded
55 * in getting the lock if the return value is 0. 55 * in getting the lock if the return value is 0.
56 */ 56 */
57static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock) 57static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock)
58{ 58{
59 unsigned long tmp, token; 59 unsigned long tmp, token;
60 60
@@ -73,10 +73,10 @@ static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock)
73 return tmp; 73 return tmp;
74} 74}
75 75
76static inline int __raw_spin_trylock(raw_spinlock_t *lock) 76static inline int arch_spin_trylock(arch_spinlock_t *lock)
77{ 77{
78 CLEAR_IO_SYNC; 78 CLEAR_IO_SYNC;
79 return arch_spin_trylock(lock) == 0; 79 return __arch_spin_trylock(lock) == 0;
80} 80}
81 81
82/* 82/*
@@ -96,19 +96,19 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
96#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) 96#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
97/* We only yield to the hypervisor if we are in shared processor mode */ 97/* We only yield to the hypervisor if we are in shared processor mode */
98#define SHARED_PROCESSOR (get_lppaca()->shared_proc) 98#define SHARED_PROCESSOR (get_lppaca()->shared_proc)
99extern void __spin_yield(raw_spinlock_t *lock); 99extern void __spin_yield(arch_spinlock_t *lock);
100extern void __rw_yield(raw_rwlock_t *lock); 100extern void __rw_yield(arch_rwlock_t *lock);
101#else /* SPLPAR || ISERIES */ 101#else /* SPLPAR || ISERIES */
102#define __spin_yield(x) barrier() 102#define __spin_yield(x) barrier()
103#define __rw_yield(x) barrier() 103#define __rw_yield(x) barrier()
104#define SHARED_PROCESSOR 0 104#define SHARED_PROCESSOR 0
105#endif 105#endif
106 106
107static inline void __raw_spin_lock(raw_spinlock_t *lock) 107static inline void arch_spin_lock(arch_spinlock_t *lock)
108{ 108{
109 CLEAR_IO_SYNC; 109 CLEAR_IO_SYNC;
110 while (1) { 110 while (1) {
111 if (likely(arch_spin_trylock(lock) == 0)) 111 if (likely(__arch_spin_trylock(lock) == 0))
112 break; 112 break;
113 do { 113 do {
114 HMT_low(); 114 HMT_low();
@@ -120,13 +120,13 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
120} 120}
121 121
122static inline 122static inline
123void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 123void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
124{ 124{
125 unsigned long flags_dis; 125 unsigned long flags_dis;
126 126
127 CLEAR_IO_SYNC; 127 CLEAR_IO_SYNC;
128 while (1) { 128 while (1) {
129 if (likely(arch_spin_trylock(lock) == 0)) 129 if (likely(__arch_spin_trylock(lock) == 0))
130 break; 130 break;
131 local_save_flags(flags_dis); 131 local_save_flags(flags_dis);
132 local_irq_restore(flags); 132 local_irq_restore(flags);
@@ -140,19 +140,19 @@ void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
140 } 140 }
141} 141}
142 142
143static inline void __raw_spin_unlock(raw_spinlock_t *lock) 143static inline void arch_spin_unlock(arch_spinlock_t *lock)
144{ 144{
145 SYNC_IO; 145 SYNC_IO;
146 __asm__ __volatile__("# __raw_spin_unlock\n\t" 146 __asm__ __volatile__("# arch_spin_unlock\n\t"
147 LWSYNC_ON_SMP: : :"memory"); 147 LWSYNC_ON_SMP: : :"memory");
148 lock->slock = 0; 148 lock->slock = 0;
149} 149}
150 150
151#ifdef CONFIG_PPC64 151#ifdef CONFIG_PPC64
152extern void __raw_spin_unlock_wait(raw_spinlock_t *lock); 152extern void arch_spin_unlock_wait(arch_spinlock_t *lock);
153#else 153#else
154#define __raw_spin_unlock_wait(lock) \ 154#define arch_spin_unlock_wait(lock) \
155 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 155 do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0)
156#endif 156#endif
157 157
158/* 158/*
@@ -166,8 +166,8 @@ extern void __raw_spin_unlock_wait(raw_spinlock_t *lock);
166 * read-locks. 166 * read-locks.
167 */ 167 */
168 168
169#define __raw_read_can_lock(rw) ((rw)->lock >= 0) 169#define arch_read_can_lock(rw) ((rw)->lock >= 0)
170#define __raw_write_can_lock(rw) (!(rw)->lock) 170#define arch_write_can_lock(rw) (!(rw)->lock)
171 171
172#ifdef CONFIG_PPC64 172#ifdef CONFIG_PPC64
173#define __DO_SIGN_EXTEND "extsw %0,%0\n" 173#define __DO_SIGN_EXTEND "extsw %0,%0\n"
@@ -181,7 +181,7 @@ extern void __raw_spin_unlock_wait(raw_spinlock_t *lock);
181 * This returns the old value in the lock + 1, 181 * This returns the old value in the lock + 1,
182 * so we got a read lock if the return value is > 0. 182 * so we got a read lock if the return value is > 0.
183 */ 183 */
184static inline long arch_read_trylock(raw_rwlock_t *rw) 184static inline long __arch_read_trylock(arch_rwlock_t *rw)
185{ 185{
186 long tmp; 186 long tmp;
187 187
@@ -205,7 +205,7 @@ static inline long arch_read_trylock(raw_rwlock_t *rw)
205 * This returns the old value in the lock, 205 * This returns the old value in the lock,
206 * so we got the write lock if the return value is 0. 206 * so we got the write lock if the return value is 0.
207 */ 207 */
208static inline long arch_write_trylock(raw_rwlock_t *rw) 208static inline long __arch_write_trylock(arch_rwlock_t *rw)
209{ 209{
210 long tmp, token; 210 long tmp, token;
211 211
@@ -225,10 +225,10 @@ static inline long arch_write_trylock(raw_rwlock_t *rw)
225 return tmp; 225 return tmp;
226} 226}
227 227
228static inline void __raw_read_lock(raw_rwlock_t *rw) 228static inline void arch_read_lock(arch_rwlock_t *rw)
229{ 229{
230 while (1) { 230 while (1) {
231 if (likely(arch_read_trylock(rw) > 0)) 231 if (likely(__arch_read_trylock(rw) > 0))
232 break; 232 break;
233 do { 233 do {
234 HMT_low(); 234 HMT_low();
@@ -239,10 +239,10 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
239 } 239 }
240} 240}
241 241
242static inline void __raw_write_lock(raw_rwlock_t *rw) 242static inline void arch_write_lock(arch_rwlock_t *rw)
243{ 243{
244 while (1) { 244 while (1) {
245 if (likely(arch_write_trylock(rw) == 0)) 245 if (likely(__arch_write_trylock(rw) == 0))
246 break; 246 break;
247 do { 247 do {
248 HMT_low(); 248 HMT_low();
@@ -253,17 +253,17 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
253 } 253 }
254} 254}
255 255
256static inline int __raw_read_trylock(raw_rwlock_t *rw) 256static inline int arch_read_trylock(arch_rwlock_t *rw)
257{ 257{
258 return arch_read_trylock(rw) > 0; 258 return __arch_read_trylock(rw) > 0;
259} 259}
260 260
261static inline int __raw_write_trylock(raw_rwlock_t *rw) 261static inline int arch_write_trylock(arch_rwlock_t *rw)
262{ 262{
263 return arch_write_trylock(rw) == 0; 263 return __arch_write_trylock(rw) == 0;
264} 264}
265 265
266static inline void __raw_read_unlock(raw_rwlock_t *rw) 266static inline void arch_read_unlock(arch_rwlock_t *rw)
267{ 267{
268 long tmp; 268 long tmp;
269 269
@@ -280,19 +280,19 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
280 : "cr0", "xer", "memory"); 280 : "cr0", "xer", "memory");
281} 281}
282 282
283static inline void __raw_write_unlock(raw_rwlock_t *rw) 283static inline void arch_write_unlock(arch_rwlock_t *rw)
284{ 284{
285 __asm__ __volatile__("# write_unlock\n\t" 285 __asm__ __volatile__("# write_unlock\n\t"
286 LWSYNC_ON_SMP: : :"memory"); 286 LWSYNC_ON_SMP: : :"memory");
287 rw->lock = 0; 287 rw->lock = 0;
288} 288}
289 289
290#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 290#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
291#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 291#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
292 292
293#define _raw_spin_relax(lock) __spin_yield(lock) 293#define arch_spin_relax(lock) __spin_yield(lock)
294#define _raw_read_relax(lock) __rw_yield(lock) 294#define arch_read_relax(lock) __rw_yield(lock)
295#define _raw_write_relax(lock) __rw_yield(lock) 295#define arch_write_relax(lock) __rw_yield(lock)
296 296
297#endif /* __KERNEL__ */ 297#endif /* __KERNEL__ */
298#endif /* __ASM_SPINLOCK_H */ 298#endif /* __ASM_SPINLOCK_H */
diff --git a/arch/powerpc/include/asm/spinlock_types.h b/arch/powerpc/include/asm/spinlock_types.h
index 74236c9f05b1..2351adc4fdc4 100644
--- a/arch/powerpc/include/asm/spinlock_types.h
+++ b/arch/powerpc/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int slock; 9 volatile unsigned int slock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile signed int lock; 15 volatile signed int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/powerpc/include/asm/udbg.h b/arch/powerpc/include/asm/udbg.h
index cd21e5e6b04f..11ae699135ba 100644
--- a/arch/powerpc/include/asm/udbg.h
+++ b/arch/powerpc/include/asm/udbg.h
@@ -51,6 +51,7 @@ extern void __init udbg_init_btext(void);
51extern void __init udbg_init_44x_as1(void); 51extern void __init udbg_init_44x_as1(void);
52extern void __init udbg_init_40x_realmode(void); 52extern void __init udbg_init_40x_realmode(void);
53extern void __init udbg_init_cpm(void); 53extern void __init udbg_init_cpm(void);
54extern void __init udbg_init_usbgecko(void);
54 55
55#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
56#endif /* _ASM_POWERPC_UDBG_H */ 57#endif /* _ASM_POWERPC_UDBG_H */
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index 3839839f83c7..b876e989220b 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -642,10 +642,14 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg,
642 */ 642 */
643static int emulate_vsx(unsigned char __user *addr, unsigned int reg, 643static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
644 unsigned int areg, struct pt_regs *regs, 644 unsigned int areg, struct pt_regs *regs,
645 unsigned int flags, unsigned int length) 645 unsigned int flags, unsigned int length,
646 unsigned int elsize)
646{ 647{
647 char *ptr; 648 char *ptr;
649 unsigned long *lptr;
648 int ret = 0; 650 int ret = 0;
651 int sw = 0;
652 int i, j;
649 653
650 flush_vsx_to_thread(current); 654 flush_vsx_to_thread(current);
651 655
@@ -654,19 +658,35 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
654 else 658 else
655 ptr = (char *) &current->thread.vr[reg - 32]; 659 ptr = (char *) &current->thread.vr[reg - 32];
656 660
657 if (flags & ST) 661 lptr = (unsigned long *) ptr;
658 ret = __copy_to_user(addr, ptr, length); 662
659 else { 663 if (flags & SW)
660 if (flags & SPLT){ 664 sw = elsize-1;
661 ret = __copy_from_user(ptr, addr, length); 665
662 ptr += length; 666 for (j = 0; j < length; j += elsize) {
667 for (i = 0; i < elsize; ++i) {
668 if (flags & ST)
669 ret |= __put_user(ptr[i^sw], addr + i);
670 else
671 ret |= __get_user(ptr[i^sw], addr + i);
663 } 672 }
664 ret |= __copy_from_user(ptr, addr, length); 673 ptr += elsize;
674 addr += elsize;
665 } 675 }
666 if (flags & U) 676
667 regs->gpr[areg] = regs->dar; 677 if (!ret) {
668 if (ret) 678 if (flags & U)
679 regs->gpr[areg] = regs->dar;
680
681 /* Splat load copies the same data to top and bottom 8 bytes */
682 if (flags & SPLT)
683 lptr[1] = lptr[0];
684 /* For 8 byte loads, zero the top 8 bytes */
685 else if (!(flags & ST) && (8 == length))
686 lptr[1] = 0;
687 } else
669 return -EFAULT; 688 return -EFAULT;
689
670 return 1; 690 return 1;
671} 691}
672#endif 692#endif
@@ -767,16 +787,25 @@ int fix_alignment(struct pt_regs *regs)
767 787
768#ifdef CONFIG_VSX 788#ifdef CONFIG_VSX
769 if ((instruction & 0xfc00003e) == 0x7c000018) { 789 if ((instruction & 0xfc00003e) == 0x7c000018) {
770 /* Additional register addressing bit (64 VSX vs 32 FPR/GPR */ 790 unsigned int elsize;
791
792 /* Additional register addressing bit (64 VSX vs 32 FPR/GPR) */
771 reg |= (instruction & 0x1) << 5; 793 reg |= (instruction & 0x1) << 5;
772 /* Simple inline decoder instead of a table */ 794 /* Simple inline decoder instead of a table */
795 /* VSX has only 8 and 16 byte memory accesses */
796 nb = 8;
773 if (instruction & 0x200) 797 if (instruction & 0x200)
774 nb = 16; 798 nb = 16;
775 else if (instruction & 0x080) 799
776 nb = 8; 800 /* Vector stores in little-endian mode swap individual
777 else 801 elements, so process them separately */
778 nb = 4; 802 elsize = 4;
803 if (instruction & 0x80)
804 elsize = 8;
805
779 flags = 0; 806 flags = 0;
807 if (regs->msr & MSR_LE)
808 flags |= SW;
780 if (instruction & 0x100) 809 if (instruction & 0x100)
781 flags |= ST; 810 flags |= ST;
782 if (instruction & 0x040) 811 if (instruction & 0x040)
@@ -787,7 +816,7 @@ int fix_alignment(struct pt_regs *regs)
787 nb = 8; 816 nb = 8;
788 } 817 }
789 PPC_WARN_ALIGNMENT(vsx, regs); 818 PPC_WARN_ALIGNMENT(vsx, regs);
790 return emulate_vsx(addr, reg, areg, regs, flags, nb); 819 return emulate_vsx(addr, reg, areg, regs, flags, nb, elsize);
791 } 820 }
792#endif 821#endif
793 /* A size of 0 indicates an instruction we don't support, with 822 /* A size of 0 indicates an instruction we don't support, with
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 03c862b6a9c4..2fc82bac3bbc 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -697,9 +697,9 @@ static struct cpu_spec __initdata cpu_specs[] = {
697 .machine_check = machine_check_generic, 697 .machine_check = machine_check_generic,
698 .platform = "ppc750", 698 .platform = "ppc750",
699 }, 699 },
700 { /* 750CL */ 700 { /* 750CL (and "Broadway") */
701 .pvr_mask = 0xfffff0f0, 701 .pvr_mask = 0xfffff0e0,
702 .pvr_value = 0x00087010, 702 .pvr_value = 0x00087000,
703 .cpu_name = "750CL", 703 .cpu_name = "750CL",
704 .cpu_features = CPU_FTRS_750CL, 704 .cpu_features = CPU_FTRS_750CL,
705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, 705 .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 829c3fe7c5a2..e025e89fe93e 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -164,6 +164,9 @@ __after_mmu_off:
164#ifdef CONFIG_PPC_EARLY_DEBUG_CPM 164#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
165 bl setup_cpm_bat 165 bl setup_cpm_bat
166#endif 166#endif
167#ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO
168 bl setup_usbgecko_bat
169#endif
167 170
168/* 171/*
169 * Call setup_cpu for CPU 0 and initialize 6xx Idle 172 * Call setup_cpu for CPU 0 and initialize 6xx Idle
@@ -1203,6 +1206,28 @@ setup_cpm_bat:
1203 blr 1206 blr
1204#endif 1207#endif
1205 1208
1209#ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO
1210setup_usbgecko_bat:
1211 /* prepare a BAT for early io */
1212#if defined(CONFIG_GAMECUBE)
1213 lis r8, 0x0c00
1214#elif defined(CONFIG_WII)
1215 lis r8, 0x0d00
1216#else
1217#error Invalid platform for USB Gecko based early debugging.
1218#endif
1219 /*
1220 * The virtual address used must match the virtual address
1221 * associated to the fixmap entry FIX_EARLY_DEBUG_BASE.
1222 */
1223 lis r11, 0xfffe /* top 128K */
1224 ori r8, r8, 0x002a /* uncached, guarded ,rw */
1225 ori r11, r11, 0x2 /* 128K, Vs=1, Vp=0 */
1226 mtspr SPRN_DBAT1L, r8
1227 mtspr SPRN_DBAT1U, r11
1228 blr
1229#endif
1230
1206#ifdef CONFIG_8260 1231#ifdef CONFIG_8260
1207/* Jump into the system reset for the rom. 1232/* Jump into the system reset for the rom.
1208 * We first disable the MMU, and then jump to the ROM reset address. 1233 * We first disable the MMU, and then jump to the ROM reset address.
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index fd51578e29dd..5547ae6e6b0b 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -30,7 +30,7 @@
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
33#include <linux/bitops.h> 33#include <linux/bitmap.h>
34#include <linux/iommu-helper.h> 34#include <linux/iommu-helper.h>
35#include <linux/crash_dump.h> 35#include <linux/crash_dump.h>
36#include <asm/io.h> 36#include <asm/io.h>
@@ -251,7 +251,7 @@ static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
251 } 251 }
252 252
253 ppc_md.tce_free(tbl, entry, npages); 253 ppc_md.tce_free(tbl, entry, npages);
254 iommu_area_free(tbl->it_map, free_entry, npages); 254 bitmap_clear(tbl->it_map, free_entry, npages);
255} 255}
256 256
257static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, 257static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index f6dca4f4b295..9040330b0530 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -210,7 +210,7 @@ int show_interrupts(struct seq_file *p, void *v)
210 if (!desc) 210 if (!desc)
211 return 0; 211 return 0;
212 212
213 spin_lock_irqsave(&desc->lock, flags); 213 raw_spin_lock_irqsave(&desc->lock, flags);
214 214
215 action = desc->action; 215 action = desc->action;
216 if (!action || !action->handler) 216 if (!action || !action->handler)
@@ -237,7 +237,7 @@ int show_interrupts(struct seq_file *p, void *v)
237 seq_putc(p, '\n'); 237 seq_putc(p, '\n');
238 238
239skip: 239skip:
240 spin_unlock_irqrestore(&desc->lock, flags); 240 raw_spin_unlock_irqrestore(&desc->lock, flags);
241 241
242 return 0; 242 return 0;
243} 243}
@@ -1112,7 +1112,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
1112 if (!desc) 1112 if (!desc)
1113 continue; 1113 continue;
1114 1114
1115 spin_lock_irqsave(&desc->lock, flags); 1115 raw_spin_lock_irqsave(&desc->lock, flags);
1116 1116
1117 if (desc->action && desc->action->handler) { 1117 if (desc->action && desc->action->handler) {
1118 seq_printf(m, "%5d ", i); 1118 seq_printf(m, "%5d ", i);
@@ -1131,7 +1131,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
1131 seq_printf(m, "%s\n", p); 1131 seq_printf(m, "%s\n", p);
1132 } 1132 }
1133 1133
1134 spin_unlock_irqrestore(&desc->lock, flags); 1134 raw_spin_unlock_irqrestore(&desc->lock, flags);
1135 } 1135 }
1136 1136
1137 return 0; 1137 return 0;
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 641c74bb8e27..b6bd1eaa1c24 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -52,7 +52,7 @@ static struct hard_trap_info
52 { 0x2030, 0x08 /* SIGFPE */ }, /* spe fp data */ 52 { 0x2030, 0x08 /* SIGFPE */ }, /* spe fp data */
53 { 0x2040, 0x08 /* SIGFPE */ }, /* spe fp data */ 53 { 0x2040, 0x08 /* SIGFPE */ }, /* spe fp data */
54 { 0x2050, 0x08 /* SIGFPE */ }, /* spe fp round */ 54 { 0x2050, 0x08 /* SIGFPE */ }, /* spe fp round */
55 { 0x2060, 0x0e /* SIGILL */ }, /* performace monitor */ 55 { 0x2060, 0x0e /* SIGILL */ }, /* performance monitor */
56 { 0x2900, 0x08 /* SIGFPE */ }, /* apu unavailable */ 56 { 0x2900, 0x08 /* SIGFPE */ }, /* apu unavailable */
57 { 0x3100, 0x0e /* SIGALRM */ }, /* fixed interval timer */ 57 { 0x3100, 0x0e /* SIGALRM */ }, /* fixed interval timer */
58 { 0x3200, 0x02 /* SIGINT */ }, /* watchdog */ 58 { 0x3200, 0x02 /* SIGINT */ }, /* watchdog */
diff --git a/arch/powerpc/kernel/perf_callchain.c b/arch/powerpc/kernel/perf_callchain.c
index 936f04dbfc6f..a3c11cac3d71 100644
--- a/arch/powerpc/kernel/perf_callchain.c
+++ b/arch/powerpc/kernel/perf_callchain.c
@@ -487,11 +487,11 @@ static void perf_callchain_user_32(struct pt_regs *regs,
487 * Since we can't get PMU interrupts inside a PMU interrupt handler, 487 * Since we can't get PMU interrupts inside a PMU interrupt handler,
488 * we don't need separate irq and nmi entries here. 488 * we don't need separate irq and nmi entries here.
489 */ 489 */
490static DEFINE_PER_CPU(struct perf_callchain_entry, callchain); 490static DEFINE_PER_CPU(struct perf_callchain_entry, cpu_perf_callchain);
491 491
492struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) 492struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
493{ 493{
494 struct perf_callchain_entry *entry = &__get_cpu_var(callchain); 494 struct perf_callchain_entry *entry = &__get_cpu_var(cpu_perf_callchain);
495 495
496 entry->nr = 0; 496 entry->nr = 0;
497 497
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index bf90361bb70f..fd0d29493fd6 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -42,7 +42,7 @@
42#include <asm/mmu.h> 42#include <asm/mmu.h>
43 43
44struct rtas_t rtas = { 44struct rtas_t rtas = {
45 .lock = __RAW_SPIN_LOCK_UNLOCKED 45 .lock = __ARCH_SPIN_LOCK_UNLOCKED
46}; 46};
47EXPORT_SYMBOL(rtas); 47EXPORT_SYMBOL(rtas);
48 48
@@ -80,13 +80,13 @@ static unsigned long lock_rtas(void)
80 80
81 local_irq_save(flags); 81 local_irq_save(flags);
82 preempt_disable(); 82 preempt_disable();
83 __raw_spin_lock_flags(&rtas.lock, flags); 83 arch_spin_lock_flags(&rtas.lock, flags);
84 return flags; 84 return flags;
85} 85}
86 86
87static void unlock_rtas(unsigned long flags) 87static void unlock_rtas(unsigned long flags)
88{ 88{
89 __raw_spin_unlock(&rtas.lock); 89 arch_spin_unlock(&rtas.lock);
90 local_irq_restore(flags); 90 local_irq_restore(flags);
91 preempt_enable(); 91 preempt_enable();
92} 92}
@@ -978,7 +978,7 @@ int __init early_init_dt_scan_rtas(unsigned long node,
978 return 1; 978 return 1;
979} 979}
980 980
981static raw_spinlock_t timebase_lock; 981static arch_spinlock_t timebase_lock;
982static u64 timebase = 0; 982static u64 timebase = 0;
983 983
984void __cpuinit rtas_give_timebase(void) 984void __cpuinit rtas_give_timebase(void)
@@ -987,10 +987,10 @@ void __cpuinit rtas_give_timebase(void)
987 987
988 local_irq_save(flags); 988 local_irq_save(flags);
989 hard_irq_disable(); 989 hard_irq_disable();
990 __raw_spin_lock(&timebase_lock); 990 arch_spin_lock(&timebase_lock);
991 rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); 991 rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL);
992 timebase = get_tb(); 992 timebase = get_tb();
993 __raw_spin_unlock(&timebase_lock); 993 arch_spin_unlock(&timebase_lock);
994 994
995 while (timebase) 995 while (timebase)
996 barrier(); 996 barrier();
@@ -1002,8 +1002,8 @@ void __cpuinit rtas_take_timebase(void)
1002{ 1002{
1003 while (!timebase) 1003 while (!timebase)
1004 barrier(); 1004 barrier();
1005 __raw_spin_lock(&timebase_lock); 1005 arch_spin_lock(&timebase_lock);
1006 set_tb(timebase >> 32, timebase & 0xffffffff); 1006 set_tb(timebase >> 32, timebase & 0xffffffff);
1007 timebase = 0; 1007 timebase = 0;
1008 __raw_spin_unlock(&timebase_lock); 1008 arch_spin_unlock(&timebase_lock);
1009} 1009}
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 845c72ab7357..03dd6a248198 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -157,7 +157,7 @@ extern u32 cpu_temp_both(unsigned long cpu);
157#endif /* CONFIG_TAU */ 157#endif /* CONFIG_TAU */
158 158
159#ifdef CONFIG_SMP 159#ifdef CONFIG_SMP
160DEFINE_PER_CPU(unsigned int, pvr); 160DEFINE_PER_CPU(unsigned int, cpu_pvr);
161#endif 161#endif
162 162
163static int show_cpuinfo(struct seq_file *m, void *v) 163static int show_cpuinfo(struct seq_file *m, void *v)
@@ -209,7 +209,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
209 } 209 }
210 210
211#ifdef CONFIG_SMP 211#ifdef CONFIG_SMP
212 pvr = per_cpu(pvr, cpu_id); 212 pvr = per_cpu(cpu_pvr, cpu_id);
213#else 213#else
214 pvr = mfspr(SPRN_PVR); 214 pvr = mfspr(SPRN_PVR);
215#endif 215#endif
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 97196eefef3e..a521fb8a40ee 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -235,7 +235,7 @@ struct thread_info *current_set[NR_CPUS];
235 235
236static void __devinit smp_store_cpu_info(int id) 236static void __devinit smp_store_cpu_info(int id)
237{ 237{
238 per_cpu(pvr, id) = mfspr(SPRN_PVR); 238 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
239} 239}
240 240
241static void __init smp_create_idle(unsigned int cpu) 241static void __init smp_create_idle(unsigned int cpu)
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index c04832c4a02e..3370e62e43d4 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -140,7 +140,6 @@ static inline unsigned long do_mmap2(unsigned long addr, size_t len,
140 unsigned long prot, unsigned long flags, 140 unsigned long prot, unsigned long flags,
141 unsigned long fd, unsigned long off, int shift) 141 unsigned long fd, unsigned long off, int shift)
142{ 142{
143 struct file * file = NULL;
144 unsigned long ret = -EINVAL; 143 unsigned long ret = -EINVAL;
145 144
146 if (!arch_validate_prot(prot)) 145 if (!arch_validate_prot(prot))
@@ -151,20 +150,8 @@ static inline unsigned long do_mmap2(unsigned long addr, size_t len,
151 goto out; 150 goto out;
152 off >>= shift; 151 off >>= shift;
153 } 152 }
154
155 ret = -EBADF;
156 if (!(flags & MAP_ANONYMOUS)) {
157 if (!(file = fget(fd)))
158 goto out;
159 }
160
161 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
162 153
163 down_write(&current->mm->mmap_sem); 154 ret = sys_mmap_pgoff(addr, len, prot, flags, fd, off);
164 ret = do_mmap_pgoff(file, addr, len, prot, flags, off);
165 up_write(&current->mm->mmap_sem);
166 if (file)
167 fput(file);
168out: 155out:
169 return ret; 156 return ret;
170} 157}
diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c
index c3a56d65c5a9..a753b72efbc0 100644
--- a/arch/powerpc/kernel/tau_6xx.c
+++ b/arch/powerpc/kernel/tau_6xx.c
@@ -59,7 +59,7 @@ void set_thresholds(unsigned long cpu)
59 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID); 59 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID);
60 60
61 /* setup THRM2, 61 /* setup THRM2,
62 * threshold, valid bit, enable interrupts, interrupt when above threshhold 62 * threshold, valid bit, enable interrupts, interrupt when above threshold
63 */ 63 */
64 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE); 64 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE);
65#else 65#else
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index e9af16cc7c0c..9ba2cc88591d 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -835,7 +835,8 @@ static cycle_t timebase_read(struct clocksource *cs)
835 return (cycle_t)get_tb(); 835 return (cycle_t)get_tb();
836} 836}
837 837
838void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) 838void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
839 u32 mult)
839{ 840{
840 u64 t2x, stamp_xsec; 841 u64 t2x, stamp_xsec;
841 842
@@ -848,7 +849,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
848 849
849 /* XXX this assumes clock->shift == 22 */ 850 /* XXX this assumes clock->shift == 22 */
850 /* 4611686018 ~= 2^(20+64-22) / 1e9 */ 851 /* 4611686018 ~= 2^(20+64-22) / 1e9 */
851 t2x = (u64) clock->mult * 4611686018ULL; 852 t2x = (u64) mult * 4611686018ULL;
852 stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC; 853 stamp_xsec = (u64) xtime.tv_nsec * XSEC_PER_SEC;
853 do_div(stamp_xsec, 1000000000); 854 do_div(stamp_xsec, 1000000000);
854 stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC; 855 stamp_xsec += (u64) xtime.tv_sec * XSEC_PER_SEC;
@@ -925,7 +926,7 @@ static void register_decrementer_clockevent(int cpu)
925 *dec = decrementer_clockevent; 926 *dec = decrementer_clockevent;
926 dec->cpumask = cpumask_of(cpu); 927 dec->cpumask = cpumask_of(cpu);
927 928
928 printk(KERN_DEBUG "clockevent: %s mult[%lx] shift[%d] cpu[%d]\n", 929 printk(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
929 dec->name, dec->mult, dec->shift, cpu); 930 dec->name, dec->mult, dec->shift, cpu);
930 931
931 clockevents_register_device(dec); 932 clockevents_register_device(dec);
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 804f0f30f227..d069ff8a7e03 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -174,6 +174,15 @@ int die(const char *str, struct pt_regs *regs, long err)
174 return 0; 174 return 0;
175} 175}
176 176
177void user_single_step_siginfo(struct task_struct *tsk,
178 struct pt_regs *regs, siginfo_t *info)
179{
180 memset(info, 0, sizeof(*info));
181 info->si_signo = SIGTRAP;
182 info->si_code = TRAP_TRACE;
183 info->si_addr = (void __user *)regs->nip;
184}
185
177void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) 186void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
178{ 187{
179 siginfo_t info; 188 siginfo_t info;
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index fc9af47e2128..e39cad83c884 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -60,6 +60,8 @@ void __init udbg_early_init(void)
60 udbg_init_40x_realmode(); 60 udbg_init_40x_realmode();
61#elif defined(CONFIG_PPC_EARLY_DEBUG_CPM) 61#elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
62 udbg_init_cpm(); 62 udbg_init_cpm();
63#elif defined(CONFIG_PPC_EARLY_DEBUG_USBGECKO)
64 udbg_init_usbgecko();
63#endif 65#endif
64 66
65#ifdef CONFIG_PPC_EARLY_DEBUG 67#ifdef CONFIG_PPC_EARLY_DEBUG
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 137dc22afa42..d84d19224a95 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -721,7 +721,7 @@ static int __init vdso_init(void)
721 721
722#ifdef CONFIG_PPC64 722#ifdef CONFIG_PPC64
723 /* 723 /*
724 * Fill up the "systemcfg" stuff for backward compatiblity 724 * Fill up the "systemcfg" stuff for backward compatibility
725 */ 725 */
726 strcpy((char *)vdso_data->eye_catcher, "SYSTEMCFG:PPC64"); 726 strcpy((char *)vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
727 vdso_data->version.major = SYSTEMCFG_MAJOR; 727 vdso_data->version.major = SYSTEMCFG_MAJOR;
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 27735a7ac12b..dcd01c82e701 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -38,6 +38,9 @@ jiffies = jiffies_64 + 4;
38#endif 38#endif
39SECTIONS 39SECTIONS
40{ 40{
41 . = 0;
42 reloc_start = .;
43
41 . = KERNELBASE; 44 . = KERNELBASE;
42 45
43/* 46/*
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index 79d0fa3a470d..58e14fba11b1 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -25,7 +25,7 @@
25#include <asm/smp.h> 25#include <asm/smp.h>
26#include <asm/firmware.h> 26#include <asm/firmware.h>
27 27
28void __spin_yield(raw_spinlock_t *lock) 28void __spin_yield(arch_spinlock_t *lock)
29{ 29{
30 unsigned int lock_value, holder_cpu, yield_count; 30 unsigned int lock_value, holder_cpu, yield_count;
31 31
@@ -55,7 +55,7 @@ void __spin_yield(raw_spinlock_t *lock)
55 * This turns out to be the same for read and write locks, since 55 * This turns out to be the same for read and write locks, since
56 * we only know the holder if it is write-locked. 56 * we only know the holder if it is write-locked.
57 */ 57 */
58void __rw_yield(raw_rwlock_t *rw) 58void __rw_yield(arch_rwlock_t *rw)
59{ 59{
60 int lock_value; 60 int lock_value;
61 unsigned int holder_cpu, yield_count; 61 unsigned int holder_cpu, yield_count;
@@ -82,7 +82,7 @@ void __rw_yield(raw_rwlock_t *rw)
82} 82}
83#endif 83#endif
84 84
85void __raw_spin_unlock_wait(raw_spinlock_t *lock) 85void arch_spin_unlock_wait(arch_spinlock_t *lock)
86{ 86{
87 while (lock->slock) { 87 while (lock->slock) {
88 HMT_low(); 88 HMT_low();
@@ -92,4 +92,4 @@ void __raw_spin_unlock_wait(raw_spinlock_t *lock)
92 HMT_medium(); 92 HMT_medium();
93} 93}
94 94
95EXPORT_SYMBOL(__raw_spin_unlock_wait); 95EXPORT_SYMBOL(arch_spin_unlock_wait);
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index f5e7b9ce63dd..08dfa8e6d86f 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -91,7 +91,7 @@ void __init MMU_init_hw(void)
91#define LARGE_PAGE_SIZE_16M (1<<24) 91#define LARGE_PAGE_SIZE_16M (1<<24)
92#define LARGE_PAGE_SIZE_4M (1<<22) 92#define LARGE_PAGE_SIZE_4M (1<<22)
93 93
94unsigned long __init mmu_mapin_ram(void) 94unsigned long __init mmu_mapin_ram(unsigned long top)
95{ 95{
96 unsigned long v, s, mapped; 96 unsigned long v, s, mapped;
97 phys_addr_t p; 97 phys_addr_t p;
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 98052ac96580..3986264b0993 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -88,7 +88,7 @@ void __init MMU_init_hw(void)
88 flush_instruction_cache(); 88 flush_instruction_cache();
89} 89}
90 90
91unsigned long __init mmu_mapin_ram(void) 91unsigned long __init mmu_mapin_ram(unsigned long top)
92{ 92{
93 unsigned long addr; 93 unsigned long addr;
94 94
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index fcfcb6e976c7..c5394728bf2e 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -207,7 +207,7 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx)
207 return amount_mapped; 207 return amount_mapped;
208} 208}
209 209
210unsigned long __init mmu_mapin_ram(void) 210unsigned long __init mmu_mapin_ram(unsigned long top)
211{ 211{
212 return tlbcam_addrs[tlbcam_index - 1].limit - PAGE_OFFSET + 1; 212 return tlbcam_addrs[tlbcam_index - 1].limit - PAGE_OFFSET + 1;
213} 213}
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 50f867d657df..3ecdcec0a39e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -340,7 +340,7 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,
340 else 340 else
341 def->tlbiel = 0; 341 def->tlbiel = 0;
342 342
343 DBG(" %d: shift=%02x, sllp=%04x, avpnm=%08x, " 343 DBG(" %d: shift=%02x, sllp=%04lx, avpnm=%08lx, "
344 "tlbiel=%d, penc=%d\n", 344 "tlbiel=%d, penc=%d\n",
345 idx, shift, def->sllp, def->avpnm, def->tlbiel, 345 idx, shift, def->sllp, def->avpnm, def->tlbiel,
346 def->penc); 346 def->penc);
@@ -663,7 +663,7 @@ static void __init htab_initialize(void)
663 base = (unsigned long)__va(lmb.memory.region[i].base); 663 base = (unsigned long)__va(lmb.memory.region[i].base);
664 size = lmb.memory.region[i].size; 664 size = lmb.memory.region[i].size;
665 665
666 DBG("creating mapping for region: %lx..%lx (prot: %x)\n", 666 DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
667 base, size, prot); 667 base, size, prot);
668 668
669#ifdef CONFIG_U3_DART 669#ifdef CONFIG_U3_DART
@@ -879,7 +879,7 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea)
879 */ 879 */
880int hash_page(unsigned long ea, unsigned long access, unsigned long trap) 880int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
881{ 881{
882 void *pgdir; 882 pgd_t *pgdir;
883 unsigned long vsid; 883 unsigned long vsid;
884 struct mm_struct *mm; 884 struct mm_struct *mm;
885 pte_t *ptep; 885 pte_t *ptep;
@@ -1025,7 +1025,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
1025 else 1025 else
1026#endif /* CONFIG_PPC_HAS_HASH_64K */ 1026#endif /* CONFIG_PPC_HAS_HASH_64K */
1027 { 1027 {
1028 int spp = subpage_protection(pgdir, ea); 1028 int spp = subpage_protection(mm, ea);
1029 if (access & spp) 1029 if (access & spp)
1030 rc = -2; 1030 rc = -2;
1031 else 1031 else
@@ -1115,7 +1115,7 @@ void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize,
1115{ 1115{
1116 unsigned long hash, index, shift, hidx, slot; 1116 unsigned long hash, index, shift, hidx, slot;
1117 1117
1118 DBG_LOW("flush_hash_page(va=%016x)\n", va); 1118 DBG_LOW("flush_hash_page(va=%016lx)\n", va);
1119 pte_iterate_hashed_subpages(pte, psize, va, index, shift) { 1119 pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
1120 hash = hpt_hash(va, shift, ssize); 1120 hash = hpt_hash(va, shift, ssize);
1121 hidx = __rpte_to_hidx(pte, index); 1121 hidx = __rpte_to_hidx(pte, index);
@@ -1123,7 +1123,7 @@ void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize,
1123 hash = ~hash; 1123 hash = ~hash;
1124 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; 1124 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
1125 slot += hidx & _PTEIDX_GROUP_IX; 1125 slot += hidx & _PTEIDX_GROUP_IX;
1126 DBG_LOW(" sub %d: hash=%x, hidx=%x\n", index, slot, hidx); 1126 DBG_LOW(" sub %ld: hash=%lx, hidx=%lx\n", index, slot, hidx);
1127 ppc_md.hpte_invalidate(slot, va, psize, ssize, local); 1127 ppc_md.hpte_invalidate(slot, va, psize, ssize, local);
1128 } pte_iterate_hashed_end(); 1128 } pte_iterate_hashed_end();
1129} 1129}
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 9ddcfb4dc139..4ec900af332f 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -82,6 +82,11 @@ extern struct task_struct *current_set[NR_CPUS];
82int __map_without_bats; 82int __map_without_bats;
83int __map_without_ltlbs; 83int __map_without_ltlbs;
84 84
85/*
86 * This tells the system to allow ioremapping memory marked as reserved.
87 */
88int __allow_ioremap_reserved;
89
85/* max amount of low RAM to map in */ 90/* max amount of low RAM to map in */
86unsigned long __max_low_memory = MAX_LOW_MEM; 91unsigned long __max_low_memory = MAX_LOW_MEM;
87 92
@@ -131,9 +136,13 @@ void __init MMU_init(void)
131 MMU_setup(); 136 MMU_setup();
132 137
133 if (lmb.memory.cnt > 1) { 138 if (lmb.memory.cnt > 1) {
139#ifndef CONFIG_WII
134 lmb.memory.cnt = 1; 140 lmb.memory.cnt = 1;
135 lmb_analyze(); 141 lmb_analyze();
136 printk(KERN_WARNING "Only using first contiguous memory region"); 142 printk(KERN_WARNING "Only using first contiguous memory region");
143#else
144 wii_memory_fixups();
145#endif
137 } 146 }
138 147
139 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr; 148 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr;
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index be4f34c30a0b..1044a634b6d0 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -353,7 +353,7 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self,
353 read_lock(&tasklist_lock); 353 read_lock(&tasklist_lock);
354 for_each_process(p) { 354 for_each_process(p) {
355 if (p->mm) 355 if (p->mm)
356 cpu_mask_clear_cpu(cpu, mm_cpumask(p->mm)); 356 cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
357 } 357 }
358 read_unlock(&tasklist_lock); 358 read_unlock(&tasklist_lock);
359 break; 359 break;
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index e27a990af42d..d49a77503e19 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -104,6 +104,7 @@ extern void setbat(int index, unsigned long virt, phys_addr_t phys,
104 unsigned int size, int flags); 104 unsigned int size, int flags);
105 105
106extern int __map_without_bats; 106extern int __map_without_bats;
107extern int __allow_ioremap_reserved;
107extern unsigned long ioremap_base; 108extern unsigned long ioremap_base;
108extern unsigned int rtas_data, rtas_size; 109extern unsigned int rtas_data, rtas_size;
109 110
@@ -125,24 +126,32 @@ extern phys_addr_t total_lowmem;
125extern phys_addr_t memstart_addr; 126extern phys_addr_t memstart_addr;
126extern phys_addr_t lowmem_end_addr; 127extern phys_addr_t lowmem_end_addr;
127 128
129#ifdef CONFIG_WII
130extern unsigned long wii_hole_start;
131extern unsigned long wii_hole_size;
132
133extern unsigned long wii_mmu_mapin_mem2(unsigned long top);
134extern void wii_memory_fixups(void);
135#endif
136
128/* ...and now those things that may be slightly different between processor 137/* ...and now those things that may be slightly different between processor
129 * architectures. -- Dan 138 * architectures. -- Dan
130 */ 139 */
131#if defined(CONFIG_8xx) 140#if defined(CONFIG_8xx)
132#define MMU_init_hw() do { } while(0) 141#define MMU_init_hw() do { } while(0)
133#define mmu_mapin_ram() (0UL) 142#define mmu_mapin_ram(top) (0UL)
134 143
135#elif defined(CONFIG_4xx) 144#elif defined(CONFIG_4xx)
136extern void MMU_init_hw(void); 145extern void MMU_init_hw(void);
137extern unsigned long mmu_mapin_ram(void); 146extern unsigned long mmu_mapin_ram(unsigned long top);
138 147
139#elif defined(CONFIG_FSL_BOOKE) 148#elif defined(CONFIG_FSL_BOOKE)
140extern void MMU_init_hw(void); 149extern void MMU_init_hw(void);
141extern unsigned long mmu_mapin_ram(void); 150extern unsigned long mmu_mapin_ram(unsigned long top);
142extern void adjust_total_lowmem(void); 151extern void adjust_total_lowmem(void);
143 152
144#elif defined(CONFIG_PPC32) 153#elif defined(CONFIG_PPC32)
145/* anything 32-bit except 4xx or 8xx */ 154/* anything 32-bit except 4xx or 8xx */
146extern void MMU_init_hw(void); 155extern void MMU_init_hw(void);
147extern unsigned long mmu_mapin_ram(void); 156extern unsigned long mmu_mapin_ram(unsigned long top);
148#endif 157#endif
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index cb96cb2e17cc..573b3bd1c45b 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -26,6 +26,7 @@
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27#include <linux/init.h> 27#include <linux/init.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/lmb.h>
29 30
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
31#include <asm/pgalloc.h> 32#include <asm/pgalloc.h>
@@ -191,7 +192,8 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags,
191 * Don't allow anybody to remap normal RAM that we're using. 192 * Don't allow anybody to remap normal RAM that we're using.
192 * mem_init() sets high_memory so only do the check after that. 193 * mem_init() sets high_memory so only do the check after that.
193 */ 194 */
194 if (mem_init_done && (p < virt_to_phys(high_memory))) { 195 if (mem_init_done && (p < virt_to_phys(high_memory)) &&
196 !(__allow_ioremap_reserved && lmb_is_region_reserved(p, size))) {
195 printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n", 197 printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n",
196 (unsigned long long)p, __builtin_return_address(0)); 198 (unsigned long long)p, __builtin_return_address(0));
197 return NULL; 199 return NULL;
@@ -283,18 +285,18 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
283} 285}
284 286
285/* 287/*
286 * Map in a big chunk of physical memory starting at PAGE_OFFSET. 288 * Map in a chunk of physical memory starting at start.
287 */ 289 */
288void __init mapin_ram(void) 290void __init __mapin_ram_chunk(unsigned long offset, unsigned long top)
289{ 291{
290 unsigned long v, s, f; 292 unsigned long v, s, f;
291 phys_addr_t p; 293 phys_addr_t p;
292 int ktext; 294 int ktext;
293 295
294 s = mmu_mapin_ram(); 296 s = offset;
295 v = PAGE_OFFSET + s; 297 v = PAGE_OFFSET + s;
296 p = memstart_addr + s; 298 p = memstart_addr + s;
297 for (; s < total_lowmem; s += PAGE_SIZE) { 299 for (; s < top; s += PAGE_SIZE) {
298 ktext = ((char *) v >= _stext && (char *) v < etext); 300 ktext = ((char *) v >= _stext && (char *) v < etext);
299 f = ktext ? PAGE_KERNEL_TEXT : PAGE_KERNEL; 301 f = ktext ? PAGE_KERNEL_TEXT : PAGE_KERNEL;
300 map_page(v, p, f); 302 map_page(v, p, f);
@@ -307,6 +309,30 @@ void __init mapin_ram(void)
307 } 309 }
308} 310}
309 311
312void __init mapin_ram(void)
313{
314 unsigned long s, top;
315
316#ifndef CONFIG_WII
317 top = total_lowmem;
318 s = mmu_mapin_ram(top);
319 __mapin_ram_chunk(s, top);
320#else
321 if (!wii_hole_size) {
322 s = mmu_mapin_ram(total_lowmem);
323 __mapin_ram_chunk(s, total_lowmem);
324 } else {
325 top = wii_hole_start;
326 s = mmu_mapin_ram(top);
327 __mapin_ram_chunk(s, top);
328
329 top = lmb_end_of_DRAM();
330 s = wii_mmu_mapin_mem2(top);
331 __mapin_ram_chunk(s, top);
332 }
333#endif
334}
335
310/* Scan the real Linux page tables and return a PTE pointer for 336/* Scan the real Linux page tables and return a PTE pointer for
311 * a virtual address in a context. 337 * a virtual address in a context.
312 * Returns true (1) if PTE was found, zero otherwise. The pointer to 338 * Returns true (1) if PTE was found, zero otherwise. The pointer to
@@ -356,7 +382,7 @@ static int __change_page_attr(struct page *page, pgprot_t prot)
356 return 0; 382 return 0;
357 if (!get_pteptr(&init_mm, address, &kpte, &kpmd)) 383 if (!get_pteptr(&init_mm, address, &kpte, &kpmd))
358 return -EINVAL; 384 return -EINVAL;
359 set_pte_at(&init_mm, address, kpte, mk_pte(page, prot)); 385 __set_pte_at(&init_mm, address, kpte, mk_pte(page, prot), 0);
360 wmb(); 386 wmb();
361#ifdef CONFIG_PPC_STD_MMU 387#ifdef CONFIG_PPC_STD_MMU
362 flush_hash_pages(0, address, pmd_val(*kpmd), 1); 388 flush_hash_pages(0, address, pmd_val(*kpmd), 1);
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 2d2a87e10154..f11c2cdcb0fe 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -72,7 +72,7 @@ unsigned long p_mapped_by_bats(phys_addr_t pa)
72 return 0; 72 return 0;
73} 73}
74 74
75unsigned long __init mmu_mapin_ram(void) 75unsigned long __init mmu_mapin_ram(unsigned long top)
76{ 76{
77 unsigned long tot, bl, done; 77 unsigned long tot, bl, done;
78 unsigned long max_size = (256<<20); 78 unsigned long max_size = (256<<20);
@@ -86,7 +86,7 @@ unsigned long __init mmu_mapin_ram(void)
86 86
87 /* Make sure we don't map a block larger than the 87 /* Make sure we don't map a block larger than the
88 smallest alignment of the physical address. */ 88 smallest alignment of the physical address. */
89 tot = total_lowmem; 89 tot = top;
90 for (bl = 128<<10; bl < max_size; bl <<= 1) { 90 for (bl = 128<<10; bl < max_size; bl <<= 1) {
91 if (bl * 2 > tot) 91 if (bl * 2 > tot)
92 break; 92 break;
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index ae06c6236d9c..2c9e52267292 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -248,7 +248,7 @@ static int pm_rtas_activate_signals(u32 node, u32 count)
248 * There is no debug setup required for the cycles event. 248 * There is no debug setup required for the cycles event.
249 * Note that only events in the same group can be used. 249 * Note that only events in the same group can be used.
250 * Otherwise, there will be conflicts in correctly routing 250 * Otherwise, there will be conflicts in correctly routing
251 * the signals on the debug bus. It is the responsiblity 251 * the signals on the debug bus. It is the responsibility
252 * of the OProfile user tool to check the events are in 252 * of the OProfile user tool to check the events are in
253 * the same group. 253 * the same group.
254 */ 254 */
@@ -1594,7 +1594,7 @@ static void cell_handle_interrupt_spu(struct pt_regs *regs,
1594 * to a latch. The new values (interrupt setting bits, reset 1594 * to a latch. The new values (interrupt setting bits, reset
1595 * counter value etc.) are not copied to the actual registers 1595 * counter value etc.) are not copied to the actual registers
1596 * until the performance monitor is enabled. In order to get 1596 * until the performance monitor is enabled. In order to get
1597 * this to work as desired, the permormance monitor needs to 1597 * this to work as desired, the performance monitor needs to
1598 * be disabled while writing to the latches. This is a 1598 * be disabled while writing to the latches. This is a
1599 * HW design issue. 1599 * HW design issue.
1600 */ 1600 */
@@ -1668,7 +1668,7 @@ static void cell_handle_interrupt_ppu(struct pt_regs *regs,
1668 * to a latch. The new values (interrupt setting bits, reset 1668 * to a latch. The new values (interrupt setting bits, reset
1669 * counter value etc.) are not copied to the actual registers 1669 * counter value etc.) are not copied to the actual registers
1670 * until the performance monitor is enabled. In order to get 1670 * until the performance monitor is enabled. In order to get
1671 * this to work as desired, the permormance monitor needs to 1671 * this to work as desired, the performance monitor needs to
1672 * be disabled while writing to the latches. This is a 1672 * be disabled while writing to the latches. This is a
1673 * HW design issue. 1673 * HW design issue.
1674 */ 1674 */
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index bcc69e1f77c1..45c0cb9b67e6 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/utsrelease.h> 13#include <generated/utsrelease.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/of.h> 15#include <linux/of.h>
16#include <asm/prom.h> 16#include <asm/prom.h>
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
index cc0c854291d7..0bac3a3dbecf 100644
--- a/arch/powerpc/platforms/52xx/media5200.c
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -86,9 +86,9 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
86 u32 status, enable; 86 u32 status, enable;
87 87
88 /* Mask off the cascaded IRQ */ 88 /* Mask off the cascaded IRQ */
89 spin_lock(&desc->lock); 89 raw_spin_lock(&desc->lock);
90 desc->chip->mask(virq); 90 desc->chip->mask(virq);
91 spin_unlock(&desc->lock); 91 raw_spin_unlock(&desc->lock);
92 92
93 /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs 93 /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs
94 * are pending. 'ffs()' is 1 based */ 94 * are pending. 'ffs()' is 1 based */
@@ -104,11 +104,11 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
104 } 104 }
105 105
106 /* Processing done; can reenable the cascade now */ 106 /* Processing done; can reenable the cascade now */
107 spin_lock(&desc->lock); 107 raw_spin_lock(&desc->lock);
108 desc->chip->ack(virq); 108 desc->chip->ack(virq);
109 if (!(desc->status & IRQ_DISABLED)) 109 if (!(desc->status & IRQ_DISABLED))
110 desc->chip->unmask(virq); 110 desc->chip->unmask(virq);
111 spin_unlock(&desc->lock); 111 raw_spin_unlock(&desc->lock);
112} 112}
113 113
114static int media5200_irq_map(struct irq_host *h, unsigned int virq, 114static int media5200_irq_map(struct irq_host *h, unsigned int virq,
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index dd43114e9684..da110bd88346 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -100,7 +100,7 @@ const struct of_device_id mpc52xx_pci_ids[] __initdata = {
100}; 100};
101 101
102/* ======================================================================== */ 102/* ======================================================================== */
103/* PCI configuration acess */ 103/* PCI configuration access */
104/* ======================================================================== */ 104/* ======================================================================== */
105 105
106static int 106static int
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index c5028a2e5a58..21f61b8c445b 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -86,7 +86,7 @@ static int mpc8568_fixup_125_clock(struct phy_device *phydev)
86 scr = phy_read(phydev, MV88E1111_SCR); 86 scr = phy_read(phydev, MV88E1111_SCR);
87 87
88 if (scr < 0) 88 if (scr < 0)
89 return err; 89 return scr;
90 90
91 err = phy_write(phydev, MV88E1111_SCR, scr | 0x0008); 91 err = phy_write(phydev, MV88E1111_SCR, scr | 0x0008);
92 92
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 2eab27a94cc9..fa0f690d3867 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -311,7 +311,7 @@ config NR_CPUS
311 311
312config NOT_COHERENT_CACHE 312config NOT_COHERENT_CACHE
313 bool 313 bool
314 depends on 4xx || 8xx || E200 || PPC_MPC512x 314 depends on 4xx || 8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON
315 default y 315 default y
316 316
317config CHECK_CACHE_COHERENCY 317config CHECK_CACHE_COHERENCY
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c
index 9290a7a442d0..fb4eb0df054c 100644
--- a/arch/powerpc/platforms/amigaone/setup.c
+++ b/arch/powerpc/platforms/amigaone/setup.c
@@ -14,7 +14,7 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/seq_file.h> 16#include <linux/seq_file.h>
17#include <linux/utsrelease.h> 17#include <generated/utsrelease.h>
18 18
19#include <asm/machdep.h> 19#include <asm/machdep.h>
20#include <asm/cputable.h> 20#include <asm/cputable.h>
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index f9dbf76a763f..6829cf7e2bda 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -54,7 +54,7 @@ struct iic {
54 struct device_node *node; 54 struct device_node *node;
55}; 55};
56 56
57static DEFINE_PER_CPU(struct iic, iic); 57static DEFINE_PER_CPU(struct iic, cpu_iic);
58#define IIC_NODE_COUNT 2 58#define IIC_NODE_COUNT 2
59static struct irq_host *iic_host; 59static struct irq_host *iic_host;
60 60
@@ -82,7 +82,7 @@ static void iic_unmask(unsigned int irq)
82 82
83static void iic_eoi(unsigned int irq) 83static void iic_eoi(unsigned int irq)
84{ 84{
85 struct iic *iic = &__get_cpu_var(iic); 85 struct iic *iic = &__get_cpu_var(cpu_iic);
86 out_be64(&iic->regs->prio, iic->eoi_stack[--iic->eoi_ptr]); 86 out_be64(&iic->regs->prio, iic->eoi_stack[--iic->eoi_ptr]);
87 BUG_ON(iic->eoi_ptr < 0); 87 BUG_ON(iic->eoi_ptr < 0);
88} 88}
@@ -146,7 +146,7 @@ static unsigned int iic_get_irq(void)
146 struct iic *iic; 146 struct iic *iic;
147 unsigned int virq; 147 unsigned int virq;
148 148
149 iic = &__get_cpu_var(iic); 149 iic = &__get_cpu_var(cpu_iic);
150 *(unsigned long *) &pending = 150 *(unsigned long *) &pending =
151 in_be64((u64 __iomem *) &iic->regs->pending_destr); 151 in_be64((u64 __iomem *) &iic->regs->pending_destr);
152 if (!(pending.flags & CBE_IIC_IRQ_VALID)) 152 if (!(pending.flags & CBE_IIC_IRQ_VALID))
@@ -161,12 +161,12 @@ static unsigned int iic_get_irq(void)
161 161
162void iic_setup_cpu(void) 162void iic_setup_cpu(void)
163{ 163{
164 out_be64(&__get_cpu_var(iic).regs->prio, 0xff); 164 out_be64(&__get_cpu_var(cpu_iic).regs->prio, 0xff);
165} 165}
166 166
167u8 iic_get_target_id(int cpu) 167u8 iic_get_target_id(int cpu)
168{ 168{
169 return per_cpu(iic, cpu).target_id; 169 return per_cpu(cpu_iic, cpu).target_id;
170} 170}
171 171
172EXPORT_SYMBOL_GPL(iic_get_target_id); 172EXPORT_SYMBOL_GPL(iic_get_target_id);
@@ -181,7 +181,7 @@ static inline int iic_ipi_to_irq(int ipi)
181 181
182void iic_cause_IPI(int cpu, int mesg) 182void iic_cause_IPI(int cpu, int mesg)
183{ 183{
184 out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4); 184 out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - mesg) << 4);
185} 185}
186 186
187struct irq_host *iic_get_irq_host(int node) 187struct irq_host *iic_get_irq_host(int node)
@@ -237,7 +237,7 @@ extern int noirqdebug;
237 237
238static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) 238static void handle_iic_irq(unsigned int irq, struct irq_desc *desc)
239{ 239{
240 spin_lock(&desc->lock); 240 raw_spin_lock(&desc->lock);
241 241
242 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 242 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
243 243
@@ -265,18 +265,18 @@ static void handle_iic_irq(unsigned int irq, struct irq_desc *desc)
265 goto out_eoi; 265 goto out_eoi;
266 266
267 desc->status &= ~IRQ_PENDING; 267 desc->status &= ~IRQ_PENDING;
268 spin_unlock(&desc->lock); 268 raw_spin_unlock(&desc->lock);
269 action_ret = handle_IRQ_event(irq, action); 269 action_ret = handle_IRQ_event(irq, action);
270 if (!noirqdebug) 270 if (!noirqdebug)
271 note_interrupt(irq, desc, action_ret); 271 note_interrupt(irq, desc, action_ret);
272 spin_lock(&desc->lock); 272 raw_spin_lock(&desc->lock);
273 273
274 } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); 274 } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
275 275
276 desc->status &= ~IRQ_INPROGRESS; 276 desc->status &= ~IRQ_INPROGRESS;
277out_eoi: 277out_eoi:
278 desc->chip->eoi(irq); 278 desc->chip->eoi(irq);
279 spin_unlock(&desc->lock); 279 raw_spin_unlock(&desc->lock);
280} 280}
281 281
282static int iic_host_map(struct irq_host *h, unsigned int virq, 282static int iic_host_map(struct irq_host *h, unsigned int virq,
@@ -348,7 +348,7 @@ static void __init init_one_iic(unsigned int hw_cpu, unsigned long addr,
348 /* XXX FIXME: should locate the linux CPU number from the HW cpu 348 /* XXX FIXME: should locate the linux CPU number from the HW cpu
349 * number properly. We are lucky for now 349 * number properly. We are lucky for now
350 */ 350 */
351 struct iic *iic = &per_cpu(iic, hw_cpu); 351 struct iic *iic = &per_cpu(cpu_iic, hw_cpu);
352 352
353 iic->regs = ioremap(addr, sizeof(struct cbe_iic_thread_regs)); 353 iic->regs = ioremap(addr, sizeof(struct cbe_iic_thread_regs));
354 BUG_ON(iic->regs == NULL); 354 BUG_ON(iic->regs == NULL);
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile
index b93f877ba504..b9d5d678aa44 100644
--- a/arch/powerpc/platforms/cell/spufs/Makefile
+++ b/arch/powerpc/platforms/cell/spufs/Makefile
@@ -13,10 +13,8 @@ SPU_CC := $(SPU_CROSS)gcc
13SPU_AS := $(SPU_CROSS)gcc 13SPU_AS := $(SPU_CROSS)gcc
14SPU_LD := $(SPU_CROSS)ld 14SPU_LD := $(SPU_CROSS)ld
15SPU_OBJCOPY := $(SPU_CROSS)objcopy 15SPU_OBJCOPY := $(SPU_CROSS)objcopy
16SPU_CFLAGS := -O2 -Wall -I$(srctree)/include \ 16SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -D__KERNEL__
17 -I$(objtree)/include2 -D__KERNEL__ 17SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -D__KERNEL__
18SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include \
19 -I$(objtree)/include2 -D__KERNEL__
20SPU_LDFLAGS := -N -Ttext=0x0 18SPU_LDFLAGS := -N -Ttext=0x0
21 19
22$(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h 20$(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 52f3df3b4ca0..8f41685d8f42 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -23,7 +23,7 @@
23#include <linux/reboot.h> 23#include <linux/reboot.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/pci.h> 25#include <linux/pci.h>
26#include <linux/utsrelease.h> 26#include <generated/utsrelease.h>
27#include <linux/adb.h> 27#include <linux/adb.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/delay.h> 29#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 291ac9d8cbee..524d971a1478 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -90,3 +90,36 @@ config MPC10X_OPENPIC
90config MPC10X_STORE_GATHERING 90config MPC10X_STORE_GATHERING
91 bool "Enable MPC10x store gathering" 91 bool "Enable MPC10x store gathering"
92 depends on MPC10X_BRIDGE 92 depends on MPC10X_BRIDGE
93
94config GAMECUBE_COMMON
95 bool
96
97config USBGECKO_UDBG
98 bool "USB Gecko udbg console for the Nintendo GameCube/Wii"
99 depends on GAMECUBE_COMMON
100 help
101 If you say yes to this option, support will be included for the
102 USB Gecko adapter as an udbg console.
103 The USB Gecko is a EXI to USB Serial converter that can be plugged
104 into a memcard slot in the Nintendo GameCube/Wii.
105
106 This driver bypasses the EXI layer completely.
107
108 If in doubt, say N here.
109
110config GAMECUBE
111 bool "Nintendo-GameCube"
112 depends on EMBEDDED6xx
113 select GAMECUBE_COMMON
114 help
115 Select GAMECUBE if configuring for the Nintendo GameCube.
116 More information at: <http://gc-linux.sourceforge.net/>
117
118config WII
119 bool "Nintendo-Wii"
120 depends on EMBEDDED6xx
121 select GAMECUBE_COMMON
122 help
123 Select WII if configuring for the Nintendo Wii.
124 More information at: <http://gc-linux.sourceforge.net/>
125
diff --git a/arch/powerpc/platforms/embedded6xx/Makefile b/arch/powerpc/platforms/embedded6xx/Makefile
index 0773c08bd444..66c23e423f40 100644
--- a/arch/powerpc/platforms/embedded6xx/Makefile
+++ b/arch/powerpc/platforms/embedded6xx/Makefile
@@ -7,3 +7,7 @@ obj-$(CONFIG_STORCENTER) += storcenter.o
7obj-$(CONFIG_PPC_HOLLY) += holly.o 7obj-$(CONFIG_PPC_HOLLY) += holly.o
8obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o 8obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o
9obj-$(CONFIG_PPC_C2K) += c2k.o 9obj-$(CONFIG_PPC_C2K) += c2k.o
10obj-$(CONFIG_USBGECKO_UDBG) += usbgecko_udbg.o
11obj-$(CONFIG_GAMECUBE_COMMON) += flipper-pic.o
12obj-$(CONFIG_GAMECUBE) += gamecube.o
13obj-$(CONFIG_WII) += wii.o hlwd-pic.o
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
new file mode 100644
index 000000000000..d5963285e3be
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
@@ -0,0 +1,263 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/flipper-pic.c
3 *
4 * Nintendo GameCube/Wii "Flipper" interrupt controller support.
5 * Copyright (C) 2004-2009 The GameCube Linux Team
6 * Copyright (C) 2007,2008,2009 Albert Herranz
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 */
14#define DRV_MODULE_NAME "flipper-pic"
15#define pr_fmt(fmt) DRV_MODULE_NAME ": " fmt
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/irq.h>
20#include <linux/of.h>
21#include <asm/io.h>
22
23#include "flipper-pic.h"
24
25#define FLIPPER_NR_IRQS 32
26
27/*
28 * Each interrupt has a corresponding bit in both
29 * the Interrupt Cause (ICR) and Interrupt Mask (IMR) registers.
30 *
31 * Enabling/disabling an interrupt line involves setting/clearing
32 * the corresponding bit in IMR.
33 * Except for the RSW interrupt, all interrupts get deasserted automatically
34 * when the source deasserts the interrupt.
35 */
36#define FLIPPER_ICR 0x00
37#define FLIPPER_ICR_RSS (1<<16) /* reset switch state */
38
39#define FLIPPER_IMR 0x04
40
41#define FLIPPER_RESET 0x24
42
43
44/*
45 * IRQ chip hooks.
46 *
47 */
48
49static void flipper_pic_mask_and_ack(unsigned int virq)
50{
51 int irq = virq_to_hw(virq);
52 void __iomem *io_base = get_irq_chip_data(virq);
53 u32 mask = 1 << irq;
54
55 clrbits32(io_base + FLIPPER_IMR, mask);
56 /* this is at least needed for RSW */
57 out_be32(io_base + FLIPPER_ICR, mask);
58}
59
60static void flipper_pic_ack(unsigned int virq)
61{
62 int irq = virq_to_hw(virq);
63 void __iomem *io_base = get_irq_chip_data(virq);
64
65 /* this is at least needed for RSW */
66 out_be32(io_base + FLIPPER_ICR, 1 << irq);
67}
68
69static void flipper_pic_mask(unsigned int virq)
70{
71 int irq = virq_to_hw(virq);
72 void __iomem *io_base = get_irq_chip_data(virq);
73
74 clrbits32(io_base + FLIPPER_IMR, 1 << irq);
75}
76
77static void flipper_pic_unmask(unsigned int virq)
78{
79 int irq = virq_to_hw(virq);
80 void __iomem *io_base = get_irq_chip_data(virq);
81
82 setbits32(io_base + FLIPPER_IMR, 1 << irq);
83}
84
85
86static struct irq_chip flipper_pic = {
87 .name = "flipper-pic",
88 .ack = flipper_pic_ack,
89 .mask_ack = flipper_pic_mask_and_ack,
90 .mask = flipper_pic_mask,
91 .unmask = flipper_pic_unmask,
92};
93
94/*
95 * IRQ host hooks.
96 *
97 */
98
99static struct irq_host *flipper_irq_host;
100
101static int flipper_pic_map(struct irq_host *h, unsigned int virq,
102 irq_hw_number_t hwirq)
103{
104 set_irq_chip_data(virq, h->host_data);
105 get_irq_desc(virq)->status |= IRQ_LEVEL;
106 set_irq_chip_and_handler(virq, &flipper_pic, handle_level_irq);
107 return 0;
108}
109
110static void flipper_pic_unmap(struct irq_host *h, unsigned int irq)
111{
112 set_irq_chip_data(irq, NULL);
113 set_irq_chip(irq, NULL);
114}
115
116static int flipper_pic_match(struct irq_host *h, struct device_node *np)
117{
118 return 1;
119}
120
121
122static struct irq_host_ops flipper_irq_host_ops = {
123 .map = flipper_pic_map,
124 .unmap = flipper_pic_unmap,
125 .match = flipper_pic_match,
126};
127
128/*
129 * Platform hooks.
130 *
131 */
132
133static void __flipper_quiesce(void __iomem *io_base)
134{
135 /* mask and ack all IRQs */
136 out_be32(io_base + FLIPPER_IMR, 0x00000000);
137 out_be32(io_base + FLIPPER_ICR, 0xffffffff);
138}
139
140struct irq_host * __init flipper_pic_init(struct device_node *np)
141{
142 struct device_node *pi;
143 struct irq_host *irq_host = NULL;
144 struct resource res;
145 void __iomem *io_base;
146 int retval;
147
148 pi = of_get_parent(np);
149 if (!pi) {
150 pr_err("no parent found\n");
151 goto out;
152 }
153 if (!of_device_is_compatible(pi, "nintendo,flipper-pi")) {
154 pr_err("unexpected parent compatible\n");
155 goto out;
156 }
157
158 retval = of_address_to_resource(pi, 0, &res);
159 if (retval) {
160 pr_err("no io memory range found\n");
161 goto out;
162 }
163 io_base = ioremap(res.start, resource_size(&res));
164
165 pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
166
167 __flipper_quiesce(io_base);
168
169 irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, FLIPPER_NR_IRQS,
170 &flipper_irq_host_ops, -1);
171 if (!irq_host) {
172 pr_err("failed to allocate irq_host\n");
173 return NULL;
174 }
175
176 irq_host->host_data = io_base;
177
178out:
179 return irq_host;
180}
181
182unsigned int flipper_pic_get_irq(void)
183{
184 void __iomem *io_base = flipper_irq_host->host_data;
185 int irq;
186 u32 irq_status;
187
188 irq_status = in_be32(io_base + FLIPPER_ICR) &
189 in_be32(io_base + FLIPPER_IMR);
190 if (irq_status == 0)
191 return NO_IRQ; /* no more IRQs pending */
192
193 irq = __ffs(irq_status);
194 return irq_linear_revmap(flipper_irq_host, irq);
195}
196
197/*
198 * Probe function.
199 *
200 */
201
202void __init flipper_pic_probe(void)
203{
204 struct device_node *np;
205
206 np = of_find_compatible_node(NULL, NULL, "nintendo,flipper-pic");
207 BUG_ON(!np);
208
209 flipper_irq_host = flipper_pic_init(np);
210 BUG_ON(!flipper_irq_host);
211
212 irq_set_default_host(flipper_irq_host);
213
214 of_node_put(np);
215}
216
217/*
218 * Misc functions related to the flipper chipset.
219 *
220 */
221
222/**
223 * flipper_quiesce() - quiesce flipper irq controller
224 *
225 * Mask and ack all interrupt sources.
226 *
227 */
228void flipper_quiesce(void)
229{
230 void __iomem *io_base = flipper_irq_host->host_data;
231
232 __flipper_quiesce(io_base);
233}
234
235/*
236 * Resets the platform.
237 */
238void flipper_platform_reset(void)
239{
240 void __iomem *io_base;
241
242 if (flipper_irq_host && flipper_irq_host->host_data) {
243 io_base = flipper_irq_host->host_data;
244 out_8(io_base + FLIPPER_RESET, 0x00);
245 }
246}
247
248/*
249 * Returns non-zero if the reset button is pressed.
250 */
251int flipper_is_reset_button_pressed(void)
252{
253 void __iomem *io_base;
254 u32 icr;
255
256 if (flipper_irq_host && flipper_irq_host->host_data) {
257 io_base = flipper_irq_host->host_data;
258 icr = in_be32(io_base + FLIPPER_ICR);
259 return !(icr & FLIPPER_ICR_RSS);
260 }
261 return 0;
262}
263
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.h b/arch/powerpc/platforms/embedded6xx/flipper-pic.h
new file mode 100644
index 000000000000..e339186b5663
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.h
@@ -0,0 +1,25 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/flipper-pic.h
3 *
4 * Nintendo GameCube/Wii "Flipper" interrupt controller support.
5 * Copyright (C) 2004-2009 The GameCube Linux Team
6 * Copyright (C) 2007,2008,2009 Albert Herranz
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 */
14
15#ifndef __FLIPPER_PIC_H
16#define __FLIPPER_PIC_H
17
18unsigned int flipper_pic_get_irq(void);
19void __init flipper_pic_probe(void);
20
21void flipper_quiesce(void);
22void flipper_platform_reset(void);
23int flipper_is_reset_button_pressed(void);
24
25#endif
diff --git a/arch/powerpc/platforms/embedded6xx/gamecube.c b/arch/powerpc/platforms/embedded6xx/gamecube.c
new file mode 100644
index 000000000000..1106fd99627f
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/gamecube.c
@@ -0,0 +1,118 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/gamecube.c
3 *
4 * Nintendo GameCube board-specific support
5 * Copyright (C) 2004-2009 The GameCube Linux Team
6 * Copyright (C) 2007,2008,2009 Albert Herranz
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 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/irq.h>
18#include <linux/kexec.h>
19#include <linux/seq_file.h>
20#include <linux/of_platform.h>
21
22#include <asm/io.h>
23#include <asm/machdep.h>
24#include <asm/prom.h>
25#include <asm/time.h>
26#include <asm/udbg.h>
27
28#include "flipper-pic.h"
29#include "usbgecko_udbg.h"
30
31
32static void gamecube_spin(void)
33{
34 /* spin until power button pressed */
35 for (;;)
36 cpu_relax();
37}
38
39static void gamecube_restart(char *cmd)
40{
41 local_irq_disable();
42 flipper_platform_reset();
43 gamecube_spin();
44}
45
46static void gamecube_power_off(void)
47{
48 local_irq_disable();
49 gamecube_spin();
50}
51
52static void gamecube_halt(void)
53{
54 gamecube_restart(NULL);
55}
56
57static void __init gamecube_init_early(void)
58{
59 ug_udbg_init();
60}
61
62static int __init gamecube_probe(void)
63{
64 unsigned long dt_root;
65
66 dt_root = of_get_flat_dt_root();
67 if (!of_flat_dt_is_compatible(dt_root, "nintendo,gamecube"))
68 return 0;
69
70 return 1;
71}
72
73static void gamecube_shutdown(void)
74{
75 flipper_quiesce();
76}
77
78#ifdef CONFIG_KEXEC
79static int gamecube_kexec_prepare(struct kimage *image)
80{
81 return 0;
82}
83#endif /* CONFIG_KEXEC */
84
85
86define_machine(gamecube) {
87 .name = "gamecube",
88 .probe = gamecube_probe,
89 .init_early = gamecube_init_early,
90 .restart = gamecube_restart,
91 .power_off = gamecube_power_off,
92 .halt = gamecube_halt,
93 .init_IRQ = flipper_pic_probe,
94 .get_irq = flipper_pic_get_irq,
95 .calibrate_decr = generic_calibrate_decr,
96 .progress = udbg_progress,
97 .machine_shutdown = gamecube_shutdown,
98#ifdef CONFIG_KEXEC
99 .machine_kexec_prepare = gamecube_kexec_prepare,
100#endif
101};
102
103
104static struct of_device_id gamecube_of_bus[] = {
105 { .compatible = "nintendo,flipper", },
106 { },
107};
108
109static int __init gamecube_device_probe(void)
110{
111 if (!machine_is(gamecube))
112 return 0;
113
114 of_platform_bus_probe(NULL, gamecube_of_bus, NULL);
115 return 0;
116}
117device_initcall(gamecube_device_probe);
118
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
new file mode 100644
index 000000000000..dd20bff33207
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -0,0 +1,241 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/hlwd-pic.c
3 *
4 * Nintendo Wii "Hollywood" interrupt controller support.
5 * Copyright (C) 2009 The GameCube Linux Team
6 * Copyright (C) 2009 Albert Herranz
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 */
14#define DRV_MODULE_NAME "hlwd-pic"
15#define pr_fmt(fmt) DRV_MODULE_NAME ": " fmt
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/irq.h>
20#include <linux/of.h>
21#include <asm/io.h>
22
23#include "hlwd-pic.h"
24
25#define HLWD_NR_IRQS 32
26
27/*
28 * Each interrupt has a corresponding bit in both
29 * the Interrupt Cause (ICR) and Interrupt Mask (IMR) registers.
30 *
31 * Enabling/disabling an interrupt line involves asserting/clearing
32 * the corresponding bit in IMR. ACK'ing a request simply involves
33 * asserting the corresponding bit in ICR.
34 */
35#define HW_BROADWAY_ICR 0x00
36#define HW_BROADWAY_IMR 0x04
37
38
39/*
40 * IRQ chip hooks.
41 *
42 */
43
44static void hlwd_pic_mask_and_ack(unsigned int virq)
45{
46 int irq = virq_to_hw(virq);
47 void __iomem *io_base = get_irq_chip_data(virq);
48 u32 mask = 1 << irq;
49
50 clrbits32(io_base + HW_BROADWAY_IMR, mask);
51 out_be32(io_base + HW_BROADWAY_ICR, mask);
52}
53
54static void hlwd_pic_ack(unsigned int virq)
55{
56 int irq = virq_to_hw(virq);
57 void __iomem *io_base = get_irq_chip_data(virq);
58
59 out_be32(io_base + HW_BROADWAY_ICR, 1 << irq);
60}
61
62static void hlwd_pic_mask(unsigned int virq)
63{
64 int irq = virq_to_hw(virq);
65 void __iomem *io_base = get_irq_chip_data(virq);
66
67 clrbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
68}
69
70static void hlwd_pic_unmask(unsigned int virq)
71{
72 int irq = virq_to_hw(virq);
73 void __iomem *io_base = get_irq_chip_data(virq);
74
75 setbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
76}
77
78
79static struct irq_chip hlwd_pic = {
80 .name = "hlwd-pic",
81 .ack = hlwd_pic_ack,
82 .mask_ack = hlwd_pic_mask_and_ack,
83 .mask = hlwd_pic_mask,
84 .unmask = hlwd_pic_unmask,
85};
86
87/*
88 * IRQ host hooks.
89 *
90 */
91
92static struct irq_host *hlwd_irq_host;
93
94static int hlwd_pic_map(struct irq_host *h, unsigned int virq,
95 irq_hw_number_t hwirq)
96{
97 set_irq_chip_data(virq, h->host_data);
98 get_irq_desc(virq)->status |= IRQ_LEVEL;
99 set_irq_chip_and_handler(virq, &hlwd_pic, handle_level_irq);
100 return 0;
101}
102
103static void hlwd_pic_unmap(struct irq_host *h, unsigned int irq)
104{
105 set_irq_chip_data(irq, NULL);
106 set_irq_chip(irq, NULL);
107}
108
109static struct irq_host_ops hlwd_irq_host_ops = {
110 .map = hlwd_pic_map,
111 .unmap = hlwd_pic_unmap,
112};
113
114static unsigned int __hlwd_pic_get_irq(struct irq_host *h)
115{
116 void __iomem *io_base = h->host_data;
117 int irq;
118 u32 irq_status;
119
120 irq_status = in_be32(io_base + HW_BROADWAY_ICR) &
121 in_be32(io_base + HW_BROADWAY_IMR);
122 if (irq_status == 0)
123 return NO_IRQ; /* no more IRQs pending */
124
125 irq = __ffs(irq_status);
126 return irq_linear_revmap(h, irq);
127}
128
129static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
130 struct irq_desc *desc)
131{
132 struct irq_host *irq_host = get_irq_data(cascade_virq);
133 unsigned int virq;
134
135 spin_lock(&desc->lock);
136 desc->chip->mask(cascade_virq); /* IRQ_LEVEL */
137 spin_unlock(&desc->lock);
138
139 virq = __hlwd_pic_get_irq(irq_host);
140 if (virq != NO_IRQ)
141 generic_handle_irq(virq);
142 else
143 pr_err("spurious interrupt!\n");
144
145 spin_lock(&desc->lock);
146 desc->chip->ack(cascade_virq); /* IRQ_LEVEL */
147 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
148 desc->chip->unmask(cascade_virq);
149 spin_unlock(&desc->lock);
150}
151
152/*
153 * Platform hooks.
154 *
155 */
156
157static void __hlwd_quiesce(void __iomem *io_base)
158{
159 /* mask and ack all IRQs */
160 out_be32(io_base + HW_BROADWAY_IMR, 0);
161 out_be32(io_base + HW_BROADWAY_ICR, 0xffffffff);
162}
163
164struct irq_host *hlwd_pic_init(struct device_node *np)
165{
166 struct irq_host *irq_host;
167 struct resource res;
168 void __iomem *io_base;
169 int retval;
170
171 retval = of_address_to_resource(np, 0, &res);
172 if (retval) {
173 pr_err("no io memory range found\n");
174 return NULL;
175 }
176 io_base = ioremap(res.start, resource_size(&res));
177 if (!io_base) {
178 pr_err("ioremap failed\n");
179 return NULL;
180 }
181
182 pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
183
184 __hlwd_quiesce(io_base);
185
186 irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, HLWD_NR_IRQS,
187 &hlwd_irq_host_ops, -1);
188 if (!irq_host) {
189 pr_err("failed to allocate irq_host\n");
190 return NULL;
191 }
192 irq_host->host_data = io_base;
193
194 return irq_host;
195}
196
197unsigned int hlwd_pic_get_irq(void)
198{
199 return __hlwd_pic_get_irq(hlwd_irq_host);
200}
201
202/*
203 * Probe function.
204 *
205 */
206
207void hlwd_pic_probe(void)
208{
209 struct irq_host *host;
210 struct device_node *np;
211 const u32 *interrupts;
212 int cascade_virq;
213
214 for_each_compatible_node(np, NULL, "nintendo,hollywood-pic") {
215 interrupts = of_get_property(np, "interrupts", NULL);
216 if (interrupts) {
217 host = hlwd_pic_init(np);
218 BUG_ON(!host);
219 cascade_virq = irq_of_parse_and_map(np, 0);
220 set_irq_data(cascade_virq, host);
221 set_irq_chained_handler(cascade_virq,
222 hlwd_pic_irq_cascade);
223 hlwd_irq_host = host;
224 break;
225 }
226 }
227}
228
229/**
230 * hlwd_quiesce() - quiesce hollywood irq controller
231 *
232 * Mask and ack all interrupt sources.
233 *
234 */
235void hlwd_quiesce(void)
236{
237 void __iomem *io_base = hlwd_irq_host->host_data;
238
239 __hlwd_quiesce(io_base);
240}
241
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.h b/arch/powerpc/platforms/embedded6xx/hlwd-pic.h
new file mode 100644
index 000000000000..d2e5a092761e
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.h
@@ -0,0 +1,22 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/hlwd-pic.h
3 *
4 * Nintendo Wii "Hollywood" interrupt controller support.
5 * Copyright (C) 2009 The GameCube Linux Team
6 * Copyright (C) 2009 Albert Herranz
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 */
14
15#ifndef __HLWD_PIC_H
16#define __HLWD_PIC_H
17
18extern unsigned int hlwd_pic_get_irq(void);
19extern void hlwd_pic_probe(void);
20extern void hlwd_quiesce(void);
21
22#endif
diff --git a/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
new file mode 100644
index 000000000000..20a8ed91962e
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
@@ -0,0 +1,328 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
3 *
4 * udbg serial input/output routines for the USB Gecko adapter.
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#include <mm/mmu_decl.h>
16
17#include <asm/io.h>
18#include <asm/prom.h>
19#include <asm/udbg.h>
20#include <asm/fixmap.h>
21
22#include "usbgecko_udbg.h"
23
24
25#define EXI_CLK_32MHZ 5
26
27#define EXI_CSR 0x00
28#define EXI_CSR_CLKMASK (0x7<<4)
29#define EXI_CSR_CLK_32MHZ (EXI_CLK_32MHZ<<4)
30#define EXI_CSR_CSMASK (0x7<<7)
31#define EXI_CSR_CS_0 (0x1<<7) /* Chip Select 001 */
32
33#define EXI_CR 0x0c
34#define EXI_CR_TSTART (1<<0)
35#define EXI_CR_WRITE (1<<2)
36#define EXI_CR_READ_WRITE (2<<2)
37#define EXI_CR_TLEN(len) (((len)-1)<<4)
38
39#define EXI_DATA 0x10
40
41#define UG_READ_ATTEMPTS 100
42#define UG_WRITE_ATTEMPTS 100
43
44
45static void __iomem *ug_io_base;
46
47/*
48 * Performs one input/output transaction between the exi host and the usbgecko.
49 */
50static u32 ug_io_transaction(u32 in)
51{
52 u32 __iomem *csr_reg = ug_io_base + EXI_CSR;
53 u32 __iomem *data_reg = ug_io_base + EXI_DATA;
54 u32 __iomem *cr_reg = ug_io_base + EXI_CR;
55 u32 csr, data, cr;
56
57 /* select */
58 csr = EXI_CSR_CLK_32MHZ | EXI_CSR_CS_0;
59 out_be32(csr_reg, csr);
60
61 /* read/write */
62 data = in;
63 out_be32(data_reg, data);
64 cr = EXI_CR_TLEN(2) | EXI_CR_READ_WRITE | EXI_CR_TSTART;
65 out_be32(cr_reg, cr);
66
67 while (in_be32(cr_reg) & EXI_CR_TSTART)
68 barrier();
69
70 /* deselect */
71 out_be32(csr_reg, 0);
72
73 /* result */
74 data = in_be32(data_reg);
75
76 return data;
77}
78
79/*
80 * Returns true if an usbgecko adapter is found.
81 */
82static int ug_is_adapter_present(void)
83{
84 if (!ug_io_base)
85 return 0;
86
87 return ug_io_transaction(0x90000000) == 0x04700000;
88}
89
90/*
91 * Returns true if the TX fifo is ready for transmission.
92 */
93static int ug_is_txfifo_ready(void)
94{
95 return ug_io_transaction(0xc0000000) & 0x04000000;
96}
97
98/*
99 * Tries to transmit a character.
100 * If the TX fifo is not ready the result is undefined.
101 */
102static void ug_raw_putc(char ch)
103{
104 ug_io_transaction(0xb0000000 | (ch << 20));
105}
106
107/*
108 * Transmits a character.
109 * It silently fails if the TX fifo is not ready after a number of retries.
110 */
111static void ug_putc(char ch)
112{
113 int count = UG_WRITE_ATTEMPTS;
114
115 if (!ug_io_base)
116 return;
117
118 if (ch == '\n')
119 ug_putc('\r');
120
121 while (!ug_is_txfifo_ready() && count--)
122 barrier();
123 if (count >= 0)
124 ug_raw_putc(ch);
125}
126
127/*
128 * Returns true if the RX fifo is ready for transmission.
129 */
130static int ug_is_rxfifo_ready(void)
131{
132 return ug_io_transaction(0xd0000000) & 0x04000000;
133}
134
135/*
136 * Tries to receive a character.
137 * If a character is unavailable the function returns -1.
138 */
139static int ug_raw_getc(void)
140{
141 u32 data = ug_io_transaction(0xa0000000);
142 if (data & 0x08000000)
143 return (data >> 16) & 0xff;
144 else
145 return -1;
146}
147
148/*
149 * Receives a character.
150 * It fails if the RX fifo is not ready after a number of retries.
151 */
152static int ug_getc(void)
153{
154 int count = UG_READ_ATTEMPTS;
155
156 if (!ug_io_base)
157 return -1;
158
159 while (!ug_is_rxfifo_ready() && count--)
160 barrier();
161 return ug_raw_getc();
162}
163
164/*
165 * udbg functions.
166 *
167 */
168
169/*
170 * Transmits a character.
171 */
172void ug_udbg_putc(char ch)
173{
174 ug_putc(ch);
175}
176
177/*
178 * Receives a character. Waits until a character is available.
179 */
180static int ug_udbg_getc(void)
181{
182 int ch;
183
184 while ((ch = ug_getc()) == -1)
185 barrier();
186 return ch;
187}
188
189/*
190 * Receives a character. If a character is not available, returns -1.
191 */
192static int ug_udbg_getc_poll(void)
193{
194 if (!ug_is_rxfifo_ready())
195 return -1;
196 return ug_getc();
197}
198
199/*
200 * Retrieves and prepares the virtual address needed to access the hardware.
201 */
202static void __iomem *ug_udbg_setup_exi_io_base(struct device_node *np)
203{
204 void __iomem *exi_io_base = NULL;
205 phys_addr_t paddr;
206 const unsigned int *reg;
207
208 reg = of_get_property(np, "reg", NULL);
209 if (reg) {
210 paddr = of_translate_address(np, reg);
211 if (paddr)
212 exi_io_base = ioremap(paddr, reg[1]);
213 }
214 return exi_io_base;
215}
216
217/*
218 * Checks if a USB Gecko adapter is inserted in any memory card slot.
219 */
220static void __iomem *ug_udbg_probe(void __iomem *exi_io_base)
221{
222 int i;
223
224 /* look for a usbgecko on memcard slots A and B */
225 for (i = 0; i < 2; i++) {
226 ug_io_base = exi_io_base + 0x14 * i;
227 if (ug_is_adapter_present())
228 break;
229 }
230 if (i == 2)
231 ug_io_base = NULL;
232 return ug_io_base;
233
234}
235
236/*
237 * USB Gecko udbg support initialization.
238 */
239void __init ug_udbg_init(void)
240{
241 struct device_node *np;
242 void __iomem *exi_io_base;
243
244 if (ug_io_base)
245 udbg_printf("%s: early -> final\n", __func__);
246
247 np = of_find_compatible_node(NULL, NULL, "nintendo,flipper-exi");
248 if (!np) {
249 udbg_printf("%s: EXI node not found\n", __func__);
250 goto done;
251 }
252
253 exi_io_base = ug_udbg_setup_exi_io_base(np);
254 if (!exi_io_base) {
255 udbg_printf("%s: failed to setup EXI io base\n", __func__);
256 goto done;
257 }
258
259 if (!ug_udbg_probe(exi_io_base)) {
260 udbg_printf("usbgecko_udbg: not found\n");
261 iounmap(exi_io_base);
262 } else {
263 udbg_putc = ug_udbg_putc;
264 udbg_getc = ug_udbg_getc;
265 udbg_getc_poll = ug_udbg_getc_poll;
266 udbg_printf("usbgecko_udbg: ready\n");
267 }
268
269done:
270 if (np)
271 of_node_put(np);
272 return;
273}
274
275#ifdef CONFIG_PPC_EARLY_DEBUG_USBGECKO
276
277static phys_addr_t __init ug_early_grab_io_addr(void)
278{
279#if defined(CONFIG_GAMECUBE)
280 return 0x0c000000;
281#elif defined(CONFIG_WII)
282 return 0x0d000000;
283#else
284#error Invalid platform for USB Gecko based early debugging.
285#endif
286}
287
288/*
289 * USB Gecko early debug support initialization for udbg.
290 */
291void __init udbg_init_usbgecko(void)
292{
293 void __iomem *early_debug_area;
294 void __iomem *exi_io_base;
295
296 /*
297 * At this point we have a BAT already setup that enables I/O
298 * to the EXI hardware.
299 *
300 * The BAT uses a virtual address range reserved at the fixmap.
301 * This must match the virtual address configured in
302 * head_32.S:setup_usbgecko_bat().
303 */
304 early_debug_area = (void __iomem *)__fix_to_virt(FIX_EARLY_DEBUG_BASE);
305 exi_io_base = early_debug_area + 0x00006800;
306
307 /* try to detect a USB Gecko */
308 if (!ug_udbg_probe(exi_io_base))
309 return;
310
311 /* we found a USB Gecko, load udbg hooks */
312 udbg_putc = ug_udbg_putc;
313 udbg_getc = ug_udbg_getc;
314 udbg_getc_poll = ug_udbg_getc_poll;
315
316 /*
317 * Prepare again the same BAT for MMU_init.
318 * This allows udbg I/O to continue working after the MMU is
319 * turned on for real.
320 * It is safe to continue using the same virtual address as it is
321 * a reserved fixmap area.
322 */
323 setbat(1, (unsigned long)early_debug_area,
324 ug_early_grab_io_addr(), 128*1024, PAGE_KERNEL_NCG);
325}
326
327#endif /* CONFIG_PPC_EARLY_DEBUG_USBGECKO */
328
diff --git a/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h
new file mode 100644
index 000000000000..bb6cde4ad764
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h
@@ -0,0 +1,32 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h
3 *
4 * udbg serial input/output routines for the USB Gecko adapter.
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14
15#ifndef __USBGECKO_UDBG_H
16#define __USBGECKO_UDBG_H
17
18#ifdef CONFIG_USBGECKO_UDBG
19
20extern void __init ug_udbg_init(void);
21
22#else
23
24static inline void __init ug_udbg_init(void)
25{
26}
27
28#endif /* CONFIG_USBGECKO_UDBG */
29
30void __init udbg_init_usbgecko(void);
31
32#endif /* __USBGECKO_UDBG_H */
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
new file mode 100644
index 000000000000..57e5b608fa1a
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -0,0 +1,268 @@
1/*
2 * arch/powerpc/platforms/embedded6xx/wii.c
3 *
4 * Nintendo Wii board-specific support
5 * Copyright (C) 2008-2009 The GameCube Linux Team
6 * Copyright (C) 2008,2009 Albert Herranz
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 */
14#define DRV_MODULE_NAME "wii"
15#define pr_fmt(fmt) DRV_MODULE_NAME ": " fmt
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/irq.h>
20#include <linux/seq_file.h>
21#include <linux/kexec.h>
22#include <linux/of_platform.h>
23#include <linux/lmb.h>
24#include <mm/mmu_decl.h>
25
26#include <asm/io.h>
27#include <asm/machdep.h>
28#include <asm/prom.h>
29#include <asm/time.h>
30#include <asm/udbg.h>
31
32#include "flipper-pic.h"
33#include "hlwd-pic.h"
34#include "usbgecko_udbg.h"
35
36/* control block */
37#define HW_CTRL_COMPATIBLE "nintendo,hollywood-control"
38
39#define HW_CTRL_RESETS 0x94
40#define HW_CTRL_RESETS_SYS (1<<0)
41
42/* gpio */
43#define HW_GPIO_COMPATIBLE "nintendo,hollywood-gpio"
44
45#define HW_GPIO_BASE(idx) (idx * 0x20)
46#define HW_GPIO_OUT(idx) (HW_GPIO_BASE(idx) + 0)
47#define HW_GPIO_DIR(idx) (HW_GPIO_BASE(idx) + 4)
48
49#define HW_GPIO_SHUTDOWN (1<<1)
50#define HW_GPIO_SLOT_LED (1<<5)
51#define HW_GPIO_SENSOR_BAR (1<<8)
52
53
54static void __iomem *hw_ctrl;
55static void __iomem *hw_gpio;
56
57unsigned long wii_hole_start;
58unsigned long wii_hole_size;
59
60
61static int __init page_aligned(unsigned long x)
62{
63 return !(x & (PAGE_SIZE-1));
64}
65
66void __init wii_memory_fixups(void)
67{
68 struct lmb_property *p = lmb.memory.region;
69
70 /*
71 * This is part of a workaround to allow the use of two
72 * discontiguous RAM ranges on the Wii, even if this is
73 * currently unsupported on 32-bit PowerPC Linux.
74 *
75 * We coealesce the two memory ranges of the Wii into a
76 * single range, then create a reservation for the "hole"
77 * between both ranges.
78 */
79
80 BUG_ON(lmb.memory.cnt != 2);
81 BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base));
82
83 p[0].size = _ALIGN_DOWN(p[0].size, PAGE_SIZE);
84 p[1].size = _ALIGN_DOWN(p[1].size, PAGE_SIZE);
85
86 wii_hole_start = p[0].base + p[0].size;
87 wii_hole_size = p[1].base - wii_hole_start;
88
89 pr_info("MEM1: <%08llx %08llx>\n", p[0].base, p[0].size);
90 pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size);
91 pr_info("MEM2: <%08llx %08llx>\n", p[1].base, p[1].size);
92
93 p[0].size += wii_hole_size + p[1].size;
94
95 lmb.memory.cnt = 1;
96 lmb_analyze();
97
98 /* reserve the hole */
99 lmb_reserve(wii_hole_start, wii_hole_size);
100
101 /* allow ioremapping the address space in the hole */
102 __allow_ioremap_reserved = 1;
103}
104
105unsigned long __init wii_mmu_mapin_mem2(unsigned long top)
106{
107 unsigned long delta, size, bl;
108 unsigned long max_size = (256<<20);
109
110 /* MEM2 64MB@0x10000000 */
111 delta = wii_hole_start + wii_hole_size;
112 size = top - delta;
113 for (bl = 128<<10; bl < max_size; bl <<= 1) {
114 if (bl * 2 > size)
115 break;
116 }
117 setbat(4, PAGE_OFFSET+delta, delta, bl, PAGE_KERNEL_X);
118 return delta + bl;
119}
120
121static void wii_spin(void)
122{
123 local_irq_disable();
124 for (;;)
125 cpu_relax();
126}
127
128static void __iomem *wii_ioremap_hw_regs(char *name, char *compatible)
129{
130 void __iomem *hw_regs = NULL;
131 struct device_node *np;
132 struct resource res;
133 int error = -ENODEV;
134
135 np = of_find_compatible_node(NULL, NULL, compatible);
136 if (!np) {
137 pr_err("no compatible node found for %s\n", compatible);
138 goto out;
139 }
140 error = of_address_to_resource(np, 0, &res);
141 if (error) {
142 pr_err("no valid reg found for %s\n", np->name);
143 goto out_put;
144 }
145
146 hw_regs = ioremap(res.start, resource_size(&res));
147 if (hw_regs) {
148 pr_info("%s at 0x%08x mapped to 0x%p\n", name,
149 res.start, hw_regs);
150 }
151
152out_put:
153 of_node_put(np);
154out:
155 return hw_regs;
156}
157
158static void __init wii_setup_arch(void)
159{
160 hw_ctrl = wii_ioremap_hw_regs("hw_ctrl", HW_CTRL_COMPATIBLE);
161 hw_gpio = wii_ioremap_hw_regs("hw_gpio", HW_GPIO_COMPATIBLE);
162 if (hw_gpio) {
163 /* turn off the front blue led and IR light */
164 clrbits32(hw_gpio + HW_GPIO_OUT(0),
165 HW_GPIO_SLOT_LED | HW_GPIO_SENSOR_BAR);
166 }
167}
168
169static void wii_restart(char *cmd)
170{
171 local_irq_disable();
172
173 if (hw_ctrl) {
174 /* clear the system reset pin to cause a reset */
175 clrbits32(hw_ctrl + HW_CTRL_RESETS, HW_CTRL_RESETS_SYS);
176 }
177 wii_spin();
178}
179
180static void wii_power_off(void)
181{
182 local_irq_disable();
183
184 if (hw_gpio) {
185 /* make sure that the poweroff GPIO is configured as output */
186 setbits32(hw_gpio + HW_GPIO_DIR(1), HW_GPIO_SHUTDOWN);
187
188 /* drive the poweroff GPIO high */
189 setbits32(hw_gpio + HW_GPIO_OUT(1), HW_GPIO_SHUTDOWN);
190 }
191 wii_spin();
192}
193
194static void wii_halt(void)
195{
196 if (ppc_md.restart)
197 ppc_md.restart(NULL);
198 wii_spin();
199}
200
201static void __init wii_init_early(void)
202{
203 ug_udbg_init();
204}
205
206static void __init wii_pic_probe(void)
207{
208 flipper_pic_probe();
209 hlwd_pic_probe();
210}
211
212static int __init wii_probe(void)
213{
214 unsigned long dt_root;
215
216 dt_root = of_get_flat_dt_root();
217 if (!of_flat_dt_is_compatible(dt_root, "nintendo,wii"))
218 return 0;
219
220 return 1;
221}
222
223static void wii_shutdown(void)
224{
225 hlwd_quiesce();
226 flipper_quiesce();
227}
228
229#ifdef CONFIG_KEXEC
230static int wii_machine_kexec_prepare(struct kimage *image)
231{
232 return 0;
233}
234#endif /* CONFIG_KEXEC */
235
236define_machine(wii) {
237 .name = "wii",
238 .probe = wii_probe,
239 .init_early = wii_init_early,
240 .setup_arch = wii_setup_arch,
241 .restart = wii_restart,
242 .power_off = wii_power_off,
243 .halt = wii_halt,
244 .init_IRQ = wii_pic_probe,
245 .get_irq = flipper_pic_get_irq,
246 .calibrate_decr = generic_calibrate_decr,
247 .progress = udbg_progress,
248 .machine_shutdown = wii_shutdown,
249#ifdef CONFIG_KEXEC
250 .machine_kexec_prepare = wii_machine_kexec_prepare,
251#endif
252};
253
254static struct of_device_id wii_of_bus[] = {
255 { .compatible = "nintendo,hollywood", },
256 { },
257};
258
259static int __init wii_device_probe(void)
260{
261 if (!machine_is(wii))
262 return 0;
263
264 of_platform_bus_probe(NULL, wii_of_bus, NULL);
265 return 0;
266}
267device_initcall(wii_device_probe);
268
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index 07762259c60a..86c4b29eea89 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -217,9 +217,9 @@ void __init iSeries_activate_IRQs()
217 struct irq_desc *desc = irq_to_desc(irq); 217 struct irq_desc *desc = irq_to_desc(irq);
218 218
219 if (desc && desc->chip && desc->chip->startup) { 219 if (desc && desc->chip && desc->chip->startup) {
220 spin_lock_irqsave(&desc->lock, flags); 220 raw_spin_lock_irqsave(&desc->lock, flags);
221 desc->chip->startup(irq); 221 desc->chip->startup(irq);
222 spin_unlock_irqrestore(&desc->lock, flags); 222 raw_spin_unlock_irqrestore(&desc->lock, flags);
223 } 223 }
224 } 224 }
225} 225}
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 0d9343df35bc..6617915bcb1a 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -855,59 +855,58 @@ static int mf_get_boot_rtc(struct rtc_time *tm)
855} 855}
856 856
857#ifdef CONFIG_PROC_FS 857#ifdef CONFIG_PROC_FS
858 858static int mf_cmdline_proc_show(struct seq_file *m, void *v)
859static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
860 int count, int *eof, void *data)
861{ 859{
862 int len; 860 char *page, *p;
863 char *p;
864 struct vsp_cmd_data vsp_cmd; 861 struct vsp_cmd_data vsp_cmd;
865 int rc; 862 int rc;
866 dma_addr_t dma_addr; 863 dma_addr_t dma_addr;
867 864
868 /* The HV appears to return no more than 256 bytes of command line */ 865 /* The HV appears to return no more than 256 bytes of command line */
869 if (off >= 256) 866 page = kmalloc(256, GFP_KERNEL);
870 return 0; 867 if (!page)
871 if ((off + count) > 256) 868 return -ENOMEM;
872 count = 256 - off;
873 869
874 dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); 870 dma_addr = iseries_hv_map(page, 256, DMA_FROM_DEVICE);
875 if (dma_addr == DMA_ERROR_CODE) 871 if (dma_addr == DMA_ERROR_CODE) {
872 kfree(page);
876 return -ENOMEM; 873 return -ENOMEM;
877 memset(page, 0, off + count); 874 }
875 memset(page, 0, 256);
878 memset(&vsp_cmd, 0, sizeof(vsp_cmd)); 876 memset(&vsp_cmd, 0, sizeof(vsp_cmd));
879 vsp_cmd.cmd = 33; 877 vsp_cmd.cmd = 33;
880 vsp_cmd.sub_data.kern.token = dma_addr; 878 vsp_cmd.sub_data.kern.token = dma_addr;
881 vsp_cmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex; 879 vsp_cmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex;
882 vsp_cmd.sub_data.kern.side = (u64)data; 880 vsp_cmd.sub_data.kern.side = (u64)m->private;
883 vsp_cmd.sub_data.kern.length = off + count; 881 vsp_cmd.sub_data.kern.length = 256;
884 mb(); 882 mb();
885 rc = signal_vsp_instruction(&vsp_cmd); 883 rc = signal_vsp_instruction(&vsp_cmd);
886 iseries_hv_unmap(dma_addr, off + count, DMA_FROM_DEVICE); 884 iseries_hv_unmap(dma_addr, 256, DMA_FROM_DEVICE);
887 if (rc) 885 if (rc) {
886 kfree(page);
888 return rc; 887 return rc;
889 if (vsp_cmd.result_code != 0) 888 }
889 if (vsp_cmd.result_code != 0) {
890 kfree(page);
890 return -ENOMEM; 891 return -ENOMEM;
892 }
891 p = page; 893 p = page;
892 len = 0; 894 while (p - page < 256) {
893 while (len < (off + count)) { 895 if (*p == '\0' || *p == '\n') {
894 if ((*p == '\0') || (*p == '\n')) { 896 *p = '\n';
895 if (*p == '\0')
896 *p = '\n';
897 p++;
898 len++;
899 *eof = 1;
900 break; 897 break;
901 } 898 }
902 p++; 899 p++;
903 len++;
904 }
905 900
906 if (len < off) {
907 *eof = 1;
908 len = 0;
909 } 901 }
910 return len; 902 seq_write(m, page, p - page);
903 kfree(page);
904 return 0;
905}
906
907static int mf_cmdline_proc_open(struct inode *inode, struct file *file)
908{
909 return single_open(file, mf_cmdline_proc_show, PDE(inode)->data);
911} 910}
912 911
913#if 0 912#if 0
@@ -962,10 +961,8 @@ static int proc_mf_dump_vmlinux(char *page, char **start, off_t off,
962} 961}
963#endif 962#endif
964 963
965static int proc_mf_dump_side(char *page, char **start, off_t off, 964static int mf_side_proc_show(struct seq_file *m, void *v)
966 int count, int *eof, void *data)
967{ 965{
968 int len;
969 char mf_current_side = ' '; 966 char mf_current_side = ' ';
970 struct vsp_cmd_data vsp_cmd; 967 struct vsp_cmd_data vsp_cmd;
971 968
@@ -989,21 +986,17 @@ static int proc_mf_dump_side(char *page, char **start, off_t off,
989 } 986 }
990 } 987 }
991 988
992 len = sprintf(page, "%c\n", mf_current_side); 989 seq_printf(m, "%c\n", mf_current_side);
990 return 0;
991}
993 992
994 if (len <= (off + count)) 993static int mf_side_proc_open(struct inode *inode, struct file *file)
995 *eof = 1; 994{
996 *start = page + off; 995 return single_open(file, mf_side_proc_show, NULL);
997 len -= off;
998 if (len > count)
999 len = count;
1000 if (len < 0)
1001 len = 0;
1002 return len;
1003} 996}
1004 997
1005static int proc_mf_change_side(struct file *file, const char __user *buffer, 998static ssize_t mf_side_proc_write(struct file *file, const char __user *buffer,
1006 unsigned long count, void *data) 999 size_t count, loff_t *pos)
1007{ 1000{
1008 char side; 1001 char side;
1009 u64 newSide; 1002 u64 newSide;
@@ -1041,6 +1034,15 @@ static int proc_mf_change_side(struct file *file, const char __user *buffer,
1041 return count; 1034 return count;
1042} 1035}
1043 1036
1037static const struct file_operations mf_side_proc_fops = {
1038 .owner = THIS_MODULE,
1039 .open = mf_side_proc_open,
1040 .read = seq_read,
1041 .llseek = seq_lseek,
1042 .release = single_release,
1043 .write = mf_side_proc_write,
1044};
1045
1044#if 0 1046#if 0
1045static void mf_getSrcHistory(char *buffer, int size) 1047static void mf_getSrcHistory(char *buffer, int size)
1046{ 1048{
@@ -1087,8 +1089,7 @@ static void mf_getSrcHistory(char *buffer, int size)
1087} 1089}
1088#endif 1090#endif
1089 1091
1090static int proc_mf_dump_src(char *page, char **start, off_t off, 1092static int mf_src_proc_show(struct seq_file *m, void *v)
1091 int count, int *eof, void *data)
1092{ 1093{
1093#if 0 1094#if 0
1094 int len; 1095 int len;
@@ -1109,8 +1110,13 @@ static int proc_mf_dump_src(char *page, char **start, off_t off,
1109#endif 1110#endif
1110} 1111}
1111 1112
1112static int proc_mf_change_src(struct file *file, const char __user *buffer, 1113static int mf_src_proc_open(struct inode *inode, struct file *file)
1113 unsigned long count, void *data) 1114{
1115 return single_open(file, mf_src_proc_show, NULL);
1116}
1117
1118static ssize_t mf_src_proc_write(struct file *file, const char __user *buffer,
1119 size_t count, loff_t *pos)
1114{ 1120{
1115 char stkbuf[10]; 1121 char stkbuf[10];
1116 1122
@@ -1135,9 +1141,19 @@ static int proc_mf_change_src(struct file *file, const char __user *buffer,
1135 return count; 1141 return count;
1136} 1142}
1137 1143
1138static int proc_mf_change_cmdline(struct file *file, const char __user *buffer, 1144static const struct file_operations mf_src_proc_fops = {
1139 unsigned long count, void *data) 1145 .owner = THIS_MODULE,
1146 .open = mf_src_proc_open,
1147 .read = seq_read,
1148 .llseek = seq_lseek,
1149 .release = single_release,
1150 .write = mf_src_proc_write,
1151};
1152
1153static ssize_t mf_cmdline_proc_write(struct file *file, const char __user *buffer,
1154 size_t count, loff_t *pos)
1140{ 1155{
1156 void *data = PDE(file->f_path.dentry->d_inode)->data;
1141 struct vsp_cmd_data vsp_cmd; 1157 struct vsp_cmd_data vsp_cmd;
1142 dma_addr_t dma_addr; 1158 dma_addr_t dma_addr;
1143 char *page; 1159 char *page;
@@ -1172,6 +1188,15 @@ out:
1172 return ret; 1188 return ret;
1173} 1189}
1174 1190
1191static const struct file_operations mf_cmdline_proc_fops = {
1192 .owner = THIS_MODULE,
1193 .open = mf_cmdline_proc_open,
1194 .read = seq_read,
1195 .llseek = seq_lseek,
1196 .release = single_release,
1197 .write = mf_cmdline_proc_write,
1198};
1199
1175static ssize_t proc_mf_change_vmlinux(struct file *file, 1200static ssize_t proc_mf_change_vmlinux(struct file *file,
1176 const char __user *buf, 1201 const char __user *buf,
1177 size_t count, loff_t *ppos) 1202 size_t count, loff_t *ppos)
@@ -1246,12 +1271,10 @@ static int __init mf_proc_init(void)
1246 if (!mf) 1271 if (!mf)
1247 return 1; 1272 return 1;
1248 1273
1249 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); 1274 ent = proc_create_data("cmdline", S_IRUSR|S_IWUSR, mf,
1275 &mf_cmdline_proc_fops, (void *)(long)i);
1250 if (!ent) 1276 if (!ent)
1251 return 1; 1277 return 1;
1252 ent->data = (void *)(long)i;
1253 ent->read_proc = proc_mf_dump_cmdline;
1254 ent->write_proc = proc_mf_change_cmdline;
1255 1278
1256 if (i == 3) /* no vmlinux entry for 'D' */ 1279 if (i == 3) /* no vmlinux entry for 'D' */
1257 continue; 1280 continue;
@@ -1263,19 +1286,15 @@ static int __init mf_proc_init(void)
1263 return 1; 1286 return 1;
1264 } 1287 }
1265 1288
1266 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1289 ent = proc_create("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root,
1290 &mf_side_proc_fops);
1267 if (!ent) 1291 if (!ent)
1268 return 1; 1292 return 1;
1269 ent->data = (void *)0;
1270 ent->read_proc = proc_mf_dump_side;
1271 ent->write_proc = proc_mf_change_side;
1272 1293
1273 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1294 ent = proc_create("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root,
1295 &mf_src_proc_fops);
1274 if (!ent) 1296 if (!ent)
1275 return 1; 1297 return 1;
1276 ent->data = (void *)0;
1277 ent->read_proc = proc_mf_dump_src;
1278 ent->write_proc = proc_mf_change_src;
1279 1298
1280 return 0; 1299 return 0;
1281} 1300}
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index 49ff4dc422b7..5aea94f30836 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -116,7 +116,7 @@ static int proc_viopath_show(struct seq_file *m, void *v)
116 u16 vlanMap; 116 u16 vlanMap;
117 dma_addr_t handle; 117 dma_addr_t handle;
118 HvLpEvent_Rc hvrc; 118 HvLpEvent_Rc hvrc;
119 DECLARE_COMPLETION(done); 119 DECLARE_COMPLETION_ONSTACK(done);
120 struct device_node *node; 120 struct device_node *node;
121 const char *sysid; 121 const char *sysid;
122 122
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index a4619347aa7e..242f8095c2df 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -71,7 +71,7 @@ static void pas_restart(char *cmd)
71} 71}
72 72
73#ifdef CONFIG_SMP 73#ifdef CONFIG_SMP
74static raw_spinlock_t timebase_lock; 74static arch_spinlock_t timebase_lock;
75static unsigned long timebase; 75static unsigned long timebase;
76 76
77static void __devinit pas_give_timebase(void) 77static void __devinit pas_give_timebase(void)
@@ -80,11 +80,11 @@ static void __devinit pas_give_timebase(void)
80 80
81 local_irq_save(flags); 81 local_irq_save(flags);
82 hard_irq_disable(); 82 hard_irq_disable();
83 __raw_spin_lock(&timebase_lock); 83 arch_spin_lock(&timebase_lock);
84 mtspr(SPRN_TBCTL, TBCTL_FREEZE); 84 mtspr(SPRN_TBCTL, TBCTL_FREEZE);
85 isync(); 85 isync();
86 timebase = get_tb(); 86 timebase = get_tb();
87 __raw_spin_unlock(&timebase_lock); 87 arch_spin_unlock(&timebase_lock);
88 88
89 while (timebase) 89 while (timebase)
90 barrier(); 90 barrier();
@@ -97,10 +97,10 @@ static void __devinit pas_take_timebase(void)
97 while (!timebase) 97 while (!timebase)
98 smp_rmb(); 98 smp_rmb();
99 99
100 __raw_spin_lock(&timebase_lock); 100 arch_spin_lock(&timebase_lock);
101 set_tb(timebase >> 32, timebase & 0xffffffff); 101 set_tb(timebase >> 32, timebase & 0xffffffff);
102 timebase = 0; 102 timebase = 0;
103 __raw_spin_unlock(&timebase_lock); 103 arch_spin_unlock(&timebase_lock);
104} 104}
105 105
106struct smp_ops_t pas_smp_ops = { 106struct smp_ops_t pas_smp_ops = {
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c
index cf660916ae0b..9dd789a7370d 100644
--- a/arch/powerpc/platforms/powermac/bootx_init.c
+++ b/arch/powerpc/platforms/powermac/bootx_init.c
@@ -12,7 +12,7 @@
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/string.h> 13#include <linux/string.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/utsrelease.h> 15#include <generated/utsrelease.h>
16#include <asm/sections.h> 16#include <asm/sections.h>
17#include <asm/prom.h> 17#include <asm/prom.h>
18#include <asm/page.h> 18#include <asm/page.h>
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index e81403b245b5..ab2027cdf893 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -302,7 +302,7 @@ static void __init setup_chaos(struct pci_controller *hose,
302 * 1 -> Skip the device but act as if the access was successfull 302 * 1 -> Skip the device but act as if the access was successfull
303 * (return 0xff's on reads, eventually, cache config space 303 * (return 0xff's on reads, eventually, cache config space
304 * accesses in a later version) 304 * accesses in a later version)
305 * -1 -> Hide the device (unsuccessful acess) 305 * -1 -> Hide the device (unsuccessful access)
306 */ 306 */
307static int u3_ht_skip_device(struct pci_controller *hose, 307static int u3_ht_skip_device(struct pci_controller *hose,
308 struct pci_bus *bus, unsigned int devfn) 308 struct pci_bus *bus, unsigned int devfn)
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 27554c807fd5..c667f0f02c34 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -2,6 +2,8 @@ config PPC_PSERIES
2 depends on PPC64 && PPC_BOOK3S 2 depends on PPC64 && PPC_BOOK3S
3 bool "IBM pSeries & new (POWER5-based) iSeries" 3 bool "IBM pSeries & new (POWER5-based) iSeries"
4 select MPIC 4 select MPIC
5 select PCI_MSI
6 select XICS
5 select PPC_I8259 7 select PPC_I8259
6 select PPC_RTAS 8 select PPC_RTAS
7 select PPC_RTAS_DAEMON 9 select PPC_RTAS_DAEMON
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c
index bcdcf0ccc8d7..a277f2e28dbc 100644
--- a/arch/powerpc/platforms/pseries/cmm.c
+++ b/arch/powerpc/platforms/pseries/cmm.c
@@ -38,19 +38,28 @@
38#include <asm/mmu.h> 38#include <asm/mmu.h>
39#include <asm/pgalloc.h> 39#include <asm/pgalloc.h>
40#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41#include <linux/memory.h>
41 42
42#include "plpar_wrappers.h" 43#include "plpar_wrappers.h"
43 44
44#define CMM_DRIVER_VERSION "1.0.0" 45#define CMM_DRIVER_VERSION "1.0.0"
45#define CMM_DEFAULT_DELAY 1 46#define CMM_DEFAULT_DELAY 1
47#define CMM_HOTPLUG_DELAY 5
46#define CMM_DEBUG 0 48#define CMM_DEBUG 0
47#define CMM_DISABLE 0 49#define CMM_DISABLE 0
48#define CMM_OOM_KB 1024 50#define CMM_OOM_KB 1024
49#define CMM_MIN_MEM_MB 256 51#define CMM_MIN_MEM_MB 256
50#define KB2PAGES(_p) ((_p)>>(PAGE_SHIFT-10)) 52#define KB2PAGES(_p) ((_p)>>(PAGE_SHIFT-10))
51#define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) 53#define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10))
54/*
55 * The priority level tries to ensure that this notifier is called as
56 * late as possible to reduce thrashing in the shared memory pool.
57 */
58#define CMM_MEM_HOTPLUG_PRI 1
59#define CMM_MEM_ISOLATE_PRI 15
52 60
53static unsigned int delay = CMM_DEFAULT_DELAY; 61static unsigned int delay = CMM_DEFAULT_DELAY;
62static unsigned int hotplug_delay = CMM_HOTPLUG_DELAY;
54static unsigned int oom_kb = CMM_OOM_KB; 63static unsigned int oom_kb = CMM_OOM_KB;
55static unsigned int cmm_debug = CMM_DEBUG; 64static unsigned int cmm_debug = CMM_DEBUG;
56static unsigned int cmm_disabled = CMM_DISABLE; 65static unsigned int cmm_disabled = CMM_DISABLE;
@@ -65,6 +74,10 @@ MODULE_VERSION(CMM_DRIVER_VERSION);
65module_param_named(delay, delay, uint, S_IRUGO | S_IWUSR); 74module_param_named(delay, delay, uint, S_IRUGO | S_IWUSR);
66MODULE_PARM_DESC(delay, "Delay (in seconds) between polls to query hypervisor paging requests. " 75MODULE_PARM_DESC(delay, "Delay (in seconds) between polls to query hypervisor paging requests. "
67 "[Default=" __stringify(CMM_DEFAULT_DELAY) "]"); 76 "[Default=" __stringify(CMM_DEFAULT_DELAY) "]");
77module_param_named(hotplug_delay, hotplug_delay, uint, S_IRUGO | S_IWUSR);
78MODULE_PARM_DESC(delay, "Delay (in seconds) after memory hotplug remove "
79 "before loaning resumes. "
80 "[Default=" __stringify(CMM_HOTPLUG_DELAY) "]");
68module_param_named(oom_kb, oom_kb, uint, S_IRUGO | S_IWUSR); 81module_param_named(oom_kb, oom_kb, uint, S_IRUGO | S_IWUSR);
69MODULE_PARM_DESC(oom_kb, "Amount of memory in kb to free on OOM. " 82MODULE_PARM_DESC(oom_kb, "Amount of memory in kb to free on OOM. "
70 "[Default=" __stringify(CMM_OOM_KB) "]"); 83 "[Default=" __stringify(CMM_OOM_KB) "]");
@@ -92,6 +105,9 @@ static unsigned long oom_freed_pages;
92static struct cmm_page_array *cmm_page_list; 105static struct cmm_page_array *cmm_page_list;
93static DEFINE_SPINLOCK(cmm_lock); 106static DEFINE_SPINLOCK(cmm_lock);
94 107
108static DEFINE_MUTEX(hotplug_mutex);
109static int hotplug_occurred; /* protected by the hotplug mutex */
110
95static struct task_struct *cmm_thread_ptr; 111static struct task_struct *cmm_thread_ptr;
96 112
97/** 113/**
@@ -110,6 +126,17 @@ static long cmm_alloc_pages(long nr)
110 cmm_dbg("Begin request for %ld pages\n", nr); 126 cmm_dbg("Begin request for %ld pages\n", nr);
111 127
112 while (nr) { 128 while (nr) {
129 /* Exit if a hotplug operation is in progress or occurred */
130 if (mutex_trylock(&hotplug_mutex)) {
131 if (hotplug_occurred) {
132 mutex_unlock(&hotplug_mutex);
133 break;
134 }
135 mutex_unlock(&hotplug_mutex);
136 } else {
137 break;
138 }
139
113 addr = __get_free_page(GFP_NOIO | __GFP_NOWARN | 140 addr = __get_free_page(GFP_NOIO | __GFP_NOWARN |
114 __GFP_NORETRY | __GFP_NOMEMALLOC); 141 __GFP_NORETRY | __GFP_NOMEMALLOC);
115 if (!addr) 142 if (!addr)
@@ -119,8 +146,9 @@ static long cmm_alloc_pages(long nr)
119 if (!pa || pa->index >= CMM_NR_PAGES) { 146 if (!pa || pa->index >= CMM_NR_PAGES) {
120 /* Need a new page for the page list. */ 147 /* Need a new page for the page list. */
121 spin_unlock(&cmm_lock); 148 spin_unlock(&cmm_lock);
122 npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN | 149 npa = (struct cmm_page_array *)__get_free_page(
123 __GFP_NORETRY | __GFP_NOMEMALLOC); 150 GFP_NOIO | __GFP_NOWARN |
151 __GFP_NORETRY | __GFP_NOMEMALLOC);
124 if (!npa) { 152 if (!npa) {
125 pr_info("%s: Can not allocate new page list\n", __func__); 153 pr_info("%s: Can not allocate new page list\n", __func__);
126 free_page(addr); 154 free_page(addr);
@@ -282,9 +310,28 @@ static int cmm_thread(void *dummy)
282 while (1) { 310 while (1) {
283 timeleft = msleep_interruptible(delay * 1000); 311 timeleft = msleep_interruptible(delay * 1000);
284 312
285 if (kthread_should_stop() || timeleft) { 313 if (kthread_should_stop() || timeleft)
286 loaned_pages_target = loaned_pages;
287 break; 314 break;
315
316 if (mutex_trylock(&hotplug_mutex)) {
317 if (hotplug_occurred) {
318 hotplug_occurred = 0;
319 mutex_unlock(&hotplug_mutex);
320 cmm_dbg("Hotplug operation has occurred, "
321 "loaning activity suspended "
322 "for %d seconds.\n",
323 hotplug_delay);
324 timeleft = msleep_interruptible(hotplug_delay *
325 1000);
326 if (kthread_should_stop() || timeleft)
327 break;
328 continue;
329 }
330 mutex_unlock(&hotplug_mutex);
331 } else {
332 cmm_dbg("Hotplug operation in progress, activity "
333 "suspended\n");
334 continue;
288 } 335 }
289 336
290 cmm_get_mpp(); 337 cmm_get_mpp();
@@ -414,6 +461,193 @@ static struct notifier_block cmm_reboot_nb = {
414}; 461};
415 462
416/** 463/**
464 * cmm_count_pages - Count the number of pages loaned in a particular range.
465 *
466 * @arg: memory_isolate_notify structure with address range and count
467 *
468 * Return value:
469 * 0 on success
470 **/
471static unsigned long cmm_count_pages(void *arg)
472{
473 struct memory_isolate_notify *marg = arg;
474 struct cmm_page_array *pa;
475 unsigned long start = (unsigned long)pfn_to_kaddr(marg->start_pfn);
476 unsigned long end = start + (marg->nr_pages << PAGE_SHIFT);
477 unsigned long idx;
478
479 spin_lock(&cmm_lock);
480 pa = cmm_page_list;
481 while (pa) {
482 if ((unsigned long)pa >= start && (unsigned long)pa < end)
483 marg->pages_found++;
484 for (idx = 0; idx < pa->index; idx++)
485 if (pa->page[idx] >= start && pa->page[idx] < end)
486 marg->pages_found++;
487 pa = pa->next;
488 }
489 spin_unlock(&cmm_lock);
490 return 0;
491}
492
493/**
494 * cmm_memory_isolate_cb - Handle memory isolation notifier calls
495 * @self: notifier block struct
496 * @action: action to take
497 * @arg: struct memory_isolate_notify data for handler
498 *
499 * Return value:
500 * NOTIFY_OK or notifier error based on subfunction return value
501 **/
502static int cmm_memory_isolate_cb(struct notifier_block *self,
503 unsigned long action, void *arg)
504{
505 int ret = 0;
506
507 if (action == MEM_ISOLATE_COUNT)
508 ret = cmm_count_pages(arg);
509
510 if (ret)
511 ret = notifier_from_errno(ret);
512 else
513 ret = NOTIFY_OK;
514
515 return ret;
516}
517
518static struct notifier_block cmm_mem_isolate_nb = {
519 .notifier_call = cmm_memory_isolate_cb,
520 .priority = CMM_MEM_ISOLATE_PRI
521};
522
523/**
524 * cmm_mem_going_offline - Unloan pages where memory is to be removed
525 * @arg: memory_notify structure with page range to be offlined
526 *
527 * Return value:
528 * 0 on success
529 **/
530static int cmm_mem_going_offline(void *arg)
531{
532 struct memory_notify *marg = arg;
533 unsigned long start_page = (unsigned long)pfn_to_kaddr(marg->start_pfn);
534 unsigned long end_page = start_page + (marg->nr_pages << PAGE_SHIFT);
535 struct cmm_page_array *pa_curr, *pa_last, *npa;
536 unsigned long idx;
537 unsigned long freed = 0;
538
539 cmm_dbg("Memory going offline, searching 0x%lx (%ld pages).\n",
540 start_page, marg->nr_pages);
541 spin_lock(&cmm_lock);
542
543 /* Search the page list for pages in the range to be offlined */
544 pa_last = pa_curr = cmm_page_list;
545 while (pa_curr) {
546 for (idx = (pa_curr->index - 1); (idx + 1) > 0; idx--) {
547 if ((pa_curr->page[idx] < start_page) ||
548 (pa_curr->page[idx] >= end_page))
549 continue;
550
551 plpar_page_set_active(__pa(pa_curr->page[idx]));
552 free_page(pa_curr->page[idx]);
553 freed++;
554 loaned_pages--;
555 totalram_pages++;
556 pa_curr->page[idx] = pa_last->page[--pa_last->index];
557 if (pa_last->index == 0) {
558 if (pa_curr == pa_last)
559 pa_curr = pa_last->next;
560 pa_last = pa_last->next;
561 free_page((unsigned long)cmm_page_list);
562 cmm_page_list = pa_last;
563 continue;
564 }
565 }
566 pa_curr = pa_curr->next;
567 }
568
569 /* Search for page list structures in the range to be offlined */
570 pa_last = NULL;
571 pa_curr = cmm_page_list;
572 while (pa_curr) {
573 if (((unsigned long)pa_curr >= start_page) &&
574 ((unsigned long)pa_curr < end_page)) {
575 npa = (struct cmm_page_array *)__get_free_page(
576 GFP_NOIO | __GFP_NOWARN |
577 __GFP_NORETRY | __GFP_NOMEMALLOC);
578 if (!npa) {
579 spin_unlock(&cmm_lock);
580 cmm_dbg("Failed to allocate memory for list "
581 "management. Memory hotplug "
582 "failed.\n");
583 return ENOMEM;
584 }
585 memcpy(npa, pa_curr, PAGE_SIZE);
586 if (pa_curr == cmm_page_list)
587 cmm_page_list = npa;
588 if (pa_last)
589 pa_last->next = npa;
590 free_page((unsigned long) pa_curr);
591 freed++;
592 pa_curr = npa;
593 }
594
595 pa_last = pa_curr;
596 pa_curr = pa_curr->next;
597 }
598
599 spin_unlock(&cmm_lock);
600 cmm_dbg("Released %ld pages in the search range.\n", freed);
601
602 return 0;
603}
604
605/**
606 * cmm_memory_cb - Handle memory hotplug notifier calls
607 * @self: notifier block struct
608 * @action: action to take
609 * @arg: struct memory_notify data for handler
610 *
611 * Return value:
612 * NOTIFY_OK or notifier error based on subfunction return value
613 *
614 **/
615static int cmm_memory_cb(struct notifier_block *self,
616 unsigned long action, void *arg)
617{
618 int ret = 0;
619
620 switch (action) {
621 case MEM_GOING_OFFLINE:
622 mutex_lock(&hotplug_mutex);
623 hotplug_occurred = 1;
624 ret = cmm_mem_going_offline(arg);
625 break;
626 case MEM_OFFLINE:
627 case MEM_CANCEL_OFFLINE:
628 mutex_unlock(&hotplug_mutex);
629 cmm_dbg("Memory offline operation complete.\n");
630 break;
631 case MEM_GOING_ONLINE:
632 case MEM_ONLINE:
633 case MEM_CANCEL_ONLINE:
634 break;
635 }
636
637 if (ret)
638 ret = notifier_from_errno(ret);
639 else
640 ret = NOTIFY_OK;
641
642 return ret;
643}
644
645static struct notifier_block cmm_mem_nb = {
646 .notifier_call = cmm_memory_cb,
647 .priority = CMM_MEM_HOTPLUG_PRI
648};
649
650/**
417 * cmm_init - Module initialization 651 * cmm_init - Module initialization
418 * 652 *
419 * Return value: 653 * Return value:
@@ -435,18 +669,24 @@ static int cmm_init(void)
435 if ((rc = cmm_sysfs_register(&cmm_sysdev))) 669 if ((rc = cmm_sysfs_register(&cmm_sysdev)))
436 goto out_reboot_notifier; 670 goto out_reboot_notifier;
437 671
672 if (register_memory_notifier(&cmm_mem_nb) ||
673 register_memory_isolate_notifier(&cmm_mem_isolate_nb))
674 goto out_unregister_notifier;
675
438 if (cmm_disabled) 676 if (cmm_disabled)
439 return rc; 677 return rc;
440 678
441 cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread"); 679 cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread");
442 if (IS_ERR(cmm_thread_ptr)) { 680 if (IS_ERR(cmm_thread_ptr)) {
443 rc = PTR_ERR(cmm_thread_ptr); 681 rc = PTR_ERR(cmm_thread_ptr);
444 goto out_unregister_sysfs; 682 goto out_unregister_notifier;
445 } 683 }
446 684
447 return rc; 685 return rc;
448 686
449out_unregister_sysfs: 687out_unregister_notifier:
688 unregister_memory_notifier(&cmm_mem_nb);
689 unregister_memory_isolate_notifier(&cmm_mem_isolate_nb);
450 cmm_unregister_sysfs(&cmm_sysdev); 690 cmm_unregister_sysfs(&cmm_sysdev);
451out_reboot_notifier: 691out_reboot_notifier:
452 unregister_reboot_notifier(&cmm_reboot_nb); 692 unregister_reboot_notifier(&cmm_reboot_nb);
@@ -467,6 +707,8 @@ static void cmm_exit(void)
467 kthread_stop(cmm_thread_ptr); 707 kthread_stop(cmm_thread_ptr);
468 unregister_oom_notifier(&cmm_oom_nb); 708 unregister_oom_notifier(&cmm_oom_nb);
469 unregister_reboot_notifier(&cmm_reboot_nb); 709 unregister_reboot_notifier(&cmm_reboot_nb);
710 unregister_memory_notifier(&cmm_mem_nb);
711 unregister_memory_isolate_notifier(&cmm_mem_isolate_nb);
470 cmm_free_pages(loaned_pages); 712 cmm_free_pages(loaned_pages);
471 cmm_unregister_sysfs(&cmm_sysdev); 713 cmm_unregister_sysfs(&cmm_sysdev);
472} 714}
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 12df9e8812a9..67b7a10f9fce 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -346,12 +346,14 @@ int dlpar_release_drc(u32 drc_index)
346 346
347static DEFINE_MUTEX(pseries_cpu_hotplug_mutex); 347static DEFINE_MUTEX(pseries_cpu_hotplug_mutex);
348 348
349void cpu_hotplug_driver_lock() 349void cpu_hotplug_driver_lock(void)
350__acquires(pseries_cpu_hotplug_mutex)
350{ 351{
351 mutex_lock(&pseries_cpu_hotplug_mutex); 352 mutex_lock(&pseries_cpu_hotplug_mutex);
352} 353}
353 354
354void cpu_hotplug_driver_unlock() 355void cpu_hotplug_driver_unlock(void)
356__releases(pseries_cpu_hotplug_mutex)
355{ 357{
356 mutex_unlock(&pseries_cpu_hotplug_mutex); 358 mutex_unlock(&pseries_cpu_hotplug_mutex);
357} 359}
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c
index 937a544a236d..c5f3116b6ca5 100644
--- a/arch/powerpc/platforms/pseries/dtl.c
+++ b/arch/powerpc/platforms/pseries/dtl.c
@@ -54,7 +54,7 @@ struct dtl {
54 int buf_entries; 54 int buf_entries;
55 u64 last_idx; 55 u64 last_idx;
56}; 56};
57static DEFINE_PER_CPU(struct dtl, dtl); 57static DEFINE_PER_CPU(struct dtl, cpu_dtl);
58 58
59/* 59/*
60 * Dispatch trace log event mask: 60 * Dispatch trace log event mask:
@@ -261,7 +261,7 @@ static int dtl_init(void)
261 261
262 /* set up the per-cpu log structures */ 262 /* set up the per-cpu log structures */
263 for_each_possible_cpu(i) { 263 for_each_possible_cpu(i) {
264 struct dtl *dtl = &per_cpu(dtl, i); 264 struct dtl *dtl = &per_cpu(cpu_dtl, i);
265 dtl->cpu = i; 265 dtl->cpu = i;
266 266
267 rc = dtl_setup_file(dtl); 267 rc = dtl_setup_file(dtl);
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 8868c012268a..b4886635972c 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -144,8 +144,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
144 hcpuid = get_hard_smp_processor_id(nr); 144 hcpuid = get_hard_smp_processor_id(nr);
145 rc = plpar_hcall_norets(H_PROD, hcpuid); 145 rc = plpar_hcall_norets(H_PROD, hcpuid);
146 if (rc != H_SUCCESS) 146 if (rc != H_SUCCESS)
147 panic("Error: Prod to wake up processor %d Ret= %ld\n", 147 printk(KERN_ERR "Error: Prod to wake up processor %d\
148 nr, rc); 148 Ret= %ld\n", nr, rc);
149 } 149 }
150} 150}
151 151
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 7d01b58f3989..b9b9e11609ec 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -906,7 +906,7 @@ void xics_migrate_irqs_away(void)
906 || desc->chip->set_affinity == NULL) 906 || desc->chip->set_affinity == NULL)
907 continue; 907 continue;
908 908
909 spin_lock_irqsave(&desc->lock, flags); 909 raw_spin_lock_irqsave(&desc->lock, flags);
910 910
911 status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); 911 status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq);
912 if (status) { 912 if (status) {
@@ -930,7 +930,7 @@ void xics_migrate_irqs_away(void)
930 cpumask_setall(irq_to_desc(virq)->affinity); 930 cpumask_setall(irq_to_desc(virq)->affinity);
931 desc->chip->set_affinity(virq, cpu_all_mask); 931 desc->chip->set_affinity(virq, cpu_all_mask);
932unlock: 932unlock:
933 spin_unlock_irqrestore(&desc->lock, flags); 933 raw_spin_unlock_irqrestore(&desc->lock, flags);
934 } 934 }
935} 935}
936#endif 936#endif
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index ae3c4db86fe8..bafc3f85360d 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -160,7 +160,7 @@ static int dart_build(struct iommu_table *tbl, long index,
160 160
161 dp = ((unsigned int*)tbl->it_base) + index; 161 dp = ((unsigned int*)tbl->it_base) + index;
162 162
163 /* On U3, all memory is contigous, so we can move this 163 /* On U3, all memory is contiguous, so we can move this
164 * out of the loop. 164 * out of the loop.
165 */ 165 */
166 l = npages; 166 l = npages;
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 62e50258cdef..c6e11b077108 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -173,7 +173,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc)
173 u32 intr_index; 173 u32 intr_index;
174 u32 have_shift = 0; 174 u32 have_shift = 0;
175 175
176 spin_lock(&desc->lock); 176 raw_spin_lock(&desc->lock);
177 if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { 177 if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) {
178 if (desc->chip->mask_ack) 178 if (desc->chip->mask_ack)
179 desc->chip->mask_ack(irq); 179 desc->chip->mask_ack(irq);
@@ -225,7 +225,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc)
225 break; 225 break;
226 } 226 }
227unlock: 227unlock:
228 spin_unlock(&desc->lock); 228 raw_spin_unlock(&desc->lock);
229} 229}
230 230
231static int __devinit fsl_of_msi_probe(struct of_device *dev, 231static int __devinit fsl_of_msi_probe(struct of_device *dev,
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index aa9d06e5925b..470dc6c11d57 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -567,13 +567,11 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
567#endif /* CONFIG_MPIC_U3_HT_IRQS */ 567#endif /* CONFIG_MPIC_U3_HT_IRQS */
568 568
569#ifdef CONFIG_SMP 569#ifdef CONFIG_SMP
570static int irq_choose_cpu(unsigned int virt_irq) 570static int irq_choose_cpu(const cpumask_t *mask)
571{ 571{
572 cpumask_t mask;
573 int cpuid; 572 int cpuid;
574 573
575 cpumask_copy(&mask, irq_to_desc(virt_irq)->affinity); 574 if (cpumask_equal(mask, cpu_all_mask)) {
576 if (cpus_equal(mask, CPU_MASK_ALL)) {
577 static int irq_rover; 575 static int irq_rover;
578 static DEFINE_SPINLOCK(irq_rover_lock); 576 static DEFINE_SPINLOCK(irq_rover_lock);
579 unsigned long flags; 577 unsigned long flags;
@@ -594,20 +592,15 @@ static int irq_choose_cpu(unsigned int virt_irq)
594 592
595 spin_unlock_irqrestore(&irq_rover_lock, flags); 593 spin_unlock_irqrestore(&irq_rover_lock, flags);
596 } else { 594 } else {
597 cpumask_t tmp; 595 cpuid = cpumask_first_and(mask, cpu_online_mask);
598 596 if (cpuid >= nr_cpu_ids)
599 cpus_and(tmp, cpu_online_map, mask);
600
601 if (cpus_empty(tmp))
602 goto do_round_robin; 597 goto do_round_robin;
603
604 cpuid = first_cpu(tmp);
605 } 598 }
606 599
607 return get_hard_smp_processor_id(cpuid); 600 return get_hard_smp_processor_id(cpuid);
608} 601}
609#else 602#else
610static int irq_choose_cpu(unsigned int virt_irq) 603static int irq_choose_cpu(const cpumask_t *mask)
611{ 604{
612 return hard_smp_processor_id(); 605 return hard_smp_processor_id();
613} 606}
@@ -816,7 +809,7 @@ int mpic_set_affinity(unsigned int irq, const struct cpumask *cpumask)
816 unsigned int src = mpic_irq_to_hw(irq); 809 unsigned int src = mpic_irq_to_hw(irq);
817 810
818 if (mpic->flags & MPIC_SINGLE_DEST_CPU) { 811 if (mpic->flags & MPIC_SINGLE_DEST_CPU) {
819 int cpuid = irq_choose_cpu(irq); 812 int cpuid = irq_choose_cpu(cpumask);
820 813
821 mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION), 1 << cpuid); 814 mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION), 1 << cpuid);
822 } else { 815 } else {
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c
index 1d44eee80fa1..0f67cd79d481 100644
--- a/arch/powerpc/sysdev/mpic_msi.c
+++ b/arch/powerpc/sysdev/mpic_msi.c
@@ -39,7 +39,12 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
39 39
40 pr_debug("mpic: found U3, guessing msi allocator setup\n"); 40 pr_debug("mpic: found U3, guessing msi allocator setup\n");
41 41
42 /* Reserve source numbers we know are reserved in the HW */ 42 /* Reserve source numbers we know are reserved in the HW.
43 *
44 * This is a bit of a mix of U3 and U4 reserves but that's going
45 * to work fine, we have plenty enugh numbers left so let's just
46 * mark anything we don't like reserved.
47 */
43 for (i = 0; i < 8; i++) 48 for (i = 0; i < 8; i++)
44 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); 49 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
45 50
@@ -49,6 +54,10 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
49 for (i = 100; i < 105; i++) 54 for (i = 100; i < 105; i++)
50 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i); 55 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
51 56
57 for (i = 124; i < mpic->irq_count; i++)
58 msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
59
60
52 np = NULL; 61 np = NULL;
53 while ((np = of_find_all_nodes(np))) { 62 while ((np = of_find_all_nodes(np))) {
54 pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); 63 pr_debug("mpic: mapping hwirqs for %s\n", np->full_name);
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index d3caf23e6312..bcbfe79c704b 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -64,12 +64,12 @@ static u64 read_ht_magic_addr(struct pci_dev *pdev, unsigned int pos)
64 return addr; 64 return addr;
65} 65}
66 66
67static u64 find_ht_magic_addr(struct pci_dev *pdev) 67static u64 find_ht_magic_addr(struct pci_dev *pdev, unsigned int hwirq)
68{ 68{
69 struct pci_bus *bus; 69 struct pci_bus *bus;
70 unsigned int pos; 70 unsigned int pos;
71 71
72 for (bus = pdev->bus; bus; bus = bus->parent) { 72 for (bus = pdev->bus; bus && bus->self; bus = bus->parent) {
73 pos = pci_find_ht_capability(bus->self, HT_CAPTYPE_MSI_MAPPING); 73 pos = pci_find_ht_capability(bus->self, HT_CAPTYPE_MSI_MAPPING);
74 if (pos) 74 if (pos)
75 return read_ht_magic_addr(bus->self, pos); 75 return read_ht_magic_addr(bus->self, pos);
@@ -78,13 +78,41 @@ static u64 find_ht_magic_addr(struct pci_dev *pdev)
78 return 0; 78 return 0;
79} 79}
80 80
81static u64 find_u4_magic_addr(struct pci_dev *pdev, unsigned int hwirq)
82{
83 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
84
85 /* U4 PCIe MSIs need to write to the special register in
86 * the bridge that generates interrupts. There should be
87 * theorically a register at 0xf8005000 where you just write
88 * the MSI number and that triggers the right interrupt, but
89 * unfortunately, this is busted in HW, the bridge endian swaps
90 * the value and hits the wrong nibble in the register.
91 *
92 * So instead we use another register set which is used normally
93 * for converting HT interrupts to MPIC interrupts, which decodes
94 * the interrupt number as part of the low address bits
95 *
96 * This will not work if we ever use more than one legacy MSI in
97 * a block but we never do. For one MSI or multiple MSI-X where
98 * each interrupt address can be specified separately, it works
99 * just fine.
100 */
101 if (of_device_is_compatible(hose->dn, "u4-pcie") ||
102 of_device_is_compatible(hose->dn, "U4-pcie"))
103 return 0xf8004000 | (hwirq << 4);
104
105 return 0;
106}
107
81static int u3msi_msi_check_device(struct pci_dev *pdev, int nvec, int type) 108static int u3msi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
82{ 109{
83 if (type == PCI_CAP_ID_MSIX) 110 if (type == PCI_CAP_ID_MSIX)
84 pr_debug("u3msi: MSI-X untested, trying anyway.\n"); 111 pr_debug("u3msi: MSI-X untested, trying anyway.\n");
85 112
86 /* If we can't find a magic address then MSI ain't gonna work */ 113 /* If we can't find a magic address then MSI ain't gonna work */
87 if (find_ht_magic_addr(pdev) == 0) { 114 if (find_ht_magic_addr(pdev, 0) == 0 &&
115 find_u4_magic_addr(pdev, 0) == 0) {
88 pr_debug("u3msi: no magic address found for %s\n", 116 pr_debug("u3msi: no magic address found for %s\n",
89 pci_name(pdev)); 117 pci_name(pdev));
90 return -ENXIO; 118 return -ENXIO;
@@ -118,10 +146,6 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
118 u64 addr; 146 u64 addr;
119 int hwirq; 147 int hwirq;
120 148
121 addr = find_ht_magic_addr(pdev);
122 msg.address_lo = addr & 0xFFFFFFFF;
123 msg.address_hi = addr >> 32;
124
125 list_for_each_entry(entry, &pdev->msi_list, list) { 149 list_for_each_entry(entry, &pdev->msi_list, list) {
126 hwirq = msi_bitmap_alloc_hwirqs(&msi_mpic->msi_bitmap, 1); 150 hwirq = msi_bitmap_alloc_hwirqs(&msi_mpic->msi_bitmap, 1);
127 if (hwirq < 0) { 151 if (hwirq < 0) {
@@ -129,6 +153,12 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
129 return hwirq; 153 return hwirq;
130 } 154 }
131 155
156 addr = find_ht_magic_addr(pdev, hwirq);
157 if (addr == 0)
158 addr = find_u4_magic_addr(pdev, hwirq);
159 msg.address_lo = addr & 0xFFFFFFFF;
160 msg.address_hi = addr >> 32;
161
132 virq = irq_create_mapping(msi_mpic->irqhost, hwirq); 162 virq = irq_create_mapping(msi_mpic->irqhost, hwirq);
133 if (virq == NO_IRQ) { 163 if (virq == NO_IRQ) {
134 pr_debug("u3msi: failed mapping hwirq 0x%x\n", hwirq); 164 pr_debug("u3msi: failed mapping hwirq 0x%x\n", hwirq);
@@ -143,6 +173,8 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
143 pr_debug("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n", 173 pr_debug("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n",
144 virq, hwirq, (unsigned long)addr); 174 virq, hwirq, (unsigned long)addr);
145 175
176 printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n",
177 virq, hwirq, (unsigned long)addr);
146 msg.data = hwirq; 178 msg.data = hwirq;
147 write_msi_msg(virq, &msg); 179 write_msi_msg(virq, &msg);
148 180
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index 7d10074b3304..6f220a913e42 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -225,12 +225,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
225 int src; 225 int src;
226 int subvirq; 226 int subvirq;
227 227
228 spin_lock(&desc->lock); 228 raw_spin_lock(&desc->lock);
229 if (desc->status & IRQ_LEVEL) 229 if (desc->status & IRQ_LEVEL)
230 desc->chip->mask(virq); 230 desc->chip->mask(virq);
231 else 231 else
232 desc->chip->mask_ack(virq); 232 desc->chip->mask_ack(virq);
233 spin_unlock(&desc->lock); 233 raw_spin_unlock(&desc->lock);
234 234
235 msr = mfdcr(uic->dcrbase + UIC_MSR); 235 msr = mfdcr(uic->dcrbase + UIC_MSR);
236 if (!msr) /* spurious interrupt */ 236 if (!msr) /* spurious interrupt */
@@ -242,12 +242,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
242 generic_handle_irq(subvirq); 242 generic_handle_irq(subvirq);
243 243
244uic_irq_ret: 244uic_irq_ret:
245 spin_lock(&desc->lock); 245 raw_spin_lock(&desc->lock);
246 if (desc->status & IRQ_LEVEL) 246 if (desc->status & IRQ_LEVEL)
247 desc->chip->ack(virq); 247 desc->chip->ack(virq);
248 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) 248 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
249 desc->chip->unmask(virq); 249 desc->chip->unmask(virq);
250 spin_unlock(&desc->lock); 250 raw_spin_unlock(&desc->lock);
251} 251}
252 252
253static struct uic * __init uic_init_one(struct device_node *node) 253static struct uic * __init uic_init_one(struct device_node *node)
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 16c673096a22..c80235206c01 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -220,23 +220,8 @@ config AUDIT_ARCH
220 bool 220 bool
221 default y 221 default y
222 222
223config S390_SWITCH_AMODE
224 bool "Switch kernel/user addressing modes"
225 help
226 This option allows to switch the addressing modes of kernel and user
227 space. The kernel parameter switch_amode=on will enable this feature,
228 default is disabled. Enabling this (via kernel parameter) on machines
229 earlier than IBM System z9-109 EC/BC will reduce system performance.
230
231 Note that this option will also be selected by selecting the execute
232 protection option below. Enabling the execute protection via the
233 noexec kernel parameter will also switch the addressing modes,
234 independent of the switch_amode kernel parameter.
235
236
237config S390_EXEC_PROTECT 223config S390_EXEC_PROTECT
238 bool "Data execute protection" 224 bool "Data execute protection"
239 select S390_SWITCH_AMODE
240 help 225 help
241 This option allows to enable a buffer overflow protection for user 226 This option allows to enable a buffer overflow protection for user
242 space programs and it also selects the addressing mode option above. 227 space programs and it also selects the addressing mode option above.
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 495589950dc7..5c91995b74e4 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -551,7 +551,7 @@ static int appldata_thaw(struct device *dev)
551 return appldata_restore(dev); 551 return appldata_restore(dev);
552} 552}
553 553
554static struct dev_pm_ops appldata_pm_ops = { 554static const struct dev_pm_ops appldata_pm_ops = {
555 .freeze = appldata_freeze, 555 .freeze = appldata_freeze,
556 .thaw = appldata_thaw, 556 .thaw = appldata_thaw,
557 .restore = appldata_restore, 557 .restore = appldata_restore,
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index b49c00ce65e9..a3209906739e 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -6,7 +6,6 @@
6#include <linux/fs.h> 6#include <linux/fs.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/smp_lock.h>
10#include <linux/miscdevice.h> 9#include <linux/miscdevice.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
@@ -49,7 +48,6 @@ static unsigned char parm_block[32] = {
49 48
50static int prng_open(struct inode *inode, struct file *file) 49static int prng_open(struct inode *inode, struct file *file)
51{ 50{
52 cycle_kernel_lock();
53 return nonseekable_open(inode, file); 51 return nonseekable_open(inode, file);
54} 52}
55 53
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index ab4464486b7a..f4e53c6708dc 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -185,7 +185,6 @@ CONFIG_HOTPLUG_CPU=y
185CONFIG_COMPAT=y 185CONFIG_COMPAT=y
186CONFIG_SYSVIPC_COMPAT=y 186CONFIG_SYSVIPC_COMPAT=y
187CONFIG_AUDIT_ARCH=y 187CONFIG_AUDIT_ARCH=y
188CONFIG_S390_SWITCH_AMODE=y
189CONFIG_S390_EXEC_PROTECT=y 188CONFIG_S390_EXEC_PROTECT=y
190 189
191# 190#
diff --git a/arch/s390/include/asm/asm-offsets.h b/arch/s390/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/s390/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h
index ae7c8f9f94a5..2a113d6a7dfd 100644
--- a/arch/s390/include/asm/atomic.h
+++ b/arch/s390/include/asm/atomic.h
@@ -21,7 +21,7 @@
21#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) 21#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
22 22
23#define __CS_LOOP(ptr, op_val, op_string) ({ \ 23#define __CS_LOOP(ptr, op_val, op_string) ({ \
24 typeof(ptr->counter) old_val, new_val; \ 24 int old_val, new_val; \
25 asm volatile( \ 25 asm volatile( \
26 " l %0,%2\n" \ 26 " l %0,%2\n" \
27 "0: lr %1,%0\n" \ 27 "0: lr %1,%0\n" \
@@ -38,7 +38,7 @@
38#else /* __GNUC__ */ 38#else /* __GNUC__ */
39 39
40#define __CS_LOOP(ptr, op_val, op_string) ({ \ 40#define __CS_LOOP(ptr, op_val, op_string) ({ \
41 typeof(ptr->counter) old_val, new_val; \ 41 int old_val, new_val; \
42 asm volatile( \ 42 asm volatile( \
43 " l %0,0(%3)\n" \ 43 " l %0,0(%3)\n" \
44 "0: lr %1,%0\n" \ 44 "0: lr %1,%0\n" \
@@ -143,7 +143,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
143#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) 143#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
144 144
145#define __CSG_LOOP(ptr, op_val, op_string) ({ \ 145#define __CSG_LOOP(ptr, op_val, op_string) ({ \
146 typeof(ptr->counter) old_val, new_val; \ 146 long long old_val, new_val; \
147 asm volatile( \ 147 asm volatile( \
148 " lg %0,%2\n" \ 148 " lg %0,%2\n" \
149 "0: lgr %1,%0\n" \ 149 "0: lgr %1,%0\n" \
@@ -160,7 +160,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
160#else /* __GNUC__ */ 160#else /* __GNUC__ */
161 161
162#define __CSG_LOOP(ptr, op_val, op_string) ({ \ 162#define __CSG_LOOP(ptr, op_val, op_string) ({ \
163 typeof(ptr->counter) old_val, new_val; \ 163 long long old_val, new_val; \
164 asm volatile( \ 164 asm volatile( \
165 " lg %0,0(%3)\n" \ 165 " lg %0,0(%3)\n" \
166 "0: lgr %1,%0\n" \ 166 "0: lgr %1,%0\n" \
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h
index 2a5419551176..f4bd346a52d3 100644
--- a/arch/s390/include/asm/ccwdev.h
+++ b/arch/s390/include/asm/ccwdev.h
@@ -142,6 +142,8 @@ struct ccw1;
142extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long); 142extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long);
143extern int ccw_device_set_options(struct ccw_device *, unsigned long); 143extern int ccw_device_set_options(struct ccw_device *, unsigned long);
144extern void ccw_device_clear_options(struct ccw_device *, unsigned long); 144extern void ccw_device_clear_options(struct ccw_device *, unsigned long);
145int ccw_device_is_pathgroup(struct ccw_device *cdev);
146int ccw_device_is_multipath(struct ccw_device *cdev);
145 147
146/* Allow for i/o completion notification after primary interrupt status. */ 148/* Allow for i/o completion notification after primary interrupt status. */
147#define CCWDEV_EARLY_NOTIFICATION 0x0001 149#define CCWDEV_EARLY_NOTIFICATION 0x0001
@@ -151,6 +153,8 @@ extern void ccw_device_clear_options(struct ccw_device *, unsigned long);
151#define CCWDEV_DO_PATHGROUP 0x0004 153#define CCWDEV_DO_PATHGROUP 0x0004
152/* Allow forced onlining of boxed devices. */ 154/* Allow forced onlining of boxed devices. */
153#define CCWDEV_ALLOW_FORCE 0x0008 155#define CCWDEV_ALLOW_FORCE 0x0008
156/* Try to use multipath mode. */
157#define CCWDEV_DO_MULTIPATH 0x0010
154 158
155extern int ccw_device_start(struct ccw_device *, struct ccw1 *, 159extern int ccw_device_start(struct ccw_device *, struct ccw1 *,
156 unsigned long, __u8, unsigned long); 160 unsigned long, __u8, unsigned long);
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index f23961ada7fb..258ba88b7b50 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -183,6 +183,7 @@ struct s390_idle_data {
183 unsigned long long idle_count; 183 unsigned long long idle_count;
184 unsigned long long idle_enter; 184 unsigned long long idle_enter;
185 unsigned long long idle_time; 185 unsigned long long idle_time;
186 int nohz_delay;
186}; 187};
187 188
188DECLARE_PER_CPU(struct s390_idle_data, s390_idle); 189DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
@@ -198,4 +199,11 @@ static inline void s390_idle_check(void)
198 vtime_start_cpu(); 199 vtime_start_cpu();
199} 200}
200 201
202static inline int s390_nohz_delay(int cpu)
203{
204 return per_cpu(s390_idle, cpu).nohz_delay != 0;
205}
206
207#define arch_needs_cpu(cpu) s390_nohz_delay(cpu)
208
201#endif /* _S390_CPUTIME_H */ 209#endif /* _S390_CPUTIME_H */
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index e885442c1dfe..354d42616c7e 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -155,7 +155,6 @@ extern unsigned int vdso_enabled;
155 } while (0) 155 } while (0)
156 156
157#define CORE_DUMP_USE_REGSET 157#define CORE_DUMP_USE_REGSET
158#define USE_ELF_CORE_DUMP
159#define ELF_EXEC_PAGESIZE 4096 158#define ELF_EXEC_PAGESIZE 4096
160 159
161/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 160/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h
index fc7edd6f41b6..976e273988c2 100644
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -36,7 +36,7 @@ static inline int init_new_context(struct task_struct *tsk,
36 mm->context.has_pgste = 1; 36 mm->context.has_pgste = 1;
37 mm->context.alloc_pgste = 1; 37 mm->context.alloc_pgste = 1;
38 } else { 38 } else {
39 mm->context.noexec = s390_noexec; 39 mm->context.noexec = (user_mode == SECONDARY_SPACE_MODE);
40 mm->context.has_pgste = 0; 40 mm->context.has_pgste = 0;
41 mm->context.alloc_pgste = 0; 41 mm->context.alloc_pgste = 0;
42 } 42 }
@@ -58,7 +58,7 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk)
58 pgd_t *pgd = mm->pgd; 58 pgd_t *pgd = mm->pgd;
59 59
60 S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); 60 S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd);
61 if (switch_amode) { 61 if (user_mode != HOME_SPACE_MODE) {
62 /* Load primary space page table origin. */ 62 /* Load primary space page table origin. */
63 pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd; 63 pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd;
64 S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd); 64 S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd);
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
index ddad5903341c..68940d0bad91 100644
--- a/arch/s390/include/asm/pgalloc.h
+++ b/arch/s390/include/asm/pgalloc.h
@@ -143,7 +143,8 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
143 spin_lock_init(&mm->context.list_lock); 143 spin_lock_init(&mm->context.list_lock);
144 INIT_LIST_HEAD(&mm->context.crst_list); 144 INIT_LIST_HEAD(&mm->context.crst_list);
145 INIT_LIST_HEAD(&mm->context.pgtable_list); 145 INIT_LIST_HEAD(&mm->context.pgtable_list);
146 return (pgd_t *) crst_table_alloc(mm, s390_noexec); 146 return (pgd_t *)
147 crst_table_alloc(mm, user_mode == SECONDARY_SPACE_MODE);
147} 148}
148#define pgd_free(mm, pgd) crst_table_free(mm, (unsigned long *) pgd) 149#define pgd_free(mm, pgd) crst_table_free(mm, (unsigned long *) pgd)
149 150
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 60a7b1a1702f..e2fa79cf0614 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -169,12 +169,13 @@ extern unsigned long VMALLOC_START;
169 * STL Segment-Table-Length: Segment-table length (STL+1*16 entries -> up to 2048) 169 * STL Segment-Table-Length: Segment-table length (STL+1*16 entries -> up to 2048)
170 * 170 *
171 * A 64 bit pagetable entry of S390 has following format: 171 * A 64 bit pagetable entry of S390 has following format:
172 * | PFRA |0IP0| OS | 172 * | PFRA |0IPC| OS |
173 * 0000000000111111111122222222223333333333444444444455555555556666 173 * 0000000000111111111122222222223333333333444444444455555555556666
174 * 0123456789012345678901234567890123456789012345678901234567890123 174 * 0123456789012345678901234567890123456789012345678901234567890123
175 * 175 *
176 * I Page-Invalid Bit: Page is not available for address-translation 176 * I Page-Invalid Bit: Page is not available for address-translation
177 * P Page-Protection Bit: Store access not possible for page 177 * P Page-Protection Bit: Store access not possible for page
178 * C Change-bit override: HW is not required to set change bit
178 * 179 *
179 * A 64 bit segmenttable entry of S390 has following format: 180 * A 64 bit segmenttable entry of S390 has following format:
180 * | P-table origin | TT 181 * | P-table origin | TT
@@ -218,6 +219,7 @@ extern unsigned long VMALLOC_START;
218 */ 219 */
219 220
220/* Hardware bits in the page table entry */ 221/* Hardware bits in the page table entry */
222#define _PAGE_CO 0x100 /* HW Change-bit override */
221#define _PAGE_RO 0x200 /* HW read-only bit */ 223#define _PAGE_RO 0x200 /* HW read-only bit */
222#define _PAGE_INVALID 0x400 /* HW invalid bit */ 224#define _PAGE_INVALID 0x400 /* HW invalid bit */
223 225
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index e37478e87286..52a779c337e8 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -49,17 +49,12 @@ extern unsigned long memory_end;
49 49
50void detect_memory_layout(struct mem_chunk chunk[]); 50void detect_memory_layout(struct mem_chunk chunk[]);
51 51
52#ifdef CONFIG_S390_SWITCH_AMODE 52#define PRIMARY_SPACE_MODE 0
53extern unsigned int switch_amode; 53#define ACCESS_REGISTER_MODE 1
54#else 54#define SECONDARY_SPACE_MODE 2
55#define switch_amode (0) 55#define HOME_SPACE_MODE 3
56#endif 56
57 57extern unsigned int user_mode;
58#ifdef CONFIG_S390_EXEC_PROTECT
59extern unsigned int s390_noexec;
60#else
61#define s390_noexec (0)
62#endif
63 58
64/* 59/*
65 * Machine features detected in head.S 60 * Machine features detected in head.S
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index a868b272c257..2ab1141eeb50 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -1,57 +1,22 @@
1/* 1/*
2 * include/asm-s390/smp.h 2 * Copyright IBM Corp. 1999,2009
3 * 3 * Author(s): Denis Joseph Barrow,
4 * S390 version 4 * Martin Schwidefsky <schwidefsky@de.ibm.com>,
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 * Heiko Carstens <heiko.carstens@de.ibm.com>,
6 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
7 * Martin Schwidefsky (schwidefsky@de.ibm.com)
8 * Heiko Carstens (heiko.carstens@de.ibm.com)
9 */ 6 */
10#ifndef __ASM_SMP_H 7#ifndef __ASM_SMP_H
11#define __ASM_SMP_H 8#define __ASM_SMP_H
12 9
13#include <linux/threads.h> 10#ifdef CONFIG_SMP
14#include <linux/cpumask.h>
15#include <linux/bitops.h>
16 11
17#if defined(__KERNEL__) && defined(CONFIG_SMP) && !defined(__ASSEMBLY__)
18
19#include <asm/lowcore.h>
20#include <asm/sigp.h>
21#include <asm/ptrace.h>
22#include <asm/system.h> 12#include <asm/system.h>
23 13#include <asm/sigp.h>
24/*
25 s390 specific smp.c headers
26 */
27typedef struct
28{
29 int intresting;
30 sigp_ccode ccode;
31 __u32 status;
32 __u16 cpu;
33} sigp_info;
34 14
35extern void machine_restart_smp(char *); 15extern void machine_restart_smp(char *);
36extern void machine_halt_smp(void); 16extern void machine_halt_smp(void);
37extern void machine_power_off_smp(void); 17extern void machine_power_off_smp(void);
38 18
39#define NO_PROC_ID 0xFF /* No processor magic marker */
40
41/*
42 * This magic constant controls our willingness to transfer
43 * a process across CPUs. Such a transfer incurs misses on the L1
44 * cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
45 * gut feeling is this will vary by board in value. For a board
46 * with separate L2 cache it probably depends also on the RSS, and
47 * for a board with shared L2 cache it ought to decay fast as other
48 * processes are run.
49 */
50
51#define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
52
53#define raw_smp_processor_id() (S390_lowcore.cpu_nr) 19#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
54#define cpu_logical_map(cpu) (cpu)
55 20
56extern int __cpu_disable (void); 21extern int __cpu_disable (void);
57extern void __cpu_die (unsigned int cpu); 22extern void __cpu_die (unsigned int cpu);
@@ -64,7 +29,9 @@ extern int smp_cpu_polarization[];
64extern void arch_send_call_function_single_ipi(int cpu); 29extern void arch_send_call_function_single_ipi(int cpu);
65extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 30extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
66 31
67#endif 32extern union save_area *zfcpdump_save_areas[NR_CPUS + 1];
33
34#endif /* CONFIG_SMP */
68 35
69#ifdef CONFIG_HOTPLUG_CPU 36#ifdef CONFIG_HOTPLUG_CPU
70extern int smp_rescan_cpus(void); 37extern int smp_rescan_cpus(void);
@@ -72,5 +39,4 @@ extern int smp_rescan_cpus(void);
72static inline int smp_rescan_cpus(void) { return 0; } 39static inline int smp_rescan_cpus(void) { return 0; }
73#endif 40#endif
74 41
75extern union save_area *zfcpdump_save_areas[NR_CPUS + 1]; 42#endif /* __ASM_SMP_H */
76#endif
diff --git a/arch/s390/include/asm/sockios.h b/arch/s390/include/asm/sockios.h
index f4fc16c7da59..6f60eee73242 100644
--- a/arch/s390/include/asm/sockios.h
+++ b/arch/s390/include/asm/sockios.h
@@ -1,21 +1,6 @@
1/* 1#ifndef _ASM_S390_SOCKIOS_H
2 * include/asm-s390/sockios.h 2#define _ASM_S390_SOCKIOS_H
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/sockios.h"
7 */
8 3
9#ifndef __ARCH_S390_SOCKIOS__ 4#include <asm-generic/sockios.h>
10#define __ARCH_S390_SOCKIOS__
11
12/* Socket-level I/O control calls. */
13#define FIOSETOWN 0x8901
14#define SIOCSPGRP 0x8902
15#define FIOGETOWN 0x8903
16#define SIOCGPGRP 0x8904
17#define SIOCATMARK 0x8905
18#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
19#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
20 5
21#endif 6#endif
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h
index c9af0d19c7ab..a587907d77f3 100644
--- a/arch/s390/include/asm/spinlock.h
+++ b/arch/s390/include/asm/spinlock.h
@@ -52,27 +52,27 @@ _raw_compare_and_swap(volatile unsigned int *lock,
52 * (the type definitions are in asm/spinlock_types.h) 52 * (the type definitions are in asm/spinlock_types.h)
53 */ 53 */
54 54
55#define __raw_spin_is_locked(x) ((x)->owner_cpu != 0) 55#define arch_spin_is_locked(x) ((x)->owner_cpu != 0)
56#define __raw_spin_unlock_wait(lock) \ 56#define arch_spin_unlock_wait(lock) \
57 do { while (__raw_spin_is_locked(lock)) \ 57 do { while (arch_spin_is_locked(lock)) \
58 _raw_spin_relax(lock); } while (0) 58 arch_spin_relax(lock); } while (0)
59 59
60extern void _raw_spin_lock_wait(raw_spinlock_t *); 60extern void arch_spin_lock_wait(arch_spinlock_t *);
61extern void _raw_spin_lock_wait_flags(raw_spinlock_t *, unsigned long flags); 61extern void arch_spin_lock_wait_flags(arch_spinlock_t *, unsigned long flags);
62extern int _raw_spin_trylock_retry(raw_spinlock_t *); 62extern int arch_spin_trylock_retry(arch_spinlock_t *);
63extern void _raw_spin_relax(raw_spinlock_t *lock); 63extern void arch_spin_relax(arch_spinlock_t *lock);
64 64
65static inline void __raw_spin_lock(raw_spinlock_t *lp) 65static inline void arch_spin_lock(arch_spinlock_t *lp)
66{ 66{
67 int old; 67 int old;
68 68
69 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); 69 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id());
70 if (likely(old == 0)) 70 if (likely(old == 0))
71 return; 71 return;
72 _raw_spin_lock_wait(lp); 72 arch_spin_lock_wait(lp);
73} 73}
74 74
75static inline void __raw_spin_lock_flags(raw_spinlock_t *lp, 75static inline void arch_spin_lock_flags(arch_spinlock_t *lp,
76 unsigned long flags) 76 unsigned long flags)
77{ 77{
78 int old; 78 int old;
@@ -80,20 +80,20 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lp,
80 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); 80 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id());
81 if (likely(old == 0)) 81 if (likely(old == 0))
82 return; 82 return;
83 _raw_spin_lock_wait_flags(lp, flags); 83 arch_spin_lock_wait_flags(lp, flags);
84} 84}
85 85
86static inline int __raw_spin_trylock(raw_spinlock_t *lp) 86static inline int arch_spin_trylock(arch_spinlock_t *lp)
87{ 87{
88 int old; 88 int old;
89 89
90 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); 90 old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id());
91 if (likely(old == 0)) 91 if (likely(old == 0))
92 return 1; 92 return 1;
93 return _raw_spin_trylock_retry(lp); 93 return arch_spin_trylock_retry(lp);
94} 94}
95 95
96static inline void __raw_spin_unlock(raw_spinlock_t *lp) 96static inline void arch_spin_unlock(arch_spinlock_t *lp)
97{ 97{
98 _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0); 98 _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0);
99} 99}
@@ -113,22 +113,22 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lp)
113 * read_can_lock - would read_trylock() succeed? 113 * read_can_lock - would read_trylock() succeed?
114 * @lock: the rwlock in question. 114 * @lock: the rwlock in question.
115 */ 115 */
116#define __raw_read_can_lock(x) ((int)(x)->lock >= 0) 116#define arch_read_can_lock(x) ((int)(x)->lock >= 0)
117 117
118/** 118/**
119 * write_can_lock - would write_trylock() succeed? 119 * write_can_lock - would write_trylock() succeed?
120 * @lock: the rwlock in question. 120 * @lock: the rwlock in question.
121 */ 121 */
122#define __raw_write_can_lock(x) ((x)->lock == 0) 122#define arch_write_can_lock(x) ((x)->lock == 0)
123 123
124extern void _raw_read_lock_wait(raw_rwlock_t *lp); 124extern void _raw_read_lock_wait(arch_rwlock_t *lp);
125extern void _raw_read_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); 125extern void _raw_read_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags);
126extern int _raw_read_trylock_retry(raw_rwlock_t *lp); 126extern int _raw_read_trylock_retry(arch_rwlock_t *lp);
127extern void _raw_write_lock_wait(raw_rwlock_t *lp); 127extern void _raw_write_lock_wait(arch_rwlock_t *lp);
128extern void _raw_write_lock_wait_flags(raw_rwlock_t *lp, unsigned long flags); 128extern void _raw_write_lock_wait_flags(arch_rwlock_t *lp, unsigned long flags);
129extern int _raw_write_trylock_retry(raw_rwlock_t *lp); 129extern int _raw_write_trylock_retry(arch_rwlock_t *lp);
130 130
131static inline void __raw_read_lock(raw_rwlock_t *rw) 131static inline void arch_read_lock(arch_rwlock_t *rw)
132{ 132{
133 unsigned int old; 133 unsigned int old;
134 old = rw->lock & 0x7fffffffU; 134 old = rw->lock & 0x7fffffffU;
@@ -136,7 +136,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
136 _raw_read_lock_wait(rw); 136 _raw_read_lock_wait(rw);
137} 137}
138 138
139static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags) 139static inline void arch_read_lock_flags(arch_rwlock_t *rw, unsigned long flags)
140{ 140{
141 unsigned int old; 141 unsigned int old;
142 old = rw->lock & 0x7fffffffU; 142 old = rw->lock & 0x7fffffffU;
@@ -144,7 +144,7 @@ static inline void __raw_read_lock_flags(raw_rwlock_t *rw, unsigned long flags)
144 _raw_read_lock_wait_flags(rw, flags); 144 _raw_read_lock_wait_flags(rw, flags);
145} 145}
146 146
147static inline void __raw_read_unlock(raw_rwlock_t *rw) 147static inline void arch_read_unlock(arch_rwlock_t *rw)
148{ 148{
149 unsigned int old, cmp; 149 unsigned int old, cmp;
150 150
@@ -155,24 +155,24 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
155 } while (cmp != old); 155 } while (cmp != old);
156} 156}
157 157
158static inline void __raw_write_lock(raw_rwlock_t *rw) 158static inline void arch_write_lock(arch_rwlock_t *rw)
159{ 159{
160 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) 160 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0))
161 _raw_write_lock_wait(rw); 161 _raw_write_lock_wait(rw);
162} 162}
163 163
164static inline void __raw_write_lock_flags(raw_rwlock_t *rw, unsigned long flags) 164static inline void arch_write_lock_flags(arch_rwlock_t *rw, unsigned long flags)
165{ 165{
166 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0)) 166 if (unlikely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) != 0))
167 _raw_write_lock_wait_flags(rw, flags); 167 _raw_write_lock_wait_flags(rw, flags);
168} 168}
169 169
170static inline void __raw_write_unlock(raw_rwlock_t *rw) 170static inline void arch_write_unlock(arch_rwlock_t *rw)
171{ 171{
172 _raw_compare_and_swap(&rw->lock, 0x80000000, 0); 172 _raw_compare_and_swap(&rw->lock, 0x80000000, 0);
173} 173}
174 174
175static inline int __raw_read_trylock(raw_rwlock_t *rw) 175static inline int arch_read_trylock(arch_rwlock_t *rw)
176{ 176{
177 unsigned int old; 177 unsigned int old;
178 old = rw->lock & 0x7fffffffU; 178 old = rw->lock & 0x7fffffffU;
@@ -181,14 +181,14 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
181 return _raw_read_trylock_retry(rw); 181 return _raw_read_trylock_retry(rw);
182} 182}
183 183
184static inline int __raw_write_trylock(raw_rwlock_t *rw) 184static inline int arch_write_trylock(arch_rwlock_t *rw)
185{ 185{
186 if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)) 186 if (likely(_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0))
187 return 1; 187 return 1;
188 return _raw_write_trylock_retry(rw); 188 return _raw_write_trylock_retry(rw);
189} 189}
190 190
191#define _raw_read_relax(lock) cpu_relax() 191#define arch_read_relax(lock) cpu_relax()
192#define _raw_write_relax(lock) cpu_relax() 192#define arch_write_relax(lock) cpu_relax()
193 193
194#endif /* __ASM_SPINLOCK_H */ 194#endif /* __ASM_SPINLOCK_H */
diff --git a/arch/s390/include/asm/spinlock_types.h b/arch/s390/include/asm/spinlock_types.h
index 654abc40de04..9c76656a0af0 100644
--- a/arch/s390/include/asm/spinlock_types.h
+++ b/arch/s390/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int owner_cpu; 9 volatile unsigned int owner_cpu;
10} __attribute__ ((aligned (4))) raw_spinlock_t; 10} __attribute__ ((aligned (4))) arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/s390/include/asm/termbits.h b/arch/s390/include/asm/termbits.h
index 58731853d529..71bf6ac6a2b9 100644
--- a/arch/s390/include/asm/termbits.h
+++ b/arch/s390/include/asm/termbits.h
@@ -1,206 +1,6 @@
1/* 1#ifndef _ASM_S390_TERMBITS_H
2 * include/asm-s390/termbits.h 2#define _ASM_S390_TERMBITS_H
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/termbits.h"
7 */
8 3
9#ifndef __ARCH_S390_TERMBITS_H__ 4#include <asm-generic/termbits.h>
10#define __ARCH_S390_TERMBITS_H__
11
12#include <linux/posix_types.h>
13
14typedef unsigned char cc_t;
15typedef unsigned int speed_t;
16typedef unsigned int tcflag_t;
17
18#define NCCS 19
19struct termios {
20 tcflag_t c_iflag; /* input mode flags */
21 tcflag_t c_oflag; /* output mode flags */
22 tcflag_t c_cflag; /* control mode flags */
23 tcflag_t c_lflag; /* local mode flags */
24 cc_t c_line; /* line discipline */
25 cc_t c_cc[NCCS]; /* control characters */
26};
27
28struct termios2 {
29 tcflag_t c_iflag; /* input mode flags */
30 tcflag_t c_oflag; /* output mode flags */
31 tcflag_t c_cflag; /* control mode flags */
32 tcflag_t c_lflag; /* local mode flags */
33 cc_t c_line; /* line discipline */
34 cc_t c_cc[NCCS]; /* control characters */
35 speed_t c_ispeed; /* input speed */
36 speed_t c_ospeed; /* output speed */
37};
38
39struct ktermios {
40 tcflag_t c_iflag; /* input mode flags */
41 tcflag_t c_oflag; /* output mode flags */
42 tcflag_t c_cflag; /* control mode flags */
43 tcflag_t c_lflag; /* local mode flags */
44 cc_t c_line; /* line discipline */
45 cc_t c_cc[NCCS]; /* control characters */
46 speed_t c_ispeed; /* input speed */
47 speed_t c_ospeed; /* output speed */
48};
49
50/* c_cc characters */
51#define VINTR 0
52#define VQUIT 1
53#define VERASE 2
54#define VKILL 3
55#define VEOF 4
56#define VTIME 5
57#define VMIN 6
58#define VSWTC 7
59#define VSTART 8
60#define VSTOP 9
61#define VSUSP 10
62#define VEOL 11
63#define VREPRINT 12
64#define VDISCARD 13
65#define VWERASE 14
66#define VLNEXT 15
67#define VEOL2 16
68
69/* c_iflag bits */
70#define IGNBRK 0000001
71#define BRKINT 0000002
72#define IGNPAR 0000004
73#define PARMRK 0000010
74#define INPCK 0000020
75#define ISTRIP 0000040
76#define INLCR 0000100
77#define IGNCR 0000200
78#define ICRNL 0000400
79#define IUCLC 0001000
80#define IXON 0002000
81#define IXANY 0004000
82#define IXOFF 0010000
83#define IMAXBEL 0020000
84#define IUTF8 0040000
85
86/* c_oflag bits */
87#define OPOST 0000001
88#define OLCUC 0000002
89#define ONLCR 0000004
90#define OCRNL 0000010
91#define ONOCR 0000020
92#define ONLRET 0000040
93#define OFILL 0000100
94#define OFDEL 0000200
95#define NLDLY 0000400
96#define NL0 0000000
97#define NL1 0000400
98#define CRDLY 0003000
99#define CR0 0000000
100#define CR1 0001000
101#define CR2 0002000
102#define CR3 0003000
103#define TABDLY 0014000
104#define TAB0 0000000
105#define TAB1 0004000
106#define TAB2 0010000
107#define TAB3 0014000
108#define XTABS 0014000
109#define BSDLY 0020000
110#define BS0 0000000
111#define BS1 0020000
112#define VTDLY 0040000
113#define VT0 0000000
114#define VT1 0040000
115#define FFDLY 0100000
116#define FF0 0000000
117#define FF1 0100000
118
119/* c_cflag bit meaning */
120#define CBAUD 0010017
121#define B0 0000000 /* hang up */
122#define B50 0000001
123#define B75 0000002
124#define B110 0000003
125#define B134 0000004
126#define B150 0000005
127#define B200 0000006
128#define B300 0000007
129#define B600 0000010
130#define B1200 0000011
131#define B1800 0000012
132#define B2400 0000013
133#define B4800 0000014
134#define B9600 0000015
135#define B19200 0000016
136#define B38400 0000017
137#define EXTA B19200
138#define EXTB B38400
139#define CSIZE 0000060
140#define CS5 0000000
141#define CS6 0000020
142#define CS7 0000040
143#define CS8 0000060
144#define CSTOPB 0000100
145#define CREAD 0000200
146#define PARENB 0000400
147#define PARODD 0001000
148#define HUPCL 0002000
149#define CLOCAL 0004000
150#define CBAUDEX 0010000
151#define BOTHER 0010000
152#define B57600 0010001
153#define B115200 0010002
154#define B230400 0010003
155#define B460800 0010004
156#define B500000 0010005
157#define B576000 0010006
158#define B921600 0010007
159#define B1000000 0010010
160#define B1152000 0010011
161#define B1500000 0010012
162#define B2000000 0010013
163#define B2500000 0010014
164#define B3000000 0010015
165#define B3500000 0010016
166#define B4000000 0010017
167#define CIBAUD 002003600000 /* input baud rate */
168#define CMSPAR 010000000000 /* mark or space (stick) parity */
169#define CRTSCTS 020000000000 /* flow control */
170
171#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
172
173/* c_lflag bits */
174#define ISIG 0000001
175#define ICANON 0000002
176#define XCASE 0000004
177#define ECHO 0000010
178#define ECHOE 0000020
179#define ECHOK 0000040
180#define ECHONL 0000100
181#define NOFLSH 0000200
182#define TOSTOP 0000400
183#define ECHOCTL 0001000
184#define ECHOPRT 0002000
185#define ECHOKE 0004000
186#define FLUSHO 0010000
187#define PENDIN 0040000
188#define IEXTEN 0100000
189
190/* tcflow() and TCXONC use these */
191#define TCOOFF 0
192#define TCOON 1
193#define TCIOFF 2
194#define TCION 3
195
196/* tcflush() and TCFLSH use these */
197#define TCIFLUSH 0
198#define TCOFLUSH 1
199#define TCIOFLUSH 2
200
201/* tcsetattr uses these */
202#define TCSANOW 0
203#define TCSADRAIN 1
204#define TCSAFLUSH 2
205 5
206#endif 6#endif
diff --git a/arch/s390/include/asm/todclk.h b/arch/s390/include/asm/todclk.h
deleted file mode 100644
index c7f62055488a..000000000000
--- a/arch/s390/include/asm/todclk.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * File...........: linux/include/asm/todclk.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com>
5 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
6 *
7 * History of changes (starts July 2000)
8 */
9
10#ifndef __ASM_TODCLK_H
11#define __ASM_TODCLK_H
12
13#ifdef __KERNEL__
14
15#define TOD_uSEC (0x1000ULL)
16#define TOD_mSEC (1000 * TOD_uSEC)
17#define TOD_SEC (1000 * TOD_mSEC)
18#define TOD_MIN (60 * TOD_SEC)
19#define TOD_HOUR (60 * TOD_MIN)
20
21#endif
22
23#endif
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 8377e91533d2..cbf0a8745bf4 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -93,6 +93,8 @@ extern struct uaccess_ops uaccess_mvcos;
93extern struct uaccess_ops uaccess_mvcos_switch; 93extern struct uaccess_ops uaccess_mvcos_switch;
94extern struct uaccess_ops uaccess_pt; 94extern struct uaccess_ops uaccess_pt;
95 95
96extern int __handle_fault(unsigned long, unsigned long, int);
97
96static inline int __put_user_fn(size_t size, void __user *ptr, void *x) 98static inline int __put_user_fn(size_t size, void __user *ptr, void *x)
97{ 99{
98 size = uaccess.copy_to_user_small(size, ptr, x); 100 size = uaccess.copy_to_user_small(size, ptr, x);
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index c7be8e10b87e..683f6381cc59 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o
44obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o) 44obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o)
45obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 45obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
46obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 46obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
47obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
47 48
48# Kexec part 49# Kexec part
49S390_KEXEC_OBJS := machine_kexec.o crash.o 50S390_KEXEC_OBJS := machine_kexec.o crash.o
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index fda1a8123f9b..22c9e557bb22 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -31,14 +31,8 @@
31#include <linux/shm.h> 31#include <linux/shm.h>
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/uio.h> 33#include <linux/uio.h>
34#include <linux/nfs_fs.h>
35#include <linux/quota.h> 34#include <linux/quota.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/sunrpc/svc.h>
38#include <linux/nfsd/nfsd.h>
39#include <linux/nfsd/cache.h>
40#include <linux/nfsd/xdr.h>
41#include <linux/nfsd/syscall.h>
42#include <linux/poll.h> 36#include <linux/poll.h>
43#include <linux/personality.h> 37#include <linux/personality.h>
44#include <linux/stat.h> 38#include <linux/stat.h>
@@ -630,38 +624,6 @@ struct mmap_arg_struct_emu31 {
630 u32 offset; 624 u32 offset;
631}; 625};
632 626
633/* common code for old and new mmaps */
634static inline long do_mmap2(
635 unsigned long addr, unsigned long len,
636 unsigned long prot, unsigned long flags,
637 unsigned long fd, unsigned long pgoff)
638{
639 struct file * file = NULL;
640 unsigned long error = -EBADF;
641
642 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
643 if (!(flags & MAP_ANONYMOUS)) {
644 file = fget(fd);
645 if (!file)
646 goto out;
647 }
648
649 down_write(&current->mm->mmap_sem);
650 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
651 if (!IS_ERR((void *) error) && error + len >= 0x80000000ULL) {
652 /* Result is out of bounds. */
653 do_munmap(current->mm, addr, len);
654 error = -ENOMEM;
655 }
656 up_write(&current->mm->mmap_sem);
657
658 if (file)
659 fput(file);
660out:
661 return error;
662}
663
664
665asmlinkage unsigned long 627asmlinkage unsigned long
666old32_mmap(struct mmap_arg_struct_emu31 __user *arg) 628old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
667{ 629{
@@ -675,7 +637,8 @@ old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
675 if (a.offset & ~PAGE_MASK) 637 if (a.offset & ~PAGE_MASK)
676 goto out; 638 goto out;
677 639
678 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); 640 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
641 a.offset >> PAGE_SHIFT);
679out: 642out:
680 return error; 643 return error;
681} 644}
@@ -688,7 +651,7 @@ sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg)
688 651
689 if (copy_from_user(&a, arg, sizeof(a))) 652 if (copy_from_user(&a, arg, sizeof(a)))
690 goto out; 653 goto out;
691 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); 654 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
692out: 655out:
693 return error; 656 return error;
694} 657}
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 45e9092b3aad..cb97afc85c94 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -4,10 +4,6 @@
4#include <linux/compat.h> 4#include <linux/compat.h>
5#include <linux/socket.h> 5#include <linux/socket.h>
6#include <linux/syscalls.h> 6#include <linux/syscalls.h>
7#include <linux/nfs_fs.h>
8#include <linux/sunrpc/svc.h>
9#include <linux/nfsd/nfsd.h>
10#include <linux/nfsd/export.h>
11 7
12/* Macro that masks the high order bit of an 32 bit pointer and converts it*/ 8/* Macro that masks the high order bit of an 32 bit pointer and converts it*/
13/* to a 64 bit pointer */ 9/* to a 64 bit pointer */
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 071c81f179ef..0168472b2fdf 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -18,6 +18,7 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/ctype.h> 20#include <linux/ctype.h>
21#include <linux/string.h>
21#include <linux/sysctl.h> 22#include <linux/sysctl.h>
22#include <asm/uaccess.h> 23#include <asm/uaccess.h>
23#include <linux/module.h> 24#include <linux/module.h>
@@ -1178,7 +1179,7 @@ debug_get_uint(char *buf)
1178{ 1179{
1179 int rc; 1180 int rc;
1180 1181
1181 for(; isspace(*buf); buf++); 1182 buf = skip_spaces(buf);
1182 rc = simple_strtoul(buf, &buf, 10); 1183 rc = simple_strtoul(buf, &buf, 10);
1183 if(*buf){ 1184 if(*buf){
1184 rc = -EINVAL; 1185 rc = -EINVAL;
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 6a250808092b..d984a2a380c3 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -83,6 +83,8 @@ startup_continue:
83 slr %r0,%r0 # set cpuid to zero 83 slr %r0,%r0 # set cpuid to zero
84 sigp %r1,%r0,0x12 # switch to esame mode 84 sigp %r1,%r0,0x12 # switch to esame mode
85 sam64 # switch to 64 bit mode 85 sam64 # switch to 64 bit mode
86 llgfr %r13,%r13 # clear high-order half of base reg
87 lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half
86 lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers 88 lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers
87 lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area 89 lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area
88 # move IPL device to lowcore 90 # move IPL device to lowcore
@@ -127,6 +129,7 @@ startup_continue:
127.L4malign:.quad 0xffffffffffc00000 129.L4malign:.quad 0xffffffffffc00000
128.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 130.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8
129.Lnop: .long 0x07000700 131.Lnop: .long 0x07000700
132.Lzero64:.fill 16,4,0x0
130#ifdef CONFIG_ZFCPDUMP 133#ifdef CONFIG_ZFCPDUMP
131.Lcurrent_cpu: 134.Lcurrent_cpu:
132 .long 0x0 135 .long 0x0
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index 0de305b598ce..59618bcd99b7 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -126,6 +126,8 @@ void __irq_entry do_extint(struct pt_regs *regs, unsigned short code)
126 /* Serve timer interrupts first. */ 126 /* Serve timer interrupts first. */
127 clock_comparator_work(); 127 clock_comparator_work();
128 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 128 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
129 if (code != 0x1004)
130 __get_cpu_var(s390_idle).nohz_delay = 1;
129 index = ext_hash(code); 131 index = ext_hash(code);
130 for (p = ext_int_hash[index]; p; p = p->next) { 132 for (p = ext_int_hash[index]; p; p = p->next) {
131 if (likely(p->code == code)) 133 if (likely(p->code == code))
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 061479ff029f..0663287fa1b3 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -305,9 +305,8 @@ static int __init early_parse_mem(char *p)
305} 305}
306early_param("mem", early_parse_mem); 306early_param("mem", early_parse_mem);
307 307
308#ifdef CONFIG_S390_SWITCH_AMODE 308unsigned int user_mode = HOME_SPACE_MODE;
309unsigned int switch_amode = 0; 309EXPORT_SYMBOL_GPL(user_mode);
310EXPORT_SYMBOL_GPL(switch_amode);
311 310
312static int set_amode_and_uaccess(unsigned long user_amode, 311static int set_amode_and_uaccess(unsigned long user_amode,
313 unsigned long user32_amode) 312 unsigned long user32_amode)
@@ -340,23 +339,29 @@ static int set_amode_and_uaccess(unsigned long user_amode,
340 */ 339 */
341static int __init early_parse_switch_amode(char *p) 340static int __init early_parse_switch_amode(char *p)
342{ 341{
343 switch_amode = 1; 342 if (user_mode != SECONDARY_SPACE_MODE)
343 user_mode = PRIMARY_SPACE_MODE;
344 return 0; 344 return 0;
345} 345}
346early_param("switch_amode", early_parse_switch_amode); 346early_param("switch_amode", early_parse_switch_amode);
347 347
348#else /* CONFIG_S390_SWITCH_AMODE */ 348static int __init early_parse_user_mode(char *p)
349static inline int set_amode_and_uaccess(unsigned long user_amode,
350 unsigned long user32_amode)
351{ 349{
350 if (p && strcmp(p, "primary") == 0)
351 user_mode = PRIMARY_SPACE_MODE;
352#ifdef CONFIG_S390_EXEC_PROTECT
353 else if (p && strcmp(p, "secondary") == 0)
354 user_mode = SECONDARY_SPACE_MODE;
355#endif
356 else if (!p || strcmp(p, "home") == 0)
357 user_mode = HOME_SPACE_MODE;
358 else
359 return 1;
352 return 0; 360 return 0;
353} 361}
354#endif /* CONFIG_S390_SWITCH_AMODE */ 362early_param("user_mode", early_parse_user_mode);
355 363
356#ifdef CONFIG_S390_EXEC_PROTECT 364#ifdef CONFIG_S390_EXEC_PROTECT
357unsigned int s390_noexec = 0;
358EXPORT_SYMBOL_GPL(s390_noexec);
359
360/* 365/*
361 * Enable execute protection? 366 * Enable execute protection?
362 */ 367 */
@@ -364,8 +369,7 @@ static int __init early_parse_noexec(char *p)
364{ 369{
365 if (!strncmp(p, "off", 3)) 370 if (!strncmp(p, "off", 3))
366 return 0; 371 return 0;
367 switch_amode = 1; 372 user_mode = SECONDARY_SPACE_MODE;
368 s390_noexec = 1;
369 return 0; 373 return 0;
370} 374}
371early_param("noexec", early_parse_noexec); 375early_param("noexec", early_parse_noexec);
@@ -373,7 +377,7 @@ early_param("noexec", early_parse_noexec);
373 377
374static void setup_addressing_mode(void) 378static void setup_addressing_mode(void)
375{ 379{
376 if (s390_noexec) { 380 if (user_mode == SECONDARY_SPACE_MODE) {
377 if (set_amode_and_uaccess(PSW_ASC_SECONDARY, 381 if (set_amode_and_uaccess(PSW_ASC_SECONDARY,
378 PSW32_ASC_SECONDARY)) 382 PSW32_ASC_SECONDARY))
379 pr_info("Execute protection active, " 383 pr_info("Execute protection active, "
@@ -381,7 +385,7 @@ static void setup_addressing_mode(void)
381 else 385 else
382 pr_info("Execute protection active, " 386 pr_info("Execute protection active, "
383 "mvcos not available\n"); 387 "mvcos not available\n");
384 } else if (switch_amode) { 388 } else if (user_mode == PRIMARY_SPACE_MODE) {
385 if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY)) 389 if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY))
386 pr_info("Address spaces switched, " 390 pr_info("Address spaces switched, "
387 "mvcos available\n"); 391 "mvcos available\n");
@@ -411,7 +415,7 @@ setup_lowcore(void)
411 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; 415 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY;
412 lc->restart_psw.addr = 416 lc->restart_psw.addr =
413 PSW_ADDR_AMODE | (unsigned long) restart_int_handler; 417 PSW_ADDR_AMODE | (unsigned long) restart_int_handler;
414 if (switch_amode) 418 if (user_mode != HOME_SPACE_MODE)
415 lc->restart_psw.mask |= PSW_ASC_HOME; 419 lc->restart_psw.mask |= PSW_ASC_HOME;
416 lc->external_new_psw.mask = psw_kernel_bits; 420 lc->external_new_psw.mask = psw_kernel_bits;
417 lc->external_new_psw.addr = 421 lc->external_new_psw.addr =
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index e9d94f61d500..86a74c9c9e63 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -32,32 +32,6 @@
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include "entry.h" 33#include "entry.h"
34 34
35/* common code for old and new mmaps */
36static inline long do_mmap2(
37 unsigned long addr, unsigned long len,
38 unsigned long prot, unsigned long flags,
39 unsigned long fd, unsigned long pgoff)
40{
41 long error = -EBADF;
42 struct file * file = NULL;
43
44 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
45 if (!(flags & MAP_ANONYMOUS)) {
46 file = fget(fd);
47 if (!file)
48 goto out;
49 }
50
51 down_write(&current->mm->mmap_sem);
52 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
53 up_write(&current->mm->mmap_sem);
54
55 if (file)
56 fput(file);
57out:
58 return error;
59}
60
61/* 35/*
62 * Perform the select(nd, in, out, ex, tv) and mmap() system 36 * Perform the select(nd, in, out, ex, tv) and mmap() system
63 * calls. Linux for S/390 isn't able to handle more than 5 37 * calls. Linux for S/390 isn't able to handle more than 5
@@ -81,7 +55,7 @@ SYSCALL_DEFINE1(mmap2, struct mmap_arg_struct __user *, arg)
81 55
82 if (copy_from_user(&a, arg, sizeof(a))) 56 if (copy_from_user(&a, arg, sizeof(a)))
83 goto out; 57 goto out;
84 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); 58 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
85out: 59out:
86 return error; 60 return error;
87} 61}
@@ -98,7 +72,7 @@ SYSCALL_DEFINE1(s390_old_mmap, struct mmap_arg_struct __user *, arg)
98 if (a.offset & ~PAGE_MASK) 72 if (a.offset & ~PAGE_MASK)
99 goto out; 73 goto out;
100 74
101 error = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); 75 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
102out: 76out:
103 return error; 77 return error;
104} 78}
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 34162a0b2caa..65065ac48ed3 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -214,7 +214,8 @@ struct clocksource * __init clocksource_default_clock(void)
214 return &clocksource_tod; 214 return &clocksource_tod;
215} 215}
216 216
217void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) 217void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
218 u32 mult)
218{ 219{
219 if (clock != &clocksource_tod) 220 if (clock != &clocksource_tod)
220 return; 221 return;
@@ -334,7 +335,7 @@ int get_sync_clock(unsigned long long *clock)
334 sw0 = atomic_read(sw_ptr); 335 sw0 = atomic_read(sw_ptr);
335 *clock = get_clock(); 336 *clock = get_clock();
336 sw1 = atomic_read(sw_ptr); 337 sw1 = atomic_read(sw_ptr);
337 put_cpu_var(clock_sync_sync); 338 put_cpu_var(clock_sync_word);
338 if (sw0 == sw1 && (sw0 & 0x80000000U)) 339 if (sw0 == sw1 && (sw0 & 0x80000000U))
339 /* Success: time is in sync. */ 340 /* Success: time is in sync. */
340 return 0; 341 return 0;
@@ -384,7 +385,7 @@ static inline int check_sync_clock(void)
384 385
385 sw_ptr = &get_cpu_var(clock_sync_word); 386 sw_ptr = &get_cpu_var(clock_sync_word);
386 rc = (atomic_read(sw_ptr) & 0x80000000U) != 0; 387 rc = (atomic_read(sw_ptr) & 0x80000000U) != 0;
387 put_cpu_var(clock_sync_sync); 388 put_cpu_var(clock_sync_word);
388 return rc; 389 return rc;
389} 390}
390 391
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index adfb32aa6d59..5f99e66c51c3 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -86,7 +86,8 @@ static void vdso_init_data(struct vdso_data *vd)
86 unsigned int facility_list; 86 unsigned int facility_list;
87 87
88 facility_list = stfl(); 88 facility_list = stfl();
89 vd->ectg_available = switch_amode && (facility_list & 1); 89 vd->ectg_available =
90 user_mode != HOME_SPACE_MODE && (facility_list & 1);
90} 91}
91 92
92#ifdef CONFIG_64BIT 93#ifdef CONFIG_64BIT
@@ -114,7 +115,7 @@ int vdso_alloc_per_cpu(int cpu, struct _lowcore *lowcore)
114 115
115 lowcore->vdso_per_cpu_data = __LC_PASTE; 116 lowcore->vdso_per_cpu_data = __LC_PASTE;
116 117
117 if (!switch_amode || !vdso_enabled) 118 if (user_mode == HOME_SPACE_MODE || !vdso_enabled)
118 return 0; 119 return 0;
119 120
120 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER); 121 segment_table = __get_free_pages(GFP_KERNEL, SEGMENT_ORDER);
@@ -160,7 +161,7 @@ void vdso_free_per_cpu(int cpu, struct _lowcore *lowcore)
160 unsigned long segment_table, page_table, page_frame; 161 unsigned long segment_table, page_table, page_frame;
161 u32 *psal, *aste; 162 u32 *psal, *aste;
162 163
163 if (!switch_amode || !vdso_enabled) 164 if (user_mode == HOME_SPACE_MODE || !vdso_enabled)
164 return; 165 return;
165 166
166 psal = (u32 *)(addr_t) lowcore->paste[4]; 167 psal = (u32 *)(addr_t) lowcore->paste[4];
@@ -184,7 +185,7 @@ static void __vdso_init_cr5(void *dummy)
184 185
185static void vdso_init_cr5(void) 186static void vdso_init_cr5(void)
186{ 187{
187 if (switch_amode && vdso_enabled) 188 if (user_mode != HOME_SPACE_MODE && vdso_enabled)
188 on_each_cpu(__vdso_init_cr5, NULL, 1); 189 on_each_cpu(__vdso_init_cr5, NULL, 1);
189} 190}
190#endif /* CONFIG_64BIT */ 191#endif /* CONFIG_64BIT */
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index c41bb0d416e1..b59a812a010e 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -167,6 +167,8 @@ void vtime_stop_cpu(void)
167 /* Wait for external, I/O or machine check interrupt. */ 167 /* Wait for external, I/O or machine check interrupt. */
168 psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT; 168 psw.mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT;
169 169
170 idle->nohz_delay = 0;
171
170 /* Check if the CPU timer needs to be reprogrammed. */ 172 /* Check if the CPU timer needs to be reprogrammed. */
171 if (vq->do_spt) { 173 if (vq->do_spt) {
172 __u64 vmax = VTIMER_MAX_SLICE; 174 __u64 vmax = VTIMER_MAX_SLICE;
diff --git a/arch/s390/kvm/Kconfig b/arch/s390/kvm/Kconfig
index bf164fc21864..6ee55ae84ce2 100644
--- a/arch/s390/kvm/Kconfig
+++ b/arch/s390/kvm/Kconfig
@@ -20,7 +20,6 @@ config KVM
20 depends on HAVE_KVM && EXPERIMENTAL 20 depends on HAVE_KVM && EXPERIMENTAL
21 select PREEMPT_NOTIFIERS 21 select PREEMPT_NOTIFIERS
22 select ANON_INODES 22 select ANON_INODES
23 select S390_SWITCH_AMODE
24 ---help--- 23 ---help---
25 Support hosting paravirtualized guest machines using the SIE 24 Support hosting paravirtualized guest machines using the SIE
26 virtualization capability on the mainframe. This should work 25 virtualization capability on the mainframe. This should work
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index f7e0d30250b7..10754a375668 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -39,7 +39,7 @@ static inline void _raw_yield_cpu(int cpu)
39 _raw_yield(); 39 _raw_yield();
40} 40}
41 41
42void _raw_spin_lock_wait(raw_spinlock_t *lp) 42void arch_spin_lock_wait(arch_spinlock_t *lp)
43{ 43{
44 int count = spin_retry; 44 int count = spin_retry;
45 unsigned int cpu = ~smp_processor_id(); 45 unsigned int cpu = ~smp_processor_id();
@@ -51,15 +51,15 @@ void _raw_spin_lock_wait(raw_spinlock_t *lp)
51 _raw_yield_cpu(~owner); 51 _raw_yield_cpu(~owner);
52 count = spin_retry; 52 count = spin_retry;
53 } 53 }
54 if (__raw_spin_is_locked(lp)) 54 if (arch_spin_is_locked(lp))
55 continue; 55 continue;
56 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) 56 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0)
57 return; 57 return;
58 } 58 }
59} 59}
60EXPORT_SYMBOL(_raw_spin_lock_wait); 60EXPORT_SYMBOL(arch_spin_lock_wait);
61 61
62void _raw_spin_lock_wait_flags(raw_spinlock_t *lp, unsigned long flags) 62void arch_spin_lock_wait_flags(arch_spinlock_t *lp, unsigned long flags)
63{ 63{
64 int count = spin_retry; 64 int count = spin_retry;
65 unsigned int cpu = ~smp_processor_id(); 65 unsigned int cpu = ~smp_processor_id();
@@ -72,7 +72,7 @@ void _raw_spin_lock_wait_flags(raw_spinlock_t *lp, unsigned long flags)
72 _raw_yield_cpu(~owner); 72 _raw_yield_cpu(~owner);
73 count = spin_retry; 73 count = spin_retry;
74 } 74 }
75 if (__raw_spin_is_locked(lp)) 75 if (arch_spin_is_locked(lp))
76 continue; 76 continue;
77 local_irq_disable(); 77 local_irq_disable();
78 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) 78 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0)
@@ -80,32 +80,32 @@ void _raw_spin_lock_wait_flags(raw_spinlock_t *lp, unsigned long flags)
80 local_irq_restore(flags); 80 local_irq_restore(flags);
81 } 81 }
82} 82}
83EXPORT_SYMBOL(_raw_spin_lock_wait_flags); 83EXPORT_SYMBOL(arch_spin_lock_wait_flags);
84 84
85int _raw_spin_trylock_retry(raw_spinlock_t *lp) 85int arch_spin_trylock_retry(arch_spinlock_t *lp)
86{ 86{
87 unsigned int cpu = ~smp_processor_id(); 87 unsigned int cpu = ~smp_processor_id();
88 int count; 88 int count;
89 89
90 for (count = spin_retry; count > 0; count--) { 90 for (count = spin_retry; count > 0; count--) {
91 if (__raw_spin_is_locked(lp)) 91 if (arch_spin_is_locked(lp))
92 continue; 92 continue;
93 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0) 93 if (_raw_compare_and_swap(&lp->owner_cpu, 0, cpu) == 0)
94 return 1; 94 return 1;
95 } 95 }
96 return 0; 96 return 0;
97} 97}
98EXPORT_SYMBOL(_raw_spin_trylock_retry); 98EXPORT_SYMBOL(arch_spin_trylock_retry);
99 99
100void _raw_spin_relax(raw_spinlock_t *lock) 100void arch_spin_relax(arch_spinlock_t *lock)
101{ 101{
102 unsigned int cpu = lock->owner_cpu; 102 unsigned int cpu = lock->owner_cpu;
103 if (cpu != 0) 103 if (cpu != 0)
104 _raw_yield_cpu(~cpu); 104 _raw_yield_cpu(~cpu);
105} 105}
106EXPORT_SYMBOL(_raw_spin_relax); 106EXPORT_SYMBOL(arch_spin_relax);
107 107
108void _raw_read_lock_wait(raw_rwlock_t *rw) 108void _raw_read_lock_wait(arch_rwlock_t *rw)
109{ 109{
110 unsigned int old; 110 unsigned int old;
111 int count = spin_retry; 111 int count = spin_retry;
@@ -115,7 +115,7 @@ void _raw_read_lock_wait(raw_rwlock_t *rw)
115 _raw_yield(); 115 _raw_yield();
116 count = spin_retry; 116 count = spin_retry;
117 } 117 }
118 if (!__raw_read_can_lock(rw)) 118 if (!arch_read_can_lock(rw))
119 continue; 119 continue;
120 old = rw->lock & 0x7fffffffU; 120 old = rw->lock & 0x7fffffffU;
121 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 121 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
@@ -124,7 +124,7 @@ void _raw_read_lock_wait(raw_rwlock_t *rw)
124} 124}
125EXPORT_SYMBOL(_raw_read_lock_wait); 125EXPORT_SYMBOL(_raw_read_lock_wait);
126 126
127void _raw_read_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags) 127void _raw_read_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
128{ 128{
129 unsigned int old; 129 unsigned int old;
130 int count = spin_retry; 130 int count = spin_retry;
@@ -135,7 +135,7 @@ void _raw_read_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
135 _raw_yield(); 135 _raw_yield();
136 count = spin_retry; 136 count = spin_retry;
137 } 137 }
138 if (!__raw_read_can_lock(rw)) 138 if (!arch_read_can_lock(rw))
139 continue; 139 continue;
140 old = rw->lock & 0x7fffffffU; 140 old = rw->lock & 0x7fffffffU;
141 local_irq_disable(); 141 local_irq_disable();
@@ -145,13 +145,13 @@ void _raw_read_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
145} 145}
146EXPORT_SYMBOL(_raw_read_lock_wait_flags); 146EXPORT_SYMBOL(_raw_read_lock_wait_flags);
147 147
148int _raw_read_trylock_retry(raw_rwlock_t *rw) 148int _raw_read_trylock_retry(arch_rwlock_t *rw)
149{ 149{
150 unsigned int old; 150 unsigned int old;
151 int count = spin_retry; 151 int count = spin_retry;
152 152
153 while (count-- > 0) { 153 while (count-- > 0) {
154 if (!__raw_read_can_lock(rw)) 154 if (!arch_read_can_lock(rw))
155 continue; 155 continue;
156 old = rw->lock & 0x7fffffffU; 156 old = rw->lock & 0x7fffffffU;
157 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 157 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
@@ -161,7 +161,7 @@ int _raw_read_trylock_retry(raw_rwlock_t *rw)
161} 161}
162EXPORT_SYMBOL(_raw_read_trylock_retry); 162EXPORT_SYMBOL(_raw_read_trylock_retry);
163 163
164void _raw_write_lock_wait(raw_rwlock_t *rw) 164void _raw_write_lock_wait(arch_rwlock_t *rw)
165{ 165{
166 int count = spin_retry; 166 int count = spin_retry;
167 167
@@ -170,7 +170,7 @@ void _raw_write_lock_wait(raw_rwlock_t *rw)
170 _raw_yield(); 170 _raw_yield();
171 count = spin_retry; 171 count = spin_retry;
172 } 172 }
173 if (!__raw_write_can_lock(rw)) 173 if (!arch_write_can_lock(rw))
174 continue; 174 continue;
175 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 175 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
176 return; 176 return;
@@ -178,7 +178,7 @@ void _raw_write_lock_wait(raw_rwlock_t *rw)
178} 178}
179EXPORT_SYMBOL(_raw_write_lock_wait); 179EXPORT_SYMBOL(_raw_write_lock_wait);
180 180
181void _raw_write_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags) 181void _raw_write_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
182{ 182{
183 int count = spin_retry; 183 int count = spin_retry;
184 184
@@ -188,7 +188,7 @@ void _raw_write_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
188 _raw_yield(); 188 _raw_yield();
189 count = spin_retry; 189 count = spin_retry;
190 } 190 }
191 if (!__raw_write_can_lock(rw)) 191 if (!arch_write_can_lock(rw))
192 continue; 192 continue;
193 local_irq_disable(); 193 local_irq_disable();
194 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 194 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
@@ -197,12 +197,12 @@ void _raw_write_lock_wait_flags(raw_rwlock_t *rw, unsigned long flags)
197} 197}
198EXPORT_SYMBOL(_raw_write_lock_wait_flags); 198EXPORT_SYMBOL(_raw_write_lock_wait_flags);
199 199
200int _raw_write_trylock_retry(raw_rwlock_t *rw) 200int _raw_write_trylock_retry(arch_rwlock_t *rw)
201{ 201{
202 int count = spin_retry; 202 int count = spin_retry;
203 203
204 while (count-- > 0) { 204 while (count-- > 0) {
205 if (!__raw_write_can_lock(rw)) 205 if (!arch_write_can_lock(rw))
206 continue; 206 continue;
207 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 207 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
208 return 1; 208 return 1;
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c
index 58da3f461214..60455f104ea3 100644
--- a/arch/s390/lib/uaccess_mvcos.c
+++ b/arch/s390/lib/uaccess_mvcos.c
@@ -162,7 +162,6 @@ static size_t clear_user_mvcos(size_t size, void __user *to)
162 return size; 162 return size;
163} 163}
164 164
165#ifdef CONFIG_S390_SWITCH_AMODE
166static size_t strnlen_user_mvcos(size_t count, const char __user *src) 165static size_t strnlen_user_mvcos(size_t count, const char __user *src)
167{ 166{
168 char buf[256]; 167 char buf[256];
@@ -200,7 +199,6 @@ static size_t strncpy_from_user_mvcos(size_t count, const char __user *src,
200 } while ((len_str == len) && (done < count)); 199 } while ((len_str == len) && (done < count));
201 return done; 200 return done;
202} 201}
203#endif /* CONFIG_S390_SWITCH_AMODE */
204 202
205struct uaccess_ops uaccess_mvcos = { 203struct uaccess_ops uaccess_mvcos = {
206 .copy_from_user = copy_from_user_mvcos_check, 204 .copy_from_user = copy_from_user_mvcos_check,
@@ -215,7 +213,6 @@ struct uaccess_ops uaccess_mvcos = {
215 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std, 213 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std,
216}; 214};
217 215
218#ifdef CONFIG_S390_SWITCH_AMODE
219struct uaccess_ops uaccess_mvcos_switch = { 216struct uaccess_ops uaccess_mvcos_switch = {
220 .copy_from_user = copy_from_user_mvcos, 217 .copy_from_user = copy_from_user_mvcos,
221 .copy_from_user_small = copy_from_user_mvcos, 218 .copy_from_user_small = copy_from_user_mvcos,
@@ -228,4 +225,3 @@ struct uaccess_ops uaccess_mvcos_switch = {
228 .futex_atomic_op = futex_atomic_op_pt, 225 .futex_atomic_op = futex_atomic_op_pt,
229 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt, 226 .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt,
230}; 227};
231#endif
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c
index cb5d59eab0ee..404f2de296dc 100644
--- a/arch/s390/lib/uaccess_pt.c
+++ b/arch/s390/lib/uaccess_pt.c
@@ -23,86 +23,21 @@ static inline pte_t *follow_table(struct mm_struct *mm, unsigned long addr)
23 23
24 pgd = pgd_offset(mm, addr); 24 pgd = pgd_offset(mm, addr);
25 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) 25 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
26 return NULL; 26 return (pte_t *) 0x3a;
27 27
28 pud = pud_offset(pgd, addr); 28 pud = pud_offset(pgd, addr);
29 if (pud_none(*pud) || unlikely(pud_bad(*pud))) 29 if (pud_none(*pud) || unlikely(pud_bad(*pud)))
30 return NULL; 30 return (pte_t *) 0x3b;
31 31
32 pmd = pmd_offset(pud, addr); 32 pmd = pmd_offset(pud, addr);
33 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) 33 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
34 return NULL; 34 return (pte_t *) 0x10;
35 35
36 return pte_offset_map(pmd, addr); 36 return pte_offset_map(pmd, addr);
37} 37}
38 38
39static int __handle_fault(struct mm_struct *mm, unsigned long address, 39static __always_inline size_t __user_copy_pt(unsigned long uaddr, void *kptr,
40 int write_access) 40 size_t n, int write_user)
41{
42 struct vm_area_struct *vma;
43 int ret = -EFAULT;
44 int fault;
45
46 if (in_atomic())
47 return ret;
48 down_read(&mm->mmap_sem);
49 vma = find_vma(mm, address);
50 if (unlikely(!vma))
51 goto out;
52 if (unlikely(vma->vm_start > address)) {
53 if (!(vma->vm_flags & VM_GROWSDOWN))
54 goto out;
55 if (expand_stack(vma, address))
56 goto out;
57 }
58
59 if (!write_access) {
60 /* page not present, check vm flags */
61 if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
62 goto out;
63 } else {
64 if (!(vma->vm_flags & VM_WRITE))
65 goto out;
66 }
67
68survive:
69 fault = handle_mm_fault(mm, vma, address, write_access ? FAULT_FLAG_WRITE : 0);
70 if (unlikely(fault & VM_FAULT_ERROR)) {
71 if (fault & VM_FAULT_OOM)
72 goto out_of_memory;
73 else if (fault & VM_FAULT_SIGBUS)
74 goto out_sigbus;
75 BUG();
76 }
77 if (fault & VM_FAULT_MAJOR)
78 current->maj_flt++;
79 else
80 current->min_flt++;
81 ret = 0;
82out:
83 up_read(&mm->mmap_sem);
84 return ret;
85
86out_of_memory:
87 up_read(&mm->mmap_sem);
88 if (is_global_init(current)) {
89 yield();
90 down_read(&mm->mmap_sem);
91 goto survive;
92 }
93 printk("VM: killing process %s\n", current->comm);
94 return ret;
95
96out_sigbus:
97 up_read(&mm->mmap_sem);
98 current->thread.prot_addr = address;
99 current->thread.trap_no = 0x11;
100 force_sig(SIGBUS, current);
101 return ret;
102}
103
104static size_t __user_copy_pt(unsigned long uaddr, void *kptr,
105 size_t n, int write_user)
106{ 41{
107 struct mm_struct *mm = current->mm; 42 struct mm_struct *mm = current->mm;
108 unsigned long offset, pfn, done, size; 43 unsigned long offset, pfn, done, size;
@@ -114,12 +49,17 @@ retry:
114 spin_lock(&mm->page_table_lock); 49 spin_lock(&mm->page_table_lock);
115 do { 50 do {
116 pte = follow_table(mm, uaddr); 51 pte = follow_table(mm, uaddr);
117 if (!pte || !pte_present(*pte) || 52 if ((unsigned long) pte < 0x1000)
118 (write_user && !pte_write(*pte)))
119 goto fault; 53 goto fault;
54 if (!pte_present(*pte)) {
55 pte = (pte_t *) 0x11;
56 goto fault;
57 } else if (write_user && !pte_write(*pte)) {
58 pte = (pte_t *) 0x04;
59 goto fault;
60 }
120 61
121 pfn = pte_pfn(*pte); 62 pfn = pte_pfn(*pte);
122
123 offset = uaddr & (PAGE_SIZE - 1); 63 offset = uaddr & (PAGE_SIZE - 1);
124 size = min(n - done, PAGE_SIZE - offset); 64 size = min(n - done, PAGE_SIZE - offset);
125 if (write_user) { 65 if (write_user) {
@@ -137,7 +77,7 @@ retry:
137 return n - done; 77 return n - done;
138fault: 78fault:
139 spin_unlock(&mm->page_table_lock); 79 spin_unlock(&mm->page_table_lock);
140 if (__handle_fault(mm, uaddr, write_user)) 80 if (__handle_fault(uaddr, (unsigned long) pte, write_user))
141 return n - done; 81 return n - done;
142 goto retry; 82 goto retry;
143} 83}
@@ -146,30 +86,31 @@ fault:
146 * Do DAT for user address by page table walk, return kernel address. 86 * Do DAT for user address by page table walk, return kernel address.
147 * This function needs to be called with current->mm->page_table_lock held. 87 * This function needs to be called with current->mm->page_table_lock held.
148 */ 88 */
149static unsigned long __dat_user_addr(unsigned long uaddr) 89static __always_inline unsigned long __dat_user_addr(unsigned long uaddr)
150{ 90{
151 struct mm_struct *mm = current->mm; 91 struct mm_struct *mm = current->mm;
152 unsigned long pfn, ret; 92 unsigned long pfn;
153 pte_t *pte; 93 pte_t *pte;
154 int rc; 94 int rc;
155 95
156 ret = 0;
157retry: 96retry:
158 pte = follow_table(mm, uaddr); 97 pte = follow_table(mm, uaddr);
159 if (!pte || !pte_present(*pte)) 98 if ((unsigned long) pte < 0x1000)
160 goto fault; 99 goto fault;
100 if (!pte_present(*pte)) {
101 pte = (pte_t *) 0x11;
102 goto fault;
103 }
161 104
162 pfn = pte_pfn(*pte); 105 pfn = pte_pfn(*pte);
163 ret = (pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE - 1)); 106 return (pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE - 1));
164out:
165 return ret;
166fault: 107fault:
167 spin_unlock(&mm->page_table_lock); 108 spin_unlock(&mm->page_table_lock);
168 rc = __handle_fault(mm, uaddr, 0); 109 rc = __handle_fault(uaddr, (unsigned long) pte, 0);
169 spin_lock(&mm->page_table_lock); 110 spin_lock(&mm->page_table_lock);
170 if (rc) 111 if (!rc)
171 goto out; 112 goto retry;
172 goto retry; 113 return 0;
173} 114}
174 115
175size_t copy_from_user_pt(size_t n, const void __user *from, void *to) 116size_t copy_from_user_pt(size_t n, const void __user *from, void *to)
@@ -234,8 +175,12 @@ retry:
234 spin_lock(&mm->page_table_lock); 175 spin_lock(&mm->page_table_lock);
235 do { 176 do {
236 pte = follow_table(mm, uaddr); 177 pte = follow_table(mm, uaddr);
237 if (!pte || !pte_present(*pte)) 178 if ((unsigned long) pte < 0x1000)
179 goto fault;
180 if (!pte_present(*pte)) {
181 pte = (pte_t *) 0x11;
238 goto fault; 182 goto fault;
183 }
239 184
240 pfn = pte_pfn(*pte); 185 pfn = pte_pfn(*pte);
241 offset = uaddr & (PAGE_SIZE-1); 186 offset = uaddr & (PAGE_SIZE-1);
@@ -249,9 +194,8 @@ retry:
249 return done + 1; 194 return done + 1;
250fault: 195fault:
251 spin_unlock(&mm->page_table_lock); 196 spin_unlock(&mm->page_table_lock);
252 if (__handle_fault(mm, uaddr, 0)) { 197 if (__handle_fault(uaddr, (unsigned long) pte, 0))
253 return 0; 198 return 0;
254 }
255 goto retry; 199 goto retry;
256} 200}
257 201
@@ -284,7 +228,7 @@ static size_t copy_in_user_pt(size_t n, void __user *to,
284{ 228{
285 struct mm_struct *mm = current->mm; 229 struct mm_struct *mm = current->mm;
286 unsigned long offset_from, offset_to, offset_max, pfn_from, pfn_to, 230 unsigned long offset_from, offset_to, offset_max, pfn_from, pfn_to,
287 uaddr, done, size; 231 uaddr, done, size, error_code;
288 unsigned long uaddr_from = (unsigned long) from; 232 unsigned long uaddr_from = (unsigned long) from;
289 unsigned long uaddr_to = (unsigned long) to; 233 unsigned long uaddr_to = (unsigned long) to;
290 pte_t *pte_from, *pte_to; 234 pte_t *pte_from, *pte_to;
@@ -298,17 +242,28 @@ static size_t copy_in_user_pt(size_t n, void __user *to,
298retry: 242retry:
299 spin_lock(&mm->page_table_lock); 243 spin_lock(&mm->page_table_lock);
300 do { 244 do {
245 write_user = 0;
246 uaddr = uaddr_from;
301 pte_from = follow_table(mm, uaddr_from); 247 pte_from = follow_table(mm, uaddr_from);
302 if (!pte_from || !pte_present(*pte_from)) { 248 error_code = (unsigned long) pte_from;
303 uaddr = uaddr_from; 249 if (error_code < 0x1000)
304 write_user = 0; 250 goto fault;
251 if (!pte_present(*pte_from)) {
252 error_code = 0x11;
305 goto fault; 253 goto fault;
306 } 254 }
307 255
256 write_user = 1;
257 uaddr = uaddr_to;
308 pte_to = follow_table(mm, uaddr_to); 258 pte_to = follow_table(mm, uaddr_to);
309 if (!pte_to || !pte_present(*pte_to) || !pte_write(*pte_to)) { 259 error_code = (unsigned long) pte_to;
310 uaddr = uaddr_to; 260 if (error_code < 0x1000)
311 write_user = 1; 261 goto fault;
262 if (!pte_present(*pte_to)) {
263 error_code = 0x11;
264 goto fault;
265 } else if (!pte_write(*pte_to)) {
266 error_code = 0x04;
312 goto fault; 267 goto fault;
313 } 268 }
314 269
@@ -329,7 +284,7 @@ retry:
329 return n - done; 284 return n - done;
330fault: 285fault:
331 spin_unlock(&mm->page_table_lock); 286 spin_unlock(&mm->page_table_lock);
332 if (__handle_fault(mm, uaddr, write_user)) 287 if (__handle_fault(uaddr, error_code, write_user))
333 return n - done; 288 return n - done;
334 goto retry; 289 goto retry;
335} 290}
diff --git a/arch/s390/math-emu/math.c b/arch/s390/math-emu/math.c
index 3ee78ccb617d..cd4e9c168dd7 100644
--- a/arch/s390/math-emu/math.c
+++ b/arch/s390/math-emu/math.c
@@ -2088,7 +2088,7 @@ int math_emu_ldr(__u8 *opcode) {
2088 __u16 opc = *((__u16 *) opcode); 2088 __u16 opc = *((__u16 *) opcode);
2089 2089
2090 if ((opc & 0x90) == 0) { /* test if rx in {0,2,4,6} */ 2090 if ((opc & 0x90) == 0) { /* test if rx in {0,2,4,6} */
2091 /* we got an exception therfore ry can't be in {0,2,4,6} */ 2091 /* we got an exception therefore ry can't be in {0,2,4,6} */
2092 asm volatile( /* load rx from fp_regs.fprs[ry] */ 2092 asm volatile( /* load rx from fp_regs.fprs[ry] */
2093 " bras 1,0f\n" 2093 " bras 1,0f\n"
2094 " ld 0,0(%1)\n" 2094 " ld 0,0(%1)\n"
@@ -2118,7 +2118,7 @@ int math_emu_ler(__u8 *opcode) {
2118 __u16 opc = *((__u16 *) opcode); 2118 __u16 opc = *((__u16 *) opcode);
2119 2119
2120 if ((opc & 0x90) == 0) { /* test if rx in {0,2,4,6} */ 2120 if ((opc & 0x90) == 0) { /* test if rx in {0,2,4,6} */
2121 /* we got an exception therfore ry can't be in {0,2,4,6} */ 2121 /* we got an exception therefore ry can't be in {0,2,4,6} */
2122 asm volatile( /* load rx from fp_regs.fprs[ry] */ 2122 asm volatile( /* load rx from fp_regs.fprs[ry] */
2123 " bras 1,0f\n" 2123 " bras 1,0f\n"
2124 " le 0,0(%1)\n" 2124 " le 0,0(%1)\n"
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index ff58779bf7e9..76a3637b88e0 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -18,6 +18,7 @@
18#include <linux/swap.h> 18#include <linux/swap.h>
19#include <linux/kthread.h> 19#include <linux/kthread.h>
20#include <linux/oom.h> 20#include <linux/oom.h>
21#include <linux/suspend.h>
21 22
22#include <asm/pgalloc.h> 23#include <asm/pgalloc.h>
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
@@ -44,6 +45,7 @@ static volatile long cmm_pages_target;
44static volatile long cmm_timed_pages_target; 45static volatile long cmm_timed_pages_target;
45static long cmm_timeout_pages; 46static long cmm_timeout_pages;
46static long cmm_timeout_seconds; 47static long cmm_timeout_seconds;
48static int cmm_suspended;
47 49
48static struct cmm_page_array *cmm_page_list; 50static struct cmm_page_array *cmm_page_list;
49static struct cmm_page_array *cmm_timed_page_list; 51static struct cmm_page_array *cmm_timed_page_list;
@@ -147,9 +149,9 @@ cmm_thread(void *dummy)
147 149
148 while (1) { 150 while (1) {
149 rc = wait_event_interruptible(cmm_thread_wait, 151 rc = wait_event_interruptible(cmm_thread_wait,
150 (cmm_pages != cmm_pages_target || 152 (!cmm_suspended && (cmm_pages != cmm_pages_target ||
151 cmm_timed_pages != cmm_timed_pages_target || 153 cmm_timed_pages != cmm_timed_pages_target)) ||
152 kthread_should_stop())); 154 kthread_should_stop());
153 if (kthread_should_stop() || rc == -ERESTARTSYS) { 155 if (kthread_should_stop() || rc == -ERESTARTSYS) {
154 cmm_pages_target = cmm_pages; 156 cmm_pages_target = cmm_pages;
155 cmm_timed_pages_target = cmm_timed_pages; 157 cmm_timed_pages_target = cmm_timed_pages;
@@ -410,6 +412,38 @@ cmm_smsg_target(char *from, char *msg)
410 412
411static struct ctl_table_header *cmm_sysctl_header; 413static struct ctl_table_header *cmm_sysctl_header;
412 414
415static int cmm_suspend(void)
416{
417 cmm_suspended = 1;
418 cmm_free_pages(cmm_pages, &cmm_pages, &cmm_page_list);
419 cmm_free_pages(cmm_timed_pages, &cmm_timed_pages, &cmm_timed_page_list);
420 return 0;
421}
422
423static int cmm_resume(void)
424{
425 cmm_suspended = 0;
426 cmm_kick_thread();
427 return 0;
428}
429
430static int cmm_power_event(struct notifier_block *this,
431 unsigned long event, void *ptr)
432{
433 switch (event) {
434 case PM_POST_HIBERNATION:
435 return cmm_resume();
436 case PM_HIBERNATION_PREPARE:
437 return cmm_suspend();
438 default:
439 return NOTIFY_DONE;
440 }
441}
442
443static struct notifier_block cmm_power_notifier = {
444 .notifier_call = cmm_power_event,
445};
446
413static int 447static int
414cmm_init (void) 448cmm_init (void)
415{ 449{
@@ -418,7 +452,7 @@ cmm_init (void)
418#ifdef CONFIG_CMM_PROC 452#ifdef CONFIG_CMM_PROC
419 cmm_sysctl_header = register_sysctl_table(cmm_dir_table); 453 cmm_sysctl_header = register_sysctl_table(cmm_dir_table);
420 if (!cmm_sysctl_header) 454 if (!cmm_sysctl_header)
421 goto out; 455 goto out_sysctl;
422#endif 456#endif
423#ifdef CONFIG_CMM_IUCV 457#ifdef CONFIG_CMM_IUCV
424 rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); 458 rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target);
@@ -428,17 +462,21 @@ cmm_init (void)
428 rc = register_oom_notifier(&cmm_oom_nb); 462 rc = register_oom_notifier(&cmm_oom_nb);
429 if (rc < 0) 463 if (rc < 0)
430 goto out_oom_notify; 464 goto out_oom_notify;
465 rc = register_pm_notifier(&cmm_power_notifier);
466 if (rc)
467 goto out_pm;
431 init_waitqueue_head(&cmm_thread_wait); 468 init_waitqueue_head(&cmm_thread_wait);
432 init_timer(&cmm_timer); 469 init_timer(&cmm_timer);
433 cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread"); 470 cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread");
434 rc = IS_ERR(cmm_thread_ptr) ? PTR_ERR(cmm_thread_ptr) : 0; 471 rc = IS_ERR(cmm_thread_ptr) ? PTR_ERR(cmm_thread_ptr) : 0;
435 if (!rc) 472 if (rc)
436 goto out; 473 goto out_kthread;
437 /* 474 return 0;
438 * kthread_create failed. undo all the stuff from above again.
439 */
440 unregister_oom_notifier(&cmm_oom_nb);
441 475
476out_kthread:
477 unregister_pm_notifier(&cmm_power_notifier);
478out_pm:
479 unregister_oom_notifier(&cmm_oom_nb);
442out_oom_notify: 480out_oom_notify:
443#ifdef CONFIG_CMM_IUCV 481#ifdef CONFIG_CMM_IUCV
444 smsg_unregister_callback(SMSG_PREFIX, cmm_smsg_target); 482 smsg_unregister_callback(SMSG_PREFIX, cmm_smsg_target);
@@ -446,8 +484,8 @@ out_smsg:
446#endif 484#endif
447#ifdef CONFIG_CMM_PROC 485#ifdef CONFIG_CMM_PROC
448 unregister_sysctl_table(cmm_sysctl_header); 486 unregister_sysctl_table(cmm_sysctl_header);
487out_sysctl:
449#endif 488#endif
450out:
451 return rc; 489 return rc;
452} 490}
453 491
@@ -455,6 +493,7 @@ static void
455cmm_exit(void) 493cmm_exit(void)
456{ 494{
457 kthread_stop(cmm_thread_ptr); 495 kthread_stop(cmm_thread_ptr);
496 unregister_pm_notifier(&cmm_power_notifier);
458 unregister_oom_notifier(&cmm_oom_nb); 497 unregister_oom_notifier(&cmm_oom_nb);
459 cmm_free_pages(cmm_pages, &cmm_pages, &cmm_page_list); 498 cmm_free_pages(cmm_pages, &cmm_pages, &cmm_page_list);
460 cmm_free_pages(cmm_timed_pages, &cmm_timed_pages, &cmm_timed_page_list); 499 cmm_free_pages(cmm_timed_pages, &cmm_timed_pages, &cmm_timed_page_list);
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 6d507462967a..fc102e70d9c2 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -34,16 +34,15 @@
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/s390_ext.h> 35#include <asm/s390_ext.h>
36#include <asm/mmu_context.h> 36#include <asm/mmu_context.h>
37#include <asm/compat.h>
37#include "../kernel/entry.h" 38#include "../kernel/entry.h"
38 39
39#ifndef CONFIG_64BIT 40#ifndef CONFIG_64BIT
40#define __FAIL_ADDR_MASK 0x7ffff000 41#define __FAIL_ADDR_MASK 0x7ffff000
41#define __FIXUP_MASK 0x7fffffff
42#define __SUBCODE_MASK 0x0200 42#define __SUBCODE_MASK 0x0200
43#define __PF_RES_FIELD 0ULL 43#define __PF_RES_FIELD 0ULL
44#else /* CONFIG_64BIT */ 44#else /* CONFIG_64BIT */
45#define __FAIL_ADDR_MASK -4096L 45#define __FAIL_ADDR_MASK -4096L
46#define __FIXUP_MASK ~0L
47#define __SUBCODE_MASK 0x0600 46#define __SUBCODE_MASK 0x0600
48#define __PF_RES_FIELD 0x8000000000000000ULL 47#define __PF_RES_FIELD 0x8000000000000000ULL
49#endif /* CONFIG_64BIT */ 48#endif /* CONFIG_64BIT */
@@ -52,11 +51,15 @@
52extern int sysctl_userprocess_debug; 51extern int sysctl_userprocess_debug;
53#endif 52#endif
54 53
55#ifdef CONFIG_KPROBES 54#define VM_FAULT_BADCONTEXT 0x010000
56static inline int notify_page_fault(struct pt_regs *regs, long err) 55#define VM_FAULT_BADMAP 0x020000
56#define VM_FAULT_BADACCESS 0x040000
57
58static inline int notify_page_fault(struct pt_regs *regs)
57{ 59{
58 int ret = 0; 60 int ret = 0;
59 61
62#ifdef CONFIG_KPROBES
60 /* kprobe_running() needs smp_processor_id() */ 63 /* kprobe_running() needs smp_processor_id() */
61 if (!user_mode(regs)) { 64 if (!user_mode(regs)) {
62 preempt_disable(); 65 preempt_disable();
@@ -64,15 +67,9 @@ static inline int notify_page_fault(struct pt_regs *regs, long err)
64 ret = 1; 67 ret = 1;
65 preempt_enable(); 68 preempt_enable();
66 } 69 }
67 70#endif
68 return ret; 71 return ret;
69} 72}
70#else
71static inline int notify_page_fault(struct pt_regs *regs, long err)
72{
73 return 0;
74}
75#endif
76 73
77 74
78/* 75/*
@@ -100,57 +97,50 @@ void bust_spinlocks(int yes)
100 97
101/* 98/*
102 * Returns the address space associated with the fault. 99 * Returns the address space associated with the fault.
103 * Returns 0 for kernel space, 1 for user space and 100 * Returns 0 for kernel space and 1 for user space.
104 * 2 for code execution in user space with noexec=on.
105 */ 101 */
106static inline int check_space(struct task_struct *tsk) 102static inline int user_space_fault(unsigned long trans_exc_code)
107{ 103{
108 /* 104 /*
109 * The lowest two bits of S390_lowcore.trans_exc_code 105 * The lowest two bits of the translation exception
110 * indicate which paging table was used. 106 * identification indicate which paging table was used.
111 */ 107 */
112 int desc = S390_lowcore.trans_exc_code & 3; 108 trans_exc_code &= 3;
113 109 if (trans_exc_code == 2)
114 if (desc == 3) /* Home Segment Table Descriptor */ 110 /* Access via secondary space, set_fs setting decides */
115 return switch_amode == 0; 111 return current->thread.mm_segment.ar4;
116 if (desc == 2) /* Secondary Segment Table Descriptor */ 112 if (user_mode == HOME_SPACE_MODE)
117 return tsk->thread.mm_segment.ar4; 113 /* User space if the access has been done via home space. */
118#ifdef CONFIG_S390_SWITCH_AMODE 114 return trans_exc_code == 3;
119 if (unlikely(desc == 1)) { /* STD determined via access register */ 115 /*
120 /* %a0 always indicates primary space. */ 116 * If the user space is not the home space the kernel runs in home
121 if (S390_lowcore.exc_access_id != 0) { 117 * space. Access via secondary space has already been covered,
122 save_access_regs(tsk->thread.acrs); 118 * access via primary space or access register is from user space
123 /* 119 * and access via home space is from the kernel.
124 * An alet of 0 indicates primary space. 120 */
125 * An alet of 1 indicates secondary space. 121 return trans_exc_code != 3;
126 * Any other alet values generate an
127 * alen-translation exception.
128 */
129 if (tsk->thread.acrs[S390_lowcore.exc_access_id])
130 return tsk->thread.mm_segment.ar4;
131 }
132 }
133#endif
134 /* Primary Segment Table Descriptor */
135 return switch_amode << s390_noexec;
136} 122}
137 123
138/* 124/*
139 * Send SIGSEGV to task. This is an external routine 125 * Send SIGSEGV to task. This is an external routine
140 * to keep the stack usage of do_page_fault small. 126 * to keep the stack usage of do_page_fault small.
141 */ 127 */
142static void do_sigsegv(struct pt_regs *regs, unsigned long error_code, 128static noinline void do_sigsegv(struct pt_regs *regs, long int_code,
143 int si_code, unsigned long address) 129 int si_code, unsigned long trans_exc_code)
144{ 130{
145 struct siginfo si; 131 struct siginfo si;
132 unsigned long address;
146 133
134 address = trans_exc_code & __FAIL_ADDR_MASK;
135 current->thread.prot_addr = address;
136 current->thread.trap_no = int_code;
147#if defined(CONFIG_SYSCTL) || defined(CONFIG_PROCESS_DEBUG) 137#if defined(CONFIG_SYSCTL) || defined(CONFIG_PROCESS_DEBUG)
148#if defined(CONFIG_SYSCTL) 138#if defined(CONFIG_SYSCTL)
149 if (sysctl_userprocess_debug) 139 if (sysctl_userprocess_debug)
150#endif 140#endif
151 { 141 {
152 printk("User process fault: interruption code 0x%lX\n", 142 printk("User process fault: interruption code 0x%lX\n",
153 error_code); 143 int_code);
154 printk("failing address: %lX\n", address); 144 printk("failing address: %lX\n", address);
155 show_regs(regs); 145 show_regs(regs);
156 } 146 }
@@ -161,13 +151,14 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code,
161 force_sig_info(SIGSEGV, &si, current); 151 force_sig_info(SIGSEGV, &si, current);
162} 152}
163 153
164static void do_no_context(struct pt_regs *regs, unsigned long error_code, 154static noinline void do_no_context(struct pt_regs *regs, long int_code,
165 unsigned long address) 155 unsigned long trans_exc_code)
166{ 156{
167 const struct exception_table_entry *fixup; 157 const struct exception_table_entry *fixup;
158 unsigned long address;
168 159
169 /* Are we prepared to handle this kernel fault? */ 160 /* Are we prepared to handle this kernel fault? */
170 fixup = search_exception_tables(regs->psw.addr & __FIXUP_MASK); 161 fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN);
171 if (fixup) { 162 if (fixup) {
172 regs->psw.addr = fixup->fixup | PSW_ADDR_AMODE; 163 regs->psw.addr = fixup->fixup | PSW_ADDR_AMODE;
173 return; 164 return;
@@ -177,129 +168,149 @@ static void do_no_context(struct pt_regs *regs, unsigned long error_code,
177 * Oops. The kernel tried to access some bad page. We'll have to 168 * Oops. The kernel tried to access some bad page. We'll have to
178 * terminate things with extreme prejudice. 169 * terminate things with extreme prejudice.
179 */ 170 */
180 if (check_space(current) == 0) 171 address = trans_exc_code & __FAIL_ADDR_MASK;
172 if (!user_space_fault(trans_exc_code))
181 printk(KERN_ALERT "Unable to handle kernel pointer dereference" 173 printk(KERN_ALERT "Unable to handle kernel pointer dereference"
182 " at virtual kernel address %p\n", (void *)address); 174 " at virtual kernel address %p\n", (void *)address);
183 else 175 else
184 printk(KERN_ALERT "Unable to handle kernel paging request" 176 printk(KERN_ALERT "Unable to handle kernel paging request"
185 " at virtual user address %p\n", (void *)address); 177 " at virtual user address %p\n", (void *)address);
186 178
187 die("Oops", regs, error_code); 179 die("Oops", regs, int_code);
188 do_exit(SIGKILL); 180 do_exit(SIGKILL);
189} 181}
190 182
191static void do_low_address(struct pt_regs *regs, unsigned long error_code) 183static noinline void do_low_address(struct pt_regs *regs, long int_code,
184 unsigned long trans_exc_code)
192{ 185{
193 /* Low-address protection hit in kernel mode means 186 /* Low-address protection hit in kernel mode means
194 NULL pointer write access in kernel mode. */ 187 NULL pointer write access in kernel mode. */
195 if (regs->psw.mask & PSW_MASK_PSTATE) { 188 if (regs->psw.mask & PSW_MASK_PSTATE) {
196 /* Low-address protection hit in user mode 'cannot happen'. */ 189 /* Low-address protection hit in user mode 'cannot happen'. */
197 die ("Low-address protection", regs, error_code); 190 die ("Low-address protection", regs, int_code);
198 do_exit(SIGKILL); 191 do_exit(SIGKILL);
199 } 192 }
200 193
201 do_no_context(regs, error_code, 0); 194 do_no_context(regs, int_code, trans_exc_code);
202} 195}
203 196
204static void do_sigbus(struct pt_regs *regs, unsigned long error_code, 197static noinline void do_sigbus(struct pt_regs *regs, long int_code,
205 unsigned long address) 198 unsigned long trans_exc_code)
206{ 199{
207 struct task_struct *tsk = current; 200 struct task_struct *tsk = current;
208 struct mm_struct *mm = tsk->mm;
209 201
210 up_read(&mm->mmap_sem);
211 /* 202 /*
212 * Send a sigbus, regardless of whether we were in kernel 203 * Send a sigbus, regardless of whether we were in kernel
213 * or user mode. 204 * or user mode.
214 */ 205 */
215 tsk->thread.prot_addr = address; 206 tsk->thread.prot_addr = trans_exc_code & __FAIL_ADDR_MASK;
216 tsk->thread.trap_no = error_code; 207 tsk->thread.trap_no = int_code;
217 force_sig(SIGBUS, tsk); 208 force_sig(SIGBUS, tsk);
218
219 /* Kernel mode? Handle exceptions or die */
220 if (!(regs->psw.mask & PSW_MASK_PSTATE))
221 do_no_context(regs, error_code, address);
222} 209}
223 210
224#ifdef CONFIG_S390_EXEC_PROTECT 211#ifdef CONFIG_S390_EXEC_PROTECT
225static int signal_return(struct mm_struct *mm, struct pt_regs *regs, 212static noinline int signal_return(struct pt_regs *regs, long int_code,
226 unsigned long address, unsigned long error_code) 213 unsigned long trans_exc_code)
227{ 214{
228 u16 instruction; 215 u16 instruction;
229 int rc; 216 int rc;
230#ifdef CONFIG_COMPAT
231 int compat;
232#endif
233 217
234 pagefault_disable();
235 rc = __get_user(instruction, (u16 __user *) regs->psw.addr); 218 rc = __get_user(instruction, (u16 __user *) regs->psw.addr);
236 pagefault_enable();
237 if (rc)
238 return -EFAULT;
239 219
240 up_read(&mm->mmap_sem); 220 if (!rc && instruction == 0x0a77) {
241 clear_tsk_thread_flag(current, TIF_SINGLE_STEP); 221 clear_tsk_thread_flag(current, TIF_SINGLE_STEP);
242#ifdef CONFIG_COMPAT 222 if (is_compat_task())
243 compat = is_compat_task(); 223 sys32_sigreturn();
244 if (compat && instruction == 0x0a77) 224 else
245 sys32_sigreturn(); 225 sys_sigreturn();
246 else if (compat && instruction == 0x0aad) 226 } else if (!rc && instruction == 0x0aad) {
247 sys32_rt_sigreturn(); 227 clear_tsk_thread_flag(current, TIF_SINGLE_STEP);
248 else 228 if (is_compat_task())
249#endif 229 sys32_rt_sigreturn();
250 if (instruction == 0x0a77) 230 else
251 sys_sigreturn(); 231 sys_rt_sigreturn();
252 else if (instruction == 0x0aad) 232 } else
253 sys_rt_sigreturn(); 233 do_sigsegv(regs, int_code, SEGV_MAPERR, trans_exc_code);
254 else {
255 current->thread.prot_addr = address;
256 current->thread.trap_no = error_code;
257 do_sigsegv(regs, error_code, SEGV_MAPERR, address);
258 }
259 return 0; 234 return 0;
260} 235}
261#endif /* CONFIG_S390_EXEC_PROTECT */ 236#endif /* CONFIG_S390_EXEC_PROTECT */
262 237
238static noinline void do_fault_error(struct pt_regs *regs, long int_code,
239 unsigned long trans_exc_code, int fault)
240{
241 int si_code;
242
243 switch (fault) {
244 case VM_FAULT_BADACCESS:
245#ifdef CONFIG_S390_EXEC_PROTECT
246 if ((regs->psw.mask & PSW_MASK_ASC) == PSW_ASC_SECONDARY &&
247 (trans_exc_code & 3) == 0) {
248 signal_return(regs, int_code, trans_exc_code);
249 break;
250 }
251#endif /* CONFIG_S390_EXEC_PROTECT */
252 case VM_FAULT_BADMAP:
253 /* Bad memory access. Check if it is kernel or user space. */
254 if (regs->psw.mask & PSW_MASK_PSTATE) {
255 /* User mode accesses just cause a SIGSEGV */
256 si_code = (fault == VM_FAULT_BADMAP) ?
257 SEGV_MAPERR : SEGV_ACCERR;
258 do_sigsegv(regs, int_code, si_code, trans_exc_code);
259 return;
260 }
261 case VM_FAULT_BADCONTEXT:
262 do_no_context(regs, int_code, trans_exc_code);
263 break;
264 default: /* fault & VM_FAULT_ERROR */
265 if (fault & VM_FAULT_OOM)
266 pagefault_out_of_memory();
267 else if (fault & VM_FAULT_SIGBUS) {
268 do_sigbus(regs, int_code, trans_exc_code);
269 /* Kernel mode? Handle exceptions or die */
270 if (!(regs->psw.mask & PSW_MASK_PSTATE))
271 do_no_context(regs, int_code, trans_exc_code);
272 } else
273 BUG();
274 break;
275 }
276}
277
263/* 278/*
264 * This routine handles page faults. It determines the address, 279 * This routine handles page faults. It determines the address,
265 * and the problem, and then passes it off to one of the appropriate 280 * and the problem, and then passes it off to one of the appropriate
266 * routines. 281 * routines.
267 * 282 *
268 * error_code: 283 * interruption code (int_code):
269 * 04 Protection -> Write-Protection (suprression) 284 * 04 Protection -> Write-Protection (suprression)
270 * 10 Segment translation -> Not present (nullification) 285 * 10 Segment translation -> Not present (nullification)
271 * 11 Page translation -> Not present (nullification) 286 * 11 Page translation -> Not present (nullification)
272 * 3b Region third trans. -> Not present (nullification) 287 * 3b Region third trans. -> Not present (nullification)
273 */ 288 */
274static inline void 289static inline int do_exception(struct pt_regs *regs, int access,
275do_exception(struct pt_regs *regs, unsigned long error_code, int write) 290 unsigned long trans_exc_code)
276{ 291{
277 struct task_struct *tsk; 292 struct task_struct *tsk;
278 struct mm_struct *mm; 293 struct mm_struct *mm;
279 struct vm_area_struct *vma; 294 struct vm_area_struct *vma;
280 unsigned long address; 295 unsigned long address;
281 int space;
282 int si_code;
283 int fault; 296 int fault;
284 297
285 if (notify_page_fault(regs, error_code)) 298 if (notify_page_fault(regs))
286 return; 299 return 0;
287 300
288 tsk = current; 301 tsk = current;
289 mm = tsk->mm; 302 mm = tsk->mm;
290 303
291 /* get the failing address and the affected space */
292 address = S390_lowcore.trans_exc_code & __FAIL_ADDR_MASK;
293 space = check_space(tsk);
294
295 /* 304 /*
296 * Verify that the fault happened in user space, that 305 * Verify that the fault happened in user space, that
297 * we are not in an interrupt and that there is a 306 * we are not in an interrupt and that there is a
298 * user context. 307 * user context.
299 */ 308 */
300 if (unlikely(space == 0 || in_atomic() || !mm)) 309 fault = VM_FAULT_BADCONTEXT;
301 goto no_context; 310 if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
311 goto out;
302 312
313 address = trans_exc_code & __FAIL_ADDR_MASK;
303 /* 314 /*
304 * When we get here, the fault happened in the current 315 * When we get here, the fault happened in the current
305 * task's user address space, so we can switch on the 316 * task's user address space, so we can switch on the
@@ -309,42 +320,26 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int write)
309 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); 320 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address);
310 down_read(&mm->mmap_sem); 321 down_read(&mm->mmap_sem);
311 322
312 si_code = SEGV_MAPERR; 323 fault = VM_FAULT_BADMAP;
313 vma = find_vma(mm, address); 324 vma = find_vma(mm, address);
314 if (!vma) 325 if (!vma)
315 goto bad_area; 326 goto out_up;
316
317#ifdef CONFIG_S390_EXEC_PROTECT
318 if (unlikely((space == 2) && !(vma->vm_flags & VM_EXEC)))
319 if (!signal_return(mm, regs, address, error_code))
320 /*
321 * signal_return() has done an up_read(&mm->mmap_sem)
322 * if it returns 0.
323 */
324 return;
325#endif
326 327
327 if (vma->vm_start <= address) 328 if (unlikely(vma->vm_start > address)) {
328 goto good_area; 329 if (!(vma->vm_flags & VM_GROWSDOWN))
329 if (!(vma->vm_flags & VM_GROWSDOWN)) 330 goto out_up;
330 goto bad_area; 331 if (expand_stack(vma, address))
331 if (expand_stack(vma, address)) 332 goto out_up;
332 goto bad_area;
333/*
334 * Ok, we have a good vm_area for this memory access, so
335 * we can handle it..
336 */
337good_area:
338 si_code = SEGV_ACCERR;
339 if (!write) {
340 /* page not present, check vm flags */
341 if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
342 goto bad_area;
343 } else {
344 if (!(vma->vm_flags & VM_WRITE))
345 goto bad_area;
346 } 333 }
347 334
335 /*
336 * Ok, we have a good vm_area for this memory access, so
337 * we can handle it..
338 */
339 fault = VM_FAULT_BADACCESS;
340 if (unlikely(!(vma->vm_flags & access)))
341 goto out_up;
342
348 if (is_vm_hugetlb_page(vma)) 343 if (is_vm_hugetlb_page(vma))
349 address &= HPAGE_MASK; 344 address &= HPAGE_MASK;
350 /* 345 /*
@@ -352,18 +347,11 @@ good_area:
352 * make sure we exit gracefully rather than endlessly redo 347 * make sure we exit gracefully rather than endlessly redo
353 * the fault. 348 * the fault.
354 */ 349 */
355 fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); 350 fault = handle_mm_fault(mm, vma, address,
356 if (unlikely(fault & VM_FAULT_ERROR)) { 351 (access == VM_WRITE) ? FAULT_FLAG_WRITE : 0);
357 if (fault & VM_FAULT_OOM) { 352 if (unlikely(fault & VM_FAULT_ERROR))
358 up_read(&mm->mmap_sem); 353 goto out_up;
359 pagefault_out_of_memory(); 354
360 return;
361 } else if (fault & VM_FAULT_SIGBUS) {
362 do_sigbus(regs, error_code, address);
363 return;
364 }
365 BUG();
366 }
367 if (fault & VM_FAULT_MAJOR) { 355 if (fault & VM_FAULT_MAJOR) {
368 tsk->maj_flt++; 356 tsk->maj_flt++;
369 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, 357 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0,
@@ -373,74 +361,69 @@ good_area:
373 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, 361 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0,
374 regs, address); 362 regs, address);
375 } 363 }
376 up_read(&mm->mmap_sem);
377 /* 364 /*
378 * The instruction that caused the program check will 365 * The instruction that caused the program check will
379 * be repeated. Don't signal single step via SIGTRAP. 366 * be repeated. Don't signal single step via SIGTRAP.
380 */ 367 */
381 clear_tsk_thread_flag(tsk, TIF_SINGLE_STEP); 368 clear_tsk_thread_flag(tsk, TIF_SINGLE_STEP);
382 return; 369 fault = 0;
383 370out_up:
384/*
385 * Something tried to access memory that isn't in our memory map..
386 * Fix it, but check if it's kernel or user first..
387 */
388bad_area:
389 up_read(&mm->mmap_sem); 371 up_read(&mm->mmap_sem);
390 372out:
391 /* User mode accesses just cause a SIGSEGV */ 373 return fault;
392 if (regs->psw.mask & PSW_MASK_PSTATE) {
393 tsk->thread.prot_addr = address;
394 tsk->thread.trap_no = error_code;
395 do_sigsegv(regs, error_code, si_code, address);
396 return;
397 }
398
399no_context:
400 do_no_context(regs, error_code, address);
401} 374}
402 375
403void __kprobes do_protection_exception(struct pt_regs *regs, 376void __kprobes do_protection_exception(struct pt_regs *regs, long int_code)
404 long error_code)
405{ 377{
378 unsigned long trans_exc_code = S390_lowcore.trans_exc_code;
379 int fault;
380
406 /* Protection exception is supressing, decrement psw address. */ 381 /* Protection exception is supressing, decrement psw address. */
407 regs->psw.addr -= (error_code >> 16); 382 regs->psw.addr -= (int_code >> 16);
408 /* 383 /*
409 * Check for low-address protection. This needs to be treated 384 * Check for low-address protection. This needs to be treated
410 * as a special case because the translation exception code 385 * as a special case because the translation exception code
411 * field is not guaranteed to contain valid data in this case. 386 * field is not guaranteed to contain valid data in this case.
412 */ 387 */
413 if (unlikely(!(S390_lowcore.trans_exc_code & 4))) { 388 if (unlikely(!(trans_exc_code & 4))) {
414 do_low_address(regs, error_code); 389 do_low_address(regs, int_code, trans_exc_code);
415 return; 390 return;
416 } 391 }
417 do_exception(regs, 4, 1); 392 fault = do_exception(regs, VM_WRITE, trans_exc_code);
393 if (unlikely(fault))
394 do_fault_error(regs, 4, trans_exc_code, fault);
418} 395}
419 396
420void __kprobes do_dat_exception(struct pt_regs *regs, long error_code) 397void __kprobes do_dat_exception(struct pt_regs *regs, long int_code)
421{ 398{
422 do_exception(regs, error_code & 0xff, 0); 399 unsigned long trans_exc_code = S390_lowcore.trans_exc_code;
400 int access, fault;
401
402 access = VM_READ | VM_EXEC | VM_WRITE;
403#ifdef CONFIG_S390_EXEC_PROTECT
404 if ((regs->psw.mask & PSW_MASK_ASC) == PSW_ASC_SECONDARY &&
405 (trans_exc_code & 3) == 0)
406 access = VM_EXEC;
407#endif
408 fault = do_exception(regs, access, trans_exc_code);
409 if (unlikely(fault))
410 do_fault_error(regs, int_code & 255, trans_exc_code, fault);
423} 411}
424 412
425#ifdef CONFIG_64BIT 413#ifdef CONFIG_64BIT
426void __kprobes do_asce_exception(struct pt_regs *regs, unsigned long error_code) 414void __kprobes do_asce_exception(struct pt_regs *regs, long int_code)
427{ 415{
428 struct mm_struct *mm; 416 unsigned long trans_exc_code = S390_lowcore.trans_exc_code;
417 struct mm_struct *mm = current->mm;
429 struct vm_area_struct *vma; 418 struct vm_area_struct *vma;
430 unsigned long address;
431 int space;
432
433 mm = current->mm;
434 address = S390_lowcore.trans_exc_code & __FAIL_ADDR_MASK;
435 space = check_space(current);
436 419
437 if (unlikely(space == 0 || in_atomic() || !mm)) 420 if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm))
438 goto no_context; 421 goto no_context;
439 422
440 local_irq_enable(); 423 local_irq_enable();
441 424
442 down_read(&mm->mmap_sem); 425 down_read(&mm->mmap_sem);
443 vma = find_vma(mm, address); 426 vma = find_vma(mm, trans_exc_code & __FAIL_ADDR_MASK);
444 up_read(&mm->mmap_sem); 427 up_read(&mm->mmap_sem);
445 428
446 if (vma) { 429 if (vma) {
@@ -450,17 +433,38 @@ void __kprobes do_asce_exception(struct pt_regs *regs, unsigned long error_code)
450 433
451 /* User mode accesses just cause a SIGSEGV */ 434 /* User mode accesses just cause a SIGSEGV */
452 if (regs->psw.mask & PSW_MASK_PSTATE) { 435 if (regs->psw.mask & PSW_MASK_PSTATE) {
453 current->thread.prot_addr = address; 436 do_sigsegv(regs, int_code, SEGV_MAPERR, trans_exc_code);
454 current->thread.trap_no = error_code;
455 do_sigsegv(regs, error_code, SEGV_MAPERR, address);
456 return; 437 return;
457 } 438 }
458 439
459no_context: 440no_context:
460 do_no_context(regs, error_code, address); 441 do_no_context(regs, int_code, trans_exc_code);
461} 442}
462#endif 443#endif
463 444
445int __handle_fault(unsigned long uaddr, unsigned long int_code, int write_user)
446{
447 struct pt_regs regs;
448 int access, fault;
449
450 regs.psw.mask = psw_kernel_bits;
451 if (!irqs_disabled())
452 regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT;
453 regs.psw.addr = (unsigned long) __builtin_return_address(0);
454 regs.psw.addr |= PSW_ADDR_AMODE;
455 uaddr &= PAGE_MASK;
456 access = write_user ? VM_WRITE : VM_READ;
457 fault = do_exception(&regs, access, uaddr | 2);
458 if (unlikely(fault)) {
459 if (fault & VM_FAULT_OOM) {
460 pagefault_out_of_memory();
461 fault = 0;
462 } else if (fault & VM_FAULT_SIGBUS)
463 do_sigbus(&regs, int_code, uaddr);
464 }
465 return fault ? -EFAULT : 0;
466}
467
464#ifdef CONFIG_PFAULT 468#ifdef CONFIG_PFAULT
465/* 469/*
466 * 'pfault' pseudo page faults routines. 470 * 'pfault' pseudo page faults routines.
@@ -522,7 +526,7 @@ void pfault_fini(void)
522 : : "a" (&refbk), "m" (refbk) : "cc"); 526 : : "a" (&refbk), "m" (refbk) : "cc");
523} 527}
524 528
525static void pfault_interrupt(__u16 error_code) 529static void pfault_interrupt(__u16 int_code)
526{ 530{
527 struct task_struct *tsk; 531 struct task_struct *tsk;
528 __u16 subcode; 532 __u16 subcode;
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 2757c5616a07..ad621e06ada3 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -269,7 +269,7 @@ int s390_enable_sie(void)
269 struct mm_struct *mm, *old_mm; 269 struct mm_struct *mm, *old_mm;
270 270
271 /* Do we have switched amode? If no, we cannot do sie */ 271 /* Do we have switched amode? If no, we cannot do sie */
272 if (!switch_amode) 272 if (user_mode == HOME_SPACE_MODE)
273 return -EINVAL; 273 return -EINVAL;
274 274
275 /* Do we have pgstes? if yes, we are done */ 275 /* Do we have pgstes? if yes, we are done */
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 5f91a38d7592..300ab012b0fd 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -70,8 +70,12 @@ static pte_t __ref *vmem_pte_alloc(void)
70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); 70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
71 if (!pte) 71 if (!pte)
72 return NULL; 72 return NULL;
73 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, 73 if (MACHINE_HAS_HPAGE)
74 PTRS_PER_PTE * sizeof(pte_t)); 74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO,
75 PTRS_PER_PTE * sizeof(pte_t));
76 else
77 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
78 PTRS_PER_PTE * sizeof(pte_t));
75 return pte; 79 return pte;
76} 80}
77 81
@@ -112,7 +116,8 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
112 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && 116 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
113 (address + HPAGE_SIZE <= start + size) && 117 (address + HPAGE_SIZE <= start + size) &&
114 (address >= HPAGE_SIZE)) { 118 (address >= HPAGE_SIZE)) {
115 pte_val(pte) |= _SEGMENT_ENTRY_LARGE; 119 pte_val(pte) |= _SEGMENT_ENTRY_LARGE |
120 _SEGMENT_ENTRY_CO;
116 pmd_val(*pm_dir) = pte_val(pte); 121 pmd_val(*pm_dir) = pte_val(pte);
117 address += HPAGE_SIZE - PAGE_SIZE; 122 address += HPAGE_SIZE - PAGE_SIZE;
118 continue; 123 continue;
diff --git a/arch/score/include/asm/asm-offsets.h b/arch/score/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/score/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/score/include/asm/cacheflush.h b/arch/score/include/asm/cacheflush.h
index caaba24036e3..1d545d0ce206 100644
--- a/arch/score/include/asm/cacheflush.h
+++ b/arch/score/include/asm/cacheflush.h
@@ -14,10 +14,12 @@ extern void flush_cache_sigtramp(unsigned long addr);
14extern void flush_icache_all(void); 14extern void flush_icache_all(void);
15extern void flush_icache_range(unsigned long start, unsigned long end); 15extern void flush_icache_range(unsigned long start, unsigned long end);
16extern void flush_dcache_range(unsigned long start, unsigned long end); 16extern void flush_dcache_range(unsigned long start, unsigned long end);
17extern void flush_dcache_page(struct page *page);
18
19#define PG_dcache_dirty PG_arch_1
17 20
18#define flush_cache_dup_mm(mm) do {} while (0) 21#define flush_cache_dup_mm(mm) do {} while (0)
19#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 22#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
20#define flush_dcache_page(page) do {} while (0)
21#define flush_dcache_mmap_lock(mapping) do {} while (0) 23#define flush_dcache_mmap_lock(mapping) do {} while (0)
22#define flush_dcache_mmap_unlock(mapping) do {} while (0) 24#define flush_dcache_mmap_unlock(mapping) do {} while (0)
23#define flush_cache_vmap(start, end) do {} while (0) 25#define flush_cache_vmap(start, end) do {} while (0)
diff --git a/arch/score/include/asm/delay.h b/arch/score/include/asm/delay.h
index 6726ec199dc0..529e494712a5 100644
--- a/arch/score/include/asm/delay.h
+++ b/arch/score/include/asm/delay.h
@@ -1,6 +1,8 @@
1#ifndef _ASM_SCORE_DELAY_H 1#ifndef _ASM_SCORE_DELAY_H
2#define _ASM_SCORE_DELAY_H 2#define _ASM_SCORE_DELAY_H
3 3
4#include <asm-generic/param.h>
5
4static inline void __delay(unsigned long loops) 6static inline void __delay(unsigned long loops)
5{ 7{
6 /* 3 cycles per loop. */ 8 /* 3 cycles per loop. */
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h
index 43526d9fda93..f478ce94181f 100644
--- a/arch/score/include/asm/elf.h
+++ b/arch/score/include/asm/elf.h
@@ -61,7 +61,6 @@ struct task_struct;
61struct pt_regs; 61struct pt_regs;
62 62
63#define CORE_DUMP_USE_REGSET 63#define CORE_DUMP_USE_REGSET
64#define USE_ELF_CORE_DUMP
65#define ELF_EXEC_PAGESIZE PAGE_SIZE 64#define ELF_EXEC_PAGESIZE PAGE_SIZE
66 65
67/* This yields a mask that user programs can use to figure out what 66/* This yields a mask that user programs can use to figure out what
diff --git a/arch/score/include/asm/page.h b/arch/score/include/asm/page.h
index d92a5a2d36d4..1e9ade8e77e6 100644
--- a/arch/score/include/asm/page.h
+++ b/arch/score/include/asm/page.h
@@ -74,7 +74,7 @@ extern unsigned long max_pfn;
74#define page_to_bus(page) (page_to_phys(page)) 74#define page_to_bus(page) (page_to_phys(page))
75#define phys_to_page(paddr) (pfn_to_page(phys_to_pfn(paddr))) 75#define phys_to_page(paddr) (pfn_to_page(phys_to_pfn(paddr)))
76 76
77#define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_mapnr) 77#define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn))
78 78
79#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) 79#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
80 80
diff --git a/arch/score/kernel/setup.c b/arch/score/kernel/setup.c
index 6a2503c75c4e..6f898c057878 100644
--- a/arch/score/kernel/setup.c
+++ b/arch/score/kernel/setup.c
@@ -49,6 +49,7 @@ static void __init bootmem_init(void)
49 49
50 min_low_pfn = PFN_UP(MEMORY_START); 50 min_low_pfn = PFN_UP(MEMORY_START);
51 max_low_pfn = PFN_UP(MEMORY_START + MEMORY_SIZE); 51 max_low_pfn = PFN_UP(MEMORY_START + MEMORY_SIZE);
52 max_mapnr = max_low_pfn - min_low_pfn;
52 53
53 /* Initialize the boot-time allocator with low memory only. */ 54 /* Initialize the boot-time allocator with low memory only. */
54 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, 55 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c
index 001249469866..856ed68a58e6 100644
--- a/arch/score/kernel/sys_score.c
+++ b/arch/score/kernel/sys_score.c
@@ -36,34 +36,16 @@ asmlinkage long
36sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, 36sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
37 unsigned long flags, unsigned long fd, unsigned long pgoff) 37 unsigned long flags, unsigned long fd, unsigned long pgoff)
38{ 38{
39 int error = -EBADF; 39 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
40 struct file *file = NULL;
41
42 if (pgoff & (~PAGE_MASK >> 12))
43 return -EINVAL;
44
45 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
46 if (!(flags & MAP_ANONYMOUS)) {
47 file = fget(fd);
48 if (!file)
49 return error;
50 }
51
52 down_write(&current->mm->mmap_sem);
53 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
54 up_write(&current->mm->mmap_sem);
55
56 if (file)
57 fput(file);
58
59 return error;
60} 40}
61 41
62asmlinkage long 42asmlinkage long
63sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, 43sys_mmap(unsigned long addr, unsigned long len, unsigned long prot,
64 unsigned long flags, unsigned long fd, off_t pgoff) 44 unsigned long flags, unsigned long fd, off_t offset)
65{ 45{
66 return sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); 46 if (unlikely(offset & ~PAGE_MASK))
47 return -EINVAL;
48 return sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
67} 49}
68 50
69asmlinkage long 51asmlinkage long
diff --git a/arch/score/mm/cache.c b/arch/score/mm/cache.c
index dbac9d9dfddd..b25e95743600 100644
--- a/arch/score/mm/cache.c
+++ b/arch/score/mm/cache.c
@@ -29,6 +29,7 @@
29#include <linux/mm.h> 29#include <linux/mm.h>
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/sched.h> 31#include <linux/sched.h>
32#include <linux/fs.h>
32 33
33#include <asm/mmu_context.h> 34#include <asm/mmu_context.h>
34 35
@@ -51,6 +52,27 @@ static void flush_data_cache_page(unsigned long addr)
51 } 52 }
52} 53}
53 54
55void flush_dcache_page(struct page *page)
56{
57 struct address_space *mapping = page_mapping(page);
58 unsigned long addr;
59
60 if (PageHighMem(page))
61 return;
62 if (mapping && !mapping_mapped(mapping)) {
63 set_bit(PG_dcache_dirty, &(page)->flags);
64 return;
65 }
66
67 /*
68 * We could delay the flush for the !page_mapping case too. But that
69 * case is for exec env/arg pages and those are %99 certainly going to
70 * get faulted into the tlb (and thus flushed) anyways.
71 */
72 addr = (unsigned long) page_address(page);
73 flush_data_cache_page(addr);
74}
75
54/* called by update_mmu_cache. */ 76/* called by update_mmu_cache. */
55void __update_cache(struct vm_area_struct *vma, unsigned long address, 77void __update_cache(struct vm_area_struct *vma, unsigned long address,
56 pte_t pte) 78 pte_t pte)
@@ -63,11 +85,11 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
63 if (unlikely(!pfn_valid(pfn))) 85 if (unlikely(!pfn_valid(pfn)))
64 return; 86 return;
65 page = pfn_to_page(pfn); 87 page = pfn_to_page(pfn);
66 if (page_mapping(page) && test_bit(PG_arch_1, &page->flags)) { 88 if (page_mapping(page) && test_bit(PG_dcache_dirty, &(page)->flags)) {
67 addr = (unsigned long) page_address(page); 89 addr = (unsigned long) page_address(page);
68 if (exec) 90 if (exec)
69 flush_data_cache_page(addr); 91 flush_data_cache_page(addr);
70 clear_bit(PG_arch_1, &page->flags); 92 clear_bit(PG_dcache_dirty, &(page)->flags);
71 } 93 }
72} 94}
73 95
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c
index 4e3dcd0c4716..8c15b2c85d5a 100644
--- a/arch/score/mm/init.c
+++ b/arch/score/mm/init.c
@@ -83,7 +83,6 @@ void __init mem_init(void)
83 unsigned long codesize, reservedpages, datasize, initsize; 83 unsigned long codesize, reservedpages, datasize, initsize;
84 unsigned long tmp, ram = 0; 84 unsigned long tmp, ram = 0;
85 85
86 max_mapnr = max_low_pfn;
87 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); 86 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
88 totalram_pages += free_all_bootmem(); 87 totalram_pages += free_all_bootmem();
89 totalram_pages -= setup_zero_page(); /* Setup zeroed pages. */ 88 totalram_pages -= setup_zero_page(); /* Setup zeroed pages. */
@@ -101,10 +100,6 @@ void __init mem_init(void)
101 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 100 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
102 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 101 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
103 102
104 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
105 kclist_add(&kcore_vmalloc, (void *) VMALLOC_START,
106 VMALLOC_END - VMALLOC_START);
107
108 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " 103 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
109 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", 104 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n",
110 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 105 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 88cdeb9f72d9..0031a6979f3a 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -16,7 +16,9 @@ config SUPERH
16 select HAVE_IOREMAP_PROT if MMU 16 select HAVE_IOREMAP_PROT if MMU
17 select HAVE_ARCH_TRACEHOOK 17 select HAVE_ARCH_TRACEHOOK
18 select HAVE_DMA_API_DEBUG 18 select HAVE_DMA_API_DEBUG
19 select HAVE_DMA_ATTRS
19 select HAVE_PERF_EVENTS 20 select HAVE_PERF_EVENTS
21 select PERF_USE_VMALLOC
20 select HAVE_KERNEL_GZIP 22 select HAVE_KERNEL_GZIP
21 select HAVE_KERNEL_BZIP2 23 select HAVE_KERNEL_BZIP2
22 select HAVE_KERNEL_LZMA 24 select HAVE_KERNEL_LZMA
@@ -37,6 +39,7 @@ config SUPERH32
37 select HAVE_FTRACE_MCOUNT_RECORD 39 select HAVE_FTRACE_MCOUNT_RECORD
38 select HAVE_DYNAMIC_FTRACE 40 select HAVE_DYNAMIC_FTRACE
39 select HAVE_FUNCTION_TRACE_MCOUNT_TEST 41 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
42 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
40 select HAVE_FUNCTION_GRAPH_TRACER 43 select HAVE_FUNCTION_GRAPH_TRACER
41 select HAVE_ARCH_KGDB 44 select HAVE_ARCH_KGDB
42 select ARCH_HIBERNATION_POSSIBLE if MMU 45 select ARCH_HIBERNATION_POSSIBLE if MMU
@@ -170,6 +173,12 @@ config ARCH_HAS_CPU_IDLE_WAIT
170config IO_TRAPPED 173config IO_TRAPPED
171 bool 174 bool
172 175
176config DMA_COHERENT
177 bool
178
179config DMA_NONCOHERENT
180 def_bool !DMA_COHERENT
181
173source "init/Kconfig" 182source "init/Kconfig"
174 183
175source "kernel/Kconfig.freezer" 184source "kernel/Kconfig.freezer"
@@ -220,6 +229,7 @@ config CPU_SHX2
220 229
221config CPU_SHX3 230config CPU_SHX3
222 bool 231 bool
232 select DMA_COHERENT
223 233
224config ARCH_SHMOBILE 234config ARCH_SHMOBILE
225 bool 235 bool
@@ -761,17 +771,6 @@ config ENTRY_OFFSET
761 default "0x00010000" if PAGE_SIZE_64KB 771 default "0x00010000" if PAGE_SIZE_64KB
762 default "0x00000000" 772 default "0x00000000"
763 773
764config UBC_WAKEUP
765 bool "Wakeup UBC on startup"
766 depends on CPU_SH4 && !CPU_SH4A
767 help
768 Selecting this option will wakeup the User Break Controller (UBC) on
769 startup. Although the UBC is left in an awake state when the processor
770 comes up, some boot loaders misbehave by putting the UBC to sleep in a
771 power saving state, which causes issues with things like ptrace().
772
773 If unsure, say N.
774
775choice 774choice
776 prompt "Kernel command line" 775 prompt "Kernel command line"
777 optional 776 optional
@@ -818,7 +817,13 @@ config MAPLE
818 Dreamcast with a serial line terminal or a remote network 817 Dreamcast with a serial line terminal or a remote network
819 connection. 818 connection.
820 819
821source "arch/sh/drivers/pci/Kconfig" 820config PCI
821 bool "PCI support"
822 depends on SYS_SUPPORTS_PCI
823 help
824 Find out whether you have a PCI motherboard. PCI is the name of a
825 bus system, i.e. the way the CPU talks to the other stuff inside
826 your box. If you have PCI, say Y, otherwise N.
822 827
823source "drivers/pci/pcie/Kconfig" 828source "drivers/pci/pcie/Kconfig"
824 829
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 55907af1dc25..12fec72fec5f 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -19,50 +19,6 @@ config SH_STANDARD_BIOS
19 mask ROM and no flash (WindowsCE machines fall in this category). 19 mask ROM and no flash (WindowsCE machines fall in this category).
20 If unsure, say N. 20 If unsure, say N.
21 21
22config EARLY_SCIF_CONSOLE
23 bool "Use early SCIF console"
24 help
25 This enables an early console using a fixed SCIF port. This can
26 be used by platforms that are either not running the SH
27 standard BIOS, or do not wish to use the BIOS callbacks for the
28 serial I/O.
29
30config EARLY_SCIF_CONSOLE_PORT
31 hex
32 depends on EARLY_SCIF_CONSOLE
33 default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
34 default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
35 default "0xf8420000" if CPU_SUBTYPE_SH7619
36 default "0xff804000" if CPU_SUBTYPE_MXG
37 default "0xffc30000" if CPU_SUBTYPE_SHX3
38 default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
39 CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
40 CPU_SUBTYPE_SH7343
41 default "0xfe4c0000" if CPU_SUBTYPE_SH7757
42 default "0xffeb0000" if CPU_SUBTYPE_SH7785
43 default "0xffeb0000" if CPU_SUBTYPE_SH7786
44 default "0xfffe8000" if CPU_SUBTYPE_SH7203
45 default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
46 default "0xffe80000" if CPU_SH4
47 default "0xa4000150" if CPU_SH3
48 default "0x00000000"
49
50config EARLY_PRINTK
51 bool "Early printk support"
52 depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
53 help
54 Say Y here to redirect kernel printk messages to the serial port
55 used by the SH-IPL bootloader, starting very early in the boot
56 process and ending when the kernel's serial console is initialised.
57 This option is only useful porting the kernel to a new machine,
58 when the kernel may crash or hang before the serial console is
59 initialised. If unsure, say N.
60
61 On devices that are running SH-IPL and want to keep the port
62 initialization consistent while not using the BIOS callbacks,
63 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
64 the kernel command line option to toggle back and forth.
65
66config STACK_DEBUG 22config STACK_DEBUG
67 bool "Check for stack overflows" 23 bool "Check for stack overflows"
68 depends on DEBUG_KERNEL && SUPERH32 24 depends on DEBUG_KERNEL && SUPERH32
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 66e40aabc600..db91925c79d1 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -78,6 +78,9 @@ defaultimage-$(CONFIG_SUPERH32) := zImage
78defaultimage-$(CONFIG_SH_SH7785LCR) := uImage 78defaultimage-$(CONFIG_SH_SH7785LCR) := uImage
79defaultimage-$(CONFIG_SH_RSK) := uImage 79defaultimage-$(CONFIG_SH_RSK) := uImage
80defaultimage-$(CONFIG_SH_URQUELL) := uImage 80defaultimage-$(CONFIG_SH_URQUELL) := uImage
81defaultimage-$(CONFIG_SH_MIGOR) := uImage
82defaultimage-$(CONFIG_SH_AP325RXA) := uImage
83defaultimage-$(CONFIG_SH_7724_SOLUTION_ENGINE) := uImage
81defaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux 84defaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux
82defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux 85defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux
83 86
@@ -136,6 +139,7 @@ machdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh
136machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705 139machdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705
137machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander 140machdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander
138machdir-$(CONFIG_SH_MIGOR) += mach-migor 141machdir-$(CONFIG_SH_MIGOR) += mach-migor
142machdir-$(CONFIG_SH_AP325RXA) += mach-ap325rxa
139machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09 143machdir-$(CONFIG_SH_KFR2R09) += mach-kfr2r09
140machdir-$(CONFIG_SH_ECOVEC) += mach-ecovec24 144machdir-$(CONFIG_SH_ECOVEC) += mach-ecovec24
141machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 145machdir-$(CONFIG_SH_SDK7780) += mach-sdk7780
@@ -201,10 +205,7 @@ libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
201 205
202BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec uImage.bin \ 206BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec uImage.bin \
203 zImage vmlinux.srec romImage 207 zImage vmlinux.srec romImage
204PHONY += maketools $(BOOT_TARGETS) FORCE 208PHONY += $(BOOT_TARGETS)
205
206maketools: include/linux/version.h FORCE
207 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
208 209
209all: $(KBUILD_IMAGE) 210all: $(KBUILD_IMAGE)
210 211
@@ -213,7 +214,8 @@ $(BOOT_TARGETS): vmlinux
213 214
214compressed: zImage 215compressed: zImage
215 216
216archprepare: maketools 217archprepare:
218 $(Q)$(MAKE) $(build)=arch/sh/tools include/generated/machtypes.h
217 219
218archclean: 220archclean:
219 $(Q)$(MAKE) $(clean)=$(boot) 221 $(Q)$(MAKE) $(clean)=$(boot)
@@ -230,5 +232,3 @@ define archhelp
230 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)' 232 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
231 @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)' 233 @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
232endef 234endef
233
234CLEAN_FILES += include/asm-sh/machtypes.h
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
index 7baa21090231..ce0f26381784 100644
--- a/arch/sh/boards/Makefile
+++ b/arch/sh/boards/Makefile
@@ -1,7 +1,6 @@
1# 1#
2# Specific board support, not covered by a mach group. 2# Specific board support, not covered by a mach group.
3# 3#
4obj-$(CONFIG_SH_AP325RXA) += board-ap325rxa.o
5obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o 4obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
6obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o 5obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
7obj-$(CONFIG_SH_URQUELL) += board-urquell.o 6obj-$(CONFIG_SH_URQUELL) += board-urquell.o
diff --git a/arch/sh/boards/mach-ap325rxa/Makefile b/arch/sh/boards/mach-ap325rxa/Makefile
new file mode 100644
index 000000000000..4cf1774d2613
--- /dev/null
+++ b/arch/sh/boards/mach-ap325rxa/Makefile
@@ -0,0 +1,2 @@
1obj-y := setup.o sdram.o
2
diff --git a/arch/sh/boards/mach-ap325rxa/sdram.S b/arch/sh/boards/mach-ap325rxa/sdram.S
new file mode 100644
index 000000000000..db24fbed4fca
--- /dev/null
+++ b/arch/sh/boards/mach-ap325rxa/sdram.S
@@ -0,0 +1,69 @@
1/*
2 * AP325RXA sdram self/auto-refresh setup code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18/* code to enter and leave self-refresh. must be self-contained.
19 * this code will be copied to on-chip memory and executed from there.
20 */
21 .balign 4
22ENTRY(ap325rxa_sdram_enter_start)
23
24 /* SBSC: disable power down and put in self-refresh mode */
25 mov.l 1f, r4
26 mov.l 2f, r1
27 mov.l @r4, r2
28 or r1, r2
29 mov.l 3f, r3
30 and r3, r2
31 mov.l r2, @r4
32
33 rts
34 nop
35
36 .balign 4
371: .long 0xfe400008 /* SDCR0 */
382: .long 0x00000400
393: .long 0xffff7fff
40ENTRY(ap325rxa_sdram_enter_end)
41
42 .balign 4
43ENTRY(ap325rxa_sdram_leave_start)
44
45 /* SBSC: set auto-refresh mode */
46 mov.l 1f, r4
47 mov.l @r4, r0
48 mov.l 4f, r1
49 and r1, r0
50 mov.l r0, @r4
51 mov.l 6f, r4
52 mov.l 8f, r0
53 mov.l @r4, r1
54 mov #-1, r4
55 add r4, r1
56 or r1, r0
57 mov.l 7f, r1
58 mov.l r0, @r1
59
60 rts
61 nop
62
63 .balign 4
641: .long 0xfe400008 /* SDCR0 */
654: .long 0xfffffbff
666: .long 0xfe40001c /* RTCOR */
677: .long 0xfe400018 /* RTCNT */
688: .long 0xa55a0000
69ENTRY(ap325rxa_sdram_leave_end)
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/mach-ap325rxa/setup.c
index 2d080732a964..1f5fa5c44f6d 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -20,8 +20,6 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/smsc911x.h> 21#include <linux/smsc911x.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/spi/spi.h>
24#include <linux/spi/spi_gpio.h>
25#include <media/ov772x.h> 23#include <media/ov772x.h>
26#include <media/soc_camera.h> 24#include <media/soc_camera.h>
27#include <media/soc_camera_platform.h> 25#include <media/soc_camera_platform.h>
@@ -29,6 +27,7 @@
29#include <video/sh_mobile_lcdc.h> 27#include <video/sh_mobile_lcdc.h>
30#include <asm/io.h> 28#include <asm/io.h>
31#include <asm/clock.h> 29#include <asm/clock.h>
30#include <asm/suspend.h>
32#include <cpu/sh7723.h> 31#include <cpu/sh7723.h>
33 32
34static struct smsc911x_platform_config smsc911x_config = { 33static struct smsc911x_platform_config smsc911x_config = {
@@ -317,20 +316,24 @@ static struct soc_camera_platform_info camera_info = {
317 .format_name = "UYVY", 316 .format_name = "UYVY",
318 .format_depth = 16, 317 .format_depth = 16,
319 .format = { 318 .format = {
320 .pixelformat = V4L2_PIX_FMT_UYVY, 319 .code = V4L2_MBUS_FMT_YUYV8_2X8_BE,
321 .colorspace = V4L2_COLORSPACE_SMPTE170M, 320 .colorspace = V4L2_COLORSPACE_SMPTE170M,
321 .field = V4L2_FIELD_NONE,
322 .width = 640, 322 .width = 640,
323 .height = 480, 323 .height = 480,
324 }, 324 },
325 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | 325 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
326 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, 326 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8 |
327 SOCAM_DATA_ACTIVE_HIGH,
327 .set_capture = camera_set_capture, 328 .set_capture = camera_set_capture,
328 .link = { 329};
329 .bus_id = 0, 330
330 .add_device = ap325rxa_camera_add, 331struct soc_camera_link camera_link = {
331 .del_device = ap325rxa_camera_del, 332 .bus_id = 0,
332 .module_name = "soc_camera_platform", 333 .add_device = ap325rxa_camera_add,
333 }, 334 .del_device = ap325rxa_camera_del,
335 .module_name = "soc_camera_platform",
336 .priv = &camera_info,
334}; 337};
335 338
336static void dummy_release(struct device *dev) 339static void dummy_release(struct device *dev)
@@ -348,7 +351,7 @@ static struct platform_device camera_device = {
348static int ap325rxa_camera_add(struct soc_camera_link *icl, 351static int ap325rxa_camera_add(struct soc_camera_link *icl,
349 struct device *dev) 352 struct device *dev)
350{ 353{
351 if (icl != &camera_info.link || camera_probe() <= 0) 354 if (icl != &camera_link || camera_probe() <= 0)
352 return -ENODEV; 355 return -ENODEV;
353 356
354 camera_info.dev = dev; 357 camera_info.dev = dev;
@@ -358,7 +361,7 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl,
358 361
359static void ap325rxa_camera_del(struct soc_camera_link *icl) 362static void ap325rxa_camera_del(struct soc_camera_link *icl)
360{ 363{
361 if (icl != &camera_info.link) 364 if (icl != &camera_link)
362 return; 365 return;
363 366
364 platform_device_unregister(&camera_device); 367 platform_device_unregister(&camera_device);
@@ -409,17 +412,49 @@ static struct platform_device ceu_device = {
409 }, 412 },
410}; 413};
411 414
412struct spi_gpio_platform_data sdcard_cn3_platform_data = { 415static struct resource sdhi0_cn3_resources[] = {
413 .sck = GPIO_PTD0, 416 [0] = {
414 .mosi = GPIO_PTD1, 417 .name = "SDHI0",
415 .miso = GPIO_PTD2, 418 .start = 0x04ce0000,
416 .num_chipselect = 1, 419 .end = 0x04ce01ff,
420 .flags = IORESOURCE_MEM,
421 },
422 [1] = {
423 .start = 101,
424 .flags = IORESOURCE_IRQ,
425 },
417}; 426};
418 427
419static struct platform_device sdcard_cn3_device = { 428static struct platform_device sdhi0_cn3_device = {
420 .name = "spi_gpio", 429 .name = "sh_mobile_sdhi",
421 .dev = { 430 .id = 0, /* "sdhi0" clock */
422 .platform_data = &sdcard_cn3_platform_data, 431 .num_resources = ARRAY_SIZE(sdhi0_cn3_resources),
432 .resource = sdhi0_cn3_resources,
433 .archdata = {
434 .hwblk_id = HWBLK_SDHI0,
435 },
436};
437
438static struct resource sdhi1_cn7_resources[] = {
439 [0] = {
440 .name = "SDHI1",
441 .start = 0x04cf0000,
442 .end = 0x04cf01ff,
443 .flags = IORESOURCE_MEM,
444 },
445 [1] = {
446 .start = 24,
447 .flags = IORESOURCE_IRQ,
448 },
449};
450
451static struct platform_device sdhi1_cn7_device = {
452 .name = "sh_mobile_sdhi",
453 .id = 1, /* "sdhi1" clock */
454 .num_resources = ARRAY_SIZE(sdhi1_cn7_resources),
455 .resource = sdhi1_cn7_resources,
456 .archdata = {
457 .hwblk_id = HWBLK_SDHI1,
423 }, 458 },
424}; 459};
425 460
@@ -439,13 +474,15 @@ static struct ov772x_camera_info ov7725_info = {
439 .buswidth = SOCAM_DATAWIDTH_8, 474 .buswidth = SOCAM_DATAWIDTH_8,
440 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, 475 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
441 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), 476 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
442 .link = { 477};
443 .bus_id = 0, 478
444 .power = ov7725_power, 479static struct soc_camera_link ov7725_link = {
445 .board_info = &ap325rxa_i2c_camera[0], 480 .bus_id = 0,
446 .i2c_adapter_id = 0, 481 .power = ov7725_power,
447 .module_name = "ov772x", 482 .board_info = &ap325rxa_i2c_camera[0],
448 }, 483 .i2c_adapter_id = 0,
484 .module_name = "ov772x",
485 .priv = &ov7725_info,
449}; 486};
450 487
451static struct platform_device ap325rxa_camera[] = { 488static struct platform_device ap325rxa_camera[] = {
@@ -453,13 +490,13 @@ static struct platform_device ap325rxa_camera[] = {
453 .name = "soc-camera-pdrv", 490 .name = "soc-camera-pdrv",
454 .id = 0, 491 .id = 0,
455 .dev = { 492 .dev = {
456 .platform_data = &ov7725_info.link, 493 .platform_data = &ov7725_link,
457 }, 494 },
458 }, { 495 }, {
459 .name = "soc-camera-pdrv", 496 .name = "soc-camera-pdrv",
460 .id = 1, 497 .id = 1,
461 .dev = { 498 .dev = {
462 .platform_data = &camera_info.link, 499 .platform_data = &camera_link,
463 }, 500 },
464 }, 501 },
465}; 502};
@@ -470,22 +507,26 @@ static struct platform_device *ap325rxa_devices[] __initdata = {
470 &lcdc_device, 507 &lcdc_device,
471 &ceu_device, 508 &ceu_device,
472 &nand_flash_device, 509 &nand_flash_device,
473 &sdcard_cn3_device, 510 &sdhi0_cn3_device,
511 &sdhi1_cn7_device,
474 &ap325rxa_camera[0], 512 &ap325rxa_camera[0],
475 &ap325rxa_camera[1], 513 &ap325rxa_camera[1],
476}; 514};
477 515
478static struct spi_board_info ap325rxa_spi_devices[] = { 516extern char ap325rxa_sdram_enter_start;
479 { 517extern char ap325rxa_sdram_enter_end;
480 .modalias = "mmc_spi", 518extern char ap325rxa_sdram_leave_start;
481 .max_speed_hz = 5000000, 519extern char ap325rxa_sdram_leave_end;
482 .chip_select = 0,
483 .controller_data = (void *) GPIO_PTD5,
484 },
485};
486 520
487static int __init ap325rxa_devices_setup(void) 521static int __init ap325rxa_devices_setup(void)
488{ 522{
523 /* register board specific self-refresh code */
524 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
525 &ap325rxa_sdram_enter_start,
526 &ap325rxa_sdram_enter_end,
527 &ap325rxa_sdram_leave_start,
528 &ap325rxa_sdram_leave_end);
529
489 /* LD3 and LD4 LEDs */ 530 /* LD3 and LD4 LEDs */
490 gpio_request(GPIO_PTX5, NULL); /* RUN */ 531 gpio_request(GPIO_PTX5, NULL); /* RUN */
491 gpio_direction_output(GPIO_PTX5, 1); 532 gpio_direction_output(GPIO_PTX5, 1);
@@ -578,12 +619,28 @@ static int __init ap325rxa_devices_setup(void)
578 619
579 platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20); 620 platform_resource_setup_memory(&ceu_device, "ceu", 4 << 20);
580 621
622 /* SDHI0 - CN3 - SD CARD */
623 gpio_request(GPIO_FN_SDHI0CD_PTD, NULL);
624 gpio_request(GPIO_FN_SDHI0WP_PTD, NULL);
625 gpio_request(GPIO_FN_SDHI0D3_PTD, NULL);
626 gpio_request(GPIO_FN_SDHI0D2_PTD, NULL);
627 gpio_request(GPIO_FN_SDHI0D1_PTD, NULL);
628 gpio_request(GPIO_FN_SDHI0D0_PTD, NULL);
629 gpio_request(GPIO_FN_SDHI0CMD_PTD, NULL);
630 gpio_request(GPIO_FN_SDHI0CLK_PTD, NULL);
631
632 /* SDHI1 - CN7 - MICRO SD CARD */
633 gpio_request(GPIO_FN_SDHI1CD, NULL);
634 gpio_request(GPIO_FN_SDHI1D3, NULL);
635 gpio_request(GPIO_FN_SDHI1D2, NULL);
636 gpio_request(GPIO_FN_SDHI1D1, NULL);
637 gpio_request(GPIO_FN_SDHI1D0, NULL);
638 gpio_request(GPIO_FN_SDHI1CMD, NULL);
639 gpio_request(GPIO_FN_SDHI1CLK, NULL);
640
581 i2c_register_board_info(0, ap325rxa_i2c_devices, 641 i2c_register_board_info(0, ap325rxa_i2c_devices,
582 ARRAY_SIZE(ap325rxa_i2c_devices)); 642 ARRAY_SIZE(ap325rxa_i2c_devices));
583 643
584 spi_register_board_info(ap325rxa_spi_devices,
585 ARRAY_SIZE(ap325rxa_spi_devices));
586
587 return platform_add_devices(ap325rxa_devices, 644 return platform_add_devices(ap325rxa_devices,
588 ARRAY_SIZE(ap325rxa_devices)); 645 ARRAY_SIZE(ap325rxa_devices));
589} 646}
diff --git a/arch/sh/boards/mach-ecovec24/Makefile b/arch/sh/boards/mach-ecovec24/Makefile
index 51f852151655..e69bc82208fc 100644
--- a/arch/sh/boards/mach-ecovec24/Makefile
+++ b/arch/sh/boards/mach-ecovec24/Makefile
@@ -6,4 +6,4 @@
6# for more details. 6# for more details.
7# 7#
8 8
9obj-y := setup.o \ No newline at end of file 9obj-y := setup.o sdram.o \ No newline at end of file
diff --git a/arch/sh/boards/mach-ecovec24/sdram.S b/arch/sh/boards/mach-ecovec24/sdram.S
new file mode 100644
index 000000000000..833440044407
--- /dev/null
+++ b/arch/sh/boards/mach-ecovec24/sdram.S
@@ -0,0 +1,52 @@
1/*
2 * Ecovec24 sdram self/auto-refresh setup code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18/* code to enter and leave self-refresh. must be self-contained.
19 * this code will be copied to on-chip memory and executed from there.
20 */
21 .balign 4
22ENTRY(ecovec24_sdram_enter_start)
23
24 /* DBSC: put memory in self-refresh mode */
25
26 ED 0xFD000010, 0x00000000 /* DBEN */
27 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
28 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
29 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
30 ED 0xFD000040, 0x00000001 /* DBRFPDN0 */
31
32 rts
33 nop
34
35ENTRY(ecovec24_sdram_enter_end)
36
37 .balign 4
38ENTRY(ecovec24_sdram_leave_start)
39
40 /* DBSC: put memory in auto-refresh mode */
41
42 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
43 WAIT 1
44 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
45 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
46 ED 0xFD000010, 0x00000001 /* DBEN */
47 ED 0xFD000040, 0x00010000 /* DBRFPDN0 */
48
49 rts
50 nop
51
52ENTRY(ecovec24_sdram_leave_end)
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 3b1ceb46fa54..194aaca22d47 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -19,13 +19,22 @@
19#include <linux/usb/r8a66597.h> 19#include <linux/usb/r8a66597.h>
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/i2c/tsc2007.h> 21#include <linux/i2c/tsc2007.h>
22#include <linux/spi/spi.h>
23#include <linux/spi/sh_msiof.h>
24#include <linux/spi/mmc_spi.h>
25#include <linux/mmc/host.h>
22#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/input/sh_keysc.h>
28#include <linux/mfd/sh_mobile_sdhi.h>
23#include <video/sh_mobile_lcdc.h> 29#include <video/sh_mobile_lcdc.h>
30#include <sound/sh_fsi.h>
24#include <media/sh_mobile_ceu.h> 31#include <media/sh_mobile_ceu.h>
32#include <media/tw9910.h>
33#include <media/mt9t112.h>
25#include <asm/heartbeat.h> 34#include <asm/heartbeat.h>
26#include <asm/sh_eth.h> 35#include <asm/sh_eth.h>
27#include <asm/sh_keysc.h>
28#include <asm/clock.h> 36#include <asm/clock.h>
37#include <asm/suspend.h>
29#include <cpu/sh7724.h> 38#include <cpu/sh7724.h>
30 39
31/* 40/*
@@ -147,6 +156,9 @@ static struct platform_device sh_eth_device = {
147 }, 156 },
148 .num_resources = ARRAY_SIZE(sh_eth_resources), 157 .num_resources = ARRAY_SIZE(sh_eth_resources),
149 .resource = sh_eth_resources, 158 .resource = sh_eth_resources,
159 .archdata = {
160 .hwblk_id = HWBLK_ETHER,
161 },
150}; 162};
151 163
152/* USB0 host */ 164/* USB0 host */
@@ -185,30 +197,18 @@ static struct platform_device usb0_host_device = {
185 .resource = usb0_host_resources, 197 .resource = usb0_host_resources,
186}; 198};
187 199
188/* 200/* USB1 host/function */
189 * USB1
190 *
191 * CN5 can use both host/function,
192 * and we can determine it by checking PTB[3]
193 *
194 * This time only USB1 host is supported.
195 */
196void usb1_port_power(int port, int power) 201void usb1_port_power(int port, int power)
197{ 202{
198 if (!gpio_get_value(GPIO_PTB3)) {
199 printk(KERN_ERR "USB1 function is not supported\n");
200 return;
201 }
202
203 gpio_set_value(GPIO_PTB5, power); 203 gpio_set_value(GPIO_PTB5, power);
204} 204}
205 205
206static struct r8a66597_platdata usb1_host_data = { 206static struct r8a66597_platdata usb1_common_data = {
207 .on_chip = 1, 207 .on_chip = 1,
208 .port_power = usb1_port_power, 208 .port_power = usb1_port_power,
209}; 209};
210 210
211static struct resource usb1_host_resources[] = { 211static struct resource usb1_common_resources[] = {
212 [0] = { 212 [0] = {
213 .start = 0xa4d90000, 213 .start = 0xa4d90000,
214 .end = 0xa4d90124 - 1, 214 .end = 0xa4d90124 - 1,
@@ -221,16 +221,16 @@ static struct resource usb1_host_resources[] = {
221 }, 221 },
222}; 222};
223 223
224static struct platform_device usb1_host_device = { 224static struct platform_device usb1_common_device = {
225 .name = "r8a66597_hcd", 225 /* .name will be added in arch_setup */
226 .id = 1, 226 .id = 1,
227 .dev = { 227 .dev = {
228 .dma_mask = NULL, /* not use dma */ 228 .dma_mask = NULL, /* not use dma */
229 .coherent_dma_mask = 0xffffffff, 229 .coherent_dma_mask = 0xffffffff,
230 .platform_data = &usb1_host_data, 230 .platform_data = &usb1_common_data,
231 }, 231 },
232 .num_resources = ARRAY_SIZE(usb1_host_resources), 232 .num_resources = ARRAY_SIZE(usb1_common_resources),
233 .resource = usb1_host_resources, 233 .resource = usb1_common_resources,
234}; 234};
235 235
236/* LCDC */ 236/* LCDC */
@@ -345,6 +345,12 @@ static struct platform_device ceu1_device = {
345}; 345};
346 346
347/* I2C device */ 347/* I2C device */
348static struct i2c_board_info i2c0_devices[] = {
349 {
350 I2C_BOARD_INFO("da7210", 0x1a),
351 },
352};
353
348static struct i2c_board_info i2c1_devices[] = { 354static struct i2c_board_info i2c1_devices[] = {
349 { 355 {
350 I2C_BOARD_INFO("r2025sd", 0x32), 356 I2C_BOARD_INFO("r2025sd", 0x32),
@@ -428,16 +434,341 @@ static struct i2c_board_info ts_i2c_clients = {
428 .irq = IRQ0, 434 .irq = IRQ0,
429}; 435};
430 436
437#ifdef CONFIG_MFD_SH_MOBILE_SDHI
438/* SHDI0 */
439static void sdhi0_set_pwr(struct platform_device *pdev, int state)
440{
441 gpio_set_value(GPIO_PTB6, state);
442}
443
444static struct sh_mobile_sdhi_info sdhi0_info = {
445 .set_pwr = sdhi0_set_pwr,
446};
447
448static struct resource sdhi0_resources[] = {
449 [0] = {
450 .name = "SDHI0",
451 .start = 0x04ce0000,
452 .end = 0x04ce01ff,
453 .flags = IORESOURCE_MEM,
454 },
455 [1] = {
456 .start = 101,
457 .flags = IORESOURCE_IRQ,
458 },
459};
460
461static struct platform_device sdhi0_device = {
462 .name = "sh_mobile_sdhi",
463 .num_resources = ARRAY_SIZE(sdhi0_resources),
464 .resource = sdhi0_resources,
465 .id = 0,
466 .dev = {
467 .platform_data = &sdhi0_info,
468 },
469 .archdata = {
470 .hwblk_id = HWBLK_SDHI0,
471 },
472};
473
474/* SHDI1 */
475static void sdhi1_set_pwr(struct platform_device *pdev, int state)
476{
477 gpio_set_value(GPIO_PTB7, state);
478}
479
480static struct sh_mobile_sdhi_info sdhi1_info = {
481 .set_pwr = sdhi1_set_pwr,
482};
483
484static struct resource sdhi1_resources[] = {
485 [0] = {
486 .name = "SDHI1",
487 .start = 0x04cf0000,
488 .end = 0x04cf01ff,
489 .flags = IORESOURCE_MEM,
490 },
491 [1] = {
492 .start = 24,
493 .flags = IORESOURCE_IRQ,
494 },
495};
496
497static struct platform_device sdhi1_device = {
498 .name = "sh_mobile_sdhi",
499 .num_resources = ARRAY_SIZE(sdhi1_resources),
500 .resource = sdhi1_resources,
501 .id = 1,
502 .dev = {
503 .platform_data = &sdhi1_info,
504 },
505 .archdata = {
506 .hwblk_id = HWBLK_SDHI1,
507 },
508};
509
510#else
511
512static int mmc_spi_get_ro(struct device *dev)
513{
514 return gpio_get_value(GPIO_PTY6);
515}
516
517static int mmc_spi_get_cd(struct device *dev)
518{
519 return !gpio_get_value(GPIO_PTY7);
520}
521
522static void mmc_spi_setpower(struct device *dev, unsigned int maskval)
523{
524 gpio_set_value(GPIO_PTB6, maskval ? 1 : 0);
525}
526
527static struct mmc_spi_platform_data mmc_spi_info = {
528 .get_ro = mmc_spi_get_ro,
529 .get_cd = mmc_spi_get_cd,
530 .caps = MMC_CAP_NEEDS_POLL,
531 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3.3V only */
532 .setpower = mmc_spi_setpower,
533};
534
535static struct spi_board_info spi_bus[] = {
536 {
537 .modalias = "mmc_spi",
538 .platform_data = &mmc_spi_info,
539 .max_speed_hz = 5000000,
540 .mode = SPI_MODE_0,
541 .controller_data = (void *) GPIO_PTM4,
542 },
543};
544
545static struct sh_msiof_spi_info msiof0_data = {
546 .num_chipselect = 1,
547};
548
549static struct resource msiof0_resources[] = {
550 [0] = {
551 .name = "MSIOF0",
552 .start = 0xa4c40000,
553 .end = 0xa4c40063,
554 .flags = IORESOURCE_MEM,
555 },
556 [1] = {
557 .start = 84,
558 .flags = IORESOURCE_IRQ,
559 },
560};
561
562static struct platform_device msiof0_device = {
563 .name = "spi_sh_msiof",
564 .id = 0, /* MSIOF0 */
565 .dev = {
566 .platform_data = &msiof0_data,
567 },
568 .num_resources = ARRAY_SIZE(msiof0_resources),
569 .resource = msiof0_resources,
570 .archdata = {
571 .hwblk_id = HWBLK_MSIOF0,
572 },
573};
574
575#endif
576
577/* I2C Video/Camera */
578static struct i2c_board_info i2c_camera[] = {
579 {
580 I2C_BOARD_INFO("tw9910", 0x45),
581 },
582 {
583 /* 1st camera */
584 I2C_BOARD_INFO("mt9t112", 0x3c),
585 },
586 {
587 /* 2nd camera */
588 I2C_BOARD_INFO("mt9t112", 0x3c),
589 },
590};
591
592/* tw9910 */
593static int tw9910_power(struct device *dev, int mode)
594{
595 int val = mode ? 0 : 1;
596
597 gpio_set_value(GPIO_PTU2, val);
598 if (mode)
599 mdelay(100);
600
601 return 0;
602}
603
604static struct tw9910_video_info tw9910_info = {
605 .buswidth = SOCAM_DATAWIDTH_8,
606 .mpout = TW9910_MPO_FIELD,
607};
608
609static struct soc_camera_link tw9910_link = {
610 .i2c_adapter_id = 0,
611 .bus_id = 1,
612 .power = tw9910_power,
613 .board_info = &i2c_camera[0],
614 .module_name = "tw9910",
615 .priv = &tw9910_info,
616};
617
618/* mt9t112 */
619static int mt9t112_power1(struct device *dev, int mode)
620{
621 gpio_set_value(GPIO_PTA3, mode);
622 if (mode)
623 mdelay(100);
624
625 return 0;
626}
627
628static struct mt9t112_camera_info mt9t112_info1 = {
629 .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8,
630 .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */
631};
632
633static struct soc_camera_link mt9t112_link1 = {
634 .i2c_adapter_id = 0,
635 .power = mt9t112_power1,
636 .bus_id = 0,
637 .board_info = &i2c_camera[1],
638 .module_name = "mt9t112",
639 .priv = &mt9t112_info1,
640};
641
642static int mt9t112_power2(struct device *dev, int mode)
643{
644 gpio_set_value(GPIO_PTA4, mode);
645 if (mode)
646 mdelay(100);
647
648 return 0;
649}
650
651static struct mt9t112_camera_info mt9t112_info2 = {
652 .flags = MT9T112_FLAG_PCLK_RISING_EDGE | MT9T112_FLAG_DATAWIDTH_8,
653 .divider = { 0x49, 0x6, 0, 6, 0, 9, 9, 6, 0 }, /* for 24MHz */
654};
655
656static struct soc_camera_link mt9t112_link2 = {
657 .i2c_adapter_id = 1,
658 .power = mt9t112_power2,
659 .bus_id = 1,
660 .board_info = &i2c_camera[2],
661 .module_name = "mt9t112",
662 .priv = &mt9t112_info2,
663};
664
665static struct platform_device camera_devices[] = {
666 {
667 .name = "soc-camera-pdrv",
668 .id = 0,
669 .dev = {
670 .platform_data = &tw9910_link,
671 },
672 },
673 {
674 .name = "soc-camera-pdrv",
675 .id = 1,
676 .dev = {
677 .platform_data = &mt9t112_link1,
678 },
679 },
680 {
681 .name = "soc-camera-pdrv",
682 .id = 2,
683 .dev = {
684 .platform_data = &mt9t112_link2,
685 },
686 },
687};
688
689/* FSI */
690/*
691 * FSI-B use external clock which came from da7210.
692 * So, we should change parent of fsi
693 */
694#define FCLKBCR 0xa415000c
695static void fsimck_init(struct clk *clk)
696{
697 u32 status = ctrl_inl(clk->enable_reg);
698
699 /* use external clock */
700 status &= ~0x000000ff;
701 status |= 0x00000080;
702
703 ctrl_outl(status, clk->enable_reg);
704}
705
706static struct clk_ops fsimck_clk_ops = {
707 .init = fsimck_init,
708};
709
710static struct clk fsimckb_clk = {
711 .name = "fsimckb_clk",
712 .id = -1,
713 .ops = &fsimck_clk_ops,
714 .enable_reg = (void __iomem *)FCLKBCR,
715 .rate = 0, /* unknown */
716};
717
718struct sh_fsi_platform_info fsi_info = {
719 .portb_flags = SH_FSI_BRS_INV |
720 SH_FSI_OUT_SLAVE_MODE |
721 SH_FSI_IN_SLAVE_MODE |
722 SH_FSI_OFMT(I2S) |
723 SH_FSI_IFMT(I2S),
724};
725
726static struct resource fsi_resources[] = {
727 [0] = {
728 .name = "FSI",
729 .start = 0xFE3C0000,
730 .end = 0xFE3C021d,
731 .flags = IORESOURCE_MEM,
732 },
733 [1] = {
734 .start = 108,
735 .flags = IORESOURCE_IRQ,
736 },
737};
738
739static struct platform_device fsi_device = {
740 .name = "sh_fsi",
741 .id = 0,
742 .num_resources = ARRAY_SIZE(fsi_resources),
743 .resource = fsi_resources,
744 .dev = {
745 .platform_data = &fsi_info,
746 },
747 .archdata = {
748 .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
749 },
750};
751
431static struct platform_device *ecovec_devices[] __initdata = { 752static struct platform_device *ecovec_devices[] __initdata = {
432 &heartbeat_device, 753 &heartbeat_device,
433 &nor_flash_device, 754 &nor_flash_device,
434 &sh_eth_device, 755 &sh_eth_device,
435 &usb0_host_device, 756 &usb0_host_device,
436 &usb1_host_device, /* USB1 host support */ 757 &usb1_common_device,
437 &lcdc_device, 758 &lcdc_device,
438 &ceu0_device, 759 &ceu0_device,
439 &ceu1_device, 760 &ceu1_device,
440 &keysc_device, 761 &keysc_device,
762#ifdef CONFIG_MFD_SH_MOBILE_SDHI
763 &sdhi0_device,
764 &sdhi1_device,
765#else
766 &msiof0_device,
767#endif
768 &camera_devices[0],
769 &camera_devices[1],
770 &camera_devices[2],
771 &fsi_device,
441}; 772};
442 773
443#define EEPROM_ADDR 0x50 774#define EEPROM_ADDR 0x50
@@ -466,12 +797,9 @@ static u8 mac_read(struct i2c_adapter *a, u8 command)
466 return buf; 797 return buf;
467} 798}
468 799
469#define MAC_LEN 6 800static void __init sh_eth_init(struct sh_eth_plat_data *pd)
470static void __init sh_eth_init(void)
471{ 801{
472 struct i2c_adapter *a = i2c_get_adapter(1); 802 struct i2c_adapter *a = i2c_get_adapter(1);
473 struct clk *eth_clk;
474 u8 mac[MAC_LEN];
475 int i; 803 int i;
476 804
477 if (!a) { 805 if (!a) {
@@ -479,39 +807,32 @@ static void __init sh_eth_init(void)
479 return; 807 return;
480 } 808 }
481 809
482 eth_clk = clk_get(NULL, "eth0");
483 if (!eth_clk) {
484 pr_err("can not get eth0 clk\n");
485 return;
486 }
487
488 /* read MAC address frome EEPROM */ 810 /* read MAC address frome EEPROM */
489 for (i = 0; i < MAC_LEN; i++) { 811 for (i = 0; i < sizeof(pd->mac_addr); i++) {
490 mac[i] = mac_read(a, 0x10 + i); 812 pd->mac_addr[i] = mac_read(a, 0x10 + i);
491 msleep(10); 813 msleep(10);
492 } 814 }
493
494 /* clock enable */
495 clk_enable(eth_clk);
496
497 /* reset sh-eth */
498 ctrl_outl(0x1, SH_ETH_ADDR + 0x0);
499
500 /* set MAC addr */
501 ctrl_outl((mac[0] << 24) |
502 (mac[1] << 16) |
503 (mac[2] << 8) |
504 (mac[3] << 0), SH_ETH_MAHR);
505 ctrl_outl((mac[4] << 8) |
506 (mac[5] << 0), SH_ETH_MALR);
507
508 clk_put(eth_clk);
509} 815}
510 816
511#define PORT_HIZA 0xA4050158 817#define PORT_HIZA 0xA4050158
512#define IODRIVEA 0xA405018A 818#define IODRIVEA 0xA405018A
819
820extern char ecovec24_sdram_enter_start;
821extern char ecovec24_sdram_enter_end;
822extern char ecovec24_sdram_leave_start;
823extern char ecovec24_sdram_leave_end;
824
513static int __init arch_setup(void) 825static int __init arch_setup(void)
514{ 826{
827 struct clk *clk;
828
829 /* register board specific self-refresh code */
830 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
831 &ecovec24_sdram_enter_start,
832 &ecovec24_sdram_enter_end,
833 &ecovec24_sdram_leave_start,
834 &ecovec24_sdram_leave_end);
835
515 /* enable STATUS0, STATUS2 and PDSTATUS */ 836 /* enable STATUS0, STATUS2 and PDSTATUS */
516 gpio_request(GPIO_FN_STATUS0, NULL); 837 gpio_request(GPIO_FN_STATUS0, NULL);
517 gpio_request(GPIO_FN_STATUS2, NULL); 838 gpio_request(GPIO_FN_STATUS2, NULL);
@@ -561,6 +882,14 @@ static int __init arch_setup(void)
561 ctrl_outw(0x0600, 0xa40501d4); 882 ctrl_outw(0x0600, 0xa40501d4);
562 ctrl_outw(0x0600, 0xa4050192); 883 ctrl_outw(0x0600, 0xa4050192);
563 884
885 if (gpio_get_value(GPIO_PTB3)) {
886 printk(KERN_INFO "USB1 function is selected\n");
887 usb1_common_device.name = "r8a66597_udc";
888 } else {
889 printk(KERN_INFO "USB1 host is selected\n");
890 usb1_common_device.name = "r8a66597_hcd";
891 }
892
564 /* enable LCDC */ 893 /* enable LCDC */
565 gpio_request(GPIO_FN_LCDD23, NULL); 894 gpio_request(GPIO_FN_LCDD23, NULL);
566 gpio_request(GPIO_FN_LCDD22, NULL); 895 gpio_request(GPIO_FN_LCDD22, NULL);
@@ -603,8 +932,8 @@ static int __init arch_setup(void)
603 gpio_direction_output(GPIO_PTR1, 0); 932 gpio_direction_output(GPIO_PTR1, 0);
604 gpio_direction_output(GPIO_PTA2, 0); 933 gpio_direction_output(GPIO_PTA2, 0);
605 934
606 /* I/O buffer drive ability is low */ 935 /* I/O buffer drive ability is high */
607 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA); 936 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0080 , IODRIVEA);
608 937
609 if (gpio_get_value(GPIO_PTE6)) { 938 if (gpio_get_value(GPIO_PTE6)) {
610 /* DVI */ 939 /* DVI */
@@ -710,7 +1039,86 @@ static int __init arch_setup(void)
710 gpio_direction_input(GPIO_PTR5); 1039 gpio_direction_input(GPIO_PTR5);
711 gpio_direction_input(GPIO_PTR6); 1040 gpio_direction_input(GPIO_PTR6);
712 1041
1042#ifdef CONFIG_MFD_SH_MOBILE_SDHI
1043 /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */
1044 gpio_request(GPIO_FN_SDHI0CD, NULL);
1045 gpio_request(GPIO_FN_SDHI0WP, NULL);
1046 gpio_request(GPIO_FN_SDHI0CMD, NULL);
1047 gpio_request(GPIO_FN_SDHI0CLK, NULL);
1048 gpio_request(GPIO_FN_SDHI0D3, NULL);
1049 gpio_request(GPIO_FN_SDHI0D2, NULL);
1050 gpio_request(GPIO_FN_SDHI0D1, NULL);
1051 gpio_request(GPIO_FN_SDHI0D0, NULL);
1052 gpio_request(GPIO_PTB6, NULL);
1053 gpio_direction_output(GPIO_PTB6, 0);
1054
1055 /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */
1056 gpio_request(GPIO_FN_SDHI1CD, NULL);
1057 gpio_request(GPIO_FN_SDHI1WP, NULL);
1058 gpio_request(GPIO_FN_SDHI1CMD, NULL);
1059 gpio_request(GPIO_FN_SDHI1CLK, NULL);
1060 gpio_request(GPIO_FN_SDHI1D3, NULL);
1061 gpio_request(GPIO_FN_SDHI1D2, NULL);
1062 gpio_request(GPIO_FN_SDHI1D1, NULL);
1063 gpio_request(GPIO_FN_SDHI1D0, NULL);
1064 gpio_request(GPIO_PTB7, NULL);
1065 gpio_direction_output(GPIO_PTB7, 0);
1066
1067 /* I/O buffer drive ability is high for SDHI1 */
1068 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x3000) | 0x2000 , IODRIVEA);
1069#else
1070 /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */
1071 gpio_request(GPIO_FN_MSIOF0_TXD, NULL);
1072 gpio_request(GPIO_FN_MSIOF0_RXD, NULL);
1073 gpio_request(GPIO_FN_MSIOF0_TSCK, NULL);
1074 gpio_request(GPIO_PTM4, NULL); /* software CS control of TSYNC pin */
1075 gpio_direction_output(GPIO_PTM4, 1); /* active low CS */
1076 gpio_request(GPIO_PTB6, NULL); /* 3.3V power control */
1077 gpio_direction_output(GPIO_PTB6, 0); /* disable power by default */
1078 gpio_request(GPIO_PTY6, NULL); /* write protect */
1079 gpio_direction_input(GPIO_PTY6);
1080 gpio_request(GPIO_PTY7, NULL); /* card detect */
1081 gpio_direction_input(GPIO_PTY7);
1082
1083 spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus));
1084#endif
1085
1086 /* enable Video */
1087 gpio_request(GPIO_PTU2, NULL);
1088 gpio_direction_output(GPIO_PTU2, 1);
1089
1090 /* enable Camera */
1091 gpio_request(GPIO_PTA3, NULL);
1092 gpio_request(GPIO_PTA4, NULL);
1093 gpio_direction_output(GPIO_PTA3, 0);
1094 gpio_direction_output(GPIO_PTA4, 0);
1095
1096 /* enable FSI */
1097 gpio_request(GPIO_FN_FSIMCKB, NULL);
1098 gpio_request(GPIO_FN_FSIIBSD, NULL);
1099 gpio_request(GPIO_FN_FSIOBSD, NULL);
1100 gpio_request(GPIO_FN_FSIIBBCK, NULL);
1101 gpio_request(GPIO_FN_FSIIBLRCK, NULL);
1102 gpio_request(GPIO_FN_FSIOBBCK, NULL);
1103 gpio_request(GPIO_FN_FSIOBLRCK, NULL);
1104 gpio_request(GPIO_FN_CLKAUDIOBO, NULL);
1105
1106 /* change parent of FSI B */
1107 clk = clk_get(NULL, "fsib_clk");
1108 clk_register(&fsimckb_clk);
1109 clk_set_parent(clk, &fsimckb_clk);
1110 clk_set_rate(clk, 11000);
1111 clk_set_rate(&fsimckb_clk, 11000);
1112 clk_put(clk);
1113
1114 gpio_request(GPIO_PTU0, NULL);
1115 gpio_direction_output(GPIO_PTU0, 0);
1116 mdelay(20);
1117
713 /* enable I2C device */ 1118 /* enable I2C device */
1119 i2c_register_board_info(0, i2c0_devices,
1120 ARRAY_SIZE(i2c0_devices));
1121
714 i2c_register_board_info(1, i2c1_devices, 1122 i2c_register_board_info(1, i2c1_devices,
715 ARRAY_SIZE(i2c1_devices)); 1123 ARRAY_SIZE(i2c1_devices));
716 1124
@@ -721,12 +1129,11 @@ arch_initcall(arch_setup);
721 1129
722static int __init devices_setup(void) 1130static int __init devices_setup(void)
723{ 1131{
724 sh_eth_init(); 1132 sh_eth_init(&sh_eth_plat);
725 return 0; 1133 return 0;
726} 1134}
727device_initcall(devices_setup); 1135device_initcall(devices_setup);
728 1136
729
730static struct sh_machine_vector mv_ecovec __initmv = { 1137static struct sh_machine_vector mv_ecovec __initmv = {
731 .mv_name = "R0P7724 (EcoVec)", 1138 .mv_name = "R0P7724 (EcoVec)",
732}; 1139};
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c
index 566e69d8d729..f663c14d8885 100644
--- a/arch/sh/boards/mach-highlander/setup.c
+++ b/arch/sh/boards/mach-highlander/setup.c
@@ -384,7 +384,7 @@ static unsigned char irl2irq[HL_NR_IRL];
384 384
385static int highlander_irq_demux(int irq) 385static int highlander_irq_demux(int irq)
386{ 386{
387 if (irq >= HL_NR_IRL || !irl2irq[irq]) 387 if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq])
388 return irq; 388 return irq;
389 389
390 return irl2irq[irq]; 390 return irl2irq[irq];
diff --git a/arch/sh/boards/mach-kfr2r09/Makefile b/arch/sh/boards/mach-kfr2r09/Makefile
index 5d5867826e3b..4e577a3bf658 100644
--- a/arch/sh/boards/mach-kfr2r09/Makefile
+++ b/arch/sh/boards/mach-kfr2r09/Makefile
@@ -1,2 +1,2 @@
1obj-y := setup.o 1obj-y := setup.o sdram.o
2obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o 2obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
index 8ccb1cc8b589..e9b970846c41 100644
--- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
+++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
@@ -273,6 +273,12 @@ int kfr2r09_lcd_setup(void *board_data, void *sohandle,
273 return 0; 273 return 0;
274} 274}
275 275
276void kfr2r09_lcd_start(void *board_data, void *sohandle,
277 struct sh_mobile_lcdc_sys_bus_ops *so)
278{
279 write_memory_start(sohandle, so);
280}
281
276#define CTRL_CKSW 0x10 282#define CTRL_CKSW 0x10
277#define CTRL_C10 0x20 283#define CTRL_C10 0x20
278#define CTRL_CPSW 0x80 284#define CTRL_CPSW 0x80
diff --git a/arch/sh/boards/mach-kfr2r09/sdram.S b/arch/sh/boards/mach-kfr2r09/sdram.S
new file mode 100644
index 000000000000..0c9f55bec2fe
--- /dev/null
+++ b/arch/sh/boards/mach-kfr2r09/sdram.S
@@ -0,0 +1,80 @@
1/*
2 * KFR2R09 sdram self/auto-refresh setup code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18/* code to enter and leave self-refresh. must be self-contained.
19 * this code will be copied to on-chip memory and executed from there.
20 */
21 .balign 4
22ENTRY(kfr2r09_sdram_enter_start)
23
24 /* DBSC: put memory in self-refresh mode */
25
26 ED 0xFD000010, 0x00000000 /* DBEN */
27 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
28 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
29 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
30 ED 0xFD000040, 0x00000001 /* DBRFPDN0 */
31
32 rts
33 nop
34
35ENTRY(kfr2r09_sdram_enter_end)
36
37 .balign 4
38ENTRY(kfr2r09_sdram_leave_start)
39
40 /* DBSC: put memory in auto-refresh mode */
41
42 mov.l @(SH_SLEEP_MODE, r5), r0
43 tst #SUSP_SH_RSTANDBY, r0
44 bf resume_rstandby
45
46 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
47 WAIT 1
48 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
49 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
50 ED 0xFD000010, 0x00000001 /* DBEN */
51 ED 0xFD000040, 0x00010000 /* DBRFPDN0 */
52
53 rts
54 nop
55
56resume_rstandby:
57
58 /* DBSC: re-initialize and put in auto-refresh */
59
60 ED 0xFD000108, 0x40000301 /* DBPDCNT0 */
61 ED 0xFD000020, 0x011B0002 /* DBCONF */
62 ED 0xFD000030, 0x03060E02 /* DBTR0 */
63 ED 0xFD000034, 0x01020102 /* DBTR1 */
64 ED 0xFD000038, 0x01090406 /* DBTR2 */
65 ED 0xFD000008, 0x00000004 /* DBKIND */
66 ED 0xFD000040, 0x00000001 /* DBRFPDN0 */
67 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
68 ED 0xFD000018, 0x00000001 /* DBCKECNT */
69 WAIT 1
70 ED 0xFD000010, 0x00000001 /* DBEN */
71 ED 0xFD000044, 0x000004AF /* DBRFPDN1 */
72 ED 0xFD000048, 0x20CF0037 /* DBRFPDN2 */
73 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
74 ED 0xFD000108, 0x40000300 /* DBPDCNT0 */
75 ED 0xFD000040, 0x00010000 /* DBRFPDN0 */
76
77 rts
78 nop
79
80ENTRY(kfr2r09_sdram_leave_end)
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index c08d33fe2104..5d7b5d92475e 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -16,13 +16,17 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/input.h> 18#include <linux/input.h>
19#include <linux/input/sh_keysc.h>
19#include <linux/i2c.h> 20#include <linux/i2c.h>
20#include <linux/usb/r8a66597.h> 21#include <linux/usb/r8a66597.h>
22#include <media/rj54n1cb0c.h>
23#include <media/soc_camera.h>
24#include <media/sh_mobile_ceu.h>
21#include <video/sh_mobile_lcdc.h> 25#include <video/sh_mobile_lcdc.h>
26#include <asm/suspend.h>
22#include <asm/clock.h> 27#include <asm/clock.h>
23#include <asm/machvec.h> 28#include <asm/machvec.h>
24#include <asm/io.h> 29#include <asm/io.h>
25#include <asm/sh_keysc.h>
26#include <cpu/sh7724.h> 30#include <cpu/sh7724.h>
27#include <mach/kfr2r09.h> 31#include <mach/kfr2r09.h>
28 32
@@ -146,6 +150,7 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = {
146 }, 150 },
147 .board_cfg = { 151 .board_cfg = {
148 .setup_sys = kfr2r09_lcd_setup, 152 .setup_sys = kfr2r09_lcd_setup,
153 .start_transfer = kfr2r09_lcd_start,
149 .display_on = kfr2r09_lcd_on, 154 .display_on = kfr2r09_lcd_on,
150 .display_off = kfr2r09_lcd_off, 155 .display_off = kfr2r09_lcd_off,
151 }, 156 },
@@ -212,11 +217,162 @@ static struct platform_device kfr2r09_usb0_gadget_device = {
212 .resource = kfr2r09_usb0_gadget_resources, 217 .resource = kfr2r09_usb0_gadget_resources,
213}; 218};
214 219
220static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
221 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
222};
223
224static struct resource kfr2r09_ceu_resources[] = {
225 [0] = {
226 .name = "CEU",
227 .start = 0xfe910000,
228 .end = 0xfe91009f,
229 .flags = IORESOURCE_MEM,
230 },
231 [1] = {
232 .start = 52,
233 .end = 52,
234 .flags = IORESOURCE_IRQ,
235 },
236 [2] = {
237 /* place holder for contiguous memory */
238 },
239};
240
241static struct platform_device kfr2r09_ceu_device = {
242 .name = "sh_mobile_ceu",
243 .id = 0, /* "ceu0" clock */
244 .num_resources = ARRAY_SIZE(kfr2r09_ceu_resources),
245 .resource = kfr2r09_ceu_resources,
246 .dev = {
247 .platform_data = &sh_mobile_ceu_info,
248 },
249 .archdata = {
250 .hwblk_id = HWBLK_CEU0,
251 },
252};
253
254static struct i2c_board_info kfr2r09_i2c_camera = {
255 I2C_BOARD_INFO("rj54n1cb0c", 0x50),
256};
257
258static struct clk *camera_clk;
259
260/* set VIO_CKO clock to 25MHz */
261#define CEU_MCLK_FREQ 25000000
262
263#define DRVCRB 0xA405018C
264static int camera_power(struct device *dev, int mode)
265{
266 int ret;
267
268 if (mode) {
269 long rate;
270
271 camera_clk = clk_get(NULL, "video_clk");
272 if (IS_ERR(camera_clk))
273 return PTR_ERR(camera_clk);
274
275 rate = clk_round_rate(camera_clk, CEU_MCLK_FREQ);
276 ret = clk_set_rate(camera_clk, rate);
277 if (ret < 0)
278 goto eclkrate;
279
280 /* set DRVCRB
281 *
282 * use 1.8 V for VccQ_VIO
283 * use 2.85V for VccQ_SR
284 */
285 ctrl_outw((ctrl_inw(DRVCRB) & ~0x0003) | 0x0001, DRVCRB);
286
287 /* reset clear */
288 ret = gpio_request(GPIO_PTB4, NULL);
289 if (ret < 0)
290 goto eptb4;
291 ret = gpio_request(GPIO_PTB7, NULL);
292 if (ret < 0)
293 goto eptb7;
294
295 ret = gpio_direction_output(GPIO_PTB4, 1);
296 if (!ret)
297 ret = gpio_direction_output(GPIO_PTB7, 1);
298 if (ret < 0)
299 goto egpioout;
300 msleep(1);
301
302 ret = clk_enable(camera_clk); /* start VIO_CKO */
303 if (ret < 0)
304 goto eclkon;
305
306 return 0;
307 }
308
309 ret = 0;
310
311 clk_disable(camera_clk);
312eclkon:
313 gpio_set_value(GPIO_PTB7, 0);
314egpioout:
315 gpio_set_value(GPIO_PTB4, 0);
316 gpio_free(GPIO_PTB7);
317eptb7:
318 gpio_free(GPIO_PTB4);
319eptb4:
320eclkrate:
321 clk_put(camera_clk);
322 return ret;
323}
324
325static struct rj54n1_pdata rj54n1_priv = {
326 .mclk_freq = CEU_MCLK_FREQ,
327 .ioctl_high = false,
328};
329
330static struct soc_camera_link rj54n1_link = {
331 .power = camera_power,
332 .board_info = &kfr2r09_i2c_camera,
333 .i2c_adapter_id = 1,
334 .module_name = "rj54n1cb0c",
335 .priv = &rj54n1_priv,
336};
337
338static struct platform_device kfr2r09_camera = {
339 .name = "soc-camera-pdrv",
340 .id = 0,
341 .dev = {
342 .platform_data = &rj54n1_link,
343 },
344};
345
346static struct resource kfr2r09_sh_sdhi0_resources[] = {
347 [0] = {
348 .name = "SDHI0",
349 .start = 0x04ce0000,
350 .end = 0x04ce01ff,
351 .flags = IORESOURCE_MEM,
352 },
353 [1] = {
354 .start = 101,
355 .flags = IORESOURCE_IRQ,
356 },
357};
358
359static struct platform_device kfr2r09_sh_sdhi0_device = {
360 .name = "sh_mobile_sdhi",
361 .num_resources = ARRAY_SIZE(kfr2r09_sh_sdhi0_resources),
362 .resource = kfr2r09_sh_sdhi0_resources,
363 .archdata = {
364 .hwblk_id = HWBLK_SDHI0,
365 },
366};
367
215static struct platform_device *kfr2r09_devices[] __initdata = { 368static struct platform_device *kfr2r09_devices[] __initdata = {
216 &kfr2r09_nor_flash_device, 369 &kfr2r09_nor_flash_device,
217 &kfr2r09_nand_flash_device, 370 &kfr2r09_nand_flash_device,
218 &kfr2r09_sh_keysc_device, 371 &kfr2r09_sh_keysc_device,
219 &kfr2r09_sh_lcdc_device, 372 &kfr2r09_sh_lcdc_device,
373 &kfr2r09_ceu_device,
374 &kfr2r09_camera,
375 &kfr2r09_sh_sdhi0_device,
220}; 376};
221 377
222#define BSC_CS0BCR 0xfec10004 378#define BSC_CS0BCR 0xfec10004
@@ -268,11 +424,59 @@ static int kfr2r09_usb0_gadget_i2c_setup(void)
268 424
269 return 0; 425 return 0;
270} 426}
427
428static int kfr2r09_serial_i2c_setup(void)
429{
430 struct i2c_adapter *a;
431 struct i2c_msg msg;
432 unsigned char buf[2];
433 int ret;
434
435 a = i2c_get_adapter(0);
436 if (!a)
437 return -ENODEV;
438
439 /* set bit 6 (the 7th bit) of chip at 0x09, register 0x13 */
440 buf[0] = 0x13;
441 msg.addr = 0x09;
442 msg.buf = buf;
443 msg.len = 1;
444 msg.flags = 0;
445 ret = i2c_transfer(a, &msg, 1);
446 if (ret != 1)
447 return -ENODEV;
448
449 buf[0] = 0;
450 msg.addr = 0x09;
451 msg.buf = buf;
452 msg.len = 1;
453 msg.flags = I2C_M_RD;
454 ret = i2c_transfer(a, &msg, 1);
455 if (ret != 1)
456 return -ENODEV;
457
458 buf[1] = buf[0] | (1 << 6);
459 buf[0] = 0x13;
460 msg.addr = 0x09;
461 msg.buf = buf;
462 msg.len = 2;
463 msg.flags = 0;
464 ret = i2c_transfer(a, &msg, 1);
465 if (ret != 1)
466 return -ENODEV;
467
468 return 0;
469}
271#else 470#else
272static int kfr2r09_usb0_gadget_i2c_setup(void) 471static int kfr2r09_usb0_gadget_i2c_setup(void)
273{ 472{
274 return -ENODEV; 473 return -ENODEV;
275} 474}
475
476static int kfr2r09_serial_i2c_setup(void)
477{
478 return -ENODEV;
479}
276#endif 480#endif
277 481
278static int kfr2r09_usb0_gadget_setup(void) 482static int kfr2r09_usb0_gadget_setup(void)
@@ -299,11 +503,27 @@ static int kfr2r09_usb0_gadget_setup(void)
299 return 0; 503 return 0;
300} 504}
301 505
506extern char kfr2r09_sdram_enter_start;
507extern char kfr2r09_sdram_enter_end;
508extern char kfr2r09_sdram_leave_start;
509extern char kfr2r09_sdram_leave_end;
510
302static int __init kfr2r09_devices_setup(void) 511static int __init kfr2r09_devices_setup(void)
303{ 512{
513 /* register board specific self-refresh code */
514 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF |
515 SUSP_SH_RSTANDBY,
516 &kfr2r09_sdram_enter_start,
517 &kfr2r09_sdram_enter_end,
518 &kfr2r09_sdram_leave_start,
519 &kfr2r09_sdram_leave_end);
520
304 /* enable SCIF1 serial port for YC401 console support */ 521 /* enable SCIF1 serial port for YC401 console support */
305 gpio_request(GPIO_FN_SCIF1_RXD, NULL); 522 gpio_request(GPIO_FN_SCIF1_RXD, NULL);
306 gpio_request(GPIO_FN_SCIF1_TXD, NULL); 523 gpio_request(GPIO_FN_SCIF1_TXD, NULL);
524 kfr2r09_serial_i2c_setup(); /* ECONTMSK(bit6=L10ONEN) set 1 */
525 gpio_request(GPIO_PTG3, NULL); /* HPON_ON */
526 gpio_direction_output(GPIO_PTG3, 1); /* HPON_ON = H */
307 527
308 /* setup NOR flash at CS0 */ 528 /* setup NOR flash at CS0 */
309 ctrl_outl(0x36db0400, BSC_CS0BCR); 529 ctrl_outl(0x36db0400, BSC_CS0BCR);
@@ -361,6 +581,32 @@ static int __init kfr2r09_devices_setup(void)
361 if (kfr2r09_usb0_gadget_setup() == 0) 581 if (kfr2r09_usb0_gadget_setup() == 0)
362 platform_device_register(&kfr2r09_usb0_gadget_device); 582 platform_device_register(&kfr2r09_usb0_gadget_device);
363 583
584 /* CEU */
585 gpio_request(GPIO_FN_VIO_CKO, NULL);
586 gpio_request(GPIO_FN_VIO0_CLK, NULL);
587 gpio_request(GPIO_FN_VIO0_VD, NULL);
588 gpio_request(GPIO_FN_VIO0_HD, NULL);
589 gpio_request(GPIO_FN_VIO0_FLD, NULL);
590 gpio_request(GPIO_FN_VIO0_D7, NULL);
591 gpio_request(GPIO_FN_VIO0_D6, NULL);
592 gpio_request(GPIO_FN_VIO0_D5, NULL);
593 gpio_request(GPIO_FN_VIO0_D4, NULL);
594 gpio_request(GPIO_FN_VIO0_D3, NULL);
595 gpio_request(GPIO_FN_VIO0_D2, NULL);
596 gpio_request(GPIO_FN_VIO0_D1, NULL);
597 gpio_request(GPIO_FN_VIO0_D0, NULL);
598
599 platform_resource_setup_memory(&kfr2r09_ceu_device, "ceu", 4 << 20);
600
601 /* SDHI0 connected to yc304 */
602 gpio_request(GPIO_FN_SDHI0CD, NULL);
603 gpio_request(GPIO_FN_SDHI0D3, NULL);
604 gpio_request(GPIO_FN_SDHI0D2, NULL);
605 gpio_request(GPIO_FN_SDHI0D1, NULL);
606 gpio_request(GPIO_FN_SDHI0D0, NULL);
607 gpio_request(GPIO_FN_SDHI0CMD, NULL);
608 gpio_request(GPIO_FN_SDHI0CLK, NULL);
609
364 return platform_add_devices(kfr2r09_devices, 610 return platform_add_devices(kfr2r09_devices,
365 ARRAY_SIZE(kfr2r09_devices)); 611 ARRAY_SIZE(kfr2r09_devices));
366} 612}
diff --git a/arch/sh/boards/mach-migor/Makefile b/arch/sh/boards/mach-migor/Makefile
index 5f231dd25c0e..4601a89e5ac7 100644
--- a/arch/sh/boards/mach-migor/Makefile
+++ b/arch/sh/boards/mach-migor/Makefile
@@ -1,2 +1,2 @@
1obj-y := setup.o 1obj-y := setup.o sdram.o
2obj-$(CONFIG_SH_MIGOR_QVGA) += lcd_qvga.o 2obj-$(CONFIG_SH_MIGOR_QVGA) += lcd_qvga.o
diff --git a/arch/sh/boards/mach-migor/sdram.S b/arch/sh/boards/mach-migor/sdram.S
new file mode 100644
index 000000000000..614aa3a1398c
--- /dev/null
+++ b/arch/sh/boards/mach-migor/sdram.S
@@ -0,0 +1,69 @@
1/*
2 * Migo-R sdram self/auto-refresh setup code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18/* code to enter and leave self-refresh. must be self-contained.
19 * this code will be copied to on-chip memory and executed from there.
20 */
21 .balign 4
22ENTRY(migor_sdram_enter_start)
23
24 /* SBSC: disable power down and put in self-refresh mode */
25 mov.l 1f, r4
26 mov.l 2f, r1
27 mov.l @r4, r2
28 or r1, r2
29 mov.l 3f, r3
30 and r3, r2
31 mov.l r2, @r4
32
33 rts
34 nop
35
36 .balign 4
371: .long 0xfe400008 /* SDCR0 */
382: .long 0x00000400
393: .long 0xffff7fff
40ENTRY(migor_sdram_enter_end)
41
42 .balign 4
43ENTRY(migor_sdram_leave_start)
44
45 /* SBSC: set auto-refresh mode */
46 mov.l 1f, r4
47 mov.l @r4, r0
48 mov.l 4f, r1
49 and r1, r0
50 mov.l r0, @r4
51 mov.l 6f, r4
52 mov.l 8f, r0
53 mov.l @r4, r1
54 mov #-1, r4
55 add r4, r1
56 or r1, r0
57 mov.l 7f, r1
58 mov.l r0, @r1
59
60 rts
61 nop
62
63 .balign 4
641: .long 0xfe400008 /* SDCR0 */
654: .long 0xfffffbff
666: .long 0xfe40001c /* RTCOR */
677: .long 0xfe400018 /* RTCNT */
688: .long 0xa55a0000
69ENTRY(migor_sdram_leave_end)
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 6ed1fd32369e..507c77be476d 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -11,6 +11,7 @@
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/input.h> 13#include <linux/input.h>
14#include <linux/input/sh_keysc.h>
14#include <linux/mtd/physmap.h> 15#include <linux/mtd/physmap.h>
15#include <linux/mtd/nand.h> 16#include <linux/mtd/nand.h>
16#include <linux/i2c.h> 17#include <linux/i2c.h>
@@ -18,8 +19,6 @@
18#include <linux/delay.h> 19#include <linux/delay.h>
19#include <linux/clk.h> 20#include <linux/clk.h>
20#include <linux/gpio.h> 21#include <linux/gpio.h>
21#include <linux/spi/spi.h>
22#include <linux/spi/spi_gpio.h>
23#include <video/sh_mobile_lcdc.h> 22#include <video/sh_mobile_lcdc.h>
24#include <media/sh_mobile_ceu.h> 23#include <media/sh_mobile_ceu.h>
25#include <media/ov772x.h> 24#include <media/ov772x.h>
@@ -27,7 +26,7 @@
27#include <asm/clock.h> 26#include <asm/clock.h>
28#include <asm/machvec.h> 27#include <asm/machvec.h>
29#include <asm/io.h> 28#include <asm/io.h>
30#include <asm/sh_keysc.h> 29#include <asm/suspend.h>
31#include <mach/migor.h> 30#include <mach/migor.h>
32#include <cpu/sh7722.h> 31#include <cpu/sh7722.h>
33 32
@@ -390,17 +389,25 @@ static struct platform_device migor_ceu_device = {
390 }, 389 },
391}; 390};
392 391
393struct spi_gpio_platform_data sdcard_cn9_platform_data = { 392static struct resource sdhi_cn9_resources[] = {
394 .sck = GPIO_PTD0, 393 [0] = {
395 .mosi = GPIO_PTD1, 394 .name = "SDHI",
396 .miso = GPIO_PTD2, 395 .start = 0x04ce0000,
397 .num_chipselect = 1, 396 .end = 0x04ce01ff,
397 .flags = IORESOURCE_MEM,
398 },
399 [1] = {
400 .start = 101,
401 .flags = IORESOURCE_IRQ,
402 },
398}; 403};
399 404
400static struct platform_device sdcard_cn9_device = { 405static struct platform_device sdhi_cn9_device = {
401 .name = "spi_gpio", 406 .name = "sh_mobile_sdhi",
402 .dev = { 407 .num_resources = ARRAY_SIZE(sdhi_cn9_resources),
403 .platform_data = &sdcard_cn9_platform_data, 408 .resource = sdhi_cn9_resources,
409 .archdata = {
410 .hwblk_id = HWBLK_SDHI,
404 }, 411 },
405}; 412};
406 413
@@ -425,23 +432,27 @@ static struct i2c_board_info migor_i2c_camera[] = {
425 432
426static struct ov772x_camera_info ov7725_info = { 433static struct ov772x_camera_info ov7725_info = {
427 .buswidth = SOCAM_DATAWIDTH_8, 434 .buswidth = SOCAM_DATAWIDTH_8,
428 .link = { 435};
429 .power = ov7725_power, 436
430 .board_info = &migor_i2c_camera[0], 437static struct soc_camera_link ov7725_link = {
431 .i2c_adapter_id = 0, 438 .power = ov7725_power,
432 .module_name = "ov772x", 439 .board_info = &migor_i2c_camera[0],
433 }, 440 .i2c_adapter_id = 0,
441 .module_name = "ov772x",
442 .priv = &ov7725_info,
434}; 443};
435 444
436static struct tw9910_video_info tw9910_info = { 445static struct tw9910_video_info tw9910_info = {
437 .buswidth = SOCAM_DATAWIDTH_8, 446 .buswidth = SOCAM_DATAWIDTH_8,
438 .mpout = TW9910_MPO_FIELD, 447 .mpout = TW9910_MPO_FIELD,
439 .link = { 448};
440 .power = tw9910_power, 449
441 .board_info = &migor_i2c_camera[1], 450static struct soc_camera_link tw9910_link = {
442 .i2c_adapter_id = 0, 451 .power = tw9910_power,
443 .module_name = "tw9910", 452 .board_info = &migor_i2c_camera[1],
444 } 453 .i2c_adapter_id = 0,
454 .module_name = "tw9910",
455 .priv = &tw9910_info,
445}; 456};
446 457
447static struct platform_device migor_camera[] = { 458static struct platform_device migor_camera[] = {
@@ -449,13 +460,13 @@ static struct platform_device migor_camera[] = {
449 .name = "soc-camera-pdrv", 460 .name = "soc-camera-pdrv",
450 .id = 0, 461 .id = 0,
451 .dev = { 462 .dev = {
452 .platform_data = &ov7725_info.link, 463 .platform_data = &ov7725_link,
453 }, 464 },
454 }, { 465 }, {
455 .name = "soc-camera-pdrv", 466 .name = "soc-camera-pdrv",
456 .id = 1, 467 .id = 1,
457 .dev = { 468 .dev = {
458 .platform_data = &tw9910_info.link, 469 .platform_data = &tw9910_link,
459 }, 470 },
460 }, 471 },
461}; 472};
@@ -467,23 +478,24 @@ static struct platform_device *migor_devices[] __initdata = {
467 &migor_ceu_device, 478 &migor_ceu_device,
468 &migor_nor_flash_device, 479 &migor_nor_flash_device,
469 &migor_nand_flash_device, 480 &migor_nand_flash_device,
470 &sdcard_cn9_device, 481 &sdhi_cn9_device,
471 &migor_camera[0], 482 &migor_camera[0],
472 &migor_camera[1], 483 &migor_camera[1],
473}; 484};
474 485
475static struct spi_board_info migor_spi_devices[] = { 486extern char migor_sdram_enter_start;
476 { 487extern char migor_sdram_enter_end;
477 .modalias = "mmc_spi", 488extern char migor_sdram_leave_start;
478 .max_speed_hz = 5000000, 489extern char migor_sdram_leave_end;
479 .chip_select = 0,
480 .controller_data = (void *) GPIO_PTD5,
481 },
482};
483 490
484static int __init migor_devices_setup(void) 491static int __init migor_devices_setup(void)
485{ 492{
486 493 /* register board specific self-refresh code */
494 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
495 &migor_sdram_enter_start,
496 &migor_sdram_enter_end,
497 &migor_sdram_leave_start,
498 &migor_sdram_leave_end);
487#ifdef CONFIG_PM 499#ifdef CONFIG_PM
488 /* Let D11 LED show STATUS0 */ 500 /* Let D11 LED show STATUS0 */
489 gpio_request(GPIO_FN_STATUS0, NULL); 501 gpio_request(GPIO_FN_STATUS0, NULL);
@@ -525,6 +537,16 @@ static int __init migor_devices_setup(void)
525 gpio_request(GPIO_PTA1, NULL); 537 gpio_request(GPIO_PTA1, NULL);
526 gpio_direction_input(GPIO_PTA1); 538 gpio_direction_input(GPIO_PTA1);
527 539
540 /* SDHI */
541 gpio_request(GPIO_FN_SDHICD, NULL);
542 gpio_request(GPIO_FN_SDHIWP, NULL);
543 gpio_request(GPIO_FN_SDHID3, NULL);
544 gpio_request(GPIO_FN_SDHID2, NULL);
545 gpio_request(GPIO_FN_SDHID1, NULL);
546 gpio_request(GPIO_FN_SDHID0, NULL);
547 gpio_request(GPIO_FN_SDHICMD, NULL);
548 gpio_request(GPIO_FN_SDHICLK, NULL);
549
528 /* Touch Panel */ 550 /* Touch Panel */
529 gpio_request(GPIO_FN_IRQ6, NULL); 551 gpio_request(GPIO_FN_IRQ6, NULL);
530 552
@@ -612,9 +634,6 @@ static int __init migor_devices_setup(void)
612 i2c_register_board_info(0, migor_i2c_devices, 634 i2c_register_board_info(0, migor_i2c_devices,
613 ARRAY_SIZE(migor_i2c_devices)); 635 ARRAY_SIZE(migor_i2c_devices));
614 636
615 spi_register_board_info(migor_spi_devices,
616 ARRAY_SIZE(migor_spi_devices));
617
618 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); 637 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
619} 638}
620arch_initcall(migor_devices_setup); 639arch_initcall(migor_devices_setup);
diff --git a/arch/sh/boards/mach-r2d/irq.c b/arch/sh/boards/mach-r2d/irq.c
index c70fecedcac4..78d7b27c80da 100644
--- a/arch/sh/boards/mach-r2d/irq.c
+++ b/arch/sh/boards/mach-r2d/irq.c
@@ -116,7 +116,7 @@ static unsigned char irl2irq[R2D_NR_IRL];
116 116
117int rts7751r2d_irq_demux(int irq) 117int rts7751r2d_irq_demux(int irq)
118{ 118{
119 if (irq >= R2D_NR_IRL || !irl2irq[irq]) 119 if (irq >= R2D_NR_IRL || irq < 0 || !irl2irq[irq])
120 return irq; 120 return irq;
121 121
122 return irl2irq[irq]; 122 return irl2irq[irq];
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c
index 02d21a3e2a8f..b221b6842b0d 100644
--- a/arch/sh/boards/mach-se/7722/irq.c
+++ b/arch/sh/boards/mach-se/7722/irq.c
@@ -16,15 +16,17 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <mach-se/mach/se7722.h> 17#include <mach-se/mach/se7722.h>
18 18
19unsigned int se7722_fpga_irq[SE7722_FPGA_IRQ_NR] = { 0, };
20
19static void disable_se7722_irq(unsigned int irq) 21static void disable_se7722_irq(unsigned int irq)
20{ 22{
21 unsigned int bit = irq - SE7722_FPGA_IRQ_BASE; 23 unsigned int bit = (unsigned int)get_irq_chip_data(irq);
22 ctrl_outw(ctrl_inw(IRQ01_MASK) | 1 << bit, IRQ01_MASK); 24 ctrl_outw(ctrl_inw(IRQ01_MASK) | 1 << bit, IRQ01_MASK);
23} 25}
24 26
25static void enable_se7722_irq(unsigned int irq) 27static void enable_se7722_irq(unsigned int irq)
26{ 28{
27 unsigned int bit = irq - SE7722_FPGA_IRQ_BASE; 29 unsigned int bit = (unsigned int)get_irq_chip_data(irq);
28 ctrl_outw(ctrl_inw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK); 30 ctrl_outw(ctrl_inw(IRQ01_MASK) & ~(1 << bit), IRQ01_MASK);
29} 31}
30 32
@@ -38,18 +40,15 @@ static struct irq_chip se7722_irq_chip __read_mostly = {
38static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) 40static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
39{ 41{
40 unsigned short intv = ctrl_inw(IRQ01_STS); 42 unsigned short intv = ctrl_inw(IRQ01_STS);
41 struct irq_desc *ext_desc; 43 unsigned int ext_irq = 0;
42 unsigned int ext_irq = SE7722_FPGA_IRQ_BASE;
43 44
44 intv &= (1 << SE7722_FPGA_IRQ_NR) - 1; 45 intv &= (1 << SE7722_FPGA_IRQ_NR) - 1;
45 46
46 while (intv) { 47 for (; intv; intv >>= 1, ext_irq++) {
47 if (intv & 1) { 48 if (!(intv & 1))
48 ext_desc = irq_desc + ext_irq; 49 continue;
49 handle_level_irq(ext_irq, ext_desc); 50
50 } 51 generic_handle_irq(se7722_fpga_irq[ext_irq]);
51 intv >>= 1;
52 ext_irq++;
53 } 52 }
54} 53}
55 54
@@ -58,16 +57,24 @@ static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
58 */ 57 */
59void __init init_se7722_IRQ(void) 58void __init init_se7722_IRQ(void)
60{ 59{
61 int i; 60 int i, irq;
62 61
63 ctrl_outw(0, IRQ01_MASK); /* disable all irqs */ 62 ctrl_outw(0, IRQ01_MASK); /* disable all irqs */
64 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ 63 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */
65 64
66 for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) 65 for (i = 0; i < SE7722_FPGA_IRQ_NR; i++) {
67 set_irq_chip_and_handler_name(SE7722_FPGA_IRQ_BASE + i, 66 irq = create_irq();
67 if (irq < 0)
68 return;
69 se7722_fpga_irq[i] = irq;
70
71 set_irq_chip_and_handler_name(se7722_fpga_irq[i],
68 &se7722_irq_chip, 72 &se7722_irq_chip,
69 handle_level_irq, "level"); 73 handle_level_irq, "level");
70 74
75 set_irq_chip_data(se7722_fpga_irq[i], (void *)i);
76 }
77
71 set_irq_chained_handler(IRQ0_IRQ, se7722_irq_demux); 78 set_irq_chained_handler(IRQ0_IRQ, se7722_irq_demux);
72 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW); 79 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
73 80
diff --git a/arch/sh/boards/mach-se/7722/setup.c b/arch/sh/boards/mach-se/7722/setup.c
index 36374078e521..b1cb9425b600 100644
--- a/arch/sh/boards/mach-se/7722/setup.c
+++ b/arch/sh/boards/mach-se/7722/setup.c
@@ -14,6 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/ata_platform.h> 15#include <linux/ata_platform.h>
16#include <linux/input.h> 16#include <linux/input.h>
17#include <linux/input/sh_keysc.h>
17#include <linux/smc91x.h> 18#include <linux/smc91x.h>
18#include <mach-se/mach/se7722.h> 19#include <mach-se/mach/se7722.h>
19#include <mach-se/mach/mrshpc.h> 20#include <mach-se/mach/mrshpc.h>
@@ -21,7 +22,6 @@
21#include <asm/clock.h> 22#include <asm/clock.h>
22#include <asm/io.h> 23#include <asm/io.h>
23#include <asm/heartbeat.h> 24#include <asm/heartbeat.h>
24#include <asm/sh_keysc.h>
25#include <cpu/sh7722.h> 25#include <cpu/sh7722.h>
26 26
27/* Heartbeat */ 27/* Heartbeat */
@@ -60,8 +60,7 @@ static struct resource smc91x_eth_resources[] = {
60 .flags = IORESOURCE_MEM, 60 .flags = IORESOURCE_MEM,
61 }, 61 },
62 [1] = { 62 [1] = {
63 .start = SMC_IRQ, 63 /* Filled in later */
64 .end = SMC_IRQ,
65 .flags = IORESOURCE_IRQ, 64 .flags = IORESOURCE_IRQ,
66 }, 65 },
67}; 66};
@@ -90,8 +89,7 @@ static struct resource cf_ide_resources[] = {
90 .flags = IORESOURCE_IO, 89 .flags = IORESOURCE_IO,
91 }, 90 },
92 [2] = { 91 [2] = {
93 .start = MRSHPC_IRQ0, 92 /* Filled in later */
94 .end = MRSHPC_IRQ0,
95 .flags = IORESOURCE_IRQ, 93 .flags = IORESOURCE_IRQ,
96 }, 94 },
97}; 95};
@@ -153,6 +151,14 @@ static struct platform_device *se7722_devices[] __initdata = {
153static int __init se7722_devices_setup(void) 151static int __init se7722_devices_setup(void)
154{ 152{
155 mrshpc_setup_windows(); 153 mrshpc_setup_windows();
154
155 /* Wire-up dynamic vectors */
156 cf_ide_resources[2].start = cf_ide_resources[2].end =
157 se7722_fpga_irq[SE7722_FPGA_IRQ_MRSHPC0];
158
159 smc91x_eth_resources[1].start = smc91x_eth_resources[1].end =
160 se7722_fpga_irq[SE7722_FPGA_IRQ_SMC];
161
156 return platform_add_devices(se7722_devices, ARRAY_SIZE(se7722_devices)); 162 return platform_add_devices(se7722_devices, ARRAY_SIZE(se7722_devices));
157} 163}
158device_initcall(se7722_devices_setup); 164device_initcall(se7722_devices_setup);
@@ -193,6 +199,5 @@ static void __init se7722_setup(char **cmdline_p)
193static struct sh_machine_vector mv_se7722 __initmv = { 199static struct sh_machine_vector mv_se7722 __initmv = {
194 .mv_name = "Solution Engine 7722" , 200 .mv_name = "Solution Engine 7722" ,
195 .mv_setup = se7722_setup , 201 .mv_setup = se7722_setup ,
196 .mv_nr_irqs = SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_NR,
197 .mv_init_irq = init_se7722_IRQ, 202 .mv_init_irq = init_se7722_IRQ,
198}; 203};
diff --git a/arch/sh/boards/mach-se/7724/Makefile b/arch/sh/boards/mach-se/7724/Makefile
index 349cbd6ce82d..a08b36830f0e 100644
--- a/arch/sh/boards/mach-se/7724/Makefile
+++ b/arch/sh/boards/mach-se/7724/Makefile
@@ -7,4 +7,4 @@
7# 7#
8# 8#
9 9
10obj-y := setup.o irq.o \ No newline at end of file 10obj-y := setup.o irq.o sdram.o
diff --git a/arch/sh/boards/mach-se/7724/sdram.S b/arch/sh/boards/mach-se/7724/sdram.S
new file mode 100644
index 000000000000..9040167d5022
--- /dev/null
+++ b/arch/sh/boards/mach-se/7724/sdram.S
@@ -0,0 +1,52 @@
1/*
2 * MS7724SE sdram self/auto-refresh setup code
3 *
4 * Copyright (C) 2009 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/sys.h>
12#include <linux/errno.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/suspend.h>
16#include <asm/romimage-macros.h>
17
18/* code to enter and leave self-refresh. must be self-contained.
19 * this code will be copied to on-chip memory and executed from there.
20 */
21 .balign 4
22ENTRY(ms7724se_sdram_enter_start)
23
24 /* DBSC: put memory in self-refresh mode */
25
26 ED 0xFD000010, 0x00000000 /* DBEN */
27 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
28 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
29 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
30 ED 0xFD000040, 0x00000001 /* DBRFPDN0 */
31
32 rts
33 nop
34
35ENTRY(ms7724se_sdram_enter_end)
36
37 .balign 4
38ENTRY(ms7724se_sdram_leave_start)
39
40 /* DBSC: put memory in auto-refresh mode */
41
42 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
43 WAIT 1
44 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
45 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
46 ED 0xFD000010, 0x00000001 /* DBEN */
47 ED 0xFD000040, 0x00010000 /* DBRFPDN0 */
48
49 rts
50 nop
51
52ENTRY(ms7724se_sdram_leave_end)
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index 0894bba9fade..5d0f70b46c97 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -19,6 +19,7 @@
19#include <linux/smc91x.h> 19#include <linux/smc91x.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/input/sh_keysc.h>
22#include <linux/usb/r8a66597.h> 23#include <linux/usb/r8a66597.h>
23#include <video/sh_mobile_lcdc.h> 24#include <video/sh_mobile_lcdc.h>
24#include <media/sh_mobile_ceu.h> 25#include <media/sh_mobile_ceu.h>
@@ -27,7 +28,7 @@
27#include <asm/heartbeat.h> 28#include <asm/heartbeat.h>
28#include <asm/sh_eth.h> 29#include <asm/sh_eth.h>
29#include <asm/clock.h> 30#include <asm/clock.h>
30#include <asm/sh_keysc.h> 31#include <asm/suspend.h>
31#include <cpu/sh7724.h> 32#include <cpu/sh7724.h>
32#include <mach-se/mach/se7724.h> 33#include <mach-se/mach/se7724.h>
33 34
@@ -451,6 +452,52 @@ static struct platform_device sh7724_usb1_gadget_device = {
451 .resource = sh7724_usb1_gadget_resources, 452 .resource = sh7724_usb1_gadget_resources,
452}; 453};
453 454
455static struct resource sdhi0_cn7_resources[] = {
456 [0] = {
457 .name = "SDHI0",
458 .start = 0x04ce0000,
459 .end = 0x04ce01ff,
460 .flags = IORESOURCE_MEM,
461 },
462 [1] = {
463 .start = 101,
464 .flags = IORESOURCE_IRQ,
465 },
466};
467
468static struct platform_device sdhi0_cn7_device = {
469 .name = "sh_mobile_sdhi",
470 .id = 0,
471 .num_resources = ARRAY_SIZE(sdhi0_cn7_resources),
472 .resource = sdhi0_cn7_resources,
473 .archdata = {
474 .hwblk_id = HWBLK_SDHI0,
475 },
476};
477
478static struct resource sdhi1_cn8_resources[] = {
479 [0] = {
480 .name = "SDHI1",
481 .start = 0x04cf0000,
482 .end = 0x04cf01ff,
483 .flags = IORESOURCE_MEM,
484 },
485 [1] = {
486 .start = 24,
487 .flags = IORESOURCE_IRQ,
488 },
489};
490
491static struct platform_device sdhi1_cn8_device = {
492 .name = "sh_mobile_sdhi",
493 .id = 1,
494 .num_resources = ARRAY_SIZE(sdhi1_cn8_resources),
495 .resource = sdhi1_cn8_resources,
496 .archdata = {
497 .hwblk_id = HWBLK_SDHI1,
498 },
499};
500
454static struct platform_device *ms7724se_devices[] __initdata = { 501static struct platform_device *ms7724se_devices[] __initdata = {
455 &heartbeat_device, 502 &heartbeat_device,
456 &smc91x_eth_device, 503 &smc91x_eth_device,
@@ -463,6 +510,15 @@ static struct platform_device *ms7724se_devices[] __initdata = {
463 &sh7724_usb0_host_device, 510 &sh7724_usb0_host_device,
464 &sh7724_usb1_gadget_device, 511 &sh7724_usb1_gadget_device,
465 &fsi_device, 512 &fsi_device,
513 &sdhi0_cn7_device,
514 &sdhi1_cn8_device,
515};
516
517/* I2C device */
518static struct i2c_board_info i2c0_devices[] = {
519 {
520 I2C_BOARD_INFO("ak4642", 0x12),
521 },
466}; 522};
467 523
468#define EEPROM_OP 0xBA206000 524#define EEPROM_OP 0xBA206000
@@ -487,7 +543,7 @@ static int __init sh_eth_is_eeprom_ready(void)
487static void __init sh_eth_init(void) 543static void __init sh_eth_init(void)
488{ 544{
489 int i; 545 int i;
490 u16 mac[3]; 546 u16 mac;
491 547
492 /* check EEPROM status */ 548 /* check EEPROM status */
493 if (!sh_eth_is_eeprom_ready()) 549 if (!sh_eth_is_eeprom_ready())
@@ -501,16 +557,10 @@ static void __init sh_eth_init(void)
501 if (!sh_eth_is_eeprom_ready()) 557 if (!sh_eth_is_eeprom_ready())
502 return; 558 return;
503 559
504 mac[i] = ctrl_inw(EEPROM_DATA); 560 mac = ctrl_inw(EEPROM_DATA);
505 mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */ 561 sh_eth_plat.mac_addr[i << 1] = mac & 0xff;
562 sh_eth_plat.mac_addr[(i << 1) + 1] = mac >> 8;
506 } 563 }
507
508 /* reset sh-eth */
509 ctrl_outl(0x1, SH_ETH_ADDR + 0x0);
510
511 /* set MAC addr */
512 ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR);
513 ctrl_outl((mac[2]), SH_ETH_MALR);
514} 564}
515 565
516#define SW4140 0xBA201000 566#define SW4140 0xBA201000
@@ -527,11 +577,32 @@ static void __init sh_eth_init(void)
527#define SW41_G 0x4000 577#define SW41_G 0x4000
528#define SW41_H 0x8000 578#define SW41_H 0x8000
529 579
580extern char ms7724se_sdram_enter_start;
581extern char ms7724se_sdram_enter_end;
582extern char ms7724se_sdram_leave_start;
583extern char ms7724se_sdram_leave_end;
584
585
586static int __init arch_setup(void)
587{
588 /* enable I2C device */
589 i2c_register_board_info(0, i2c0_devices,
590 ARRAY_SIZE(i2c0_devices));
591 return 0;
592}
593arch_initcall(arch_setup);
594
530static int __init devices_setup(void) 595static int __init devices_setup(void)
531{ 596{
532 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ 597 u16 sw = ctrl_inw(SW4140); /* select camera, monitor */
533 struct clk *fsia_clk; 598 struct clk *fsia_clk;
534 599
600 /* register board specific self-refresh code */
601 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF,
602 &ms7724se_sdram_enter_start,
603 &ms7724se_sdram_enter_end,
604 &ms7724se_sdram_leave_start,
605 &ms7724se_sdram_leave_end);
535 /* Reset Release */ 606 /* Reset Release */
536 ctrl_outw(ctrl_inw(FPGA_OUT) & 607 ctrl_outw(ctrl_inw(FPGA_OUT) &
537 ~((1 << 1) | /* LAN */ 608 ~((1 << 1) | /* LAN */
@@ -701,6 +772,26 @@ static int __init devices_setup(void)
701 clk_set_rate(&fsimcka_clk, 11000); 772 clk_set_rate(&fsimcka_clk, 11000);
702 clk_put(fsia_clk); 773 clk_put(fsia_clk);
703 774
775 /* SDHI0 connected to cn7 */
776 gpio_request(GPIO_FN_SDHI0CD, NULL);
777 gpio_request(GPIO_FN_SDHI0WP, NULL);
778 gpio_request(GPIO_FN_SDHI0D3, NULL);
779 gpio_request(GPIO_FN_SDHI0D2, NULL);
780 gpio_request(GPIO_FN_SDHI0D1, NULL);
781 gpio_request(GPIO_FN_SDHI0D0, NULL);
782 gpio_request(GPIO_FN_SDHI0CMD, NULL);
783 gpio_request(GPIO_FN_SDHI0CLK, NULL);
784
785 /* SDHI1 connected to cn8 */
786 gpio_request(GPIO_FN_SDHI1CD, NULL);
787 gpio_request(GPIO_FN_SDHI1WP, NULL);
788 gpio_request(GPIO_FN_SDHI1D3, NULL);
789 gpio_request(GPIO_FN_SDHI1D2, NULL);
790 gpio_request(GPIO_FN_SDHI1D1, NULL);
791 gpio_request(GPIO_FN_SDHI1D0, NULL);
792 gpio_request(GPIO_FN_SDHI1CMD, NULL);
793 gpio_request(GPIO_FN_SDHI1CLK, NULL);
794
704 /* 795 /*
705 * enable SH-Eth 796 * enable SH-Eth
706 * 797 *
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
index fd56a71ca9d9..b51b1fc4baae 100644
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -131,7 +131,7 @@ void decompress_kernel(void)
131#ifdef CONFIG_SUPERH64 131#ifdef CONFIG_SUPERH64
132 output_addr = (CONFIG_MEMORY_START + 0x2000); 132 output_addr = (CONFIG_MEMORY_START + 0x2000);
133#else 133#else
134 output_addr = PHYSADDR((unsigned long)&_text+PAGE_SIZE); 134 output_addr = __pa((unsigned long)&_text+PAGE_SIZE);
135#ifdef CONFIG_29BIT 135#ifdef CONFIG_29BIT
136 output_addr |= P2SEG; 136 output_addr |= P2SEG;
137#endif 137#endif
diff --git a/arch/sh/boot/romimage/Makefile b/arch/sh/boot/romimage/Makefile
index 5806eee84f6f..f473a24a2d92 100644
--- a/arch/sh/boot/romimage/Makefile
+++ b/arch/sh/boot/romimage/Makefile
@@ -4,16 +4,22 @@
4# create an image suitable for burning to flash from zImage 4# create an image suitable for burning to flash from zImage
5# 5#
6 6
7targets := vmlinux head.o 7targets := vmlinux head.o zeropage.bin piggy.o
8 8
9OBJECTS = $(obj)/head.o 9OBJECTS = $(obj)/head.o
10LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart 10LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart \
11 -T $(obj)/../../kernel/vmlinux.lds
11 12
12$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE 13$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
13 $(call if_changed,ld) 14 $(call if_changed,ld)
14 @: 15 @:
15 16
17OBJCOPYFLAGS += -j .empty_zero_page
18
19$(obj)/zeropage.bin: vmlinux FORCE
20 $(call if_changed,objcopy)
21
16LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T 22LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
17 23
18$(obj)/piggy.o: $(obj)/vmlinux.scr arch/sh/boot/zImage FORCE 24$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE
19 $(call if_changed,ld) 25 $(call if_changed,ld)
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
index 219bc626dd71..93e779a405ec 100644
--- a/arch/sh/boot/romimage/head.S
+++ b/arch/sh/boot/romimage/head.S
@@ -5,6 +5,44 @@
5 */ 5 */
6 6
7.text 7.text
8 #include <asm/page.h>
9
8 .global romstart 10 .global romstart
9romstart: 11romstart:
12 /* include board specific setup code */
10#include <mach/romimage.h> 13#include <mach/romimage.h>
14
15 /* copy the empty_zero_page contents to where vmlinux expects it */
16 mova empty_zero_page_src, r0
17 mov.l empty_zero_page_dst, r1
18 mov #(PAGE_SHIFT - 4), r4
19 mov #1, r3
20 shld r4, r3 /* r3 = PAGE_SIZE / 16 */
21
221:
23 mov.l @r0, r4
24 mov.l @(4, r0), r5
25 mov.l @(8, r0), r6
26 mov.l @(12, r0), r7
27 add #16,r0
28 mov.l r4, @r1
29 mov.l r5, @(4, r1)
30 mov.l r6, @(8, r1)
31 mov.l r7, @(12, r1)
32 dt r3
33 add #16,r1
34 bf 1b
35
36 /* jump to the zImage entry point located after the zero page data */
37 mov #PAGE_SHIFT, r4
38 mov #1, r1
39 shld r4, r1
40 mova empty_zero_page_src, r0
41 add r1, r0
42 jmp @r0
43 nop
44
45 .align 2
46empty_zero_page_dst:
47 .long _text
48empty_zero_page_src:
diff --git a/arch/sh/configs/ecovec24-romimage_defconfig b/arch/sh/configs/ecovec24-romimage_defconfig
index 0774924623cc..46874704e4e7 100644
--- a/arch/sh/configs/ecovec24-romimage_defconfig
+++ b/arch/sh/configs/ecovec24-romimage_defconfig
@@ -203,7 +203,7 @@ CONFIG_MMU=y
203CONFIG_PAGE_OFFSET=0x80000000 203CONFIG_PAGE_OFFSET=0x80000000
204CONFIG_FORCE_MAX_ZONEORDER=11 204CONFIG_FORCE_MAX_ZONEORDER=11
205CONFIG_MEMORY_START=0x08000000 205CONFIG_MEMORY_START=0x08000000
206CONFIG_MEMORY_SIZE=0x08000000 206CONFIG_MEMORY_SIZE=0x10000000
207CONFIG_29BIT=y 207CONFIG_29BIT=y
208# CONFIG_X2TLB is not set 208# CONFIG_X2TLB is not set
209CONFIG_VSYSCALL=y 209CONFIG_VSYSCALL=y
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
index ac6469718a2c..cad918437ca7 100644
--- a/arch/sh/configs/ecovec24_defconfig
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -204,7 +204,7 @@ CONFIG_MMU=y
204CONFIG_PAGE_OFFSET=0x80000000 204CONFIG_PAGE_OFFSET=0x80000000
205CONFIG_FORCE_MAX_ZONEORDER=11 205CONFIG_FORCE_MAX_ZONEORDER=11
206CONFIG_MEMORY_START=0x08000000 206CONFIG_MEMORY_START=0x08000000
207CONFIG_MEMORY_SIZE=0x08000000 207CONFIG_MEMORY_SIZE=0x10000000
208CONFIG_29BIT=y 208CONFIG_29BIT=y
209# CONFIG_X2TLB is not set 209# CONFIG_X2TLB is not set
210CONFIG_VSYSCALL=y 210CONFIG_VSYSCALL=y
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig
index f521e82cc19e..6f1126b3e487 100644
--- a/arch/sh/configs/rts7751r2d1_defconfig
+++ b/arch/sh/configs/rts7751r2d1_defconfig
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
324# CONFIG_UBC_WAKEUP is not set 324# CONFIG_UBC_WAKEUP is not set
325CONFIG_CMDLINE_OVERWRITE=y 325CONFIG_CMDLINE_OVERWRITE=y
326# CONFIG_CMDLINE_EXTEND is not set 326# CONFIG_CMDLINE_EXTEND is not set
327CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
328 328
329# 329#
330# Bus options 330# Bus options
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig
index a156cd1e0617..9215bbb13d6f 100644
--- a/arch/sh/configs/rts7751r2dplus_defconfig
+++ b/arch/sh/configs/rts7751r2dplus_defconfig
@@ -324,7 +324,7 @@ CONFIG_ENTRY_OFFSET=0x00001000
324# CONFIG_UBC_WAKEUP is not set 324# CONFIG_UBC_WAKEUP is not set
325CONFIG_CMDLINE_OVERWRITE=y 325CONFIG_CMDLINE_OVERWRITE=y
326# CONFIG_CMDLINE_EXTEND is not set 326# CONFIG_CMDLINE_EXTEND is not set
327CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial" 327CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 root=/dev/sda1"
328 328
329# 329#
330# Bus options 330# Bus options
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
index 347ee11351ec..1ee631d3725e 100644
--- a/arch/sh/drivers/dma/dma-sysfs.c
+++ b/arch/sh/drivers/dma/dma-sysfs.c
@@ -13,7 +13,6 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/sysdev.h> 14#include <linux/sysdev.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/module.h>
17#include <linux/err.h> 16#include <linux/err.h>
18#include <linux/string.h> 17#include <linux/string.h>
19#include <asm/dma.h> 18#include <asm/dma.h>
@@ -21,7 +20,6 @@
21static struct sysdev_class dma_sysclass = { 20static struct sysdev_class dma_sysclass = {
22 .name = "dma", 21 .name = "dma",
23}; 22};
24EXPORT_SYMBOL(dma_sysclass);
25 23
26static ssize_t dma_show_devices(struct sys_device *dev, 24static ssize_t dma_show_devices(struct sys_device *dev,
27 struct sysdev_attribute *attr, char *buf) 25 struct sysdev_attribute *attr, char *buf)
diff --git a/arch/sh/drivers/pci/Kconfig b/arch/sh/drivers/pci/Kconfig
deleted file mode 100644
index e8db585a6638..000000000000
--- a/arch/sh/drivers/pci/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
1config PCI
2 bool "PCI support"
3 depends on SYS_SUPPORTS_PCI
4 help
5 Find out whether you have a PCI motherboard. PCI is the name of a
6 bus system, i.e. the way the CPU talks to the other stuff inside
7 your box. If you have PCI, say Y, otherwise N.
8
9config SH_PCIDMA_NONCOHERENT
10 bool "Cache and PCI noncoherent"
11 depends on PCI
12 default y
13 help
14 Enable this option if your platform does not have a CPU cache which
15 remains coherent with PCI DMA. It is safest to say 'Y', although you
16 will see better performance if you can say 'N', because the PCI DMA
17 code will not have to flush the CPU's caches. If you have a PCI host
18 bridge integrated with your SH CPU, refer carefully to the chip specs
19 to see if you can say 'N' here. Otherwise, leave it as 'Y'.
diff --git a/arch/sh/drivers/pci/fixups-rts7751r2d.c b/arch/sh/drivers/pci/fixups-rts7751r2d.c
index 052b354236dc..7898f14d6641 100644
--- a/arch/sh/drivers/pci/fixups-rts7751r2d.c
+++ b/arch/sh/drivers/pci/fixups-rts7751r2d.c
@@ -15,7 +15,7 @@
15#include <mach/lboxre2.h> 15#include <mach/lboxre2.h>
16#include <mach/r2d.h> 16#include <mach/r2d.h>
17#include "pci-sh4.h" 17#include "pci-sh4.h"
18#include <asm/machtypes.h> 18#include <generated/machtypes.h>
19 19
20#define PCIMCR_MRSET_OFF 0xBFFFFFFF 20#define PCIMCR_MRSET_OFF 0xBFFFFFFF
21#define PCIMCR_RFSH_OFF 0xFFFFFFFB 21#define PCIMCR_RFSH_OFF 0xFFFFFFFB
diff --git a/arch/sh/include/asm/.gitignore b/arch/sh/include/asm/.gitignore
deleted file mode 100644
index 378db779fb6c..000000000000
--- a/arch/sh/include/asm/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1machtypes.h
diff --git a/arch/sh/include/asm/addrspace.h b/arch/sh/include/asm/addrspace.h
index 80d40813e057..99d6b3ecbe22 100644
--- a/arch/sh/include/asm/addrspace.h
+++ b/arch/sh/include/asm/addrspace.h
@@ -28,9 +28,6 @@
28/* Returns the privileged segment base of a given address */ 28/* Returns the privileged segment base of a given address */
29#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000) 29#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000)
30 30
31/* Returns the physical address of a PnSEG (n=1,2) address */
32#define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff)
33
34#if defined(CONFIG_29BIT) || defined(CONFIG_PMB_FIXED) 31#if defined(CONFIG_29BIT) || defined(CONFIG_PMB_FIXED)
35/* 32/*
36 * Map an address to a certain privileged segment 33 * Map an address to a certain privileged segment
@@ -60,5 +57,11 @@
60#define P3_ADDR_MAX P4SEG 57#define P3_ADDR_MAX P4SEG
61#endif 58#endif
62 59
60#ifndef __ASSEMBLY__
61#ifdef CONFIG_PMB
62extern int __in_29bit_mode(void);
63#endif /* CONFIG_PMB */
64#endif /* __ASSEMBLY__ */
65
63#endif /* __KERNEL__ */ 66#endif /* __KERNEL__ */
64#endif /* __ASM_SH_ADDRSPACE_H */ 67#endif /* __ASM_SH_ADDRSPACE_H */
diff --git a/arch/sh/include/asm/asm-offsets.h b/arch/sh/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/sh/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h
index e8e78137c6f5..b16388d71954 100644
--- a/arch/sh/include/asm/atomic.h
+++ b/arch/sh/include/asm/atomic.h
@@ -78,11 +78,10 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
78#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 78#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
79#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 79#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
80 80
81/* Atomic operations are already serializing on SH */ 81#define smp_mb__before_atomic_dec() smp_mb()
82#define smp_mb__before_atomic_dec() barrier() 82#define smp_mb__after_atomic_dec() smp_mb()
83#define smp_mb__after_atomic_dec() barrier() 83#define smp_mb__before_atomic_inc() smp_mb()
84#define smp_mb__before_atomic_inc() barrier() 84#define smp_mb__after_atomic_inc() smp_mb()
85#define smp_mb__after_atomic_inc() barrier()
86 85
87#include <asm-generic/atomic-long.h> 86#include <asm-generic/atomic-long.h>
88#include <asm-generic/atomic64.h> 87#include <asm-generic/atomic64.h>
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h
index ebe595b7ab1f..98511e4d28cb 100644
--- a/arch/sh/include/asm/bitops.h
+++ b/arch/sh/include/asm/bitops.h
@@ -26,8 +26,8 @@
26/* 26/*
27 * clear_bit() doesn't provide any barrier for the compiler. 27 * clear_bit() doesn't provide any barrier for the compiler.
28 */ 28 */
29#define smp_mb__before_clear_bit() barrier() 29#define smp_mb__before_clear_bit() smp_mb()
30#define smp_mb__after_clear_bit() barrier() 30#define smp_mb__after_clear_bit() smp_mb()
31 31
32#ifdef CONFIG_SUPERH32 32#ifdef CONFIG_SUPERH32
33static inline unsigned long ffz(unsigned long word) 33static inline unsigned long ffz(unsigned long word)
diff --git a/arch/sh/include/asm/bugs.h b/arch/sh/include/asm/bugs.h
index 46260fcbdf4b..02a19a1c033a 100644
--- a/arch/sh/include/asm/bugs.h
+++ b/arch/sh/include/asm/bugs.h
@@ -14,11 +14,15 @@
14 14
15#include <asm/processor.h> 15#include <asm/processor.h>
16 16
17extern void select_idle_routine(void);
18
17static void __init check_bugs(void) 19static void __init check_bugs(void)
18{ 20{
19 extern unsigned long loops_per_jiffy; 21 extern unsigned long loops_per_jiffy;
20 char *p = &init_utsname()->machine[2]; /* "sh" */ 22 char *p = &init_utsname()->machine[2]; /* "sh" */
21 23
24 select_idle_routine();
25
22 current_cpu_data.loops_per_jiffy = loops_per_jiffy; 26 current_cpu_data.loops_per_jiffy = loops_per_jiffy;
23 27
24 switch (current_cpu_data.family) { 28 switch (current_cpu_data.family) {
diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h
index 69d56dd4c968..87ced133a363 100644
--- a/arch/sh/include/asm/dma-mapping.h
+++ b/arch/sh/include/asm/dma-mapping.h
@@ -1,219 +1,108 @@
1#ifndef __ASM_SH_DMA_MAPPING_H 1#ifndef __ASM_SH_DMA_MAPPING_H
2#define __ASM_SH_DMA_MAPPING_H 2#define __ASM_SH_DMA_MAPPING_H
3 3
4#include <linux/mm.h> 4extern struct dma_map_ops *dma_ops;
5#include <linux/scatterlist.h> 5extern void no_iommu_init(void);
6#include <linux/dma-debug.h> 6
7#include <asm/cacheflush.h> 7static inline struct dma_map_ops *get_dma_ops(struct device *dev)
8#include <asm/io.h> 8{
9 return dma_ops;
10}
11
9#include <asm-generic/dma-coherent.h> 12#include <asm-generic/dma-coherent.h>
13#include <asm-generic/dma-mapping-common.h>
14
15static inline int dma_supported(struct device *dev, u64 mask)
16{
17 struct dma_map_ops *ops = get_dma_ops(dev);
10 18
11extern struct bus_type pci_bus_type; 19 if (ops->dma_supported)
20 return ops->dma_supported(dev, mask);
12 21
13#define dma_supported(dev, mask) (1) 22 return 1;
23}
14 24
15static inline int dma_set_mask(struct device *dev, u64 mask) 25static inline int dma_set_mask(struct device *dev, u64 mask)
16{ 26{
27 struct dma_map_ops *ops = get_dma_ops(dev);
28
17 if (!dev->dma_mask || !dma_supported(dev, mask)) 29 if (!dev->dma_mask || !dma_supported(dev, mask))
18 return -EIO; 30 return -EIO;
31 if (ops->set_dma_mask)
32 return ops->set_dma_mask(dev, mask);
19 33
20 *dev->dma_mask = mask; 34 *dev->dma_mask = mask;
21 35
22 return 0; 36 return 0;
23} 37}
24 38
25void *dma_alloc_coherent(struct device *dev, size_t size,
26 dma_addr_t *dma_handle, gfp_t flag);
27
28void dma_free_coherent(struct device *dev, size_t size,
29 void *vaddr, dma_addr_t dma_handle);
30
31void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 39void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
32 enum dma_data_direction dir); 40 enum dma_data_direction dir);
33 41
34#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) 42#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
35#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 43#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
36#define dma_is_consistent(d, h) (1)
37
38static inline dma_addr_t dma_map_single(struct device *dev,
39 void *ptr, size_t size,
40 enum dma_data_direction dir)
41{
42 dma_addr_t addr = virt_to_phys(ptr);
43
44#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
45 if (dev->bus == &pci_bus_type)
46 return addr;
47#endif
48 dma_cache_sync(dev, ptr, size, dir);
49
50 debug_dma_map_page(dev, virt_to_page(ptr),
51 (unsigned long)ptr & ~PAGE_MASK, size,
52 dir, addr, true);
53
54 return addr;
55}
56
57static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
58 size_t size, enum dma_data_direction dir)
59{
60 debug_dma_unmap_page(dev, addr, size, dir, true);
61}
62 44
63static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, 45#ifdef CONFIG_DMA_COHERENT
64 int nents, enum dma_data_direction dir) 46#define dma_is_consistent(d, h) (1)
65{ 47#else
66 int i; 48#define dma_is_consistent(d, h) (0)
67
68 for (i = 0; i < nents; i++) {
69#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
70 dma_cache_sync(dev, sg_virt(&sg[i]), sg[i].length, dir);
71#endif 49#endif
72 sg[i].dma_address = sg_phys(&sg[i]);
73 sg[i].dma_length = sg[i].length;
74 }
75 50
76 debug_dma_map_sg(dev, sg, nents, i, dir); 51static inline int dma_get_cache_alignment(void)
77
78 return nents;
79}
80
81static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
82 int nents, enum dma_data_direction dir)
83{
84 debug_dma_unmap_sg(dev, sg, nents, dir);
85}
86
87static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
88 unsigned long offset, size_t size,
89 enum dma_data_direction dir)
90{
91 return dma_map_single(dev, page_address(page) + offset, size, dir);
92}
93
94static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
95 size_t size, enum dma_data_direction dir)
96{
97 dma_unmap_single(dev, dma_address, size, dir);
98}
99
100static inline void __dma_sync_single(struct device *dev, dma_addr_t dma_handle,
101 size_t size, enum dma_data_direction dir)
102{ 52{
103#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) 53 /*
104 if (dev->bus == &pci_bus_type) 54 * Each processor family will define its own L1_CACHE_SHIFT,
105 return; 55 * L1_CACHE_BYTES wraps to this, so this is always safe.
106#endif 56 */
107 dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir); 57 return L1_CACHE_BYTES;
108} 58}
109 59
110static inline void dma_sync_single_range(struct device *dev, 60static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
111 dma_addr_t dma_handle,
112 unsigned long offset, size_t size,
113 enum dma_data_direction dir)
114{ 61{
115#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) 62 struct dma_map_ops *ops = get_dma_ops(dev);
116 if (dev->bus == &pci_bus_type)
117 return;
118#endif
119 dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir);
120}
121 63
122static inline void __dma_sync_sg(struct device *dev, struct scatterlist *sg, 64 if (ops->mapping_error)
123 int nelems, enum dma_data_direction dir) 65 return ops->mapping_error(dev, dma_addr);
124{
125 int i;
126 66
127 for (i = 0; i < nelems; i++) { 67 return dma_addr == 0;
128#if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
129 dma_cache_sync(dev, sg_virt(&sg[i]), sg[i].length, dir);
130#endif
131 sg[i].dma_address = sg_phys(&sg[i]);
132 sg[i].dma_length = sg[i].length;
133 }
134} 68}
135 69
136static inline void dma_sync_single_for_cpu(struct device *dev, 70static inline void *dma_alloc_coherent(struct device *dev, size_t size,
137 dma_addr_t dma_handle, size_t size, 71 dma_addr_t *dma_handle, gfp_t gfp)
138 enum dma_data_direction dir)
139{ 72{
140 __dma_sync_single(dev, dma_handle, size, dir); 73 struct dma_map_ops *ops = get_dma_ops(dev);
141 debug_dma_sync_single_for_cpu(dev, dma_handle, size, dir); 74 void *memory;
142}
143 75
144static inline void dma_sync_single_for_device(struct device *dev, 76 if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
145 dma_addr_t dma_handle, 77 return memory;
146 size_t size, 78 if (!ops->alloc_coherent)
147 enum dma_data_direction dir) 79 return NULL;
148{
149 __dma_sync_single(dev, dma_handle, size, dir);
150 debug_dma_sync_single_for_device(dev, dma_handle, size, dir);
151}
152 80
153static inline void dma_sync_single_range_for_cpu(struct device *dev, 81 memory = ops->alloc_coherent(dev, size, dma_handle, gfp);
154 dma_addr_t dma_handle, 82 debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
155 unsigned long offset,
156 size_t size,
157 enum dma_data_direction direction)
158{
159 dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction);
160 debug_dma_sync_single_range_for_cpu(dev, dma_handle,
161 offset, size, direction);
162}
163 83
164static inline void dma_sync_single_range_for_device(struct device *dev, 84 return memory;
165 dma_addr_t dma_handle,
166 unsigned long offset,
167 size_t size,
168 enum dma_data_direction direction)
169{
170 dma_sync_single_for_device(dev, dma_handle+offset, size, direction);
171 debug_dma_sync_single_range_for_device(dev, dma_handle,
172 offset, size, direction);
173} 85}
174 86
175 87static inline void dma_free_coherent(struct device *dev, size_t size,
176static inline void dma_sync_sg_for_cpu(struct device *dev, 88 void *vaddr, dma_addr_t dma_handle)
177 struct scatterlist *sg, int nelems,
178 enum dma_data_direction dir)
179{ 89{
180 __dma_sync_sg(dev, sg, nelems, dir); 90 struct dma_map_ops *ops = get_dma_ops(dev);
181 debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir);
182}
183 91
184static inline void dma_sync_sg_for_device(struct device *dev, 92 WARN_ON(irqs_disabled()); /* for portability */
185 struct scatterlist *sg, int nelems,
186 enum dma_data_direction dir)
187{
188 __dma_sync_sg(dev, sg, nelems, dir);
189 debug_dma_sync_sg_for_device(dev, sg, nelems, dir);
190}
191 93
192static inline int dma_get_cache_alignment(void) 94 if (dma_release_from_coherent(dev, get_order(size), vaddr))
193{ 95 return;
194 /*
195 * Each processor family will define its own L1_CACHE_SHIFT,
196 * L1_CACHE_BYTES wraps to this, so this is always safe.
197 */
198 return L1_CACHE_BYTES;
199}
200 96
201static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 97 debug_dma_free_coherent(dev, size, vaddr, dma_handle);
202{ 98 if (ops->free_coherent)
203 return dma_addr == 0; 99 ops->free_coherent(dev, size, vaddr, dma_handle);
204} 100}
205 101
206#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 102/* arch/sh/mm/consistent.c */
207 103extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
208extern int 104 dma_addr_t *dma_addr, gfp_t flag);
209dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, 105extern void dma_generic_free_coherent(struct device *dev, size_t size,
210 dma_addr_t device_addr, size_t size, int flags); 106 void *vaddr, dma_addr_t dma_handle);
211
212extern void
213dma_release_declared_memory(struct device *dev);
214
215extern void *
216dma_mark_declared_memory_occupied(struct device *dev,
217 dma_addr_t device_addr, size_t size);
218 107
219#endif /* __ASM_SH_DMA_MAPPING_H */ 108#endif /* __ASM_SH_DMA_MAPPING_H */
diff --git a/arch/sh/include/asm/dwarf.h b/arch/sh/include/asm/dwarf.h
index ced6795891a6..bdccbbfdc0bd 100644
--- a/arch/sh/include/asm/dwarf.h
+++ b/arch/sh/include/asm/dwarf.h
@@ -194,6 +194,12 @@
194#define DWARF_ARCH_RA_REG 17 194#define DWARF_ARCH_RA_REG 17
195 195
196#ifndef __ASSEMBLY__ 196#ifndef __ASSEMBLY__
197
198#include <linux/compiler.h>
199#include <linux/bug.h>
200#include <linux/list.h>
201#include <linux/module.h>
202
197/* 203/*
198 * Read either the frame pointer (r14) or the stack pointer (r15). 204 * Read either the frame pointer (r14) or the stack pointer (r15).
199 * NOTE: this MUST be inlined. 205 * NOTE: this MUST be inlined.
@@ -241,6 +247,12 @@ struct dwarf_cie {
241 247
242 unsigned long flags; 248 unsigned long flags;
243#define DWARF_CIE_Z_AUGMENTATION (1 << 0) 249#define DWARF_CIE_Z_AUGMENTATION (1 << 0)
250
251 /*
252 * 'mod' will be non-NULL if this CIE came from a module's
253 * .eh_frame section.
254 */
255 struct module *mod;
244}; 256};
245 257
246/** 258/**
@@ -255,6 +267,12 @@ struct dwarf_fde {
255 unsigned char *instructions; 267 unsigned char *instructions;
256 unsigned char *end; 268 unsigned char *end;
257 struct list_head link; 269 struct list_head link;
270
271 /*
272 * 'mod' will be non-NULL if this FDE came from a module's
273 * .eh_frame section.
274 */
275 struct module *mod;
258}; 276};
259 277
260/** 278/**
@@ -364,6 +382,12 @@ static inline unsigned int DW_CFA_operand(unsigned long insn)
364 382
365extern struct dwarf_frame *dwarf_unwind_stack(unsigned long, 383extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
366 struct dwarf_frame *); 384 struct dwarf_frame *);
385extern void dwarf_free_frame(struct dwarf_frame *);
386
387extern int module_dwarf_finalize(const Elf_Ehdr *, const Elf_Shdr *,
388 struct module *);
389extern void module_dwarf_cleanup(struct module *);
390
367#endif /* !__ASSEMBLY__ */ 391#endif /* !__ASSEMBLY__ */
368 392
369#define CFI_STARTPROC .cfi_startproc 393#define CFI_STARTPROC .cfi_startproc
@@ -391,6 +415,10 @@ extern struct dwarf_frame *dwarf_unwind_stack(unsigned long,
391static inline void dwarf_unwinder_init(void) 415static inline void dwarf_unwinder_init(void)
392{ 416{
393} 417}
418
419#define module_dwarf_finalize(hdr, sechdrs, me) (0)
420#define module_dwarf_cleanup(mod) do { } while (0)
421
394#endif 422#endif
395 423
396#endif /* CONFIG_DWARF_UNWINDER */ 424#endif /* CONFIG_DWARF_UNWINDER */
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index ccb1d93bb043..ac04255022b6 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -114,7 +114,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
114 */ 114 */
115#define CORE_DUMP_USE_REGSET 115#define CORE_DUMP_USE_REGSET
116 116
117#define USE_ELF_CORE_DUMP
118#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC 117#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC
119#define ELF_EXEC_PAGESIZE PAGE_SIZE 118#define ELF_EXEC_PAGESIZE PAGE_SIZE
120 119
diff --git a/arch/sh/include/asm/fixmap.h b/arch/sh/include/asm/fixmap.h
index 721fcc4d5e98..5ac1e40a511c 100644
--- a/arch/sh/include/asm/fixmap.h
+++ b/arch/sh/include/asm/fixmap.h
@@ -14,9 +14,9 @@
14#define _ASM_FIXMAP_H 14#define _ASM_FIXMAP_H
15 15
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/threads.h>
17#include <asm/page.h> 18#include <asm/page.h>
18#ifdef CONFIG_HIGHMEM 19#ifdef CONFIG_HIGHMEM
19#include <linux/threads.h>
20#include <asm/kmap_types.h> 20#include <asm/kmap_types.h>
21#endif 21#endif
22 22
@@ -46,9 +46,15 @@
46 * fix-mapped? 46 * fix-mapped?
47 */ 47 */
48enum fixed_addresses { 48enum fixed_addresses {
49#define FIX_N_COLOURS 16 49 /*
50 * The FIX_CMAP entries are used by kmap_coherent() to get virtual
51 * addresses which are of a known color, and so their values are
52 * important. __fix_to_virt(FIX_CMAP_END - n) must give an address
53 * which is the same color as a page (n<<PAGE_SHIFT).
54 */
55#define FIX_N_COLOURS 8
50 FIX_CMAP_BEGIN, 56 FIX_CMAP_BEGIN,
51 FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, 57 FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS) - 1,
52 FIX_UNCACHED, 58 FIX_UNCACHED,
53#ifdef CONFIG_HIGHMEM 59#ifdef CONFIG_HIGHMEM
54 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ 60 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
diff --git a/arch/sh/include/asm/fpu.h b/arch/sh/include/asm/fpu.h
index 1d3aee04b5cc..fb6bbb9b1cc8 100644
--- a/arch/sh/include/asm/fpu.h
+++ b/arch/sh/include/asm/fpu.h
@@ -18,16 +18,15 @@ static inline void grab_fpu(struct pt_regs *regs)
18 18
19struct task_struct; 19struct task_struct;
20 20
21extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); 21extern void save_fpu(struct task_struct *__tsk);
22void fpu_state_restore(struct pt_regs *regs);
22#else 23#else
23 24
25#define save_fpu(tsk) do { } while (0)
24#define release_fpu(regs) do { } while (0) 26#define release_fpu(regs) do { } while (0)
25#define grab_fpu(regs) do { } while (0) 27#define grab_fpu(regs) do { } while (0)
28#define fpu_state_restore(regs) do { } while (0)
26 29
27static inline void save_fpu(struct task_struct *tsk, struct pt_regs *regs)
28{
29 clear_tsk_thread_flag(tsk, TIF_USEDFPU);
30}
31#endif 30#endif
32 31
33struct user_regset; 32struct user_regset;
@@ -39,19 +38,28 @@ extern int fpregs_get(struct task_struct *target,
39 unsigned int pos, unsigned int count, 38 unsigned int pos, unsigned int count,
40 void *kbuf, void __user *ubuf); 39 void *kbuf, void __user *ubuf);
41 40
41static inline void __unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs)
42{
43 if (task_thread_info(tsk)->status & TS_USEDFPU) {
44 task_thread_info(tsk)->status &= ~TS_USEDFPU;
45 save_fpu(tsk);
46 release_fpu(regs);
47 } else
48 tsk->fpu_counter = 0;
49}
50
42static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs) 51static inline void unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs)
43{ 52{
44 preempt_disable(); 53 preempt_disable();
45 if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) 54 __unlazy_fpu(tsk, regs);
46 save_fpu(tsk, regs);
47 preempt_enable(); 55 preempt_enable();
48} 56}
49 57
50static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) 58static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs)
51{ 59{
52 preempt_disable(); 60 preempt_disable();
53 if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { 61 if (task_thread_info(tsk)->status & TS_USEDFPU) {
54 clear_tsk_thread_flag(tsk, TIF_USEDFPU); 62 task_thread_info(tsk)->status &= ~TS_USEDFPU;
55 release_fpu(regs); 63 release_fpu(regs);
56 } 64 }
57 preempt_enable(); 65 preempt_enable();
diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h
index 12f3a31f20af..13e9966464c2 100644
--- a/arch/sh/include/asm/ftrace.h
+++ b/arch/sh/include/asm/ftrace.h
@@ -35,4 +35,21 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
35#endif /* __ASSEMBLY__ */ 35#endif /* __ASSEMBLY__ */
36#endif /* CONFIG_FUNCTION_TRACER */ 36#endif /* CONFIG_FUNCTION_TRACER */
37 37
38#ifndef __ASSEMBLY__
39
40/* arch/sh/kernel/return_address.c */
41extern void *return_address(unsigned int);
42
43#define HAVE_ARCH_CALLER_ADDR
44
45#define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
46#define CALLER_ADDR1 ((unsigned long)return_address(1))
47#define CALLER_ADDR2 ((unsigned long)return_address(2))
48#define CALLER_ADDR3 ((unsigned long)return_address(3))
49#define CALLER_ADDR4 ((unsigned long)return_address(4))
50#define CALLER_ADDR5 ((unsigned long)return_address(5))
51#define CALLER_ADDR6 ((unsigned long)return_address(6))
52
53#endif /* __ASSEMBLY__ */
54
38#endif /* __ASM_SH_FTRACE_H */ 55#endif /* __ASM_SH_FTRACE_H */
diff --git a/arch/sh/include/asm/gpio.h b/arch/sh/include/asm/gpio.h
index 61f93da2c62e..f8d9a731e903 100644
--- a/arch/sh/include/asm/gpio.h
+++ b/arch/sh/include/asm/gpio.h
@@ -20,7 +20,7 @@
20#endif 20#endif
21 21
22#define ARCH_NR_GPIOS 512 22#define ARCH_NR_GPIOS 512
23#include <asm-generic/gpio.h> 23#include <linux/sh_pfc.h>
24 24
25#ifdef CONFIG_GPIOLIB 25#ifdef CONFIG_GPIOLIB
26 26
@@ -53,84 +53,4 @@ static inline int irq_to_gpio(unsigned int irq)
53 53
54#endif /* CONFIG_GPIOLIB */ 54#endif /* CONFIG_GPIOLIB */
55 55
56typedef unsigned short pinmux_enum_t;
57typedef unsigned short pinmux_flag_t;
58
59#define PINMUX_TYPE_NONE 0
60#define PINMUX_TYPE_FUNCTION 1
61#define PINMUX_TYPE_GPIO 2
62#define PINMUX_TYPE_OUTPUT 3
63#define PINMUX_TYPE_INPUT 4
64#define PINMUX_TYPE_INPUT_PULLUP 5
65#define PINMUX_TYPE_INPUT_PULLDOWN 6
66
67#define PINMUX_FLAG_TYPE (0x7)
68#define PINMUX_FLAG_WANT_PULLUP (1 << 3)
69#define PINMUX_FLAG_WANT_PULLDOWN (1 << 4)
70
71#define PINMUX_FLAG_DBIT_SHIFT 5
72#define PINMUX_FLAG_DBIT (0x1f << PINMUX_FLAG_DBIT_SHIFT)
73#define PINMUX_FLAG_DREG_SHIFT 10
74#define PINMUX_FLAG_DREG (0x3f << PINMUX_FLAG_DREG_SHIFT)
75
76struct pinmux_gpio {
77 pinmux_enum_t enum_id;
78 pinmux_flag_t flags;
79};
80
81#define PINMUX_GPIO(gpio, data_or_mark) [gpio] = { data_or_mark }
82#define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0
83
84struct pinmux_cfg_reg {
85 unsigned long reg, reg_width, field_width;
86 unsigned long *cnt;
87 pinmux_enum_t *enum_ids;
88};
89
90#define PINMUX_CFG_REG(name, r, r_width, f_width) \
91 .reg = r, .reg_width = r_width, .field_width = f_width, \
92 .cnt = (unsigned long [r_width / f_width]) {}, \
93 .enum_ids = (pinmux_enum_t [(r_width / f_width) * (1 << f_width)]) \
94
95struct pinmux_data_reg {
96 unsigned long reg, reg_width, reg_shadow;
97 pinmux_enum_t *enum_ids;
98};
99
100#define PINMUX_DATA_REG(name, r, r_width) \
101 .reg = r, .reg_width = r_width, \
102 .enum_ids = (pinmux_enum_t [r_width]) \
103
104struct pinmux_range {
105 pinmux_enum_t begin;
106 pinmux_enum_t end;
107 pinmux_enum_t force;
108};
109
110struct pinmux_info {
111 char *name;
112 pinmux_enum_t reserved_id;
113 struct pinmux_range data;
114 struct pinmux_range input;
115 struct pinmux_range input_pd;
116 struct pinmux_range input_pu;
117 struct pinmux_range output;
118 struct pinmux_range mark;
119 struct pinmux_range function;
120
121 unsigned first_gpio, last_gpio;
122
123 struct pinmux_gpio *gpios;
124 struct pinmux_cfg_reg *cfg_regs;
125 struct pinmux_data_reg *data_regs;
126
127 pinmux_enum_t *gpio_data;
128 unsigned int gpio_data_size;
129
130 unsigned long *gpio_in_use;
131 struct gpio_chip chip;
132};
133
134int register_pinmux(struct pinmux_info *pip);
135
136#endif /* __ASM_SH_GPIO_H */ 56#endif /* __ASM_SH_GPIO_H */
diff --git a/arch/sh/include/asm/hardirq.h b/arch/sh/include/asm/hardirq.h
index a5be4afa790b..48b191313a99 100644
--- a/arch/sh/include/asm/hardirq.h
+++ b/arch/sh/include/asm/hardirq.h
@@ -1,9 +1,16 @@
1#ifndef __ASM_SH_HARDIRQ_H 1#ifndef __ASM_SH_HARDIRQ_H
2#define __ASM_SH_HARDIRQ_H 2#define __ASM_SH_HARDIRQ_H
3 3
4extern void ack_bad_irq(unsigned int irq); 4#include <linux/threads.h>
5#define ack_bad_irq ack_bad_irq 5#include <linux/irq.h>
6
7typedef struct {
8 unsigned int __softirq_pending;
9 unsigned int __nmi_count; /* arch dependent */
10} ____cacheline_aligned irq_cpustat_t;
6 11
7#include <asm-generic/hardirq.h> 12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14extern void ack_bad_irq(unsigned int irq);
8 15
9#endif /* __ASM_SH_HARDIRQ_H */ 16#endif /* __ASM_SH_HARDIRQ_H */
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 5be45ea4dfec..026dd659a640 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -90,15 +90,11 @@
90#define ctrl_outl __raw_writel 90#define ctrl_outl __raw_writel
91#define ctrl_outq __raw_writeq 91#define ctrl_outq __raw_writeq
92 92
93extern unsigned long generic_io_base;
94
93static inline void ctrl_delay(void) 95static inline void ctrl_delay(void)
94{ 96{
95#ifdef CONFIG_CPU_SH4 97 __raw_readw(generic_io_base);
96 __raw_readw(CCN_PVR);
97#elif defined(P2SEG)
98 __raw_readw(P2SEG);
99#else
100#error "Need a dummy address for delay"
101#endif
102} 98}
103 99
104#define __BUILD_MEMORY_STRING(bwlq, type) \ 100#define __BUILD_MEMORY_STRING(bwlq, type) \
@@ -186,8 +182,6 @@ __BUILD_MEMORY_STRING(q, u64)
186 182
187#define IO_SPACE_LIMIT 0xffffffff 183#define IO_SPACE_LIMIT 0xffffffff
188 184
189extern unsigned long generic_io_base;
190
191/* 185/*
192 * This function provides a method for the generic case where a 186 * This function provides a method for the generic case where a
193 * board-specific ioport_map simply needs to return the port + some 187 * board-specific ioport_map simply needs to return the port + some
@@ -239,14 +233,20 @@ unsigned long long poke_real_address_q(unsigned long long addr,
239 * doesn't exist, so everything must go through page tables. 233 * doesn't exist, so everything must go through page tables.
240 */ 234 */
241#ifdef CONFIG_MMU 235#ifdef CONFIG_MMU
242void __iomem *__ioremap(unsigned long offset, unsigned long size, 236void __iomem *__ioremap_caller(unsigned long offset, unsigned long size,
243 unsigned long flags); 237 unsigned long flags, void *caller);
244void __iounmap(void __iomem *addr); 238void __iounmap(void __iomem *addr);
245 239
246static inline void __iomem * 240static inline void __iomem *
241__ioremap(unsigned long offset, unsigned long size, unsigned long flags)
242{
243 return __ioremap_caller(offset, size, flags, __builtin_return_address(0));
244}
245
246static inline void __iomem *
247__ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) 247__ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
248{ 248{
249#if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) 249#if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) && !defined(CONFIG_PMB)
250 unsigned long last_addr = offset + size - 1; 250 unsigned long last_addr = offset + size - 1;
251#endif 251#endif
252 void __iomem *ret; 252 void __iomem *ret;
@@ -255,7 +255,7 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
255 if (ret) 255 if (ret)
256 return ret; 256 return ret;
257 257
258#if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) 258#if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) && !defined(CONFIG_PMB)
259 /* 259 /*
260 * For P1 and P2 space this is trivial, as everything is already 260 * For P1 and P2 space this is trivial, as everything is already
261 * mapped. Uncached access for P1 addresses are done through P2. 261 * mapped. Uncached access for P1 addresses are done through P2.
@@ -277,6 +277,7 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
277 return __ioremap(offset, size, flags); 277 return __ioremap(offset, size, flags);
278} 278}
279#else 279#else
280#define __ioremap(offset, size, flags) ((void __iomem *)(offset))
280#define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset)) 281#define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset))
281#define __iounmap(addr) do { } while (0) 282#define __iounmap(addr) do { } while (0)
282#endif /* CONFIG_MMU */ 283#endif /* CONFIG_MMU */
diff --git a/arch/sh/include/asm/irqflags.h b/arch/sh/include/asm/irqflags.h
index 46e71da5be6b..a741153b41c2 100644
--- a/arch/sh/include/asm/irqflags.h
+++ b/arch/sh/include/asm/irqflags.h
@@ -1,34 +1,9 @@
1#ifndef __ASM_SH_IRQFLAGS_H 1#ifndef __ASM_SH_IRQFLAGS_H
2#define __ASM_SH_IRQFLAGS_H 2#define __ASM_SH_IRQFLAGS_H
3 3
4#ifdef CONFIG_SUPERH32 4#define RAW_IRQ_DISABLED 0xf0
5#include "irqflags_32.h" 5#define RAW_IRQ_ENABLED 0x00
6#else
7#include "irqflags_64.h"
8#endif
9 6
10#define raw_local_save_flags(flags) \ 7#include <asm-generic/irqflags.h>
11 do { (flags) = __raw_local_save_flags(); } while (0)
12
13static inline int raw_irqs_disabled_flags(unsigned long flags)
14{
15 return (flags != 0);
16}
17
18static inline int raw_irqs_disabled(void)
19{
20 unsigned long flags = __raw_local_save_flags();
21
22 return raw_irqs_disabled_flags(flags);
23}
24
25#define raw_local_irq_save(flags) \
26 do { (flags) = __raw_local_irq_save(); } while (0)
27
28static inline void raw_local_irq_restore(unsigned long flags)
29{
30 if ((flags & 0xf0) != 0xf0)
31 raw_local_irq_enable();
32}
33 8
34#endif /* __ASM_SH_IRQFLAGS_H */ 9#endif /* __ASM_SH_IRQFLAGS_H */
diff --git a/arch/sh/include/asm/irqflags_32.h b/arch/sh/include/asm/irqflags_32.h
deleted file mode 100644
index 60218f541340..000000000000
--- a/arch/sh/include/asm/irqflags_32.h
+++ /dev/null
@@ -1,99 +0,0 @@
1#ifndef __ASM_SH_IRQFLAGS_32_H
2#define __ASM_SH_IRQFLAGS_32_H
3
4static inline void raw_local_irq_enable(void)
5{
6 unsigned long __dummy0, __dummy1;
7
8 __asm__ __volatile__ (
9 "stc sr, %0\n\t"
10 "and %1, %0\n\t"
11#ifdef CONFIG_CPU_HAS_SR_RB
12 "stc r6_bank, %1\n\t"
13 "or %1, %0\n\t"
14#endif
15 "ldc %0, sr\n\t"
16 : "=&r" (__dummy0), "=r" (__dummy1)
17 : "1" (~0x000000f0)
18 : "memory"
19 );
20}
21
22static inline void raw_local_irq_disable(void)
23{
24 unsigned long flags;
25
26 __asm__ __volatile__ (
27 "stc sr, %0\n\t"
28 "or #0xf0, %0\n\t"
29 "ldc %0, sr\n\t"
30 : "=&z" (flags)
31 : /* no inputs */
32 : "memory"
33 );
34}
35
36static inline void set_bl_bit(void)
37{
38 unsigned long __dummy0, __dummy1;
39
40 __asm__ __volatile__ (
41 "stc sr, %0\n\t"
42 "or %2, %0\n\t"
43 "and %3, %0\n\t"
44 "ldc %0, sr\n\t"
45 : "=&r" (__dummy0), "=r" (__dummy1)
46 : "r" (0x10000000), "r" (0xffffff0f)
47 : "memory"
48 );
49}
50
51static inline void clear_bl_bit(void)
52{
53 unsigned long __dummy0, __dummy1;
54
55 __asm__ __volatile__ (
56 "stc sr, %0\n\t"
57 "and %2, %0\n\t"
58 "ldc %0, sr\n\t"
59 : "=&r" (__dummy0), "=r" (__dummy1)
60 : "1" (~0x10000000)
61 : "memory"
62 );
63}
64
65static inline unsigned long __raw_local_save_flags(void)
66{
67 unsigned long flags;
68
69 __asm__ __volatile__ (
70 "stc sr, %0\n\t"
71 "and #0xf0, %0\n\t"
72 : "=&z" (flags)
73 : /* no inputs */
74 : "memory"
75 );
76
77 return flags;
78}
79
80static inline unsigned long __raw_local_irq_save(void)
81{
82 unsigned long flags, __dummy;
83
84 __asm__ __volatile__ (
85 "stc sr, %1\n\t"
86 "mov %1, %0\n\t"
87 "or #0xf0, %0\n\t"
88 "ldc %0, sr\n\t"
89 "mov %1, %0\n\t"
90 "and #0xf0, %0\n\t"
91 : "=&z" (flags), "=&r" (__dummy)
92 : /* no inputs */
93 : "memory"
94 );
95
96 return flags;
97}
98
99#endif /* __ASM_SH_IRQFLAGS_32_H */
diff --git a/arch/sh/include/asm/irqflags_64.h b/arch/sh/include/asm/irqflags_64.h
deleted file mode 100644
index 88f65222c1d4..000000000000
--- a/arch/sh/include/asm/irqflags_64.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef __ASM_SH_IRQFLAGS_64_H
2#define __ASM_SH_IRQFLAGS_64_H
3
4#include <cpu/registers.h>
5
6#define SR_MASK_LL 0x00000000000000f0LL
7#define SR_BL_LL 0x0000000010000000LL
8
9static inline void raw_local_irq_enable(void)
10{
11 unsigned long long __dummy0, __dummy1 = ~SR_MASK_LL;
12
13 __asm__ __volatile__("getcon " __SR ", %0\n\t"
14 "and %0, %1, %0\n\t"
15 "putcon %0, " __SR "\n\t"
16 : "=&r" (__dummy0)
17 : "r" (__dummy1));
18}
19
20static inline void raw_local_irq_disable(void)
21{
22 unsigned long long __dummy0, __dummy1 = SR_MASK_LL;
23
24 __asm__ __volatile__("getcon " __SR ", %0\n\t"
25 "or %0, %1, %0\n\t"
26 "putcon %0, " __SR "\n\t"
27 : "=&r" (__dummy0)
28 : "r" (__dummy1));
29}
30
31static inline void set_bl_bit(void)
32{
33 unsigned long long __dummy0, __dummy1 = SR_BL_LL;
34
35 __asm__ __volatile__("getcon " __SR ", %0\n\t"
36 "or %0, %1, %0\n\t"
37 "putcon %0, " __SR "\n\t"
38 : "=&r" (__dummy0)
39 : "r" (__dummy1));
40
41}
42
43static inline void clear_bl_bit(void)
44{
45 unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
46
47 __asm__ __volatile__("getcon " __SR ", %0\n\t"
48 "and %0, %1, %0\n\t"
49 "putcon %0, " __SR "\n\t"
50 : "=&r" (__dummy0)
51 : "r" (__dummy1));
52}
53
54static inline unsigned long __raw_local_save_flags(void)
55{
56 unsigned long long __dummy = SR_MASK_LL;
57 unsigned long flags;
58
59 __asm__ __volatile__ (
60 "getcon " __SR ", %0\n\t"
61 "and %0, %1, %0"
62 : "=&r" (flags)
63 : "r" (__dummy));
64
65 return flags;
66}
67
68static inline unsigned long __raw_local_irq_save(void)
69{
70 unsigned long long __dummy0, __dummy1 = SR_MASK_LL;
71 unsigned long flags;
72
73 __asm__ __volatile__ (
74 "getcon " __SR ", %1\n\t"
75 "or %1, r63, %0\n\t"
76 "or %1, %2, %1\n\t"
77 "putcon %1, " __SR "\n\t"
78 "and %0, %2, %0"
79 : "=&r" (flags), "=&r" (__dummy0)
80 : "r" (__dummy1));
81
82 return flags;
83}
84
85#endif /* __ASM_SH_IRQFLAGS_64_H */
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
index 84dd37761f56..9c30955630ff 100644
--- a/arch/sh/include/asm/machvec.h
+++ b/arch/sh/include/asm/machvec.h
@@ -12,7 +12,7 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/time.h> 14#include <linux/time.h>
15#include <asm/machtypes.h> 15#include <generated/machtypes.h>
16 16
17struct sh_machine_vector { 17struct sh_machine_vector {
18 void (*mv_setup)(char **cmdline_p); 18 void (*mv_setup)(char **cmdline_p);
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h
index f5963037c9d6..c7426ad9926e 100644
--- a/arch/sh/include/asm/mmu.h
+++ b/arch/sh/include/asm/mmu.h
@@ -7,12 +7,16 @@
7#define PMB_PASCR 0xff000070 7#define PMB_PASCR 0xff000070
8#define PMB_IRMCR 0xff000078 8#define PMB_IRMCR 0xff000078
9 9
10#define PASCR_SE 0x80000000
11
10#define PMB_ADDR 0xf6100000 12#define PMB_ADDR 0xf6100000
11#define PMB_DATA 0xf7100000 13#define PMB_DATA 0xf7100000
12#define PMB_ENTRY_MAX 16 14#define PMB_ENTRY_MAX 16
13#define PMB_E_MASK 0x0000000f 15#define PMB_E_MASK 0x0000000f
14#define PMB_E_SHIFT 8 16#define PMB_E_SHIFT 8
15 17
18#define PMB_PFN_MASK 0xff000000
19
16#define PMB_SZ_16M 0x00000000 20#define PMB_SZ_16M 0x00000000
17#define PMB_SZ_64M 0x00000010 21#define PMB_SZ_64M 0x00000010
18#define PMB_SZ_128M 0x00000080 22#define PMB_SZ_128M 0x00000080
@@ -62,17 +66,10 @@ struct pmb_entry {
62}; 66};
63 67
64/* arch/sh/mm/pmb.c */ 68/* arch/sh/mm/pmb.c */
65int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
66 unsigned long flags, int *entry);
67int set_pmb_entry(struct pmb_entry *pmbe);
68void clear_pmb_entry(struct pmb_entry *pmbe);
69struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
70 unsigned long flags);
71void pmb_free(struct pmb_entry *pmbe);
72long pmb_remap(unsigned long virt, unsigned long phys, 69long pmb_remap(unsigned long virt, unsigned long phys,
73 unsigned long size, unsigned long flags); 70 unsigned long size, unsigned long flags);
74void pmb_unmap(unsigned long addr); 71void pmb_unmap(unsigned long addr);
72int pmb_init(void);
75#endif /* __ASSEMBLY__ */ 73#endif /* __ASSEMBLY__ */
76 74
77#endif /* __MMU_H */ 75#endif /* __MMU_H */
78
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index 4163950cd1c6..67f3999b544e 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -3,8 +3,6 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/dma-mapping.h>
7
8/* Can be used to override the logic in pci_scan_bus for skipping 6/* Can be used to override the logic in pci_scan_bus for skipping
9 already-configured bus numbers - to be used for buggy BIOSes 7 already-configured bus numbers - to be used for buggy BIOSes
10 or architectures with incomplete PCI setup by the loader */ 8 or architectures with incomplete PCI setup by the loader */
@@ -54,30 +52,18 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
54 * address space. The networking and block device layers use 52 * address space. The networking and block device layers use
55 * this boolean for bounce buffer decisions. 53 * this boolean for bounce buffer decisions.
56 */ 54 */
57#define PCI_DMA_BUS_IS_PHYS (1) 55#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
58
59#include <linux/types.h>
60#include <linux/slab.h>
61#include <asm/scatterlist.h>
62#include <linux/string.h>
63#include <asm/io.h>
64 56
65/* pci_unmap_{single,page} being a nop depends upon the 57/* pci_unmap_{single,page} being a nop depends upon the
66 * configuration. 58 * configuration.
67 */ 59 */
68#ifdef CONFIG_SH_PCIDMA_NONCOHERENT 60#ifdef CONFIG_DMA_NONCOHERENT
69#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ 61#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME;
70 dma_addr_t ADDR_NAME; 62#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME;
71#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ 63#define pci_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME)
72 __u32 LEN_NAME; 64#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL))
73#define pci_unmap_addr(PTR, ADDR_NAME) \ 65#define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
74 ((PTR)->ADDR_NAME) 66#define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
75#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
76 (((PTR)->ADDR_NAME) = (VAL))
77#define pci_unmap_len(PTR, LEN_NAME) \
78 ((PTR)->LEN_NAME)
79#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
80 (((PTR)->LEN_NAME) = (VAL))
81#else 67#else
82#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) 68#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
83#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) 69#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
diff --git a/arch/sh/include/asm/perf_event.h b/arch/sh/include/asm/perf_event.h
index 11a302297ab7..3d0c9f36d150 100644
--- a/arch/sh/include/asm/perf_event.h
+++ b/arch/sh/include/asm/perf_event.h
@@ -1,8 +1,35 @@
1#ifndef __ASM_SH_PERF_EVENT_H 1#ifndef __ASM_SH_PERF_EVENT_H
2#define __ASM_SH_PERF_EVENT_H 2#define __ASM_SH_PERF_EVENT_H
3 3
4/* SH only supports software events through this interface. */ 4struct hw_perf_event;
5static inline void set_perf_event_pending(void) {} 5
6#define MAX_HWEVENTS 2
7
8struct sh_pmu {
9 const char *name;
10 unsigned int num_events;
11 void (*disable_all)(void);
12 void (*enable_all)(void);
13 void (*enable)(struct hw_perf_event *, int);
14 void (*disable)(struct hw_perf_event *, int);
15 u64 (*read)(int);
16 int (*event_map)(int);
17 unsigned int max_events;
18 unsigned long raw_event_mask;
19 const int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]
20 [PERF_COUNT_HW_CACHE_OP_MAX]
21 [PERF_COUNT_HW_CACHE_RESULT_MAX];
22};
23
24/* arch/sh/kernel/perf_event.c */
25extern int register_sh_pmu(struct sh_pmu *);
26extern int reserve_pmc_hardware(void);
27extern void release_pmc_hardware(void);
28
29static inline void set_perf_event_pending(void)
30{
31 /* Nothing to see here, move along. */
32}
6 33
7#define PERF_EVENT_INDEX_OFFSET 0 34#define PERF_EVENT_INDEX_OFFSET 0
8 35
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h
index 4f3efa7d5a64..ba3046e4f06f 100644
--- a/arch/sh/include/asm/pgtable.h
+++ b/arch/sh/include/asm/pgtable.h
@@ -75,13 +75,31 @@ static inline unsigned long long neff_sign_extend(unsigned long val)
75#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 75#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
76#define FIRST_USER_ADDRESS 0 76#define FIRST_USER_ADDRESS 0
77 77
78#ifdef CONFIG_32BIT 78#define PHYS_ADDR_MASK29 0x1fffffff
79#define PHYS_ADDR_MASK 0xffffffff 79#define PHYS_ADDR_MASK32 0xffffffff
80
81#ifdef CONFIG_PMB
82static inline unsigned long phys_addr_mask(void)
83{
84 /* Is the MMU in 29bit mode? */
85 if (__in_29bit_mode())
86 return PHYS_ADDR_MASK29;
87
88 return PHYS_ADDR_MASK32;
89}
90#elif defined(CONFIG_32BIT)
91static inline unsigned long phys_addr_mask(void)
92{
93 return PHYS_ADDR_MASK32;
94}
80#else 95#else
81#define PHYS_ADDR_MASK 0x1fffffff 96static inline unsigned long phys_addr_mask(void)
97{
98 return PHYS_ADDR_MASK29;
99}
82#endif 100#endif
83 101
84#define PTE_PHYS_MASK (PHYS_ADDR_MASK & PAGE_MASK) 102#define PTE_PHYS_MASK (phys_addr_mask() & PAGE_MASK)
85#define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT) 103#define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT)
86 104
87#ifdef CONFIG_SUPERH32 105#ifdef CONFIG_SUPERH32
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h
index c0d359ce337b..5003ee86f67b 100644
--- a/arch/sh/include/asm/pgtable_32.h
+++ b/arch/sh/include/asm/pgtable_32.h
@@ -108,7 +108,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
108#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | _PAGE_FILE) 108#define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | _PAGE_FILE)
109#endif 109#endif
110 110
111#define _PAGE_FLAGS_HARDWARE_MASK (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS)) 111#define _PAGE_FLAGS_HARDWARE_MASK (phys_addr_mask() & ~(_PAGE_CLEAR_FLAGS))
112 112
113/* Hardware flags, page size encoding */ 113/* Hardware flags, page size encoding */
114#if !defined(CONFIG_MMU) 114#if !defined(CONFIG_MMU)
@@ -344,7 +344,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
344#define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) 344#define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL)
345 345
346#ifdef CONFIG_X2TLB 346#ifdef CONFIG_X2TLB
347#define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) 347#define pte_write(pte) \
348 ((pte).pte_high & (_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE))
348#else 349#else
349#define pte_write(pte) ((pte).pte_low & _PAGE_RW) 350#define pte_write(pte) ((pte).pte_low & _PAGE_RW)
350#endif 351#endif
@@ -358,7 +359,7 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; }
358 * individually toggled (and user permissions are entirely decoupled from 359 * individually toggled (and user permissions are entirely decoupled from
359 * kernel permissions), we attempt to couple them a bit more sanely here. 360 * kernel permissions), we attempt to couple them a bit more sanely here.
360 */ 361 */
361PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); 362PTE_BIT_FUNC(high, wrprotect, &= ~(_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE));
362PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); 363PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE);
363PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); 364PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE);
364#else 365#else
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index 9a8714945dc9..1f3d6fab660c 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -56,6 +56,7 @@ asmlinkage void __init sh_cpu_init(void);
56#define SR_DSP 0x00001000 56#define SR_DSP 0x00001000
57#define SR_IMASK 0x000000f0 57#define SR_IMASK 0x000000f0
58#define SR_FD 0x00008000 58#define SR_FD 0x00008000
59#define SR_MD 0x40000000
59 60
60/* 61/*
61 * DSP structure and data 62 * DSP structure and data
@@ -136,7 +137,7 @@ struct mm_struct;
136extern void release_thread(struct task_struct *); 137extern void release_thread(struct task_struct *);
137 138
138/* Prepare to copy thread state - unlazy all lazy status */ 139/* Prepare to copy thread state - unlazy all lazy status */
139#define prepare_to_copy(tsk) do { } while (0) 140void prepare_to_copy(struct task_struct *tsk);
140 141
141/* 142/*
142 * create a kernel thread without removing it from tasklists 143 * create a kernel thread without removing it from tasklists
diff --git a/arch/sh/include/asm/scatterlist.h b/arch/sh/include/asm/scatterlist.h
index 327cc2e4c97b..e38d1d4c7f6f 100644
--- a/arch/sh/include/asm/scatterlist.h
+++ b/arch/sh/include/asm/scatterlist.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_SH_SCATTERLIST_H 1#ifndef __ASM_SH_SCATTERLIST_H
2#define __ASM_SH_SCATTERLIST_H 2#define __ASM_SH_SCATTERLIST_H
3 3
4#define ISA_DMA_THRESHOLD PHYS_ADDR_MASK 4#define ISA_DMA_THRESHOLD phys_addr_mask()
5 5
6#include <asm-generic/scatterlist.h> 6#include <asm-generic/scatterlist.h>
7 7
diff --git a/arch/sh/include/asm/sh_keysc.h b/arch/sh/include/asm/sh_keysc.h
deleted file mode 100644
index 4a65b1e40eab..000000000000
--- a/arch/sh/include/asm/sh_keysc.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef __ASM_KEYSC_H__
2#define __ASM_KEYSC_H__
3
4#define SH_KEYSC_MAXKEYS 30
5
6struct sh_keysc_info {
7 enum { SH_KEYSC_MODE_1, SH_KEYSC_MODE_2, SH_KEYSC_MODE_3 } mode;
8 int scan_timing; /* 0 -> 7, see KYCR1, SCN[2:0] */
9 int delay;
10 int kycr2_delay;
11 int keycodes[SH_KEYSC_MAXKEYS];
12};
13
14#endif /* __ASM_KEYSC_H__ */
diff --git a/arch/sh/include/asm/spinlock.h b/arch/sh/include/asm/spinlock.h
index a28c9f0053fd..bdc0f3b6c56a 100644
--- a/arch/sh/include/asm/spinlock.h
+++ b/arch/sh/include/asm/spinlock.h
@@ -23,10 +23,10 @@
23 * Your basic SMP spinlocks, allowing only a single CPU anywhere 23 * Your basic SMP spinlocks, allowing only a single CPU anywhere
24 */ 24 */
25 25
26#define __raw_spin_is_locked(x) ((x)->lock <= 0) 26#define arch_spin_is_locked(x) ((x)->lock <= 0)
27#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 27#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
28#define __raw_spin_unlock_wait(x) \ 28#define arch_spin_unlock_wait(x) \
29 do { while (__raw_spin_is_locked(x)) cpu_relax(); } while (0) 29 do { while (arch_spin_is_locked(x)) cpu_relax(); } while (0)
30 30
31/* 31/*
32 * Simple spin lock operations. There are two variants, one clears IRQ's 32 * Simple spin lock operations. There are two variants, one clears IRQ's
@@ -34,14 +34,14 @@
34 * 34 *
35 * We make no fairness assumptions. They have a cost. 35 * We make no fairness assumptions. They have a cost.
36 */ 36 */
37static inline void __raw_spin_lock(raw_spinlock_t *lock) 37static inline void arch_spin_lock(arch_spinlock_t *lock)
38{ 38{
39 unsigned long tmp; 39 unsigned long tmp;
40 unsigned long oldval; 40 unsigned long oldval;
41 41
42 __asm__ __volatile__ ( 42 __asm__ __volatile__ (
43 "1: \n\t" 43 "1: \n\t"
44 "movli.l @%2, %0 ! __raw_spin_lock \n\t" 44 "movli.l @%2, %0 ! arch_spin_lock \n\t"
45 "mov %0, %1 \n\t" 45 "mov %0, %1 \n\t"
46 "mov #0, %0 \n\t" 46 "mov #0, %0 \n\t"
47 "movco.l %0, @%2 \n\t" 47 "movco.l %0, @%2 \n\t"
@@ -54,12 +54,12 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
54 ); 54 );
55} 55}
56 56
57static inline void __raw_spin_unlock(raw_spinlock_t *lock) 57static inline void arch_spin_unlock(arch_spinlock_t *lock)
58{ 58{
59 unsigned long tmp; 59 unsigned long tmp;
60 60
61 __asm__ __volatile__ ( 61 __asm__ __volatile__ (
62 "mov #1, %0 ! __raw_spin_unlock \n\t" 62 "mov #1, %0 ! arch_spin_unlock \n\t"
63 "mov.l %0, @%1 \n\t" 63 "mov.l %0, @%1 \n\t"
64 : "=&z" (tmp) 64 : "=&z" (tmp)
65 : "r" (&lock->lock) 65 : "r" (&lock->lock)
@@ -67,13 +67,13 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
67 ); 67 );
68} 68}
69 69
70static inline int __raw_spin_trylock(raw_spinlock_t *lock) 70static inline int arch_spin_trylock(arch_spinlock_t *lock)
71{ 71{
72 unsigned long tmp, oldval; 72 unsigned long tmp, oldval;
73 73
74 __asm__ __volatile__ ( 74 __asm__ __volatile__ (
75 "1: \n\t" 75 "1: \n\t"
76 "movli.l @%2, %0 ! __raw_spin_trylock \n\t" 76 "movli.l @%2, %0 ! arch_spin_trylock \n\t"
77 "mov %0, %1 \n\t" 77 "mov %0, %1 \n\t"
78 "mov #0, %0 \n\t" 78 "mov #0, %0 \n\t"
79 "movco.l %0, @%2 \n\t" 79 "movco.l %0, @%2 \n\t"
@@ -100,21 +100,21 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
100 * read_can_lock - would read_trylock() succeed? 100 * read_can_lock - would read_trylock() succeed?
101 * @lock: the rwlock in question. 101 * @lock: the rwlock in question.
102 */ 102 */
103#define __raw_read_can_lock(x) ((x)->lock > 0) 103#define arch_read_can_lock(x) ((x)->lock > 0)
104 104
105/** 105/**
106 * write_can_lock - would write_trylock() succeed? 106 * write_can_lock - would write_trylock() succeed?
107 * @lock: the rwlock in question. 107 * @lock: the rwlock in question.
108 */ 108 */
109#define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS) 109#define arch_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
110 110
111static inline void __raw_read_lock(raw_rwlock_t *rw) 111static inline void arch_read_lock(arch_rwlock_t *rw)
112{ 112{
113 unsigned long tmp; 113 unsigned long tmp;
114 114
115 __asm__ __volatile__ ( 115 __asm__ __volatile__ (
116 "1: \n\t" 116 "1: \n\t"
117 "movli.l @%1, %0 ! __raw_read_lock \n\t" 117 "movli.l @%1, %0 ! arch_read_lock \n\t"
118 "cmp/pl %0 \n\t" 118 "cmp/pl %0 \n\t"
119 "bf 1b \n\t" 119 "bf 1b \n\t"
120 "add #-1, %0 \n\t" 120 "add #-1, %0 \n\t"
@@ -126,13 +126,13 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
126 ); 126 );
127} 127}
128 128
129static inline void __raw_read_unlock(raw_rwlock_t *rw) 129static inline void arch_read_unlock(arch_rwlock_t *rw)
130{ 130{
131 unsigned long tmp; 131 unsigned long tmp;
132 132
133 __asm__ __volatile__ ( 133 __asm__ __volatile__ (
134 "1: \n\t" 134 "1: \n\t"
135 "movli.l @%1, %0 ! __raw_read_unlock \n\t" 135 "movli.l @%1, %0 ! arch_read_unlock \n\t"
136 "add #1, %0 \n\t" 136 "add #1, %0 \n\t"
137 "movco.l %0, @%1 \n\t" 137 "movco.l %0, @%1 \n\t"
138 "bf 1b \n\t" 138 "bf 1b \n\t"
@@ -142,13 +142,13 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
142 ); 142 );
143} 143}
144 144
145static inline void __raw_write_lock(raw_rwlock_t *rw) 145static inline void arch_write_lock(arch_rwlock_t *rw)
146{ 146{
147 unsigned long tmp; 147 unsigned long tmp;
148 148
149 __asm__ __volatile__ ( 149 __asm__ __volatile__ (
150 "1: \n\t" 150 "1: \n\t"
151 "movli.l @%1, %0 ! __raw_write_lock \n\t" 151 "movli.l @%1, %0 ! arch_write_lock \n\t"
152 "cmp/hs %2, %0 \n\t" 152 "cmp/hs %2, %0 \n\t"
153 "bf 1b \n\t" 153 "bf 1b \n\t"
154 "sub %2, %0 \n\t" 154 "sub %2, %0 \n\t"
@@ -160,23 +160,23 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
160 ); 160 );
161} 161}
162 162
163static inline void __raw_write_unlock(raw_rwlock_t *rw) 163static inline void arch_write_unlock(arch_rwlock_t *rw)
164{ 164{
165 __asm__ __volatile__ ( 165 __asm__ __volatile__ (
166 "mov.l %1, @%0 ! __raw_write_unlock \n\t" 166 "mov.l %1, @%0 ! arch_write_unlock \n\t"
167 : 167 :
168 : "r" (&rw->lock), "r" (RW_LOCK_BIAS) 168 : "r" (&rw->lock), "r" (RW_LOCK_BIAS)
169 : "t", "memory" 169 : "t", "memory"
170 ); 170 );
171} 171}
172 172
173static inline int __raw_read_trylock(raw_rwlock_t *rw) 173static inline int arch_read_trylock(arch_rwlock_t *rw)
174{ 174{
175 unsigned long tmp, oldval; 175 unsigned long tmp, oldval;
176 176
177 __asm__ __volatile__ ( 177 __asm__ __volatile__ (
178 "1: \n\t" 178 "1: \n\t"
179 "movli.l @%2, %0 ! __raw_read_trylock \n\t" 179 "movli.l @%2, %0 ! arch_read_trylock \n\t"
180 "mov %0, %1 \n\t" 180 "mov %0, %1 \n\t"
181 "cmp/pl %0 \n\t" 181 "cmp/pl %0 \n\t"
182 "bf 2f \n\t" 182 "bf 2f \n\t"
@@ -193,13 +193,13 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
193 return (oldval > 0); 193 return (oldval > 0);
194} 194}
195 195
196static inline int __raw_write_trylock(raw_rwlock_t *rw) 196static inline int arch_write_trylock(arch_rwlock_t *rw)
197{ 197{
198 unsigned long tmp, oldval; 198 unsigned long tmp, oldval;
199 199
200 __asm__ __volatile__ ( 200 __asm__ __volatile__ (
201 "1: \n\t" 201 "1: \n\t"
202 "movli.l @%2, %0 ! __raw_write_trylock \n\t" 202 "movli.l @%2, %0 ! arch_write_trylock \n\t"
203 "mov %0, %1 \n\t" 203 "mov %0, %1 \n\t"
204 "cmp/hs %3, %0 \n\t" 204 "cmp/hs %3, %0 \n\t"
205 "bf 2f \n\t" 205 "bf 2f \n\t"
@@ -216,11 +216,11 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
216 return (oldval > (RW_LOCK_BIAS - 1)); 216 return (oldval > (RW_LOCK_BIAS - 1));
217} 217}
218 218
219#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 219#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
220#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 220#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
221 221
222#define _raw_spin_relax(lock) cpu_relax() 222#define arch_spin_relax(lock) cpu_relax()
223#define _raw_read_relax(lock) cpu_relax() 223#define arch_read_relax(lock) cpu_relax()
224#define _raw_write_relax(lock) cpu_relax() 224#define arch_write_relax(lock) cpu_relax()
225 225
226#endif /* __ASM_SH_SPINLOCK_H */ 226#endif /* __ASM_SH_SPINLOCK_H */
diff --git a/arch/sh/include/asm/spinlock_types.h b/arch/sh/include/asm/spinlock_types.h
index b4d244e7b60c..9b7560db06ca 100644
--- a/arch/sh/include/asm/spinlock_types.h
+++ b/arch/sh/include/asm/spinlock_types.h
@@ -7,15 +7,15 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int lock; 9 volatile unsigned int lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 1 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 1 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define RW_LOCK_BIAS 0x01000000 18#define RW_LOCK_BIAS 0x01000000
19#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 19#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
20 20
21#endif 21#endif
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h
index 5c8ea28ff7a4..fe9c2a1ad047 100644
--- a/arch/sh/include/asm/suspend.h
+++ b/arch/sh/include/asm/suspend.h
@@ -2,6 +2,7 @@
2#define _ASM_SH_SUSPEND_H 2#define _ASM_SH_SUSPEND_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <linux/notifier.h>
5static inline int arch_prepare_suspend(void) { return 0; } 6static inline int arch_prepare_suspend(void) { return 0; }
6 7
7#include <asm/ptrace.h> 8#include <asm/ptrace.h>
@@ -19,6 +20,69 @@ void sh_mobile_setup_cpuidle(void);
19static inline void sh_mobile_setup_cpuidle(void) {} 20static inline void sh_mobile_setup_cpuidle(void) {}
20#endif 21#endif
21 22
23/* notifier chains for pre/post sleep hooks */
24extern struct atomic_notifier_head sh_mobile_pre_sleep_notifier_list;
25extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list;
26
27/* priority levels for notifiers */
28#define SH_MOBILE_SLEEP_BOARD 0
29#define SH_MOBILE_SLEEP_CPU 1
30#define SH_MOBILE_PRE(x) (x)
31#define SH_MOBILE_POST(x) (-(x))
32
33/* board code registration function for self-refresh assembly snippets */
34void sh_mobile_register_self_refresh(unsigned long flags,
35 void *pre_start, void *pre_end,
36 void *post_start, void *post_end);
37
38/* register structure for address/data information */
39struct sh_sleep_regs {
40 unsigned long stbcr;
41 unsigned long bar;
42
43 /* MMU */
44 unsigned long pteh;
45 unsigned long ptel;
46 unsigned long ttb;
47 unsigned long tea;
48 unsigned long mmucr;
49 unsigned long ptea;
50 unsigned long pascr;
51 unsigned long irmcr;
52
53 /* Cache */
54 unsigned long ccr;
55 unsigned long ramcr;
56};
57
58/* data area for low-level sleep code */
59struct sh_sleep_data {
60 /* current sleep mode (SUSP_SH_...) */
61 unsigned long mode;
62
63 /* addresses of board specific self-refresh snippets */
64 unsigned long sf_pre;
65 unsigned long sf_post;
66
67 /* address of resume code */
68 unsigned long resume;
69
70 /* register state saved and restored by the assembly code */
71 unsigned long vbr;
72 unsigned long spc;
73 unsigned long sr;
74 unsigned long sp;
75
76 /* structure for keeping register addresses */
77 struct sh_sleep_regs addr;
78
79 /* structure for saving/restoring register state */
80 struct sh_sleep_regs data;
81};
82
83/* a bitmap of supported sleep modes (SUSP_SH..) */
84extern unsigned long sh_mobile_sleep_supported;
85
22#endif 86#endif
23 87
24/* flags passed to assembly suspend code */ 88/* flags passed to assembly suspend code */
@@ -27,5 +91,6 @@ static inline void sh_mobile_setup_cpuidle(void) {}
27#define SUSP_SH_RSTANDBY (1 << 2) /* SH-Mobile R-standby mode */ 91#define SUSP_SH_RSTANDBY (1 << 2) /* SH-Mobile R-standby mode */
28#define SUSP_SH_USTANDBY (1 << 3) /* SH-Mobile U-standby mode */ 92#define SUSP_SH_USTANDBY (1 << 3) /* SH-Mobile U-standby mode */
29#define SUSP_SH_SF (1 << 4) /* Enable self-refresh */ 93#define SUSP_SH_SF (1 << 4) /* Enable self-refresh */
94#define SUSP_SH_MMU (1 << 5) /* Save/restore MMU and cache */
30 95
31#endif /* _ASM_SH_SUSPEND_H */ 96#endif /* _ASM_SH_SUSPEND_H */
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h
index b5c5acdc8c0e..c15415b4b169 100644
--- a/arch/sh/include/asm/system.h
+++ b/arch/sh/include/asm/system.h
@@ -171,10 +171,6 @@ BUILD_TRAP_HANDLER(fpu_error);
171BUILD_TRAP_HANDLER(fpu_state_restore); 171BUILD_TRAP_HANDLER(fpu_state_restore);
172BUILD_TRAP_HANDLER(nmi); 172BUILD_TRAP_HANDLER(nmi);
173 173
174#ifdef CONFIG_BUG
175extern void handle_BUG(struct pt_regs *);
176#endif
177
178#define arch_align_stack(x) (x) 174#define arch_align_stack(x) (x)
179 175
180struct mem_access { 176struct mem_access {
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index 607d413f6168..06814f5b59c7 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -232,4 +232,33 @@ asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
232 unsigned long r6, unsigned long r7, 232 unsigned long r6, unsigned long r7,
233 struct pt_regs __regs); 233 struct pt_regs __regs);
234 234
235static inline void set_bl_bit(void)
236{
237 unsigned long __dummy0, __dummy1;
238
239 __asm__ __volatile__ (
240 "stc sr, %0\n\t"
241 "or %2, %0\n\t"
242 "and %3, %0\n\t"
243 "ldc %0, sr\n\t"
244 : "=&r" (__dummy0), "=r" (__dummy1)
245 : "r" (0x10000000), "r" (0xffffff0f)
246 : "memory"
247 );
248}
249
250static inline void clear_bl_bit(void)
251{
252 unsigned long __dummy0, __dummy1;
253
254 __asm__ __volatile__ (
255 "stc sr, %0\n\t"
256 "and %2, %0\n\t"
257 "ldc %0, sr\n\t"
258 : "=&r" (__dummy0), "=r" (__dummy1)
259 : "1" (~0x10000000)
260 : "memory"
261 );
262}
263
235#endif /* __ASM_SH_SYSTEM_32_H */ 264#endif /* __ASM_SH_SYSTEM_32_H */
diff --git a/arch/sh/include/asm/system_64.h b/arch/sh/include/asm/system_64.h
index 8e4a03e7966c..ab1dd917ea87 100644
--- a/arch/sh/include/asm/system_64.h
+++ b/arch/sh/include/asm/system_64.h
@@ -12,6 +12,7 @@
12 * License. See the file "COPYING" in the main directory of this archive 12 * License. See the file "COPYING" in the main directory of this archive
13 * for more details. 13 * for more details.
14 */ 14 */
15#include <cpu/registers.h>
15#include <asm/processor.h> 16#include <asm/processor.h>
16 17
17/* 18/*
@@ -47,4 +48,29 @@ static inline reg_size_t register_align(void *val)
47 return (unsigned long long)(signed long long)(signed long)val; 48 return (unsigned long long)(signed long long)(signed long)val;
48} 49}
49 50
51#define SR_BL_LL 0x0000000010000000LL
52
53static inline void set_bl_bit(void)
54{
55 unsigned long long __dummy0, __dummy1 = SR_BL_LL;
56
57 __asm__ __volatile__("getcon " __SR ", %0\n\t"
58 "or %0, %1, %0\n\t"
59 "putcon %0, " __SR "\n\t"
60 : "=&r" (__dummy0)
61 : "r" (__dummy1));
62
63}
64
65static inline void clear_bl_bit(void)
66{
67 unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
68
69 __asm__ __volatile__("getcon " __SR ", %0\n\t"
70 "and %0, %1, %0\n\t"
71 "putcon %0, " __SR "\n\t"
72 : "=&r" (__dummy0)
73 : "r" (__dummy1));
74}
75
50#endif /* __ASM_SH_SYSTEM_64_H */ 76#endif /* __ASM_SH_SYSTEM_64_H */
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h
index bdeb9d46d17d..1f3d927e2265 100644
--- a/arch/sh/include/asm/thread_info.h
+++ b/arch/sh/include/asm/thread_info.h
@@ -19,6 +19,7 @@ struct thread_info {
19 struct task_struct *task; /* main task structure */ 19 struct task_struct *task; /* main task structure */
20 struct exec_domain *exec_domain; /* execution domain */ 20 struct exec_domain *exec_domain; /* execution domain */
21 unsigned long flags; /* low level flags */ 21 unsigned long flags; /* low level flags */
22 __u32 status; /* thread synchronous flags */
22 __u32 cpu; 23 __u32 cpu;
23 int preempt_count; /* 0 => preemptable, <0 => BUG */ 24 int preempt_count; /* 0 => preemptable, <0 => BUG */
24 mm_segment_t addr_limit; /* thread address space */ 25 mm_segment_t addr_limit; /* thread address space */
@@ -50,6 +51,7 @@ struct thread_info {
50 .task = &tsk, \ 51 .task = &tsk, \
51 .exec_domain = &default_exec_domain, \ 52 .exec_domain = &default_exec_domain, \
52 .flags = 0, \ 53 .flags = 0, \
54 .status = 0, \
53 .cpu = 0, \ 55 .cpu = 0, \
54 .preempt_count = INIT_PREEMPT_COUNT, \ 56 .preempt_count = INIT_PREEMPT_COUNT, \
55 .addr_limit = KERNEL_DS, \ 57 .addr_limit = KERNEL_DS, \
@@ -111,13 +113,11 @@ extern void free_thread_info(struct thread_info *ti);
111#define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 113#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
112#define TIF_SIGPENDING 1 /* signal pending */ 114#define TIF_SIGPENDING 1 /* signal pending */
113#define TIF_NEED_RESCHED 2 /* rescheduling necessary */ 115#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
114#define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */
115#define TIF_SINGLESTEP 4 /* singlestepping active */ 116#define TIF_SINGLESTEP 4 /* singlestepping active */
116#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ 117#define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */
117#define TIF_SECCOMP 6 /* secure computing */ 118#define TIF_SECCOMP 6 /* secure computing */
118#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ 119#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
119#define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */ 120#define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */
120#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
121#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 121#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
122#define TIF_MEMDIE 18 122#define TIF_MEMDIE 18
123#define TIF_FREEZE 19 /* Freezing for suspend */ 123#define TIF_FREEZE 19 /* Freezing for suspend */
@@ -125,13 +125,11 @@ extern void free_thread_info(struct thread_info *ti);
125#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 125#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
126#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 126#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
127#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 127#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
128#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
129#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 128#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
130#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 129#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
131#define _TIF_SECCOMP (1 << TIF_SECCOMP) 130#define _TIF_SECCOMP (1 << TIF_SECCOMP)
132#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 131#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
133#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) 132#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT)
134#define _TIF_USEDFPU (1 << TIF_USEDFPU)
135#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 133#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
136#define _TIF_FREEZE (1 << TIF_FREEZE) 134#define _TIF_FREEZE (1 << TIF_FREEZE)
137 135
@@ -149,13 +147,33 @@ extern void free_thread_info(struct thread_info *ti);
149/* work to do on any return to u-space */ 147/* work to do on any return to u-space */
150#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ 148#define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \
151 _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ 149 _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \
152 _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ 150 _TIF_SINGLESTEP | _TIF_NOTIFY_RESUME | \
153 _TIF_NOTIFY_RESUME | _TIF_SYSCALL_TRACEPOINT) 151 _TIF_SYSCALL_TRACEPOINT)
154 152
155/* work to do on interrupt/exception return */ 153/* work to do on interrupt/exception return */
156#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ 154#define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \
157 _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP)) 155 _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP))
158 156
157/*
158 * Thread-synchronous status.
159 *
160 * This is different from the flags in that nobody else
161 * ever touches our thread-synchronous status, so we don't
162 * have to worry about atomic accesses.
163 */
164#define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */
165#define TS_USEDFPU 0x0002 /* FPU used by this task this quantum */
166
167#ifndef __ASSEMBLY__
168#define HAVE_SET_RESTORE_SIGMASK 1
169static inline void set_restore_sigmask(void)
170{
171 struct thread_info *ti = current_thread_info();
172 ti->status |= TS_RESTORE_SIGMASK;
173 set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
174}
175#endif /* !__ASSEMBLY__ */
176
159#endif /* __KERNEL__ */ 177#endif /* __KERNEL__ */
160 178
161#endif /* __ASM_SH_THREAD_INFO_H */ 179#endif /* __ASM_SH_THREAD_INFO_H */
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
index 65e7bd2f2240..37cdadd975ac 100644
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -40,6 +40,14 @@
40 40
41#endif 41#endif
42 42
43#define mc_capable() (1)
44
45const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
46
47extern cpumask_t cpu_core_map[NR_CPUS];
48
49#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
50
43#include <asm-generic/topology.h> 51#include <asm-generic/topology.h>
44 52
45#endif /* _ASM_SH_TOPOLOGY_H */ 53#endif /* _ASM_SH_TOPOLOGY_H */
diff --git a/arch/sh/include/asm/ubc.h b/arch/sh/include/asm/ubc.h
index 4ca4b7717371..9bf961684431 100644
--- a/arch/sh/include/asm/ubc.h
+++ b/arch/sh/include/asm/ubc.h
@@ -60,16 +60,5 @@
60#define BRCR_UBDE (1 << 0) 60#define BRCR_UBDE (1 << 0)
61#endif 61#endif
62 62
63#ifndef __ASSEMBLY__
64/* arch/sh/kernel/cpu/ubc.S */
65extern void ubc_sleep(void);
66
67#ifdef CONFIG_UBC_WAKEUP
68extern void ubc_wakeup(void);
69#else
70#define ubc_wakeup() do { } while (0)
71#endif
72#endif
73
74#endif /* __KERNEL__ */ 63#endif /* __KERNEL__ */
75#endif /* __ASM_SH_UBC_H */ 64#endif /* __ASM_SH_UBC_H */
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h
index f3fd1b9eb6b1..f18c4f9baf27 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/asm/unistd_32.h
@@ -345,8 +345,9 @@
345#define __NR_pwritev 334 345#define __NR_pwritev 334
346#define __NR_rt_tgsigqueueinfo 335 346#define __NR_rt_tgsigqueueinfo 335
347#define __NR_perf_event_open 336 347#define __NR_perf_event_open 336
348#define __NR_recvmmsg 337
348 349
349#define NR_syscalls 337 350#define NR_syscalls 338
350 351
351#ifdef __KERNEL__ 352#ifdef __KERNEL__
352 353
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h
index 343ce8f073ea..3e7645d11130 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/asm/unistd_64.h
@@ -385,10 +385,11 @@
385#define __NR_pwritev 362 385#define __NR_pwritev 362
386#define __NR_rt_tgsigqueueinfo 363 386#define __NR_rt_tgsigqueueinfo 363
387#define __NR_perf_event_open 364 387#define __NR_perf_event_open 364
388#define __NR_recvmmsg 365
388 389
389#ifdef __KERNEL__ 390#ifdef __KERNEL__
390 391
391#define NR_syscalls 365 392#define NR_syscalls 366
392 393
393#define __ARCH_WANT_IPC_PARSE_VERSION 394#define __ARCH_WANT_IPC_PARSE_VERSION
394#define __ARCH_WANT_OLD_READDIR 395#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/sh/include/asm/watchdog.h b/arch/sh/include/asm/watchdog.h
index 2fe7cee9e43a..19dfff5c8511 100644
--- a/arch/sh/include/asm/watchdog.h
+++ b/arch/sh/include/asm/watchdog.h
@@ -2,6 +2,8 @@
2 * include/asm-sh/watchdog.h 2 * include/asm-sh/watchdog.h
3 * 3 *
4 * Copyright (C) 2002, 2003 Paul Mundt 4 * Copyright (C) 2002, 2003 Paul Mundt
5 * Copyright (C) 2009 Siemens AG
6 * Copyright (C) 2009 Valentin Sitdikov
5 * 7 *
6 * This program is free software; you can redistribute it and/or modify it 8 * 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 9 * under the terms of the GNU General Public License as published by the
@@ -61,6 +63,61 @@
61#define WTCSR_CKS_2048 0x06 63#define WTCSR_CKS_2048 0x06
62#define WTCSR_CKS_4096 0x07 64#define WTCSR_CKS_4096 0x07
63 65
66#if defined(CONFIG_CPU_SUBTYPE_SH7785) || defined(CONFIG_CPU_SUBTYPE_SH7780)
67/**
68 * sh_wdt_read_cnt - Read from Counter
69 * Reads back the WTCNT value.
70 */
71static inline __u32 sh_wdt_read_cnt(void)
72{
73 return ctrl_inl(WTCNT_R);
74}
75
76/**
77 * sh_wdt_write_cnt - Write to Counter
78 * @val: Value to write
79 *
80 * Writes the given value @val to the lower byte of the timer counter.
81 * The upper byte is set manually on each write.
82 */
83static inline void sh_wdt_write_cnt(__u32 val)
84{
85 ctrl_outl((WTCNT_HIGH << 24) | (__u32)val, WTCNT);
86}
87
88/**
89 * sh_wdt_write_bst - Write to Counter
90 * @val: Value to write
91 *
92 * Writes the given value @val to the lower byte of the timer counter.
93 * The upper byte is set manually on each write.
94 */
95static inline void sh_wdt_write_bst(__u32 val)
96{
97 ctrl_outl((WTBST_HIGH << 24) | (__u32)val, WTBST);
98}
99/**
100 * sh_wdt_read_csr - Read from Control/Status Register
101 *
102 * Reads back the WTCSR value.
103 */
104static inline __u32 sh_wdt_read_csr(void)
105{
106 return ctrl_inl(WTCSR_R);
107}
108
109/**
110 * sh_wdt_write_csr - Write to Control/Status Register
111 * @val: Value to write
112 *
113 * Writes the given value @val to the lower byte of the control/status
114 * register. The upper byte is set manually on each write.
115 */
116static inline void sh_wdt_write_csr(__u32 val)
117{
118 ctrl_outl((WTCSR_HIGH << 24) | (__u32)val, WTCSR);
119}
120#else
64/** 121/**
65 * sh_wdt_read_cnt - Read from Counter 122 * sh_wdt_read_cnt - Read from Counter
66 * Reads back the WTCNT value. 123 * Reads back the WTCNT value.
@@ -103,6 +160,6 @@ static inline void sh_wdt_write_csr(__u8 val)
103{ 160{
104 ctrl_outw((WTCSR_HIGH << 8) | (__u16)val, WTCSR); 161 ctrl_outw((WTCSR_HIGH << 8) | (__u16)val, WTCSR);
105} 162}
106 163#endif /* CONFIG_CPU_SUBTYPE_SH7785 || CONFIG_CPU_SUBTYPE_SH7780 */
107#endif /* __KERNEL__ */ 164#endif /* __KERNEL__ */
108#endif /* __ASM_SH_WATCHDOG_H */ 165#endif /* __ASM_SH_WATCHDOG_H */
diff --git a/arch/sh/include/cpu-sh4/cpu/watchdog.h b/arch/sh/include/cpu-sh4/cpu/watchdog.h
index 259f6a0ce23d..7672301d0c70 100644
--- a/arch/sh/include/cpu-sh4/cpu/watchdog.h
+++ b/arch/sh/include/cpu-sh4/cpu/watchdog.h
@@ -2,6 +2,8 @@
2 * include/asm-sh/cpu-sh4/watchdog.h 2 * include/asm-sh/cpu-sh4/watchdog.h
3 * 3 *
4 * Copyright (C) 2002, 2003 Paul Mundt 4 * Copyright (C) 2002, 2003 Paul Mundt
5 * Copyright (C) 2009 Siemens AG
6 * Copyright (C) 2009 Sitdikov Valentin
5 * 7 *
6 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
@@ -10,9 +12,20 @@
10#ifndef __ASM_CPU_SH4_WATCHDOG_H 12#ifndef __ASM_CPU_SH4_WATCHDOG_H
11#define __ASM_CPU_SH4_WATCHDOG_H 13#define __ASM_CPU_SH4_WATCHDOG_H
12 14
15#if defined(CONFIG_CPU_SUBTYPE_SH7785) || defined(CONFIG_CPU_SUBTYPE_SH7780)
16/* Prefix definition */
17#define WTBST_HIGH 0x55
18/* Register definitions */
19#define WTCNT_R 0xffcc0010 /*WDTCNT*/
20#define WTCSR 0xffcc0004 /*WDTCSR*/
21#define WTCNT 0xffcc0000 /*WDTST*/
22#define WTST WTCNT
23#define WTBST 0xffcc0008 /*WDTBST*/
24#else
13/* Register definitions */ 25/* Register definitions */
14#define WTCNT 0xffc00008 26#define WTCNT 0xffc00008
15#define WTCSR 0xffc0000c 27#define WTCSR 0xffc0000c
28#endif
16 29
17/* Bit definitions */ 30/* Bit definitions */
18#define WTCSR_TME 0x80 31#define WTCSR_TME 0x80
diff --git a/arch/sh/include/mach-common/mach/titan.h b/arch/sh/include/mach-common/mach/titan.h
index 03f3583c8918..4a674d27cbb8 100644
--- a/arch/sh/include/mach-common/mach/titan.h
+++ b/arch/sh/include/mach-common/mach/titan.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Platform defintions for Titan 2 * Platform definitions for Titan
3 */ 3 */
4#ifndef _ASM_SH_TITAN_H 4#ifndef _ASM_SH_TITAN_H
5#define _ASM_SH_TITAN_H 5#define _ASM_SH_TITAN_H
diff --git a/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt b/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
index 8b8e4fa1fee9..cc737b807334 100644
--- a/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
+++ b/arch/sh/include/mach-ecovec24/mach/partner-jet-setup.txt
@@ -22,13 +22,12 @@ ED 0xff000010, 0x00000004
22LIST "setup clocks" 22LIST "setup clocks"
23ED 0xa4150024, 0x00004000 23ED 0xa4150024, 0x00004000
24ED 0xa4150000, 0x8E003508 24ED 0xa4150000, 0x8E003508
25ED 0xa4150004, 0x00000000
26 25
27WAIT 1 26WAIT 1
28 27
29LIST "BSC" 28LIST "BSC"
30ED 0xff800020, 0xa5a50000 29ED 0xff800020, 0xa5a50000
31ED 0xfec10000, 0x00000013 30ED 0xfec10000, 0x00001013
32ED 0xfec10004, 0x11110400 31ED 0xfec10004, 0x11110400
33ED 0xfec10024, 0x00000440 32ED 0xfec10024, 0x00000440
34 33
diff --git a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
index 174374e19547..484ef42c2fb5 100644
--- a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
+++ b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
@@ -8,6 +8,8 @@ void kfr2r09_lcd_on(void *board_data);
8void kfr2r09_lcd_off(void *board_data); 8void kfr2r09_lcd_off(void *board_data);
9int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle, 9int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
11void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
12 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
11#else 13#else
12static inline void kfr2r09_lcd_on(void *board_data) {} 14static inline void kfr2r09_lcd_on(void *board_data) {}
13static inline void kfr2r09_lcd_off(void *board_data) {} 15static inline void kfr2r09_lcd_off(void *board_data) {}
@@ -16,6 +18,10 @@ static inline int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
16{ 18{
17 return -ENODEV; 19 return -ENODEV;
18} 20}
21static inline void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
22 struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
23{
24}
19#endif 25#endif
20 26
21#endif /* __ASM_SH_KFR2R09_H */ 27#endif /* __ASM_SH_KFR2R09_H */
diff --git a/arch/sh/include/mach-se/mach/se7722.h b/arch/sh/include/mach-se/mach/se7722.h
index e971d9a82f4a..16505bfb8a9e 100644
--- a/arch/sh/include/mach-se/mach/se7722.h
+++ b/arch/sh/include/mach-se/mach/se7722.h
@@ -92,18 +92,11 @@
92#define SE7722_FPGA_IRQ_MRSHPC1 3 /* IRQ1 */ 92#define SE7722_FPGA_IRQ_MRSHPC1 3 /* IRQ1 */
93#define SE7722_FPGA_IRQ_MRSHPC2 4 /* IRQ1 */ 93#define SE7722_FPGA_IRQ_MRSHPC2 4 /* IRQ1 */
94#define SE7722_FPGA_IRQ_MRSHPC3 5 /* IRQ1 */ 94#define SE7722_FPGA_IRQ_MRSHPC3 5 /* IRQ1 */
95
96#define SE7722_FPGA_IRQ_NR 6 95#define SE7722_FPGA_IRQ_NR 6
97#define SE7722_FPGA_IRQ_BASE 110
98
99#define MRSHPC_IRQ3 (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_MRSHPC3)
100#define MRSHPC_IRQ2 (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_MRSHPC2)
101#define MRSHPC_IRQ1 (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_MRSHPC1)
102#define MRSHPC_IRQ0 (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_MRSHPC0)
103#define SMC_IRQ (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_SMC)
104#define USB_IRQ (SE7722_FPGA_IRQ_BASE + SE7722_FPGA_IRQ_USB)
105 96
106/* arch/sh/boards/se/7722/irq.c */ 97/* arch/sh/boards/se/7722/irq.c */
98extern unsigned int se7722_fpga_irq[];
99
107void init_se7722_IRQ(void); 100void init_se7722_IRQ(void);
108 101
109#define __IO_PREFIX se7722 102#define __IO_PREFIX se7722
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
index a2d0a40f3848..0d587da1ef12 100644
--- a/arch/sh/kernel/Makefile
+++ b/arch/sh/kernel/Makefile
@@ -9,8 +9,12 @@ ifdef CONFIG_FUNCTION_TRACER
9CFLAGS_REMOVE_ftrace.o = -pg 9CFLAGS_REMOVE_ftrace.o = -pg
10endif 10endif
11 11
12obj-y := debugtraps.o dumpstack.o idle.o io.o io_generic.o irq.o \ 12CFLAGS_REMOVE_return_address.o = -pg
13 machvec.o nmi_debug.o process_$(BITS).o ptrace_$(BITS).o \ 13
14obj-y := debugtraps.o dma-nommu.o dumpstack.o \
15 idle.o io.o io_generic.o irq.o \
16 irq_$(BITS).o machvec.o nmi_debug.o process_$(BITS).o \
17 ptrace_$(BITS).o return_address.o \
14 setup.o signal_$(BITS).o sys_sh.o sys_sh$(BITS).o \ 18 setup.o signal_$(BITS).o sys_sh.o sys_sh$(BITS).o \
15 syscalls_$(BITS).o time.o topology.o traps.o \ 19 syscalls_$(BITS).o time.o topology.o traps.o \
16 traps_$(BITS).o unwinder.o 20 traps_$(BITS).o unwinder.o
@@ -18,23 +22,22 @@ obj-y := debugtraps.o dumpstack.o idle.o io.o io_generic.o irq.o \
18obj-y += cpu/ 22obj-y += cpu/
19obj-$(CONFIG_VSYSCALL) += vsyscall/ 23obj-$(CONFIG_VSYSCALL) += vsyscall/
20obj-$(CONFIG_SMP) += smp.o 24obj-$(CONFIG_SMP) += smp.o
21obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o 25obj-$(CONFIG_SH_STANDARD_BIOS) += sh_bios.o early_printk.o
22obj-$(CONFIG_KGDB) += kgdb.o 26obj-$(CONFIG_KGDB) += kgdb.o
23obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o 27obj-$(CONFIG_SH_CPU_FREQ) += cpufreq.o
24obj-$(CONFIG_MODULES) += sh_ksyms_$(BITS).o module.o 28obj-$(CONFIG_MODULES) += sh_ksyms_$(BITS).o module.o
25obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
26obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 29obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
27obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 30obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
28obj-$(CONFIG_STACKTRACE) += stacktrace.o 31obj-$(CONFIG_STACKTRACE) += stacktrace.o
29obj-$(CONFIG_IO_TRAPPED) += io_trapped.o 32obj-$(CONFIG_IO_TRAPPED) += io_trapped.o
30obj-$(CONFIG_KPROBES) += kprobes.o 33obj-$(CONFIG_KPROBES) += kprobes.o
31obj-$(CONFIG_GENERIC_GPIO) += gpio.o
32obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 34obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
33obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o 35obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
34obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 36obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
35obj-$(CONFIG_DUMP_CODE) += disassemble.o 37obj-$(CONFIG_DUMP_CODE) += disassemble.o
36obj-$(CONFIG_HIBERNATION) += swsusp.o 38obj-$(CONFIG_HIBERNATION) += swsusp.o
37obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o 39obj-$(CONFIG_DWARF_UNWINDER) += dwarf.o
40obj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_callchain.o
38 41
39obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o 42obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += localtimer.o
40 43
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c
index d218e808294e..08a2be775b6c 100644
--- a/arch/sh/kernel/asm-offsets.c
+++ b/arch/sh/kernel/asm-offsets.c
@@ -34,5 +34,28 @@ int main(void)
34 DEFINE(PBE_NEXT, offsetof(struct pbe, next)); 34 DEFINE(PBE_NEXT, offsetof(struct pbe, next));
35 DEFINE(SWSUSP_ARCH_REGS_SIZE, sizeof(struct swsusp_arch_regs)); 35 DEFINE(SWSUSP_ARCH_REGS_SIZE, sizeof(struct swsusp_arch_regs));
36#endif 36#endif
37
38 DEFINE(SH_SLEEP_MODE, offsetof(struct sh_sleep_data, mode));
39 DEFINE(SH_SLEEP_SF_PRE, offsetof(struct sh_sleep_data, sf_pre));
40 DEFINE(SH_SLEEP_SF_POST, offsetof(struct sh_sleep_data, sf_post));
41 DEFINE(SH_SLEEP_RESUME, offsetof(struct sh_sleep_data, resume));
42 DEFINE(SH_SLEEP_VBR, offsetof(struct sh_sleep_data, vbr));
43 DEFINE(SH_SLEEP_SPC, offsetof(struct sh_sleep_data, spc));
44 DEFINE(SH_SLEEP_SR, offsetof(struct sh_sleep_data, sr));
45 DEFINE(SH_SLEEP_SP, offsetof(struct sh_sleep_data, sp));
46 DEFINE(SH_SLEEP_BASE_ADDR, offsetof(struct sh_sleep_data, addr));
47 DEFINE(SH_SLEEP_BASE_DATA, offsetof(struct sh_sleep_data, data));
48 DEFINE(SH_SLEEP_REG_STBCR, offsetof(struct sh_sleep_regs, stbcr));
49 DEFINE(SH_SLEEP_REG_BAR, offsetof(struct sh_sleep_regs, bar));
50 DEFINE(SH_SLEEP_REG_PTEH, offsetof(struct sh_sleep_regs, pteh));
51 DEFINE(SH_SLEEP_REG_PTEL, offsetof(struct sh_sleep_regs, ptel));
52 DEFINE(SH_SLEEP_REG_TTB, offsetof(struct sh_sleep_regs, ttb));
53 DEFINE(SH_SLEEP_REG_TEA, offsetof(struct sh_sleep_regs, tea));
54 DEFINE(SH_SLEEP_REG_MMUCR, offsetof(struct sh_sleep_regs, mmucr));
55 DEFINE(SH_SLEEP_REG_PTEA, offsetof(struct sh_sleep_regs, ptea));
56 DEFINE(SH_SLEEP_REG_PASCR, offsetof(struct sh_sleep_regs, pascr));
57 DEFINE(SH_SLEEP_REG_IRMCR, offsetof(struct sh_sleep_regs, irmcr));
58 DEFINE(SH_SLEEP_REG_CCR, offsetof(struct sh_sleep_regs, ccr));
59 DEFINE(SH_SLEEP_REG_RAMCR, offsetof(struct sh_sleep_regs, ramcr));
37 return 0; 60 return 0;
38} 61}
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile
index 3d6b9312dc47..d97c803719ec 100644
--- a/arch/sh/kernel/cpu/Makefile
+++ b/arch/sh/kernel/cpu/Makefile
@@ -15,7 +15,6 @@ obj-$(CONFIG_ARCH_SHMOBILE) += shmobile/
15 15
16# Common interfaces. 16# Common interfaces.
17 17
18obj-$(CONFIG_UBC_WAKEUP) += ubc.o
19obj-$(CONFIG_SH_ADC) += adc.o 18obj-$(CONFIG_SH_ADC) += adc.o
20obj-$(CONFIG_SH_CLK_CPG) += clock-cpg.o 19obj-$(CONFIG_SH_CLK_CPG) += clock-cpg.o
21 20
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index e932ebef4738..89b4b76c0d76 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -75,16 +75,11 @@ static void __init expmask_init(void)
75 /* 75 /*
76 * Future proofing. 76 * Future proofing.
77 * 77 *
78 * Disable support for slottable sleep instruction 78 * Disable support for slottable sleep instruction, non-nop
79 * and non-nop instructions in the rte delay slot. 79 * instructions in the rte delay slot, and associative writes to
80 * the memory-mapped cache array.
80 */ 81 */
81 expmask &= ~(EXPMASK_RTEDS | EXPMASK_BRDSSLP); 82 expmask &= ~(EXPMASK_RTEDS | EXPMASK_BRDSSLP | EXPMASK_MMCAW);
82
83 /*
84 * Enable associative writes to the memory-mapped cache array
85 * until the cache flush ops have been rewritten.
86 */
87 expmask |= EXPMASK_MMCAW;
88 83
89 __raw_writel(expmask, EXPMASK); 84 __raw_writel(expmask, EXPMASK);
90 ctrl_barrier(); 85 ctrl_barrier();
@@ -311,12 +306,12 @@ asmlinkage void __init sh_cpu_init(void)
311 if (fpu_disabled) { 306 if (fpu_disabled) {
312 printk("FPU Disabled\n"); 307 printk("FPU Disabled\n");
313 current_cpu_data.flags &= ~CPU_HAS_FPU; 308 current_cpu_data.flags &= ~CPU_HAS_FPU;
314 disable_fpu();
315 } 309 }
316 310
317 /* FPU initialization */ 311 /* FPU initialization */
312 disable_fpu();
318 if ((current_cpu_data.flags & CPU_HAS_FPU)) { 313 if ((current_cpu_data.flags & CPU_HAS_FPU)) {
319 clear_thread_flag(TIF_USEDFPU); 314 current_thread_info()->status &= ~TS_USEDFPU;
320 clear_used_math(); 315 clear_used_math();
321 } 316 }
322 317
@@ -338,17 +333,6 @@ asmlinkage void __init sh_cpu_init(void)
338 } 333 }
339#endif 334#endif
340 335
341 /*
342 * Some brain-damaged loaders decided it would be a good idea to put
343 * the UBC to sleep. This causes some issues when it comes to things
344 * like PTRACE_SINGLESTEP or doing hardware watchpoints in GDB. So ..
345 * we wake it up and hope that all is well.
346 */
347#ifdef CONFIG_SUPERH32
348 if (raw_smp_processor_id() == 0)
349 ubc_wakeup();
350#endif
351
352 speculative_execution_init(); 336 speculative_execution_init();
353 expmask_init(); 337 expmask_init();
354} 338}
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index c1508a90fc6a..9282d965a1b6 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -17,16 +17,17 @@
17 * for more details. 17 * for more details.
18 */ 18 */
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/interrupt.h>
21#include <linux/io.h>
20#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/kernel.h>
21#include <linux/module.h> 24#include <linux/module.h>
22#include <linux/io.h>
23#include <linux/interrupt.h>
24#include <linux/topology.h> 25#include <linux/topology.h>
25 26
26static inline struct ipr_desc *get_ipr_desc(unsigned int irq) 27static inline struct ipr_desc *get_ipr_desc(unsigned int irq)
27{ 28{
28 struct irq_chip *chip = get_irq_chip(irq); 29 struct irq_chip *chip = get_irq_chip(irq);
29 return (void *)((char *)chip - offsetof(struct ipr_desc, chip)); 30 return container_of(chip, struct ipr_desc, chip);
30} 31}
31 32
32static void disable_ipr_irq(unsigned int irq) 33static void disable_ipr_irq(unsigned int irq)
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index 8555c05e8667..114c7cee7184 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -59,32 +59,48 @@ static struct intc_prio_reg prio_registers[] __initdata = {
59static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL, 59static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL,
60 NULL, prio_registers, NULL); 60 NULL, prio_registers, NULL);
61 61
62static struct plat_sci_port sci_platform_data[] = { 62static struct plat_sci_port scif0_platform_data = {
63 { 63 .mapbase = 0xf8400000,
64 .mapbase = 0xf8400000, 64 .flags = UPF_BOOT_AUTOCONF,
65 .flags = UPF_BOOT_AUTOCONF, 65 .type = PORT_SCIF,
66 .type = PORT_SCIF, 66 .irqs = { 88, 88, 88, 88 },
67 .irqs = { 88, 88, 88, 88 }, 67};
68 }, { 68
69 .mapbase = 0xf8410000, 69static struct platform_device scif0_device = {
70 .flags = UPF_BOOT_AUTOCONF, 70 .name = "sh-sci",
71 .type = PORT_SCIF, 71 .id = 0,
72 .irqs = { 92, 92, 92, 92 }, 72 .dev = {
73 }, { 73 .platform_data = &scif0_platform_data,
74 .mapbase = 0xf8420000, 74 },
75 .flags = UPF_BOOT_AUTOCONF, 75};
76 .type = PORT_SCIF, 76
77 .irqs = { 96, 96, 96, 96 }, 77static struct plat_sci_port scif1_platform_data = {
78 }, { 78 .mapbase = 0xf8410000,
79 .flags = 0, 79 .flags = UPF_BOOT_AUTOCONF,
80 } 80 .type = PORT_SCIF,
81}; 81 .irqs = { 92, 92, 92, 92 },
82 82};
83static struct platform_device sci_device = { 83
84static struct platform_device scif1_device = {
85 .name = "sh-sci",
86 .id = 1,
87 .dev = {
88 .platform_data = &scif1_platform_data,
89 },
90};
91
92static struct plat_sci_port scif2_platform_data = {
93 .mapbase = 0xf8420000,
94 .flags = UPF_BOOT_AUTOCONF,
95 .type = PORT_SCIF,
96 .irqs = { 96, 96, 96, 96 },
97};
98
99static struct platform_device scif2_device = {
84 .name = "sh-sci", 100 .name = "sh-sci",
85 .id = -1, 101 .id = 2,
86 .dev = { 102 .dev = {
87 .platform_data = sci_platform_data, 103 .platform_data = &scif2_platform_data,
88 }, 104 },
89}; 105};
90 106
@@ -176,7 +192,9 @@ static struct platform_device cmt1_device = {
176}; 192};
177 193
178static struct platform_device *sh7619_devices[] __initdata = { 194static struct platform_device *sh7619_devices[] __initdata = {
179 &sci_device, 195 &scif0_device,
196 &scif1_device,
197 &scif2_device,
180 &eth_device, 198 &eth_device,
181 &cmt0_device, 199 &cmt0_device,
182 &cmt1_device, 200 &cmt1_device,
@@ -195,6 +213,9 @@ void __init plat_irq_setup(void)
195} 213}
196 214
197static struct platform_device *sh7619_early_devices[] __initdata = { 215static struct platform_device *sh7619_early_devices[] __initdata = {
216 &scif0_device,
217 &scif1_device,
218 &scif2_device,
198 &cmt0_device, 219 &cmt0_device,
199 &cmt1_device, 220 &cmt1_device,
200}; 221};
diff --git a/arch/sh/kernel/cpu/sh2a/fpu.c b/arch/sh/kernel/cpu/sh2a/fpu.c
index 6df2fb98eb30..d395ce5740e7 100644
--- a/arch/sh/kernel/cpu/sh2a/fpu.c
+++ b/arch/sh/kernel/cpu/sh2a/fpu.c
@@ -25,14 +25,12 @@
25 25
26/* 26/*
27 * Save FPU registers onto task structure. 27 * Save FPU registers onto task structure.
28 * Assume called with FPU enabled (SR.FD=0).
29 */ 28 */
30void 29void
31save_fpu(struct task_struct *tsk, struct pt_regs *regs) 30save_fpu(struct task_struct *tsk)
32{ 31{
33 unsigned long dummy; 32 unsigned long dummy;
34 33
35 clear_tsk_thread_flag(tsk, TIF_USEDFPU);
36 enable_fpu(); 34 enable_fpu();
37 asm volatile("sts.l fpul, @-%0\n\t" 35 asm volatile("sts.l fpul, @-%0\n\t"
38 "sts.l fpscr, @-%0\n\t" 36 "sts.l fpscr, @-%0\n\t"
@@ -60,7 +58,6 @@ save_fpu(struct task_struct *tsk, struct pt_regs *regs)
60 : "memory"); 58 : "memory");
61 59
62 disable_fpu(); 60 disable_fpu();
63 release_fpu(regs);
64} 61}
65 62
66static void 63static void
@@ -598,31 +595,31 @@ BUILD_TRAP_HANDLER(fpu_error)
598 struct task_struct *tsk = current; 595 struct task_struct *tsk = current;
599 TRAP_HANDLER_DECL; 596 TRAP_HANDLER_DECL;
600 597
601 save_fpu(tsk, regs); 598 __unlazy_fpu(tsk, regs);
602 if (ieee_fpe_handler(regs)) { 599 if (ieee_fpe_handler(regs)) {
603 tsk->thread.fpu.hard.fpscr &= 600 tsk->thread.fpu.hard.fpscr &=
604 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); 601 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
605 grab_fpu(regs); 602 grab_fpu(regs);
606 restore_fpu(tsk); 603 restore_fpu(tsk);
607 set_tsk_thread_flag(tsk, TIF_USEDFPU); 604 task_thread_info(tsk)->status |= TS_USEDFPU;
608 return; 605 return;
609 } 606 }
610 607
611 force_sig(SIGFPE, tsk); 608 force_sig(SIGFPE, tsk);
612} 609}
613 610
614BUILD_TRAP_HANDLER(fpu_state_restore) 611void fpu_state_restore(struct pt_regs *regs)
615{ 612{
616 struct task_struct *tsk = current; 613 struct task_struct *tsk = current;
617 TRAP_HANDLER_DECL;
618 614
619 grab_fpu(regs); 615 grab_fpu(regs);
620 if (!user_mode(regs)) { 616 if (unlikely(!user_mode(regs))) {
621 printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); 617 printk(KERN_ERR "BUG: FPU is used in kernel mode.\n");
618 BUG();
622 return; 619 return;
623 } 620 }
624 621
625 if (used_math()) { 622 if (likely(used_math())) {
626 /* Using the FPU again. */ 623 /* Using the FPU again. */
627 restore_fpu(tsk); 624 restore_fpu(tsk);
628 } else { 625 } else {
@@ -630,5 +627,13 @@ BUILD_TRAP_HANDLER(fpu_state_restore)
630 fpu_init(); 627 fpu_init();
631 set_used_math(); 628 set_used_math();
632 } 629 }
633 set_tsk_thread_flag(tsk, TIF_USEDFPU); 630 task_thread_info(tsk)->status |= TS_USEDFPU;
631 tsk->fpu_counter++;
632}
633
634BUILD_TRAP_HANDLER(fpu_state_restore)
635{
636 TRAP_HANDLER_DECL;
637
638 fpu_state_restore(regs);
634} 639}
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
index b67376445315..8f669dc9b0da 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
@@ -207,27 +207,23 @@ static struct platform_device mtu2_2_device = {
207 .num_resources = ARRAY_SIZE(mtu2_2_resources), 207 .num_resources = ARRAY_SIZE(mtu2_2_resources),
208}; 208};
209 209
210static struct plat_sci_port sci_platform_data[] = { 210static struct plat_sci_port scif0_platform_data = {
211 { 211 .mapbase = 0xff804000,
212 .mapbase = 0xff804000, 212 .flags = UPF_BOOT_AUTOCONF,
213 .flags = UPF_BOOT_AUTOCONF, 213 .type = PORT_SCIF,
214 .type = PORT_SCIF, 214 .irqs = { 220, 220, 220, 220 },
215 .irqs = { 220, 220, 220, 220 },
216 }, {
217 .flags = 0,
218 }
219}; 215};
220 216
221static struct platform_device sci_device = { 217static struct platform_device scif0_device = {
222 .name = "sh-sci", 218 .name = "sh-sci",
223 .id = -1, 219 .id = 0,
224 .dev = { 220 .dev = {
225 .platform_data = sci_platform_data, 221 .platform_data = &scif0_platform_data,
226 }, 222 },
227}; 223};
228 224
229static struct platform_device *mxg_devices[] __initdata = { 225static struct platform_device *mxg_devices[] __initdata = {
230 &sci_device, 226 &scif0_device,
231 &mtu2_0_device, 227 &mtu2_0_device,
232 &mtu2_1_device, 228 &mtu2_1_device,
233 &mtu2_2_device, 229 &mtu2_2_device,
@@ -246,6 +242,7 @@ void __init plat_irq_setup(void)
246} 242}
247 243
248static struct platform_device *mxg_early_devices[] __initdata = { 244static struct platform_device *mxg_early_devices[] __initdata = {
245 &scif0_device,
249 &mtu2_0_device, 246 &mtu2_0_device,
250 &mtu2_1_device, 247 &mtu2_1_device,
251 &mtu2_2_device, 248 &mtu2_2_device,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
index fbde5b75deb9..4ccfeb59eb1a 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
@@ -177,57 +177,123 @@ static struct intc_mask_reg mask_registers[] __initdata = {
177static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups, 177static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups,
178 mask_registers, prio_registers, NULL); 178 mask_registers, prio_registers, NULL);
179 179
180static struct plat_sci_port sci_platform_data[] = { 180static struct plat_sci_port scif0_platform_data = {
181 { 181 .mapbase = 0xfffe8000,
182 .mapbase = 0xfffe8000, 182 .flags = UPF_BOOT_AUTOCONF,
183 .flags = UPF_BOOT_AUTOCONF, 183 .type = PORT_SCIF,
184 .type = PORT_SCIF, 184 .irqs = { 180, 180, 180, 180 }
185 .irqs = { 180, 180, 180, 180 } 185};
186 }, { 186
187 .mapbase = 0xfffe8800, 187static struct platform_device scif0_device = {
188 .flags = UPF_BOOT_AUTOCONF,
189 .type = PORT_SCIF,
190 .irqs = { 184, 184, 184, 184 }
191 }, {
192 .mapbase = 0xfffe9000,
193 .flags = UPF_BOOT_AUTOCONF,
194 .type = PORT_SCIF,
195 .irqs = { 188, 188, 188, 188 }
196 }, {
197 .mapbase = 0xfffe9800,
198 .flags = UPF_BOOT_AUTOCONF,
199 .type = PORT_SCIF,
200 .irqs = { 192, 192, 192, 192 }
201 }, {
202 .mapbase = 0xfffea000,
203 .flags = UPF_BOOT_AUTOCONF,
204 .type = PORT_SCIF,
205 .irqs = { 196, 196, 196, 196 }
206 }, {
207 .mapbase = 0xfffea800,
208 .flags = UPF_BOOT_AUTOCONF,
209 .type = PORT_SCIF,
210 .irqs = { 200, 200, 200, 200 }
211 }, {
212 .mapbase = 0xfffeb000,
213 .flags = UPF_BOOT_AUTOCONF,
214 .type = PORT_SCIF,
215 .irqs = { 204, 204, 204, 204 }
216 }, {
217 .mapbase = 0xfffeb800,
218 .flags = UPF_BOOT_AUTOCONF,
219 .type = PORT_SCIF,
220 .irqs = { 208, 208, 208, 208 }
221 }, {
222 .flags = 0,
223 }
224};
225
226static struct platform_device sci_device = {
227 .name = "sh-sci", 188 .name = "sh-sci",
228 .id = -1, 189 .id = 0,
190 .dev = {
191 .platform_data = &scif0_platform_data,
192 },
193};
194
195static struct plat_sci_port scif1_platform_data = {
196 .mapbase = 0xfffe8800,
197 .flags = UPF_BOOT_AUTOCONF,
198 .type = PORT_SCIF,
199 .irqs = { 184, 184, 184, 184 }
200};
201
202static struct platform_device scif1_device = {
203 .name = "sh-sci",
204 .id = 1,
205 .dev = {
206 .platform_data = &scif1_platform_data,
207 },
208};
209
210static struct plat_sci_port scif2_platform_data = {
211 .mapbase = 0xfffe9000,
212 .flags = UPF_BOOT_AUTOCONF,
213 .type = PORT_SCIF,
214 .irqs = { 188, 188, 188, 188 }
215};
216
217static struct platform_device scif2_device = {
218 .name = "sh-sci",
219 .id = 2,
220 .dev = {
221 .platform_data = &scif2_platform_data,
222 },
223};
224
225static struct plat_sci_port scif3_platform_data = {
226 .mapbase = 0xfffe9800,
227 .flags = UPF_BOOT_AUTOCONF,
228 .type = PORT_SCIF,
229 .irqs = { 192, 192, 192, 192 }
230};
231
232static struct platform_device scif3_device = {
233 .name = "sh-sci",
234 .id = 3,
235 .dev = {
236 .platform_data = &scif3_platform_data,
237 },
238};
239
240static struct plat_sci_port scif4_platform_data = {
241 .mapbase = 0xfffea000,
242 .flags = UPF_BOOT_AUTOCONF,
243 .type = PORT_SCIF,
244 .irqs = { 196, 196, 196, 196 }
245};
246
247static struct platform_device scif4_device = {
248 .name = "sh-sci",
249 .id = 4,
250 .dev = {
251 .platform_data = &scif4_platform_data,
252 },
253};
254
255static struct plat_sci_port scif5_platform_data = {
256 .mapbase = 0xfffea800,
257 .flags = UPF_BOOT_AUTOCONF,
258 .type = PORT_SCIF,
259 .irqs = { 200, 200, 200, 200 }
260};
261
262static struct platform_device scif5_device = {
263 .name = "sh-sci",
264 .id = 5,
265 .dev = {
266 .platform_data = &scif5_platform_data,
267 },
268};
269
270static struct plat_sci_port scif6_platform_data = {
271 .mapbase = 0xfffeb000,
272 .flags = UPF_BOOT_AUTOCONF,
273 .type = PORT_SCIF,
274 .irqs = { 204, 204, 204, 204 }
275};
276
277static struct platform_device scif6_device = {
278 .name = "sh-sci",
279 .id = 6,
280 .dev = {
281 .platform_data = &scif6_platform_data,
282 },
283};
284
285static struct plat_sci_port scif7_platform_data = {
286 .mapbase = 0xfffeb800,
287 .flags = UPF_BOOT_AUTOCONF,
288 .type = PORT_SCIF,
289 .irqs = { 208, 208, 208, 208 }
290};
291
292static struct platform_device scif7_device = {
293 .name = "sh-sci",
294 .id = 7,
229 .dev = { 295 .dev = {
230 .platform_data = sci_platform_data, 296 .platform_data = &scif7_platform_data,
231 }, 297 },
232}; 298};
233 299
@@ -345,7 +411,14 @@ static struct platform_device mtu2_2_device = {
345}; 411};
346 412
347static struct platform_device *sh7201_devices[] __initdata = { 413static struct platform_device *sh7201_devices[] __initdata = {
348 &sci_device, 414 &scif0_device,
415 &scif1_device,
416 &scif2_device,
417 &scif3_device,
418 &scif4_device,
419 &scif5_device,
420 &scif6_device,
421 &scif7_device,
349 &rtc_device, 422 &rtc_device,
350 &mtu2_0_device, 423 &mtu2_0_device,
351 &mtu2_1_device, 424 &mtu2_1_device,
@@ -365,6 +438,14 @@ void __init plat_irq_setup(void)
365} 438}
366 439
367static struct platform_device *sh7201_early_devices[] __initdata = { 440static struct platform_device *sh7201_early_devices[] __initdata = {
441 &scif0_device,
442 &scif1_device,
443 &scif2_device,
444 &scif3_device,
445 &scif4_device,
446 &scif5_device,
447 &scif6_device,
448 &scif7_device,
368 &mtu2_0_device, 449 &mtu2_0_device,
369 &mtu2_1_device, 450 &mtu2_1_device,
370 &mtu2_2_device, 451 &mtu2_2_device,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
index d3fd536c9a84..3136966cc9b3 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
@@ -173,37 +173,63 @@ static struct intc_mask_reg mask_registers[] __initdata = {
173static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, 173static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
174 mask_registers, prio_registers, NULL); 174 mask_registers, prio_registers, NULL);
175 175
176static struct plat_sci_port sci_platform_data[] = { 176static struct plat_sci_port scif0_platform_data = {
177 { 177 .mapbase = 0xfffe8000,
178 .mapbase = 0xfffe8000, 178 .flags = UPF_BOOT_AUTOCONF,
179 .flags = UPF_BOOT_AUTOCONF, 179 .type = PORT_SCIF,
180 .type = PORT_SCIF, 180 .irqs = { 192, 192, 192, 192 },
181 .irqs = { 192, 192, 192, 192 },
182 }, {
183 .mapbase = 0xfffe8800,
184 .flags = UPF_BOOT_AUTOCONF,
185 .type = PORT_SCIF,
186 .irqs = { 196, 196, 196, 196 },
187 }, {
188 .mapbase = 0xfffe9000,
189 .flags = UPF_BOOT_AUTOCONF,
190 .type = PORT_SCIF,
191 .irqs = { 200, 200, 200, 200 },
192 }, {
193 .mapbase = 0xfffe9800,
194 .flags = UPF_BOOT_AUTOCONF,
195 .type = PORT_SCIF,
196 .irqs = { 204, 204, 204, 204 },
197 }, {
198 .flags = 0,
199 }
200}; 181};
201 182
202static struct platform_device sci_device = { 183static struct platform_device scif0_device = {
203 .name = "sh-sci", 184 .name = "sh-sci",
204 .id = -1, 185 .id = 0,
186 .dev = {
187 .platform_data = &scif0_platform_data,
188 },
189};
190
191static struct plat_sci_port scif1_platform_data = {
192 .mapbase = 0xfffe8800,
193 .flags = UPF_BOOT_AUTOCONF,
194 .type = PORT_SCIF,
195 .irqs = { 196, 196, 196, 196 },
196};
197
198static struct platform_device scif1_device = {
199 .name = "sh-sci",
200 .id = 1,
201 .dev = {
202 .platform_data = &scif1_platform_data,
203 },
204};
205
206static struct plat_sci_port scif2_platform_data = {
207 .mapbase = 0xfffe9000,
208 .flags = UPF_BOOT_AUTOCONF,
209 .type = PORT_SCIF,
210 .irqs = { 200, 200, 200, 200 },
211};
212
213static struct platform_device scif2_device = {
214 .name = "sh-sci",
215 .id = 2,
216 .dev = {
217 .platform_data = &scif2_platform_data,
218 },
219};
220
221static struct plat_sci_port scif3_platform_data = {
222 .mapbase = 0xfffe9800,
223 .flags = UPF_BOOT_AUTOCONF,
224 .type = PORT_SCIF,
225 .irqs = { 204, 204, 204, 204 },
226};
227
228static struct platform_device scif3_device = {
229 .name = "sh-sci",
230 .id = 3,
205 .dev = { 231 .dev = {
206 .platform_data = sci_platform_data, 232 .platform_data = &scif3_platform_data,
207 }, 233 },
208}; 234};
209 235
@@ -354,7 +380,10 @@ static struct platform_device rtc_device = {
354}; 380};
355 381
356static struct platform_device *sh7203_devices[] __initdata = { 382static struct platform_device *sh7203_devices[] __initdata = {
357 &sci_device, 383 &scif0_device,
384 &scif1_device,
385 &scif2_device,
386 &scif3_device,
358 &cmt0_device, 387 &cmt0_device,
359 &cmt1_device, 388 &cmt1_device,
360 &mtu2_0_device, 389 &mtu2_0_device,
@@ -375,6 +404,10 @@ void __init plat_irq_setup(void)
375} 404}
376 405
377static struct platform_device *sh7203_early_devices[] __initdata = { 406static struct platform_device *sh7203_early_devices[] __initdata = {
407 &scif0_device,
408 &scif1_device,
409 &scif2_device,
410 &scif3_device,
378 &cmt0_device, 411 &cmt0_device,
379 &cmt1_device, 412 &cmt1_device,
380 &mtu2_0_device, 413 &mtu2_0_device,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index a9ccc5e8d9e9..064873585a8b 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -133,37 +133,63 @@ static struct intc_mask_reg mask_registers[] __initdata = {
133static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups, 133static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups,
134 mask_registers, prio_registers, NULL); 134 mask_registers, prio_registers, NULL);
135 135
136static struct plat_sci_port sci_platform_data[] = { 136static struct plat_sci_port scif0_platform_data = {
137 { 137 .mapbase = 0xfffe8000,
138 .mapbase = 0xfffe8000, 138 .flags = UPF_BOOT_AUTOCONF,
139 .flags = UPF_BOOT_AUTOCONF, 139 .type = PORT_SCIF,
140 .type = PORT_SCIF, 140 .irqs = { 240, 240, 240, 240 },
141 .irqs = { 240, 240, 240, 240 },
142 }, {
143 .mapbase = 0xfffe8800,
144 .flags = UPF_BOOT_AUTOCONF,
145 .type = PORT_SCIF,
146 .irqs = { 244, 244, 244, 244 },
147 }, {
148 .mapbase = 0xfffe9000,
149 .flags = UPF_BOOT_AUTOCONF,
150 .type = PORT_SCIF,
151 .irqs = { 248, 248, 248, 248 },
152 }, {
153 .mapbase = 0xfffe9800,
154 .flags = UPF_BOOT_AUTOCONF,
155 .type = PORT_SCIF,
156 .irqs = { 252, 252, 252, 252 },
157 }, {
158 .flags = 0,
159 }
160}; 141};
161 142
162static struct platform_device sci_device = { 143static struct platform_device scif0_device = {
163 .name = "sh-sci", 144 .name = "sh-sci",
164 .id = -1, 145 .id = 0,
146 .dev = {
147 .platform_data = &scif0_platform_data,
148 },
149};
150
151static struct plat_sci_port scif1_platform_data = {
152 .mapbase = 0xfffe8800,
153 .flags = UPF_BOOT_AUTOCONF,
154 .type = PORT_SCIF,
155 .irqs = { 244, 244, 244, 244 },
156};
157
158static struct platform_device scif1_device = {
159 .name = "sh-sci",
160 .id = 1,
161 .dev = {
162 .platform_data = &scif1_platform_data,
163 },
164};
165
166static struct plat_sci_port scif2_platform_data = {
167 .mapbase = 0xfffe9000,
168 .flags = UPF_BOOT_AUTOCONF,
169 .type = PORT_SCIF,
170 .irqs = { 248, 248, 248, 248 },
171};
172
173static struct platform_device scif2_device = {
174 .name = "sh-sci",
175 .id = 2,
176 .dev = {
177 .platform_data = &scif2_platform_data,
178 },
179};
180
181static struct plat_sci_port scif3_platform_data = {
182 .mapbase = 0xfffe9800,
183 .flags = UPF_BOOT_AUTOCONF,
184 .type = PORT_SCIF,
185 .irqs = { 252, 252, 252, 252 },
186};
187
188static struct platform_device scif3_device = {
189 .name = "sh-sci",
190 .id = 3,
165 .dev = { 191 .dev = {
166 .platform_data = sci_platform_data, 192 .platform_data = &scif3_platform_data,
167 }, 193 },
168}; 194};
169 195
@@ -325,7 +351,10 @@ static struct platform_device mtu2_2_device = {
325}; 351};
326 352
327static struct platform_device *sh7206_devices[] __initdata = { 353static struct platform_device *sh7206_devices[] __initdata = {
328 &sci_device, 354 &scif0_device,
355 &scif1_device,
356 &scif2_device,
357 &scif3_device,
329 &cmt0_device, 358 &cmt0_device,
330 &cmt1_device, 359 &cmt1_device,
331 &mtu2_0_device, 360 &mtu2_0_device,
@@ -346,6 +375,10 @@ void __init plat_irq_setup(void)
346} 375}
347 376
348static struct platform_device *sh7206_early_devices[] __initdata = { 377static struct platform_device *sh7206_early_devices[] __initdata = {
378 &scif0_device,
379 &scif1_device,
380 &scif2_device,
381 &scif3_device,
349 &cmt0_device, 382 &cmt0_device,
350 &cmt1_device, 383 &cmt1_device,
351 &mtu2_0_device, 384 &mtu2_0_device,
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index bb407ef0b91e..3f7e2a22c7c2 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -297,41 +297,8 @@ ENTRY(vbr_base)
297! 297!
298 .balign 256,0,256 298 .balign 256,0,256
299general_exception: 299general_exception:
300#ifndef CONFIG_CPU_SUBTYPE_SHX3
301 bra handle_exception 300 bra handle_exception
302 sts pr, k3 ! save original pr value in k3 301 sts pr, k3 ! save original pr value in k3
303#else
304 mov.l 1f, k4
305 mov.l @k4, k4
306
307 ! Is EXPEVT larger than 0x800?
308 mov #0x8, k0
309 shll8 k0
310 cmp/hs k0, k4
311 bf 0f
312
313 ! then add 0x580 (k2 is 0xd80 or 0xda0)
314 mov #0x58, k0
315 shll2 k0
316 shll2 k0
317 add k0, k4
3180:
319 ! Setup stack and save DSP context (k0 contains original r15 on return)
320 bsr prepare_stack
321 nop
322
323 ! Save registers / Switch to bank 0
324 mov k4, k2 ! keep vector in k2
325 mov.l 1f, k4 ! SR bits to clear in k4
326 bsr save_regs ! needs original pr value in k3
327 nop
328
329 bra handle_exception_special
330 nop
331
332 .align 2
3331: .long EXPEVT
334#endif
335 302
336! prepare_stack() 303! prepare_stack()
337! - roll back gRB 304! - roll back gRB
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
index c23105983878..7b892d60e3a0 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
@@ -67,27 +67,33 @@ static struct intc_prio_reg prio_registers[] __initdata = {
67static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL, 67static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
68 NULL, prio_registers, NULL); 68 NULL, prio_registers, NULL);
69 69
70static struct plat_sci_port sci_platform_data[] = { 70static struct plat_sci_port scif0_platform_data = {
71 { 71 .mapbase = 0xa4410000,
72 .mapbase = 0xa4410000, 72 .flags = UPF_BOOT_AUTOCONF,
73 .flags = UPF_BOOT_AUTOCONF, 73 .type = PORT_SCIF,
74 .type = PORT_SCIF, 74 .irqs = { 56, 56, 56 },
75 .irqs = { 56, 56, 56 }, 75};
76 }, { 76
77 .mapbase = 0xa4400000, 77static struct platform_device scif0_device = {
78 .flags = UPF_BOOT_AUTOCONF,
79 .type = PORT_SCIF,
80 .irqs = { 52, 52, 52 },
81 }, {
82 .flags = 0,
83 }
84};
85
86static struct platform_device sci_device = {
87 .name = "sh-sci", 78 .name = "sh-sci",
88 .id = -1, 79 .id = 0,
80 .dev = {
81 .platform_data = &scif0_platform_data,
82 },
83};
84
85static struct plat_sci_port scif1_platform_data = {
86 .mapbase = 0xa4400000,
87 .flags = UPF_BOOT_AUTOCONF,
88 .type = PORT_SCIF,
89 .irqs = { 52, 52, 52 },
90};
91
92static struct platform_device scif1_device = {
93 .name = "sh-sci",
94 .id = 1,
89 .dev = { 95 .dev = {
90 .platform_data = sci_platform_data, 96 .platform_data = &scif1_platform_data,
91 }, 97 },
92}; 98};
93 99
@@ -210,10 +216,11 @@ static struct platform_device tmu2_device = {
210}; 216};
211 217
212static struct platform_device *sh7705_devices[] __initdata = { 218static struct platform_device *sh7705_devices[] __initdata = {
219 &scif0_device,
220 &scif1_device,
213 &tmu0_device, 221 &tmu0_device,
214 &tmu1_device, 222 &tmu1_device,
215 &tmu2_device, 223 &tmu2_device,
216 &sci_device,
217 &rtc_device, 224 &rtc_device,
218}; 225};
219 226
@@ -225,6 +232,8 @@ static int __init sh7705_devices_setup(void)
225arch_initcall(sh7705_devices_setup); 232arch_initcall(sh7705_devices_setup);
226 233
227static struct platform_device *sh7705_early_devices[] __initdata = { 234static struct platform_device *sh7705_early_devices[] __initdata = {
235 &scif0_device,
236 &scif1_device,
228 &tmu0_device, 237 &tmu0_device,
229 &tmu1_device, 238 &tmu1_device,
230 &tmu2_device, 239 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
index 347ab35d0697..bc0c4f68c7c7 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
@@ -106,44 +106,55 @@ static struct platform_device rtc_device = {
106 .resource = rtc_resources, 106 .resource = rtc_resources,
107}; 107};
108 108
109static struct plat_sci_port sci_platform_data[] = { 109static struct plat_sci_port scif0_platform_data = {
110 { 110 .mapbase = 0xfffffe80,
111 .mapbase = 0xfffffe80, 111 .flags = UPF_BOOT_AUTOCONF,
112 .flags = UPF_BOOT_AUTOCONF, 112 .type = PORT_SCI,
113 .type = PORT_SCI, 113 .irqs = { 23, 23, 23, 0 },
114 .irqs = { 23, 23, 23, 0 }, 114};
115
116static struct platform_device scif0_device = {
117 .name = "sh-sci",
118 .id = 0,
119 .dev = {
120 .platform_data = &scif0_platform_data,
115 }, 121 },
122};
116#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \ 123#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
117 defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 124 defined(CONFIG_CPU_SUBTYPE_SH7707) || \
118 defined(CONFIG_CPU_SUBTYPE_SH7709) 125 defined(CONFIG_CPU_SUBTYPE_SH7709)
119 { 126static struct plat_sci_port scif1_platform_data = {
120 .mapbase = 0xa4000150, 127 .mapbase = 0xa4000150,
121 .flags = UPF_BOOT_AUTOCONF, 128 .flags = UPF_BOOT_AUTOCONF,
122 .type = PORT_SCIF, 129 .type = PORT_SCIF,
123 .irqs = { 56, 56, 56, 56 }, 130 .irqs = { 56, 56, 56, 56 },
131};
132
133static struct platform_device scif1_device = {
134 .name = "sh-sci",
135 .id = 1,
136 .dev = {
137 .platform_data = &scif1_platform_data,
124 }, 138 },
139};
125#endif 140#endif
126#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ 141#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
127 defined(CONFIG_CPU_SUBTYPE_SH7709) 142 defined(CONFIG_CPU_SUBTYPE_SH7709)
128 { 143static struct plat_sci_port scif2_platform_data = {
129 .mapbase = 0xa4000140, 144 .mapbase = 0xa4000140,
130 .flags = UPF_BOOT_AUTOCONF, 145 .flags = UPF_BOOT_AUTOCONF,
131 .type = PORT_IRDA, 146 .type = PORT_IRDA,
132 .irqs = { 52, 52, 52, 52 }, 147 .irqs = { 52, 52, 52, 52 },
133 },
134#endif
135 {
136 .flags = 0,
137 }
138}; 148};
139 149
140static struct platform_device sci_device = { 150static struct platform_device scif2_device = {
141 .name = "sh-sci", 151 .name = "sh-sci",
142 .id = -1, 152 .id = 2,
143 .dev = { 153 .dev = {
144 .platform_data = sci_platform_data, 154 .platform_data = &scif2_platform_data,
145 }, 155 },
146}; 156};
157#endif
147 158
148static struct sh_timer_config tmu0_platform_data = { 159static struct sh_timer_config tmu0_platform_data = {
149 .name = "TMU0", 160 .name = "TMU0",
@@ -238,10 +249,19 @@ static struct platform_device tmu2_device = {
238}; 249};
239 250
240static struct platform_device *sh770x_devices[] __initdata = { 251static struct platform_device *sh770x_devices[] __initdata = {
252 &scif0_device,
253#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
254 defined(CONFIG_CPU_SUBTYPE_SH7707) || \
255 defined(CONFIG_CPU_SUBTYPE_SH7709)
256 &scif1_device,
257#endif
258#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
259 defined(CONFIG_CPU_SUBTYPE_SH7709)
260 &scif2_device,
261#endif
241 &tmu0_device, 262 &tmu0_device,
242 &tmu1_device, 263 &tmu1_device,
243 &tmu2_device, 264 &tmu2_device,
244 &sci_device,
245 &rtc_device, 265 &rtc_device,
246}; 266};
247 267
@@ -253,6 +273,16 @@ static int __init sh770x_devices_setup(void)
253arch_initcall(sh770x_devices_setup); 273arch_initcall(sh770x_devices_setup);
254 274
255static struct platform_device *sh770x_early_devices[] __initdata = { 275static struct platform_device *sh770x_early_devices[] __initdata = {
276 &scif0_device,
277#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
278 defined(CONFIG_CPU_SUBTYPE_SH7707) || \
279 defined(CONFIG_CPU_SUBTYPE_SH7709)
280 &scif1_device,
281#endif
282#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
283 defined(CONFIG_CPU_SUBTYPE_SH7709)
284 &scif2_device,
285#endif
256 &tmu0_device, 286 &tmu0_device,
257 &tmu1_device, 287 &tmu1_device,
258 &tmu2_device, 288 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index 717e90ae1097..0845a3ad006d 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -96,28 +96,33 @@ static struct platform_device rtc_device = {
96 }, 96 },
97}; 97};
98 98
99static struct plat_sci_port sci_platform_data[] = { 99static struct plat_sci_port scif0_platform_data = {
100 { 100 .mapbase = 0xa4400000,
101 .mapbase = 0xa4400000, 101 .flags = UPF_BOOT_AUTOCONF,
102 .flags = UPF_BOOT_AUTOCONF, 102 .type = PORT_SCIF,
103 .type = PORT_SCIF, 103 .irqs = { 52, 52, 52, 52 },
104 .irqs = { 52, 52, 52, 52 }, 104};
105 }, { 105
106 .mapbase = 0xa4410000, 106static struct platform_device scif0_device = {
107 .flags = UPF_BOOT_AUTOCONF,
108 .type = PORT_SCIF,
109 .irqs = { 56, 56, 56, 56 },
110 }, {
111
112 .flags = 0,
113 }
114};
115
116static struct platform_device sci_device = {
117 .name = "sh-sci", 107 .name = "sh-sci",
118 .id = -1, 108 .id = 0,
109 .dev = {
110 .platform_data = &scif0_platform_data,
111 },
112};
113
114static struct plat_sci_port scif1_platform_data = {
115 .mapbase = 0xa4410000,
116 .flags = UPF_BOOT_AUTOCONF,
117 .type = PORT_SCIF,
118 .irqs = { 56, 56, 56, 56 },
119};
120
121static struct platform_device scif1_device = {
122 .name = "sh-sci",
123 .id = 1,
119 .dev = { 124 .dev = {
120 .platform_data = sci_platform_data, 125 .platform_data = &scif1_platform_data,
121 }, 126 },
122}; 127};
123 128
@@ -214,10 +219,11 @@ static struct platform_device tmu2_device = {
214}; 219};
215 220
216static struct platform_device *sh7710_devices[] __initdata = { 221static struct platform_device *sh7710_devices[] __initdata = {
222 &scif0_device,
223 &scif1_device,
217 &tmu0_device, 224 &tmu0_device,
218 &tmu1_device, 225 &tmu1_device,
219 &tmu2_device, 226 &tmu2_device,
220 &sci_device,
221 &rtc_device, 227 &rtc_device,
222}; 228};
223 229
@@ -229,6 +235,8 @@ static int __init sh7710_devices_setup(void)
229arch_initcall(sh7710_devices_setup); 235arch_initcall(sh7710_devices_setup);
230 236
231static struct platform_device *sh7710_early_devices[] __initdata = { 237static struct platform_device *sh7710_early_devices[] __initdata = {
238 &scif0_device,
239 &scif1_device,
232 &tmu0_device, 240 &tmu0_device,
233 &tmu1_device, 241 &tmu1_device,
234 &tmu2_device, 242 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 74d8baaf8e96..a718a6231091 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -48,28 +48,33 @@ static struct platform_device rtc_device = {
48 }, 48 },
49}; 49};
50 50
51static struct plat_sci_port sci_platform_data[] = { 51static struct plat_sci_port scif0_platform_data = {
52 { 52 .mapbase = 0xa4430000,
53 .mapbase = 0xa4430000, 53 .flags = UPF_BOOT_AUTOCONF,
54 .flags = UPF_BOOT_AUTOCONF, 54 .type = PORT_SCIF,
55 .type = PORT_SCIF, 55 .irqs = { 80, 80, 80, 80 },
56 .irqs = { 80, 80, 80, 80 }, 56};
57 }, { 57
58 .mapbase = 0xa4438000, 58static struct platform_device scif0_device = {
59 .flags = UPF_BOOT_AUTOCONF,
60 .type = PORT_SCIF,
61 .irqs = { 81, 81, 81, 81 },
62 }, {
63
64 .flags = 0,
65 }
66};
67
68static struct platform_device sci_device = {
69 .name = "sh-sci", 59 .name = "sh-sci",
70 .id = -1, 60 .id = 0,
61 .dev = {
62 .platform_data = &scif0_platform_data,
63 },
64};
65
66static struct plat_sci_port scif1_platform_data = {
67 .mapbase = 0xa4438000,
68 .flags = UPF_BOOT_AUTOCONF,
69 .type = PORT_SCIF,
70 .irqs = { 81, 81, 81, 81 },
71};
72
73static struct platform_device scif1_device = {
74 .name = "sh-sci",
75 .id = 1,
71 .dev = { 76 .dev = {
72 .platform_data = sci_platform_data, 77 .platform_data = &scif1_platform_data,
73 }, 78 },
74}; 79};
75 80
@@ -369,6 +374,8 @@ static struct platform_device tmu2_device = {
369}; 374};
370 375
371static struct platform_device *sh7720_devices[] __initdata = { 376static struct platform_device *sh7720_devices[] __initdata = {
377 &scif0_device,
378 &scif1_device,
372 &cmt0_device, 379 &cmt0_device,
373 &cmt1_device, 380 &cmt1_device,
374 &cmt2_device, 381 &cmt2_device,
@@ -378,7 +385,6 @@ static struct platform_device *sh7720_devices[] __initdata = {
378 &tmu1_device, 385 &tmu1_device,
379 &tmu2_device, 386 &tmu2_device,
380 &rtc_device, 387 &rtc_device,
381 &sci_device,
382 &usb_ohci_device, 388 &usb_ohci_device,
383 &usbf_device, 389 &usbf_device,
384}; 390};
@@ -391,6 +397,8 @@ static int __init sh7720_devices_setup(void)
391arch_initcall(sh7720_devices_setup); 397arch_initcall(sh7720_devices_setup);
392 398
393static struct platform_device *sh7720_early_devices[] __initdata = { 399static struct platform_device *sh7720_early_devices[] __initdata = {
400 &scif0_device,
401 &scif1_device,
394 &cmt0_device, 402 &cmt0_device,
395 &cmt1_device, 403 &cmt1_device,
396 &cmt2_device, 404 &cmt2_device,
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile
index 203b18347b83..3a1dbc709831 100644
--- a/arch/sh/kernel/cpu/sh4/Makefile
+++ b/arch/sh/kernel/cpu/sh4/Makefile
@@ -9,6 +9,11 @@ obj-$(CONFIG_HIBERNATION) += $(addprefix ../sh3/, swsusp.o)
9obj-$(CONFIG_SH_FPU) += fpu.o softfloat.o 9obj-$(CONFIG_SH_FPU) += fpu.o softfloat.o
10obj-$(CONFIG_SH_STORE_QUEUES) += sq.o 10obj-$(CONFIG_SH_STORE_QUEUES) += sq.o
11 11
12# Perf events
13perf-$(CONFIG_CPU_SUBTYPE_SH7750) := perf_event.o
14perf-$(CONFIG_CPU_SUBTYPE_SH7750S) := perf_event.o
15perf-$(CONFIG_CPU_SUBTYPE_SH7091) := perf_event.o
16
12# CPU subtype setup 17# CPU subtype setup
13obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o 18obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7750R) += setup-sh7750.o 19obj-$(CONFIG_CPU_SUBTYPE_SH7750R) += setup-sh7750.o
@@ -27,4 +32,5 @@ endif
27# Additional clocks by subtype 32# Additional clocks by subtype
28clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o 33clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o
29 34
30obj-y += $(clock-y) 35obj-y += $(clock-y)
36obj-$(CONFIG_PERF_EVENTS) += $(perf-y)
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c
index e3ea5411da6d..e97857aec8a0 100644
--- a/arch/sh/kernel/cpu/sh4/fpu.c
+++ b/arch/sh/kernel/cpu/sh4/fpu.c
@@ -41,13 +41,11 @@ static unsigned int fpu_exception_flags;
41 41
42/* 42/*
43 * Save FPU registers onto task structure. 43 * Save FPU registers onto task structure.
44 * Assume called with FPU enabled (SR.FD=0).
45 */ 44 */
46void save_fpu(struct task_struct *tsk, struct pt_regs *regs) 45void save_fpu(struct task_struct *tsk)
47{ 46{
48 unsigned long dummy; 47 unsigned long dummy;
49 48
50 clear_tsk_thread_flag(tsk, TIF_USEDFPU);
51 enable_fpu(); 49 enable_fpu();
52 asm volatile ("sts.l fpul, @-%0\n\t" 50 asm volatile ("sts.l fpul, @-%0\n\t"
53 "sts.l fpscr, @-%0\n\t" 51 "sts.l fpscr, @-%0\n\t"
@@ -92,7 +90,6 @@ void save_fpu(struct task_struct *tsk, struct pt_regs *regs)
92 :"memory"); 90 :"memory");
93 91
94 disable_fpu(); 92 disable_fpu();
95 release_fpu(regs);
96} 93}
97 94
98static void restore_fpu(struct task_struct *tsk) 95static void restore_fpu(struct task_struct *tsk)
@@ -285,7 +282,6 @@ static int ieee_fpe_handler(struct pt_regs *regs)
285 /* fcnvsd */ 282 /* fcnvsd */
286 struct task_struct *tsk = current; 283 struct task_struct *tsk = current;
287 284
288 save_fpu(tsk, regs);
289 if ((tsk->thread.fpu.hard.fpscr & FPSCR_CAUSE_ERROR)) 285 if ((tsk->thread.fpu.hard.fpscr & FPSCR_CAUSE_ERROR))
290 /* FPU error */ 286 /* FPU error */
291 denormal_to_double(&tsk->thread.fpu.hard, 287 denormal_to_double(&tsk->thread.fpu.hard,
@@ -462,7 +458,7 @@ BUILD_TRAP_HANDLER(fpu_error)
462 struct task_struct *tsk = current; 458 struct task_struct *tsk = current;
463 TRAP_HANDLER_DECL; 459 TRAP_HANDLER_DECL;
464 460
465 save_fpu(tsk, regs); 461 __unlazy_fpu(tsk, regs);
466 fpu_exception_flags = 0; 462 fpu_exception_flags = 0;
467 if (ieee_fpe_handler(regs)) { 463 if (ieee_fpe_handler(regs)) {
468 tsk->thread.fpu.hard.fpscr &= 464 tsk->thread.fpu.hard.fpscr &=
@@ -473,7 +469,7 @@ BUILD_TRAP_HANDLER(fpu_error)
473 tsk->thread.fpu.hard.fpscr |= (fpu_exception_flags >> 10); 469 tsk->thread.fpu.hard.fpscr |= (fpu_exception_flags >> 10);
474 grab_fpu(regs); 470 grab_fpu(regs);
475 restore_fpu(tsk); 471 restore_fpu(tsk);
476 set_tsk_thread_flag(tsk, TIF_USEDFPU); 472 task_thread_info(tsk)->status |= TS_USEDFPU;
477 if ((((tsk->thread.fpu.hard.fpscr & FPSCR_ENABLE_MASK) >> 7) & 473 if ((((tsk->thread.fpu.hard.fpscr & FPSCR_ENABLE_MASK) >> 7) &
478 (fpu_exception_flags >> 2)) == 0) { 474 (fpu_exception_flags >> 2)) == 0) {
479 return; 475 return;
@@ -483,18 +479,18 @@ BUILD_TRAP_HANDLER(fpu_error)
483 force_sig(SIGFPE, tsk); 479 force_sig(SIGFPE, tsk);
484} 480}
485 481
486BUILD_TRAP_HANDLER(fpu_state_restore) 482void fpu_state_restore(struct pt_regs *regs)
487{ 483{
488 struct task_struct *tsk = current; 484 struct task_struct *tsk = current;
489 TRAP_HANDLER_DECL;
490 485
491 grab_fpu(regs); 486 grab_fpu(regs);
492 if (!user_mode(regs)) { 487 if (unlikely(!user_mode(regs))) {
493 printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); 488 printk(KERN_ERR "BUG: FPU is used in kernel mode.\n");
489 BUG();
494 return; 490 return;
495 } 491 }
496 492
497 if (used_math()) { 493 if (likely(used_math())) {
498 /* Using the FPU again. */ 494 /* Using the FPU again. */
499 restore_fpu(tsk); 495 restore_fpu(tsk);
500 } else { 496 } else {
@@ -502,5 +498,13 @@ BUILD_TRAP_HANDLER(fpu_state_restore)
502 fpu_init(); 498 fpu_init();
503 set_used_math(); 499 set_used_math();
504 } 500 }
505 set_tsk_thread_flag(tsk, TIF_USEDFPU); 501 task_thread_info(tsk)->status |= TS_USEDFPU;
502 tsk->fpu_counter++;
503}
504
505BUILD_TRAP_HANDLER(fpu_state_restore)
506{
507 TRAP_HANDLER_DECL;
508
509 fpu_state_restore(regs);
506} 510}
diff --git a/arch/sh/kernel/cpu/sh4/perf_event.c b/arch/sh/kernel/cpu/sh4/perf_event.c
new file mode 100644
index 000000000000..7f9ecc9c2d02
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4/perf_event.c
@@ -0,0 +1,253 @@
1/*
2 * Performance events support for SH7750-style performance counters
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/io.h>
13#include <linux/irq.h>
14#include <linux/perf_event.h>
15#include <asm/processor.h>
16
17#define PM_CR_BASE 0xff000084 /* 16-bit */
18#define PM_CTR_BASE 0xff100004 /* 32-bit */
19
20#define PMCR(n) (PM_CR_BASE + ((n) * 0x04))
21#define PMCTRH(n) (PM_CTR_BASE + 0x00 + ((n) * 0x08))
22#define PMCTRL(n) (PM_CTR_BASE + 0x04 + ((n) * 0x08))
23
24#define PMCR_PMM_MASK 0x0000003f
25
26#define PMCR_CLKF 0x00000100
27#define PMCR_PMCLR 0x00002000
28#define PMCR_PMST 0x00004000
29#define PMCR_PMEN 0x00008000
30
31static struct sh_pmu sh7750_pmu;
32
33/*
34 * There are a number of events supported by each counter (33 in total).
35 * Since we have 2 counters, each counter will take the event code as it
36 * corresponds to the PMCR PMM setting. Each counter can be configured
37 * independently.
38 *
39 * Event Code Description
40 * ---------- -----------
41 *
42 * 0x01 Operand read access
43 * 0x02 Operand write access
44 * 0x03 UTLB miss
45 * 0x04 Operand cache read miss
46 * 0x05 Operand cache write miss
47 * 0x06 Instruction fetch (w/ cache)
48 * 0x07 Instruction TLB miss
49 * 0x08 Instruction cache miss
50 * 0x09 All operand accesses
51 * 0x0a All instruction accesses
52 * 0x0b OC RAM operand access
53 * 0x0d On-chip I/O space access
54 * 0x0e Operand access (r/w)
55 * 0x0f Operand cache miss (r/w)
56 * 0x10 Branch instruction
57 * 0x11 Branch taken
58 * 0x12 BSR/BSRF/JSR
59 * 0x13 Instruction execution
60 * 0x14 Instruction execution in parallel
61 * 0x15 FPU Instruction execution
62 * 0x16 Interrupt
63 * 0x17 NMI
64 * 0x18 trapa instruction execution
65 * 0x19 UBCA match
66 * 0x1a UBCB match
67 * 0x21 Instruction cache fill
68 * 0x22 Operand cache fill
69 * 0x23 Elapsed time
70 * 0x24 Pipeline freeze by I-cache miss
71 * 0x25 Pipeline freeze by D-cache miss
72 * 0x27 Pipeline freeze by branch instruction
73 * 0x28 Pipeline freeze by CPU register
74 * 0x29 Pipeline freeze by FPU
75 */
76
77static const int sh7750_general_events[] = {
78 [PERF_COUNT_HW_CPU_CYCLES] = 0x0023,
79 [PERF_COUNT_HW_INSTRUCTIONS] = 0x000a,
80 [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0006, /* I-cache */
81 [PERF_COUNT_HW_CACHE_MISSES] = 0x0008, /* I-cache */
82 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x0010,
83 [PERF_COUNT_HW_BRANCH_MISSES] = -1,
84 [PERF_COUNT_HW_BUS_CYCLES] = -1,
85};
86
87#define C(x) PERF_COUNT_HW_CACHE_##x
88
89static const int sh7750_cache_events
90 [PERF_COUNT_HW_CACHE_MAX]
91 [PERF_COUNT_HW_CACHE_OP_MAX]
92 [PERF_COUNT_HW_CACHE_RESULT_MAX] =
93{
94 [ C(L1D) ] = {
95 [ C(OP_READ) ] = {
96 [ C(RESULT_ACCESS) ] = 0x0001,
97 [ C(RESULT_MISS) ] = 0x0004,
98 },
99 [ C(OP_WRITE) ] = {
100 [ C(RESULT_ACCESS) ] = 0x0002,
101 [ C(RESULT_MISS) ] = 0x0005,
102 },
103 [ C(OP_PREFETCH) ] = {
104 [ C(RESULT_ACCESS) ] = 0,
105 [ C(RESULT_MISS) ] = 0,
106 },
107 },
108
109 [ C(L1I) ] = {
110 [ C(OP_READ) ] = {
111 [ C(RESULT_ACCESS) ] = 0x0006,
112 [ C(RESULT_MISS) ] = 0x0008,
113 },
114 [ C(OP_WRITE) ] = {
115 [ C(RESULT_ACCESS) ] = -1,
116 [ C(RESULT_MISS) ] = -1,
117 },
118 [ C(OP_PREFETCH) ] = {
119 [ C(RESULT_ACCESS) ] = 0,
120 [ C(RESULT_MISS) ] = 0,
121 },
122 },
123
124 [ C(LL) ] = {
125 [ C(OP_READ) ] = {
126 [ C(RESULT_ACCESS) ] = 0,
127 [ C(RESULT_MISS) ] = 0,
128 },
129 [ C(OP_WRITE) ] = {
130 [ C(RESULT_ACCESS) ] = 0,
131 [ C(RESULT_MISS) ] = 0,
132 },
133 [ C(OP_PREFETCH) ] = {
134 [ C(RESULT_ACCESS) ] = 0,
135 [ C(RESULT_MISS) ] = 0,
136 },
137 },
138
139 [ C(DTLB) ] = {
140 [ C(OP_READ) ] = {
141 [ C(RESULT_ACCESS) ] = 0,
142 [ C(RESULT_MISS) ] = 0x0003,
143 },
144 [ C(OP_WRITE) ] = {
145 [ C(RESULT_ACCESS) ] = 0,
146 [ C(RESULT_MISS) ] = 0,
147 },
148 [ C(OP_PREFETCH) ] = {
149 [ C(RESULT_ACCESS) ] = 0,
150 [ C(RESULT_MISS) ] = 0,
151 },
152 },
153
154 [ C(ITLB) ] = {
155 [ C(OP_READ) ] = {
156 [ C(RESULT_ACCESS) ] = 0,
157 [ C(RESULT_MISS) ] = 0x0007,
158 },
159 [ C(OP_WRITE) ] = {
160 [ C(RESULT_ACCESS) ] = -1,
161 [ C(RESULT_MISS) ] = -1,
162 },
163 [ C(OP_PREFETCH) ] = {
164 [ C(RESULT_ACCESS) ] = -1,
165 [ C(RESULT_MISS) ] = -1,
166 },
167 },
168
169 [ C(BPU) ] = {
170 [ C(OP_READ) ] = {
171 [ C(RESULT_ACCESS) ] = -1,
172 [ C(RESULT_MISS) ] = -1,
173 },
174 [ C(OP_WRITE) ] = {
175 [ C(RESULT_ACCESS) ] = -1,
176 [ C(RESULT_MISS) ] = -1,
177 },
178 [ C(OP_PREFETCH) ] = {
179 [ C(RESULT_ACCESS) ] = -1,
180 [ C(RESULT_MISS) ] = -1,
181 },
182 },
183};
184
185static int sh7750_event_map(int event)
186{
187 return sh7750_general_events[event];
188}
189
190static u64 sh7750_pmu_read(int idx)
191{
192 return (u64)((u64)(__raw_readl(PMCTRH(idx)) & 0xffff) << 32) |
193 __raw_readl(PMCTRL(idx));
194}
195
196static void sh7750_pmu_disable(struct hw_perf_event *hwc, int idx)
197{
198 unsigned int tmp;
199
200 tmp = __raw_readw(PMCR(idx));
201 tmp &= ~(PMCR_PMM_MASK | PMCR_PMEN);
202 __raw_writew(tmp, PMCR(idx));
203}
204
205static void sh7750_pmu_enable(struct hw_perf_event *hwc, int idx)
206{
207 __raw_writew(__raw_readw(PMCR(idx)) | PMCR_PMCLR, PMCR(idx));
208 __raw_writew(hwc->config | PMCR_PMEN | PMCR_PMST, PMCR(idx));
209}
210
211static void sh7750_pmu_disable_all(void)
212{
213 int i;
214
215 for (i = 0; i < sh7750_pmu.num_events; i++)
216 __raw_writew(__raw_readw(PMCR(i)) & ~PMCR_PMEN, PMCR(i));
217}
218
219static void sh7750_pmu_enable_all(void)
220{
221 int i;
222
223 for (i = 0; i < sh7750_pmu.num_events; i++)
224 __raw_writew(__raw_readw(PMCR(i)) | PMCR_PMEN, PMCR(i));
225}
226
227static struct sh_pmu sh7750_pmu = {
228 .name = "SH7750",
229 .num_events = 2,
230 .event_map = sh7750_event_map,
231 .max_events = ARRAY_SIZE(sh7750_general_events),
232 .raw_event_mask = PMCR_PMM_MASK,
233 .cache_events = &sh7750_cache_events,
234 .read = sh7750_pmu_read,
235 .disable = sh7750_pmu_disable,
236 .enable = sh7750_pmu_enable,
237 .disable_all = sh7750_pmu_disable_all,
238 .enable_all = sh7750_pmu_enable_all,
239};
240
241static int __init sh7750_pmu_init(void)
242{
243 /*
244 * Make sure this CPU actually has perf counters.
245 */
246 if (!(boot_cpu_data.flags & CPU_HAS_PERF_COUNTER)) {
247 pr_notice("HW perf events unsupported, software events only.\n");
248 return -ENODEV;
249 }
250
251 return register_sh_pmu(&sh7750_pmu);
252}
253arch_initcall(sh7750_pmu_init);
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
index de4827df19aa..4b733715cdb5 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
@@ -15,22 +15,18 @@
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18static struct plat_sci_port sci_platform_data[] = { 18static struct plat_sci_port scif0_platform_data = {
19 { 19 .mapbase = 0xffe80000,
20 .mapbase = 0xffe80000, 20 .flags = UPF_BOOT_AUTOCONF,
21 .flags = UPF_BOOT_AUTOCONF, 21 .type = PORT_SCIF,
22 .type = PORT_SCIF, 22 .irqs = { 40, 41, 43, 42 },
23 .irqs = { 40, 41, 43, 42 },
24 }, {
25 .flags = 0,
26 }
27}; 23};
28 24
29static struct platform_device sci_device = { 25static struct platform_device scif0_device = {
30 .name = "sh-sci", 26 .name = "sh-sci",
31 .id = -1, 27 .id = 0,
32 .dev = { 28 .dev = {
33 .platform_data = sci_platform_data, 29 .platform_data = &scif0_platform_data,
34 }, 30 },
35}; 31};
36 32
@@ -127,7 +123,7 @@ static struct platform_device tmu2_device = {
127}; 123};
128 124
129static struct platform_device *sh4202_devices[] __initdata = { 125static struct platform_device *sh4202_devices[] __initdata = {
130 &sci_device, 126 &scif0_device,
131 &tmu0_device, 127 &tmu0_device,
132 &tmu1_device, 128 &tmu1_device,
133 &tmu2_device, 129 &tmu2_device,
@@ -141,6 +137,7 @@ static int __init sh4202_devices_setup(void)
141arch_initcall(sh4202_devices_setup); 137arch_initcall(sh4202_devices_setup);
142 138
143static struct platform_device *sh4202_early_devices[] __initdata = { 139static struct platform_device *sh4202_early_devices[] __initdata = {
140 &scif0_device,
144 &tmu0_device, 141 &tmu0_device,
145 &tmu1_device, 142 &tmu1_device,
146 &tmu2_device, 143 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index 1b8b122e8f3d..b2a9df1af64c 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -35,29 +35,33 @@ static struct platform_device rtc_device = {
35 .resource = rtc_resources, 35 .resource = rtc_resources,
36}; 36};
37 37
38static struct plat_sci_port sci_platform_data[] = { 38static struct plat_sci_port scif0_platform_data = {
39 { 39 .mapbase = 0xffe00000,
40#ifndef CONFIG_SH_RTS7751R2D 40 .flags = UPF_BOOT_AUTOCONF,
41 .mapbase = 0xffe00000, 41 .type = PORT_SCI,
42 .flags = UPF_BOOT_AUTOCONF, 42 .irqs = { 23, 23, 23, 0 },
43 .type = PORT_SCI,
44 .irqs = { 23, 23, 23, 0 },
45 }, {
46#endif
47 .mapbase = 0xffe80000,
48 .flags = UPF_BOOT_AUTOCONF,
49 .type = PORT_SCIF,
50 .irqs = { 40, 40, 40, 40 },
51 }, {
52 .flags = 0,
53 }
54}; 43};
55 44
56static struct platform_device sci_device = { 45static struct platform_device scif0_device = {
57 .name = "sh-sci", 46 .name = "sh-sci",
58 .id = -1, 47 .id = 0,
48 .dev = {
49 .platform_data = &scif0_platform_data,
50 },
51};
52
53static struct plat_sci_port scif1_platform_data = {
54 .mapbase = 0xffe80000,
55 .flags = UPF_BOOT_AUTOCONF,
56 .type = PORT_SCIF,
57 .irqs = { 40, 40, 40, 40 },
58};
59
60static struct platform_device scif1_device = {
61 .name = "sh-sci",
62 .id = 1,
59 .dev = { 63 .dev = {
60 .platform_data = sci_platform_data, 64 .platform_data = &scif1_platform_data,
61 }, 65 },
62}; 66};
63 67
@@ -221,8 +225,9 @@ static struct platform_device tmu4_device = {
221#endif 225#endif
222 226
223static struct platform_device *sh7750_devices[] __initdata = { 227static struct platform_device *sh7750_devices[] __initdata = {
228 &scif0_device,
229 &scif1_device,
224 &rtc_device, 230 &rtc_device,
225 &sci_device,
226 &tmu0_device, 231 &tmu0_device,
227 &tmu1_device, 232 &tmu1_device,
228 &tmu2_device, 233 &tmu2_device,
@@ -242,6 +247,8 @@ static int __init sh7750_devices_setup(void)
242arch_initcall(sh7750_devices_setup); 247arch_initcall(sh7750_devices_setup);
243 248
244static struct platform_device *sh7750_early_devices[] __initdata = { 249static struct platform_device *sh7750_early_devices[] __initdata = {
250 &scif0_device,
251 &scif1_device,
245 &tmu0_device, 252 &tmu0_device,
246 &tmu1_device, 253 &tmu1_device,
247 &tmu2_device, 254 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 7fbb7be9284c..5b74cc0b43da 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -126,37 +126,63 @@ static struct intc_vect vectors_irq[] __initdata = {
126static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups, 126static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups,
127 mask_registers, prio_registers, NULL); 127 mask_registers, prio_registers, NULL);
128 128
129static struct plat_sci_port sci_platform_data[] = { 129static struct plat_sci_port scif0_platform_data = {
130 { 130 .mapbase = 0xfe600000,
131 .mapbase = 0xfe600000, 131 .flags = UPF_BOOT_AUTOCONF,
132 .flags = UPF_BOOT_AUTOCONF, 132 .type = PORT_SCIF,
133 .type = PORT_SCIF, 133 .irqs = { 52, 53, 55, 54 },
134 .irqs = { 52, 53, 55, 54 }, 134};
135 }, { 135
136 .mapbase = 0xfe610000, 136static struct platform_device scif0_device = {
137 .flags = UPF_BOOT_AUTOCONF, 137 .name = "sh-sci",
138 .type = PORT_SCIF, 138 .id = 0,
139 .irqs = { 72, 73, 75, 74 }, 139 .dev = {
140 }, { 140 .platform_data = &scif0_platform_data,
141 .mapbase = 0xfe620000, 141 },
142 .flags = UPF_BOOT_AUTOCONF, 142};
143 .type = PORT_SCIF, 143
144 .irqs = { 76, 77, 79, 78 }, 144static struct plat_sci_port scif1_platform_data = {
145 }, { 145 .mapbase = 0xfe610000,
146 .mapbase = 0xfe480000, 146 .flags = UPF_BOOT_AUTOCONF,
147 .flags = UPF_BOOT_AUTOCONF, 147 .type = PORT_SCIF,
148 .type = PORT_SCI, 148 .irqs = { 72, 73, 75, 74 },
149 .irqs = { 80, 81, 82, 0 }, 149};
150 }, { 150
151 .flags = 0, 151static struct platform_device scif1_device = {
152 } 152 .name = "sh-sci",
153 .id = 1,
154 .dev = {
155 .platform_data = &scif1_platform_data,
156 },
157};
158
159static struct plat_sci_port scif2_platform_data = {
160 .mapbase = 0xfe620000,
161 .flags = UPF_BOOT_AUTOCONF,
162 .type = PORT_SCIF,
163 .irqs = { 76, 77, 79, 78 },
164};
165
166static struct platform_device scif2_device = {
167 .name = "sh-sci",
168 .id = 2,
169 .dev = {
170 .platform_data = &scif2_platform_data,
171 },
172};
173
174static struct plat_sci_port scif3_platform_data = {
175 .mapbase = 0xfe480000,
176 .flags = UPF_BOOT_AUTOCONF,
177 .type = PORT_SCI,
178 .irqs = { 80, 81, 82, 0 },
153}; 179};
154 180
155static struct platform_device sci_device = { 181static struct platform_device scif3_device = {
156 .name = "sh-sci", 182 .name = "sh-sci",
157 .id = -1, 183 .id = 3,
158 .dev = { 184 .dev = {
159 .platform_data = sci_platform_data, 185 .platform_data = &scif3_platform_data,
160 }, 186 },
161}; 187};
162 188
@@ -254,7 +280,10 @@ static struct platform_device tmu2_device = {
254 280
255 281
256static struct platform_device *sh7760_devices[] __initdata = { 282static struct platform_device *sh7760_devices[] __initdata = {
257 &sci_device, 283 &scif0_device,
284 &scif1_device,
285 &scif2_device,
286 &scif3_device,
258 &tmu0_device, 287 &tmu0_device,
259 &tmu1_device, 288 &tmu1_device,
260 &tmu2_device, 289 &tmu2_device,
@@ -268,6 +297,10 @@ static int __init sh7760_devices_setup(void)
268arch_initcall(sh7760_devices_setup); 297arch_initcall(sh7760_devices_setup);
269 298
270static struct platform_device *sh7760_early_devices[] __initdata = { 299static struct platform_device *sh7760_early_devices[] __initdata = {
300 &scif0_device,
301 &scif1_device,
302 &scif2_device,
303 &scif3_device,
271 &tmu0_device, 304 &tmu0_device,
272 &tmu1_device, 305 &tmu1_device,
273 &tmu2_device, 306 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index 490d5dc9e372..33bab477d2e2 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -44,3 +44,4 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SH7786) := pinmux-sh7786.o
44obj-y += $(clock-y) 44obj-y += $(clock-y)
45obj-$(CONFIG_SMP) += $(smp-y) 45obj-$(CONFIG_SMP) += $(smp-y)
46obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) 46obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y)
47obj-$(CONFIG_PERF_EVENTS) += perf_event.o
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index dfe9192be63e..9db743802f06 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -152,7 +152,7 @@ struct clk div6_clks[] = {
152 SH_CLK_DIV6("fsia_clk", &div3_clk, FCLKACR, 0), 152 SH_CLK_DIV6("fsia_clk", &div3_clk, FCLKACR, 0),
153 SH_CLK_DIV6("fsib_clk", &div3_clk, FCLKBCR, 0), 153 SH_CLK_DIV6("fsib_clk", &div3_clk, FCLKBCR, 0),
154 SH_CLK_DIV6("irda_clk", &div3_clk, IRDACLKCR, 0), 154 SH_CLK_DIV6("irda_clk", &div3_clk, IRDACLKCR, 0),
155 SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, 0), 155 SH_CLK_DIV6("spu_clk", &div3_clk, SPUCLKCR, CLK_ENABLE_ON_INIT),
156}; 156};
157 157
158#define R_CLK (&r_clk) 158#define R_CLK (&r_clk)
diff --git a/arch/sh/kernel/cpu/sh4a/perf_event.c b/arch/sh/kernel/cpu/sh4a/perf_event.c
new file mode 100644
index 000000000000..eddc21973fa1
--- /dev/null
+++ b/arch/sh/kernel/cpu/sh4a/perf_event.c
@@ -0,0 +1,269 @@
1/*
2 * Performance events support for SH-4A performance counters
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/io.h>
13#include <linux/irq.h>
14#include <linux/perf_event.h>
15#include <asm/processor.h>
16
17#define PPC_CCBR(idx) (0xff200800 + (sizeof(u32) * idx))
18#define PPC_PMCTR(idx) (0xfc100000 + (sizeof(u32) * idx))
19
20#define CCBR_CIT_MASK (0x7ff << 6)
21#define CCBR_DUC (1 << 3)
22#define CCBR_CMDS (1 << 1)
23#define CCBR_PPCE (1 << 0)
24
25#define PPC_PMCAT 0xfc100080
26
27#define PMCAT_OVF3 (1 << 27)
28#define PMCAT_CNN3 (1 << 26)
29#define PMCAT_CLR3 (1 << 25)
30#define PMCAT_OVF2 (1 << 19)
31#define PMCAT_CLR2 (1 << 17)
32#define PMCAT_OVF1 (1 << 11)
33#define PMCAT_CNN1 (1 << 10)
34#define PMCAT_CLR1 (1 << 9)
35#define PMCAT_OVF0 (1 << 3)
36#define PMCAT_CLR0 (1 << 1)
37
38static struct sh_pmu sh4a_pmu;
39
40/*
41 * Supported raw event codes:
42 *
43 * Event Code Description
44 * ---------- -----------
45 *
46 * 0x0000 number of elapsed cycles
47 * 0x0200 number of elapsed cycles in privileged mode
48 * 0x0280 number of elapsed cycles while SR.BL is asserted
49 * 0x0202 instruction execution
50 * 0x0203 instruction execution in parallel
51 * 0x0204 number of unconditional branches
52 * 0x0208 number of exceptions
53 * 0x0209 number of interrupts
54 * 0x0220 UTLB miss caused by instruction fetch
55 * 0x0222 UTLB miss caused by operand access
56 * 0x02a0 number of ITLB misses
57 * 0x0028 number of accesses to instruction memories
58 * 0x0029 number of accesses to instruction cache
59 * 0x002a instruction cache miss
60 * 0x022e number of access to instruction X/Y memory
61 * 0x0030 number of reads to operand memories
62 * 0x0038 number of writes to operand memories
63 * 0x0031 number of operand cache read accesses
64 * 0x0039 number of operand cache write accesses
65 * 0x0032 operand cache read miss
66 * 0x003a operand cache write miss
67 * 0x0236 number of reads to operand X/Y memory
68 * 0x023e number of writes to operand X/Y memory
69 * 0x0237 number of reads to operand U memory
70 * 0x023f number of writes to operand U memory
71 * 0x0337 number of U memory read buffer misses
72 * 0x02b4 number of wait cycles due to operand read access
73 * 0x02bc number of wait cycles due to operand write access
74 * 0x0033 number of wait cycles due to operand cache read miss
75 * 0x003b number of wait cycles due to operand cache write miss
76 */
77
78/*
79 * Special reserved bits used by hardware emulators, read values will
80 * vary, but writes must always be 0.
81 */
82#define PMCAT_EMU_CLR_MASK ((1 << 24) | (1 << 16) | (1 << 8) | (1 << 0))
83
84static const int sh4a_general_events[] = {
85 [PERF_COUNT_HW_CPU_CYCLES] = 0x0000,
86 [PERF_COUNT_HW_INSTRUCTIONS] = 0x0202,
87 [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0029, /* I-cache */
88 [PERF_COUNT_HW_CACHE_MISSES] = 0x002a, /* I-cache */
89 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x0204,
90 [PERF_COUNT_HW_BRANCH_MISSES] = -1,
91 [PERF_COUNT_HW_BUS_CYCLES] = -1,
92};
93
94#define C(x) PERF_COUNT_HW_CACHE_##x
95
96static const int sh4a_cache_events
97 [PERF_COUNT_HW_CACHE_MAX]
98 [PERF_COUNT_HW_CACHE_OP_MAX]
99 [PERF_COUNT_HW_CACHE_RESULT_MAX] =
100{
101 [ C(L1D) ] = {
102 [ C(OP_READ) ] = {
103 [ C(RESULT_ACCESS) ] = 0x0031,
104 [ C(RESULT_MISS) ] = 0x0032,
105 },
106 [ C(OP_WRITE) ] = {
107 [ C(RESULT_ACCESS) ] = 0x0039,
108 [ C(RESULT_MISS) ] = 0x003a,
109 },
110 [ C(OP_PREFETCH) ] = {
111 [ C(RESULT_ACCESS) ] = 0,
112 [ C(RESULT_MISS) ] = 0,
113 },
114 },
115
116 [ C(L1I) ] = {
117 [ C(OP_READ) ] = {
118 [ C(RESULT_ACCESS) ] = 0x0029,
119 [ C(RESULT_MISS) ] = 0x002a,
120 },
121 [ C(OP_WRITE) ] = {
122 [ C(RESULT_ACCESS) ] = -1,
123 [ C(RESULT_MISS) ] = -1,
124 },
125 [ C(OP_PREFETCH) ] = {
126 [ C(RESULT_ACCESS) ] = 0,
127 [ C(RESULT_MISS) ] = 0,
128 },
129 },
130
131 [ C(LL) ] = {
132 [ C(OP_READ) ] = {
133 [ C(RESULT_ACCESS) ] = 0x0030,
134 [ C(RESULT_MISS) ] = 0,
135 },
136 [ C(OP_WRITE) ] = {
137 [ C(RESULT_ACCESS) ] = 0x0038,
138 [ C(RESULT_MISS) ] = 0,
139 },
140 [ C(OP_PREFETCH) ] = {
141 [ C(RESULT_ACCESS) ] = 0,
142 [ C(RESULT_MISS) ] = 0,
143 },
144 },
145
146 [ C(DTLB) ] = {
147 [ C(OP_READ) ] = {
148 [ C(RESULT_ACCESS) ] = 0x0222,
149 [ C(RESULT_MISS) ] = 0x0220,
150 },
151 [ C(OP_WRITE) ] = {
152 [ C(RESULT_ACCESS) ] = 0,
153 [ C(RESULT_MISS) ] = 0,
154 },
155 [ C(OP_PREFETCH) ] = {
156 [ C(RESULT_ACCESS) ] = 0,
157 [ C(RESULT_MISS) ] = 0,
158 },
159 },
160
161 [ C(ITLB) ] = {
162 [ C(OP_READ) ] = {
163 [ C(RESULT_ACCESS) ] = 0,
164 [ C(RESULT_MISS) ] = 0x02a0,
165 },
166 [ C(OP_WRITE) ] = {
167 [ C(RESULT_ACCESS) ] = -1,
168 [ C(RESULT_MISS) ] = -1,
169 },
170 [ C(OP_PREFETCH) ] = {
171 [ C(RESULT_ACCESS) ] = -1,
172 [ C(RESULT_MISS) ] = -1,
173 },
174 },
175
176 [ C(BPU) ] = {
177 [ C(OP_READ) ] = {
178 [ C(RESULT_ACCESS) ] = -1,
179 [ C(RESULT_MISS) ] = -1,
180 },
181 [ C(OP_WRITE) ] = {
182 [ C(RESULT_ACCESS) ] = -1,
183 [ C(RESULT_MISS) ] = -1,
184 },
185 [ C(OP_PREFETCH) ] = {
186 [ C(RESULT_ACCESS) ] = -1,
187 [ C(RESULT_MISS) ] = -1,
188 },
189 },
190};
191
192static int sh4a_event_map(int event)
193{
194 return sh4a_general_events[event];
195}
196
197static u64 sh4a_pmu_read(int idx)
198{
199 return __raw_readl(PPC_PMCTR(idx));
200}
201
202static void sh4a_pmu_disable(struct hw_perf_event *hwc, int idx)
203{
204 unsigned int tmp;
205
206 tmp = __raw_readl(PPC_CCBR(idx));
207 tmp &= ~(CCBR_CIT_MASK | CCBR_DUC);
208 __raw_writel(tmp, PPC_CCBR(idx));
209}
210
211static void sh4a_pmu_enable(struct hw_perf_event *hwc, int idx)
212{
213 unsigned int tmp;
214
215 tmp = __raw_readl(PPC_PMCAT);
216 tmp &= ~PMCAT_EMU_CLR_MASK;
217 tmp |= idx ? PMCAT_CLR1 : PMCAT_CLR0;
218 __raw_writel(tmp, PPC_PMCAT);
219
220 tmp = __raw_readl(PPC_CCBR(idx));
221 tmp |= (hwc->config << 6) | CCBR_CMDS | CCBR_PPCE;
222 __raw_writel(tmp, PPC_CCBR(idx));
223
224 __raw_writel(__raw_readl(PPC_CCBR(idx)) | CCBR_DUC, PPC_CCBR(idx));
225}
226
227static void sh4a_pmu_disable_all(void)
228{
229 int i;
230
231 for (i = 0; i < sh4a_pmu.num_events; i++)
232 __raw_writel(__raw_readl(PPC_CCBR(i)) & ~CCBR_DUC, PPC_CCBR(i));
233}
234
235static void sh4a_pmu_enable_all(void)
236{
237 int i;
238
239 for (i = 0; i < sh4a_pmu.num_events; i++)
240 __raw_writel(__raw_readl(PPC_CCBR(i)) | CCBR_DUC, PPC_CCBR(i));
241}
242
243static struct sh_pmu sh4a_pmu = {
244 .name = "SH-4A",
245 .num_events = 2,
246 .event_map = sh4a_event_map,
247 .max_events = ARRAY_SIZE(sh4a_general_events),
248 .raw_event_mask = 0x3ff,
249 .cache_events = &sh4a_cache_events,
250 .read = sh4a_pmu_read,
251 .disable = sh4a_pmu_disable,
252 .enable = sh4a_pmu_enable,
253 .disable_all = sh4a_pmu_disable_all,
254 .enable_all = sh4a_pmu_enable_all,
255};
256
257static int __init sh4a_pmu_init(void)
258{
259 /*
260 * Make sure this CPU actually has perf counters.
261 */
262 if (!(boot_cpu_data.flags & CPU_HAS_PERF_COUNTER)) {
263 pr_notice("HW perf events unsupported, software events only.\n");
264 return -ENODEV;
265 }
266
267 return register_sh_pmu(&sh4a_pmu);
268}
269arch_initcall(sh4a_pmu_init);
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
index ac4d5672ec1a..45eb1bfd42c9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
@@ -15,6 +15,71 @@
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <asm/clock.h> 16#include <asm/clock.h>
17 17
18/* Serial */
19static struct plat_sci_port scif0_platform_data = {
20 .mapbase = 0xffe00000,
21 .flags = UPF_BOOT_AUTOCONF,
22 .type = PORT_SCIF,
23 .irqs = { 80, 80, 80, 80 },
24 .clk = "scif0",
25};
26
27static struct platform_device scif0_device = {
28 .name = "sh-sci",
29 .id = 0,
30 .dev = {
31 .platform_data = &scif0_platform_data,
32 },
33};
34
35static struct plat_sci_port scif1_platform_data = {
36 .mapbase = 0xffe10000,
37 .flags = UPF_BOOT_AUTOCONF,
38 .type = PORT_SCIF,
39 .irqs = { 81, 81, 81, 81 },
40 .clk = "scif1",
41};
42
43static struct platform_device scif1_device = {
44 .name = "sh-sci",
45 .id = 1,
46 .dev = {
47 .platform_data = &scif1_platform_data,
48 },
49};
50
51static struct plat_sci_port scif2_platform_data = {
52 .mapbase = 0xffe20000,
53 .flags = UPF_BOOT_AUTOCONF,
54 .type = PORT_SCIF,
55 .irqs = { 82, 82, 82, 82 },
56 .clk = "scif2",
57};
58
59static struct platform_device scif2_device = {
60 .name = "sh-sci",
61 .id = 2,
62 .dev = {
63 .platform_data = &scif2_platform_data,
64 },
65};
66
67static struct plat_sci_port scif3_platform_data = {
68 .mapbase = 0xffe30000,
69 .flags = UPF_BOOT_AUTOCONF,
70 .type = PORT_SCIF,
71 .irqs = { 83, 83, 83, 83 },
72 .clk = "scif3",
73};
74
75static struct platform_device scif3_device = {
76 .name = "sh-sci",
77 .id = 3,
78 .dev = {
79 .platform_data = &scif3_platform_data,
80 },
81};
82
18static struct resource iic0_resources[] = { 83static struct resource iic0_resources[] = {
19 [0] = { 84 [0] = {
20 .name = "IIC0", 85 .name = "IIC0",
@@ -265,52 +330,17 @@ static struct platform_device tmu2_device = {
265 .num_resources = ARRAY_SIZE(tmu2_resources), 330 .num_resources = ARRAY_SIZE(tmu2_resources),
266}; 331};
267 332
268static struct plat_sci_port sci_platform_data[] = {
269 {
270 .mapbase = 0xffe00000,
271 .flags = UPF_BOOT_AUTOCONF,
272 .type = PORT_SCIF,
273 .irqs = { 80, 80, 80, 80 },
274 .clk = "scif0",
275 }, {
276 .mapbase = 0xffe10000,
277 .flags = UPF_BOOT_AUTOCONF,
278 .type = PORT_SCIF,
279 .irqs = { 81, 81, 81, 81 },
280 .clk = "scif1",
281 }, {
282 .mapbase = 0xffe20000,
283 .flags = UPF_BOOT_AUTOCONF,
284 .type = PORT_SCIF,
285 .irqs = { 82, 82, 82, 82 },
286 .clk = "scif2",
287 }, {
288 .mapbase = 0xffe30000,
289 .flags = UPF_BOOT_AUTOCONF,
290 .type = PORT_SCIF,
291 .irqs = { 83, 83, 83, 83 },
292 .clk = "scif3",
293 }, {
294 .flags = 0,
295 }
296};
297
298static struct platform_device sci_device = {
299 .name = "sh-sci",
300 .id = -1,
301 .dev = {
302 .platform_data = sci_platform_data,
303 },
304};
305
306static struct platform_device *sh7343_devices[] __initdata = { 333static struct platform_device *sh7343_devices[] __initdata = {
334 &scif0_device,
335 &scif1_device,
336 &scif2_device,
337 &scif3_device,
307 &cmt_device, 338 &cmt_device,
308 &tmu0_device, 339 &tmu0_device,
309 &tmu1_device, 340 &tmu1_device,
310 &tmu2_device, 341 &tmu2_device,
311 &iic0_device, 342 &iic0_device,
312 &iic1_device, 343 &iic1_device,
313 &sci_device,
314 &vpu_device, 344 &vpu_device,
315 &veu_device, 345 &veu_device,
316 &jpu_device, 346 &jpu_device,
@@ -328,6 +358,10 @@ static int __init sh7343_devices_setup(void)
328arch_initcall(sh7343_devices_setup); 358arch_initcall(sh7343_devices_setup);
329 359
330static struct platform_device *sh7343_early_devices[] __initdata = { 360static struct platform_device *sh7343_early_devices[] __initdata = {
361 &scif0_device,
362 &scif1_device,
363 &scif2_device,
364 &scif3_device,
331 &cmt_device, 365 &cmt_device,
332 &tmu0_device, 366 &tmu0_device,
333 &tmu1_device, 367 &tmu1_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 4a9010bf4fd3..c494c193e3b6 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -18,6 +18,22 @@
18#include <linux/usb/r8a66597.h> 18#include <linux/usb/r8a66597.h>
19#include <asm/clock.h> 19#include <asm/clock.h>
20 20
21static struct plat_sci_port scif0_platform_data = {
22 .mapbase = 0xffe00000,
23 .flags = UPF_BOOT_AUTOCONF,
24 .type = PORT_SCIF,
25 .irqs = { 80, 80, 80, 80 },
26 .clk = "scif0",
27};
28
29static struct platform_device scif0_device = {
30 .name = "sh-sci",
31 .id = 0,
32 .dev = {
33 .platform_data = &scif0_platform_data,
34 },
35};
36
21static struct resource iic_resources[] = { 37static struct resource iic_resources[] = {
22 [0] = { 38 [0] = {
23 .name = "IIC", 39 .name = "IIC",
@@ -276,33 +292,13 @@ static struct platform_device tmu2_device = {
276 .num_resources = ARRAY_SIZE(tmu2_resources), 292 .num_resources = ARRAY_SIZE(tmu2_resources),
277}; 293};
278 294
279static struct plat_sci_port sci_platform_data[] = {
280 {
281 .mapbase = 0xffe00000,
282 .flags = UPF_BOOT_AUTOCONF,
283 .type = PORT_SCIF,
284 .irqs = { 80, 80, 80, 80 },
285 .clk = "scif0",
286 }, {
287 .flags = 0,
288 }
289};
290
291static struct platform_device sci_device = {
292 .name = "sh-sci",
293 .id = -1,
294 .dev = {
295 .platform_data = sci_platform_data,
296 },
297};
298
299static struct platform_device *sh7366_devices[] __initdata = { 295static struct platform_device *sh7366_devices[] __initdata = {
296 &scif0_device,
300 &cmt_device, 297 &cmt_device,
301 &tmu0_device, 298 &tmu0_device,
302 &tmu1_device, 299 &tmu1_device,
303 &tmu2_device, 300 &tmu2_device,
304 &iic_device, 301 &iic_device,
305 &sci_device,
306 &usb_host_device, 302 &usb_host_device,
307 &vpu_device, 303 &vpu_device,
308 &veu0_device, 304 &veu0_device,
@@ -321,6 +317,7 @@ static int __init sh7366_devices_setup(void)
321arch_initcall(sh7366_devices_setup); 317arch_initcall(sh7366_devices_setup);
322 318
323static struct platform_device *sh7366_early_devices[] __initdata = { 319static struct platform_device *sh7366_early_devices[] __initdata = {
320 &scif0_device,
324 &cmt_device, 321 &cmt_device,
325 &tmu0_device, 322 &tmu0_device,
326 &tmu1_device, 323 &tmu1_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 5491b094cf05..b5335b5e309c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -20,6 +20,55 @@
20#include <asm/dma-sh.h> 20#include <asm/dma-sh.h>
21#include <cpu/sh7722.h> 21#include <cpu/sh7722.h>
22 22
23/* Serial */
24static struct plat_sci_port scif0_platform_data = {
25 .mapbase = 0xffe00000,
26 .flags = UPF_BOOT_AUTOCONF,
27 .type = PORT_SCIF,
28 .irqs = { 80, 80, 80, 80 },
29 .clk = "scif0",
30};
31
32static struct platform_device scif0_device = {
33 .name = "sh-sci",
34 .id = 0,
35 .dev = {
36 .platform_data = &scif0_platform_data,
37 },
38};
39
40static struct plat_sci_port scif1_platform_data = {
41 .mapbase = 0xffe10000,
42 .flags = UPF_BOOT_AUTOCONF,
43 .type = PORT_SCIF,
44 .irqs = { 81, 81, 81, 81 },
45 .clk = "scif1",
46};
47
48static struct platform_device scif1_device = {
49 .name = "sh-sci",
50 .id = 1,
51 .dev = {
52 .platform_data = &scif1_platform_data,
53 },
54};
55
56static struct plat_sci_port scif2_platform_data = {
57 .mapbase = 0xffe20000,
58 .flags = UPF_BOOT_AUTOCONF,
59 .type = PORT_SCIF,
60 .irqs = { 82, 82, 82, 82 },
61 .clk = "scif2",
62};
63
64static struct platform_device scif2_device = {
65 .name = "sh-sci",
66 .id = 2,
67 .dev = {
68 .platform_data = &scif2_platform_data,
69 },
70};
71
23static struct resource rtc_resources[] = { 72static struct resource rtc_resources[] = {
24 [0] = { 73 [0] = {
25 .start = 0xa465fec0, 74 .start = 0xa465fec0,
@@ -339,41 +388,6 @@ static struct platform_device tmu2_device = {
339 }, 388 },
340}; 389};
341 390
342static struct plat_sci_port sci_platform_data[] = {
343 {
344 .mapbase = 0xffe00000,
345 .flags = UPF_BOOT_AUTOCONF,
346 .type = PORT_SCIF,
347 .irqs = { 80, 80, 80, 80 },
348 .clk = "scif0",
349 },
350 {
351 .mapbase = 0xffe10000,
352 .flags = UPF_BOOT_AUTOCONF,
353 .type = PORT_SCIF,
354 .irqs = { 81, 81, 81, 81 },
355 .clk = "scif1",
356 },
357 {
358 .mapbase = 0xffe20000,
359 .flags = UPF_BOOT_AUTOCONF,
360 .type = PORT_SCIF,
361 .irqs = { 82, 82, 82, 82 },
362 .clk = "scif2",
363 },
364 {
365 .flags = 0,
366 }
367};
368
369static struct platform_device sci_device = {
370 .name = "sh-sci",
371 .id = -1,
372 .dev = {
373 .platform_data = sci_platform_data,
374 },
375};
376
377static struct sh_dmae_pdata dma_platform_data = { 391static struct sh_dmae_pdata dma_platform_data = {
378 .mode = 0, 392 .mode = 0,
379}; 393};
@@ -387,6 +401,9 @@ static struct platform_device dma_device = {
387}; 401};
388 402
389static struct platform_device *sh7722_devices[] __initdata = { 403static struct platform_device *sh7722_devices[] __initdata = {
404 &scif0_device,
405 &scif1_device,
406 &scif2_device,
390 &cmt_device, 407 &cmt_device,
391 &tmu0_device, 408 &tmu0_device,
392 &tmu1_device, 409 &tmu1_device,
@@ -394,7 +411,6 @@ static struct platform_device *sh7722_devices[] __initdata = {
394 &rtc_device, 411 &rtc_device,
395 &usbf_device, 412 &usbf_device,
396 &iic_device, 413 &iic_device,
397 &sci_device,
398 &vpu_device, 414 &vpu_device,
399 &veu_device, 415 &veu_device,
400 &jpu_device, 416 &jpu_device,
@@ -413,6 +429,9 @@ static int __init sh7722_devices_setup(void)
413arch_initcall(sh7722_devices_setup); 429arch_initcall(sh7722_devices_setup);
414 430
415static struct platform_device *sh7722_early_devices[] __initdata = { 431static struct platform_device *sh7722_early_devices[] __initdata = {
432 &scif0_device,
433 &scif1_device,
434 &scif2_device,
416 &cmt_device, 435 &cmt_device,
417 &tmu0_device, 436 &tmu0_device,
418 &tmu1_device, 437 &tmu1_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index 4caa5a7ca86e..772b9265d0e4 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -20,6 +20,103 @@
20#include <asm/mmzone.h> 20#include <asm/mmzone.h>
21#include <cpu/sh7723.h> 21#include <cpu/sh7723.h>
22 22
23/* Serial */
24static struct plat_sci_port scif0_platform_data = {
25 .mapbase = 0xffe00000,
26 .flags = UPF_BOOT_AUTOCONF,
27 .type = PORT_SCIF,
28 .irqs = { 80, 80, 80, 80 },
29 .clk = "scif0",
30};
31
32static struct platform_device scif0_device = {
33 .name = "sh-sci",
34 .id = 0,
35 .dev = {
36 .platform_data = &scif0_platform_data,
37 },
38};
39
40static struct plat_sci_port scif1_platform_data = {
41 .mapbase = 0xffe10000,
42 .flags = UPF_BOOT_AUTOCONF,
43 .type = PORT_SCIF,
44 .irqs = { 81, 81, 81, 81 },
45 .clk = "scif1",
46};
47
48static struct platform_device scif1_device = {
49 .name = "sh-sci",
50 .id = 1,
51 .dev = {
52 .platform_data = &scif1_platform_data,
53 },
54};
55
56static struct plat_sci_port scif2_platform_data = {
57 .mapbase = 0xffe20000,
58 .flags = UPF_BOOT_AUTOCONF,
59 .type = PORT_SCIF,
60 .irqs = { 82, 82, 82, 82 },
61 .clk = "scif2",
62};
63
64static struct platform_device scif2_device = {
65 .name = "sh-sci",
66 .id = 2,
67 .dev = {
68 .platform_data = &scif2_platform_data,
69 },
70};
71
72static struct plat_sci_port scif3_platform_data = {
73 .mapbase = 0xa4e30000,
74 .flags = UPF_BOOT_AUTOCONF,
75 .type = PORT_SCIFA,
76 .irqs = { 56, 56, 56, 56 },
77 .clk = "scif3",
78};
79
80static struct platform_device scif3_device = {
81 .name = "sh-sci",
82 .id = 3,
83 .dev = {
84 .platform_data = &scif3_platform_data,
85 },
86};
87
88static struct plat_sci_port scif4_platform_data = {
89 .mapbase = 0xa4e40000,
90 .flags = UPF_BOOT_AUTOCONF,
91 .type = PORT_SCIFA,
92 .irqs = { 88, 88, 88, 88 },
93 .clk = "scif4",
94};
95
96static struct platform_device scif4_device = {
97 .name = "sh-sci",
98 .id = 4,
99 .dev = {
100 .platform_data = &scif4_platform_data,
101 },
102};
103
104static struct plat_sci_port scif5_platform_data = {
105 .mapbase = 0xa4e50000,
106 .flags = UPF_BOOT_AUTOCONF,
107 .type = PORT_SCIFA,
108 .irqs = { 109, 109, 109, 109 },
109 .clk = "scif5",
110};
111
112static struct platform_device scif5_device = {
113 .name = "sh-sci",
114 .id = 5,
115 .dev = {
116 .platform_data = &scif5_platform_data,
117 },
118};
119
23static struct uio_info vpu_platform_data = { 120static struct uio_info vpu_platform_data = {
24 .name = "VPU5", 121 .name = "VPU5",
25 .version = "0", 122 .version = "0",
@@ -348,56 +445,6 @@ static struct platform_device tmu5_device = {
348 }, 445 },
349}; 446};
350 447
351static struct plat_sci_port sci_platform_data[] = {
352 {
353 .mapbase = 0xffe00000,
354 .flags = UPF_BOOT_AUTOCONF,
355 .type = PORT_SCIF,
356 .irqs = { 80, 80, 80, 80 },
357 .clk = "scif0",
358 },{
359 .mapbase = 0xffe10000,
360 .flags = UPF_BOOT_AUTOCONF,
361 .type = PORT_SCIF,
362 .irqs = { 81, 81, 81, 81 },
363 .clk = "scif1",
364 },{
365 .mapbase = 0xffe20000,
366 .flags = UPF_BOOT_AUTOCONF,
367 .type = PORT_SCIF,
368 .irqs = { 82, 82, 82, 82 },
369 .clk = "scif2",
370 },{
371 .mapbase = 0xa4e30000,
372 .flags = UPF_BOOT_AUTOCONF,
373 .type = PORT_SCIFA,
374 .irqs = { 56, 56, 56, 56 },
375 .clk = "scif3",
376 },{
377 .mapbase = 0xa4e40000,
378 .flags = UPF_BOOT_AUTOCONF,
379 .type = PORT_SCIFA,
380 .irqs = { 88, 88, 88, 88 },
381 .clk = "scif4",
382 },{
383 .mapbase = 0xa4e50000,
384 .flags = UPF_BOOT_AUTOCONF,
385 .type = PORT_SCIFA,
386 .irqs = { 109, 109, 109, 109 },
387 .clk = "scif5",
388 }, {
389 .flags = 0,
390 }
391};
392
393static struct platform_device sci_device = {
394 .name = "sh-sci",
395 .id = -1,
396 .dev = {
397 .platform_data = sci_platform_data,
398 },
399};
400
401static struct resource rtc_resources[] = { 448static struct resource rtc_resources[] = {
402 [0] = { 449 [0] = {
403 .start = 0xa465fec0, 450 .start = 0xa465fec0,
@@ -488,6 +535,12 @@ static struct platform_device iic_device = {
488}; 535};
489 536
490static struct platform_device *sh7723_devices[] __initdata = { 537static struct platform_device *sh7723_devices[] __initdata = {
538 &scif0_device,
539 &scif1_device,
540 &scif2_device,
541 &scif3_device,
542 &scif4_device,
543 &scif5_device,
491 &cmt_device, 544 &cmt_device,
492 &tmu0_device, 545 &tmu0_device,
493 &tmu1_device, 546 &tmu1_device,
@@ -495,7 +548,6 @@ static struct platform_device *sh7723_devices[] __initdata = {
495 &tmu3_device, 548 &tmu3_device,
496 &tmu4_device, 549 &tmu4_device,
497 &tmu5_device, 550 &tmu5_device,
498 &sci_device,
499 &rtc_device, 551 &rtc_device,
500 &iic_device, 552 &iic_device,
501 &sh7723_usb_host_device, 553 &sh7723_usb_host_device,
@@ -516,6 +568,12 @@ static int __init sh7723_devices_setup(void)
516arch_initcall(sh7723_devices_setup); 568arch_initcall(sh7723_devices_setup);
517 569
518static struct platform_device *sh7723_early_devices[] __initdata = { 570static struct platform_device *sh7723_early_devices[] __initdata = {
571 &scif0_device,
572 &scif1_device,
573 &scif2_device,
574 &scif3_device,
575 &scif4_device,
576 &scif5_device,
519 &cmt_device, 577 &cmt_device,
520 &tmu0_device, 578 &tmu0_device,
521 &tmu1_device, 579 &tmu1_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index f3851fd757ec..a52f35117e82 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -20,58 +20,106 @@
20#include <linux/uio_driver.h> 20#include <linux/uio_driver.h>
21#include <linux/sh_timer.h> 21#include <linux/sh_timer.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/notifier.h>
24#include <asm/suspend.h>
23#include <asm/clock.h> 25#include <asm/clock.h>
24#include <asm/mmzone.h> 26#include <asm/mmzone.h>
25#include <cpu/sh7724.h> 27#include <cpu/sh7724.h>
26 28
27/* Serial */ 29/* Serial */
28static struct plat_sci_port sci_platform_data[] = { 30static struct plat_sci_port scif0_platform_data = {
29 { 31 .mapbase = 0xffe00000,
30 .mapbase = 0xffe00000, 32 .flags = UPF_BOOT_AUTOCONF,
31 .flags = UPF_BOOT_AUTOCONF, 33 .type = PORT_SCIF,
32 .type = PORT_SCIF, 34 .irqs = { 80, 80, 80, 80 },
33 .irqs = { 80, 80, 80, 80 }, 35 .clk = "scif0",
34 .clk = "scif0", 36};
35 }, { 37
36 .mapbase = 0xffe10000, 38static struct platform_device scif0_device = {
37 .flags = UPF_BOOT_AUTOCONF,
38 .type = PORT_SCIF,
39 .irqs = { 81, 81, 81, 81 },
40 .clk = "scif1",
41 }, {
42 .mapbase = 0xffe20000,
43 .flags = UPF_BOOT_AUTOCONF,
44 .type = PORT_SCIF,
45 .irqs = { 82, 82, 82, 82 },
46 .clk = "scif2",
47 }, {
48 .mapbase = 0xa4e30000,
49 .flags = UPF_BOOT_AUTOCONF,
50 .type = PORT_SCIFA,
51 .irqs = { 56, 56, 56, 56 },
52 .clk = "scif3",
53 }, {
54 .mapbase = 0xa4e40000,
55 .flags = UPF_BOOT_AUTOCONF,
56 .type = PORT_SCIFA,
57 .irqs = { 88, 88, 88, 88 },
58 .clk = "scif4",
59 }, {
60 .mapbase = 0xa4e50000,
61 .flags = UPF_BOOT_AUTOCONF,
62 .type = PORT_SCIFA,
63 .irqs = { 109, 109, 109, 109 },
64 .clk = "scif5",
65 }, {
66 .flags = 0,
67 }
68};
69
70static struct platform_device sci_device = {
71 .name = "sh-sci", 39 .name = "sh-sci",
72 .id = -1, 40 .id = 0,
73 .dev = { 41 .dev = {
74 .platform_data = sci_platform_data, 42 .platform_data = &scif0_platform_data,
43 },
44};
45
46static struct plat_sci_port scif1_platform_data = {
47 .mapbase = 0xffe10000,
48 .flags = UPF_BOOT_AUTOCONF,
49 .type = PORT_SCIF,
50 .irqs = { 81, 81, 81, 81 },
51 .clk = "scif1",
52};
53
54static struct platform_device scif1_device = {
55 .name = "sh-sci",
56 .id = 1,
57 .dev = {
58 .platform_data = &scif1_platform_data,
59 },
60};
61
62static struct plat_sci_port scif2_platform_data = {
63 .mapbase = 0xffe20000,
64 .flags = UPF_BOOT_AUTOCONF,
65 .type = PORT_SCIF,
66 .irqs = { 82, 82, 82, 82 },
67 .clk = "scif2",
68};
69
70static struct platform_device scif2_device = {
71 .name = "sh-sci",
72 .id = 2,
73 .dev = {
74 .platform_data = &scif2_platform_data,
75 },
76};
77
78static struct plat_sci_port scif3_platform_data = {
79 .mapbase = 0xa4e30000,
80 .flags = UPF_BOOT_AUTOCONF,
81 .type = PORT_SCIFA,
82 .irqs = { 56, 56, 56, 56 },
83 .clk = "scif3",
84};
85
86static struct platform_device scif3_device = {
87 .name = "sh-sci",
88 .id = 3,
89 .dev = {
90 .platform_data = &scif3_platform_data,
91 },
92};
93
94static struct plat_sci_port scif4_platform_data = {
95 .mapbase = 0xa4e40000,
96 .flags = UPF_BOOT_AUTOCONF,
97 .type = PORT_SCIFA,
98 .irqs = { 88, 88, 88, 88 },
99 .clk = "scif4",
100};
101
102static struct platform_device scif4_device = {
103 .name = "sh-sci",
104 .id = 4,
105 .dev = {
106 .platform_data = &scif4_platform_data,
107 },
108};
109
110static struct plat_sci_port scif5_platform_data = {
111 .mapbase = 0xa4e50000,
112 .flags = UPF_BOOT_AUTOCONF,
113 .type = PORT_SCIFA,
114 .irqs = { 109, 109, 109, 109 },
115 .clk = "scif5",
116};
117
118static struct platform_device scif5_device = {
119 .name = "sh-sci",
120 .id = 5,
121 .dev = {
122 .platform_data = &scif5_platform_data,
75 }, 123 },
76}; 124};
77 125
@@ -202,7 +250,7 @@ static struct resource veu0_resources[] = {
202 [0] = { 250 [0] = {
203 .name = "VEU3F0", 251 .name = "VEU3F0",
204 .start = 0xfe920000, 252 .start = 0xfe920000,
205 .end = 0xfe9200cb - 1, 253 .end = 0xfe9200cb,
206 .flags = IORESOURCE_MEM, 254 .flags = IORESOURCE_MEM,
207 }, 255 },
208 [1] = { 256 [1] = {
@@ -234,7 +282,7 @@ static struct resource veu1_resources[] = {
234 [0] = { 282 [0] = {
235 .name = "VEU3F1", 283 .name = "VEU3F1",
236 .start = 0xfe924000, 284 .start = 0xfe924000,
237 .end = 0xfe9240cb - 1, 285 .end = 0xfe9240cb,
238 .flags = IORESOURCE_MEM, 286 .flags = IORESOURCE_MEM,
239 }, 287 },
240 [1] = { 288 [1] = {
@@ -523,7 +571,77 @@ static struct platform_device jpu_device = {
523 }, 571 },
524}; 572};
525 573
574/* SPU2DSP0 */
575static struct uio_info spu0_platform_data = {
576 .name = "SPU2DSP0",
577 .version = "0",
578 .irq = 86,
579};
580
581static struct resource spu0_resources[] = {
582 [0] = {
583 .name = "SPU2DSP0",
584 .start = 0xFE200000,
585 .end = 0xFE2FFFFF,
586 .flags = IORESOURCE_MEM,
587 },
588 [1] = {
589 /* place holder for contiguous memory */
590 },
591};
592
593static struct platform_device spu0_device = {
594 .name = "uio_pdrv_genirq",
595 .id = 4,
596 .dev = {
597 .platform_data = &spu0_platform_data,
598 },
599 .resource = spu0_resources,
600 .num_resources = ARRAY_SIZE(spu0_resources),
601 .archdata = {
602 .hwblk_id = HWBLK_SPU,
603 },
604};
605
606/* SPU2DSP1 */
607static struct uio_info spu1_platform_data = {
608 .name = "SPU2DSP1",
609 .version = "0",
610 .irq = 87,
611};
612
613static struct resource spu1_resources[] = {
614 [0] = {
615 .name = "SPU2DSP1",
616 .start = 0xFE300000,
617 .end = 0xFE3FFFFF,
618 .flags = IORESOURCE_MEM,
619 },
620 [1] = {
621 /* place holder for contiguous memory */
622 },
623};
624
625static struct platform_device spu1_device = {
626 .name = "uio_pdrv_genirq",
627 .id = 5,
628 .dev = {
629 .platform_data = &spu1_platform_data,
630 },
631 .resource = spu1_resources,
632 .num_resources = ARRAY_SIZE(spu1_resources),
633 .archdata = {
634 .hwblk_id = HWBLK_SPU,
635 },
636};
637
526static struct platform_device *sh7724_devices[] __initdata = { 638static struct platform_device *sh7724_devices[] __initdata = {
639 &scif0_device,
640 &scif1_device,
641 &scif2_device,
642 &scif3_device,
643 &scif4_device,
644 &scif5_device,
527 &cmt_device, 645 &cmt_device,
528 &tmu0_device, 646 &tmu0_device,
529 &tmu1_device, 647 &tmu1_device,
@@ -531,7 +649,6 @@ static struct platform_device *sh7724_devices[] __initdata = {
531 &tmu3_device, 649 &tmu3_device,
532 &tmu4_device, 650 &tmu4_device,
533 &tmu5_device, 651 &tmu5_device,
534 &sci_device,
535 &rtc_device, 652 &rtc_device,
536 &iic0_device, 653 &iic0_device,
537 &iic1_device, 654 &iic1_device,
@@ -539,6 +656,8 @@ static struct platform_device *sh7724_devices[] __initdata = {
539 &veu0_device, 656 &veu0_device,
540 &veu1_device, 657 &veu1_device,
541 &jpu_device, 658 &jpu_device,
659 &spu0_device,
660 &spu1_device,
542}; 661};
543 662
544static int __init sh7724_devices_setup(void) 663static int __init sh7724_devices_setup(void)
@@ -547,6 +666,8 @@ static int __init sh7724_devices_setup(void)
547 platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); 666 platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20);
548 platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); 667 platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20);
549 platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20); 668 platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20);
669 platform_resource_setup_memory(&spu0_device, "spu0", 2 << 20);
670 platform_resource_setup_memory(&spu1_device, "spu1", 2 << 20);
550 671
551 return platform_add_devices(sh7724_devices, 672 return platform_add_devices(sh7724_devices,
552 ARRAY_SIZE(sh7724_devices)); 673 ARRAY_SIZE(sh7724_devices));
@@ -554,6 +675,12 @@ static int __init sh7724_devices_setup(void)
554arch_initcall(sh7724_devices_setup); 675arch_initcall(sh7724_devices_setup);
555 676
556static struct platform_device *sh7724_early_devices[] __initdata = { 677static struct platform_device *sh7724_early_devices[] __initdata = {
678 &scif0_device,
679 &scif1_device,
680 &scif2_device,
681 &scif3_device,
682 &scif4_device,
683 &scif5_device,
557 &cmt_device, 684 &cmt_device,
558 &tmu0_device, 685 &tmu0_device,
559 &tmu1_device, 686 &tmu1_device,
@@ -827,3 +954,193 @@ void __init plat_irq_setup(void)
827{ 954{
828 register_intc_controller(&intc_desc); 955 register_intc_controller(&intc_desc);
829} 956}
957
958static struct {
959 /* BSC */
960 unsigned long mmselr;
961 unsigned long cs0bcr;
962 unsigned long cs4bcr;
963 unsigned long cs5abcr;
964 unsigned long cs5bbcr;
965 unsigned long cs6abcr;
966 unsigned long cs6bbcr;
967 unsigned long cs4wcr;
968 unsigned long cs5awcr;
969 unsigned long cs5bwcr;
970 unsigned long cs6awcr;
971 unsigned long cs6bwcr;
972 /* INTC */
973 unsigned short ipra;
974 unsigned short iprb;
975 unsigned short iprc;
976 unsigned short iprd;
977 unsigned short ipre;
978 unsigned short iprf;
979 unsigned short iprg;
980 unsigned short iprh;
981 unsigned short ipri;
982 unsigned short iprj;
983 unsigned short iprk;
984 unsigned short iprl;
985 unsigned char imr0;
986 unsigned char imr1;
987 unsigned char imr2;
988 unsigned char imr3;
989 unsigned char imr4;
990 unsigned char imr5;
991 unsigned char imr6;
992 unsigned char imr7;
993 unsigned char imr8;
994 unsigned char imr9;
995 unsigned char imr10;
996 unsigned char imr11;
997 unsigned char imr12;
998 /* RWDT */
999 unsigned short rwtcnt;
1000 unsigned short rwtcsr;
1001 /* CPG */
1002 unsigned long irdaclk;
1003 unsigned long spuclk;
1004} sh7724_rstandby_state;
1005
1006static int sh7724_pre_sleep_notifier_call(struct notifier_block *nb,
1007 unsigned long flags, void *unused)
1008{
1009 if (!(flags & SUSP_SH_RSTANDBY))
1010 return NOTIFY_DONE;
1011
1012 /* BCR */
1013 sh7724_rstandby_state.mmselr = __raw_readl(0xff800020); /* MMSELR */
1014 sh7724_rstandby_state.mmselr |= 0xa5a50000;
1015 sh7724_rstandby_state.cs0bcr = __raw_readl(0xfec10004); /* CS0BCR */
1016 sh7724_rstandby_state.cs4bcr = __raw_readl(0xfec10010); /* CS4BCR */
1017 sh7724_rstandby_state.cs5abcr = __raw_readl(0xfec10014); /* CS5ABCR */
1018 sh7724_rstandby_state.cs5bbcr = __raw_readl(0xfec10018); /* CS5BBCR */
1019 sh7724_rstandby_state.cs6abcr = __raw_readl(0xfec1001c); /* CS6ABCR */
1020 sh7724_rstandby_state.cs6bbcr = __raw_readl(0xfec10020); /* CS6BBCR */
1021 sh7724_rstandby_state.cs4wcr = __raw_readl(0xfec10030); /* CS4WCR */
1022 sh7724_rstandby_state.cs5awcr = __raw_readl(0xfec10034); /* CS5AWCR */
1023 sh7724_rstandby_state.cs5bwcr = __raw_readl(0xfec10038); /* CS5BWCR */
1024 sh7724_rstandby_state.cs6awcr = __raw_readl(0xfec1003c); /* CS6AWCR */
1025 sh7724_rstandby_state.cs6bwcr = __raw_readl(0xfec10040); /* CS6BWCR */
1026
1027 /* INTC */
1028 sh7724_rstandby_state.ipra = __raw_readw(0xa4080000); /* IPRA */
1029 sh7724_rstandby_state.iprb = __raw_readw(0xa4080004); /* IPRB */
1030 sh7724_rstandby_state.iprc = __raw_readw(0xa4080008); /* IPRC */
1031 sh7724_rstandby_state.iprd = __raw_readw(0xa408000c); /* IPRD */
1032 sh7724_rstandby_state.ipre = __raw_readw(0xa4080010); /* IPRE */
1033 sh7724_rstandby_state.iprf = __raw_readw(0xa4080014); /* IPRF */
1034 sh7724_rstandby_state.iprg = __raw_readw(0xa4080018); /* IPRG */
1035 sh7724_rstandby_state.iprh = __raw_readw(0xa408001c); /* IPRH */
1036 sh7724_rstandby_state.ipri = __raw_readw(0xa4080020); /* IPRI */
1037 sh7724_rstandby_state.iprj = __raw_readw(0xa4080024); /* IPRJ */
1038 sh7724_rstandby_state.iprk = __raw_readw(0xa4080028); /* IPRK */
1039 sh7724_rstandby_state.iprl = __raw_readw(0xa408002c); /* IPRL */
1040 sh7724_rstandby_state.imr0 = __raw_readb(0xa4080080); /* IMR0 */
1041 sh7724_rstandby_state.imr1 = __raw_readb(0xa4080084); /* IMR1 */
1042 sh7724_rstandby_state.imr2 = __raw_readb(0xa4080088); /* IMR2 */
1043 sh7724_rstandby_state.imr3 = __raw_readb(0xa408008c); /* IMR3 */
1044 sh7724_rstandby_state.imr4 = __raw_readb(0xa4080090); /* IMR4 */
1045 sh7724_rstandby_state.imr5 = __raw_readb(0xa4080094); /* IMR5 */
1046 sh7724_rstandby_state.imr6 = __raw_readb(0xa4080098); /* IMR6 */
1047 sh7724_rstandby_state.imr7 = __raw_readb(0xa408009c); /* IMR7 */
1048 sh7724_rstandby_state.imr8 = __raw_readb(0xa40800a0); /* IMR8 */
1049 sh7724_rstandby_state.imr9 = __raw_readb(0xa40800a4); /* IMR9 */
1050 sh7724_rstandby_state.imr10 = __raw_readb(0xa40800a8); /* IMR10 */
1051 sh7724_rstandby_state.imr11 = __raw_readb(0xa40800ac); /* IMR11 */
1052 sh7724_rstandby_state.imr12 = __raw_readb(0xa40800b0); /* IMR12 */
1053
1054 /* RWDT */
1055 sh7724_rstandby_state.rwtcnt = __raw_readb(0xa4520000); /* RWTCNT */
1056 sh7724_rstandby_state.rwtcnt |= 0x5a00;
1057 sh7724_rstandby_state.rwtcsr = __raw_readb(0xa4520004); /* RWTCSR */
1058 sh7724_rstandby_state.rwtcsr |= 0xa500;
1059 __raw_writew(sh7724_rstandby_state.rwtcsr & 0x07, 0xa4520004);
1060
1061 /* CPG */
1062 sh7724_rstandby_state.irdaclk = __raw_readl(0xa4150018); /* IRDACLKCR */
1063 sh7724_rstandby_state.spuclk = __raw_readl(0xa415003c); /* SPUCLKCR */
1064
1065 return NOTIFY_DONE;
1066}
1067
1068static int sh7724_post_sleep_notifier_call(struct notifier_block *nb,
1069 unsigned long flags, void *unused)
1070{
1071 if (!(flags & SUSP_SH_RSTANDBY))
1072 return NOTIFY_DONE;
1073
1074 /* BCR */
1075 __raw_writel(sh7724_rstandby_state.mmselr, 0xff800020); /* MMSELR */
1076 __raw_writel(sh7724_rstandby_state.cs0bcr, 0xfec10004); /* CS0BCR */
1077 __raw_writel(sh7724_rstandby_state.cs4bcr, 0xfec10010); /* CS4BCR */
1078 __raw_writel(sh7724_rstandby_state.cs5abcr, 0xfec10014); /* CS5ABCR */
1079 __raw_writel(sh7724_rstandby_state.cs5bbcr, 0xfec10018); /* CS5BBCR */
1080 __raw_writel(sh7724_rstandby_state.cs6abcr, 0xfec1001c); /* CS6ABCR */
1081 __raw_writel(sh7724_rstandby_state.cs6bbcr, 0xfec10020); /* CS6BBCR */
1082 __raw_writel(sh7724_rstandby_state.cs4wcr, 0xfec10030); /* CS4WCR */
1083 __raw_writel(sh7724_rstandby_state.cs5awcr, 0xfec10034); /* CS5AWCR */
1084 __raw_writel(sh7724_rstandby_state.cs5bwcr, 0xfec10038); /* CS5BWCR */
1085 __raw_writel(sh7724_rstandby_state.cs6awcr, 0xfec1003c); /* CS6AWCR */
1086 __raw_writel(sh7724_rstandby_state.cs6bwcr, 0xfec10040); /* CS6BWCR */
1087
1088 /* INTC */
1089 __raw_writew(sh7724_rstandby_state.ipra, 0xa4080000); /* IPRA */
1090 __raw_writew(sh7724_rstandby_state.iprb, 0xa4080004); /* IPRB */
1091 __raw_writew(sh7724_rstandby_state.iprc, 0xa4080008); /* IPRC */
1092 __raw_writew(sh7724_rstandby_state.iprd, 0xa408000c); /* IPRD */
1093 __raw_writew(sh7724_rstandby_state.ipre, 0xa4080010); /* IPRE */
1094 __raw_writew(sh7724_rstandby_state.iprf, 0xa4080014); /* IPRF */
1095 __raw_writew(sh7724_rstandby_state.iprg, 0xa4080018); /* IPRG */
1096 __raw_writew(sh7724_rstandby_state.iprh, 0xa408001c); /* IPRH */
1097 __raw_writew(sh7724_rstandby_state.ipri, 0xa4080020); /* IPRI */
1098 __raw_writew(sh7724_rstandby_state.iprj, 0xa4080024); /* IPRJ */
1099 __raw_writew(sh7724_rstandby_state.iprk, 0xa4080028); /* IPRK */
1100 __raw_writew(sh7724_rstandby_state.iprl, 0xa408002c); /* IPRL */
1101 __raw_writeb(sh7724_rstandby_state.imr0, 0xa4080080); /* IMR0 */
1102 __raw_writeb(sh7724_rstandby_state.imr1, 0xa4080084); /* IMR1 */
1103 __raw_writeb(sh7724_rstandby_state.imr2, 0xa4080088); /* IMR2 */
1104 __raw_writeb(sh7724_rstandby_state.imr3, 0xa408008c); /* IMR3 */
1105 __raw_writeb(sh7724_rstandby_state.imr4, 0xa4080090); /* IMR4 */
1106 __raw_writeb(sh7724_rstandby_state.imr5, 0xa4080094); /* IMR5 */
1107 __raw_writeb(sh7724_rstandby_state.imr6, 0xa4080098); /* IMR6 */
1108 __raw_writeb(sh7724_rstandby_state.imr7, 0xa408009c); /* IMR7 */
1109 __raw_writeb(sh7724_rstandby_state.imr8, 0xa40800a0); /* IMR8 */
1110 __raw_writeb(sh7724_rstandby_state.imr9, 0xa40800a4); /* IMR9 */
1111 __raw_writeb(sh7724_rstandby_state.imr10, 0xa40800a8); /* IMR10 */
1112 __raw_writeb(sh7724_rstandby_state.imr11, 0xa40800ac); /* IMR11 */
1113 __raw_writeb(sh7724_rstandby_state.imr12, 0xa40800b0); /* IMR12 */
1114
1115 /* RWDT */
1116 __raw_writew(sh7724_rstandby_state.rwtcnt, 0xa4520000); /* RWTCNT */
1117 __raw_writew(sh7724_rstandby_state.rwtcsr, 0xa4520004); /* RWTCSR */
1118
1119 /* CPG */
1120 __raw_writel(sh7724_rstandby_state.irdaclk, 0xa4150018); /* IRDACLKCR */
1121 __raw_writel(sh7724_rstandby_state.spuclk, 0xa415003c); /* SPUCLKCR */
1122
1123 return NOTIFY_DONE;
1124}
1125
1126static struct notifier_block sh7724_pre_sleep_notifier = {
1127 .notifier_call = sh7724_pre_sleep_notifier_call,
1128 .priority = SH_MOBILE_PRE(SH_MOBILE_SLEEP_CPU),
1129};
1130
1131static struct notifier_block sh7724_post_sleep_notifier = {
1132 .notifier_call = sh7724_post_sleep_notifier_call,
1133 .priority = SH_MOBILE_POST(SH_MOBILE_SLEEP_CPU),
1134};
1135
1136static int __init sh7724_sleep_setup(void)
1137{
1138 atomic_notifier_chain_register(&sh_mobile_pre_sleep_notifier_list,
1139 &sh7724_pre_sleep_notifier);
1140
1141 atomic_notifier_chain_register(&sh_mobile_post_sleep_notifier_list,
1142 &sh7724_post_sleep_notifier);
1143 return 0;
1144}
1145arch_initcall(sh7724_sleep_setup);
1146
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
index c470e15f2e03..37e32efbbaa7 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -17,6 +17,51 @@
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/sh_timer.h> 18#include <linux/sh_timer.h>
19 19
20static struct plat_sci_port scif2_platform_data = {
21 .mapbase = 0xfe4b0000, /* SCIF2 */
22 .flags = UPF_BOOT_AUTOCONF,
23 .type = PORT_SCIF,
24 .irqs = { 40, 40, 40, 40 },
25};
26
27static struct platform_device scif2_device = {
28 .name = "sh-sci",
29 .id = 2,
30 .dev = {
31 .platform_data = &scif2_platform_data,
32 },
33};
34
35static struct plat_sci_port scif3_platform_data = {
36 .mapbase = 0xfe4c0000, /* SCIF3 */
37 .flags = UPF_BOOT_AUTOCONF,
38 .type = PORT_SCIF,
39 .irqs = { 76, 76, 76, 76 },
40};
41
42static struct platform_device scif3_device = {
43 .name = "sh-sci",
44 .id = 3,
45 .dev = {
46 .platform_data = &scif3_platform_data,
47 },
48};
49
50static struct plat_sci_port scif4_platform_data = {
51 .mapbase = 0xfe4d0000, /* SCIF4 */
52 .flags = UPF_BOOT_AUTOCONF,
53 .type = PORT_SCIF,
54 .irqs = { 104, 104, 104, 104 },
55};
56
57static struct platform_device scif4_device = {
58 .name = "sh-sci",
59 .id = 4,
60 .dev = {
61 .platform_data = &scif4_platform_data,
62 },
63};
64
20static struct sh_timer_config tmu0_platform_data = { 65static struct sh_timer_config tmu0_platform_data = {
21 .name = "TMU0", 66 .name = "TMU0",
22 .channel_offset = 0x04, 67 .channel_offset = 0x04,
@@ -79,39 +124,12 @@ static struct platform_device tmu1_device = {
79 .num_resources = ARRAY_SIZE(tmu1_resources), 124 .num_resources = ARRAY_SIZE(tmu1_resources),
80}; 125};
81 126
82static struct plat_sci_port sci_platform_data[] = {
83 {
84 .mapbase = 0xfe4b0000, /* SCIF2 */
85 .flags = UPF_BOOT_AUTOCONF,
86 .type = PORT_SCIF,
87 .irqs = { 40, 40, 40, 40 },
88 }, {
89 .mapbase = 0xfe4c0000, /* SCIF3 */
90 .flags = UPF_BOOT_AUTOCONF,
91 .type = PORT_SCIF,
92 .irqs = { 76, 76, 76, 76 },
93 }, {
94 .mapbase = 0xfe4d0000, /* SCIF4 */
95 .flags = UPF_BOOT_AUTOCONF,
96 .type = PORT_SCIF,
97 .irqs = { 104, 104, 104, 104 },
98 }, {
99 .flags = 0,
100 }
101};
102
103static struct platform_device sci_device = {
104 .name = "sh-sci",
105 .id = -1,
106 .dev = {
107 .platform_data = sci_platform_data,
108 },
109};
110
111static struct platform_device *sh7757_devices[] __initdata = { 127static struct platform_device *sh7757_devices[] __initdata = {
128 &scif2_device,
129 &scif3_device,
130 &scif4_device,
112 &tmu0_device, 131 &tmu0_device,
113 &tmu1_device, 132 &tmu1_device,
114 &sci_device,
115}; 133};
116 134
117static int __init sh7757_devices_setup(void) 135static int __init sh7757_devices_setup(void)
@@ -121,6 +139,20 @@ static int __init sh7757_devices_setup(void)
121} 139}
122arch_initcall(sh7757_devices_setup); 140arch_initcall(sh7757_devices_setup);
123 141
142static struct platform_device *sh7757_early_devices[] __initdata = {
143 &scif2_device,
144 &scif3_device,
145 &scif4_device,
146 &tmu0_device,
147 &tmu1_device,
148};
149
150void __init plat_early_device_setup(void)
151{
152 early_platform_add_devices(sh7757_early_devices,
153 ARRAY_SIZE(sh7757_early_devices));
154}
155
124enum { 156enum {
125 UNUSED = 0, 157 UNUSED = 0,
126 158
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index 4659fff6b842..6aba26fec416 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -16,6 +16,51 @@
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/serial_sci.h> 17#include <linux/serial_sci.h>
18 18
19static struct plat_sci_port scif0_platform_data = {
20 .mapbase = 0xffe00000,
21 .flags = UPF_BOOT_AUTOCONF,
22 .type = PORT_SCIF,
23 .irqs = { 40, 40, 40, 40 },
24};
25
26static struct platform_device scif0_device = {
27 .name = "sh-sci",
28 .id = 0,
29 .dev = {
30 .platform_data = &scif0_platform_data,
31 },
32};
33
34static struct plat_sci_port scif1_platform_data = {
35 .mapbase = 0xffe08000,
36 .flags = UPF_BOOT_AUTOCONF,
37 .type = PORT_SCIF,
38 .irqs = { 76, 76, 76, 76 },
39};
40
41static struct platform_device scif1_device = {
42 .name = "sh-sci",
43 .id = 1,
44 .dev = {
45 .platform_data = &scif1_platform_data,
46 },
47};
48
49static struct plat_sci_port scif2_platform_data = {
50 .mapbase = 0xffe10000,
51 .flags = UPF_BOOT_AUTOCONF,
52 .type = PORT_SCIF,
53 .irqs = { 104, 104, 104, 104 },
54};
55
56static struct platform_device scif2_device = {
57 .name = "sh-sci",
58 .id = 2,
59 .dev = {
60 .platform_data = &scif2_platform_data,
61 },
62};
63
19static struct resource rtc_resources[] = { 64static struct resource rtc_resources[] = {
20 [0] = { 65 [0] = {
21 .start = 0xffe80000, 66 .start = 0xffe80000,
@@ -36,35 +81,6 @@ static struct platform_device rtc_device = {
36 .resource = rtc_resources, 81 .resource = rtc_resources,
37}; 82};
38 83
39static struct plat_sci_port sci_platform_data[] = {
40 {
41 .mapbase = 0xffe00000,
42 .flags = UPF_BOOT_AUTOCONF,
43 .type = PORT_SCIF,
44 .irqs = { 40, 40, 40, 40 },
45 }, {
46 .mapbase = 0xffe08000,
47 .flags = UPF_BOOT_AUTOCONF,
48 .type = PORT_SCIF,
49 .irqs = { 76, 76, 76, 76 },
50 }, {
51 .mapbase = 0xffe10000,
52 .flags = UPF_BOOT_AUTOCONF,
53 .type = PORT_SCIF,
54 .irqs = { 104, 104, 104, 104 },
55 }, {
56 .flags = 0,
57 }
58};
59
60static struct platform_device sci_device = {
61 .name = "sh-sci",
62 .id = -1,
63 .dev = {
64 .platform_data = sci_platform_data,
65 },
66};
67
68static struct resource usb_ohci_resources[] = { 84static struct resource usb_ohci_resources[] = {
69 [0] = { 85 [0] = {
70 .start = 0xffec8000, 86 .start = 0xffec8000,
@@ -297,6 +313,9 @@ static struct platform_device tmu5_device = {
297}; 313};
298 314
299static struct platform_device *sh7763_devices[] __initdata = { 315static struct platform_device *sh7763_devices[] __initdata = {
316 &scif0_device,
317 &scif1_device,
318 &scif2_device,
300 &tmu0_device, 319 &tmu0_device,
301 &tmu1_device, 320 &tmu1_device,
302 &tmu2_device, 321 &tmu2_device,
@@ -304,7 +323,6 @@ static struct platform_device *sh7763_devices[] __initdata = {
304 &tmu4_device, 323 &tmu4_device,
305 &tmu5_device, 324 &tmu5_device,
306 &rtc_device, 325 &rtc_device,
307 &sci_device,
308 &usb_ohci_device, 326 &usb_ohci_device,
309 &usbf_device, 327 &usbf_device,
310}; 328};
@@ -317,6 +335,9 @@ static int __init sh7763_devices_setup(void)
317arch_initcall(sh7763_devices_setup); 335arch_initcall(sh7763_devices_setup);
318 336
319static struct platform_device *sh7763_early_devices[] __initdata = { 337static struct platform_device *sh7763_early_devices[] __initdata = {
338 &scif0_device,
339 &scif1_device,
340 &scif2_device,
320 &tmu0_device, 341 &tmu0_device,
321 &tmu1_device, 342 &tmu1_device,
322 &tmu2_device, 343 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
index eead08d89d32..c1643bc9590d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
@@ -14,67 +14,153 @@
14#include <linux/sh_timer.h> 14#include <linux/sh_timer.h>
15#include <linux/io.h> 15#include <linux/io.h>
16 16
17static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port scif0_platform_data = {
18 { 18 .mapbase = 0xff923000,
19 .mapbase = 0xff923000, 19 .flags = UPF_BOOT_AUTOCONF,
20 .flags = UPF_BOOT_AUTOCONF, 20 .type = PORT_SCIF,
21 .type = PORT_SCIF, 21 .irqs = { 61, 61, 61, 61 },
22 .irqs = { 61, 61, 61, 61 }, 22};
23 }, { 23
24 .mapbase = 0xff924000, 24static struct platform_device scif0_device = {
25 .flags = UPF_BOOT_AUTOCONF, 25 .name = "sh-sci",
26 .type = PORT_SCIF, 26 .id = 0,
27 .irqs = { 62, 62, 62, 62 }, 27 .dev = {
28 }, { 28 .platform_data = &scif0_platform_data,
29 .mapbase = 0xff925000, 29 },
30 .flags = UPF_BOOT_AUTOCONF, 30};
31 .type = PORT_SCIF, 31
32 .irqs = { 63, 63, 63, 63 }, 32static struct plat_sci_port scif1_platform_data = {
33 }, { 33 .mapbase = 0xff924000,
34 .mapbase = 0xff926000, 34 .flags = UPF_BOOT_AUTOCONF,
35 .flags = UPF_BOOT_AUTOCONF, 35 .type = PORT_SCIF,
36 .type = PORT_SCIF, 36 .irqs = { 62, 62, 62, 62 },
37 .irqs = { 64, 64, 64, 64 }, 37};
38 }, { 38
39 .mapbase = 0xff927000, 39static struct platform_device scif1_device = {
40 .flags = UPF_BOOT_AUTOCONF, 40 .name = "sh-sci",
41 .type = PORT_SCIF, 41 .id = 1,
42 .irqs = { 65, 65, 65, 65 }, 42 .dev = {
43 }, { 43 .platform_data = &scif1_platform_data,
44 .mapbase = 0xff928000, 44 },
45 .flags = UPF_BOOT_AUTOCONF, 45};
46 .type = PORT_SCIF, 46
47 .irqs = { 66, 66, 66, 66 }, 47static struct plat_sci_port scif2_platform_data = {
48 }, { 48 .mapbase = 0xff925000,
49 .mapbase = 0xff929000, 49 .flags = UPF_BOOT_AUTOCONF,
50 .flags = UPF_BOOT_AUTOCONF, 50 .type = PORT_SCIF,
51 .type = PORT_SCIF, 51 .irqs = { 63, 63, 63, 63 },
52 .irqs = { 67, 67, 67, 67 }, 52};
53 }, { 53
54 .mapbase = 0xff92a000, 54static struct platform_device scif2_device = {
55 .flags = UPF_BOOT_AUTOCONF, 55 .name = "sh-sci",
56 .type = PORT_SCIF, 56 .id = 2,
57 .irqs = { 68, 68, 68, 68 }, 57 .dev = {
58 }, { 58 .platform_data = &scif2_platform_data,
59 .mapbase = 0xff92b000, 59 },
60 .flags = UPF_BOOT_AUTOCONF, 60};
61 .type = PORT_SCIF, 61
62 .irqs = { 69, 69, 69, 69 }, 62static struct plat_sci_port scif3_platform_data = {
63 }, { 63 .mapbase = 0xff926000,
64 .mapbase = 0xff92c000, 64 .flags = UPF_BOOT_AUTOCONF,
65 .flags = UPF_BOOT_AUTOCONF, 65 .type = PORT_SCIF,
66 .type = PORT_SCIF, 66 .irqs = { 64, 64, 64, 64 },
67 .irqs = { 70, 70, 70, 70 }, 67};
68 }, { 68
69 .flags = 0, 69static struct platform_device scif3_device = {
70 } 70 .name = "sh-sci",
71 .id = 3,
72 .dev = {
73 .platform_data = &scif3_platform_data,
74 },
75};
76
77static struct plat_sci_port scif4_platform_data = {
78 .mapbase = 0xff927000,
79 .flags = UPF_BOOT_AUTOCONF,
80 .type = PORT_SCIF,
81 .irqs = { 65, 65, 65, 65 },
82};
83
84static struct platform_device scif4_device = {
85 .name = "sh-sci",
86 .id = 4,
87 .dev = {
88 .platform_data = &scif4_platform_data,
89 },
90};
91
92static struct plat_sci_port scif5_platform_data = {
93 .mapbase = 0xff928000,
94 .flags = UPF_BOOT_AUTOCONF,
95 .type = PORT_SCIF,
96 .irqs = { 66, 66, 66, 66 },
97};
98
99static struct platform_device scif5_device = {
100 .name = "sh-sci",
101 .id = 5,
102 .dev = {
103 .platform_data = &scif5_platform_data,
104 },
105};
106
107static struct plat_sci_port scif6_platform_data = {
108 .mapbase = 0xff929000,
109 .flags = UPF_BOOT_AUTOCONF,
110 .type = PORT_SCIF,
111 .irqs = { 67, 67, 67, 67 },
112};
113
114static struct platform_device scif6_device = {
115 .name = "sh-sci",
116 .id = 6,
117 .dev = {
118 .platform_data = &scif6_platform_data,
119 },
120};
121
122static struct plat_sci_port scif7_platform_data = {
123 .mapbase = 0xff92a000,
124 .flags = UPF_BOOT_AUTOCONF,
125 .type = PORT_SCIF,
126 .irqs = { 68, 68, 68, 68 },
127};
128
129static struct platform_device scif7_device = {
130 .name = "sh-sci",
131 .id = 7,
132 .dev = {
133 .platform_data = &scif7_platform_data,
134 },
135};
136
137static struct plat_sci_port scif8_platform_data = {
138 .mapbase = 0xff92b000,
139 .flags = UPF_BOOT_AUTOCONF,
140 .type = PORT_SCIF,
141 .irqs = { 69, 69, 69, 69 },
142};
143
144static struct platform_device scif8_device = {
145 .name = "sh-sci",
146 .id = 8,
147 .dev = {
148 .platform_data = &scif8_platform_data,
149 },
150};
151
152static struct plat_sci_port scif9_platform_data = {
153 .mapbase = 0xff92c000,
154 .flags = UPF_BOOT_AUTOCONF,
155 .type = PORT_SCIF,
156 .irqs = { 70, 70, 70, 70 },
71}; 157};
72 158
73static struct platform_device sci_device = { 159static struct platform_device scif9_device = {
74 .name = "sh-sci", 160 .name = "sh-sci",
75 .id = -1, 161 .id = 9,
76 .dev = { 162 .dev = {
77 .platform_data = sci_platform_data, 163 .platform_data = &scif9_platform_data,
78 }, 164 },
79}; 165};
80 166
@@ -351,6 +437,16 @@ static struct platform_device tmu8_device = {
351}; 437};
352 438
353static struct platform_device *sh7770_devices[] __initdata = { 439static struct platform_device *sh7770_devices[] __initdata = {
440 &scif0_device,
441 &scif1_device,
442 &scif2_device,
443 &scif3_device,
444 &scif4_device,
445 &scif5_device,
446 &scif6_device,
447 &scif7_device,
448 &scif8_device,
449 &scif9_device,
354 &tmu0_device, 450 &tmu0_device,
355 &tmu1_device, 451 &tmu1_device,
356 &tmu2_device, 452 &tmu2_device,
@@ -360,7 +456,6 @@ static struct platform_device *sh7770_devices[] __initdata = {
360 &tmu6_device, 456 &tmu6_device,
361 &tmu7_device, 457 &tmu7_device,
362 &tmu8_device, 458 &tmu8_device,
363 &sci_device,
364}; 459};
365 460
366static int __init sh7770_devices_setup(void) 461static int __init sh7770_devices_setup(void)
@@ -371,6 +466,16 @@ static int __init sh7770_devices_setup(void)
371arch_initcall(sh7770_devices_setup); 466arch_initcall(sh7770_devices_setup);
372 467
373static struct platform_device *sh7770_early_devices[] __initdata = { 468static struct platform_device *sh7770_early_devices[] __initdata = {
469 &scif0_device,
470 &scif1_device,
471 &scif2_device,
472 &scif3_device,
473 &scif4_device,
474 &scif5_device,
475 &scif6_device,
476 &scif7_device,
477 &scif8_device,
478 &scif9_device,
374 &tmu0_device, 479 &tmu0_device,
375 &tmu1_device, 480 &tmu1_device,
376 &tmu2_device, 481 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 12ff56f19c5c..c310558490d5 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -15,6 +15,36 @@
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <asm/dma-sh.h> 16#include <asm/dma-sh.h>
17 17
18static struct plat_sci_port scif0_platform_data = {
19 .mapbase = 0xffe00000,
20 .flags = UPF_BOOT_AUTOCONF,
21 .type = PORT_SCIF,
22 .irqs = { 40, 40, 40, 40 },
23};
24
25static struct platform_device scif0_device = {
26 .name = "sh-sci",
27 .id = 0,
28 .dev = {
29 .platform_data = &scif0_platform_data,
30 },
31};
32
33static struct plat_sci_port scif1_platform_data = {
34 .mapbase = 0xffe10000,
35 .flags = UPF_BOOT_AUTOCONF,
36 .type = PORT_SCIF,
37 .irqs = { 76, 76, 76, 76 },
38};
39
40static struct platform_device scif1_device = {
41 .name = "sh-sci",
42 .id = 1,
43 .dev = {
44 .platform_data = &scif1_platform_data,
45 },
46};
47
18static struct sh_timer_config tmu0_platform_data = { 48static struct sh_timer_config tmu0_platform_data = {
19 .name = "TMU0", 49 .name = "TMU0",
20 .channel_offset = 0x04, 50 .channel_offset = 0x04,
@@ -217,30 +247,6 @@ static struct platform_device rtc_device = {
217 .resource = rtc_resources, 247 .resource = rtc_resources,
218}; 248};
219 249
220static struct plat_sci_port sci_platform_data[] = {
221 {
222 .mapbase = 0xffe00000,
223 .flags = UPF_BOOT_AUTOCONF,
224 .type = PORT_SCIF,
225 .irqs = { 40, 40, 40, 40 },
226 }, {
227 .mapbase = 0xffe10000,
228 .flags = UPF_BOOT_AUTOCONF,
229 .type = PORT_SCIF,
230 .irqs = { 76, 76, 76, 76 },
231 }, {
232 .flags = 0,
233 }
234};
235
236static struct platform_device sci_device = {
237 .name = "sh-sci",
238 .id = -1,
239 .dev = {
240 .platform_data = sci_platform_data,
241 },
242};
243
244static struct sh_dmae_pdata dma_platform_data = { 250static struct sh_dmae_pdata dma_platform_data = {
245 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1), 251 .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1),
246}; 252};
@@ -254,6 +260,8 @@ static struct platform_device dma_device = {
254}; 260};
255 261
256static struct platform_device *sh7780_devices[] __initdata = { 262static struct platform_device *sh7780_devices[] __initdata = {
263 &scif0_device,
264 &scif1_device,
257 &tmu0_device, 265 &tmu0_device,
258 &tmu1_device, 266 &tmu1_device,
259 &tmu2_device, 267 &tmu2_device,
@@ -261,7 +269,6 @@ static struct platform_device *sh7780_devices[] __initdata = {
261 &tmu4_device, 269 &tmu4_device,
262 &tmu5_device, 270 &tmu5_device,
263 &rtc_device, 271 &rtc_device,
264 &sci_device,
265 &dma_device, 272 &dma_device,
266}; 273};
267 274
@@ -271,8 +278,9 @@ static int __init sh7780_devices_setup(void)
271 ARRAY_SIZE(sh7780_devices)); 278 ARRAY_SIZE(sh7780_devices));
272} 279}
273arch_initcall(sh7780_devices_setup); 280arch_initcall(sh7780_devices_setup);
274
275static struct platform_device *sh7780_early_devices[] __initdata = { 281static struct platform_device *sh7780_early_devices[] __initdata = {
282 &scif0_device,
283 &scif1_device,
276 &tmu0_device, 284 &tmu0_device,
277 &tmu1_device, 285 &tmu1_device,
278 &tmu2_device, 286 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index 7f6c718b6c36..ef26ebda6e8b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -16,6 +16,102 @@
16#include <linux/sh_timer.h> 16#include <linux/sh_timer.h>
17#include <asm/mmzone.h> 17#include <asm/mmzone.h>
18 18
19static struct plat_sci_port scif0_platform_data = {
20 .mapbase = 0xffea0000,
21 .flags = UPF_BOOT_AUTOCONF,
22 .type = PORT_SCIF,
23 .irqs = { 40, 40, 40, 40 },
24 .clk = "scif_fck",
25};
26
27static struct platform_device scif0_device = {
28 .name = "sh-sci",
29 .id = 0,
30 .dev = {
31 .platform_data = &scif0_platform_data,
32 },
33};
34
35static struct plat_sci_port scif1_platform_data = {
36 .mapbase = 0xffeb0000,
37 .flags = UPF_BOOT_AUTOCONF,
38 .type = PORT_SCIF,
39 .irqs = { 44, 44, 44, 44 },
40 .clk = "scif_fck",
41};
42
43static struct platform_device scif1_device = {
44 .name = "sh-sci",
45 .id = 1,
46 .dev = {
47 .platform_data = &scif1_platform_data,
48 },
49};
50
51static struct plat_sci_port scif2_platform_data = {
52 .mapbase = 0xffec0000,
53 .flags = UPF_BOOT_AUTOCONF,
54 .type = PORT_SCIF,
55 .irqs = { 60, 60, 60, 60 },
56 .clk = "scif_fck",
57};
58
59static struct platform_device scif2_device = {
60 .name = "sh-sci",
61 .id = 2,
62 .dev = {
63 .platform_data = &scif2_platform_data,
64 },
65};
66
67static struct plat_sci_port scif3_platform_data = {
68 .mapbase = 0xffed0000,
69 .flags = UPF_BOOT_AUTOCONF,
70 .type = PORT_SCIF,
71 .irqs = { 61, 61, 61, 61 },
72 .clk = "scif_fck",
73};
74
75static struct platform_device scif3_device = {
76 .name = "sh-sci",
77 .id = 3,
78 .dev = {
79 .platform_data = &scif3_platform_data,
80 },
81};
82
83static struct plat_sci_port scif4_platform_data = {
84 .mapbase = 0xffee0000,
85 .flags = UPF_BOOT_AUTOCONF,
86 .type = PORT_SCIF,
87 .irqs = { 62, 62, 62, 62 },
88 .clk = "scif_fck",
89};
90
91static struct platform_device scif4_device = {
92 .name = "sh-sci",
93 .id = 4,
94 .dev = {
95 .platform_data = &scif4_platform_data,
96 },
97};
98
99static struct plat_sci_port scif5_platform_data = {
100 .mapbase = 0xffef0000,
101 .flags = UPF_BOOT_AUTOCONF,
102 .type = PORT_SCIF,
103 .irqs = { 63, 63, 63, 63 },
104 .clk = "scif_fck",
105};
106
107static struct platform_device scif5_device = {
108 .name = "sh-sci",
109 .id = 5,
110 .dev = {
111 .platform_data = &scif5_platform_data,
112 },
113};
114
19static struct sh_timer_config tmu0_platform_data = { 115static struct sh_timer_config tmu0_platform_data = {
20 .name = "TMU0", 116 .name = "TMU0",
21 .channel_offset = 0x04, 117 .channel_offset = 0x04,
@@ -198,64 +294,19 @@ static struct platform_device tmu5_device = {
198 .num_resources = ARRAY_SIZE(tmu5_resources), 294 .num_resources = ARRAY_SIZE(tmu5_resources),
199}; 295};
200 296
201static struct plat_sci_port sci_platform_data[] = {
202 {
203 .mapbase = 0xffea0000,
204 .flags = UPF_BOOT_AUTOCONF,
205 .type = PORT_SCIF,
206 .irqs = { 40, 40, 40, 40 },
207 .clk = "scif_fck",
208 }, {
209 .mapbase = 0xffeb0000,
210 .flags = UPF_BOOT_AUTOCONF,
211 .type = PORT_SCIF,
212 .irqs = { 44, 44, 44, 44 },
213 .clk = "scif_fck",
214 }, {
215 .mapbase = 0xffec0000,
216 .flags = UPF_BOOT_AUTOCONF,
217 .type = PORT_SCIF,
218 .irqs = { 60, 60, 60, 60 },
219 .clk = "scif_fck",
220 }, {
221 .mapbase = 0xffed0000,
222 .flags = UPF_BOOT_AUTOCONF,
223 .type = PORT_SCIF,
224 .irqs = { 61, 61, 61, 61 },
225 .clk = "scif_fck",
226 }, {
227 .mapbase = 0xffee0000,
228 .flags = UPF_BOOT_AUTOCONF,
229 .type = PORT_SCIF,
230 .irqs = { 62, 62, 62, 62 },
231 .clk = "scif_fck",
232 }, {
233 .mapbase = 0xffef0000,
234 .flags = UPF_BOOT_AUTOCONF,
235 .type = PORT_SCIF,
236 .irqs = { 63, 63, 63, 63 },
237 .clk = "scif_fck",
238 }, {
239 .flags = 0,
240 }
241};
242
243static struct platform_device sci_device = {
244 .name = "sh-sci",
245 .id = -1,
246 .dev = {
247 .platform_data = sci_platform_data,
248 },
249};
250
251static struct platform_device *sh7785_devices[] __initdata = { 297static struct platform_device *sh7785_devices[] __initdata = {
298 &scif0_device,
299 &scif1_device,
300 &scif2_device,
301 &scif3_device,
302 &scif4_device,
303 &scif5_device,
252 &tmu0_device, 304 &tmu0_device,
253 &tmu1_device, 305 &tmu1_device,
254 &tmu2_device, 306 &tmu2_device,
255 &tmu3_device, 307 &tmu3_device,
256 &tmu4_device, 308 &tmu4_device,
257 &tmu5_device, 309 &tmu5_device,
258 &sci_device,
259}; 310};
260 311
261static int __init sh7785_devices_setup(void) 312static int __init sh7785_devices_setup(void)
@@ -266,6 +317,12 @@ static int __init sh7785_devices_setup(void)
266arch_initcall(sh7785_devices_setup); 317arch_initcall(sh7785_devices_setup);
267 318
268static struct platform_device *sh7785_early_devices[] __initdata = { 319static struct platform_device *sh7785_early_devices[] __initdata = {
320 &scif0_device,
321 &scif1_device,
322 &scif2_device,
323 &scif3_device,
324 &scif4_device,
325 &scif5_device,
269 &tmu0_device, 326 &tmu0_device,
270 &tmu1_device, 327 &tmu1_device,
271 &tmu2_device, 328 &tmu2_device,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index 0104a8ec5369..71673487ace0 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -23,51 +23,96 @@
23#include <linux/sh_timer.h> 23#include <linux/sh_timer.h>
24#include <asm/mmzone.h> 24#include <asm/mmzone.h>
25 25
26static struct plat_sci_port sci_platform_data[] = { 26static struct plat_sci_port scif0_platform_data = {
27 { 27 .mapbase = 0xffea0000,
28 .mapbase = 0xffea0000, 28 .flags = UPF_BOOT_AUTOCONF,
29 .flags = UPF_BOOT_AUTOCONF, 29 .type = PORT_SCIF,
30 .type = PORT_SCIF, 30 .irqs = { 40, 41, 43, 42 },
31 .irqs = { 40, 41, 43, 42 }, 31};
32
33static struct platform_device scif0_device = {
34 .name = "sh-sci",
35 .id = 0,
36 .dev = {
37 .platform_data = &scif0_platform_data,
32 }, 38 },
33 /*
34 * The rest of these all have multiplexed IRQs
35 */
36 {
37 .mapbase = 0xffeb0000,
38 .flags = UPF_BOOT_AUTOCONF,
39 .type = PORT_SCIF,
40 .irqs = { 44, 44, 44, 44 },
41 }, {
42 .mapbase = 0xffec0000,
43 .flags = UPF_BOOT_AUTOCONF,
44 .type = PORT_SCIF,
45 .irqs = { 50, 50, 50, 50 },
46 }, {
47 .mapbase = 0xffed0000,
48 .flags = UPF_BOOT_AUTOCONF,
49 .type = PORT_SCIF,
50 .irqs = { 51, 51, 51, 51 },
51 }, {
52 .mapbase = 0xffee0000,
53 .flags = UPF_BOOT_AUTOCONF,
54 .type = PORT_SCIF,
55 .irqs = { 52, 52, 52, 52 },
56 }, {
57 .mapbase = 0xffef0000,
58 .flags = UPF_BOOT_AUTOCONF,
59 .type = PORT_SCIF,
60 .irqs = { 53, 53, 53, 53 },
61 }, {
62 .flags = 0,
63 }
64}; 39};
65 40
66static struct platform_device sci_device = { 41/*
42 * The rest of these all have multiplexed IRQs
43 */
44static struct plat_sci_port scif1_platform_data = {
45 .mapbase = 0xffeb0000,
46 .flags = UPF_BOOT_AUTOCONF,
47 .type = PORT_SCIF,
48 .irqs = { 44, 44, 44, 44 },
49};
50
51static struct platform_device scif1_device = {
67 .name = "sh-sci", 52 .name = "sh-sci",
68 .id = -1, 53 .id = 1,
54 .dev = {
55 .platform_data = &scif1_platform_data,
56 },
57};
58
59static struct plat_sci_port scif2_platform_data = {
60 .mapbase = 0xffec0000,
61 .flags = UPF_BOOT_AUTOCONF,
62 .type = PORT_SCIF,
63 .irqs = { 50, 50, 50, 50 },
64};
65
66static struct platform_device scif2_device = {
67 .name = "sh-sci",
68 .id = 2,
69 .dev = {
70 .platform_data = &scif2_platform_data,
71 },
72};
73
74static struct plat_sci_port scif3_platform_data = {
75 .mapbase = 0xffed0000,
76 .flags = UPF_BOOT_AUTOCONF,
77 .type = PORT_SCIF,
78 .irqs = { 51, 51, 51, 51 },
79};
80
81static struct platform_device scif3_device = {
82 .name = "sh-sci",
83 .id = 3,
84 .dev = {
85 .platform_data = &scif3_platform_data,
86 },
87};
88
89static struct plat_sci_port scif4_platform_data = {
90 .mapbase = 0xffee0000,
91 .flags = UPF_BOOT_AUTOCONF,
92 .type = PORT_SCIF,
93 .irqs = { 52, 52, 52, 52 },
94};
95
96static struct platform_device scif4_device = {
97 .name = "sh-sci",
98 .id = 4,
99 .dev = {
100 .platform_data = &scif4_platform_data,
101 },
102};
103
104static struct plat_sci_port scif5_platform_data = {
105 .mapbase = 0xffef0000,
106 .flags = UPF_BOOT_AUTOCONF,
107 .type = PORT_SCIF,
108 .irqs = { 53, 53, 53, 53 },
109};
110
111static struct platform_device scif5_device = {
112 .name = "sh-sci",
113 .id = 5,
69 .dev = { 114 .dev = {
70 .platform_data = sci_platform_data, 115 .platform_data = &scif5_platform_data,
71 }, 116 },
72}; 117};
73 118
@@ -459,6 +504,12 @@ static struct platform_device usb_ohci_device = {
459}; 504};
460 505
461static struct platform_device *sh7786_early_devices[] __initdata = { 506static struct platform_device *sh7786_early_devices[] __initdata = {
507 &scif0_device,
508 &scif1_device,
509 &scif2_device,
510 &scif3_device,
511 &scif4_device,
512 &scif5_device,
462 &tmu0_device, 513 &tmu0_device,
463 &tmu1_device, 514 &tmu1_device,
464 &tmu2_device, 515 &tmu2_device,
@@ -474,7 +525,6 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
474}; 525};
475 526
476static struct platform_device *sh7786_devices[] __initdata = { 527static struct platform_device *sh7786_devices[] __initdata = {
477 &sci_device,
478 &usb_ohci_device, 528 &usb_ohci_device,
479}; 529};
480 530
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
index e848443deeb9..780ba17a5599 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -15,37 +15,57 @@
15#include <linux/sh_timer.h> 15#include <linux/sh_timer.h>
16#include <asm/mmzone.h> 16#include <asm/mmzone.h>
17 17
18static struct plat_sci_port sci_platform_data[] = { 18/*
19 { 19 * This intentionally only registers SCIF ports 0, 1, and 3. SCIF 2
20 .mapbase = 0xffc30000, 20 * INTEVT values overlap with the FPU EXPEVT ones, requiring special
21 .flags = UPF_BOOT_AUTOCONF, 21 * demuxing in the exception dispatch path.
22 .type = PORT_SCIF, 22 *
23 .irqs = { 40, 41, 43, 42 }, 23 * As this overlap is something that never should have made it in to
24 }, { 24 * silicon in the first place, we just refuse to deal with the port at
25 .mapbase = 0xffc40000, 25 * all rather than adding infrastructure to hack around it.
26 .flags = UPF_BOOT_AUTOCONF, 26 */
27 .type = PORT_SCIF, 27static struct plat_sci_port scif0_platform_data = {
28 .irqs = { 44, 45, 47, 46 }, 28 .mapbase = 0xffc30000,
29 }, { 29 .flags = UPF_BOOT_AUTOCONF,
30 .mapbase = 0xffc50000, 30 .type = PORT_SCIF,
31 .flags = UPF_BOOT_AUTOCONF, 31 .irqs = { 40, 41, 43, 42 },
32 .type = PORT_SCIF,
33 .irqs = { 48, 49, 51, 50 },
34 }, {
35 .mapbase = 0xffc60000,
36 .flags = UPF_BOOT_AUTOCONF,
37 .type = PORT_SCIF,
38 .irqs = { 52, 53, 55, 54 },
39 }, {
40 .flags = 0,
41 }
42}; 32};
43 33
44static struct platform_device sci_device = { 34static struct platform_device scif0_device = {
45 .name = "sh-sci", 35 .name = "sh-sci",
46 .id = -1, 36 .id = 0,
37 .dev = {
38 .platform_data = &scif0_platform_data,
39 },
40};
41
42static struct plat_sci_port scif1_platform_data = {
43 .mapbase = 0xffc40000,
44 .flags = UPF_BOOT_AUTOCONF,
45 .type = PORT_SCIF,
46 .irqs = { 44, 45, 47, 46 },
47};
48
49static struct platform_device scif1_device = {
50 .name = "sh-sci",
51 .id = 1,
47 .dev = { 52 .dev = {
48 .platform_data = sci_platform_data, 53 .platform_data = &scif1_platform_data,
54 },
55};
56
57static struct plat_sci_port scif2_platform_data = {
58 .mapbase = 0xffc60000,
59 .flags = UPF_BOOT_AUTOCONF,
60 .type = PORT_SCIF,
61 .irqs = { 52, 53, 55, 54 },
62};
63
64static struct platform_device scif2_device = {
65 .name = "sh-sci",
66 .id = 2,
67 .dev = {
68 .platform_data = &scif2_platform_data,
49 }, 69 },
50}; 70};
51 71
@@ -232,6 +252,9 @@ static struct platform_device tmu5_device = {
232}; 252};
233 253
234static struct platform_device *shx3_early_devices[] __initdata = { 254static struct platform_device *shx3_early_devices[] __initdata = {
255 &scif0_device,
256 &scif1_device,
257 &scif2_device,
235 &tmu0_device, 258 &tmu0_device,
236 &tmu1_device, 259 &tmu1_device,
237 &tmu2_device, 260 &tmu2_device,
@@ -240,21 +263,10 @@ static struct platform_device *shx3_early_devices[] __initdata = {
240 &tmu5_device, 263 &tmu5_device,
241}; 264};
242 265
243static struct platform_device *shx3_devices[] __initdata = {
244 &sci_device,
245};
246
247static int __init shx3_devices_setup(void) 266static int __init shx3_devices_setup(void)
248{ 267{
249 int ret; 268 return platform_add_devices(shx3_early_devices,
250
251 ret = platform_add_devices(shx3_early_devices,
252 ARRAY_SIZE(shx3_early_devices)); 269 ARRAY_SIZE(shx3_early_devices));
253 if (unlikely(ret != 0))
254 return ret;
255
256 return platform_add_devices(shx3_devices,
257 ARRAY_SIZE(shx3_devices));
258} 270}
259arch_initcall(shx3_devices_setup); 271arch_initcall(shx3_devices_setup);
260 272
@@ -268,7 +280,11 @@ enum {
268 UNUSED = 0, 280 UNUSED = 0,
269 281
270 /* interrupt sources */ 282 /* interrupt sources */
271 IRL, IRQ0, IRQ1, IRQ2, IRQ3, 283 IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
284 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
285 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
286 IRL_HHLL, IRL_HHLH, IRL_HHHL,
287 IRQ0, IRQ1, IRQ2, IRQ3,
272 HUDII, 288 HUDII,
273 TMU0, TMU1, TMU2, TMU3, TMU4, TMU5, 289 TMU0, TMU1, TMU2, TMU3, TMU4, TMU5,
274 PCII0, PCII1, PCII2, PCII3, PCII4, 290 PCII0, PCII1, PCII2, PCII3, PCII4,
@@ -291,7 +307,7 @@ enum {
291 INTICI4, INTICI5, INTICI6, INTICI7, 307 INTICI4, INTICI5, INTICI6, INTICI7,
292 308
293 /* interrupt groups */ 309 /* interrupt groups */
294 PCII56789, SCIF0, SCIF1, SCIF2, SCIF3, 310 IRL, PCII56789, SCIF0, SCIF1, SCIF2, SCIF3,
295 DMAC0, DMAC1, 311 DMAC0, DMAC1,
296}; 312};
297 313
@@ -309,8 +325,6 @@ static struct intc_vect vectors[] __initdata = {
309 INTC_VECT(SCIF0_BRI, 0x740), INTC_VECT(SCIF0_TXI, 0x760), 325 INTC_VECT(SCIF0_BRI, 0x740), INTC_VECT(SCIF0_TXI, 0x760),
310 INTC_VECT(SCIF1_ERI, 0x780), INTC_VECT(SCIF1_RXI, 0x7a0), 326 INTC_VECT(SCIF1_ERI, 0x780), INTC_VECT(SCIF1_RXI, 0x7a0),
311 INTC_VECT(SCIF1_BRI, 0x7c0), INTC_VECT(SCIF1_TXI, 0x7e0), 327 INTC_VECT(SCIF1_BRI, 0x7c0), INTC_VECT(SCIF1_TXI, 0x7e0),
312 INTC_VECT(SCIF2_ERI, 0x800), INTC_VECT(SCIF2_RXI, 0x820),
313 INTC_VECT(SCIF2_BRI, 0x840), INTC_VECT(SCIF2_TXI, 0x860),
314 INTC_VECT(SCIF3_ERI, 0x880), INTC_VECT(SCIF3_RXI, 0x8a0), 328 INTC_VECT(SCIF3_ERI, 0x880), INTC_VECT(SCIF3_RXI, 0x8a0),
315 INTC_VECT(SCIF3_BRI, 0x8c0), INTC_VECT(SCIF3_TXI, 0x8e0), 329 INTC_VECT(SCIF3_BRI, 0x8c0), INTC_VECT(SCIF3_TXI, 0x8e0),
316 INTC_VECT(DMAC0_DMINT0, 0x900), INTC_VECT(DMAC0_DMINT1, 0x920), 330 INTC_VECT(DMAC0_DMINT0, 0x900), INTC_VECT(DMAC0_DMINT1, 0x920),
@@ -344,10 +358,13 @@ static struct intc_vect vectors[] __initdata = {
344}; 358};
345 359
346static struct intc_group groups[] __initdata = { 360static struct intc_group groups[] __initdata = {
361 INTC_GROUP(IRL, IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
362 IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
363 IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
364 IRL_HHLL, IRL_HHLH, IRL_HHHL),
347 INTC_GROUP(PCII56789, PCII5, PCII6, PCII7, PCII8, PCII9), 365 INTC_GROUP(PCII56789, PCII5, PCII6, PCII7, PCII8, PCII9),
348 INTC_GROUP(SCIF0, SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI), 366 INTC_GROUP(SCIF0, SCIF0_ERI, SCIF0_RXI, SCIF0_BRI, SCIF0_TXI),
349 INTC_GROUP(SCIF1, SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI), 367 INTC_GROUP(SCIF1, SCIF1_ERI, SCIF1_RXI, SCIF1_BRI, SCIF1_TXI),
350 INTC_GROUP(SCIF2, SCIF2_ERI, SCIF2_RXI, SCIF2_BRI, SCIF2_TXI),
351 INTC_GROUP(SCIF3, SCIF3_ERI, SCIF3_RXI, SCIF3_BRI, SCIF3_TXI), 368 INTC_GROUP(SCIF3, SCIF3_ERI, SCIF3_RXI, SCIF3_BRI, SCIF3_TXI),
352 INTC_GROUP(DMAC0, DMAC0_DMINT0, DMAC0_DMINT1, DMAC0_DMINT2, 369 INTC_GROUP(DMAC0, DMAC0_DMINT0, DMAC0_DMINT1, DMAC0_DMINT2,
353 DMAC0_DMINT3, DMAC0_DMINT4, DMAC0_DMINT5, DMAC0_DMAE), 370 DMAC0_DMINT3, DMAC0_DMINT4, DMAC0_DMINT5, DMAC0_DMAE),
@@ -419,14 +436,14 @@ static DECLARE_INTC_DESC(intc_desc_irq, "shx3-irq", vectors_irq, groups,
419 436
420/* External interrupt pins in IRL mode */ 437/* External interrupt pins in IRL mode */
421static struct intc_vect vectors_irl[] __initdata = { 438static struct intc_vect vectors_irl[] __initdata = {
422 INTC_VECT(IRL, 0x200), INTC_VECT(IRL, 0x220), 439 INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220),
423 INTC_VECT(IRL, 0x240), INTC_VECT(IRL, 0x260), 440 INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260),
424 INTC_VECT(IRL, 0x280), INTC_VECT(IRL, 0x2a0), 441 INTC_VECT(IRL_LHLL, 0x280), INTC_VECT(IRL_LHLH, 0x2a0),
425 INTC_VECT(IRL, 0x2c0), INTC_VECT(IRL, 0x2e0), 442 INTC_VECT(IRL_LHHL, 0x2c0), INTC_VECT(IRL_LHHH, 0x2e0),
426 INTC_VECT(IRL, 0x300), INTC_VECT(IRL, 0x320), 443 INTC_VECT(IRL_HLLL, 0x300), INTC_VECT(IRL_HLLH, 0x320),
427 INTC_VECT(IRL, 0x340), INTC_VECT(IRL, 0x360), 444 INTC_VECT(IRL_HLHL, 0x340), INTC_VECT(IRL_HLHH, 0x360),
428 INTC_VECT(IRL, 0x380), INTC_VECT(IRL, 0x3a0), 445 INTC_VECT(IRL_HHLL, 0x380), INTC_VECT(IRL_HHLH, 0x3a0),
429 INTC_VECT(IRL, 0x3c0), 446 INTC_VECT(IRL_HHHL, 0x3c0),
430}; 447};
431 448
432static DECLARE_INTC_DESC(intc_desc_irl, "shx3-irl", vectors_irl, groups, 449static DECLARE_INTC_DESC(intc_desc_irl, "shx3-irl", vectors_irl, groups,
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index 185ec3976a25..5863e0c4d02f 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -14,6 +14,13 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16 16
17#define STBCR_REG(phys_id) (0xfe400004 | (phys_id << 12))
18#define RESET_REG(phys_id) (0xfe400008 | (phys_id << 12))
19
20#define STBCR_MSTP 0x00000001
21#define STBCR_RESET 0x00000002
22#define STBCR_LTSLP 0x80000000
23
17static irqreturn_t ipi_interrupt_handler(int irq, void *arg) 24static irqreturn_t ipi_interrupt_handler(int irq, void *arg)
18{ 25{
19 unsigned int message = (unsigned int)(long)arg; 26 unsigned int message = (unsigned int)(long)arg;
@@ -21,9 +28,9 @@ static irqreturn_t ipi_interrupt_handler(int irq, void *arg)
21 unsigned int offs = 4 * cpu; 28 unsigned int offs = 4 * cpu;
22 unsigned int x; 29 unsigned int x;
23 30
24 x = ctrl_inl(0xfe410070 + offs); /* C0INITICI..CnINTICI */ 31 x = __raw_readl(0xfe410070 + offs); /* C0INITICI..CnINTICI */
25 x &= (1 << (message << 2)); 32 x &= (1 << (message << 2));
26 ctrl_outl(x, 0xfe410080 + offs); /* C0INTICICLR..CnINTICICLR */ 33 __raw_writel(x, 0xfe410080 + offs); /* C0INTICICLR..CnINTICICLR */
27 34
28 smp_message_recv(message); 35 smp_message_recv(message);
29 36
@@ -37,6 +44,9 @@ void __init plat_smp_setup(void)
37 44
38 init_cpu_possible(cpumask_of(cpu)); 45 init_cpu_possible(cpumask_of(cpu));
39 46
47 /* Enable light sleep for the boot CPU */
48 __raw_writel(__raw_readl(STBCR_REG(cpu)) | STBCR_LTSLP, STBCR_REG(cpu));
49
40 __cpu_number_map[0] = 0; 50 __cpu_number_map[0] = 0;
41 __cpu_logical_map[0] = 0; 51 __cpu_logical_map[0] = 0;
42 52
@@ -66,32 +76,23 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
66 "IPI", (void *)(long)i); 76 "IPI", (void *)(long)i);
67} 77}
68 78
69#define STBCR_REG(phys_id) (0xfe400004 | (phys_id << 12))
70#define RESET_REG(phys_id) (0xfe400008 | (phys_id << 12))
71
72#define STBCR_MSTP 0x00000001
73#define STBCR_RESET 0x00000002
74#define STBCR_LTSLP 0x80000000
75
76#define STBCR_AP_VAL (STBCR_RESET | STBCR_LTSLP)
77
78void plat_start_cpu(unsigned int cpu, unsigned long entry_point) 79void plat_start_cpu(unsigned int cpu, unsigned long entry_point)
79{ 80{
80 ctrl_outl(entry_point, RESET_REG(cpu)); 81 __raw_writel(entry_point, RESET_REG(cpu));
81 82
82 if (!(ctrl_inl(STBCR_REG(cpu)) & STBCR_MSTP)) 83 if (!(__raw_readl(STBCR_REG(cpu)) & STBCR_MSTP))
83 ctrl_outl(STBCR_MSTP, STBCR_REG(cpu)); 84 __raw_writel(STBCR_MSTP, STBCR_REG(cpu));
84 85
85 while (!(ctrl_inl(STBCR_REG(cpu)) & STBCR_MSTP)) 86 while (!(__raw_readl(STBCR_REG(cpu)) & STBCR_MSTP))
86 cpu_relax(); 87 cpu_relax();
87 88
88 /* Start up secondary processor by sending a reset */ 89 /* Start up secondary processor by sending a reset */
89 ctrl_outl(STBCR_AP_VAL, STBCR_REG(cpu)); 90 __raw_writel(STBCR_RESET | STBCR_LTSLP, STBCR_REG(cpu));
90} 91}
91 92
92int plat_smp_processor_id(void) 93int plat_smp_processor_id(void)
93{ 94{
94 return ctrl_inl(0xff000048); /* CPIDR */ 95 return __raw_readl(0xff000048); /* CPIDR */
95} 96}
96 97
97void plat_send_ipi(unsigned int cpu, unsigned int message) 98void plat_send_ipi(unsigned int cpu, unsigned int message)
@@ -100,5 +101,5 @@ void plat_send_ipi(unsigned int cpu, unsigned int message)
100 101
101 BUG_ON(cpu >= 4); 102 BUG_ON(cpu >= 4);
102 103
103 ctrl_outl(1 << (message << 2), addr); /* C0INTICI..CnINTICI */ 104 __raw_writel(1 << (message << 2), addr); /* C0INTICI..CnINTICI */
104} 105}
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S
index b0aacf675258..8f13f73cb2cb 100644
--- a/arch/sh/kernel/cpu/sh5/entry.S
+++ b/arch/sh/kernel/cpu/sh5/entry.S
@@ -933,7 +933,7 @@ ret_with_reschedule:
933 933
934 pta restore_all, tr1 934 pta restore_all, tr1
935 935
936 movi (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r8 936 movi _TIF_SIGPENDING, r8
937 and r8, r7, r8 937 and r8, r7, r8
938 pta work_notifysig, tr0 938 pta work_notifysig, tr0
939 bne r8, ZERO, tr0 939 bne r8, ZERO, tr0
diff --git a/arch/sh/kernel/cpu/sh5/fpu.c b/arch/sh/kernel/cpu/sh5/fpu.c
index dd4f51ffb50e..4648ccee6c4d 100644
--- a/arch/sh/kernel/cpu/sh5/fpu.c
+++ b/arch/sh/kernel/cpu/sh5/fpu.c
@@ -34,7 +34,7 @@ static union sh_fpu_union init_fpuregs = {
34 } 34 }
35}; 35};
36 36
37void save_fpu(struct task_struct *tsk, struct pt_regs *regs) 37void save_fpu(struct task_struct *tsk)
38{ 38{
39 asm volatile("fst.p %0, (0*8), fp0\n\t" 39 asm volatile("fst.p %0, (0*8), fp0\n\t"
40 "fst.p %0, (1*8), fp2\n\t" 40 "fst.p %0, (1*8), fp2\n\t"
@@ -153,7 +153,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
153 enable_fpu(); 153 enable_fpu();
154 if (last_task_used_math != NULL) 154 if (last_task_used_math != NULL)
155 /* Other processes fpu state, save away */ 155 /* Other processes fpu state, save away */
156 save_fpu(last_task_used_math, regs); 156 save_fpu(last_task_used_math);
157 157
158 last_task_used_math = current; 158 last_task_used_math = current;
159 if (used_math()) { 159 if (used_math()) {
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c
index 6a0f82f70032..e7a3c1e4b604 100644
--- a/arch/sh/kernel/cpu/sh5/setup-sh5.c
+++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c
@@ -16,22 +16,18 @@
16#include <linux/sh_timer.h> 16#include <linux/sh_timer.h>
17#include <asm/addrspace.h> 17#include <asm/addrspace.h>
18 18
19static struct plat_sci_port sci_platform_data[] = { 19static struct plat_sci_port scif0_platform_data = {
20 { 20 .mapbase = PHYS_PERIPHERAL_BLOCK + 0x01030000,
21 .mapbase = PHYS_PERIPHERAL_BLOCK + 0x01030000, 21 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
22 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 22 .type = PORT_SCIF,
23 .type = PORT_SCIF, 23 .irqs = { 39, 40, 42, 0 },
24 .irqs = { 39, 40, 42, 0 },
25 }, {
26 .flags = 0,
27 }
28}; 24};
29 25
30static struct platform_device sci_device = { 26static struct platform_device scif0_device = {
31 .name = "sh-sci", 27 .name = "sh-sci",
32 .id = -1, 28 .id = 0,
33 .dev = { 29 .dev = {
34 .platform_data = sci_platform_data, 30 .platform_data = &scif0_platform_data,
35 }, 31 },
36}; 32};
37 33
@@ -164,13 +160,13 @@ static struct platform_device tmu2_device = {
164}; 160};
165 161
166static struct platform_device *sh5_early_devices[] __initdata = { 162static struct platform_device *sh5_early_devices[] __initdata = {
163 &scif0_device,
167 &tmu0_device, 164 &tmu0_device,
168 &tmu1_device, 165 &tmu1_device,
169 &tmu2_device, 166 &tmu2_device,
170}; 167};
171 168
172static struct platform_device *sh5_devices[] __initdata = { 169static struct platform_device *sh5_devices[] __initdata = {
173 &sci_device,
174 &rtc_device, 170 &rtc_device,
175}; 171};
176 172
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index 1c504bd972c3..83972aa319c2 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -87,25 +87,31 @@ void sh_mobile_setup_cpuidle(void)
87 87
88 dev->safe_state = state; 88 dev->safe_state = state;
89 89
90 state = &dev->states[i++]; 90 if (sh_mobile_sleep_supported & SUSP_SH_SF) {
91 snprintf(state->name, CPUIDLE_NAME_LEN, "C1"); 91 state = &dev->states[i++];
92 strncpy(state->desc, "SuperH Sleep Mode [SF]", CPUIDLE_DESC_LEN); 92 snprintf(state->name, CPUIDLE_NAME_LEN, "C1");
93 state->exit_latency = 100; 93 strncpy(state->desc, "SuperH Sleep Mode [SF]",
94 state->target_residency = 1 * 2; 94 CPUIDLE_DESC_LEN);
95 state->power_usage = 1; 95 state->exit_latency = 100;
96 state->flags = 0; 96 state->target_residency = 1 * 2;
97 state->flags |= CPUIDLE_FLAG_TIME_VALID; 97 state->power_usage = 1;
98 state->enter = cpuidle_sleep_enter; 98 state->flags = 0;
99 state->flags |= CPUIDLE_FLAG_TIME_VALID;
100 state->enter = cpuidle_sleep_enter;
101 }
99 102
100 state = &dev->states[i++]; 103 if (sh_mobile_sleep_supported & SUSP_SH_STANDBY) {
101 snprintf(state->name, CPUIDLE_NAME_LEN, "C2"); 104 state = &dev->states[i++];
102 strncpy(state->desc, "SuperH Mobile Standby Mode [SF]", CPUIDLE_DESC_LEN); 105 snprintf(state->name, CPUIDLE_NAME_LEN, "C2");
103 state->exit_latency = 2300; 106 strncpy(state->desc, "SuperH Mobile Standby Mode [SF]",
104 state->target_residency = 1 * 2; 107 CPUIDLE_DESC_LEN);
105 state->power_usage = 1; 108 state->exit_latency = 2300;
106 state->flags = 0; 109 state->target_residency = 1 * 2;
107 state->flags |= CPUIDLE_FLAG_TIME_VALID; 110 state->power_usage = 1;
108 state->enter = cpuidle_sleep_enter; 111 state->flags = 0;
112 state->flags |= CPUIDLE_FLAG_TIME_VALID;
113 state->enter = cpuidle_sleep_enter;
114 }
109 115
110 dev->state_count = i; 116 dev->state_count = i;
111 117
diff --git a/arch/sh/kernel/cpu/shmobile/pm.c b/arch/sh/kernel/cpu/shmobile/pm.c
index ee3c2aaf66fb..ca029a44743c 100644
--- a/arch/sh/kernel/cpu/shmobile/pm.c
+++ b/arch/sh/kernel/cpu/shmobile/pm.c
@@ -15,6 +15,13 @@
15#include <linux/suspend.h> 15#include <linux/suspend.h>
16#include <asm/suspend.h> 16#include <asm/suspend.h>
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/cacheflush.h>
19
20/*
21 * Notifier lists for pre/post sleep notification
22 */
23ATOMIC_NOTIFIER_HEAD(sh_mobile_pre_sleep_notifier_list);
24ATOMIC_NOTIFIER_HEAD(sh_mobile_post_sleep_notifier_list);
18 25
19/* 26/*
20 * Sleep modes available on SuperH Mobile: 27 * Sleep modes available on SuperH Mobile:
@@ -26,30 +33,105 @@
26#define SUSP_MODE_SLEEP (SUSP_SH_SLEEP) 33#define SUSP_MODE_SLEEP (SUSP_SH_SLEEP)
27#define SUSP_MODE_SLEEP_SF (SUSP_SH_SLEEP | SUSP_SH_SF) 34#define SUSP_MODE_SLEEP_SF (SUSP_SH_SLEEP | SUSP_SH_SF)
28#define SUSP_MODE_STANDBY_SF (SUSP_SH_STANDBY | SUSP_SH_SF) 35#define SUSP_MODE_STANDBY_SF (SUSP_SH_STANDBY | SUSP_SH_SF)
36#define SUSP_MODE_RSTANDBY (SUSP_SH_RSTANDBY | SUSP_SH_MMU | SUSP_SH_SF)
37 /*
38 * U-standby mode is unsupported since it needs bootloader hacks
39 */
29 40
30/* 41#ifdef CONFIG_CPU_SUBTYPE_SH7724
31 * The following modes are not there yet: 42#define RAM_BASE 0xfd800000 /* RSMEM */
32 * 43#else
33 * R-standby mode is unsupported, but will be added in the future 44#define RAM_BASE 0xe5200000 /* ILRAM */
34 * U-standby mode is low priority since it needs bootloader hacks 45#endif
35 */
36
37#define ILRAM_BASE 0xe5200000
38
39extern const unsigned char sh_mobile_standby[];
40extern const unsigned int sh_mobile_standby_size;
41 46
42void sh_mobile_call_standby(unsigned long mode) 47void sh_mobile_call_standby(unsigned long mode)
43{ 48{
44 void *onchip_mem = (void *)ILRAM_BASE; 49 void *onchip_mem = (void *)RAM_BASE;
45 void (*standby_onchip_mem)(unsigned long, unsigned long) = onchip_mem; 50 struct sh_sleep_data *sdp = onchip_mem;
51 void (*standby_onchip_mem)(unsigned long, unsigned long);
52
53 /* code located directly after data structure */
54 standby_onchip_mem = (void *)(sdp + 1);
55
56 atomic_notifier_call_chain(&sh_mobile_pre_sleep_notifier_list,
57 mode, NULL);
58
59 /* flush the caches if MMU flag is set */
60 if (mode & SUSP_SH_MMU)
61 flush_cache_all();
46 62
47 /* Let assembly snippet in on-chip memory handle the rest */ 63 /* Let assembly snippet in on-chip memory handle the rest */
48 standby_onchip_mem(mode, ILRAM_BASE); 64 standby_onchip_mem(mode, RAM_BASE);
65
66 atomic_notifier_call_chain(&sh_mobile_post_sleep_notifier_list,
67 mode, NULL);
68}
69
70extern char sh_mobile_sleep_enter_start;
71extern char sh_mobile_sleep_enter_end;
72
73extern char sh_mobile_sleep_resume_start;
74extern char sh_mobile_sleep_resume_end;
75
76unsigned long sh_mobile_sleep_supported = SUSP_SH_SLEEP;
77
78void sh_mobile_register_self_refresh(unsigned long flags,
79 void *pre_start, void *pre_end,
80 void *post_start, void *post_end)
81{
82 void *onchip_mem = (void *)RAM_BASE;
83 void *vp;
84 struct sh_sleep_data *sdp;
85 int n;
86
87 /* part 0: data area */
88 sdp = onchip_mem;
89 sdp->addr.stbcr = 0xa4150020; /* STBCR */
90 sdp->addr.bar = 0xa4150040; /* BAR */
91 sdp->addr.pteh = 0xff000000; /* PTEH */
92 sdp->addr.ptel = 0xff000004; /* PTEL */
93 sdp->addr.ttb = 0xff000008; /* TTB */
94 sdp->addr.tea = 0xff00000c; /* TEA */
95 sdp->addr.mmucr = 0xff000010; /* MMUCR */
96 sdp->addr.ptea = 0xff000034; /* PTEA */
97 sdp->addr.pascr = 0xff000070; /* PASCR */
98 sdp->addr.irmcr = 0xff000078; /* IRMCR */
99 sdp->addr.ccr = 0xff00001c; /* CCR */
100 sdp->addr.ramcr = 0xff000074; /* RAMCR */
101 vp = sdp + 1;
102
103 /* part 1: common code to enter sleep mode */
104 n = &sh_mobile_sleep_enter_end - &sh_mobile_sleep_enter_start;
105 memcpy(vp, &sh_mobile_sleep_enter_start, n);
106 vp += roundup(n, 4);
107
108 /* part 2: board specific code to enter self-refresh mode */
109 n = pre_end - pre_start;
110 memcpy(vp, pre_start, n);
111 sdp->sf_pre = (unsigned long)vp;
112 vp += roundup(n, 4);
113
114 /* part 3: board specific code to resume from self-refresh mode */
115 n = post_end - post_start;
116 memcpy(vp, post_start, n);
117 sdp->sf_post = (unsigned long)vp;
118 vp += roundup(n, 4);
119
120 /* part 4: common code to resume from sleep mode */
121 WARN_ON(vp > (onchip_mem + 0x600));
122 vp = onchip_mem + 0x600; /* located at interrupt vector */
123 n = &sh_mobile_sleep_resume_end - &sh_mobile_sleep_resume_start;
124 memcpy(vp, &sh_mobile_sleep_resume_start, n);
125 sdp->resume = (unsigned long)vp;
126
127 sh_mobile_sleep_supported |= flags;
49} 128}
50 129
51static int sh_pm_enter(suspend_state_t state) 130static int sh_pm_enter(suspend_state_t state)
52{ 131{
132 if (!(sh_mobile_sleep_supported & SUSP_MODE_STANDBY_SF))
133 return -ENXIO;
134
53 local_irq_disable(); 135 local_irq_disable();
54 set_bl_bit(); 136 set_bl_bit();
55 sh_mobile_call_standby(SUSP_MODE_STANDBY_SF); 137 sh_mobile_call_standby(SUSP_MODE_STANDBY_SF);
@@ -65,13 +147,6 @@ static struct platform_suspend_ops sh_pm_ops = {
65 147
66static int __init sh_pm_init(void) 148static int __init sh_pm_init(void)
67{ 149{
68 void *onchip_mem = (void *)ILRAM_BASE;
69
70 /* Copy the assembly snippet to the otherwise ununsed ILRAM */
71 memcpy(onchip_mem, sh_mobile_standby, sh_mobile_standby_size);
72 wmb();
73 ctrl_barrier();
74
75 suspend_set_ops(&sh_pm_ops); 150 suspend_set_ops(&sh_pm_ops);
76 sh_mobile_setup_cpuidle(); 151 sh_mobile_setup_cpuidle();
77 return 0; 152 return 0;
diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
index 7c615b17e209..6dcb8166a64d 100644
--- a/arch/sh/kernel/cpu/shmobile/pm_runtime.c
+++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
@@ -45,12 +45,14 @@ static int __platform_pm_runtime_resume(struct platform_device *pdev)
45 45
46 dev_dbg(d, "__platform_pm_runtime_resume() [%d]\n", hwblk); 46 dev_dbg(d, "__platform_pm_runtime_resume() [%d]\n", hwblk);
47 47
48 if (d->driver && d->driver->pm && d->driver->pm->runtime_resume) { 48 if (d->driver) {
49 hwblk_enable(hwblk_info, hwblk); 49 hwblk_enable(hwblk_info, hwblk);
50 ret = 0; 50 ret = 0;
51 51
52 if (test_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags)) { 52 if (test_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags)) {
53 ret = d->driver->pm->runtime_resume(d); 53 if (d->driver->pm && d->driver->pm->runtime_resume)
54 ret = d->driver->pm->runtime_resume(d);
55
54 if (!ret) 56 if (!ret)
55 clear_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags); 57 clear_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
56 else 58 else
@@ -73,12 +75,15 @@ static int __platform_pm_runtime_suspend(struct platform_device *pdev)
73 75
74 dev_dbg(d, "__platform_pm_runtime_suspend() [%d]\n", hwblk); 76 dev_dbg(d, "__platform_pm_runtime_suspend() [%d]\n", hwblk);
75 77
76 if (d->driver && d->driver->pm && d->driver->pm->runtime_suspend) { 78 if (d->driver) {
77 BUG_ON(!test_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags)); 79 BUG_ON(!test_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags));
80 ret = 0;
78 81
79 hwblk_enable(hwblk_info, hwblk); 82 if (d->driver->pm && d->driver->pm->runtime_suspend) {
80 ret = d->driver->pm->runtime_suspend(d); 83 hwblk_enable(hwblk_info, hwblk);
81 hwblk_disable(hwblk_info, hwblk); 84 ret = d->driver->pm->runtime_suspend(d);
85 hwblk_disable(hwblk_info, hwblk);
86 }
82 87
83 if (!ret) { 88 if (!ret) {
84 set_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags); 89 set_bit(PDEV_ARCHDATA_FLAG_SUSP, &ad->flags);
diff --git a/arch/sh/kernel/cpu/shmobile/sleep.S b/arch/sh/kernel/cpu/shmobile/sleep.S
index a439e6c7824f..e9dd7fa0abd2 100644
--- a/arch/sh/kernel/cpu/shmobile/sleep.S
+++ b/arch/sh/kernel/cpu/shmobile/sleep.S
@@ -20,79 +20,103 @@
20 * Kernel mode register usage, see entry.S: 20 * Kernel mode register usage, see entry.S:
21 * k0 scratch 21 * k0 scratch
22 * k1 scratch 22 * k1 scratch
23 * k4 scratch
24 */ 23 */
25#define k0 r0 24#define k0 r0
26#define k1 r1 25#define k1 r1
27#define k4 r4
28 26
29/* manage self-refresh and enter standby mode. 27/* manage self-refresh and enter standby mode. must be self-contained.
30 * this code will be copied to on-chip memory and executed from there. 28 * this code will be copied to on-chip memory and executed from there.
31 */ 29 */
30 .balign 4
31ENTRY(sh_mobile_sleep_enter_start)
32 32
33 .balign 4096,0,4096 33 /* save mode flags */
34ENTRY(sh_mobile_standby) 34 mov.l r4, @(SH_SLEEP_MODE, r5)
35 35
36 /* save original vbr */ 36 /* save original vbr */
37 stc vbr, r1 37 stc vbr, r0
38 mova saved_vbr, r0 38 mov.l r0, @(SH_SLEEP_VBR, r5)
39 mov.l r1, @r0
40 39
41 /* point vbr to our on-chip memory page */ 40 /* point vbr to our on-chip memory page */
42 ldc r5, vbr 41 ldc r5, vbr
43 42
44 /* save return address */ 43 /* save return address */
45 mova saved_spc, r0 44 sts pr, r0
46 sts pr, r5 45 mov.l r0, @(SH_SLEEP_SPC, r5)
47 mov.l r5, @r0
48 46
49 /* save sr */ 47 /* save sr */
50 mova saved_sr, r0 48 stc sr, r0
51 stc sr, r5 49 mov.l r0, @(SH_SLEEP_SR, r5)
52 mov.l r5, @r0
53 50
54 /* save mode flags */ 51 /* save sp */
55 mova saved_mode, r0 52 mov.l r15, @(SH_SLEEP_SP, r5)
56 mov.l r4, @r0 53
54 /* save stbcr */
55 bsr save_register
56 mov #SH_SLEEP_REG_STBCR, r0
57
58 /* save mmu and cache context if needed */
59 mov.l @(SH_SLEEP_MODE, r5), r0
60 tst #SUSP_SH_MMU, r0
61 bt skip_mmu_save_disable
62
63 /* save mmu state */
64 bsr save_register
65 mov #SH_SLEEP_REG_PTEH, r0
66
67 bsr save_register
68 mov #SH_SLEEP_REG_PTEL, r0
69
70 bsr save_register
71 mov #SH_SLEEP_REG_TTB, r0
72
73 bsr save_register
74 mov #SH_SLEEP_REG_TEA, r0
75
76 bsr save_register
77 mov #SH_SLEEP_REG_MMUCR, r0
78
79 bsr save_register
80 mov #SH_SLEEP_REG_PTEA, r0
81
82 bsr save_register
83 mov #SH_SLEEP_REG_PASCR, r0
57 84
58 /* put mode flags in r0 */ 85 bsr save_register
59 mov r4, r0 86 mov #SH_SLEEP_REG_IRMCR, r0
60 87
88 /* invalidate TLBs and disable the MMU */
89 bsr get_register
90 mov #SH_SLEEP_REG_MMUCR, r0
91 mov #4, r1
92 mov.l r1, @r0
93 icbi @r0
94
95 /* save cache registers and disable caches */
96 bsr save_register
97 mov #SH_SLEEP_REG_CCR, r0
98
99 bsr save_register
100 mov #SH_SLEEP_REG_RAMCR, r0
101
102 bsr get_register
103 mov #SH_SLEEP_REG_CCR, r0
104 mov #0, r1
105 mov.l r1, @r0
106 icbi @r0
107
108skip_mmu_save_disable:
109 /* call self-refresh entering code if needed */
110 mov.l @(SH_SLEEP_MODE, r5), r0
61 tst #SUSP_SH_SF, r0 111 tst #SUSP_SH_SF, r0
62 bt skip_set_sf 112 bt skip_set_sf
63#ifdef CONFIG_CPU_SUBTYPE_SH7724 113
64 /* DBSC: put memory in self-refresh mode */ 114 mov.l @(SH_SLEEP_SF_PRE, r5), r0
65 mov.l dben_reg, r4 115 jsr @r0
66 mov.l dben_data0, r1 116 nop
67 mov.l r1, @r4
68
69 mov.l dbrfpdn0_reg, r4
70 mov.l dbrfpdn0_data0, r1
71 mov.l r1, @r4
72
73 mov.l dbcmdcnt_reg, r4
74 mov.l dbcmdcnt_data0, r1
75 mov.l r1, @r4
76
77 mov.l dbcmdcnt_reg, r4
78 mov.l dbcmdcnt_data1, r1
79 mov.l r1, @r4
80
81 mov.l dbrfpdn0_reg, r4
82 mov.l dbrfpdn0_data1, r1
83 mov.l r1, @r4
84#else
85 /* SBSC: disable power down and put in self-refresh mode */
86 mov.l 1f, r4
87 mov.l 2f, r1
88 mov.l @r4, r2
89 or r1, r2
90 mov.l 3f, r3
91 and r3, r2
92 mov.l r2, @r4
93#endif
94 117
95skip_set_sf: 118skip_set_sf:
119 mov.l @(SH_SLEEP_MODE, r5), r0
96 tst #SUSP_SH_STANDBY, r0 120 tst #SUSP_SH_STANDBY, r0
97 bt test_rstandby 121 bt test_rstandby
98 122
@@ -104,6 +128,12 @@ test_rstandby:
104 tst #SUSP_SH_RSTANDBY, r0 128 tst #SUSP_SH_RSTANDBY, r0
105 bt test_ustandby 129 bt test_ustandby
106 130
131 /* setup BAR register */
132 bsr get_register
133 mov #SH_SLEEP_REG_BAR, r0
134 mov.l @(SH_SLEEP_RESUME, r5), r1
135 mov.l r1, @r0
136
107 /* set mode to "r-standby mode" */ 137 /* set mode to "r-standby mode" */
108 bra do_sleep 138 bra do_sleep
109 mov #0x20, r1 139 mov #0x20, r1
@@ -123,124 +153,136 @@ force_sleep:
123 153
124do_sleep: 154do_sleep:
125 /* setup and enter selected standby mode */ 155 /* setup and enter selected standby mode */
126 mov.l 5f, r4 156 bsr get_register
127 mov.l r1, @r4 157 mov #SH_SLEEP_REG_STBCR, r0
158 mov.l r1, @r0
128again: 159again:
129 sleep 160 sleep
130 bra again 161 bra again
131 nop 162 nop
132 163
133restore_jump_vbr: 164save_register:
165 add #SH_SLEEP_BASE_ADDR, r0
166 mov.l @(r0, r5), r1
167 add #-SH_SLEEP_BASE_ADDR, r0
168 mov.l @r1, r1
169 add #SH_SLEEP_BASE_DATA, r0
170 mov.l r1, @(r0, r5)
171 add #-SH_SLEEP_BASE_DATA, r0
172 rts
173 nop
174
175get_register:
176 add #SH_SLEEP_BASE_ADDR, r0
177 mov.l @(r0, r5), r0
178 rts
179 nop
180ENTRY(sh_mobile_sleep_enter_end)
181
182 .balign 4
183ENTRY(sh_mobile_sleep_resume_start)
184
185 /* figure out start address */
186 bsr 0f
187 nop
1880:
189 sts pr, k1
190 mov.l 1f, k0
191 and k0, k1
192
193 /* store pointer to data area in VBR */
194 ldc k1, vbr
195
196 /* setup sr with saved sr */
197 mov.l @(SH_SLEEP_SR, k1), k0
198 ldc k0, sr
199
200 /* now: user register set! */
201 stc vbr, r5
202
134 /* setup spc with return address to c code */ 203 /* setup spc with return address to c code */
135 mov.l saved_spc, k0 204 mov.l @(SH_SLEEP_SPC, r5), r0
136 ldc k0, spc 205 ldc r0, spc
137 206
138 /* restore vbr */ 207 /* restore vbr */
139 mov.l saved_vbr, k0 208 mov.l @(SH_SLEEP_VBR, r5), r0
140 ldc k0, vbr 209 ldc r0, vbr
141 210
142 /* setup ssr with saved sr */ 211 /* setup ssr with saved sr */
143 mov.l saved_sr, k0 212 mov.l @(SH_SLEEP_SR, r5), r0
144 ldc k0, ssr 213 ldc r0, ssr
145 214
146 /* get mode flags */ 215 /* restore sp */
147 mov.l saved_mode, k0 216 mov.l @(SH_SLEEP_SP, r5), r15
148 217
149done_sleep: 218 /* restore sleep mode register */
150 /* reset standby mode to sleep mode */ 219 bsr restore_register
151 mov.l 5f, k4 220 mov #SH_SLEEP_REG_STBCR, r0
152 mov #0x00, k1
153 mov.l k1, @k4
154 221
155 tst #SUSP_SH_SF, k0 222 /* call self-refresh resume code if needed */
223 mov.l @(SH_SLEEP_MODE, r5), r0
224 tst #SUSP_SH_SF, r0
156 bt skip_restore_sf 225 bt skip_restore_sf
157 226
158#ifdef CONFIG_CPU_SUBTYPE_SH7724 227 mov.l @(SH_SLEEP_SF_POST, r5), r0
159 /* DBSC: put memory in auto-refresh mode */ 228 jsr @r0
160 mov.l dbrfpdn0_reg, k4 229 nop
161 mov.l dbrfpdn0_data0, k1 230
162 mov.l k1, @k4
163
164 nop /* sleep 140 ns */
165 nop
166 nop
167 nop
168
169 mov.l dbcmdcnt_reg, k4
170 mov.l dbcmdcnt_data0, k1
171 mov.l k1, @k4
172
173 mov.l dbcmdcnt_reg, k4
174 mov.l dbcmdcnt_data1, k1
175 mov.l k1, @k4
176
177 mov.l dben_reg, k4
178 mov.l dben_data1, k1
179 mov.l k1, @k4
180
181 mov.l dbrfpdn0_reg, k4
182 mov.l dbrfpdn0_data2, k1
183 mov.l k1, @k4
184#else
185 /* SBSC: set auto-refresh mode */
186 mov.l 1f, k4
187 mov.l @k4, k0
188 mov.l 4f, k1
189 and k1, k0
190 mov.l k0, @k4
191 mov.l 6f, k4
192 mov.l 8f, k0
193 mov.l @k4, k1
194 mov #-1, k4
195 add k4, k1
196 or k1, k0
197 mov.l 7f, k1
198 mov.l k0, @k1
199#endif
200skip_restore_sf: 231skip_restore_sf:
201 /* jump to vbr vector */ 232 /* restore mmu and cache state if needed */
202 mov.l saved_vbr, k0 233 mov.l @(SH_SLEEP_MODE, r5), r0
203 mov.l offset_vbr, k4 234 tst #SUSP_SH_MMU, r0
204 add k4, k0 235 bt skip_restore_mmu
205 jmp @k0 236
237 /* restore mmu state */
238 bsr restore_register
239 mov #SH_SLEEP_REG_PTEH, r0
240
241 bsr restore_register
242 mov #SH_SLEEP_REG_PTEL, r0
243
244 bsr restore_register
245 mov #SH_SLEEP_REG_TTB, r0
246
247 bsr restore_register
248 mov #SH_SLEEP_REG_TEA, r0
249
250 bsr restore_register
251 mov #SH_SLEEP_REG_PTEA, r0
252
253 bsr restore_register
254 mov #SH_SLEEP_REG_PASCR, r0
255
256 bsr restore_register
257 mov #SH_SLEEP_REG_IRMCR, r0
258
259 bsr restore_register
260 mov #SH_SLEEP_REG_MMUCR, r0
261 icbi @r0
262
263 /* restore cache settings */
264 bsr restore_register
265 mov #SH_SLEEP_REG_RAMCR, r0
266 icbi @r0
267
268 bsr restore_register
269 mov #SH_SLEEP_REG_CCR, r0
270 icbi @r0
271
272skip_restore_mmu:
273 rte
206 nop 274 nop
207 275
208 .balign 4 276restore_register:
209saved_mode: .long 0 277 add #SH_SLEEP_BASE_DATA, r0
210saved_spc: .long 0 278 mov.l @(r0, r5), r1
211saved_sr: .long 0 279 add #-SH_SLEEP_BASE_DATA, r0
212saved_vbr: .long 0 280 add #SH_SLEEP_BASE_ADDR, r0
213offset_vbr: .long 0x600 281 mov.l @(r0, r5), r0
214#ifdef CONFIG_CPU_SUBTYPE_SH7724 282 mov.l r1, @r0
215dben_reg: .long 0xfd000010 /* DBEN */ 283 rts
216dben_data0: .long 0
217dben_data1: .long 1
218dbrfpdn0_reg: .long 0xfd000040 /* DBRFPDN0 */
219dbrfpdn0_data0: .long 0
220dbrfpdn0_data1: .long 1
221dbrfpdn0_data2: .long 0x00010000
222dbcmdcnt_reg: .long 0xfd000014 /* DBCMDCNT */
223dbcmdcnt_data0: .long 2
224dbcmdcnt_data1: .long 4
225#else
2261: .long 0xfe400008 /* SDCR0 */
2272: .long 0x00000400
2283: .long 0xffff7fff
2294: .long 0xfffffbff
230#endif
2315: .long 0xa4150020 /* STBCR */
2326: .long 0xfe40001c /* RTCOR */
2337: .long 0xfe400018 /* RTCNT */
2348: .long 0xa55a0000
235
236
237/* interrupt vector @ 0x600 */
238 .balign 0x400,0,0x400
239 .long 0xdeadbeef
240 .balign 0x200,0,0x200
241 bra restore_jump_vbr
242 nop 284 nop
243sh_mobile_standby_end:
244 285
245ENTRY(sh_mobile_standby_size) 286 .balign 4
246 .long sh_mobile_standby_end - sh_mobile_standby 2871: .long ~0x7ff
288ENTRY(sh_mobile_sleep_resume_end)
diff --git a/arch/sh/kernel/cpu/ubc.S b/arch/sh/kernel/cpu/ubc.S
deleted file mode 100644
index 81923079fa12..000000000000
--- a/arch/sh/kernel/cpu/ubc.S
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * arch/sh/kernel/cpu/ubc.S
3 *
4 * Set of management routines for the User Break Controller (UBC)
5 *
6 * Copyright (C) 2002 Paul Mundt
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#include <linux/linkage.h>
14#include <asm/ubc.h>
15
16#define STBCR2 0xffc00010
17
18ENTRY(ubc_sleep)
19 mov #0, r0
20
21 mov.l 1f, r1 ! Zero out UBC_BBRA ..
22 mov.w r0, @r1
23
24 mov.l 2f, r1 ! .. same for BBRB ..
25 mov.w r0, @r1
26
27 mov.l 3f, r1 ! .. and again for BRCR.
28 mov.w r0, @r1
29
30 mov.w @r1, r0 ! Dummy read BRCR
31
32 mov.l 4f, r1 ! Set MSTP5 in STBCR2
33 mov.b @r1, r0
34 or #0x01, r0
35 mov.b r0, @r1
36
37 mov.b @r1, r0 ! Two dummy reads ..
38 mov.b @r1, r0
39
40 rts
41 nop
42
43ENTRY(ubc_wakeup)
44 mov.l 4f, r1 ! Clear MSTP5
45 mov.b @r1, r0
46 and #0xfe, r0
47 mov.b r0, @r1
48
49 mov.b @r1, r0 ! Two more dummy reads ..
50 mov.b @r1, r0
51
52 rts
53 nop
54
551: .long UBC_BBRA
562: .long UBC_BBRB
573: .long UBC_BRCR
584: .long STBCR2
59
diff --git a/arch/sh/kernel/dma-nommu.c b/arch/sh/kernel/dma-nommu.c
new file mode 100644
index 000000000000..3c55b87f8b63
--- /dev/null
+++ b/arch/sh/kernel/dma-nommu.c
@@ -0,0 +1,82 @@
1/*
2 * DMA mapping support for platforms lacking IOMMUs.
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/dma-mapping.h>
11#include <linux/io.h>
12
13static dma_addr_t nommu_map_page(struct device *dev, struct page *page,
14 unsigned long offset, size_t size,
15 enum dma_data_direction dir,
16 struct dma_attrs *attrs)
17{
18 dma_addr_t addr = page_to_phys(page) + offset;
19
20 WARN_ON(size == 0);
21 dma_cache_sync(dev, page_address(page) + offset, size, dir);
22
23 return addr;
24}
25
26static int nommu_map_sg(struct device *dev, struct scatterlist *sg,
27 int nents, enum dma_data_direction dir,
28 struct dma_attrs *attrs)
29{
30 struct scatterlist *s;
31 int i;
32
33 WARN_ON(nents == 0 || sg[0].length == 0);
34
35 for_each_sg(sg, s, nents, i) {
36 BUG_ON(!sg_page(s));
37
38 dma_cache_sync(dev, sg_virt(s), s->length, dir);
39
40 s->dma_address = sg_phys(s);
41 s->dma_length = s->length;
42 }
43
44 return nents;
45}
46
47#ifdef CONFIG_DMA_NONCOHERENT
48static void nommu_sync_single(struct device *dev, dma_addr_t addr,
49 size_t size, enum dma_data_direction dir)
50{
51 dma_cache_sync(dev, phys_to_virt(addr), size, dir);
52}
53
54static void nommu_sync_sg(struct device *dev, struct scatterlist *sg,
55 int nelems, enum dma_data_direction dir)
56{
57 struct scatterlist *s;
58 int i;
59
60 for_each_sg(sg, s, nelems, i)
61 dma_cache_sync(dev, sg_virt(s), s->length, dir);
62}
63#endif
64
65struct dma_map_ops nommu_dma_ops = {
66 .alloc_coherent = dma_generic_alloc_coherent,
67 .free_coherent = dma_generic_free_coherent,
68 .map_page = nommu_map_page,
69 .map_sg = nommu_map_sg,
70#ifdef CONFIG_DMA_NONCOHERENT
71 .sync_single_for_device = nommu_sync_single,
72 .sync_sg_for_device = nommu_sync_sg,
73#endif
74 .is_phys = 1,
75};
76
77void __init no_iommu_init(void)
78{
79 if (dma_ops)
80 return;
81 dma_ops = &nommu_dma_ops;
82}
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
index d76a23170dbb..3576b709f052 100644
--- a/arch/sh/kernel/dwarf.c
+++ b/arch/sh/kernel/dwarf.c
@@ -20,6 +20,7 @@
20#include <linux/list.h> 20#include <linux/list.h>
21#include <linux/mempool.h> 21#include <linux/mempool.h>
22#include <linux/mm.h> 22#include <linux/mm.h>
23#include <linux/elf.h>
23#include <linux/ftrace.h> 24#include <linux/ftrace.h>
24#include <asm/dwarf.h> 25#include <asm/dwarf.h>
25#include <asm/unwinder.h> 26#include <asm/unwinder.h>
@@ -530,7 +531,18 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
530} 531}
531 532
532/** 533/**
533 * dwarf_unwind_stack - recursively unwind the stack 534 * dwarf_free_frame - free the memory allocated for @frame
535 * @frame: the frame to free
536 */
537void dwarf_free_frame(struct dwarf_frame *frame)
538{
539 dwarf_frame_free_regs(frame);
540 mempool_free(frame, dwarf_frame_pool);
541}
542
543/**
544 * dwarf_unwind_stack - unwind the stack
545 *
534 * @pc: address of the function to unwind 546 * @pc: address of the function to unwind
535 * @prev: struct dwarf_frame of the previous stackframe on the callstack 547 * @prev: struct dwarf_frame of the previous stackframe on the callstack
536 * 548 *
@@ -548,9 +560,9 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
548 unsigned long addr; 560 unsigned long addr;
549 561
550 /* 562 /*
551 * If this is the first invocation of this recursive function we 563 * If we're starting at the top of the stack we need get the
552 * need get the contents of a physical register to get the CFA 564 * contents of a physical register to get the CFA in order to
553 * in order to begin the virtual unwinding of the stack. 565 * begin the virtual unwinding of the stack.
554 * 566 *
555 * NOTE: the return address is guaranteed to be setup by the 567 * NOTE: the return address is guaranteed to be setup by the
556 * time this function makes its first function call. 568 * time this function makes its first function call.
@@ -593,9 +605,8 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
593 fde = dwarf_lookup_fde(pc); 605 fde = dwarf_lookup_fde(pc);
594 if (!fde) { 606 if (!fde) {
595 /* 607 /*
596 * This is our normal exit path - the one that stops the 608 * This is our normal exit path. There are two reasons
597 * recursion. There's two reasons why we might exit 609 * why we might exit here,
598 * here,
599 * 610 *
600 * a) pc has no asscociated DWARF frame info and so 611 * a) pc has no asscociated DWARF frame info and so
601 * we don't know how to unwind this frame. This is 612 * we don't know how to unwind this frame. This is
@@ -637,10 +648,10 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
637 648
638 } else { 649 } else {
639 /* 650 /*
640 * Again, this is the first invocation of this 651 * Again, we're starting from the top of the
641 * recurisve function. We need to physically 652 * stack. We need to physically read
642 * read the contents of a register in order to 653 * the contents of a register in order to get
643 * get the Canonical Frame Address for this 654 * the Canonical Frame Address for this
644 * function. 655 * function.
645 */ 656 */
646 frame->cfa = dwarf_read_arch_reg(frame->cfa_register); 657 frame->cfa = dwarf_read_arch_reg(frame->cfa_register);
@@ -670,13 +681,12 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc,
670 return frame; 681 return frame;
671 682
672bail: 683bail:
673 dwarf_frame_free_regs(frame); 684 dwarf_free_frame(frame);
674 mempool_free(frame, dwarf_frame_pool);
675 return NULL; 685 return NULL;
676} 686}
677 687
678static int dwarf_parse_cie(void *entry, void *p, unsigned long len, 688static int dwarf_parse_cie(void *entry, void *p, unsigned long len,
679 unsigned char *end) 689 unsigned char *end, struct module *mod)
680{ 690{
681 struct dwarf_cie *cie; 691 struct dwarf_cie *cie;
682 unsigned long flags; 692 unsigned long flags;
@@ -772,6 +782,8 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len,
772 cie->initial_instructions = p; 782 cie->initial_instructions = p;
773 cie->instructions_end = end; 783 cie->instructions_end = end;
774 784
785 cie->mod = mod;
786
775 /* Add to list */ 787 /* Add to list */
776 spin_lock_irqsave(&dwarf_cie_lock, flags); 788 spin_lock_irqsave(&dwarf_cie_lock, flags);
777 list_add_tail(&cie->link, &dwarf_cie_list); 789 list_add_tail(&cie->link, &dwarf_cie_list);
@@ -782,7 +794,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len,
782 794
783static int dwarf_parse_fde(void *entry, u32 entry_type, 795static int dwarf_parse_fde(void *entry, u32 entry_type,
784 void *start, unsigned long len, 796 void *start, unsigned long len,
785 unsigned char *end) 797 unsigned char *end, struct module *mod)
786{ 798{
787 struct dwarf_fde *fde; 799 struct dwarf_fde *fde;
788 struct dwarf_cie *cie; 800 struct dwarf_cie *cie;
@@ -831,6 +843,8 @@ static int dwarf_parse_fde(void *entry, u32 entry_type,
831 fde->instructions = p; 843 fde->instructions = p;
832 fde->end = end; 844 fde->end = end;
833 845
846 fde->mod = mod;
847
834 /* Add to list. */ 848 /* Add to list. */
835 spin_lock_irqsave(&dwarf_fde_lock, flags); 849 spin_lock_irqsave(&dwarf_fde_lock, flags);
836 list_add_tail(&fde->link, &dwarf_fde_list); 850 list_add_tail(&fde->link, &dwarf_fde_list);
@@ -854,10 +868,8 @@ static void dwarf_unwinder_dump(struct task_struct *task,
854 while (1) { 868 while (1) {
855 frame = dwarf_unwind_stack(return_addr, _frame); 869 frame = dwarf_unwind_stack(return_addr, _frame);
856 870
857 if (_frame) { 871 if (_frame)
858 dwarf_frame_free_regs(_frame); 872 dwarf_free_frame(_frame);
859 mempool_free(_frame, dwarf_frame_pool);
860 }
861 873
862 _frame = frame; 874 _frame = frame;
863 875
@@ -867,6 +879,9 @@ static void dwarf_unwinder_dump(struct task_struct *task,
867 return_addr = frame->return_addr; 879 return_addr = frame->return_addr;
868 ops->address(data, return_addr, 1); 880 ops->address(data, return_addr, 1);
869 } 881 }
882
883 if (frame)
884 dwarf_free_frame(frame);
870} 885}
871 886
872static struct unwinder dwarf_unwinder = { 887static struct unwinder dwarf_unwinder = {
@@ -896,48 +911,28 @@ static void dwarf_unwinder_cleanup(void)
896} 911}
897 912
898/** 913/**
899 * dwarf_unwinder_init - initialise the dwarf unwinder 914 * dwarf_parse_section - parse DWARF section
915 * @eh_frame_start: start address of the .eh_frame section
916 * @eh_frame_end: end address of the .eh_frame section
917 * @mod: the kernel module containing the .eh_frame section
900 * 918 *
901 * Build the data structures describing the .dwarf_frame section to 919 * Parse the information in a .eh_frame section.
902 * make it easier to lookup CIE and FDE entries. Because the
903 * .eh_frame section is packed as tightly as possible it is not
904 * easy to lookup the FDE for a given PC, so we build a list of FDE
905 * and CIE entries that make it easier.
906 */ 920 */
907static int __init dwarf_unwinder_init(void) 921static int dwarf_parse_section(char *eh_frame_start, char *eh_frame_end,
922 struct module *mod)
908{ 923{
909 u32 entry_type; 924 u32 entry_type;
910 void *p, *entry; 925 void *p, *entry;
911 int count, err = 0; 926 int count, err = 0;
912 unsigned long len; 927 unsigned long len = 0;
913 unsigned int c_entries, f_entries; 928 unsigned int c_entries, f_entries;
914 unsigned char *end; 929 unsigned char *end;
915 INIT_LIST_HEAD(&dwarf_cie_list);
916 INIT_LIST_HEAD(&dwarf_fde_list);
917 930
918 c_entries = 0; 931 c_entries = 0;
919 f_entries = 0; 932 f_entries = 0;
920 entry = &__start_eh_frame; 933 entry = eh_frame_start;
921
922 dwarf_frame_cachep = kmem_cache_create("dwarf_frames",
923 sizeof(struct dwarf_frame), 0,
924 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
925
926 dwarf_reg_cachep = kmem_cache_create("dwarf_regs",
927 sizeof(struct dwarf_reg), 0,
928 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
929 934
930 dwarf_frame_pool = mempool_create(DWARF_FRAME_MIN_REQ, 935 while ((char *)entry < eh_frame_end) {
931 mempool_alloc_slab,
932 mempool_free_slab,
933 dwarf_frame_cachep);
934
935 dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ,
936 mempool_alloc_slab,
937 mempool_free_slab,
938 dwarf_reg_cachep);
939
940 while ((char *)entry < __stop_eh_frame) {
941 p = entry; 936 p = entry;
942 937
943 count = dwarf_entry_len(p, &len); 938 count = dwarf_entry_len(p, &len);
@@ -949,6 +944,7 @@ static int __init dwarf_unwinder_init(void)
949 * entry and move to the next one because 'len' 944 * entry and move to the next one because 'len'
950 * tells us where our next entry is. 945 * tells us where our next entry is.
951 */ 946 */
947 err = -EINVAL;
952 goto out; 948 goto out;
953 } else 949 } else
954 p += count; 950 p += count;
@@ -960,13 +956,14 @@ static int __init dwarf_unwinder_init(void)
960 p += 4; 956 p += 4;
961 957
962 if (entry_type == DW_EH_FRAME_CIE) { 958 if (entry_type == DW_EH_FRAME_CIE) {
963 err = dwarf_parse_cie(entry, p, len, end); 959 err = dwarf_parse_cie(entry, p, len, end, mod);
964 if (err < 0) 960 if (err < 0)
965 goto out; 961 goto out;
966 else 962 else
967 c_entries++; 963 c_entries++;
968 } else { 964 } else {
969 err = dwarf_parse_fde(entry, entry_type, p, len, end); 965 err = dwarf_parse_fde(entry, entry_type, p, len,
966 end, mod);
970 if (err < 0) 967 if (err < 0)
971 goto out; 968 goto out;
972 else 969 else
@@ -979,6 +976,129 @@ static int __init dwarf_unwinder_init(void)
979 printk(KERN_INFO "DWARF unwinder initialised: read %u CIEs, %u FDEs\n", 976 printk(KERN_INFO "DWARF unwinder initialised: read %u CIEs, %u FDEs\n",
980 c_entries, f_entries); 977 c_entries, f_entries);
981 978
979 return 0;
980
981out:
982 return err;
983}
984
985#ifdef CONFIG_MODULES
986int module_dwarf_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
987 struct module *me)
988{
989 unsigned int i, err;
990 unsigned long start, end;
991 char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
992
993 start = end = 0;
994
995 for (i = 1; i < hdr->e_shnum; i++) {
996 /* Alloc bit cleared means "ignore it." */
997 if ((sechdrs[i].sh_flags & SHF_ALLOC)
998 && !strcmp(secstrings+sechdrs[i].sh_name, ".eh_frame")) {
999 start = sechdrs[i].sh_addr;
1000 end = start + sechdrs[i].sh_size;
1001 break;
1002 }
1003 }
1004
1005 /* Did we find the .eh_frame section? */
1006 if (i != hdr->e_shnum) {
1007 err = dwarf_parse_section((char *)start, (char *)end, me);
1008 if (err) {
1009 printk(KERN_WARNING "%s: failed to parse DWARF info\n",
1010 me->name);
1011 return err;
1012 }
1013 }
1014
1015 return 0;
1016}
1017
1018/**
1019 * module_dwarf_cleanup - remove FDE/CIEs associated with @mod
1020 * @mod: the module that is being unloaded
1021 *
1022 * Remove any FDEs and CIEs from the global lists that came from
1023 * @mod's .eh_frame section because @mod is being unloaded.
1024 */
1025void module_dwarf_cleanup(struct module *mod)
1026{
1027 struct dwarf_fde *fde;
1028 struct dwarf_cie *cie;
1029 unsigned long flags;
1030
1031 spin_lock_irqsave(&dwarf_cie_lock, flags);
1032
1033again_cie:
1034 list_for_each_entry(cie, &dwarf_cie_list, link) {
1035 if (cie->mod == mod)
1036 break;
1037 }
1038
1039 if (&cie->link != &dwarf_cie_list) {
1040 list_del(&cie->link);
1041 kfree(cie);
1042 goto again_cie;
1043 }
1044
1045 spin_unlock_irqrestore(&dwarf_cie_lock, flags);
1046
1047 spin_lock_irqsave(&dwarf_fde_lock, flags);
1048
1049again_fde:
1050 list_for_each_entry(fde, &dwarf_fde_list, link) {
1051 if (fde->mod == mod)
1052 break;
1053 }
1054
1055 if (&fde->link != &dwarf_fde_list) {
1056 list_del(&fde->link);
1057 kfree(fde);
1058 goto again_fde;
1059 }
1060
1061 spin_unlock_irqrestore(&dwarf_fde_lock, flags);
1062}
1063#endif /* CONFIG_MODULES */
1064
1065/**
1066 * dwarf_unwinder_init - initialise the dwarf unwinder
1067 *
1068 * Build the data structures describing the .dwarf_frame section to
1069 * make it easier to lookup CIE and FDE entries. Because the
1070 * .eh_frame section is packed as tightly as possible it is not
1071 * easy to lookup the FDE for a given PC, so we build a list of FDE
1072 * and CIE entries that make it easier.
1073 */
1074static int __init dwarf_unwinder_init(void)
1075{
1076 int err;
1077 INIT_LIST_HEAD(&dwarf_cie_list);
1078 INIT_LIST_HEAD(&dwarf_fde_list);
1079
1080 dwarf_frame_cachep = kmem_cache_create("dwarf_frames",
1081 sizeof(struct dwarf_frame), 0,
1082 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
1083
1084 dwarf_reg_cachep = kmem_cache_create("dwarf_regs",
1085 sizeof(struct dwarf_reg), 0,
1086 SLAB_PANIC | SLAB_HWCACHE_ALIGN | SLAB_NOTRACK, NULL);
1087
1088 dwarf_frame_pool = mempool_create(DWARF_FRAME_MIN_REQ,
1089 mempool_alloc_slab,
1090 mempool_free_slab,
1091 dwarf_frame_cachep);
1092
1093 dwarf_reg_pool = mempool_create(DWARF_REG_MIN_REQ,
1094 mempool_alloc_slab,
1095 mempool_free_slab,
1096 dwarf_reg_cachep);
1097
1098 err = dwarf_parse_section(__start_eh_frame, __stop_eh_frame, NULL);
1099 if (err)
1100 goto out;
1101
982 err = unwinder_register(&dwarf_unwinder); 1102 err = unwinder_register(&dwarf_unwinder);
983 if (err) 1103 if (err)
984 goto out; 1104 goto out;
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c
index 81a46145ffa5..f8bb50c6e050 100644
--- a/arch/sh/kernel/early_printk.c
+++ b/arch/sh/kernel/early_printk.c
@@ -15,7 +15,6 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
17 17
18#ifdef CONFIG_SH_STANDARD_BIOS
19#include <asm/sh_bios.h> 18#include <asm/sh_bios.h>
20 19
21/* 20/*
@@ -57,149 +56,8 @@ static struct console bios_console = {
57 .flags = CON_PRINTBUFFER, 56 .flags = CON_PRINTBUFFER,
58 .index = -1, 57 .index = -1,
59}; 58};
60#endif
61 59
62#ifdef CONFIG_EARLY_SCIF_CONSOLE 60static struct console *early_console;
63#include <linux/serial_core.h>
64#include "../../../drivers/serial/sh-sci.h"
65
66#if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
67 defined(CONFIG_CPU_SUBTYPE_SH7721)
68#define EPK_SCSMR_VALUE 0x000
69#define EPK_SCBRR_VALUE 0x00C
70#define EPK_FIFO_SIZE 64
71#define EPK_FIFO_BITS (0x7f00 >> 8)
72#else
73#define EPK_FIFO_SIZE 16
74#define EPK_FIFO_BITS (0x1f00 >> 8)
75#endif
76
77static struct uart_port scif_port = {
78 .type = PORT_SCIF,
79 .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT,
80 .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT,
81};
82
83static void scif_sercon_putc(int c)
84{
85 while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE))
86 ;
87
88 sci_in(&scif_port, SCxSR);
89 sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40));
90 sci_out(&scif_port, SCxTDR, c);
91
92 while ((sci_in(&scif_port, SCxSR) & 0x40) == 0)
93 ;
94
95 if (c == '\n')
96 scif_sercon_putc('\r');
97}
98
99static void scif_sercon_write(struct console *con, const char *s,
100 unsigned count)
101{
102 while (count-- > 0)
103 scif_sercon_putc(*s++);
104}
105
106static int __init scif_sercon_setup(struct console *con, char *options)
107{
108 con->cflag = CREAD | HUPCL | CLOCAL | B115200 | CS8;
109
110 return 0;
111}
112
113static struct console scif_console = {
114 .name = "sercon",
115 .write = scif_sercon_write,
116 .setup = scif_sercon_setup,
117 .flags = CON_PRINTBUFFER,
118 .index = -1,
119};
120
121#if !defined(CONFIG_SH_STANDARD_BIOS)
122#if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
123 defined(CONFIG_CPU_SUBTYPE_SH7721)
124static void scif_sercon_init(char *s)
125{
126 sci_out(&scif_port, SCSCR, 0x0000); /* clear TE and RE */
127 sci_out(&scif_port, SCFCR, 0x4006); /* reset */
128 sci_out(&scif_port, SCSCR, 0x0000); /* select internal clock */
129 sci_out(&scif_port, SCSMR, EPK_SCSMR_VALUE);
130 sci_out(&scif_port, SCBRR, EPK_SCBRR_VALUE);
131
132 mdelay(1); /* wait 1-bit time */
133
134 sci_out(&scif_port, SCFCR, 0x0030); /* TTRG=b'11 */
135 sci_out(&scif_port, SCSCR, 0x0030); /* TE, RE */
136}
137#elif defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
138#define DEFAULT_BAUD 115200
139/*
140 * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4
141 * devices that aren't using sh-ipl+g.
142 */
143static void scif_sercon_init(char *s)
144{
145 struct uart_port *port = &scif_port;
146 unsigned baud = DEFAULT_BAUD;
147 unsigned int status;
148 char *e;
149
150 if (*s == ',')
151 ++s;
152
153 if (*s) {
154 /* ignore ioport/device name */
155 s += strcspn(s, ",");
156 if (*s == ',')
157 s++;
158 }
159
160 if (*s) {
161 baud = simple_strtoul(s, &e, 0);
162 if (baud == 0 || s == e)
163 baud = DEFAULT_BAUD;
164 }
165
166 do {
167 status = sci_in(port, SCxSR);
168 } while (!(status & SCxSR_TEND(port)));
169
170 sci_out(port, SCSCR, 0); /* TE=0, RE=0 */
171 sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST);
172 sci_out(port, SCSMR, 0);
173
174 /* Set baud rate */
175 sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) /
176 (32 * baud) - 1);
177 udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */
178
179 sci_out(port, SCSPTR, 0);
180 sci_out(port, SCxSR, 0x60);
181 sci_out(port, SCLSR, 0);
182
183 sci_out(port, SCFCR, 0);
184 sci_out(port, SCSCR, 0x30); /* TE=1, RE=1 */
185}
186#endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */
187#endif /* !defined(CONFIG_SH_STANDARD_BIOS) */
188#endif /* CONFIG_EARLY_SCIF_CONSOLE */
189
190/*
191 * Setup a default console, if more than one is compiled in, rely on the
192 * earlyprintk= parsing to give priority.
193 */
194static struct console *early_console =
195#ifdef CONFIG_SH_STANDARD_BIOS
196 &bios_console
197#elif defined(CONFIG_EARLY_SCIF_CONSOLE)
198 &scif_console
199#else
200 NULL
201#endif
202 ;
203 61
204static int __init setup_early_printk(char *buf) 62static int __init setup_early_printk(char *buf)
205{ 63{
@@ -211,21 +69,8 @@ static int __init setup_early_printk(char *buf)
211 if (strstr(buf, "keep")) 69 if (strstr(buf, "keep"))
212 keep_early = 1; 70 keep_early = 1;
213 71
214#ifdef CONFIG_SH_STANDARD_BIOS
215 if (!strncmp(buf, "bios", 4)) 72 if (!strncmp(buf, "bios", 4))
216 early_console = &bios_console; 73 early_console = &bios_console;
217#endif
218#if defined(CONFIG_EARLY_SCIF_CONSOLE)
219 if (!strncmp(buf, "serial", 6)) {
220 early_console = &scif_console;
221
222#if !defined(CONFIG_SH_STANDARD_BIOS)
223#if defined(CONFIG_CPU_SH4) || defined(CONFIG_CPU_SH3)
224 scif_sercon_init(buf + 6);
225#endif
226#endif
227 }
228#endif
229 74
230 if (likely(early_console)) { 75 if (likely(early_console)) {
231 if (keep_early) 76 if (keep_early)
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index 3eb84931d2aa..f0abd58c3a69 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -133,7 +133,7 @@ work_pending:
133 ! r8: current_thread_info 133 ! r8: current_thread_info
134 ! t: result of "tst #_TIF_NEED_RESCHED, r0" 134 ! t: result of "tst #_TIF_NEED_RESCHED, r0"
135 bf/s work_resched 135 bf/s work_resched
136 tst #(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r0 136 tst #_TIF_SIGPENDING, r0
137work_notifysig: 137work_notifysig:
138 bt/s __restore_all 138 bt/s __restore_all
139 mov r15, r4 139 mov r15, r4
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 2c48e267256e..a48cdedc73b5 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -62,6 +62,150 @@ static unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
62 return ftrace_replaced_code; 62 return ftrace_replaced_code;
63} 63}
64 64
65/*
66 * Modifying code must take extra care. On an SMP machine, if
67 * the code being modified is also being executed on another CPU
68 * that CPU will have undefined results and possibly take a GPF.
69 * We use kstop_machine to stop other CPUS from exectuing code.
70 * But this does not stop NMIs from happening. We still need
71 * to protect against that. We separate out the modification of
72 * the code to take care of this.
73 *
74 * Two buffers are added: An IP buffer and a "code" buffer.
75 *
76 * 1) Put the instruction pointer into the IP buffer
77 * and the new code into the "code" buffer.
78 * 2) Wait for any running NMIs to finish and set a flag that says
79 * we are modifying code, it is done in an atomic operation.
80 * 3) Write the code
81 * 4) clear the flag.
82 * 5) Wait for any running NMIs to finish.
83 *
84 * If an NMI is executed, the first thing it does is to call
85 * "ftrace_nmi_enter". This will check if the flag is set to write
86 * and if it is, it will write what is in the IP and "code" buffers.
87 *
88 * The trick is, it does not matter if everyone is writing the same
89 * content to the code location. Also, if a CPU is executing code
90 * it is OK to write to that code location if the contents being written
91 * are the same as what exists.
92 */
93#define MOD_CODE_WRITE_FLAG (1 << 31) /* set when NMI should do the write */
94static atomic_t nmi_running = ATOMIC_INIT(0);
95static int mod_code_status; /* holds return value of text write */
96static void *mod_code_ip; /* holds the IP to write to */
97static void *mod_code_newcode; /* holds the text to write to the IP */
98
99static unsigned nmi_wait_count;
100static atomic_t nmi_update_count = ATOMIC_INIT(0);
101
102int ftrace_arch_read_dyn_info(char *buf, int size)
103{
104 int r;
105
106 r = snprintf(buf, size, "%u %u",
107 nmi_wait_count,
108 atomic_read(&nmi_update_count));
109 return r;
110}
111
112static void clear_mod_flag(void)
113{
114 int old = atomic_read(&nmi_running);
115
116 for (;;) {
117 int new = old & ~MOD_CODE_WRITE_FLAG;
118
119 if (old == new)
120 break;
121
122 old = atomic_cmpxchg(&nmi_running, old, new);
123 }
124}
125
126static void ftrace_mod_code(void)
127{
128 /*
129 * Yes, more than one CPU process can be writing to mod_code_status.
130 * (and the code itself)
131 * But if one were to fail, then they all should, and if one were
132 * to succeed, then they all should.
133 */
134 mod_code_status = probe_kernel_write(mod_code_ip, mod_code_newcode,
135 MCOUNT_INSN_SIZE);
136
137 /* if we fail, then kill any new writers */
138 if (mod_code_status)
139 clear_mod_flag();
140}
141
142void ftrace_nmi_enter(void)
143{
144 if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
145 smp_rmb();
146 ftrace_mod_code();
147 atomic_inc(&nmi_update_count);
148 }
149 /* Must have previous changes seen before executions */
150 smp_mb();
151}
152
153void ftrace_nmi_exit(void)
154{
155 /* Finish all executions before clearing nmi_running */
156 smp_mb();
157 atomic_dec(&nmi_running);
158}
159
160static void wait_for_nmi_and_set_mod_flag(void)
161{
162 if (!atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG))
163 return;
164
165 do {
166 cpu_relax();
167 } while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG));
168
169 nmi_wait_count++;
170}
171
172static void wait_for_nmi(void)
173{
174 if (!atomic_read(&nmi_running))
175 return;
176
177 do {
178 cpu_relax();
179 } while (atomic_read(&nmi_running));
180
181 nmi_wait_count++;
182}
183
184static int
185do_ftrace_mod_code(unsigned long ip, void *new_code)
186{
187 mod_code_ip = (void *)ip;
188 mod_code_newcode = new_code;
189
190 /* The buffers need to be visible before we let NMIs write them */
191 smp_mb();
192
193 wait_for_nmi_and_set_mod_flag();
194
195 /* Make sure all running NMIs have finished before we write the code */
196 smp_mb();
197
198 ftrace_mod_code();
199
200 /* Make sure the write happens before clearing the bit */
201 smp_mb();
202
203 clear_mod_flag();
204 wait_for_nmi();
205
206 return mod_code_status;
207}
208
65static int ftrace_modify_code(unsigned long ip, unsigned char *old_code, 209static int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
66 unsigned char *new_code) 210 unsigned char *new_code)
67{ 211{
@@ -86,7 +230,7 @@ static int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
86 return -EINVAL; 230 return -EINVAL;
87 231
88 /* replace the text with the new text */ 232 /* replace the text with the new text */
89 if (probe_kernel_write((void *)ip, new_code, MCOUNT_INSN_SIZE)) 233 if (do_ftrace_mod_code(ip, new_code))
90 return -EPERM; 234 return -EPERM;
91 235
92 flush_icache_range(ip, ip + MCOUNT_INSN_SIZE); 236 flush_icache_range(ip, ip + MCOUNT_INSN_SIZE);
@@ -257,82 +401,10 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
257#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 401#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
258 402
259#ifdef CONFIG_FTRACE_SYSCALLS 403#ifdef CONFIG_FTRACE_SYSCALLS
260
261extern unsigned long __start_syscalls_metadata[];
262extern unsigned long __stop_syscalls_metadata[];
263extern unsigned long *sys_call_table; 404extern unsigned long *sys_call_table;
264 405
265static struct syscall_metadata **syscalls_metadata; 406unsigned long __init arch_syscall_addr(int nr)
266
267static struct syscall_metadata *find_syscall_meta(unsigned long *syscall)
268{
269 struct syscall_metadata *start;
270 struct syscall_metadata *stop;
271 char str[KSYM_SYMBOL_LEN];
272
273
274 start = (struct syscall_metadata *)__start_syscalls_metadata;
275 stop = (struct syscall_metadata *)__stop_syscalls_metadata;
276 kallsyms_lookup((unsigned long) syscall, NULL, NULL, NULL, str);
277
278 for ( ; start < stop; start++) {
279 if (start->name && !strcmp(start->name, str))
280 return start;
281 }
282
283 return NULL;
284}
285
286struct syscall_metadata *syscall_nr_to_meta(int nr)
287{
288 if (!syscalls_metadata || nr >= FTRACE_SYSCALL_MAX || nr < 0)
289 return NULL;
290
291 return syscalls_metadata[nr];
292}
293
294int syscall_name_to_nr(char *name)
295{
296 int i;
297
298 if (!syscalls_metadata)
299 return -1;
300 for (i = 0; i < NR_syscalls; i++)
301 if (syscalls_metadata[i])
302 if (!strcmp(syscalls_metadata[i]->name, name))
303 return i;
304 return -1;
305}
306
307void set_syscall_enter_id(int num, int id)
308{
309 syscalls_metadata[num]->enter_id = id;
310}
311
312void set_syscall_exit_id(int num, int id)
313{ 407{
314 syscalls_metadata[num]->exit_id = id; 408 return (unsigned long)sys_call_table[nr];
315}
316
317static int __init arch_init_ftrace_syscalls(void)
318{
319 int i;
320 struct syscall_metadata *meta;
321 unsigned long **psys_syscall_table = &sys_call_table;
322
323 syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
324 FTRACE_SYSCALL_MAX, GFP_KERNEL);
325 if (!syscalls_metadata) {
326 WARN_ON(1);
327 return -ENOMEM;
328 }
329
330 for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
331 meta = find_syscall_meta(psys_syscall_table[i]);
332 syscalls_metadata[i] = meta;
333 }
334
335 return 0;
336} 409}
337arch_initcall(arch_init_ftrace_syscalls);
338#endif /* CONFIG_FTRACE_SYSCALLS */ 410#endif /* CONFIG_FTRACE_SYSCALLS */
diff --git a/arch/sh/kernel/gpio.c b/arch/sh/kernel/gpio.c
deleted file mode 100644
index d22e5af699f9..000000000000
--- a/arch/sh/kernel/gpio.c
+++ /dev/null
@@ -1,584 +0,0 @@
1/*
2 * Pinmuxed GPIO support for SuperH.
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/errno.h>
12#include <linux/kernel.h>
13#include <linux/list.h>
14#include <linux/module.h>
15#include <linux/clk.h>
16#include <linux/err.h>
17#include <linux/io.h>
18#include <linux/irq.h>
19#include <linux/bitops.h>
20#include <linux/gpio.h>
21
22static int enum_in_range(pinmux_enum_t enum_id, struct pinmux_range *r)
23{
24 if (enum_id < r->begin)
25 return 0;
26
27 if (enum_id > r->end)
28 return 0;
29
30 return 1;
31}
32
33static unsigned long gpio_read_raw_reg(unsigned long reg,
34 unsigned long reg_width)
35{
36 switch (reg_width) {
37 case 8:
38 return ctrl_inb(reg);
39 case 16:
40 return ctrl_inw(reg);
41 case 32:
42 return ctrl_inl(reg);
43 }
44
45 BUG();
46 return 0;
47}
48
49static void gpio_write_raw_reg(unsigned long reg,
50 unsigned long reg_width,
51 unsigned long data)
52{
53 switch (reg_width) {
54 case 8:
55 ctrl_outb(data, reg);
56 return;
57 case 16:
58 ctrl_outw(data, reg);
59 return;
60 case 32:
61 ctrl_outl(data, reg);
62 return;
63 }
64
65 BUG();
66}
67
68static void gpio_write_bit(struct pinmux_data_reg *dr,
69 unsigned long in_pos, unsigned long value)
70{
71 unsigned long pos;
72
73 pos = dr->reg_width - (in_pos + 1);
74
75#ifdef DEBUG
76 pr_info("write_bit addr = %lx, value = %ld, pos = %ld, "
77 "r_width = %ld\n",
78 dr->reg, !!value, pos, dr->reg_width);
79#endif
80
81 if (value)
82 set_bit(pos, &dr->reg_shadow);
83 else
84 clear_bit(pos, &dr->reg_shadow);
85
86 gpio_write_raw_reg(dr->reg, dr->reg_width, dr->reg_shadow);
87}
88
89static int gpio_read_reg(unsigned long reg, unsigned long reg_width,
90 unsigned long field_width, unsigned long in_pos)
91{
92 unsigned long data, mask, pos;
93
94 data = 0;
95 mask = (1 << field_width) - 1;
96 pos = reg_width - ((in_pos + 1) * field_width);
97
98#ifdef DEBUG
99 pr_info("read_reg: addr = %lx, pos = %ld, "
100 "r_width = %ld, f_width = %ld\n",
101 reg, pos, reg_width, field_width);
102#endif
103
104 data = gpio_read_raw_reg(reg, reg_width);
105 return (data >> pos) & mask;
106}
107
108static void gpio_write_reg(unsigned long reg, unsigned long reg_width,
109 unsigned long field_width, unsigned long in_pos,
110 unsigned long value)
111{
112 unsigned long mask, pos;
113
114 mask = (1 << field_width) - 1;
115 pos = reg_width - ((in_pos + 1) * field_width);
116
117#ifdef DEBUG
118 pr_info("write_reg addr = %lx, value = %ld, pos = %ld, "
119 "r_width = %ld, f_width = %ld\n",
120 reg, value, pos, reg_width, field_width);
121#endif
122
123 mask = ~(mask << pos);
124 value = value << pos;
125
126 switch (reg_width) {
127 case 8:
128 ctrl_outb((ctrl_inb(reg) & mask) | value, reg);
129 break;
130 case 16:
131 ctrl_outw((ctrl_inw(reg) & mask) | value, reg);
132 break;
133 case 32:
134 ctrl_outl((ctrl_inl(reg) & mask) | value, reg);
135 break;
136 }
137}
138
139static int setup_data_reg(struct pinmux_info *gpioc, unsigned gpio)
140{
141 struct pinmux_gpio *gpiop = &gpioc->gpios[gpio];
142 struct pinmux_data_reg *data_reg;
143 int k, n;
144
145 if (!enum_in_range(gpiop->enum_id, &gpioc->data))
146 return -1;
147
148 k = 0;
149 while (1) {
150 data_reg = gpioc->data_regs + k;
151
152 if (!data_reg->reg_width)
153 break;
154
155 for (n = 0; n < data_reg->reg_width; n++) {
156 if (data_reg->enum_ids[n] == gpiop->enum_id) {
157 gpiop->flags &= ~PINMUX_FLAG_DREG;
158 gpiop->flags |= (k << PINMUX_FLAG_DREG_SHIFT);
159 gpiop->flags &= ~PINMUX_FLAG_DBIT;
160 gpiop->flags |= (n << PINMUX_FLAG_DBIT_SHIFT);
161 return 0;
162 }
163 }
164 k++;
165 }
166
167 BUG();
168
169 return -1;
170}
171
172static void setup_data_regs(struct pinmux_info *gpioc)
173{
174 struct pinmux_data_reg *drp;
175 int k;
176
177 for (k = gpioc->first_gpio; k <= gpioc->last_gpio; k++)
178 setup_data_reg(gpioc, k);
179
180 k = 0;
181 while (1) {
182 drp = gpioc->data_regs + k;
183
184 if (!drp->reg_width)
185 break;
186
187 drp->reg_shadow = gpio_read_raw_reg(drp->reg, drp->reg_width);
188 k++;
189 }
190}
191
192static int get_data_reg(struct pinmux_info *gpioc, unsigned gpio,
193 struct pinmux_data_reg **drp, int *bitp)
194{
195 struct pinmux_gpio *gpiop = &gpioc->gpios[gpio];
196 int k, n;
197
198 if (!enum_in_range(gpiop->enum_id, &gpioc->data))
199 return -1;
200
201 k = (gpiop->flags & PINMUX_FLAG_DREG) >> PINMUX_FLAG_DREG_SHIFT;
202 n = (gpiop->flags & PINMUX_FLAG_DBIT) >> PINMUX_FLAG_DBIT_SHIFT;
203 *drp = gpioc->data_regs + k;
204 *bitp = n;
205 return 0;
206}
207
208static int get_config_reg(struct pinmux_info *gpioc, pinmux_enum_t enum_id,
209 struct pinmux_cfg_reg **crp, int *indexp,
210 unsigned long **cntp)
211{
212 struct pinmux_cfg_reg *config_reg;
213 unsigned long r_width, f_width;
214 int k, n;
215
216 k = 0;
217 while (1) {
218 config_reg = gpioc->cfg_regs + k;
219
220 r_width = config_reg->reg_width;
221 f_width = config_reg->field_width;
222
223 if (!r_width)
224 break;
225 for (n = 0; n < (r_width / f_width) * 1 << f_width; n++) {
226 if (config_reg->enum_ids[n] == enum_id) {
227 *crp = config_reg;
228 *indexp = n;
229 *cntp = &config_reg->cnt[n / (1 << f_width)];
230 return 0;
231 }
232 }
233 k++;
234 }
235
236 return -1;
237}
238
239static int get_gpio_enum_id(struct pinmux_info *gpioc, unsigned gpio,
240 int pos, pinmux_enum_t *enum_idp)
241{
242 pinmux_enum_t enum_id = gpioc->gpios[gpio].enum_id;
243 pinmux_enum_t *data = gpioc->gpio_data;
244 int k;
245
246 if (!enum_in_range(enum_id, &gpioc->data)) {
247 if (!enum_in_range(enum_id, &gpioc->mark)) {
248 pr_err("non data/mark enum_id for gpio %d\n", gpio);
249 return -1;
250 }
251 }
252
253 if (pos) {
254 *enum_idp = data[pos + 1];
255 return pos + 1;
256 }
257
258 for (k = 0; k < gpioc->gpio_data_size; k++) {
259 if (data[k] == enum_id) {
260 *enum_idp = data[k + 1];
261 return k + 1;
262 }
263 }
264
265 pr_err("cannot locate data/mark enum_id for gpio %d\n", gpio);
266 return -1;
267}
268
269static void write_config_reg(struct pinmux_info *gpioc,
270 struct pinmux_cfg_reg *crp,
271 int index)
272{
273 unsigned long ncomb, pos, value;
274
275 ncomb = 1 << crp->field_width;
276 pos = index / ncomb;
277 value = index % ncomb;
278
279 gpio_write_reg(crp->reg, crp->reg_width, crp->field_width, pos, value);
280}
281
282static int check_config_reg(struct pinmux_info *gpioc,
283 struct pinmux_cfg_reg *crp,
284 int index)
285{
286 unsigned long ncomb, pos, value;
287
288 ncomb = 1 << crp->field_width;
289 pos = index / ncomb;
290 value = index % ncomb;
291
292 if (gpio_read_reg(crp->reg, crp->reg_width,
293 crp->field_width, pos) == value)
294 return 0;
295
296 return -1;
297}
298
299enum { GPIO_CFG_DRYRUN, GPIO_CFG_REQ, GPIO_CFG_FREE };
300
301static int pinmux_config_gpio(struct pinmux_info *gpioc, unsigned gpio,
302 int pinmux_type, int cfg_mode)
303{
304 struct pinmux_cfg_reg *cr = NULL;
305 pinmux_enum_t enum_id;
306 struct pinmux_range *range;
307 int in_range, pos, index;
308 unsigned long *cntp;
309
310 switch (pinmux_type) {
311
312 case PINMUX_TYPE_FUNCTION:
313 range = NULL;
314 break;
315
316 case PINMUX_TYPE_OUTPUT:
317 range = &gpioc->output;
318 break;
319
320 case PINMUX_TYPE_INPUT:
321 range = &gpioc->input;
322 break;
323
324 case PINMUX_TYPE_INPUT_PULLUP:
325 range = &gpioc->input_pu;
326 break;
327
328 case PINMUX_TYPE_INPUT_PULLDOWN:
329 range = &gpioc->input_pd;
330 break;
331
332 default:
333 goto out_err;
334 }
335
336 pos = 0;
337 enum_id = 0;
338 index = 0;
339 while (1) {
340 pos = get_gpio_enum_id(gpioc, gpio, pos, &enum_id);
341 if (pos <= 0)
342 goto out_err;
343
344 if (!enum_id)
345 break;
346
347 in_range = enum_in_range(enum_id, &gpioc->function);
348 if (!in_range && range) {
349 in_range = enum_in_range(enum_id, range);
350
351 if (in_range && enum_id == range->force)
352 continue;
353 }
354
355 if (!in_range)
356 continue;
357
358 if (get_config_reg(gpioc, enum_id, &cr, &index, &cntp) != 0)
359 goto out_err;
360
361 switch (cfg_mode) {
362 case GPIO_CFG_DRYRUN:
363 if (!*cntp || !check_config_reg(gpioc, cr, index))
364 continue;
365 break;
366
367 case GPIO_CFG_REQ:
368 write_config_reg(gpioc, cr, index);
369 *cntp = *cntp + 1;
370 break;
371
372 case GPIO_CFG_FREE:
373 *cntp = *cntp - 1;
374 break;
375 }
376 }
377
378 return 0;
379 out_err:
380 return -1;
381}
382
383static DEFINE_SPINLOCK(gpio_lock);
384
385static struct pinmux_info *chip_to_pinmux(struct gpio_chip *chip)
386{
387 return container_of(chip, struct pinmux_info, chip);
388}
389
390static int sh_gpio_request(struct gpio_chip *chip, unsigned offset)
391{
392 struct pinmux_info *gpioc = chip_to_pinmux(chip);
393 struct pinmux_data_reg *dummy;
394 unsigned long flags;
395 int i, ret, pinmux_type;
396
397 ret = -EINVAL;
398
399 if (!gpioc)
400 goto err_out;
401
402 spin_lock_irqsave(&gpio_lock, flags);
403
404 if ((gpioc->gpios[offset].flags & PINMUX_FLAG_TYPE) != PINMUX_TYPE_NONE)
405 goto err_unlock;
406
407 /* setup pin function here if no data is associated with pin */
408
409 if (get_data_reg(gpioc, offset, &dummy, &i) != 0)
410 pinmux_type = PINMUX_TYPE_FUNCTION;
411 else
412 pinmux_type = PINMUX_TYPE_GPIO;
413
414 if (pinmux_type == PINMUX_TYPE_FUNCTION) {
415 if (pinmux_config_gpio(gpioc, offset,
416 pinmux_type,
417 GPIO_CFG_DRYRUN) != 0)
418 goto err_unlock;
419
420 if (pinmux_config_gpio(gpioc, offset,
421 pinmux_type,
422 GPIO_CFG_REQ) != 0)
423 BUG();
424 }
425
426 gpioc->gpios[offset].flags &= ~PINMUX_FLAG_TYPE;
427 gpioc->gpios[offset].flags |= pinmux_type;
428
429 ret = 0;
430 err_unlock:
431 spin_unlock_irqrestore(&gpio_lock, flags);
432 err_out:
433 return ret;
434}
435
436static void sh_gpio_free(struct gpio_chip *chip, unsigned offset)
437{
438 struct pinmux_info *gpioc = chip_to_pinmux(chip);
439 unsigned long flags;
440 int pinmux_type;
441
442 if (!gpioc)
443 return;
444
445 spin_lock_irqsave(&gpio_lock, flags);
446
447 pinmux_type = gpioc->gpios[offset].flags & PINMUX_FLAG_TYPE;
448 pinmux_config_gpio(gpioc, offset, pinmux_type, GPIO_CFG_FREE);
449 gpioc->gpios[offset].flags &= ~PINMUX_FLAG_TYPE;
450 gpioc->gpios[offset].flags |= PINMUX_TYPE_NONE;
451
452 spin_unlock_irqrestore(&gpio_lock, flags);
453}
454
455static int pinmux_direction(struct pinmux_info *gpioc,
456 unsigned gpio, int new_pinmux_type)
457{
458 int pinmux_type;
459 int ret = -EINVAL;
460
461 if (!gpioc)
462 goto err_out;
463
464 pinmux_type = gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE;
465
466 switch (pinmux_type) {
467 case PINMUX_TYPE_GPIO:
468 break;
469 case PINMUX_TYPE_OUTPUT:
470 case PINMUX_TYPE_INPUT:
471 case PINMUX_TYPE_INPUT_PULLUP:
472 case PINMUX_TYPE_INPUT_PULLDOWN:
473 pinmux_config_gpio(gpioc, gpio, pinmux_type, GPIO_CFG_FREE);
474 break;
475 default:
476 goto err_out;
477 }
478
479 if (pinmux_config_gpio(gpioc, gpio,
480 new_pinmux_type,
481 GPIO_CFG_DRYRUN) != 0)
482 goto err_out;
483
484 if (pinmux_config_gpio(gpioc, gpio,
485 new_pinmux_type,
486 GPIO_CFG_REQ) != 0)
487 BUG();
488
489 gpioc->gpios[gpio].flags &= ~PINMUX_FLAG_TYPE;
490 gpioc->gpios[gpio].flags |= new_pinmux_type;
491
492 ret = 0;
493 err_out:
494 return ret;
495}
496
497static int sh_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
498{
499 struct pinmux_info *gpioc = chip_to_pinmux(chip);
500 unsigned long flags;
501 int ret;
502
503 spin_lock_irqsave(&gpio_lock, flags);
504 ret = pinmux_direction(gpioc, offset, PINMUX_TYPE_INPUT);
505 spin_unlock_irqrestore(&gpio_lock, flags);
506
507 return ret;
508}
509
510static void sh_gpio_set_value(struct pinmux_info *gpioc,
511 unsigned gpio, int value)
512{
513 struct pinmux_data_reg *dr = NULL;
514 int bit = 0;
515
516 if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0)
517 BUG();
518 else
519 gpio_write_bit(dr, bit, value);
520}
521
522static int sh_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
523 int value)
524{
525 struct pinmux_info *gpioc = chip_to_pinmux(chip);
526 unsigned long flags;
527 int ret;
528
529 sh_gpio_set_value(gpioc, offset, value);
530 spin_lock_irqsave(&gpio_lock, flags);
531 ret = pinmux_direction(gpioc, offset, PINMUX_TYPE_OUTPUT);
532 spin_unlock_irqrestore(&gpio_lock, flags);
533
534 return ret;
535}
536
537static int sh_gpio_get_value(struct pinmux_info *gpioc, unsigned gpio)
538{
539 struct pinmux_data_reg *dr = NULL;
540 int bit = 0;
541
542 if (!gpioc || get_data_reg(gpioc, gpio, &dr, &bit) != 0) {
543 BUG();
544 return 0;
545 }
546
547 return gpio_read_reg(dr->reg, dr->reg_width, 1, bit);
548}
549
550static int sh_gpio_get(struct gpio_chip *chip, unsigned offset)
551{
552 return sh_gpio_get_value(chip_to_pinmux(chip), offset);
553}
554
555static void sh_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
556{
557 sh_gpio_set_value(chip_to_pinmux(chip), offset, value);
558}
559
560int register_pinmux(struct pinmux_info *pip)
561{
562 struct gpio_chip *chip = &pip->chip;
563
564 pr_info("sh pinmux: %s handling gpio %d -> %d\n",
565 pip->name, pip->first_gpio, pip->last_gpio);
566
567 setup_data_regs(pip);
568
569 chip->request = sh_gpio_request;
570 chip->free = sh_gpio_free;
571 chip->direction_input = sh_gpio_direction_input;
572 chip->get = sh_gpio_get;
573 chip->direction_output = sh_gpio_direction_output;
574 chip->set = sh_gpio_set;
575
576 WARN_ON(pip->first_gpio != 0); /* needs testing */
577
578 chip->label = pip->name;
579 chip->owner = THIS_MODULE;
580 chip->base = pip->first_gpio;
581 chip->ngpio = (pip->last_gpio - pip->first_gpio) + 1;
582
583 return gpiochip_add(chip);
584}
diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
index a78be74b8d3e..1151ecdffa71 100644
--- a/arch/sh/kernel/head_32.S
+++ b/arch/sh/kernel/head_32.S
@@ -33,7 +33,7 @@ ENTRY(empty_zero_page)
33 .long 1 /* LOADER_TYPE */ 33 .long 1 /* LOADER_TYPE */
34 .long 0x00000000 /* INITRD_START */ 34 .long 0x00000000 /* INITRD_START */
35 .long 0x00000000 /* INITRD_SIZE */ 35 .long 0x00000000 /* INITRD_SIZE */
36#ifdef CONFIG_32BIT 36#if defined(CONFIG_32BIT) && defined(CONFIG_PMB_FIXED)
37 .long 0x53453f00 + 32 /* "SE?" = 32 bit */ 37 .long 0x53453f00 + 32 /* "SE?" = 32 bit */
38#else 38#else
39 .long 0x53453f00 + 29 /* "SE?" = 29 bit */ 39 .long 0x53453f00 + 29 /* "SE?" = 29 bit */
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 27ff2dc093c7..aaff0037fcd7 100644
--- a/arch/sh/kernel/idle.c
+++ b/arch/sh/kernel/idle.c
@@ -21,7 +21,7 @@
21#include <asm/atomic.h> 21#include <asm/atomic.h>
22 22
23static int hlt_counter; 23static int hlt_counter;
24void (*pm_idle)(void); 24void (*pm_idle)(void) = NULL;
25void (*pm_power_off)(void); 25void (*pm_power_off)(void);
26EXPORT_SYMBOL(pm_power_off); 26EXPORT_SYMBOL(pm_power_off);
27 27
@@ -39,48 +39,92 @@ static int __init hlt_setup(char *__unused)
39} 39}
40__setup("hlt", hlt_setup); 40__setup("hlt", hlt_setup);
41 41
42static inline int hlt_works(void)
43{
44 return !hlt_counter;
45}
46
47/*
48 * On SMP it's slightly faster (but much more power-consuming!)
49 * to poll the ->work.need_resched flag instead of waiting for the
50 * cross-CPU IPI to arrive. Use this option with caution.
51 */
52static void poll_idle(void)
53{
54 local_irq_enable();
55 while (!need_resched())
56 cpu_relax();
57}
58
42void default_idle(void) 59void default_idle(void)
43{ 60{
44 if (!hlt_counter) { 61 if (hlt_works()) {
45 clear_thread_flag(TIF_POLLING_NRFLAG); 62 clear_thread_flag(TIF_POLLING_NRFLAG);
46 smp_mb__after_clear_bit(); 63 smp_mb__after_clear_bit();
47 set_bl_bit();
48 stop_critical_timings();
49 64
50 while (!need_resched()) 65 if (!need_resched()) {
66 local_irq_enable();
51 cpu_sleep(); 67 cpu_sleep();
68 } else
69 local_irq_enable();
52 70
53 start_critical_timings();
54 clear_bl_bit();
55 set_thread_flag(TIF_POLLING_NRFLAG); 71 set_thread_flag(TIF_POLLING_NRFLAG);
56 } else 72 } else
57 while (!need_resched()) 73 poll_idle();
58 cpu_relax();
59} 74}
60 75
76/*
77 * The idle thread. There's no useful work to be done, so just try to conserve
78 * power and have a low exit latency (ie sit in a loop waiting for somebody to
79 * say that they'd like to reschedule)
80 */
61void cpu_idle(void) 81void cpu_idle(void)
62{ 82{
83 unsigned int cpu = smp_processor_id();
84
63 set_thread_flag(TIF_POLLING_NRFLAG); 85 set_thread_flag(TIF_POLLING_NRFLAG);
64 86
65 /* endless idle loop with no priority at all */ 87 /* endless idle loop with no priority at all */
66 while (1) { 88 while (1) {
67 void (*idle)(void) = pm_idle; 89 tick_nohz_stop_sched_tick(1);
68 90
69 if (!idle) 91 while (!need_resched() && cpu_online(cpu)) {
70 idle = default_idle; 92 check_pgt_cache();
93 rmb();
71 94
72 tick_nohz_stop_sched_tick(1); 95 local_irq_disable();
73 while (!need_resched()) 96 /* Don't trace irqs off for idle */
74 idle(); 97 stop_critical_timings();
75 tick_nohz_restart_sched_tick(); 98 pm_idle();
99 /*
100 * Sanity check to ensure that pm_idle() returns
101 * with IRQs enabled
102 */
103 WARN_ON(irqs_disabled());
104 start_critical_timings();
105 }
76 106
107 tick_nohz_restart_sched_tick();
77 preempt_enable_no_resched(); 108 preempt_enable_no_resched();
78 schedule(); 109 schedule();
79 preempt_disable(); 110 preempt_disable();
80 check_pgt_cache();
81 } 111 }
82} 112}
83 113
114void __cpuinit select_idle_routine(void)
115{
116 /*
117 * If a platform has set its own idle routine, leave it alone.
118 */
119 if (pm_idle)
120 return;
121
122 if (hlt_works())
123 pm_idle = default_idle;
124 else
125 pm_idle = poll_idle;
126}
127
84static void do_nothing(void *unused) 128static void do_nothing(void *unused)
85{ 129{
86} 130}
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c
index b8fa6524760a..e1e1dbd19557 100644
--- a/arch/sh/kernel/io_generic.c
+++ b/arch/sh/kernel/io_generic.c
@@ -24,7 +24,7 @@
24#define dummy_read() 24#define dummy_read()
25#endif 25#endif
26 26
27unsigned long generic_io_base; 27unsigned long generic_io_base = 0;
28 28
29u8 generic_inb(unsigned long port) 29u8 generic_inb(unsigned long port)
30{ 30{
@@ -147,8 +147,10 @@ void generic_outsl(unsigned long port, const void *src, unsigned long count)
147 147
148void __iomem *generic_ioport_map(unsigned long addr, unsigned int size) 148void __iomem *generic_ioport_map(unsigned long addr, unsigned int size)
149{ 149{
150#ifdef P1SEG
150 if (PXSEG(addr) >= P1SEG) 151 if (PXSEG(addr) >= P1SEG)
151 return (void __iomem *)addr; 152 return (void __iomem *)addr;
153#endif
152 154
153 return (void __iomem *)(addr + generic_io_base); 155 return (void __iomem *)(addr + generic_io_base);
154} 156}
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index eac7da772fc2..d2d41d046657 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -37,7 +37,15 @@ void ack_bad_irq(unsigned int irq)
37 */ 37 */
38static int show_other_interrupts(struct seq_file *p, int prec) 38static int show_other_interrupts(struct seq_file *p, int prec)
39{ 39{
40 int j;
41
42 seq_printf(p, "%*s: ", prec, "NMI");
43 for_each_online_cpu(j)
44 seq_printf(p, "%10u ", irq_stat[j].__nmi_count);
45 seq_printf(p, " Non-maskable interrupts\n");
46
40 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); 47 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
48
41 return 0; 49 return 0;
42} 50}
43 51
@@ -68,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v)
68 if (!desc) 76 if (!desc)
69 return 0; 77 return 0;
70 78
71 spin_lock_irqsave(&desc->lock, flags); 79 raw_spin_lock_irqsave(&desc->lock, flags);
72 for_each_online_cpu(j) 80 for_each_online_cpu(j)
73 any_count |= kstat_irqs_cpu(i, j); 81 any_count |= kstat_irqs_cpu(i, j);
74 action = desc->action; 82 action = desc->action;
@@ -89,7 +97,7 @@ int show_interrupts(struct seq_file *p, void *v)
89 97
90 seq_putc(p, '\n'); 98 seq_putc(p, '\n');
91out: 99out:
92 spin_unlock_irqrestore(&desc->lock, flags); 100 raw_spin_unlock_irqrestore(&desc->lock, flags);
93 return 0; 101 return 0;
94} 102}
95#endif 103#endif
@@ -255,6 +263,12 @@ void __init init_IRQ(void)
255{ 263{
256 plat_irq_setup(); 264 plat_irq_setup();
257 265
266 /*
267 * Pin any of the legacy IRQ vectors that haven't already been
268 * grabbed by the platform
269 */
270 reserve_irq_legacy();
271
258 /* Perform the machine specific initialisation */ 272 /* Perform the machine specific initialisation */
259 if (sh_mv.mv_init_irq) 273 if (sh_mv.mv_init_irq)
260 sh_mv.mv_init_irq(); 274 sh_mv.mv_init_irq();
diff --git a/arch/sh/kernel/irq_32.c b/arch/sh/kernel/irq_32.c
new file mode 100644
index 000000000000..e33ab15831f9
--- /dev/null
+++ b/arch/sh/kernel/irq_32.c
@@ -0,0 +1,57 @@
1/*
2 * SHcompact irqflags support
3 *
4 * Copyright (C) 2006 - 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/irqflags.h>
11#include <linux/module.h>
12
13void notrace raw_local_irq_restore(unsigned long flags)
14{
15 unsigned long __dummy0, __dummy1;
16
17 if (flags == RAW_IRQ_DISABLED) {
18 __asm__ __volatile__ (
19 "stc sr, %0\n\t"
20 "or #0xf0, %0\n\t"
21 "ldc %0, sr\n\t"
22 : "=&z" (__dummy0)
23 : /* no inputs */
24 : "memory"
25 );
26 } else {
27 __asm__ __volatile__ (
28 "stc sr, %0\n\t"
29 "and %1, %0\n\t"
30#ifdef CONFIG_CPU_HAS_SR_RB
31 "stc r6_bank, %1\n\t"
32 "or %1, %0\n\t"
33#endif
34 "ldc %0, sr\n\t"
35 : "=&r" (__dummy0), "=r" (__dummy1)
36 : "1" (~RAW_IRQ_DISABLED)
37 : "memory"
38 );
39 }
40}
41EXPORT_SYMBOL(raw_local_irq_restore);
42
43unsigned long notrace __raw_local_save_flags(void)
44{
45 unsigned long flags;
46
47 __asm__ __volatile__ (
48 "stc sr, %0\n\t"
49 "and #0xf0, %0\n\t"
50 : "=&z" (flags)
51 : /* no inputs */
52 : "memory"
53 );
54
55 return flags;
56}
57EXPORT_SYMBOL(__raw_local_save_flags);
diff --git a/arch/sh/kernel/irq_64.c b/arch/sh/kernel/irq_64.c
new file mode 100644
index 000000000000..32365ba0e039
--- /dev/null
+++ b/arch/sh/kernel/irq_64.c
@@ -0,0 +1,51 @@
1/*
2 * SHmedia irqflags support
3 *
4 * Copyright (C) 2006 - 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/irqflags.h>
11#include <linux/module.h>
12#include <cpu/registers.h>
13
14void notrace raw_local_irq_restore(unsigned long flags)
15{
16 unsigned long long __dummy;
17
18 if (flags == RAW_IRQ_DISABLED) {
19 __asm__ __volatile__ (
20 "getcon " __SR ", %0\n\t"
21 "or %0, %1, %0\n\t"
22 "putcon %0, " __SR "\n\t"
23 : "=&r" (__dummy)
24 : "r" (RAW_IRQ_DISABLED)
25 );
26 } else {
27 __asm__ __volatile__ (
28 "getcon " __SR ", %0\n\t"
29 "and %0, %1, %0\n\t"
30 "putcon %0, " __SR "\n\t"
31 : "=&r" (__dummy)
32 : "r" (~RAW_IRQ_DISABLED)
33 );
34 }
35}
36EXPORT_SYMBOL(raw_local_irq_restore);
37
38unsigned long notrace __raw_local_save_flags(void)
39{
40 unsigned long flags;
41
42 __asm__ __volatile__ (
43 "getcon " __SR ", %0\n\t"
44 "and %0, %1, %0"
45 : "=&r" (flags)
46 : "r" (RAW_IRQ_DISABLED)
47 );
48
49 return flags;
50}
51EXPORT_SYMBOL(__raw_local_save_flags);
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c
index 7ea2704ea033..76f280223ebd 100644
--- a/arch/sh/kernel/machine_kexec.c
+++ b/arch/sh/kernel/machine_kexec.c
@@ -46,12 +46,6 @@ void machine_crash_shutdown(struct pt_regs *regs)
46 */ 46 */
47int machine_kexec_prepare(struct kimage *image) 47int machine_kexec_prepare(struct kimage *image)
48{ 48{
49 /* older versions of kexec-tools are passing
50 * the zImage entry point as a virtual address.
51 */
52 if (image->start != PHYSADDR(image->start))
53 return -EINVAL; /* upgrade your kexec-tools */
54
55 return 0; 49 return 0;
56} 50}
57 51
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index cbce639b108a..1652340ba3f2 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -135,5 +135,9 @@ void __init sh_mv_setup(void)
135 if (!sh_mv.mv_nr_irqs) 135 if (!sh_mv.mv_nr_irqs)
136 sh_mv.mv_nr_irqs = NR_IRQS; 136 sh_mv.mv_nr_irqs = NR_IRQS;
137 137
138#ifdef P2SEG
138 __set_io_port_base(P2SEG); 139 __set_io_port_base(P2SEG);
140#else
141 __set_io_port_base(0);
142#endif
139} 143}
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c
index c2efdcde266f..43adddfe4c04 100644
--- a/arch/sh/kernel/module.c
+++ b/arch/sh/kernel/module.c
@@ -32,6 +32,7 @@
32#include <linux/string.h> 32#include <linux/string.h>
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <asm/unaligned.h> 34#include <asm/unaligned.h>
35#include <asm/dwarf.h>
35 36
36void *module_alloc(unsigned long size) 37void *module_alloc(unsigned long size)
37{ 38{
@@ -145,10 +146,16 @@ int module_finalize(const Elf_Ehdr *hdr,
145 const Elf_Shdr *sechdrs, 146 const Elf_Shdr *sechdrs,
146 struct module *me) 147 struct module *me)
147{ 148{
148 return module_bug_finalize(hdr, sechdrs, me); 149 int ret = 0;
150
151 ret |= module_dwarf_finalize(hdr, sechdrs, me);
152 ret |= module_bug_finalize(hdr, sechdrs, me);
153
154 return ret;
149} 155}
150 156
151void module_arch_cleanup(struct module *mod) 157void module_arch_cleanup(struct module *mod)
152{ 158{
153 module_bug_cleanup(mod); 159 module_bug_cleanup(mod);
160 module_dwarf_cleanup(mod);
154} 161}
diff --git a/arch/sh/kernel/perf_callchain.c b/arch/sh/kernel/perf_callchain.c
new file mode 100644
index 000000000000..24ea837eac5b
--- /dev/null
+++ b/arch/sh/kernel/perf_callchain.c
@@ -0,0 +1,98 @@
1/*
2 * Performance event callchain support - SuperH architecture code
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/kernel.h>
11#include <linux/sched.h>
12#include <linux/perf_event.h>
13#include <linux/percpu.h>
14#include <asm/unwinder.h>
15#include <asm/ptrace.h>
16
17static inline void callchain_store(struct perf_callchain_entry *entry, u64 ip)
18{
19 if (entry->nr < PERF_MAX_STACK_DEPTH)
20 entry->ip[entry->nr++] = ip;
21}
22
23static void callchain_warning(void *data, char *msg)
24{
25}
26
27static void
28callchain_warning_symbol(void *data, char *msg, unsigned long symbol)
29{
30}
31
32static int callchain_stack(void *data, char *name)
33{
34 return 0;
35}
36
37static void callchain_address(void *data, unsigned long addr, int reliable)
38{
39 struct perf_callchain_entry *entry = data;
40
41 if (reliable)
42 callchain_store(entry, addr);
43}
44
45static const struct stacktrace_ops callchain_ops = {
46 .warning = callchain_warning,
47 .warning_symbol = callchain_warning_symbol,
48 .stack = callchain_stack,
49 .address = callchain_address,
50};
51
52static void
53perf_callchain_kernel(struct pt_regs *regs, struct perf_callchain_entry *entry)
54{
55 callchain_store(entry, PERF_CONTEXT_KERNEL);
56 callchain_store(entry, regs->pc);
57
58 unwind_stack(NULL, regs, NULL, &callchain_ops, entry);
59}
60
61static void
62perf_do_callchain(struct pt_regs *regs, struct perf_callchain_entry *entry)
63{
64 int is_user;
65
66 if (!regs)
67 return;
68
69 is_user = user_mode(regs);
70
71 if (!current || current->pid == 0)
72 return;
73
74 if (is_user && current->state != TASK_RUNNING)
75 return;
76
77 /*
78 * Only the kernel side is implemented for now.
79 */
80 if (!is_user)
81 perf_callchain_kernel(regs, entry);
82}
83
84/*
85 * No need for separate IRQ and NMI entries.
86 */
87static DEFINE_PER_CPU(struct perf_callchain_entry, callchain);
88
89struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
90{
91 struct perf_callchain_entry *entry = &__get_cpu_var(callchain);
92
93 entry->nr = 0;
94
95 perf_do_callchain(regs, entry);
96
97 return entry;
98}
diff --git a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c
new file mode 100644
index 000000000000..7ff0943e7a08
--- /dev/null
+++ b/arch/sh/kernel/perf_event.c
@@ -0,0 +1,312 @@
1/*
2 * Performance event support framework for SuperH hardware counters.
3 *
4 * Copyright (C) 2009 Paul Mundt
5 *
6 * Heavily based on the x86 and PowerPC implementations.
7 *
8 * x86:
9 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
10 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
11 * Copyright (C) 2009 Jaswinder Singh Rajput
12 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
13 * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
14 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
15 *
16 * ppc:
17 * Copyright 2008-2009 Paul Mackerras, IBM Corporation.
18 *
19 * This file is subject to the terms and conditions of the GNU General Public
20 * License. See the file "COPYING" in the main directory of this archive
21 * for more details.
22 */
23#include <linux/kernel.h>
24#include <linux/init.h>
25#include <linux/io.h>
26#include <linux/irq.h>
27#include <linux/perf_event.h>
28#include <asm/processor.h>
29
30struct cpu_hw_events {
31 struct perf_event *events[MAX_HWEVENTS];
32 unsigned long used_mask[BITS_TO_LONGS(MAX_HWEVENTS)];
33 unsigned long active_mask[BITS_TO_LONGS(MAX_HWEVENTS)];
34};
35
36DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
37
38static struct sh_pmu *sh_pmu __read_mostly;
39
40/* Number of perf_events counting hardware events */
41static atomic_t num_events;
42/* Used to avoid races in calling reserve/release_pmc_hardware */
43static DEFINE_MUTEX(pmc_reserve_mutex);
44
45/*
46 * Stub these out for now, do something more profound later.
47 */
48int reserve_pmc_hardware(void)
49{
50 return 0;
51}
52
53void release_pmc_hardware(void)
54{
55}
56
57static inline int sh_pmu_initialized(void)
58{
59 return !!sh_pmu;
60}
61
62/*
63 * Release the PMU if this is the last perf_event.
64 */
65static void hw_perf_event_destroy(struct perf_event *event)
66{
67 if (!atomic_add_unless(&num_events, -1, 1)) {
68 mutex_lock(&pmc_reserve_mutex);
69 if (atomic_dec_return(&num_events) == 0)
70 release_pmc_hardware();
71 mutex_unlock(&pmc_reserve_mutex);
72 }
73}
74
75static int hw_perf_cache_event(int config, int *evp)
76{
77 unsigned long type, op, result;
78 int ev;
79
80 if (!sh_pmu->cache_events)
81 return -EINVAL;
82
83 /* unpack config */
84 type = config & 0xff;
85 op = (config >> 8) & 0xff;
86 result = (config >> 16) & 0xff;
87
88 if (type >= PERF_COUNT_HW_CACHE_MAX ||
89 op >= PERF_COUNT_HW_CACHE_OP_MAX ||
90 result >= PERF_COUNT_HW_CACHE_RESULT_MAX)
91 return -EINVAL;
92
93 ev = (*sh_pmu->cache_events)[type][op][result];
94 if (ev == 0)
95 return -EOPNOTSUPP;
96 if (ev == -1)
97 return -EINVAL;
98 *evp = ev;
99 return 0;
100}
101
102static int __hw_perf_event_init(struct perf_event *event)
103{
104 struct perf_event_attr *attr = &event->attr;
105 struct hw_perf_event *hwc = &event->hw;
106 int config = -1;
107 int err;
108
109 if (!sh_pmu_initialized())
110 return -ENODEV;
111
112 /*
113 * All of the on-chip counters are "limited", in that they have
114 * no interrupts, and are therefore unable to do sampling without
115 * further work and timer assistance.
116 */
117 if (hwc->sample_period)
118 return -EINVAL;
119
120 /*
121 * See if we need to reserve the counter.
122 *
123 * If no events are currently in use, then we have to take a
124 * mutex to ensure that we don't race with another task doing
125 * reserve_pmc_hardware or release_pmc_hardware.
126 */
127 err = 0;
128 if (!atomic_inc_not_zero(&num_events)) {
129 mutex_lock(&pmc_reserve_mutex);
130 if (atomic_read(&num_events) == 0 &&
131 reserve_pmc_hardware())
132 err = -EBUSY;
133 else
134 atomic_inc(&num_events);
135 mutex_unlock(&pmc_reserve_mutex);
136 }
137
138 if (err)
139 return err;
140
141 event->destroy = hw_perf_event_destroy;
142
143 switch (attr->type) {
144 case PERF_TYPE_RAW:
145 config = attr->config & sh_pmu->raw_event_mask;
146 break;
147 case PERF_TYPE_HW_CACHE:
148 err = hw_perf_cache_event(attr->config, &config);
149 if (err)
150 return err;
151 break;
152 case PERF_TYPE_HARDWARE:
153 if (attr->config >= sh_pmu->max_events)
154 return -EINVAL;
155
156 config = sh_pmu->event_map(attr->config);
157 break;
158 }
159
160 if (config == -1)
161 return -EINVAL;
162
163 hwc->config |= config;
164
165 return 0;
166}
167
168static void sh_perf_event_update(struct perf_event *event,
169 struct hw_perf_event *hwc, int idx)
170{
171 u64 prev_raw_count, new_raw_count;
172 s64 delta;
173 int shift = 0;
174
175 /*
176 * Depending on the counter configuration, they may or may not
177 * be chained, in which case the previous counter value can be
178 * updated underneath us if the lower-half overflows.
179 *
180 * Our tactic to handle this is to first atomically read and
181 * exchange a new raw count - then add that new-prev delta
182 * count to the generic counter atomically.
183 *
184 * As there is no interrupt associated with the overflow events,
185 * this is the simplest approach for maintaining consistency.
186 */
187again:
188 prev_raw_count = atomic64_read(&hwc->prev_count);
189 new_raw_count = sh_pmu->read(idx);
190
191 if (atomic64_cmpxchg(&hwc->prev_count, prev_raw_count,
192 new_raw_count) != prev_raw_count)
193 goto again;
194
195 /*
196 * Now we have the new raw value and have updated the prev
197 * timestamp already. We can now calculate the elapsed delta
198 * (counter-)time and add that to the generic counter.
199 *
200 * Careful, not all hw sign-extends above the physical width
201 * of the count.
202 */
203 delta = (new_raw_count << shift) - (prev_raw_count << shift);
204 delta >>= shift;
205
206 atomic64_add(delta, &event->count);
207}
208
209static void sh_pmu_disable(struct perf_event *event)
210{
211 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
212 struct hw_perf_event *hwc = &event->hw;
213 int idx = hwc->idx;
214
215 clear_bit(idx, cpuc->active_mask);
216 sh_pmu->disable(hwc, idx);
217
218 barrier();
219
220 sh_perf_event_update(event, &event->hw, idx);
221
222 cpuc->events[idx] = NULL;
223 clear_bit(idx, cpuc->used_mask);
224
225 perf_event_update_userpage(event);
226}
227
228static int sh_pmu_enable(struct perf_event *event)
229{
230 struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
231 struct hw_perf_event *hwc = &event->hw;
232 int idx = hwc->idx;
233
234 if (test_and_set_bit(idx, cpuc->used_mask)) {
235 idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events);
236 if (idx == sh_pmu->num_events)
237 return -EAGAIN;
238
239 set_bit(idx, cpuc->used_mask);
240 hwc->idx = idx;
241 }
242
243 sh_pmu->disable(hwc, idx);
244
245 cpuc->events[idx] = event;
246 set_bit(idx, cpuc->active_mask);
247
248 sh_pmu->enable(hwc, idx);
249
250 perf_event_update_userpage(event);
251
252 return 0;
253}
254
255static void sh_pmu_read(struct perf_event *event)
256{
257 sh_perf_event_update(event, &event->hw, event->hw.idx);
258}
259
260static const struct pmu pmu = {
261 .enable = sh_pmu_enable,
262 .disable = sh_pmu_disable,
263 .read = sh_pmu_read,
264};
265
266const struct pmu *hw_perf_event_init(struct perf_event *event)
267{
268 int err = __hw_perf_event_init(event);
269 if (unlikely(err)) {
270 if (event->destroy)
271 event->destroy(event);
272 return ERR_PTR(err);
273 }
274
275 return &pmu;
276}
277
278void hw_perf_event_setup(int cpu)
279{
280 struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);
281
282 memset(cpuhw, 0, sizeof(struct cpu_hw_events));
283}
284
285void hw_perf_enable(void)
286{
287 if (!sh_pmu_initialized())
288 return;
289
290 sh_pmu->enable_all();
291}
292
293void hw_perf_disable(void)
294{
295 if (!sh_pmu_initialized())
296 return;
297
298 sh_pmu->disable_all();
299}
300
301int register_sh_pmu(struct sh_pmu *pmu)
302{
303 if (sh_pmu)
304 return -EBUSY;
305 sh_pmu = pmu;
306
307 pr_info("Performance Events: %s support registered\n", pmu->name);
308
309 WARN_ON(pmu->num_events > MAX_HWEVENTS);
310
311 return 0;
312}
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 0673c4746be3..d8af889366a4 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -134,7 +134,10 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
134 regs.regs[5] = (unsigned long)fn; 134 regs.regs[5] = (unsigned long)fn;
135 135
136 regs.pc = (unsigned long)kernel_thread_helper; 136 regs.pc = (unsigned long)kernel_thread_helper;
137 regs.sr = (1 << 30); 137 regs.sr = SR_MD;
138#if defined(CONFIG_SH_FPU)
139 regs.sr |= SR_FD;
140#endif
138 141
139 /* Ok, create the new process.. */ 142 /* Ok, create the new process.. */
140 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 143 pid = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
@@ -142,6 +145,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
142 145
143 return pid; 146 return pid;
144} 147}
148EXPORT_SYMBOL(kernel_thread);
145 149
146/* 150/*
147 * Free current thread data structures etc.. 151 * Free current thread data structures etc..
@@ -186,6 +190,16 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
186 190
187 return fpvalid; 191 return fpvalid;
188} 192}
193EXPORT_SYMBOL(dump_fpu);
194
195/*
196 * This gets called before we allocate a new thread and copy
197 * the current task into it.
198 */
199void prepare_to_copy(struct task_struct *tsk)
200{
201 unlazy_fpu(tsk, task_pt_regs(tsk));
202}
189 203
190asmlinkage void ret_from_fork(void); 204asmlinkage void ret_from_fork(void);
191 205
@@ -195,16 +209,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
195{ 209{
196 struct thread_info *ti = task_thread_info(p); 210 struct thread_info *ti = task_thread_info(p);
197 struct pt_regs *childregs; 211 struct pt_regs *childregs;
198#if defined(CONFIG_SH_FPU) || defined(CONFIG_SH_DSP) 212#if defined(CONFIG_SH_DSP)
199 struct task_struct *tsk = current; 213 struct task_struct *tsk = current;
200#endif 214#endif
201 215
202#if defined(CONFIG_SH_FPU)
203 unlazy_fpu(tsk, regs);
204 p->thread.fpu = tsk->thread.fpu;
205 copy_to_stopped_child_used_math(p);
206#endif
207
208#if defined(CONFIG_SH_DSP) 216#if defined(CONFIG_SH_DSP)
209 if (is_dsp_enabled(tsk)) { 217 if (is_dsp_enabled(tsk)) {
210 /* We can use the __save_dsp or just copy the struct: 218 /* We can use the __save_dsp or just copy the struct:
@@ -224,6 +232,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
224 } else { 232 } else {
225 childregs->regs[15] = (unsigned long)childregs; 233 childregs->regs[15] = (unsigned long)childregs;
226 ti->addr_limit = KERNEL_DS; 234 ti->addr_limit = KERNEL_DS;
235 ti->status &= ~TS_USEDFPU;
236 p->fpu_counter = 0;
227 } 237 }
228 238
229 if (clone_flags & CLONE_SETTLS) 239 if (clone_flags & CLONE_SETTLS)
@@ -288,9 +298,13 @@ static void ubc_set_tracing(int asid, unsigned long pc)
288__notrace_funcgraph struct task_struct * 298__notrace_funcgraph struct task_struct *
289__switch_to(struct task_struct *prev, struct task_struct *next) 299__switch_to(struct task_struct *prev, struct task_struct *next)
290{ 300{
291#if defined(CONFIG_SH_FPU) 301 struct thread_struct *next_t = &next->thread;
302
292 unlazy_fpu(prev, task_pt_regs(prev)); 303 unlazy_fpu(prev, task_pt_regs(prev));
293#endif 304
305 /* we're going to use this soon, after a few expensive things */
306 if (next->fpu_counter > 5)
307 prefetch(&next_t->fpu.hard);
294 308
295#ifdef CONFIG_MMU 309#ifdef CONFIG_MMU
296 /* 310 /*
@@ -321,6 +335,14 @@ __switch_to(struct task_struct *prev, struct task_struct *next)
321#endif 335#endif
322 } 336 }
323 337
338 /*
339 * If the task has used fpu the last 5 timeslices, just do a full
340 * restore of the math state immediately to avoid the trap; the
341 * chances of needing FPU soon are obviously high now
342 */
343 if (next->fpu_counter > 5)
344 fpu_state_restore(task_pt_regs(next));
345
324 return prev; 346 return prev;
325} 347}
326 348
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index 1192398ef582..31f80c61b031 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -335,6 +335,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
335 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 335 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
336 &regs, 0, NULL, NULL); 336 &regs, 0, NULL, NULL);
337} 337}
338EXPORT_SYMBOL(kernel_thread);
338 339
339/* 340/*
340 * Free current thread data structures etc.. 341 * Free current thread data structures etc..
@@ -403,7 +404,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
403 if (fpvalid) { 404 if (fpvalid) {
404 if (current == last_task_used_math) { 405 if (current == last_task_used_math) {
405 enable_fpu(); 406 enable_fpu();
406 save_fpu(tsk, regs); 407 save_fpu(tsk);
407 disable_fpu(); 408 disable_fpu();
408 last_task_used_math = 0; 409 last_task_used_math = 0;
409 regs->sr |= SR_FD; 410 regs->sr |= SR_FD;
@@ -417,6 +418,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
417 return 0; /* Task didn't use the fpu at all. */ 418 return 0; /* Task didn't use the fpu at all. */
418#endif 419#endif
419} 420}
421EXPORT_SYMBOL(dump_fpu);
420 422
421asmlinkage void ret_from_fork(void); 423asmlinkage void ret_from_fork(void);
422 424
@@ -429,7 +431,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
429#ifdef CONFIG_SH_FPU 431#ifdef CONFIG_SH_FPU
430 if(last_task_used_math == current) { 432 if(last_task_used_math == current) {
431 enable_fpu(); 433 enable_fpu();
432 save_fpu(current, regs); 434 save_fpu(current);
433 disable_fpu(); 435 disable_fpu();
434 last_task_used_math = NULL; 436 last_task_used_math = NULL;
435 regs->sr |= SR_FD; 437 regs->sr |= SR_FD;
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 952da83903da..873ebdc4f98e 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -82,7 +82,7 @@ get_fpu_long(struct task_struct *task, unsigned long addr)
82 82
83 if (last_task_used_math == task) { 83 if (last_task_used_math == task) {
84 enable_fpu(); 84 enable_fpu();
85 save_fpu(task, regs); 85 save_fpu(task);
86 disable_fpu(); 86 disable_fpu();
87 last_task_used_math = 0; 87 last_task_used_math = 0;
88 regs->sr |= SR_FD; 88 regs->sr |= SR_FD;
@@ -118,7 +118,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
118 set_stopped_child_used_math(task); 118 set_stopped_child_used_math(task);
119 } else if (last_task_used_math == task) { 119 } else if (last_task_used_math == task) {
120 enable_fpu(); 120 enable_fpu();
121 save_fpu(task, regs); 121 save_fpu(task);
122 disable_fpu(); 122 disable_fpu();
123 last_task_used_math = 0; 123 last_task_used_math = 0;
124 regs->sr |= SR_FD; 124 regs->sr |= SR_FD;
diff --git a/arch/sh/kernel/return_address.c b/arch/sh/kernel/return_address.c
new file mode 100644
index 000000000000..df3ab5811074
--- /dev/null
+++ b/arch/sh/kernel/return_address.c
@@ -0,0 +1,54 @@
1/*
2 * arch/sh/kernel/return_address.c
3 *
4 * Copyright (C) 2009 Matt Fleming
5 * Copyright (C) 2009 Paul Mundt
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11#include <linux/kernel.h>
12#include <asm/dwarf.h>
13
14#ifdef CONFIG_DWARF_UNWINDER
15
16void *return_address(unsigned int depth)
17{
18 struct dwarf_frame *frame;
19 unsigned long ra;
20 int i;
21
22 for (i = 0, frame = NULL, ra = 0; i <= depth; i++) {
23 struct dwarf_frame *tmp;
24
25 tmp = dwarf_unwind_stack(ra, frame);
26
27 if (frame)
28 dwarf_free_frame(frame);
29
30 frame = tmp;
31
32 if (!frame || !frame->return_addr)
33 break;
34
35 ra = frame->return_addr;
36 }
37
38 /* Failed to unwind the stack to the specified depth. */
39 WARN_ON(i != depth + 1);
40
41 if (frame)
42 dwarf_free_frame(frame);
43
44 return (void *)ra;
45}
46
47#else
48
49void *return_address(unsigned int depth)
50{
51 return NULL;
52}
53
54#endif
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 99b4fb553bf1..8b0e69792cf4 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -423,6 +423,9 @@ void __init setup_arch(char **cmdline_p)
423 423
424 plat_early_device_setup(); 424 plat_early_device_setup();
425 425
426 /* Let earlyprintk output early console messages */
427 early_platform_driver_probe("earlyprintk", 1, 1);
428
426 sh_mv_setup(); 429 sh_mv_setup();
427 430
428 /* 431 /*
@@ -453,6 +456,10 @@ void __init setup_arch(char **cmdline_p)
453 456
454 paging_init(); 457 paging_init();
455 458
459#ifdef CONFIG_PMB_ENABLE
460 pmb_init();
461#endif
462
456#ifdef CONFIG_SMP 463#ifdef CONFIG_SMP
457 plat_smp_setup(); 464 plat_smp_setup();
458#endif 465#endif
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c
index 444cce3ae921..3896f26efa4a 100644
--- a/arch/sh/kernel/sh_ksyms_32.c
+++ b/arch/sh/kernel/sh_ksyms_32.c
@@ -1,37 +1,11 @@
1#include <linux/module.h> 1#include <linux/module.h>
2#include <linux/smp.h> 2#include <linux/string.h>
3#include <linux/user.h> 3#include <linux/uaccess.h>
4#include <linux/elfcore.h> 4#include <linux/delay.h>
5#include <linux/sched.h> 5#include <linux/mm.h>
6#include <linux/in6.h>
7#include <linux/interrupt.h>
8#include <linux/vmalloc.h>
9#include <linux/pci.h>
10#include <linux/irq.h>
11#include <asm/sections.h>
12#include <asm/processor.h>
13#include <asm/uaccess.h>
14#include <asm/checksum.h> 6#include <asm/checksum.h>
15#include <asm/io.h> 7#include <asm/sections.h>
16#include <asm/delay.h>
17#include <asm/tlbflush.h>
18#include <asm/cacheflush.h>
19#include <asm/ftrace.h>
20
21extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
22
23/* platform dependent support */
24EXPORT_SYMBOL(dump_fpu);
25EXPORT_SYMBOL(kernel_thread);
26EXPORT_SYMBOL(strlen);
27
28/* PCI exports */
29#ifdef CONFIG_PCI
30EXPORT_SYMBOL(pci_alloc_consistent);
31EXPORT_SYMBOL(pci_free_consistent);
32#endif
33 8
34/* mem exports */
35EXPORT_SYMBOL(memchr); 9EXPORT_SYMBOL(memchr);
36EXPORT_SYMBOL(memcpy); 10EXPORT_SYMBOL(memcpy);
37EXPORT_SYMBOL(memset); 11EXPORT_SYMBOL(memset);
@@ -40,6 +14,13 @@ EXPORT_SYMBOL(__copy_user);
40EXPORT_SYMBOL(__udelay); 14EXPORT_SYMBOL(__udelay);
41EXPORT_SYMBOL(__ndelay); 15EXPORT_SYMBOL(__ndelay);
42EXPORT_SYMBOL(__const_udelay); 16EXPORT_SYMBOL(__const_udelay);
17EXPORT_SYMBOL(strlen);
18EXPORT_SYMBOL(csum_partial);
19EXPORT_SYMBOL(csum_partial_copy_generic);
20EXPORT_SYMBOL(copy_page);
21EXPORT_SYMBOL(__clear_user);
22EXPORT_SYMBOL(_ebss);
23EXPORT_SYMBOL(empty_zero_page);
43 24
44#define DECLARE_EXPORT(name) \ 25#define DECLARE_EXPORT(name) \
45 extern void name(void);EXPORT_SYMBOL(name) 26 extern void name(void);EXPORT_SYMBOL(name)
@@ -107,30 +88,6 @@ DECLARE_EXPORT(__sdivsi3_i4);
107DECLARE_EXPORT(__udivsi3_i4); 88DECLARE_EXPORT(__udivsi3_i4);
108DECLARE_EXPORT(__sdivsi3_i4i); 89DECLARE_EXPORT(__sdivsi3_i4i);
109DECLARE_EXPORT(__udivsi3_i4i); 90DECLARE_EXPORT(__udivsi3_i4i);
110
111#if !defined(CONFIG_CACHE_OFF) && (defined(CONFIG_CPU_SH4) || \
112 defined(CONFIG_SH7705_CACHE_32KB))
113/* needed by some modules */
114EXPORT_SYMBOL(flush_cache_all);
115EXPORT_SYMBOL(flush_cache_range);
116EXPORT_SYMBOL(flush_dcache_page);
117#endif
118
119#ifdef CONFIG_MCOUNT 91#ifdef CONFIG_MCOUNT
120DECLARE_EXPORT(mcount); 92DECLARE_EXPORT(mcount);
121#endif 93#endif
122EXPORT_SYMBOL(csum_partial);
123EXPORT_SYMBOL(csum_partial_copy_generic);
124#ifdef CONFIG_IPV6
125EXPORT_SYMBOL(csum_ipv6_magic);
126#endif
127EXPORT_SYMBOL(copy_page);
128EXPORT_SYMBOL(__clear_user);
129EXPORT_SYMBOL(_ebss);
130EXPORT_SYMBOL(empty_zero_page);
131
132#ifndef CONFIG_CACHE_OFF
133EXPORT_SYMBOL(__flush_purge_region);
134EXPORT_SYMBOL(__flush_wback_region);
135EXPORT_SYMBOL(__flush_invalidate_region);
136#endif
diff --git a/arch/sh/kernel/sh_ksyms_64.c b/arch/sh/kernel/sh_ksyms_64.c
index d008e17eb257..45afa5c51f67 100644
--- a/arch/sh/kernel/sh_ksyms_64.c
+++ b/arch/sh/kernel/sh_ksyms_64.c
@@ -24,16 +24,6 @@
24#include <asm/delay.h> 24#include <asm/delay.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26
27extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
28
29/* platform dependent support */
30EXPORT_SYMBOL(dump_fpu);
31EXPORT_SYMBOL(kernel_thread);
32
33#ifdef CONFIG_VT
34EXPORT_SYMBOL(screen_info);
35#endif
36
37EXPORT_SYMBOL(__put_user_asm_b); 27EXPORT_SYMBOL(__put_user_asm_b);
38EXPORT_SYMBOL(__put_user_asm_w); 28EXPORT_SYMBOL(__put_user_asm_w);
39EXPORT_SYMBOL(__put_user_asm_l); 29EXPORT_SYMBOL(__put_user_asm_l);
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 3db37425210d..12815ce01ecd 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -67,7 +67,8 @@ sys_sigsuspend(old_sigset_t mask,
67 67
68 current->state = TASK_INTERRUPTIBLE; 68 current->state = TASK_INTERRUPTIBLE;
69 schedule(); 69 schedule();
70 set_thread_flag(TIF_RESTORE_SIGMASK); 70 set_restore_sigmask();
71
71 return -ERESTARTNOHAND; 72 return -ERESTARTNOHAND;
72} 73}
73 74
@@ -590,7 +591,7 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
590 if (try_to_freeze()) 591 if (try_to_freeze())
591 goto no_signal; 592 goto no_signal;
592 593
593 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 594 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
594 oldset = &current->saved_sigmask; 595 oldset = &current->saved_sigmask;
595 else 596 else
596 oldset = &current->blocked; 597 oldset = &current->blocked;
@@ -602,12 +603,13 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
602 /* Whee! Actually deliver the signal. */ 603 /* Whee! Actually deliver the signal. */
603 if (handle_signal(signr, &ka, &info, oldset, 604 if (handle_signal(signr, &ka, &info, oldset,
604 regs, save_r0) == 0) { 605 regs, save_r0) == 0) {
605 /* a signal was successfully delivered; the saved 606 /*
607 * A signal was successfully delivered; the saved
606 * sigmask will have been stored in the signal frame, 608 * sigmask will have been stored in the signal frame,
607 * and will be restored by sigreturn, so we can simply 609 * and will be restored by sigreturn, so we can simply
608 * clear the TIF_RESTORE_SIGMASK flag */ 610 * clear the TS_RESTORE_SIGMASK flag
609 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 611 */
610 clear_thread_flag(TIF_RESTORE_SIGMASK); 612 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
611 613
612 tracehook_signal_handler(signr, &info, &ka, regs, 614 tracehook_signal_handler(signr, &info, &ka, regs,
613 test_thread_flag(TIF_SINGLESTEP)); 615 test_thread_flag(TIF_SINGLESTEP));
@@ -631,10 +633,12 @@ no_signal:
631 } 633 }
632 } 634 }
633 635
634 /* if there's no signal to deliver, we just put the saved sigmask 636 /*
635 * back */ 637 * If there's no signal to deliver, we just put the saved sigmask
636 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 638 * back.
637 clear_thread_flag(TIF_RESTORE_SIGMASK); 639 */
640 if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
641 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
638 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 642 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
639 } 643 }
640} 644}
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c
index 74793c80a57a..ce76dbdef294 100644
--- a/arch/sh/kernel/signal_64.c
+++ b/arch/sh/kernel/signal_64.c
@@ -101,7 +101,7 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset)
101 if (try_to_freeze()) 101 if (try_to_freeze())
102 goto no_signal; 102 goto no_signal;
103 103
104 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 104 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
105 oldset = &current->saved_sigmask; 105 oldset = &current->saved_sigmask;
106 else if (!oldset) 106 else if (!oldset)
107 oldset = &current->blocked; 107 oldset = &current->blocked;
@@ -115,11 +115,9 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset)
115 /* 115 /*
116 * If a signal was successfully delivered, the 116 * If a signal was successfully delivered, the
117 * saved sigmask is in its frame, and we can 117 * saved sigmask is in its frame, and we can
118 * clear the TIF_RESTORE_SIGMASK flag. 118 * clear the TS_RESTORE_SIGMASK flag.
119 */ 119 */
120 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 120 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
121 clear_thread_flag(TIF_RESTORE_SIGMASK);
122
123 tracehook_signal_handler(signr, &info, &ka, regs, 0); 121 tracehook_signal_handler(signr, &info, &ka, regs, 0);
124 return 1; 122 return 1;
125 } 123 }
@@ -146,8 +144,8 @@ no_signal:
146 } 144 }
147 145
148 /* No signal to deliver -- put the saved sigmask back */ 146 /* No signal to deliver -- put the saved sigmask back */
149 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 147 if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
150 clear_thread_flag(TIF_RESTORE_SIGMASK); 148 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
151 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 149 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
152 } 150 }
153 151
@@ -176,6 +174,7 @@ sys_sigsuspend(old_sigset_t mask,
176 while (1) { 174 while (1) {
177 current->state = TASK_INTERRUPTIBLE; 175 current->state = TASK_INTERRUPTIBLE;
178 schedule(); 176 schedule();
177 set_restore_sigmask();
179 regs->pc += 4; /* because sys_sigreturn decrements the pc */ 178 regs->pc += 4; /* because sys_sigreturn decrements the pc */
180 if (do_signal(regs, &saveset)) { 179 if (do_signal(regs, &saveset)) {
181 /* pc now points at signal handler. Need to decrement 180 /* pc now points at signal handler. Need to decrement
@@ -315,7 +314,7 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
315 314
316 if (current == last_task_used_math) { 315 if (current == last_task_used_math) {
317 enable_fpu(); 316 enable_fpu();
318 save_fpu(current, regs); 317 save_fpu(current);
319 disable_fpu(); 318 disable_fpu();
320 last_task_used_math = NULL; 319 last_task_used_math = NULL;
321 regs->sr |= SR_FD; 320 regs->sr |= SR_FD;
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 160db1003cfb..983e0792d5f3 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -122,7 +122,9 @@ int __cpuinit __cpu_up(unsigned int cpu)
122 stack_start.bss_start = 0; /* don't clear bss for secondary cpus */ 122 stack_start.bss_start = 0; /* don't clear bss for secondary cpus */
123 stack_start.start_kernel_fn = start_secondary; 123 stack_start.start_kernel_fn = start_secondary;
124 124
125 flush_cache_all(); 125 flush_icache_range((unsigned long)&stack_start,
126 (unsigned long)&stack_start + sizeof(stack_start));
127 wmb();
126 128
127 plat_start_cpu(cpu, (unsigned long)_stext); 129 plat_start_cpu(cpu, (unsigned long)_stext);
128 130
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 8aa5d1ceaf14..71399cde03b5 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -28,37 +28,13 @@
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/cachectl.h> 29#include <asm/cachectl.h>
30 30
31static inline long
32do_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
33 unsigned long flags, int fd, unsigned long pgoff)
34{
35 int error = -EBADF;
36 struct file *file = NULL;
37
38 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
39 if (!(flags & MAP_ANONYMOUS)) {
40 file = fget(fd);
41 if (!file)
42 goto out;
43 }
44
45 down_write(&current->mm->mmap_sem);
46 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
47 up_write(&current->mm->mmap_sem);
48
49 if (file)
50 fput(file);
51out:
52 return error;
53}
54
55asmlinkage int old_mmap(unsigned long addr, unsigned long len, 31asmlinkage int old_mmap(unsigned long addr, unsigned long len,
56 unsigned long prot, unsigned long flags, 32 unsigned long prot, unsigned long flags,
57 int fd, unsigned long off) 33 int fd, unsigned long off)
58{ 34{
59 if (off & ~PAGE_MASK) 35 if (off & ~PAGE_MASK)
60 return -EINVAL; 36 return -EINVAL;
61 return do_mmap2(addr, len, prot, flags, fd, off>>PAGE_SHIFT); 37 return sys_mmap_pgoff(addr, len, prot, flags, fd, off>>PAGE_SHIFT);
62} 38}
63 39
64asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 40asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
@@ -74,7 +50,7 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
74 50
75 pgoff >>= PAGE_SHIFT - 12; 51 pgoff >>= PAGE_SHIFT - 12;
76 52
77 return do_mmap2(addr, len, prot, flags, fd, pgoff); 53 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
78} 54}
79 55
80/* 56/*
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index 19fd11dd9871..4bd5a1146956 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -353,3 +353,4 @@ ENTRY(sys_call_table)
353 .long sys_pwritev 353 .long sys_pwritev
354 .long sys_rt_tgsigqueueinfo /* 335 */ 354 .long sys_rt_tgsigqueueinfo /* 335 */
355 .long sys_perf_event_open 355 .long sys_perf_event_open
356 .long sys_recvmmsg
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c
index 0838942b7083..9b0b633b6c92 100644
--- a/arch/sh/kernel/topology.c
+++ b/arch/sh/kernel/topology.c
@@ -16,6 +16,32 @@
16 16
17static DEFINE_PER_CPU(struct cpu, cpu_devices); 17static DEFINE_PER_CPU(struct cpu, cpu_devices);
18 18
19cpumask_t cpu_core_map[NR_CPUS];
20
21static cpumask_t cpu_coregroup_map(unsigned int cpu)
22{
23 /*
24 * Presently all SH-X3 SMP cores are multi-cores, so just keep it
25 * simple until we have a method for determining topology..
26 */
27 return cpu_possible_map;
28}
29
30const struct cpumask *cpu_coregroup_mask(unsigned int cpu)
31{
32 return &cpu_core_map[cpu];
33}
34
35int arch_update_cpu_topology(void)
36{
37 unsigned int cpu;
38
39 for_each_possible_cpu(cpu)
40 cpu_core_map[cpu] = cpu_coregroup_map(cpu);
41
42 return 0;
43}
44
19static int __init topology_init(void) 45static int __init topology_init(void)
20{ 46{
21 int i, ret; 47 int i, ret;
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index a8396f36bd14..7b036339dc92 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -9,8 +9,8 @@
9#include <asm/unwinder.h> 9#include <asm/unwinder.h>
10#include <asm/system.h> 10#include <asm/system.h>
11 11
12#ifdef CONFIG_BUG 12#ifdef CONFIG_GENERIC_BUG
13void handle_BUG(struct pt_regs *regs) 13static void handle_BUG(struct pt_regs *regs)
14{ 14{
15 const struct bug_entry *bug; 15 const struct bug_entry *bug;
16 unsigned long bugaddr = regs->pc; 16 unsigned long bugaddr = regs->pc;
@@ -81,7 +81,7 @@ BUILD_TRAP_HANDLER(bug)
81 SIGTRAP) == NOTIFY_STOP) 81 SIGTRAP) == NOTIFY_STOP)
82 return; 82 return;
83 83
84#ifdef CONFIG_BUG 84#ifdef CONFIG_GENERIC_BUG
85 if (__kernel_text_address(instruction_pointer(regs))) { 85 if (__kernel_text_address(instruction_pointer(regs))) {
86 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs); 86 insn_size_t insn = *(insn_size_t *)instruction_pointer(regs);
87 if (insn == TRAPA_BUG_OPCODE) 87 if (insn == TRAPA_BUG_OPCODE)
@@ -95,9 +95,11 @@ BUILD_TRAP_HANDLER(bug)
95 95
96BUILD_TRAP_HANDLER(nmi) 96BUILD_TRAP_HANDLER(nmi)
97{ 97{
98 unsigned int cpu = smp_processor_id();
98 TRAP_HANDLER_DECL; 99 TRAP_HANDLER_DECL;
99 100
100 nmi_enter(); 101 nmi_enter();
102 nmi_count(cpu)++;
101 103
102 switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { 104 switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) {
103 case NOTIFY_OK: 105 case NOTIFY_OK:
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 7a2ee3a6b8e7..86639beac3a2 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -25,6 +25,7 @@
25#include <linux/kexec.h> 25#include <linux/kexec.h>
26#include <linux/limits.h> 26#include <linux/limits.h>
27#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
28#include <linux/seq_file.h>
28#include <linux/sysfs.h> 29#include <linux/sysfs.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/uaccess.h> 31#include <asm/uaccess.h>
@@ -68,61 +69,49 @@ static const char *se_usermode_action[] = {
68 "signal+warn" 69 "signal+warn"
69}; 70};
70 71
71static int 72static int alignment_proc_show(struct seq_file *m, void *v)
72proc_alignment_read(char *page, char **start, off_t off, int count, int *eof,
73 void *data)
74{ 73{
75 char *p = page; 74 seq_printf(m, "User:\t\t%lu\n", se_user);
76 int len; 75 seq_printf(m, "System:\t\t%lu\n", se_sys);
77 76 seq_printf(m, "Half:\t\t%lu\n", se_half);
78 p += sprintf(p, "User:\t\t%lu\n", se_user); 77 seq_printf(m, "Word:\t\t%lu\n", se_word);
79 p += sprintf(p, "System:\t\t%lu\n", se_sys); 78 seq_printf(m, "DWord:\t\t%lu\n", se_dword);
80 p += sprintf(p, "Half:\t\t%lu\n", se_half); 79 seq_printf(m, "Multi:\t\t%lu\n", se_multi);
81 p += sprintf(p, "Word:\t\t%lu\n", se_word); 80 seq_printf(m, "User faults:\t%i (%s)\n", se_usermode,
82 p += sprintf(p, "DWord:\t\t%lu\n", se_dword);
83 p += sprintf(p, "Multi:\t\t%lu\n", se_multi);
84 p += sprintf(p, "User faults:\t%i (%s)\n", se_usermode,
85 se_usermode_action[se_usermode]); 81 se_usermode_action[se_usermode]);
86 p += sprintf(p, "Kernel faults:\t%i (fixup%s)\n", se_kernmode_warn, 82 seq_printf(m, "Kernel faults:\t%i (fixup%s)\n", se_kernmode_warn,
87 se_kernmode_warn ? "+warn" : ""); 83 se_kernmode_warn ? "+warn" : "");
88 84 return 0;
89 len = (p - page) - off;
90 if (len < 0)
91 len = 0;
92
93 *eof = (len <= count) ? 1 : 0;
94 *start = page + off;
95
96 return len;
97} 85}
98 86
99static int proc_alignment_write(struct file *file, const char __user *buffer, 87static int alignment_proc_open(struct inode *inode, struct file *file)
100 unsigned long count, void *data)
101{ 88{
102 char mode; 89 return single_open(file, alignment_proc_show, NULL);
103
104 if (count > 0) {
105 if (get_user(mode, buffer))
106 return -EFAULT;
107 if (mode >= '0' && mode <= '5')
108 se_usermode = mode - '0';
109 }
110 return count;
111} 90}
112 91
113static int proc_alignment_kern_write(struct file *file, const char __user *buffer, 92static ssize_t alignment_proc_write(struct file *file,
114 unsigned long count, void *data) 93 const char __user *buffer, size_t count, loff_t *pos)
115{ 94{
95 int *data = PDE(file->f_path.dentry->d_inode)->data;
116 char mode; 96 char mode;
117 97
118 if (count > 0) { 98 if (count > 0) {
119 if (get_user(mode, buffer)) 99 if (get_user(mode, buffer))
120 return -EFAULT; 100 return -EFAULT;
121 if (mode >= '0' && mode <= '1') 101 if (mode >= '0' && mode <= '5')
122 se_kernmode_warn = mode - '0'; 102 *data = mode - '0';
123 } 103 }
124 return count; 104 return count;
125} 105}
106
107static const struct file_operations alignment_proc_fops = {
108 .owner = THIS_MODULE,
109 .open = alignment_proc_open,
110 .read = seq_read,
111 .llseek = seq_lseek,
112 .release = single_release,
113 .write = alignment_proc_write,
114};
126#endif 115#endif
127 116
128static void dump_mem(const char *str, unsigned long bottom, unsigned long top) 117static void dump_mem(const char *str, unsigned long bottom, unsigned long top)
@@ -463,12 +452,18 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
463 rm = regs->regs[index]; 452 rm = regs->regs[index];
464 453
465 /* shout about fixups */ 454 /* shout about fixups */
466 if (!expected && printk_ratelimit()) 455 if (!expected) {
467 printk(KERN_NOTICE "Fixing up unaligned %s access " 456 if (user_mode(regs) && (se_usermode & 1) && printk_ratelimit())
468 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", 457 pr_notice("Fixing up unaligned userspace access "
469 user_mode(regs) ? "userspace" : "kernel", 458 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
470 current->comm, task_pid_nr(current), 459 current->comm, task_pid_nr(current),
471 (void *)regs->pc, instruction); 460 (void *)regs->pc, instruction);
461 else if (se_kernmode_warn && printk_ratelimit())
462 pr_notice("Fixing up unaligned kernel access "
463 "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
464 current->comm, task_pid_nr(current),
465 (void *)regs->pc, instruction);
466 }
472 467
473 ret = -EFAULT; 468 ret = -EFAULT;
474 switch (instruction&0xF000) { 469 switch (instruction&0xF000) {
@@ -945,14 +940,9 @@ void __init trap_init(void)
945 set_exception_table_evt(0x800, do_reserved_inst); 940 set_exception_table_evt(0x800, do_reserved_inst);
946 set_exception_table_evt(0x820, do_illegal_slot_inst); 941 set_exception_table_evt(0x820, do_illegal_slot_inst);
947#elif defined(CONFIG_SH_FPU) 942#elif defined(CONFIG_SH_FPU)
948#ifdef CONFIG_CPU_SUBTYPE_SHX3
949 set_exception_table_evt(0xd80, fpu_state_restore_trap_handler);
950 set_exception_table_evt(0xda0, fpu_state_restore_trap_handler);
951#else
952 set_exception_table_evt(0x800, fpu_state_restore_trap_handler); 943 set_exception_table_evt(0x800, fpu_state_restore_trap_handler);
953 set_exception_table_evt(0x820, fpu_state_restore_trap_handler); 944 set_exception_table_evt(0x820, fpu_state_restore_trap_handler);
954#endif 945#endif
955#endif
956 946
957#ifdef CONFIG_CPU_SH2 947#ifdef CONFIG_CPU_SH2
958 set_exception_table_vec(TRAP_ADDRESS_ERROR, address_error_trap_handler); 948 set_exception_table_vec(TRAP_ADDRESS_ERROR, address_error_trap_handler);
@@ -1011,20 +1001,16 @@ static int __init alignment_init(void)
1011 if (!dir) 1001 if (!dir)
1012 return -ENOMEM; 1002 return -ENOMEM;
1013 1003
1014 res = create_proc_entry("alignment", S_IWUSR | S_IRUGO, dir); 1004 res = proc_create_data("alignment", S_IWUSR | S_IRUGO, dir,
1005 &alignment_proc_fops, &se_usermode);
1015 if (!res) 1006 if (!res)
1016 return -ENOMEM; 1007 return -ENOMEM;
1017 1008
1018 res->read_proc = proc_alignment_read; 1009 res = proc_create_data("kernel_alignment", S_IWUSR | S_IRUGO, dir,
1019 res->write_proc = proc_alignment_write; 1010 &alignment_proc_fops, &se_kernmode_warn);
1020
1021 res = create_proc_entry("kernel_alignment", S_IWUSR | S_IRUGO, dir);
1022 if (!res) 1011 if (!res)
1023 return -ENOMEM; 1012 return -ENOMEM;
1024 1013
1025 res->read_proc = proc_alignment_read;
1026 res->write_proc = proc_alignment_kern_write;
1027
1028 return 0; 1014 return 0;
1029} 1015}
1030 1016
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c
index 75c0cbe2eda0..d86f5315a0c1 100644
--- a/arch/sh/kernel/traps_64.c
+++ b/arch/sh/kernel/traps_64.c
@@ -600,7 +600,7 @@ static int misaligned_fpu_load(struct pt_regs *regs,
600 indexed by register number. */ 600 indexed by register number. */
601 if (last_task_used_math == current) { 601 if (last_task_used_math == current) {
602 enable_fpu(); 602 enable_fpu();
603 save_fpu(current, regs); 603 save_fpu(current);
604 disable_fpu(); 604 disable_fpu();
605 last_task_used_math = NULL; 605 last_task_used_math = NULL;
606 regs->sr |= SR_FD; 606 regs->sr |= SR_FD;
@@ -673,7 +673,7 @@ static int misaligned_fpu_store(struct pt_regs *regs,
673 indexed by register number. */ 673 indexed by register number. */
674 if (last_task_used_math == current) { 674 if (last_task_used_math == current) {
675 enable_fpu(); 675 enable_fpu();
676 save_fpu(current, regs); 676 save_fpu(current);
677 disable_fpu(); 677 disable_fpu();
678 last_task_used_math = NULL; 678 last_task_used_math = NULL;
679 regs->sr |= SR_FD; 679 regs->sr |= SR_FD;
diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index a969b47c5463..dab4d2129812 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -2,7 +2,7 @@
2# Makefile for SuperH-specific library files.. 2# Makefile for SuperH-specific library files..
3# 3#
4 4
5lib-y = delay.o memset.o memmove.o memchr.o \ 5lib-y = delay.o memmove.o memchr.o \
6 checksum.o strlen.o div64.o div64-generic.o 6 checksum.o strlen.o div64.o div64-generic.o
7 7
8# Extracted from libgcc 8# Extracted from libgcc
@@ -23,8 +23,11 @@ obj-y += io.o
23memcpy-y := memcpy.o 23memcpy-y := memcpy.o
24memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o 24memcpy-$(CONFIG_CPU_SH4) := memcpy-sh4.o
25 25
26memset-y := memset.o
27memset-$(CONFIG_CPU_SH4) := memset-sh4.o
28
26lib-$(CONFIG_MMU) += copy_page.o __clear_user.o 29lib-$(CONFIG_MMU) += copy_page.o __clear_user.o
27lib-$(CONFIG_MCOUNT) += mcount.o 30lib-$(CONFIG_MCOUNT) += mcount.o
28lib-y += $(memcpy-y) $(udivsi3-y) 31lib-y += $(memcpy-y) $(memset-y) $(udivsi3-y)
29 32
30EXTRA_CFLAGS += -Werror 33EXTRA_CFLAGS += -Werror
diff --git a/arch/sh/lib/memset-sh4.S b/arch/sh/lib/memset-sh4.S
new file mode 100644
index 000000000000..1a6e32cc4e4d
--- /dev/null
+++ b/arch/sh/lib/memset-sh4.S
@@ -0,0 +1,107 @@
1/*
2 * "memset" implementation for SH4
3 *
4 * Copyright (C) 1999 Niibe Yutaka
5 * Copyright (c) 2009 STMicroelectronics Limited
6 * Author: Stuart Menefy <stuart.menefy:st.com>
7 */
8
9/*
10 * void *memset(void *s, int c, size_t n);
11 */
12
13#include <linux/linkage.h>
14
15ENTRY(memset)
16 mov #12,r0
17 add r6,r4
18 cmp/gt r6,r0
19 bt/s 40f ! if it's too small, set a byte at once
20 mov r4,r0
21 and #3,r0
22 cmp/eq #0,r0
23 bt/s 2f ! It's aligned
24 sub r0,r6
251:
26 dt r0
27 bf/s 1b
28 mov.b r5,@-r4
292: ! make VVVV
30 extu.b r5,r5
31 swap.b r5,r0 ! V0
32 or r0,r5 ! VV
33 swap.w r5,r0 ! VV00
34 or r0,r5 ! VVVV
35
36 ! Check if enough bytes need to be copied to be worth the big loop
37 mov #0x40, r0 ! (MT)
38 cmp/gt r6,r0 ! (MT) 64 > len => slow loop
39
40 bt/s 22f
41 mov r6,r0
42
43 ! align the dst to the cache block size if necessary
44 mov r4, r3
45 mov #~(0x1f), r1
46
47 and r3, r1
48 cmp/eq r3, r1
49
50 bt/s 11f ! dst is already aligned
51 sub r1, r3 ! r3-r1 -> r3
52 shlr2 r3 ! number of loops
53
5410: mov.l r5,@-r4
55 dt r3
56 bf/s 10b
57 add #-4, r6
58
5911: ! dst is 32byte aligned
60 mov r6,r2
61 mov #-5,r0
62 shld r0,r2 ! number of loops
63
64 add #-32, r4
65 mov r5, r0
6612:
67 movca.l r0,@r4
68 mov.l r5,@(4, r4)
69 mov.l r5,@(8, r4)
70 mov.l r5,@(12,r4)
71 mov.l r5,@(16,r4)
72 mov.l r5,@(20,r4)
73 add #-0x20, r6
74 mov.l r5,@(24,r4)
75 dt r2
76 mov.l r5,@(28,r4)
77 bf/s 12b
78 add #-32, r4
79
80 add #32, r4
81 mov #8, r0
82 cmp/ge r0, r6
83 bf 40f
84
85 mov r6,r0
8622:
87 shlr2 r0
88 shlr r0 ! r0 = r6 >> 3
893:
90 dt r0
91 mov.l r5,@-r4 ! set 8-byte at once
92 bf/s 3b
93 mov.l r5,@-r4
94 !
95 mov #7,r0
96 and r0,r6
97
98 ! fill bytes (length may be zero)
9940: tst r6,r6
100 bt 5f
1014:
102 dt r6
103 bf/s 4b
104 mov.b r5,@-r4
1055:
106 rts
107 mov r4,r0
diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
index ac2d7abd2567..d6c15cae0912 100644
--- a/arch/sh/math-emu/math.c
+++ b/arch/sh/math-emu/math.c
@@ -558,7 +558,7 @@ static int ieee_fpe_handler(struct pt_regs *regs)
558 (finsn >> 8) & 0xf); 558 (finsn >> 8) & 0xf);
559 tsk->thread.fpu.hard.fpscr &= 559 tsk->thread.fpu.hard.fpscr &=
560 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); 560 ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
561 set_tsk_thread_flag(tsk, TIF_USEDFPU); 561 task_thread_info(tsk)->status |= TS_USEDFPU;
562 } else { 562 } else {
563 info.si_signo = SIGFPE; 563 info.si_signo = SIGFPE;
564 info.si_errno = 0; 564 info.si_errno = 0;
@@ -619,10 +619,10 @@ int do_fpu_inst(unsigned short inst, struct pt_regs *regs)
619 struct task_struct *tsk = current; 619 struct task_struct *tsk = current;
620 struct sh_fpu_soft_struct *fpu = &(tsk->thread.fpu.soft); 620 struct sh_fpu_soft_struct *fpu = &(tsk->thread.fpu.soft);
621 621
622 if (!test_tsk_thread_flag(tsk, TIF_USEDFPU)) { 622 if (!(task_thread_info(tsk)->status & TS_USEDFPU)) {
623 /* initialize once. */ 623 /* initialize once. */
624 fpu_init(fpu); 624 fpu_init(fpu);
625 set_tsk_thread_flag(tsk, TIF_USEDFPU); 625 task_thread_info(tsk)->status |= TS_USEDFPU;
626 } 626 }
627 627
628 return fpu_emulate(inst, fpu, regs); 628 return fpu_emulate(inst, fpu, regs);
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 7f7b52f9beba..0e7ba8e891cf 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -82,8 +82,7 @@ config 32BIT
82 82
83config PMB_ENABLE 83config PMB_ENABLE
84 bool "Support 32-bit physical addressing through PMB" 84 bool "Support 32-bit physical addressing through PMB"
85 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785) 85 depends on MMU && EXPERIMENTAL && CPU_SH4A
86 select 32BIT
87 default y 86 default y
88 help 87 help
89 If you say Y here, physical addressing will be extended to 88 If you say Y here, physical addressing will be extended to
@@ -97,8 +96,7 @@ choice
97 96
98config PMB 97config PMB
99 bool "PMB" 98 bool "PMB"
100 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785) 99 depends on MMU && EXPERIMENTAL && CPU_SH4A
101 select 32BIT
102 help 100 help
103 If you say Y here, physical addressing will be extended to 101 If you say Y here, physical addressing will be extended to
104 32-bits through the SH-4A PMB. If this is not set, legacy 102 32-bits through the SH-4A PMB. If this is not set, legacy
@@ -106,9 +104,7 @@ config PMB
106 104
107config PMB_FIXED 105config PMB_FIXED
108 bool "fixed PMB" 106 bool "fixed PMB"
109 depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || \ 107 depends on MMU && EXPERIMENTAL && CPU_SH4A
110 CPU_SUBTYPE_SH7780 || \
111 CPU_SUBTYPE_SH7785)
112 select 32BIT 108 select 32BIT
113 help 109 help
114 If this option is enabled, fixed PMB mappings are inherited 110 If this option is enabled, fixed PMB mappings are inherited
@@ -258,6 +254,15 @@ endchoice
258 254
259source "mm/Kconfig" 255source "mm/Kconfig"
260 256
257config SCHED_MC
258 bool "Multi-core scheduler support"
259 depends on SMP
260 default y
261 help
262 Multi-core scheduler support improves the CPU scheduler's decision
263 making when dealing with multi-core CPU chips at a cost of slightly
264 increased overhead in some places. If unsure say N here.
265
261endmenu 266endmenu
262 267
263menu "Cache configuration" 268menu "Cache configuration"
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index 3759bf853293..8a70535fa7ce 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -33,8 +33,7 @@ obj-y += $(tlb-y)
33endif 33endif
34 34
35obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 35obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
36obj-$(CONFIG_PMB) += pmb.o 36obj-$(CONFIG_PMB_ENABLE) += pmb.o
37obj-$(CONFIG_PMB_FIXED) += pmb-fixed.o
38obj-$(CONFIG_NUMA) += numa.o 37obj-$(CONFIG_NUMA) += numa.o
39 38
40# Special flags for fault_64.o. This puts restrictions on the number of 39# Special flags for fault_64.o. This puts restrictions on the number of
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index b7f235c74d66..560ddb6bc8a7 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -2,7 +2,7 @@
2 * arch/sh/mm/cache-sh4.c 2 * arch/sh/mm/cache-sh4.c
3 * 3 *
4 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka 4 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka
5 * Copyright (C) 2001 - 2007 Paul Mundt 5 * Copyright (C) 2001 - 2009 Paul Mundt
6 * Copyright (C) 2003 Richard Curnow 6 * Copyright (C) 2003 Richard Curnow
7 * Copyright (c) 2007 STMicroelectronics (R&D) Ltd. 7 * Copyright (c) 2007 STMicroelectronics (R&D) Ltd.
8 * 8 *
@@ -15,6 +15,8 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/highmem.h>
19#include <asm/pgtable.h>
18#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
19#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
20 22
@@ -23,21 +25,12 @@
23 * flushing. Anything exceeding this will simply flush the dcache in its 25 * flushing. Anything exceeding this will simply flush the dcache in its
24 * entirety. 26 * entirety.
25 */ 27 */
26#define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */
27#define MAX_ICACHE_PAGES 32 28#define MAX_ICACHE_PAGES 32
28 29
29static void __flush_cache_one(unsigned long addr, unsigned long phys, 30static void __flush_cache_one(unsigned long addr, unsigned long phys,
30 unsigned long exec_offset); 31 unsigned long exec_offset);
31 32
32/* 33/*
33 * This is initialised here to ensure that it is not placed in the BSS. If
34 * that were to happen, note that cache_init gets called before the BSS is
35 * cleared, so this would get nulled out which would be hopeless.
36 */
37static void (*__flush_dcache_segment_fn)(unsigned long, unsigned long) =
38 (void (*)(unsigned long, unsigned long))0xdeadbeef;
39
40/*
41 * Write back the range of D-cache, and purge the I-cache. 34 * Write back the range of D-cache, and purge the I-cache.
42 * 35 *
43 * Called from kernel/module.c:sys_init_module and routine for a.out format, 36 * Called from kernel/module.c:sys_init_module and routine for a.out format,
@@ -97,15 +90,15 @@ static inline void flush_cache_one(unsigned long start, unsigned long phys)
97 unsigned long flags, exec_offset = 0; 90 unsigned long flags, exec_offset = 0;
98 91
99 /* 92 /*
100 * All types of SH-4 require PC to be in P2 to operate on the I-cache. 93 * All types of SH-4 require PC to be uncached to operate on the I-cache.
101 * Some types of SH-4 require PC to be in P2 to operate on the D-cache. 94 * Some types of SH-4 require PC to be uncached to operate on the D-cache.
102 */ 95 */
103 if ((boot_cpu_data.flags & CPU_HAS_P2_FLUSH_BUG) || 96 if ((boot_cpu_data.flags & CPU_HAS_P2_FLUSH_BUG) ||
104 (start < CACHE_OC_ADDRESS_ARRAY)) 97 (start < CACHE_OC_ADDRESS_ARRAY))
105 exec_offset = 0x20000000; 98 exec_offset = cached_to_uncached;
106 99
107 local_irq_save(flags); 100 local_irq_save(flags);
108 __flush_cache_one(start | SH_CACHE_ASSOC, P1SEGADDR(phys), exec_offset); 101 __flush_cache_one(start, phys, exec_offset);
109 local_irq_restore(flags); 102 local_irq_restore(flags);
110} 103}
111 104
@@ -124,7 +117,7 @@ static void sh4_flush_dcache_page(void *arg)
124 else 117 else
125#endif 118#endif
126 { 119 {
127 unsigned long phys = PHYSADDR(page_address(page)); 120 unsigned long phys = page_to_phys(page);
128 unsigned long addr = CACHE_OC_ADDRESS_ARRAY; 121 unsigned long addr = CACHE_OC_ADDRESS_ARRAY;
129 int i, n; 122 int i, n;
130 123
@@ -159,10 +152,27 @@ static void __uses_jump_to_uncached flush_icache_all(void)
159 local_irq_restore(flags); 152 local_irq_restore(flags);
160} 153}
161 154
162static inline void flush_dcache_all(void) 155static void flush_dcache_all(void)
163{ 156{
164 (*__flush_dcache_segment_fn)(0UL, boot_cpu_data.dcache.way_size); 157 unsigned long addr, end_addr, entry_offset;
165 wmb(); 158
159 end_addr = CACHE_OC_ADDRESS_ARRAY +
160 (current_cpu_data.dcache.sets <<
161 current_cpu_data.dcache.entry_shift) *
162 current_cpu_data.dcache.ways;
163
164 entry_offset = 1 << current_cpu_data.dcache.entry_shift;
165
166 for (addr = CACHE_OC_ADDRESS_ARRAY; addr < end_addr; ) {
167 __raw_writel(0, addr); addr += entry_offset;
168 __raw_writel(0, addr); addr += entry_offset;
169 __raw_writel(0, addr); addr += entry_offset;
170 __raw_writel(0, addr); addr += entry_offset;
171 __raw_writel(0, addr); addr += entry_offset;
172 __raw_writel(0, addr); addr += entry_offset;
173 __raw_writel(0, addr); addr += entry_offset;
174 __raw_writel(0, addr); addr += entry_offset;
175 }
166} 176}
167 177
168static void sh4_flush_cache_all(void *unused) 178static void sh4_flush_cache_all(void *unused)
@@ -171,89 +181,13 @@ static void sh4_flush_cache_all(void *unused)
171 flush_icache_all(); 181 flush_icache_all();
172} 182}
173 183
174static void __flush_cache_mm(struct mm_struct *mm, unsigned long start,
175 unsigned long end)
176{
177 unsigned long d = 0, p = start & PAGE_MASK;
178 unsigned long alias_mask = boot_cpu_data.dcache.alias_mask;
179 unsigned long n_aliases = boot_cpu_data.dcache.n_aliases;
180 unsigned long select_bit;
181 unsigned long all_aliases_mask;
182 unsigned long addr_offset;
183 pgd_t *dir;
184 pmd_t *pmd;
185 pud_t *pud;
186 pte_t *pte;
187 int i;
188
189 dir = pgd_offset(mm, p);
190 pud = pud_offset(dir, p);
191 pmd = pmd_offset(pud, p);
192 end = PAGE_ALIGN(end);
193
194 all_aliases_mask = (1 << n_aliases) - 1;
195
196 do {
197 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) {
198 p &= PMD_MASK;
199 p += PMD_SIZE;
200 pmd++;
201
202 continue;
203 }
204
205 pte = pte_offset_kernel(pmd, p);
206
207 do {
208 unsigned long phys;
209 pte_t entry = *pte;
210
211 if (!(pte_val(entry) & _PAGE_PRESENT)) {
212 pte++;
213 p += PAGE_SIZE;
214 continue;
215 }
216
217 phys = pte_val(entry) & PTE_PHYS_MASK;
218
219 if ((p ^ phys) & alias_mask) {
220 d |= 1 << ((p & alias_mask) >> PAGE_SHIFT);
221 d |= 1 << ((phys & alias_mask) >> PAGE_SHIFT);
222
223 if (d == all_aliases_mask)
224 goto loop_exit;
225 }
226
227 pte++;
228 p += PAGE_SIZE;
229 } while (p < end && ((unsigned long)pte & ~PAGE_MASK));
230 pmd++;
231 } while (p < end);
232
233loop_exit:
234 addr_offset = 0;
235 select_bit = 1;
236
237 for (i = 0; i < n_aliases; i++) {
238 if (d & select_bit) {
239 (*__flush_dcache_segment_fn)(addr_offset, PAGE_SIZE);
240 wmb();
241 }
242
243 select_bit <<= 1;
244 addr_offset += PAGE_SIZE;
245 }
246}
247
248/* 184/*
249 * Note : (RPC) since the caches are physically tagged, the only point 185 * Note : (RPC) since the caches are physically tagged, the only point
250 * of flush_cache_mm for SH-4 is to get rid of aliases from the 186 * of flush_cache_mm for SH-4 is to get rid of aliases from the
251 * D-cache. The assumption elsewhere, e.g. flush_cache_range, is that 187 * D-cache. The assumption elsewhere, e.g. flush_cache_range, is that
252 * lines can stay resident so long as the virtual address they were 188 * lines can stay resident so long as the virtual address they were
253 * accessed with (hence cache set) is in accord with the physical 189 * accessed with (hence cache set) is in accord with the physical
254 * address (i.e. tag). It's no different here. So I reckon we don't 190 * address (i.e. tag). It's no different here.
255 * need to flush the I-cache, since aliases don't matter for that. We
256 * should try that.
257 * 191 *
258 * Caller takes mm->mmap_sem. 192 * Caller takes mm->mmap_sem.
259 */ 193 */
@@ -264,33 +198,7 @@ static void sh4_flush_cache_mm(void *arg)
264 if (cpu_context(smp_processor_id(), mm) == NO_CONTEXT) 198 if (cpu_context(smp_processor_id(), mm) == NO_CONTEXT)
265 return; 199 return;
266 200
267 /* 201 flush_dcache_all();
268 * If cache is only 4k-per-way, there are never any 'aliases'. Since
269 * the cache is physically tagged, the data can just be left in there.
270 */
271 if (boot_cpu_data.dcache.n_aliases == 0)
272 return;
273
274 /*
275 * Don't bother groveling around the dcache for the VMA ranges
276 * if there are too many PTEs to make it worthwhile.
277 */
278 if (mm->nr_ptes >= MAX_DCACHE_PAGES)
279 flush_dcache_all();
280 else {
281 struct vm_area_struct *vma;
282
283 /*
284 * In this case there are reasonably sized ranges to flush,
285 * iterate through the VMA list and take care of any aliases.
286 */
287 for (vma = mm->mmap; vma; vma = vma->vm_next)
288 __flush_cache_mm(mm, vma->vm_start, vma->vm_end);
289 }
290
291 /* Only touch the icache if one of the VMAs has VM_EXEC set. */
292 if (mm->exec_vm)
293 flush_icache_all();
294} 202}
295 203
296/* 204/*
@@ -303,44 +211,62 @@ static void sh4_flush_cache_page(void *args)
303{ 211{
304 struct flusher_data *data = args; 212 struct flusher_data *data = args;
305 struct vm_area_struct *vma; 213 struct vm_area_struct *vma;
214 struct page *page;
306 unsigned long address, pfn, phys; 215 unsigned long address, pfn, phys;
307 unsigned int alias_mask; 216 int map_coherent = 0;
217 pgd_t *pgd;
218 pud_t *pud;
219 pmd_t *pmd;
220 pte_t *pte;
221 void *vaddr;
308 222
309 vma = data->vma; 223 vma = data->vma;
310 address = data->addr1; 224 address = data->addr1 & PAGE_MASK;
311 pfn = data->addr2; 225 pfn = data->addr2;
312 phys = pfn << PAGE_SHIFT; 226 phys = pfn << PAGE_SHIFT;
227 page = pfn_to_page(pfn);
313 228
314 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT) 229 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT)
315 return; 230 return;
316 231
317 alias_mask = boot_cpu_data.dcache.alias_mask; 232 pgd = pgd_offset(vma->vm_mm, address);
318 233 pud = pud_offset(pgd, address);
319 /* We only need to flush D-cache when we have alias */ 234 pmd = pmd_offset(pud, address);
320 if ((address^phys) & alias_mask) { 235 pte = pte_offset_kernel(pmd, address);
321 /* Loop 4K of the D-cache */ 236
322 flush_cache_one( 237 /* If the page isn't present, there is nothing to do here. */
323 CACHE_OC_ADDRESS_ARRAY | (address & alias_mask), 238 if (!(pte_val(*pte) & _PAGE_PRESENT))
324 phys); 239 return;
325 /* Loop another 4K of the D-cache */
326 flush_cache_one(
327 CACHE_OC_ADDRESS_ARRAY | (phys & alias_mask),
328 phys);
329 }
330 240
331 alias_mask = boot_cpu_data.icache.alias_mask; 241 if ((vma->vm_mm == current->active_mm))
332 if (vma->vm_flags & VM_EXEC) { 242 vaddr = NULL;
243 else {
333 /* 244 /*
334 * Evict entries from the portion of the cache from which code 245 * Use kmap_coherent or kmap_atomic to do flushes for
335 * may have been executed at this address (virtual). There's 246 * another ASID than the current one.
336 * no need to evict from the portion corresponding to the
337 * physical address as for the D-cache, because we know the
338 * kernel has never executed the code through its identity
339 * translation.
340 */ 247 */
341 flush_cache_one( 248 map_coherent = (current_cpu_data.dcache.n_aliases &&
342 CACHE_IC_ADDRESS_ARRAY | (address & alias_mask), 249 !test_bit(PG_dcache_dirty, &page->flags) &&
343 phys); 250 page_mapped(page));
251 if (map_coherent)
252 vaddr = kmap_coherent(page, address);
253 else
254 vaddr = kmap_atomic(page, KM_USER0);
255
256 address = (unsigned long)vaddr;
257 }
258
259 flush_cache_one(CACHE_OC_ADDRESS_ARRAY |
260 (address & shm_align_mask), phys);
261
262 if (vma->vm_flags & VM_EXEC)
263 flush_icache_all();
264
265 if (vaddr) {
266 if (map_coherent)
267 kunmap_coherent(vaddr);
268 else
269 kunmap_atomic(vaddr, KM_USER0);
344 } 270 }
345} 271}
346 272
@@ -373,24 +299,10 @@ static void sh4_flush_cache_range(void *args)
373 if (boot_cpu_data.dcache.n_aliases == 0) 299 if (boot_cpu_data.dcache.n_aliases == 0)
374 return; 300 return;
375 301
376 /* 302 flush_dcache_all();
377 * Don't bother with the lookup and alias check if we have a
378 * wide range to cover, just blow away the dcache in its
379 * entirety instead. -- PFM.
380 */
381 if (((end - start) >> PAGE_SHIFT) >= MAX_DCACHE_PAGES)
382 flush_dcache_all();
383 else
384 __flush_cache_mm(vma->vm_mm, start, end);
385 303
386 if (vma->vm_flags & VM_EXEC) { 304 if (vma->vm_flags & VM_EXEC)
387 /*
388 * TODO: Is this required??? Need to look at how I-cache
389 * coherency is assured when new programs are loaded to see if
390 * this matters.
391 */
392 flush_icache_all(); 305 flush_icache_all();
393 }
394} 306}
395 307
396/** 308/**
@@ -464,245 +376,6 @@ static void __flush_cache_one(unsigned long addr, unsigned long phys,
464 } while (--way_count != 0); 376 } while (--way_count != 0);
465} 377}
466 378
467/*
468 * Break the 1, 2 and 4 way variants of this out into separate functions to
469 * avoid nearly all the overhead of having the conditional stuff in the function
470 * bodies (+ the 1 and 2 way cases avoid saving any registers too).
471 *
472 * We want to eliminate unnecessary bus transactions, so this code uses
473 * a non-obvious technique.
474 *
475 * Loop over a cache way sized block of, one cache line at a time. For each
476 * line, use movca.a to cause the current cache line contents to be written
477 * back, but without reading anything from main memory. However this has the
478 * side effect that the cache is now caching that memory location. So follow
479 * this with a cache invalidate to mark the cache line invalid. And do all
480 * this with interrupts disabled, to avoid the cache line being accidently
481 * evicted while it is holding garbage.
482 *
483 * This also breaks in a number of circumstances:
484 * - if there are modifications to the region of memory just above
485 * empty_zero_page (for example because a breakpoint has been placed
486 * there), then these can be lost.
487 *
488 * This is because the the memory address which the cache temporarily
489 * caches in the above description is empty_zero_page. So the
490 * movca.l hits the cache (it is assumed that it misses, or at least
491 * isn't dirty), modifies the line and then invalidates it, losing the
492 * required change.
493 *
494 * - If caches are disabled or configured in write-through mode, then
495 * the movca.l writes garbage directly into memory.
496 */
497static void __flush_dcache_segment_writethrough(unsigned long start,
498 unsigned long extent_per_way)
499{
500 unsigned long addr;
501 int i;
502
503 addr = CACHE_OC_ADDRESS_ARRAY | (start & cpu_data->dcache.entry_mask);
504
505 while (extent_per_way) {
506 for (i = 0; i < cpu_data->dcache.ways; i++)
507 __raw_writel(0, addr + cpu_data->dcache.way_incr * i);
508
509 addr += cpu_data->dcache.linesz;
510 extent_per_way -= cpu_data->dcache.linesz;
511 }
512}
513
514static void __flush_dcache_segment_1way(unsigned long start,
515 unsigned long extent_per_way)
516{
517 unsigned long orig_sr, sr_with_bl;
518 unsigned long base_addr;
519 unsigned long way_incr, linesz, way_size;
520 struct cache_info *dcache;
521 register unsigned long a0, a0e;
522
523 asm volatile("stc sr, %0" : "=r" (orig_sr));
524 sr_with_bl = orig_sr | (1<<28);
525 base_addr = ((unsigned long)&empty_zero_page[0]);
526
527 /*
528 * The previous code aligned base_addr to 16k, i.e. the way_size of all
529 * existing SH-4 D-caches. Whilst I don't see a need to have this
530 * aligned to any better than the cache line size (which it will be
531 * anyway by construction), let's align it to at least the way_size of
532 * any existing or conceivable SH-4 D-cache. -- RPC
533 */
534 base_addr = ((base_addr >> 16) << 16);
535 base_addr |= start;
536
537 dcache = &boot_cpu_data.dcache;
538 linesz = dcache->linesz;
539 way_incr = dcache->way_incr;
540 way_size = dcache->way_size;
541
542 a0 = base_addr;
543 a0e = base_addr + extent_per_way;
544 do {
545 asm volatile("ldc %0, sr" : : "r" (sr_with_bl));
546 asm volatile("movca.l r0, @%0\n\t"
547 "ocbi @%0" : : "r" (a0));
548 a0 += linesz;
549 asm volatile("movca.l r0, @%0\n\t"
550 "ocbi @%0" : : "r" (a0));
551 a0 += linesz;
552 asm volatile("movca.l r0, @%0\n\t"
553 "ocbi @%0" : : "r" (a0));
554 a0 += linesz;
555 asm volatile("movca.l r0, @%0\n\t"
556 "ocbi @%0" : : "r" (a0));
557 asm volatile("ldc %0, sr" : : "r" (orig_sr));
558 a0 += linesz;
559 } while (a0 < a0e);
560}
561
562static void __flush_dcache_segment_2way(unsigned long start,
563 unsigned long extent_per_way)
564{
565 unsigned long orig_sr, sr_with_bl;
566 unsigned long base_addr;
567 unsigned long way_incr, linesz, way_size;
568 struct cache_info *dcache;
569 register unsigned long a0, a1, a0e;
570
571 asm volatile("stc sr, %0" : "=r" (orig_sr));
572 sr_with_bl = orig_sr | (1<<28);
573 base_addr = ((unsigned long)&empty_zero_page[0]);
574
575 /* See comment under 1-way above */
576 base_addr = ((base_addr >> 16) << 16);
577 base_addr |= start;
578
579 dcache = &boot_cpu_data.dcache;
580 linesz = dcache->linesz;
581 way_incr = dcache->way_incr;
582 way_size = dcache->way_size;
583
584 a0 = base_addr;
585 a1 = a0 + way_incr;
586 a0e = base_addr + extent_per_way;
587 do {
588 asm volatile("ldc %0, sr" : : "r" (sr_with_bl));
589 asm volatile("movca.l r0, @%0\n\t"
590 "movca.l r0, @%1\n\t"
591 "ocbi @%0\n\t"
592 "ocbi @%1" : :
593 "r" (a0), "r" (a1));
594 a0 += linesz;
595 a1 += linesz;
596 asm volatile("movca.l r0, @%0\n\t"
597 "movca.l r0, @%1\n\t"
598 "ocbi @%0\n\t"
599 "ocbi @%1" : :
600 "r" (a0), "r" (a1));
601 a0 += linesz;
602 a1 += linesz;
603 asm volatile("movca.l r0, @%0\n\t"
604 "movca.l r0, @%1\n\t"
605 "ocbi @%0\n\t"
606 "ocbi @%1" : :
607 "r" (a0), "r" (a1));
608 a0 += linesz;
609 a1 += linesz;
610 asm volatile("movca.l r0, @%0\n\t"
611 "movca.l r0, @%1\n\t"
612 "ocbi @%0\n\t"
613 "ocbi @%1" : :
614 "r" (a0), "r" (a1));
615 asm volatile("ldc %0, sr" : : "r" (orig_sr));
616 a0 += linesz;
617 a1 += linesz;
618 } while (a0 < a0e);
619}
620
621static void __flush_dcache_segment_4way(unsigned long start,
622 unsigned long extent_per_way)
623{
624 unsigned long orig_sr, sr_with_bl;
625 unsigned long base_addr;
626 unsigned long way_incr, linesz, way_size;
627 struct cache_info *dcache;
628 register unsigned long a0, a1, a2, a3, a0e;
629
630 asm volatile("stc sr, %0" : "=r" (orig_sr));
631 sr_with_bl = orig_sr | (1<<28);
632 base_addr = ((unsigned long)&empty_zero_page[0]);
633
634 /* See comment under 1-way above */
635 base_addr = ((base_addr >> 16) << 16);
636 base_addr |= start;
637
638 dcache = &boot_cpu_data.dcache;
639 linesz = dcache->linesz;
640 way_incr = dcache->way_incr;
641 way_size = dcache->way_size;
642
643 a0 = base_addr;
644 a1 = a0 + way_incr;
645 a2 = a1 + way_incr;
646 a3 = a2 + way_incr;
647 a0e = base_addr + extent_per_way;
648 do {
649 asm volatile("ldc %0, sr" : : "r" (sr_with_bl));
650 asm volatile("movca.l r0, @%0\n\t"
651 "movca.l r0, @%1\n\t"
652 "movca.l r0, @%2\n\t"
653 "movca.l r0, @%3\n\t"
654 "ocbi @%0\n\t"
655 "ocbi @%1\n\t"
656 "ocbi @%2\n\t"
657 "ocbi @%3\n\t" : :
658 "r" (a0), "r" (a1), "r" (a2), "r" (a3));
659 a0 += linesz;
660 a1 += linesz;
661 a2 += linesz;
662 a3 += linesz;
663 asm volatile("movca.l r0, @%0\n\t"
664 "movca.l r0, @%1\n\t"
665 "movca.l r0, @%2\n\t"
666 "movca.l r0, @%3\n\t"
667 "ocbi @%0\n\t"
668 "ocbi @%1\n\t"
669 "ocbi @%2\n\t"
670 "ocbi @%3\n\t" : :
671 "r" (a0), "r" (a1), "r" (a2), "r" (a3));
672 a0 += linesz;
673 a1 += linesz;
674 a2 += linesz;
675 a3 += linesz;
676 asm volatile("movca.l r0, @%0\n\t"
677 "movca.l r0, @%1\n\t"
678 "movca.l r0, @%2\n\t"
679 "movca.l r0, @%3\n\t"
680 "ocbi @%0\n\t"
681 "ocbi @%1\n\t"
682 "ocbi @%2\n\t"
683 "ocbi @%3\n\t" : :
684 "r" (a0), "r" (a1), "r" (a2), "r" (a3));
685 a0 += linesz;
686 a1 += linesz;
687 a2 += linesz;
688 a3 += linesz;
689 asm volatile("movca.l r0, @%0\n\t"
690 "movca.l r0, @%1\n\t"
691 "movca.l r0, @%2\n\t"
692 "movca.l r0, @%3\n\t"
693 "ocbi @%0\n\t"
694 "ocbi @%1\n\t"
695 "ocbi @%2\n\t"
696 "ocbi @%3\n\t" : :
697 "r" (a0), "r" (a1), "r" (a2), "r" (a3));
698 asm volatile("ldc %0, sr" : : "r" (orig_sr));
699 a0 += linesz;
700 a1 += linesz;
701 a2 += linesz;
702 a3 += linesz;
703 } while (a0 < a0e);
704}
705
706extern void __weak sh4__flush_region_init(void); 379extern void __weak sh4__flush_region_init(void);
707 380
708/* 381/*
@@ -710,32 +383,11 @@ extern void __weak sh4__flush_region_init(void);
710 */ 383 */
711void __init sh4_cache_init(void) 384void __init sh4_cache_init(void)
712{ 385{
713 unsigned int wt_enabled = !!(__raw_readl(CCR) & CCR_CACHE_WT);
714
715 printk("PVR=%08x CVR=%08x PRR=%08x\n", 386 printk("PVR=%08x CVR=%08x PRR=%08x\n",
716 ctrl_inl(CCN_PVR), 387 ctrl_inl(CCN_PVR),
717 ctrl_inl(CCN_CVR), 388 ctrl_inl(CCN_CVR),
718 ctrl_inl(CCN_PRR)); 389 ctrl_inl(CCN_PRR));
719 390
720 if (wt_enabled)
721 __flush_dcache_segment_fn = __flush_dcache_segment_writethrough;
722 else {
723 switch (boot_cpu_data.dcache.ways) {
724 case 1:
725 __flush_dcache_segment_fn = __flush_dcache_segment_1way;
726 break;
727 case 2:
728 __flush_dcache_segment_fn = __flush_dcache_segment_2way;
729 break;
730 case 4:
731 __flush_dcache_segment_fn = __flush_dcache_segment_4way;
732 break;
733 default:
734 panic("unknown number of cache ways\n");
735 break;
736 }
737 }
738
739 local_flush_icache_range = sh4_flush_icache_range; 391 local_flush_icache_range = sh4_flush_icache_range;
740 local_flush_dcache_page = sh4_flush_dcache_page; 392 local_flush_dcache_page = sh4_flush_dcache_page;
741 local_flush_cache_all = sh4_flush_cache_all; 393 local_flush_cache_all = sh4_flush_cache_all;
diff --git a/arch/sh/mm/cache-sh5.c b/arch/sh/mm/cache-sh5.c
index 467ff8e260f7..eb4cc4ec7952 100644
--- a/arch/sh/mm/cache-sh5.c
+++ b/arch/sh/mm/cache-sh5.c
@@ -563,7 +563,7 @@ static void sh5_flush_cache_page(void *args)
563 563
564static void sh5_flush_dcache_page(void *page) 564static void sh5_flush_dcache_page(void *page)
565{ 565{
566 sh64_dcache_purge_phy_page(page_to_phys(page)); 566 sh64_dcache_purge_phy_page(page_to_phys((struct page *)page));
567 wmb(); 567 wmb();
568} 568}
569 569
diff --git a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c
index 2601935eb589..f527fb70fce6 100644
--- a/arch/sh/mm/cache-sh7705.c
+++ b/arch/sh/mm/cache-sh7705.c
@@ -141,7 +141,7 @@ static void sh7705_flush_dcache_page(void *arg)
141 if (mapping && !mapping_mapped(mapping)) 141 if (mapping && !mapping_mapped(mapping))
142 set_bit(PG_dcache_dirty, &page->flags); 142 set_bit(PG_dcache_dirty, &page->flags);
143 else 143 else
144 __flush_dcache_page(PHYSADDR(page_address(page))); 144 __flush_dcache_page(__pa(page_address(page)));
145} 145}
146 146
147static void __uses_jump_to_uncached sh7705_flush_cache_all(void *args) 147static void __uses_jump_to_uncached sh7705_flush_cache_all(void *args)
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c
index a2dc7f9ecc51..e9415d3ea94a 100644
--- a/arch/sh/mm/cache.c
+++ b/arch/sh/mm/cache.c
@@ -27,8 +27,11 @@ void (*local_flush_icache_page)(void *args) = cache_noop;
27void (*local_flush_cache_sigtramp)(void *args) = cache_noop; 27void (*local_flush_cache_sigtramp)(void *args) = cache_noop;
28 28
29void (*__flush_wback_region)(void *start, int size); 29void (*__flush_wback_region)(void *start, int size);
30EXPORT_SYMBOL(__flush_wback_region);
30void (*__flush_purge_region)(void *start, int size); 31void (*__flush_purge_region)(void *start, int size);
32EXPORT_SYMBOL(__flush_purge_region);
31void (*__flush_invalidate_region)(void *start, int size); 33void (*__flush_invalidate_region)(void *start, int size);
34EXPORT_SYMBOL(__flush_invalidate_region);
32 35
33static inline void noop__flush_region(void *start, int size) 36static inline void noop__flush_region(void *start, int size)
34{ 37{
@@ -161,14 +164,21 @@ void flush_cache_all(void)
161{ 164{
162 cacheop_on_each_cpu(local_flush_cache_all, NULL, 1); 165 cacheop_on_each_cpu(local_flush_cache_all, NULL, 1);
163} 166}
167EXPORT_SYMBOL(flush_cache_all);
164 168
165void flush_cache_mm(struct mm_struct *mm) 169void flush_cache_mm(struct mm_struct *mm)
166{ 170{
171 if (boot_cpu_data.dcache.n_aliases == 0)
172 return;
173
167 cacheop_on_each_cpu(local_flush_cache_mm, mm, 1); 174 cacheop_on_each_cpu(local_flush_cache_mm, mm, 1);
168} 175}
169 176
170void flush_cache_dup_mm(struct mm_struct *mm) 177void flush_cache_dup_mm(struct mm_struct *mm)
171{ 178{
179 if (boot_cpu_data.dcache.n_aliases == 0)
180 return;
181
172 cacheop_on_each_cpu(local_flush_cache_dup_mm, mm, 1); 182 cacheop_on_each_cpu(local_flush_cache_dup_mm, mm, 1);
173} 183}
174 184
@@ -195,11 +205,13 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
195 205
196 cacheop_on_each_cpu(local_flush_cache_range, (void *)&data, 1); 206 cacheop_on_each_cpu(local_flush_cache_range, (void *)&data, 1);
197} 207}
208EXPORT_SYMBOL(flush_cache_range);
198 209
199void flush_dcache_page(struct page *page) 210void flush_dcache_page(struct page *page)
200{ 211{
201 cacheop_on_each_cpu(local_flush_dcache_page, page, 1); 212 cacheop_on_each_cpu(local_flush_dcache_page, page, 1);
202} 213}
214EXPORT_SYMBOL(flush_dcache_page);
203 215
204void flush_icache_range(unsigned long start, unsigned long end) 216void flush_icache_range(unsigned long start, unsigned long end)
205{ 217{
@@ -265,7 +277,11 @@ static void __init emit_cache_params(void)
265 277
266void __init cpu_cache_init(void) 278void __init cpu_cache_init(void)
267{ 279{
268 unsigned int cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE); 280 unsigned int cache_disabled = 0;
281
282#ifdef CCR
283 cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE);
284#endif
269 285
270 compute_alias(&boot_cpu_data.icache); 286 compute_alias(&boot_cpu_data.icache);
271 compute_alias(&boot_cpu_data.dcache); 287 compute_alias(&boot_cpu_data.dcache);
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index e098ec158ddb..902967e3f841 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -15,11 +15,15 @@
15#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
16#include <linux/dma-debug.h> 16#include <linux/dma-debug.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/module.h>
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19#include <asm/addrspace.h> 20#include <asm/addrspace.h>
20 21
21#define PREALLOC_DMA_DEBUG_ENTRIES 4096 22#define PREALLOC_DMA_DEBUG_ENTRIES 4096
22 23
24struct dma_map_ops *dma_ops;
25EXPORT_SYMBOL(dma_ops);
26
23static int __init dma_init(void) 27static int __init dma_init(void)
24{ 28{
25 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); 29 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
@@ -27,15 +31,12 @@ static int __init dma_init(void)
27} 31}
28fs_initcall(dma_init); 32fs_initcall(dma_init);
29 33
30void *dma_alloc_coherent(struct device *dev, size_t size, 34void *dma_generic_alloc_coherent(struct device *dev, size_t size,
31 dma_addr_t *dma_handle, gfp_t gfp) 35 dma_addr_t *dma_handle, gfp_t gfp)
32{ 36{
33 void *ret, *ret_nocache; 37 void *ret, *ret_nocache;
34 int order = get_order(size); 38 int order = get_order(size);
35 39
36 if (dma_alloc_from_coherent(dev, size, dma_handle, &ret))
37 return ret;
38
39 ret = (void *)__get_free_pages(gfp, order); 40 ret = (void *)__get_free_pages(gfp, order);
40 if (!ret) 41 if (!ret)
41 return NULL; 42 return NULL;
@@ -57,35 +58,26 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
57 58
58 *dma_handle = virt_to_phys(ret); 59 *dma_handle = virt_to_phys(ret);
59 60
60 debug_dma_alloc_coherent(dev, size, *dma_handle, ret_nocache);
61
62 return ret_nocache; 61 return ret_nocache;
63} 62}
64EXPORT_SYMBOL(dma_alloc_coherent);
65 63
66void dma_free_coherent(struct device *dev, size_t size, 64void dma_generic_free_coherent(struct device *dev, size_t size,
67 void *vaddr, dma_addr_t dma_handle) 65 void *vaddr, dma_addr_t dma_handle)
68{ 66{
69 int order = get_order(size); 67 int order = get_order(size);
70 unsigned long pfn = dma_handle >> PAGE_SHIFT; 68 unsigned long pfn = dma_handle >> PAGE_SHIFT;
71 int k; 69 int k;
72 70
73 WARN_ON(irqs_disabled()); /* for portability */
74
75 if (dma_release_from_coherent(dev, order, vaddr))
76 return;
77
78 debug_dma_free_coherent(dev, size, vaddr, dma_handle);
79 for (k = 0; k < (1 << order); k++) 71 for (k = 0; k < (1 << order); k++)
80 __free_pages(pfn_to_page(pfn + k), 0); 72 __free_pages(pfn_to_page(pfn + k), 0);
73
81 iounmap(vaddr); 74 iounmap(vaddr);
82} 75}
83EXPORT_SYMBOL(dma_free_coherent);
84 76
85void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 77void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
86 enum dma_data_direction direction) 78 enum dma_data_direction direction)
87{ 79{
88#ifdef CONFIG_CPU_SH5 80#if defined(CONFIG_CPU_SH5) || defined(CONFIG_PMB)
89 void *p1addr = vaddr; 81 void *p1addr = vaddr;
90#else 82#else
91 void *p1addr = (void*) P1SEGADDR((unsigned long)vaddr); 83 void *p1addr = (void*) P1SEGADDR((unsigned long)vaddr);
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 8173e38afd38..432acd07e76a 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -15,6 +15,7 @@
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/dma-mapping.h>
18#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
19#include <asm/tlb.h> 20#include <asm/tlb.h>
20#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
@@ -186,11 +187,21 @@ void __init paging_init(void)
186 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start)); 187 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
187} 188}
188 189
190/*
191 * Early initialization for any I/O MMUs we might have.
192 */
193static void __init iommu_init(void)
194{
195 no_iommu_init();
196}
197
189void __init mem_init(void) 198void __init mem_init(void)
190{ 199{
191 int codesize, datasize, initsize; 200 int codesize, datasize, initsize;
192 int nid; 201 int nid;
193 202
203 iommu_init();
204
194 num_physpages = 0; 205 num_physpages = 0;
195 high_memory = NULL; 206 high_memory = NULL;
196 207
@@ -323,4 +334,12 @@ int memory_add_physaddr_to_nid(u64 addr)
323} 334}
324EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); 335EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
325#endif 336#endif
337
326#endif /* CONFIG_MEMORY_HOTPLUG */ 338#endif /* CONFIG_MEMORY_HOTPLUG */
339
340#ifdef CONFIG_PMB
341int __in_29bit_mode(void)
342{
343 return !(ctrl_inl(PMB_PASCR) & PASCR_SE);
344}
345#endif /* CONFIG_PMB */
diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c
index a86eaa9d75a5..2141befb4f91 100644
--- a/arch/sh/mm/ioremap_32.c
+++ b/arch/sh/mm/ioremap_32.c
@@ -33,10 +33,10 @@
33 * have to convert them into an offset in a page-aligned mapping, but the 33 * have to convert them into an offset in a page-aligned mapping, but the
34 * caller shouldn't need to know that small detail. 34 * caller shouldn't need to know that small detail.
35 */ 35 */
36void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, 36void __iomem *__ioremap_caller(unsigned long phys_addr, unsigned long size,
37 unsigned long flags) 37 unsigned long flags, void *caller)
38{ 38{
39 struct vm_struct * area; 39 struct vm_struct *area;
40 unsigned long offset, last_addr, addr, orig_addr; 40 unsigned long offset, last_addr, addr, orig_addr;
41 pgprot_t pgprot; 41 pgprot_t pgprot;
42 42
@@ -67,7 +67,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
67 /* 67 /*
68 * Ok, go for it.. 68 * Ok, go for it..
69 */ 69 */
70 area = get_vm_area(size, VM_IOREMAP); 70 area = get_vm_area_caller(size, VM_IOREMAP, caller);
71 if (!area) 71 if (!area)
72 return NULL; 72 return NULL;
73 area->phys_addr = phys_addr; 73 area->phys_addr = phys_addr;
@@ -103,7 +103,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
103 103
104 return (void __iomem *)(offset + (char *)orig_addr); 104 return (void __iomem *)(offset + (char *)orig_addr);
105} 105}
106EXPORT_SYMBOL(__ioremap); 106EXPORT_SYMBOL(__ioremap_caller);
107 107
108void __iounmap(void __iomem *addr) 108void __iounmap(void __iomem *addr)
109{ 109{
diff --git a/arch/sh/mm/ioremap_64.c b/arch/sh/mm/ioremap_64.c
index b16843d02b76..ef434657d428 100644
--- a/arch/sh/mm/ioremap_64.c
+++ b/arch/sh/mm/ioremap_64.c
@@ -258,15 +258,15 @@ static void shmedia_unmapioaddr(unsigned long vaddr)
258 pte_clear(&init_mm, vaddr, ptep); 258 pte_clear(&init_mm, vaddr, ptep);
259} 259}
260 260
261void __iomem *__ioremap(unsigned long offset, unsigned long size, 261void __iomem *__ioremap_caller(unsigned long offset, unsigned long size,
262 unsigned long flags) 262 unsigned long flags, void *caller)
263{ 263{
264 char name[14]; 264 char name[14];
265 265
266 sprintf(name, "phys_%08x", (u32)offset); 266 sprintf(name, "phys_%08x", (u32)offset);
267 return shmedia_alloc_io(offset, size, name, flags); 267 return shmedia_alloc_io(offset, size, name, flags);
268} 268}
269EXPORT_SYMBOL(__ioremap); 269EXPORT_SYMBOL(__ioremap_caller);
270 270
271void __iounmap(void __iomem *virtual) 271void __iounmap(void __iomem *virtual)
272{ 272{
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c
index 16e01b5fed04..15d74ea42094 100644
--- a/arch/sh/mm/kmap.c
+++ b/arch/sh/mm/kmap.c
@@ -39,7 +39,9 @@ void *kmap_coherent(struct page *page, unsigned long addr)
39 pagefault_disable(); 39 pagefault_disable();
40 40
41 idx = FIX_CMAP_END - 41 idx = FIX_CMAP_END -
42 ((addr & current_cpu_data.dcache.alias_mask) >> PAGE_SHIFT); 42 (((addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1)) +
43 (FIX_N_COLOURS * smp_processor_id()));
44
43 vaddr = __fix_to_virt(idx); 45 vaddr = __fix_to_virt(idx);
44 46
45 BUG_ON(!pte_none(*(kmap_coherent_pte - idx))); 47 BUG_ON(!pte_none(*(kmap_coherent_pte - idx)));
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
index d2984fa42d3d..afeb710ec5c3 100644
--- a/arch/sh/mm/mmap.c
+++ b/arch/sh/mm/mmap.c
@@ -54,7 +54,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
54 /* We do not accept a shared mapping if it would violate 54 /* We do not accept a shared mapping if it would violate
55 * cache aliasing constraints. 55 * cache aliasing constraints.
56 */ 56 */
57 if ((flags & MAP_SHARED) && (addr & shm_align_mask)) 57 if ((flags & MAP_SHARED) &&
58 ((addr - (pgoff << PAGE_SHIFT)) & shm_align_mask))
58 return -EINVAL; 59 return -EINVAL;
59 return addr; 60 return addr;
60 } 61 }
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
index 9b784fdb947c..422e92721878 100644
--- a/arch/sh/mm/numa.c
+++ b/arch/sh/mm/numa.c
@@ -28,7 +28,7 @@ void __init setup_memory(void)
28{ 28{
29 unsigned long free_pfn = PFN_UP(__pa(_end)); 29 unsigned long free_pfn = PFN_UP(__pa(_end));
30 u64 base = min_low_pfn << PAGE_SHIFT; 30 u64 base = min_low_pfn << PAGE_SHIFT;
31 u64 size = (max_low_pfn << PAGE_SHIFT) - min_low_pfn; 31 u64 size = (max_low_pfn << PAGE_SHIFT) - base;
32 32
33 lmb_add(base, size); 33 lmb_add(base, size);
34 34
@@ -38,6 +38,15 @@ void __init setup_memory(void)
38 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET)); 38 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET));
39 39
40 /* 40 /*
41 * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET.
42 */
43 if (CONFIG_ZERO_PAGE_OFFSET != 0)
44 lmb_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET);
45
46 lmb_analyze();
47 lmb_dump_all();
48
49 /*
41 * Node 0 sets up its pgdat at the first available pfn, 50 * Node 0 sets up its pgdat at the first available pfn,
42 * and bumps it up before setting up the bootmem allocator. 51 * and bumps it up before setting up the bootmem allocator.
43 */ 52 */
@@ -60,7 +69,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
60 unsigned long bootmem_paddr; 69 unsigned long bootmem_paddr;
61 70
62 /* Don't allow bogus node assignment */ 71 /* Don't allow bogus node assignment */
63 BUG_ON(nid > MAX_NUMNODES || nid == 0); 72 BUG_ON(nid > MAX_NUMNODES || nid <= 0);
64 73
65 start_pfn = start >> PAGE_SHIFT; 74 start_pfn = start >> PAGE_SHIFT;
66 end_pfn = end >> PAGE_SHIFT; 75 end_pfn = end >> PAGE_SHIFT;
@@ -71,7 +80,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
71 80
72 /* Node-local pgdat */ 81 /* Node-local pgdat */
73 NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data), 82 NODE_DATA(nid) = __va(lmb_alloc_base(sizeof(struct pglist_data),
74 SMP_CACHE_BYTES, end_pfn)); 83 SMP_CACHE_BYTES, end));
75 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 84 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
76 85
77 NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; 86 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
@@ -81,7 +90,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
81 /* Node-local bootmap */ 90 /* Node-local bootmap */
82 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 91 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
83 bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT, 92 bootmem_paddr = lmb_alloc_base(bootmap_pages << PAGE_SHIFT,
84 PAGE_SIZE, end_pfn); 93 PAGE_SIZE, end);
85 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT, 94 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT,
86 start_pfn, end_pfn); 95 start_pfn, end_pfn);
87 96
diff --git a/arch/sh/mm/pmb-fixed.c b/arch/sh/mm/pmb-fixed.c
deleted file mode 100644
index 43c8eac4d8a1..000000000000
--- a/arch/sh/mm/pmb-fixed.c
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * arch/sh/mm/fixed_pmb.c
3 *
4 * Copyright (C) 2009 Renesas Solutions Corp.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/init.h>
11#include <linux/mm.h>
12#include <linux/io.h>
13#include <asm/mmu.h>
14#include <asm/mmu_context.h>
15
16static int __uses_jump_to_uncached fixed_pmb_init(void)
17{
18 int i;
19 unsigned long addr, data;
20
21 jump_to_uncached();
22
23 for (i = 0; i < PMB_ENTRY_MAX; i++) {
24 addr = PMB_DATA + (i << PMB_E_SHIFT);
25 data = ctrl_inl(addr);
26 if (!(data & PMB_V))
27 continue;
28
29 if (data & PMB_C) {
30#if defined(CONFIG_CACHE_WRITETHROUGH)
31 data |= PMB_WT;
32#elif defined(CONFIG_CACHE_WRITEBACK)
33 data &= ~PMB_WT;
34#else
35 data &= ~(PMB_C | PMB_WT);
36#endif
37 }
38 ctrl_outl(data, addr);
39 }
40
41 back_to_cached();
42
43 return 0;
44}
45arch_initcall(fixed_pmb_init);
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index aade31102112..280f6a166035 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -35,29 +35,9 @@
35 35
36static void __pmb_unmap(struct pmb_entry *); 36static void __pmb_unmap(struct pmb_entry *);
37 37
38static struct kmem_cache *pmb_cache; 38static struct pmb_entry pmb_entry_list[NR_PMB_ENTRIES];
39static unsigned long pmb_map; 39static unsigned long pmb_map;
40 40
41static struct pmb_entry pmb_init_map[] = {
42 /* vpn ppn flags (ub/sz/c/wt) */
43
44 /* P1 Section Mappings */
45 { 0x80000000, 0x00000000, PMB_SZ_64M | PMB_C, },
46 { 0x84000000, 0x04000000, PMB_SZ_64M | PMB_C, },
47 { 0x88000000, 0x08000000, PMB_SZ_128M | PMB_C, },
48 { 0x90000000, 0x10000000, PMB_SZ_64M | PMB_C, },
49 { 0x94000000, 0x14000000, PMB_SZ_64M | PMB_C, },
50 { 0x98000000, 0x18000000, PMB_SZ_64M | PMB_C, },
51
52 /* P2 Section Mappings */
53 { 0xa0000000, 0x00000000, PMB_UB | PMB_SZ_64M | PMB_WT, },
54 { 0xa4000000, 0x04000000, PMB_UB | PMB_SZ_64M | PMB_WT, },
55 { 0xa8000000, 0x08000000, PMB_UB | PMB_SZ_128M | PMB_WT, },
56 { 0xb0000000, 0x10000000, PMB_UB | PMB_SZ_64M | PMB_WT, },
57 { 0xb4000000, 0x14000000, PMB_UB | PMB_SZ_64M | PMB_WT, },
58 { 0xb8000000, 0x18000000, PMB_UB | PMB_SZ_64M | PMB_WT, },
59};
60
61static inline unsigned long mk_pmb_entry(unsigned int entry) 41static inline unsigned long mk_pmb_entry(unsigned int entry)
62{ 42{
63 return (entry & PMB_E_MASK) << PMB_E_SHIFT; 43 return (entry & PMB_E_MASK) << PMB_E_SHIFT;
@@ -73,81 +53,68 @@ static inline unsigned long mk_pmb_data(unsigned int entry)
73 return mk_pmb_entry(entry) | PMB_DATA; 53 return mk_pmb_entry(entry) | PMB_DATA;
74} 54}
75 55
76static DEFINE_SPINLOCK(pmb_list_lock); 56static int pmb_alloc_entry(void)
77static struct pmb_entry *pmb_list;
78
79static inline void pmb_list_add(struct pmb_entry *pmbe)
80{ 57{
81 struct pmb_entry **p, *tmp; 58 unsigned int pos;
82 59
83 p = &pmb_list; 60repeat:
84 while ((tmp = *p) != NULL) 61 pos = find_first_zero_bit(&pmb_map, NR_PMB_ENTRIES);
85 p = &tmp->next;
86 62
87 pmbe->next = tmp; 63 if (unlikely(pos > NR_PMB_ENTRIES))
88 *p = pmbe; 64 return -ENOSPC;
89}
90 65
91static inline void pmb_list_del(struct pmb_entry *pmbe) 66 if (test_and_set_bit(pos, &pmb_map))
92{ 67 goto repeat;
93 struct pmb_entry **p, *tmp;
94 68
95 for (p = &pmb_list; (tmp = *p); p = &tmp->next) 69 return pos;
96 if (tmp == pmbe) {
97 *p = tmp->next;
98 return;
99 }
100} 70}
101 71
102struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn, 72static struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
103 unsigned long flags) 73 unsigned long flags, int entry)
104{ 74{
105 struct pmb_entry *pmbe; 75 struct pmb_entry *pmbe;
76 int pos;
77
78 if (entry == PMB_NO_ENTRY) {
79 pos = pmb_alloc_entry();
80 if (pos < 0)
81 return ERR_PTR(pos);
82 } else {
83 if (test_bit(entry, &pmb_map))
84 return ERR_PTR(-ENOSPC);
85 pos = entry;
86 }
106 87
107 pmbe = kmem_cache_alloc(pmb_cache, GFP_KERNEL); 88 pmbe = &pmb_entry_list[pos];
108 if (!pmbe) 89 if (!pmbe)
109 return ERR_PTR(-ENOMEM); 90 return ERR_PTR(-ENOMEM);
110 91
111 pmbe->vpn = vpn; 92 pmbe->vpn = vpn;
112 pmbe->ppn = ppn; 93 pmbe->ppn = ppn;
113 pmbe->flags = flags; 94 pmbe->flags = flags;
114 95 pmbe->entry = pos;
115 spin_lock_irq(&pmb_list_lock);
116 pmb_list_add(pmbe);
117 spin_unlock_irq(&pmb_list_lock);
118 96
119 return pmbe; 97 return pmbe;
120} 98}
121 99
122void pmb_free(struct pmb_entry *pmbe) 100static void pmb_free(struct pmb_entry *pmbe)
123{ 101{
124 spin_lock_irq(&pmb_list_lock); 102 int pos = pmbe->entry;
125 pmb_list_del(pmbe);
126 spin_unlock_irq(&pmb_list_lock);
127 103
128 kmem_cache_free(pmb_cache, pmbe); 104 pmbe->vpn = 0;
105 pmbe->ppn = 0;
106 pmbe->flags = 0;
107 pmbe->entry = 0;
108
109 clear_bit(pos, &pmb_map);
129} 110}
130 111
131/* 112/*
132 * Must be in P2 for __set_pmb_entry() 113 * Must be in P2 for __set_pmb_entry()
133 */ 114 */
134int __set_pmb_entry(unsigned long vpn, unsigned long ppn, 115static void __set_pmb_entry(unsigned long vpn, unsigned long ppn,
135 unsigned long flags, int *entry) 116 unsigned long flags, int pos)
136{ 117{
137 unsigned int pos = *entry;
138
139 if (unlikely(pos == PMB_NO_ENTRY))
140 pos = find_first_zero_bit(&pmb_map, NR_PMB_ENTRIES);
141
142repeat:
143 if (unlikely(pos > NR_PMB_ENTRIES))
144 return -ENOSPC;
145
146 if (test_and_set_bit(pos, &pmb_map)) {
147 pos = find_first_zero_bit(&pmb_map, NR_PMB_ENTRIES);
148 goto repeat;
149 }
150
151 ctrl_outl(vpn | PMB_V, mk_pmb_addr(pos)); 118 ctrl_outl(vpn | PMB_V, mk_pmb_addr(pos));
152 119
153#ifdef CONFIG_CACHE_WRITETHROUGH 120#ifdef CONFIG_CACHE_WRITETHROUGH
@@ -161,35 +128,21 @@ repeat:
161#endif 128#endif
162 129
163 ctrl_outl(ppn | flags | PMB_V, mk_pmb_data(pos)); 130 ctrl_outl(ppn | flags | PMB_V, mk_pmb_data(pos));
164
165 *entry = pos;
166
167 return 0;
168} 131}
169 132
170int __uses_jump_to_uncached set_pmb_entry(struct pmb_entry *pmbe) 133static void __uses_jump_to_uncached set_pmb_entry(struct pmb_entry *pmbe)
171{ 134{
172 int ret;
173
174 jump_to_uncached(); 135 jump_to_uncached();
175 ret = __set_pmb_entry(pmbe->vpn, pmbe->ppn, pmbe->flags, &pmbe->entry); 136 __set_pmb_entry(pmbe->vpn, pmbe->ppn, pmbe->flags, pmbe->entry);
176 back_to_cached(); 137 back_to_cached();
177
178 return ret;
179} 138}
180 139
181void __uses_jump_to_uncached clear_pmb_entry(struct pmb_entry *pmbe) 140static void __uses_jump_to_uncached clear_pmb_entry(struct pmb_entry *pmbe)
182{ 141{
183 unsigned int entry = pmbe->entry; 142 unsigned int entry = pmbe->entry;
184 unsigned long addr; 143 unsigned long addr;
185 144
186 /* 145 if (unlikely(entry >= NR_PMB_ENTRIES))
187 * Don't allow clearing of wired init entries, P1 or P2 access
188 * without a corresponding mapping in the PMB will lead to reset
189 * by the TLB.
190 */
191 if (unlikely(entry < ARRAY_SIZE(pmb_init_map) ||
192 entry >= NR_PMB_ENTRIES))
193 return; 146 return;
194 147
195 jump_to_uncached(); 148 jump_to_uncached();
@@ -202,8 +155,6 @@ void __uses_jump_to_uncached clear_pmb_entry(struct pmb_entry *pmbe)
202 ctrl_outl(ctrl_inl(addr) & ~PMB_V, addr); 155 ctrl_outl(ctrl_inl(addr) & ~PMB_V, addr);
203 156
204 back_to_cached(); 157 back_to_cached();
205
206 clear_bit(entry, &pmb_map);
207} 158}
208 159
209 160
@@ -239,23 +190,17 @@ long pmb_remap(unsigned long vaddr, unsigned long phys,
239 190
240again: 191again:
241 for (i = 0; i < ARRAY_SIZE(pmb_sizes); i++) { 192 for (i = 0; i < ARRAY_SIZE(pmb_sizes); i++) {
242 int ret;
243
244 if (size < pmb_sizes[i].size) 193 if (size < pmb_sizes[i].size)
245 continue; 194 continue;
246 195
247 pmbe = pmb_alloc(vaddr, phys, pmb_flags | pmb_sizes[i].flag); 196 pmbe = pmb_alloc(vaddr, phys, pmb_flags | pmb_sizes[i].flag,
197 PMB_NO_ENTRY);
248 if (IS_ERR(pmbe)) { 198 if (IS_ERR(pmbe)) {
249 err = PTR_ERR(pmbe); 199 err = PTR_ERR(pmbe);
250 goto out; 200 goto out;
251 } 201 }
252 202
253 ret = set_pmb_entry(pmbe); 203 set_pmb_entry(pmbe);
254 if (ret != 0) {
255 pmb_free(pmbe);
256 err = -EBUSY;
257 goto out;
258 }
259 204
260 phys += pmb_sizes[i].size; 205 phys += pmb_sizes[i].size;
261 vaddr += pmb_sizes[i].size; 206 vaddr += pmb_sizes[i].size;
@@ -292,11 +237,16 @@ out:
292 237
293void pmb_unmap(unsigned long addr) 238void pmb_unmap(unsigned long addr)
294{ 239{
295 struct pmb_entry **p, *pmbe; 240 struct pmb_entry *pmbe = NULL;
241 int i;
296 242
297 for (p = &pmb_list; (pmbe = *p); p = &pmbe->next) 243 for (i = 0; i < ARRAY_SIZE(pmb_entry_list); i++) {
298 if (pmbe->vpn == addr) 244 if (test_bit(i, &pmb_map)) {
299 break; 245 pmbe = &pmb_entry_list[i];
246 if (pmbe->vpn == addr)
247 break;
248 }
249 }
300 250
301 if (unlikely(!pmbe)) 251 if (unlikely(!pmbe))
302 return; 252 return;
@@ -306,13 +256,22 @@ void pmb_unmap(unsigned long addr)
306 256
307static void __pmb_unmap(struct pmb_entry *pmbe) 257static void __pmb_unmap(struct pmb_entry *pmbe)
308{ 258{
309 WARN_ON(!test_bit(pmbe->entry, &pmb_map)); 259 BUG_ON(!test_bit(pmbe->entry, &pmb_map));
310 260
311 do { 261 do {
312 struct pmb_entry *pmblink = pmbe; 262 struct pmb_entry *pmblink = pmbe;
313 263
314 if (pmbe->entry != PMB_NO_ENTRY) 264 /*
315 clear_pmb_entry(pmbe); 265 * We may be called before this pmb_entry has been
266 * entered into the PMB table via set_pmb_entry(), but
267 * that's OK because we've allocated a unique slot for
268 * this entry in pmb_alloc() (even if we haven't filled
269 * it yet).
270 *
271 * Therefore, calling clear_pmb_entry() is safe as no
272 * other mapping can be using that slot.
273 */
274 clear_pmb_entry(pmbe);
316 275
317 pmbe = pmblink->link; 276 pmbe = pmblink->link;
318 277
@@ -320,42 +279,34 @@ static void __pmb_unmap(struct pmb_entry *pmbe)
320 } while (pmbe); 279 } while (pmbe);
321} 280}
322 281
323static void pmb_cache_ctor(void *pmb) 282#ifdef CONFIG_PMB
283int __uses_jump_to_uncached pmb_init(void)
324{ 284{
325 struct pmb_entry *pmbe = pmb; 285 unsigned int i;
326 286 long size, ret;
327 memset(pmb, 0, sizeof(struct pmb_entry));
328
329 pmbe->entry = PMB_NO_ENTRY;
330}
331
332static int __uses_jump_to_uncached pmb_init(void)
333{
334 unsigned int nr_entries = ARRAY_SIZE(pmb_init_map);
335 unsigned int entry, i;
336
337 BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
338
339 pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
340 SLAB_PANIC, pmb_cache_ctor);
341 287
342 jump_to_uncached(); 288 jump_to_uncached();
343 289
344 /* 290 /*
345 * Ordering is important, P2 must be mapped in the PMB before we 291 * Insert PMB entries for the P1 and P2 areas so that, after
346 * can set PMB.SE, and P1 must be mapped before we jump back to 292 * we've switched the MMU to 32-bit mode, the semantics of P1
347 * P1 space. 293 * and P2 are the same as in 29-bit mode, e.g.
294 *
295 * P1 - provides a cached window onto physical memory
296 * P2 - provides an uncached window onto physical memory
348 */ 297 */
349 for (entry = 0; entry < nr_entries; entry++) { 298 size = __MEMORY_START + __MEMORY_SIZE;
350 struct pmb_entry *pmbe = pmb_init_map + entry;
351 299
352 __set_pmb_entry(pmbe->vpn, pmbe->ppn, pmbe->flags, &entry); 300 ret = pmb_remap(P1SEG, 0x00000000, size, PMB_C);
353 } 301 BUG_ON(ret != size);
302
303 ret = pmb_remap(P2SEG, 0x00000000, size, PMB_WT | PMB_UB);
304 BUG_ON(ret != size);
354 305
355 ctrl_outl(0, PMB_IRMCR); 306 ctrl_outl(0, PMB_IRMCR);
356 307
357 /* PMB.SE and UB[7] */ 308 /* PMB.SE and UB[7] */
358 ctrl_outl((1 << 31) | (1 << 7), PMB_PASCR); 309 ctrl_outl(PASCR_SE | (1 << 7), PMB_PASCR);
359 310
360 /* Flush out the TLB */ 311 /* Flush out the TLB */
361 i = ctrl_inl(MMUCR); 312 i = ctrl_inl(MMUCR);
@@ -366,7 +317,53 @@ static int __uses_jump_to_uncached pmb_init(void)
366 317
367 return 0; 318 return 0;
368} 319}
369arch_initcall(pmb_init); 320#else
321int __uses_jump_to_uncached pmb_init(void)
322{
323 int i;
324 unsigned long addr, data;
325
326 jump_to_uncached();
327
328 for (i = 0; i < PMB_ENTRY_MAX; i++) {
329 struct pmb_entry *pmbe;
330 unsigned long vpn, ppn, flags;
331
332 addr = PMB_DATA + (i << PMB_E_SHIFT);
333 data = ctrl_inl(addr);
334 if (!(data & PMB_V))
335 continue;
336
337 if (data & PMB_C) {
338#if defined(CONFIG_CACHE_WRITETHROUGH)
339 data |= PMB_WT;
340#elif defined(CONFIG_CACHE_WRITEBACK)
341 data &= ~PMB_WT;
342#else
343 data &= ~(PMB_C | PMB_WT);
344#endif
345 }
346 ctrl_outl(data, addr);
347
348 ppn = data & PMB_PFN_MASK;
349
350 flags = data & (PMB_C | PMB_WT | PMB_UB);
351 flags |= data & PMB_SZ_MASK;
352
353 addr = PMB_ADDR + (i << PMB_E_SHIFT);
354 data = ctrl_inl(addr);
355
356 vpn = data & PMB_PFN_MASK;
357
358 pmbe = pmb_alloc(vpn, ppn, flags, i);
359 WARN_ON(IS_ERR(pmbe));
360 }
361
362 back_to_cached();
363
364 return 0;
365}
366#endif /* CONFIG_PMB */
370 367
371static int pmb_seq_show(struct seq_file *file, void *iter) 368static int pmb_seq_show(struct seq_file *file, void *iter)
372{ 369{
@@ -434,15 +431,18 @@ postcore_initcall(pmb_debugfs_init);
434static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) 431static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state)
435{ 432{
436 static pm_message_t prev_state; 433 static pm_message_t prev_state;
434 int i;
437 435
438 /* Restore the PMB after a resume from hibernation */ 436 /* Restore the PMB after a resume from hibernation */
439 if (state.event == PM_EVENT_ON && 437 if (state.event == PM_EVENT_ON &&
440 prev_state.event == PM_EVENT_FREEZE) { 438 prev_state.event == PM_EVENT_FREEZE) {
441 struct pmb_entry *pmbe; 439 struct pmb_entry *pmbe;
442 spin_lock_irq(&pmb_list_lock); 440 for (i = 0; i < ARRAY_SIZE(pmb_entry_list); i++) {
443 for (pmbe = pmb_list; pmbe; pmbe = pmbe->next) 441 if (test_bit(i, &pmb_map)) {
444 set_pmb_entry(pmbe); 442 pmbe = &pmb_entry_list[i];
445 spin_unlock_irq(&pmb_list_lock); 443 set_pmb_entry(pmbe);
444 }
445 }
446 } 446 }
447 prev_state = state; 447 prev_state = state;
448 return 0; 448 return 0;
diff --git a/arch/sh/oprofile/Makefile b/arch/sh/oprofile/Makefile
index 8e6eec91c14c..4886c5c1786c 100644
--- a/arch/sh/oprofile/Makefile
+++ b/arch/sh/oprofile/Makefile
@@ -7,7 +7,3 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
7 timer_int.o ) 7 timer_int.o )
8 8
9oprofile-y := $(DRIVER_OBJS) common.o backtrace.o 9oprofile-y := $(DRIVER_OBJS) common.o backtrace.o
10
11oprofile-$(CONFIG_CPU_SUBTYPE_SH7750S) += op_model_sh7750.o
12oprofile-$(CONFIG_CPU_SUBTYPE_SH7750) += op_model_sh7750.o
13oprofile-$(CONFIG_CPU_SUBTYPE_SH7091) += op_model_sh7750.o
diff --git a/arch/sh/oprofile/common.c b/arch/sh/oprofile/common.c
index 44f4e31c6d63..ac604937f3ee 100644
--- a/arch/sh/oprofile/common.c
+++ b/arch/sh/oprofile/common.c
@@ -20,9 +20,6 @@
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include "op_impl.h" 21#include "op_impl.h"
22 22
23extern struct op_sh_model op_model_sh7750_ops __weak;
24extern struct op_sh_model op_model_sh4a_ops __weak;
25
26static struct op_sh_model *model; 23static struct op_sh_model *model;
27 24
28static struct op_counter_config ctr[20]; 25static struct op_counter_config ctr[20];
@@ -94,33 +91,14 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
94 */ 91 */
95 ops->backtrace = sh_backtrace; 92 ops->backtrace = sh_backtrace;
96 93
97 switch (current_cpu_data.type) { 94 /*
98 /* SH-4 types */ 95 * XXX
99 case CPU_SH7750: 96 *
100 case CPU_SH7750S: 97 * All of the SH7750/SH-4A counters have been converted to perf,
101 lmodel = &op_model_sh7750_ops; 98 * this infrastructure hook is left for other users until they've
102 break; 99 * had a chance to convert over, at which point all of this
103 100 * will be deleted.
104 /* SH-4A types */ 101 */
105 case CPU_SH7763:
106 case CPU_SH7770:
107 case CPU_SH7780:
108 case CPU_SH7781:
109 case CPU_SH7785:
110 case CPU_SH7786:
111 case CPU_SH7723:
112 case CPU_SH7724:
113 case CPU_SHX3:
114 lmodel = &op_model_sh4a_ops;
115 break;
116
117 /* SH4AL-DSP types */
118 case CPU_SH7343:
119 case CPU_SH7722:
120 case CPU_SH7366:
121 lmodel = &op_model_sh4a_ops;
122 break;
123 }
124 102
125 if (!lmodel) 103 if (!lmodel)
126 return -ENODEV; 104 return -ENODEV;
diff --git a/arch/sh/oprofile/op_impl.h b/arch/sh/oprofile/op_impl.h
index 4d509975eba6..1244479ceb29 100644
--- a/arch/sh/oprofile/op_impl.h
+++ b/arch/sh/oprofile/op_impl.h
@@ -6,7 +6,7 @@ struct op_counter_config {
6 unsigned long enabled; 6 unsigned long enabled;
7 unsigned long event; 7 unsigned long event;
8 8
9 unsigned long long count; 9 unsigned long count;
10 10
11 /* Dummy values for userspace tool compliance */ 11 /* Dummy values for userspace tool compliance */
12 unsigned long kernel; 12 unsigned long kernel;
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c
deleted file mode 100644
index c892c7c30c2f..000000000000
--- a/arch/sh/oprofile/op_model_sh7750.c
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * arch/sh/oprofile/op_model_sh7750.c
3 *
4 * OProfile support for SH7750/SH7750S Performance Counters
5 *
6 * Copyright (C) 2003 - 2008 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/kernel.h>
13#include <linux/oprofile.h>
14#include <linux/profile.h>
15#include <linux/init.h>
16#include <linux/errno.h>
17#include <linux/interrupt.h>
18#include <linux/io.h>
19#include <linux/fs.h>
20#include "op_impl.h"
21
22#define PM_CR_BASE 0xff000084 /* 16-bit */
23#define PM_CTR_BASE 0xff100004 /* 32-bit */
24
25#define PMCR(n) (PM_CR_BASE + ((n) * 0x04))
26#define PMCTRH(n) (PM_CTR_BASE + 0x00 + ((n) * 0x08))
27#define PMCTRL(n) (PM_CTR_BASE + 0x04 + ((n) * 0x08))
28
29#define PMCR_PMM_MASK 0x0000003f
30
31#define PMCR_CLKF 0x00000100
32#define PMCR_PMCLR 0x00002000
33#define PMCR_PMST 0x00004000
34#define PMCR_PMEN 0x00008000
35
36struct op_sh_model op_model_sh7750_ops;
37
38#define NR_CNTRS 2
39
40static struct sh7750_ppc_register_config {
41 unsigned int ctrl;
42 unsigned long cnt_hi;
43 unsigned long cnt_lo;
44} regcache[NR_CNTRS];
45
46/*
47 * There are a number of events supported by each counter (33 in total).
48 * Since we have 2 counters, each counter will take the event code as it
49 * corresponds to the PMCR PMM setting. Each counter can be configured
50 * independently.
51 *
52 * Event Code Description
53 * ---------- -----------
54 *
55 * 0x01 Operand read access
56 * 0x02 Operand write access
57 * 0x03 UTLB miss
58 * 0x04 Operand cache read miss
59 * 0x05 Operand cache write miss
60 * 0x06 Instruction fetch (w/ cache)
61 * 0x07 Instruction TLB miss
62 * 0x08 Instruction cache miss
63 * 0x09 All operand accesses
64 * 0x0a All instruction accesses
65 * 0x0b OC RAM operand access
66 * 0x0d On-chip I/O space access
67 * 0x0e Operand access (r/w)
68 * 0x0f Operand cache miss (r/w)
69 * 0x10 Branch instruction
70 * 0x11 Branch taken
71 * 0x12 BSR/BSRF/JSR
72 * 0x13 Instruction execution
73 * 0x14 Instruction execution in parallel
74 * 0x15 FPU Instruction execution
75 * 0x16 Interrupt
76 * 0x17 NMI
77 * 0x18 trapa instruction execution
78 * 0x19 UBCA match
79 * 0x1a UBCB match
80 * 0x21 Instruction cache fill
81 * 0x22 Operand cache fill
82 * 0x23 Elapsed time
83 * 0x24 Pipeline freeze by I-cache miss
84 * 0x25 Pipeline freeze by D-cache miss
85 * 0x27 Pipeline freeze by branch instruction
86 * 0x28 Pipeline freeze by CPU register
87 * 0x29 Pipeline freeze by FPU
88 *
89 * Unfortunately we don't have a native exception or interrupt for counter
90 * overflow (although since these counters can run for 16.3 days without
91 * overflowing, it's not really necessary).
92 *
93 * OProfile on the other hand likes to have samples taken periodically, so
94 * for now we just piggyback the timer interrupt to get the expected
95 * behavior.
96 */
97
98static int sh7750_timer_notify(struct pt_regs *regs)
99{
100 oprofile_add_sample(regs, 0);
101 return 0;
102}
103
104static u64 sh7750_read_counter(int counter)
105{
106 return (u64)((u64)(__raw_readl(PMCTRH(counter)) & 0xffff) << 32) |
107 __raw_readl(PMCTRL(counter));
108}
109
110/*
111 * Files will be in a path like:
112 *
113 * /<oprofilefs mount point>/<counter number>/<file>
114 *
115 * So when dealing with <file>, we look to the parent dentry for the counter
116 * number.
117 */
118static inline int to_counter(struct file *file)
119{
120 const unsigned char *name = file->f_path.dentry->d_parent->d_name.name;
121
122 return (int)simple_strtol(name, NULL, 10);
123}
124
125/*
126 * XXX: We have 48-bit counters, so we're probably going to want something
127 * more along the lines of oprofilefs_ullong_to_user().. Truncating to
128 * unsigned long works fine for now though, as long as we don't attempt to
129 * profile for too horribly long.
130 */
131static ssize_t sh7750_read_count(struct file *file, char __user *buf,
132 size_t count, loff_t *ppos)
133{
134 int counter = to_counter(file);
135 u64 val = sh7750_read_counter(counter);
136
137 return oprofilefs_ulong_to_user((unsigned long)val, buf, count, ppos);
138}
139
140static ssize_t sh7750_write_count(struct file *file, const char __user *buf,
141 size_t count, loff_t *ppos)
142{
143 int counter = to_counter(file);
144 unsigned long val;
145
146 if (oprofilefs_ulong_from_user(&val, buf, count))
147 return -EFAULT;
148
149 /*
150 * Any write will clear the counter, although only 0 should be
151 * written for this purpose, as we do not support setting the
152 * counter to an arbitrary value.
153 */
154 WARN_ON(val != 0);
155
156 __raw_writew(__raw_readw(PMCR(counter)) | PMCR_PMCLR, PMCR(counter));
157
158 return count;
159}
160
161static const struct file_operations count_fops = {
162 .read = sh7750_read_count,
163 .write = sh7750_write_count,
164};
165
166static int sh7750_ppc_create_files(struct super_block *sb, struct dentry *dir)
167{
168 return oprofilefs_create_file(sb, dir, "count", &count_fops);
169}
170
171static void sh7750_ppc_reg_setup(struct op_counter_config *ctr)
172{
173 unsigned int counters = op_model_sh7750_ops.num_counters;
174 int i;
175
176 for (i = 0; i < counters; i++) {
177 regcache[i].ctrl = 0;
178 regcache[i].cnt_hi = 0;
179 regcache[i].cnt_lo = 0;
180
181 if (!ctr[i].enabled)
182 continue;
183
184 regcache[i].ctrl |= ctr[i].event | PMCR_PMEN | PMCR_PMST;
185 regcache[i].cnt_hi = (unsigned long)((ctr->count >> 32) & 0xffff);
186 regcache[i].cnt_lo = (unsigned long)(ctr->count & 0xffffffff);
187 }
188}
189
190static void sh7750_ppc_cpu_setup(void *args)
191{
192 unsigned int counters = op_model_sh7750_ops.num_counters;
193 int i;
194
195 for (i = 0; i < counters; i++) {
196 __raw_writew(0, PMCR(i));
197 __raw_writel(regcache[i].cnt_hi, PMCTRH(i));
198 __raw_writel(regcache[i].cnt_lo, PMCTRL(i));
199 }
200}
201
202static void sh7750_ppc_cpu_start(void *args)
203{
204 unsigned int counters = op_model_sh7750_ops.num_counters;
205 int i;
206
207 for (i = 0; i < counters; i++)
208 __raw_writew(regcache[i].ctrl, PMCR(i));
209}
210
211static void sh7750_ppc_cpu_stop(void *args)
212{
213 unsigned int counters = op_model_sh7750_ops.num_counters;
214 int i;
215
216 /* Disable the counters */
217 for (i = 0; i < counters; i++)
218 __raw_writew(__raw_readw(PMCR(i)) & ~PMCR_PMEN, PMCR(i));
219}
220
221static inline void sh7750_ppc_reset(void)
222{
223 unsigned int counters = op_model_sh7750_ops.num_counters;
224 int i;
225
226 /* Clear the counters */
227 for (i = 0; i < counters; i++)
228 __raw_writew(__raw_readw(PMCR(i)) | PMCR_PMCLR, PMCR(i));
229}
230
231static int sh7750_ppc_init(void)
232{
233 sh7750_ppc_reset();
234
235 return register_timer_hook(sh7750_timer_notify);
236}
237
238static void sh7750_ppc_exit(void)
239{
240 unregister_timer_hook(sh7750_timer_notify);
241
242 sh7750_ppc_reset();
243}
244
245struct op_sh_model op_model_sh7750_ops = {
246 .cpu_type = "sh/sh7750",
247 .num_counters = NR_CNTRS,
248 .reg_setup = sh7750_ppc_reg_setup,
249 .cpu_setup = sh7750_ppc_cpu_setup,
250 .cpu_start = sh7750_ppc_cpu_start,
251 .cpu_stop = sh7750_ppc_cpu_stop,
252 .init = sh7750_ppc_init,
253 .exit = sh7750_ppc_exit,
254 .create_files = sh7750_ppc_create_files,
255};
diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile
index 567516b58acc..558a56bcc7cf 100644
--- a/arch/sh/tools/Makefile
+++ b/arch/sh/tools/Makefile
@@ -10,7 +10,7 @@
10# Shamelessly cloned from ARM. 10# Shamelessly cloned from ARM.
11# 11#
12 12
13include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types 13include/generated/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
14 @echo ' Generating $@' 14 @echo ' Generating $@'
15 $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi 15 $(Q)mkdir -p $(dir $@)
16 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } 16 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/sh/tools/gen-mach-types b/arch/sh/tools/gen-mach-types
index 65161e368353..f5ff7c5d8913 100644
--- a/arch/sh/tools/gen-mach-types
+++ b/arch/sh/tools/gen-mach-types
@@ -1,6 +1,6 @@
1#!/bin/awk 1#!/bin/awk
2# 2#
3# Awk script to generate include/asm-sh/machtypes.h 3# Awk script to generate include/generated/machtypes.h
4# Heavily based on arch/arm/tools/gen-mach-types 4# Heavily based on arch/arm/tools/gen-mach-types
5# 5#
6BEGIN { nr = 0 } 6BEGIN { nr = 0 }
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 33ac1a9ac881..108197ac0d56 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -43,6 +43,7 @@ config SPARC64
43 select HAVE_SYSCALL_WRAPPERS 43 select HAVE_SYSCALL_WRAPPERS
44 select HAVE_DYNAMIC_FTRACE 44 select HAVE_DYNAMIC_FTRACE
45 select HAVE_FTRACE_MCOUNT_RECORD 45 select HAVE_FTRACE_MCOUNT_RECORD
46 select HAVE_SYSCALL_TRACEPOINTS
46 select USE_GENERIC_SMP_HELPERS if SMP 47 select USE_GENERIC_SMP_HELPERS if SMP
47 select RTC_DRV_CMOS 48 select RTC_DRV_CMOS
48 select RTC_DRV_BQ4802 49 select RTC_DRV_BQ4802
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug
index 90d5fe223a74..9d3c889718ac 100644
--- a/arch/sparc/Kconfig.debug
+++ b/arch/sparc/Kconfig.debug
@@ -33,4 +33,18 @@ config FRAME_POINTER
33 depends on MCOUNT 33 depends on MCOUNT
34 default y 34 default y
35 35
36config DEBUG_STRICT_USER_COPY_CHECKS
37 bool "Strict copy size checks"
38 depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
39 ---help---
40 Enabling this option turns a certain set of sanity checks for user
41 copy operations into compile time failures.
42
43 The copy_from_user() etc checks are there to help test if there
44 are sufficient security checks on the length argument of
45 the copy operation, by having gcc prove that the argument is
46 within bounds.
47
48 If unsure, or if you run an older (pre 4.4) gcc, say N.
49
36endmenu 50endmenu
diff --git a/arch/sparc/include/asm/asm-offsets.h b/arch/sparc/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/sparc/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
index 381a1b5256d6..4269ca6ad18a 100644
--- a/arch/sparc/include/asm/elf_32.h
+++ b/arch/sparc/include/asm/elf_32.h
@@ -104,8 +104,6 @@ typedef struct {
104#define ELF_CLASS ELFCLASS32 104#define ELF_CLASS ELFCLASS32
105#define ELF_DATA ELFDATA2MSB 105#define ELF_DATA ELFDATA2MSB
106 106
107#define USE_ELF_CORE_DUMP
108
109#define ELF_EXEC_PAGESIZE 4096 107#define ELF_EXEC_PAGESIZE 4096
110 108
111 109
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index d42e393078c4..ff66bb88537b 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -152,7 +152,6 @@ typedef struct {
152 (x)->e_machine == EM_SPARC32PLUS) 152 (x)->e_machine == EM_SPARC32PLUS)
153#define compat_start_thread start_thread32 153#define compat_start_thread start_thread32
154 154
155#define USE_ELF_CORE_DUMP
156#define ELF_EXEC_PAGESIZE PAGE_SIZE 155#define ELF_EXEC_PAGESIZE PAGE_SIZE
157 156
158/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 157/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/sparc/include/asm/fcntl.h b/arch/sparc/include/asm/fcntl.h
index d4d9c9d852c3..38f37b333cc7 100644
--- a/arch/sparc/include/asm/fcntl.h
+++ b/arch/sparc/include/asm/fcntl.h
@@ -1,14 +1,12 @@
1#ifndef _SPARC_FCNTL_H 1#ifndef _SPARC_FCNTL_H
2#define _SPARC_FCNTL_H 2#define _SPARC_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_APPEND 0x0008 4#define O_APPEND 0x0008
7#define FASYNC 0x0040 /* fcntl, for BSD compatibility */ 5#define FASYNC 0x0040 /* fcntl, for BSD compatibility */
8#define O_CREAT 0x0200 /* not fcntl */ 6#define O_CREAT 0x0200 /* not fcntl */
9#define O_TRUNC 0x0400 /* not fcntl */ 7#define O_TRUNC 0x0400 /* not fcntl */
10#define O_EXCL 0x0800 /* not fcntl */ 8#define O_EXCL 0x0800 /* not fcntl */
11#define O_SYNC 0x2000 9#define O_DSYNC 0x2000 /* used to be O_SYNC, see below */
12#define O_NONBLOCK 0x4000 10#define O_NONBLOCK 0x4000
13#if defined(__sparc__) && defined(__arch64__) 11#if defined(__sparc__) && defined(__arch64__)
14#define O_NDELAY 0x0004 12#define O_NDELAY 0x0004
@@ -20,6 +18,21 @@
20#define O_DIRECT 0x100000 /* direct disk access hint */ 18#define O_DIRECT 0x100000 /* direct disk access hint */
21#define O_NOATIME 0x200000 19#define O_NOATIME 0x200000
22#define O_CLOEXEC 0x400000 20#define O_CLOEXEC 0x400000
21/*
22 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
23 * the O_SYNC flag. We continue to use the existing numerical value
24 * for O_DSYNC semantics now, but using the correct symbolic name for it.
25 * This new value is used to request true Posix O_SYNC semantics. It is
26 * defined in this strange way to make sure applications compiled against
27 * new headers get at least O_DSYNC semantics on older kernels.
28 *
29 * This has the nice side-effect that we can simply test for O_DSYNC
30 * wherever we do not care if O_DSYNC or O_SYNC is used.
31 *
32 * Note: __O_SYNC must never be used directly.
33 */
34#define __O_SYNC 0x800000
35#define O_SYNC (__O_SYNC|O_DSYNC)
23 36
24#define F_GETOWN 5 /* for sockets. */ 37#define F_GETOWN 5 /* for sockets. */
25#define F_SETOWN 6 /* for sockets. */ 38#define F_SETOWN 6 /* for sockets. */
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h
index b63e51c3c3ee..b0576df6ec83 100644
--- a/arch/sparc/include/asm/pci_64.h
+++ b/arch/sparc/include/asm/pci_64.h
@@ -16,8 +16,6 @@
16 16
17#define PCI_IRQ_NONE 0xffffffff 17#define PCI_IRQ_NONE 0xffffffff
18 18
19#define PCI_CACHE_LINE_BYTES 64
20
21static inline void pcibios_set_master(struct pci_dev *dev) 19static inline void pcibios_set_master(struct pci_dev *dev)
22{ 20{
23 /* No special bus mastering setup handling */ 21 /* No special bus mastering setup handling */
diff --git a/arch/sparc/include/asm/spinlock_32.h b/arch/sparc/include/asm/spinlock_32.h
index 857630cff636..7f9b9dba38a6 100644
--- a/arch/sparc/include/asm/spinlock_32.h
+++ b/arch/sparc/include/asm/spinlock_32.h
@@ -10,12 +10,12 @@
10 10
11#include <asm/psr.h> 11#include <asm/psr.h>
12 12
13#define __raw_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) 13#define arch_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0)
14 14
15#define __raw_spin_unlock_wait(lock) \ 15#define arch_spin_unlock_wait(lock) \
16 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 16 do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0)
17 17
18static inline void __raw_spin_lock(raw_spinlock_t *lock) 18static inline void arch_spin_lock(arch_spinlock_t *lock)
19{ 19{
20 __asm__ __volatile__( 20 __asm__ __volatile__(
21 "\n1:\n\t" 21 "\n1:\n\t"
@@ -35,7 +35,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
35 : "g2", "memory", "cc"); 35 : "g2", "memory", "cc");
36} 36}
37 37
38static inline int __raw_spin_trylock(raw_spinlock_t *lock) 38static inline int arch_spin_trylock(arch_spinlock_t *lock)
39{ 39{
40 unsigned int result; 40 unsigned int result;
41 __asm__ __volatile__("ldstub [%1], %0" 41 __asm__ __volatile__("ldstub [%1], %0"
@@ -45,7 +45,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
45 return (result == 0); 45 return (result == 0);
46} 46}
47 47
48static inline void __raw_spin_unlock(raw_spinlock_t *lock) 48static inline void arch_spin_unlock(arch_spinlock_t *lock)
49{ 49{
50 __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory"); 50 __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory");
51} 51}
@@ -65,7 +65,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
65 * Sort of like atomic_t's on Sparc, but even more clever. 65 * Sort of like atomic_t's on Sparc, but even more clever.
66 * 66 *
67 * ------------------------------------ 67 * ------------------------------------
68 * | 24-bit counter | wlock | raw_rwlock_t 68 * | 24-bit counter | wlock | arch_rwlock_t
69 * ------------------------------------ 69 * ------------------------------------
70 * 31 8 7 0 70 * 31 8 7 0
71 * 71 *
@@ -76,9 +76,9 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
76 * 76 *
77 * Unfortunately this scheme limits us to ~16,000,000 cpus. 77 * Unfortunately this scheme limits us to ~16,000,000 cpus.
78 */ 78 */
79static inline void arch_read_lock(raw_rwlock_t *rw) 79static inline void __arch_read_lock(arch_rwlock_t *rw)
80{ 80{
81 register raw_rwlock_t *lp asm("g1"); 81 register arch_rwlock_t *lp asm("g1");
82 lp = rw; 82 lp = rw;
83 __asm__ __volatile__( 83 __asm__ __volatile__(
84 "mov %%o7, %%g4\n\t" 84 "mov %%o7, %%g4\n\t"
@@ -89,16 +89,16 @@ static inline void arch_read_lock(raw_rwlock_t *rw)
89 : "g2", "g4", "memory", "cc"); 89 : "g2", "g4", "memory", "cc");
90} 90}
91 91
92#define __raw_read_lock(lock) \ 92#define arch_read_lock(lock) \
93do { unsigned long flags; \ 93do { unsigned long flags; \
94 local_irq_save(flags); \ 94 local_irq_save(flags); \
95 arch_read_lock(lock); \ 95 __arch_read_lock(lock); \
96 local_irq_restore(flags); \ 96 local_irq_restore(flags); \
97} while(0) 97} while(0)
98 98
99static inline void arch_read_unlock(raw_rwlock_t *rw) 99static inline void __arch_read_unlock(arch_rwlock_t *rw)
100{ 100{
101 register raw_rwlock_t *lp asm("g1"); 101 register arch_rwlock_t *lp asm("g1");
102 lp = rw; 102 lp = rw;
103 __asm__ __volatile__( 103 __asm__ __volatile__(
104 "mov %%o7, %%g4\n\t" 104 "mov %%o7, %%g4\n\t"
@@ -109,16 +109,16 @@ static inline void arch_read_unlock(raw_rwlock_t *rw)
109 : "g2", "g4", "memory", "cc"); 109 : "g2", "g4", "memory", "cc");
110} 110}
111 111
112#define __raw_read_unlock(lock) \ 112#define arch_read_unlock(lock) \
113do { unsigned long flags; \ 113do { unsigned long flags; \
114 local_irq_save(flags); \ 114 local_irq_save(flags); \
115 arch_read_unlock(lock); \ 115 __arch_read_unlock(lock); \
116 local_irq_restore(flags); \ 116 local_irq_restore(flags); \
117} while(0) 117} while(0)
118 118
119static inline void __raw_write_lock(raw_rwlock_t *rw) 119static inline void arch_write_lock(arch_rwlock_t *rw)
120{ 120{
121 register raw_rwlock_t *lp asm("g1"); 121 register arch_rwlock_t *lp asm("g1");
122 lp = rw; 122 lp = rw;
123 __asm__ __volatile__( 123 __asm__ __volatile__(
124 "mov %%o7, %%g4\n\t" 124 "mov %%o7, %%g4\n\t"
@@ -130,7 +130,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
130 *(volatile __u32 *)&lp->lock = ~0U; 130 *(volatile __u32 *)&lp->lock = ~0U;
131} 131}
132 132
133static inline int __raw_write_trylock(raw_rwlock_t *rw) 133static inline int arch_write_trylock(arch_rwlock_t *rw)
134{ 134{
135 unsigned int val; 135 unsigned int val;
136 136
@@ -150,9 +150,9 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
150 return (val == 0); 150 return (val == 0);
151} 151}
152 152
153static inline int arch_read_trylock(raw_rwlock_t *rw) 153static inline int __arch_read_trylock(arch_rwlock_t *rw)
154{ 154{
155 register raw_rwlock_t *lp asm("g1"); 155 register arch_rwlock_t *lp asm("g1");
156 register int res asm("o0"); 156 register int res asm("o0");
157 lp = rw; 157 lp = rw;
158 __asm__ __volatile__( 158 __asm__ __volatile__(
@@ -165,27 +165,27 @@ static inline int arch_read_trylock(raw_rwlock_t *rw)
165 return res; 165 return res;
166} 166}
167 167
168#define __raw_read_trylock(lock) \ 168#define arch_read_trylock(lock) \
169({ unsigned long flags; \ 169({ unsigned long flags; \
170 int res; \ 170 int res; \
171 local_irq_save(flags); \ 171 local_irq_save(flags); \
172 res = arch_read_trylock(lock); \ 172 res = __arch_read_trylock(lock); \
173 local_irq_restore(flags); \ 173 local_irq_restore(flags); \
174 res; \ 174 res; \
175}) 175})
176 176
177#define __raw_write_unlock(rw) do { (rw)->lock = 0; } while(0) 177#define arch_write_unlock(rw) do { (rw)->lock = 0; } while(0)
178 178
179#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 179#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
180#define __raw_read_lock_flags(rw, flags) __raw_read_lock(rw) 180#define arch_read_lock_flags(rw, flags) arch_read_lock(rw)
181#define __raw_write_lock_flags(rw, flags) __raw_write_lock(rw) 181#define arch_write_lock_flags(rw, flags) arch_write_lock(rw)
182 182
183#define _raw_spin_relax(lock) cpu_relax() 183#define arch_spin_relax(lock) cpu_relax()
184#define _raw_read_relax(lock) cpu_relax() 184#define arch_read_relax(lock) cpu_relax()
185#define _raw_write_relax(lock) cpu_relax() 185#define arch_write_relax(lock) cpu_relax()
186 186
187#define __raw_read_can_lock(rw) (!((rw)->lock & 0xff)) 187#define arch_read_can_lock(rw) (!((rw)->lock & 0xff))
188#define __raw_write_can_lock(rw) (!(rw)->lock) 188#define arch_write_can_lock(rw) (!(rw)->lock)
189 189
190#endif /* !(__ASSEMBLY__) */ 190#endif /* !(__ASSEMBLY__) */
191 191
diff --git a/arch/sparc/include/asm/spinlock_64.h b/arch/sparc/include/asm/spinlock_64.h
index 43e514783582..073936a8b275 100644
--- a/arch/sparc/include/asm/spinlock_64.h
+++ b/arch/sparc/include/asm/spinlock_64.h
@@ -21,13 +21,13 @@
21 * the spinner sections must be pre-V9 branches. 21 * the spinner sections must be pre-V9 branches.
22 */ 22 */
23 23
24#define __raw_spin_is_locked(lp) ((lp)->lock != 0) 24#define arch_spin_is_locked(lp) ((lp)->lock != 0)
25 25
26#define __raw_spin_unlock_wait(lp) \ 26#define arch_spin_unlock_wait(lp) \
27 do { rmb(); \ 27 do { rmb(); \
28 } while((lp)->lock) 28 } while((lp)->lock)
29 29
30static inline void __raw_spin_lock(raw_spinlock_t *lock) 30static inline void arch_spin_lock(arch_spinlock_t *lock)
31{ 31{
32 unsigned long tmp; 32 unsigned long tmp;
33 33
@@ -46,7 +46,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
46 : "memory"); 46 : "memory");
47} 47}
48 48
49static inline int __raw_spin_trylock(raw_spinlock_t *lock) 49static inline int arch_spin_trylock(arch_spinlock_t *lock)
50{ 50{
51 unsigned long result; 51 unsigned long result;
52 52
@@ -59,7 +59,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
59 return (result == 0UL); 59 return (result == 0UL);
60} 60}
61 61
62static inline void __raw_spin_unlock(raw_spinlock_t *lock) 62static inline void arch_spin_unlock(arch_spinlock_t *lock)
63{ 63{
64 __asm__ __volatile__( 64 __asm__ __volatile__(
65" stb %%g0, [%0]" 65" stb %%g0, [%0]"
@@ -68,7 +68,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
68 : "memory"); 68 : "memory");
69} 69}
70 70
71static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 71static inline void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
72{ 72{
73 unsigned long tmp1, tmp2; 73 unsigned long tmp1, tmp2;
74 74
@@ -92,7 +92,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla
92 92
93/* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ 93/* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */
94 94
95static void inline arch_read_lock(raw_rwlock_t *lock) 95static void inline arch_read_lock(arch_rwlock_t *lock)
96{ 96{
97 unsigned long tmp1, tmp2; 97 unsigned long tmp1, tmp2;
98 98
@@ -115,7 +115,7 @@ static void inline arch_read_lock(raw_rwlock_t *lock)
115 : "memory"); 115 : "memory");
116} 116}
117 117
118static int inline arch_read_trylock(raw_rwlock_t *lock) 118static int inline arch_read_trylock(arch_rwlock_t *lock)
119{ 119{
120 int tmp1, tmp2; 120 int tmp1, tmp2;
121 121
@@ -136,7 +136,7 @@ static int inline arch_read_trylock(raw_rwlock_t *lock)
136 return tmp1; 136 return tmp1;
137} 137}
138 138
139static void inline arch_read_unlock(raw_rwlock_t *lock) 139static void inline arch_read_unlock(arch_rwlock_t *lock)
140{ 140{
141 unsigned long tmp1, tmp2; 141 unsigned long tmp1, tmp2;
142 142
@@ -152,7 +152,7 @@ static void inline arch_read_unlock(raw_rwlock_t *lock)
152 : "memory"); 152 : "memory");
153} 153}
154 154
155static void inline arch_write_lock(raw_rwlock_t *lock) 155static void inline arch_write_lock(arch_rwlock_t *lock)
156{ 156{
157 unsigned long mask, tmp1, tmp2; 157 unsigned long mask, tmp1, tmp2;
158 158
@@ -177,7 +177,7 @@ static void inline arch_write_lock(raw_rwlock_t *lock)
177 : "memory"); 177 : "memory");
178} 178}
179 179
180static void inline arch_write_unlock(raw_rwlock_t *lock) 180static void inline arch_write_unlock(arch_rwlock_t *lock)
181{ 181{
182 __asm__ __volatile__( 182 __asm__ __volatile__(
183" stw %%g0, [%0]" 183" stw %%g0, [%0]"
@@ -186,7 +186,7 @@ static void inline arch_write_unlock(raw_rwlock_t *lock)
186 : "memory"); 186 : "memory");
187} 187}
188 188
189static int inline arch_write_trylock(raw_rwlock_t *lock) 189static int inline arch_write_trylock(arch_rwlock_t *lock)
190{ 190{
191 unsigned long mask, tmp1, tmp2, result; 191 unsigned long mask, tmp1, tmp2, result;
192 192
@@ -210,21 +210,21 @@ static int inline arch_write_trylock(raw_rwlock_t *lock)
210 return result; 210 return result;
211} 211}
212 212
213#define __raw_read_lock(p) arch_read_lock(p) 213#define arch_read_lock(p) arch_read_lock(p)
214#define __raw_read_lock_flags(p, f) arch_read_lock(p) 214#define arch_read_lock_flags(p, f) arch_read_lock(p)
215#define __raw_read_trylock(p) arch_read_trylock(p) 215#define arch_read_trylock(p) arch_read_trylock(p)
216#define __raw_read_unlock(p) arch_read_unlock(p) 216#define arch_read_unlock(p) arch_read_unlock(p)
217#define __raw_write_lock(p) arch_write_lock(p) 217#define arch_write_lock(p) arch_write_lock(p)
218#define __raw_write_lock_flags(p, f) arch_write_lock(p) 218#define arch_write_lock_flags(p, f) arch_write_lock(p)
219#define __raw_write_unlock(p) arch_write_unlock(p) 219#define arch_write_unlock(p) arch_write_unlock(p)
220#define __raw_write_trylock(p) arch_write_trylock(p) 220#define arch_write_trylock(p) arch_write_trylock(p)
221 221
222#define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) 222#define arch_read_can_lock(rw) (!((rw)->lock & 0x80000000UL))
223#define __raw_write_can_lock(rw) (!(rw)->lock) 223#define arch_write_can_lock(rw) (!(rw)->lock)
224 224
225#define _raw_spin_relax(lock) cpu_relax() 225#define arch_spin_relax(lock) cpu_relax()
226#define _raw_read_relax(lock) cpu_relax() 226#define arch_read_relax(lock) cpu_relax()
227#define _raw_write_relax(lock) cpu_relax() 227#define arch_write_relax(lock) cpu_relax()
228 228
229#endif /* !(__ASSEMBLY__) */ 229#endif /* !(__ASSEMBLY__) */
230 230
diff --git a/arch/sparc/include/asm/spinlock_types.h b/arch/sparc/include/asm/spinlock_types.h
index 37cbe01c585b..9c454fdeaad8 100644
--- a/arch/sparc/include/asm/spinlock_types.h
+++ b/arch/sparc/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned char lock; 9 volatile unsigned char lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/sparc/include/asm/string_32.h b/arch/sparc/include/asm/string_32.h
index 6c5fddb7e6b5..edf196ee4ef8 100644
--- a/arch/sparc/include/asm/string_32.h
+++ b/arch/sparc/include/asm/string_32.h
@@ -16,8 +16,6 @@
16#ifdef __KERNEL__ 16#ifdef __KERNEL__
17 17
18extern void __memmove(void *,const void *,__kernel_size_t); 18extern void __memmove(void *,const void *,__kernel_size_t);
19extern __kernel_size_t __memcpy(void *,const void *,__kernel_size_t);
20extern __kernel_size_t __memset(void *,int,__kernel_size_t);
21 19
22#ifndef EXPORT_SYMTAB_STROPS 20#ifndef EXPORT_SYMTAB_STROPS
23 21
@@ -32,82 +30,10 @@ extern __kernel_size_t __memset(void *,int,__kernel_size_t);
32}) 30})
33 31
34#define __HAVE_ARCH_MEMCPY 32#define __HAVE_ARCH_MEMCPY
35 33#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
36static inline void *__constant_memcpy(void *to, const void *from, __kernel_size_t n)
37{
38 extern void __copy_1page(void *, const void *);
39
40 if(n <= 32) {
41 __builtin_memcpy(to, from, n);
42 } else if (((unsigned int) to & 7) != 0) {
43 /* Destination is not aligned on the double-word boundary */
44 __memcpy(to, from, n);
45 } else {
46 switch(n) {
47 case PAGE_SIZE:
48 __copy_1page(to, from);
49 break;
50 default:
51 __memcpy(to, from, n);
52 break;
53 }
54 }
55 return to;
56}
57
58static inline void *__nonconstant_memcpy(void *to, const void *from, __kernel_size_t n)
59{
60 __memcpy(to, from, n);
61 return to;
62}
63
64#undef memcpy
65#define memcpy(t, f, n) \
66(__builtin_constant_p(n) ? \
67 __constant_memcpy((t),(f),(n)) : \
68 __nonconstant_memcpy((t),(f),(n)))
69 34
70#define __HAVE_ARCH_MEMSET 35#define __HAVE_ARCH_MEMSET
71 36#define memset(s, c, count) __builtin_memset(s, c, count)
72static inline void *__constant_c_and_count_memset(void *s, char c, __kernel_size_t count)
73{
74 extern void bzero_1page(void *);
75 extern __kernel_size_t __bzero(void *, __kernel_size_t);
76
77 if(!c) {
78 if(count == PAGE_SIZE)
79 bzero_1page(s);
80 else
81 __bzero(s, count);
82 } else {
83 __memset(s, c, count);
84 }
85 return s;
86}
87
88static inline void *__constant_c_memset(void *s, char c, __kernel_size_t count)
89{
90 extern __kernel_size_t __bzero(void *, __kernel_size_t);
91
92 if(!c)
93 __bzero(s, count);
94 else
95 __memset(s, c, count);
96 return s;
97}
98
99static inline void *__nonconstant_memset(void *s, char c, __kernel_size_t count)
100{
101 __memset(s, c, count);
102 return s;
103}
104
105#undef memset
106#define memset(s, c, count) \
107(__builtin_constant_p(c) ? (__builtin_constant_p(count) ? \
108 __constant_c_and_count_memset((s), (c), (count)) : \
109 __constant_c_memset((s), (c), (count))) \
110 : __nonconstant_memset((s), (c), (count)))
111 37
112#define __HAVE_ARCH_MEMSCAN 38#define __HAVE_ARCH_MEMSCAN
113 39
diff --git a/arch/sparc/include/asm/string_64.h b/arch/sparc/include/asm/string_64.h
index 43161f2d17eb..9623bc213158 100644
--- a/arch/sparc/include/asm/string_64.h
+++ b/arch/sparc/include/asm/string_64.h
@@ -15,8 +15,6 @@
15 15
16#include <asm/asi.h> 16#include <asm/asi.h>
17 17
18extern void *__memset(void *,int,__kernel_size_t);
19
20#ifndef EXPORT_SYMTAB_STROPS 18#ifndef EXPORT_SYMTAB_STROPS
21 19
22/* First the mem*() things. */ 20/* First the mem*() things. */
@@ -24,29 +22,10 @@ extern void *__memset(void *,int,__kernel_size_t);
24extern void *memmove(void *, const void *, __kernel_size_t); 22extern void *memmove(void *, const void *, __kernel_size_t);
25 23
26#define __HAVE_ARCH_MEMCPY 24#define __HAVE_ARCH_MEMCPY
27extern void *memcpy(void *, const void *, __kernel_size_t); 25#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
28 26
29#define __HAVE_ARCH_MEMSET 27#define __HAVE_ARCH_MEMSET
30extern void *__builtin_memset(void *,int,__kernel_size_t); 28#define memset(s, c, count) __builtin_memset(s, c, count)
31
32static inline void *__constant_memset(void *s, int c, __kernel_size_t count)
33{
34 extern __kernel_size_t __bzero(void *, __kernel_size_t);
35
36 if (!c) {
37 __bzero(s, count);
38 return s;
39 } else
40 return __memset(s, c, count);
41}
42
43#undef memset
44#define memset(s, c, count) \
45((__builtin_constant_p(count) && (count) <= 32) ? \
46 __builtin_memset((s), (c), (count)) : \
47 (__builtin_constant_p(c) ? \
48 __constant_memset((s), (c), (count)) : \
49 __memset((s), (c), (count))))
50 29
51#define __HAVE_ARCH_MEMSCAN 30#define __HAVE_ARCH_MEMSCAN
52 31
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index 1b45a7bbe407..7257ebb8f394 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -227,6 +227,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
227/* flag bit 8 is available */ 227/* flag bit 8 is available */
228#define TIF_SECCOMP 9 /* secure computing */ 228#define TIF_SECCOMP 9 /* secure computing */
229#define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ 229#define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */
230#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */
230/* flag bit 11 is available */ 231/* flag bit 11 is available */
231/* NOTE: Thread flags >= 12 should be ones we have no interest 232/* NOTE: Thread flags >= 12 should be ones we have no interest
232 * in using in assembly, else we can't use the mask as 233 * in using in assembly, else we can't use the mask as
@@ -246,6 +247,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
246#define _TIF_32BIT (1<<TIF_32BIT) 247#define _TIF_32BIT (1<<TIF_32BIT)
247#define _TIF_SECCOMP (1<<TIF_SECCOMP) 248#define _TIF_SECCOMP (1<<TIF_SECCOMP)
248#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 249#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
250#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
249#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) 251#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
250#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 252#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
251#define _TIF_FREEZE (1<<TIF_FREEZE) 253#define _TIF_FREEZE (1<<TIF_FREEZE)
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
index 8303ac481034..489d2ba92bcb 100644
--- a/arch/sparc/include/asm/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
@@ -260,8 +260,23 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un
260 return __copy_user(to, (__force void __user *) from, n); 260 return __copy_user(to, (__force void __user *) from, n);
261} 261}
262 262
263extern void copy_from_user_overflow(void)
264#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
265 __compiletime_error("copy_from_user() buffer size is not provably correct")
266#else
267 __compiletime_warning("copy_from_user() buffer size is not provably correct")
268#endif
269;
270
263static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) 271static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
264{ 272{
273 int sz = __compiletime_object_size(to);
274
275 if (unlikely(sz != -1 && sz < n)) {
276 copy_from_user_overflow();
277 return -EFAULT;
278 }
279
265 if (n && __access_ok((unsigned long) from, n)) 280 if (n && __access_ok((unsigned long) from, n))
266 return __copy_user((__force void __user *) to, from, n); 281 return __copy_user((__force void __user *) to, from, n);
267 else 282 else
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index 9ea271e19c70..dbc141660994 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -6,6 +6,7 @@
6 */ 6 */
7 7
8#ifdef __KERNEL__ 8#ifdef __KERNEL__
9#include <linux/errno.h>
9#include <linux/compiler.h> 10#include <linux/compiler.h>
10#include <linux/string.h> 11#include <linux/string.h>
11#include <linux/thread_info.h> 12#include <linux/thread_info.h>
@@ -204,6 +205,14 @@ __asm__ __volatile__( \
204 205
205extern int __get_user_bad(void); 206extern int __get_user_bad(void);
206 207
208extern void copy_from_user_overflow(void)
209#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
210 __compiletime_error("copy_from_user() buffer size is not provably correct")
211#else
212 __compiletime_warning("copy_from_user() buffer size is not provably correct")
213#endif
214;
215
207extern unsigned long __must_check ___copy_from_user(void *to, 216extern unsigned long __must_check ___copy_from_user(void *to,
208 const void __user *from, 217 const void __user *from,
209 unsigned long size); 218 unsigned long size);
@@ -212,10 +221,16 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from,
212static inline unsigned long __must_check 221static inline unsigned long __must_check
213copy_from_user(void *to, const void __user *from, unsigned long size) 222copy_from_user(void *to, const void __user *from, unsigned long size)
214{ 223{
215 unsigned long ret = ___copy_from_user(to, from, size); 224 unsigned long ret = (unsigned long) -EFAULT;
216 225 int sz = __compiletime_object_size(to);
217 if (unlikely(ret)) 226
218 ret = copy_from_user_fixup(to, from, size); 227 if (likely(sz == -1 || sz >= size)) {
228 ret = ___copy_from_user(to, from, size);
229 if (unlikely(ret))
230 ret = copy_from_user_fixup(to, from, size);
231 } else {
232 copy_from_user_overflow();
233 }
219 return ret; 234 return ret;
220} 235}
221#define __copy_from_user copy_from_user 236#define __copy_from_user copy_from_user
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h
index d8d25bd97121..cb4b9bfd0d87 100644
--- a/arch/sparc/include/asm/unistd.h
+++ b/arch/sparc/include/asm/unistd.h
@@ -398,7 +398,7 @@
398#define __NR_perf_event_open 327 398#define __NR_perf_event_open 327
399#define __NR_recvmmsg 328 399#define __NR_recvmmsg 328
400 400
401#define NR_SYSCALLS 329 401#define NR_syscalls 329
402 402
403#ifdef __32bit_syscall_numbers__ 403#ifdef __32bit_syscall_numbers__
404/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, 404/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index ec9c7bc67d21..1504df8ddf70 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -1294,7 +1294,7 @@ linux_sparc_syscall:
1294 sethi %hi(PSR_SYSCALL), %l4 1294 sethi %hi(PSR_SYSCALL), %l4
1295 or %l0, %l4, %l0 1295 or %l0, %l4, %l0
1296 /* Direct access to user regs, must faster. */ 1296 /* Direct access to user regs, must faster. */
1297 cmp %g1, NR_SYSCALLS 1297 cmp %g1, NR_syscalls
1298 bgeu linux_sparc_ni_syscall 1298 bgeu linux_sparc_ni_syscall
1299 sll %g1, 2, %l4 1299 sll %g1, 2, %l4
1300 ld [%l7 + %l4], %l7 1300 ld [%l7 + %l4], %l7
diff --git a/arch/sparc/kernel/ftrace.c b/arch/sparc/kernel/ftrace.c
index d3b1a3076569..29973daa9930 100644
--- a/arch/sparc/kernel/ftrace.c
+++ b/arch/sparc/kernel/ftrace.c
@@ -4,6 +4,7 @@
4#include <linux/percpu.h> 4#include <linux/percpu.h>
5#include <linux/init.h> 5#include <linux/init.h>
6#include <linux/list.h> 6#include <linux/list.h>
7#include <trace/syscall.h>
7 8
8#include <asm/ftrace.h> 9#include <asm/ftrace.h>
9 10
@@ -91,3 +92,13 @@ int __init ftrace_dyn_arch_init(void *data)
91} 92}
92#endif 93#endif
93 94
95#ifdef CONFIG_FTRACE_SYSCALLS
96
97extern unsigned int sys_call_table[];
98
99unsigned long __init arch_syscall_addr(int nr)
100{
101 return (unsigned long)sys_call_table[nr];
102}
103
104#endif
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c
index 7690cc219ecc..5fad94950e76 100644
--- a/arch/sparc/kernel/iommu.c
+++ b/arch/sparc/kernel/iommu.c
@@ -11,6 +11,7 @@
11#include <linux/dma-mapping.h> 11#include <linux/dma-mapping.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/iommu-helper.h> 13#include <linux/iommu-helper.h>
14#include <linux/bitmap.h>
14 15
15#ifdef CONFIG_PCI 16#ifdef CONFIG_PCI
16#include <linux/pci.h> 17#include <linux/pci.h>
@@ -169,7 +170,7 @@ void iommu_range_free(struct iommu *iommu, dma_addr_t dma_addr, unsigned long np
169 170
170 entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT; 171 entry = (dma_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT;
171 172
172 iommu_area_free(arena->map, entry, npages); 173 bitmap_clear(arena->map, entry, npages);
173} 174}
174 175
175int iommu_table_init(struct iommu *iommu, int tsbsize, 176int iommu_table_init(struct iommu *iommu, int tsbsize,
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index ce996f97855f..8d6882bb480a 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -176,7 +176,7 @@ int show_interrupts(struct seq_file *p, void *v)
176 } 176 }
177 177
178 if (i < NR_IRQS) { 178 if (i < NR_IRQS) {
179 spin_lock_irqsave(&irq_desc[i].lock, flags); 179 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
180 action = irq_desc[i].action; 180 action = irq_desc[i].action;
181 if (!action) 181 if (!action)
182 goto skip; 182 goto skip;
@@ -195,7 +195,7 @@ int show_interrupts(struct seq_file *p, void *v)
195 195
196 seq_putc(p, '\n'); 196 seq_putc(p, '\n');
197skip: 197skip:
198 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 198 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
199 } else if (i == NR_IRQS) { 199 } else if (i == NR_IRQS) {
200 seq_printf(p, "NMI: "); 200 seq_printf(p, "NMI: ");
201 for_each_online_cpu(j) 201 for_each_online_cpu(j)
@@ -785,14 +785,14 @@ void fixup_irqs(void)
785 for (irq = 0; irq < NR_IRQS; irq++) { 785 for (irq = 0; irq < NR_IRQS; irq++) {
786 unsigned long flags; 786 unsigned long flags;
787 787
788 spin_lock_irqsave(&irq_desc[irq].lock, flags); 788 raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
789 if (irq_desc[irq].action && 789 if (irq_desc[irq].action &&
790 !(irq_desc[irq].status & IRQ_PER_CPU)) { 790 !(irq_desc[irq].status & IRQ_PER_CPU)) {
791 if (irq_desc[irq].chip->set_affinity) 791 if (irq_desc[irq].chip->set_affinity)
792 irq_desc[irq].chip->set_affinity(irq, 792 irq_desc[irq].chip->set_affinity(irq,
793 irq_desc[irq].affinity); 793 irq_desc[irq].affinity);
794 } 794 }
795 spin_unlock_irqrestore(&irq_desc[irq].lock, flags); 795 raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
796 } 796 }
797 797
798 tick_ops->disable_irq(); 798 tick_ops->disable_irq();
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c
index 3bc6527c95af..6716584e48ab 100644
--- a/arch/sparc/kernel/kprobes.c
+++ b/arch/sparc/kernel/kprobes.c
@@ -46,6 +46,9 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}};
46 46
47int __kprobes arch_prepare_kprobe(struct kprobe *p) 47int __kprobes arch_prepare_kprobe(struct kprobe *p)
48{ 48{
49 if ((unsigned long) p->addr & 0x3UL)
50 return -EILSEQ;
51
49 p->ainsn.insn[0] = *p->addr; 52 p->ainsn.insn[0] = *p->addr;
50 flushi(&p->ainsn.insn[0]); 53 flushi(&p->ainsn.insn[0]);
51 54
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index cb3c72c45aab..df39a0f0d27a 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -14,6 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/bitmap.h>
17 18
18#include <asm/hypervisor.h> 19#include <asm/hypervisor.h>
19#include <asm/iommu.h> 20#include <asm/iommu.h>
@@ -1242,13 +1243,13 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
1242 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); 1243 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
1243 1244
1244 err = request_irq(lp->cfg.rx_irq, ldc_rx, 1245 err = request_irq(lp->cfg.rx_irq, ldc_rx,
1245 IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, 1246 IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
1246 lp->rx_irq_name, lp); 1247 lp->rx_irq_name, lp);
1247 if (err) 1248 if (err)
1248 return err; 1249 return err;
1249 1250
1250 err = request_irq(lp->cfg.tx_irq, ldc_tx, 1251 err = request_irq(lp->cfg.tx_irq, ldc_tx,
1251 IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, 1252 IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
1252 lp->tx_irq_name, lp); 1253 lp->tx_irq_name, lp);
1253 if (err) { 1254 if (err) {
1254 free_irq(lp->cfg.rx_irq, lp); 1255 free_irq(lp->cfg.rx_irq, lp);
@@ -1875,7 +1876,7 @@ EXPORT_SYMBOL(ldc_read);
1875static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages) 1876static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages)
1876{ 1877{
1877 struct iommu_arena *arena = &iommu->arena; 1878 struct iommu_arena *arena = &iommu->arena;
1878 unsigned long n, i, start, end, limit; 1879 unsigned long n, start, end, limit;
1879 int pass; 1880 int pass;
1880 1881
1881 limit = arena->limit; 1882 limit = arena->limit;
@@ -1883,7 +1884,7 @@ static long arena_alloc(struct ldc_iommu *iommu, unsigned long npages)
1883 pass = 0; 1884 pass = 0;
1884 1885
1885again: 1886again:
1886 n = find_next_zero_bit(arena->map, limit, start); 1887 n = bitmap_find_next_zero_area(arena->map, limit, start, npages, 0);
1887 end = n + npages; 1888 end = n + npages;
1888 if (unlikely(end >= limit)) { 1889 if (unlikely(end >= limit)) {
1889 if (likely(pass < 1)) { 1890 if (likely(pass < 1)) {
@@ -1896,16 +1897,7 @@ again:
1896 return -1; 1897 return -1;
1897 } 1898 }
1898 } 1899 }
1899 1900 bitmap_set(arena->map, n, npages);
1900 for (i = n; i < end; i++) {
1901 if (test_bit(i, arena->map)) {
1902 start = i + 1;
1903 goto again;
1904 }
1905 }
1906
1907 for (i = n; i < end; i++)
1908 __set_bit(i, arena->map);
1909 1901
1910 arena->hint = end; 1902 arena->hint = end;
1911 1903
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index 938da19dc065..cdc91d919e93 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -10,6 +10,7 @@
10#include <linux/slab.h> 10#include <linux/slab.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/miscdevice.h> 12#include <linux/miscdevice.h>
13#include <linux/bootmem.h>
13 14
14#include <asm/cpudata.h> 15#include <asm/cpudata.h>
15#include <asm/hypervisor.h> 16#include <asm/hypervisor.h>
@@ -108,25 +109,15 @@ static struct mdesc_handle * __init mdesc_lmb_alloc(unsigned int mdesc_size)
108 109
109static void mdesc_lmb_free(struct mdesc_handle *hp) 110static void mdesc_lmb_free(struct mdesc_handle *hp)
110{ 111{
111 unsigned int alloc_size, handle_size = hp->handle_size; 112 unsigned int alloc_size;
112 unsigned long start, end; 113 unsigned long start;
113 114
114 BUG_ON(atomic_read(&hp->refcnt) != 0); 115 BUG_ON(atomic_read(&hp->refcnt) != 0);
115 BUG_ON(!list_empty(&hp->list)); 116 BUG_ON(!list_empty(&hp->list));
116 117
117 alloc_size = PAGE_ALIGN(handle_size); 118 alloc_size = PAGE_ALIGN(hp->handle_size);
118 119 start = __pa(hp);
119 start = (unsigned long) hp; 120 free_bootmem_late(start, alloc_size);
120 end = start + alloc_size;
121
122 while (start < end) {
123 struct page *p;
124
125 p = virt_to_page(start);
126 ClearPageReserved(p);
127 __free_page(p);
128 start += PAGE_SIZE;
129 }
130} 121}
131 122
132static struct mdesc_mem_ops lmb_mdesc_ops = { 123static struct mdesc_mem_ops lmb_mdesc_ops = {
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
index b129611590a4..f30f4a1ead23 100644
--- a/arch/sparc/kernel/nmi.c
+++ b/arch/sparc/kernel/nmi.c
@@ -47,7 +47,7 @@ static DEFINE_PER_CPU(short, wd_enabled);
47static int endflag __initdata; 47static int endflag __initdata;
48 48
49static DEFINE_PER_CPU(unsigned int, last_irq_sum); 49static DEFINE_PER_CPU(unsigned int, last_irq_sum);
50static DEFINE_PER_CPU(local_t, alert_counter); 50static DEFINE_PER_CPU(long, alert_counter);
51static DEFINE_PER_CPU(int, nmi_touch); 51static DEFINE_PER_CPU(int, nmi_touch);
52 52
53void touch_nmi_watchdog(void) 53void touch_nmi_watchdog(void)
@@ -112,13 +112,13 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
112 touched = 1; 112 touched = 1;
113 } 113 }
114 if (!touched && __get_cpu_var(last_irq_sum) == sum) { 114 if (!touched && __get_cpu_var(last_irq_sum) == sum) {
115 local_inc(&__get_cpu_var(alert_counter)); 115 __this_cpu_inc(per_cpu_var(alert_counter));
116 if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz) 116 if (__this_cpu_read(per_cpu_var(alert_counter)) == 30 * nmi_hz)
117 die_nmi("BUG: NMI Watchdog detected LOCKUP", 117 die_nmi("BUG: NMI Watchdog detected LOCKUP",
118 regs, panic_on_timeout); 118 regs, panic_on_timeout);
119 } else { 119 } else {
120 __get_cpu_var(last_irq_sum) = sum; 120 __get_cpu_var(last_irq_sum) = sum;
121 local_set(&__get_cpu_var(alert_counter), 0); 121 __this_cpu_write(per_cpu_var(alert_counter), 0);
122 } 122 }
123 if (__get_cpu_var(wd_enabled)) { 123 if (__get_cpu_var(wd_enabled)) {
124 write_pic(picl_value(nmi_hz)); 124 write_pic(picl_value(nmi_hz));
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index 881947e59e95..0a6f2d1798d1 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -104,9 +104,19 @@ static int of_bus_pci_map(u32 *addr, const u32 *range,
104 int i; 104 int i;
105 105
106 /* Check address type match */ 106 /* Check address type match */
107 if ((addr[0] ^ range[0]) & 0x03000000) 107 if (!((addr[0] ^ range[0]) & 0x03000000))
108 return -EINVAL; 108 goto type_match;
109
110 /* Special exception, we can map a 64-bit address into
111 * a 32-bit range.
112 */
113 if ((addr[0] & 0x03000000) == 0x03000000 &&
114 (range[0] & 0x03000000) == 0x02000000)
115 goto type_match;
116
117 return -EINVAL;
109 118
119type_match:
110 if (of_out_of_range(addr + 1, range + 1, range + na + pna, 120 if (of_out_of_range(addr + 1, range + 1, range + na + pna,
111 na - 1, ns)) 121 na - 1, ns))
112 return -EINVAL; 122 return -EINVAL;
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index c68648662802..539e83f8e087 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -1064,7 +1064,6 @@ int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask)
1064 1064
1065 return (device_mask & dma_addr_mask) == dma_addr_mask; 1065 return (device_mask & dma_addr_mask) == dma_addr_mask;
1066} 1066}
1067EXPORT_SYMBOL(pci_dma_supported);
1068 1067
1069void pci_resource_to_user(const struct pci_dev *pdev, int bar, 1068void pci_resource_to_user(const struct pci_dev *pdev, int bar,
1070 const struct resource *rp, resource_size_t *start, 1069 const struct resource *rp, resource_size_t *start,
@@ -1081,3 +1080,10 @@ void pci_resource_to_user(const struct pci_dev *pdev, int bar,
1081 *start = rp->start - offset; 1080 *start = rp->start - offset;
1082 *end = rp->end - offset; 1081 *end = rp->end - offset;
1083} 1082}
1083
1084static int __init pcibios_init(void)
1085{
1086 pci_dfl_cache_line_size = 64 >> 2;
1087 return 0;
1088}
1089subsys_initcall(pcibios_init);
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 4ae91dc2feb9..2f6524d1a817 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -23,6 +23,7 @@
23#include <linux/signal.h> 23#include <linux/signal.h>
24#include <linux/regset.h> 24#include <linux/regset.h>
25#include <linux/tracehook.h> 25#include <linux/tracehook.h>
26#include <trace/syscall.h>
26#include <linux/compat.h> 27#include <linux/compat.h>
27#include <linux/elf.h> 28#include <linux/elf.h>
28 29
@@ -37,6 +38,9 @@
37#include <asm/cpudata.h> 38#include <asm/cpudata.h>
38#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
39 40
41#define CREATE_TRACE_POINTS
42#include <trace/events/syscalls.h>
43
40#include "entry.h" 44#include "entry.h"
41 45
42/* #define ALLOW_INIT_TRACING */ 46/* #define ALLOW_INIT_TRACING */
@@ -1059,6 +1063,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
1059 if (test_thread_flag(TIF_SYSCALL_TRACE)) 1063 if (test_thread_flag(TIF_SYSCALL_TRACE))
1060 ret = tracehook_report_syscall_entry(regs); 1064 ret = tracehook_report_syscall_entry(regs);
1061 1065
1066 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
1067 trace_sys_enter(regs, regs->u_regs[UREG_G1]);
1068
1062 if (unlikely(current->audit_context) && !ret) 1069 if (unlikely(current->audit_context) && !ret)
1063 audit_syscall_entry((test_thread_flag(TIF_32BIT) ? 1070 audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
1064 AUDIT_ARCH_SPARC : 1071 AUDIT_ARCH_SPARC :
@@ -1084,6 +1091,9 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
1084 audit_syscall_exit(result, regs->u_regs[UREG_I0]); 1091 audit_syscall_exit(result, regs->u_regs[UREG_I0]);
1085 } 1092 }
1086 1093
1094 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
1095 trace_sys_exit(regs, regs->u_regs[UREG_G1]);
1096
1087 if (test_thread_flag(TIF_SYSCALL_TRACE)) 1097 if (test_thread_flag(TIF_SYSCALL_TRACE))
1088 tracehook_report_syscall_exit(regs, 0); 1098 tracehook_report_syscall_exit(regs, 0);
1089} 1099}
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c
index 0f26066a08d9..372ad59c4cba 100644
--- a/arch/sparc/kernel/sparc_ksyms_64.c
+++ b/arch/sparc/kernel/sparc_ksyms_64.c
@@ -38,17 +38,5 @@ EXPORT_SYMBOL(sun4v_niagara_setperf);
38EXPORT_SYMBOL(sun4v_niagara2_getperf); 38EXPORT_SYMBOL(sun4v_niagara2_getperf);
39EXPORT_SYMBOL(sun4v_niagara2_setperf); 39EXPORT_SYMBOL(sun4v_niagara2_setperf);
40 40
41#ifdef CONFIG_PCI
42/* inline functions in asm/pci_64.h */
43EXPORT_SYMBOL(pci_alloc_consistent);
44EXPORT_SYMBOL(pci_free_consistent);
45EXPORT_SYMBOL(pci_map_single);
46EXPORT_SYMBOL(pci_unmap_single);
47EXPORT_SYMBOL(pci_map_sg);
48EXPORT_SYMBOL(pci_unmap_sg);
49EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
50EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
51#endif
52
53/* Exporting a symbol from /init/main.c */ 41/* Exporting a symbol from /init/main.c */
54EXPORT_SYMBOL(saved_command_line); 42EXPORT_SYMBOL(saved_command_line);
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c
index 00abe87e5b51..dc0ac197e7e2 100644
--- a/arch/sparc/kernel/sys_sparc32.c
+++ b/arch/sparc/kernel/sys_sparc32.c
@@ -564,28 +564,6 @@ asmlinkage long sparc32_open(const char __user *filename,
564 return do_sys_open(AT_FDCWD, filename, flags, mode); 564 return do_sys_open(AT_FDCWD, filename, flags, mode);
565} 565}
566 566
567extern unsigned long do_mremap(unsigned long addr,
568 unsigned long old_len, unsigned long new_len,
569 unsigned long flags, unsigned long new_addr);
570
571asmlinkage unsigned long sys32_mremap(unsigned long addr,
572 unsigned long old_len, unsigned long new_len,
573 unsigned long flags, u32 __new_addr)
574{
575 unsigned long ret = -EINVAL;
576 unsigned long new_addr = __new_addr;
577
578 if (unlikely(sparc_mmap_check(addr, old_len)))
579 goto out;
580 if (unlikely(sparc_mmap_check(new_addr, new_len)))
581 goto out;
582 down_write(&current->mm->mmap_sem);
583 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
584 up_write(&current->mm->mmap_sem);
585out:
586 return ret;
587}
588
589long sys32_lookup_dcookie(unsigned long cookie_high, 567long sys32_lookup_dcookie(unsigned long cookie_high,
590 unsigned long cookie_low, 568 unsigned long cookie_low,
591 char __user *buf, size_t len) 569 char __user *buf, size_t len)
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index 03035c852a43..3a82e65d8db2 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -45,7 +45,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
45 /* We do not accept a shared mapping if it would violate 45 /* We do not accept a shared mapping if it would violate
46 * cache aliasing constraints. 46 * cache aliasing constraints.
47 */ 47 */
48 if ((flags & MAP_SHARED) && (addr & (SHMLBA - 1))) 48 if ((flags & MAP_SHARED) &&
49 ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
49 return -EINVAL; 50 return -EINVAL;
50 return addr; 51 return addr;
51 } 52 }
@@ -79,15 +80,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
79 } 80 }
80} 81}
81 82
82asmlinkage unsigned long sparc_brk(unsigned long brk)
83{
84 if(ARCH_SUN4C) {
85 if ((brk & 0xe0000000) != (current->mm->brk & 0xe0000000))
86 return current->mm->brk;
87 }
88 return sys_brk(brk);
89}
90
91/* 83/*
92 * sys_pipe() is the normal C calling standard for creating 84 * sys_pipe() is the normal C calling standard for creating
93 * a pipe. It's not the way unix traditionally does this, though. 85 * a pipe. It's not the way unix traditionally does this, though.
@@ -234,31 +226,6 @@ int sparc_mmap_check(unsigned long addr, unsigned long len)
234} 226}
235 227
236/* Linux version of mmap */ 228/* Linux version of mmap */
237static unsigned long do_mmap2(unsigned long addr, unsigned long len,
238 unsigned long prot, unsigned long flags, unsigned long fd,
239 unsigned long pgoff)
240{
241 struct file * file = NULL;
242 unsigned long retval = -EBADF;
243
244 if (!(flags & MAP_ANONYMOUS)) {
245 file = fget(fd);
246 if (!file)
247 goto out;
248 }
249
250 len = PAGE_ALIGN(len);
251 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
252
253 down_write(&current->mm->mmap_sem);
254 retval = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
255 up_write(&current->mm->mmap_sem);
256
257 if (file)
258 fput(file);
259out:
260 return retval;
261}
262 229
263asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len, 230asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
264 unsigned long prot, unsigned long flags, unsigned long fd, 231 unsigned long prot, unsigned long flags, unsigned long fd,
@@ -266,14 +233,16 @@ asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
266{ 233{
267 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE 234 /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
268 we have. */ 235 we have. */
269 return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT - 12)); 236 return sys_mmap_pgoff(addr, len, prot, flags, fd,
237 pgoff >> (PAGE_SHIFT - 12));
270} 238}
271 239
272asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, 240asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
273 unsigned long prot, unsigned long flags, unsigned long fd, 241 unsigned long prot, unsigned long flags, unsigned long fd,
274 unsigned long off) 242 unsigned long off)
275{ 243{
276 return do_mmap2(addr, len, prot, flags, fd, off >> PAGE_SHIFT); 244 /* no alignment check? */
245 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
277} 246}
278 247
279long sparc_remap_file_pages(unsigned long start, unsigned long size, 248long sparc_remap_file_pages(unsigned long start, unsigned long size,
@@ -287,27 +256,6 @@ long sparc_remap_file_pages(unsigned long start, unsigned long size,
287 (pgoff >> (PAGE_SHIFT - 12)), flags); 256 (pgoff >> (PAGE_SHIFT - 12)), flags);
288} 257}
289 258
290extern unsigned long do_mremap(unsigned long addr,
291 unsigned long old_len, unsigned long new_len,
292 unsigned long flags, unsigned long new_addr);
293
294asmlinkage unsigned long sparc_mremap(unsigned long addr,
295 unsigned long old_len, unsigned long new_len,
296 unsigned long flags, unsigned long new_addr)
297{
298 unsigned long ret = -EINVAL;
299
300 if (unlikely(sparc_mmap_check(addr, old_len)))
301 goto out;
302 if (unlikely(sparc_mmap_check(new_addr, new_len)))
303 goto out;
304 down_write(&current->mm->mmap_sem);
305 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
306 up_write(&current->mm->mmap_sem);
307out:
308 return ret;
309}
310
311/* we come to here via sys_nis_syscall so it can setup the regs argument */ 259/* we come to here via sys_nis_syscall so it can setup the regs argument */
312asmlinkage unsigned long 260asmlinkage unsigned long
313c_sys_nis_syscall (struct pt_regs *regs) 261c_sys_nis_syscall (struct pt_regs *regs)
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index e2d102447a43..cfa0e19abe3b 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -317,10 +317,14 @@ bottomup:
317unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) 317unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags)
318{ 318{
319 unsigned long align_goal, addr = -ENOMEM; 319 unsigned long align_goal, addr = -ENOMEM;
320 unsigned long (*get_area)(struct file *, unsigned long,
321 unsigned long, unsigned long, unsigned long);
322
323 get_area = current->mm->get_unmapped_area;
320 324
321 if (flags & MAP_FIXED) { 325 if (flags & MAP_FIXED) {
322 /* Ok, don't mess with it. */ 326 /* Ok, don't mess with it. */
323 return get_unmapped_area(NULL, orig_addr, len, pgoff, flags); 327 return get_area(NULL, orig_addr, len, pgoff, flags);
324 } 328 }
325 flags &= ~MAP_SHARED; 329 flags &= ~MAP_SHARED;
326 330
@@ -333,7 +337,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u
333 align_goal = (64UL * 1024); 337 align_goal = (64UL * 1024);
334 338
335 do { 339 do {
336 addr = get_unmapped_area(NULL, orig_addr, len + (align_goal - PAGE_SIZE), pgoff, flags); 340 addr = get_area(NULL, orig_addr, len + (align_goal - PAGE_SIZE), pgoff, flags);
337 if (!(addr & ~PAGE_MASK)) { 341 if (!(addr & ~PAGE_MASK)) {
338 addr = (addr + (align_goal - 1UL)) & ~(align_goal - 1UL); 342 addr = (addr + (align_goal - 1UL)) & ~(align_goal - 1UL);
339 break; 343 break;
@@ -351,7 +355,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u
351 * be obtained. 355 * be obtained.
352 */ 356 */
353 if (addr & ~PAGE_MASK) 357 if (addr & ~PAGE_MASK)
354 addr = get_unmapped_area(NULL, orig_addr, len, pgoff, flags); 358 addr = get_area(NULL, orig_addr, len, pgoff, flags);
355 359
356 return addr; 360 return addr;
357} 361}
@@ -399,18 +403,6 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
399 } 403 }
400} 404}
401 405
402SYSCALL_DEFINE1(sparc_brk, unsigned long, brk)
403{
404 /* People could try to be nasty and use ta 0x6d in 32bit programs */
405 if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
406 return current->mm->brk;
407
408 if (unlikely(straddles_64bit_va_hole(current->mm->brk, brk)))
409 return current->mm->brk;
410
411 return sys_brk(brk);
412}
413
414/* 406/*
415 * sys_pipe() is the normal C calling standard for creating 407 * sys_pipe() is the normal C calling standard for creating
416 * a pipe. It's not the way unix traditionally does this, though. 408 * a pipe. It's not the way unix traditionally does this, though.
@@ -568,23 +560,13 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
568 unsigned long, prot, unsigned long, flags, unsigned long, fd, 560 unsigned long, prot, unsigned long, flags, unsigned long, fd,
569 unsigned long, off) 561 unsigned long, off)
570{ 562{
571 struct file * file = NULL; 563 unsigned long retval = -EINVAL;
572 unsigned long retval = -EBADF;
573
574 if (!(flags & MAP_ANONYMOUS)) {
575 file = fget(fd);
576 if (!file)
577 goto out;
578 }
579 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
580 len = PAGE_ALIGN(len);
581 564
582 down_write(&current->mm->mmap_sem); 565 if ((off + PAGE_ALIGN(len)) < off)
583 retval = do_mmap(file, addr, len, prot, flags, off); 566 goto out;
584 up_write(&current->mm->mmap_sem); 567 if (off & ~PAGE_MASK)
585 568 goto out;
586 if (file) 569 retval = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
587 fput(file);
588out: 570out:
589 return retval; 571 return retval;
590} 572}
@@ -614,12 +596,6 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
614 596
615 if (test_thread_flag(TIF_32BIT)) 597 if (test_thread_flag(TIF_32BIT))
616 goto out; 598 goto out;
617 if (unlikely(new_len >= VA_EXCLUDE_START))
618 goto out;
619 if (unlikely(sparc_mmap_check(addr, old_len)))
620 goto out;
621 if (unlikely(sparc_mmap_check(new_addr, new_len)))
622 goto out;
623 599
624 down_write(&current->mm->mmap_sem); 600 down_write(&current->mm->mmap_sem);
625 ret = do_mremap(addr, old_len, new_len, flags, new_addr); 601 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
index d150c2aa98d2..dc4a458f74dc 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -62,7 +62,7 @@ sys32_rt_sigreturn:
62#endif 62#endif
63 .align 32 63 .align 32
641: ldx [%g6 + TI_FLAGS], %l5 641: ldx [%g6 + TI_FLAGS], %l5
65 andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 65 andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0
66 be,pt %icc, rtrap 66 be,pt %icc, rtrap
67 nop 67 nop
68 call syscall_trace_leave 68 call syscall_trace_leave
@@ -187,7 +187,7 @@ linux_syscall_trace:
187 .globl linux_sparc_syscall32 187 .globl linux_sparc_syscall32
188linux_sparc_syscall32: 188linux_sparc_syscall32:
189 /* Direct access to user regs, much faster. */ 189 /* Direct access to user regs, much faster. */
190 cmp %g1, NR_SYSCALLS ! IEU1 Group 190 cmp %g1, NR_syscalls ! IEU1 Group
191 bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI 191 bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI
192 srl %i0, 0, %o0 ! IEU0 192 srl %i0, 0, %o0 ! IEU0
193 sll %g1, 2, %l4 ! IEU0 Group 193 sll %g1, 2, %l4 ! IEU0 Group
@@ -198,7 +198,7 @@ linux_sparc_syscall32:
198 198
199 srl %i5, 0, %o5 ! IEU1 199 srl %i5, 0, %o5 ! IEU1
200 srl %i2, 0, %o2 ! IEU0 Group 200 srl %i2, 0, %o2 ! IEU0 Group
201 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 201 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0
202 bne,pn %icc, linux_syscall_trace32 ! CTI 202 bne,pn %icc, linux_syscall_trace32 ! CTI
203 mov %i0, %l5 ! IEU1 203 mov %i0, %l5 ! IEU1
204 call %l7 ! CTI Group brk forced 204 call %l7 ! CTI Group brk forced
@@ -210,7 +210,7 @@ linux_sparc_syscall32:
210 .globl linux_sparc_syscall 210 .globl linux_sparc_syscall
211linux_sparc_syscall: 211linux_sparc_syscall:
212 /* Direct access to user regs, much faster. */ 212 /* Direct access to user regs, much faster. */
213 cmp %g1, NR_SYSCALLS ! IEU1 Group 213 cmp %g1, NR_syscalls ! IEU1 Group
214 bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI 214 bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI
215 mov %i0, %o0 ! IEU0 215 mov %i0, %o0 ! IEU0
216 sll %g1, 2, %l4 ! IEU0 Group 216 sll %g1, 2, %l4 ! IEU0 Group
@@ -221,7 +221,7 @@ linux_sparc_syscall:
221 221
222 mov %i3, %o3 ! IEU1 222 mov %i3, %o3 ! IEU1
223 mov %i4, %o4 ! IEU0 Group 223 mov %i4, %o4 ! IEU0 Group
224 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 224 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0
225 bne,pn %icc, linux_syscall_trace ! CTI Group 225 bne,pn %icc, linux_syscall_trace ! CTI Group
226 mov %i0, %l5 ! IEU0 226 mov %i0, %l5 ! IEU0
2272: call %l7 ! CTI Group brk forced 2272: call %l7 ! CTI Group brk forced
@@ -245,7 +245,7 @@ ret_sys_call:
245 245
246 cmp %o0, -ERESTART_RESTARTBLOCK 246 cmp %o0, -ERESTART_RESTARTBLOCK
247 bgeu,pn %xcc, 1f 247 bgeu,pn %xcc, 1f
248 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 248 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6
24980: 24980:
250 /* System call success, clear Carry condition code. */ 250 /* System call success, clear Carry condition code. */
251 andn %g3, %g2, %g3 251 andn %g3, %g2, %g3
@@ -260,7 +260,7 @@ ret_sys_call:
260 /* System call failure, set Carry condition code. 260 /* System call failure, set Carry condition code.
261 * Also, get abs(errno) to return to the process. 261 * Also, get abs(errno) to return to the process.
262 */ 262 */
263 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 263 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6
264 sub %g0, %o0, %o0 264 sub %g0, %o0, %o0
265 or %g3, %g2, %g3 265 or %g3, %g2, %g3
266 stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] 266 stx %o0, [%sp + PTREGS_OFF + PT_V9_I0]
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index a63c5d2d9849..d2f999ae2b85 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -9,7 +9,6 @@
9struct new_utsname; 9struct new_utsname;
10 10
11extern asmlinkage unsigned long sys_getpagesize(void); 11extern asmlinkage unsigned long sys_getpagesize(void);
12extern asmlinkage unsigned long sparc_brk(unsigned long brk);
13extern asmlinkage long sparc_pipe(struct pt_regs *regs); 12extern asmlinkage long sparc_pipe(struct pt_regs *regs);
14extern asmlinkage long sys_ipc(unsigned int call, int first, 13extern asmlinkage long sys_ipc(unsigned int call, int first,
15 unsigned long second, 14 unsigned long second,
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index ceb1530f8aa6..801fc8e5a0e8 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -19,7 +19,7 @@ sys_call_table:
19/*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write 19/*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write
20/*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link 20/*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link
21/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod 21/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod
22/*15*/ .long sys_chmod, sys_lchown16, sparc_brk, sys_nis_syscall, sys_lseek 22/*15*/ .long sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, sys_lseek
23/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 23/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
24/*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause 24/*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause
25/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice 25/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
@@ -67,7 +67,7 @@ sys_call_table:
67/*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall 67/*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
68/*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler 68/*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
69/*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep 69/*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep
70/*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl 70/*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
71/*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep 71/*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
72/*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun 72/*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
73/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy 73/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index cc8e7862e95a..e575b46bd7a9 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -21,7 +21,7 @@ sys_call_table32:
21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write 21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link 22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod 23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
24/*15*/ .word sys_chmod, sys_lchown16, sys_sparc_brk, sys32_perfctr, sys32_lseek 24/*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys32_perfctr, sys32_lseek
25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause 26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause
27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice 27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
@@ -68,7 +68,7 @@ sys_call_table32:
68 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall 68 .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall
69/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler 69/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
70 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep 70 .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
71/*250*/ .word sys32_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl 71/*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
72 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep 72 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
73/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun 73/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
74 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy 74 .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
@@ -96,7 +96,7 @@ sys_call_table:
96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write 96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link 97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link
98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod 98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
99/*15*/ .word sys_chmod, sys_lchown, sys_sparc_brk, sys_perfctr, sys_lseek 99/*15*/ .word sys_chmod, sys_lchown, sys_brk, sys_perfctr, sys_lseek
100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid 100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall 101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall
102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice 102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index da1218e8ee87..67e165102885 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -774,26 +774,9 @@ void __devinit setup_sparc64_timer(void)
774static struct clocksource clocksource_tick = { 774static struct clocksource clocksource_tick = {
775 .rating = 100, 775 .rating = 100,
776 .mask = CLOCKSOURCE_MASK(64), 776 .mask = CLOCKSOURCE_MASK(64),
777 .shift = 16,
778 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 777 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
779}; 778};
780 779
781static void __init setup_clockevent_multiplier(unsigned long hz)
782{
783 unsigned long mult, shift = 32;
784
785 while (1) {
786 mult = div_sc(hz, NSEC_PER_SEC, shift);
787 if (mult && (mult >> 32UL) == 0UL)
788 break;
789
790 shift--;
791 }
792
793 sparc64_clockevent.shift = shift;
794 sparc64_clockevent.mult = mult;
795}
796
797static unsigned long tb_ticks_per_usec __read_mostly; 780static unsigned long tb_ticks_per_usec __read_mostly;
798 781
799void __delay(unsigned long loops) 782void __delay(unsigned long loops)
@@ -828,9 +811,7 @@ void __init time_init(void)
828 clocksource_hz2mult(freq, SPARC64_NSEC_PER_CYC_SHIFT); 811 clocksource_hz2mult(freq, SPARC64_NSEC_PER_CYC_SHIFT);
829 812
830 clocksource_tick.name = tick_ops->name; 813 clocksource_tick.name = tick_ops->name;
831 clocksource_tick.mult = 814 clocksource_calc_mult_shift(&clocksource_tick, freq, 4);
832 clocksource_hz2mult(freq,
833 clocksource_tick.shift);
834 clocksource_tick.read = clocksource_tick_read; 815 clocksource_tick.read = clocksource_tick_read;
835 816
836 printk("clocksource: mult[%x] shift[%d]\n", 817 printk("clocksource: mult[%x] shift[%d]\n",
@@ -839,15 +820,14 @@ void __init time_init(void)
839 clocksource_register(&clocksource_tick); 820 clocksource_register(&clocksource_tick);
840 821
841 sparc64_clockevent.name = tick_ops->name; 822 sparc64_clockevent.name = tick_ops->name;
842 823 clockevents_calc_mult_shift(&sparc64_clockevent, freq, 4);
843 setup_clockevent_multiplier(freq);
844 824
845 sparc64_clockevent.max_delta_ns = 825 sparc64_clockevent.max_delta_ns =
846 clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent); 826 clockevent_delta2ns(0x7fffffffffffffffUL, &sparc64_clockevent);
847 sparc64_clockevent.min_delta_ns = 827 sparc64_clockevent.min_delta_ns =
848 clockevent_delta2ns(0xF, &sparc64_clockevent); 828 clockevent_delta2ns(0xF, &sparc64_clockevent);
849 829
850 printk("clockevent: mult[%lx] shift[%d]\n", 830 printk("clockevent: mult[%x] shift[%d]\n",
851 sparc64_clockevent.mult, sparc64_clockevent.shift); 831 sparc64_clockevent.mult, sparc64_clockevent.shift);
852 832
853 setup_sparc64_timer(); 833 setup_sparc64_timer();
diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c
index 6b1e6cde6fff..f8514e291e15 100644
--- a/arch/sparc/kernel/unaligned_32.c
+++ b/arch/sparc/kernel/unaligned_32.c
@@ -17,8 +17,7 @@
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <linux/smp.h> 18#include <linux/smp.h>
19#include <linux/smp_lock.h> 19#include <linux/smp_lock.h>
20 20#include <linux/perf_event.h>
21/* #define DEBUG_MNA */
22 21
23enum direction { 22enum direction {
24 load, /* ld, ldd, ldh, ldsh */ 23 load, /* ld, ldd, ldh, ldsh */
@@ -29,12 +28,6 @@ enum direction {
29 invalid, 28 invalid,
30}; 29};
31 30
32#ifdef DEBUG_MNA
33static char *dirstrings[] = {
34 "load", "store", "both", "fpload", "fpstore", "invalid"
35};
36#endif
37
38static inline enum direction decode_direction(unsigned int insn) 31static inline enum direction decode_direction(unsigned int insn)
39{ 32{
40 unsigned long tmp = (insn >> 21) & 1; 33 unsigned long tmp = (insn >> 21) & 1;
@@ -255,10 +248,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
255 unsigned long addr = compute_effective_address(regs, insn); 248 unsigned long addr = compute_effective_address(regs, insn);
256 int err; 249 int err;
257 250
258#ifdef DEBUG_MNA 251 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr);
259 printk("KMNA: pc=%08lx [dir=%s addr=%08lx size=%d] retpc[%08lx]\n",
260 regs->pc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]);
261#endif
262 switch (dir) { 252 switch (dir) {
263 case load: 253 case load:
264 err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), 254 err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
@@ -350,6 +340,7 @@ asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn)
350 } 340 }
351 341
352 addr = compute_effective_address(regs, insn); 342 addr = compute_effective_address(regs, insn);
343 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr);
353 switch(dir) { 344 switch(dir) {
354 case load: 345 case load:
355 err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f), 346 err = do_int_load(fetch_reg_addr(((insn>>25)&0x1f),
diff --git a/arch/sparc/kernel/unaligned_64.c b/arch/sparc/kernel/unaligned_64.c
index 379209982a07..378ca82b9ccc 100644
--- a/arch/sparc/kernel/unaligned_64.c
+++ b/arch/sparc/kernel/unaligned_64.c
@@ -20,10 +20,9 @@
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include <linux/smp.h> 21#include <linux/smp.h>
22#include <linux/bitops.h> 22#include <linux/bitops.h>
23#include <linux/perf_event.h>
23#include <asm/fpumacro.h> 24#include <asm/fpumacro.h>
24 25
25/* #define DEBUG_MNA */
26
27enum direction { 26enum direction {
28 load, /* ld, ldd, ldh, ldsh */ 27 load, /* ld, ldd, ldh, ldsh */
29 store, /* st, std, sth, stsh */ 28 store, /* st, std, sth, stsh */
@@ -33,12 +32,6 @@ enum direction {
33 invalid, 32 invalid,
34}; 33};
35 34
36#ifdef DEBUG_MNA
37static char *dirstrings[] = {
38 "load", "store", "both", "fpload", "fpstore", "invalid"
39};
40#endif
41
42static inline enum direction decode_direction(unsigned int insn) 35static inline enum direction decode_direction(unsigned int insn)
43{ 36{
44 unsigned long tmp = (insn >> 21) & 1; 37 unsigned long tmp = (insn >> 21) & 1;
@@ -327,12 +320,7 @@ asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
327 320
328 addr = compute_effective_address(regs, insn, 321 addr = compute_effective_address(regs, insn,
329 ((insn >> 25) & 0x1f)); 322 ((insn >> 25) & 0x1f));
330#ifdef DEBUG_MNA 323 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, addr);
331 printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] "
332 "retpc[%016lx]\n",
333 regs->tpc, dirstrings[dir], addr, size,
334 regs->u_regs[UREG_RETPC]);
335#endif
336 switch (asi) { 324 switch (asi) {
337 case ASI_NL: 325 case ASI_NL:
338 case ASI_AIUPL: 326 case ASI_AIUPL:
@@ -399,6 +387,7 @@ int handle_popc(u32 insn, struct pt_regs *regs)
399 int ret, i, rd = ((insn >> 25) & 0x1f); 387 int ret, i, rd = ((insn >> 25) & 0x1f);
400 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; 388 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
401 389
390 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
402 if (insn & 0x2000) { 391 if (insn & 0x2000) {
403 maybe_flush_windows(0, 0, rd, from_kernel); 392 maybe_flush_windows(0, 0, rd, from_kernel);
404 value = sign_extend_imm13(insn); 393 value = sign_extend_imm13(insn);
@@ -445,6 +434,8 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs)
445 int asi = decode_asi(insn, regs); 434 int asi = decode_asi(insn, regs);
446 int flag = (freg < 32) ? FPRS_DL : FPRS_DU; 435 int flag = (freg < 32) ? FPRS_DL : FPRS_DU;
447 436
437 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
438
448 save_and_clear_fpu(); 439 save_and_clear_fpu();
449 current_thread_info()->xfsr[0] &= ~0x1c000; 440 current_thread_info()->xfsr[0] &= ~0x1c000;
450 if (freg & 3) { 441 if (freg & 3) {
@@ -566,6 +557,8 @@ void handle_ld_nf(u32 insn, struct pt_regs *regs)
566 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; 557 int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
567 unsigned long *reg; 558 unsigned long *reg;
568 559
560 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
561
569 maybe_flush_windows(0, 0, rd, from_kernel); 562 maybe_flush_windows(0, 0, rd, from_kernel);
570 reg = fetch_reg_addr(rd, regs); 563 reg = fetch_reg_addr(rd, regs);
571 if (from_kernel || rd < 16) { 564 if (from_kernel || rd < 16) {
@@ -596,6 +589,7 @@ void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr
596 589
597 if (tstate & TSTATE_PRIV) 590 if (tstate & TSTATE_PRIV)
598 die_if_kernel("lddfmna from kernel", regs); 591 die_if_kernel("lddfmna from kernel", regs);
592 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, sfar);
599 if (test_thread_flag(TIF_32BIT)) 593 if (test_thread_flag(TIF_32BIT))
600 pc = (u32)pc; 594 pc = (u32)pc;
601 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { 595 if (get_user(insn, (u32 __user *) pc) != -EFAULT) {
@@ -657,6 +651,7 @@ void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr
657 651
658 if (tstate & TSTATE_PRIV) 652 if (tstate & TSTATE_PRIV)
659 die_if_kernel("stdfmna from kernel", regs); 653 die_if_kernel("stdfmna from kernel", regs);
654 perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, 0, regs, sfar);
660 if (test_thread_flag(TIF_32BIT)) 655 if (test_thread_flag(TIF_32BIT))
661 pc = (u32)pc; 656 pc = (u32)pc;
662 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { 657 if (get_user(insn, (u32 __user *) pc) != -EFAULT) {
diff --git a/arch/sparc/kernel/visemul.c b/arch/sparc/kernel/visemul.c
index d231cbd5c526..9dfd2ebcb157 100644
--- a/arch/sparc/kernel/visemul.c
+++ b/arch/sparc/kernel/visemul.c
@@ -5,6 +5,7 @@
5#include <linux/kernel.h> 5#include <linux/kernel.h>
6#include <linux/errno.h> 6#include <linux/errno.h>
7#include <linux/thread_info.h> 7#include <linux/thread_info.h>
8#include <linux/perf_event.h>
8 9
9#include <asm/ptrace.h> 10#include <asm/ptrace.h>
10#include <asm/pstate.h> 11#include <asm/pstate.h>
@@ -801,6 +802,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn)
801 802
802 BUG_ON(regs->tstate & TSTATE_PRIV); 803 BUG_ON(regs->tstate & TSTATE_PRIV);
803 804
805 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
806
804 if (test_thread_flag(TIF_32BIT)) 807 if (test_thread_flag(TIF_32BIT))
805 pc = (u32)pc; 808 pc = (u32)pc;
806 809
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index e75faf0e59ae..c4b5e03af115 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -44,3 +44,4 @@ obj-y += iomap.o
44obj-$(CONFIG_SPARC32) += atomic32.o 44obj-$(CONFIG_SPARC32) += atomic32.o
45obj-y += ksyms.o 45obj-y += ksyms.o
46obj-$(CONFIG_SPARC64) += PeeCeeI.o 46obj-$(CONFIG_SPARC64) += PeeCeeI.o
47obj-y += usercopy.o
diff --git a/arch/sparc/lib/bzero.S b/arch/sparc/lib/bzero.S
index b6557297440f..615f401edf69 100644
--- a/arch/sparc/lib/bzero.S
+++ b/arch/sparc/lib/bzero.S
@@ -6,10 +6,6 @@
6 6
7 .text 7 .text
8 8
9 .globl __memset
10 .type __memset, #function
11__memset: /* %o0=buf, %o1=pat, %o2=len */
12
13 .globl memset 9 .globl memset
14 .type memset, #function 10 .type memset, #function
15memset: /* %o0=buf, %o1=pat, %o2=len */ 11memset: /* %o0=buf, %o1=pat, %o2=len */
@@ -83,7 +79,6 @@ __bzero_done:
83 retl 79 retl
84 mov %o3, %o0 80 mov %o3, %o0
85 .size __bzero, .-__bzero 81 .size __bzero, .-__bzero
86 .size __memset, .-__memset
87 .size memset, .-memset 82 .size memset, .-memset
88 83
89#define EX_ST(x,y) \ 84#define EX_ST(x,y) \
diff --git a/arch/sparc/lib/checksum_32.S b/arch/sparc/lib/checksum_32.S
index 77f228533d47..3632cb34e914 100644
--- a/arch/sparc/lib/checksum_32.S
+++ b/arch/sparc/lib/checksum_32.S
@@ -560,7 +560,7 @@ __csum_partial_copy_end:
560 mov %i0, %o1 560 mov %i0, %o1
561 mov %i1, %o0 561 mov %i1, %o0
5625: 5625:
563 call __memcpy 563 call memcpy
564 mov %i2, %o2 564 mov %i2, %o2
565 tst %o0 565 tst %o0
566 bne,a 2f 566 bne,a 2f
diff --git a/arch/sparc/lib/ksyms.c b/arch/sparc/lib/ksyms.c
index 704b12668388..1b30bb3bfdb1 100644
--- a/arch/sparc/lib/ksyms.c
+++ b/arch/sparc/lib/ksyms.c
@@ -30,7 +30,6 @@ EXPORT_SYMBOL(__memscan_generic);
30EXPORT_SYMBOL(memcmp); 30EXPORT_SYMBOL(memcmp);
31EXPORT_SYMBOL(memcpy); 31EXPORT_SYMBOL(memcpy);
32EXPORT_SYMBOL(memset); 32EXPORT_SYMBOL(memset);
33EXPORT_SYMBOL(__memset);
34EXPORT_SYMBOL(memmove); 33EXPORT_SYMBOL(memmove);
35EXPORT_SYMBOL(__bzero); 34EXPORT_SYMBOL(__bzero);
36 35
@@ -81,7 +80,6 @@ EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
81 80
82/* Special internal versions of library functions. */ 81/* Special internal versions of library functions. */
83EXPORT_SYMBOL(__copy_1page); 82EXPORT_SYMBOL(__copy_1page);
84EXPORT_SYMBOL(__memcpy);
85EXPORT_SYMBOL(__memmove); 83EXPORT_SYMBOL(__memmove);
86EXPORT_SYMBOL(bzero_1page); 84EXPORT_SYMBOL(bzero_1page);
87 85
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S
index 7ce9c65f3592..24b8b12deed2 100644
--- a/arch/sparc/lib/mcount.S
+++ b/arch/sparc/lib/mcount.S
@@ -64,8 +64,9 @@ mcount:
642: sethi %hi(softirq_stack), %g3 642: sethi %hi(softirq_stack), %g3
65 or %g3, %lo(softirq_stack), %g3 65 or %g3, %lo(softirq_stack), %g3
66 ldx [%g3 + %g1], %g7 66 ldx [%g3 + %g1], %g7
67 sub %g7, STACK_BIAS, %g7
67 cmp %sp, %g7 68 cmp %sp, %g7
68 bleu,pt %xcc, 2f 69 bleu,pt %xcc, 3f
69 sethi %hi(THREAD_SIZE), %g3 70 sethi %hi(THREAD_SIZE), %g3
70 add %g7, %g3, %g7 71 add %g7, %g3, %g7
71 cmp %sp, %g7 72 cmp %sp, %g7
@@ -75,7 +76,7 @@ mcount:
75 * again, we are already trying to output the stack overflow 76 * again, we are already trying to output the stack overflow
76 * message. 77 * message.
77 */ 78 */
78 sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough 793: sethi %hi(ovstack), %g7 ! cant move to panic stack fast enough
79 or %g7, %lo(ovstack), %g7 80 or %g7, %lo(ovstack), %g7
80 add %g7, OVSTACKSIZE, %g3 81 add %g7, OVSTACKSIZE, %g3
81 sub %g3, STACK_BIAS + 192, %g3 82 sub %g3, STACK_BIAS + 192, %g3
diff --git a/arch/sparc/lib/memcpy.S b/arch/sparc/lib/memcpy.S
index ce10bc869af9..34fe65751737 100644
--- a/arch/sparc/lib/memcpy.S
+++ b/arch/sparc/lib/memcpy.S
@@ -543,9 +543,6 @@ FUNC(memmove)
543 b 3f 543 b 3f
544 add %o0, 2, %o0 544 add %o0, 2, %o0
545 545
546#ifdef __KERNEL__
547FUNC(__memcpy)
548#endif
549FUNC(memcpy) /* %o0=dst %o1=src %o2=len */ 546FUNC(memcpy) /* %o0=dst %o1=src %o2=len */
550 547
551 sub %o0, %o1, %o4 548 sub %o0, %o1, %o4
diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S
index 1c37ea892deb..99c017be8719 100644
--- a/arch/sparc/lib/memset.S
+++ b/arch/sparc/lib/memset.S
@@ -60,11 +60,10 @@
60 .globl __bzero_begin 60 .globl __bzero_begin
61__bzero_begin: 61__bzero_begin:
62 62
63 .globl __bzero, __memset, 63 .globl __bzero
64 .globl memset 64 .globl memset
65 .globl __memset_start, __memset_end 65 .globl __memset_start, __memset_end
66__memset_start: 66__memset_start:
67__memset:
68memset: 67memset:
69 and %o1, 0xff, %g3 68 and %o1, 0xff, %g3
70 sll %g3, 8, %g2 69 sll %g3, 8, %g2
diff --git a/arch/sparc/lib/usercopy.c b/arch/sparc/lib/usercopy.c
new file mode 100644
index 000000000000..14b363fec8a2
--- /dev/null
+++ b/arch/sparc/lib/usercopy.c
@@ -0,0 +1,8 @@
1#include <linux/module.h>
2#include <linux/bug.h>
3
4void copy_from_user_overflow(void)
5{
6 WARN(1, "Buffer overflow detected!\n");
7}
8EXPORT_SYMBOL(copy_from_user_overflow);
diff --git a/arch/sparc/math-emu/math_32.c b/arch/sparc/math-emu/math_32.c
index e13f65da17df..a3fccde894ec 100644
--- a/arch/sparc/math-emu/math_32.c
+++ b/arch/sparc/math-emu/math_32.c
@@ -67,6 +67,7 @@
67#include <linux/types.h> 67#include <linux/types.h>
68#include <linux/sched.h> 68#include <linux/sched.h>
69#include <linux/mm.h> 69#include <linux/mm.h>
70#include <linux/perf_event.h>
70#include <asm/uaccess.h> 71#include <asm/uaccess.h>
71 72
72#include "sfp-util_32.h" 73#include "sfp-util_32.h"
@@ -163,6 +164,8 @@ int do_mathemu(struct pt_regs *regs, struct task_struct *fpt)
163 int retcode = 0; /* assume all succeed */ 164 int retcode = 0; /* assume all succeed */
164 unsigned long insn; 165 unsigned long insn;
165 166
167 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
168
166#ifdef DEBUG_MATHEMU 169#ifdef DEBUG_MATHEMU
167 printk("In do_mathemu()... pc is %08lx\n", regs->pc); 170 printk("In do_mathemu()... pc is %08lx\n", regs->pc);
168 printk("fpqdepth is %ld\n", fpt->thread.fpqdepth); 171 printk("fpqdepth is %ld\n", fpt->thread.fpqdepth);
diff --git a/arch/sparc/math-emu/math_64.c b/arch/sparc/math-emu/math_64.c
index 6863c9bde25c..56d2c44747b8 100644
--- a/arch/sparc/math-emu/math_64.c
+++ b/arch/sparc/math-emu/math_64.c
@@ -11,6 +11,7 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/perf_event.h>
14 15
15#include <asm/fpumacro.h> 16#include <asm/fpumacro.h>
16#include <asm/ptrace.h> 17#include <asm/ptrace.h>
@@ -183,6 +184,7 @@ int do_mathemu(struct pt_regs *regs, struct fpustate *f)
183 184
184 if (tstate & TSTATE_PRIV) 185 if (tstate & TSTATE_PRIV)
185 die_if_kernel("unfinished/unimplemented FPop from kernel", regs); 186 die_if_kernel("unfinished/unimplemented FPop from kernel", regs);
187 perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, 0);
186 if (test_thread_flag(TIF_32BIT)) 188 if (test_thread_flag(TIF_32BIT))
187 pc = (u32)pc; 189 pc = (u32)pc;
188 if (get_user(insn, (u32 __user *) pc) != -EFAULT) { 190 if (get_user(insn, (u32 __user *) pc) != -EFAULT) {
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 43b0da96a4fb..6081936bf03b 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -31,13 +31,12 @@
31#include <asm/sections.h> 31#include <asm/sections.h>
32#include <asm/mmu_context.h> 32#include <asm/mmu_context.h>
33 33
34#ifdef CONFIG_KPROBES 34static inline __kprobes int notify_page_fault(struct pt_regs *regs)
35static inline int notify_page_fault(struct pt_regs *regs)
36{ 35{
37 int ret = 0; 36 int ret = 0;
38 37
39 /* kprobe_running() needs smp_processor_id() */ 38 /* kprobe_running() needs smp_processor_id() */
40 if (!user_mode(regs)) { 39 if (kprobes_built_in() && !user_mode(regs)) {
41 preempt_disable(); 40 preempt_disable();
42 if (kprobe_running() && kprobe_fault_handler(regs, 0)) 41 if (kprobe_running() && kprobe_fault_handler(regs, 0))
43 ret = 1; 42 ret = 1;
@@ -45,12 +44,6 @@ static inline int notify_page_fault(struct pt_regs *regs)
45 } 44 }
46 return ret; 45 return ret;
47} 46}
48#else
49static inline int notify_page_fault(struct pt_regs *regs)
50{
51 return 0;
52}
53#endif
54 47
55static void __kprobes unhandled_fault(unsigned long address, 48static void __kprobes unhandled_fault(unsigned long address,
56 struct task_struct *tsk, 49 struct task_struct *tsk,
@@ -73,7 +66,7 @@ static void __kprobes unhandled_fault(unsigned long address,
73 die_if_kernel("Oops", regs); 66 die_if_kernel("Oops", regs);
74} 67}
75 68
76static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) 69static void __kprobes bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr)
77{ 70{
78 printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", 71 printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n",
79 regs->tpc); 72 regs->tpc);
@@ -170,8 +163,9 @@ static unsigned int get_fault_insn(struct pt_regs *regs, unsigned int insn)
170 return insn; 163 return insn;
171} 164}
172 165
173static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, 166static void __kprobes do_kernel_fault(struct pt_regs *regs, int si_code,
174 unsigned int insn, unsigned long address) 167 int fault_code, unsigned int insn,
168 unsigned long address)
175{ 169{
176 unsigned char asi = ASI_P; 170 unsigned char asi = ASI_P;
177 171
@@ -225,7 +219,7 @@ cannot_handle:
225 unhandled_fault (address, current, regs); 219 unhandled_fault (address, current, regs);
226} 220}
227 221
228static void noinline bogus_32bit_fault_tpc(struct pt_regs *regs) 222static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
229{ 223{
230 static int times; 224 static int times;
231 225
@@ -237,8 +231,8 @@ static void noinline bogus_32bit_fault_tpc(struct pt_regs *regs)
237 show_regs(regs); 231 show_regs(regs);
238} 232}
239 233
240static void noinline bogus_32bit_fault_address(struct pt_regs *regs, 234static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs,
241 unsigned long addr) 235 unsigned long addr)
242{ 236{
243 static int times; 237 static int times;
244 238
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 2ffacd67c424..a89baf0d875a 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -17,6 +17,7 @@
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/scatterlist.h> 19#include <linux/scatterlist.h>
20#include <linux/bitmap.h>
20 21
21#include <asm/sections.h> 22#include <asm/sections.h>
22#include <asm/page.h> 23#include <asm/page.h>
@@ -1021,20 +1022,12 @@ static char *sun4c_lockarea(char *vaddr, unsigned long size)
1021 npages = (((unsigned long)vaddr & ~PAGE_MASK) + 1022 npages = (((unsigned long)vaddr & ~PAGE_MASK) +
1022 size + (PAGE_SIZE-1)) >> PAGE_SHIFT; 1023 size + (PAGE_SIZE-1)) >> PAGE_SHIFT;
1023 1024
1024 scan = 0;
1025 local_irq_save(flags); 1025 local_irq_save(flags);
1026 for (;;) { 1026 base = bitmap_find_next_zero_area(sun4c_iobuffer_map, iobuffer_map_size,
1027 scan = find_next_zero_bit(sun4c_iobuffer_map, 1027 0, npages, 0);
1028 iobuffer_map_size, scan); 1028 if (base >= iobuffer_map_size)
1029 if ((base = scan) + npages > iobuffer_map_size) goto abend; 1029 goto abend;
1030 for (;;) {
1031 if (scan >= base + npages) goto found;
1032 if (test_bit(scan, sun4c_iobuffer_map)) break;
1033 scan++;
1034 }
1035 }
1036 1030
1037found:
1038 high = ((base + npages) << PAGE_SHIFT) + sun4c_iobuffer_start; 1031 high = ((base + npages) << PAGE_SHIFT) + sun4c_iobuffer_start;
1039 high = SUN4C_REAL_PGDIR_ALIGN(high); 1032 high = SUN4C_REAL_PGDIR_ALIGN(high);
1040 while (high > sun4c_iobuffer_high) { 1033 while (high > sun4c_iobuffer_high) {
diff --git a/arch/um/Makefile b/arch/um/Makefile
index fc633dbacf84..fab8121d2b32 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -149,6 +149,6 @@ $(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s
149 149
150$(SHARED_HEADERS)/kern_constants.h: 150$(SHARED_HEADERS)/kern_constants.h:
151 $(Q)mkdir -p $(dir $@) 151 $(Q)mkdir -p $(dir $@)
152 $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@ 152 $(Q)echo '#include "../../../../include/generated/asm-offsets.h"' >$@
153 153
154export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH 154export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index e14629c87de4..51069245b79a 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -6,6 +6,7 @@
6 6
7#include <linux/console.h> 7#include <linux/console.h>
8#include <linux/ctype.h> 8#include <linux/ctype.h>
9#include <linux/string.h>
9#include <linux/interrupt.h> 10#include <linux/interrupt.h>
10#include <linux/list.h> 11#include <linux/list.h>
11#include <linux/mm.h> 12#include <linux/mm.h>
@@ -131,7 +132,7 @@ void mconsole_proc(struct mc_request *req)
131 char *ptr = req->request.data, *buf; 132 char *ptr = req->request.data, *buf;
132 133
133 ptr += strlen("proc"); 134 ptr += strlen("proc");
134 while (isspace(*ptr)) ptr++; 135 ptr = skip_spaces(ptr);
135 136
136 proc = get_fs_type("proc"); 137 proc = get_fs_type("proc");
137 if (proc == NULL) { 138 if (proc == NULL) {
@@ -212,8 +213,7 @@ void mconsole_proc(struct mc_request *req)
212 char *ptr = req->request.data; 213 char *ptr = req->request.data;
213 214
214 ptr += strlen("proc"); 215 ptr += strlen("proc");
215 while (isspace(*ptr)) 216 ptr = skip_spaces(ptr);
216 ptr++;
217 snprintf(path, sizeof(path), "/proc/%s", ptr); 217 snprintf(path, sizeof(path), "/proc/%s", ptr);
218 218
219 fd = sys_open(path, 0, 0); 219 fd = sys_open(path, 0, 0);
@@ -560,8 +560,7 @@ void mconsole_config(struct mc_request *req)
560 int err; 560 int err;
561 561
562 ptr += strlen("config"); 562 ptr += strlen("config");
563 while (isspace(*ptr)) 563 ptr = skip_spaces(ptr);
564 ptr++;
565 dev = mconsole_find_dev(ptr); 564 dev = mconsole_find_dev(ptr);
566 if (dev == NULL) { 565 if (dev == NULL) {
567 mconsole_reply(req, "Bad configuration option", 1, 0); 566 mconsole_reply(req, "Bad configuration option", 1, 0);
@@ -588,7 +587,7 @@ void mconsole_remove(struct mc_request *req)
588 int err, start, end, n; 587 int err, start, end, n;
589 588
590 ptr += strlen("remove"); 589 ptr += strlen("remove");
591 while (isspace(*ptr)) ptr++; 590 ptr = skip_spaces(ptr);
592 dev = mconsole_find_dev(ptr); 591 dev = mconsole_find_dev(ptr);
593 if (dev == NULL) { 592 if (dev == NULL) {
594 mconsole_reply(req, "Bad remove option", 1, 0); 593 mconsole_reply(req, "Bad remove option", 1, 0);
@@ -712,7 +711,7 @@ void mconsole_sysrq(struct mc_request *req)
712 char *ptr = req->request.data; 711 char *ptr = req->request.data;
713 712
714 ptr += strlen("sysrq"); 713 ptr += strlen("sysrq");
715 while (isspace(*ptr)) ptr++; 714 ptr = skip_spaces(ptr);
716 715
717 /* 716 /*
718 * With 'b', the system will shut down without a chance to reply, 717 * With 'b', the system will shut down without a chance to reply,
@@ -757,8 +756,7 @@ void mconsole_stack(struct mc_request *req)
757 */ 756 */
758 757
759 ptr += strlen("stack"); 758 ptr += strlen("stack");
760 while (isspace(*ptr)) 759 ptr = skip_spaces(ptr);
761 ptr++;
762 760
763 /* 761 /*
764 * Should really check for multiple pids or reject bad args here 762 * Should really check for multiple pids or reject bad args here
@@ -833,8 +831,8 @@ static int __init mconsole_init(void)
833 831
834__initcall(mconsole_init); 832__initcall(mconsole_init);
835 833
836static int write_proc_mconsole(struct file *file, const char __user *buffer, 834static ssize_t mconsole_proc_write(struct file *file,
837 unsigned long count, void *data) 835 const char __user *buffer, size_t count, loff_t *pos)
838{ 836{
839 char *buf; 837 char *buf;
840 838
@@ -855,6 +853,11 @@ static int write_proc_mconsole(struct file *file, const char __user *buffer,
855 return count; 853 return count;
856} 854}
857 855
856static const struct file_operations mconsole_proc_fops = {
857 .owner = THIS_MODULE,
858 .write = mconsole_proc_write,
859};
860
858static int create_proc_mconsole(void) 861static int create_proc_mconsole(void)
859{ 862{
860 struct proc_dir_entry *ent; 863 struct proc_dir_entry *ent;
@@ -862,15 +865,12 @@ static int create_proc_mconsole(void)
862 if (notify_socket == NULL) 865 if (notify_socket == NULL)
863 return 0; 866 return 0;
864 867
865 ent = create_proc_entry("mconsole", S_IFREG | 0200, NULL); 868 ent = proc_create("mconsole", 0200, NULL, &mconsole_proc_fops);
866 if (ent == NULL) { 869 if (ent == NULL) {
867 printk(KERN_INFO "create_proc_mconsole : create_proc_entry " 870 printk(KERN_INFO "create_proc_mconsole : create_proc_entry "
868 "failed\n"); 871 "failed\n");
869 return 0; 872 return 0;
870 } 873 }
871
872 ent->read_proc = NULL;
873 ent->write_proc = write_proc_mconsole;
874 return 0; 874 return 0;
875} 875}
876 876
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index eb240323c40a..d22f9e5c0eac 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -16,7 +16,7 @@
16#include <linux/miscdevice.h> 16#include <linux/miscdevice.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/smp_lock.h> 19
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include "mem_user.h" 21#include "mem_user.h"
22 22
@@ -78,7 +78,6 @@ out:
78 78
79static int mmapper_open(struct inode *inode, struct file *file) 79static int mmapper_open(struct inode *inode, struct file *file)
80{ 80{
81 cycle_kernel_lock();
82 return 0; 81 return 0;
83} 82}
84 83
@@ -115,18 +114,16 @@ static int __init mmapper_init(void)
115 v_buf = (char *) find_iomem("mmapper", &mmapper_size); 114 v_buf = (char *) find_iomem("mmapper", &mmapper_size);
116 if (mmapper_size == 0) { 115 if (mmapper_size == 0) {
117 printk(KERN_ERR "mmapper_init - find_iomem failed\n"); 116 printk(KERN_ERR "mmapper_init - find_iomem failed\n");
118 goto out; 117 return -ENODEV;
119 } 118 }
119 p_buf = __pa(v_buf);
120 120
121 err = misc_register(&mmapper_dev); 121 err = misc_register(&mmapper_dev);
122 if (err) { 122 if (err) {
123 printk(KERN_ERR "mmapper - misc_register failed, err = %d\n", 123 printk(KERN_ERR "mmapper - misc_register failed, err = %d\n",
124 err); 124 err);
125 goto out; 125 return err;;
126 } 126 }
127
128 p_buf = __pa(v_buf);
129out:
130 return 0; 127 return 0;
131} 128}
132 129
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 6eabb7022a2d..4949044773ba 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -7,7 +7,6 @@
7 * of the GNU General Public License, incorporated herein by reference. 7 * of the GNU General Public License, incorporated herein by reference.
8 */ 8 */
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/smp_lock.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/fs.h> 11#include <linux/fs.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
@@ -34,8 +33,6 @@ static DECLARE_WAIT_QUEUE_HEAD(host_read_wait);
34 33
35static int rng_dev_open (struct inode *inode, struct file *filp) 34static int rng_dev_open (struct inode *inode, struct file *filp)
36{ 35{
37 cycle_kernel_lock();
38
39 /* enforce read-only access to this chrdev */ 36 /* enforce read-only access to this chrdev */
40 if ((filp->f_mode & FMODE_READ) == 0) 37 if ((filp->f_mode & FMODE_READ) == 0)
41 return -EINVAL; 38 return -EINVAL;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 635d16d90a80..5ff554677f40 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -27,6 +27,7 @@
27#include "linux/init.h" 27#include "linux/init.h"
28#include "linux/cdrom.h" 28#include "linux/cdrom.h"
29#include "linux/proc_fs.h" 29#include "linux/proc_fs.h"
30#include "linux/seq_file.h"
30#include "linux/ctype.h" 31#include "linux/ctype.h"
31#include "linux/capability.h" 32#include "linux/capability.h"
32#include "linux/mm.h" 33#include "linux/mm.h"
@@ -200,23 +201,25 @@ static void make_proc_ide(void)
200 proc_ide = proc_mkdir("ide0", proc_ide_root); 201 proc_ide = proc_mkdir("ide0", proc_ide_root);
201} 202}
202 203
203static int proc_ide_read_media(char *page, char **start, off_t off, int count, 204static int fake_ide_media_proc_show(struct seq_file *m, void *v)
204 int *eof, void *data)
205{ 205{
206 int len; 206 seq_puts(m, "disk\n");
207 207 return 0;
208 strcpy(page, "disk\n"); 208}
209 len = strlen("disk\n"); 209
210 len -= off; 210static int fake_ide_media_proc_open(struct inode *inode, struct file *file)
211 if (len < count){ 211{
212 *eof = 1; 212 return single_open(file, fake_ide_media_proc_show, NULL);
213 if (len <= 0) return 0;
214 }
215 else len = count;
216 *start = page + off;
217 return len;
218} 213}
219 214
215static const struct file_operations fake_ide_media_proc_fops = {
216 .owner = THIS_MODULE,
217 .open = fake_ide_media_proc_open,
218 .read = seq_read,
219 .llseek = seq_lseek,
220 .release = single_release,
221};
222
220static void make_ide_entries(const char *dev_name) 223static void make_ide_entries(const char *dev_name)
221{ 224{
222 struct proc_dir_entry *dir, *ent; 225 struct proc_dir_entry *dir, *ent;
@@ -227,11 +230,8 @@ static void make_ide_entries(const char *dev_name)
227 dir = proc_mkdir(dev_name, proc_ide); 230 dir = proc_mkdir(dev_name, proc_ide);
228 if(!dir) return; 231 if(!dir) return;
229 232
230 ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir); 233 ent = proc_create("media", S_IRUGO, dir, &fake_ide_media_proc_fops);
231 if(!ent) return; 234 if(!ent) return;
232 ent->data = NULL;
233 ent->read_proc = proc_ide_read_media;
234 ent->write_proc = NULL;
235 snprintf(name, sizeof(name), "ide0/%s", dev_name); 235 snprintf(name, sizeof(name), "ide0/%s", dev_name);
236 proc_symlink(dev_name, proc_ide_root, name); 236 proc_symlink(dev_name, proc_ide_root, name);
237} 237}
diff --git a/arch/um/include/asm/asm-offsets.h b/arch/um/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/um/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c
index 6540d2c9fbb7..829df49dee99 100644
--- a/arch/um/kernel/exitcode.c
+++ b/arch/um/kernel/exitcode.c
@@ -6,7 +6,9 @@
6#include <linux/ctype.h> 6#include <linux/ctype.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/module.h>
9#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
11#include <linux/seq_file.h>
10#include <linux/types.h> 12#include <linux/types.h>
11#include <asm/uaccess.h> 13#include <asm/uaccess.h>
12 14
@@ -16,30 +18,26 @@
16 */ 18 */
17int uml_exitcode = 0; 19int uml_exitcode = 0;
18 20
19static int read_proc_exitcode(char *page, char **start, off_t off, 21static int exitcode_proc_show(struct seq_file *m, void *v)
20 int count, int *eof, void *data)
21{ 22{
22 int len, val; 23 int val;
23 24
24 /* 25 /*
25 * Save uml_exitcode in a local so that we don't need to guarantee 26 * Save uml_exitcode in a local so that we don't need to guarantee
26 * that sprintf accesses it atomically. 27 * that sprintf accesses it atomically.
27 */ 28 */
28 val = uml_exitcode; 29 val = uml_exitcode;
29 len = sprintf(page, "%d\n", val); 30 seq_printf(m, "%d\n", val);
30 len -= off; 31 return 0;
31 if (len <= off+count) 32}
32 *eof = 1; 33
33 *start = page + off; 34static int exitcode_proc_open(struct inode *inode, struct file *file)
34 if (len > count) 35{
35 len = count; 36 return single_open(file, exitcode_proc_show, NULL);
36 if (len < 0)
37 len = 0;
38 return len;
39} 37}
40 38
41static int write_proc_exitcode(struct file *file, const char __user *buffer, 39static ssize_t exitcode_proc_write(struct file *file,
42 unsigned long count, void *data) 40 const char __user *buffer, size_t count, loff_t *pos)
43{ 41{
44 char *end, buf[sizeof("nnnnn\0")]; 42 char *end, buf[sizeof("nnnnn\0")];
45 int tmp; 43 int tmp;
@@ -55,20 +53,25 @@ static int write_proc_exitcode(struct file *file, const char __user *buffer,
55 return count; 53 return count;
56} 54}
57 55
56static const struct file_operations exitcode_proc_fops = {
57 .owner = THIS_MODULE,
58 .open = exitcode_proc_open,
59 .read = seq_read,
60 .llseek = seq_lseek,
61 .release = single_release,
62 .write = exitcode_proc_write,
63};
64
58static int make_proc_exitcode(void) 65static int make_proc_exitcode(void)
59{ 66{
60 struct proc_dir_entry *ent; 67 struct proc_dir_entry *ent;
61 68
62 ent = create_proc_entry("exitcode", 0600, NULL); 69 ent = proc_create("exitcode", 0600, NULL, &exitcode_proc_fops);
63 if (ent == NULL) { 70 if (ent == NULL) {
64 printk(KERN_WARNING "make_proc_exitcode : Failed to register " 71 printk(KERN_WARNING "make_proc_exitcode : Failed to register "
65 "/proc/exitcode\n"); 72 "/proc/exitcode\n");
66 return 0; 73 return 0;
67 } 74 }
68
69 ent->read_proc = read_proc_exitcode;
70 ent->write_proc = write_proc_exitcode;
71
72 return 0; 75 return 0;
73} 76}
74 77
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 039270b9b73b..89474ba0741e 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -34,7 +34,7 @@ int show_interrupts(struct seq_file *p, void *v)
34 } 34 }
35 35
36 if (i < NR_IRQS) { 36 if (i < NR_IRQS) {
37 spin_lock_irqsave(&irq_desc[i].lock, flags); 37 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
38 action = irq_desc[i].action; 38 action = irq_desc[i].action;
39 if (!action) 39 if (!action)
40 goto skip; 40 goto skip;
@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
53 53
54 seq_putc(p, '\n'); 54 seq_putc(p, '\n');
55skip: 55skip:
56 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 56 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
57 } else if (i == NR_IRQS) 57 } else if (i == NR_IRQS)
58 seq_putc(p, '\n'); 58 seq_putc(p, '\n');
59 59
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 4a28a1568d85..2f910a1b7454 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -9,11 +9,13 @@
9#include <linux/hardirq.h> 9#include <linux/hardirq.h>
10#include <linux/gfp.h> 10#include <linux/gfp.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/module.h>
12#include <linux/personality.h> 13#include <linux/personality.h>
13#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
14#include <linux/ptrace.h> 15#include <linux/ptrace.h>
15#include <linux/random.h> 16#include <linux/random.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/seq_file.h>
17#include <linux/tick.h> 19#include <linux/tick.h>
18#include <linux/threads.h> 20#include <linux/threads.h>
19#include <asm/current.h> 21#include <asm/current.h>
@@ -336,16 +338,19 @@ int get_using_sysemu(void)
336 return atomic_read(&using_sysemu); 338 return atomic_read(&using_sysemu);
337} 339}
338 340
339static int proc_read_sysemu(char *buf, char **start, off_t offset, int size,int *eof, void *data) 341static int sysemu_proc_show(struct seq_file *m, void *v)
340{ 342{
341 if (snprintf(buf, size, "%d\n", get_using_sysemu()) < size) 343 seq_printf(m, "%d\n", get_using_sysemu());
342 /* No overflow */ 344 return 0;
343 *eof = 1; 345}
344 346
345 return strlen(buf); 347static int sysemu_proc_open(struct inode *inode, struct file *file)
348{
349 return single_open(file, sysemu_proc_show, NULL);
346} 350}
347 351
348static int proc_write_sysemu(struct file *file,const char __user *buf, unsigned long count,void *data) 352static ssize_t sysemu_proc_write(struct file *file, const char __user *buf,
353 size_t count, loff_t *pos)
349{ 354{
350 char tmp[2]; 355 char tmp[2];
351 356
@@ -358,13 +363,22 @@ static int proc_write_sysemu(struct file *file,const char __user *buf, unsigned
358 return count; 363 return count;
359} 364}
360 365
366static const struct file_operations sysemu_proc_fops = {
367 .owner = THIS_MODULE,
368 .open = sysemu_proc_open,
369 .read = seq_read,
370 .llseek = seq_lseek,
371 .release = single_release,
372 .write = sysemu_proc_write,
373};
374
361int __init make_proc_sysemu(void) 375int __init make_proc_sysemu(void)
362{ 376{
363 struct proc_dir_entry *ent; 377 struct proc_dir_entry *ent;
364 if (!sysemu_supported) 378 if (!sysemu_supported)
365 return 0; 379 return 0;
366 380
367 ent = create_proc_entry("sysemu", 0600, NULL); 381 ent = proc_create("sysemu", 0600, NULL, &sysemu_proc_fops);
368 382
369 if (ent == NULL) 383 if (ent == NULL)
370 { 384 {
@@ -372,9 +386,6 @@ int __init make_proc_sysemu(void)
372 return 0; 386 return 0;
373 } 387 }
374 388
375 ent->read_proc = proc_read_sysemu;
376 ent->write_proc = proc_write_sysemu;
377
378 return 0; 389 return 0;
379} 390}
380 391
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index a4625c7b2bf9..cccab850c27e 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -8,6 +8,7 @@
8#include "linux/mm.h" 8#include "linux/mm.h"
9#include "linux/sched.h" 9#include "linux/sched.h"
10#include "linux/utsname.h" 10#include "linux/utsname.h"
11#include "linux/syscalls.h"
11#include "asm/current.h" 12#include "asm/current.h"
12#include "asm/mman.h" 13#include "asm/mman.h"
13#include "asm/uaccess.h" 14#include "asm/uaccess.h"
@@ -37,31 +38,6 @@ long sys_vfork(void)
37 return ret; 38 return ret;
38} 39}
39 40
40/* common code for old and new mmaps */
41long sys_mmap2(unsigned long addr, unsigned long len,
42 unsigned long prot, unsigned long flags,
43 unsigned long fd, unsigned long pgoff)
44{
45 long error = -EBADF;
46 struct file * file = NULL;
47
48 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
49 if (!(flags & MAP_ANONYMOUS)) {
50 file = fget(fd);
51 if (!file)
52 goto out;
53 }
54
55 down_write(&current->mm->mmap_sem);
56 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
57 up_write(&current->mm->mmap_sem);
58
59 if (file)
60 fput(file);
61 out:
62 return error;
63}
64
65long old_mmap(unsigned long addr, unsigned long len, 41long old_mmap(unsigned long addr, unsigned long len,
66 unsigned long prot, unsigned long flags, 42 unsigned long prot, unsigned long flags,
67 unsigned long fd, unsigned long offset) 43 unsigned long fd, unsigned long offset)
@@ -70,7 +46,7 @@ long old_mmap(unsigned long addr, unsigned long len,
70 if (offset & ~PAGE_MASK) 46 if (offset & ~PAGE_MASK)
71 goto out; 47 goto out;
72 48
73 err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); 49 err = sys_mmap_pgoff(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
74 out: 50 out:
75 return err; 51 return err;
76} 52}
diff --git a/arch/um/sys-i386/asm/elf.h b/arch/um/sys-i386/asm/elf.h
index d0da9d7c5371..770885472ed4 100644
--- a/arch/um/sys-i386/asm/elf.h
+++ b/arch/um/sys-i386/asm/elf.h
@@ -48,7 +48,6 @@ typedef struct user_i387_struct elf_fpregset_t;
48 PT_REGS_EAX(regs) = 0; \ 48 PT_REGS_EAX(regs) = 0; \
49} while (0) 49} while (0)
50 50
51#define USE_ELF_CORE_DUMP
52#define ELF_EXEC_PAGESIZE 4096 51#define ELF_EXEC_PAGESIZE 4096
53 52
54#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 53#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
diff --git a/arch/um/sys-i386/shared/sysdep/syscalls.h b/arch/um/sys-i386/shared/sysdep/syscalls.h
index 905698197e35..e7787679e317 100644
--- a/arch/um/sys-i386/shared/sysdep/syscalls.h
+++ b/arch/um/sys-i386/shared/sysdep/syscalls.h
@@ -20,7 +20,3 @@ extern syscall_handler_t *sys_call_table[];
20#define EXECUTE_SYSCALL(syscall, regs) \ 20#define EXECUTE_SYSCALL(syscall, regs) \
21 ((long (*)(struct syscall_args)) \ 21 ((long (*)(struct syscall_args)) \
22 (*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs)) 22 (*sys_call_table[syscall]))(SYSCALL_ARGS(&regs->regs))
23
24extern long sys_mmap2(unsigned long addr, unsigned long len,
25 unsigned long prot, unsigned long flags,
26 unsigned long fd, unsigned long pgoff);
diff --git a/arch/um/sys-ppc/asm/elf.h b/arch/um/sys-ppc/asm/elf.h
index af9463cd8ce5..8aacaf56508d 100644
--- a/arch/um/sys-ppc/asm/elf.h
+++ b/arch/um/sys-ppc/asm/elf.h
@@ -17,8 +17,6 @@ extern long elf_aux_hwcap;
17#define ELF_CLASS ELFCLASS32 17#define ELF_CLASS ELFCLASS32
18#endif 18#endif
19 19
20#define USE_ELF_CORE_DUMP
21
22#define R_386_NONE 0 20#define R_386_NONE 0
23#define R_386_32 1 21#define R_386_32 1
24#define R_386_PC32 2 22#define R_386_PC32 2
diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h
index 04b9e87c8dad..49655c83efd2 100644
--- a/arch/um/sys-x86_64/asm/elf.h
+++ b/arch/um/sys-x86_64/asm/elf.h
@@ -104,7 +104,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
104 clear_thread_flag(TIF_IA32); 104 clear_thread_flag(TIF_IA32);
105#endif 105#endif
106 106
107#define USE_ELF_CORE_DUMP
108#define ELF_EXEC_PAGESIZE 4096 107#define ELF_EXEC_PAGESIZE 4096
109 108
110#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 109#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 32a1918e1b88..3b2a5aca4edb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2012,18 +2012,9 @@ config SCx200HR_TIMER
2012 processor goes idle (as is done by the scheduler). The 2012 processor goes idle (as is done by the scheduler). The
2013 other workaround is idle=poll boot option. 2013 other workaround is idle=poll boot option.
2014 2014
2015config GEODE_MFGPT_TIMER
2016 def_bool y
2017 prompt "Geode Multi-Function General Purpose Timer (MFGPT) events"
2018 depends on MGEODE_LX && GENERIC_TIME && GENERIC_CLOCKEVENTS
2019 ---help---
2020 This driver provides a clock event source based on the MFGPT
2021 timer(s) in the CS5535 and CS5536 companion chip for the geode.
2022 MFGPTs have a better resolution and max interval than the
2023 generic PIT, and are suitable for use as high-res timers.
2024
2025config OLPC 2015config OLPC
2026 bool "One Laptop Per Child support" 2016 bool "One Laptop Per Child support"
2017 select GPIOLIB
2027 default n 2018 default n
2028 ---help--- 2019 ---help---
2029 Add support for detecting the unique features of the OLPC 2020 Add support for detecting the unique features of the OLPC
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 731318e5ac1d..bc01e3ebfeb2 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -187,8 +187,8 @@ config HAVE_MMIOTRACE_SUPPORT
187 def_bool y 187 def_bool y
188 188
189config X86_DECODER_SELFTEST 189config X86_DECODER_SELFTEST
190 bool "x86 instruction decoder selftest" 190 bool "x86 instruction decoder selftest"
191 depends on DEBUG_KERNEL 191 depends on DEBUG_KERNEL && KPROBES
192 ---help--- 192 ---help---
193 Perform x86 instruction decoder selftests at build time. 193 Perform x86 instruction decoder selftests at build time.
194 This option is useful for checking the sanity of x86 instruction 194 This option is useful for checking the sanity of x86 instruction
diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
index bbeb0c3fbd90..89bbf4e4d05d 100644
--- a/arch/x86/boot/compressed/relocs.c
+++ b/arch/x86/boot/compressed/relocs.c
@@ -9,6 +9,9 @@
9#include <byteswap.h> 9#include <byteswap.h>
10#define USE_BSD 10#define USE_BSD
11#include <endian.h> 11#include <endian.h>
12#include <regex.h>
13
14static void die(char *fmt, ...);
12 15
13#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 16#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
14static Elf32_Ehdr ehdr; 17static Elf32_Ehdr ehdr;
@@ -30,25 +33,47 @@ static struct section *secs;
30 * the address for which it has been compiled. Don't warn user about 33 * the address for which it has been compiled. Don't warn user about
31 * absolute relocations present w.r.t these symbols. 34 * absolute relocations present w.r.t these symbols.
32 */ 35 */
33static const char* safe_abs_relocs[] = { 36static const char abs_sym_regex[] =
34 "xen_irq_disable_direct_reloc", 37 "^(xen_irq_disable_direct_reloc$|"
35 "xen_save_fl_direct_reloc", 38 "xen_save_fl_direct_reloc$|"
36}; 39 "VDSO|"
40 "__crc_)";
41static regex_t abs_sym_regex_c;
42static int is_abs_reloc(const char *sym_name)
43{
44 return !regexec(&abs_sym_regex_c, sym_name, 0, NULL, 0);
45}
37 46
38static int is_safe_abs_reloc(const char* sym_name) 47/*
48 * These symbols are known to be relative, even if the linker marks them
49 * as absolute (typically defined outside any section in the linker script.)
50 */
51static const char rel_sym_regex[] =
52 "^_end$";
53static regex_t rel_sym_regex_c;
54static int is_rel_reloc(const char *sym_name)
39{ 55{
40 int i; 56 return !regexec(&rel_sym_regex_c, sym_name, 0, NULL, 0);
57}
41 58
42 for (i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) { 59static void regex_init(void)
43 if (!strcmp(sym_name, safe_abs_relocs[i])) 60{
44 /* Match found */ 61 char errbuf[128];
45 return 1; 62 int err;
46 } 63
47 if (strncmp(sym_name, "VDSO", 4) == 0) 64 err = regcomp(&abs_sym_regex_c, abs_sym_regex,
48 return 1; 65 REG_EXTENDED|REG_NOSUB);
49 if (strncmp(sym_name, "__crc_", 6) == 0) 66 if (err) {
50 return 1; 67 regerror(err, &abs_sym_regex_c, errbuf, sizeof errbuf);
51 return 0; 68 die("%s", errbuf);
69 }
70
71 err = regcomp(&rel_sym_regex_c, rel_sym_regex,
72 REG_EXTENDED|REG_NOSUB);
73 if (err) {
74 regerror(err, &rel_sym_regex_c, errbuf, sizeof errbuf);
75 die("%s", errbuf);
76 }
52} 77}
53 78
54static void die(char *fmt, ...) 79static void die(char *fmt, ...)
@@ -131,7 +156,7 @@ static const char *rel_type(unsigned type)
131#undef REL_TYPE 156#undef REL_TYPE
132 }; 157 };
133 const char *name = "unknown type rel type name"; 158 const char *name = "unknown type rel type name";
134 if (type < ARRAY_SIZE(type_name)) { 159 if (type < ARRAY_SIZE(type_name) && type_name[type]) {
135 name = type_name[type]; 160 name = type_name[type];
136 } 161 }
137 return name; 162 return name;
@@ -448,7 +473,7 @@ static void print_absolute_relocs(void)
448 * Before warning check if this absolute symbol 473 * Before warning check if this absolute symbol
449 * relocation is harmless. 474 * relocation is harmless.
450 */ 475 */
451 if (is_safe_abs_reloc(name)) 476 if (is_abs_reloc(name) || is_rel_reloc(name))
452 continue; 477 continue;
453 478
454 if (!printed) { 479 if (!printed) {
@@ -501,21 +526,26 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
501 sym = &sh_symtab[ELF32_R_SYM(rel->r_info)]; 526 sym = &sh_symtab[ELF32_R_SYM(rel->r_info)];
502 r_type = ELF32_R_TYPE(rel->r_info); 527 r_type = ELF32_R_TYPE(rel->r_info);
503 /* Don't visit relocations to absolute symbols */ 528 /* Don't visit relocations to absolute symbols */
504 if (sym->st_shndx == SHN_ABS) { 529 if (sym->st_shndx == SHN_ABS &&
530 !is_rel_reloc(sym_name(sym_strtab, sym))) {
505 continue; 531 continue;
506 } 532 }
507 if (r_type == R_386_NONE || r_type == R_386_PC32) { 533 switch (r_type) {
534 case R_386_NONE:
535 case R_386_PC32:
508 /* 536 /*
509 * NONE can be ignored and and PC relative 537 * NONE can be ignored and and PC relative
510 * relocations don't need to be adjusted. 538 * relocations don't need to be adjusted.
511 */ 539 */
512 } 540 break;
513 else if (r_type == R_386_32) { 541 case R_386_32:
514 /* Visit relocations that need to be adjusted */ 542 /* Visit relocations that need to be adjusted */
515 visit(rel, sym); 543 visit(rel, sym);
516 } 544 break;
517 else { 545 default:
518 die("Unsupported relocation type: %d\n", r_type); 546 die("Unsupported relocation type: %s (%d)\n",
547 rel_type(r_type), r_type);
548 break;
519 } 549 }
520 } 550 }
521 } 551 }
@@ -571,16 +601,15 @@ static void emit_relocs(int as_text)
571 } 601 }
572 else { 602 else {
573 unsigned char buf[4]; 603 unsigned char buf[4];
574 buf[0] = buf[1] = buf[2] = buf[3] = 0;
575 /* Print a stop */ 604 /* Print a stop */
576 printf("%c%c%c%c", buf[0], buf[1], buf[2], buf[3]); 605 fwrite("\0\0\0\0", 4, 1, stdout);
577 /* Now print each relocation */ 606 /* Now print each relocation */
578 for (i = 0; i < reloc_count; i++) { 607 for (i = 0; i < reloc_count; i++) {
579 buf[0] = (relocs[i] >> 0) & 0xff; 608 buf[0] = (relocs[i] >> 0) & 0xff;
580 buf[1] = (relocs[i] >> 8) & 0xff; 609 buf[1] = (relocs[i] >> 8) & 0xff;
581 buf[2] = (relocs[i] >> 16) & 0xff; 610 buf[2] = (relocs[i] >> 16) & 0xff;
582 buf[3] = (relocs[i] >> 24) & 0xff; 611 buf[3] = (relocs[i] >> 24) & 0xff;
583 printf("%c%c%c%c", buf[0], buf[1], buf[2], buf[3]); 612 fwrite(buf, 4, 1, stdout);
584 } 613 }
585 } 614 }
586} 615}
@@ -598,6 +627,8 @@ int main(int argc, char **argv)
598 FILE *fp; 627 FILE *fp;
599 int i; 628 int i;
600 629
630 regex_init();
631
601 show_absolute_syms = 0; 632 show_absolute_syms = 0;
602 show_absolute_relocs = 0; 633 show_absolute_relocs = 0;
603 as_text = 0; 634 as_text = 0;
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index b31cc54b4641..93e689f4bd86 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#include <asm/segment.h> 18#include <asm/segment.h>
19#include <linux/utsrelease.h> 19#include <generated/utsrelease.h>
20#include <asm/boot.h> 20#include <asm/boot.h>
21#include <asm/e820.h> 21#include <asm/e820.h>
22#include <asm/page_types.h> 22#include <asm/page_types.h>
diff --git a/arch/x86/boot/version.c b/arch/x86/boot/version.c
index 2723d9b5ce43..2b15aa488ffb 100644
--- a/arch/x86/boot/version.c
+++ b/arch/x86/boot/version.c
@@ -13,8 +13,8 @@
13 */ 13 */
14 14
15#include "boot.h" 15#include "boot.h"
16#include <linux/utsrelease.h> 16#include <generated/utsrelease.h>
17#include <linux/compile.h> 17#include <generated/compile.h>
18 18
19const char kernel_version[] = 19const char kernel_version[] =
20 UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") " 20 UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") "
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index cfb0010fa940..1a58ad89fdf7 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_CRYPTO_AES_X86_64) += aes-x86_64.o
12obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o 12obj-$(CONFIG_CRYPTO_TWOFISH_X86_64) += twofish-x86_64.o
13obj-$(CONFIG_CRYPTO_SALSA20_X86_64) += salsa20-x86_64.o 13obj-$(CONFIG_CRYPTO_SALSA20_X86_64) += salsa20-x86_64.o
14obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o 14obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o
15obj-$(CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL) += ghash-clmulni-intel.o
15 16
16obj-$(CONFIG_CRYPTO_CRC32C_INTEL) += crc32c-intel.o 17obj-$(CONFIG_CRYPTO_CRC32C_INTEL) += crc32c-intel.o
17 18
@@ -24,3 +25,5 @@ twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o
24salsa20-x86_64-y := salsa20-x86_64-asm_64.o salsa20_glue.o 25salsa20-x86_64-y := salsa20-x86_64-asm_64.o salsa20_glue.o
25 26
26aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o 27aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o
28
29ghash-clmulni-intel-y := ghash-clmulni-intel_asm.o ghash-clmulni-intel_glue.o
diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
index eb0566e83319..20bb0e1ac681 100644
--- a/arch/x86/crypto/aesni-intel_asm.S
+++ b/arch/x86/crypto/aesni-intel_asm.S
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include <linux/linkage.h> 18#include <linux/linkage.h>
19#include <asm/inst.h>
19 20
20.text 21.text
21 22
@@ -122,103 +123,72 @@ ENTRY(aesni_set_key)
122 movups 0x10(%rsi), %xmm2 # other user key 123 movups 0x10(%rsi), %xmm2 # other user key
123 movaps %xmm2, (%rcx) 124 movaps %xmm2, (%rcx)
124 add $0x10, %rcx 125 add $0x10, %rcx
125 # aeskeygenassist $0x1, %xmm2, %xmm1 # round 1 126 AESKEYGENASSIST 0x1 %xmm2 %xmm1 # round 1
126 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x01
127 call _key_expansion_256a 127 call _key_expansion_256a
128 # aeskeygenassist $0x1, %xmm0, %xmm1 128 AESKEYGENASSIST 0x1 %xmm0 %xmm1
129 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x01
130 call _key_expansion_256b 129 call _key_expansion_256b
131 # aeskeygenassist $0x2, %xmm2, %xmm1 # round 2 130 AESKEYGENASSIST 0x2 %xmm2 %xmm1 # round 2
132 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x02
133 call _key_expansion_256a 131 call _key_expansion_256a
134 # aeskeygenassist $0x2, %xmm0, %xmm1 132 AESKEYGENASSIST 0x2 %xmm0 %xmm1
135 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x02
136 call _key_expansion_256b 133 call _key_expansion_256b
137 # aeskeygenassist $0x4, %xmm2, %xmm1 # round 3 134 AESKEYGENASSIST 0x4 %xmm2 %xmm1 # round 3
138 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x04
139 call _key_expansion_256a 135 call _key_expansion_256a
140 # aeskeygenassist $0x4, %xmm0, %xmm1 136 AESKEYGENASSIST 0x4 %xmm0 %xmm1
141 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x04
142 call _key_expansion_256b 137 call _key_expansion_256b
143 # aeskeygenassist $0x8, %xmm2, %xmm1 # round 4 138 AESKEYGENASSIST 0x8 %xmm2 %xmm1 # round 4
144 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x08
145 call _key_expansion_256a 139 call _key_expansion_256a
146 # aeskeygenassist $0x8, %xmm0, %xmm1 140 AESKEYGENASSIST 0x8 %xmm0 %xmm1
147 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x08
148 call _key_expansion_256b 141 call _key_expansion_256b
149 # aeskeygenassist $0x10, %xmm2, %xmm1 # round 5 142 AESKEYGENASSIST 0x10 %xmm2 %xmm1 # round 5
150 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x10
151 call _key_expansion_256a 143 call _key_expansion_256a
152 # aeskeygenassist $0x10, %xmm0, %xmm1 144 AESKEYGENASSIST 0x10 %xmm0 %xmm1
153 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x10
154 call _key_expansion_256b 145 call _key_expansion_256b
155 # aeskeygenassist $0x20, %xmm2, %xmm1 # round 6 146 AESKEYGENASSIST 0x20 %xmm2 %xmm1 # round 6
156 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x20
157 call _key_expansion_256a 147 call _key_expansion_256a
158 # aeskeygenassist $0x20, %xmm0, %xmm1 148 AESKEYGENASSIST 0x20 %xmm0 %xmm1
159 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x20
160 call _key_expansion_256b 149 call _key_expansion_256b
161 # aeskeygenassist $0x40, %xmm2, %xmm1 # round 7 150 AESKEYGENASSIST 0x40 %xmm2 %xmm1 # round 7
162 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x40
163 call _key_expansion_256a 151 call _key_expansion_256a
164 jmp .Ldec_key 152 jmp .Ldec_key
165.Lenc_key192: 153.Lenc_key192:
166 movq 0x10(%rsi), %xmm2 # other user key 154 movq 0x10(%rsi), %xmm2 # other user key
167 # aeskeygenassist $0x1, %xmm2, %xmm1 # round 1 155 AESKEYGENASSIST 0x1 %xmm2 %xmm1 # round 1
168 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x01
169 call _key_expansion_192a 156 call _key_expansion_192a
170 # aeskeygenassist $0x2, %xmm2, %xmm1 # round 2 157 AESKEYGENASSIST 0x2 %xmm2 %xmm1 # round 2
171 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x02
172 call _key_expansion_192b 158 call _key_expansion_192b
173 # aeskeygenassist $0x4, %xmm2, %xmm1 # round 3 159 AESKEYGENASSIST 0x4 %xmm2 %xmm1 # round 3
174 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x04
175 call _key_expansion_192a 160 call _key_expansion_192a
176 # aeskeygenassist $0x8, %xmm2, %xmm1 # round 4 161 AESKEYGENASSIST 0x8 %xmm2 %xmm1 # round 4
177 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x08
178 call _key_expansion_192b 162 call _key_expansion_192b
179 # aeskeygenassist $0x10, %xmm2, %xmm1 # round 5 163 AESKEYGENASSIST 0x10 %xmm2 %xmm1 # round 5
180 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x10
181 call _key_expansion_192a 164 call _key_expansion_192a
182 # aeskeygenassist $0x20, %xmm2, %xmm1 # round 6 165 AESKEYGENASSIST 0x20 %xmm2 %xmm1 # round 6
183 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x20
184 call _key_expansion_192b 166 call _key_expansion_192b
185 # aeskeygenassist $0x40, %xmm2, %xmm1 # round 7 167 AESKEYGENASSIST 0x40 %xmm2 %xmm1 # round 7
186 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x40
187 call _key_expansion_192a 168 call _key_expansion_192a
188 # aeskeygenassist $0x80, %xmm2, %xmm1 # round 8 169 AESKEYGENASSIST 0x80 %xmm2 %xmm1 # round 8
189 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xca, 0x80
190 call _key_expansion_192b 170 call _key_expansion_192b
191 jmp .Ldec_key 171 jmp .Ldec_key
192.Lenc_key128: 172.Lenc_key128:
193 # aeskeygenassist $0x1, %xmm0, %xmm1 # round 1 173 AESKEYGENASSIST 0x1 %xmm0 %xmm1 # round 1
194 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x01
195 call _key_expansion_128 174 call _key_expansion_128
196 # aeskeygenassist $0x2, %xmm0, %xmm1 # round 2 175 AESKEYGENASSIST 0x2 %xmm0 %xmm1 # round 2
197 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x02
198 call _key_expansion_128 176 call _key_expansion_128
199 # aeskeygenassist $0x4, %xmm0, %xmm1 # round 3 177 AESKEYGENASSIST 0x4 %xmm0 %xmm1 # round 3
200 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x04
201 call _key_expansion_128 178 call _key_expansion_128
202 # aeskeygenassist $0x8, %xmm0, %xmm1 # round 4 179 AESKEYGENASSIST 0x8 %xmm0 %xmm1 # round 4
203 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x08
204 call _key_expansion_128 180 call _key_expansion_128
205 # aeskeygenassist $0x10, %xmm0, %xmm1 # round 5 181 AESKEYGENASSIST 0x10 %xmm0 %xmm1 # round 5
206 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x10
207 call _key_expansion_128 182 call _key_expansion_128
208 # aeskeygenassist $0x20, %xmm0, %xmm1 # round 6 183 AESKEYGENASSIST 0x20 %xmm0 %xmm1 # round 6
209 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x20
210 call _key_expansion_128 184 call _key_expansion_128
211 # aeskeygenassist $0x40, %xmm0, %xmm1 # round 7 185 AESKEYGENASSIST 0x40 %xmm0 %xmm1 # round 7
212 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x40
213 call _key_expansion_128 186 call _key_expansion_128
214 # aeskeygenassist $0x80, %xmm0, %xmm1 # round 8 187 AESKEYGENASSIST 0x80 %xmm0 %xmm1 # round 8
215 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x80
216 call _key_expansion_128 188 call _key_expansion_128
217 # aeskeygenassist $0x1b, %xmm0, %xmm1 # round 9 189 AESKEYGENASSIST 0x1b %xmm0 %xmm1 # round 9
218 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x1b
219 call _key_expansion_128 190 call _key_expansion_128
220 # aeskeygenassist $0x36, %xmm0, %xmm1 # round 10 191 AESKEYGENASSIST 0x36 %xmm0 %xmm1 # round 10
221 .byte 0x66, 0x0f, 0x3a, 0xdf, 0xc8, 0x36
222 call _key_expansion_128 192 call _key_expansion_128
223.Ldec_key: 193.Ldec_key:
224 sub $0x10, %rcx 194 sub $0x10, %rcx
@@ -231,8 +201,7 @@ ENTRY(aesni_set_key)
231.align 4 201.align 4
232.Ldec_key_loop: 202.Ldec_key_loop:
233 movaps (%rdi), %xmm0 203 movaps (%rdi), %xmm0
234 # aesimc %xmm0, %xmm1 204 AESIMC %xmm0 %xmm1
235 .byte 0x66, 0x0f, 0x38, 0xdb, 0xc8
236 movaps %xmm1, (%rsi) 205 movaps %xmm1, (%rsi)
237 add $0x10, %rdi 206 add $0x10, %rdi
238 sub $0x10, %rsi 207 sub $0x10, %rsi
@@ -274,51 +243,37 @@ _aesni_enc1:
274 je .Lenc192 243 je .Lenc192
275 add $0x20, TKEYP 244 add $0x20, TKEYP
276 movaps -0x60(TKEYP), KEY 245 movaps -0x60(TKEYP), KEY
277 # aesenc KEY, STATE 246 AESENC KEY STATE
278 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
279 movaps -0x50(TKEYP), KEY 247 movaps -0x50(TKEYP), KEY
280 # aesenc KEY, STATE 248 AESENC KEY STATE
281 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
282.align 4 249.align 4
283.Lenc192: 250.Lenc192:
284 movaps -0x40(TKEYP), KEY 251 movaps -0x40(TKEYP), KEY
285 # aesenc KEY, STATE 252 AESENC KEY STATE
286 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
287 movaps -0x30(TKEYP), KEY 253 movaps -0x30(TKEYP), KEY
288 # aesenc KEY, STATE 254 AESENC KEY STATE
289 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
290.align 4 255.align 4
291.Lenc128: 256.Lenc128:
292 movaps -0x20(TKEYP), KEY 257 movaps -0x20(TKEYP), KEY
293 # aesenc KEY, STATE 258 AESENC KEY STATE
294 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
295 movaps -0x10(TKEYP), KEY 259 movaps -0x10(TKEYP), KEY
296 # aesenc KEY, STATE 260 AESENC KEY STATE
297 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
298 movaps (TKEYP), KEY 261 movaps (TKEYP), KEY
299 # aesenc KEY, STATE 262 AESENC KEY STATE
300 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
301 movaps 0x10(TKEYP), KEY 263 movaps 0x10(TKEYP), KEY
302 # aesenc KEY, STATE 264 AESENC KEY STATE
303 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
304 movaps 0x20(TKEYP), KEY 265 movaps 0x20(TKEYP), KEY
305 # aesenc KEY, STATE 266 AESENC KEY STATE
306 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
307 movaps 0x30(TKEYP), KEY 267 movaps 0x30(TKEYP), KEY
308 # aesenc KEY, STATE 268 AESENC KEY STATE
309 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
310 movaps 0x40(TKEYP), KEY 269 movaps 0x40(TKEYP), KEY
311 # aesenc KEY, STATE 270 AESENC KEY STATE
312 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
313 movaps 0x50(TKEYP), KEY 271 movaps 0x50(TKEYP), KEY
314 # aesenc KEY, STATE 272 AESENC KEY STATE
315 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
316 movaps 0x60(TKEYP), KEY 273 movaps 0x60(TKEYP), KEY
317 # aesenc KEY, STATE 274 AESENC KEY STATE
318 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2
319 movaps 0x70(TKEYP), KEY 275 movaps 0x70(TKEYP), KEY
320 # aesenclast KEY, STATE # last round 276 AESENCLAST KEY STATE
321 .byte 0x66, 0x0f, 0x38, 0xdd, 0xc2
322 ret 277 ret
323 278
324/* 279/*
@@ -353,135 +308,79 @@ _aesni_enc4:
353 je .L4enc192 308 je .L4enc192
354 add $0x20, TKEYP 309 add $0x20, TKEYP
355 movaps -0x60(TKEYP), KEY 310 movaps -0x60(TKEYP), KEY
356 # aesenc KEY, STATE1 311 AESENC KEY STATE1
357 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 312 AESENC KEY STATE2
358 # aesenc KEY, STATE2 313 AESENC KEY STATE3
359 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 314 AESENC KEY STATE4
360 # aesenc KEY, STATE3
361 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
362 # aesenc KEY, STATE4
363 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
364 movaps -0x50(TKEYP), KEY 315 movaps -0x50(TKEYP), KEY
365 # aesenc KEY, STATE1 316 AESENC KEY STATE1
366 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 317 AESENC KEY STATE2
367 # aesenc KEY, STATE2 318 AESENC KEY STATE3
368 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 319 AESENC KEY STATE4
369 # aesenc KEY, STATE3
370 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
371 # aesenc KEY, STATE4
372 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
373#.align 4 320#.align 4
374.L4enc192: 321.L4enc192:
375 movaps -0x40(TKEYP), KEY 322 movaps -0x40(TKEYP), KEY
376 # aesenc KEY, STATE1 323 AESENC KEY STATE1
377 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 324 AESENC KEY STATE2
378 # aesenc KEY, STATE2 325 AESENC KEY STATE3
379 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 326 AESENC KEY STATE4
380 # aesenc KEY, STATE3
381 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
382 # aesenc KEY, STATE4
383 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
384 movaps -0x30(TKEYP), KEY 327 movaps -0x30(TKEYP), KEY
385 # aesenc KEY, STATE1 328 AESENC KEY STATE1
386 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 329 AESENC KEY STATE2
387 # aesenc KEY, STATE2 330 AESENC KEY STATE3
388 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 331 AESENC KEY STATE4
389 # aesenc KEY, STATE3
390 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
391 # aesenc KEY, STATE4
392 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
393#.align 4 332#.align 4
394.L4enc128: 333.L4enc128:
395 movaps -0x20(TKEYP), KEY 334 movaps -0x20(TKEYP), KEY
396 # aesenc KEY, STATE1 335 AESENC KEY STATE1
397 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 336 AESENC KEY STATE2
398 # aesenc KEY, STATE2 337 AESENC KEY STATE3
399 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 338 AESENC KEY STATE4
400 # aesenc KEY, STATE3
401 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
402 # aesenc KEY, STATE4
403 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
404 movaps -0x10(TKEYP), KEY 339 movaps -0x10(TKEYP), KEY
405 # aesenc KEY, STATE1 340 AESENC KEY STATE1
406 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 341 AESENC KEY STATE2
407 # aesenc KEY, STATE2 342 AESENC KEY STATE3
408 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 343 AESENC KEY STATE4
409 # aesenc KEY, STATE3
410 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
411 # aesenc KEY, STATE4
412 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
413 movaps (TKEYP), KEY 344 movaps (TKEYP), KEY
414 # aesenc KEY, STATE1 345 AESENC KEY STATE1
415 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 346 AESENC KEY STATE2
416 # aesenc KEY, STATE2 347 AESENC KEY STATE3
417 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 348 AESENC KEY STATE4
418 # aesenc KEY, STATE3
419 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
420 # aesenc KEY, STATE4
421 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
422 movaps 0x10(TKEYP), KEY 349 movaps 0x10(TKEYP), KEY
423 # aesenc KEY, STATE1 350 AESENC KEY STATE1
424 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 351 AESENC KEY STATE2
425 # aesenc KEY, STATE2 352 AESENC KEY STATE3
426 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 353 AESENC KEY STATE4
427 # aesenc KEY, STATE3
428 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
429 # aesenc KEY, STATE4
430 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
431 movaps 0x20(TKEYP), KEY 354 movaps 0x20(TKEYP), KEY
432 # aesenc KEY, STATE1 355 AESENC KEY STATE1
433 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 356 AESENC KEY STATE2
434 # aesenc KEY, STATE2 357 AESENC KEY STATE3
435 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 358 AESENC KEY STATE4
436 # aesenc KEY, STATE3
437 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
438 # aesenc KEY, STATE4
439 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
440 movaps 0x30(TKEYP), KEY 359 movaps 0x30(TKEYP), KEY
441 # aesenc KEY, STATE1 360 AESENC KEY STATE1
442 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 361 AESENC KEY STATE2
443 # aesenc KEY, STATE2 362 AESENC KEY STATE3
444 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 363 AESENC KEY STATE4
445 # aesenc KEY, STATE3
446 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
447 # aesenc KEY, STATE4
448 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
449 movaps 0x40(TKEYP), KEY 364 movaps 0x40(TKEYP), KEY
450 # aesenc KEY, STATE1 365 AESENC KEY STATE1
451 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 366 AESENC KEY STATE2
452 # aesenc KEY, STATE2 367 AESENC KEY STATE3
453 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 368 AESENC KEY STATE4
454 # aesenc KEY, STATE3
455 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
456 # aesenc KEY, STATE4
457 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
458 movaps 0x50(TKEYP), KEY 369 movaps 0x50(TKEYP), KEY
459 # aesenc KEY, STATE1 370 AESENC KEY STATE1
460 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 371 AESENC KEY STATE2
461 # aesenc KEY, STATE2 372 AESENC KEY STATE3
462 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 373 AESENC KEY STATE4
463 # aesenc KEY, STATE3
464 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
465 # aesenc KEY, STATE4
466 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
467 movaps 0x60(TKEYP), KEY 374 movaps 0x60(TKEYP), KEY
468 # aesenc KEY, STATE1 375 AESENC KEY STATE1
469 .byte 0x66, 0x0f, 0x38, 0xdc, 0xc2 376 AESENC KEY STATE2
470 # aesenc KEY, STATE2 377 AESENC KEY STATE3
471 .byte 0x66, 0x0f, 0x38, 0xdc, 0xe2 378 AESENC KEY STATE4
472 # aesenc KEY, STATE3
473 .byte 0x66, 0x0f, 0x38, 0xdc, 0xea
474 # aesenc KEY, STATE4
475 .byte 0x66, 0x0f, 0x38, 0xdc, 0xf2
476 movaps 0x70(TKEYP), KEY 379 movaps 0x70(TKEYP), KEY
477 # aesenclast KEY, STATE1 # last round 380 AESENCLAST KEY STATE1 # last round
478 .byte 0x66, 0x0f, 0x38, 0xdd, 0xc2 381 AESENCLAST KEY STATE2
479 # aesenclast KEY, STATE2 382 AESENCLAST KEY STATE3
480 .byte 0x66, 0x0f, 0x38, 0xdd, 0xe2 383 AESENCLAST KEY STATE4
481 # aesenclast KEY, STATE3
482 .byte 0x66, 0x0f, 0x38, 0xdd, 0xea
483 # aesenclast KEY, STATE4
484 .byte 0x66, 0x0f, 0x38, 0xdd, 0xf2
485 ret 384 ret
486 385
487/* 386/*
@@ -518,51 +417,37 @@ _aesni_dec1:
518 je .Ldec192 417 je .Ldec192
519 add $0x20, TKEYP 418 add $0x20, TKEYP
520 movaps -0x60(TKEYP), KEY 419 movaps -0x60(TKEYP), KEY
521 # aesdec KEY, STATE 420 AESDEC KEY STATE
522 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
523 movaps -0x50(TKEYP), KEY 421 movaps -0x50(TKEYP), KEY
524 # aesdec KEY, STATE 422 AESDEC KEY STATE
525 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
526.align 4 423.align 4
527.Ldec192: 424.Ldec192:
528 movaps -0x40(TKEYP), KEY 425 movaps -0x40(TKEYP), KEY
529 # aesdec KEY, STATE 426 AESDEC KEY STATE
530 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
531 movaps -0x30(TKEYP), KEY 427 movaps -0x30(TKEYP), KEY
532 # aesdec KEY, STATE 428 AESDEC KEY STATE
533 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
534.align 4 429.align 4
535.Ldec128: 430.Ldec128:
536 movaps -0x20(TKEYP), KEY 431 movaps -0x20(TKEYP), KEY
537 # aesdec KEY, STATE 432 AESDEC KEY STATE
538 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
539 movaps -0x10(TKEYP), KEY 433 movaps -0x10(TKEYP), KEY
540 # aesdec KEY, STATE 434 AESDEC KEY STATE
541 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
542 movaps (TKEYP), KEY 435 movaps (TKEYP), KEY
543 # aesdec KEY, STATE 436 AESDEC KEY STATE
544 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
545 movaps 0x10(TKEYP), KEY 437 movaps 0x10(TKEYP), KEY
546 # aesdec KEY, STATE 438 AESDEC KEY STATE
547 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
548 movaps 0x20(TKEYP), KEY 439 movaps 0x20(TKEYP), KEY
549 # aesdec KEY, STATE 440 AESDEC KEY STATE
550 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
551 movaps 0x30(TKEYP), KEY 441 movaps 0x30(TKEYP), KEY
552 # aesdec KEY, STATE 442 AESDEC KEY STATE
553 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
554 movaps 0x40(TKEYP), KEY 443 movaps 0x40(TKEYP), KEY
555 # aesdec KEY, STATE 444 AESDEC KEY STATE
556 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
557 movaps 0x50(TKEYP), KEY 445 movaps 0x50(TKEYP), KEY
558 # aesdec KEY, STATE 446 AESDEC KEY STATE
559 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
560 movaps 0x60(TKEYP), KEY 447 movaps 0x60(TKEYP), KEY
561 # aesdec KEY, STATE 448 AESDEC KEY STATE
562 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2
563 movaps 0x70(TKEYP), KEY 449 movaps 0x70(TKEYP), KEY
564 # aesdeclast KEY, STATE # last round 450 AESDECLAST KEY STATE
565 .byte 0x66, 0x0f, 0x38, 0xdf, 0xc2
566 ret 451 ret
567 452
568/* 453/*
@@ -597,135 +482,79 @@ _aesni_dec4:
597 je .L4dec192 482 je .L4dec192
598 add $0x20, TKEYP 483 add $0x20, TKEYP
599 movaps -0x60(TKEYP), KEY 484 movaps -0x60(TKEYP), KEY
600 # aesdec KEY, STATE1 485 AESDEC KEY STATE1
601 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 486 AESDEC KEY STATE2
602 # aesdec KEY, STATE2 487 AESDEC KEY STATE3
603 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 488 AESDEC KEY STATE4
604 # aesdec KEY, STATE3
605 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
606 # aesdec KEY, STATE4
607 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
608 movaps -0x50(TKEYP), KEY 489 movaps -0x50(TKEYP), KEY
609 # aesdec KEY, STATE1 490 AESDEC KEY STATE1
610 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 491 AESDEC KEY STATE2
611 # aesdec KEY, STATE2 492 AESDEC KEY STATE3
612 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 493 AESDEC KEY STATE4
613 # aesdec KEY, STATE3
614 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
615 # aesdec KEY, STATE4
616 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
617.align 4 494.align 4
618.L4dec192: 495.L4dec192:
619 movaps -0x40(TKEYP), KEY 496 movaps -0x40(TKEYP), KEY
620 # aesdec KEY, STATE1 497 AESDEC KEY STATE1
621 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 498 AESDEC KEY STATE2
622 # aesdec KEY, STATE2 499 AESDEC KEY STATE3
623 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 500 AESDEC KEY STATE4
624 # aesdec KEY, STATE3
625 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
626 # aesdec KEY, STATE4
627 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
628 movaps -0x30(TKEYP), KEY 501 movaps -0x30(TKEYP), KEY
629 # aesdec KEY, STATE1 502 AESDEC KEY STATE1
630 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 503 AESDEC KEY STATE2
631 # aesdec KEY, STATE2 504 AESDEC KEY STATE3
632 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 505 AESDEC KEY STATE4
633 # aesdec KEY, STATE3
634 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
635 # aesdec KEY, STATE4
636 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
637.align 4 506.align 4
638.L4dec128: 507.L4dec128:
639 movaps -0x20(TKEYP), KEY 508 movaps -0x20(TKEYP), KEY
640 # aesdec KEY, STATE1 509 AESDEC KEY STATE1
641 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 510 AESDEC KEY STATE2
642 # aesdec KEY, STATE2 511 AESDEC KEY STATE3
643 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 512 AESDEC KEY STATE4
644 # aesdec KEY, STATE3
645 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
646 # aesdec KEY, STATE4
647 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
648 movaps -0x10(TKEYP), KEY 513 movaps -0x10(TKEYP), KEY
649 # aesdec KEY, STATE1 514 AESDEC KEY STATE1
650 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 515 AESDEC KEY STATE2
651 # aesdec KEY, STATE2 516 AESDEC KEY STATE3
652 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 517 AESDEC KEY STATE4
653 # aesdec KEY, STATE3
654 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
655 # aesdec KEY, STATE4
656 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
657 movaps (TKEYP), KEY 518 movaps (TKEYP), KEY
658 # aesdec KEY, STATE1 519 AESDEC KEY STATE1
659 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 520 AESDEC KEY STATE2
660 # aesdec KEY, STATE2 521 AESDEC KEY STATE3
661 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 522 AESDEC KEY STATE4
662 # aesdec KEY, STATE3
663 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
664 # aesdec KEY, STATE4
665 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
666 movaps 0x10(TKEYP), KEY 523 movaps 0x10(TKEYP), KEY
667 # aesdec KEY, STATE1 524 AESDEC KEY STATE1
668 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 525 AESDEC KEY STATE2
669 # aesdec KEY, STATE2 526 AESDEC KEY STATE3
670 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 527 AESDEC KEY STATE4
671 # aesdec KEY, STATE3
672 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
673 # aesdec KEY, STATE4
674 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
675 movaps 0x20(TKEYP), KEY 528 movaps 0x20(TKEYP), KEY
676 # aesdec KEY, STATE1 529 AESDEC KEY STATE1
677 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 530 AESDEC KEY STATE2
678 # aesdec KEY, STATE2 531 AESDEC KEY STATE3
679 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 532 AESDEC KEY STATE4
680 # aesdec KEY, STATE3
681 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
682 # aesdec KEY, STATE4
683 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
684 movaps 0x30(TKEYP), KEY 533 movaps 0x30(TKEYP), KEY
685 # aesdec KEY, STATE1 534 AESDEC KEY STATE1
686 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 535 AESDEC KEY STATE2
687 # aesdec KEY, STATE2 536 AESDEC KEY STATE3
688 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 537 AESDEC KEY STATE4
689 # aesdec KEY, STATE3
690 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
691 # aesdec KEY, STATE4
692 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
693 movaps 0x40(TKEYP), KEY 538 movaps 0x40(TKEYP), KEY
694 # aesdec KEY, STATE1 539 AESDEC KEY STATE1
695 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 540 AESDEC KEY STATE2
696 # aesdec KEY, STATE2 541 AESDEC KEY STATE3
697 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 542 AESDEC KEY STATE4
698 # aesdec KEY, STATE3
699 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
700 # aesdec KEY, STATE4
701 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
702 movaps 0x50(TKEYP), KEY 543 movaps 0x50(TKEYP), KEY
703 # aesdec KEY, STATE1 544 AESDEC KEY STATE1
704 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 545 AESDEC KEY STATE2
705 # aesdec KEY, STATE2 546 AESDEC KEY STATE3
706 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 547 AESDEC KEY STATE4
707 # aesdec KEY, STATE3
708 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
709 # aesdec KEY, STATE4
710 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
711 movaps 0x60(TKEYP), KEY 548 movaps 0x60(TKEYP), KEY
712 # aesdec KEY, STATE1 549 AESDEC KEY STATE1
713 .byte 0x66, 0x0f, 0x38, 0xde, 0xc2 550 AESDEC KEY STATE2
714 # aesdec KEY, STATE2 551 AESDEC KEY STATE3
715 .byte 0x66, 0x0f, 0x38, 0xde, 0xe2 552 AESDEC KEY STATE4
716 # aesdec KEY, STATE3
717 .byte 0x66, 0x0f, 0x38, 0xde, 0xea
718 # aesdec KEY, STATE4
719 .byte 0x66, 0x0f, 0x38, 0xde, 0xf2
720 movaps 0x70(TKEYP), KEY 553 movaps 0x70(TKEYP), KEY
721 # aesdeclast KEY, STATE1 # last round 554 AESDECLAST KEY STATE1 # last round
722 .byte 0x66, 0x0f, 0x38, 0xdf, 0xc2 555 AESDECLAST KEY STATE2
723 # aesdeclast KEY, STATE2 556 AESDECLAST KEY STATE3
724 .byte 0x66, 0x0f, 0x38, 0xdf, 0xe2 557 AESDECLAST KEY STATE4
725 # aesdeclast KEY, STATE3
726 .byte 0x66, 0x0f, 0x38, 0xdf, 0xea
727 # aesdeclast KEY, STATE4
728 .byte 0x66, 0x0f, 0x38, 0xdf, 0xf2
729 ret 558 ret
730 559
731/* 560/*
diff --git a/arch/x86/crypto/ghash-clmulni-intel_asm.S b/arch/x86/crypto/ghash-clmulni-intel_asm.S
new file mode 100644
index 000000000000..1eb7f90cb7b9
--- /dev/null
+++ b/arch/x86/crypto/ghash-clmulni-intel_asm.S
@@ -0,0 +1,157 @@
1/*
2 * Accelerated GHASH implementation with Intel PCLMULQDQ-NI
3 * instructions. This file contains accelerated part of ghash
4 * implementation. More information about PCLMULQDQ can be found at:
5 *
6 * http://software.intel.com/en-us/articles/carry-less-multiplication-and-its-usage-for-computing-the-gcm-mode/
7 *
8 * Copyright (c) 2009 Intel Corp.
9 * Author: Huang Ying <ying.huang@intel.com>
10 * Vinodh Gopal
11 * Erdinc Ozturk
12 * Deniz Karakoyunlu
13 *
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License version 2 as published
16 * by the Free Software Foundation.
17 */
18
19#include <linux/linkage.h>
20#include <asm/inst.h>
21
22.data
23
24.align 16
25.Lbswap_mask:
26 .octa 0x000102030405060708090a0b0c0d0e0f
27.Lpoly:
28 .octa 0xc2000000000000000000000000000001
29.Ltwo_one:
30 .octa 0x00000001000000000000000000000001
31
32#define DATA %xmm0
33#define SHASH %xmm1
34#define T1 %xmm2
35#define T2 %xmm3
36#define T3 %xmm4
37#define BSWAP %xmm5
38#define IN1 %xmm6
39
40.text
41
42/*
43 * __clmul_gf128mul_ble: internal ABI
44 * input:
45 * DATA: operand1
46 * SHASH: operand2, hash_key << 1 mod poly
47 * output:
48 * DATA: operand1 * operand2 mod poly
49 * changed:
50 * T1
51 * T2
52 * T3
53 */
54__clmul_gf128mul_ble:
55 movaps DATA, T1
56 pshufd $0b01001110, DATA, T2
57 pshufd $0b01001110, SHASH, T3
58 pxor DATA, T2
59 pxor SHASH, T3
60
61 PCLMULQDQ 0x00 SHASH DATA # DATA = a0 * b0
62 PCLMULQDQ 0x11 SHASH T1 # T1 = a1 * b1
63 PCLMULQDQ 0x00 T3 T2 # T2 = (a1 + a0) * (b1 + b0)
64 pxor DATA, T2
65 pxor T1, T2 # T2 = a0 * b1 + a1 * b0
66
67 movaps T2, T3
68 pslldq $8, T3
69 psrldq $8, T2
70 pxor T3, DATA
71 pxor T2, T1 # <T1:DATA> is result of
72 # carry-less multiplication
73
74 # first phase of the reduction
75 movaps DATA, T3
76 psllq $1, T3
77 pxor DATA, T3
78 psllq $5, T3
79 pxor DATA, T3
80 psllq $57, T3
81 movaps T3, T2
82 pslldq $8, T2
83 psrldq $8, T3
84 pxor T2, DATA
85 pxor T3, T1
86
87 # second phase of the reduction
88 movaps DATA, T2
89 psrlq $5, T2
90 pxor DATA, T2
91 psrlq $1, T2
92 pxor DATA, T2
93 psrlq $1, T2
94 pxor T2, T1
95 pxor T1, DATA
96 ret
97
98/* void clmul_ghash_mul(char *dst, const be128 *shash) */
99ENTRY(clmul_ghash_mul)
100 movups (%rdi), DATA
101 movups (%rsi), SHASH
102 movaps .Lbswap_mask, BSWAP
103 PSHUFB_XMM BSWAP DATA
104 call __clmul_gf128mul_ble
105 PSHUFB_XMM BSWAP DATA
106 movups DATA, (%rdi)
107 ret
108
109/*
110 * void clmul_ghash_update(char *dst, const char *src, unsigned int srclen,
111 * const be128 *shash);
112 */
113ENTRY(clmul_ghash_update)
114 cmp $16, %rdx
115 jb .Lupdate_just_ret # check length
116 movaps .Lbswap_mask, BSWAP
117 movups (%rdi), DATA
118 movups (%rcx), SHASH
119 PSHUFB_XMM BSWAP DATA
120.align 4
121.Lupdate_loop:
122 movups (%rsi), IN1
123 PSHUFB_XMM BSWAP IN1
124 pxor IN1, DATA
125 call __clmul_gf128mul_ble
126 sub $16, %rdx
127 add $16, %rsi
128 cmp $16, %rdx
129 jge .Lupdate_loop
130 PSHUFB_XMM BSWAP DATA
131 movups DATA, (%rdi)
132.Lupdate_just_ret:
133 ret
134
135/*
136 * void clmul_ghash_setkey(be128 *shash, const u8 *key);
137 *
138 * Calculate hash_key << 1 mod poly
139 */
140ENTRY(clmul_ghash_setkey)
141 movaps .Lbswap_mask, BSWAP
142 movups (%rsi), %xmm0
143 PSHUFB_XMM BSWAP %xmm0
144 movaps %xmm0, %xmm1
145 psllq $1, %xmm0
146 psrlq $63, %xmm1
147 movaps %xmm1, %xmm2
148 pslldq $8, %xmm1
149 psrldq $8, %xmm2
150 por %xmm1, %xmm0
151 # reduction
152 pshufd $0b00100100, %xmm2, %xmm1
153 pcmpeqd .Ltwo_one, %xmm1
154 pand .Lpoly, %xmm1
155 pxor %xmm1, %xmm0
156 movups %xmm0, (%rdi)
157 ret
diff --git a/arch/x86/crypto/ghash-clmulni-intel_glue.c b/arch/x86/crypto/ghash-clmulni-intel_glue.c
new file mode 100644
index 000000000000..cbcc8d8ea93a
--- /dev/null
+++ b/arch/x86/crypto/ghash-clmulni-intel_glue.c
@@ -0,0 +1,333 @@
1/*
2 * Accelerated GHASH implementation with Intel PCLMULQDQ-NI
3 * instructions. This file contains glue code.
4 *
5 * Copyright (c) 2009 Intel Corp.
6 * Author: Huang Ying <ying.huang@intel.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 version 2 as published
10 * by the Free Software Foundation.
11 */
12
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <linux/crypto.h>
17#include <crypto/algapi.h>
18#include <crypto/cryptd.h>
19#include <crypto/gf128mul.h>
20#include <crypto/internal/hash.h>
21#include <asm/i387.h>
22
23#define GHASH_BLOCK_SIZE 16
24#define GHASH_DIGEST_SIZE 16
25
26void clmul_ghash_mul(char *dst, const be128 *shash);
27
28void clmul_ghash_update(char *dst, const char *src, unsigned int srclen,
29 const be128 *shash);
30
31void clmul_ghash_setkey(be128 *shash, const u8 *key);
32
33struct ghash_async_ctx {
34 struct cryptd_ahash *cryptd_tfm;
35};
36
37struct ghash_ctx {
38 be128 shash;
39};
40
41struct ghash_desc_ctx {
42 u8 buffer[GHASH_BLOCK_SIZE];
43 u32 bytes;
44};
45
46static int ghash_init(struct shash_desc *desc)
47{
48 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
49
50 memset(dctx, 0, sizeof(*dctx));
51
52 return 0;
53}
54
55static int ghash_setkey(struct crypto_shash *tfm,
56 const u8 *key, unsigned int keylen)
57{
58 struct ghash_ctx *ctx = crypto_shash_ctx(tfm);
59
60 if (keylen != GHASH_BLOCK_SIZE) {
61 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
62 return -EINVAL;
63 }
64
65 clmul_ghash_setkey(&ctx->shash, key);
66
67 return 0;
68}
69
70static int ghash_update(struct shash_desc *desc,
71 const u8 *src, unsigned int srclen)
72{
73 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
74 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
75 u8 *dst = dctx->buffer;
76
77 kernel_fpu_begin();
78 if (dctx->bytes) {
79 int n = min(srclen, dctx->bytes);
80 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes);
81
82 dctx->bytes -= n;
83 srclen -= n;
84
85 while (n--)
86 *pos++ ^= *src++;
87
88 if (!dctx->bytes)
89 clmul_ghash_mul(dst, &ctx->shash);
90 }
91
92 clmul_ghash_update(dst, src, srclen, &ctx->shash);
93 kernel_fpu_end();
94
95 if (srclen & 0xf) {
96 src += srclen - (srclen & 0xf);
97 srclen &= 0xf;
98 dctx->bytes = GHASH_BLOCK_SIZE - srclen;
99 while (srclen--)
100 *dst++ ^= *src++;
101 }
102
103 return 0;
104}
105
106static void ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
107{
108 u8 *dst = dctx->buffer;
109
110 if (dctx->bytes) {
111 u8 *tmp = dst + (GHASH_BLOCK_SIZE - dctx->bytes);
112
113 while (dctx->bytes--)
114 *tmp++ ^= 0;
115
116 kernel_fpu_begin();
117 clmul_ghash_mul(dst, &ctx->shash);
118 kernel_fpu_end();
119 }
120
121 dctx->bytes = 0;
122}
123
124static int ghash_final(struct shash_desc *desc, u8 *dst)
125{
126 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
127 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
128 u8 *buf = dctx->buffer;
129
130 ghash_flush(ctx, dctx);
131 memcpy(dst, buf, GHASH_BLOCK_SIZE);
132
133 return 0;
134}
135
136static struct shash_alg ghash_alg = {
137 .digestsize = GHASH_DIGEST_SIZE,
138 .init = ghash_init,
139 .update = ghash_update,
140 .final = ghash_final,
141 .setkey = ghash_setkey,
142 .descsize = sizeof(struct ghash_desc_ctx),
143 .base = {
144 .cra_name = "__ghash",
145 .cra_driver_name = "__ghash-pclmulqdqni",
146 .cra_priority = 0,
147 .cra_flags = CRYPTO_ALG_TYPE_SHASH,
148 .cra_blocksize = GHASH_BLOCK_SIZE,
149 .cra_ctxsize = sizeof(struct ghash_ctx),
150 .cra_module = THIS_MODULE,
151 .cra_list = LIST_HEAD_INIT(ghash_alg.base.cra_list),
152 },
153};
154
155static int ghash_async_init(struct ahash_request *req)
156{
157 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
158 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
159 struct ahash_request *cryptd_req = ahash_request_ctx(req);
160 struct cryptd_ahash *cryptd_tfm = ctx->cryptd_tfm;
161
162 if (!irq_fpu_usable()) {
163 memcpy(cryptd_req, req, sizeof(*req));
164 ahash_request_set_tfm(cryptd_req, &cryptd_tfm->base);
165 return crypto_ahash_init(cryptd_req);
166 } else {
167 struct shash_desc *desc = cryptd_shash_desc(cryptd_req);
168 struct crypto_shash *child = cryptd_ahash_child(cryptd_tfm);
169
170 desc->tfm = child;
171 desc->flags = req->base.flags;
172 return crypto_shash_init(desc);
173 }
174}
175
176static int ghash_async_update(struct ahash_request *req)
177{
178 struct ahash_request *cryptd_req = ahash_request_ctx(req);
179
180 if (!irq_fpu_usable()) {
181 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
182 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
183 struct cryptd_ahash *cryptd_tfm = ctx->cryptd_tfm;
184
185 memcpy(cryptd_req, req, sizeof(*req));
186 ahash_request_set_tfm(cryptd_req, &cryptd_tfm->base);
187 return crypto_ahash_update(cryptd_req);
188 } else {
189 struct shash_desc *desc = cryptd_shash_desc(cryptd_req);
190 return shash_ahash_update(req, desc);
191 }
192}
193
194static int ghash_async_final(struct ahash_request *req)
195{
196 struct ahash_request *cryptd_req = ahash_request_ctx(req);
197
198 if (!irq_fpu_usable()) {
199 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
200 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
201 struct cryptd_ahash *cryptd_tfm = ctx->cryptd_tfm;
202
203 memcpy(cryptd_req, req, sizeof(*req));
204 ahash_request_set_tfm(cryptd_req, &cryptd_tfm->base);
205 return crypto_ahash_final(cryptd_req);
206 } else {
207 struct shash_desc *desc = cryptd_shash_desc(cryptd_req);
208 return crypto_shash_final(desc, req->result);
209 }
210}
211
212static int ghash_async_digest(struct ahash_request *req)
213{
214 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
215 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
216 struct ahash_request *cryptd_req = ahash_request_ctx(req);
217 struct cryptd_ahash *cryptd_tfm = ctx->cryptd_tfm;
218
219 if (!irq_fpu_usable()) {
220 memcpy(cryptd_req, req, sizeof(*req));
221 ahash_request_set_tfm(cryptd_req, &cryptd_tfm->base);
222 return crypto_ahash_digest(cryptd_req);
223 } else {
224 struct shash_desc *desc = cryptd_shash_desc(cryptd_req);
225 struct crypto_shash *child = cryptd_ahash_child(cryptd_tfm);
226
227 desc->tfm = child;
228 desc->flags = req->base.flags;
229 return shash_ahash_digest(req, desc);
230 }
231}
232
233static int ghash_async_setkey(struct crypto_ahash *tfm, const u8 *key,
234 unsigned int keylen)
235{
236 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
237 struct crypto_ahash *child = &ctx->cryptd_tfm->base;
238 int err;
239
240 crypto_ahash_clear_flags(child, CRYPTO_TFM_REQ_MASK);
241 crypto_ahash_set_flags(child, crypto_ahash_get_flags(tfm)
242 & CRYPTO_TFM_REQ_MASK);
243 err = crypto_ahash_setkey(child, key, keylen);
244 crypto_ahash_set_flags(tfm, crypto_ahash_get_flags(child)
245 & CRYPTO_TFM_RES_MASK);
246
247 return 0;
248}
249
250static int ghash_async_init_tfm(struct crypto_tfm *tfm)
251{
252 struct cryptd_ahash *cryptd_tfm;
253 struct ghash_async_ctx *ctx = crypto_tfm_ctx(tfm);
254
255 cryptd_tfm = cryptd_alloc_ahash("__ghash-pclmulqdqni", 0, 0);
256 if (IS_ERR(cryptd_tfm))
257 return PTR_ERR(cryptd_tfm);
258 ctx->cryptd_tfm = cryptd_tfm;
259 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
260 sizeof(struct ahash_request) +
261 crypto_ahash_reqsize(&cryptd_tfm->base));
262
263 return 0;
264}
265
266static void ghash_async_exit_tfm(struct crypto_tfm *tfm)
267{
268 struct ghash_async_ctx *ctx = crypto_tfm_ctx(tfm);
269
270 cryptd_free_ahash(ctx->cryptd_tfm);
271}
272
273static struct ahash_alg ghash_async_alg = {
274 .init = ghash_async_init,
275 .update = ghash_async_update,
276 .final = ghash_async_final,
277 .setkey = ghash_async_setkey,
278 .digest = ghash_async_digest,
279 .halg = {
280 .digestsize = GHASH_DIGEST_SIZE,
281 .base = {
282 .cra_name = "ghash",
283 .cra_driver_name = "ghash-clmulni",
284 .cra_priority = 400,
285 .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
286 .cra_blocksize = GHASH_BLOCK_SIZE,
287 .cra_type = &crypto_ahash_type,
288 .cra_module = THIS_MODULE,
289 .cra_list = LIST_HEAD_INIT(ghash_async_alg.halg.base.cra_list),
290 .cra_init = ghash_async_init_tfm,
291 .cra_exit = ghash_async_exit_tfm,
292 },
293 },
294};
295
296static int __init ghash_pclmulqdqni_mod_init(void)
297{
298 int err;
299
300 if (!cpu_has_pclmulqdq) {
301 printk(KERN_INFO "Intel PCLMULQDQ-NI instructions are not"
302 " detected.\n");
303 return -ENODEV;
304 }
305
306 err = crypto_register_shash(&ghash_alg);
307 if (err)
308 goto err_out;
309 err = crypto_register_ahash(&ghash_async_alg);
310 if (err)
311 goto err_shash;
312
313 return 0;
314
315err_shash:
316 crypto_unregister_shash(&ghash_alg);
317err_out:
318 return err;
319}
320
321static void __exit ghash_pclmulqdqni_mod_exit(void)
322{
323 crypto_unregister_ahash(&ghash_async_alg);
324 crypto_unregister_shash(&ghash_alg);
325}
326
327module_init(ghash_pclmulqdqni_mod_init);
328module_exit(ghash_pclmulqdqni_mod_exit);
329
330MODULE_LICENSE("GPL");
331MODULE_DESCRIPTION("GHASH Message Digest Algorithm, "
332 "acclerated by PCLMULQDQ-NI");
333MODULE_ALIAS("ghash");
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 4eefdca9832b..53147ad85b96 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -696,7 +696,7 @@ ia32_sys_call_table:
696 .quad quiet_ni_syscall /* streams2 */ 696 .quad quiet_ni_syscall /* streams2 */
697 .quad stub32_vfork /* 190 */ 697 .quad stub32_vfork /* 190 */
698 .quad compat_sys_getrlimit 698 .quad compat_sys_getrlimit
699 .quad sys32_mmap2 699 .quad sys_mmap_pgoff
700 .quad sys32_truncate64 700 .quad sys32_truncate64
701 .quad sys32_ftruncate64 701 .quad sys32_ftruncate64
702 .quad sys32_stat64 /* 195 */ 702 .quad sys32_stat64 /* 195 */
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
index df82c0e48ded..422572c77923 100644
--- a/arch/x86/ia32/sys_ia32.c
+++ b/arch/x86/ia32/sys_ia32.c
@@ -155,9 +155,6 @@ struct mmap_arg_struct {
155asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg) 155asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg)
156{ 156{
157 struct mmap_arg_struct a; 157 struct mmap_arg_struct a;
158 struct file *file = NULL;
159 unsigned long retval;
160 struct mm_struct *mm ;
161 158
162 if (copy_from_user(&a, arg, sizeof(a))) 159 if (copy_from_user(&a, arg, sizeof(a)))
163 return -EFAULT; 160 return -EFAULT;
@@ -165,22 +162,8 @@ asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg)
165 if (a.offset & ~PAGE_MASK) 162 if (a.offset & ~PAGE_MASK)
166 return -EINVAL; 163 return -EINVAL;
167 164
168 if (!(a.flags & MAP_ANONYMOUS)) { 165 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
169 file = fget(a.fd);
170 if (!file)
171 return -EBADF;
172 }
173
174 mm = current->mm;
175 down_write(&mm->mmap_sem);
176 retval = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags,
177 a.offset>>PAGE_SHIFT); 166 a.offset>>PAGE_SHIFT);
178 if (file)
179 fput(file);
180
181 up_write(&mm->mmap_sem);
182
183 return retval;
184} 167}
185 168
186asmlinkage long sys32_mprotect(unsigned long start, size_t len, 169asmlinkage long sys32_mprotect(unsigned long start, size_t len,
@@ -483,30 +466,6 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
483 return ret; 466 return ret;
484} 467}
485 468
486asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len,
487 unsigned long prot, unsigned long flags,
488 unsigned long fd, unsigned long pgoff)
489{
490 struct mm_struct *mm = current->mm;
491 unsigned long error;
492 struct file *file = NULL;
493
494 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
495 if (!(flags & MAP_ANONYMOUS)) {
496 file = fget(fd);
497 if (!file)
498 return -EBADF;
499 }
500
501 down_write(&mm->mmap_sem);
502 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
503 up_write(&mm->mmap_sem);
504
505 if (file)
506 fput(file);
507 return error;
508}
509
510asmlinkage long sys32_olduname(struct oldold_utsname __user *name) 469asmlinkage long sys32_olduname(struct oldold_utsname __user *name)
511{ 470{
512 char *arch = "x86_64"; 471 char *arch = "x86_64";
diff --git a/arch/x86/include/asm/amd_iommu_proto.h b/arch/x86/include/asm/amd_iommu_proto.h
index 84786fb9a23b..4d817f9e6e77 100644
--- a/arch/x86/include/asm/amd_iommu_proto.h
+++ b/arch/x86/include/asm/amd_iommu_proto.h
@@ -28,7 +28,9 @@ extern void amd_iommu_flush_all_domains(void);
28extern void amd_iommu_flush_all_devices(void); 28extern void amd_iommu_flush_all_devices(void);
29extern void amd_iommu_apply_erratum_63(u16 devid); 29extern void amd_iommu_apply_erratum_63(u16 devid);
30extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu); 30extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
31 31extern int amd_iommu_init_devices(void);
32extern void amd_iommu_uninit_devices(void);
33extern void amd_iommu_init_notifier(void);
32#ifndef CONFIG_AMD_IOMMU_STATS 34#ifndef CONFIG_AMD_IOMMU_STATS
33 35
34static inline void amd_iommu_stats_init(void) { } 36static inline void amd_iommu_stats_init(void) { }
diff --git a/arch/x86/include/asm/asm-offsets.h b/arch/x86/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/x86/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 9cfc88b97742..613700f27a4a 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -248,6 +248,7 @@ extern const char * const x86_power_flags[32];
248#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) 248#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC)
249#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE) 249#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE)
250#define cpu_has_hypervisor boot_cpu_has(X86_FEATURE_HYPERVISOR) 250#define cpu_has_hypervisor boot_cpu_has(X86_FEATURE_HYPERVISOR)
251#define cpu_has_pclmulqdq boot_cpu_has(X86_FEATURE_PCLMULQDQ)
251 252
252#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64) 253#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
253# define cpu_has_invlpg 1 254# define cpu_has_invlpg 1
diff --git a/arch/x86/include/asm/desc_defs.h b/arch/x86/include/asm/desc_defs.h
index 9d6684849fd9..278441f39856 100644
--- a/arch/x86/include/asm/desc_defs.h
+++ b/arch/x86/include/asm/desc_defs.h
@@ -12,9 +12,9 @@
12#include <linux/types.h> 12#include <linux/types.h>
13 13
14/* 14/*
15 * FIXME: Acessing the desc_struct through its fields is more elegant, 15 * FIXME: Accessing the desc_struct through its fields is more elegant,
16 * and should be the one valid thing to do. However, a lot of open code 16 * and should be the one valid thing to do. However, a lot of open code
17 * still touches the a and b acessors, and doing this allow us to do it 17 * still touches the a and b accessors, and doing this allow us to do it
18 * incrementally. We keep the signature as a struct, rather than an union, 18 * incrementally. We keep the signature as a struct, rather than an union,
19 * so we can get rid of it transparently in the future -- glommer 19 * so we can get rid of it transparently in the future -- glommer
20 */ 20 */
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 0f6c02f3b7d4..ac91eed21061 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -67,7 +67,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
67 if (!dev->dma_mask) 67 if (!dev->dma_mask)
68 return 0; 68 return 0;
69 69
70 return addr + size <= *dev->dma_mask; 70 return addr + size - 1 <= *dev->dma_mask;
71} 71}
72 72
73static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 73static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 8a024babe5e6..b4501ee223ad 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -239,7 +239,6 @@ extern int force_personality32;
239#endif /* !CONFIG_X86_32 */ 239#endif /* !CONFIG_X86_32 */
240 240
241#define CORE_DUMP_USE_REGSET 241#define CORE_DUMP_USE_REGSET
242#define USE_ELF_CORE_DUMP
243#define ELF_EXEC_PAGESIZE 4096 242#define ELF_EXEC_PAGESIZE 4096
244 243
245/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 244/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/x86/include/asm/geode.h b/arch/x86/include/asm/geode.h
index ad3c2ed75481..7cd73552a4e8 100644
--- a/arch/x86/include/asm/geode.h
+++ b/arch/x86/include/asm/geode.h
@@ -12,160 +12,7 @@
12 12
13#include <asm/processor.h> 13#include <asm/processor.h>
14#include <linux/io.h> 14#include <linux/io.h>
15 15#include <linux/cs5535.h>
16/* Generic southbridge functions */
17
18#define GEODE_DEV_PMS 0
19#define GEODE_DEV_ACPI 1
20#define GEODE_DEV_GPIO 2
21#define GEODE_DEV_MFGPT 3
22
23extern int geode_get_dev_base(unsigned int dev);
24
25/* Useful macros */
26#define geode_pms_base() geode_get_dev_base(GEODE_DEV_PMS)
27#define geode_acpi_base() geode_get_dev_base(GEODE_DEV_ACPI)
28#define geode_gpio_base() geode_get_dev_base(GEODE_DEV_GPIO)
29#define geode_mfgpt_base() geode_get_dev_base(GEODE_DEV_MFGPT)
30
31/* MSRS */
32
33#define MSR_GLIU_P2D_RO0 0x10000029
34
35#define MSR_LX_GLD_MSR_CONFIG 0x48002001
36#define MSR_LX_MSR_PADSEL 0x48002011 /* NOT 0x48000011; the data
37 * sheet has the wrong value */
38#define MSR_GLCP_SYS_RSTPLL 0x4C000014
39#define MSR_GLCP_DOTPLL 0x4C000015
40
41#define MSR_LBAR_SMB 0x5140000B
42#define MSR_LBAR_GPIO 0x5140000C
43#define MSR_LBAR_MFGPT 0x5140000D
44#define MSR_LBAR_ACPI 0x5140000E
45#define MSR_LBAR_PMS 0x5140000F
46
47#define MSR_DIVIL_SOFT_RESET 0x51400017
48
49#define MSR_PIC_YSEL_LOW 0x51400020
50#define MSR_PIC_YSEL_HIGH 0x51400021
51#define MSR_PIC_ZSEL_LOW 0x51400022
52#define MSR_PIC_ZSEL_HIGH 0x51400023
53#define MSR_PIC_IRQM_LPC 0x51400025
54
55#define MSR_MFGPT_IRQ 0x51400028
56#define MSR_MFGPT_NR 0x51400029
57#define MSR_MFGPT_SETUP 0x5140002B
58
59#define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */
60
61#define MSR_GX_GLD_MSR_CONFIG 0xC0002001
62#define MSR_GX_MSR_PADSEL 0xC0002011
63
64/* Resource Sizes */
65
66#define LBAR_GPIO_SIZE 0xFF
67#define LBAR_MFGPT_SIZE 0x40
68#define LBAR_ACPI_SIZE 0x40
69#define LBAR_PMS_SIZE 0x80
70
71/* ACPI registers (PMS block) */
72
73/*
74 * PM1_EN is only valid when VSA is enabled for 16 bit reads.
75 * When VSA is not enabled, *always* read both PM1_STS and PM1_EN
76 * with a 32 bit read at offset 0x0
77 */
78
79#define PM1_STS 0x00
80#define PM1_EN 0x02
81#define PM1_CNT 0x08
82#define PM2_CNT 0x0C
83#define PM_TMR 0x10
84#define PM_GPE0_STS 0x18
85#define PM_GPE0_EN 0x1C
86
87/* PMC registers (PMS block) */
88
89#define PM_SSD 0x00
90#define PM_SCXA 0x04
91#define PM_SCYA 0x08
92#define PM_OUT_SLPCTL 0x0C
93#define PM_SCLK 0x10
94#define PM_SED 0x1
95#define PM_SCXD 0x18
96#define PM_SCYD 0x1C
97#define PM_IN_SLPCTL 0x20
98#define PM_WKD 0x30
99#define PM_WKXD 0x34
100#define PM_RD 0x38
101#define PM_WKXA 0x3C
102#define PM_FSD 0x40
103#define PM_TSD 0x44
104#define PM_PSD 0x48
105#define PM_NWKD 0x4C
106#define PM_AWKD 0x50
107#define PM_SSC 0x54
108
109/* VSA2 magic values */
110
111#define VSA_VRC_INDEX 0xAC1C
112#define VSA_VRC_DATA 0xAC1E
113#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */
114#define VSA_VR_SIGNATURE 0x0003
115#define VSA_VR_MEM_SIZE 0x0200
116#define AMD_VSA_SIG 0x4132 /* signature is ascii 'VSA2' */
117#define GSW_VSA_SIG 0x534d /* General Software signature */
118/* GPIO */
119
120#define GPIO_OUTPUT_VAL 0x00
121#define GPIO_OUTPUT_ENABLE 0x04
122#define GPIO_OUTPUT_OPEN_DRAIN 0x08
123#define GPIO_OUTPUT_INVERT 0x0C
124#define GPIO_OUTPUT_AUX1 0x10
125#define GPIO_OUTPUT_AUX2 0x14
126#define GPIO_PULL_UP 0x18
127#define GPIO_PULL_DOWN 0x1C
128#define GPIO_INPUT_ENABLE 0x20
129#define GPIO_INPUT_INVERT 0x24
130#define GPIO_INPUT_FILTER 0x28
131#define GPIO_INPUT_EVENT_COUNT 0x2C
132#define GPIO_READ_BACK 0x30
133#define GPIO_INPUT_AUX1 0x34
134#define GPIO_EVENTS_ENABLE 0x38
135#define GPIO_LOCK_ENABLE 0x3C
136#define GPIO_POSITIVE_EDGE_EN 0x40
137#define GPIO_NEGATIVE_EDGE_EN 0x44
138#define GPIO_POSITIVE_EDGE_STS 0x48
139#define GPIO_NEGATIVE_EDGE_STS 0x4C
140
141#define GPIO_MAP_X 0xE0
142#define GPIO_MAP_Y 0xE4
143#define GPIO_MAP_Z 0xE8
144#define GPIO_MAP_W 0xEC
145
146static inline u32 geode_gpio(unsigned int nr)
147{
148 BUG_ON(nr > 28);
149 return 1 << nr;
150}
151
152extern void geode_gpio_set(u32, unsigned int);
153extern void geode_gpio_clear(u32, unsigned int);
154extern int geode_gpio_isset(u32, unsigned int);
155extern void geode_gpio_setup_event(unsigned int, int, int);
156extern void geode_gpio_set_irq(unsigned int, unsigned int);
157
158static inline void geode_gpio_event_irq(unsigned int gpio, int pair)
159{
160 geode_gpio_setup_event(gpio, pair, 0);
161}
162
163static inline void geode_gpio_event_pme(unsigned int gpio, int pair)
164{
165 geode_gpio_setup_event(gpio, pair, 1);
166}
167
168/* Specific geode tests */
169 16
170static inline int is_geode_gx(void) 17static inline int is_geode_gx(void)
171{ 18{
@@ -186,68 +33,4 @@ static inline int is_geode(void)
186 return (is_geode_gx() || is_geode_lx()); 33 return (is_geode_gx() || is_geode_lx());
187} 34}
188 35
189#ifdef CONFIG_MGEODE_LX
190extern int geode_has_vsa2(void);
191#else
192static inline int geode_has_vsa2(void)
193{
194 return 0;
195}
196#endif
197
198/* MFGPTs */
199
200#define MFGPT_MAX_TIMERS 8
201#define MFGPT_TIMER_ANY (-1)
202
203#define MFGPT_DOMAIN_WORKING 1
204#define MFGPT_DOMAIN_STANDBY 2
205#define MFGPT_DOMAIN_ANY (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY)
206
207#define MFGPT_CMP1 0
208#define MFGPT_CMP2 1
209
210#define MFGPT_EVENT_IRQ 0
211#define MFGPT_EVENT_NMI 1
212#define MFGPT_EVENT_RESET 3
213
214#define MFGPT_REG_CMP1 0
215#define MFGPT_REG_CMP2 2
216#define MFGPT_REG_COUNTER 4
217#define MFGPT_REG_SETUP 6
218
219#define MFGPT_SETUP_CNTEN (1 << 15)
220#define MFGPT_SETUP_CMP2 (1 << 14)
221#define MFGPT_SETUP_CMP1 (1 << 13)
222#define MFGPT_SETUP_SETUP (1 << 12)
223#define MFGPT_SETUP_STOPEN (1 << 11)
224#define MFGPT_SETUP_EXTEN (1 << 10)
225#define MFGPT_SETUP_REVEN (1 << 5)
226#define MFGPT_SETUP_CLKSEL (1 << 4)
227
228static inline void geode_mfgpt_write(int timer, u16 reg, u16 value)
229{
230 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
231 outw(value, base + reg + (timer * 8));
232}
233
234static inline u16 geode_mfgpt_read(int timer, u16 reg)
235{
236 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
237 return inw(base + reg + (timer * 8));
238}
239
240extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable);
241extern int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable);
242extern int geode_mfgpt_alloc_timer(int timer, int domain);
243
244#define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1)
245#define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0)
246
247#ifdef CONFIG_GEODE_MFGPT_TIMER
248extern int __init mfgpt_timer_setup(void);
249#else
250static inline int mfgpt_timer_setup(void) { return 0; }
251#endif
252
253#endif /* _ASM_X86_GEODE_H */ 36#endif /* _ASM_X86_GEODE_H */
diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h
index 1c22cb05ad6a..5d89fd2a3690 100644
--- a/arch/x86/include/asm/hpet.h
+++ b/arch/x86/include/asm/hpet.h
@@ -65,11 +65,12 @@
65/* hpet memory map physical address */ 65/* hpet memory map physical address */
66extern unsigned long hpet_address; 66extern unsigned long hpet_address;
67extern unsigned long force_hpet_address; 67extern unsigned long force_hpet_address;
68extern u8 hpet_blockid;
68extern int hpet_force_user; 69extern int hpet_force_user;
69extern int is_hpet_enabled(void); 70extern int is_hpet_enabled(void);
70extern int hpet_enable(void); 71extern int hpet_enable(void);
71extern void hpet_disable(void); 72extern void hpet_disable(void);
72extern unsigned long hpet_readl(unsigned long a); 73extern unsigned int hpet_readl(unsigned int a);
73extern void force_hpet_resume(void); 74extern void force_hpet_resume(void);
74 75
75extern void hpet_msi_unmask(unsigned int irq); 76extern void hpet_msi_unmask(unsigned int irq);
@@ -78,9 +79,9 @@ extern void hpet_msi_write(unsigned int irq, struct msi_msg *msg);
78extern void hpet_msi_read(unsigned int irq, struct msi_msg *msg); 79extern void hpet_msi_read(unsigned int irq, struct msi_msg *msg);
79 80
80#ifdef CONFIG_PCI_MSI 81#ifdef CONFIG_PCI_MSI
81extern int arch_setup_hpet_msi(unsigned int irq); 82extern int arch_setup_hpet_msi(unsigned int irq, unsigned int id);
82#else 83#else
83static inline int arch_setup_hpet_msi(unsigned int irq) 84static inline int arch_setup_hpet_msi(unsigned int irq, unsigned int id)
84{ 85{
85 return -EINVAL; 86 return -EINVAL;
86} 87}
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
index 0b20bbb758f2..ebfb8a9e11f7 100644
--- a/arch/x86/include/asm/i387.h
+++ b/arch/x86/include/asm/i387.h
@@ -10,6 +10,8 @@
10#ifndef _ASM_X86_I387_H 10#ifndef _ASM_X86_I387_H
11#define _ASM_X86_I387_H 11#define _ASM_X86_I387_H
12 12
13#ifndef __ASSEMBLY__
14
13#include <linux/sched.h> 15#include <linux/sched.h>
14#include <linux/kernel_stat.h> 16#include <linux/kernel_stat.h>
15#include <linux/regset.h> 17#include <linux/regset.h>
@@ -411,4 +413,9 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk)
411 } 413 }
412} 414}
413 415
416#endif /* __ASSEMBLY__ */
417
418#define PSHUFB_XMM5_XMM0 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
419#define PSHUFB_XMM5_XMM6 .byte 0x66, 0x0f, 0x38, 0x00, 0xf5
420
414#endif /* _ASM_X86_I387_H */ 421#endif /* _ASM_X86_I387_H */
diff --git a/arch/x86/include/asm/inst.h b/arch/x86/include/asm/inst.h
new file mode 100644
index 000000000000..14cf526091f9
--- /dev/null
+++ b/arch/x86/include/asm/inst.h
@@ -0,0 +1,150 @@
1/*
2 * Generate .byte code for some instructions not supported by old
3 * binutils.
4 */
5#ifndef X86_ASM_INST_H
6#define X86_ASM_INST_H
7
8#ifdef __ASSEMBLY__
9
10 .macro XMM_NUM opd xmm
11 .ifc \xmm,%xmm0
12 \opd = 0
13 .endif
14 .ifc \xmm,%xmm1
15 \opd = 1
16 .endif
17 .ifc \xmm,%xmm2
18 \opd = 2
19 .endif
20 .ifc \xmm,%xmm3
21 \opd = 3
22 .endif
23 .ifc \xmm,%xmm4
24 \opd = 4
25 .endif
26 .ifc \xmm,%xmm5
27 \opd = 5
28 .endif
29 .ifc \xmm,%xmm6
30 \opd = 6
31 .endif
32 .ifc \xmm,%xmm7
33 \opd = 7
34 .endif
35 .ifc \xmm,%xmm8
36 \opd = 8
37 .endif
38 .ifc \xmm,%xmm9
39 \opd = 9
40 .endif
41 .ifc \xmm,%xmm10
42 \opd = 10
43 .endif
44 .ifc \xmm,%xmm11
45 \opd = 11
46 .endif
47 .ifc \xmm,%xmm12
48 \opd = 12
49 .endif
50 .ifc \xmm,%xmm13
51 \opd = 13
52 .endif
53 .ifc \xmm,%xmm14
54 \opd = 14
55 .endif
56 .ifc \xmm,%xmm15
57 \opd = 15
58 .endif
59 .endm
60
61 .macro PFX_OPD_SIZE
62 .byte 0x66
63 .endm
64
65 .macro PFX_REX opd1 opd2
66 .if (\opd1 | \opd2) & 8
67 .byte 0x40 | ((\opd1 & 8) >> 3) | ((\opd2 & 8) >> 1)
68 .endif
69 .endm
70
71 .macro MODRM mod opd1 opd2
72 .byte \mod | (\opd1 & 7) | ((\opd2 & 7) << 3)
73 .endm
74
75 .macro PSHUFB_XMM xmm1 xmm2
76 XMM_NUM pshufb_opd1 \xmm1
77 XMM_NUM pshufb_opd2 \xmm2
78 PFX_OPD_SIZE
79 PFX_REX pshufb_opd1 pshufb_opd2
80 .byte 0x0f, 0x38, 0x00
81 MODRM 0xc0 pshufb_opd1 pshufb_opd2
82 .endm
83
84 .macro PCLMULQDQ imm8 xmm1 xmm2
85 XMM_NUM clmul_opd1 \xmm1
86 XMM_NUM clmul_opd2 \xmm2
87 PFX_OPD_SIZE
88 PFX_REX clmul_opd1 clmul_opd2
89 .byte 0x0f, 0x3a, 0x44
90 MODRM 0xc0 clmul_opd1 clmul_opd2
91 .byte \imm8
92 .endm
93
94 .macro AESKEYGENASSIST rcon xmm1 xmm2
95 XMM_NUM aeskeygen_opd1 \xmm1
96 XMM_NUM aeskeygen_opd2 \xmm2
97 PFX_OPD_SIZE
98 PFX_REX aeskeygen_opd1 aeskeygen_opd2
99 .byte 0x0f, 0x3a, 0xdf
100 MODRM 0xc0 aeskeygen_opd1 aeskeygen_opd2
101 .byte \rcon
102 .endm
103
104 .macro AESIMC xmm1 xmm2
105 XMM_NUM aesimc_opd1 \xmm1
106 XMM_NUM aesimc_opd2 \xmm2
107 PFX_OPD_SIZE
108 PFX_REX aesimc_opd1 aesimc_opd2
109 .byte 0x0f, 0x38, 0xdb
110 MODRM 0xc0 aesimc_opd1 aesimc_opd2
111 .endm
112
113 .macro AESENC xmm1 xmm2
114 XMM_NUM aesenc_opd1 \xmm1
115 XMM_NUM aesenc_opd2 \xmm2
116 PFX_OPD_SIZE
117 PFX_REX aesenc_opd1 aesenc_opd2
118 .byte 0x0f, 0x38, 0xdc
119 MODRM 0xc0 aesenc_opd1 aesenc_opd2
120 .endm
121
122 .macro AESENCLAST xmm1 xmm2
123 XMM_NUM aesenclast_opd1 \xmm1
124 XMM_NUM aesenclast_opd2 \xmm2
125 PFX_OPD_SIZE
126 PFX_REX aesenclast_opd1 aesenclast_opd2
127 .byte 0x0f, 0x38, 0xdd
128 MODRM 0xc0 aesenclast_opd1 aesenclast_opd2
129 .endm
130
131 .macro AESDEC xmm1 xmm2
132 XMM_NUM aesdec_opd1 \xmm1
133 XMM_NUM aesdec_opd2 \xmm2
134 PFX_OPD_SIZE
135 PFX_REX aesdec_opd1 aesdec_opd2
136 .byte 0x0f, 0x38, 0xde
137 MODRM 0xc0 aesdec_opd1 aesdec_opd2
138 .endm
139
140 .macro AESDECLAST xmm1 xmm2
141 XMM_NUM aesdeclast_opd1 \xmm1
142 XMM_NUM aesdeclast_opd2 \xmm2
143 PFX_OPD_SIZE
144 PFX_REX aesdeclast_opd1 aesdeclast_opd2
145 .byte 0x0f, 0x38, 0xdf
146 MODRM 0xc0 aesdeclast_opd1 aesdeclast_opd2
147 .endm
148#endif
149
150#endif
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 6a635bd39867..4611f085cd43 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -113,7 +113,7 @@
113 */ 113 */
114#define LOCAL_PENDING_VECTOR 0xec 114#define LOCAL_PENDING_VECTOR 0xec
115 115
116#define UV_BAU_MESSAGE 0xec 116#define UV_BAU_MESSAGE 0xea
117 117
118/* 118/*
119 * Self IPI vector for machine checks 119 * Self IPI vector for machine checks
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index ede6998bd92c..91df7c51806c 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -47,7 +47,7 @@ static inline void resume_map_numa_kva(pgd_t *pgd) {}
47/* 47/*
48 * generic node memory support, the following assumptions apply: 48 * generic node memory support, the following assumptions apply:
49 * 49 *
50 * 1) memory comes in 64Mb contigious chunks which are either present or not 50 * 1) memory comes in 64Mb contiguous chunks which are either present or not
51 * 2) we will not have more than 64Gb in total 51 * 2) we will not have more than 64Gb in total
52 * 52 *
53 * for now assume that 64Gb is max amount of RAM for whole system 53 * for now assume that 64Gb is max amount of RAM for whole system
diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h
index 5bef931f8b14..2d228fc9b4b7 100644
--- a/arch/x86/include/asm/msr.h
+++ b/arch/x86/include/asm/msr.h
@@ -244,6 +244,9 @@ do { \
244 244
245#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0) 245#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0)
246 246
247struct msr *msrs_alloc(void);
248void msrs_free(struct msr *msrs);
249
247#ifdef CONFIG_SMP 250#ifdef CONFIG_SMP
248int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); 251int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
249int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); 252int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
diff --git a/arch/x86/include/asm/olpc.h b/arch/x86/include/asm/olpc.h
index 834a30295fab..3a57385d9fa7 100644
--- a/arch/x86/include/asm/olpc.h
+++ b/arch/x86/include/asm/olpc.h
@@ -120,7 +120,7 @@ extern int olpc_ec_mask_unset(uint8_t bits);
120 120
121/* GPIO assignments */ 121/* GPIO assignments */
122 122
123#define OLPC_GPIO_MIC_AC geode_gpio(1) 123#define OLPC_GPIO_MIC_AC 1
124#define OLPC_GPIO_DCON_IRQ geode_gpio(7) 124#define OLPC_GPIO_DCON_IRQ geode_gpio(7)
125#define OLPC_GPIO_THRM_ALRM geode_gpio(10) 125#define OLPC_GPIO_THRM_ALRM geode_gpio(10)
126#define OLPC_GPIO_SMB_CLK geode_gpio(14) 126#define OLPC_GPIO_SMB_CLK geode_gpio(14)
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index efb38994859c..dd59a85a918f 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -731,34 +731,34 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
731 731
732#if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS) 732#if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
733 733
734static inline int __raw_spin_is_locked(struct raw_spinlock *lock) 734static inline int arch_spin_is_locked(struct arch_spinlock *lock)
735{ 735{
736 return PVOP_CALL1(int, pv_lock_ops.spin_is_locked, lock); 736 return PVOP_CALL1(int, pv_lock_ops.spin_is_locked, lock);
737} 737}
738 738
739static inline int __raw_spin_is_contended(struct raw_spinlock *lock) 739static inline int arch_spin_is_contended(struct arch_spinlock *lock)
740{ 740{
741 return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock); 741 return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock);
742} 742}
743#define __raw_spin_is_contended __raw_spin_is_contended 743#define arch_spin_is_contended arch_spin_is_contended
744 744
745static __always_inline void __raw_spin_lock(struct raw_spinlock *lock) 745static __always_inline void arch_spin_lock(struct arch_spinlock *lock)
746{ 746{
747 PVOP_VCALL1(pv_lock_ops.spin_lock, lock); 747 PVOP_VCALL1(pv_lock_ops.spin_lock, lock);
748} 748}
749 749
750static __always_inline void __raw_spin_lock_flags(struct raw_spinlock *lock, 750static __always_inline void arch_spin_lock_flags(struct arch_spinlock *lock,
751 unsigned long flags) 751 unsigned long flags)
752{ 752{
753 PVOP_VCALL2(pv_lock_ops.spin_lock_flags, lock, flags); 753 PVOP_VCALL2(pv_lock_ops.spin_lock_flags, lock, flags);
754} 754}
755 755
756static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock) 756static __always_inline int arch_spin_trylock(struct arch_spinlock *lock)
757{ 757{
758 return PVOP_CALL1(int, pv_lock_ops.spin_trylock, lock); 758 return PVOP_CALL1(int, pv_lock_ops.spin_trylock, lock);
759} 759}
760 760
761static __always_inline void __raw_spin_unlock(struct raw_spinlock *lock) 761static __always_inline void arch_spin_unlock(struct arch_spinlock *lock)
762{ 762{
763 PVOP_VCALL1(pv_lock_ops.spin_unlock, lock); 763 PVOP_VCALL1(pv_lock_ops.spin_unlock, lock);
764} 764}
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 9357473c8da0..b1e70d51e40c 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -318,14 +318,14 @@ struct pv_mmu_ops {
318 phys_addr_t phys, pgprot_t flags); 318 phys_addr_t phys, pgprot_t flags);
319}; 319};
320 320
321struct raw_spinlock; 321struct arch_spinlock;
322struct pv_lock_ops { 322struct pv_lock_ops {
323 int (*spin_is_locked)(struct raw_spinlock *lock); 323 int (*spin_is_locked)(struct arch_spinlock *lock);
324 int (*spin_is_contended)(struct raw_spinlock *lock); 324 int (*spin_is_contended)(struct arch_spinlock *lock);
325 void (*spin_lock)(struct raw_spinlock *lock); 325 void (*spin_lock)(struct arch_spinlock *lock);
326 void (*spin_lock_flags)(struct raw_spinlock *lock, unsigned long flags); 326 void (*spin_lock_flags)(struct arch_spinlock *lock, unsigned long flags);
327 int (*spin_trylock)(struct raw_spinlock *lock); 327 int (*spin_trylock)(struct arch_spinlock *lock);
328 void (*spin_unlock)(struct raw_spinlock *lock); 328 void (*spin_unlock)(struct arch_spinlock *lock);
329}; 329};
330 330
331/* This contains all the paravirt structures: we get a convenient 331/* This contains all the paravirt structures: we get a convenient
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index b399988eee3a..b4bf9a942ed0 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -118,11 +118,27 @@ extern int __init pcibios_init(void);
118 118
119/* pci-mmconfig.c */ 119/* pci-mmconfig.c */
120 120
121/* "PCI MMCONFIG %04x [bus %02x-%02x]" */
122#define PCI_MMCFG_RESOURCE_NAME_LEN (22 + 4 + 2 + 2)
123
124struct pci_mmcfg_region {
125 struct list_head list;
126 struct resource res;
127 u64 address;
128 char __iomem *virt;
129 u16 segment;
130 u8 start_bus;
131 u8 end_bus;
132 char name[PCI_MMCFG_RESOURCE_NAME_LEN];
133};
134
121extern int __init pci_mmcfg_arch_init(void); 135extern int __init pci_mmcfg_arch_init(void);
122extern void __init pci_mmcfg_arch_free(void); 136extern void __init pci_mmcfg_arch_free(void);
137extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus);
138
139extern struct list_head pci_mmcfg_list;
123 140
124extern struct acpi_mcfg_allocation *pci_mmcfg_config; 141#define PCI_MMCFG_BUS_OFFSET(bus) ((bus) << 20)
125extern int pci_mmcfg_config_num;
126 142
127/* 143/*
128 * AMD Fam10h CPUs are buggy, and cannot access MMIO config space 144 * AMD Fam10h CPUs are buggy, and cannot access MMIO config space
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index b65a36defeb7..0c44196b78ac 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -74,31 +74,31 @@ extern void __bad_percpu_size(void);
74 74
75#define percpu_to_op(op, var, val) \ 75#define percpu_to_op(op, var, val) \
76do { \ 76do { \
77 typedef typeof(var) T__; \ 77 typedef typeof(var) pto_T__; \
78 if (0) { \ 78 if (0) { \
79 T__ tmp__; \ 79 pto_T__ pto_tmp__; \
80 tmp__ = (val); \ 80 pto_tmp__ = (val); \
81 } \ 81 } \
82 switch (sizeof(var)) { \ 82 switch (sizeof(var)) { \
83 case 1: \ 83 case 1: \
84 asm(op "b %1,"__percpu_arg(0) \ 84 asm(op "b %1,"__percpu_arg(0) \
85 : "+m" (var) \ 85 : "+m" (var) \
86 : "qi" ((T__)(val))); \ 86 : "qi" ((pto_T__)(val))); \
87 break; \ 87 break; \
88 case 2: \ 88 case 2: \
89 asm(op "w %1,"__percpu_arg(0) \ 89 asm(op "w %1,"__percpu_arg(0) \
90 : "+m" (var) \ 90 : "+m" (var) \
91 : "ri" ((T__)(val))); \ 91 : "ri" ((pto_T__)(val))); \
92 break; \ 92 break; \
93 case 4: \ 93 case 4: \
94 asm(op "l %1,"__percpu_arg(0) \ 94 asm(op "l %1,"__percpu_arg(0) \
95 : "+m" (var) \ 95 : "+m" (var) \
96 : "ri" ((T__)(val))); \ 96 : "ri" ((pto_T__)(val))); \
97 break; \ 97 break; \
98 case 8: \ 98 case 8: \
99 asm(op "q %1,"__percpu_arg(0) \ 99 asm(op "q %1,"__percpu_arg(0) \
100 : "+m" (var) \ 100 : "+m" (var) \
101 : "re" ((T__)(val))); \ 101 : "re" ((pto_T__)(val))); \
102 break; \ 102 break; \
103 default: __bad_percpu_size(); \ 103 default: __bad_percpu_size(); \
104 } \ 104 } \
@@ -106,31 +106,31 @@ do { \
106 106
107#define percpu_from_op(op, var, constraint) \ 107#define percpu_from_op(op, var, constraint) \
108({ \ 108({ \
109 typeof(var) ret__; \ 109 typeof(var) pfo_ret__; \
110 switch (sizeof(var)) { \ 110 switch (sizeof(var)) { \
111 case 1: \ 111 case 1: \
112 asm(op "b "__percpu_arg(1)",%0" \ 112 asm(op "b "__percpu_arg(1)",%0" \
113 : "=q" (ret__) \ 113 : "=q" (pfo_ret__) \
114 : constraint); \ 114 : constraint); \
115 break; \ 115 break; \
116 case 2: \ 116 case 2: \
117 asm(op "w "__percpu_arg(1)",%0" \ 117 asm(op "w "__percpu_arg(1)",%0" \
118 : "=r" (ret__) \ 118 : "=r" (pfo_ret__) \
119 : constraint); \ 119 : constraint); \
120 break; \ 120 break; \
121 case 4: \ 121 case 4: \
122 asm(op "l "__percpu_arg(1)",%0" \ 122 asm(op "l "__percpu_arg(1)",%0" \
123 : "=r" (ret__) \ 123 : "=r" (pfo_ret__) \
124 : constraint); \ 124 : constraint); \
125 break; \ 125 break; \
126 case 8: \ 126 case 8: \
127 asm(op "q "__percpu_arg(1)",%0" \ 127 asm(op "q "__percpu_arg(1)",%0" \
128 : "=r" (ret__) \ 128 : "=r" (pfo_ret__) \
129 : constraint); \ 129 : constraint); \
130 break; \ 130 break; \
131 default: __bad_percpu_size(); \ 131 default: __bad_percpu_size(); \
132 } \ 132 } \
133 ret__; \ 133 pfo_ret__; \
134}) 134})
135 135
136/* 136/*
@@ -153,6 +153,84 @@ do { \
153#define percpu_or(var, val) percpu_to_op("or", per_cpu__##var, val) 153#define percpu_or(var, val) percpu_to_op("or", per_cpu__##var, val)
154#define percpu_xor(var, val) percpu_to_op("xor", per_cpu__##var, val) 154#define percpu_xor(var, val) percpu_to_op("xor", per_cpu__##var, val)
155 155
156#define __this_cpu_read_1(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
157#define __this_cpu_read_2(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
158#define __this_cpu_read_4(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
159
160#define __this_cpu_write_1(pcp, val) percpu_to_op("mov", (pcp), val)
161#define __this_cpu_write_2(pcp, val) percpu_to_op("mov", (pcp), val)
162#define __this_cpu_write_4(pcp, val) percpu_to_op("mov", (pcp), val)
163#define __this_cpu_add_1(pcp, val) percpu_to_op("add", (pcp), val)
164#define __this_cpu_add_2(pcp, val) percpu_to_op("add", (pcp), val)
165#define __this_cpu_add_4(pcp, val) percpu_to_op("add", (pcp), val)
166#define __this_cpu_and_1(pcp, val) percpu_to_op("and", (pcp), val)
167#define __this_cpu_and_2(pcp, val) percpu_to_op("and", (pcp), val)
168#define __this_cpu_and_4(pcp, val) percpu_to_op("and", (pcp), val)
169#define __this_cpu_or_1(pcp, val) percpu_to_op("or", (pcp), val)
170#define __this_cpu_or_2(pcp, val) percpu_to_op("or", (pcp), val)
171#define __this_cpu_or_4(pcp, val) percpu_to_op("or", (pcp), val)
172#define __this_cpu_xor_1(pcp, val) percpu_to_op("xor", (pcp), val)
173#define __this_cpu_xor_2(pcp, val) percpu_to_op("xor", (pcp), val)
174#define __this_cpu_xor_4(pcp, val) percpu_to_op("xor", (pcp), val)
175
176#define this_cpu_read_1(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
177#define this_cpu_read_2(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
178#define this_cpu_read_4(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
179#define this_cpu_write_1(pcp, val) percpu_to_op("mov", (pcp), val)
180#define this_cpu_write_2(pcp, val) percpu_to_op("mov", (pcp), val)
181#define this_cpu_write_4(pcp, val) percpu_to_op("mov", (pcp), val)
182#define this_cpu_add_1(pcp, val) percpu_to_op("add", (pcp), val)
183#define this_cpu_add_2(pcp, val) percpu_to_op("add", (pcp), val)
184#define this_cpu_add_4(pcp, val) percpu_to_op("add", (pcp), val)
185#define this_cpu_and_1(pcp, val) percpu_to_op("and", (pcp), val)
186#define this_cpu_and_2(pcp, val) percpu_to_op("and", (pcp), val)
187#define this_cpu_and_4(pcp, val) percpu_to_op("and", (pcp), val)
188#define this_cpu_or_1(pcp, val) percpu_to_op("or", (pcp), val)
189#define this_cpu_or_2(pcp, val) percpu_to_op("or", (pcp), val)
190#define this_cpu_or_4(pcp, val) percpu_to_op("or", (pcp), val)
191#define this_cpu_xor_1(pcp, val) percpu_to_op("xor", (pcp), val)
192#define this_cpu_xor_2(pcp, val) percpu_to_op("xor", (pcp), val)
193#define this_cpu_xor_4(pcp, val) percpu_to_op("xor", (pcp), val)
194
195#define irqsafe_cpu_add_1(pcp, val) percpu_to_op("add", (pcp), val)
196#define irqsafe_cpu_add_2(pcp, val) percpu_to_op("add", (pcp), val)
197#define irqsafe_cpu_add_4(pcp, val) percpu_to_op("add", (pcp), val)
198#define irqsafe_cpu_and_1(pcp, val) percpu_to_op("and", (pcp), val)
199#define irqsafe_cpu_and_2(pcp, val) percpu_to_op("and", (pcp), val)
200#define irqsafe_cpu_and_4(pcp, val) percpu_to_op("and", (pcp), val)
201#define irqsafe_cpu_or_1(pcp, val) percpu_to_op("or", (pcp), val)
202#define irqsafe_cpu_or_2(pcp, val) percpu_to_op("or", (pcp), val)
203#define irqsafe_cpu_or_4(pcp, val) percpu_to_op("or", (pcp), val)
204#define irqsafe_cpu_xor_1(pcp, val) percpu_to_op("xor", (pcp), val)
205#define irqsafe_cpu_xor_2(pcp, val) percpu_to_op("xor", (pcp), val)
206#define irqsafe_cpu_xor_4(pcp, val) percpu_to_op("xor", (pcp), val)
207
208/*
209 * Per cpu atomic 64 bit operations are only available under 64 bit.
210 * 32 bit must fall back to generic operations.
211 */
212#ifdef CONFIG_X86_64
213#define __this_cpu_read_8(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
214#define __this_cpu_write_8(pcp, val) percpu_to_op("mov", (pcp), val)
215#define __this_cpu_add_8(pcp, val) percpu_to_op("add", (pcp), val)
216#define __this_cpu_and_8(pcp, val) percpu_to_op("and", (pcp), val)
217#define __this_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val)
218#define __this_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val)
219
220#define this_cpu_read_8(pcp) percpu_from_op("mov", (pcp), "m"(pcp))
221#define this_cpu_write_8(pcp, val) percpu_to_op("mov", (pcp), val)
222#define this_cpu_add_8(pcp, val) percpu_to_op("add", (pcp), val)
223#define this_cpu_and_8(pcp, val) percpu_to_op("and", (pcp), val)
224#define this_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val)
225#define this_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val)
226
227#define irqsafe_cpu_add_8(pcp, val) percpu_to_op("add", (pcp), val)
228#define irqsafe_cpu_and_8(pcp, val) percpu_to_op("and", (pcp), val)
229#define irqsafe_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val)
230#define irqsafe_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val)
231
232#endif
233
156/* This is not atomic against other CPUs -- CPU preemption needs to be off */ 234/* This is not atomic against other CPUs -- CPU preemption needs to be off */
157#define x86_test_and_clear_bit_percpu(bit, var) \ 235#define x86_test_and_clear_bit_percpu(bit, var) \
158({ \ 236({ \
diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
index 3d11fd0f44c5..9d369f680321 100644
--- a/arch/x86/include/asm/ptrace.h
+++ b/arch/x86/include/asm/ptrace.h
@@ -292,6 +292,8 @@ extern void user_enable_block_step(struct task_struct *);
292#define arch_has_block_step() (boot_cpu_data.x86 >= 6) 292#define arch_has_block_step() (boot_cpu_data.x86 >= 6)
293#endif 293#endif
294 294
295#define ARCH_HAS_USER_SINGLE_STEP_INFO
296
295struct user_desc; 297struct user_desc;
296extern int do_get_thread_area(struct task_struct *p, int idx, 298extern int do_get_thread_area(struct task_struct *p, int idx,
297 struct user_desc __user *info); 299 struct user_desc __user *info);
diff --git a/arch/x86/include/asm/sigcontext.h b/arch/x86/include/asm/sigcontext.h
index 72e5a4491661..04459d25e66e 100644
--- a/arch/x86/include/asm/sigcontext.h
+++ b/arch/x86/include/asm/sigcontext.h
@@ -124,7 +124,7 @@ struct sigcontext {
124 * fpstate is really (struct _fpstate *) or (struct _xstate *) 124 * fpstate is really (struct _fpstate *) or (struct _xstate *)
125 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved 125 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
126 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end 126 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
127 * of extended memory layout. See comments at the defintion of 127 * of extended memory layout. See comments at the definition of
128 * (struct _fpx_sw_bytes) 128 * (struct _fpx_sw_bytes)
129 */ 129 */
130 void __user *fpstate; /* zero when no FPU/extended context */ 130 void __user *fpstate; /* zero when no FPU/extended context */
@@ -219,7 +219,7 @@ struct sigcontext {
219 * fpstate is really (struct _fpstate *) or (struct _xstate *) 219 * fpstate is really (struct _fpstate *) or (struct _xstate *)
220 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved 220 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
221 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end 221 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
222 * of extended memory layout. See comments at the defintion of 222 * of extended memory layout. See comments at the definition of
223 * (struct _fpx_sw_bytes) 223 * (struct _fpx_sw_bytes)
224 */ 224 */
225 void __user *fpstate; /* zero when no FPU/extended context */ 225 void __user *fpstate; /* zero when no FPU/extended context */
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 4e77853321db..3089f70c0c52 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
@@ -58,7 +58,7 @@
58#if (NR_CPUS < 256) 58#if (NR_CPUS < 256)
59#define TICKET_SHIFT 8 59#define TICKET_SHIFT 8
60 60
61static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) 61static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)
62{ 62{
63 short inc = 0x0100; 63 short inc = 0x0100;
64 64
@@ -77,7 +77,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
77 : "memory", "cc"); 77 : "memory", "cc");
78} 78}
79 79
80static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) 80static __always_inline int __ticket_spin_trylock(arch_spinlock_t *lock)
81{ 81{
82 int tmp, new; 82 int tmp, new;
83 83
@@ -96,7 +96,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
96 return tmp; 96 return tmp;
97} 97}
98 98
99static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock) 99static __always_inline void __ticket_spin_unlock(arch_spinlock_t *lock)
100{ 100{
101 asm volatile(UNLOCK_LOCK_PREFIX "incb %0" 101 asm volatile(UNLOCK_LOCK_PREFIX "incb %0"
102 : "+m" (lock->slock) 102 : "+m" (lock->slock)
@@ -106,7 +106,7 @@ static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
106#else 106#else
107#define TICKET_SHIFT 16 107#define TICKET_SHIFT 16
108 108
109static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock) 109static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock)
110{ 110{
111 int inc = 0x00010000; 111 int inc = 0x00010000;
112 int tmp; 112 int tmp;
@@ -127,7 +127,7 @@ static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
127 : "memory", "cc"); 127 : "memory", "cc");
128} 128}
129 129
130static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock) 130static __always_inline int __ticket_spin_trylock(arch_spinlock_t *lock)
131{ 131{
132 int tmp; 132 int tmp;
133 int new; 133 int new;
@@ -149,7 +149,7 @@ static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
149 return tmp; 149 return tmp;
150} 150}
151 151
152static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock) 152static __always_inline void __ticket_spin_unlock(arch_spinlock_t *lock)
153{ 153{
154 asm volatile(UNLOCK_LOCK_PREFIX "incw %0" 154 asm volatile(UNLOCK_LOCK_PREFIX "incw %0"
155 : "+m" (lock->slock) 155 : "+m" (lock->slock)
@@ -158,14 +158,14 @@ static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
158} 158}
159#endif 159#endif
160 160
161static inline int __ticket_spin_is_locked(raw_spinlock_t *lock) 161static inline int __ticket_spin_is_locked(arch_spinlock_t *lock)
162{ 162{
163 int tmp = ACCESS_ONCE(lock->slock); 163 int tmp = ACCESS_ONCE(lock->slock);
164 164
165 return !!(((tmp >> TICKET_SHIFT) ^ tmp) & ((1 << TICKET_SHIFT) - 1)); 165 return !!(((tmp >> TICKET_SHIFT) ^ tmp) & ((1 << TICKET_SHIFT) - 1));
166} 166}
167 167
168static inline int __ticket_spin_is_contended(raw_spinlock_t *lock) 168static inline int __ticket_spin_is_contended(arch_spinlock_t *lock)
169{ 169{
170 int tmp = ACCESS_ONCE(lock->slock); 170 int tmp = ACCESS_ONCE(lock->slock);
171 171
@@ -174,43 +174,43 @@ static inline int __ticket_spin_is_contended(raw_spinlock_t *lock)
174 174
175#ifndef CONFIG_PARAVIRT_SPINLOCKS 175#ifndef CONFIG_PARAVIRT_SPINLOCKS
176 176
177static inline int __raw_spin_is_locked(raw_spinlock_t *lock) 177static inline int arch_spin_is_locked(arch_spinlock_t *lock)
178{ 178{
179 return __ticket_spin_is_locked(lock); 179 return __ticket_spin_is_locked(lock);
180} 180}
181 181
182static inline int __raw_spin_is_contended(raw_spinlock_t *lock) 182static inline int arch_spin_is_contended(arch_spinlock_t *lock)
183{ 183{
184 return __ticket_spin_is_contended(lock); 184 return __ticket_spin_is_contended(lock);
185} 185}
186#define __raw_spin_is_contended __raw_spin_is_contended 186#define arch_spin_is_contended arch_spin_is_contended
187 187
188static __always_inline void __raw_spin_lock(raw_spinlock_t *lock) 188static __always_inline void arch_spin_lock(arch_spinlock_t *lock)
189{ 189{
190 __ticket_spin_lock(lock); 190 __ticket_spin_lock(lock);
191} 191}
192 192
193static __always_inline int __raw_spin_trylock(raw_spinlock_t *lock) 193static __always_inline int arch_spin_trylock(arch_spinlock_t *lock)
194{ 194{
195 return __ticket_spin_trylock(lock); 195 return __ticket_spin_trylock(lock);
196} 196}
197 197
198static __always_inline void __raw_spin_unlock(raw_spinlock_t *lock) 198static __always_inline void arch_spin_unlock(arch_spinlock_t *lock)
199{ 199{
200 __ticket_spin_unlock(lock); 200 __ticket_spin_unlock(lock);
201} 201}
202 202
203static __always_inline void __raw_spin_lock_flags(raw_spinlock_t *lock, 203static __always_inline void arch_spin_lock_flags(arch_spinlock_t *lock,
204 unsigned long flags) 204 unsigned long flags)
205{ 205{
206 __raw_spin_lock(lock); 206 arch_spin_lock(lock);
207} 207}
208 208
209#endif /* CONFIG_PARAVIRT_SPINLOCKS */ 209#endif /* CONFIG_PARAVIRT_SPINLOCKS */
210 210
211static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) 211static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
212{ 212{
213 while (__raw_spin_is_locked(lock)) 213 while (arch_spin_is_locked(lock))
214 cpu_relax(); 214 cpu_relax();
215} 215}
216 216
@@ -232,7 +232,7 @@ static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock)
232 * read_can_lock - would read_trylock() succeed? 232 * read_can_lock - would read_trylock() succeed?
233 * @lock: the rwlock in question. 233 * @lock: the rwlock in question.
234 */ 234 */
235static inline int __raw_read_can_lock(raw_rwlock_t *lock) 235static inline int arch_read_can_lock(arch_rwlock_t *lock)
236{ 236{
237 return (int)(lock)->lock > 0; 237 return (int)(lock)->lock > 0;
238} 238}
@@ -241,12 +241,12 @@ static inline int __raw_read_can_lock(raw_rwlock_t *lock)
241 * write_can_lock - would write_trylock() succeed? 241 * write_can_lock - would write_trylock() succeed?
242 * @lock: the rwlock in question. 242 * @lock: the rwlock in question.
243 */ 243 */
244static inline int __raw_write_can_lock(raw_rwlock_t *lock) 244static inline int arch_write_can_lock(arch_rwlock_t *lock)
245{ 245{
246 return (lock)->lock == RW_LOCK_BIAS; 246 return (lock)->lock == RW_LOCK_BIAS;
247} 247}
248 248
249static inline void __raw_read_lock(raw_rwlock_t *rw) 249static inline void arch_read_lock(arch_rwlock_t *rw)
250{ 250{
251 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" 251 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t"
252 "jns 1f\n" 252 "jns 1f\n"
@@ -255,7 +255,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
255 ::LOCK_PTR_REG (rw) : "memory"); 255 ::LOCK_PTR_REG (rw) : "memory");
256} 256}
257 257
258static inline void __raw_write_lock(raw_rwlock_t *rw) 258static inline void arch_write_lock(arch_rwlock_t *rw)
259{ 259{
260 asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t" 260 asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t"
261 "jz 1f\n" 261 "jz 1f\n"
@@ -264,7 +264,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
264 ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory"); 264 ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory");
265} 265}
266 266
267static inline int __raw_read_trylock(raw_rwlock_t *lock) 267static inline int arch_read_trylock(arch_rwlock_t *lock)
268{ 268{
269 atomic_t *count = (atomic_t *)lock; 269 atomic_t *count = (atomic_t *)lock;
270 270
@@ -274,7 +274,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock)
274 return 0; 274 return 0;
275} 275}
276 276
277static inline int __raw_write_trylock(raw_rwlock_t *lock) 277static inline int arch_write_trylock(arch_rwlock_t *lock)
278{ 278{
279 atomic_t *count = (atomic_t *)lock; 279 atomic_t *count = (atomic_t *)lock;
280 280
@@ -284,23 +284,23 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)
284 return 0; 284 return 0;
285} 285}
286 286
287static inline void __raw_read_unlock(raw_rwlock_t *rw) 287static inline void arch_read_unlock(arch_rwlock_t *rw)
288{ 288{
289 asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory"); 289 asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
290} 290}
291 291
292static inline void __raw_write_unlock(raw_rwlock_t *rw) 292static inline void arch_write_unlock(arch_rwlock_t *rw)
293{ 293{
294 asm volatile(LOCK_PREFIX "addl %1, %0" 294 asm volatile(LOCK_PREFIX "addl %1, %0"
295 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); 295 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
296} 296}
297 297
298#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 298#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
299#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 299#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
300 300
301#define _raw_spin_relax(lock) cpu_relax() 301#define arch_spin_relax(lock) cpu_relax()
302#define _raw_read_relax(lock) cpu_relax() 302#define arch_read_relax(lock) cpu_relax()
303#define _raw_write_relax(lock) cpu_relax() 303#define arch_write_relax(lock) cpu_relax()
304 304
305/* The {read|write|spin}_lock() on x86 are full memory barriers. */ 305/* The {read|write|spin}_lock() on x86 are full memory barriers. */
306static inline void smp_mb__after_lock(void) { } 306static inline void smp_mb__after_lock(void) { }
diff --git a/arch/x86/include/asm/spinlock_types.h b/arch/x86/include/asm/spinlock_types.h
index 845f81c87091..dcb48b2edc11 100644
--- a/arch/x86/include/asm/spinlock_types.h
+++ b/arch/x86/include/asm/spinlock_types.h
@@ -5,16 +5,16 @@
5# error "please don't include this file directly" 5# error "please don't include this file directly"
6#endif 6#endif
7 7
8typedef struct raw_spinlock { 8typedef struct arch_spinlock {
9 unsigned int slock; 9 unsigned int slock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 unsigned int lock; 15 unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 18#define __ARCH_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
19 19
20#endif /* _ASM_X86_SPINLOCK_TYPES_H */ 20#endif /* _ASM_X86_SPINLOCK_TYPES_H */
diff --git a/arch/x86/include/asm/swiotlb.h b/arch/x86/include/asm/swiotlb.h
index 87ffcb12a1b8..8085277e1b8b 100644
--- a/arch/x86/include/asm/swiotlb.h
+++ b/arch/x86/include/asm/swiotlb.h
@@ -5,13 +5,17 @@
5 5
6#ifdef CONFIG_SWIOTLB 6#ifdef CONFIG_SWIOTLB
7extern int swiotlb; 7extern int swiotlb;
8extern int pci_swiotlb_init(void); 8extern int __init pci_swiotlb_detect(void);
9extern void __init pci_swiotlb_init(void);
9#else 10#else
10#define swiotlb 0 11#define swiotlb 0
11static inline int pci_swiotlb_init(void) 12static inline int pci_swiotlb_detect(void)
12{ 13{
13 return 0; 14 return 0;
14} 15}
16static inline void pci_swiotlb_init(void)
17{
18}
15#endif 19#endif
16 20
17static inline void dma_mark_clean(void *addr, size_t size) {} 21static inline void dma_mark_clean(void *addr, size_t size) {}
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
index 9af9decb38c3..d5f69045c100 100644
--- a/arch/x86/include/asm/sys_ia32.h
+++ b/arch/x86/include/asm/sys_ia32.h
@@ -30,7 +30,6 @@ struct mmap_arg_struct;
30asmlinkage long sys32_mmap(struct mmap_arg_struct __user *); 30asmlinkage long sys32_mmap(struct mmap_arg_struct __user *);
31asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long); 31asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long);
32 32
33asmlinkage long sys32_pipe(int __user *);
34struct sigaction32; 33struct sigaction32;
35struct old_sigaction32; 34struct old_sigaction32;
36asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *, 35asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *,
@@ -57,9 +56,6 @@ asmlinkage long sys32_pwrite(unsigned int, char __user *, u32, u32, u32);
57asmlinkage long sys32_personality(unsigned long); 56asmlinkage long sys32_personality(unsigned long);
58asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32); 57asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32);
59 58
60asmlinkage long sys32_mmap2(unsigned long, unsigned long, unsigned long,
61 unsigned long, unsigned long, unsigned long);
62
63struct oldold_utsname; 59struct oldold_utsname;
64struct old_utsname; 60struct old_utsname;
65asmlinkage long sys32_olduname(struct oldold_utsname __user *); 61asmlinkage long sys32_olduname(struct oldold_utsname __user *);
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 372b76edd63f..8868b9420b0e 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -18,16 +18,24 @@
18/* Common in X86_32 and X86_64 */ 18/* Common in X86_32 and X86_64 */
19/* kernel/ioport.c */ 19/* kernel/ioport.c */
20asmlinkage long sys_ioperm(unsigned long, unsigned long, int); 20asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
21long sys_iopl(unsigned int, struct pt_regs *);
21 22
22/* kernel/process.c */ 23/* kernel/process.c */
23int sys_fork(struct pt_regs *); 24int sys_fork(struct pt_regs *);
24int sys_vfork(struct pt_regs *); 25int sys_vfork(struct pt_regs *);
26long sys_execve(char __user *, char __user * __user *,
27 char __user * __user *, struct pt_regs *);
28long sys_clone(unsigned long, unsigned long, void __user *,
29 void __user *, struct pt_regs *);
25 30
26/* kernel/ldt.c */ 31/* kernel/ldt.c */
27asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); 32asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
28 33
29/* kernel/signal.c */ 34/* kernel/signal.c */
30long sys_rt_sigreturn(struct pt_regs *); 35long sys_rt_sigreturn(struct pt_regs *);
36long sys_sigaltstack(const stack_t __user *, stack_t __user *,
37 struct pt_regs *);
38
31 39
32/* kernel/tls.c */ 40/* kernel/tls.c */
33asmlinkage int sys_set_thread_area(struct user_desc __user *); 41asmlinkage int sys_set_thread_area(struct user_desc __user *);
@@ -35,18 +43,11 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
35 43
36/* X86_32 only */ 44/* X86_32 only */
37#ifdef CONFIG_X86_32 45#ifdef CONFIG_X86_32
38/* kernel/ioport.c */
39long sys_iopl(struct pt_regs *);
40
41/* kernel/process_32.c */
42int sys_clone(struct pt_regs *);
43int sys_execve(struct pt_regs *);
44 46
45/* kernel/signal.c */ 47/* kernel/signal.c */
46asmlinkage int sys_sigsuspend(int, int, old_sigset_t); 48asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
47asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, 49asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
48 struct old_sigaction __user *); 50 struct old_sigaction __user *);
49int sys_sigaltstack(struct pt_regs *);
50unsigned long sys_sigreturn(struct pt_regs *); 51unsigned long sys_sigreturn(struct pt_regs *);
51 52
52/* kernel/sys_i386_32.c */ 53/* kernel/sys_i386_32.c */
@@ -55,8 +56,6 @@ struct sel_arg_struct;
55struct oldold_utsname; 56struct oldold_utsname;
56struct old_utsname; 57struct old_utsname;
57 58
58asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
59 unsigned long, unsigned long, unsigned long);
60asmlinkage int old_mmap(struct mmap_arg_struct __user *); 59asmlinkage int old_mmap(struct mmap_arg_struct __user *);
61asmlinkage int old_select(struct sel_arg_struct __user *); 60asmlinkage int old_select(struct sel_arg_struct __user *);
62asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); 61asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
@@ -64,28 +63,15 @@ asmlinkage int sys_uname(struct old_utsname __user *);
64asmlinkage int sys_olduname(struct oldold_utsname __user *); 63asmlinkage int sys_olduname(struct oldold_utsname __user *);
65 64
66/* kernel/vm86_32.c */ 65/* kernel/vm86_32.c */
67int sys_vm86old(struct pt_regs *); 66int sys_vm86old(struct vm86_struct __user *, struct pt_regs *);
68int sys_vm86(struct pt_regs *); 67int sys_vm86(unsigned long, unsigned long, struct pt_regs *);
69 68
70#else /* CONFIG_X86_32 */ 69#else /* CONFIG_X86_32 */
71 70
72/* X86_64 only */ 71/* X86_64 only */
73/* kernel/ioport.c */
74asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
75
76/* kernel/process_64.c */ 72/* kernel/process_64.c */
77asmlinkage long sys_clone(unsigned long, unsigned long,
78 void __user *, void __user *,
79 struct pt_regs *);
80asmlinkage long sys_execve(char __user *, char __user * __user *,
81 char __user * __user *,
82 struct pt_regs *);
83long sys_arch_prctl(int, unsigned long); 73long sys_arch_prctl(int, unsigned long);
84 74
85/* kernel/signal.c */
86asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
87 struct pt_regs *);
88
89/* kernel/sys_x86_64.c */ 75/* kernel/sys_x86_64.c */
90struct new_utsname; 76struct new_utsname;
91 77
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
index 022a84386de8..ecb544e65382 100644
--- a/arch/x86/include/asm/system.h
+++ b/arch/x86/include/asm/system.h
@@ -23,6 +23,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
23struct tss_struct; 23struct tss_struct;
24void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, 24void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
25 struct tss_struct *tss); 25 struct tss_struct *tss);
26extern void show_regs_common(void);
26 27
27#ifdef CONFIG_X86_32 28#ifdef CONFIG_X86_32
28 29
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 40e37b10c6c0..c5087d796587 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -35,11 +35,16 @@
35# endif 35# endif
36#endif 36#endif
37 37
38/* Node not present */ 38/*
39#define NUMA_NO_NODE (-1) 39 * to preserve the visibility of NUMA_NO_NODE definition,
40 * moved to there from here. May be used independent of
41 * CONFIG_NUMA.
42 */
43#include <linux/numa.h>
40 44
41#ifdef CONFIG_NUMA 45#ifdef CONFIG_NUMA
42#include <linux/cpumask.h> 46#include <linux/cpumask.h>
47
43#include <asm/mpspec.h> 48#include <asm/mpspec.h>
44 49
45#ifdef CONFIG_X86_32 50#ifdef CONFIG_X86_32
diff --git a/arch/x86/include/asm/trampoline.h b/arch/x86/include/asm/trampoline.h
index 90f06c25221d..cb507bb05d79 100644
--- a/arch/x86/include/asm/trampoline.h
+++ b/arch/x86/include/asm/trampoline.h
@@ -16,7 +16,6 @@ extern unsigned long initial_code;
16extern unsigned long initial_gs; 16extern unsigned long initial_gs;
17 17
18#define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE) 18#define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE)
19#define TRAMPOLINE_BASE 0x6000
20 19
21extern unsigned long setup_trampoline(void); 20extern unsigned long setup_trampoline(void);
22extern void __init reserve_trampoline_memory(void); 21extern void __init reserve_trampoline_memory(void);
diff --git a/arch/x86/include/asm/uv/bios.h b/arch/x86/include/asm/uv/bios.h
index 7ed17ff502b9..2751f3075d8b 100644
--- a/arch/x86/include/asm/uv/bios.h
+++ b/arch/x86/include/asm/uv/bios.h
@@ -76,15 +76,6 @@ union partition_info_u {
76 }; 76 };
77}; 77};
78 78
79union uv_watchlist_u {
80 u64 val;
81 struct {
82 u64 blade : 16,
83 size : 32,
84 filler : 16;
85 };
86};
87
88enum uv_memprotect { 79enum uv_memprotect {
89 UV_MEMPROT_RESTRICT_ACCESS, 80 UV_MEMPROT_RESTRICT_ACCESS,
90 UV_MEMPROT_ALLOW_AMO, 81 UV_MEMPROT_ALLOW_AMO,
@@ -100,7 +91,7 @@ extern s64 uv_bios_call_reentrant(enum uv_bios_cmd, u64, u64, u64, u64, u64);
100 91
101extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *); 92extern s64 uv_bios_get_sn_info(int, int *, long *, long *, long *);
102extern s64 uv_bios_freq_base(u64, u64 *); 93extern s64 uv_bios_freq_base(u64, u64 *);
103extern int uv_bios_mq_watchlist_alloc(int, unsigned long, unsigned int, 94extern int uv_bios_mq_watchlist_alloc(unsigned long, unsigned int,
104 unsigned long *); 95 unsigned long *);
105extern int uv_bios_mq_watchlist_free(int, int); 96extern int uv_bios_mq_watchlist_free(int, int);
106extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect); 97extern s64 uv_bios_change_memprotect(u64, u64, enum uv_memprotect);
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
index 80e2984f521c..b414d2b401f6 100644
--- a/arch/x86/include/asm/uv/uv_bau.h
+++ b/arch/x86/include/asm/uv/uv_bau.h
@@ -55,7 +55,7 @@
55#define DESC_STATUS_SOURCE_TIMEOUT 3 55#define DESC_STATUS_SOURCE_TIMEOUT 3
56 56
57/* 57/*
58 * source side threshholds at which message retries print a warning 58 * source side thresholds at which message retries print a warning
59 */ 59 */
60#define SOURCE_TIMEOUT_LIMIT 20 60#define SOURCE_TIMEOUT_LIMIT 20
61#define DESTINATION_TIMEOUT_LIMIT 20 61#define DESTINATION_TIMEOUT_LIMIT 20
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index d1414af98559..811bfabc80b7 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -172,6 +172,8 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
172#define UV_LOCAL_MMR_SIZE (64UL * 1024 * 1024) 172#define UV_LOCAL_MMR_SIZE (64UL * 1024 * 1024)
173#define UV_GLOBAL_MMR32_SIZE (64UL * 1024 * 1024) 173#define UV_GLOBAL_MMR32_SIZE (64UL * 1024 * 1024)
174 174
175#define UV_GLOBAL_GRU_MMR_BASE 0x4000000
176
175#define UV_GLOBAL_MMR32_PNODE_SHIFT 15 177#define UV_GLOBAL_MMR32_PNODE_SHIFT 15
176#define UV_GLOBAL_MMR64_PNODE_SHIFT 26 178#define UV_GLOBAL_MMR64_PNODE_SHIFT 26
177 179
@@ -232,6 +234,26 @@ static inline unsigned long uv_gpa(void *v)
232 return uv_soc_phys_ram_to_gpa(__pa(v)); 234 return uv_soc_phys_ram_to_gpa(__pa(v));
233} 235}
234 236
237/* Top two bits indicate the requested address is in MMR space. */
238static inline int
239uv_gpa_in_mmr_space(unsigned long gpa)
240{
241 return (gpa >> 62) == 0x3UL;
242}
243
244/* UV global physical address --> socket phys RAM */
245static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
246{
247 unsigned long paddr = gpa & uv_hub_info->gpa_mask;
248 unsigned long remap_base = uv_hub_info->lowmem_remap_base;
249 unsigned long remap_top = uv_hub_info->lowmem_remap_top;
250
251 if (paddr >= remap_base && paddr < remap_base + remap_top)
252 paddr -= remap_base;
253 return paddr;
254}
255
256
235/* gnode -> pnode */ 257/* gnode -> pnode */
236static inline unsigned long uv_gpa_to_gnode(unsigned long gpa) 258static inline unsigned long uv_gpa_to_gnode(unsigned long gpa)
237{ 259{
@@ -308,6 +330,15 @@ static inline unsigned long uv_read_global_mmr64(int pnode,
308} 330}
309 331
310/* 332/*
333 * Global MMR space addresses when referenced by the GRU. (GRU does
334 * NOT use socket addressing).
335 */
336static inline unsigned long uv_global_gru_mmr_address(int pnode, unsigned long offset)
337{
338 return UV_GLOBAL_GRU_MMR_BASE | offset | (pnode << uv_hub_info->m_val);
339}
340
341/*
311 * Access hub local MMRs. Faster than using global space but only local MMRs 342 * Access hub local MMRs. Faster than using global space but only local MMRs
312 * are accessible. 343 * are accessible.
313 */ 344 */
@@ -434,6 +465,14 @@ static inline void uv_set_cpu_scir_bits(int cpu, unsigned char value)
434 } 465 }
435} 466}
436 467
468static unsigned long uv_hub_ipi_value(int apicid, int vector, int mode)
469{
470 return (1UL << UVH_IPI_INT_SEND_SHFT) |
471 ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) |
472 (mode << UVH_IPI_INT_DELIVERY_MODE_SHFT) |
473 (vector << UVH_IPI_INT_VECTOR_SHFT);
474}
475
437static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) 476static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
438{ 477{
439 unsigned long val; 478 unsigned long val;
@@ -442,10 +481,7 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector)
442 if (vector == NMI_VECTOR) 481 if (vector == NMI_VECTOR)
443 dmode = dest_NMI; 482 dmode = dest_NMI;
444 483
445 val = (1UL << UVH_IPI_INT_SEND_SHFT) | 484 val = uv_hub_ipi_value(apicid, vector, dmode);
446 ((apicid) << UVH_IPI_INT_APIC_ID_SHFT) |
447 (dmode << UVH_IPI_INT_DELIVERY_MODE_SHFT) |
448 (vector << UVH_IPI_INT_VECTOR_SHFT);
449 uv_write_global_mmr64(pnode, UVH_IPI_INT, val); 485 uv_write_global_mmr64(pnode, UVH_IPI_INT, val);
450} 486}
451 487
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index d5b7e90c0edf..396ff4cc8ed4 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -37,31 +37,4 @@
37extern struct shared_info *HYPERVISOR_shared_info; 37extern struct shared_info *HYPERVISOR_shared_info;
38extern struct start_info *xen_start_info; 38extern struct start_info *xen_start_info;
39 39
40enum xen_domain_type {
41 XEN_NATIVE, /* running on bare hardware */
42 XEN_PV_DOMAIN, /* running in a PV domain */
43 XEN_HVM_DOMAIN, /* running in a Xen hvm domain */
44};
45
46#ifdef CONFIG_XEN
47extern enum xen_domain_type xen_domain_type;
48#else
49#define xen_domain_type XEN_NATIVE
50#endif
51
52#define xen_domain() (xen_domain_type != XEN_NATIVE)
53#define xen_pv_domain() (xen_domain() && \
54 xen_domain_type == XEN_PV_DOMAIN)
55#define xen_hvm_domain() (xen_domain() && \
56 xen_domain_type == XEN_HVM_DOMAIN)
57
58#ifdef CONFIG_XEN_DOM0
59#include <xen/interface/xen.h>
60
61#define xen_initial_domain() (xen_pv_domain() && \
62 xen_start_info->flags & SIF_INITDOMAIN)
63#else /* !CONFIG_XEN_DOM0 */
64#define xen_initial_domain() (0)
65#endif /* CONFIG_XEN_DOM0 */
66
67#endif /* _ASM_X86_XEN_HYPERVISOR_H */ 40#endif /* _ASM_X86_XEN_HYPERVISOR_H */
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 4f2e66e29ecc..d87f09bc5a52 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -89,7 +89,6 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
89obj-$(CONFIG_HPET_TIMER) += hpet.o 89obj-$(CONFIG_HPET_TIMER) += hpet.o
90 90
91obj-$(CONFIG_K8_NB) += k8.o 91obj-$(CONFIG_K8_NB) += k8.o
92obj-$(CONFIG_MGEODE_LX) += geode_32.o mfgpt_32.o
93obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o 92obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o
94obj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o 93obj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o
95 94
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 67e929b89875..fb1035cd9a6a 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -624,6 +624,7 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
624 } 624 }
625 625
626 hpet_address = hpet_tbl->address.address; 626 hpet_address = hpet_tbl->address.address;
627 hpet_blockid = hpet_tbl->sequence;
627 628
628 /* 629 /*
629 * Some broken BIOSes advertise HPET at 0x0. We really do not 630 * Some broken BIOSes advertise HPET at 0x0. We really do not
@@ -1122,7 +1123,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
1122 if (!acpi_sci_override_gsi) 1123 if (!acpi_sci_override_gsi)
1123 acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0); 1124 acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0);
1124 1125
1125 /* Fill in identity legacy mapings where no override */ 1126 /* Fill in identity legacy mappings where no override */
1126 mp_config_acpi_legacy_irqs(); 1127 mp_config_acpi_legacy_irqs();
1127 1128
1128 count = 1129 count =
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 59cdfa4686b2..2e837f5080fe 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -48,7 +48,7 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
48 * P4, Core and beyond CPUs 48 * P4, Core and beyond CPUs
49 */ 49 */
50 if (c->x86_vendor == X86_VENDOR_INTEL && 50 if (c->x86_vendor == X86_VENDOR_INTEL &&
51 (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 14))) 51 (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f)))
52 flags->bm_control = 0; 52 flags->bm_control = 0;
53} 53}
54EXPORT_SYMBOL(acpi_processor_power_init_bm_check); 54EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 32fb09102a13..23824fef789c 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -19,7 +19,7 @@
19 19
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include <linux/gfp.h> 21#include <linux/gfp.h>
22#include <linux/bitops.h> 22#include <linux/bitmap.h>
23#include <linux/debugfs.h> 23#include <linux/debugfs.h>
24#include <linux/scatterlist.h> 24#include <linux/scatterlist.h>
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
@@ -166,6 +166,43 @@ static void iommu_uninit_device(struct device *dev)
166{ 166{
167 kfree(dev->archdata.iommu); 167 kfree(dev->archdata.iommu);
168} 168}
169
170void __init amd_iommu_uninit_devices(void)
171{
172 struct pci_dev *pdev = NULL;
173
174 for_each_pci_dev(pdev) {
175
176 if (!check_device(&pdev->dev))
177 continue;
178
179 iommu_uninit_device(&pdev->dev);
180 }
181}
182
183int __init amd_iommu_init_devices(void)
184{
185 struct pci_dev *pdev = NULL;
186 int ret = 0;
187
188 for_each_pci_dev(pdev) {
189
190 if (!check_device(&pdev->dev))
191 continue;
192
193 ret = iommu_init_device(&pdev->dev);
194 if (ret)
195 goto out_free;
196 }
197
198 return 0;
199
200out_free:
201
202 amd_iommu_uninit_devices();
203
204 return ret;
205}
169#ifdef CONFIG_AMD_IOMMU_STATS 206#ifdef CONFIG_AMD_IOMMU_STATS
170 207
171/* 208/*
@@ -1125,7 +1162,7 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,
1125 1162
1126 address = (address % APERTURE_RANGE_SIZE) >> PAGE_SHIFT; 1163 address = (address % APERTURE_RANGE_SIZE) >> PAGE_SHIFT;
1127 1164
1128 iommu_area_free(range->bitmap, address, pages); 1165 bitmap_clear(range->bitmap, address, pages);
1129 1166
1130} 1167}
1131 1168
@@ -1587,6 +1624,11 @@ static struct notifier_block device_nb = {
1587 .notifier_call = device_change_notifier, 1624 .notifier_call = device_change_notifier,
1588}; 1625};
1589 1626
1627void amd_iommu_init_notifier(void)
1628{
1629 bus_register_notifier(&pci_bus_type, &device_nb);
1630}
1631
1590/***************************************************************************** 1632/*****************************************************************************
1591 * 1633 *
1592 * The next functions belong to the dma_ops mapping/unmapping code. 1634 * The next functions belong to the dma_ops mapping/unmapping code.
@@ -1783,7 +1825,7 @@ retry:
1783 goto out; 1825 goto out;
1784 1826
1785 /* 1827 /*
1786 * aperture was sucessfully enlarged by 128 MB, try 1828 * aperture was successfully enlarged by 128 MB, try
1787 * allocation again 1829 * allocation again
1788 */ 1830 */
1789 goto retry; 1831 goto retry;
@@ -2145,8 +2187,6 @@ static void prealloc_protection_domains(void)
2145 if (!check_device(&dev->dev)) 2187 if (!check_device(&dev->dev))
2146 continue; 2188 continue;
2147 2189
2148 iommu_init_device(&dev->dev);
2149
2150 /* Is there already any domain for it? */ 2190 /* Is there already any domain for it? */
2151 if (domain_for_device(&dev->dev)) 2191 if (domain_for_device(&dev->dev))
2152 continue; 2192 continue;
@@ -2215,8 +2255,6 @@ int __init amd_iommu_init_dma_ops(void)
2215 2255
2216 register_iommu(&amd_iommu_ops); 2256 register_iommu(&amd_iommu_ops);
2217 2257
2218 bus_register_notifier(&pci_bus_type, &device_nb);
2219
2220 amd_iommu_stats_init(); 2258 amd_iommu_stats_init();
2221 2259
2222 return 0; 2260 return 0;
@@ -2490,7 +2528,7 @@ int __init amd_iommu_init_passthrough(void)
2490 struct pci_dev *dev = NULL; 2528 struct pci_dev *dev = NULL;
2491 u16 devid; 2529 u16 devid;
2492 2530
2493 /* allocate passthroug domain */ 2531 /* allocate passthrough domain */
2494 pt_domain = protection_domain_alloc(); 2532 pt_domain = protection_domain_alloc();
2495 if (!pt_domain) 2533 if (!pt_domain)
2496 return -ENOMEM; 2534 return -ENOMEM;
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 7ffc39965233..1dca9c34eaeb 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -1274,6 +1274,10 @@ static int __init amd_iommu_init(void)
1274 if (ret) 1274 if (ret)
1275 goto free; 1275 goto free;
1276 1276
1277 ret = amd_iommu_init_devices();
1278 if (ret)
1279 goto free;
1280
1277 if (iommu_pass_through) 1281 if (iommu_pass_through)
1278 ret = amd_iommu_init_passthrough(); 1282 ret = amd_iommu_init_passthrough();
1279 else 1283 else
@@ -1281,6 +1285,8 @@ static int __init amd_iommu_init(void)
1281 if (ret) 1285 if (ret)
1282 goto free; 1286 goto free;
1283 1287
1288 amd_iommu_init_notifier();
1289
1284 enable_iommus(); 1290 enable_iommus();
1285 1291
1286 if (iommu_pass_through) 1292 if (iommu_pass_through)
@@ -1296,6 +1302,9 @@ out:
1296 return ret; 1302 return ret;
1297 1303
1298free: 1304free:
1305
1306 amd_iommu_uninit_devices();
1307
1299 free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, 1308 free_pages((unsigned long)amd_iommu_pd_alloc_bitmap,
1300 get_order(MAX_DOMAIN_ID/8)); 1309 get_order(MAX_DOMAIN_ID/8));
1301 1310
@@ -1336,6 +1345,9 @@ void __init amd_iommu_detect(void)
1336 iommu_detected = 1; 1345 iommu_detected = 1;
1337 amd_iommu_detected = 1; 1346 amd_iommu_detected = 1;
1338 x86_init.iommu.iommu_init = amd_iommu_init; 1347 x86_init.iommu.iommu_init = amd_iommu_init;
1348
1349 /* Make sure ACS will be enabled */
1350 pci_request_acs();
1339 } 1351 }
1340} 1352}
1341 1353
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index e0dfb6856aa2..3704997e8b25 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -280,7 +280,8 @@ void __init early_gart_iommu_check(void)
280 * or BIOS forget to put that in reserved. 280 * or BIOS forget to put that in reserved.
281 * try to update e820 to make that region as reserved. 281 * try to update e820 to make that region as reserved.
282 */ 282 */
283 int i, fix, slot; 283 u32 agp_aper_base = 0, agp_aper_order = 0;
284 int i, fix, slot, valid_agp = 0;
284 u32 ctl; 285 u32 ctl;
285 u32 aper_size = 0, aper_order = 0, last_aper_order = 0; 286 u32 aper_size = 0, aper_order = 0, last_aper_order = 0;
286 u64 aper_base = 0, last_aper_base = 0; 287 u64 aper_base = 0, last_aper_base = 0;
@@ -290,6 +291,8 @@ void __init early_gart_iommu_check(void)
290 return; 291 return;
291 292
292 /* This is mostly duplicate of iommu_hole_init */ 293 /* This is mostly duplicate of iommu_hole_init */
294 agp_aper_base = search_agp_bridge(&agp_aper_order, &valid_agp);
295
293 fix = 0; 296 fix = 0;
294 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { 297 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
295 int bus; 298 int bus;
@@ -342,10 +345,10 @@ void __init early_gart_iommu_check(void)
342 } 345 }
343 } 346 }
344 347
345 if (!fix) 348 if (valid_agp)
346 return; 349 return;
347 350
348 /* different nodes have different setting, disable them all at first*/ 351 /* disable them all at first */
349 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { 352 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
350 int bus; 353 int bus;
351 int dev_base, dev_limit; 354 int dev_base, dev_limit;
@@ -458,8 +461,6 @@ out:
458 461
459 if (aper_alloc) { 462 if (aper_alloc) {
460 /* Got the aperture from the AGP bridge */ 463 /* Got the aperture from the AGP bridge */
461 } else if (!valid_agp) {
462 /* Do nothing */
463 } else if ((!no_iommu && max_pfn > MAX_DMA32_PFN) || 464 } else if ((!no_iommu && max_pfn > MAX_DMA32_PFN) ||
464 force_iommu || 465 force_iommu ||
465 valid_agp || 466 valid_agp ||
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ad8c75b9e453..aa57c079c98f 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -647,7 +647,7 @@ static int __init calibrate_APIC_clock(void)
647 calibration_result = (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS; 647 calibration_result = (delta * APIC_DIVISOR) / LAPIC_CAL_LOOPS;
648 648
649 apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta); 649 apic_printk(APIC_VERBOSE, "..... delta %ld\n", delta);
650 apic_printk(APIC_VERBOSE, "..... mult: %ld\n", lapic_clockevent.mult); 650 apic_printk(APIC_VERBOSE, "..... mult: %u\n", lapic_clockevent.mult);
651 apic_printk(APIC_VERBOSE, "..... calibration result: %u\n", 651 apic_printk(APIC_VERBOSE, "..... calibration result: %u\n",
652 calibration_result); 652 calibration_result);
653 653
@@ -1341,7 +1341,7 @@ void enable_x2apic(void)
1341 1341
1342 rdmsr(MSR_IA32_APICBASE, msr, msr2); 1342 rdmsr(MSR_IA32_APICBASE, msr, msr2);
1343 if (!(msr & X2APIC_ENABLE)) { 1343 if (!(msr & X2APIC_ENABLE)) {
1344 pr_info("Enabling x2apic\n"); 1344 printk_once(KERN_INFO "Enabling x2apic\n");
1345 wrmsr(MSR_IA32_APICBASE, msr | X2APIC_ENABLE, 0); 1345 wrmsr(MSR_IA32_APICBASE, msr | X2APIC_ENABLE, 0);
1346 } 1346 }
1347} 1347}
diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c
index d9acc3bee0f4..e31b9ffe25f5 100644
--- a/arch/x86/kernel/apic/apic_noop.c
+++ b/arch/x86/kernel/apic/apic_noop.c
@@ -127,7 +127,7 @@ static u32 noop_apic_read(u32 reg)
127 127
128static void noop_apic_write(u32 reg, u32 v) 128static void noop_apic_write(u32 reg, u32 v)
129{ 129{
130 WARN_ON_ONCE((cpu_has_apic || !disable_apic)); 130 WARN_ON_ONCE(cpu_has_apic && !disable_apic);
131} 131}
132 132
133struct apic apic_noop = { 133struct apic apic_noop = {
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c
index e85f8fb7f8e7..dd2b5f264643 100644
--- a/arch/x86/kernel/apic/es7000_32.c
+++ b/arch/x86/kernel/apic/es7000_32.c
@@ -27,6 +27,9 @@
27 * 27 *
28 * http://www.unisys.com 28 * http://www.unisys.com
29 */ 29 */
30
31#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
32
30#include <linux/notifier.h> 33#include <linux/notifier.h>
31#include <linux/spinlock.h> 34#include <linux/spinlock.h>
32#include <linux/cpumask.h> 35#include <linux/cpumask.h>
@@ -223,9 +226,9 @@ static int parse_unisys_oem(char *oemptr)
223 mip_addr = val; 226 mip_addr = val;
224 mip = (struct mip_reg *)val; 227 mip = (struct mip_reg *)val;
225 mip_reg = __va(mip); 228 mip_reg = __va(mip);
226 pr_debug("es7000_mipcfg: host_reg = 0x%lx \n", 229 pr_debug("host_reg = 0x%lx\n",
227 (unsigned long)host_reg); 230 (unsigned long)host_reg);
228 pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n", 231 pr_debug("mip_reg = 0x%lx\n",
229 (unsigned long)mip_reg); 232 (unsigned long)mip_reg);
230 success++; 233 success++;
231 break; 234 break;
@@ -401,7 +404,7 @@ static void es7000_enable_apic_mode(void)
401 if (!es7000_plat) 404 if (!es7000_plat)
402 return; 405 return;
403 406
404 printk(KERN_INFO "ES7000: Enabling APIC mode.\n"); 407 pr_info("Enabling APIC mode.\n");
405 memset(&es7000_mip_reg, 0, sizeof(struct mip_reg)); 408 memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
406 es7000_mip_reg.off_0x00 = MIP_SW_APIC; 409 es7000_mip_reg.off_0x00 = MIP_SW_APIC;
407 es7000_mip_reg.off_0x38 = MIP_VALID; 410 es7000_mip_reg.off_0x38 = MIP_VALID;
@@ -514,8 +517,7 @@ static void es7000_setup_apic_routing(void)
514{ 517{
515 int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id()); 518 int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
516 519
517 printk(KERN_INFO 520 pr_info("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
518 "Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
519 (apic_version[apic] == 0x14) ? 521 (apic_version[apic] == 0x14) ?
520 "Physical Cluster" : "Logical Cluster", 522 "Physical Cluster" : "Logical Cluster",
521 nr_ioapics, cpumask_bits(es7000_target_cpus())[0]); 523 nr_ioapics, cpumask_bits(es7000_target_cpus())[0]);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index c0b4468683f9..11a5851f1f50 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2431,7 +2431,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
2431 continue; 2431 continue;
2432 2432
2433 cfg = irq_cfg(irq); 2433 cfg = irq_cfg(irq);
2434 spin_lock(&desc->lock); 2434 raw_spin_lock(&desc->lock);
2435 2435
2436 if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) 2436 if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain))
2437 goto unlock; 2437 goto unlock;
@@ -2450,7 +2450,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
2450 } 2450 }
2451 __get_cpu_var(vector_irq)[vector] = -1; 2451 __get_cpu_var(vector_irq)[vector] = -1;
2452unlock: 2452unlock:
2453 spin_unlock(&desc->lock); 2453 raw_spin_unlock(&desc->lock);
2454 } 2454 }
2455 2455
2456 irq_exit(); 2456 irq_exit();
@@ -3267,7 +3267,8 @@ void destroy_irq(unsigned int irq)
3267 * MSI message composition 3267 * MSI message composition
3268 */ 3268 */
3269#ifdef CONFIG_PCI_MSI 3269#ifdef CONFIG_PCI_MSI
3270static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) 3270static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
3271 struct msi_msg *msg, u8 hpet_id)
3271{ 3272{
3272 struct irq_cfg *cfg; 3273 struct irq_cfg *cfg;
3273 int err; 3274 int err;
@@ -3301,7 +3302,10 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
3301 irte.dest_id = IRTE_DEST(dest); 3302 irte.dest_id = IRTE_DEST(dest);
3302 3303
3303 /* Set source-id of interrupt request */ 3304 /* Set source-id of interrupt request */
3304 set_msi_sid(&irte, pdev); 3305 if (pdev)
3306 set_msi_sid(&irte, pdev);
3307 else
3308 set_hpet_sid(&irte, hpet_id);
3305 3309
3306 modify_irte(irq, &irte); 3310 modify_irte(irq, &irte);
3307 3311
@@ -3466,7 +3470,7 @@ static int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
3466 int ret; 3470 int ret;
3467 struct msi_msg msg; 3471 struct msi_msg msg;
3468 3472
3469 ret = msi_compose_msg(dev, irq, &msg); 3473 ret = msi_compose_msg(dev, irq, &msg, -1);
3470 if (ret < 0) 3474 if (ret < 0)
3471 return ret; 3475 return ret;
3472 3476
@@ -3599,7 +3603,7 @@ int arch_setup_dmar_msi(unsigned int irq)
3599 int ret; 3603 int ret;
3600 struct msi_msg msg; 3604 struct msi_msg msg;
3601 3605
3602 ret = msi_compose_msg(NULL, irq, &msg); 3606 ret = msi_compose_msg(NULL, irq, &msg, -1);
3603 if (ret < 0) 3607 if (ret < 0)
3604 return ret; 3608 return ret;
3605 dmar_msi_write(irq, &msg); 3609 dmar_msi_write(irq, &msg);
@@ -3639,6 +3643,19 @@ static int hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)
3639 3643
3640#endif /* CONFIG_SMP */ 3644#endif /* CONFIG_SMP */
3641 3645
3646static struct irq_chip ir_hpet_msi_type = {
3647 .name = "IR-HPET_MSI",
3648 .unmask = hpet_msi_unmask,
3649 .mask = hpet_msi_mask,
3650#ifdef CONFIG_INTR_REMAP
3651 .ack = ir_ack_apic_edge,
3652#ifdef CONFIG_SMP
3653 .set_affinity = ir_set_msi_irq_affinity,
3654#endif
3655#endif
3656 .retrigger = ioapic_retrigger_irq,
3657};
3658
3642static struct irq_chip hpet_msi_type = { 3659static struct irq_chip hpet_msi_type = {
3643 .name = "HPET_MSI", 3660 .name = "HPET_MSI",
3644 .unmask = hpet_msi_unmask, 3661 .unmask = hpet_msi_unmask,
@@ -3650,20 +3667,36 @@ static struct irq_chip hpet_msi_type = {
3650 .retrigger = ioapic_retrigger_irq, 3667 .retrigger = ioapic_retrigger_irq,
3651}; 3668};
3652 3669
3653int arch_setup_hpet_msi(unsigned int irq) 3670int arch_setup_hpet_msi(unsigned int irq, unsigned int id)
3654{ 3671{
3655 int ret; 3672 int ret;
3656 struct msi_msg msg; 3673 struct msi_msg msg;
3657 struct irq_desc *desc = irq_to_desc(irq); 3674 struct irq_desc *desc = irq_to_desc(irq);
3658 3675
3659 ret = msi_compose_msg(NULL, irq, &msg); 3676 if (intr_remapping_enabled) {
3677 struct intel_iommu *iommu = map_hpet_to_ir(id);
3678 int index;
3679
3680 if (!iommu)
3681 return -1;
3682
3683 index = alloc_irte(iommu, irq, 1);
3684 if (index < 0)
3685 return -1;
3686 }
3687
3688 ret = msi_compose_msg(NULL, irq, &msg, id);
3660 if (ret < 0) 3689 if (ret < 0)
3661 return ret; 3690 return ret;
3662 3691
3663 hpet_msi_write(irq, &msg); 3692 hpet_msi_write(irq, &msg);
3664 desc->status |= IRQ_MOVE_PCNTXT; 3693 desc->status |= IRQ_MOVE_PCNTXT;
3665 set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq, 3694 if (irq_remapped(irq))
3666 "edge"); 3695 set_irq_chip_and_handler_name(irq, &ir_hpet_msi_type,
3696 handle_edge_irq, "edge");
3697 else
3698 set_irq_chip_and_handler_name(irq, &hpet_msi_type,
3699 handle_edge_irq, "edge");
3667 3700
3668 return 0; 3701 return 0;
3669} 3702}
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index 6389432a9dbf..0159a69396cb 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -361,7 +361,7 @@ void stop_apic_nmi_watchdog(void *unused)
361 */ 361 */
362 362
363static DEFINE_PER_CPU(unsigned, last_irq_sum); 363static DEFINE_PER_CPU(unsigned, last_irq_sum);
364static DEFINE_PER_CPU(local_t, alert_counter); 364static DEFINE_PER_CPU(long, alert_counter);
365static DEFINE_PER_CPU(int, nmi_touch); 365static DEFINE_PER_CPU(int, nmi_touch);
366 366
367void touch_nmi_watchdog(void) 367void touch_nmi_watchdog(void)
@@ -438,8 +438,8 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
438 * Ayiee, looks like this CPU is stuck ... 438 * Ayiee, looks like this CPU is stuck ...
439 * wait a few IRQs (5 seconds) before doing the oops ... 439 * wait a few IRQs (5 seconds) before doing the oops ...
440 */ 440 */
441 local_inc(&__get_cpu_var(alert_counter)); 441 __this_cpu_inc(per_cpu_var(alert_counter));
442 if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz) 442 if (__this_cpu_read(per_cpu_var(alert_counter)) == 5 * nmi_hz)
443 /* 443 /*
444 * die_nmi will return ONLY if NOTIFY_STOP happens.. 444 * die_nmi will return ONLY if NOTIFY_STOP happens..
445 */ 445 */
@@ -447,7 +447,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
447 regs, panic_on_timeout); 447 regs, panic_on_timeout);
448 } else { 448 } else {
449 __get_cpu_var(last_irq_sum) = sum; 449 __get_cpu_var(last_irq_sum) = sum;
450 local_set(&__get_cpu_var(alert_counter), 0); 450 __this_cpu_write(per_cpu_var(alert_counter), 0);
451 } 451 }
452 452
453 /* see if the nmi watchdog went off */ 453 /* see if the nmi watchdog went off */
diff --git a/arch/x86/kernel/bios_uv.c b/arch/x86/kernel/bios_uv.c
index 63a88e1f987d..b0206a211b09 100644
--- a/arch/x86/kernel/bios_uv.c
+++ b/arch/x86/kernel/bios_uv.c
@@ -101,21 +101,17 @@ s64 uv_bios_get_sn_info(int fc, int *uvtype, long *partid, long *coher,
101} 101}
102 102
103int 103int
104uv_bios_mq_watchlist_alloc(int blade, unsigned long addr, unsigned int mq_size, 104uv_bios_mq_watchlist_alloc(unsigned long addr, unsigned int mq_size,
105 unsigned long *intr_mmr_offset) 105 unsigned long *intr_mmr_offset)
106{ 106{
107 union uv_watchlist_u size_blade;
108 u64 watchlist; 107 u64 watchlist;
109 s64 ret; 108 s64 ret;
110 109
111 size_blade.size = mq_size;
112 size_blade.blade = blade;
113
114 /* 110 /*
115 * bios returns watchlist number or negative error number. 111 * bios returns watchlist number or negative error number.
116 */ 112 */
117 ret = (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_ALLOC, addr, 113 ret = (int)uv_bios_call_irqsave(UV_BIOS_WATCHLIST_ALLOC, addr,
118 size_blade.val, (u64)intr_mmr_offset, 114 mq_size, (u64)intr_mmr_offset,
119 (u64)&watchlist, 0); 115 (u64)&watchlist, 0);
120 if (ret < BIOS_STATUS_SUCCESS) 116 if (ret < BIOS_STATUS_SUCCESS)
121 return ret; 117 return ret;
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index c965e5212714..468489b57aae 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -74,6 +74,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
74 unsigned int eax, ebx, ecx, edx, sub_index; 74 unsigned int eax, ebx, ecx, edx, sub_index;
75 unsigned int ht_mask_width, core_plus_mask_width; 75 unsigned int ht_mask_width, core_plus_mask_width;
76 unsigned int core_select_mask, core_level_siblings; 76 unsigned int core_select_mask, core_level_siblings;
77 static bool printed;
77 78
78 if (c->cpuid_level < 0xb) 79 if (c->cpuid_level < 0xb)
79 return; 80 return;
@@ -127,12 +128,14 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
127 128
128 c->x86_max_cores = (core_level_siblings / smp_num_siblings); 129 c->x86_max_cores = (core_level_siblings / smp_num_siblings);
129 130
130 131 if (!printed) {
131 printk(KERN_INFO "CPU: Physical Processor ID: %d\n", 132 printk(KERN_INFO "CPU: Physical Processor ID: %d\n",
132 c->phys_proc_id); 133 c->phys_proc_id);
133 if (c->x86_max_cores > 1) 134 if (c->x86_max_cores > 1)
134 printk(KERN_INFO "CPU: Processor Core ID: %d\n", 135 printk(KERN_INFO "CPU: Processor Core ID: %d\n",
135 c->cpu_core_id); 136 c->cpu_core_id);
137 printed = 1;
138 }
136 return; 139 return;
137#endif 140#endif
138} 141}
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 7128b3799cec..8dc3ea145c97 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -375,8 +375,6 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
375 node = nearby_node(apicid); 375 node = nearby_node(apicid);
376 } 376 }
377 numa_set_node(cpu, node); 377 numa_set_node(cpu, node);
378
379 printk(KERN_INFO "CPU %d/0x%x -> Node %d\n", cpu, apicid, node);
380#endif 378#endif
381} 379}
382 380
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index c1afa990a6c8..4868e4a951ee 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -427,6 +427,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
427#ifdef CONFIG_X86_HT 427#ifdef CONFIG_X86_HT
428 u32 eax, ebx, ecx, edx; 428 u32 eax, ebx, ecx, edx;
429 int index_msb, core_bits; 429 int index_msb, core_bits;
430 static bool printed;
430 431
431 if (!cpu_has(c, X86_FEATURE_HT)) 432 if (!cpu_has(c, X86_FEATURE_HT))
432 return; 433 return;
@@ -442,7 +443,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
442 smp_num_siblings = (ebx & 0xff0000) >> 16; 443 smp_num_siblings = (ebx & 0xff0000) >> 16;
443 444
444 if (smp_num_siblings == 1) { 445 if (smp_num_siblings == 1) {
445 printk(KERN_INFO "CPU: Hyper-Threading is disabled\n"); 446 printk_once(KERN_INFO "CPU0: Hyper-Threading is disabled\n");
446 goto out; 447 goto out;
447 } 448 }
448 449
@@ -469,11 +470,12 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c)
469 ((1 << core_bits) - 1); 470 ((1 << core_bits) - 1);
470 471
471out: 472out:
472 if ((c->x86_max_cores * smp_num_siblings) > 1) { 473 if (!printed && (c->x86_max_cores * smp_num_siblings) > 1) {
473 printk(KERN_INFO "CPU: Physical Processor ID: %d\n", 474 printk(KERN_INFO "CPU: Physical Processor ID: %d\n",
474 c->phys_proc_id); 475 c->phys_proc_id);
475 printk(KERN_INFO "CPU: Processor Core ID: %d\n", 476 printk(KERN_INFO "CPU: Processor Core ID: %d\n",
476 c->cpu_core_id); 477 c->cpu_core_id);
478 printed = 1;
477 } 479 }
478#endif 480#endif
479} 481}
@@ -1093,7 +1095,7 @@ static void clear_all_debug_regs(void)
1093 1095
1094void __cpuinit cpu_init(void) 1096void __cpuinit cpu_init(void)
1095{ 1097{
1096 struct orig_ist *orig_ist; 1098 struct orig_ist *oist;
1097 struct task_struct *me; 1099 struct task_struct *me;
1098 struct tss_struct *t; 1100 struct tss_struct *t;
1099 unsigned long v; 1101 unsigned long v;
@@ -1102,7 +1104,7 @@ void __cpuinit cpu_init(void)
1102 1104
1103 cpu = stack_smp_processor_id(); 1105 cpu = stack_smp_processor_id();
1104 t = &per_cpu(init_tss, cpu); 1106 t = &per_cpu(init_tss, cpu);
1105 orig_ist = &per_cpu(orig_ist, cpu); 1107 oist = &per_cpu(orig_ist, cpu);
1106 1108
1107#ifdef CONFIG_NUMA 1109#ifdef CONFIG_NUMA
1108 if (cpu != 0 && percpu_read(node_number) == 0 && 1110 if (cpu != 0 && percpu_read(node_number) == 0 &&
@@ -1115,7 +1117,7 @@ void __cpuinit cpu_init(void)
1115 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) 1117 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask))
1116 panic("CPU#%d already initialized!\n", cpu); 1118 panic("CPU#%d already initialized!\n", cpu);
1117 1119
1118 printk(KERN_INFO "Initializing CPU#%d\n", cpu); 1120 pr_debug("Initializing CPU#%d\n", cpu);
1119 1121
1120 clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE); 1122 clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
1121 1123
@@ -1143,12 +1145,12 @@ void __cpuinit cpu_init(void)
1143 /* 1145 /*
1144 * set up and load the per-CPU TSS 1146 * set up and load the per-CPU TSS
1145 */ 1147 */
1146 if (!orig_ist->ist[0]) { 1148 if (!oist->ist[0]) {
1147 char *estacks = per_cpu(exception_stacks, cpu); 1149 char *estacks = per_cpu(exception_stacks, cpu);
1148 1150
1149 for (v = 0; v < N_EXCEPTION_STACKS; v++) { 1151 for (v = 0; v < N_EXCEPTION_STACKS; v++) {
1150 estacks += exception_stack_sizes[v]; 1152 estacks += exception_stack_sizes[v];
1151 orig_ist->ist[v] = t->x86_tss.ist[v] = 1153 oist->ist[v] = t->x86_tss.ist[v] =
1152 (unsigned long)estacks; 1154 (unsigned long)estacks;
1153 } 1155 }
1154 } 1156 }
diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c
index dca325c03999..b368cd862997 100644
--- a/arch/x86/kernel/cpu/cpu_debug.c
+++ b/arch/x86/kernel/cpu/cpu_debug.c
@@ -30,9 +30,9 @@
30#include <asm/apic.h> 30#include <asm/apic.h>
31#include <asm/desc.h> 31#include <asm/desc.h>
32 32
33static DEFINE_PER_CPU(struct cpu_cpuX_base [CPU_REG_ALL_BIT], cpu_arr); 33static DEFINE_PER_CPU(struct cpu_cpuX_base [CPU_REG_ALL_BIT], cpud_arr);
34static DEFINE_PER_CPU(struct cpu_private * [MAX_CPU_FILES], priv_arr); 34static DEFINE_PER_CPU(struct cpu_private * [MAX_CPU_FILES], cpud_priv_arr);
35static DEFINE_PER_CPU(int, cpu_priv_count); 35static DEFINE_PER_CPU(int, cpud_priv_count);
36 36
37static DEFINE_MUTEX(cpu_debug_lock); 37static DEFINE_MUTEX(cpu_debug_lock);
38 38
@@ -531,7 +531,7 @@ static int cpu_create_file(unsigned cpu, unsigned type, unsigned reg,
531 531
532 /* Already intialized */ 532 /* Already intialized */
533 if (file == CPU_INDEX_BIT) 533 if (file == CPU_INDEX_BIT)
534 if (per_cpu(cpu_arr[type].init, cpu)) 534 if (per_cpu(cpud_arr[type].init, cpu))
535 return 0; 535 return 0;
536 536
537 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 537 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
@@ -543,8 +543,8 @@ static int cpu_create_file(unsigned cpu, unsigned type, unsigned reg,
543 priv->reg = reg; 543 priv->reg = reg;
544 priv->file = file; 544 priv->file = file;
545 mutex_lock(&cpu_debug_lock); 545 mutex_lock(&cpu_debug_lock);
546 per_cpu(priv_arr[type], cpu) = priv; 546 per_cpu(cpud_priv_arr[type], cpu) = priv;
547 per_cpu(cpu_priv_count, cpu)++; 547 per_cpu(cpud_priv_count, cpu)++;
548 mutex_unlock(&cpu_debug_lock); 548 mutex_unlock(&cpu_debug_lock);
549 549
550 if (file) 550 if (file)
@@ -552,10 +552,10 @@ static int cpu_create_file(unsigned cpu, unsigned type, unsigned reg,
552 dentry, (void *)priv, &cpu_fops); 552 dentry, (void *)priv, &cpu_fops);
553 else { 553 else {
554 debugfs_create_file(cpu_base[type].name, S_IRUGO, 554 debugfs_create_file(cpu_base[type].name, S_IRUGO,
555 per_cpu(cpu_arr[type].dentry, cpu), 555 per_cpu(cpud_arr[type].dentry, cpu),
556 (void *)priv, &cpu_fops); 556 (void *)priv, &cpu_fops);
557 mutex_lock(&cpu_debug_lock); 557 mutex_lock(&cpu_debug_lock);
558 per_cpu(cpu_arr[type].init, cpu) = 1; 558 per_cpu(cpud_arr[type].init, cpu) = 1;
559 mutex_unlock(&cpu_debug_lock); 559 mutex_unlock(&cpu_debug_lock);
560 } 560 }
561 561
@@ -615,7 +615,7 @@ static int cpu_init_allreg(unsigned cpu, struct dentry *dentry)
615 if (!is_typeflag_valid(cpu, cpu_base[type].flag)) 615 if (!is_typeflag_valid(cpu, cpu_base[type].flag))
616 continue; 616 continue;
617 cpu_dentry = debugfs_create_dir(cpu_base[type].name, dentry); 617 cpu_dentry = debugfs_create_dir(cpu_base[type].name, dentry);
618 per_cpu(cpu_arr[type].dentry, cpu) = cpu_dentry; 618 per_cpu(cpud_arr[type].dentry, cpu) = cpu_dentry;
619 619
620 if (type < CPU_TSS_BIT) 620 if (type < CPU_TSS_BIT)
621 err = cpu_init_msr(cpu, type, cpu_dentry); 621 err = cpu_init_msr(cpu, type, cpu_dentry);
@@ -647,11 +647,11 @@ static int cpu_init_cpu(void)
647 err = cpu_init_allreg(cpu, cpu_dentry); 647 err = cpu_init_allreg(cpu, cpu_dentry);
648 648
649 pr_info("cpu%d(%d) debug files %d\n", 649 pr_info("cpu%d(%d) debug files %d\n",
650 cpu, nr_cpu_ids, per_cpu(cpu_priv_count, cpu)); 650 cpu, nr_cpu_ids, per_cpu(cpud_priv_count, cpu));
651 if (per_cpu(cpu_priv_count, cpu) > MAX_CPU_FILES) { 651 if (per_cpu(cpud_priv_count, cpu) > MAX_CPU_FILES) {
652 pr_err("Register files count %d exceeds limit %d\n", 652 pr_err("Register files count %d exceeds limit %d\n",
653 per_cpu(cpu_priv_count, cpu), MAX_CPU_FILES); 653 per_cpu(cpud_priv_count, cpu), MAX_CPU_FILES);
654 per_cpu(cpu_priv_count, cpu) = MAX_CPU_FILES; 654 per_cpu(cpud_priv_count, cpu) = MAX_CPU_FILES;
655 err = -ENFILE; 655 err = -ENFILE;
656 } 656 }
657 if (err) 657 if (err)
@@ -676,8 +676,8 @@ static void __exit cpu_debug_exit(void)
676 debugfs_remove_recursive(cpu_debugfs_dir); 676 debugfs_remove_recursive(cpu_debugfs_dir);
677 677
678 for (cpu = 0; cpu < nr_cpu_ids; cpu++) 678 for (cpu = 0; cpu < nr_cpu_ids; cpu++)
679 for (i = 0; i < per_cpu(cpu_priv_count, cpu); i++) 679 for (i = 0; i < per_cpu(cpud_priv_count, cpu); i++)
680 kfree(per_cpu(priv_arr[i], cpu)); 680 kfree(per_cpu(cpud_priv_arr[i], cpu));
681} 681}
682 682
683module_init(cpu_debug_init); 683module_init(cpu_debug_init);
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index 8b581d3905cb..f28decf8dde3 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -68,9 +68,9 @@ struct acpi_cpufreq_data {
68 unsigned int cpu_feature; 68 unsigned int cpu_feature;
69}; 69};
70 70
71static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); 71static DEFINE_PER_CPU(struct acpi_cpufreq_data *, acfreq_data);
72 72
73static DEFINE_PER_CPU(struct aperfmperf, old_perf); 73static DEFINE_PER_CPU(struct aperfmperf, acfreq_old_perf);
74 74
75/* acpi_perf_data is a pointer to percpu data. */ 75/* acpi_perf_data is a pointer to percpu data. */
76static struct acpi_processor_performance *acpi_perf_data; 76static struct acpi_processor_performance *acpi_perf_data;
@@ -214,14 +214,14 @@ static u32 get_cur_val(const struct cpumask *mask)
214 if (unlikely(cpumask_empty(mask))) 214 if (unlikely(cpumask_empty(mask)))
215 return 0; 215 return 0;
216 216
217 switch (per_cpu(drv_data, cpumask_first(mask))->cpu_feature) { 217 switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) {
218 case SYSTEM_INTEL_MSR_CAPABLE: 218 case SYSTEM_INTEL_MSR_CAPABLE:
219 cmd.type = SYSTEM_INTEL_MSR_CAPABLE; 219 cmd.type = SYSTEM_INTEL_MSR_CAPABLE;
220 cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; 220 cmd.addr.msr.reg = MSR_IA32_PERF_STATUS;
221 break; 221 break;
222 case SYSTEM_IO_CAPABLE: 222 case SYSTEM_IO_CAPABLE:
223 cmd.type = SYSTEM_IO_CAPABLE; 223 cmd.type = SYSTEM_IO_CAPABLE;
224 perf = per_cpu(drv_data, cpumask_first(mask))->acpi_data; 224 perf = per_cpu(acfreq_data, cpumask_first(mask))->acpi_data;
225 cmd.addr.io.port = perf->control_register.address; 225 cmd.addr.io.port = perf->control_register.address;
226 cmd.addr.io.bit_width = perf->control_register.bit_width; 226 cmd.addr.io.bit_width = perf->control_register.bit_width;
227 break; 227 break;
@@ -268,8 +268,8 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy,
268 if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1)) 268 if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1))
269 return 0; 269 return 0;
270 270
271 ratio = calc_aperfmperf_ratio(&per_cpu(old_perf, cpu), &perf); 271 ratio = calc_aperfmperf_ratio(&per_cpu(acfreq_old_perf, cpu), &perf);
272 per_cpu(old_perf, cpu) = perf; 272 per_cpu(acfreq_old_perf, cpu) = perf;
273 273
274 retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT; 274 retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT;
275 275
@@ -278,7 +278,7 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy,
278 278
279static unsigned int get_cur_freq_on_cpu(unsigned int cpu) 279static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
280{ 280{
281 struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); 281 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, cpu);
282 unsigned int freq; 282 unsigned int freq;
283 unsigned int cached_freq; 283 unsigned int cached_freq;
284 284
@@ -322,7 +322,7 @@ static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq,
322static int acpi_cpufreq_target(struct cpufreq_policy *policy, 322static int acpi_cpufreq_target(struct cpufreq_policy *policy,
323 unsigned int target_freq, unsigned int relation) 323 unsigned int target_freq, unsigned int relation)
324{ 324{
325 struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); 325 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
326 struct acpi_processor_performance *perf; 326 struct acpi_processor_performance *perf;
327 struct cpufreq_freqs freqs; 327 struct cpufreq_freqs freqs;
328 struct drv_cmd cmd; 328 struct drv_cmd cmd;
@@ -416,7 +416,7 @@ out:
416 416
417static int acpi_cpufreq_verify(struct cpufreq_policy *policy) 417static int acpi_cpufreq_verify(struct cpufreq_policy *policy)
418{ 418{
419 struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); 419 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
420 420
421 dprintk("acpi_cpufreq_verify\n"); 421 dprintk("acpi_cpufreq_verify\n");
422 422
@@ -574,7 +574,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
574 return -ENOMEM; 574 return -ENOMEM;
575 575
576 data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu); 576 data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu);
577 per_cpu(drv_data, cpu) = data; 577 per_cpu(acfreq_data, cpu) = data;
578 578
579 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) 579 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC))
580 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; 580 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
@@ -725,20 +725,20 @@ err_unreg:
725 acpi_processor_unregister_performance(perf, cpu); 725 acpi_processor_unregister_performance(perf, cpu);
726err_free: 726err_free:
727 kfree(data); 727 kfree(data);
728 per_cpu(drv_data, cpu) = NULL; 728 per_cpu(acfreq_data, cpu) = NULL;
729 729
730 return result; 730 return result;
731} 731}
732 732
733static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) 733static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
734{ 734{
735 struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); 735 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
736 736
737 dprintk("acpi_cpufreq_cpu_exit\n"); 737 dprintk("acpi_cpufreq_cpu_exit\n");
738 738
739 if (data) { 739 if (data) {
740 cpufreq_frequency_table_put_attr(policy->cpu); 740 cpufreq_frequency_table_put_attr(policy->cpu);
741 per_cpu(drv_data, policy->cpu) = NULL; 741 per_cpu(acfreq_data, policy->cpu) = NULL;
742 acpi_processor_unregister_performance(data->acpi_data, 742 acpi_processor_unregister_performance(data->acpi_data,
743 policy->cpu); 743 policy->cpu);
744 kfree(data); 744 kfree(data);
@@ -749,7 +749,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
749 749
750static int acpi_cpufreq_resume(struct cpufreq_policy *policy) 750static int acpi_cpufreq_resume(struct cpufreq_policy *policy)
751{ 751{
752 struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); 752 struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
753 753
754 dprintk("acpi_cpufreq_resume\n"); 754 dprintk("acpi_cpufreq_resume\n");
755 755
@@ -764,14 +764,15 @@ static struct freq_attr *acpi_cpufreq_attr[] = {
764}; 764};
765 765
766static struct cpufreq_driver acpi_cpufreq_driver = { 766static struct cpufreq_driver acpi_cpufreq_driver = {
767 .verify = acpi_cpufreq_verify, 767 .verify = acpi_cpufreq_verify,
768 .target = acpi_cpufreq_target, 768 .target = acpi_cpufreq_target,
769 .init = acpi_cpufreq_cpu_init, 769 .bios_limit = acpi_processor_get_bios_limit,
770 .exit = acpi_cpufreq_cpu_exit, 770 .init = acpi_cpufreq_cpu_init,
771 .resume = acpi_cpufreq_resume, 771 .exit = acpi_cpufreq_cpu_exit,
772 .name = "acpi-cpufreq", 772 .resume = acpi_cpufreq_resume,
773 .owner = THIS_MODULE, 773 .name = "acpi-cpufreq",
774 .attr = acpi_cpufreq_attr, 774 .owner = THIS_MODULE,
775 .attr = acpi_cpufreq_attr,
775}; 776};
776 777
777static int __init acpi_cpufreq_init(void) 778static int __init acpi_cpufreq_init(void)
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c
index cabd2fa3fc93..7e7eea4f8261 100644
--- a/arch/x86/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c
@@ -885,7 +885,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy)
885 885
886 /* Find ACPI data for processor */ 886 /* Find ACPI data for processor */
887 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, 887 acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
888 ACPI_UINT32_MAX, &longhaul_walk_callback, 888 ACPI_UINT32_MAX, &longhaul_walk_callback, NULL,
889 NULL, (void *)&pr); 889 NULL, (void *)&pr);
890 890
891 /* Check ACPI support for C3 state */ 891 /* Check ACPI support for C3 state */
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
index f10dea409f40..cb01dac267d3 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
@@ -164,7 +164,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
164 } 164 }
165 165
166 /* cpuinfo and default policy values */ 166 /* cpuinfo and default policy values */
167 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 167 policy->cpuinfo.transition_latency = 200000;
168 policy->cur = busfreq * max_multiplier; 168 policy->cur = busfreq * max_multiplier;
169 169
170 result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio); 170 result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio);
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
index d47c775eb0ab..9a97116f89e5 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c
@@ -714,14 +714,17 @@ static struct freq_attr *powernow_table_attr[] = {
714}; 714};
715 715
716static struct cpufreq_driver powernow_driver = { 716static struct cpufreq_driver powernow_driver = {
717 .verify = powernow_verify, 717 .verify = powernow_verify,
718 .target = powernow_target, 718 .target = powernow_target,
719 .get = powernow_get, 719 .get = powernow_get,
720 .init = powernow_cpu_init, 720#ifdef CONFIG_X86_POWERNOW_K7_ACPI
721 .exit = powernow_cpu_exit, 721 .bios_limit = acpi_processor_get_bios_limit,
722 .name = "powernow-k7", 722#endif
723 .owner = THIS_MODULE, 723 .init = powernow_cpu_init,
724 .attr = powernow_table_attr, 724 .exit = powernow_cpu_exit,
725 .name = "powernow-k7",
726 .owner = THIS_MODULE,
727 .attr = powernow_table_attr,
725}; 728};
726 729
727static int __init powernow_init(void) 730static int __init powernow_init(void)
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 3f12dabeab52..f125e5c551c0 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1118,7 +1118,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data,
1118static int powernowk8_target(struct cpufreq_policy *pol, 1118static int powernowk8_target(struct cpufreq_policy *pol,
1119 unsigned targfreq, unsigned relation) 1119 unsigned targfreq, unsigned relation)
1120{ 1120{
1121 cpumask_t oldmask; 1121 cpumask_var_t oldmask;
1122 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu); 1122 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
1123 u32 checkfid; 1123 u32 checkfid;
1124 u32 checkvid; 1124 u32 checkvid;
@@ -1131,9 +1131,13 @@ static int powernowk8_target(struct cpufreq_policy *pol,
1131 checkfid = data->currfid; 1131 checkfid = data->currfid;
1132 checkvid = data->currvid; 1132 checkvid = data->currvid;
1133 1133
1134 /* only run on specific CPU from here on */ 1134 /* only run on specific CPU from here on. */
1135 oldmask = current->cpus_allowed; 1135 /* This is poor form: use a workqueue or smp_call_function_single */
1136 set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu)); 1136 if (!alloc_cpumask_var(&oldmask, GFP_KERNEL))
1137 return -ENOMEM;
1138
1139 cpumask_copy(oldmask, tsk_cpus_allowed(current));
1140 set_cpus_allowed_ptr(current, cpumask_of(pol->cpu));
1137 1141
1138 if (smp_processor_id() != pol->cpu) { 1142 if (smp_processor_id() != pol->cpu) {
1139 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); 1143 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
@@ -1193,7 +1197,8 @@ static int powernowk8_target(struct cpufreq_policy *pol,
1193 ret = 0; 1197 ret = 0;
1194 1198
1195err_out: 1199err_out:
1196 set_cpus_allowed_ptr(current, &oldmask); 1200 set_cpus_allowed_ptr(current, oldmask);
1201 free_cpumask_var(oldmask);
1197 return ret; 1202 return ret;
1198} 1203}
1199 1204
@@ -1393,14 +1398,15 @@ static struct freq_attr *powernow_k8_attr[] = {
1393}; 1398};
1394 1399
1395static struct cpufreq_driver cpufreq_amd64_driver = { 1400static struct cpufreq_driver cpufreq_amd64_driver = {
1396 .verify = powernowk8_verify, 1401 .verify = powernowk8_verify,
1397 .target = powernowk8_target, 1402 .target = powernowk8_target,
1398 .init = powernowk8_cpu_init, 1403 .bios_limit = acpi_processor_get_bios_limit,
1399 .exit = __devexit_p(powernowk8_cpu_exit), 1404 .init = powernowk8_cpu_init,
1400 .get = powernowk8_get, 1405 .exit = __devexit_p(powernowk8_cpu_exit),
1401 .name = "powernow-k8", 1406 .get = powernowk8_get,
1402 .owner = THIS_MODULE, 1407 .name = "powernow-k8",
1403 .attr = powernow_k8_attr, 1408 .owner = THIS_MODULE,
1409 .attr = powernow_k8_attr,
1404}; 1410};
1405 1411
1406/* driver entry point for init */ 1412/* driver entry point for init */
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
index 3ae5a7a3a500..2ce8e0b5cc54 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
@@ -39,7 +39,7 @@ static struct pci_dev *speedstep_chipset_dev;
39 39
40/* speedstep_processor 40/* speedstep_processor
41 */ 41 */
42static unsigned int speedstep_processor; 42static enum speedstep_processor speedstep_processor;
43 43
44static u32 pmbase; 44static u32 pmbase;
45 45
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
index f4c290b8482f..ad0083abfa23 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c
@@ -34,7 +34,7 @@ static int relaxed_check;
34 * GET PROCESSOR CORE SPEED IN KHZ * 34 * GET PROCESSOR CORE SPEED IN KHZ *
35 *********************************************************************/ 35 *********************************************************************/
36 36
37static unsigned int pentium3_get_frequency(unsigned int processor) 37static unsigned int pentium3_get_frequency(enum speedstep_processor processor)
38{ 38{
39 /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */ 39 /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */
40 struct { 40 struct {
@@ -227,7 +227,7 @@ static unsigned int pentium4_get_frequency(void)
227 227
228 228
229/* Warning: may get called from smp_call_function_single. */ 229/* Warning: may get called from smp_call_function_single. */
230unsigned int speedstep_get_frequency(unsigned int processor) 230unsigned int speedstep_get_frequency(enum speedstep_processor processor)
231{ 231{
232 switch (processor) { 232 switch (processor) {
233 case SPEEDSTEP_CPU_PCORE: 233 case SPEEDSTEP_CPU_PCORE:
@@ -380,7 +380,7 @@ EXPORT_SYMBOL_GPL(speedstep_detect_processor);
380 * DETECT SPEEDSTEP SPEEDS * 380 * DETECT SPEEDSTEP SPEEDS *
381 *********************************************************************/ 381 *********************************************************************/
382 382
383unsigned int speedstep_get_freqs(unsigned int processor, 383unsigned int speedstep_get_freqs(enum speedstep_processor processor,
384 unsigned int *low_speed, 384 unsigned int *low_speed,
385 unsigned int *high_speed, 385 unsigned int *high_speed,
386 unsigned int *transition_latency, 386 unsigned int *transition_latency,
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.h b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.h
index 2b6c04e5a304..70d9cea1219d 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.h
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.h
@@ -11,18 +11,18 @@
11 11
12 12
13/* processors */ 13/* processors */
14 14enum speedstep_processor {
15#define SPEEDSTEP_CPU_PIII_C_EARLY 0x00000001 /* Coppermine core */ 15 SPEEDSTEP_CPU_PIII_C_EARLY = 0x00000001, /* Coppermine core */
16#define SPEEDSTEP_CPU_PIII_C 0x00000002 /* Coppermine core */ 16 SPEEDSTEP_CPU_PIII_C = 0x00000002, /* Coppermine core */
17#define SPEEDSTEP_CPU_PIII_T 0x00000003 /* Tualatin core */ 17 SPEEDSTEP_CPU_PIII_T = 0x00000003, /* Tualatin core */
18#define SPEEDSTEP_CPU_P4M 0x00000004 /* P4-M */ 18 SPEEDSTEP_CPU_P4M = 0x00000004, /* P4-M */
19
20/* the following processors are not speedstep-capable and are not auto-detected 19/* the following processors are not speedstep-capable and are not auto-detected
21 * in speedstep_detect_processor(). However, their speed can be detected using 20 * in speedstep_detect_processor(). However, their speed can be detected using
22 * the speedstep_get_frequency() call. */ 21 * the speedstep_get_frequency() call. */
23#define SPEEDSTEP_CPU_PM 0xFFFFFF03 /* Pentium M */ 22 SPEEDSTEP_CPU_PM = 0xFFFFFF03, /* Pentium M */
24#define SPEEDSTEP_CPU_P4D 0xFFFFFF04 /* desktop P4 */ 23 SPEEDSTEP_CPU_P4D = 0xFFFFFF04, /* desktop P4 */
25#define SPEEDSTEP_CPU_PCORE 0xFFFFFF05 /* Core */ 24 SPEEDSTEP_CPU_PCORE = 0xFFFFFF05, /* Core */
25};
26 26
27/* speedstep states -- only two of them */ 27/* speedstep states -- only two of them */
28 28
@@ -31,10 +31,10 @@
31 31
32 32
33/* detect a speedstep-capable processor */ 33/* detect a speedstep-capable processor */
34extern unsigned int speedstep_detect_processor (void); 34extern enum speedstep_processor speedstep_detect_processor(void);
35 35
36/* detect the current speed (in khz) of the processor */ 36/* detect the current speed (in khz) of the processor */
37extern unsigned int speedstep_get_frequency(unsigned int processor); 37extern unsigned int speedstep_get_frequency(enum speedstep_processor processor);
38 38
39 39
40/* detect the low and high speeds of the processor. The callback 40/* detect the low and high speeds of the processor. The callback
@@ -42,7 +42,7 @@ extern unsigned int speedstep_get_frequency(unsigned int processor);
42 * SPEEDSTEP_LOW; the second argument is zero so that no 42 * SPEEDSTEP_LOW; the second argument is zero so that no
43 * cpufreq_notify_transition calls are initiated. 43 * cpufreq_notify_transition calls are initiated.
44 */ 44 */
45extern unsigned int speedstep_get_freqs(unsigned int processor, 45extern unsigned int speedstep_get_freqs(enum speedstep_processor processor,
46 unsigned int *low_speed, 46 unsigned int *low_speed,
47 unsigned int *high_speed, 47 unsigned int *high_speed,
48 unsigned int *transition_latency, 48 unsigned int *transition_latency,
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
index befea088e4f5..04d73c114e49 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
@@ -35,7 +35,7 @@ static int smi_cmd;
35static unsigned int smi_sig; 35static unsigned int smi_sig;
36 36
37/* info about the processor */ 37/* info about the processor */
38static unsigned int speedstep_processor; 38static enum speedstep_processor speedstep_processor;
39 39
40/* 40/*
41 * There are only two frequency states for each processor. Values 41 * There are only two frequency states for each processor. Values
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index c900b73f9224..9c31e8b09d2c 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -270,8 +270,6 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
270 node = cpu_to_node(cpu); 270 node = cpu_to_node(cpu);
271 } 271 }
272 numa_set_node(cpu, node); 272 numa_set_node(cpu, node);
273
274 printk(KERN_INFO "CPU %d/0x%x -> Node %d\n", cpu, apicid, node);
275#endif 273#endif
276} 274}
277 275
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 6c40f6b5b340..fc6c8ef92dcc 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -499,26 +499,27 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c)
499#ifdef CONFIG_SYSFS 499#ifdef CONFIG_SYSFS
500 500
501/* pointer to _cpuid4_info array (for each cache leaf) */ 501/* pointer to _cpuid4_info array (for each cache leaf) */
502static DEFINE_PER_CPU(struct _cpuid4_info *, cpuid4_info); 502static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info);
503#define CPUID4_INFO_IDX(x, y) (&((per_cpu(cpuid4_info, x))[y])) 503#define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y]))
504 504
505#ifdef CONFIG_SMP 505#ifdef CONFIG_SMP
506static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) 506static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
507{ 507{
508 struct _cpuid4_info *this_leaf, *sibling_leaf; 508 struct _cpuid4_info *this_leaf, *sibling_leaf;
509 unsigned long num_threads_sharing; 509 unsigned long num_threads_sharing;
510 int index_msb, i; 510 int index_msb, i, sibling;
511 struct cpuinfo_x86 *c = &cpu_data(cpu); 511 struct cpuinfo_x86 *c = &cpu_data(cpu);
512 512
513 if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) { 513 if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) {
514 struct cpuinfo_x86 *d; 514 for_each_cpu(i, c->llc_shared_map) {
515 for_each_online_cpu(i) { 515 if (!per_cpu(ici_cpuid4_info, i))
516 if (!per_cpu(cpuid4_info, i))
517 continue; 516 continue;
518 d = &cpu_data(i);
519 this_leaf = CPUID4_INFO_IDX(i, index); 517 this_leaf = CPUID4_INFO_IDX(i, index);
520 cpumask_copy(to_cpumask(this_leaf->shared_cpu_map), 518 for_each_cpu(sibling, c->llc_shared_map) {
521 d->llc_shared_map); 519 if (!cpu_online(sibling))
520 continue;
521 set_bit(sibling, this_leaf->shared_cpu_map);
522 }
522 } 523 }
523 return; 524 return;
524 } 525 }
@@ -535,7 +536,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
535 c->apicid >> index_msb) { 536 c->apicid >> index_msb) {
536 cpumask_set_cpu(i, 537 cpumask_set_cpu(i,
537 to_cpumask(this_leaf->shared_cpu_map)); 538 to_cpumask(this_leaf->shared_cpu_map));
538 if (i != cpu && per_cpu(cpuid4_info, i)) { 539 if (i != cpu && per_cpu(ici_cpuid4_info, i)) {
539 sibling_leaf = 540 sibling_leaf =
540 CPUID4_INFO_IDX(i, index); 541 CPUID4_INFO_IDX(i, index);
541 cpumask_set_cpu(cpu, to_cpumask( 542 cpumask_set_cpu(cpu, to_cpumask(
@@ -574,8 +575,8 @@ static void __cpuinit free_cache_attributes(unsigned int cpu)
574 for (i = 0; i < num_cache_leaves; i++) 575 for (i = 0; i < num_cache_leaves; i++)
575 cache_remove_shared_cpu_map(cpu, i); 576 cache_remove_shared_cpu_map(cpu, i);
576 577
577 kfree(per_cpu(cpuid4_info, cpu)); 578 kfree(per_cpu(ici_cpuid4_info, cpu));
578 per_cpu(cpuid4_info, cpu) = NULL; 579 per_cpu(ici_cpuid4_info, cpu) = NULL;
579} 580}
580 581
581static int 582static int
@@ -614,15 +615,15 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
614 if (num_cache_leaves == 0) 615 if (num_cache_leaves == 0)
615 return -ENOENT; 616 return -ENOENT;
616 617
617 per_cpu(cpuid4_info, cpu) = kzalloc( 618 per_cpu(ici_cpuid4_info, cpu) = kzalloc(
618 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL); 619 sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
619 if (per_cpu(cpuid4_info, cpu) == NULL) 620 if (per_cpu(ici_cpuid4_info, cpu) == NULL)
620 return -ENOMEM; 621 return -ENOMEM;
621 622
622 smp_call_function_single(cpu, get_cpu_leaves, &retval, true); 623 smp_call_function_single(cpu, get_cpu_leaves, &retval, true);
623 if (retval) { 624 if (retval) {
624 kfree(per_cpu(cpuid4_info, cpu)); 625 kfree(per_cpu(ici_cpuid4_info, cpu));
625 per_cpu(cpuid4_info, cpu) = NULL; 626 per_cpu(ici_cpuid4_info, cpu) = NULL;
626 } 627 }
627 628
628 return retval; 629 return retval;
@@ -634,7 +635,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
634extern struct sysdev_class cpu_sysdev_class; /* from drivers/base/cpu.c */ 635extern struct sysdev_class cpu_sysdev_class; /* from drivers/base/cpu.c */
635 636
636/* pointer to kobject for cpuX/cache */ 637/* pointer to kobject for cpuX/cache */
637static DEFINE_PER_CPU(struct kobject *, cache_kobject); 638static DEFINE_PER_CPU(struct kobject *, ici_cache_kobject);
638 639
639struct _index_kobject { 640struct _index_kobject {
640 struct kobject kobj; 641 struct kobject kobj;
@@ -643,8 +644,8 @@ struct _index_kobject {
643}; 644};
644 645
645/* pointer to array of kobjects for cpuX/cache/indexY */ 646/* pointer to array of kobjects for cpuX/cache/indexY */
646static DEFINE_PER_CPU(struct _index_kobject *, index_kobject); 647static DEFINE_PER_CPU(struct _index_kobject *, ici_index_kobject);
647#define INDEX_KOBJECT_PTR(x, y) (&((per_cpu(index_kobject, x))[y])) 648#define INDEX_KOBJECT_PTR(x, y) (&((per_cpu(ici_index_kobject, x))[y]))
648 649
649#define show_one_plus(file_name, object, val) \ 650#define show_one_plus(file_name, object, val) \
650static ssize_t show_##file_name \ 651static ssize_t show_##file_name \
@@ -863,10 +864,10 @@ static struct kobj_type ktype_percpu_entry = {
863 864
864static void __cpuinit cpuid4_cache_sysfs_exit(unsigned int cpu) 865static void __cpuinit cpuid4_cache_sysfs_exit(unsigned int cpu)
865{ 866{
866 kfree(per_cpu(cache_kobject, cpu)); 867 kfree(per_cpu(ici_cache_kobject, cpu));
867 kfree(per_cpu(index_kobject, cpu)); 868 kfree(per_cpu(ici_index_kobject, cpu));
868 per_cpu(cache_kobject, cpu) = NULL; 869 per_cpu(ici_cache_kobject, cpu) = NULL;
869 per_cpu(index_kobject, cpu) = NULL; 870 per_cpu(ici_index_kobject, cpu) = NULL;
870 free_cache_attributes(cpu); 871 free_cache_attributes(cpu);
871} 872}
872 873
@@ -882,14 +883,14 @@ static int __cpuinit cpuid4_cache_sysfs_init(unsigned int cpu)
882 return err; 883 return err;
883 884
884 /* Allocate all required memory */ 885 /* Allocate all required memory */
885 per_cpu(cache_kobject, cpu) = 886 per_cpu(ici_cache_kobject, cpu) =
886 kzalloc(sizeof(struct kobject), GFP_KERNEL); 887 kzalloc(sizeof(struct kobject), GFP_KERNEL);
887 if (unlikely(per_cpu(cache_kobject, cpu) == NULL)) 888 if (unlikely(per_cpu(ici_cache_kobject, cpu) == NULL))
888 goto err_out; 889 goto err_out;
889 890
890 per_cpu(index_kobject, cpu) = kzalloc( 891 per_cpu(ici_index_kobject, cpu) = kzalloc(
891 sizeof(struct _index_kobject) * num_cache_leaves, GFP_KERNEL); 892 sizeof(struct _index_kobject) * num_cache_leaves, GFP_KERNEL);
892 if (unlikely(per_cpu(index_kobject, cpu) == NULL)) 893 if (unlikely(per_cpu(ici_index_kobject, cpu) == NULL))
893 goto err_out; 894 goto err_out;
894 895
895 return 0; 896 return 0;
@@ -913,7 +914,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
913 if (unlikely(retval < 0)) 914 if (unlikely(retval < 0))
914 return retval; 915 return retval;
915 916
916 retval = kobject_init_and_add(per_cpu(cache_kobject, cpu), 917 retval = kobject_init_and_add(per_cpu(ici_cache_kobject, cpu),
917 &ktype_percpu_entry, 918 &ktype_percpu_entry,
918 &sys_dev->kobj, "%s", "cache"); 919 &sys_dev->kobj, "%s", "cache");
919 if (retval < 0) { 920 if (retval < 0) {
@@ -927,12 +928,12 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
927 this_object->index = i; 928 this_object->index = i;
928 retval = kobject_init_and_add(&(this_object->kobj), 929 retval = kobject_init_and_add(&(this_object->kobj),
929 &ktype_cache, 930 &ktype_cache,
930 per_cpu(cache_kobject, cpu), 931 per_cpu(ici_cache_kobject, cpu),
931 "index%1lu", i); 932 "index%1lu", i);
932 if (unlikely(retval)) { 933 if (unlikely(retval)) {
933 for (j = 0; j < i; j++) 934 for (j = 0; j < i; j++)
934 kobject_put(&(INDEX_KOBJECT_PTR(cpu, j)->kobj)); 935 kobject_put(&(INDEX_KOBJECT_PTR(cpu, j)->kobj));
935 kobject_put(per_cpu(cache_kobject, cpu)); 936 kobject_put(per_cpu(ici_cache_kobject, cpu));
936 cpuid4_cache_sysfs_exit(cpu); 937 cpuid4_cache_sysfs_exit(cpu);
937 return retval; 938 return retval;
938 } 939 }
@@ -940,7 +941,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
940 } 941 }
941 cpumask_set_cpu(cpu, to_cpumask(cache_dev_map)); 942 cpumask_set_cpu(cpu, to_cpumask(cache_dev_map));
942 943
943 kobject_uevent(per_cpu(cache_kobject, cpu), KOBJ_ADD); 944 kobject_uevent(per_cpu(ici_cache_kobject, cpu), KOBJ_ADD);
944 return 0; 945 return 0;
945} 946}
946 947
@@ -949,7 +950,7 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
949 unsigned int cpu = sys_dev->id; 950 unsigned int cpu = sys_dev->id;
950 unsigned long i; 951 unsigned long i;
951 952
952 if (per_cpu(cpuid4_info, cpu) == NULL) 953 if (per_cpu(ici_cpuid4_info, cpu) == NULL)
953 return; 954 return;
954 if (!cpumask_test_cpu(cpu, to_cpumask(cache_dev_map))) 955 if (!cpumask_test_cpu(cpu, to_cpumask(cache_dev_map)))
955 return; 956 return;
@@ -957,7 +958,7 @@ static void __cpuinit cache_remove_dev(struct sys_device * sys_dev)
957 958
958 for (i = 0; i < num_cache_leaves; i++) 959 for (i = 0; i < num_cache_leaves; i++)
959 kobject_put(&(INDEX_KOBJECT_PTR(cpu, i)->kobj)); 960 kobject_put(&(INDEX_KOBJECT_PTR(cpu, i)->kobj));
960 kobject_put(per_cpu(cache_kobject, cpu)); 961 kobject_put(per_cpu(ici_cache_kobject, cpu));
961 cpuid4_cache_sysfs_exit(cpu); 962 cpuid4_cache_sysfs_exit(cpu);
962} 963}
963 964
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 472763d92098..73734baa50f2 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -74,7 +74,7 @@ static void raise_exception(struct mce *m, struct pt_regs *pregs)
74 m->finished = 0; 74 m->finished = 0;
75} 75}
76 76
77static cpumask_t mce_inject_cpumask; 77static cpumask_var_t mce_inject_cpumask;
78 78
79static int mce_raise_notify(struct notifier_block *self, 79static int mce_raise_notify(struct notifier_block *self,
80 unsigned long val, void *data) 80 unsigned long val, void *data)
@@ -82,9 +82,9 @@ static int mce_raise_notify(struct notifier_block *self,
82 struct die_args *args = (struct die_args *)data; 82 struct die_args *args = (struct die_args *)data;
83 int cpu = smp_processor_id(); 83 int cpu = smp_processor_id();
84 struct mce *m = &__get_cpu_var(injectm); 84 struct mce *m = &__get_cpu_var(injectm);
85 if (val != DIE_NMI_IPI || !cpu_isset(cpu, mce_inject_cpumask)) 85 if (val != DIE_NMI_IPI || !cpumask_test_cpu(cpu, mce_inject_cpumask))
86 return NOTIFY_DONE; 86 return NOTIFY_DONE;
87 cpu_clear(cpu, mce_inject_cpumask); 87 cpumask_clear_cpu(cpu, mce_inject_cpumask);
88 if (m->inject_flags & MCJ_EXCEPTION) 88 if (m->inject_flags & MCJ_EXCEPTION)
89 raise_exception(m, args->regs); 89 raise_exception(m, args->regs);
90 else if (m->status) 90 else if (m->status)
@@ -148,22 +148,22 @@ static void raise_mce(struct mce *m)
148 unsigned long start; 148 unsigned long start;
149 int cpu; 149 int cpu;
150 get_online_cpus(); 150 get_online_cpus();
151 mce_inject_cpumask = cpu_online_map; 151 cpumask_copy(mce_inject_cpumask, cpu_online_mask);
152 cpu_clear(get_cpu(), mce_inject_cpumask); 152 cpumask_clear_cpu(get_cpu(), mce_inject_cpumask);
153 for_each_online_cpu(cpu) { 153 for_each_online_cpu(cpu) {
154 struct mce *mcpu = &per_cpu(injectm, cpu); 154 struct mce *mcpu = &per_cpu(injectm, cpu);
155 if (!mcpu->finished || 155 if (!mcpu->finished ||
156 MCJ_CTX(mcpu->inject_flags) != MCJ_CTX_RANDOM) 156 MCJ_CTX(mcpu->inject_flags) != MCJ_CTX_RANDOM)
157 cpu_clear(cpu, mce_inject_cpumask); 157 cpumask_clear_cpu(cpu, mce_inject_cpumask);
158 } 158 }
159 if (!cpus_empty(mce_inject_cpumask)) 159 if (!cpumask_empty(mce_inject_cpumask))
160 apic->send_IPI_mask(&mce_inject_cpumask, NMI_VECTOR); 160 apic->send_IPI_mask(mce_inject_cpumask, NMI_VECTOR);
161 start = jiffies; 161 start = jiffies;
162 while (!cpus_empty(mce_inject_cpumask)) { 162 while (!cpumask_empty(mce_inject_cpumask)) {
163 if (!time_before(jiffies, start + 2*HZ)) { 163 if (!time_before(jiffies, start + 2*HZ)) {
164 printk(KERN_ERR 164 printk(KERN_ERR
165 "Timeout waiting for mce inject NMI %lx\n", 165 "Timeout waiting for mce inject NMI %lx\n",
166 *cpus_addr(mce_inject_cpumask)); 166 *cpumask_bits(mce_inject_cpumask));
167 break; 167 break;
168 } 168 }
169 cpu_relax(); 169 cpu_relax();
@@ -210,6 +210,8 @@ static ssize_t mce_write(struct file *filp, const char __user *ubuf,
210 210
211static int inject_init(void) 211static int inject_init(void)
212{ 212{
213 if (!alloc_cpumask_var(&mce_inject_cpumask, GFP_KERNEL))
214 return -ENOMEM;
213 printk(KERN_INFO "Machine check injector initialized\n"); 215 printk(KERN_INFO "Machine check injector initialized\n");
214 mce_chrdev_ops.write = mce_write; 216 mce_chrdev_ops.write = mce_write;
215 register_die_notifier(&mce_raise_nb); 217 register_die_notifier(&mce_raise_nb);
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index d7ebf25d10ed..a8aacd4b513c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1388,13 +1388,14 @@ static void __mcheck_cpu_init_timer(void)
1388 struct timer_list *t = &__get_cpu_var(mce_timer); 1388 struct timer_list *t = &__get_cpu_var(mce_timer);
1389 int *n = &__get_cpu_var(mce_next_interval); 1389 int *n = &__get_cpu_var(mce_next_interval);
1390 1390
1391 setup_timer(t, mce_start_timer, smp_processor_id());
1392
1391 if (mce_ignore_ce) 1393 if (mce_ignore_ce)
1392 return; 1394 return;
1393 1395
1394 *n = check_interval * HZ; 1396 *n = check_interval * HZ;
1395 if (!*n) 1397 if (!*n)
1396 return; 1398 return;
1397 setup_timer(t, mce_start_timer, smp_processor_id());
1398 t->expires = round_jiffies(jiffies + *n); 1399 t->expires = round_jiffies(jiffies + *n);
1399 add_timer_on(t, smp_processor_id()); 1400 add_timer_on(t, smp_processor_id());
1400} 1401}
@@ -1928,7 +1929,7 @@ error2:
1928 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[j].attr); 1929 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[j].attr);
1929error: 1930error:
1930 while (--i >= 0) 1931 while (--i >= 0)
1931 sysdev_remove_file(&per_cpu(mce_dev, cpu), &mce_banks[i].attr); 1932 sysdev_remove_file(&per_cpu(mce_dev, cpu), mce_attrs[i]);
1932 1933
1933 sysdev_unregister(&per_cpu(mce_dev, cpu)); 1934 sysdev_unregister(&per_cpu(mce_dev, cpu));
1934 1935
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 4fef985fc221..81c499eceb21 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -256,6 +256,16 @@ asmlinkage void smp_thermal_interrupt(struct pt_regs *regs)
256 ack_APIC_irq(); 256 ack_APIC_irq();
257} 257}
258 258
259/* Thermal monitoring depends on APIC, ACPI and clock modulation */
260static int intel_thermal_supported(struct cpuinfo_x86 *c)
261{
262 if (!cpu_has_apic)
263 return 0;
264 if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC))
265 return 0;
266 return 1;
267}
268
259void __init mcheck_intel_therm_init(void) 269void __init mcheck_intel_therm_init(void)
260{ 270{
261 /* 271 /*
@@ -263,8 +273,7 @@ void __init mcheck_intel_therm_init(void)
263 * LVT value on BSP and use that value to restore APs' thermal LVT 273 * LVT value on BSP and use that value to restore APs' thermal LVT
264 * entry BIOS programmed later 274 * entry BIOS programmed later
265 */ 275 */
266 if (cpu_has(&boot_cpu_data, X86_FEATURE_ACPI) && 276 if (intel_thermal_supported(&boot_cpu_data))
267 cpu_has(&boot_cpu_data, X86_FEATURE_ACC))
268 lvtthmr_init = apic_read(APIC_LVTTHMR); 277 lvtthmr_init = apic_read(APIC_LVTTHMR);
269} 278}
270 279
@@ -274,8 +283,7 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
274 int tm2 = 0; 283 int tm2 = 0;
275 u32 l, h; 284 u32 l, h;
276 285
277 /* Thermal monitoring depends on ACPI and clock modulation*/ 286 if (!intel_thermal_supported(c))
278 if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC))
279 return; 287 return;
280 288
281 /* 289 /*
@@ -339,8 +347,8 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
339 l = apic_read(APIC_LVTTHMR); 347 l = apic_read(APIC_LVTTHMR);
340 apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); 348 apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
341 349
342 printk(KERN_INFO "CPU%d: Thermal monitoring enabled (%s)\n", 350 printk_once(KERN_INFO "CPU0: Thermal monitoring enabled (%s)\n",
343 cpu, tm2 ? "TM2" : "TM1"); 351 tm2 ? "TM2" : "TM1");
344 352
345 /* enable thermal throttle processing */ 353 /* enable thermal throttle processing */
346 atomic_set(&therm_throt_en, 1); 354 atomic_set(&therm_throt_en, 1);
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index 3c1b12d461d1..e006e56f699c 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -4,6 +4,7 @@
4#include <linux/proc_fs.h> 4#include <linux/proc_fs.h>
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/ctype.h> 6#include <linux/ctype.h>
7#include <linux/string.h>
7#include <linux/init.h> 8#include <linux/init.h>
8 9
9#define LINE_SIZE 80 10#define LINE_SIZE 80
@@ -133,8 +134,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
133 return -EINVAL; 134 return -EINVAL;
134 135
135 base = simple_strtoull(line + 5, &ptr, 0); 136 base = simple_strtoull(line + 5, &ptr, 0);
136 while (isspace(*ptr)) 137 ptr = skip_spaces(ptr);
137 ptr++;
138 138
139 if (strncmp(ptr, "size=", 5)) 139 if (strncmp(ptr, "size=", 5))
140 return -EINVAL; 140 return -EINVAL;
@@ -142,14 +142,11 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
142 size = simple_strtoull(ptr + 5, &ptr, 0); 142 size = simple_strtoull(ptr + 5, &ptr, 0);
143 if ((base & 0xfff) || (size & 0xfff)) 143 if ((base & 0xfff) || (size & 0xfff))
144 return -EINVAL; 144 return -EINVAL;
145 while (isspace(*ptr)) 145 ptr = skip_spaces(ptr);
146 ptr++;
147 146
148 if (strncmp(ptr, "type=", 5)) 147 if (strncmp(ptr, "type=", 5))
149 return -EINVAL; 148 return -EINVAL;
150 ptr += 5; 149 ptr = skip_spaces(ptr + 5);
151 while (isspace(*ptr))
152 ptr++;
153 150
154 for (i = 0; i < MTRR_NUM_TYPES; ++i) { 151 for (i = 0; i < MTRR_NUM_TYPES; ++i) {
155 if (strcmp(ptr, mtrr_strings[i])) 152 if (strcmp(ptr, mtrr_strings[i]))
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index c1bbed1021d9..45506d5dd8df 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1286,7 +1286,7 @@ x86_perf_event_set_period(struct perf_event *event,
1286 return 0; 1286 return 0;
1287 1287
1288 /* 1288 /*
1289 * If we are way outside a reasoable range then just skip forward: 1289 * If we are way outside a reasonable range then just skip forward:
1290 */ 1290 */
1291 if (unlikely(left <= -period)) { 1291 if (unlikely(left <= -period)) {
1292 left = period; 1292 left = period;
@@ -1632,6 +1632,7 @@ static void intel_pmu_drain_bts_buffer(struct cpu_hw_events *cpuc)
1632 1632
1633 data.period = event->hw.last_period; 1633 data.period = event->hw.last_period;
1634 data.addr = 0; 1634 data.addr = 0;
1635 data.raw = NULL;
1635 regs.ip = 0; 1636 regs.ip = 0;
1636 1637
1637 /* 1638 /*
@@ -1749,6 +1750,7 @@ static int p6_pmu_handle_irq(struct pt_regs *regs)
1749 u64 val; 1750 u64 val;
1750 1751
1751 data.addr = 0; 1752 data.addr = 0;
1753 data.raw = NULL;
1752 1754
1753 cpuc = &__get_cpu_var(cpu_hw_events); 1755 cpuc = &__get_cpu_var(cpu_hw_events);
1754 1756
@@ -1794,6 +1796,7 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)
1794 u64 ack, status; 1796 u64 ack, status;
1795 1797
1796 data.addr = 0; 1798 data.addr = 0;
1799 data.raw = NULL;
1797 1800
1798 cpuc = &__get_cpu_var(cpu_hw_events); 1801 cpuc = &__get_cpu_var(cpu_hw_events);
1799 1802
@@ -1857,6 +1860,7 @@ static int amd_pmu_handle_irq(struct pt_regs *regs)
1857 u64 val; 1860 u64 val;
1858 1861
1859 data.addr = 0; 1862 data.addr = 0;
1863 data.raw = NULL;
1860 1864
1861 cpuc = &__get_cpu_var(cpu_hw_events); 1865 cpuc = &__get_cpu_var(cpu_hw_events);
1862 1866
@@ -2062,12 +2066,6 @@ static __init int p6_pmu_init(void)
2062 2066
2063 x86_pmu = p6_pmu; 2067 x86_pmu = p6_pmu;
2064 2068
2065 if (!cpu_has_apic) {
2066 pr_info("no APIC, boot with the \"lapic\" boot parameter to force-enable it.\n");
2067 pr_info("no hardware sampling interrupt available.\n");
2068 x86_pmu.apic = 0;
2069 }
2070
2071 return 0; 2069 return 0;
2072} 2070}
2073 2071
@@ -2159,6 +2157,16 @@ static __init int amd_pmu_init(void)
2159 return 0; 2157 return 0;
2160} 2158}
2161 2159
2160static void __init pmu_check_apic(void)
2161{
2162 if (cpu_has_apic)
2163 return;
2164
2165 x86_pmu.apic = 0;
2166 pr_info("no APIC, boot with the \"lapic\" boot parameter to force-enable it.\n");
2167 pr_info("no hardware sampling interrupt available.\n");
2168}
2169
2162void __init init_hw_perf_events(void) 2170void __init init_hw_perf_events(void)
2163{ 2171{
2164 int err; 2172 int err;
@@ -2180,6 +2188,8 @@ void __init init_hw_perf_events(void)
2180 return; 2188 return;
2181 } 2189 }
2182 2190
2191 pmu_check_apic();
2192
2183 pr_cont("%s PMU driver.\n", x86_pmu.name); 2193 pr_cont("%s PMU driver.\n", x86_pmu.name);
2184 2194
2185 if (x86_pmu.num_events > X86_PMC_MAX_GENERIC) { 2195 if (x86_pmu.num_events > X86_PMC_MAX_GENERIC) {
@@ -2287,7 +2297,7 @@ void callchain_store(struct perf_callchain_entry *entry, u64 ip)
2287 2297
2288static DEFINE_PER_CPU(struct perf_callchain_entry, pmc_irq_entry); 2298static DEFINE_PER_CPU(struct perf_callchain_entry, pmc_irq_entry);
2289static DEFINE_PER_CPU(struct perf_callchain_entry, pmc_nmi_entry); 2299static DEFINE_PER_CPU(struct perf_callchain_entry, pmc_nmi_entry);
2290static DEFINE_PER_CPU(int, in_nmi_frame); 2300static DEFINE_PER_CPU(int, in_ignored_frame);
2291 2301
2292 2302
2293static void 2303static void
@@ -2303,8 +2313,9 @@ static void backtrace_warning(void *data, char *msg)
2303 2313
2304static int backtrace_stack(void *data, char *name) 2314static int backtrace_stack(void *data, char *name)
2305{ 2315{
2306 per_cpu(in_nmi_frame, smp_processor_id()) = 2316 per_cpu(in_ignored_frame, smp_processor_id()) =
2307 x86_is_stack_id(NMI_STACK, name); 2317 x86_is_stack_id(NMI_STACK, name) ||
2318 x86_is_stack_id(DEBUG_STACK, name);
2308 2319
2309 return 0; 2320 return 0;
2310} 2321}
@@ -2313,7 +2324,7 @@ static void backtrace_address(void *data, unsigned long addr, int reliable)
2313{ 2324{
2314 struct perf_callchain_entry *entry = data; 2325 struct perf_callchain_entry *entry = data;
2315 2326
2316 if (per_cpu(in_nmi_frame, smp_processor_id())) 2327 if (per_cpu(in_ignored_frame, smp_processor_id()))
2317 return; 2328 return;
2318 2329
2319 if (reliable) 2330 if (reliable)
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index ef42a038f1a6..1c47390dd0e5 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -265,13 +265,13 @@ struct ds_context {
265 int cpu; 265 int cpu;
266}; 266};
267 267
268static DEFINE_PER_CPU(struct ds_context *, cpu_context); 268static DEFINE_PER_CPU(struct ds_context *, cpu_ds_context);
269 269
270 270
271static struct ds_context *ds_get_context(struct task_struct *task, int cpu) 271static struct ds_context *ds_get_context(struct task_struct *task, int cpu)
272{ 272{
273 struct ds_context **p_context = 273 struct ds_context **p_context =
274 (task ? &task->thread.ds_ctx : &per_cpu(cpu_context, cpu)); 274 (task ? &task->thread.ds_ctx : &per_cpu(cpu_ds_context, cpu));
275 struct ds_context *context = NULL; 275 struct ds_context *context = NULL;
276 struct ds_context *new_context = NULL; 276 struct ds_context *new_context = NULL;
277 277
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index b8ce165dde5d..0a0aa1cec8f1 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -188,7 +188,7 @@ void dump_stack(void)
188} 188}
189EXPORT_SYMBOL(dump_stack); 189EXPORT_SYMBOL(dump_stack);
190 190
191static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED; 191static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED;
192static int die_owner = -1; 192static int die_owner = -1;
193static unsigned int die_nest_count; 193static unsigned int die_nest_count;
194 194
@@ -207,11 +207,11 @@ unsigned __kprobes long oops_begin(void)
207 /* racy, but better than risking deadlock. */ 207 /* racy, but better than risking deadlock. */
208 raw_local_irq_save(flags); 208 raw_local_irq_save(flags);
209 cpu = smp_processor_id(); 209 cpu = smp_processor_id();
210 if (!__raw_spin_trylock(&die_lock)) { 210 if (!arch_spin_trylock(&die_lock)) {
211 if (cpu == die_owner) 211 if (cpu == die_owner)
212 /* nested oops. should stop eventually */; 212 /* nested oops. should stop eventually */;
213 else 213 else
214 __raw_spin_lock(&die_lock); 214 arch_spin_lock(&die_lock);
215 } 215 }
216 die_nest_count++; 216 die_nest_count++;
217 die_owner = cpu; 217 die_owner = cpu;
@@ -231,7 +231,7 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
231 die_nest_count--; 231 die_nest_count--;
232 if (!die_nest_count) 232 if (!die_nest_count)
233 /* Nest count reaches zero, release the lock. */ 233 /* Nest count reaches zero, release the lock. */
234 __raw_spin_unlock(&die_lock); 234 arch_spin_unlock(&die_lock);
235 raw_local_irq_restore(flags); 235 raw_local_irq_restore(flags);
236 oops_exit(); 236 oops_exit();
237 237
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 8e740934bd1f..b13af53883aa 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -103,6 +103,35 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
103 return NULL; 103 return NULL;
104} 104}
105 105
106static inline int
107in_irq_stack(unsigned long *stack, unsigned long *irq_stack,
108 unsigned long *irq_stack_end)
109{
110 return (stack >= irq_stack && stack < irq_stack_end);
111}
112
113/*
114 * We are returning from the irq stack and go to the previous one.
115 * If the previous stack is also in the irq stack, then bp in the first
116 * frame of the irq stack points to the previous, interrupted one.
117 * Otherwise we have another level of indirection: We first save
118 * the bp of the previous stack, then we switch the stack to the irq one
119 * and save a new bp that links to the previous one.
120 * (See save_args())
121 */
122static inline unsigned long
123fixup_bp_irq_link(unsigned long bp, unsigned long *stack,
124 unsigned long *irq_stack, unsigned long *irq_stack_end)
125{
126#ifdef CONFIG_FRAME_POINTER
127 struct stack_frame *frame = (struct stack_frame *)bp;
128
129 if (!in_irq_stack(stack, irq_stack, irq_stack_end))
130 return (unsigned long)frame->next_frame;
131#endif
132 return bp;
133}
134
106/* 135/*
107 * x86-64 can have up to three kernel stacks: 136 * x86-64 can have up to three kernel stacks:
108 * process stack 137 * process stack
@@ -175,7 +204,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
175 irq_stack = irq_stack_end - 204 irq_stack = irq_stack_end -
176 (IRQ_STACK_SIZE - 64) / sizeof(*irq_stack); 205 (IRQ_STACK_SIZE - 64) / sizeof(*irq_stack);
177 206
178 if (stack >= irq_stack && stack < irq_stack_end) { 207 if (in_irq_stack(stack, irq_stack, irq_stack_end)) {
179 if (ops->stack(data, "IRQ") < 0) 208 if (ops->stack(data, "IRQ") < 0)
180 break; 209 break;
181 bp = print_context_stack(tinfo, stack, bp, 210 bp = print_context_stack(tinfo, stack, bp,
@@ -186,6 +215,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
186 * pointer (index -1 to end) in the IRQ stack: 215 * pointer (index -1 to end) in the IRQ stack:
187 */ 216 */
188 stack = (unsigned long *) (irq_stack_end[-1]); 217 stack = (unsigned long *) (irq_stack_end[-1]);
218 bp = fixup_bp_irq_link(bp, stack, irq_stack,
219 irq_stack_end);
189 irq_stack_end = NULL; 220 irq_stack_end = NULL;
190 ops->stack(data, "EOI"); 221 ops->stack(data, "EOI");
191 continue; 222 continue;
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index d17d482a04f4..f50447d961c0 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -732,7 +732,16 @@ struct early_res {
732 char overlap_ok; 732 char overlap_ok;
733}; 733};
734static struct early_res early_res[MAX_EARLY_RES] __initdata = { 734static struct early_res early_res[MAX_EARLY_RES] __initdata = {
735 { 0, PAGE_SIZE, "BIOS data page" }, /* BIOS data page */ 735 { 0, PAGE_SIZE, "BIOS data page", 1 }, /* BIOS data page */
736#ifdef CONFIG_X86_32
737 /*
738 * But first pinch a few for the stack/trampoline stuff
739 * FIXME: Don't need the extra page at 4K, but need to fix
740 * trampoline before removing it. (see the GDT stuff)
741 */
742 { PAGE_SIZE, PAGE_SIZE, "EX TRAMPOLINE", 1 },
743#endif
744
736 {} 745 {}
737}; 746};
738 747
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 50b9c220e121..44a8e0dc6737 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -725,22 +725,61 @@ END(syscall_badsys)
725/* 725/*
726 * System calls that need a pt_regs pointer. 726 * System calls that need a pt_regs pointer.
727 */ 727 */
728#define PTREGSCALL(name) \ 728#define PTREGSCALL0(name) \
729 ALIGN; \ 729 ALIGN; \
730ptregs_##name: \ 730ptregs_##name: \
731 leal 4(%esp),%eax; \ 731 leal 4(%esp),%eax; \
732 jmp sys_##name; 732 jmp sys_##name;
733 733
734PTREGSCALL(iopl) 734#define PTREGSCALL1(name) \
735PTREGSCALL(fork) 735 ALIGN; \
736PTREGSCALL(clone) 736ptregs_##name: \
737PTREGSCALL(vfork) 737 leal 4(%esp),%edx; \
738PTREGSCALL(execve) 738 movl (PT_EBX+4)(%esp),%eax; \
739PTREGSCALL(sigaltstack) 739 jmp sys_##name;
740PTREGSCALL(sigreturn) 740
741PTREGSCALL(rt_sigreturn) 741#define PTREGSCALL2(name) \
742PTREGSCALL(vm86) 742 ALIGN; \
743PTREGSCALL(vm86old) 743ptregs_##name: \
744 leal 4(%esp),%ecx; \
745 movl (PT_ECX+4)(%esp),%edx; \
746 movl (PT_EBX+4)(%esp),%eax; \
747 jmp sys_##name;
748
749#define PTREGSCALL3(name) \
750 ALIGN; \
751ptregs_##name: \
752 leal 4(%esp),%eax; \
753 pushl %eax; \
754 movl PT_EDX(%eax),%ecx; \
755 movl PT_ECX(%eax),%edx; \
756 movl PT_EBX(%eax),%eax; \
757 call sys_##name; \
758 addl $4,%esp; \
759 ret
760
761PTREGSCALL1(iopl)
762PTREGSCALL0(fork)
763PTREGSCALL0(vfork)
764PTREGSCALL3(execve)
765PTREGSCALL2(sigaltstack)
766PTREGSCALL0(sigreturn)
767PTREGSCALL0(rt_sigreturn)
768PTREGSCALL2(vm86)
769PTREGSCALL1(vm86old)
770
771/* Clone is an oddball. The 4th arg is in %edi */
772 ALIGN;
773ptregs_clone:
774 leal 4(%esp),%eax
775 pushl %eax
776 pushl PT_EDI(%eax)
777 movl PT_EDX(%eax),%ecx
778 movl PT_ECX(%eax),%edx
779 movl PT_EBX(%eax),%eax
780 call sys_clone
781 addl $8,%esp
782 ret
744 783
745.macro FIXUP_ESPFIX_STACK 784.macro FIXUP_ESPFIX_STACK
746/* 785/*
@@ -1008,12 +1047,8 @@ END(spurious_interrupt_bug)
1008ENTRY(kernel_thread_helper) 1047ENTRY(kernel_thread_helper)
1009 pushl $0 # fake return address for unwinder 1048 pushl $0 # fake return address for unwinder
1010 CFI_STARTPROC 1049 CFI_STARTPROC
1011 movl %edx,%eax 1050 movl %edi,%eax
1012 push %edx 1051 call *%esi
1013 CFI_ADJUST_CFA_OFFSET 4
1014 call *%ebx
1015 push %eax
1016 CFI_ADJUST_CFA_OFFSET 4
1017 call do_exit 1052 call do_exit
1018 ud2 # padding for call trace 1053 ud2 # padding for call trace
1019 CFI_ENDPROC 1054 CFI_ENDPROC
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 63bca794c8f9..0697ff139837 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1076,10 +1076,10 @@ ENTRY(\sym)
1076 TRACE_IRQS_OFF 1076 TRACE_IRQS_OFF
1077 movq %rsp,%rdi /* pt_regs pointer */ 1077 movq %rsp,%rdi /* pt_regs pointer */
1078 xorl %esi,%esi /* no error code */ 1078 xorl %esi,%esi /* no error code */
1079 PER_CPU(init_tss, %rbp) 1079 PER_CPU(init_tss, %r12)
1080 subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp) 1080 subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
1081 call \do_sym 1081 call \do_sym
1082 addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%rbp) 1082 addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
1083 jmp paranoid_exit /* %ebx: no swapgs flag */ 1083 jmp paranoid_exit /* %ebx: no swapgs flag */
1084 CFI_ENDPROC 1084 CFI_ENDPROC
1085END(\sym) 1085END(\sym)
@@ -1166,63 +1166,20 @@ bad_gs:
1166 jmp 2b 1166 jmp 2b
1167 .previous 1167 .previous
1168 1168
1169/* 1169ENTRY(kernel_thread_helper)
1170 * Create a kernel thread.
1171 *
1172 * C extern interface:
1173 * extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
1174 *
1175 * asm input arguments:
1176 * rdi: fn, rsi: arg, rdx: flags
1177 */
1178ENTRY(kernel_thread)
1179 CFI_STARTPROC
1180 FAKE_STACK_FRAME $child_rip
1181 SAVE_ALL
1182
1183 # rdi: flags, rsi: usp, rdx: will be &pt_regs
1184 movq %rdx,%rdi
1185 orq kernel_thread_flags(%rip),%rdi
1186 movq $-1, %rsi
1187 movq %rsp, %rdx
1188
1189 xorl %r8d,%r8d
1190 xorl %r9d,%r9d
1191
1192 # clone now
1193 call do_fork
1194 movq %rax,RAX(%rsp)
1195 xorl %edi,%edi
1196
1197 /*
1198 * It isn't worth to check for reschedule here,
1199 * so internally to the x86_64 port you can rely on kernel_thread()
1200 * not to reschedule the child before returning, this avoids the need
1201 * of hacks for example to fork off the per-CPU idle tasks.
1202 * [Hopefully no generic code relies on the reschedule -AK]
1203 */
1204 RESTORE_ALL
1205 UNFAKE_STACK_FRAME
1206 ret
1207 CFI_ENDPROC
1208END(kernel_thread)
1209
1210ENTRY(child_rip)
1211 pushq $0 # fake return address 1170 pushq $0 # fake return address
1212 CFI_STARTPROC 1171 CFI_STARTPROC
1213 /* 1172 /*
1214 * Here we are in the child and the registers are set as they were 1173 * Here we are in the child and the registers are set as they were
1215 * at kernel_thread() invocation in the parent. 1174 * at kernel_thread() invocation in the parent.
1216 */ 1175 */
1217 movq %rdi, %rax 1176 call *%rsi
1218 movq %rsi, %rdi
1219 call *%rax
1220 # exit 1177 # exit
1221 mov %eax, %edi 1178 mov %eax, %edi
1222 call do_exit 1179 call do_exit
1223 ud2 # padding for call trace 1180 ud2 # padding for call trace
1224 CFI_ENDPROC 1181 CFI_ENDPROC
1225END(child_rip) 1182END(kernel_thread_helper)
1226 1183
1227/* 1184/*
1228 * execve(). This function needs to use IRET, not SYSRET, to set up all state properly. 1185 * execve(). This function needs to use IRET, not SYSRET, to set up all state properly.
diff --git a/arch/x86/kernel/geode_32.c b/arch/x86/kernel/geode_32.c
deleted file mode 100644
index 9b08e852fd1a..000000000000
--- a/arch/x86/kernel/geode_32.c
+++ /dev/null
@@ -1,196 +0,0 @@
1/*
2 * AMD Geode southbridge support code
3 * Copyright (C) 2006, Advanced Micro Devices, Inc.
4 * Copyright (C) 2007, Andres Salomon <dilinger@debian.org>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public License
8 * as published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/ioport.h>
14#include <linux/io.h>
15#include <asm/msr.h>
16#include <asm/geode.h>
17
18static struct {
19 char *name;
20 u32 msr;
21 int size;
22 u32 base;
23} lbars[] = {
24 { "geode-pms", MSR_LBAR_PMS, LBAR_PMS_SIZE, 0 },
25 { "geode-acpi", MSR_LBAR_ACPI, LBAR_ACPI_SIZE, 0 },
26 { "geode-gpio", MSR_LBAR_GPIO, LBAR_GPIO_SIZE, 0 },
27 { "geode-mfgpt", MSR_LBAR_MFGPT, LBAR_MFGPT_SIZE, 0 }
28};
29
30static void __init init_lbars(void)
31{
32 u32 lo, hi;
33 int i;
34
35 for (i = 0; i < ARRAY_SIZE(lbars); i++) {
36 rdmsr(lbars[i].msr, lo, hi);
37 if (hi & 0x01)
38 lbars[i].base = lo & 0x0000ffff;
39
40 if (lbars[i].base == 0)
41 printk(KERN_ERR "geode: Couldn't initialize '%s'\n",
42 lbars[i].name);
43 }
44}
45
46int geode_get_dev_base(unsigned int dev)
47{
48 BUG_ON(dev >= ARRAY_SIZE(lbars));
49 return lbars[dev].base;
50}
51EXPORT_SYMBOL_GPL(geode_get_dev_base);
52
53/* === GPIO API === */
54
55void geode_gpio_set(u32 gpio, unsigned int reg)
56{
57 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
58
59 if (!base)
60 return;
61
62 /* low bank register */
63 if (gpio & 0xFFFF)
64 outl(gpio & 0xFFFF, base + reg);
65 /* high bank register */
66 gpio >>= 16;
67 if (gpio)
68 outl(gpio, base + 0x80 + reg);
69}
70EXPORT_SYMBOL_GPL(geode_gpio_set);
71
72void geode_gpio_clear(u32 gpio, unsigned int reg)
73{
74 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
75
76 if (!base)
77 return;
78
79 /* low bank register */
80 if (gpio & 0xFFFF)
81 outl((gpio & 0xFFFF) << 16, base + reg);
82 /* high bank register */
83 gpio &= (0xFFFF << 16);
84 if (gpio)
85 outl(gpio, base + 0x80 + reg);
86}
87EXPORT_SYMBOL_GPL(geode_gpio_clear);
88
89int geode_gpio_isset(u32 gpio, unsigned int reg)
90{
91 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
92 u32 val;
93
94 if (!base)
95 return 0;
96
97 /* low bank register */
98 if (gpio & 0xFFFF) {
99 val = inl(base + reg) & (gpio & 0xFFFF);
100 if ((gpio & 0xFFFF) == val)
101 return 1;
102 }
103 /* high bank register */
104 gpio >>= 16;
105 if (gpio) {
106 val = inl(base + 0x80 + reg) & gpio;
107 if (gpio == val)
108 return 1;
109 }
110 return 0;
111}
112EXPORT_SYMBOL_GPL(geode_gpio_isset);
113
114void geode_gpio_set_irq(unsigned int group, unsigned int irq)
115{
116 u32 lo, hi;
117
118 if (group > 7 || irq > 15)
119 return;
120
121 rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
122
123 lo &= ~(0xF << (group * 4));
124 lo |= (irq & 0xF) << (group * 4);
125
126 wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
127}
128EXPORT_SYMBOL_GPL(geode_gpio_set_irq);
129
130void geode_gpio_setup_event(unsigned int gpio, int pair, int pme)
131{
132 u32 base = geode_get_dev_base(GEODE_DEV_GPIO);
133 u32 offset, shift, val;
134
135 if (gpio >= 24)
136 offset = GPIO_MAP_W;
137 else if (gpio >= 16)
138 offset = GPIO_MAP_Z;
139 else if (gpio >= 8)
140 offset = GPIO_MAP_Y;
141 else
142 offset = GPIO_MAP_X;
143
144 shift = (gpio % 8) * 4;
145
146 val = inl(base + offset);
147
148 /* Clear whatever was there before */
149 val &= ~(0xF << shift);
150
151 /* And set the new value */
152
153 val |= ((pair & 7) << shift);
154
155 /* Set the PME bit if this is a PME event */
156
157 if (pme)
158 val |= (1 << (shift + 3));
159
160 outl(val, base + offset);
161}
162EXPORT_SYMBOL_GPL(geode_gpio_setup_event);
163
164int geode_has_vsa2(void)
165{
166 static int has_vsa2 = -1;
167
168 if (has_vsa2 == -1) {
169 u16 val;
170
171 /*
172 * The VSA has virtual registers that we can query for a
173 * signature.
174 */
175 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX);
176 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX);
177
178 val = inw(VSA_VRC_DATA);
179 has_vsa2 = (val == AMD_VSA_SIG || val == GSW_VSA_SIG);
180 }
181
182 return has_vsa2;
183}
184EXPORT_SYMBOL_GPL(geode_has_vsa2);
185
186static int __init geode_southbridge_init(void)
187{
188 if (!is_geode())
189 return -ENODEV;
190
191 init_lbars();
192 (void) mfgpt_timer_setup();
193 return 0;
194}
195
196postcore_initcall(geode_southbridge_init);
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index 4f8e2507e8f3..5051b94c9069 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -29,8 +29,6 @@ static void __init i386_default_early_setup(void)
29 29
30void __init i386_start_kernel(void) 30void __init i386_start_kernel(void)
31{ 31{
32 reserve_trampoline_memory();
33
34 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS"); 32 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
35 33
36#ifdef CONFIG_BLK_DEV_INITRD 34#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 0b06cd778fd9..b5a9896ca1e7 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -98,8 +98,6 @@ void __init x86_64_start_reservations(char *real_mode_data)
98{ 98{
99 copy_bootdata(__va(real_mode_data)); 99 copy_bootdata(__va(real_mode_data));
100 100
101 reserve_trampoline_memory();
102
103 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS"); 101 reserve_early(__pa_symbol(&_text), __pa_symbol(&__bss_stop), "TEXT DATA BSS");
104 102
105#ifdef CONFIG_BLK_DEV_INITRD 103#ifdef CONFIG_BLK_DEV_INITRD
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index dedc2bddf7a5..ba6e65884603 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -33,6 +33,7 @@
33 * HPET address is set in acpi/boot.c, when an ACPI entry exists 33 * HPET address is set in acpi/boot.c, when an ACPI entry exists
34 */ 34 */
35unsigned long hpet_address; 35unsigned long hpet_address;
36u8 hpet_blockid; /* OS timer block num */
36#ifdef CONFIG_PCI_MSI 37#ifdef CONFIG_PCI_MSI
37static unsigned long hpet_num_timers; 38static unsigned long hpet_num_timers;
38#endif 39#endif
@@ -47,12 +48,12 @@ struct hpet_dev {
47 char name[10]; 48 char name[10];
48}; 49};
49 50
50unsigned long hpet_readl(unsigned long a) 51inline unsigned int hpet_readl(unsigned int a)
51{ 52{
52 return readl(hpet_virt_address + a); 53 return readl(hpet_virt_address + a);
53} 54}
54 55
55static inline void hpet_writel(unsigned long d, unsigned long a) 56static inline void hpet_writel(unsigned int d, unsigned int a)
56{ 57{
57 writel(d, hpet_virt_address + a); 58 writel(d, hpet_virt_address + a);
58} 59}
@@ -167,7 +168,7 @@ do { \
167 168
168static void hpet_reserve_msi_timers(struct hpet_data *hd); 169static void hpet_reserve_msi_timers(struct hpet_data *hd);
169 170
170static void hpet_reserve_platform_timers(unsigned long id) 171static void hpet_reserve_platform_timers(unsigned int id)
171{ 172{
172 struct hpet __iomem *hpet = hpet_virt_address; 173 struct hpet __iomem *hpet = hpet_virt_address;
173 struct hpet_timer __iomem *timer = &hpet->hpet_timers[2]; 174 struct hpet_timer __iomem *timer = &hpet->hpet_timers[2];
@@ -205,7 +206,7 @@ static void hpet_reserve_platform_timers(unsigned long id)
205 206
206} 207}
207#else 208#else
208static void hpet_reserve_platform_timers(unsigned long id) { } 209static void hpet_reserve_platform_timers(unsigned int id) { }
209#endif 210#endif
210 211
211/* 212/*
@@ -246,7 +247,7 @@ static void hpet_reset_counter(void)
246 247
247static void hpet_start_counter(void) 248static void hpet_start_counter(void)
248{ 249{
249 unsigned long cfg = hpet_readl(HPET_CFG); 250 unsigned int cfg = hpet_readl(HPET_CFG);
250 cfg |= HPET_CFG_ENABLE; 251 cfg |= HPET_CFG_ENABLE;
251 hpet_writel(cfg, HPET_CFG); 252 hpet_writel(cfg, HPET_CFG);
252} 253}
@@ -271,7 +272,7 @@ static void hpet_resume_counter(void)
271 272
272static void hpet_enable_legacy_int(void) 273static void hpet_enable_legacy_int(void)
273{ 274{
274 unsigned long cfg = hpet_readl(HPET_CFG); 275 unsigned int cfg = hpet_readl(HPET_CFG);
275 276
276 cfg |= HPET_CFG_LEGACY; 277 cfg |= HPET_CFG_LEGACY;
277 hpet_writel(cfg, HPET_CFG); 278 hpet_writel(cfg, HPET_CFG);
@@ -314,7 +315,7 @@ static int hpet_setup_msi_irq(unsigned int irq);
314static void hpet_set_mode(enum clock_event_mode mode, 315static void hpet_set_mode(enum clock_event_mode mode,
315 struct clock_event_device *evt, int timer) 316 struct clock_event_device *evt, int timer)
316{ 317{
317 unsigned long cfg, cmp, now; 318 unsigned int cfg, cmp, now;
318 uint64_t delta; 319 uint64_t delta;
319 320
320 switch (mode) { 321 switch (mode) {
@@ -323,7 +324,7 @@ static void hpet_set_mode(enum clock_event_mode mode,
323 delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult; 324 delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult;
324 delta >>= evt->shift; 325 delta >>= evt->shift;
325 now = hpet_readl(HPET_COUNTER); 326 now = hpet_readl(HPET_COUNTER);
326 cmp = now + (unsigned long) delta; 327 cmp = now + (unsigned int) delta;
327 cfg = hpet_readl(HPET_Tn_CFG(timer)); 328 cfg = hpet_readl(HPET_Tn_CFG(timer));
328 /* Make sure we use edge triggered interrupts */ 329 /* Make sure we use edge triggered interrupts */
329 cfg &= ~HPET_TN_LEVEL; 330 cfg &= ~HPET_TN_LEVEL;
@@ -339,7 +340,7 @@ static void hpet_set_mode(enum clock_event_mode mode,
339 * (See AMD-8111 HyperTransport I/O Hub Data Sheet, 340 * (See AMD-8111 HyperTransport I/O Hub Data Sheet,
340 * Publication # 24674) 341 * Publication # 24674)
341 */ 342 */
342 hpet_writel((unsigned long) delta, HPET_Tn_CMP(timer)); 343 hpet_writel((unsigned int) delta, HPET_Tn_CMP(timer));
343 hpet_start_counter(); 344 hpet_start_counter();
344 hpet_print_config(); 345 hpet_print_config();
345 break; 346 break;
@@ -383,13 +384,24 @@ static int hpet_next_event(unsigned long delta,
383 hpet_writel(cnt, HPET_Tn_CMP(timer)); 384 hpet_writel(cnt, HPET_Tn_CMP(timer));
384 385
385 /* 386 /*
386 * We need to read back the CMP register to make sure that 387 * We need to read back the CMP register on certain HPET
387 * what we wrote hit the chip before we compare it to the 388 * implementations (ATI chipsets) which seem to delay the
388 * counter. 389 * transfer of the compare register into the internal compare
390 * logic. With small deltas this might actually be too late as
391 * the counter could already be higher than the compare value
392 * at that point and we would wait for the next hpet interrupt
393 * forever. We found out that reading the CMP register back
394 * forces the transfer so we can rely on the comparison with
395 * the counter register below. If the read back from the
396 * compare register does not match the value we programmed
397 * then we might have a real hardware problem. We can not do
398 * much about it here, but at least alert the user/admin with
399 * a prominent warning.
389 */ 400 */
390 WARN_ON_ONCE((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt); 401 WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt,
402 KERN_WARNING "hpet: compare register read back failed.\n");
391 403
392 return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; 404 return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
393} 405}
394 406
395static void hpet_legacy_set_mode(enum clock_event_mode mode, 407static void hpet_legacy_set_mode(enum clock_event_mode mode,
@@ -415,7 +427,7 @@ static struct hpet_dev *hpet_devs;
415void hpet_msi_unmask(unsigned int irq) 427void hpet_msi_unmask(unsigned int irq)
416{ 428{
417 struct hpet_dev *hdev = get_irq_data(irq); 429 struct hpet_dev *hdev = get_irq_data(irq);
418 unsigned long cfg; 430 unsigned int cfg;
419 431
420 /* unmask it */ 432 /* unmask it */
421 cfg = hpet_readl(HPET_Tn_CFG(hdev->num)); 433 cfg = hpet_readl(HPET_Tn_CFG(hdev->num));
@@ -425,7 +437,7 @@ void hpet_msi_unmask(unsigned int irq)
425 437
426void hpet_msi_mask(unsigned int irq) 438void hpet_msi_mask(unsigned int irq)
427{ 439{
428 unsigned long cfg; 440 unsigned int cfg;
429 struct hpet_dev *hdev = get_irq_data(irq); 441 struct hpet_dev *hdev = get_irq_data(irq);
430 442
431 /* mask it */ 443 /* mask it */
@@ -467,7 +479,7 @@ static int hpet_msi_next_event(unsigned long delta,
467 479
468static int hpet_setup_msi_irq(unsigned int irq) 480static int hpet_setup_msi_irq(unsigned int irq)
469{ 481{
470 if (arch_setup_hpet_msi(irq)) { 482 if (arch_setup_hpet_msi(irq, hpet_blockid)) {
471 destroy_irq(irq); 483 destroy_irq(irq);
472 return -EINVAL; 484 return -EINVAL;
473 } 485 }
@@ -584,6 +596,8 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
584 unsigned int num_timers_used = 0; 596 unsigned int num_timers_used = 0;
585 int i; 597 int i;
586 598
599 if (boot_cpu_has(X86_FEATURE_ARAT))
600 return;
587 id = hpet_readl(HPET_ID); 601 id = hpet_readl(HPET_ID);
588 602
589 num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT); 603 num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT);
@@ -598,7 +612,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
598 612
599 for (i = start_timer; i < num_timers - RESERVE_TIMERS; i++) { 613 for (i = start_timer; i < num_timers - RESERVE_TIMERS; i++) {
600 struct hpet_dev *hdev = &hpet_devs[num_timers_used]; 614 struct hpet_dev *hdev = &hpet_devs[num_timers_used];
601 unsigned long cfg = hpet_readl(HPET_Tn_CFG(i)); 615 unsigned int cfg = hpet_readl(HPET_Tn_CFG(i));
602 616
603 /* Only consider HPET timer with MSI support */ 617 /* Only consider HPET timer with MSI support */
604 if (!(cfg & HPET_TN_FSB_CAP)) 618 if (!(cfg & HPET_TN_FSB_CAP))
@@ -813,7 +827,7 @@ static int hpet_clocksource_register(void)
813 */ 827 */
814int __init hpet_enable(void) 828int __init hpet_enable(void)
815{ 829{
816 unsigned long id; 830 unsigned int id;
817 int i; 831 int i;
818 832
819 if (!is_hpet_capable()) 833 if (!is_hpet_capable())
@@ -872,10 +886,8 @@ int __init hpet_enable(void)
872 886
873 if (id & HPET_ID_LEGSUP) { 887 if (id & HPET_ID_LEGSUP) {
874 hpet_legacy_clockevent_register(); 888 hpet_legacy_clockevent_register();
875 hpet_msi_capability_lookup(2);
876 return 1; 889 return 1;
877 } 890 }
878 hpet_msi_capability_lookup(0);
879 return 0; 891 return 0;
880 892
881out_nohpet: 893out_nohpet:
@@ -908,9 +920,17 @@ static __init int hpet_late_init(void)
908 if (!hpet_virt_address) 920 if (!hpet_virt_address)
909 return -ENODEV; 921 return -ENODEV;
910 922
923 if (hpet_readl(HPET_ID) & HPET_ID_LEGSUP)
924 hpet_msi_capability_lookup(2);
925 else
926 hpet_msi_capability_lookup(0);
927
911 hpet_reserve_platform_timers(hpet_readl(HPET_ID)); 928 hpet_reserve_platform_timers(hpet_readl(HPET_ID));
912 hpet_print_config(); 929 hpet_print_config();
913 930
931 if (boot_cpu_has(X86_FEATURE_ARAT))
932 return 0;
933
914 for_each_online_cpu(cpu) { 934 for_each_online_cpu(cpu) {
915 hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu); 935 hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu);
916 } 936 }
@@ -925,7 +945,7 @@ fs_initcall(hpet_late_init);
925void hpet_disable(void) 945void hpet_disable(void)
926{ 946{
927 if (is_hpet_capable()) { 947 if (is_hpet_capable()) {
928 unsigned long cfg = hpet_readl(HPET_CFG); 948 unsigned int cfg = hpet_readl(HPET_CFG);
929 949
930 if (hpet_legacy_int_enabled) { 950 if (hpet_legacy_int_enabled) {
931 cfg &= ~HPET_CFG_LEGACY; 951 cfg &= ~HPET_CFG_LEGACY;
@@ -965,8 +985,8 @@ static int hpet_prev_update_sec;
965static struct rtc_time hpet_alarm_time; 985static struct rtc_time hpet_alarm_time;
966static unsigned long hpet_pie_count; 986static unsigned long hpet_pie_count;
967static u32 hpet_t1_cmp; 987static u32 hpet_t1_cmp;
968static unsigned long hpet_default_delta; 988static u32 hpet_default_delta;
969static unsigned long hpet_pie_delta; 989static u32 hpet_pie_delta;
970static unsigned long hpet_pie_limit; 990static unsigned long hpet_pie_limit;
971 991
972static rtc_irq_handler irq_handler; 992static rtc_irq_handler irq_handler;
@@ -1017,7 +1037,8 @@ EXPORT_SYMBOL_GPL(hpet_unregister_irq_handler);
1017 */ 1037 */
1018int hpet_rtc_timer_init(void) 1038int hpet_rtc_timer_init(void)
1019{ 1039{
1020 unsigned long cfg, cnt, delta, flags; 1040 unsigned int cfg, cnt, delta;
1041 unsigned long flags;
1021 1042
1022 if (!is_hpet_enabled()) 1043 if (!is_hpet_enabled())
1023 return 0; 1044 return 0;
@@ -1027,7 +1048,7 @@ int hpet_rtc_timer_init(void)
1027 1048
1028 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC; 1049 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC;
1029 clc >>= hpet_clockevent.shift + DEFAULT_RTC_SHIFT; 1050 clc >>= hpet_clockevent.shift + DEFAULT_RTC_SHIFT;
1030 hpet_default_delta = (unsigned long) clc; 1051 hpet_default_delta = clc;
1031 } 1052 }
1032 1053
1033 if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit) 1054 if (!(hpet_rtc_flags & RTC_PIE) || hpet_pie_limit)
@@ -1113,7 +1134,7 @@ int hpet_set_periodic_freq(unsigned long freq)
1113 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC; 1134 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC;
1114 do_div(clc, freq); 1135 do_div(clc, freq);
1115 clc >>= hpet_clockevent.shift; 1136 clc >>= hpet_clockevent.shift;
1116 hpet_pie_delta = (unsigned long) clc; 1137 hpet_pie_delta = clc;
1117 } 1138 }
1118 return 1; 1139 return 1;
1119} 1140}
@@ -1127,7 +1148,7 @@ EXPORT_SYMBOL_GPL(hpet_rtc_dropped_irq);
1127 1148
1128static void hpet_rtc_timer_reinit(void) 1149static void hpet_rtc_timer_reinit(void)
1129{ 1150{
1130 unsigned long cfg, delta; 1151 unsigned int cfg, delta;
1131 int lost_ints = -1; 1152 int lost_ints = -1;
1132 1153
1133 if (unlikely(!hpet_rtc_flags)) { 1154 if (unlikely(!hpet_rtc_flags)) {
diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index d42f65ac4927..05d5fec64a94 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -362,8 +362,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
362 return ret; 362 return ret;
363 } 363 }
364 364
365 if (bp->callback) 365 ret = arch_store_info(bp);
366 ret = arch_store_info(bp);
367 366
368 if (ret < 0) 367 if (ret < 0)
369 return ret; 368 return ret;
@@ -519,7 +518,7 @@ static int __kprobes hw_breakpoint_handler(struct die_args *args)
519 break; 518 break;
520 } 519 }
521 520
522 (bp->callback)(bp, args->regs); 521 perf_bp_event(bp, args->regs);
523 522
524 rcu_read_unlock(); 523 rcu_read_unlock();
525 } 524 }
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index 99c4d308f16b..8eec0ec59af2 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -103,9 +103,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
103 * on system-call entry - see also fork() and the signal handling 103 * on system-call entry - see also fork() and the signal handling
104 * code. 104 * code.
105 */ 105 */
106static int do_iopl(unsigned int level, struct pt_regs *regs) 106long sys_iopl(unsigned int level, struct pt_regs *regs)
107{ 107{
108 unsigned int old = (regs->flags >> 12) & 3; 108 unsigned int old = (regs->flags >> 12) & 3;
109 struct thread_struct *t = &current->thread;
109 110
110 if (level > 3) 111 if (level > 3)
111 return -EINVAL; 112 return -EINVAL;
@@ -115,29 +116,8 @@ static int do_iopl(unsigned int level, struct pt_regs *regs)
115 return -EPERM; 116 return -EPERM;
116 } 117 }
117 regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12); 118 regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12);
118
119 return 0;
120}
121
122#ifdef CONFIG_X86_32
123long sys_iopl(struct pt_regs *regs)
124{
125 unsigned int level = regs->bx;
126 struct thread_struct *t = &current->thread;
127 int rc;
128
129 rc = do_iopl(level, regs);
130 if (rc < 0)
131 goto out;
132
133 t->iopl = level << 12; 119 t->iopl = level << 12;
134 set_iopl_mask(t->iopl); 120 set_iopl_mask(t->iopl);
135out: 121
136 return rc; 122 return 0;
137}
138#else
139asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs)
140{
141 return do_iopl(level, regs);
142} 123}
143#endif
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 664bcb7384ac..91fd0c70a18a 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -149,7 +149,7 @@ int show_interrupts(struct seq_file *p, void *v)
149 if (!desc) 149 if (!desc)
150 return 0; 150 return 0;
151 151
152 spin_lock_irqsave(&desc->lock, flags); 152 raw_spin_lock_irqsave(&desc->lock, flags);
153 for_each_online_cpu(j) 153 for_each_online_cpu(j)
154 any_count |= kstat_irqs_cpu(i, j); 154 any_count |= kstat_irqs_cpu(i, j);
155 action = desc->action; 155 action = desc->action;
@@ -170,7 +170,7 @@ int show_interrupts(struct seq_file *p, void *v)
170 170
171 seq_putc(p, '\n'); 171 seq_putc(p, '\n');
172out: 172out:
173 spin_unlock_irqrestore(&desc->lock, flags); 173 raw_spin_unlock_irqrestore(&desc->lock, flags);
174 return 0; 174 return 0;
175} 175}
176 176
@@ -294,12 +294,12 @@ void fixup_irqs(void)
294 continue; 294 continue;
295 295
296 /* interrupt's are disabled at this point */ 296 /* interrupt's are disabled at this point */
297 spin_lock(&desc->lock); 297 raw_spin_lock(&desc->lock);
298 298
299 affinity = desc->affinity; 299 affinity = desc->affinity;
300 if (!irq_has_action(irq) || 300 if (!irq_has_action(irq) ||
301 cpumask_equal(affinity, cpu_online_mask)) { 301 cpumask_equal(affinity, cpu_online_mask)) {
302 spin_unlock(&desc->lock); 302 raw_spin_unlock(&desc->lock);
303 continue; 303 continue;
304 } 304 }
305 305
@@ -326,7 +326,7 @@ void fixup_irqs(void)
326 if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask) 326 if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask)
327 desc->chip->unmask(irq); 327 desc->chip->unmask(irq);
328 328
329 spin_unlock(&desc->lock); 329 raw_spin_unlock(&desc->lock);
330 330
331 if (break_affinity && set_affinity) 331 if (break_affinity && set_affinity)
332 printk("Broke affinity for irq %i\n", irq); 332 printk("Broke affinity for irq %i\n", irq);
@@ -356,10 +356,10 @@ void fixup_irqs(void)
356 irq = __get_cpu_var(vector_irq)[vector]; 356 irq = __get_cpu_var(vector_irq)[vector];
357 357
358 desc = irq_to_desc(irq); 358 desc = irq_to_desc(irq);
359 spin_lock(&desc->lock); 359 raw_spin_lock(&desc->lock);
360 if (desc->chip->retrigger) 360 if (desc->chip->retrigger)
361 desc->chip->retrigger(irq); 361 desc->chip->retrigger(irq);
362 spin_unlock(&desc->lock); 362 raw_spin_unlock(&desc->lock);
363 } 363 }
364 } 364 }
365} 365}
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 20a5b3689463..dd74fe7273b1 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -86,9 +86,15 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
86 gdb_regs[GDB_DS] = regs->ds; 86 gdb_regs[GDB_DS] = regs->ds;
87 gdb_regs[GDB_ES] = regs->es; 87 gdb_regs[GDB_ES] = regs->es;
88 gdb_regs[GDB_CS] = regs->cs; 88 gdb_regs[GDB_CS] = regs->cs;
89 gdb_regs[GDB_SS] = __KERNEL_DS;
90 gdb_regs[GDB_FS] = 0xFFFF; 89 gdb_regs[GDB_FS] = 0xFFFF;
91 gdb_regs[GDB_GS] = 0xFFFF; 90 gdb_regs[GDB_GS] = 0xFFFF;
91 if (user_mode_vm(regs)) {
92 gdb_regs[GDB_SS] = regs->ss;
93 gdb_regs[GDB_SP] = regs->sp;
94 } else {
95 gdb_regs[GDB_SS] = __KERNEL_DS;
96 gdb_regs[GDB_SP] = kernel_stack_pointer(regs);
97 }
92#else 98#else
93 gdb_regs[GDB_R8] = regs->r8; 99 gdb_regs[GDB_R8] = regs->r8;
94 gdb_regs[GDB_R9] = regs->r9; 100 gdb_regs[GDB_R9] = regs->r9;
@@ -101,8 +107,8 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
101 gdb_regs32[GDB_PS] = regs->flags; 107 gdb_regs32[GDB_PS] = regs->flags;
102 gdb_regs32[GDB_CS] = regs->cs; 108 gdb_regs32[GDB_CS] = regs->cs;
103 gdb_regs32[GDB_SS] = regs->ss; 109 gdb_regs32[GDB_SS] = regs->ss;
104#endif
105 gdb_regs[GDB_SP] = kernel_stack_pointer(regs); 110 gdb_regs[GDB_SP] = kernel_stack_pointer(regs);
111#endif
106} 112}
107 113
108/** 114/**
@@ -220,8 +226,7 @@ static void kgdb_correct_hw_break(void)
220 dr7 |= ((breakinfo[breakno].len << 2) | 226 dr7 |= ((breakinfo[breakno].len << 2) |
221 breakinfo[breakno].type) << 227 breakinfo[breakno].type) <<
222 ((breakno << 2) + 16); 228 ((breakno << 2) + 16);
223 if (breakno >= 0 && breakno <= 3) 229 set_debugreg(breakinfo[breakno].addr, breakno);
224 set_debugreg(breakinfo[breakno].addr, breakno);
225 230
226 } else { 231 } else {
227 if ((dr7 & breakbit) && !breakinfo[breakno].enabled) { 232 if ((dr7 & breakbit) && !breakinfo[breakno].enabled) {
@@ -395,7 +400,6 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
395 /* set the trace bit if we're stepping */ 400 /* set the trace bit if we're stepping */
396 if (remcomInBuffer[0] == 's') { 401 if (remcomInBuffer[0] == 's') {
397 linux_regs->flags |= X86_EFLAGS_TF; 402 linux_regs->flags |= X86_EFLAGS_TF;
398 kgdb_single_step = 1;
399 atomic_set(&kgdb_cpu_doing_single_step, 403 atomic_set(&kgdb_cpu_doing_single_step,
400 raw_smp_processor_id()); 404 raw_smp_processor_id());
401 } 405 }
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c
index 1f3186ce213c..5b8c7505b3bc 100644
--- a/arch/x86/kernel/kprobes.c
+++ b/arch/x86/kernel/kprobes.c
@@ -481,7 +481,7 @@ static int __kprobes reenter_kprobe(struct kprobe *p, struct pt_regs *regs,
481 481
482/* 482/*
483 * Interrupts are disabled on entry as trap3 is an interrupt gate and they 483 * Interrupts are disabled on entry as trap3 is an interrupt gate and they
484 * remain disabled thorough out this function. 484 * remain disabled throughout this function.
485 */ 485 */
486static int __kprobes kprobe_handler(struct pt_regs *regs) 486static int __kprobes kprobe_handler(struct pt_regs *regs)
487{ 487{
@@ -818,7 +818,7 @@ no_change:
818 818
819/* 819/*
820 * Interrupts are disabled on entry as trap1 is an interrupt gate and they 820 * Interrupts are disabled on entry as trap1 is an interrupt gate and they
821 * remain disabled thoroughout this function. 821 * remain disabled throughout this function.
822 */ 822 */
823static int __kprobes post_kprobe_handler(struct pt_regs *regs) 823static int __kprobes post_kprobe_handler(struct pt_regs *regs)
824{ 824{
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
deleted file mode 100644
index 2a62d843f015..000000000000
--- a/arch/x86/kernel/mfgpt_32.c
+++ /dev/null
@@ -1,410 +0,0 @@
1/*
2 * Driver/API for AMD Geode Multi-Function General Purpose Timers (MFGPT)
3 *
4 * Copyright (C) 2006, Advanced Micro Devices, Inc.
5 * Copyright (C) 2007, Andres Salomon <dilinger@debian.org>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU General Public License
9 * as published by the Free Software Foundation.
10 *
11 * The MFGPTs are documented in AMD Geode CS5536 Companion Device Data Book.
12 */
13
14/*
15 * We are using the 32.768kHz input clock - it's the only one that has the
16 * ranges we find desirable. The following table lists the suitable
17 * divisors and the associated Hz, minimum interval and the maximum interval:
18 *
19 * Divisor Hz Min Delta (s) Max Delta (s)
20 * 1 32768 .00048828125 2.000
21 * 2 16384 .0009765625 4.000
22 * 4 8192 .001953125 8.000
23 * 8 4096 .00390625 16.000
24 * 16 2048 .0078125 32.000
25 * 32 1024 .015625 64.000
26 * 64 512 .03125 128.000
27 * 128 256 .0625 256.000
28 * 256 128 .125 512.000
29 */
30
31#include <linux/kernel.h>
32#include <linux/interrupt.h>
33#include <linux/module.h>
34#include <asm/geode.h>
35
36#define MFGPT_DEFAULT_IRQ 7
37
38static struct mfgpt_timer_t {
39 unsigned int avail:1;
40} mfgpt_timers[MFGPT_MAX_TIMERS];
41
42/* Selected from the table above */
43
44#define MFGPT_DIVISOR 16
45#define MFGPT_SCALE 4 /* divisor = 2^(scale) */
46#define MFGPT_HZ (32768 / MFGPT_DIVISOR)
47#define MFGPT_PERIODIC (MFGPT_HZ / HZ)
48
49/* Allow for disabling of MFGPTs */
50static int disable;
51static int __init mfgpt_disable(char *s)
52{
53 disable = 1;
54 return 1;
55}
56__setup("nomfgpt", mfgpt_disable);
57
58/* Reset the MFGPT timers. This is required by some broken BIOSes which already
59 * do the same and leave the system in an unstable state. TinyBIOS 0.98 is
60 * affected at least (0.99 is OK with MFGPT workaround left to off).
61 */
62static int __init mfgpt_fix(char *s)
63{
64 u32 val, dummy;
65
66 /* The following udocumented bit resets the MFGPT timers */
67 val = 0xFF; dummy = 0;
68 wrmsr(MSR_MFGPT_SETUP, val, dummy);
69 return 1;
70}
71__setup("mfgptfix", mfgpt_fix);
72
73/*
74 * Check whether any MFGPTs are available for the kernel to use. In most
75 * cases, firmware that uses AMD's VSA code will claim all timers during
76 * bootup; we certainly don't want to take them if they're already in use.
77 * In other cases (such as with VSAless OpenFirmware), the system firmware
78 * leaves timers available for us to use.
79 */
80
81
82static int timers = -1;
83
84static void geode_mfgpt_detect(void)
85{
86 int i;
87 u16 val;
88
89 timers = 0;
90
91 if (disable) {
92 printk(KERN_INFO "geode-mfgpt: MFGPT support is disabled\n");
93 goto done;
94 }
95
96 if (!geode_get_dev_base(GEODE_DEV_MFGPT)) {
97 printk(KERN_INFO "geode-mfgpt: MFGPT LBAR is not set up\n");
98 goto done;
99 }
100
101 for (i = 0; i < MFGPT_MAX_TIMERS; i++) {
102 val = geode_mfgpt_read(i, MFGPT_REG_SETUP);
103 if (!(val & MFGPT_SETUP_SETUP)) {
104 mfgpt_timers[i].avail = 1;
105 timers++;
106 }
107 }
108
109done:
110 printk(KERN_INFO "geode-mfgpt: %d MFGPT timers available.\n", timers);
111}
112
113int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable)
114{
115 u32 msr, mask, value, dummy;
116 int shift = (cmp == MFGPT_CMP1) ? 0 : 8;
117
118 if (timer < 0 || timer >= MFGPT_MAX_TIMERS)
119 return -EIO;
120
121 /*
122 * The register maps for these are described in sections 6.17.1.x of
123 * the AMD Geode CS5536 Companion Device Data Book.
124 */
125 switch (event) {
126 case MFGPT_EVENT_RESET:
127 /*
128 * XXX: According to the docs, we cannot reset timers above
129 * 6; that is, resets for 7 and 8 will be ignored. Is this
130 * a problem? -dilinger
131 */
132 msr = MSR_MFGPT_NR;
133 mask = 1 << (timer + 24);
134 break;
135
136 case MFGPT_EVENT_NMI:
137 msr = MSR_MFGPT_NR;
138 mask = 1 << (timer + shift);
139 break;
140
141 case MFGPT_EVENT_IRQ:
142 msr = MSR_MFGPT_IRQ;
143 mask = 1 << (timer + shift);
144 break;
145
146 default:
147 return -EIO;
148 }
149
150 rdmsr(msr, value, dummy);
151
152 if (enable)
153 value |= mask;
154 else
155 value &= ~mask;
156
157 wrmsr(msr, value, dummy);
158 return 0;
159}
160EXPORT_SYMBOL_GPL(geode_mfgpt_toggle_event);
161
162int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable)
163{
164 u32 zsel, lpc, dummy;
165 int shift;
166
167 if (timer < 0 || timer >= MFGPT_MAX_TIMERS)
168 return -EIO;
169
170 /*
171 * Unfortunately, MFGPTs come in pairs sharing their IRQ lines. If VSA
172 * is using the same CMP of the timer's Siamese twin, the IRQ is set to
173 * 2, and we mustn't use nor change it.
174 * XXX: Likewise, 2 Linux drivers might clash if the 2nd overwrites the
175 * IRQ of the 1st. This can only happen if forcing an IRQ, calling this
176 * with *irq==0 is safe. Currently there _are_ no 2 drivers.
177 */
178 rdmsr(MSR_PIC_ZSEL_LOW, zsel, dummy);
179 shift = ((cmp == MFGPT_CMP1 ? 0 : 4) + timer % 4) * 4;
180 if (((zsel >> shift) & 0xF) == 2)
181 return -EIO;
182
183 /* Choose IRQ: if none supplied, keep IRQ already set or use default */
184 if (!*irq)
185 *irq = (zsel >> shift) & 0xF;
186 if (!*irq)
187 *irq = MFGPT_DEFAULT_IRQ;
188
189 /* Can't use IRQ if it's 0 (=disabled), 2, or routed to LPC */
190 if (*irq < 1 || *irq == 2 || *irq > 15)
191 return -EIO;
192 rdmsr(MSR_PIC_IRQM_LPC, lpc, dummy);
193 if (lpc & (1 << *irq))
194 return -EIO;
195
196 /* All chosen and checked - go for it */
197 if (geode_mfgpt_toggle_event(timer, cmp, MFGPT_EVENT_IRQ, enable))
198 return -EIO;
199 if (enable) {
200 zsel = (zsel & ~(0xF << shift)) | (*irq << shift);
201 wrmsr(MSR_PIC_ZSEL_LOW, zsel, dummy);
202 }
203
204 return 0;
205}
206
207static int mfgpt_get(int timer)
208{
209 mfgpt_timers[timer].avail = 0;
210 printk(KERN_INFO "geode-mfgpt: Registered timer %d\n", timer);
211 return timer;
212}
213
214int geode_mfgpt_alloc_timer(int timer, int domain)
215{
216 int i;
217
218 if (timers == -1) {
219 /* timers haven't been detected yet */
220 geode_mfgpt_detect();
221 }
222
223 if (!timers)
224 return -1;
225
226 if (timer >= MFGPT_MAX_TIMERS)
227 return -1;
228
229 if (timer < 0) {
230 /* Try to find an available timer */
231 for (i = 0; i < MFGPT_MAX_TIMERS; i++) {
232 if (mfgpt_timers[i].avail)
233 return mfgpt_get(i);
234
235 if (i == 5 && domain == MFGPT_DOMAIN_WORKING)
236 break;
237 }
238 } else {
239 /* If they requested a specific timer, try to honor that */
240 if (mfgpt_timers[timer].avail)
241 return mfgpt_get(timer);
242 }
243
244 /* No timers available - too bad */
245 return -1;
246}
247EXPORT_SYMBOL_GPL(geode_mfgpt_alloc_timer);
248
249
250#ifdef CONFIG_GEODE_MFGPT_TIMER
251
252/*
253 * The MFPGT timers on the CS5536 provide us with suitable timers to use
254 * as clock event sources - not as good as a HPET or APIC, but certainly
255 * better than the PIT. This isn't a general purpose MFGPT driver, but
256 * a simplified one designed specifically to act as a clock event source.
257 * For full details about the MFGPT, please consult the CS5536 data sheet.
258 */
259
260#include <linux/clocksource.h>
261#include <linux/clockchips.h>
262
263static unsigned int mfgpt_tick_mode = CLOCK_EVT_MODE_SHUTDOWN;
264static u16 mfgpt_event_clock;
265
266static int irq;
267static int __init mfgpt_setup(char *str)
268{
269 get_option(&str, &irq);
270 return 1;
271}
272__setup("mfgpt_irq=", mfgpt_setup);
273
274static void mfgpt_disable_timer(u16 clock)
275{
276 /* avoid races by clearing CMP1 and CMP2 unconditionally */
277 geode_mfgpt_write(clock, MFGPT_REG_SETUP, (u16) ~MFGPT_SETUP_CNTEN |
278 MFGPT_SETUP_CMP1 | MFGPT_SETUP_CMP2);
279}
280
281static int mfgpt_next_event(unsigned long, struct clock_event_device *);
282static void mfgpt_set_mode(enum clock_event_mode, struct clock_event_device *);
283
284static struct clock_event_device mfgpt_clockevent = {
285 .name = "mfgpt-timer",
286 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
287 .set_mode = mfgpt_set_mode,
288 .set_next_event = mfgpt_next_event,
289 .rating = 250,
290 .cpumask = cpu_all_mask,
291 .shift = 32
292};
293
294static void mfgpt_start_timer(u16 delta)
295{
296 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_CMP2, (u16) delta);
297 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0);
298
299 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP,
300 MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
301}
302
303static void mfgpt_set_mode(enum clock_event_mode mode,
304 struct clock_event_device *evt)
305{
306 mfgpt_disable_timer(mfgpt_event_clock);
307
308 if (mode == CLOCK_EVT_MODE_PERIODIC)
309 mfgpt_start_timer(MFGPT_PERIODIC);
310
311 mfgpt_tick_mode = mode;
312}
313
314static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt)
315{
316 mfgpt_start_timer(delta);
317 return 0;
318}
319
320static irqreturn_t mfgpt_tick(int irq, void *dev_id)
321{
322 u16 val = geode_mfgpt_read(mfgpt_event_clock, MFGPT_REG_SETUP);
323
324 /* See if the interrupt was for us */
325 if (!(val & (MFGPT_SETUP_SETUP | MFGPT_SETUP_CMP2 | MFGPT_SETUP_CMP1)))
326 return IRQ_NONE;
327
328 /* Turn off the clock (and clear the event) */
329 mfgpt_disable_timer(mfgpt_event_clock);
330
331 if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN)
332 return IRQ_HANDLED;
333
334 /* Clear the counter */
335 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0);
336
337 /* Restart the clock in periodic mode */
338
339 if (mfgpt_tick_mode == CLOCK_EVT_MODE_PERIODIC) {
340 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP,
341 MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
342 }
343
344 mfgpt_clockevent.event_handler(&mfgpt_clockevent);
345 return IRQ_HANDLED;
346}
347
348static struct irqaction mfgptirq = {
349 .handler = mfgpt_tick,
350 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
351 .name = "mfgpt-timer"
352};
353
354int __init mfgpt_timer_setup(void)
355{
356 int timer, ret;
357 u16 val;
358
359 timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);
360 if (timer < 0) {
361 printk(KERN_ERR
362 "mfgpt-timer: Could not allocate a MFPGT timer\n");
363 return -ENODEV;
364 }
365
366 mfgpt_event_clock = timer;
367
368 /* Set up the IRQ on the MFGPT side */
369 if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, &irq)) {
370 printk(KERN_ERR "mfgpt-timer: Could not set up IRQ %d\n", irq);
371 return -EIO;
372 }
373
374 /* And register it with the kernel */
375 ret = setup_irq(irq, &mfgptirq);
376
377 if (ret) {
378 printk(KERN_ERR
379 "mfgpt-timer: Unable to set up the interrupt.\n");
380 goto err;
381 }
382
383 /* Set the clock scale and enable the event mode for CMP2 */
384 val = MFGPT_SCALE | (3 << 8);
385
386 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val);
387
388 /* Set up the clock event */
389 mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC,
390 mfgpt_clockevent.shift);
391 mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF,
392 &mfgpt_clockevent);
393 mfgpt_clockevent.max_delta_ns = clockevent_delta2ns(0xFFFE,
394 &mfgpt_clockevent);
395
396 printk(KERN_INFO
397 "mfgpt-timer: Registering MFGPT timer %d as a clock event, using IRQ %d\n",
398 timer, irq);
399 clockevents_register_device(&mfgpt_clockevent);
400
401 return 0;
402
403err:
404 geode_mfgpt_release_irq(mfgpt_event_clock, MFGPT_CMP2, &irq);
405 printk(KERN_ERR
406 "mfgpt-timer: Unable to set up the MFGPT clock source\n");
407 return -EIO;
408}
409
410#endif
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 63123d902103..37542b67c57e 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -13,6 +13,9 @@
13 * Licensed under the terms of the GNU General Public 13 * Licensed under the terms of the GNU General Public
14 * License version 2. See file COPYING for details. 14 * License version 2. See file COPYING for details.
15 */ 15 */
16
17#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
16#include <linux/firmware.h> 19#include <linux/firmware.h>
17#include <linux/pci_ids.h> 20#include <linux/pci_ids.h>
18#include <linux/uaccess.h> 21#include <linux/uaccess.h>
@@ -81,7 +84,7 @@ static int collect_cpu_info_amd(int cpu, struct cpu_signature *csig)
81 84
82 memset(csig, 0, sizeof(*csig)); 85 memset(csig, 0, sizeof(*csig));
83 rdmsr(MSR_AMD64_PATCH_LEVEL, csig->rev, dummy); 86 rdmsr(MSR_AMD64_PATCH_LEVEL, csig->rev, dummy);
84 pr_info("microcode: CPU%d: patch_level=0x%x\n", cpu, csig->rev); 87 pr_info("CPU%d: patch_level=0x%x\n", cpu, csig->rev);
85 return 0; 88 return 0;
86} 89}
87 90
@@ -111,8 +114,8 @@ static int get_matching_microcode(int cpu, void *mc, int rev)
111 114
112 /* ucode might be chipset specific -- currently we don't support this */ 115 /* ucode might be chipset specific -- currently we don't support this */
113 if (mc_header->nb_dev_id || mc_header->sb_dev_id) { 116 if (mc_header->nb_dev_id || mc_header->sb_dev_id) {
114 pr_err(KERN_ERR "microcode: CPU%d: loading of chipset " 117 pr_err("CPU%d: loading of chipset specific code not yet supported\n",
115 "specific code not yet supported\n", cpu); 118 cpu);
116 return 0; 119 return 0;
117 } 120 }
118 121
@@ -141,12 +144,12 @@ static int apply_microcode_amd(int cpu)
141 144
142 /* check current patch id and patch's id for match */ 145 /* check current patch id and patch's id for match */
143 if (rev != mc_amd->hdr.patch_id) { 146 if (rev != mc_amd->hdr.patch_id) {
144 pr_err("microcode: CPU%d: update failed " 147 pr_err("CPU%d: update failed (for patch_level=0x%x)\n",
145 "(for patch_level=0x%x)\n", cpu, mc_amd->hdr.patch_id); 148 cpu, mc_amd->hdr.patch_id);
146 return -1; 149 return -1;
147 } 150 }
148 151
149 pr_info("microcode: CPU%d: updated (new patch_level=0x%x)\n", cpu, rev); 152 pr_info("CPU%d: updated (new patch_level=0x%x)\n", cpu, rev);
150 uci->cpu_sig.rev = rev; 153 uci->cpu_sig.rev = rev;
151 154
152 return 0; 155 return 0;
@@ -169,15 +172,14 @@ get_next_ucode(const u8 *buf, unsigned int size, unsigned int *mc_size)
169 return NULL; 172 return NULL;
170 173
171 if (section_hdr[0] != UCODE_UCODE_TYPE) { 174 if (section_hdr[0] != UCODE_UCODE_TYPE) {
172 pr_err("microcode: error: invalid type field in " 175 pr_err("error: invalid type field in container file section header\n");
173 "container file section header\n");
174 return NULL; 176 return NULL;
175 } 177 }
176 178
177 total_size = (unsigned long) (section_hdr[4] + (section_hdr[5] << 8)); 179 total_size = (unsigned long) (section_hdr[4] + (section_hdr[5] << 8));
178 180
179 if (total_size > size || total_size > UCODE_MAX_SIZE) { 181 if (total_size > size || total_size > UCODE_MAX_SIZE) {
180 pr_err("microcode: error: size mismatch\n"); 182 pr_err("error: size mismatch\n");
181 return NULL; 183 return NULL;
182 } 184 }
183 185
@@ -206,14 +208,13 @@ static int install_equiv_cpu_table(const u8 *buf)
206 size = buf_pos[2]; 208 size = buf_pos[2];
207 209
208 if (buf_pos[1] != UCODE_EQUIV_CPU_TABLE_TYPE || !size) { 210 if (buf_pos[1] != UCODE_EQUIV_CPU_TABLE_TYPE || !size) {
209 pr_err("microcode: error: invalid type field in " 211 pr_err("error: invalid type field in container file section header\n");
210 "container file section header\n");
211 return 0; 212 return 0;
212 } 213 }
213 214
214 equiv_cpu_table = (struct equiv_cpu_entry *) vmalloc(size); 215 equiv_cpu_table = (struct equiv_cpu_entry *) vmalloc(size);
215 if (!equiv_cpu_table) { 216 if (!equiv_cpu_table) {
216 pr_err("microcode: failed to allocate equivalent CPU table\n"); 217 pr_err("failed to allocate equivalent CPU table\n");
217 return 0; 218 return 0;
218 } 219 }
219 220
@@ -246,7 +247,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
246 247
247 offset = install_equiv_cpu_table(ucode_ptr); 248 offset = install_equiv_cpu_table(ucode_ptr);
248 if (!offset) { 249 if (!offset) {
249 pr_err("microcode: failed to create equivalent cpu table\n"); 250 pr_err("failed to create equivalent cpu table\n");
250 return UCODE_ERROR; 251 return UCODE_ERROR;
251 } 252 }
252 253
@@ -277,8 +278,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
277 if (!leftover) { 278 if (!leftover) {
278 vfree(uci->mc); 279 vfree(uci->mc);
279 uci->mc = new_mc; 280 uci->mc = new_mc;
280 pr_debug("microcode: CPU%d found a matching microcode " 281 pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",
281 "update with version 0x%x (current=0x%x)\n",
282 cpu, new_rev, uci->cpu_sig.rev); 282 cpu, new_rev, uci->cpu_sig.rev);
283 } else { 283 } else {
284 vfree(new_mc); 284 vfree(new_mc);
@@ -300,7 +300,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
300 return UCODE_NFOUND; 300 return UCODE_NFOUND;
301 301
302 if (*(u32 *)firmware->data != UCODE_MAGIC) { 302 if (*(u32 *)firmware->data != UCODE_MAGIC) {
303 pr_err("microcode: invalid UCODE_MAGIC (0x%08x)\n", 303 pr_err("invalid UCODE_MAGIC (0x%08x)\n",
304 *(u32 *)firmware->data); 304 *(u32 *)firmware->data);
305 return UCODE_ERROR; 305 return UCODE_ERROR;
306 } 306 }
@@ -313,8 +313,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
313static enum ucode_state 313static enum ucode_state
314request_microcode_user(int cpu, const void __user *buf, size_t size) 314request_microcode_user(int cpu, const void __user *buf, size_t size)
315{ 315{
316 pr_info("microcode: AMD microcode update via " 316 pr_info("AMD microcode update via /dev/cpu/microcode not supported\n");
317 "/dev/cpu/microcode not supported\n");
318 return UCODE_ERROR; 317 return UCODE_ERROR;
319} 318}
320 319
@@ -334,14 +333,13 @@ void init_microcode_amd(struct device *device)
334 WARN_ON(c->x86_vendor != X86_VENDOR_AMD); 333 WARN_ON(c->x86_vendor != X86_VENDOR_AMD);
335 334
336 if (c->x86 < 0x10) { 335 if (c->x86 < 0x10) {
337 pr_warning("microcode: AMD CPU family 0x%x not supported\n", 336 pr_warning("AMD CPU family 0x%x not supported\n", c->x86);
338 c->x86);
339 return; 337 return;
340 } 338 }
341 supported_cpu = 1; 339 supported_cpu = 1;
342 340
343 if (request_firmware(&firmware, fw_name, device)) 341 if (request_firmware(&firmware, fw_name, device))
344 pr_err("microcode: failed to load file %s\n", fw_name); 342 pr_err("failed to load file %s\n", fw_name);
345} 343}
346 344
347void fini_microcode_amd(void) 345void fini_microcode_amd(void)
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index e68aae397869..844c02c65fcb 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -70,6 +70,9 @@
70 * Fix sigmatch() macro to handle old CPUs with pf == 0. 70 * Fix sigmatch() macro to handle old CPUs with pf == 0.
71 * Thanks to Stuart Swales for pointing out this bug. 71 * Thanks to Stuart Swales for pointing out this bug.
72 */ 72 */
73
74#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
75
73#include <linux/platform_device.h> 76#include <linux/platform_device.h>
74#include <linux/miscdevice.h> 77#include <linux/miscdevice.h>
75#include <linux/capability.h> 78#include <linux/capability.h>
@@ -209,7 +212,7 @@ static ssize_t microcode_write(struct file *file, const char __user *buf,
209 ssize_t ret = -EINVAL; 212 ssize_t ret = -EINVAL;
210 213
211 if ((len >> PAGE_SHIFT) > totalram_pages) { 214 if ((len >> PAGE_SHIFT) > totalram_pages) {
212 pr_err("microcode: too much data (max %ld pages)\n", totalram_pages); 215 pr_err("too much data (max %ld pages)\n", totalram_pages);
213 return ret; 216 return ret;
214 } 217 }
215 218
@@ -244,7 +247,7 @@ static int __init microcode_dev_init(void)
244 247
245 error = misc_register(&microcode_dev); 248 error = misc_register(&microcode_dev);
246 if (error) { 249 if (error) {
247 pr_err("microcode: can't misc_register on minor=%d\n", MICROCODE_MINOR); 250 pr_err("can't misc_register on minor=%d\n", MICROCODE_MINOR);
248 return error; 251 return error;
249 } 252 }
250 253
@@ -359,7 +362,7 @@ static enum ucode_state microcode_resume_cpu(int cpu)
359 if (!uci->mc) 362 if (!uci->mc)
360 return UCODE_NFOUND; 363 return UCODE_NFOUND;
361 364
362 pr_debug("microcode: CPU%d updated upon resume\n", cpu); 365 pr_debug("CPU%d updated upon resume\n", cpu);
363 apply_microcode_on_target(cpu); 366 apply_microcode_on_target(cpu);
364 367
365 return UCODE_OK; 368 return UCODE_OK;
@@ -379,7 +382,7 @@ static enum ucode_state microcode_init_cpu(int cpu)
379 ustate = microcode_ops->request_microcode_fw(cpu, &microcode_pdev->dev); 382 ustate = microcode_ops->request_microcode_fw(cpu, &microcode_pdev->dev);
380 383
381 if (ustate == UCODE_OK) { 384 if (ustate == UCODE_OK) {
382 pr_debug("microcode: CPU%d updated upon init\n", cpu); 385 pr_debug("CPU%d updated upon init\n", cpu);
383 apply_microcode_on_target(cpu); 386 apply_microcode_on_target(cpu);
384 } 387 }
385 388
@@ -406,7 +409,7 @@ static int mc_sysdev_add(struct sys_device *sys_dev)
406 if (!cpu_online(cpu)) 409 if (!cpu_online(cpu))
407 return 0; 410 return 0;
408 411
409 pr_debug("microcode: CPU%d added\n", cpu); 412 pr_debug("CPU%d added\n", cpu);
410 413
411 err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group); 414 err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group);
412 if (err) 415 if (err)
@@ -425,7 +428,7 @@ static int mc_sysdev_remove(struct sys_device *sys_dev)
425 if (!cpu_online(cpu)) 428 if (!cpu_online(cpu))
426 return 0; 429 return 0;
427 430
428 pr_debug("microcode: CPU%d removed\n", cpu); 431 pr_debug("CPU%d removed\n", cpu);
429 microcode_fini_cpu(cpu); 432 microcode_fini_cpu(cpu);
430 sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); 433 sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
431 return 0; 434 return 0;
@@ -473,15 +476,15 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
473 microcode_update_cpu(cpu); 476 microcode_update_cpu(cpu);
474 case CPU_DOWN_FAILED: 477 case CPU_DOWN_FAILED:
475 case CPU_DOWN_FAILED_FROZEN: 478 case CPU_DOWN_FAILED_FROZEN:
476 pr_debug("microcode: CPU%d added\n", cpu); 479 pr_debug("CPU%d added\n", cpu);
477 if (sysfs_create_group(&sys_dev->kobj, &mc_attr_group)) 480 if (sysfs_create_group(&sys_dev->kobj, &mc_attr_group))
478 pr_err("microcode: Failed to create group for CPU%d\n", cpu); 481 pr_err("Failed to create group for CPU%d\n", cpu);
479 break; 482 break;
480 case CPU_DOWN_PREPARE: 483 case CPU_DOWN_PREPARE:
481 case CPU_DOWN_PREPARE_FROZEN: 484 case CPU_DOWN_PREPARE_FROZEN:
482 /* Suspend is in progress, only remove the interface */ 485 /* Suspend is in progress, only remove the interface */
483 sysfs_remove_group(&sys_dev->kobj, &mc_attr_group); 486 sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
484 pr_debug("microcode: CPU%d removed\n", cpu); 487 pr_debug("CPU%d removed\n", cpu);
485 break; 488 break;
486 case CPU_DEAD: 489 case CPU_DEAD:
487 case CPU_UP_CANCELED_FROZEN: 490 case CPU_UP_CANCELED_FROZEN:
@@ -507,7 +510,7 @@ static int __init microcode_init(void)
507 microcode_ops = init_amd_microcode(); 510 microcode_ops = init_amd_microcode();
508 511
509 if (!microcode_ops) { 512 if (!microcode_ops) {
510 pr_err("microcode: no support for this CPU vendor\n"); 513 pr_err("no support for this CPU vendor\n");
511 return -ENODEV; 514 return -ENODEV;
512 } 515 }
513 516
@@ -541,8 +544,7 @@ static int __init microcode_init(void)
541 register_hotcpu_notifier(&mc_cpu_notifier); 544 register_hotcpu_notifier(&mc_cpu_notifier);
542 545
543 pr_info("Microcode Update Driver: v" MICROCODE_VERSION 546 pr_info("Microcode Update Driver: v" MICROCODE_VERSION
544 " <tigran@aivazian.fsnet.co.uk>," 547 " <tigran@aivazian.fsnet.co.uk>, Peter Oruba\n");
545 " Peter Oruba\n");
546 548
547 return 0; 549 return 0;
548} 550}
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index 0d334ddd0a96..ebd193e476ca 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -70,6 +70,9 @@
70 * Fix sigmatch() macro to handle old CPUs with pf == 0. 70 * Fix sigmatch() macro to handle old CPUs with pf == 0.
71 * Thanks to Stuart Swales for pointing out this bug. 71 * Thanks to Stuart Swales for pointing out this bug.
72 */ 72 */
73
74#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
75
73#include <linux/firmware.h> 76#include <linux/firmware.h>
74#include <linux/uaccess.h> 77#include <linux/uaccess.h>
75#include <linux/kernel.h> 78#include <linux/kernel.h>
@@ -146,8 +149,7 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
146 149
147 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || 150 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
148 cpu_has(c, X86_FEATURE_IA64)) { 151 cpu_has(c, X86_FEATURE_IA64)) {
149 printk(KERN_ERR "microcode: CPU%d not a capable Intel " 152 pr_err("CPU%d not a capable Intel processor\n", cpu_num);
150 "processor\n", cpu_num);
151 return -1; 153 return -1;
152 } 154 }
153 155
@@ -165,8 +167,8 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
165 /* get the current revision from MSR 0x8B */ 167 /* get the current revision from MSR 0x8B */
166 rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev); 168 rdmsr(MSR_IA32_UCODE_REV, val[0], csig->rev);
167 169
168 printk(KERN_INFO "microcode: CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n", 170 pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n",
169 cpu_num, csig->sig, csig->pf, csig->rev); 171 cpu_num, csig->sig, csig->pf, csig->rev);
170 172
171 return 0; 173 return 0;
172} 174}
@@ -194,28 +196,24 @@ static int microcode_sanity_check(void *mc)
194 data_size = get_datasize(mc_header); 196 data_size = get_datasize(mc_header);
195 197
196 if (data_size + MC_HEADER_SIZE > total_size) { 198 if (data_size + MC_HEADER_SIZE > total_size) {
197 printk(KERN_ERR "microcode: error! " 199 pr_err("error! Bad data size in microcode data file\n");
198 "Bad data size in microcode data file\n");
199 return -EINVAL; 200 return -EINVAL;
200 } 201 }
201 202
202 if (mc_header->ldrver != 1 || mc_header->hdrver != 1) { 203 if (mc_header->ldrver != 1 || mc_header->hdrver != 1) {
203 printk(KERN_ERR "microcode: error! " 204 pr_err("error! Unknown microcode update format\n");
204 "Unknown microcode update format\n");
205 return -EINVAL; 205 return -EINVAL;
206 } 206 }
207 ext_table_size = total_size - (MC_HEADER_SIZE + data_size); 207 ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
208 if (ext_table_size) { 208 if (ext_table_size) {
209 if ((ext_table_size < EXT_HEADER_SIZE) 209 if ((ext_table_size < EXT_HEADER_SIZE)
210 || ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) { 210 || ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) {
211 printk(KERN_ERR "microcode: error! " 211 pr_err("error! Small exttable size in microcode data file\n");
212 "Small exttable size in microcode data file\n");
213 return -EINVAL; 212 return -EINVAL;
214 } 213 }
215 ext_header = mc + MC_HEADER_SIZE + data_size; 214 ext_header = mc + MC_HEADER_SIZE + data_size;
216 if (ext_table_size != exttable_size(ext_header)) { 215 if (ext_table_size != exttable_size(ext_header)) {
217 printk(KERN_ERR "microcode: error! " 216 pr_err("error! Bad exttable size in microcode data file\n");
218 "Bad exttable size in microcode data file\n");
219 return -EFAULT; 217 return -EFAULT;
220 } 218 }
221 ext_sigcount = ext_header->count; 219 ext_sigcount = ext_header->count;
@@ -230,8 +228,7 @@ static int microcode_sanity_check(void *mc)
230 while (i--) 228 while (i--)
231 ext_table_sum += ext_tablep[i]; 229 ext_table_sum += ext_tablep[i];
232 if (ext_table_sum) { 230 if (ext_table_sum) {
233 printk(KERN_WARNING "microcode: aborting, " 231 pr_warning("aborting, bad extended signature table checksum\n");
234 "bad extended signature table checksum\n");
235 return -EINVAL; 232 return -EINVAL;
236 } 233 }
237 } 234 }
@@ -242,7 +239,7 @@ static int microcode_sanity_check(void *mc)
242 while (i--) 239 while (i--)
243 orig_sum += ((int *)mc)[i]; 240 orig_sum += ((int *)mc)[i];
244 if (orig_sum) { 241 if (orig_sum) {
245 printk(KERN_ERR "microcode: aborting, bad checksum\n"); 242 pr_err("aborting, bad checksum\n");
246 return -EINVAL; 243 return -EINVAL;
247 } 244 }
248 if (!ext_table_size) 245 if (!ext_table_size)
@@ -255,7 +252,7 @@ static int microcode_sanity_check(void *mc)
255 - (mc_header->sig + mc_header->pf + mc_header->cksum) 252 - (mc_header->sig + mc_header->pf + mc_header->cksum)
256 + (ext_sig->sig + ext_sig->pf + ext_sig->cksum); 253 + (ext_sig->sig + ext_sig->pf + ext_sig->cksum);
257 if (sum) { 254 if (sum) {
258 printk(KERN_ERR "microcode: aborting, bad checksum\n"); 255 pr_err("aborting, bad checksum\n");
259 return -EINVAL; 256 return -EINVAL;
260 } 257 }
261 } 258 }
@@ -327,13 +324,11 @@ static int apply_microcode(int cpu)
327 rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]); 324 rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]);
328 325
329 if (val[1] != mc_intel->hdr.rev) { 326 if (val[1] != mc_intel->hdr.rev) {
330 printk(KERN_ERR "microcode: CPU%d update " 327 pr_err("CPU%d update to revision 0x%x failed\n",
331 "to revision 0x%x failed\n", 328 cpu_num, mc_intel->hdr.rev);
332 cpu_num, mc_intel->hdr.rev);
333 return -1; 329 return -1;
334 } 330 }
335 printk(KERN_INFO "microcode: CPU%d updated to revision " 331 pr_info("CPU%d updated to revision 0x%x, date = %04x-%02x-%02x \n",
336 "0x%x, date = %04x-%02x-%02x \n",
337 cpu_num, val[1], 332 cpu_num, val[1],
338 mc_intel->hdr.date & 0xffff, 333 mc_intel->hdr.date & 0xffff,
339 mc_intel->hdr.date >> 24, 334 mc_intel->hdr.date >> 24,
@@ -362,8 +357,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
362 357
363 mc_size = get_totalsize(&mc_header); 358 mc_size = get_totalsize(&mc_header);
364 if (!mc_size || mc_size > leftover) { 359 if (!mc_size || mc_size > leftover) {
365 printk(KERN_ERR "microcode: error!" 360 pr_err("error! Bad data in microcode data file\n");
366 "Bad data in microcode data file\n");
367 break; 361 break;
368 } 362 }
369 363
@@ -405,9 +399,8 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
405 vfree(uci->mc); 399 vfree(uci->mc);
406 uci->mc = (struct microcode_intel *)new_mc; 400 uci->mc = (struct microcode_intel *)new_mc;
407 401
408 pr_debug("microcode: CPU%d found a matching microcode update with" 402 pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",
409 " version 0x%x (current=0x%x)\n", 403 cpu, new_rev, uci->cpu_sig.rev);
410 cpu, new_rev, uci->cpu_sig.rev);
411out: 404out:
412 return state; 405 return state;
413} 406}
@@ -429,7 +422,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
429 c->x86, c->x86_model, c->x86_mask); 422 c->x86, c->x86_model, c->x86_mask);
430 423
431 if (request_firmware(&firmware, name, device)) { 424 if (request_firmware(&firmware, name, device)) {
432 pr_debug("microcode: data file %s load failed\n", name); 425 pr_debug("data file %s load failed\n", name);
433 return UCODE_NFOUND; 426 return UCODE_NFOUND;
434 } 427 }
435 428
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 35a57c963df9..40b54ceb68b5 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -945,9 +945,6 @@ void __init early_reserve_e820_mpc_new(void)
945{ 945{
946 if (enable_update_mptable && alloc_mptable) { 946 if (enable_update_mptable && alloc_mptable) {
947 u64 startt = 0; 947 u64 startt = 0;
948#ifdef CONFIG_X86_TRAMPOLINE
949 startt = TRAMPOLINE_BASE;
950#endif
951 mpc_new_phys = early_reserve_e820(startt, mpc_new_length, 4); 948 mpc_new_phys = early_reserve_e820(startt, mpc_new_length, 4);
952 } 949 }
953} 950}
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 553449951b84..572b07eee3f4 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -172,11 +172,10 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
172 172
173static int msr_open(struct inode *inode, struct file *file) 173static int msr_open(struct inode *inode, struct file *file)
174{ 174{
175 unsigned int cpu = iminor(file->f_path.dentry->d_inode); 175 unsigned int cpu;
176 struct cpuinfo_x86 *c = &cpu_data(cpu); 176 struct cpuinfo_x86 *c;
177 177
178 cpu = iminor(file->f_path.dentry->d_inode); 178 cpu = iminor(file->f_path.dentry->d_inode);
179
180 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) 179 if (cpu >= nr_cpu_ids || !cpu_online(cpu))
181 return -ENXIO; /* No such CPU */ 180 return -ENXIO; /* No such CPU */
182 181
diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
index 4006c522adc7..9d1d263f786f 100644
--- a/arch/x86/kernel/olpc.c
+++ b/arch/x86/kernel/olpc.c
@@ -212,7 +212,7 @@ static int __init olpc_init(void)
212 unsigned char *romsig; 212 unsigned char *romsig;
213 213
214 /* The ioremap check is dangerous; limit what we run it on */ 214 /* The ioremap check is dangerous; limit what we run it on */
215 if (!is_geode() || geode_has_vsa2()) 215 if (!is_geode() || cs5535_has_vsa2())
216 return 0; 216 return 0;
217 217
218 spin_lock_init(&ec_lock); 218 spin_lock_init(&ec_lock);
@@ -244,7 +244,7 @@ static int __init olpc_init(void)
244 (unsigned char *) &olpc_platform_info.ecver, 1); 244 (unsigned char *) &olpc_platform_info.ecver, 1);
245 245
246 /* check to see if the VSA exists */ 246 /* check to see if the VSA exists */
247 if (geode_has_vsa2()) 247 if (cs5535_has_vsa2())
248 olpc_platform_info.flags |= OLPC_F_VSA; 248 olpc_platform_info.flags |= OLPC_F_VSA;
249 249
250 printk(KERN_INFO "OLPC board revision %s%X (EC=%x)\n", 250 printk(KERN_INFO "OLPC board revision %s%X (EC=%x)\n",
diff --git a/arch/x86/kernel/paravirt-spinlocks.c b/arch/x86/kernel/paravirt-spinlocks.c
index 3a7c5a44082e..676b8c77a976 100644
--- a/arch/x86/kernel/paravirt-spinlocks.c
+++ b/arch/x86/kernel/paravirt-spinlocks.c
@@ -8,9 +8,9 @@
8#include <asm/paravirt.h> 8#include <asm/paravirt.h>
9 9
10static inline void 10static inline void
11default_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 11default_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
12{ 12{
13 __raw_spin_lock(lock); 13 arch_spin_lock(lock);
14} 14}
15 15
16struct pv_lock_ops pv_lock_ops = { 16struct pv_lock_ops pv_lock_ops = {
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index c563e4c8ff39..2bbde6078143 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -31,7 +31,7 @@
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/crash_dump.h> 32#include <linux/crash_dump.h>
33#include <linux/dma-mapping.h> 33#include <linux/dma-mapping.h>
34#include <linux/bitops.h> 34#include <linux/bitmap.h>
35#include <linux/pci_ids.h> 35#include <linux/pci_ids.h>
36#include <linux/pci.h> 36#include <linux/pci.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
@@ -212,7 +212,7 @@ static void iommu_range_reserve(struct iommu_table *tbl,
212 212
213 spin_lock_irqsave(&tbl->it_lock, flags); 213 spin_lock_irqsave(&tbl->it_lock, flags);
214 214
215 iommu_area_reserve(tbl->it_map, index, npages); 215 bitmap_set(tbl->it_map, index, npages);
216 216
217 spin_unlock_irqrestore(&tbl->it_lock, flags); 217 spin_unlock_irqrestore(&tbl->it_lock, flags);
218} 218}
@@ -303,7 +303,7 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
303 303
304 spin_lock_irqsave(&tbl->it_lock, flags); 304 spin_lock_irqsave(&tbl->it_lock, flags);
305 305
306 iommu_area_free(tbl->it_map, entry, npages); 306 bitmap_clear(tbl->it_map, entry, npages);
307 307
308 spin_unlock_irqrestore(&tbl->it_lock, flags); 308 spin_unlock_irqrestore(&tbl->it_lock, flags);
309} 309}
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index afcc58b69c7c..75e14e21f61a 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -124,8 +124,8 @@ void __init pci_iommu_alloc(void)
124 /* free the range so iommu could get some range less than 4G */ 124 /* free the range so iommu could get some range less than 4G */
125 dma32_free_bootmem(); 125 dma32_free_bootmem();
126#endif 126#endif
127 if (pci_swiotlb_init()) 127 if (pci_swiotlb_detect())
128 return; 128 goto out;
129 129
130 gart_iommu_hole_init(); 130 gart_iommu_hole_init();
131 131
@@ -135,6 +135,8 @@ void __init pci_iommu_alloc(void)
135 135
136 /* needs to be called after gart_iommu_hole_init */ 136 /* needs to be called after gart_iommu_hole_init */
137 amd_iommu_detect(); 137 amd_iommu_detect();
138out:
139 pci_swiotlb_init();
138} 140}
139 141
140void *dma_generic_alloc_coherent(struct device *dev, size_t size, 142void *dma_generic_alloc_coherent(struct device *dev, size_t size,
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index e6a0d402f171..34de53b46f87 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -23,7 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/topology.h> 24#include <linux/topology.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/bitops.h> 26#include <linux/bitmap.h>
27#include <linux/kdebug.h> 27#include <linux/kdebug.h>
28#include <linux/scatterlist.h> 28#include <linux/scatterlist.h>
29#include <linux/iommu-helper.h> 29#include <linux/iommu-helper.h>
@@ -126,7 +126,7 @@ static void free_iommu(unsigned long offset, int size)
126 unsigned long flags; 126 unsigned long flags;
127 127
128 spin_lock_irqsave(&iommu_bitmap_lock, flags); 128 spin_lock_irqsave(&iommu_bitmap_lock, flags);
129 iommu_area_free(iommu_gart_bitmap, offset, size); 129 bitmap_clear(iommu_gart_bitmap, offset, size);
130 if (offset >= next_bit) 130 if (offset >= next_bit)
131 next_bit = offset + size; 131 next_bit = offset + size;
132 spin_unlock_irqrestore(&iommu_bitmap_lock, flags); 132 spin_unlock_irqrestore(&iommu_bitmap_lock, flags);
@@ -710,7 +710,8 @@ static void gart_iommu_shutdown(void)
710 struct pci_dev *dev; 710 struct pci_dev *dev;
711 int i; 711 int i;
712 712
713 if (no_agp) 713 /* don't shutdown it if there is AGP installed */
714 if (!no_agp)
714 return; 715 return;
715 716
716 for (i = 0; i < num_k8_northbridges; i++) { 717 for (i = 0; i < num_k8_northbridges; i++) {
@@ -791,7 +792,7 @@ int __init gart_iommu_init(void)
791 * Out of IOMMU space handling. 792 * Out of IOMMU space handling.
792 * Reserve some invalid pages at the beginning of the GART. 793 * Reserve some invalid pages at the beginning of the GART.
793 */ 794 */
794 iommu_area_reserve(iommu_gart_bitmap, 0, EMERGENCY_PAGES); 795 bitmap_set(iommu_gart_bitmap, 0, EMERGENCY_PAGES);
795 796
796 pr_info("PCI-DMA: Reserving %luMB of IOMMU area in the AGP aperture\n", 797 pr_info("PCI-DMA: Reserving %luMB of IOMMU area in the AGP aperture\n",
797 iommu_size >> 20); 798 iommu_size >> 20);
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index e3c0a66b9e77..7d2829dde20e 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -43,12 +43,12 @@ static struct dma_map_ops swiotlb_dma_ops = {
43}; 43};
44 44
45/* 45/*
46 * pci_swiotlb_init - initialize swiotlb if necessary 46 * pci_swiotlb_detect - set swiotlb to 1 if necessary
47 * 47 *
48 * This returns non-zero if we are forced to use swiotlb (by the boot 48 * This returns non-zero if we are forced to use swiotlb (by the boot
49 * option). 49 * option).
50 */ 50 */
51int __init pci_swiotlb_init(void) 51int __init pci_swiotlb_detect(void)
52{ 52{
53 int use_swiotlb = swiotlb | swiotlb_force; 53 int use_swiotlb = swiotlb | swiotlb_force;
54 54
@@ -60,10 +60,13 @@ int __init pci_swiotlb_init(void)
60 if (swiotlb_force) 60 if (swiotlb_force)
61 swiotlb = 1; 61 swiotlb = 1;
62 62
63 return use_swiotlb;
64}
65
66void __init pci_swiotlb_init(void)
67{
63 if (swiotlb) { 68 if (swiotlb) {
64 swiotlb_init(0); 69 swiotlb_init(0);
65 dma_ops = &swiotlb_dma_ops; 70 dma_ops = &swiotlb_dma_ops;
66 } 71 }
67
68 return use_swiotlb;
69} 72}
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 5e2ba634ea15..98c2cdeb599e 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -10,6 +10,8 @@
10#include <linux/clockchips.h> 10#include <linux/clockchips.h>
11#include <linux/random.h> 11#include <linux/random.h>
12#include <linux/user-return-notifier.h> 12#include <linux/user-return-notifier.h>
13#include <linux/dmi.h>
14#include <linux/utsname.h>
13#include <trace/events/power.h> 15#include <trace/events/power.h>
14#include <linux/hw_breakpoint.h> 16#include <linux/hw_breakpoint.h>
15#include <asm/system.h> 17#include <asm/system.h>
@@ -90,6 +92,25 @@ void exit_thread(void)
90 } 92 }
91} 93}
92 94
95void show_regs_common(void)
96{
97 const char *board, *product;
98
99 board = dmi_get_system_info(DMI_BOARD_NAME);
100 if (!board)
101 board = "";
102 product = dmi_get_system_info(DMI_PRODUCT_NAME);
103 if (!product)
104 product = "";
105
106 printk("\n");
107 printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s/%s\n",
108 current->pid, current->comm, print_tainted(),
109 init_utsname()->release,
110 (int)strcspn(init_utsname()->version, " "),
111 init_utsname()->version, board, product);
112}
113
93void flush_thread(void) 114void flush_thread(void)
94{ 115{
95 struct task_struct *tsk = current; 116 struct task_struct *tsk = current;
@@ -234,6 +255,76 @@ int sys_vfork(struct pt_regs *regs)
234 NULL, NULL); 255 NULL, NULL);
235} 256}
236 257
258long
259sys_clone(unsigned long clone_flags, unsigned long newsp,
260 void __user *parent_tid, void __user *child_tid, struct pt_regs *regs)
261{
262 if (!newsp)
263 newsp = regs->sp;
264 return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
265}
266
267/*
268 * This gets run with %si containing the
269 * function to call, and %di containing
270 * the "args".
271 */
272extern void kernel_thread_helper(void);
273
274/*
275 * Create a kernel thread
276 */
277int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
278{
279 struct pt_regs regs;
280
281 memset(&regs, 0, sizeof(regs));
282
283 regs.si = (unsigned long) fn;
284 regs.di = (unsigned long) arg;
285
286#ifdef CONFIG_X86_32
287 regs.ds = __USER_DS;
288 regs.es = __USER_DS;
289 regs.fs = __KERNEL_PERCPU;
290 regs.gs = __KERNEL_STACK_CANARY;
291#endif
292
293 regs.orig_ax = -1;
294 regs.ip = (unsigned long) kernel_thread_helper;
295 regs.cs = __KERNEL_CS | get_kernel_rpl();
296 regs.flags = X86_EFLAGS_IF | 0x2;
297
298 /* Ok, create the new process.. */
299 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
300}
301EXPORT_SYMBOL(kernel_thread);
302
303/*
304 * sys_execve() executes a new program.
305 */
306long sys_execve(char __user *name, char __user * __user *argv,
307 char __user * __user *envp, struct pt_regs *regs)
308{
309 long error;
310 char *filename;
311
312 filename = getname(name);
313 error = PTR_ERR(filename);
314 if (IS_ERR(filename))
315 return error;
316 error = do_execve(filename, argv, envp, regs);
317
318#ifdef CONFIG_X86_32
319 if (error == 0) {
320 /* Make sure we don't return using sysenter.. */
321 set_thread_flag(TIF_IRET);
322 }
323#endif
324
325 putname(filename);
326 return error;
327}
237 328
238/* 329/*
239 * Idle related variables and functions 330 * Idle related variables and functions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 075580b35682..9c517b5858f0 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -23,7 +23,6 @@
23#include <linux/vmalloc.h> 23#include <linux/vmalloc.h>
24#include <linux/user.h> 24#include <linux/user.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/utsname.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/reboot.h> 27#include <linux/reboot.h>
29#include <linux/init.h> 28#include <linux/init.h>
@@ -35,7 +34,6 @@
35#include <linux/tick.h> 34#include <linux/tick.h>
36#include <linux/percpu.h> 35#include <linux/percpu.h>
37#include <linux/prctl.h> 36#include <linux/prctl.h>
38#include <linux/dmi.h>
39#include <linux/ftrace.h> 37#include <linux/ftrace.h>
40#include <linux/uaccess.h> 38#include <linux/uaccess.h>
41#include <linux/io.h> 39#include <linux/io.h>
@@ -128,7 +126,6 @@ void __show_regs(struct pt_regs *regs, int all)
128 unsigned long d0, d1, d2, d3, d6, d7; 126 unsigned long d0, d1, d2, d3, d6, d7;
129 unsigned long sp; 127 unsigned long sp;
130 unsigned short ss, gs; 128 unsigned short ss, gs;
131 const char *board;
132 129
133 if (user_mode_vm(regs)) { 130 if (user_mode_vm(regs)) {
134 sp = regs->sp; 131 sp = regs->sp;
@@ -140,16 +137,7 @@ void __show_regs(struct pt_regs *regs, int all)
140 savesegment(gs, gs); 137 savesegment(gs, gs);
141 } 138 }
142 139
143 printk("\n"); 140 show_regs_common();
144
145 board = dmi_get_system_info(DMI_PRODUCT_NAME);
146 if (!board)
147 board = "";
148 printk("Pid: %d, comm: %s %s (%s %.*s) %s\n",
149 task_pid_nr(current), current->comm,
150 print_tainted(), init_utsname()->release,
151 (int)strcspn(init_utsname()->version, " "),
152 init_utsname()->version, board);
153 141
154 printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n", 142 printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n",
155 (u16)regs->cs, regs->ip, regs->flags, 143 (u16)regs->cs, regs->ip, regs->flags,
@@ -192,39 +180,6 @@ void show_regs(struct pt_regs *regs)
192 show_trace(NULL, regs, &regs->sp, regs->bp); 180 show_trace(NULL, regs, &regs->sp, regs->bp);
193} 181}
194 182
195/*
196 * This gets run with %bx containing the
197 * function to call, and %dx containing
198 * the "args".
199 */
200extern void kernel_thread_helper(void);
201
202/*
203 * Create a kernel thread
204 */
205int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
206{
207 struct pt_regs regs;
208
209 memset(&regs, 0, sizeof(regs));
210
211 regs.bx = (unsigned long) fn;
212 regs.dx = (unsigned long) arg;
213
214 regs.ds = __USER_DS;
215 regs.es = __USER_DS;
216 regs.fs = __KERNEL_PERCPU;
217 regs.gs = __KERNEL_STACK_CANARY;
218 regs.orig_ax = -1;
219 regs.ip = (unsigned long) kernel_thread_helper;
220 regs.cs = __KERNEL_CS | get_kernel_rpl();
221 regs.flags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
222
223 /* Ok, create the new process.. */
224 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
225}
226EXPORT_SYMBOL(kernel_thread);
227
228void release_thread(struct task_struct *dead_task) 183void release_thread(struct task_struct *dead_task)
229{ 184{
230 BUG_ON(dead_task->mm); 185 BUG_ON(dead_task->mm);
@@ -436,46 +391,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
436 return prev_p; 391 return prev_p;
437} 392}
438 393
439int sys_clone(struct pt_regs *regs)
440{
441 unsigned long clone_flags;
442 unsigned long newsp;
443 int __user *parent_tidptr, *child_tidptr;
444
445 clone_flags = regs->bx;
446 newsp = regs->cx;
447 parent_tidptr = (int __user *)regs->dx;
448 child_tidptr = (int __user *)regs->di;
449 if (!newsp)
450 newsp = regs->sp;
451 return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr);
452}
453
454/*
455 * sys_execve() executes a new program.
456 */
457int sys_execve(struct pt_regs *regs)
458{
459 int error;
460 char *filename;
461
462 filename = getname((char __user *) regs->bx);
463 error = PTR_ERR(filename);
464 if (IS_ERR(filename))
465 goto out;
466 error = do_execve(filename,
467 (char __user * __user *) regs->cx,
468 (char __user * __user *) regs->dx,
469 regs);
470 if (error == 0) {
471 /* Make sure we don't return using sysenter.. */
472 set_thread_flag(TIF_IRET);
473 }
474 putname(filename);
475out:
476 return error;
477}
478
479#define top_esp (THREAD_SIZE - sizeof(unsigned long)) 394#define top_esp (THREAD_SIZE - sizeof(unsigned long))
480#define top_ebp (THREAD_SIZE - 2*sizeof(unsigned long)) 395#define top_ebp (THREAD_SIZE - 2*sizeof(unsigned long))
481 396
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index c95c8f4e790a..52fbd0c60198 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -26,7 +26,6 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/user.h> 27#include <linux/user.h>
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/utsname.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/ptrace.h> 31#include <linux/ptrace.h>
@@ -38,7 +37,6 @@
38#include <linux/uaccess.h> 37#include <linux/uaccess.h>
39#include <linux/io.h> 38#include <linux/io.h>
40#include <linux/ftrace.h> 39#include <linux/ftrace.h>
41#include <linux/dmi.h>
42 40
43#include <asm/pgtable.h> 41#include <asm/pgtable.h>
44#include <asm/system.h> 42#include <asm/system.h>
@@ -59,8 +57,6 @@ asmlinkage extern void ret_from_fork(void);
59DEFINE_PER_CPU(unsigned long, old_rsp); 57DEFINE_PER_CPU(unsigned long, old_rsp);
60static DEFINE_PER_CPU(unsigned char, is_idle); 58static DEFINE_PER_CPU(unsigned char, is_idle);
61 59
62unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
63
64static ATOMIC_NOTIFIER_HEAD(idle_notifier); 60static ATOMIC_NOTIFIER_HEAD(idle_notifier);
65 61
66void idle_notifier_register(struct notifier_block *n) 62void idle_notifier_register(struct notifier_block *n)
@@ -163,18 +159,8 @@ void __show_regs(struct pt_regs *regs, int all)
163 unsigned long d0, d1, d2, d3, d6, d7; 159 unsigned long d0, d1, d2, d3, d6, d7;
164 unsigned int fsindex, gsindex; 160 unsigned int fsindex, gsindex;
165 unsigned int ds, cs, es; 161 unsigned int ds, cs, es;
166 const char *board; 162
167 163 show_regs_common();
168 printk("\n");
169 print_modules();
170 board = dmi_get_system_info(DMI_PRODUCT_NAME);
171 if (!board)
172 board = "";
173 printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s\n",
174 current->pid, current->comm, print_tainted(),
175 init_utsname()->release,
176 (int)strcspn(init_utsname()->version, " "),
177 init_utsname()->version, board);
178 printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip); 164 printk(KERN_INFO "RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->ip);
179 printk_address(regs->ip, 1); 165 printk_address(regs->ip, 1);
180 printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, 166 printk(KERN_INFO "RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss,
@@ -285,8 +271,9 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
285 *childregs = *regs; 271 *childregs = *regs;
286 272
287 childregs->ax = 0; 273 childregs->ax = 0;
288 childregs->sp = sp; 274 if (user_mode(regs))
289 if (sp == ~0UL) 275 childregs->sp = sp;
276 else
290 childregs->sp = (unsigned long)childregs; 277 childregs->sp = (unsigned long)childregs;
291 278
292 p->thread.sp = (unsigned long) childregs; 279 p->thread.sp = (unsigned long) childregs;
@@ -520,25 +507,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
520 return prev_p; 507 return prev_p;
521} 508}
522 509
523/*
524 * sys_execve() executes a new program.
525 */
526asmlinkage
527long sys_execve(char __user *name, char __user * __user *argv,
528 char __user * __user *envp, struct pt_regs *regs)
529{
530 long error;
531 char *filename;
532
533 filename = getname(name);
534 error = PTR_ERR(filename);
535 if (IS_ERR(filename))
536 return error;
537 error = do_execve(filename, argv, envp, regs);
538 putname(filename);
539 return error;
540}
541
542void set_personality_64bit(void) 510void set_personality_64bit(void)
543{ 511{
544 /* inherit personality from parent */ 512 /* inherit personality from parent */
@@ -553,15 +521,6 @@ void set_personality_64bit(void)
553 current->personality &= ~READ_IMPLIES_EXEC; 521 current->personality &= ~READ_IMPLIES_EXEC;
554} 522}
555 523
556asmlinkage long
557sys_clone(unsigned long clone_flags, unsigned long newsp,
558 void __user *parent_tid, void __user *child_tid, struct pt_regs *regs)
559{
560 if (!newsp)
561 newsp = regs->sp;
562 return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
563}
564
565unsigned long get_wchan(struct task_struct *p) 524unsigned long get_wchan(struct task_struct *p)
566{ 525{
567 unsigned long stack; 526 unsigned long stack;
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 04d182a7cfdb..017d937639fe 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -509,14 +509,14 @@ static int genregs_get(struct task_struct *target,
509{ 509{
510 if (kbuf) { 510 if (kbuf) {
511 unsigned long *k = kbuf; 511 unsigned long *k = kbuf;
512 while (count > 0) { 512 while (count >= sizeof(*k)) {
513 *k++ = getreg(target, pos); 513 *k++ = getreg(target, pos);
514 count -= sizeof(*k); 514 count -= sizeof(*k);
515 pos += sizeof(*k); 515 pos += sizeof(*k);
516 } 516 }
517 } else { 517 } else {
518 unsigned long __user *u = ubuf; 518 unsigned long __user *u = ubuf;
519 while (count > 0) { 519 while (count >= sizeof(*u)) {
520 if (__put_user(getreg(target, pos), u++)) 520 if (__put_user(getreg(target, pos), u++))
521 return -EFAULT; 521 return -EFAULT;
522 count -= sizeof(*u); 522 count -= sizeof(*u);
@@ -535,14 +535,14 @@ static int genregs_set(struct task_struct *target,
535 int ret = 0; 535 int ret = 0;
536 if (kbuf) { 536 if (kbuf) {
537 const unsigned long *k = kbuf; 537 const unsigned long *k = kbuf;
538 while (count > 0 && !ret) { 538 while (count >= sizeof(*k) && !ret) {
539 ret = putreg(target, pos, *k++); 539 ret = putreg(target, pos, *k++);
540 count -= sizeof(*k); 540 count -= sizeof(*k);
541 pos += sizeof(*k); 541 pos += sizeof(*k);
542 } 542 }
543 } else { 543 } else {
544 const unsigned long __user *u = ubuf; 544 const unsigned long __user *u = ubuf;
545 while (count > 0 && !ret) { 545 while (count >= sizeof(*u) && !ret) {
546 unsigned long word; 546 unsigned long word;
547 ret = __get_user(word, u++); 547 ret = __get_user(word, u++);
548 if (ret) 548 if (ret)
@@ -555,7 +555,9 @@ static int genregs_set(struct task_struct *target,
555 return ret; 555 return ret;
556} 556}
557 557
558static void ptrace_triggered(struct perf_event *bp, void *data) 558static void ptrace_triggered(struct perf_event *bp, int nmi,
559 struct perf_sample_data *data,
560 struct pt_regs *regs)
559{ 561{
560 int i; 562 int i;
561 struct thread_struct *thread = &(current->thread); 563 struct thread_struct *thread = &(current->thread);
@@ -593,13 +595,13 @@ static unsigned long ptrace_get_dr7(struct perf_event *bp[])
593 return dr7; 595 return dr7;
594} 596}
595 597
596static struct perf_event * 598static int
597ptrace_modify_breakpoint(struct perf_event *bp, int len, int type, 599ptrace_modify_breakpoint(struct perf_event *bp, int len, int type,
598 struct task_struct *tsk, int disabled) 600 struct task_struct *tsk, int disabled)
599{ 601{
600 int err; 602 int err;
601 int gen_len, gen_type; 603 int gen_len, gen_type;
602 DEFINE_BREAKPOINT_ATTR(attr); 604 struct perf_event_attr attr;
603 605
604 /* 606 /*
605 * We shoud have at least an inactive breakpoint at this 607 * We shoud have at least an inactive breakpoint at this
@@ -607,18 +609,18 @@ ptrace_modify_breakpoint(struct perf_event *bp, int len, int type,
607 * written the address register first 609 * written the address register first
608 */ 610 */
609 if (!bp) 611 if (!bp)
610 return ERR_PTR(-EINVAL); 612 return -EINVAL;
611 613
612 err = arch_bp_generic_fields(len, type, &gen_len, &gen_type); 614 err = arch_bp_generic_fields(len, type, &gen_len, &gen_type);
613 if (err) 615 if (err)
614 return ERR_PTR(err); 616 return err;
615 617
616 attr = bp->attr; 618 attr = bp->attr;
617 attr.bp_len = gen_len; 619 attr.bp_len = gen_len;
618 attr.bp_type = gen_type; 620 attr.bp_type = gen_type;
619 attr.disabled = disabled; 621 attr.disabled = disabled;
620 622
621 return modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk); 623 return modify_user_hw_breakpoint(bp, &attr);
622} 624}
623 625
624/* 626/*
@@ -656,28 +658,17 @@ restore:
656 if (!second_pass) 658 if (!second_pass)
657 continue; 659 continue;
658 660
659 thread->ptrace_bps[i] = NULL; 661 rc = ptrace_modify_breakpoint(bp, len, type,
660 bp = ptrace_modify_breakpoint(bp, len, type,
661 tsk, 1); 662 tsk, 1);
662 if (IS_ERR(bp)) { 663 if (rc)
663 rc = PTR_ERR(bp);
664 thread->ptrace_bps[i] = NULL;
665 break; 664 break;
666 }
667 thread->ptrace_bps[i] = bp;
668 } 665 }
669 continue; 666 continue;
670 } 667 }
671 668
672 bp = ptrace_modify_breakpoint(bp, len, type, tsk, 0); 669 rc = ptrace_modify_breakpoint(bp, len, type, tsk, 0);
673 670 if (rc)
674 /* Incorrect bp, or we have a bug in bp API */
675 if (IS_ERR(bp)) {
676 rc = PTR_ERR(bp);
677 thread->ptrace_bps[i] = NULL;
678 break; 671 break;
679 }
680 thread->ptrace_bps[i] = bp;
681 } 672 }
682 /* 673 /*
683 * Make a second pass to free the remaining unused breakpoints 674 * Make a second pass to free the remaining unused breakpoints
@@ -721,9 +712,10 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,
721{ 712{
722 struct perf_event *bp; 713 struct perf_event *bp;
723 struct thread_struct *t = &tsk->thread; 714 struct thread_struct *t = &tsk->thread;
724 DEFINE_BREAKPOINT_ATTR(attr); 715 struct perf_event_attr attr;
725 716
726 if (!t->ptrace_bps[nr]) { 717 if (!t->ptrace_bps[nr]) {
718 hw_breakpoint_init(&attr);
727 /* 719 /*
728 * Put stub len and type to register (reserve) an inactive but 720 * Put stub len and type to register (reserve) an inactive but
729 * correct bp 721 * correct bp
@@ -734,26 +726,32 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,
734 attr.disabled = 1; 726 attr.disabled = 1;
735 727
736 bp = register_user_hw_breakpoint(&attr, ptrace_triggered, tsk); 728 bp = register_user_hw_breakpoint(&attr, ptrace_triggered, tsk);
729
730 /*
731 * CHECKME: the previous code returned -EIO if the addr wasn't
732 * a valid task virtual addr. The new one will return -EINVAL in
733 * this case.
734 * -EINVAL may be what we want for in-kernel breakpoints users,
735 * but -EIO looks better for ptrace, since we refuse a register
736 * writing for the user. And anyway this is the previous
737 * behaviour.
738 */
739 if (IS_ERR(bp))
740 return PTR_ERR(bp);
741
742 t->ptrace_bps[nr] = bp;
737 } else { 743 } else {
744 int err;
745
738 bp = t->ptrace_bps[nr]; 746 bp = t->ptrace_bps[nr];
739 t->ptrace_bps[nr] = NULL;
740 747
741 attr = bp->attr; 748 attr = bp->attr;
742 attr.bp_addr = addr; 749 attr.bp_addr = addr;
743 bp = modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk); 750 err = modify_user_hw_breakpoint(bp, &attr);
751 if (err)
752 return err;
744 } 753 }
745 /*
746 * CHECKME: the previous code returned -EIO if the addr wasn't a
747 * valid task virtual addr. The new one will return -EINVAL in this
748 * case.
749 * -EINVAL may be what we want for in-kernel breakpoints users, but
750 * -EIO looks better for ptrace, since we refuse a register writing
751 * for the user. And anyway this is the previous behaviour.
752 */
753 if (IS_ERR(bp))
754 return PTR_ERR(bp);
755 754
756 t->ptrace_bps[nr] = bp;
757 755
758 return 0; 756 return 0;
759} 757}
@@ -1460,14 +1458,14 @@ static int genregs32_get(struct task_struct *target,
1460{ 1458{
1461 if (kbuf) { 1459 if (kbuf) {
1462 compat_ulong_t *k = kbuf; 1460 compat_ulong_t *k = kbuf;
1463 while (count > 0) { 1461 while (count >= sizeof(*k)) {
1464 getreg32(target, pos, k++); 1462 getreg32(target, pos, k++);
1465 count -= sizeof(*k); 1463 count -= sizeof(*k);
1466 pos += sizeof(*k); 1464 pos += sizeof(*k);
1467 } 1465 }
1468 } else { 1466 } else {
1469 compat_ulong_t __user *u = ubuf; 1467 compat_ulong_t __user *u = ubuf;
1470 while (count > 0) { 1468 while (count >= sizeof(*u)) {
1471 compat_ulong_t word; 1469 compat_ulong_t word;
1472 getreg32(target, pos, &word); 1470 getreg32(target, pos, &word);
1473 if (__put_user(word, u++)) 1471 if (__put_user(word, u++))
@@ -1488,14 +1486,14 @@ static int genregs32_set(struct task_struct *target,
1488 int ret = 0; 1486 int ret = 0;
1489 if (kbuf) { 1487 if (kbuf) {
1490 const compat_ulong_t *k = kbuf; 1488 const compat_ulong_t *k = kbuf;
1491 while (count > 0 && !ret) { 1489 while (count >= sizeof(*k) && !ret) {
1492 ret = putreg32(target, pos, *k++); 1490 ret = putreg32(target, pos, *k++);
1493 count -= sizeof(*k); 1491 count -= sizeof(*k);
1494 pos += sizeof(*k); 1492 pos += sizeof(*k);
1495 } 1493 }
1496 } else { 1494 } else {
1497 const compat_ulong_t __user *u = ubuf; 1495 const compat_ulong_t __user *u = ubuf;
1498 while (count > 0 && !ret) { 1496 while (count >= sizeof(*u) && !ret) {
1499 compat_ulong_t word; 1497 compat_ulong_t word;
1500 ret = __get_user(word, u++); 1498 ret = __get_user(word, u++);
1501 if (ret) 1499 if (ret)
@@ -1678,21 +1676,33 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
1678#endif 1676#endif
1679} 1677}
1680 1678
1681void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, 1679static void fill_sigtrap_info(struct task_struct *tsk,
1682 int error_code, int si_code) 1680 struct pt_regs *regs,
1681 int error_code, int si_code,
1682 struct siginfo *info)
1683{ 1683{
1684 struct siginfo info;
1685
1686 tsk->thread.trap_no = 1; 1684 tsk->thread.trap_no = 1;
1687 tsk->thread.error_code = error_code; 1685 tsk->thread.error_code = error_code;
1688 1686
1689 memset(&info, 0, sizeof(info)); 1687 memset(info, 0, sizeof(*info));
1690 info.si_signo = SIGTRAP; 1688 info->si_signo = SIGTRAP;
1691 info.si_code = si_code; 1689 info->si_code = si_code;
1690 info->si_addr = user_mode_vm(regs) ? (void __user *)regs->ip : NULL;
1691}
1692
1693void user_single_step_siginfo(struct task_struct *tsk,
1694 struct pt_regs *regs,
1695 struct siginfo *info)
1696{
1697 fill_sigtrap_info(tsk, regs, 0, TRAP_BRKPT, info);
1698}
1692 1699
1693 /* User-mode ip? */ 1700void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
1694 info.si_addr = user_mode_vm(regs) ? (void __user *) regs->ip : NULL; 1701 int error_code, int si_code)
1702{
1703 struct siginfo info;
1695 1704
1705 fill_sigtrap_info(tsk, regs, error_code, si_code, &info);
1696 /* Send us the fake SIGTRAP */ 1706 /* Send us the fake SIGTRAP */
1697 force_sig_info(SIGTRAP, &info, tsk); 1707 force_sig_info(SIGTRAP, &info, tsk);
1698} 1708}
@@ -1757,29 +1767,22 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)
1757 1767
1758asmregparm void syscall_trace_leave(struct pt_regs *regs) 1768asmregparm void syscall_trace_leave(struct pt_regs *regs)
1759{ 1769{
1770 bool step;
1771
1760 if (unlikely(current->audit_context)) 1772 if (unlikely(current->audit_context))
1761 audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); 1773 audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax);
1762 1774
1763 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) 1775 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
1764 trace_sys_exit(regs, regs->ax); 1776 trace_sys_exit(regs, regs->ax);
1765 1777
1766 if (test_thread_flag(TIF_SYSCALL_TRACE))
1767 tracehook_report_syscall_exit(regs, 0);
1768
1769 /* 1778 /*
1770 * If TIF_SYSCALL_EMU is set, we only get here because of 1779 * If TIF_SYSCALL_EMU is set, we only get here because of
1771 * TIF_SINGLESTEP (i.e. this is PTRACE_SYSEMU_SINGLESTEP). 1780 * TIF_SINGLESTEP (i.e. this is PTRACE_SYSEMU_SINGLESTEP).
1772 * We already reported this syscall instruction in 1781 * We already reported this syscall instruction in
1773 * syscall_trace_enter(), so don't do any more now. 1782 * syscall_trace_enter().
1774 */
1775 if (unlikely(test_thread_flag(TIF_SYSCALL_EMU)))
1776 return;
1777
1778 /*
1779 * If we are single-stepping, synthesize a trap to follow the
1780 * system call instruction.
1781 */ 1783 */
1782 if (test_thread_flag(TIF_SINGLESTEP) && 1784 step = unlikely(test_thread_flag(TIF_SINGLESTEP)) &&
1783 tracehook_consider_fatal_signal(current, SIGTRAP)) 1785 !test_thread_flag(TIF_SYSCALL_EMU);
1784 send_sigtrap(current, regs, 0, TRAP_BRKPT); 1786 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
1787 tracehook_report_syscall_exit(regs, step);
1785} 1788}
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 2b97fc5b124e..1545bc0c9845 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -259,6 +259,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
259 DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"), 259 DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
260 }, 260 },
261 }, 261 },
262 { /* Handle problems with rebooting on ASUS P4S800 */
263 .callback = set_bios_reboot,
264 .ident = "ASUS P4S800",
265 .matches = {
266 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
267 DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
268 },
269 },
262 { } 270 { }
263}; 271};
264 272
diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index 201eab63b05f..fda313ebbb03 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -12,7 +12,7 @@
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <asm/reboot_fixups.h> 13#include <asm/reboot_fixups.h>
14#include <asm/msr.h> 14#include <asm/msr.h>
15#include <asm/geode.h> 15#include <linux/cs5535.h>
16 16
17static void cs5530a_warm_reset(struct pci_dev *dev) 17static void cs5530a_warm_reset(struct pci_dev *dev)
18{ 18{
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 946a311a25c9..f7b8b9894b22 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -73,6 +73,7 @@
73 73
74#include <asm/mtrr.h> 74#include <asm/mtrr.h>
75#include <asm/apic.h> 75#include <asm/apic.h>
76#include <asm/trampoline.h>
76#include <asm/e820.h> 77#include <asm/e820.h>
77#include <asm/mpspec.h> 78#include <asm/mpspec.h>
78#include <asm/setup.h> 79#include <asm/setup.h>
@@ -875,6 +876,13 @@ void __init setup_arch(char **cmdline_p)
875 876
876 reserve_brk(); 877 reserve_brk();
877 878
879 /*
880 * Find and reserve possible boot-time SMP configuration:
881 */
882 find_smp_config();
883
884 reserve_trampoline_memory();
885
878#ifdef CONFIG_ACPI_SLEEP 886#ifdef CONFIG_ACPI_SLEEP
879 /* 887 /*
880 * Reserve low memory region for sleep support. 888 * Reserve low memory region for sleep support.
@@ -921,11 +929,6 @@ void __init setup_arch(char **cmdline_p)
921 929
922 early_acpi_boot_init(); 930 early_acpi_boot_init();
923 931
924 /*
925 * Find and reserve possible boot-time SMP configuration:
926 */
927 find_smp_config();
928
929#ifdef CONFIG_ACPI_NUMA 932#ifdef CONFIG_ACPI_NUMA
930 /* 933 /*
931 * Parse SRAT to discover nodes. 934 * Parse SRAT to discover nodes.
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index d559af913e1f..35abcb8b00e9 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -1,3 +1,5 @@
1#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
2
1#include <linux/kernel.h> 3#include <linux/kernel.h>
2#include <linux/module.h> 4#include <linux/module.h>
3#include <linux/init.h> 5#include <linux/init.h>
@@ -20,9 +22,9 @@
20#include <asm/stackprotector.h> 22#include <asm/stackprotector.h>
21 23
22#ifdef CONFIG_DEBUG_PER_CPU_MAPS 24#ifdef CONFIG_DEBUG_PER_CPU_MAPS
23# define DBG(x...) printk(KERN_DEBUG x) 25# define DBG(fmt, ...) pr_dbg(fmt, ##__VA_ARGS__)
24#else 26#else
25# define DBG(x...) 27# define DBG(fmt, ...) do { if (0) pr_dbg(fmt, ##__VA_ARGS__); } while (0)
26#endif 28#endif
27 29
28DEFINE_PER_CPU(int, cpu_number); 30DEFINE_PER_CPU(int, cpu_number);
@@ -116,8 +118,8 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size,
116 } else { 118 } else {
117 ptr = __alloc_bootmem_node_nopanic(NODE_DATA(node), 119 ptr = __alloc_bootmem_node_nopanic(NODE_DATA(node),
118 size, align, goal); 120 size, align, goal);
119 pr_debug("per cpu data for cpu%d %lu bytes on node%d at " 121 pr_debug("per cpu data for cpu%d %lu bytes on node%d at %016lx\n",
120 "%016lx\n", cpu, size, node, __pa(ptr)); 122 cpu, size, node, __pa(ptr));
121 } 123 }
122 return ptr; 124 return ptr;
123#else 125#else
@@ -198,8 +200,7 @@ void __init setup_per_cpu_areas(void)
198 pcpu_cpu_distance, 200 pcpu_cpu_distance,
199 pcpu_fc_alloc, pcpu_fc_free); 201 pcpu_fc_alloc, pcpu_fc_free);
200 if (rc < 0) 202 if (rc < 0)
201 pr_warning("PERCPU: %s allocator failed (%d), " 203 pr_warning("%s allocator failed (%d), falling back to page size\n",
202 "falling back to page size\n",
203 pcpu_fc_names[pcpu_chosen_fc], rc); 204 pcpu_fc_names[pcpu_chosen_fc], rc);
204 } 205 }
205 if (rc < 0) 206 if (rc < 0)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 74fe6d86dc5d..4fd173cd8e57 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -545,22 +545,12 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
545} 545}
546#endif /* CONFIG_X86_32 */ 546#endif /* CONFIG_X86_32 */
547 547
548#ifdef CONFIG_X86_32 548long
549int sys_sigaltstack(struct pt_regs *regs)
550{
551 const stack_t __user *uss = (const stack_t __user *)regs->bx;
552 stack_t __user *uoss = (stack_t __user *)regs->cx;
553
554 return do_sigaltstack(uss, uoss, regs->sp);
555}
556#else /* !CONFIG_X86_32 */
557asmlinkage long
558sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, 549sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
559 struct pt_regs *regs) 550 struct pt_regs *regs)
560{ 551{
561 return do_sigaltstack(uss, uoss, regs->sp); 552 return do_sigaltstack(uss, uoss, regs->sp);
562} 553}
563#endif /* CONFIG_X86_32 */
564 554
565/* 555/*
566 * Do a signal return; undo the signal stack. 556 * Do a signal return; undo the signal stack.
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 324f2a44c221..678d0b8c26f3 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -671,6 +671,26 @@ static void __cpuinit do_fork_idle(struct work_struct *work)
671 complete(&c_idle->done); 671 complete(&c_idle->done);
672} 672}
673 673
674/* reduce the number of lines printed when booting a large cpu count system */
675static void __cpuinit announce_cpu(int cpu, int apicid)
676{
677 static int current_node = -1;
678 int node = cpu_to_node(cpu);
679
680 if (system_state == SYSTEM_BOOTING) {
681 if (node != current_node) {
682 if (current_node > (-1))
683 pr_cont(" Ok.\n");
684 current_node = node;
685 pr_info("Booting Node %3d, Processors ", node);
686 }
687 pr_cont(" #%d%s", cpu, cpu == (nr_cpu_ids - 1) ? " Ok.\n" : "");
688 return;
689 } else
690 pr_info("Booting Node %d Processor %d APIC 0x%x\n",
691 node, cpu, apicid);
692}
693
674/* 694/*
675 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad 695 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
676 * (ie clustered apic addressing mode), this is a LOGICAL apic ID. 696 * (ie clustered apic addressing mode), this is a LOGICAL apic ID.
@@ -687,7 +707,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
687 .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), 707 .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
688 }; 708 };
689 709
690 INIT_WORK(&c_idle.work, do_fork_idle); 710 INIT_WORK_ON_STACK(&c_idle.work, do_fork_idle);
691 711
692 alternatives_smp_switch(1); 712 alternatives_smp_switch(1);
693 713
@@ -713,6 +733,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
713 733
714 if (IS_ERR(c_idle.idle)) { 734 if (IS_ERR(c_idle.idle)) {
715 printk("failed fork for CPU %d\n", cpu); 735 printk("failed fork for CPU %d\n", cpu);
736 destroy_work_on_stack(&c_idle.work);
716 return PTR_ERR(c_idle.idle); 737 return PTR_ERR(c_idle.idle);
717 } 738 }
718 739
@@ -736,9 +757,8 @@ do_rest:
736 /* start_ip had better be page-aligned! */ 757 /* start_ip had better be page-aligned! */
737 start_ip = setup_trampoline(); 758 start_ip = setup_trampoline();
738 759
739 /* So we see what's up */ 760 /* So we see what's up */
740 printk(KERN_INFO "Booting processor %d APIC 0x%x ip 0x%lx\n", 761 announce_cpu(cpu, apicid);
741 cpu, apicid, start_ip);
742 762
743 /* 763 /*
744 * This grunge runs the startup process for 764 * This grunge runs the startup process for
@@ -787,21 +807,17 @@ do_rest:
787 udelay(100); 807 udelay(100);
788 } 808 }
789 809
790 if (cpumask_test_cpu(cpu, cpu_callin_mask)) { 810 if (cpumask_test_cpu(cpu, cpu_callin_mask))
791 /* number CPUs logically, starting from 1 (BSP is 0) */ 811 pr_debug("CPU%d: has booted.\n", cpu);
792 pr_debug("OK.\n"); 812 else {
793 printk(KERN_INFO "CPU%d: ", cpu);
794 print_cpu_info(&cpu_data(cpu));
795 pr_debug("CPU has booted.\n");
796 } else {
797 boot_error = 1; 813 boot_error = 1;
798 if (*((volatile unsigned char *)trampoline_base) 814 if (*((volatile unsigned char *)trampoline_base)
799 == 0xA5) 815 == 0xA5)
800 /* trampoline started but...? */ 816 /* trampoline started but...? */
801 printk(KERN_ERR "Stuck ??\n"); 817 pr_err("CPU%d: Stuck ??\n", cpu);
802 else 818 else
803 /* trampoline code not run */ 819 /* trampoline code not run */
804 printk(KERN_ERR "Not responding.\n"); 820 pr_err("CPU%d: Not responding.\n", cpu);
805 if (apic->inquire_remote_apic) 821 if (apic->inquire_remote_apic)
806 apic->inquire_remote_apic(apicid); 822 apic->inquire_remote_apic(apicid);
807 } 823 }
@@ -831,6 +847,7 @@ do_rest:
831 smpboot_restore_warm_reset_vector(); 847 smpboot_restore_warm_reset_vector();
832 } 848 }
833 849
850 destroy_work_on_stack(&c_idle.work);
834 return boot_error; 851 return boot_error;
835} 852}
836 853
@@ -1291,14 +1308,16 @@ void native_cpu_die(unsigned int cpu)
1291 for (i = 0; i < 10; i++) { 1308 for (i = 0; i < 10; i++) {
1292 /* They ack this in play_dead by setting CPU_DEAD */ 1309 /* They ack this in play_dead by setting CPU_DEAD */
1293 if (per_cpu(cpu_state, cpu) == CPU_DEAD) { 1310 if (per_cpu(cpu_state, cpu) == CPU_DEAD) {
1294 printk(KERN_INFO "CPU %d is now offline\n", cpu); 1311 if (system_state == SYSTEM_RUNNING)
1312 pr_info("CPU %u is now offline\n", cpu);
1313
1295 if (1 == num_online_cpus()) 1314 if (1 == num_online_cpus())
1296 alternatives_smp_switch(0); 1315 alternatives_smp_switch(0);
1297 return; 1316 return;
1298 } 1317 }
1299 msleep(100); 1318 msleep(100);
1300 } 1319 }
1301 printk(KERN_ERR "CPU %u didn't die...\n", cpu); 1320 pr_err("CPU %u didn't die...\n", cpu);
1302} 1321}
1303 1322
1304void play_dead_common(void) 1323void play_dead_common(void)
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
index 1884a8d12bfa..dee1ff7cba58 100644
--- a/arch/x86/kernel/sys_i386_32.c
+++ b/arch/x86/kernel/sys_i386_32.c
@@ -24,31 +24,6 @@
24 24
25#include <asm/syscalls.h> 25#include <asm/syscalls.h>
26 26
27asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
28 unsigned long prot, unsigned long flags,
29 unsigned long fd, unsigned long pgoff)
30{
31 int error = -EBADF;
32 struct file *file = NULL;
33 struct mm_struct *mm = current->mm;
34
35 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
36 if (!(flags & MAP_ANONYMOUS)) {
37 file = fget(fd);
38 if (!file)
39 goto out;
40 }
41
42 down_write(&mm->mmap_sem);
43 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
44 up_write(&mm->mmap_sem);
45
46 if (file)
47 fput(file);
48out:
49 return error;
50}
51
52/* 27/*
53 * Perform the select(nd, in, out, ex, tv) and mmap() system 28 * Perform the select(nd, in, out, ex, tv) and mmap() system
54 * calls. Linux/i386 didn't use to be able to handle more than 29 * calls. Linux/i386 didn't use to be able to handle more than
@@ -77,7 +52,7 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
77 if (a.offset & ~PAGE_MASK) 52 if (a.offset & ~PAGE_MASK)
78 goto out; 53 goto out;
79 54
80 err = sys_mmap2(a.addr, a.len, a.prot, a.flags, 55 err = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags,
81 a.fd, a.offset >> PAGE_SHIFT); 56 a.fd, a.offset >> PAGE_SHIFT);
82out: 57out:
83 return err; 58 return err;
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
index 45e00eb09c3a..8aa2057efd12 100644
--- a/arch/x86/kernel/sys_x86_64.c
+++ b/arch/x86/kernel/sys_x86_64.c
@@ -23,26 +23,11 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
23 unsigned long, fd, unsigned long, off) 23 unsigned long, fd, unsigned long, off)
24{ 24{
25 long error; 25 long error;
26 struct file *file;
27
28 error = -EINVAL; 26 error = -EINVAL;
29 if (off & ~PAGE_MASK) 27 if (off & ~PAGE_MASK)
30 goto out; 28 goto out;
31 29
32 error = -EBADF; 30 error = sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
33 file = NULL;
34 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
35 if (!(flags & MAP_ANONYMOUS)) {
36 file = fget(fd);
37 if (!file)
38 goto out;
39 }
40 down_write(&current->mm->mmap_sem);
41 error = do_mmap_pgoff(file, addr, len, prot, flags, off >> PAGE_SHIFT);
42 up_write(&current->mm->mmap_sem);
43
44 if (file)
45 fput(file);
46out: 31out:
47 return error; 32 return error;
48} 33}
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index 70c2125d55b9..15228b5d3eb7 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -191,7 +191,7 @@ ENTRY(sys_call_table)
191 .long sys_ni_syscall /* reserved for streams2 */ 191 .long sys_ni_syscall /* reserved for streams2 */
192 .long ptregs_vfork /* 190 */ 192 .long ptregs_vfork /* 190 */
193 .long sys_getrlimit 193 .long sys_getrlimit
194 .long sys_mmap2 194 .long sys_mmap_pgoff
195 .long sys_truncate64 195 .long sys_truncate64
196 .long sys_ftruncate64 196 .long sys_ftruncate64
197 .long sys_stat64 /* 195 */ 197 .long sys_stat64 /* 195 */
diff --git a/arch/x86/kernel/trampoline.c b/arch/x86/kernel/trampoline.c
index cd022121cab6..c652ef62742d 100644
--- a/arch/x86/kernel/trampoline.c
+++ b/arch/x86/kernel/trampoline.c
@@ -12,21 +12,19 @@
12#endif 12#endif
13 13
14/* ready for x86_64 and x86 */ 14/* ready for x86_64 and x86 */
15unsigned char *__trampinitdata trampoline_base = __va(TRAMPOLINE_BASE); 15unsigned char *__trampinitdata trampoline_base;
16 16
17void __init reserve_trampoline_memory(void) 17void __init reserve_trampoline_memory(void)
18{ 18{
19#ifdef CONFIG_X86_32 19 unsigned long mem;
20 /* 20
21 * But first pinch a few for the stack/trampoline stuff
22 * FIXME: Don't need the extra page at 4K, but need to fix
23 * trampoline before removing it. (see the GDT stuff)
24 */
25 reserve_early(PAGE_SIZE, PAGE_SIZE + PAGE_SIZE, "EX TRAMPOLINE");
26#endif
27 /* Has to be in very low memory so we can execute real-mode AP code. */ 21 /* Has to be in very low memory so we can execute real-mode AP code. */
28 reserve_early(TRAMPOLINE_BASE, TRAMPOLINE_BASE + TRAMPOLINE_SIZE, 22 mem = find_e820_area(0, 1<<20, TRAMPOLINE_SIZE, PAGE_SIZE);
29 "TRAMPOLINE"); 23 if (mem == -1L)
24 panic("Cannot allocate trampoline\n");
25
26 trampoline_base = __va(mem);
27 reserve_early(mem, mem + TRAMPOLINE_SIZE, "TRAMPOLINE");
30} 28}
31 29
32/* 30/*
diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index eed156851f5d..0aa5fed8b9e6 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -33,7 +33,7 @@ static __cpuinitdata atomic_t stop_count;
33 * we want to have the fastest, inlined, non-debug version 33 * we want to have the fastest, inlined, non-debug version
34 * of a critical section, to be able to prove TSC time-warps: 34 * of a critical section, to be able to prove TSC time-warps:
35 */ 35 */
36static __cpuinitdata raw_spinlock_t sync_lock = __RAW_SPIN_LOCK_UNLOCKED; 36static __cpuinitdata arch_spinlock_t sync_lock = __ARCH_SPIN_LOCK_UNLOCKED;
37 37
38static __cpuinitdata cycles_t last_tsc; 38static __cpuinitdata cycles_t last_tsc;
39static __cpuinitdata cycles_t max_warp; 39static __cpuinitdata cycles_t max_warp;
@@ -62,13 +62,13 @@ static __cpuinit void check_tsc_warp(void)
62 * previous TSC that was measured (possibly on 62 * previous TSC that was measured (possibly on
63 * another CPU) and update the previous TSC timestamp. 63 * another CPU) and update the previous TSC timestamp.
64 */ 64 */
65 __raw_spin_lock(&sync_lock); 65 arch_spin_lock(&sync_lock);
66 prev = last_tsc; 66 prev = last_tsc;
67 rdtsc_barrier(); 67 rdtsc_barrier();
68 now = get_cycles(); 68 now = get_cycles();
69 rdtsc_barrier(); 69 rdtsc_barrier();
70 last_tsc = now; 70 last_tsc = now;
71 __raw_spin_unlock(&sync_lock); 71 arch_spin_unlock(&sync_lock);
72 72
73 /* 73 /*
74 * Be nice every now and then (and also check whether 74 * Be nice every now and then (and also check whether
@@ -87,10 +87,10 @@ static __cpuinit void check_tsc_warp(void)
87 * we saw a time-warp of the TSC going backwards: 87 * we saw a time-warp of the TSC going backwards:
88 */ 88 */
89 if (unlikely(prev > now)) { 89 if (unlikely(prev > now)) {
90 __raw_spin_lock(&sync_lock); 90 arch_spin_lock(&sync_lock);
91 max_warp = max(max_warp, prev - now); 91 max_warp = max(max_warp, prev - now);
92 nr_warps++; 92 nr_warps++;
93 __raw_spin_unlock(&sync_lock); 93 arch_spin_unlock(&sync_lock);
94 } 94 }
95 } 95 }
96 WARN(!(now-start), 96 WARN(!(now-start),
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 9c4e62539058..5ffb5622f793 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -197,9 +197,8 @@ out:
197static int do_vm86_irq_handling(int subfunction, int irqnumber); 197static int do_vm86_irq_handling(int subfunction, int irqnumber);
198static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk); 198static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk);
199 199
200int sys_vm86old(struct pt_regs *regs) 200int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs)
201{ 201{
202 struct vm86_struct __user *v86 = (struct vm86_struct __user *)regs->bx;
203 struct kernel_vm86_struct info; /* declare this _on top_, 202 struct kernel_vm86_struct info; /* declare this _on top_,
204 * this avoids wasting of stack space. 203 * this avoids wasting of stack space.
205 * This remains on the stack until we 204 * This remains on the stack until we
@@ -227,7 +226,7 @@ out:
227} 226}
228 227
229 228
230int sys_vm86(struct pt_regs *regs) 229int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs)
231{ 230{
232 struct kernel_vm86_struct info; /* declare this _on top_, 231 struct kernel_vm86_struct info; /* declare this _on top_,
233 * this avoids wasting of stack space. 232 * this avoids wasting of stack space.
@@ -239,12 +238,12 @@ int sys_vm86(struct pt_regs *regs)
239 struct vm86plus_struct __user *v86; 238 struct vm86plus_struct __user *v86;
240 239
241 tsk = current; 240 tsk = current;
242 switch (regs->bx) { 241 switch (cmd) {
243 case VM86_REQUEST_IRQ: 242 case VM86_REQUEST_IRQ:
244 case VM86_FREE_IRQ: 243 case VM86_FREE_IRQ:
245 case VM86_GET_IRQ_BITS: 244 case VM86_GET_IRQ_BITS:
246 case VM86_GET_AND_RESET_IRQ: 245 case VM86_GET_AND_RESET_IRQ:
247 ret = do_vm86_irq_handling(regs->bx, (int)regs->cx); 246 ret = do_vm86_irq_handling(cmd, (int)arg);
248 goto out; 247 goto out;
249 case VM86_PLUS_INSTALL_CHECK: 248 case VM86_PLUS_INSTALL_CHECK:
250 /* 249 /*
@@ -261,7 +260,7 @@ int sys_vm86(struct pt_regs *regs)
261 ret = -EPERM; 260 ret = -EPERM;
262 if (tsk->thread.saved_sp0) 261 if (tsk->thread.saved_sp0)
263 goto out; 262 goto out;
264 v86 = (struct vm86plus_struct __user *)regs->cx; 263 v86 = (struct vm86plus_struct __user *)arg;
265 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs, 264 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs,
266 offsetof(struct kernel_vm86_struct, regs32) - 265 offsetof(struct kernel_vm86_struct, regs32) -
267 sizeof(info.regs)); 266 sizeof(info.regs));
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c
index 611b9e2360d3..74c92bb194df 100644
--- a/arch/x86/kernel/vmiclock_32.c
+++ b/arch/x86/kernel/vmiclock_32.c
@@ -226,7 +226,7 @@ static void __devinit vmi_time_init_clockevent(void)
226 evt->min_delta_ns = clockevent_delta2ns(1, evt); 226 evt->min_delta_ns = clockevent_delta2ns(1, evt);
227 evt->cpumask = cpumask_of(cpu); 227 evt->cpumask = cpumask_of(cpu);
228 228
229 printk(KERN_WARNING "vmi: registering clock event %s. mult=%lu shift=%u\n", 229 printk(KERN_WARNING "vmi: registering clock event %s. mult=%u shift=%u\n",
230 evt->name, evt->mult, evt->shift); 230 evt->name, evt->mult, evt->shift);
231 clockevents_register_device(evt); 231 clockevents_register_device(evt);
232} 232}
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index f3f2104408d9..f92a0da608cb 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -319,9 +319,7 @@ SECTIONS
319 __brk_limit = .; 319 __brk_limit = .;
320 } 320 }
321 321
322 .end : AT(ADDR(.end) - LOAD_OFFSET) { 322 _end = .;
323 _end = .;
324 }
325 323
326 STABS_DEBUG 324 STABS_DEBUG
327 DWARF_DEBUG 325 DWARF_DEBUG
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index e02d92d12bcd..9055e5872ff0 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -73,7 +73,8 @@ void update_vsyscall_tz(void)
73 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); 73 write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
74} 74}
75 75
76void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) 76void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
77 u32 mult)
77{ 78{
78 unsigned long flags; 79 unsigned long flags;
79 80
@@ -82,7 +83,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
82 vsyscall_gtod_data.clock.vread = clock->vread; 83 vsyscall_gtod_data.clock.vread = clock->vread;
83 vsyscall_gtod_data.clock.cycle_last = clock->cycle_last; 84 vsyscall_gtod_data.clock.cycle_last = clock->cycle_last;
84 vsyscall_gtod_data.clock.mask = clock->mask; 85 vsyscall_gtod_data.clock.mask = clock->mask;
85 vsyscall_gtod_data.clock.mult = clock->mult; 86 vsyscall_gtod_data.clock.mult = mult;
86 vsyscall_gtod_data.clock.shift = clock->shift; 87 vsyscall_gtod_data.clock.shift = clock->shift;
87 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; 88 vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec;
88 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; 89 vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
diff --git a/arch/x86/kernel/x8664_ksyms_64.c b/arch/x86/kernel/x8664_ksyms_64.c
index a1029769b6f2..619f7f88b8cc 100644
--- a/arch/x86/kernel/x8664_ksyms_64.c
+++ b/arch/x86/kernel/x8664_ksyms_64.c
@@ -17,8 +17,6 @@
17EXPORT_SYMBOL(mcount); 17EXPORT_SYMBOL(mcount);
18#endif 18#endif
19 19
20EXPORT_SYMBOL(kernel_thread);
21
22EXPORT_SYMBOL(__get_user_1); 20EXPORT_SYMBOL(__get_user_1);
23EXPORT_SYMBOL(__get_user_2); 21EXPORT_SYMBOL(__get_user_2);
24EXPORT_SYMBOL(__get_user_4); 22EXPORT_SYMBOL(__get_user_4);
@@ -56,4 +54,6 @@ EXPORT_SYMBOL(__memcpy);
56 54
57EXPORT_SYMBOL(empty_zero_page); 55EXPORT_SYMBOL(empty_zero_page);
58EXPORT_SYMBOL(init_level4_pgt); 56EXPORT_SYMBOL(init_level4_pgt);
59EXPORT_SYMBOL(load_gs_index); 57#ifndef CONFIG_PARAVIRT
58EXPORT_SYMBOL(native_load_gs_index);
59#endif
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index fab7440c9bb2..296aba49472a 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -29,6 +29,8 @@
29 * Based on QEMU and Xen. 29 * Based on QEMU and Xen.
30 */ 30 */
31 31
32#define pr_fmt(fmt) "pit: " fmt
33
32#include <linux/kvm_host.h> 34#include <linux/kvm_host.h>
33 35
34#include "irq.h" 36#include "irq.h"
@@ -262,7 +264,7 @@ void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu)
262 264
263static void destroy_pit_timer(struct kvm_timer *pt) 265static void destroy_pit_timer(struct kvm_timer *pt)
264{ 266{
265 pr_debug("pit: execute del timer!\n"); 267 pr_debug("execute del timer!\n");
266 hrtimer_cancel(&pt->timer); 268 hrtimer_cancel(&pt->timer);
267} 269}
268 270
@@ -284,7 +286,7 @@ static void create_pit_timer(struct kvm_kpit_state *ps, u32 val, int is_period)
284 286
285 interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ); 287 interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ);
286 288
287 pr_debug("pit: create pit timer, interval is %llu nsec\n", interval); 289 pr_debug("create pit timer, interval is %llu nsec\n", interval);
288 290
289 /* TODO The new value only affected after the retriggered */ 291 /* TODO The new value only affected after the retriggered */
290 hrtimer_cancel(&pt->timer); 292 hrtimer_cancel(&pt->timer);
@@ -309,7 +311,7 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
309 311
310 WARN_ON(!mutex_is_locked(&ps->lock)); 312 WARN_ON(!mutex_is_locked(&ps->lock));
311 313
312 pr_debug("pit: load_count val is %d, channel is %d\n", val, channel); 314 pr_debug("load_count val is %d, channel is %d\n", val, channel);
313 315
314 /* 316 /*
315 * The largest possible initial count is 0; this is equivalent 317 * The largest possible initial count is 0; this is equivalent
@@ -395,8 +397,8 @@ static int pit_ioport_write(struct kvm_io_device *this,
395 mutex_lock(&pit_state->lock); 397 mutex_lock(&pit_state->lock);
396 398
397 if (val != 0) 399 if (val != 0)
398 pr_debug("pit: write addr is 0x%x, len is %d, val is 0x%x\n", 400 pr_debug("write addr is 0x%x, len is %d, val is 0x%x\n",
399 (unsigned int)addr, len, val); 401 (unsigned int)addr, len, val);
400 402
401 if (addr == 3) { 403 if (addr == 3) {
402 channel = val >> 6; 404 channel = val >> 6;
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 3de0b37ec038..1d9b33843c80 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -316,7 +316,7 @@ static void svm_hardware_disable(void *garbage)
316static int svm_hardware_enable(void *garbage) 316static int svm_hardware_enable(void *garbage)
317{ 317{
318 318
319 struct svm_cpu_data *svm_data; 319 struct svm_cpu_data *sd;
320 uint64_t efer; 320 uint64_t efer;
321 struct descriptor_table gdt_descr; 321 struct descriptor_table gdt_descr;
322 struct desc_struct *gdt; 322 struct desc_struct *gdt;
@@ -331,63 +331,61 @@ static int svm_hardware_enable(void *garbage)
331 me); 331 me);
332 return -EINVAL; 332 return -EINVAL;
333 } 333 }
334 svm_data = per_cpu(svm_data, me); 334 sd = per_cpu(svm_data, me);
335 335
336 if (!svm_data) { 336 if (!sd) {
337 printk(KERN_ERR "svm_hardware_enable: svm_data is NULL on %d\n", 337 printk(KERN_ERR "svm_hardware_enable: svm_data is NULL on %d\n",
338 me); 338 me);
339 return -EINVAL; 339 return -EINVAL;
340 } 340 }
341 341
342 svm_data->asid_generation = 1; 342 sd->asid_generation = 1;
343 svm_data->max_asid = cpuid_ebx(SVM_CPUID_FUNC) - 1; 343 sd->max_asid = cpuid_ebx(SVM_CPUID_FUNC) - 1;
344 svm_data->next_asid = svm_data->max_asid + 1; 344 sd->next_asid = sd->max_asid + 1;
345 345
346 kvm_get_gdt(&gdt_descr); 346 kvm_get_gdt(&gdt_descr);
347 gdt = (struct desc_struct *)gdt_descr.base; 347 gdt = (struct desc_struct *)gdt_descr.base;
348 svm_data->tss_desc = (struct kvm_ldttss_desc *)(gdt + GDT_ENTRY_TSS); 348 sd->tss_desc = (struct kvm_ldttss_desc *)(gdt + GDT_ENTRY_TSS);
349 349
350 wrmsrl(MSR_EFER, efer | EFER_SVME); 350 wrmsrl(MSR_EFER, efer | EFER_SVME);
351 351
352 wrmsrl(MSR_VM_HSAVE_PA, 352 wrmsrl(MSR_VM_HSAVE_PA, page_to_pfn(sd->save_area) << PAGE_SHIFT);
353 page_to_pfn(svm_data->save_area) << PAGE_SHIFT);
354 353
355 return 0; 354 return 0;
356} 355}
357 356
358static void svm_cpu_uninit(int cpu) 357static void svm_cpu_uninit(int cpu)
359{ 358{
360 struct svm_cpu_data *svm_data 359 struct svm_cpu_data *sd = per_cpu(svm_data, raw_smp_processor_id());
361 = per_cpu(svm_data, raw_smp_processor_id());
362 360
363 if (!svm_data) 361 if (!sd)
364 return; 362 return;
365 363
366 per_cpu(svm_data, raw_smp_processor_id()) = NULL; 364 per_cpu(svm_data, raw_smp_processor_id()) = NULL;
367 __free_page(svm_data->save_area); 365 __free_page(sd->save_area);
368 kfree(svm_data); 366 kfree(sd);
369} 367}
370 368
371static int svm_cpu_init(int cpu) 369static int svm_cpu_init(int cpu)
372{ 370{
373 struct svm_cpu_data *svm_data; 371 struct svm_cpu_data *sd;
374 int r; 372 int r;
375 373
376 svm_data = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL); 374 sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
377 if (!svm_data) 375 if (!sd)
378 return -ENOMEM; 376 return -ENOMEM;
379 svm_data->cpu = cpu; 377 sd->cpu = cpu;
380 svm_data->save_area = alloc_page(GFP_KERNEL); 378 sd->save_area = alloc_page(GFP_KERNEL);
381 r = -ENOMEM; 379 r = -ENOMEM;
382 if (!svm_data->save_area) 380 if (!sd->save_area)
383 goto err_1; 381 goto err_1;
384 382
385 per_cpu(svm_data, cpu) = svm_data; 383 per_cpu(svm_data, cpu) = sd;
386 384
387 return 0; 385 return 0;
388 386
389err_1: 387err_1:
390 kfree(svm_data); 388 kfree(sd);
391 return r; 389 return r;
392 390
393} 391}
@@ -1092,16 +1090,16 @@ static void save_host_msrs(struct kvm_vcpu *vcpu)
1092#endif 1090#endif
1093} 1091}
1094 1092
1095static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *svm_data) 1093static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *sd)
1096{ 1094{
1097 if (svm_data->next_asid > svm_data->max_asid) { 1095 if (sd->next_asid > sd->max_asid) {
1098 ++svm_data->asid_generation; 1096 ++sd->asid_generation;
1099 svm_data->next_asid = 1; 1097 sd->next_asid = 1;
1100 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID; 1098 svm->vmcb->control.tlb_ctl = TLB_CONTROL_FLUSH_ALL_ASID;
1101 } 1099 }
1102 1100
1103 svm->asid_generation = svm_data->asid_generation; 1101 svm->asid_generation = sd->asid_generation;
1104 svm->vmcb->control.asid = svm_data->next_asid++; 1102 svm->vmcb->control.asid = sd->next_asid++;
1105} 1103}
1106 1104
1107static unsigned long svm_get_dr(struct kvm_vcpu *vcpu, int dr) 1105static unsigned long svm_get_dr(struct kvm_vcpu *vcpu, int dr)
@@ -2429,8 +2427,8 @@ static void reload_tss(struct kvm_vcpu *vcpu)
2429{ 2427{
2430 int cpu = raw_smp_processor_id(); 2428 int cpu = raw_smp_processor_id();
2431 2429
2432 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu); 2430 struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
2433 svm_data->tss_desc->type = 9; /* available 32/64-bit TSS */ 2431 sd->tss_desc->type = 9; /* available 32/64-bit TSS */
2434 load_TR_desc(); 2432 load_TR_desc();
2435} 2433}
2436 2434
@@ -2438,12 +2436,12 @@ static void pre_svm_run(struct vcpu_svm *svm)
2438{ 2436{
2439 int cpu = raw_smp_processor_id(); 2437 int cpu = raw_smp_processor_id();
2440 2438
2441 struct svm_cpu_data *svm_data = per_cpu(svm_data, cpu); 2439 struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
2442 2440
2443 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING; 2441 svm->vmcb->control.tlb_ctl = TLB_CONTROL_DO_NOTHING;
2444 /* FIXME: handle wraparound of asid_generation */ 2442 /* FIXME: handle wraparound of asid_generation */
2445 if (svm->asid_generation != svm_data->asid_generation) 2443 if (svm->asid_generation != sd->asid_generation)
2446 new_asid(svm, svm_data); 2444 new_asid(svm, sd);
2447} 2445}
2448 2446
2449static void svm_inject_nmi(struct kvm_vcpu *vcpu) 2447static void svm_inject_nmi(struct kvm_vcpu *vcpu)
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index a2d6472895fb..45b20e486c2f 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -5,7 +5,7 @@
5inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk 5inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
6inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt 6inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
7quiet_cmd_inat_tables = GEN $@ 7quiet_cmd_inat_tables = GEN $@
8 cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ 8 cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
9 9
10$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps) 10$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
11 $(call cmd,inat_tables) 11 $(call cmd,inat_tables)
@@ -20,7 +20,7 @@ lib-y := delay.o
20lib-y += thunk_$(BITS).o 20lib-y += thunk_$(BITS).o
21lib-y += usercopy_$(BITS).o getuser.o putuser.o 21lib-y += usercopy_$(BITS).o getuser.o putuser.o
22lib-y += memcpy_$(BITS).o 22lib-y += memcpy_$(BITS).o
23lib-y += insn.o inat.o 23lib-$(CONFIG_KPROBES) += insn.o inat.o
24 24
25obj-y += msr-reg.o msr-reg-export.o 25obj-y += msr-reg.o msr-reg-export.o
26 26
diff --git a/arch/x86/lib/msr.c b/arch/x86/lib/msr.c
index 41628b104b9e..872834177937 100644
--- a/arch/x86/lib/msr.c
+++ b/arch/x86/lib/msr.c
@@ -7,7 +7,6 @@ struct msr_info {
7 u32 msr_no; 7 u32 msr_no;
8 struct msr reg; 8 struct msr reg;
9 struct msr *msrs; 9 struct msr *msrs;
10 int off;
11 int err; 10 int err;
12}; 11};
13 12
@@ -18,7 +17,7 @@ static void __rdmsr_on_cpu(void *info)
18 int this_cpu = raw_smp_processor_id(); 17 int this_cpu = raw_smp_processor_id();
19 18
20 if (rv->msrs) 19 if (rv->msrs)
21 reg = &rv->msrs[this_cpu - rv->off]; 20 reg = per_cpu_ptr(rv->msrs, this_cpu);
22 else 21 else
23 reg = &rv->reg; 22 reg = &rv->reg;
24 23
@@ -32,7 +31,7 @@ static void __wrmsr_on_cpu(void *info)
32 int this_cpu = raw_smp_processor_id(); 31 int this_cpu = raw_smp_processor_id();
33 32
34 if (rv->msrs) 33 if (rv->msrs)
35 reg = &rv->msrs[this_cpu - rv->off]; 34 reg = per_cpu_ptr(rv->msrs, this_cpu);
36 else 35 else
37 reg = &rv->reg; 36 reg = &rv->reg;
38 37
@@ -80,7 +79,6 @@ static void __rwmsr_on_cpus(const struct cpumask *mask, u32 msr_no,
80 79
81 memset(&rv, 0, sizeof(rv)); 80 memset(&rv, 0, sizeof(rv));
82 81
83 rv.off = cpumask_first(mask);
84 rv.msrs = msrs; 82 rv.msrs = msrs;
85 rv.msr_no = msr_no; 83 rv.msr_no = msr_no;
86 84
@@ -120,6 +118,26 @@ void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs)
120} 118}
121EXPORT_SYMBOL(wrmsr_on_cpus); 119EXPORT_SYMBOL(wrmsr_on_cpus);
122 120
121struct msr *msrs_alloc(void)
122{
123 struct msr *msrs = NULL;
124
125 msrs = alloc_percpu(struct msr);
126 if (!msrs) {
127 pr_warning("%s: error allocating msrs\n", __func__);
128 return NULL;
129 }
130
131 return msrs;
132}
133EXPORT_SYMBOL(msrs_alloc);
134
135void msrs_free(struct msr *msrs)
136{
137 free_percpu(msrs);
138}
139EXPORT_SYMBOL(msrs_free);
140
123/* These "safe" variants are slower and should be used when the target MSR 141/* These "safe" variants are slower and should be used when the target MSR
124 may not actually exist. */ 142 may not actually exist. */
125static void __rdmsr_safe_on_cpu(void *info) 143static void __rdmsr_safe_on_cpu(void *info)
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 11a4ad4d6253..c0f6198565eb 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -5,6 +5,8 @@
5 * 2008 Pekka Paalanen <pq@iki.fi> 5 * 2008 Pekka Paalanen <pq@iki.fi>
6 */ 6 */
7 7
8#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
9
8#include <linux/list.h> 10#include <linux/list.h>
9#include <linux/rculist.h> 11#include <linux/rculist.h>
10#include <linux/spinlock.h> 12#include <linux/spinlock.h>
@@ -136,7 +138,7 @@ static int clear_page_presence(struct kmmio_fault_page *f, bool clear)
136 pte_t *pte = lookup_address(f->page, &level); 138 pte_t *pte = lookup_address(f->page, &level);
137 139
138 if (!pte) { 140 if (!pte) {
139 pr_err("kmmio: no pte for page 0x%08lx\n", f->page); 141 pr_err("no pte for page 0x%08lx\n", f->page);
140 return -1; 142 return -1;
141 } 143 }
142 144
@@ -148,7 +150,7 @@ static int clear_page_presence(struct kmmio_fault_page *f, bool clear)
148 clear_pte_presence(pte, clear, &f->old_presence); 150 clear_pte_presence(pte, clear, &f->old_presence);
149 break; 151 break;
150 default: 152 default:
151 pr_err("kmmio: unexpected page level 0x%x.\n", level); 153 pr_err("unexpected page level 0x%x.\n", level);
152 return -1; 154 return -1;
153 } 155 }
154 156
@@ -170,13 +172,14 @@ static int clear_page_presence(struct kmmio_fault_page *f, bool clear)
170static int arm_kmmio_fault_page(struct kmmio_fault_page *f) 172static int arm_kmmio_fault_page(struct kmmio_fault_page *f)
171{ 173{
172 int ret; 174 int ret;
173 WARN_ONCE(f->armed, KERN_ERR "kmmio page already armed.\n"); 175 WARN_ONCE(f->armed, KERN_ERR pr_fmt("kmmio page already armed.\n"));
174 if (f->armed) { 176 if (f->armed) {
175 pr_warning("kmmio double-arm: page 0x%08lx, ref %d, old %d\n", 177 pr_warning("double-arm: page 0x%08lx, ref %d, old %d\n",
176 f->page, f->count, !!f->old_presence); 178 f->page, f->count, !!f->old_presence);
177 } 179 }
178 ret = clear_page_presence(f, true); 180 ret = clear_page_presence(f, true);
179 WARN_ONCE(ret < 0, KERN_ERR "kmmio arming 0x%08lx failed.\n", f->page); 181 WARN_ONCE(ret < 0, KERN_ERR pr_fmt("arming 0x%08lx failed.\n"),
182 f->page);
180 f->armed = true; 183 f->armed = true;
181 return ret; 184 return ret;
182} 185}
@@ -203,7 +206,7 @@ static void disarm_kmmio_fault_page(struct kmmio_fault_page *f)
203 */ 206 */
204/* 207/*
205 * Interrupts are disabled on entry as trap3 is an interrupt gate 208 * Interrupts are disabled on entry as trap3 is an interrupt gate
206 * and they remain disabled thorough out this function. 209 * and they remain disabled throughout this function.
207 */ 210 */
208int kmmio_handler(struct pt_regs *regs, unsigned long addr) 211int kmmio_handler(struct pt_regs *regs, unsigned long addr)
209{ 212{
@@ -240,24 +243,21 @@ int kmmio_handler(struct pt_regs *regs, unsigned long addr)
240 * condition needs handling by do_page_fault(), the 243 * condition needs handling by do_page_fault(), the
241 * page really not being present is the most common. 244 * page really not being present is the most common.
242 */ 245 */
243 pr_debug("kmmio: secondary hit for 0x%08lx CPU %d.\n", 246 pr_debug("secondary hit for 0x%08lx CPU %d.\n",
244 addr, smp_processor_id()); 247 addr, smp_processor_id());
245 248
246 if (!faultpage->old_presence) 249 if (!faultpage->old_presence)
247 pr_info("kmmio: unexpected secondary hit for " 250 pr_info("unexpected secondary hit for address 0x%08lx on CPU %d.\n",
248 "address 0x%08lx on CPU %d.\n", addr, 251 addr, smp_processor_id());
249 smp_processor_id());
250 } else { 252 } else {
251 /* 253 /*
252 * Prevent overwriting already in-flight context. 254 * Prevent overwriting already in-flight context.
253 * This should not happen, let's hope disarming at 255 * This should not happen, let's hope disarming at
254 * least prevents a panic. 256 * least prevents a panic.
255 */ 257 */
256 pr_emerg("kmmio: recursive probe hit on CPU %d, " 258 pr_emerg("recursive probe hit on CPU %d, for address 0x%08lx. Ignoring.\n",
257 "for address 0x%08lx. Ignoring.\n", 259 smp_processor_id(), addr);
258 smp_processor_id(), addr); 260 pr_emerg("previous hit was at 0x%08lx.\n", ctx->addr);
259 pr_emerg("kmmio: previous hit was at 0x%08lx.\n",
260 ctx->addr);
261 disarm_kmmio_fault_page(faultpage); 261 disarm_kmmio_fault_page(faultpage);
262 } 262 }
263 goto no_kmmio_ctx; 263 goto no_kmmio_ctx;
@@ -302,7 +302,7 @@ no_kmmio:
302 302
303/* 303/*
304 * Interrupts are disabled on entry as trap1 is an interrupt gate 304 * Interrupts are disabled on entry as trap1 is an interrupt gate
305 * and they remain disabled thorough out this function. 305 * and they remain disabled throughout this function.
306 * This must always get called as the pair to kmmio_handler(). 306 * This must always get called as the pair to kmmio_handler().
307 */ 307 */
308static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs) 308static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
@@ -316,8 +316,8 @@ static int post_kmmio_handler(unsigned long condition, struct pt_regs *regs)
316 * something external causing them (f.e. using a debugger while 316 * something external causing them (f.e. using a debugger while
317 * mmio tracing enabled), or erroneous behaviour 317 * mmio tracing enabled), or erroneous behaviour
318 */ 318 */
319 pr_warning("kmmio: unexpected debug trap on CPU %d.\n", 319 pr_warning("unexpected debug trap on CPU %d.\n",
320 smp_processor_id()); 320 smp_processor_id());
321 goto out; 321 goto out;
322 } 322 }
323 323
@@ -425,7 +425,7 @@ int register_kmmio_probe(struct kmmio_probe *p)
425 list_add_rcu(&p->list, &kmmio_probes); 425 list_add_rcu(&p->list, &kmmio_probes);
426 while (size < size_lim) { 426 while (size < size_lim) {
427 if (add_kmmio_fault_page(p->addr + size)) 427 if (add_kmmio_fault_page(p->addr + size))
428 pr_err("kmmio: Unable to set page fault.\n"); 428 pr_err("Unable to set page fault.\n");
429 size += PAGE_SIZE; 429 size += PAGE_SIZE;
430 } 430 }
431out: 431out:
@@ -490,7 +490,7 @@ static void remove_kmmio_fault_pages(struct rcu_head *head)
490 * 2. remove_kmmio_fault_pages() 490 * 2. remove_kmmio_fault_pages()
491 * Remove the pages from kmmio_page_table. 491 * Remove the pages from kmmio_page_table.
492 * 3. rcu_free_kmmio_fault_pages() 492 * 3. rcu_free_kmmio_fault_pages()
493 * Actally free the kmmio_fault_page structs as with RCU. 493 * Actually free the kmmio_fault_page structs as with RCU.
494 */ 494 */
495void unregister_kmmio_probe(struct kmmio_probe *p) 495void unregister_kmmio_probe(struct kmmio_probe *p)
496{ 496{
@@ -511,7 +511,7 @@ void unregister_kmmio_probe(struct kmmio_probe *p)
511 511
512 drelease = kmalloc(sizeof(*drelease), GFP_ATOMIC); 512 drelease = kmalloc(sizeof(*drelease), GFP_ATOMIC);
513 if (!drelease) { 513 if (!drelease) {
514 pr_crit("kmmio: leaking kmmio_fault_page objects.\n"); 514 pr_crit("leaking kmmio_fault_page objects.\n");
515 return; 515 return;
516 } 516 }
517 drelease->release_list = release_list; 517 drelease->release_list = release_list;
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 132772a8ec57..34a3291ca103 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -19,6 +19,9 @@
19 * 19 *
20 * Derived from the read-mod example from relay-examples by Tom Zanussi. 20 * Derived from the read-mod example from relay-examples by Tom Zanussi.
21 */ 21 */
22
23#define pr_fmt(fmt) "mmiotrace: " fmt
24
22#define DEBUG 1 25#define DEBUG 1
23 26
24#include <linux/module.h> 27#include <linux/module.h>
@@ -36,8 +39,6 @@
36 39
37#include "pf_in.h" 40#include "pf_in.h"
38 41
39#define NAME "mmiotrace: "
40
41struct trap_reason { 42struct trap_reason {
42 unsigned long addr; 43 unsigned long addr;
43 unsigned long ip; 44 unsigned long ip;
@@ -96,17 +97,18 @@ static void print_pte(unsigned long address)
96 pte_t *pte = lookup_address(address, &level); 97 pte_t *pte = lookup_address(address, &level);
97 98
98 if (!pte) { 99 if (!pte) {
99 pr_err(NAME "Error in %s: no pte for page 0x%08lx\n", 100 pr_err("Error in %s: no pte for page 0x%08lx\n",
100 __func__, address); 101 __func__, address);
101 return; 102 return;
102 } 103 }
103 104
104 if (level == PG_LEVEL_2M) { 105 if (level == PG_LEVEL_2M) {
105 pr_emerg(NAME "4MB pages are not currently supported: " 106 pr_emerg("4MB pages are not currently supported: 0x%08lx\n",
106 "0x%08lx\n", address); 107 address);
107 BUG(); 108 BUG();
108 } 109 }
109 pr_info(NAME "pte for 0x%lx: 0x%llx 0x%llx\n", address, 110 pr_info("pte for 0x%lx: 0x%llx 0x%llx\n",
111 address,
110 (unsigned long long)pte_val(*pte), 112 (unsigned long long)pte_val(*pte),
111 (unsigned long long)pte_val(*pte) & _PAGE_PRESENT); 113 (unsigned long long)pte_val(*pte) & _PAGE_PRESENT);
112} 114}
@@ -118,22 +120,21 @@ static void print_pte(unsigned long address)
118static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr) 120static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr)
119{ 121{
120 const struct trap_reason *my_reason = &get_cpu_var(pf_reason); 122 const struct trap_reason *my_reason = &get_cpu_var(pf_reason);
121 pr_emerg(NAME "unexpected fault for address: 0x%08lx, " 123 pr_emerg("unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx\n",
122 "last fault for address: 0x%08lx\n", 124 addr, my_reason->addr);
123 addr, my_reason->addr);
124 print_pte(addr); 125 print_pte(addr);
125 print_symbol(KERN_EMERG "faulting IP is at %s\n", regs->ip); 126 print_symbol(KERN_EMERG "faulting IP is at %s\n", regs->ip);
126 print_symbol(KERN_EMERG "last faulting IP was at %s\n", my_reason->ip); 127 print_symbol(KERN_EMERG "last faulting IP was at %s\n", my_reason->ip);
127#ifdef __i386__ 128#ifdef __i386__
128 pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", 129 pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
129 regs->ax, regs->bx, regs->cx, regs->dx); 130 regs->ax, regs->bx, regs->cx, regs->dx);
130 pr_emerg("esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n", 131 pr_emerg("esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n",
131 regs->si, regs->di, regs->bp, regs->sp); 132 regs->si, regs->di, regs->bp, regs->sp);
132#else 133#else
133 pr_emerg("rax: %016lx rcx: %016lx rdx: %016lx\n", 134 pr_emerg("rax: %016lx rcx: %016lx rdx: %016lx\n",
134 regs->ax, regs->cx, regs->dx); 135 regs->ax, regs->cx, regs->dx);
135 pr_emerg("rsi: %016lx rdi: %016lx rbp: %016lx rsp: %016lx\n", 136 pr_emerg("rsi: %016lx rdi: %016lx rbp: %016lx rsp: %016lx\n",
136 regs->si, regs->di, regs->bp, regs->sp); 137 regs->si, regs->di, regs->bp, regs->sp);
137#endif 138#endif
138 put_cpu_var(pf_reason); 139 put_cpu_var(pf_reason);
139 BUG(); 140 BUG();
@@ -213,7 +214,7 @@ static void post(struct kmmio_probe *p, unsigned long condition,
213 /* this should always return the active_trace count to 0 */ 214 /* this should always return the active_trace count to 0 */
214 my_reason->active_traces--; 215 my_reason->active_traces--;
215 if (my_reason->active_traces) { 216 if (my_reason->active_traces) {
216 pr_emerg(NAME "unexpected post handler"); 217 pr_emerg("unexpected post handler");
217 BUG(); 218 BUG();
218 } 219 }
219 220
@@ -244,7 +245,7 @@ static void ioremap_trace_core(resource_size_t offset, unsigned long size,
244 }; 245 };
245 246
246 if (!trace) { 247 if (!trace) {
247 pr_err(NAME "kmalloc failed in ioremap\n"); 248 pr_err("kmalloc failed in ioremap\n");
248 return; 249 return;
249 } 250 }
250 251
@@ -282,8 +283,8 @@ void mmiotrace_ioremap(resource_size_t offset, unsigned long size,
282 if (!is_enabled()) /* recheck and proper locking in *_core() */ 283 if (!is_enabled()) /* recheck and proper locking in *_core() */
283 return; 284 return;
284 285
285 pr_debug(NAME "ioremap_*(0x%llx, 0x%lx) = %p\n", 286 pr_debug("ioremap_*(0x%llx, 0x%lx) = %p\n",
286 (unsigned long long)offset, size, addr); 287 (unsigned long long)offset, size, addr);
287 if ((filter_offset) && (offset != filter_offset)) 288 if ((filter_offset) && (offset != filter_offset))
288 return; 289 return;
289 ioremap_trace_core(offset, size, addr); 290 ioremap_trace_core(offset, size, addr);
@@ -301,7 +302,7 @@ static void iounmap_trace_core(volatile void __iomem *addr)
301 struct remap_trace *tmp; 302 struct remap_trace *tmp;
302 struct remap_trace *found_trace = NULL; 303 struct remap_trace *found_trace = NULL;
303 304
304 pr_debug(NAME "Unmapping %p.\n", addr); 305 pr_debug("Unmapping %p.\n", addr);
305 306
306 spin_lock_irq(&trace_lock); 307 spin_lock_irq(&trace_lock);
307 if (!is_enabled()) 308 if (!is_enabled())
@@ -363,9 +364,8 @@ static void clear_trace_list(void)
363 * Caller also ensures is_enabled() cannot change. 364 * Caller also ensures is_enabled() cannot change.
364 */ 365 */
365 list_for_each_entry(trace, &trace_list, list) { 366 list_for_each_entry(trace, &trace_list, list) {
366 pr_notice(NAME "purging non-iounmapped " 367 pr_notice("purging non-iounmapped trace @0x%08lx, size 0x%lx.\n",
367 "trace @0x%08lx, size 0x%lx.\n", 368 trace->probe.addr, trace->probe.len);
368 trace->probe.addr, trace->probe.len);
369 if (!nommiotrace) 369 if (!nommiotrace)
370 unregister_kmmio_probe(&trace->probe); 370 unregister_kmmio_probe(&trace->probe);
371 } 371 }
@@ -387,7 +387,7 @@ static void enter_uniprocessor(void)
387 387
388 if (downed_cpus == NULL && 388 if (downed_cpus == NULL &&
389 !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { 389 !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) {
390 pr_notice(NAME "Failed to allocate mask\n"); 390 pr_notice("Failed to allocate mask\n");
391 goto out; 391 goto out;
392 } 392 }
393 393
@@ -395,20 +395,19 @@ static void enter_uniprocessor(void)
395 cpumask_copy(downed_cpus, cpu_online_mask); 395 cpumask_copy(downed_cpus, cpu_online_mask);
396 cpumask_clear_cpu(cpumask_first(cpu_online_mask), downed_cpus); 396 cpumask_clear_cpu(cpumask_first(cpu_online_mask), downed_cpus);
397 if (num_online_cpus() > 1) 397 if (num_online_cpus() > 1)
398 pr_notice(NAME "Disabling non-boot CPUs...\n"); 398 pr_notice("Disabling non-boot CPUs...\n");
399 put_online_cpus(); 399 put_online_cpus();
400 400
401 for_each_cpu(cpu, downed_cpus) { 401 for_each_cpu(cpu, downed_cpus) {
402 err = cpu_down(cpu); 402 err = cpu_down(cpu);
403 if (!err) 403 if (!err)
404 pr_info(NAME "CPU%d is down.\n", cpu); 404 pr_info("CPU%d is down.\n", cpu);
405 else 405 else
406 pr_err(NAME "Error taking CPU%d down: %d\n", cpu, err); 406 pr_err("Error taking CPU%d down: %d\n", cpu, err);
407 } 407 }
408out: 408out:
409 if (num_online_cpus() > 1) 409 if (num_online_cpus() > 1)
410 pr_warning(NAME "multiple CPUs still online, " 410 pr_warning("multiple CPUs still online, may miss events.\n");
411 "may miss events.\n");
412} 411}
413 412
414/* __ref because leave_uniprocessor calls cpu_up which is __cpuinit, 413/* __ref because leave_uniprocessor calls cpu_up which is __cpuinit,
@@ -420,13 +419,13 @@ static void __ref leave_uniprocessor(void)
420 419
421 if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0) 420 if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0)
422 return; 421 return;
423 pr_notice(NAME "Re-enabling CPUs...\n"); 422 pr_notice("Re-enabling CPUs...\n");
424 for_each_cpu(cpu, downed_cpus) { 423 for_each_cpu(cpu, downed_cpus) {
425 err = cpu_up(cpu); 424 err = cpu_up(cpu);
426 if (!err) 425 if (!err)
427 pr_info(NAME "enabled CPU%d.\n", cpu); 426 pr_info("enabled CPU%d.\n", cpu);
428 else 427 else
429 pr_err(NAME "cannot re-enable CPU%d: %d\n", cpu, err); 428 pr_err("cannot re-enable CPU%d: %d\n", cpu, err);
430 } 429 }
431} 430}
432 431
@@ -434,8 +433,8 @@ static void __ref leave_uniprocessor(void)
434static void enter_uniprocessor(void) 433static void enter_uniprocessor(void)
435{ 434{
436 if (num_online_cpus() > 1) 435 if (num_online_cpus() > 1)
437 pr_warning(NAME "multiple CPUs are online, may miss events. " 436 pr_warning("multiple CPUs are online, may miss events. "
438 "Suggest booting with maxcpus=1 kernel argument.\n"); 437 "Suggest booting with maxcpus=1 kernel argument.\n");
439} 438}
440 439
441static void leave_uniprocessor(void) 440static void leave_uniprocessor(void)
@@ -450,13 +449,13 @@ void enable_mmiotrace(void)
450 goto out; 449 goto out;
451 450
452 if (nommiotrace) 451 if (nommiotrace)
453 pr_info(NAME "MMIO tracing disabled.\n"); 452 pr_info("MMIO tracing disabled.\n");
454 kmmio_init(); 453 kmmio_init();
455 enter_uniprocessor(); 454 enter_uniprocessor();
456 spin_lock_irq(&trace_lock); 455 spin_lock_irq(&trace_lock);
457 atomic_inc(&mmiotrace_enabled); 456 atomic_inc(&mmiotrace_enabled);
458 spin_unlock_irq(&trace_lock); 457 spin_unlock_irq(&trace_lock);
459 pr_info(NAME "enabled.\n"); 458 pr_info("enabled.\n");
460out: 459out:
461 mutex_unlock(&mmiotrace_mutex); 460 mutex_unlock(&mmiotrace_mutex);
462} 461}
@@ -475,7 +474,7 @@ void disable_mmiotrace(void)
475 clear_trace_list(); /* guarantees: no more kmmio callbacks */ 474 clear_trace_list(); /* guarantees: no more kmmio callbacks */
476 leave_uniprocessor(); 475 leave_uniprocessor();
477 kmmio_cleanup(); 476 kmmio_cleanup();
478 pr_info(NAME "disabled.\n"); 477 pr_info("disabled.\n");
479out: 478out:
480 mutex_unlock(&mmiotrace_mutex); 479 mutex_unlock(&mmiotrace_mutex);
481} 480}
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 66b55d6e69ed..ae9648eb1c7f 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -704,9 +704,8 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
704 if (!range_is_allowed(pfn, size)) 704 if (!range_is_allowed(pfn, size))
705 return 0; 705 return 0;
706 706
707 if (file->f_flags & O_SYNC) { 707 if (file->f_flags & O_DSYNC)
708 flags = _PAGE_CACHE_UC_MINUS; 708 flags = _PAGE_CACHE_UC_MINUS;
709 }
710 709
711#ifdef CONFIG_X86_32 710#ifdef CONFIG_X86_32
712 /* 711 /*
diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index d49202e740ea..564b008a51c7 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -15,3 +15,8 @@ obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
15 15
16obj-y += common.o early.o 16obj-y += common.o early.o
17obj-y += amd_bus.o 17obj-y += amd_bus.o
18obj-$(CONFIG_X86_64) += bus_numa.o intel_bus.o
19
20ifeq ($(CONFIG_PCI_DEBUG),y)
21EXTRA_CFLAGS += -DDEBUG
22endif
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 1014eb4bfc37..959e548a7039 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -7,6 +7,7 @@
7#include <asm/pci_x86.h> 7#include <asm/pci_x86.h>
8 8
9struct pci_root_info { 9struct pci_root_info {
10 struct acpi_device *bridge;
10 char *name; 11 char *name;
11 unsigned int res_num; 12 unsigned int res_num;
12 struct resource *res; 13 struct resource *res;
@@ -58,6 +59,30 @@ bus_has_transparent_bridge(struct pci_bus *bus)
58 return false; 59 return false;
59} 60}
60 61
62static void
63align_resource(struct acpi_device *bridge, struct resource *res)
64{
65 int align = (res->flags & IORESOURCE_MEM) ? 16 : 4;
66
67 /*
68 * Host bridge windows are not BARs, but the decoders on the PCI side
69 * that claim this address space have starting alignment and length
70 * constraints, so fix any obvious BIOS goofs.
71 */
72 if (!IS_ALIGNED(res->start, align)) {
73 dev_printk(KERN_DEBUG, &bridge->dev,
74 "host bridge window %pR invalid; "
75 "aligning start to %d-byte boundary\n", res, align);
76 res->start &= ~(align - 1);
77 }
78 if (!IS_ALIGNED(res->end + 1, align)) {
79 dev_printk(KERN_DEBUG, &bridge->dev,
80 "host bridge window %pR invalid; "
81 "aligning end to %d-byte boundary\n", res, align);
82 res->end = ALIGN(res->end, align) - 1;
83 }
84}
85
61static acpi_status 86static acpi_status
62setup_resource(struct acpi_resource *acpi_res, void *data) 87setup_resource(struct acpi_resource *acpi_res, void *data)
63{ 88{
@@ -91,11 +116,12 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
91 start = addr.minimum + addr.translation_offset; 116 start = addr.minimum + addr.translation_offset;
92 end = start + addr.address_length - 1; 117 end = start + addr.address_length - 1;
93 if (info->res_num >= max_root_bus_resources) { 118 if (info->res_num >= max_root_bus_resources) {
94 printk(KERN_WARNING "PCI: Failed to allocate 0x%lx-0x%lx " 119 if (pci_probe & PCI_USE__CRS)
95 "from %s for %s due to _CRS returning more than " 120 printk(KERN_WARNING "PCI: Failed to allocate "
96 "%d resource descriptors\n", (unsigned long) start, 121 "0x%lx-0x%lx from %s for %s due to _CRS "
97 (unsigned long) end, root->name, info->name, 122 "returning more than %d resource descriptors\n",
98 max_root_bus_resources); 123 (unsigned long) start, (unsigned long) end,
124 root->name, info->name, max_root_bus_resources);
99 return AE_OK; 125 return AE_OK;
100 } 126 }
101 127
@@ -105,14 +131,28 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
105 res->start = start; 131 res->start = start;
106 res->end = end; 132 res->end = end;
107 res->child = NULL; 133 res->child = NULL;
134 align_resource(info->bridge, res);
135
136 if (!(pci_probe & PCI_USE__CRS)) {
137 dev_printk(KERN_DEBUG, &info->bridge->dev,
138 "host bridge window %pR (ignored)\n", res);
139 return AE_OK;
140 }
108 141
109 if (insert_resource(root, res)) { 142 if (insert_resource(root, res)) {
110 printk(KERN_ERR "PCI: Failed to allocate 0x%lx-0x%lx " 143 dev_err(&info->bridge->dev,
111 "from %s for %s\n", (unsigned long) res->start, 144 "can't allocate host bridge window %pR\n", res);
112 (unsigned long) res->end, root->name, info->name);
113 } else { 145 } else {
114 info->bus->resource[info->res_num] = res; 146 info->bus->resource[info->res_num] = res;
115 info->res_num++; 147 info->res_num++;
148 if (addr.translation_offset)
149 dev_info(&info->bridge->dev, "host bridge window %pR "
150 "(PCI address [%#llx-%#llx])\n",
151 res, res->start - addr.translation_offset,
152 res->end - addr.translation_offset);
153 else
154 dev_info(&info->bridge->dev,
155 "host bridge window %pR\n", res);
116 } 156 }
117 return AE_OK; 157 return AE_OK;
118} 158}
@@ -124,6 +164,12 @@ get_current_resources(struct acpi_device *device, int busnum,
124 struct pci_root_info info; 164 struct pci_root_info info;
125 size_t size; 165 size_t size;
126 166
167 if (!(pci_probe & PCI_USE__CRS))
168 dev_info(&device->dev,
169 "ignoring host bridge windows from ACPI; "
170 "boot with \"pci=use_crs\" to use them\n");
171
172 info.bridge = device;
127 info.bus = bus; 173 info.bus = bus;
128 info.res_num = 0; 174 info.res_num = 0;
129 acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_resource, 175 acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_resource,
@@ -163,8 +209,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
163#endif 209#endif
164 210
165 if (domain && !pci_domains_supported) { 211 if (domain && !pci_domains_supported) {
166 printk(KERN_WARNING "PCI: Multiple domains not supported " 212 printk(KERN_WARNING "pci_bus %04x:%02x: "
167 "(dom %d, bus %d)\n", domain, busnum); 213 "ignored (multiple domains not supported)\n",
214 domain, busnum);
168 return NULL; 215 return NULL;
169 } 216 }
170 217
@@ -188,7 +235,8 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
188 */ 235 */
189 sd = kzalloc(sizeof(*sd), GFP_KERNEL); 236 sd = kzalloc(sizeof(*sd), GFP_KERNEL);
190 if (!sd) { 237 if (!sd) {
191 printk(KERN_ERR "PCI: OOM, not probing PCI bus %02x\n", busnum); 238 printk(KERN_WARNING "pci_bus %04x:%02x: "
239 "ignored (out of memory)\n", domain, busnum);
192 return NULL; 240 return NULL;
193 } 241 }
194 242
@@ -209,9 +257,7 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
209 } else { 257 } else {
210 bus = pci_create_bus(NULL, busnum, &pci_root_ops, sd); 258 bus = pci_create_bus(NULL, busnum, &pci_root_ops, sd);
211 if (bus) { 259 if (bus) {
212 if (pci_probe & PCI_USE__CRS) 260 get_current_resources(device, busnum, domain, bus);
213 get_current_resources(device, busnum, domain,
214 bus);
215 bus->subordinate = pci_scan_child_bus(bus); 261 bus->subordinate = pci_scan_child_bus(bus);
216 } 262 }
217 } 263 }
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 572ee9782f2a..95ecbd495955 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -6,10 +6,10 @@
6 6
7#ifdef CONFIG_X86_64 7#ifdef CONFIG_X86_64
8#include <asm/pci-direct.h> 8#include <asm/pci-direct.h>
9#include <asm/mpspec.h>
10#include <linux/cpumask.h>
11#endif 9#endif
12 10
11#include "bus_numa.h"
12
13/* 13/*
14 * This discovers the pcibus <-> node mapping on AMD K8. 14 * This discovers the pcibus <-> node mapping on AMD K8.
15 * also get peer root bus resource for io,mmio 15 * also get peer root bus resource for io,mmio
@@ -17,67 +17,6 @@
17 17
18#ifdef CONFIG_X86_64 18#ifdef CONFIG_X86_64
19 19
20/*
21 * sub bus (transparent) will use entres from 3 to store extra from root,
22 * so need to make sure have enought slot there, increase PCI_BUS_NUM_RESOURCES?
23 */
24#define RES_NUM 16
25struct pci_root_info {
26 char name[12];
27 unsigned int res_num;
28 struct resource res[RES_NUM];
29 int bus_min;
30 int bus_max;
31 int node;
32 int link;
33};
34
35/* 4 at this time, it may become to 32 */
36#define PCI_ROOT_NR 4
37static int pci_root_num;
38static struct pci_root_info pci_root_info[PCI_ROOT_NR];
39
40void x86_pci_root_bus_res_quirks(struct pci_bus *b)
41{
42 int i;
43 int j;
44 struct pci_root_info *info;
45
46 /* don't go for it if _CRS is used already */
47 if (b->resource[0] != &ioport_resource ||
48 b->resource[1] != &iomem_resource)
49 return;
50
51 /* if only one root bus, don't need to anything */
52 if (pci_root_num < 2)
53 return;
54
55 for (i = 0; i < pci_root_num; i++) {
56 if (pci_root_info[i].bus_min == b->number)
57 break;
58 }
59
60 if (i == pci_root_num)
61 return;
62
63 printk(KERN_DEBUG "PCI: peer root bus %02x res updated from pci conf\n",
64 b->number);
65
66 info = &pci_root_info[i];
67 for (j = 0; j < info->res_num; j++) {
68 struct resource *res;
69 struct resource *root;
70
71 res = &info->res[j];
72 b->resource[j] = res;
73 if (res->flags & IORESOURCE_IO)
74 root = &ioport_resource;
75 else
76 root = &iomem_resource;
77 insert_resource(root, res);
78 }
79}
80
81#define RANGE_NUM 16 20#define RANGE_NUM 16
82 21
83struct res_range { 22struct res_range {
@@ -130,52 +69,6 @@ static void __init update_range(struct res_range *range, size_t start,
130 } 69 }
131} 70}
132 71
133static void __init update_res(struct pci_root_info *info, size_t start,
134 size_t end, unsigned long flags, int merge)
135{
136 int i;
137 struct resource *res;
138
139 if (!merge)
140 goto addit;
141
142 /* try to merge it with old one */
143 for (i = 0; i < info->res_num; i++) {
144 size_t final_start, final_end;
145 size_t common_start, common_end;
146
147 res = &info->res[i];
148 if (res->flags != flags)
149 continue;
150
151 common_start = max((size_t)res->start, start);
152 common_end = min((size_t)res->end, end);
153 if (common_start > common_end + 1)
154 continue;
155
156 final_start = min((size_t)res->start, start);
157 final_end = max((size_t)res->end, end);
158
159 res->start = final_start;
160 res->end = final_end;
161 return;
162 }
163
164addit:
165
166 /* need to add that */
167 if (info->res_num >= RES_NUM)
168 return;
169
170 res = &info->res[info->res_num];
171 res->name = info->name;
172 res->flags = flags;
173 res->start = start;
174 res->end = end;
175 res->child = NULL;
176 info->res_num++;
177}
178
179struct pci_hostbridge_probe { 72struct pci_hostbridge_probe {
180 u32 bus; 73 u32 bus;
181 u32 slot; 74 u32 slot;
@@ -230,7 +123,6 @@ static int __init early_fill_mp_bus_info(void)
230 int j; 123 int j;
231 unsigned bus; 124 unsigned bus;
232 unsigned slot; 125 unsigned slot;
233 int found;
234 int node; 126 int node;
235 int link; 127 int link;
236 int def_node; 128 int def_node;
@@ -247,7 +139,7 @@ static int __init early_fill_mp_bus_info(void)
247 if (!early_pci_allowed()) 139 if (!early_pci_allowed())
248 return -1; 140 return -1;
249 141
250 found = 0; 142 found_all_numa_early = 0;
251 for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { 143 for (i = 0; i < ARRAY_SIZE(pci_probes); i++) {
252 u32 id; 144 u32 id;
253 u16 device; 145 u16 device;
@@ -261,12 +153,12 @@ static int __init early_fill_mp_bus_info(void)
261 device = (id>>16) & 0xffff; 153 device = (id>>16) & 0xffff;
262 if (pci_probes[i].vendor == vendor && 154 if (pci_probes[i].vendor == vendor &&
263 pci_probes[i].device == device) { 155 pci_probes[i].device == device) {
264 found = 1; 156 found_all_numa_early = 1;
265 break; 157 break;
266 } 158 }
267 } 159 }
268 160
269 if (!found) 161 if (!found_all_numa_early)
270 return 0; 162 return 0;
271 163
272 pci_root_num = 0; 164 pci_root_num = 0;
@@ -488,7 +380,7 @@ static int __init early_fill_mp_bus_info(void)
488 info = &pci_root_info[i]; 380 info = &pci_root_info[i];
489 res_num = info->res_num; 381 res_num = info->res_num;
490 busnum = info->bus_min; 382 busnum = info->bus_min;
491 printk(KERN_DEBUG "bus: [%02x,%02x] on node %x link %x\n", 383 printk(KERN_DEBUG "bus: [%02x, %02x] on node %x link %x\n",
492 info->bus_min, info->bus_max, info->node, info->link); 384 info->bus_min, info->bus_max, info->node, info->link);
493 for (j = 0; j < res_num; j++) { 385 for (j = 0; j < res_num; j++) {
494 res = &info->res[j]; 386 res = &info->res[j];
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c
new file mode 100644
index 000000000000..145df00e0387
--- /dev/null
+++ b/arch/x86/pci/bus_numa.c
@@ -0,0 +1,101 @@
1#include <linux/init.h>
2#include <linux/pci.h>
3
4#include "bus_numa.h"
5
6int pci_root_num;
7struct pci_root_info pci_root_info[PCI_ROOT_NR];
8int found_all_numa_early;
9
10void x86_pci_root_bus_res_quirks(struct pci_bus *b)
11{
12 int i;
13 int j;
14 struct pci_root_info *info;
15
16 /* don't go for it if _CRS is used already */
17 if (b->resource[0] != &ioport_resource ||
18 b->resource[1] != &iomem_resource)
19 return;
20
21 if (!pci_root_num)
22 return;
23
24 /* for amd, if only one root bus, don't need to do anything */
25 if (pci_root_num < 2 && found_all_numa_early)
26 return;
27
28 for (i = 0; i < pci_root_num; i++) {
29 if (pci_root_info[i].bus_min == b->number)
30 break;
31 }
32
33 if (i == pci_root_num)
34 return;
35
36 printk(KERN_DEBUG "PCI: peer root bus %02x res updated from pci conf\n",
37 b->number);
38
39 info = &pci_root_info[i];
40 for (j = 0; j < info->res_num; j++) {
41 struct resource *res;
42 struct resource *root;
43
44 res = &info->res[j];
45 b->resource[j] = res;
46 if (res->flags & IORESOURCE_IO)
47 root = &ioport_resource;
48 else
49 root = &iomem_resource;
50 insert_resource(root, res);
51 }
52}
53
54void __init update_res(struct pci_root_info *info, size_t start,
55 size_t end, unsigned long flags, int merge)
56{
57 int i;
58 struct resource *res;
59
60 if (start > end)
61 return;
62
63 if (!merge)
64 goto addit;
65
66 /* try to merge it with old one */
67 for (i = 0; i < info->res_num; i++) {
68 size_t final_start, final_end;
69 size_t common_start, common_end;
70
71 res = &info->res[i];
72 if (res->flags != flags)
73 continue;
74
75 common_start = max((size_t)res->start, start);
76 common_end = min((size_t)res->end, end);
77 if (common_start > common_end + 1)
78 continue;
79
80 final_start = min((size_t)res->start, start);
81 final_end = max((size_t)res->end, end);
82
83 res->start = final_start;
84 res->end = final_end;
85 return;
86 }
87
88addit:
89
90 /* need to add that */
91 if (info->res_num >= RES_NUM)
92 return;
93
94 res = &info->res[info->res_num];
95 res->name = info->name;
96 res->flags = flags;
97 res->start = start;
98 res->end = end;
99 res->child = NULL;
100 info->res_num++;
101}
diff --git a/arch/x86/pci/bus_numa.h b/arch/x86/pci/bus_numa.h
new file mode 100644
index 000000000000..adbc23fe82ac
--- /dev/null
+++ b/arch/x86/pci/bus_numa.h
@@ -0,0 +1,27 @@
1#ifdef CONFIG_X86_64
2
3/*
4 * sub bus (transparent) will use entres from 3 to store extra from
5 * root, so need to make sure we have enough slot there, Should we
6 * increase PCI_BUS_NUM_RESOURCES?
7 */
8#define RES_NUM 16
9struct pci_root_info {
10 char name[12];
11 unsigned int res_num;
12 struct resource res[RES_NUM];
13 int bus_min;
14 int bus_max;
15 int node;
16 int link;
17};
18
19/* 4 at this time, it may become to 32 */
20#define PCI_ROOT_NR 4
21extern int pci_root_num;
22extern struct pci_root_info pci_root_info[PCI_ROOT_NR];
23extern int found_all_numa_early;
24
25extern void update_res(struct pci_root_info *info, size_t start,
26 size_t end, unsigned long flags, int merge);
27#endif
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 1331fcf26143..d2552c68e94d 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -410,8 +410,6 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum)
410 return bus; 410 return bus;
411} 411}
412 412
413extern u8 pci_cache_line_size;
414
415int __init pcibios_init(void) 413int __init pcibios_init(void)
416{ 414{
417 struct cpuinfo_x86 *c = &boot_cpu_data; 415 struct cpuinfo_x86 *c = &boot_cpu_data;
@@ -422,15 +420,19 @@ int __init pcibios_init(void)
422 } 420 }
423 421
424 /* 422 /*
425 * Assume PCI cacheline size of 32 bytes for all x86s except K7/K8 423 * Set PCI cacheline size to that of the CPU if the CPU has reported it.
426 * and P4. It's also good for 386/486s (which actually have 16) 424 * (For older CPUs that don't support cpuid, we se it to 32 bytes
425 * It's also good for 386/486s (which actually have 16)
427 * as quite a few PCI devices do not support smaller values. 426 * as quite a few PCI devices do not support smaller values.
428 */ 427 */
429 pci_cache_line_size = 32 >> 2; 428 if (c->x86_clflush_size > 0) {
430 if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD) 429 pci_dfl_cache_line_size = c->x86_clflush_size >> 2;
431 pci_cache_line_size = 64 >> 2; /* K7 & K8 */ 430 printk(KERN_DEBUG "PCI: pci_cache_line_size set to %d bytes\n",
432 else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL) 431 pci_dfl_cache_line_size << 2);
433 pci_cache_line_size = 128 >> 2; /* P4 */ 432 } else {
433 pci_dfl_cache_line_size = 32 >> 2;
434 printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n");
435 }
434 436
435 pcibios_resource_survey(); 437 pcibios_resource_survey();
436 438
diff --git a/arch/x86/pci/early.c b/arch/x86/pci/early.c
index aaf26ae58cd5..d1067d539bee 100644
--- a/arch/x86/pci/early.c
+++ b/arch/x86/pci/early.c
@@ -12,8 +12,6 @@ u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset)
12 u32 v; 12 u32 v;
13 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 13 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
14 v = inl(0xcfc); 14 v = inl(0xcfc);
15 if (v != 0xffffffff)
16 pr_debug("%x reading 4 from %x: %x\n", slot, offset, v);
17 return v; 15 return v;
18} 16}
19 17
@@ -22,7 +20,6 @@ u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset)
22 u8 v; 20 u8 v;
23 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 21 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
24 v = inb(0xcfc + (offset&3)); 22 v = inb(0xcfc + (offset&3));
25 pr_debug("%x reading 1 from %x: %x\n", slot, offset, v);
26 return v; 23 return v;
27} 24}
28 25
@@ -31,28 +28,24 @@ u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset)
31 u16 v; 28 u16 v;
32 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 29 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
33 v = inw(0xcfc + (offset&2)); 30 v = inw(0xcfc + (offset&2));
34 pr_debug("%x reading 2 from %x: %x\n", slot, offset, v);
35 return v; 31 return v;
36} 32}
37 33
38void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, 34void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset,
39 u32 val) 35 u32 val)
40{ 36{
41 pr_debug("%x writing to %x: %x\n", slot, offset, val);
42 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 37 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
43 outl(val, 0xcfc); 38 outl(val, 0xcfc);
44} 39}
45 40
46void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) 41void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val)
47{ 42{
48 pr_debug("%x writing to %x: %x\n", slot, offset, val);
49 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 43 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
50 outb(val, 0xcfc + (offset&3)); 44 outb(val, 0xcfc + (offset&3));
51} 45}
52 46
53void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val) 47void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val)
54{ 48{
55 pr_debug("%x writing to %x: %x\n", slot, offset, val);
56 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); 49 outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
57 outw(val, 0xcfc + (offset&2)); 50 outw(val, 0xcfc + (offset&2));
58} 51}
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index b22d13b0c71d..5dc9e8c63fcd 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -129,7 +129,9 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
129 continue; 129 continue;
130 if (!r->start || 130 if (!r->start ||
131 pci_claim_resource(dev, idx) < 0) { 131 pci_claim_resource(dev, idx) < 0) {
132 dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx); 132 dev_info(&dev->dev,
133 "can't reserve window %pR\n",
134 r);
133 /* 135 /*
134 * Something is wrong with the region. 136 * Something is wrong with the region.
135 * Invalidate the resource to prevent 137 * Invalidate the resource to prevent
@@ -144,16 +146,29 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
144 } 146 }
145} 147}
146 148
149struct pci_check_idx_range {
150 int start;
151 int end;
152};
153
147static void __init pcibios_allocate_resources(int pass) 154static void __init pcibios_allocate_resources(int pass)
148{ 155{
149 struct pci_dev *dev = NULL; 156 struct pci_dev *dev = NULL;
150 int idx, disabled; 157 int idx, disabled, i;
151 u16 command; 158 u16 command;
152 struct resource *r; 159 struct resource *r;
153 160
161 struct pci_check_idx_range idx_range[] = {
162 { PCI_STD_RESOURCES, PCI_STD_RESOURCE_END },
163#ifdef CONFIG_PCI_IOV
164 { PCI_IOV_RESOURCES, PCI_IOV_RESOURCE_END },
165#endif
166 };
167
154 for_each_pci_dev(dev) { 168 for_each_pci_dev(dev) {
155 pci_read_config_word(dev, PCI_COMMAND, &command); 169 pci_read_config_word(dev, PCI_COMMAND, &command);
156 for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) { 170 for (i = 0; i < ARRAY_SIZE(idx_range); i++)
171 for (idx = idx_range[i].start; idx <= idx_range[i].end; idx++) {
157 r = &dev->resource[idx]; 172 r = &dev->resource[idx];
158 if (r->parent) /* Already allocated */ 173 if (r->parent) /* Already allocated */
159 continue; 174 continue;
@@ -164,12 +179,12 @@ static void __init pcibios_allocate_resources(int pass)
164 else 179 else
165 disabled = !(command & PCI_COMMAND_MEMORY); 180 disabled = !(command & PCI_COMMAND_MEMORY);
166 if (pass == disabled) { 181 if (pass == disabled) {
167 dev_dbg(&dev->dev, "resource %#08llx-%#08llx (f=%lx, d=%d, p=%d)\n", 182 dev_dbg(&dev->dev,
168 (unsigned long long) r->start, 183 "BAR %d: reserving %pr (d=%d, p=%d)\n",
169 (unsigned long long) r->end, 184 idx, r, disabled, pass);
170 r->flags, disabled, pass);
171 if (pci_claim_resource(dev, idx) < 0) { 185 if (pci_claim_resource(dev, idx) < 0) {
172 dev_info(&dev->dev, "BAR %d: can't allocate resource\n", idx); 186 dev_info(&dev->dev,
187 "can't reserve %pR\n", r);
173 /* We'll assign a new address later */ 188 /* We'll assign a new address later */
174 r->end -= r->start; 189 r->end -= r->start;
175 r->start = 0; 190 r->start = 0;
@@ -182,7 +197,7 @@ static void __init pcibios_allocate_resources(int pass)
182 /* Turn the ROM off, leave the resource region, 197 /* Turn the ROM off, leave the resource region,
183 * but keep it unregistered. */ 198 * but keep it unregistered. */
184 u32 reg; 199 u32 reg;
185 dev_dbg(&dev->dev, "disabling ROM\n"); 200 dev_dbg(&dev->dev, "disabling ROM %pR\n", r);
186 r->flags &= ~IORESOURCE_ROM_ENABLE; 201 r->flags &= ~IORESOURCE_ROM_ENABLE;
187 pci_read_config_dword(dev, 202 pci_read_config_dword(dev,
188 dev->rom_base_reg, &reg); 203 dev->rom_base_reg, &reg);
@@ -282,6 +297,15 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
282 return -EINVAL; 297 return -EINVAL;
283 298
284 prot = pgprot_val(vma->vm_page_prot); 299 prot = pgprot_val(vma->vm_page_prot);
300
301 /*
302 * Return error if pat is not enabled and write_combine is requested.
303 * Caller can followup with UC MINUS request and add a WC mtrr if there
304 * is a free mtrr slot.
305 */
306 if (!pat_enabled && write_combine)
307 return -EINVAL;
308
285 if (pat_enabled && write_combine) 309 if (pat_enabled && write_combine)
286 prot |= _PAGE_CACHE_WC; 310 prot |= _PAGE_CACHE_WC;
287 else if (pat_enabled || boot_cpu_data.x86 > 3) 311 else if (pat_enabled || boot_cpu_data.x86 > 3)
diff --git a/arch/x86/pci/intel_bus.c b/arch/x86/pci/intel_bus.c
new file mode 100644
index 000000000000..b7a55dc55d13
--- /dev/null
+++ b/arch/x86/pci/intel_bus.c
@@ -0,0 +1,90 @@
1/*
2 * to read io range from IOH pci conf, need to do it after mmconfig is there
3 */
4
5#include <linux/delay.h>
6#include <linux/dmi.h>
7#include <linux/pci.h>
8#include <linux/init.h>
9#include <asm/pci_x86.h>
10
11#include "bus_numa.h"
12
13static inline void print_ioh_resources(struct pci_root_info *info)
14{
15 int res_num;
16 int busnum;
17 int i;
18
19 printk(KERN_DEBUG "IOH bus: [%02x, %02x]\n",
20 info->bus_min, info->bus_max);
21 res_num = info->res_num;
22 busnum = info->bus_min;
23 for (i = 0; i < res_num; i++) {
24 struct resource *res;
25
26 res = &info->res[i];
27 printk(KERN_DEBUG "IOH bus: %02x index %x %s: [%llx, %llx]\n",
28 busnum, i,
29 (res->flags & IORESOURCE_IO) ? "io port" :
30 "mmio",
31 res->start, res->end);
32 }
33}
34
35#define IOH_LIO 0x108
36#define IOH_LMMIOL 0x10c
37#define IOH_LMMIOH 0x110
38#define IOH_LMMIOH_BASEU 0x114
39#define IOH_LMMIOH_LIMITU 0x118
40#define IOH_LCFGBUS 0x11c
41
42static void __devinit pci_root_bus_res(struct pci_dev *dev)
43{
44 u16 word;
45 u32 dword;
46 struct pci_root_info *info;
47 u16 io_base, io_end;
48 u32 mmiol_base, mmiol_end;
49 u64 mmioh_base, mmioh_end;
50 int bus_base, bus_end;
51
52 if (pci_root_num >= PCI_ROOT_NR) {
53 printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n");
54 return;
55 }
56
57 info = &pci_root_info[pci_root_num];
58 pci_root_num++;
59
60 pci_read_config_word(dev, IOH_LCFGBUS, &word);
61 bus_base = (word & 0xff);
62 bus_end = (word & 0xff00) >> 8;
63 sprintf(info->name, "PCI Bus #%02x", bus_base);
64 info->bus_min = bus_base;
65 info->bus_max = bus_end;
66
67 pci_read_config_word(dev, IOH_LIO, &word);
68 io_base = (word & 0xf0) << (12 - 4);
69 io_end = (word & 0xf000) | 0xfff;
70 update_res(info, io_base, io_end, IORESOURCE_IO, 0);
71
72 pci_read_config_dword(dev, IOH_LMMIOL, &dword);
73 mmiol_base = (dword & 0xff00) << (24 - 8);
74 mmiol_end = (dword & 0xff000000) | 0xffffff;
75 update_res(info, mmiol_base, mmiol_end, IORESOURCE_MEM, 0);
76
77 pci_read_config_dword(dev, IOH_LMMIOH, &dword);
78 mmioh_base = ((u64)(dword & 0xfc00)) << (26 - 10);
79 mmioh_end = ((u64)(dword & 0xfc000000) | 0x3ffffff);
80 pci_read_config_dword(dev, IOH_LMMIOH_BASEU, &dword);
81 mmioh_base |= ((u64)(dword & 0x7ffff)) << 32;
82 pci_read_config_dword(dev, IOH_LMMIOH_LIMITU, &dword);
83 mmioh_end |= ((u64)(dword & 0x7ffff)) << 32;
84 update_res(info, mmioh_base, mmioh_end, IORESOURCE_MEM, 0);
85
86 print_ioh_resources(info);
87}
88
89/* intel IOH */
90DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, pci_root_bus_res);
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 602c172d3bd5..b19d1e54201e 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -15,48 +15,98 @@
15#include <linux/acpi.h> 15#include <linux/acpi.h>
16#include <linux/sfi_acpi.h> 16#include <linux/sfi_acpi.h>
17#include <linux/bitmap.h> 17#include <linux/bitmap.h>
18#include <linux/sort.h> 18#include <linux/dmi.h>
19#include <asm/e820.h> 19#include <asm/e820.h>
20#include <asm/pci_x86.h> 20#include <asm/pci_x86.h>
21#include <asm/acpi.h> 21#include <asm/acpi.h>
22 22
23#define PREFIX "PCI: " 23#define PREFIX "PCI: "
24 24
25/* aperture is up to 256MB but BIOS may reserve less */
26#define MMCONFIG_APER_MIN (2 * 1024*1024)
27#define MMCONFIG_APER_MAX (256 * 1024*1024)
28
29/* Indicate if the mmcfg resources have been placed into the resource table. */ 25/* Indicate if the mmcfg resources have been placed into the resource table. */
30static int __initdata pci_mmcfg_resources_inserted; 26static int __initdata pci_mmcfg_resources_inserted;
31 27
32static __init int extend_mmcfg(int num) 28LIST_HEAD(pci_mmcfg_list);
29
30static __init void pci_mmconfig_remove(struct pci_mmcfg_region *cfg)
33{ 31{
34 struct acpi_mcfg_allocation *new; 32 if (cfg->res.parent)
35 int new_num = pci_mmcfg_config_num + num; 33 release_resource(&cfg->res);
34 list_del(&cfg->list);
35 kfree(cfg);
36}
36 37
37 new = kzalloc(sizeof(pci_mmcfg_config[0]) * new_num, GFP_KERNEL); 38static __init void free_all_mmcfg(void)
38 if (!new) 39{
39 return -1; 40 struct pci_mmcfg_region *cfg, *tmp;
40 41
41 if (pci_mmcfg_config) { 42 pci_mmcfg_arch_free();
42 memcpy(new, pci_mmcfg_config, 43 list_for_each_entry_safe(cfg, tmp, &pci_mmcfg_list, list)
43 sizeof(pci_mmcfg_config[0]) * new_num); 44 pci_mmconfig_remove(cfg);
44 kfree(pci_mmcfg_config); 45}
46
47static __init void list_add_sorted(struct pci_mmcfg_region *new)
48{
49 struct pci_mmcfg_region *cfg;
50
51 /* keep list sorted by segment and starting bus number */
52 list_for_each_entry(cfg, &pci_mmcfg_list, list) {
53 if (cfg->segment > new->segment ||
54 (cfg->segment == new->segment &&
55 cfg->start_bus >= new->start_bus)) {
56 list_add_tail(&new->list, &cfg->list);
57 return;
58 }
45 } 59 }
46 pci_mmcfg_config = new; 60 list_add_tail(&new->list, &pci_mmcfg_list);
61}
47 62
48 return 0; 63static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
64 int end, u64 addr)
65{
66 struct pci_mmcfg_region *new;
67 int num_buses;
68 struct resource *res;
69
70 if (addr == 0)
71 return NULL;
72
73 new = kzalloc(sizeof(*new), GFP_KERNEL);
74 if (!new)
75 return NULL;
76
77 new->address = addr;
78 new->segment = segment;
79 new->start_bus = start;
80 new->end_bus = end;
81
82 list_add_sorted(new);
83
84 num_buses = end - start + 1;
85 res = &new->res;
86 res->start = addr + PCI_MMCFG_BUS_OFFSET(start);
87 res->end = addr + PCI_MMCFG_BUS_OFFSET(num_buses) - 1;
88 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
89 snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN,
90 "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end);
91 res->name = new->name;
92
93 printk(KERN_INFO PREFIX "MMCONFIG for domain %04x [bus %02x-%02x] at "
94 "%pR (base %#lx)\n", segment, start, end, &new->res,
95 (unsigned long) addr);
96
97 return new;
49} 98}
50 99
51static __init void fill_one_mmcfg(u64 addr, int segment, int start, int end) 100struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus)
52{ 101{
53 int i = pci_mmcfg_config_num; 102 struct pci_mmcfg_region *cfg;
54 103
55 pci_mmcfg_config_num++; 104 list_for_each_entry(cfg, &pci_mmcfg_list, list)
56 pci_mmcfg_config[i].address = addr; 105 if (cfg->segment == segment &&
57 pci_mmcfg_config[i].pci_segment = segment; 106 cfg->start_bus <= bus && bus <= cfg->end_bus)
58 pci_mmcfg_config[i].start_bus_number = start; 107 return cfg;
59 pci_mmcfg_config[i].end_bus_number = end; 108
109 return NULL;
60} 110}
61 111
62static const char __init *pci_mmcfg_e7520(void) 112static const char __init *pci_mmcfg_e7520(void)
@@ -68,11 +118,9 @@ static const char __init *pci_mmcfg_e7520(void)
68 if (win == 0x0000 || win == 0xf000) 118 if (win == 0x0000 || win == 0xf000)
69 return NULL; 119 return NULL;
70 120
71 if (extend_mmcfg(1) == -1) 121 if (pci_mmconfig_add(0, 0, 255, win << 16) == NULL)
72 return NULL; 122 return NULL;
73 123
74 fill_one_mmcfg(win << 16, 0, 0, 255);
75
76 return "Intel Corporation E7520 Memory Controller Hub"; 124 return "Intel Corporation E7520 Memory Controller Hub";
77} 125}
78 126
@@ -114,11 +162,9 @@ static const char __init *pci_mmcfg_intel_945(void)
114 if ((pciexbar & mask) >= 0xf0000000U) 162 if ((pciexbar & mask) >= 0xf0000000U)
115 return NULL; 163 return NULL;
116 164
117 if (extend_mmcfg(1) == -1) 165 if (pci_mmconfig_add(0, 0, (len >> 20) - 1, pciexbar & mask) == NULL)
118 return NULL; 166 return NULL;
119 167
120 fill_one_mmcfg(pciexbar & mask, 0, 0, (len >> 20) - 1);
121
122 return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; 168 return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub";
123} 169}
124 170
@@ -127,7 +173,7 @@ static const char __init *pci_mmcfg_amd_fam10h(void)
127 u32 low, high, address; 173 u32 low, high, address;
128 u64 base, msr; 174 u64 base, msr;
129 int i; 175 int i;
130 unsigned segnbits = 0, busnbits; 176 unsigned segnbits = 0, busnbits, end_bus;
131 177
132 if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF)) 178 if (!(pci_probe & PCI_CHECK_ENABLE_AMD_MMCONF))
133 return NULL; 179 return NULL;
@@ -161,11 +207,13 @@ static const char __init *pci_mmcfg_amd_fam10h(void)
161 busnbits = 8; 207 busnbits = 8;
162 } 208 }
163 209
164 if (extend_mmcfg(1 << segnbits) == -1) 210 end_bus = (1 << busnbits) - 1;
165 return NULL;
166
167 for (i = 0; i < (1 << segnbits); i++) 211 for (i = 0; i < (1 << segnbits); i++)
168 fill_one_mmcfg(base + (1<<28) * i, i, 0, (1 << busnbits) - 1); 212 if (pci_mmconfig_add(i, 0, end_bus,
213 base + (1<<28) * i) == NULL) {
214 free_all_mmcfg();
215 return NULL;
216 }
169 217
170 return "AMD Family 10h NB"; 218 return "AMD Family 10h NB";
171} 219}
@@ -190,7 +238,7 @@ static const char __init *pci_mmcfg_nvidia_mcp55(void)
190 /* 238 /*
191 * do check if amd fam10h already took over 239 * do check if amd fam10h already took over
192 */ 240 */
193 if (!acpi_disabled || pci_mmcfg_config_num || mcp55_checked) 241 if (!acpi_disabled || !list_empty(&pci_mmcfg_list) || mcp55_checked)
194 return NULL; 242 return NULL;
195 243
196 mcp55_checked = true; 244 mcp55_checked = true;
@@ -213,16 +261,14 @@ static const char __init *pci_mmcfg_nvidia_mcp55(void)
213 if (!(extcfg & extcfg_enable_mask)) 261 if (!(extcfg & extcfg_enable_mask))
214 continue; 262 continue;
215 263
216 if (extend_mmcfg(1) == -1)
217 continue;
218
219 size_index = (extcfg & extcfg_size_mask) >> extcfg_size_shift; 264 size_index = (extcfg & extcfg_size_mask) >> extcfg_size_shift;
220 base = extcfg & extcfg_base_mask[size_index]; 265 base = extcfg & extcfg_base_mask[size_index];
221 /* base could > 4G */ 266 /* base could > 4G */
222 base <<= extcfg_base_lshift; 267 base <<= extcfg_base_lshift;
223 start = (extcfg & extcfg_start_mask) >> extcfg_start_shift; 268 start = (extcfg & extcfg_start_mask) >> extcfg_start_shift;
224 end = start + extcfg_sizebus[size_index] - 1; 269 end = start + extcfg_sizebus[size_index] - 1;
225 fill_one_mmcfg(base, 0, start, end); 270 if (pci_mmconfig_add(0, start, end, base) == NULL)
271 continue;
226 mcp55_mmconf_found++; 272 mcp55_mmconf_found++;
227 } 273 }
228 274
@@ -253,45 +299,27 @@ static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = {
253 0x0369, pci_mmcfg_nvidia_mcp55 }, 299 0x0369, pci_mmcfg_nvidia_mcp55 },
254}; 300};
255 301
256static int __init cmp_mmcfg(const void *x1, const void *x2)
257{
258 const typeof(pci_mmcfg_config[0]) *m1 = x1;
259 const typeof(pci_mmcfg_config[0]) *m2 = x2;
260 int start1, start2;
261
262 start1 = m1->start_bus_number;
263 start2 = m2->start_bus_number;
264
265 return start1 - start2;
266}
267
268static void __init pci_mmcfg_check_end_bus_number(void) 302static void __init pci_mmcfg_check_end_bus_number(void)
269{ 303{
270 int i; 304 struct pci_mmcfg_region *cfg, *cfgx;
271 typeof(pci_mmcfg_config[0]) *cfg, *cfgx;
272
273 /* sort them at first */
274 sort(pci_mmcfg_config, pci_mmcfg_config_num,
275 sizeof(pci_mmcfg_config[0]), cmp_mmcfg, NULL);
276 305
277 /* last one*/ 306 /* last one*/
278 if (pci_mmcfg_config_num > 0) { 307 cfg = list_entry(pci_mmcfg_list.prev, typeof(*cfg), list);
279 i = pci_mmcfg_config_num - 1; 308 if (cfg)
280 cfg = &pci_mmcfg_config[i]; 309 if (cfg->end_bus < cfg->start_bus)
281 if (cfg->end_bus_number < cfg->start_bus_number) 310 cfg->end_bus = 255;
282 cfg->end_bus_number = 255;
283 }
284 311
285 /* don't overlap please */ 312 if (list_is_singular(&pci_mmcfg_list))
286 for (i = 0; i < pci_mmcfg_config_num - 1; i++) { 313 return;
287 cfg = &pci_mmcfg_config[i];
288 cfgx = &pci_mmcfg_config[i+1];
289 314
290 if (cfg->end_bus_number < cfg->start_bus_number) 315 /* don't overlap please */
291 cfg->end_bus_number = 255; 316 list_for_each_entry(cfg, &pci_mmcfg_list, list) {
317 if (cfg->end_bus < cfg->start_bus)
318 cfg->end_bus = 255;
292 319
293 if (cfg->end_bus_number >= cfgx->start_bus_number) 320 cfgx = list_entry(cfg->list.next, typeof(*cfg), list);
294 cfg->end_bus_number = cfgx->start_bus_number - 1; 321 if (cfg != cfgx && cfg->end_bus >= cfgx->start_bus)
322 cfg->end_bus = cfgx->start_bus - 1;
295 } 323 }
296} 324}
297 325
@@ -306,8 +334,7 @@ static int __init pci_mmcfg_check_hostbridge(void)
306 if (!raw_pci_ops) 334 if (!raw_pci_ops)
307 return 0; 335 return 0;
308 336
309 pci_mmcfg_config_num = 0; 337 free_all_mmcfg();
310 pci_mmcfg_config = NULL;
311 338
312 for (i = 0; i < ARRAY_SIZE(pci_mmcfg_probes); i++) { 339 for (i = 0; i < ARRAY_SIZE(pci_mmcfg_probes); i++) {
313 bus = pci_mmcfg_probes[i].bus; 340 bus = pci_mmcfg_probes[i].bus;
@@ -322,45 +349,22 @@ static int __init pci_mmcfg_check_hostbridge(void)
322 name = pci_mmcfg_probes[i].probe(); 349 name = pci_mmcfg_probes[i].probe();
323 350
324 if (name) 351 if (name)
325 printk(KERN_INFO "PCI: Found %s with MMCONFIG support.\n", 352 printk(KERN_INFO PREFIX "%s with MMCONFIG support\n",
326 name); 353 name);
327 } 354 }
328 355
329 /* some end_bus_number is crazy, fix it */ 356 /* some end_bus_number is crazy, fix it */
330 pci_mmcfg_check_end_bus_number(); 357 pci_mmcfg_check_end_bus_number();
331 358
332 return pci_mmcfg_config_num != 0; 359 return !list_empty(&pci_mmcfg_list);
333} 360}
334 361
335static void __init pci_mmcfg_insert_resources(void) 362static void __init pci_mmcfg_insert_resources(void)
336{ 363{
337#define PCI_MMCFG_RESOURCE_NAME_LEN 24 364 struct pci_mmcfg_region *cfg;
338 int i;
339 struct resource *res;
340 char *names;
341 unsigned num_buses;
342
343 res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res),
344 pci_mmcfg_config_num, GFP_KERNEL);
345 if (!res) {
346 printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n");
347 return;
348 }
349 365
350 names = (void *)&res[pci_mmcfg_config_num]; 366 list_for_each_entry(cfg, &pci_mmcfg_list, list)
351 for (i = 0; i < pci_mmcfg_config_num; i++, res++) { 367 insert_resource(&iomem_resource, &cfg->res);
352 struct acpi_mcfg_allocation *cfg = &pci_mmcfg_config[i];
353 num_buses = cfg->end_bus_number - cfg->start_bus_number + 1;
354 res->name = names;
355 snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN,
356 "PCI MMCONFIG %u [%02x-%02x]", cfg->pci_segment,
357 cfg->start_bus_number, cfg->end_bus_number);
358 res->start = cfg->address + (cfg->start_bus_number << 20);
359 res->end = res->start + (num_buses << 20) - 1;
360 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
361 insert_resource(&iomem_resource, res);
362 names += PCI_MMCFG_RESOURCE_NAME_LEN;
363 }
364 368
365 /* Mark that the resources have been inserted. */ 369 /* Mark that the resources have been inserted. */
366 pci_mmcfg_resources_inserted = 1; 370 pci_mmcfg_resources_inserted = 1;
@@ -437,11 +441,12 @@ static int __init is_acpi_reserved(u64 start, u64 end, unsigned not_used)
437typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); 441typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type);
438 442
439static int __init is_mmconf_reserved(check_reserved_t is_reserved, 443static int __init is_mmconf_reserved(check_reserved_t is_reserved,
440 u64 addr, u64 size, int i, 444 struct pci_mmcfg_region *cfg, int with_e820)
441 typeof(pci_mmcfg_config[0]) *cfg, int with_e820)
442{ 445{
446 u64 addr = cfg->res.start;
447 u64 size = resource_size(&cfg->res);
443 u64 old_size = size; 448 u64 old_size = size;
444 int valid = 0; 449 int valid = 0, num_buses;
445 450
446 while (!is_reserved(addr, addr + size, E820_RESERVED)) { 451 while (!is_reserved(addr, addr + size, E820_RESERVED)) {
447 size >>= 1; 452 size >>= 1;
@@ -450,19 +455,25 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
450 } 455 }
451 456
452 if (size >= (16UL<<20) || size == old_size) { 457 if (size >= (16UL<<20) || size == old_size) {
453 printk(KERN_NOTICE 458 printk(KERN_INFO PREFIX "MMCONFIG at %pR reserved in %s\n",
454 "PCI: MCFG area at %Lx reserved in %s\n", 459 &cfg->res,
455 addr, with_e820?"E820":"ACPI motherboard resources"); 460 with_e820 ? "E820" : "ACPI motherboard resources");
456 valid = 1; 461 valid = 1;
457 462
458 if (old_size != size) { 463 if (old_size != size) {
459 /* update end_bus_number */ 464 /* update end_bus */
460 cfg->end_bus_number = cfg->start_bus_number + ((size>>20) - 1); 465 cfg->end_bus = cfg->start_bus + ((size>>20) - 1);
461 printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx " 466 num_buses = cfg->end_bus - cfg->start_bus + 1;
462 "segment %hu buses %u - %u\n", 467 cfg->res.end = cfg->res.start +
463 i, (unsigned long)cfg->address, cfg->pci_segment, 468 PCI_MMCFG_BUS_OFFSET(num_buses) - 1;
464 (unsigned int)cfg->start_bus_number, 469 snprintf(cfg->name, PCI_MMCFG_RESOURCE_NAME_LEN,
465 (unsigned int)cfg->end_bus_number); 470 "PCI MMCONFIG %04x [bus %02x-%02x]",
471 cfg->segment, cfg->start_bus, cfg->end_bus);
472 printk(KERN_INFO PREFIX
473 "MMCONFIG for %04x [bus%02x-%02x] "
474 "at %pR (base %#lx) (size reduced!)\n",
475 cfg->segment, cfg->start_bus, cfg->end_bus,
476 &cfg->res, (unsigned long) cfg->address);
466 } 477 }
467 } 478 }
468 479
@@ -471,45 +482,26 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
471 482
472static void __init pci_mmcfg_reject_broken(int early) 483static void __init pci_mmcfg_reject_broken(int early)
473{ 484{
474 typeof(pci_mmcfg_config[0]) *cfg; 485 struct pci_mmcfg_region *cfg;
475 int i;
476 486
477 if ((pci_mmcfg_config_num == 0) || 487 list_for_each_entry(cfg, &pci_mmcfg_list, list) {
478 (pci_mmcfg_config == NULL) ||
479 (pci_mmcfg_config[0].address == 0))
480 return;
481
482 for (i = 0; i < pci_mmcfg_config_num; i++) {
483 int valid = 0; 488 int valid = 0;
484 u64 addr, size;
485
486 cfg = &pci_mmcfg_config[i];
487 addr = cfg->start_bus_number;
488 addr <<= 20;
489 addr += cfg->address;
490 size = cfg->end_bus_number + 1 - cfg->start_bus_number;
491 size <<= 20;
492 printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
493 "segment %hu buses %u - %u\n",
494 i, (unsigned long)cfg->address, cfg->pci_segment,
495 (unsigned int)cfg->start_bus_number,
496 (unsigned int)cfg->end_bus_number);
497 489
498 if (!early && !acpi_disabled) 490 if (!early && !acpi_disabled)
499 valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0); 491 valid = is_mmconf_reserved(is_acpi_reserved, cfg, 0);
500 492
501 if (valid) 493 if (valid)
502 continue; 494 continue;
503 495
504 if (!early) 496 if (!early)
505 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" 497 printk(KERN_ERR FW_BUG PREFIX
506 " reserved in ACPI motherboard resources\n", 498 "MMCONFIG at %pR not reserved in "
507 cfg->address); 499 "ACPI motherboard resources\n", &cfg->res);
508 500
509 /* Don't try to do this check unless configuration 501 /* Don't try to do this check unless configuration
510 type 1 is available. how about type 2 ?*/ 502 type 1 is available. how about type 2 ?*/
511 if (raw_pci_ops) 503 if (raw_pci_ops)
512 valid = is_mmconf_reserved(e820_all_mapped, addr, size, i, cfg, 1); 504 valid = is_mmconf_reserved(e820_all_mapped, cfg, 1);
513 505
514 if (!valid) 506 if (!valid)
515 goto reject; 507 goto reject;
@@ -518,34 +510,41 @@ static void __init pci_mmcfg_reject_broken(int early)
518 return; 510 return;
519 511
520reject: 512reject:
521 printk(KERN_INFO "PCI: Not using MMCONFIG.\n"); 513 printk(KERN_INFO PREFIX "not using MMCONFIG\n");
522 pci_mmcfg_arch_free(); 514 free_all_mmcfg();
523 kfree(pci_mmcfg_config);
524 pci_mmcfg_config = NULL;
525 pci_mmcfg_config_num = 0;
526} 515}
527 516
528static int __initdata known_bridge; 517static int __initdata known_bridge;
529 518
530static int acpi_mcfg_64bit_base_addr __initdata = FALSE; 519static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
520 struct acpi_mcfg_allocation *cfg)
521{
522 int year;
531 523
532/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ 524 if (cfg->address < 0xFFFFFFFF)
533struct acpi_mcfg_allocation *pci_mmcfg_config; 525 return 0;
534int pci_mmcfg_config_num;
535 526
536static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
537{
538 if (!strcmp(mcfg->header.oem_id, "SGI")) 527 if (!strcmp(mcfg->header.oem_id, "SGI"))
539 acpi_mcfg_64bit_base_addr = TRUE; 528 return 0;
540 529
541 return 0; 530 if (mcfg->header.revision >= 1) {
531 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) &&
532 year >= 2010)
533 return 0;
534 }
535
536 printk(KERN_ERR PREFIX "MCFG region for %04x [bus %02x-%02x] at %#llx "
537 "is above 4GB, ignored\n", cfg->pci_segment,
538 cfg->start_bus_number, cfg->end_bus_number, cfg->address);
539 return -EINVAL;
542} 540}
543 541
544static int __init pci_parse_mcfg(struct acpi_table_header *header) 542static int __init pci_parse_mcfg(struct acpi_table_header *header)
545{ 543{
546 struct acpi_table_mcfg *mcfg; 544 struct acpi_table_mcfg *mcfg;
545 struct acpi_mcfg_allocation *cfg_table, *cfg;
547 unsigned long i; 546 unsigned long i;
548 int config_size; 547 int entries;
549 548
550 if (!header) 549 if (!header)
551 return -EINVAL; 550 return -EINVAL;
@@ -553,38 +552,33 @@ static int __init pci_parse_mcfg(struct acpi_table_header *header)
553 mcfg = (struct acpi_table_mcfg *)header; 552 mcfg = (struct acpi_table_mcfg *)header;
554 553
555 /* how many config structures do we have */ 554 /* how many config structures do we have */
556 pci_mmcfg_config_num = 0; 555 free_all_mmcfg();
556 entries = 0;
557 i = header->length - sizeof(struct acpi_table_mcfg); 557 i = header->length - sizeof(struct acpi_table_mcfg);
558 while (i >= sizeof(struct acpi_mcfg_allocation)) { 558 while (i >= sizeof(struct acpi_mcfg_allocation)) {
559 ++pci_mmcfg_config_num; 559 entries++;
560 i -= sizeof(struct acpi_mcfg_allocation); 560 i -= sizeof(struct acpi_mcfg_allocation);
561 }; 561 };
562 if (pci_mmcfg_config_num == 0) { 562 if (entries == 0) {
563 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n"); 563 printk(KERN_ERR PREFIX "MMCONFIG has no entries\n");
564 return -ENODEV; 564 return -ENODEV;
565 } 565 }
566 566
567 config_size = pci_mmcfg_config_num * sizeof(*pci_mmcfg_config); 567 cfg_table = (struct acpi_mcfg_allocation *) &mcfg[1];
568 pci_mmcfg_config = kmalloc(config_size, GFP_KERNEL); 568 for (i = 0; i < entries; i++) {
569 if (!pci_mmcfg_config) { 569 cfg = &cfg_table[i];
570 printk(KERN_WARNING PREFIX 570 if (acpi_mcfg_check_entry(mcfg, cfg)) {
571 "No memory for MCFG config tables\n"); 571 free_all_mmcfg();
572 return -ENOMEM;
573 }
574
575 memcpy(pci_mmcfg_config, &mcfg[1], config_size);
576
577 acpi_mcfg_oem_check(mcfg);
578
579 for (i = 0; i < pci_mmcfg_config_num; ++i) {
580 if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
581 !acpi_mcfg_64bit_base_addr) {
582 printk(KERN_ERR PREFIX
583 "MMCONFIG not in low 4GB of memory\n");
584 kfree(pci_mmcfg_config);
585 pci_mmcfg_config_num = 0;
586 return -ENODEV; 572 return -ENODEV;
587 } 573 }
574
575 if (pci_mmconfig_add(cfg->pci_segment, cfg->start_bus_number,
576 cfg->end_bus_number, cfg->address) == NULL) {
577 printk(KERN_WARNING PREFIX
578 "no memory for MCFG entries\n");
579 free_all_mmcfg();
580 return -ENOMEM;
581 }
588 } 582 }
589 583
590 return 0; 584 return 0;
@@ -614,9 +608,7 @@ static void __init __pci_mmcfg_init(int early)
614 608
615 pci_mmcfg_reject_broken(early); 609 pci_mmcfg_reject_broken(early);
616 610
617 if ((pci_mmcfg_config_num == 0) || 611 if (list_empty(&pci_mmcfg_list))
618 (pci_mmcfg_config == NULL) ||
619 (pci_mmcfg_config[0].address == 0))
620 return; 612 return;
621 613
622 if (pci_mmcfg_arch_init()) 614 if (pci_mmcfg_arch_init())
@@ -648,9 +640,7 @@ static int __init pci_mmcfg_late_insert_resources(void)
648 */ 640 */
649 if ((pci_mmcfg_resources_inserted == 1) || 641 if ((pci_mmcfg_resources_inserted == 1) ||
650 (pci_probe & PCI_PROBE_MMCONF) == 0 || 642 (pci_probe & PCI_PROBE_MMCONF) == 0 ||
651 (pci_mmcfg_config_num == 0) || 643 list_empty(&pci_mmcfg_list))
652 (pci_mmcfg_config == NULL) ||
653 (pci_mmcfg_config[0].address == 0))
654 return 1; 644 return 1;
655 645
656 /* 646 /*
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index f10a7e94a84c..90d5fd476ed4 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -27,18 +27,10 @@ static int mmcfg_last_accessed_cpu;
27 */ 27 */
28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) 28static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
29{ 29{
30 struct acpi_mcfg_allocation *cfg; 30 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus);
31 int cfg_num;
32
33 for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
34 cfg = &pci_mmcfg_config[cfg_num];
35 if (cfg->pci_segment == seg &&
36 (cfg->start_bus_number <= bus) &&
37 (cfg->end_bus_number >= bus))
38 return cfg->address;
39 }
40 31
41 /* Fall back to type 0 */ 32 if (cfg)
33 return cfg->address;
42 return 0; 34 return 0;
43} 35}
44 36
@@ -47,7 +39,7 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
47 */ 39 */
48static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) 40static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
49{ 41{
50 u32 dev_base = base | (bus << 20) | (devfn << 12); 42 u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12);
51 int cpu = smp_processor_id(); 43 int cpu = smp_processor_id();
52 if (dev_base != mmcfg_last_accessed_device || 44 if (dev_base != mmcfg_last_accessed_device ||
53 cpu != mmcfg_last_accessed_cpu) { 45 cpu != mmcfg_last_accessed_cpu) {
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index 94349f8b2f96..e783841bd1d7 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -12,38 +12,15 @@
12#include <asm/e820.h> 12#include <asm/e820.h>
13#include <asm/pci_x86.h> 13#include <asm/pci_x86.h>
14 14
15/* Static virtual mapping of the MMCONFIG aperture */ 15#define PREFIX "PCI: "
16struct mmcfg_virt {
17 struct acpi_mcfg_allocation *cfg;
18 char __iomem *virt;
19};
20static struct mmcfg_virt *pci_mmcfg_virt;
21
22static char __iomem *get_virt(unsigned int seg, unsigned bus)
23{
24 struct acpi_mcfg_allocation *cfg;
25 int cfg_num;
26
27 for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) {
28 cfg = pci_mmcfg_virt[cfg_num].cfg;
29 if (cfg->pci_segment == seg &&
30 (cfg->start_bus_number <= bus) &&
31 (cfg->end_bus_number >= bus))
32 return pci_mmcfg_virt[cfg_num].virt;
33 }
34
35 /* Fall back to type 0 */
36 return NULL;
37}
38 16
39static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) 17static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
40{ 18{
41 char __iomem *addr; 19 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus);
42 20
43 addr = get_virt(seg, bus); 21 if (cfg && cfg->virt)
44 if (!addr) 22 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12));
45 return NULL; 23 return NULL;
46 return addr + ((bus << 20) | (devfn << 12));
47} 24}
48 25
49static int pci_mmcfg_read(unsigned int seg, unsigned int bus, 26static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
@@ -109,42 +86,30 @@ static struct pci_raw_ops pci_mmcfg = {
109 .write = pci_mmcfg_write, 86 .write = pci_mmcfg_write,
110}; 87};
111 88
112static void __iomem * __init mcfg_ioremap(struct acpi_mcfg_allocation *cfg) 89static void __iomem * __init mcfg_ioremap(struct pci_mmcfg_region *cfg)
113{ 90{
114 void __iomem *addr; 91 void __iomem *addr;
115 u64 start, size; 92 u64 start, size;
93 int num_buses;
116 94
117 start = cfg->start_bus_number; 95 start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
118 start <<= 20; 96 num_buses = cfg->end_bus - cfg->start_bus + 1;
119 start += cfg->address; 97 size = PCI_MMCFG_BUS_OFFSET(num_buses);
120 size = cfg->end_bus_number + 1 - cfg->start_bus_number;
121 size <<= 20;
122 addr = ioremap_nocache(start, size); 98 addr = ioremap_nocache(start, size);
123 if (addr) { 99 if (addr)
124 printk(KERN_INFO "PCI: Using MMCONFIG at %Lx - %Lx\n", 100 addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus);
125 start, start + size - 1);
126 addr -= cfg->start_bus_number << 20;
127 }
128 return addr; 101 return addr;
129} 102}
130 103
131int __init pci_mmcfg_arch_init(void) 104int __init pci_mmcfg_arch_init(void)
132{ 105{
133 int i; 106 struct pci_mmcfg_region *cfg;
134 pci_mmcfg_virt = kzalloc(sizeof(*pci_mmcfg_virt) *
135 pci_mmcfg_config_num, GFP_KERNEL);
136 if (pci_mmcfg_virt == NULL) {
137 printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n");
138 return 0;
139 }
140 107
141 for (i = 0; i < pci_mmcfg_config_num; ++i) { 108 list_for_each_entry(cfg, &pci_mmcfg_list, list) {
142 pci_mmcfg_virt[i].cfg = &pci_mmcfg_config[i]; 109 cfg->virt = mcfg_ioremap(cfg);
143 pci_mmcfg_virt[i].virt = mcfg_ioremap(&pci_mmcfg_config[i]); 110 if (!cfg->virt) {
144 if (!pci_mmcfg_virt[i].virt) { 111 printk(KERN_ERR PREFIX "can't map MMCONFIG at %pR\n",
145 printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " 112 &cfg->res);
146 "segment %d\n",
147 pci_mmcfg_config[i].pci_segment);
148 pci_mmcfg_arch_free(); 113 pci_mmcfg_arch_free();
149 return 0; 114 return 0;
150 } 115 }
@@ -155,19 +120,12 @@ int __init pci_mmcfg_arch_init(void)
155 120
156void __init pci_mmcfg_arch_free(void) 121void __init pci_mmcfg_arch_free(void)
157{ 122{
158 int i; 123 struct pci_mmcfg_region *cfg;
159
160 if (pci_mmcfg_virt == NULL)
161 return;
162 124
163 for (i = 0; i < pci_mmcfg_config_num; ++i) { 125 list_for_each_entry(cfg, &pci_mmcfg_list, list) {
164 if (pci_mmcfg_virt[i].virt) { 126 if (cfg->virt) {
165 iounmap(pci_mmcfg_virt[i].virt + (pci_mmcfg_virt[i].cfg->start_bus_number << 20)); 127 iounmap(cfg->virt + PCI_MMCFG_BUS_OFFSET(cfg->start_bus));
166 pci_mmcfg_virt[i].virt = NULL; 128 cfg->virt = NULL;
167 pci_mmcfg_virt[i].cfg = NULL;
168 } 129 }
169 } 130 }
170
171 kfree(pci_mmcfg_virt);
172 pci_mmcfg_virt = NULL;
173} 131}
diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk
index e34e92a28eb6..7a6850683c34 100644
--- a/arch/x86/tools/gen-insn-attr-x86.awk
+++ b/arch/x86/tools/gen-insn-attr-x86.awk
@@ -226,12 +226,12 @@ function add_flags(old,new) {
226} 226}
227 227
228# convert operands to flags. 228# convert operands to flags.
229function convert_operands(opnd, i,imm,mod) 229function convert_operands(count,opnd, i,j,imm,mod)
230{ 230{
231 imm = null 231 imm = null
232 mod = null 232 mod = null
233 for (i in opnd) { 233 for (j = 1; j <= count; j++) {
234 i = opnd[i] 234 i = opnd[j]
235 if (match(i, imm_expr) == 1) { 235 if (match(i, imm_expr) == 1) {
236 if (!imm_flag[i]) 236 if (!imm_flag[i])
237 semantic_error("Unknown imm opnd: " i) 237 semantic_error("Unknown imm opnd: " i)
@@ -282,8 +282,8 @@ function convert_operands(opnd, i,imm,mod)
282 # parse one opcode 282 # parse one opcode
283 if (match($i, opnd_expr)) { 283 if (match($i, opnd_expr)) {
284 opnd = $i 284 opnd = $i
285 split($(i++), opnds, ",") 285 count = split($(i++), opnds, ",")
286 flags = convert_operands(opnds) 286 flags = convert_operands(count, opnds)
287 } 287 }
288 if (match($i, ext_expr)) 288 if (match($i, ext_expr))
289 ext = $(i++) 289 ext = $(i++)
diff --git a/arch/x86/tools/test_get_len.c b/arch/x86/tools/test_get_len.c
index d8214dc03fa7..bee8d6ac2691 100644
--- a/arch/x86/tools/test_get_len.c
+++ b/arch/x86/tools/test_get_len.c
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
113 char line[BUFSIZE], sym[BUFSIZE] = "<unknown>"; 113 char line[BUFSIZE], sym[BUFSIZE] = "<unknown>";
114 unsigned char insn_buf[16]; 114 unsigned char insn_buf[16];
115 struct insn insn; 115 struct insn insn;
116 int insns = 0, c; 116 int insns = 0;
117 int warnings = 0; 117 int warnings = 0;
118 118
119 parse_args(argc, argv); 119 parse_args(argc, argv);
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index c462cea8ef09..2b26dd5930c6 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -27,7 +27,9 @@
27#include <linux/page-flags.h> 27#include <linux/page-flags.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/console.h> 29#include <linux/console.h>
30#include <linux/pci.h>
30 31
32#include <xen/xen.h>
31#include <xen/interface/xen.h> 33#include <xen/interface/xen.h>
32#include <xen/interface/version.h> 34#include <xen/interface/version.h>
33#include <xen/interface/physdev.h> 35#include <xen/interface/physdev.h>
@@ -138,24 +140,23 @@ static void xen_vcpu_setup(int cpu)
138 */ 140 */
139void xen_vcpu_restore(void) 141void xen_vcpu_restore(void)
140{ 142{
141 if (have_vcpu_info_placement) { 143 int cpu;
142 int cpu;
143 144
144 for_each_online_cpu(cpu) { 145 for_each_online_cpu(cpu) {
145 bool other_cpu = (cpu != smp_processor_id()); 146 bool other_cpu = (cpu != smp_processor_id());
146 147
147 if (other_cpu && 148 if (other_cpu &&
148 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) 149 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
149 BUG(); 150 BUG();
150 151
151 xen_vcpu_setup(cpu); 152 xen_setup_runstate_info(cpu);
152 153
153 if (other_cpu && 154 if (have_vcpu_info_placement)
154 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) 155 xen_vcpu_setup(cpu);
155 BUG();
156 }
157 156
158 BUG_ON(!have_vcpu_info_placement); 157 if (other_cpu &&
158 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
159 BUG();
159 } 160 }
160} 161}
161 162
@@ -1176,10 +1177,16 @@ asmlinkage void __init xen_start_kernel(void)
1176 add_preferred_console("xenboot", 0, NULL); 1177 add_preferred_console("xenboot", 0, NULL);
1177 add_preferred_console("tty", 0, NULL); 1178 add_preferred_console("tty", 0, NULL);
1178 add_preferred_console("hvc", 0, NULL); 1179 add_preferred_console("hvc", 0, NULL);
1180 } else {
1181 /* Make sure ACS will be enabled */
1182 pci_request_acs();
1179 } 1183 }
1184
1180 1185
1181 xen_raw_console_write("about to get started...\n"); 1186 xen_raw_console_write("about to get started...\n");
1182 1187
1188 xen_setup_runstate_info(0);
1189
1183 /* Start the world */ 1190 /* Start the world */
1184#ifdef CONFIG_X86_32 1191#ifdef CONFIG_X86_32
1185 i386_start_kernel(); 1192 i386_start_kernel();
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 3bf7b1d250ce..bf4cd6bfe959 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -185,7 +185,7 @@ static inline unsigned p2m_index(unsigned long pfn)
185} 185}
186 186
187/* Build the parallel p2m_top_mfn structures */ 187/* Build the parallel p2m_top_mfn structures */
188static void __init xen_build_mfn_list_list(void) 188void xen_build_mfn_list_list(void)
189{ 189{
190 unsigned pfn, idx; 190 unsigned pfn, idx;
191 191
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 738da0cb0d8b..563d20504988 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -35,10 +35,10 @@
35 35
36cpumask_var_t xen_cpu_initialized_map; 36cpumask_var_t xen_cpu_initialized_map;
37 37
38static DEFINE_PER_CPU(int, resched_irq); 38static DEFINE_PER_CPU(int, xen_resched_irq);
39static DEFINE_PER_CPU(int, callfunc_irq); 39static DEFINE_PER_CPU(int, xen_callfunc_irq);
40static DEFINE_PER_CPU(int, callfuncsingle_irq); 40static DEFINE_PER_CPU(int, xen_callfuncsingle_irq);
41static DEFINE_PER_CPU(int, debug_irq) = -1; 41static DEFINE_PER_CPU(int, xen_debug_irq) = -1;
42 42
43static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id); 43static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
44static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id); 44static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id);
@@ -103,7 +103,7 @@ static int xen_smp_intr_init(unsigned int cpu)
103 NULL); 103 NULL);
104 if (rc < 0) 104 if (rc < 0)
105 goto fail; 105 goto fail;
106 per_cpu(resched_irq, cpu) = rc; 106 per_cpu(xen_resched_irq, cpu) = rc;
107 107
108 callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu); 108 callfunc_name = kasprintf(GFP_KERNEL, "callfunc%d", cpu);
109 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR, 109 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_VECTOR,
@@ -114,7 +114,7 @@ static int xen_smp_intr_init(unsigned int cpu)
114 NULL); 114 NULL);
115 if (rc < 0) 115 if (rc < 0)
116 goto fail; 116 goto fail;
117 per_cpu(callfunc_irq, cpu) = rc; 117 per_cpu(xen_callfunc_irq, cpu) = rc;
118 118
119 debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu); 119 debug_name = kasprintf(GFP_KERNEL, "debug%d", cpu);
120 rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, xen_debug_interrupt, 120 rc = bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, xen_debug_interrupt,
@@ -122,7 +122,7 @@ static int xen_smp_intr_init(unsigned int cpu)
122 debug_name, NULL); 122 debug_name, NULL);
123 if (rc < 0) 123 if (rc < 0)
124 goto fail; 124 goto fail;
125 per_cpu(debug_irq, cpu) = rc; 125 per_cpu(xen_debug_irq, cpu) = rc;
126 126
127 callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu); 127 callfunc_name = kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu);
128 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR, 128 rc = bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR,
@@ -133,19 +133,20 @@ static int xen_smp_intr_init(unsigned int cpu)
133 NULL); 133 NULL);
134 if (rc < 0) 134 if (rc < 0)
135 goto fail; 135 goto fail;
136 per_cpu(callfuncsingle_irq, cpu) = rc; 136 per_cpu(xen_callfuncsingle_irq, cpu) = rc;
137 137
138 return 0; 138 return 0;
139 139
140 fail: 140 fail:
141 if (per_cpu(resched_irq, cpu) >= 0) 141 if (per_cpu(xen_resched_irq, cpu) >= 0)
142 unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL); 142 unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu), NULL);
143 if (per_cpu(callfunc_irq, cpu) >= 0) 143 if (per_cpu(xen_callfunc_irq, cpu) >= 0)
144 unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL); 144 unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu), NULL);
145 if (per_cpu(debug_irq, cpu) >= 0) 145 if (per_cpu(xen_debug_irq, cpu) >= 0)
146 unbind_from_irqhandler(per_cpu(debug_irq, cpu), NULL); 146 unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
147 if (per_cpu(callfuncsingle_irq, cpu) >= 0) 147 if (per_cpu(xen_callfuncsingle_irq, cpu) >= 0)
148 unbind_from_irqhandler(per_cpu(callfuncsingle_irq, cpu), NULL); 148 unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu),
149 NULL);
149 150
150 return rc; 151 return rc;
151} 152}
@@ -295,6 +296,7 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
295 (unsigned long)task_stack_page(idle) - 296 (unsigned long)task_stack_page(idle) -
296 KERNEL_STACK_OFFSET + THREAD_SIZE; 297 KERNEL_STACK_OFFSET + THREAD_SIZE;
297#endif 298#endif
299 xen_setup_runstate_info(cpu);
298 xen_setup_timer(cpu); 300 xen_setup_timer(cpu);
299 xen_init_lock_cpu(cpu); 301 xen_init_lock_cpu(cpu);
300 302
@@ -348,10 +350,10 @@ static void xen_cpu_die(unsigned int cpu)
348 current->state = TASK_UNINTERRUPTIBLE; 350 current->state = TASK_UNINTERRUPTIBLE;
349 schedule_timeout(HZ/10); 351 schedule_timeout(HZ/10);
350 } 352 }
351 unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL); 353 unbind_from_irqhandler(per_cpu(xen_resched_irq, cpu), NULL);
352 unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL); 354 unbind_from_irqhandler(per_cpu(xen_callfunc_irq, cpu), NULL);
353 unbind_from_irqhandler(per_cpu(debug_irq, cpu), NULL); 355 unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
354 unbind_from_irqhandler(per_cpu(callfuncsingle_irq, cpu), NULL); 356 unbind_from_irqhandler(per_cpu(xen_callfuncsingle_irq, cpu), NULL);
355 xen_uninit_lock_cpu(cpu); 357 xen_uninit_lock_cpu(cpu);
356 xen_teardown_timer(cpu); 358 xen_teardown_timer(cpu);
357 359
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 36a5141108df..24ded31b5aec 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -120,14 +120,14 @@ struct xen_spinlock {
120 unsigned short spinners; /* count of waiting cpus */ 120 unsigned short spinners; /* count of waiting cpus */
121}; 121};
122 122
123static int xen_spin_is_locked(struct raw_spinlock *lock) 123static int xen_spin_is_locked(struct arch_spinlock *lock)
124{ 124{
125 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 125 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
126 126
127 return xl->lock != 0; 127 return xl->lock != 0;
128} 128}
129 129
130static int xen_spin_is_contended(struct raw_spinlock *lock) 130static int xen_spin_is_contended(struct arch_spinlock *lock)
131{ 131{
132 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 132 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
133 133
@@ -136,7 +136,7 @@ static int xen_spin_is_contended(struct raw_spinlock *lock)
136 return xl->spinners != 0; 136 return xl->spinners != 0;
137} 137}
138 138
139static int xen_spin_trylock(struct raw_spinlock *lock) 139static int xen_spin_trylock(struct arch_spinlock *lock)
140{ 140{
141 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 141 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
142 u8 old = 1; 142 u8 old = 1;
@@ -181,7 +181,7 @@ static inline void unspinning_lock(struct xen_spinlock *xl, struct xen_spinlock
181 __get_cpu_var(lock_spinners) = prev; 181 __get_cpu_var(lock_spinners) = prev;
182} 182}
183 183
184static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enable) 184static noinline int xen_spin_lock_slow(struct arch_spinlock *lock, bool irq_enable)
185{ 185{
186 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 186 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
187 struct xen_spinlock *prev; 187 struct xen_spinlock *prev;
@@ -254,7 +254,7 @@ out:
254 return ret; 254 return ret;
255} 255}
256 256
257static inline void __xen_spin_lock(struct raw_spinlock *lock, bool irq_enable) 257static inline void __xen_spin_lock(struct arch_spinlock *lock, bool irq_enable)
258{ 258{
259 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 259 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
260 unsigned timeout; 260 unsigned timeout;
@@ -291,12 +291,12 @@ static inline void __xen_spin_lock(struct raw_spinlock *lock, bool irq_enable)
291 spin_time_accum_total(start_spin); 291 spin_time_accum_total(start_spin);
292} 292}
293 293
294static void xen_spin_lock(struct raw_spinlock *lock) 294static void xen_spin_lock(struct arch_spinlock *lock)
295{ 295{
296 __xen_spin_lock(lock, false); 296 __xen_spin_lock(lock, false);
297} 297}
298 298
299static void xen_spin_lock_flags(struct raw_spinlock *lock, unsigned long flags) 299static void xen_spin_lock_flags(struct arch_spinlock *lock, unsigned long flags)
300{ 300{
301 __xen_spin_lock(lock, !raw_irqs_disabled_flags(flags)); 301 __xen_spin_lock(lock, !raw_irqs_disabled_flags(flags));
302} 302}
@@ -317,7 +317,7 @@ static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl)
317 } 317 }
318} 318}
319 319
320static void xen_spin_unlock(struct raw_spinlock *lock) 320static void xen_spin_unlock(struct arch_spinlock *lock)
321{ 321{
322 struct xen_spinlock *xl = (struct xen_spinlock *)lock; 322 struct xen_spinlock *xl = (struct xen_spinlock *)lock;
323 323
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index 95be7b434724..987267f79bf5 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -1,4 +1,5 @@
1#include <linux/types.h> 1#include <linux/types.h>
2#include <linux/clockchips.h>
2 3
3#include <xen/interface/xen.h> 4#include <xen/interface/xen.h>
4#include <xen/grant_table.h> 5#include <xen/grant_table.h>
@@ -27,6 +28,8 @@ void xen_pre_suspend(void)
27 28
28void xen_post_suspend(int suspend_cancelled) 29void xen_post_suspend(int suspend_cancelled)
29{ 30{
31 xen_build_mfn_list_list();
32
30 xen_setup_shared_info(); 33 xen_setup_shared_info();
31 34
32 if (suspend_cancelled) { 35 if (suspend_cancelled) {
@@ -44,7 +47,19 @@ void xen_post_suspend(int suspend_cancelled)
44 47
45} 48}
46 49
50static void xen_vcpu_notify_restore(void *data)
51{
52 unsigned long reason = (unsigned long)data;
53
54 /* Boot processor notified via generic timekeeping_resume() */
55 if ( smp_processor_id() == 0)
56 return;
57
58 clockevents_notify(reason, NULL);
59}
60
47void xen_arch_resume(void) 61void xen_arch_resume(void)
48{ 62{
49 /* nothing */ 63 smp_call_function(xen_vcpu_notify_restore,
64 (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
50} 65}
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 0a5aa44299a5..0d3f07cd1b5f 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -31,14 +31,14 @@
31#define NS_PER_TICK (1000000000LL / HZ) 31#define NS_PER_TICK (1000000000LL / HZ)
32 32
33/* runstate info updated by Xen */ 33/* runstate info updated by Xen */
34static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate); 34static DEFINE_PER_CPU(struct vcpu_runstate_info, xen_runstate);
35 35
36/* snapshots of runstate info */ 36/* snapshots of runstate info */
37static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate_snapshot); 37static DEFINE_PER_CPU(struct vcpu_runstate_info, xen_runstate_snapshot);
38 38
39/* unused ns of stolen and blocked time */ 39/* unused ns of stolen and blocked time */
40static DEFINE_PER_CPU(u64, residual_stolen); 40static DEFINE_PER_CPU(u64, xen_residual_stolen);
41static DEFINE_PER_CPU(u64, residual_blocked); 41static DEFINE_PER_CPU(u64, xen_residual_blocked);
42 42
43/* return an consistent snapshot of 64-bit time/counter value */ 43/* return an consistent snapshot of 64-bit time/counter value */
44static u64 get64(const u64 *p) 44static u64 get64(const u64 *p)
@@ -79,7 +79,7 @@ static void get_runstate_snapshot(struct vcpu_runstate_info *res)
79 79
80 BUG_ON(preemptible()); 80 BUG_ON(preemptible());
81 81
82 state = &__get_cpu_var(runstate); 82 state = &__get_cpu_var(xen_runstate);
83 83
84 /* 84 /*
85 * The runstate info is always updated by the hypervisor on 85 * The runstate info is always updated by the hypervisor on
@@ -97,14 +97,14 @@ static void get_runstate_snapshot(struct vcpu_runstate_info *res)
97/* return true when a vcpu could run but has no real cpu to run on */ 97/* return true when a vcpu could run but has no real cpu to run on */
98bool xen_vcpu_stolen(int vcpu) 98bool xen_vcpu_stolen(int vcpu)
99{ 99{
100 return per_cpu(runstate, vcpu).state == RUNSTATE_runnable; 100 return per_cpu(xen_runstate, vcpu).state == RUNSTATE_runnable;
101} 101}
102 102
103static void setup_runstate_info(int cpu) 103void xen_setup_runstate_info(int cpu)
104{ 104{
105 struct vcpu_register_runstate_memory_area area; 105 struct vcpu_register_runstate_memory_area area;
106 106
107 area.addr.v = &per_cpu(runstate, cpu); 107 area.addr.v = &per_cpu(xen_runstate, cpu);
108 108
109 if (HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area, 109 if (HYPERVISOR_vcpu_op(VCPUOP_register_runstate_memory_area,
110 cpu, &area)) 110 cpu, &area))
@@ -122,7 +122,7 @@ static void do_stolen_accounting(void)
122 122
123 WARN_ON(state.state != RUNSTATE_running); 123 WARN_ON(state.state != RUNSTATE_running);
124 124
125 snap = &__get_cpu_var(runstate_snapshot); 125 snap = &__get_cpu_var(xen_runstate_snapshot);
126 126
127 /* work out how much time the VCPU has not been runn*ing* */ 127 /* work out how much time the VCPU has not been runn*ing* */
128 blocked = state.time[RUNSTATE_blocked] - snap->time[RUNSTATE_blocked]; 128 blocked = state.time[RUNSTATE_blocked] - snap->time[RUNSTATE_blocked];
@@ -133,24 +133,24 @@ static void do_stolen_accounting(void)
133 133
134 /* Add the appropriate number of ticks of stolen time, 134 /* Add the appropriate number of ticks of stolen time,
135 including any left-overs from last time. */ 135 including any left-overs from last time. */
136 stolen = runnable + offline + __get_cpu_var(residual_stolen); 136 stolen = runnable + offline + __get_cpu_var(xen_residual_stolen);
137 137
138 if (stolen < 0) 138 if (stolen < 0)
139 stolen = 0; 139 stolen = 0;
140 140
141 ticks = iter_div_u64_rem(stolen, NS_PER_TICK, &stolen); 141 ticks = iter_div_u64_rem(stolen, NS_PER_TICK, &stolen);
142 __get_cpu_var(residual_stolen) = stolen; 142 __get_cpu_var(xen_residual_stolen) = stolen;
143 account_steal_ticks(ticks); 143 account_steal_ticks(ticks);
144 144
145 /* Add the appropriate number of ticks of blocked time, 145 /* Add the appropriate number of ticks of blocked time,
146 including any left-overs from last time. */ 146 including any left-overs from last time. */
147 blocked += __get_cpu_var(residual_blocked); 147 blocked += __get_cpu_var(xen_residual_blocked);
148 148
149 if (blocked < 0) 149 if (blocked < 0)
150 blocked = 0; 150 blocked = 0;
151 151
152 ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked); 152 ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked);
153 __get_cpu_var(residual_blocked) = blocked; 153 __get_cpu_var(xen_residual_blocked) = blocked;
154 account_idle_ticks(ticks); 154 account_idle_ticks(ticks);
155} 155}
156 156
@@ -434,7 +434,7 @@ void xen_setup_timer(int cpu)
434 name = "<timer kasprintf failed>"; 434 name = "<timer kasprintf failed>";
435 435
436 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt, 436 irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt,
437 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING, 437 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER,
438 name, NULL); 438 name, NULL);
439 439
440 evt = &per_cpu(xen_clock_events, cpu); 440 evt = &per_cpu(xen_clock_events, cpu);
@@ -442,8 +442,6 @@ void xen_setup_timer(int cpu)
442 442
443 evt->cpumask = cpumask_of(cpu); 443 evt->cpumask = cpumask_of(cpu);
444 evt->irq = irq; 444 evt->irq = irq;
445
446 setup_runstate_info(cpu);
447} 445}
448 446
449void xen_teardown_timer(int cpu) 447void xen_teardown_timer(int cpu)
@@ -494,6 +492,7 @@ __init void xen_time_init(void)
494 492
495 setup_force_cpu_cap(X86_FEATURE_TSC); 493 setup_force_cpu_cap(X86_FEATURE_TSC);
496 494
495 xen_setup_runstate_info(cpu);
497 xen_setup_timer(cpu); 496 xen_setup_timer(cpu);
498 xen_setup_cpu_clockevents(); 497 xen_setup_cpu_clockevents();
499} 498}
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S
index 02f496a8dbaa..53adefda4275 100644
--- a/arch/x86/xen/xen-asm_64.S
+++ b/arch/x86/xen/xen-asm_64.S
@@ -96,7 +96,7 @@ ENTRY(xen_sysret32)
96 pushq $__USER32_CS 96 pushq $__USER32_CS
97 pushq %rcx 97 pushq %rcx
98 98
99 pushq $VGCF_in_syscall 99 pushq $0
1001: jmp hypercall_iret 1001: jmp hypercall_iret
101ENDPATCH(xen_sysret32) 101ENDPATCH(xen_sysret32)
102RELOC(xen_sysret32, 1b+1) 102RELOC(xen_sysret32, 1b+1)
@@ -151,7 +151,7 @@ ENTRY(xen_syscall32_target)
151ENTRY(xen_sysenter_target) 151ENTRY(xen_sysenter_target)
152 lea 16(%rsp), %rsp /* strip %rcx, %r11 */ 152 lea 16(%rsp), %rsp /* strip %rcx, %r11 */
153 mov $-ENOSYS, %rax 153 mov $-ENOSYS, %rax
154 pushq $VGCF_in_syscall 154 pushq $0
155 jmp hypercall_iret 155 jmp hypercall_iret
156ENDPROC(xen_syscall32_target) 156ENDPROC(xen_syscall32_target)
157ENDPROC(xen_sysenter_target) 157ENDPROC(xen_sysenter_target)
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 355fa6b99c9c..f9153a300bce 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -25,6 +25,7 @@ extern struct shared_info *HYPERVISOR_shared_info;
25 25
26void xen_setup_mfn_list_list(void); 26void xen_setup_mfn_list_list(void);
27void xen_setup_shared_info(void); 27void xen_setup_shared_info(void);
28void xen_build_mfn_list_list(void);
28void xen_setup_machphys_mapping(void); 29void xen_setup_machphys_mapping(void);
29pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn); 30pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn);
30void xen_ident_map_ISA(void); 31void xen_ident_map_ISA(void);
@@ -41,6 +42,7 @@ void __init xen_build_dynamic_phys_to_machine(void);
41 42
42void xen_init_irq_ops(void); 43void xen_init_irq_ops(void);
43void xen_setup_timer(int cpu); 44void xen_setup_timer(int cpu);
45void xen_setup_runstate_info(int cpu);
44void xen_teardown_timer(int cpu); 46void xen_teardown_timer(int cpu);
45cycle_t xen_clocksource_read(void); 47cycle_t xen_clocksource_read(void);
46void xen_setup_cpu_clockevents(void); 48void xen_setup_cpu_clockevents(void);
diff --git a/arch/xtensa/include/asm/asm-offsets.h b/arch/xtensa/include/asm/asm-offsets.h
new file mode 100644
index 000000000000..d370ee36a182
--- /dev/null
+++ b/arch/xtensa/include/asm/asm-offsets.h
@@ -0,0 +1 @@
#include <generated/asm-offsets.h>
diff --git a/arch/xtensa/include/asm/elf.h b/arch/xtensa/include/asm/elf.h
index c3f53e755ca5..5eb6d695e987 100644
--- a/arch/xtensa/include/asm/elf.h
+++ b/arch/xtensa/include/asm/elf.h
@@ -123,7 +123,6 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
123#define ELF_CLASS ELFCLASS32 123#define ELF_CLASS ELFCLASS32
124#define ELF_ARCH EM_XTENSA 124#define ELF_ARCH EM_XTENSA
125 125
126#define USE_ELF_CORE_DUMP
127#define ELF_EXEC_PAGESIZE PAGE_SIZE 126#define ELF_EXEC_PAGESIZE PAGE_SIZE
128 127
129/* 128/*
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h
index 05cebf8f62b1..efcf33b92e4c 100644
--- a/arch/xtensa/include/asm/syscall.h
+++ b/arch/xtensa/include/asm/syscall.h
@@ -12,9 +12,6 @@ struct pt_regs;
12struct sigaction; 12struct sigaction;
13asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); 13asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
14asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); 14asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
15asmlinkage long xtensa_pipe(int __user *);
16asmlinkage long xtensa_mmap2(unsigned long, unsigned long, unsigned long,
17 unsigned long, unsigned long, unsigned long);
18asmlinkage long xtensa_ptrace(long, long, long, long); 15asmlinkage long xtensa_ptrace(long, long, long, long);
19asmlinkage long xtensa_sigreturn(struct pt_regs*); 16asmlinkage long xtensa_sigreturn(struct pt_regs*);
20asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); 17asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h
index 4e55dc763021..528042c2951e 100644
--- a/arch/xtensa/include/asm/unistd.h
+++ b/arch/xtensa/include/asm/unistd.h
@@ -94,7 +94,7 @@ __SYSCALL( 35, sys_readlink, 3)
94#define __NR_mknod 36 94#define __NR_mknod 36
95__SYSCALL( 36, sys_mknod, 3) 95__SYSCALL( 36, sys_mknod, 3)
96#define __NR_pipe 37 96#define __NR_pipe 37
97__SYSCALL( 37, xtensa_pipe, 1) 97__SYSCALL( 37, sys_pipe, 1)
98#define __NR_unlink 38 98#define __NR_unlink 38
99__SYSCALL( 38, sys_unlink, 1) 99__SYSCALL( 38, sys_unlink, 1)
100#define __NR_rmdir 39 100#define __NR_rmdir 39
@@ -189,7 +189,7 @@ __SYSCALL( 79, sys_fremovexattr, 2)
189/* File Map / Shared Memory Operations */ 189/* File Map / Shared Memory Operations */
190 190
191#define __NR_mmap2 80 191#define __NR_mmap2 80
192__SYSCALL( 80, xtensa_mmap2, 6) 192__SYSCALL( 80, sys_mmap_pgoff, 6)
193#define __NR_munmap 81 193#define __NR_munmap 81
194__SYSCALL( 81, sys_munmap, 2) 194__SYSCALL( 81, sys_munmap, 2)
195#define __NR_mprotect 82 195#define __NR_mprotect 82
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index a1badb32fcda..8cd38484e130 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v)
90 } 90 }
91 91
92 if (i < NR_IRQS) { 92 if (i < NR_IRQS) {
93 spin_lock_irqsave(&irq_desc[i].lock, flags); 93 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
94 action = irq_desc[i].action; 94 action = irq_desc[i].action;
95 if (!action) 95 if (!action)
96 goto skip; 96 goto skip;
@@ -109,7 +109,7 @@ int show_interrupts(struct seq_file *p, void *v)
109 109
110 seq_putc(p, '\n'); 110 seq_putc(p, '\n');
111skip: 111skip:
112 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 112 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
113 } else if (i == NR_IRQS) { 113 } else if (i == NR_IRQS) {
114 seq_printf(p, "NMI: "); 114 seq_printf(p, "NMI: ");
115 for_each_online_cpu(j) 115 for_each_online_cpu(j)
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index ac15ecbdf919..816e6d0d686c 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -39,49 +39,6 @@ syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= {
39#include <asm/unistd.h> 39#include <asm/unistd.h>
40}; 40};
41 41
42/*
43 * xtensa_pipe() is the normal C calling standard for creating a pipe. It's not
44 * the way unix traditional does this, though.
45 */
46
47asmlinkage long xtensa_pipe(int __user *userfds)
48{
49 int fd[2];
50 int error;
51
52 error = do_pipe_flags(fd, 0);
53 if (!error) {
54 if (copy_to_user(userfds, fd, 2 * sizeof(int)))
55 error = -EFAULT;
56 }
57 return error;
58}
59
60
61asmlinkage long xtensa_mmap2(unsigned long addr, unsigned long len,
62 unsigned long prot, unsigned long flags,
63 unsigned long fd, unsigned long pgoff)
64{
65 int error = -EBADF;
66 struct file * file = NULL;
67
68 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
69 if (!(flags & MAP_ANONYMOUS)) {
70 file = fget(fd);
71 if (!file)
72 goto out;
73 }
74
75 down_write(&current->mm->mmap_sem);
76 error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
77 up_write(&current->mm->mmap_sem);
78
79 if (file)
80 fput(file);
81out:
82 return error;
83}
84
85asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) 42asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
86{ 43{
87 unsigned long ret; 44 unsigned long ret;
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 4c559cf7da2d..e60a1f57022f 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -196,7 +196,7 @@ static const struct file_operations rs_proc_fops = {
196 .release = single_release, 196 .release = single_release,
197}; 197};
198 198
199static struct tty_operations serial_ops = { 199static const struct tty_operations serial_ops = {
200 .open = rs_open, 200 .open = rs_open,
201 .close = rs_close, 201 .close = rs_close,
202 .write = rs_write, 202 .write = rs_write,